SemiLepRunTruth

SemiLepRunTruth.h

  • Add dependency on:
    • #include "TtjetsClassifier/TtjetsApp.h"
      #include "TtjetsClassifier/McEvent.h"
      #include "TtjetsClassifier/McSemiLeptonic.h"
  • Add TtjetsApp class heritage.

  • Add new runMC() function based on runEd()
Very important to pass m_partSL as an object (not pointer) but as reference (&).


SemiLepRunTruth.cxx

  • Add dependency on:
    • #include "TtjetsClassifier/McSemiLeptonic.h"
      #include "TtjetsClassifier/McEvent.h"
      #include "TopMiniNtuple/TtjetsApp.h"
      #include "TopAnalysisBase/TopNtupleSvc.h"

  • Implement runMC() function:
1. Check if it is MC: 2. If it is MC, declare and fill a McEvent with all MC particles information:

  • McEvent *mc = 0;
  • mc = TjetsApp::fillMcEvent();
  • if(mc) {
  • std::cerr << "WARNING: the McEvent pointer is null. Skipping this event" << std::endl;
  • return 0;
  • }
  • 3. Run the particle selection:

    • if(el) {
    • pass_part_el = mcSl.passElectronChannel(mc, false);
    • } else {
    • pass_part_mu = mcSl.passMuonChannel(mc, false); }
    IMPORTANT: passElectronChannel and passMuonChannel are functions from the McSemiLeptonic class which is included in the TtjetsClassifier package.

    These functions run a cut flow which must be modified for our own purposes and our particular selection and they call to PartElectronSelection, PartMuonSelection, PartNeutrinoSelection,PartJetSelection, etc. for particle level selections, which must also be modified for a particular selection.

    see McSemiLeptonic documentation HERE.

    4. If it is MC, call the MiniSLTruth::writeMC()

    • if(ntupleSvc->isMC()) out->writeMC(pass, thisEd, &slCuts, el, el, mc, &m_partSL, pass_part_el, pass_part_mu);
    • See MiniSLTruth::writeMC()
    * Very important that selections are passed as a pointer here.


    Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | WYSIWYG | More topic actions
    Topic revision: r7 - 2020-08-30 - TWikiAdminUser
     
      • Cern Search Icon Cern Search
      • TWiki Search Icon TWiki Search
      • Google Search Icon Google Search

      Sandbox/SandboxArchive All webs login

    This site is powered by the TWiki collaboration platform Powered by PerlCopyright &© 2008-2023 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