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 (&).
- 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.