#include <TtFullHadHypGenMatch.h>
Public Member Functions | |
TtFullHadHypGenMatch (const edm::ParameterSet &cfg) | |
~TtFullHadHypGenMatch () | |
Private Member Functions | |
virtual void | buildHypo (edm::Event &evt, const edm::Handle< std::vector< pat::Jet > > &jets, std::vector< int > &match, const unsigned int iComb) |
build event hypothesis from the reco objects of a semi-leptonic event | |
virtual void | buildKey () |
build the event hypothesis key |
Definition at line 7 of file TtFullHadHypGenMatch.h.
TtFullHadHypGenMatch::TtFullHadHypGenMatch | ( | const edm::ParameterSet & | cfg | ) | [explicit] |
Definition at line 5 of file TtFullHadHypGenMatch.cc.
: TtFullHadHypothesis( cfg ) { }
TtFullHadHypGenMatch::~TtFullHadHypGenMatch | ( | ) |
Definition at line 10 of file TtFullHadHypGenMatch.cc.
{ }
void TtFullHadHypGenMatch::buildHypo | ( | edm::Event & | evt, |
const edm::Handle< std::vector< pat::Jet > > & | jets, | ||
std::vector< int > & | match, | ||
const unsigned int | iComb | ||
) | [private, virtual] |
build event hypothesis from the reco objects of a semi-leptonic event
Implements TtFullHadHypothesis.
Definition at line 13 of file TtFullHadHypGenMatch.cc.
References abs, TtFullHadEvtPartons::B, TtFullHadHypothesis::b_, TtFullHadEvtPartons::BBar, TtFullHadHypothesis::bBar_, TtGenEvtProducer_cfi::genEvt, edm::Event::getByLabel(), TtFullHadHypothesis::isValid(), TtFullHadHypothesis::jetCorrectionLevel(), analyzePatCleaning_cfg::jets, TtFullHadEvtPartons::LightP, TtFullHadHypothesis::lightP_, TtFullHadEvtPartons::LightPBar, TtFullHadHypothesis::lightPBar_, TtFullHadEvtPartons::LightQ, TtFullHadHypothesis::lightQ_, TtFullHadEvtPartons::LightQBar, TtFullHadHypothesis::lightQBar_, and TtFullHadHypothesis::setCandidate().
{ // ----------------------------------------------------- // get genEvent (to distinguish between uds and c quarks // and for the lepton matching) // ----------------------------------------------------- edm::Handle<TtGenEvent> genEvt; evt.getByLabel("genEvt", genEvt); // ----------------------------------------------------- // add jets // ----------------------------------------------------- for(unsigned idx=0; idx<match.size(); ++idx){ if( isValid(match[idx], jets) ){ switch(idx){ case TtFullHadEvtPartons::LightQ: if( std::abs(genEvt->daughterQuarkOfWPlus()->pdgId())==4 ) setCandidate(jets, match[idx], lightQ_ , jetCorrectionLevel("cQuark")); else setCandidate(jets, match[idx], lightQ_ , jetCorrectionLevel("udsQuark")); break; case TtFullHadEvtPartons::LightQBar: if( std::abs(genEvt->daughterQuarkBarOfWPlus()->pdgId())==4 ) setCandidate(jets, match[idx], lightQBar_, jetCorrectionLevel("cQuark")); else setCandidate(jets, match[idx], lightQBar_, jetCorrectionLevel("udsQuark")); break; case TtFullHadEvtPartons::B: setCandidate(jets, match[idx], b_ , jetCorrectionLevel("bQuark")); break; case TtFullHadEvtPartons::LightP: if( std::abs(genEvt->daughterQuarkOfWMinus()->pdgId())==4 ) setCandidate(jets, match[idx], lightP_ , jetCorrectionLevel("cQuark")); else setCandidate(jets, match[idx], lightP_ , jetCorrectionLevel("udsQuark")); break; case TtFullHadEvtPartons::LightPBar: if( std::abs(genEvt->daughterQuarkBarOfWMinus()->pdgId())==4 ) setCandidate(jets, match[idx], lightPBar_, jetCorrectionLevel("cQuark")); else setCandidate(jets, match[idx], lightPBar_, jetCorrectionLevel("udsQuark")); break; case TtFullHadEvtPartons::BBar: setCandidate(jets, match[idx], bBar_ , jetCorrectionLevel("bQuark")); break; } } } }
virtual void TtFullHadHypGenMatch::buildKey | ( | ) | [inline, private, virtual] |
build the event hypothesis key
Implements TtFullHadHypothesis.
Definition at line 17 of file TtFullHadHypGenMatch.h.
References TtFullHadHypothesis::key_, and TtEvent::kGenMatch.