CMS 3D CMS Logo

DebugZMCTruth Class Reference

Inheritance diagram for DebugZMCTruth:

edm::EDAnalyzer

List of all members.

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_


Detailed Description

Definition at line 13 of file DebugZMCTruth.cc.


Constructor & Destructor Documentation

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 }


Member Function Documentation

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 }


Member Data Documentation

InputTag DebugZMCTruth::genParticles_ [private]

Definition at line 18 of file DebugZMCTruth.cc.

Referenced by analyze().

InputTag DebugZMCTruth::match_ [private]

Definition at line 18 of file DebugZMCTruth.cc.

Referenced by analyze().

InputTag DebugZMCTruth::src_ [private]

Definition at line 18 of file DebugZMCTruth.cc.

Referenced by analyze().


The documentation for this class was generated from the following file:
Generated on Tue Jun 9 18:18:21 2009 for CMSSW by  doxygen 1.5.4