CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CSCTruthTest.cc
Go to the documentation of this file.
6 
7 
9  conf_(iConfig)
10 {
11 
12 }
13 
14 
16 {
17 
18 }
19 
20 void
22 {
23  using namespace edm;
24 
26  iEvent.getByLabel("csc2DRecHits",cscRecHits);
27 
28  MuonTruth theTruth(iEvent,iSetup,conf_);
29 
30  for(CSCRecHit2DCollection::const_iterator recHitItr = cscRecHits->begin();
31  recHitItr != cscRecHits->end(); recHitItr++)
32  {
33  theTruth.analyze(*recHitItr);
34  std::cout << theTruth.muonFraction() << " " << recHitItr->cscDetId() << std::endl;
35  }
36 }
37 
38 
const edm::ParameterSet & conf_
Definition: CSCTruthTest.h:16
C::const_iterator const_iterator
constant access iterator type
Definition: RangeMap.h:45
CSCTruthTest(const edm::ParameterSet &)
Definition: CSCTruthTest.cc:8
int iEvent
Definition: GenABIO.cc:243
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:361
void analyze(const CSCRecHit2D &recHit)
Definition: MuonTruth.cc:231
virtual void analyze(const edm::Event &, const edm::EventSetup &)
Definition: CSCTruthTest.cc:21
tuple cout
Definition: gather_cfg.py:121
float muonFraction()
analyze() must be called before any of the following
Definition: MuonTruth.cc:72