CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
CSCTruthTest.cc
Go to the documentation of this file.
6 
8 
10 
12  using namespace edm;
13 
15  iEvent.getByLabel("csc2DRecHits", cscRecHits);
16 
17  MuonTruth theTruth(iEvent, iSetup, conf_);
18 
19  for (CSCRecHit2DCollection::const_iterator recHitItr = cscRecHits->begin(); recHitItr != cscRecHits->end();
20  recHitItr++) {
21  theTruth.analyze(*recHitItr);
22  edm::LogVerbatim("SimMuonCSCTruthTest") << theTruth.muonFraction() << " " << recHitItr->cscDetId();
23  }
24 }
Log< level::Info, true > LogVerbatim
const edm::ParameterSet & conf_
Definition: CSCTruthTest.h:15
~CSCTruthTest() override
Definition: CSCTruthTest.cc:9
C::const_iterator const_iterator
constant access iterator type
Definition: RangeMap.h:43
CSCTruthTest(const edm::ParameterSet &)
Definition: CSCTruthTest.cc:7
int iEvent
Definition: GenABIO.cc:224
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: CSCTruthTest.cc:11
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:500
void analyze(const CSCRecHit2D &recHit)
Definition: MuonTruth.cc:156
float muonFraction()
analyze() must be called before any of the following
Definition: MuonTruth.cc:89