19 const unsigned int iComb)
override;
34 std::vector<int>&
match,
35 const unsigned int iComb) {
78 match.push_back(iLepton);
102 for (
unsigned i = 0;
i <
leps->size(); ++
i) {
104 deltaR(
genEvt->singleLepton()->eta(),
genEvt->singleLepton()->phi(), (*leps)[
i].eta(), (*leps)[
i].phi());
WDecay::LeptonType leptonType(const reco::RecoCandidate *cand)
determine lepton type of reco candidate and return a corresponding WDecay::LeptonType; the type is kN...
bool isValid(const int &idx, const edm::Handle< std::vector< pat::Jet > > &jets)
check if index is in valid range of selected jets
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::unique_ptr< reco::ShallowClonePtrCandidate > leptonicB_
std::unique_ptr< reco::ShallowClonePtrCandidate > lepton_
Class derived from the TopGenEvent for ttbar events.
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
std::unique_ptr< reco::ShallowClonePtrCandidate > makeCandidate(const edm::Handle< C > &handle, const int &idx)
use one object in a collection to set a ShallowClonePtrCandidate
Abs< T >::type abs(const T &t)
#define DEFINE_FWK_MODULE(type)
int findMatchingLepton(const edm::Handle< TtGenEvent > &genEvt, const edm::Handle< edm::View< reco::RecoCandidate > > &)
find index of the candidate nearest to the singleLepton of the generator event in the collection; ret...
std::unique_ptr< reco::ShallowClonePtrCandidate > lightQBar_
TtSemiLepHypGenMatch(const edm::ParameterSet &)
void buildKey() override
build the event hypothesis key
void setNeutrino(const edm::Handle< std::vector< pat::MET > > &met, const edm::Handle< edm::View< reco::RecoCandidate > > &leps, const int &idx, const int &type)
set neutrino, using mW = 80.4 to calculate the neutrino pz
std::unique_ptr< reco::ShallowClonePtrCandidate > neutrino_
std::unique_ptr< reco::ShallowClonePtrCandidate > lightQ_
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
int neutrinoSolutionType_
algorithm used to calculate neutrino solutions (see cfi for further details)
edm::EDGetTokenT< TtGenEvent > genEvtToken_
std::unique_ptr< reco::ShallowClonePtrCandidate > hadronicB_
std::string jetCorrectionLevel(const std::string &quarkType)
helper function to construct the proper correction level string for corresponding quarkType ...
int key_
hypothesis key (to be set by the buildKey function)