Public Member Functions | |
DebugZMCTruth (const edm::ParameterSet &pset) | |
Private Member Functions | |
virtual void | analyze (const Event &event, const EventSetup &setup) |
Private Attributes | |
InputTag | genParticles_ |
InputTag | match_ |
InputTag | src_ |
Definition at line 13 of file DebugZMCTruth.cc.
DebugZMCTruth::DebugZMCTruth | ( | const edm::ParameterSet & | pset | ) |
Definition at line 21 of file DebugZMCTruth.cc.
00021 : 00022 src_(cfg.getParameter<InputTag>("src")), 00023 genParticles_(cfg.getParameter<InputTag>("genParticles")), 00024 match_(cfg.getParameter<InputTag>("mcMatch")) { 00025 }
void DebugZMCTruth::analyze | ( | const Event & | event, | |
const EventSetup & | setup | |||
) | [private, virtual] |
Implements edm::EDAnalyzer.
Definition at line 28 of file DebugZMCTruth.cc.
References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), genParticles_cfi::genParticles, genParticles_, i, edm::Ref< C, T, F >::isNull(), edm::match(), match_, HLT_VtxMuL3::src, and src_.
00028 { 00029 Handle<GenParticleCollection> genParticles; 00030 event.getByLabel(genParticles_, genParticles); 00031 Handle<CandidateView> src; 00032 event.getByLabel(src_, src); 00033 cout << ">>> event has " << src->size() << " reconstructed particles in {" << src_ << "}" <<endl; 00034 Handle<GenParticleMatch> match; 00035 event.getByLabel(match_, match); 00036 cout << ">>> Z matches: "; 00037 for(size_t i = 0; i < src->size(); ++i) { 00038 CandidateBaseRef ref = src->refAt(i); 00039 GenParticleRef mc = (*match)[ref]; 00040 cout << (mc.isNull() ? "(no)" : "(yes)"); 00041 } 00042 cout << endl; 00043 }
InputTag DebugZMCTruth::genParticles_ [private] |
InputTag DebugZMCTruth::match_ [private] |
InputTag DebugZMCTruth::src_ [private] |