8 neutrinoSolutionType_(cfg.getParameter<int>(
"neutrinoSolutionType"))
18 std::vector<int>&
match,
const unsigned int iComb)
30 for(
unsigned idx=0; idx<match.size(); ++idx){
34 if(
std::abs(genEvt->hadronicDecayQuark()->pdgId())==4 )
40 if(
std::abs(genEvt->hadronicDecayQuarkBar()->pdgId())==4 )
60 match.push_back( iLepton );
81 if( leps->empty() )
return genIdx;
83 if( genEvt->isTtBar() && genEvt->isSemiLeptonic(
leptonType( &(leps->front()) ) ) && genEvt->singleLepton() ){
85 for(
unsigned i=0;
i<leps->size(); ++
i){
86 double dR =
deltaR(genEvt->singleLepton()->eta(), genEvt->singleLepton()->phi(), (*leps)[
i].eta(), (*leps)[
i].phi());
87 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_
int neutrinoSolutionType_
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.
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 ...