15 std::vector<int>&
match,
16 const unsigned int iComb) {
27 for (
unsigned idx = 0; idx < match.size(); ++idx) {
31 if (
std::abs(genEvt->hadronicDecayQuark()->pdgId()) == 4)
37 if (
std::abs(genEvt->hadronicDecayQuarkBar()->pdgId()) == 4)
59 match.push_back(iLepton);
81 if (genEvt->isTtBar() && genEvt->isSemiLeptonic(
leptonType(&(leps->front()))) && genEvt->singleLepton()) {
83 for (
unsigned i = 0;
i < leps->size(); ++
i) {
85 deltaR(genEvt->singleLepton()->eta(), genEvt->singleLepton()->phi(), (*leps)[
i].eta(), (*leps)[
i].phi());
86 if (minDR < 0 || dR < minDR) {
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
reco::ShallowClonePtrCandidate * lepton_
reco::ShallowClonePtrCandidate * lightQBar_
Class derived from the TopGenEvent for ttbar events.
reco::ShallowClonePtrCandidate * neutrino_
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
~TtSemiLepHypGenMatch() override
Abs< T >::type abs(const T &t)
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...
reco::ShallowClonePtrCandidate * hadronicB_
TtSemiLepHypGenMatch(const edm::ParameterSet &)
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
void setCandidate(const edm::Handle< C > &handle, const int &idx, reco::ShallowClonePtrCandidate *&clone)
use one object in a collection to set a ShallowClonePtrCandidate
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_
genEvtToken_(mayConsume< TtGenEvent >(genEvt_))
reco::ShallowClonePtrCandidate * lightQ_
reco::ShallowClonePtrCandidate * leptonicB_
std::string jetCorrectionLevel(const std::string &quarkType)
helper function to construct the proper correction level string for corresponding quarkType ...