CMS 3D CMS Logo

CSCTruthTest.cc
Go to the documentation of this file.
6 
7 CSCTruthTest::CSCTruthTest(const edm::ParameterSet &iConfig) : conf_(iConfig) {}
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 }
CSCRecHit2DCollection.h
MessageLogger.h
edm
HLT enums.
Definition: AlignableModifier.h:19
CSCTruthTest::CSCTruthTest
CSCTruthTest(const edm::ParameterSet &)
Definition: CSCTruthTest.cc:7
CSCTruthTest.h
edm::Handle< CSCRecHit2DCollection >
CSCTruthTest::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: CSCTruthTest.cc:11
MuonTruth::analyze
void analyze(const CSCRecHit2D &recHit)
Definition: MuonTruth.cc:156
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
MuonTruth
Definition: MuonTruth.h:24
edm::RangeMap::const_iterator
C::const_iterator const_iterator
constant access iterator type
Definition: RangeMap.h:43
iEvent
int iEvent
Definition: GenABIO.cc:224
CSCTruthTest::conf_
const edm::ParameterSet & conf_
Definition: CSCTruthTest.h:15
edm::EventSetup
Definition: EventSetup.h:57
CSCTruthTest::~CSCTruthTest
~CSCTruthTest() override
Definition: CSCTruthTest.cc:9
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
MuonTruth::muonFraction
float muonFraction()
analyze() must be called before any of the following
Definition: MuonTruth.cc:89
ParameterSet.h
edm::Event
Definition: Event.h:73