|
|
Go to the documentation of this file.
16 neutrinoBar_(nullptr) {
18 if (
cfg.exists(
"match")) {
24 if (
cfg.exists(
"jetCorrectionLevel")) {
29 produces<std::vector<std::pair<reco::CompositeCandidate, std::vector<int> > > >();
64 std::vector<std::vector<int> > matchVec;
69 matchVec = *matchHandle;
71 std::vector<int> dummyMatch;
72 for (
unsigned int i = 0;
i < 4; ++
i)
73 dummyMatch.push_back(-1);
74 matchVec.push_back(dummyMatch);
78 std::unique_ptr<std::vector<std::pair<reco::CompositeCandidate, std::vector<int> > > > pOut(
80 std::unique_ptr<int> pKey(
new int);
88 unsigned int idMatch = 0;
89 typedef std::vector<std::vector<int> >::iterator MatchVecIterator;
90 for (MatchVecIterator
match = matchVec.begin();
match != matchVec.end(); ++
match) {
95 pOut->push_back(std::make_pair(
hypo(), *
match));
120 edm::LogInfo(
"TtFullHypothesis") <<
"no neutrinos for gen match" << std::endl;
124 edm::LogInfo(
"TtFullHypothesis") <<
"no neutrinos for kin solution" << std::endl;
158 addFourMomenta.
set(hyp);
edm::EDGetTokenT< std::vector< pat::Jet > > jetsToken_
void setCandidate(const edm::Handle< C > &handle, const int &idx, reco::ShallowClonePtrCandidate *&clone)
use one object in a collection to set a ShallowClonePtrCandidate
static const std::string B
reco::ShallowClonePtrCandidate * b_
virtual void buildKey()=0
build the event hypothesis key
reco::ShallowClonePtrCandidate * neutrinoBar_
static const std::string WMinus
static const std::string LepBar
Log< level::Info, false > LogInfo
void resetCandidates()
reset candidate pointers before hypo build process
reco::CompositeCandidate hypo()
return event hypothesis
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
~TtFullLepHypothesis() override
default destructor
void produce(edm::Event &, const edm::EventSetup &) override
produce the event hypothesis as CompositeCandidate and Key
int key() const
return key
bool getByToken(EDGetToken token, Handle< PROD > &result) const
static const std::string Top
void addDaughter(const Candidate &, const std::string &s="")
add a clone of the passed candidate as daughter
static const std::string NuBar
reco::LeafCandidate * recNuBar
edm::EDGetTokenT< std::vector< std::vector< int > > > matchToken_
input label for all necessary collections
static const std::string WPlus
edm::EDGetTokenT< std::vector< pat::Muon > > musToken_
reco::ShallowClonePtrCandidate * lepton_
static const std::string WPlus
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
static const std::string WMinus
edm::EDGetTokenT< std::vector< pat::MET > > metsToken_
const LorentzVector & p4() const final
four-momentum Lorentz vector
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
int charge() const final
electric charge
static const std::string Lep
static const std::string BBar
const Point & vertex() const override
vertex position (overwritten by PF...)
edm::EDGetTokenT< std::vector< pat::Electron > > elecsToken_
static const std::string TopBar
TtFullLepHypothesis(const edm::ParameterSet &)
default constructor
reco::LeafCandidate * recNu
candidates needed for the genmatch hypothesis
void set(reco::Candidate &c) const
set up a candidate
std::string jetCorrectionLevel_
Jet correctedJet(const std::string &level, const std::string &flavor="none", const std::string &set="") const
reco::ShallowClonePtrCandidate * neutrino_
static const std::string Nu
reco::ShallowClonePtrCandidate * leptonBar_
static const std::string TopBar
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
reco::ShallowClonePtrCandidate * bBar_
static const std::string Top