SimMuon
MCTruth
src
CSCTruthTest.cc
Go to the documentation of this file.
1
#include "
DataFormats/CSCRecHit/interface/CSCRecHit2DCollection.h
"
2
#include "
FWCore/Framework/interface/Event.h
"
3
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
4
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
5
#include "
SimMuon/MCTruth/interface/CSCTruthTest.h
"
6
7
CSCTruthTest::CSCTruthTest
(
const
edm::ParameterSet
&iConfig) : conf_(iConfig) {}
8
9
CSCTruthTest::~CSCTruthTest
() {}
10
11
void
CSCTruthTest::analyze
(
const
edm::Event
&
iEvent
,
const
edm::EventSetup
&iSetup) {
12
using namespace
edm
;
13
14
Handle<CSCRecHit2DCollection>
cscRecHits;
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:58
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
Generated for CMSSW Reference Manual by
1.8.16