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
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_
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_
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
tuple idx
DEBUGGING if hasattr(process,"trackMonIterativeTracking2012"): print "trackMonIterativeTracking2012 D...
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 ...