9 virtual void endJob()
override;
31 src_(cfg.getParameter<
InputTag>(
"src")),
34 ptMin_(cfg.getUntrackedParameter<double>(
"ptMin")),
35 massMin_(cfg.getUntrackedParameter<double>(
"massMin")),
36 massMax_(cfg.getUntrackedParameter<double>(
"massMax")),
37 etaMin_(cfg.getUntrackedParameter<double>(
"etaMin")),
38 etaMax_(cfg.getUntrackedParameter<double>(
"etaMax")),
39 trkIso_(cfg.getUntrackedParameter<double>(
"trkIso")){
44 cout <<
" == Matched == " << endl;
50 cout <<
" == unMatched == " << endl;
64 unsigned int matched = 0, unMatched = 0;
65 cout <<
">> entries in " <<
src_ <<
": " << src->size() << endl;
70 if(dau1 == 0|| dau2 == 0)
72 "one of the two daughter does not exist\n";
84 "first of two daughter is neither a pat::Muon not pat::GenericParticle\n";
98 "first of two daughter is neither a pat::Muon not pat::GenericParticle\n";
103 cout <<
"DimuonStatistics> mc1: " << mc1->pdgId() <<
", mc2: " << mc2->pdgId() << endl;
107 mc1 = mc1->numberOfMothers() > 0 ? mc1->motherRef() :
GenParticleRef();
108 mc2 = mc2->numberOfMothers() > 0 ? mc2->motherRef() :
GenParticleRef();
120 cout <<
"dimuon mass " <<
i->mass() << endl;
129 cout <<
"matched: " << matched <<
", unmatched: " << unMatched << endl;
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
reco::GenParticleRef genParticleRef(size_t idx=0) const
virtual void endJob() override
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
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Analysis-level muon class.
value_type const * get() const
virtual const CandidateBaseRef & masterClone() const =0