CMS 3D CMS Logo

CSCTruthTest.cc
Go to the documentation of this file.
6 
8  conf_(iConfig)
9 {
10 }
11 
13 {
14 }
15 
16 void
18 {
19  using namespace edm;
20 
22  iEvent.getByLabel("csc2DRecHits",cscRecHits);
23 
24  MuonTruth theTruth(iEvent,iSetup,conf_);
25 
26  for(CSCRecHit2DCollection::const_iterator recHitItr = cscRecHits->begin();
27  recHitItr != cscRecHits->end(); recHitItr++)
28  {
29  theTruth.analyze(*recHitItr);
30  edm::LogVerbatim("SimMuonCSCTruthTest")
31  << theTruth.muonFraction() << " " << recHitItr->cscDetId();
32  }
33 }
34 
35 
const edm::ParameterSet & conf_
Definition: CSCTruthTest.h:17
CSCTruthTest(const edm::ParameterSet &)
Definition: CSCTruthTest.cc:7
int iEvent
Definition: GenABIO.cc:230
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:416
void analyze(const CSCRecHit2D &recHit)
Definition: MuonTruth.cc:182
HLT enums.
virtual ~CSCTruthTest()
Definition: CSCTruthTest.cc:12
virtual void analyze(const edm::Event &, const edm::EventSetup &)
Definition: CSCTruthTest.cc:17
float muonFraction()
analyze() must be called before any of the following
Definition: MuonTruth.cc:98