CMS 3D CMS Logo

TtSemiLepHypKinFit.cc
Go to the documentation of this file.
2 
5  statusToken_(consumes<std::vector<int> >(cfg.getParameter<edm::InputTag>("status"))),
6  partonsHadPToken_(consumes<std::vector<pat::Particle> >(cfg.getParameter<edm::InputTag>("partonsHadP"))),
7  partonsHadQToken_(consumes<std::vector<pat::Particle> >(cfg.getParameter<edm::InputTag>("partonsHadQ"))),
8  partonsHadBToken_(consumes<std::vector<pat::Particle> >(cfg.getParameter<edm::InputTag>("partonsHadB"))),
9  partonsLepBToken_(consumes<std::vector<pat::Particle> >(cfg.getParameter<edm::InputTag>("partonsLepB"))),
10  leptonsToken_(consumes<std::vector<pat::Particle> >(cfg.getParameter<edm::InputTag>("leptons"))),
11  neutrinosToken_(consumes<std::vector<pat::Particle> >(cfg.getParameter<edm::InputTag>("neutrinos"))) {}
12 
14 
17  const edm::Handle<std::vector<pat::MET> >& mets,
18  const edm::Handle<std::vector<pat::Jet> >& jets,
19  std::vector<int>& match,
20  const unsigned int iComb) {
23  if ((*status)[iComb] != 0) {
24  // create empty hypothesis if kinematic fit did not converge
25  return;
26  }
27 
34 
41 
42  // -----------------------------------------------------
43  // add jets
44  // -----------------------------------------------------
45  if (!(partonsHadP->empty() || partonsHadQ->empty() || partonsHadB->empty() || partonsLepB->empty())) {
50  }
51 
52  // -----------------------------------------------------
53  // add lepton
54  // -----------------------------------------------------
55  if (!leptons->empty()) {
56  setCandidate(leptons, iComb, lepton_);
57  }
58  match.push_back(0);
59 
60  // -----------------------------------------------------
61  // add neutrino
62  // -----------------------------------------------------
63  if (!neutrinos->empty()) {
65  }
66 }
TtSemiLepHypKinFit.h
mps_update.status
status
Definition: mps_update.py:69
edm
HLT enums.
Definition: AlignableModifier.h:19
TtSemiLepHypKinFit::leptonsToken_
edm::EDGetTokenT< std::vector< pat::Particle > > leptonsToken_
Definition: TtSemiLepHypKinFit.h:29
TtSemiLepHypHitFit_cfi.partonsLepB
partonsLepB
Definition: TtSemiLepHypHitFit_cfi.py:21
TtSemiLepHypHitFit_cfi.partonsHadP
partonsHadP
Definition: TtSemiLepHypHitFit_cfi.py:18
singleTopDQM_cfi.jets
jets
Definition: singleTopDQM_cfi.py:42
singleTopDQM_cfi.mets
mets
Definition: singleTopDQM_cfi.py:43
TtSemiLepHypKinFit::partonsHadBToken_
edm::EDGetTokenT< std::vector< pat::Particle > > partonsHadBToken_
Definition: TtSemiLepHypKinFit.h:27
edm::Handle
Definition: AssociativeIterator.h:50
TtSemiLepHypKinFit::statusToken_
edm::EDGetTokenT< std::vector< int > > statusToken_
Definition: TtSemiLepHypKinFit.h:24
TtSemiLepHypothesis::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: TtSemiLepHypothesis.h:123
TtSemiLepHitFitProducer_Electrons_cfi.leps
leps
Definition: TtSemiLepHitFitProducer_Electrons_cfi.py:5
TtSemiLepHypKinFit::buildHypo
void buildHypo(edm::Event &, const edm::Handle< edm::View< reco::RecoCandidate > > &, const edm::Handle< std::vector< pat::MET > > &, const edm::Handle< std::vector< pat::Jet > > &, std::vector< int > &, const unsigned int iComb) override
build event hypothesis from the reco objects of a semi-leptonic event
Definition: TtSemiLepHypKinFit.cc:15
TtSemiLepHypHitFit_cfi.partonsHadQ
partonsHadQ
Definition: TtSemiLepHypHitFit_cfi.py:19
TtSemiLepHypothesis
Definition: TtSemiLepHypothesis.h:31
edm::Event::getByToken
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:528
TtSemiLepHypothesis::leptonicB_
reco::ShallowClonePtrCandidate * leptonicB_
Definition: TtSemiLepHypothesis.h:115
TtSemiLepHypothesis::lightQBar_
reco::ShallowClonePtrCandidate * lightQBar_
Definition: TtSemiLepHypothesis.h:113
edm::View
Definition: CaloClusterFwd.h:14
HLT_2018_cff.InputTag
InputTag
Definition: HLT_2018_cff.py:79016
edm::ParameterSet
Definition: ParameterSet.h:36
TtSemiLepHypKinFit::neutrinosToken_
edm::EDGetTokenT< std::vector< pat::Particle > > neutrinosToken_
Definition: TtSemiLepHypKinFit.h:30
HLT_2018_cff.leptons
leptons
Definition: HLT_2018_cff.py:24820
TtSemiLepHypHitFit_cfi.partonsHadB
partonsHadB
Definition: TtSemiLepHypHitFit_cfi.py:20
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
TtSemiLepHypothesis::lightQ_
reco::ShallowClonePtrCandidate * lightQ_
Definition: TtSemiLepHypothesis.h:112
pat
Definition: HeavyIon.h:7
TtSemiLepHypKinFit::partonsLepBToken_
edm::EDGetTokenT< std::vector< pat::Particle > > partonsLepBToken_
Definition: TtSemiLepHypKinFit.h:28
looper.cfg
cfg
Definition: looper.py:297
TtSemiLepHypothesis::hadronicB_
reco::ShallowClonePtrCandidate * hadronicB_
Definition: TtSemiLepHypothesis.h:114
TtSemiLepHypHitFit_cfi.neutrinos
neutrinos
Definition: TtSemiLepHypHitFit_cfi.py:17
TtSemiLepHypKinFit::TtSemiLepHypKinFit
TtSemiLepHypKinFit(const edm::ParameterSet &)
Definition: TtSemiLepHypKinFit.cc:3
std
Definition: JetResolutionObject.h:76
TtSemiLepHypKinFit::partonsHadPToken_
edm::EDGetTokenT< std::vector< pat::Particle > > partonsHadPToken_
Definition: TtSemiLepHypKinFit.h:25
TtSemiLepHypKinFit::~TtSemiLepHypKinFit
~TtSemiLepHypKinFit() override
Definition: TtSemiLepHypKinFit.cc:13
TtSemiLepHypKinFit::partonsHadQToken_
edm::EDGetTokenT< std::vector< pat::Particle > > partonsHadQToken_
Definition: TtSemiLepHypKinFit.h:26
Particle
Definition: Particle.py:1
TtSemiLepHypothesis::lepton_
reco::ShallowClonePtrCandidate * lepton_
Definition: TtSemiLepHypothesis.h:117
edm::Event
Definition: Event.h:73
TtSemiLepHypothesis::neutrino_
reco::ShallowClonePtrCandidate * neutrino_
Definition: TtSemiLepHypothesis.h:116