#include <TtFullLepHypKinSolution.h>
Public Member Functions | |
TtFullLepHypKinSolution (const edm::ParameterSet &) | |
~TtFullLepHypKinSolution () | |
Private Member Functions | |
virtual void | buildHypo (edm::Event &evt, const edm::Handle< std::vector< pat::Electron > > &elecs, const edm::Handle< std::vector< pat::Muon > > &mus, const edm::Handle< std::vector< pat::Jet > > &jets, const edm::Handle< std::vector< pat::MET > > &mets, std::vector< int > &match, const unsigned int iComb) |
build event hypothesis from the reco objects of a full-leptonic event | |
virtual void | buildKey () |
build the event hypothesis key | |
Private Attributes | |
edm::InputTag | nuBars_ |
edm::InputTag | nus_ |
edm::InputTag | particleIdcs_ |
edm::InputTag | solWeight_ |
Definition at line 6 of file TtFullLepHypKinSolution.h.
TtFullLepHypKinSolution::TtFullLepHypKinSolution | ( | const edm::ParameterSet & | cfg | ) | [explicit] |
Definition at line 5 of file TtFullLepHypKinSolution.cc.
: TtFullLepHypothesis( cfg ), nus_ (cfg.getParameter<edm::InputTag>("Neutrinos" )), nuBars_ (cfg.getParameter<edm::InputTag>("NeutrinoBars" )), solWeight_ (cfg.getParameter<edm::InputTag>("solutionWeight" )) { }
TtFullLepHypKinSolution::~TtFullLepHypKinSolution | ( | ) |
Definition at line 13 of file TtFullLepHypKinSolution.cc.
{ }
void TtFullLepHypKinSolution::buildHypo | ( | edm::Event & | evt, |
const edm::Handle< std::vector< pat::Electron > > & | elecs, | ||
const edm::Handle< std::vector< pat::Muon > > & | mus, | ||
const edm::Handle< std::vector< pat::Jet > > & | jets, | ||
const edm::Handle< std::vector< pat::MET > > & | mets, | ||
std::vector< int > & | match, | ||
const unsigned int | iComb | ||
) | [private, virtual] |
build event hypothesis from the reco objects of a full-leptonic event
Implements TtFullLepHypothesis.
Definition at line 16 of file TtFullLepHypKinSolution.cc.
References TtFullLepHypothesis::b_, TtFullLepHypothesis::bBar_, edm::Event::getByLabel(), TtFullLepHypothesis::jetCorrectionLevel_, fwrapper::jets, TtFullLepHypothesis::lepton_, TtFullLepHypothesis::leptonBar_, TtFullLepHypothesis::neutrino_, TtFullLepHypothesis::neutrinoBar_, nuBars_, nus_, particleIdcs_, TtFullLepHypothesis::setCandidate(), and solWeight_.
{ edm::Handle<std::vector<double> > solWeight; edm::Handle<std::vector<std::vector<int> > > idcsVec; edm::Handle<std::vector<reco::LeafCandidate> > nus; edm::Handle<std::vector<reco::LeafCandidate> > nuBars; evt.getByLabel(solWeight_, solWeight); evt.getByLabel(particleIdcs_, idcsVec ); evt.getByLabel(nus_, nus ); evt.getByLabel(nuBars_, nuBars ); if( (*solWeight)[iComb]<0 ){ // create empty hypothesis if no solution exists return; } // ----------------------------------------------------- // add jets // ----------------------------------------------------- if( !jets->empty() ){ setCandidate(jets, match[0], b_ , jetCorrectionLevel_); setCandidate(jets, match[1], bBar_, jetCorrectionLevel_); } // ----------------------------------------------------- // add leptons // ----------------------------------------------------- if( !elecs->empty() && match[2]>=0) setCandidate(elecs, match[2], leptonBar_); if( !elecs->empty() && match[3]>=0) setCandidate(elecs, match[3], lepton_); if( !mus->empty() && match[4]>=0 && match[2]<0) setCandidate(mus, match[4], leptonBar_); // this 'else' happens if you have a wrong charge electron-muon- // solution so the indices are (b-idx, bbar-idx, 0, -1, 0, -1) // so the mu^+ is stored as l^- else if( !mus->empty() && match[4]>=0) setCandidate(mus, match[4], lepton_); if( !mus->empty() && match[5]>=0 && match[3]<0) setCandidate(mus, match[5], lepton_); // this 'else' happens if you have a wrong charge electron-muon- // solution so the indices are (b-idx, bbar-idx, -1, 0, -1, 0) // so the mu^- is stored as l^+ else if( !mus->empty() && match[5]>=0) setCandidate(mus, match[5], leptonBar_); // ----------------------------------------------------- // add neutrinos // ----------------------------------------------------- if( !nus->empty() ) setCandidate(nus, iComb, neutrino_); if( !nuBars->empty() ) setCandidate(nuBars, iComb, neutrinoBar_); }
virtual void TtFullLepHypKinSolution::buildKey | ( | ) | [inline, private, virtual] |
build the event hypothesis key
Implements TtFullLepHypothesis.
Definition at line 16 of file TtFullLepHypKinSolution.h.
References TtFullLepHypothesis::key_, and TtEvent::kKinSolution.
{ key_= TtEvent::kKinSolution; };
Definition at line 28 of file TtFullLepHypKinSolution.h.
Referenced by buildHypo().
edm::InputTag TtFullLepHypKinSolution::nus_ [private] |
Definition at line 27 of file TtFullLepHypKinSolution.h.
Referenced by buildHypo().
Definition at line 26 of file TtFullLepHypKinSolution.h.
Referenced by buildHypo().
Definition at line 29 of file TtFullLepHypKinSolution.h.
Referenced by buildHypo().