TopRootCore: D3PD2MiniSL

  1. D3PD2MiniSL -f file_list.txt -p settings.txt -mcType mc11c (...) <command line, use -h for help>
  2. TopMiniNtuple/util/D3PD2MiniSL.cxx:
  • Dependency on:
    • TopD3PDAnalysis/AppBase.h
      TopGoodRunsList/GrlSvc.h
      TopAnalysisBase/TopNtupleSvc.h
      TopMiniNtuple/MiniSL.h
      TopMiniNtuple/SemiLepRun.h
      TopD3PDSelection/SemiLeptonic.h
      TopD3PDSelection/CutCount.h
      TopD3PDSelection/WhichPeriod.h
      TopD3PDCorrections/StandardTtCorrections.h
      FakesMacros/MuJetsMatrixMethodA.h

  • int main(int argc <# of characters in command line>, char *argv[] <vector of characters in command line>) {


  • CutFlow cutFlow; <Declaration of a variable of the class CutFlow: class definition on the beginning of this .cxx file>
    • This class inherits attributes from AppBase class: TopD3PDAnalysis/AppBase.h
    • Public CutFlow members:
      • CutFlow class constructor:
        • AppBase(), <see AppBase class constructor HERE>
        • m_slElec(0), <this is a SemiLepRun class variable for MC & data electron channel analysis>
        • m_slMuon(0), <this is a SemilepRun class variable for MC & data muon channel analysis>
        • m_slElec_loose_pretag(0), <this is a SemiLepRun class variable only for data electron channel, loose pretag selection>
        • m_slElec_loose_tag(0), <this is a SemiLepRun class variable only for data electron channel, loose tag selection>
        • m_slMuon_loose(0), <this is a SemiLepRun class variable only for data muon channel, loose selection>
        • m_systs(), <this is a vector of SemiLepRun class variables for each systematic uncertainty, only for MC, electron & muon channels>
        • m_myIsMC(0) <this is a bool, true if MC sample>
          { }
      • CutFlow class destructor.
      • CutFlow member functions:
        • virtual int initialize(int argc, char *argv[]);
        • virtual int execute();
        • virtual int finalize();
    • Private CutFlow members:

  • Once cutFlow is declared as a CutFlow class variable the rest of the main function executes:
    • cutFlow.initialize(argc, argv)
    • cutFlow.run()
    • cutFlow.finalize()


cutFlow.initialize(argc, argv)

int CutFlow::initialize(int argc, char *argv[])

1. Initialize SemiLepRun pointers:

  • m_slElec = NULL;
  • etc.
2. Setup the services:

  • AppBase::initialize(argc, argv) <this initializes all settings for the run according to the command line flags>
3. Define TopNtupleSvc

4. Turn off all branches

  • ntupleSvc->disableAllBranches();
5. Turn on the branches needed for TopD3PDSelection

  • AppBase::enableSelectionBranches();
6. Create the SemiLepRun objects <this declares a MiniSL class variable, which is basically the output tree and its variables, see HERE.>

7. Initializes the SemiLepRun objects <this defines all output tree branches>

  • m_slElec->initialize(); <by default, if nothing is passed to SemiLepRun::initialize() then bool loose=false>
  • etc.


cutFlow.run() --> cutFlow.execute()

int CutFlow::execute()

{

1. Fills each even with data from input D3PD.

2. Checks if it's MC:

  • if(m_myIsMC) m_myIsMC = new bool(WhichPeriod::isMc(ed->eventInfo()->mc_channel_number()));
3. Checks if event passes GRL:

  • bool passGRL = AppBase::checkGRL();
4. Runs all corrections and stuff on the event information and writes in output tree:

  • m_slElec->runEd(ed,passGRL); <this argument assumes runEd(ed, passGRL, false <true for loose (only data)>, false <true for electron_loose_tag (only data)>):
  • etc.
See runEd() function on SemiLepRun documentation.


cutFlow.finalize()

int CutFLow::finalize()

Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r5 - 2013-11-04 - PatriciaFernandez
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Sandbox All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback