CMS 3D CMS Logo

TtFullHadHypGenMatch.cc
Go to the documentation of this file.
3 
5  : TtFullHadHypothesis(cfg), genEvtToken_(consumes<TtGenEvent>(edm::InputTag("genEvt"))) {}
6 
8 
10  const edm::Handle<std::vector<pat::Jet> >& jets,
11  std::vector<int>& match,
12  const unsigned int iComb) {
13  // -----------------------------------------------------
14  // get genEvent (to distinguish between uds and c quarks)
15  // -----------------------------------------------------
18 
19  // -----------------------------------------------------
20  // add jets
21  // -----------------------------------------------------
22  for (unsigned idx = 0; idx < match.size(); ++idx) {
23  if (isValid(match[idx], jets)) {
24  switch (idx) {
26  if (std::abs(genEvt->daughterQuarkOfWPlus()->pdgId()) == 4)
28  else
30  break;
32  if (std::abs(genEvt->daughterQuarkBarOfWPlus()->pdgId()) == 4)
34  else
36  break;
39  break;
41  if (std::abs(genEvt->daughterQuarkOfWMinus()->pdgId()) == 4)
43  else
45  break;
47  if (std::abs(genEvt->daughterQuarkBarOfWMinus()->pdgId()) == 4)
49  else
51  break;
54  break;
55  }
56  }
57  }
58 }
TtFullHadHypothesis::isValid
bool isValid(const int &idx, const edm::Handle< std::vector< pat::Jet > > &jets)
check if index is in valid range of selected jets
Definition: TtFullHadHypothesis.h:57
TtFullHadHypothesis::lightP_
reco::ShallowClonePtrCandidate * lightP_
Definition: TtFullHadHypothesis.h:92
TtFullHadHypGenMatch::genEvtToken_
edm::EDGetTokenT< TtGenEvent > genEvtToken_
Definition: TtFullHadHypGenMatch.h:22
TtFullHadHypGenMatch::buildHypo
void buildHypo(edm::Event &evt, const edm::Handle< std::vector< pat::Jet > > &jets, std::vector< int > &match, const unsigned int iComb) override
build event hypothesis from the reco objects of a semi-leptonic event
Definition: TtFullHadHypGenMatch.cc:9
TtFullHadEvtPartons::LightQ
Definition: TtFullHadEvtPartons.h:25
edm
HLT enums.
Definition: AlignableModifier.h:19
charmTagsComputerCvsB_cfi.idx
idx
Definition: charmTagsComputerCvsB_cfi.py:108
TtGenEvent
Class derived from the TopGenEvent for ttbar events.
Definition: TtGenEvent.h:18
TtFullHadHypothesis::setCandidate
void setCandidate(const edm::Handle< C > &handle, const int &idx, reco::ShallowClonePtrCandidate *&clone)
use one object in a collection to set a ShallowClonePtrCandidate
Definition: TtFullHadHypothesis.h:99
TtFullHadEvtPartons::LightP
Definition: TtFullHadEvtPartons.h:25
singleTopDQM_cfi.jets
jets
Definition: singleTopDQM_cfi.py:42
TtFullHadHypothesis::bBar_
reco::ShallowClonePtrCandidate * bBar_
Definition: TtFullHadHypothesis.h:91
edm::Handle
Definition: AssociativeIterator.h:50
TtFullHadHypothesis::lightPBar_
reco::ShallowClonePtrCandidate * lightPBar_
Definition: TtFullHadHypothesis.h:93
TtFullHadHypothesis::b_
reco::ShallowClonePtrCandidate * b_
Definition: TtFullHadHypothesis.h:90
TtFullHadHypGenMatch::TtFullHadHypGenMatch
TtFullHadHypGenMatch(const edm::ParameterSet &cfg)
Definition: TtFullHadHypGenMatch.cc:4
TtFullHadHypothesis
Definition: TtFullHadHypothesis.h:29
edm::Event::getByToken
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:528
HLT_2018_cff.InputTag
InputTag
Definition: HLT_2018_cff.py:79016
edm::ParameterSet
Definition: ParameterSet.h:36
TtFullHadEvtPartons::LightPBar
Definition: TtFullHadEvtPartons.h:25
TtFullHadEvtPartons::LightQBar
Definition: TtFullHadEvtPartons.h:25
match
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:10
TtFullHadHypGenMatch.h
looper.cfg
cfg
Definition: looper.py:297
TtFullHadEvtPartons::BBar
Definition: TtFullHadEvtPartons.h:25
TtFullHadEvtPartons.h
TtFullHadHypothesis::lightQ_
reco::ShallowClonePtrCandidate * lightQ_
Definition: TtFullHadHypothesis.h:88
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
TtFullHadHypothesis::jetCorrectionLevel
std::string jetCorrectionLevel(const std::string &quarkType)
helper function to construct the proper correction level string for corresponding quarkType
Definition: TtFullHadHypothesis.cc:127
TtFullHadEvtPartons::B
Definition: TtFullHadEvtPartons.h:25
edm::Event
Definition: Event.h:73
TtFullHadHypGenMatch::~TtFullHadHypGenMatch
~TtFullHadHypGenMatch() override
Definition: TtFullHadHypGenMatch.cc:7
TtGenEvtProducer_cfi.genEvt
genEvt
Definition: TtGenEvtProducer_cfi.py:7
TtFullHadHypothesis::lightQBar_
reco::ShallowClonePtrCandidate * lightQBar_
Definition: TtFullHadHypothesis.h:89