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 edm::EDConsumerBase

Public Member Functions

 CSCTruthTest (const edm::ParameterSet &)
 
 ~CSCTruthTest ()
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

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
 
- 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::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

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
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:390
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().