17 std::vector<int>&
match,
const unsigned int iComb)
29 for(
unsigned idx=0; idx<match.size(); ++idx){
33 if(
std::abs(genEvt->hadronicDecayQuark()->pdgId())==4 )
39 if(
std::abs(genEvt->hadronicDecayQuarkBar()->pdgId())==4 )
59 match.push_back( iLepton );
80 if( leps->empty() )
return genIdx;
82 if( genEvt->isTtBar() && genEvt->isSemiLeptonic(
leptonType( &(leps->front()) ) ) && genEvt->singleLepton() ){
84 for(
unsigned i=0;
i<leps->size(); ++
i){
85 double dR =
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
reco::ShallowClonePtrCandidate * lepton_
reco::ShallowClonePtrCandidate * lightQBar_
reco::ShallowClonePtrCandidate * neutrino_
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...
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
reco::ShallowClonePtrCandidate * hadronicB_
double deltaR(double eta1, double eta2, double phi1, double phi2)
virtual 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)
build event hypothesis from the reco objects of a semi-leptonic event
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)
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 ...