11 virtual void endJob()
override;
32 src_(cfg.getParameter<
InputTag>(
"src")),
36 ptMin_(cfg.getUntrackedParameter<double>(
"ptMin")),
37 massMin_(cfg.getUntrackedParameter<double>(
"massMin")),
38 massMax_(cfg.getUntrackedParameter<double>(
"massMax")),
39 etaMin_(cfg.getUntrackedParameter<double>(
"etaMin")),
40 etaMax_(cfg.getUntrackedParameter<double>(
"etaMax")),
41 trkIso_(cfg.getUntrackedParameter<double>(
"trkIso")){
46 cout <<
" == Matched == " << endl;
52 cout <<
" == unMatched == " << endl;
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;
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
edm::EDGetTokenT< reco::CandidateView > srcToken_
reco::GenParticleRef genParticleRef(size_t idx=0) const
virtual void endJob() override
bool getByToken(EDGetToken token, Handle< PROD > &result) const
virtual float eta() const =0
momentum pseudorapidity
#define DEFINE_FWK_MODULE(type)
DimuonStatistics(const edm::ParameterSet &cfg)
edm::Ref< GenParticleCollection > GenParticleRef
persistent reference to a GenParticle
virtual void analyze(const edm::Event &, const edm::EventSetup &) override
const unsigned int maxEntries
std::vector< unsigned int > unMatched_
std::vector< unsigned int > matched_
bool isNonnull() const
Checks for non-null.
Analysis-level Generic Particle class (e.g. for hadron or muon not fully reconstructed) ...
virtual float pt() const =0
transverse momentum
Analysis-level muon class.
value_type const * get() const
virtual const CandidateBaseRef & masterClone() const =0