Implements edm::EDAnalyzer.
Definition at line 60 of file DimuonStatistics.cc.
References alignmentValidation::c1, gather_cfg::cout, reco::Candidate::eta(), etaMax_, etaMin_, Exception, pat::PATObject< ObjectType >::genParticleRef(), edm::RefToBase< T >::get(), edm::Event::getByToken(), i, edm::errors::InvalidReference, edm::Ref< C, T, F >::isNonnull(), j, relval_2017::k, massMax_, massMin_, reco::Candidate::masterClone(), matched_, maxEntries, reco::Candidate::pt(), ptMin_, alcazmumu_cfi::src, src_, srcToken_, pat::Muon::trackIso(), trkIso_, and unMatched_.
66 unsigned int matched = 0, unMatched = 0;
67 cout <<
">> entries in " <<
src_ <<
": " << src->size() << endl;
72 if(dau1 == 0|| dau2 == 0)
74 "one of the two daughter does not exist\n";
86 "first of two daughter is neither a pat::Muon not pat::GenericParticle\n";
100 "first of two daughter is neither a pat::Muon not pat::GenericParticle\n";
105 cout <<
"DimuonStatistics> mc1: " << mc1->pdgId() <<
", mc2: " << mc2->pdgId() << endl;
109 mc1 = mc1->numberOfMothers() > 0 ? mc1->motherRef() :
GenParticleRef();
110 mc2 = mc2->numberOfMothers() > 0 ? mc2->motherRef() :
GenParticleRef();
122 cout <<
"dimuon mass " <<
i->mass() << endl;
131 cout <<
"matched: " << matched <<
", unmatched: " << unMatched << endl;
value_type const * get() const
edm::EDGetTokenT< reco::CandidateView > srcToken_
bool isNonnull() const
Checks for non-null.
reco::GenParticleRef genParticleRef(size_t idx=0) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
virtual double pt() const =0
transverse momentum
edm::Ref< GenParticleCollection > GenParticleRef
persistent reference to a GenParticle
const unsigned int maxEntries
std::vector< unsigned int > unMatched_
std::vector< unsigned int > matched_
Analysis-level Generic Particle class (e.g. for hadron or muon not fully reconstructed) ...
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Analysis-level muon class.
virtual double eta() const =0
momentum pseudorapidity
virtual const CandidateBaseRef & masterClone() const =0