6 elecsToken_(consumes<
std::vector<
pat::
Electron> >(cfg.getParameter<
edm::InputTag>(
"electrons"))),
7 musToken_ (consumes<
std::vector<
pat::
Muon> >(cfg.getParameter<
edm::InputTag>(
"muons"))),
8 jetsToken_ (consumes<
std::vector<
pat::
Jet> >(cfg.getParameter<
edm::InputTag>(
"jets"))),
9 metsToken_ (consumes<
std::vector<
pat::
MET> >(cfg.getParameter<
edm::InputTag>(
"mets"))),
15 if( cfg.
exists(
"match") ) {
21 if( cfg.
exists(
"jetCorrectionLevel") ) {
27 produces<std::vector<std::pair<reco::CompositeCandidate, std::vector<int> > > >();
59 std::vector<std::vector<int> > matchVec;
63 matchVec = *matchHandle;
66 std::vector<int> dummyMatch;
67 for(
unsigned int i = 0;
i < 4; ++
i)
68 dummyMatch.push_back( -1 );
69 matchVec.push_back( dummyMatch );
73 std::unique_ptr<std::vector<std::pair<reco::CompositeCandidate, std::vector<int> > > >
75 std::unique_ptr<int> pKey(
new int);
83 unsigned int idMatch = 0;
84 typedef std::vector<std::vector<int> >::iterator MatchVecIterator;
85 for(MatchVecIterator
match = matchVec.begin();
match != matchVec.end(); ++
match) {
90 pOut->push_back( std::make_pair(
hypo(), *
match) );
119 edm::LogInfo(
"TtFullHypothesis") <<
"no neutrinos for gen match" << std::endl;
123 edm::LogInfo(
"TtFullHypothesis") <<
"no neutrinos for kin solution" << std::endl;
138 addFourMomenta.
set(WPlus);
141 addFourMomenta.
set(Top);
149 addFourMomenta.
set(WMinus);
152 addFourMomenta.
set(TopBar);
157 addFourMomenta.
set( hyp );
T getParameter(std::string const &) const
reco::ShallowClonePtrCandidate * neutrino_
reco::ShallowClonePtrCandidate * leptonBar_
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
static const std::string WMinus
reco::LeafCandidate * recNuBar
static const std::string Nu
void setCandidate(const edm::Handle< C > &handle, const int &idx, reco::ShallowClonePtrCandidate *&clone)
use one object in a collection to set a ShallowClonePtrCandidate
bool getByToken(EDGetToken token, Handle< PROD > &result) const
virtual void buildKey()=0
build the event hypothesis key
bool exists(std::string const ¶meterName) const
checks if a parameter exists
reco::LeafCandidate * recNu
candidates needed for the genmatch hypothesis
static const std::string WPlus
def setup(process, global_tag, zero_tesla=False)
int charge() const final
electric charge
static const std::string B
static const std::string Top
static const std::string Top
static const std::string TopBar
const Point & vertex() const override
vertex position (overwritten by PF...)
static const std::string WMinus
static const std::string LepBar
const LorentzVector & p4() const final
four-momentum Lorentz vector
edm::EDGetTokenT< std::vector< pat::Jet > > jetsToken_
void addDaughter(const Candidate &, const std::string &s="")
add a clone of the passed candidate as daughter
void resetCandidates()
reset candidate pointers before hypo build process
reco::CompositeCandidate hypo()
return event hypothesis
static const std::string WPlus
static const std::string TopBar
edm::EDGetTokenT< std::vector< std::vector< int > > > matchToken_
input label for all necessary collections
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)=0
build event hypothesis from the reco objects of a semi-leptonic event
edm::EDGetTokenT< std::vector< pat::Electron > > elecsToken_
reco::ShallowClonePtrCandidate * lepton_
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
reco::ShallowClonePtrCandidate * bBar_
void produce(edm::Event &, const edm::EventSetup &) override
produce the event hypothesis as CompositeCandidate and Key
std::string jetCorrectionLevel_
edm::EDGetTokenT< std::vector< pat::MET > > metsToken_
static const std::string BBar
int key() const
return key
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
void set(reco::Candidate &c) const
set up a candidate
reco::ShallowClonePtrCandidate * b_
Jet correctedJet(const std::string &level, const std::string &flavor="none", const std::string &set="") const
TtFullLepHypothesis(const edm::ParameterSet &)
default constructor
static const std::string NuBar
~TtFullLepHypothesis() override
default destructor
static const std::string Lep
reco::ShallowClonePtrCandidate * neutrinoBar_
edm::EDGetTokenT< std::vector< pat::Muon > > musToken_