CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TtFullHadHypKinFit.cc
Go to the documentation of this file.
3 
4 
6  TtFullHadHypothesis( cfg ),
7  status_ (cfg.getParameter<edm::InputTag>("status" )),
8  lightQTag_ (cfg.getParameter<edm::InputTag>("lightQTag" )),
9  lightQBarTag_(cfg.getParameter<edm::InputTag>("lightQBarTag")),
10  bTag_ (cfg.getParameter<edm::InputTag>("bTag" )),
11  bBarTag_ (cfg.getParameter<edm::InputTag>("bBarTag" )),
12  lightPTag_ (cfg.getParameter<edm::InputTag>("lightPTag" )),
13  lightPBarTag_(cfg.getParameter<edm::InputTag>("lightPBarTag"))
14 {
15 }
16 
18 
19 void
21  const edm::Handle<std::vector<pat::Jet> >& jets,
22  std::vector<int>& match, const unsigned int iComb)
23 {
25  evt.getByLabel(status_, status);
26  if( (*status)[iComb] != 0 ){
27  // create empty hypothesis if kinematic fit did not converge
28  return;
29  }
30 
37 
38  evt.getByLabel(lightQTag_ , lightQ );
39  evt.getByLabel(lightQBarTag_, lightQBar);
40  evt.getByLabel(bTag_ , b );
41  evt.getByLabel(bBarTag_ , bBar );
42  evt.getByLabel(lightPTag_ , lightP );
43  evt.getByLabel(lightPBarTag_, lightPBar);
44 
45  // -----------------------------------------------------
46  // add jets
47  // -----------------------------------------------------
48  if( !( lightQ->empty() || lightQBar->empty() || b->empty() || bBar->empty() ||
49  lightP->empty() || lightPBar->empty() ) ) {
50  setCandidate(lightQ , iComb, lightQ_ );
51  setCandidate(lightQBar, iComb, lightQBar_);
52  setCandidate(b , iComb, b_ );
53  setCandidate(bBar , iComb, bBar_ );
54  setCandidate(lightP , iComb, lightP_ );
55  setCandidate(lightPBar, iComb, lightPBar_);
56  }
57 }
void setCandidate(const edm::Handle< C > &handle, const int &idx, reco::ShallowClonePtrCandidate *&clone)
use one object in a collection to set a ShallowClonePtrCandidate
edm::InputTag bBarTag_
reco::ShallowClonePtrCandidate * lightPBar_
edm::InputTag lightPBarTag_
vector< PseudoJet > jets
reco::ShallowClonePtrCandidate * lightQBar_
reco::ShallowClonePtrCandidate * lightP_
edm::InputTag lightQTag_
TtFullHadHypKinFit(const edm::ParameterSet &)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:361
edm::InputTag lightQBarTag_
virtual void buildHypo(edm::Event &, const edm::Handle< std::vector< pat::Jet > > &, std::vector< int > &, const unsigned int iComb)
build event hypothesis from the reco objects of a full-hadronic event
double b
Definition: hdecay.h:120
reco::ShallowClonePtrCandidate * bBar_
reco::ShallowClonePtrCandidate * b_
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:6
tuple status
Definition: ntuplemaker.py:245
reco::ShallowClonePtrCandidate * lightQ_
edm::InputTag lightPTag_