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 14 of file DebugZMCTruth.cc.
DebugZMCTruth::DebugZMCTruth | ( | const edm::ParameterSet & | pset | ) |
Definition at line 22 of file DebugZMCTruth.cc.
void DebugZMCTruth::analyze | ( | const Event & | event, |
const EventSetup & | setup | ||
) | [private, virtual] |
Implements edm::EDAnalyzer.
Definition at line 29 of file DebugZMCTruth.cc.
References gather_cfg::cout, genParticleCandidates2GenParticles_cfi::genParticles, genParticles_, i, edm::Ref< C, T, F >::isNull(), match(), match_, align_tpl::src, and src_.
{ Handle<GenParticleCollection> genParticles; event.getByLabel(genParticles_, genParticles); Handle<CandidateView> src; event.getByLabel(src_, src); cout << ">>> event has " << src->size() << " reconstructed particles in {" << src_ << "}" <<endl; Handle<GenParticleMatch> match; event.getByLabel(match_, match); cout << ">>> Z matches: "; for(unsigned int i = 0; i < src->size(); ++i) { CandidateBaseRef ref = src->refAt(i); GenParticleRef mc = (*match)[ref]; cout << (mc.isNull() ? "(no)" : "(yes)"); } cout << endl; }
InputTag DebugZMCTruth::genParticles_ [private] |
Definition at line 19 of file DebugZMCTruth.cc.
Referenced by analyze().
InputTag DebugZMCTruth::match_ [private] |
Definition at line 19 of file DebugZMCTruth.cc.
Referenced by analyze().
InputTag DebugZMCTruth::src_ [private] |
Definition at line 19 of file DebugZMCTruth.cc.
Referenced by analyze().