#include <SimMuon/MCTruth/src/CSCTruthTest.h>
Public Member Functions | |
CSCTruthTest (const edm::ParameterSet &) | |
~CSCTruthTest () | |
Private Member Functions | |
virtual void | analyze (const edm::Event &, const edm::EventSetup &) |
Private Attributes | |
MuonTruth | theTruth |
Definition at line 7 of file CSCTruthTest.h.
CSCTruthTest::CSCTruthTest | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
CSCTruthTest::~CSCTruthTest | ( | ) |
void CSCTruthTest::analyze | ( | const edm::Event & | iEvent, | |
const edm::EventSetup & | iSetup | |||
) | [private, virtual] |
Implements edm::EDAnalyzer.
Definition at line 21 of file CSCTruthTest.cc.
References MuonTruth::analyze(), GenMuonPlsPt100GeV_cfg::cout, lat::endl(), MuonTruth::eventSetup(), edm::Event::getByLabel(), MuonTruth::muonFraction(), and theTruth.
00022 { 00023 using namespace edm; 00024 00025 Handle<CSCRecHit2DCollection> cscRecHits; 00026 iEvent.getByLabel("csc2DRecHits",cscRecHits); 00027 00028 theTruth.eventSetup(iEvent,iSetup); 00029 00030 for(CSCRecHit2DCollection::const_iterator recHitItr = cscRecHits->begin(); 00031 recHitItr != cscRecHits->end(); recHitItr++) 00032 { 00033 theTruth.analyze(*recHitItr); 00034 std::cout << theTruth.muonFraction() << " " << recHitItr->cscDetId() << std::endl; 00035 } 00036 }
MuonTruth CSCTruthTest::theTruth [private] |