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
MultiplicityInvestigator Class Reference

#include <myTKAnalyses/DigiInvestigator/src/MultiplicityInvestigator.cc>

Inheritance diagram for MultiplicityInvestigator:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 MultiplicityInvestigator (const edm::ParameterSet &)
 
 ~MultiplicityInvestigator ()
 
- 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
std::vector< ConsumesInfoconsumesInfo () const
 
 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
 
void modulesDependentUpon (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) 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 &) override
 
virtual void beginJob () override
 
virtual void beginRun (const edm::Run &, const edm::EventSetup &) override
 
virtual void endJob () override
 

Private Attributes

DigiInvestigatorHistogramMaker m_digiinvesthmevent
 
DigiLumiCorrHistogramMaker m_digilumicorrhmevent
 
DigiPileupCorrHistogramMaker m_digipileupcorrhmevent
 
DigiVertexCorrHistogramMaker m_digivtxcorrhmevent
 
DigiVtxPosCorrHistogramMaker m_digivtxposcorrhmevent
 
edm::EDGetTokenT< std::map
< unsigned int, int > > 
m_multiplicityMapToken
 
edm::EDGetTokenT
< reco::VertexCollection
m_vertexCollectionToken
 
const bool m_wantInvestHist
 
const bool m_wantLumiCorrHist
 
const bool m_wantPileupCorrHist
 
const bool m_wantVtxCorrHist
 
const bool m_wantVtxPosCorrHist
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- 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

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Definition at line 52 of file MultiplicityInvestigator.cc.

Constructor & Destructor Documentation

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

Definition at line 93 of file MultiplicityInvestigator.cc.

References DigiInvestigatorHistogramMaker::book(), DigiVtxPosCorrHistogramMaker::book(), DigiVertexCorrHistogramMaker::book(), DigiPileupCorrHistogramMaker::book(), DigiLumiCorrHistogramMaker::book(), edm::EDConsumerBase::consumesCollector(), m_digiinvesthmevent, m_digilumicorrhmevent, m_digipileupcorrhmevent, m_digivtxcorrhmevent, m_digivtxposcorrhmevent, m_wantInvestHist, m_wantLumiCorrHist, m_wantPileupCorrHist, m_wantVtxCorrHist, and m_wantVtxPosCorrHist.

93  :
94  // m_digiinvesthmevent(iConfig.getParameter<edm::ParameterSet>("digiInvestConfig")),
95  m_wantInvestHist(iConfig.getParameter<bool>("wantInvestHist")),
96  m_wantVtxCorrHist(iConfig.getParameter<bool>("wantVtxCorrHist")),
97  m_wantLumiCorrHist(iConfig.getParameter<bool>("wantLumiCorrHist")),
98  m_wantPileupCorrHist(iConfig.getParameter<bool>("wantPileupCorrHist")),
99  m_wantVtxPosCorrHist(iConfig.getParameter<bool>("wantVtxPosCorrHist")),
105  m_multiplicityMapToken(consumes<std::map<unsigned int, int> >(iConfig.getParameter<edm::InputTag>("multiplicityMap"))),
106  m_vertexCollectionToken(mayConsume<reco::VertexCollection>(iConfig.getParameter<edm::InputTag>("vertexCollection")))
107 {
108  //now do what ever initialization is needed
109 
110 
111  if(m_wantInvestHist) { m_digiinvesthmevent.book("EventProcs");}
116 }
T getParameter(std::string const &) const
void book(const std::string dirname, const std::map< unsigned int, std::string > &labels)
DigiPileupCorrHistogramMaker m_digipileupcorrhmevent
void book(const std::string dirname, const std::map< unsigned int, std::string > &labels, edm::ConsumesCollector &&iC)
edm::EDGetTokenT< reco::VertexCollection > m_vertexCollectionToken
void book(const std::string dirname, const std::map< unsigned int, std::string > &labels)
DigiVtxPosCorrHistogramMaker m_digivtxposcorrhmevent
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
edm::EDGetTokenT< std::map< unsigned int, int > > m_multiplicityMapToken
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
void book(const std::string dirname, const std::map< unsigned int, std::string > &labels, edm::ConsumesCollector &&iC)
DigiLumiCorrHistogramMaker m_digilumicorrhmevent
DigiVertexCorrHistogramMaker m_digivtxcorrhmevent
void book(const std::string dirname, const std::map< unsigned int, std::string > &labels)
DigiInvestigatorHistogramMaker m_digiinvesthmevent
MultiplicityInvestigator::~MultiplicityInvestigator ( )

Definition at line 119 of file MultiplicityInvestigator.cc.

120 {
121 
122  // do anything here that needs to be done at desctruction time
123  // (e.g. close files, deallocate resources etc.)
124 
125 }

Member Function Documentation

void MultiplicityInvestigator::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Implements edm::EDAnalyzer.

Definition at line 134 of file MultiplicityInvestigator.cc.

References DigiInvestigatorHistogramMaker::fill(), DigiVtxPosCorrHistogramMaker::fill(), DigiVertexCorrHistogramMaker::fill(), DigiPileupCorrHistogramMaker::fill(), DigiLumiCorrHistogramMaker::fill(), edm::Event::getByToken(), m_digiinvesthmevent, m_digilumicorrhmevent, m_digipileupcorrhmevent, m_digivtxcorrhmevent, m_digivtxposcorrhmevent, m_multiplicityMapToken, m_vertexCollectionToken, m_wantInvestHist, m_wantLumiCorrHist, m_wantPileupCorrHist, m_wantVtxCorrHist, m_wantVtxPosCorrHist, and HLT_25ns10e33_v2_cff::vertices.

135 {
136  using namespace edm;
137 
139  iEvent.getByToken(m_multiplicityMapToken,mults);
140 
141  if(m_wantInvestHist) m_digiinvesthmevent.fill(iEvent,*mults);
142  if(m_wantVtxCorrHist) {
144  iEvent.getByToken(m_vertexCollectionToken,vertices);
145 
146  m_digivtxcorrhmevent.fill(iEvent,vertices->size(),*mults);
147  }
148 
149  if(m_wantLumiCorrHist) m_digilumicorrhmevent.fill(iEvent,*mults);
152 
153 }
DigiPileupCorrHistogramMaker m_digipileupcorrhmevent
edm::EDGetTokenT< reco::VertexCollection > m_vertexCollectionToken
void fill(const edm::Event &iEvent, const std::map< unsigned int, int > &ndigi)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
DigiVtxPosCorrHistogramMaker m_digivtxposcorrhmevent
void fill(const edm::Event &iEvent, const std::map< unsigned int, int > &ndigi)
edm::EDGetTokenT< std::map< unsigned int, int > > m_multiplicityMapToken
void fill(const edm::Event &iEvent, const std::map< unsigned int, int > &ndigi)
void fill(const edm::Event &iEvent, const std::map< unsigned int, int > &ndigi)
void fill(const edm::Event &iEvent, const unsigned int nvtx, const std::map< unsigned int, int > &ndigi)
DigiLumiCorrHistogramMaker m_digilumicorrhmevent
DigiVertexCorrHistogramMaker m_digivtxcorrhmevent
DigiInvestigatorHistogramMaker m_digiinvesthmevent
void MultiplicityInvestigator::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 158 of file MultiplicityInvestigator.cc.

159 {
160 
161 }
void MultiplicityInvestigator::beginRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
)
overrideprivatevirtual
void MultiplicityInvestigator::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 173 of file MultiplicityInvestigator.cc.

173  {
174 }

Member Data Documentation

DigiInvestigatorHistogramMaker MultiplicityInvestigator::m_digiinvesthmevent
private

Definition at line 71 of file MultiplicityInvestigator.cc.

Referenced by analyze(), beginRun(), and MultiplicityInvestigator().

DigiLumiCorrHistogramMaker MultiplicityInvestigator::m_digilumicorrhmevent
private

Definition at line 73 of file MultiplicityInvestigator.cc.

Referenced by analyze(), beginRun(), and MultiplicityInvestigator().

DigiPileupCorrHistogramMaker MultiplicityInvestigator::m_digipileupcorrhmevent
private

Definition at line 74 of file MultiplicityInvestigator.cc.

Referenced by analyze(), and MultiplicityInvestigator().

DigiVertexCorrHistogramMaker MultiplicityInvestigator::m_digivtxcorrhmevent
private

Definition at line 72 of file MultiplicityInvestigator.cc.

Referenced by analyze(), beginRun(), and MultiplicityInvestigator().

DigiVtxPosCorrHistogramMaker MultiplicityInvestigator::m_digivtxposcorrhmevent
private

Definition at line 75 of file MultiplicityInvestigator.cc.

Referenced by analyze(), and MultiplicityInvestigator().

edm::EDGetTokenT<std::map<unsigned int, int> > MultiplicityInvestigator::m_multiplicityMapToken
private

Definition at line 77 of file MultiplicityInvestigator.cc.

Referenced by analyze().

edm::EDGetTokenT<reco::VertexCollection> MultiplicityInvestigator::m_vertexCollectionToken
private

Definition at line 78 of file MultiplicityInvestigator.cc.

Referenced by analyze().

const bool MultiplicityInvestigator::m_wantInvestHist
private

Definition at line 66 of file MultiplicityInvestigator.cc.

Referenced by analyze(), and MultiplicityInvestigator().

const bool MultiplicityInvestigator::m_wantLumiCorrHist
private

Definition at line 68 of file MultiplicityInvestigator.cc.

Referenced by analyze(), and MultiplicityInvestigator().

const bool MultiplicityInvestigator::m_wantPileupCorrHist
private

Definition at line 69 of file MultiplicityInvestigator.cc.

Referenced by analyze(), and MultiplicityInvestigator().

const bool MultiplicityInvestigator::m_wantVtxCorrHist
private

Definition at line 67 of file MultiplicityInvestigator.cc.

Referenced by analyze(), and MultiplicityInvestigator().

const bool MultiplicityInvestigator::m_wantVtxPosCorrHist
private

Definition at line 70 of file MultiplicityInvestigator.cc.

Referenced by analyze(), and MultiplicityInvestigator().