CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
CSCTruthTest Class Reference

#include <CSCTruthTest.h>

Inheritance diagram for CSCTruthTest:
edm::EDAnalyzer

Public Member Functions

 CSCTruthTest (const edm::ParameterSet &)
 
 ~CSCTruthTest ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

Private Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 

Private Attributes

const edm::ParameterSetconf_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

Detailed Description

Definition at line 7 of file CSCTruthTest.h.

Constructor & Destructor Documentation

CSCTruthTest::CSCTruthTest ( const edm::ParameterSet iConfig)
explicit

Definition at line 8 of file CSCTruthTest.cc.

8  :
9  conf_(iConfig)
10 {
11 
12 }
const edm::ParameterSet & conf_
Definition: CSCTruthTest.h:16
CSCTruthTest::~CSCTruthTest ( )

Definition at line 15 of file CSCTruthTest.cc.

16 {
17 
18 }

Member Function Documentation

void CSCTruthTest::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
privatevirtual

Implements edm::EDAnalyzer.

Definition at line 21 of file CSCTruthTest.cc.

References MuonTruth::analyze(), conf_, gather_cfg::cout, edm::Event::getByLabel(), and MuonTruth::muonFraction().

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 }
const edm::ParameterSet & conf_
Definition: CSCTruthTest.h:16
C::const_iterator const_iterator
constant access iterator type
Definition: RangeMap.h:45
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
tuple cout
Definition: gather_cfg.py:121

Member Data Documentation

const edm::ParameterSet& CSCTruthTest::conf_
private

Definition at line 16 of file CSCTruthTest.h.

Referenced by analyze().