CMS 3D CMS Logo

TtFullHadHypKinFit.cc
Go to the documentation of this file.
2 
5  statusToken_(consumes<std::vector<int> >(cfg.getParameter<edm::InputTag>("status"))),
6  lightQToken_(consumes<std::vector<pat::Particle> >(cfg.getParameter<edm::InputTag>("lightQTag"))),
7  lightQBarToken_(consumes<std::vector<pat::Particle> >(cfg.getParameter<edm::InputTag>("lightQBarTag"))),
8  bToken_(consumes<std::vector<pat::Particle> >(cfg.getParameter<edm::InputTag>("bTag"))),
9  bBarToken_(consumes<std::vector<pat::Particle> >(cfg.getParameter<edm::InputTag>("bBarTag"))),
10  lightPToken_(consumes<std::vector<pat::Particle> >(cfg.getParameter<edm::InputTag>("lightPTag"))),
11  lightPBarToken_(consumes<std::vector<pat::Particle> >(cfg.getParameter<edm::InputTag>("lightPBarTag"))) {}
12 
14 
16  const edm::Handle<std::vector<pat::Jet> >& jets,
17  std::vector<int>& match,
18  const unsigned int iComb) {
21  if ((*status)[iComb] != 0) {
22  // create empty hypothesis if kinematic fit did not converge
23  return;
24  }
25 
32 
33  evt.getByToken(lightQToken_, lightQ);
34  evt.getByToken(lightQBarToken_, lightQBar);
35  evt.getByToken(bToken_, b);
36  evt.getByToken(bBarToken_, bBar);
37  evt.getByToken(lightPToken_, lightP);
38  evt.getByToken(lightPBarToken_, lightPBar);
39 
40  // -----------------------------------------------------
41  // add jets
42  // -----------------------------------------------------
43  if (!(lightQ->empty() || lightQBar->empty() || b->empty() || bBar->empty() || lightP->empty() ||
44  lightPBar->empty())) {
45  setCandidate(lightQ, iComb, lightQ_);
46  setCandidate(lightQBar, iComb, lightQBar_);
47  setCandidate(b, iComb, b_);
48  setCandidate(bBar, iComb, bBar_);
49  setCandidate(lightP, iComb, lightP_);
50  setCandidate(lightPBar, iComb, lightPBar_);
51  }
52 }
TtFullHadHypKinFit::bToken_
edm::EDGetTokenT< std::vector< pat::Particle > > bToken_
Definition: TtFullHadHypKinFit.h:25
TtFullHadHypothesis::lightP_
reco::ShallowClonePtrCandidate * lightP_
Definition: TtFullHadHypothesis.h:92
mps_update.status
status
Definition: mps_update.py:69
edm
HLT enums.
Definition: AlignableModifier.h:19
TtFullHadHypKinFit::TtFullHadHypKinFit
TtFullHadHypKinFit(const edm::ParameterSet &)
Definition: TtFullHadHypKinFit.cc:3
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:85964
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
singleTopDQM_cfi.jets
jets
Definition: singleTopDQM_cfi.py:42
TtFullHadHypKinFit::lightQBarToken_
edm::EDGetTokenT< std::vector< pat::Particle > > lightQBarToken_
Definition: TtFullHadHypKinFit.h:24
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
TtFullHadHypKinFit::~TtFullHadHypKinFit
~TtFullHadHypKinFit() override
Definition: TtFullHadHypKinFit.cc:13
TtFullHadHypothesis
Definition: TtFullHadHypothesis.h:29
edm::Event::getByToken
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:531
TtFullHadHypKinFit::lightPBarToken_
edm::EDGetTokenT< std::vector< pat::Particle > > lightPBarToken_
Definition: TtFullHadHypKinFit.h:28
b
double b
Definition: hdecay.h:118
TtFullHadHypKinFit::statusToken_
edm::EDGetTokenT< std::vector< int > > statusToken_
Definition: TtFullHadHypKinFit.h:22
edm::ParameterSet
Definition: ParameterSet.h:47
TtFullHadHypKinFit.h
match
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:10
createfilelist.int
int
Definition: createfilelist.py:10
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
pat
Definition: HeavyIon.h:7
TtFullHadHypKinFit::buildHypo
void buildHypo(edm::Event &, const edm::Handle< std::vector< pat::Jet > > &, std::vector< int > &, const unsigned int iComb) override
build event hypothesis from the reco objects of a full-hadronic event
Definition: TtFullHadHypKinFit.cc:15
looper.cfg
cfg
Definition: looper.py:297
TtFullHadHypKinFit::lightPToken_
edm::EDGetTokenT< std::vector< pat::Particle > > lightPToken_
Definition: TtFullHadHypKinFit.h:27
std
Definition: JetResolutionObject.h:76
Particle
Definition: Particle.py:1
TtFullHadHypothesis::lightQ_
reco::ShallowClonePtrCandidate * lightQ_
Definition: TtFullHadHypothesis.h:88
edm::Event
Definition: Event.h:73
TtFullHadHypKinFit::lightQToken_
edm::EDGetTokenT< std::vector< pat::Particle > > lightQToken_
Definition: TtFullHadHypKinFit.h:23
TtFullHadHypothesis::lightQBar_
reco::ShallowClonePtrCandidate * lightQBar_
Definition: TtFullHadHypothesis.h:89
TtFullHadHypKinFit::bBarToken_
edm::EDGetTokenT< std::vector< pat::Particle > > bBarToken_
Definition: TtFullHadHypKinFit.h:26