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
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndex indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) 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 ()
 
virtual void beginRun (const edm::Run &, const edm::EventSetup &) override
 
virtual void endJob ()
 

Private Attributes

DigiInvestigatorHistogramMaker m_digiinvesthmevent
 
DigiLumiCorrHistogramMaker m_digilumicorrhmevent
 
DigiPileupCorrHistogramMaker m_digipileupcorrhmevent
 
DigiVertexCorrHistogramMaker m_digivtxcorrhmevent
 
edm::InputTag m_multiplicityMap
 
edm::InputTag m_vertexCollection
 
const bool m_wantInvestHist
 
const bool m_wantLumiCorrHist
 
const bool m_wantPileupCorrHist
 
const bool m_wantVtxCorrHist
 

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
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
CurrentProcessingContext const * currentContext () const
 
- 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 51 of file MultiplicityInvestigator.cc.

Constructor & Destructor Documentation

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

Definition at line 90 of file MultiplicityInvestigator.cc.

References DigiInvestigatorHistogramMaker::book(), DigiPileupCorrHistogramMaker::book(), DigiVertexCorrHistogramMaker::book(), DigiLumiCorrHistogramMaker::book(), m_digiinvesthmevent, m_digilumicorrhmevent, m_digipileupcorrhmevent, m_digivtxcorrhmevent, m_wantInvestHist, m_wantLumiCorrHist, m_wantPileupCorrHist, and m_wantVtxCorrHist.

90  :
91  // m_digiinvesthmevent(iConfig.getParameter<edm::ParameterSet>("digiInvestConfig")),
92  m_wantInvestHist(iConfig.getParameter<bool>("wantInvestHist")),
93  m_wantVtxCorrHist(iConfig.getParameter<bool>("wantVtxCorrHist")),
94  m_wantLumiCorrHist(iConfig.getParameter<bool>("wantLumiCorrHist")),
95  m_wantPileupCorrHist(iConfig.getParameter<bool>("wantPileupCorrHist")),
96  m_digiinvesthmevent(iConfig),
97  m_digivtxcorrhmevent(iConfig.getParameter<edm::ParameterSet>("digiVtxCorrConfig")),
98  m_digilumicorrhmevent(iConfig.getParameter<edm::ParameterSet>("digiLumiCorrConfig")),
99  m_digipileupcorrhmevent(iConfig.getParameter<edm::ParameterSet>("digiPileupCorrConfig")),
100  m_multiplicityMap(iConfig.getParameter<edm::InputTag>("multiplicityMap")),
101  m_vertexCollection(iConfig.getParameter<edm::InputTag>("vertexCollection"))
102 {
103  //now do what ever initialization is needed
104 
105 
106  if(m_wantInvestHist) m_digiinvesthmevent.book("EventProcs");
110 
111 }
T getParameter(std::string const &) const
DigiPileupCorrHistogramMaker m_digipileupcorrhmevent
void book(const std::string dirname, const std::map< unsigned int, std::string > &labels)
void book(const std::string dirname, const std::map< unsigned int, std::string > &labels)
void book(const std::string dirname, const std::map< unsigned int, std::string > &labels)
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 114 of file MultiplicityInvestigator.cc.

115 {
116 
117  // do anything here that needs to be done at desctruction time
118  // (e.g. close files, deallocate resources etc.)
119 
120 }

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 129 of file MultiplicityInvestigator.cc.

References DigiInvestigatorHistogramMaker::fill(), DigiPileupCorrHistogramMaker::fill(), DigiVertexCorrHistogramMaker::fill(), DigiLumiCorrHistogramMaker::fill(), edm::Event::getByLabel(), m_digiinvesthmevent, m_digilumicorrhmevent, m_digipileupcorrhmevent, m_digivtxcorrhmevent, m_multiplicityMap, m_vertexCollection, m_wantInvestHist, m_wantLumiCorrHist, m_wantPileupCorrHist, m_wantVtxCorrHist, and edm::EventBase::orbitNumber().

130 {
131  using namespace edm;
132 
134  iEvent.getByLabel(m_multiplicityMap,mults);
135 
137 
138  if(m_wantVtxCorrHist) {
140  iEvent.getByLabel(m_vertexCollection,vertices);
141 
142  m_digivtxcorrhmevent.fill(iEvent,vertices->size(),*mults);
143  }
144 
145  if(m_wantLumiCorrHist) m_digilumicorrhmevent.fill(iEvent,*mults);
147 
148 }
DigiPileupCorrHistogramMaker m_digipileupcorrhmevent
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)
int orbitNumber() const
Definition: EventBase.h:63
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:361
void fill(const unsigned int orbit, 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  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 153 of file MultiplicityInvestigator.cc.

154 {
155 
156 }
void MultiplicityInvestigator::beginRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
)
overrideprivatevirtual
void MultiplicityInvestigator::endJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 168 of file MultiplicityInvestigator.cc.

168  {
169 }

Member Data Documentation

DigiInvestigatorHistogramMaker MultiplicityInvestigator::m_digiinvesthmevent
private

Definition at line 69 of file MultiplicityInvestigator.cc.

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

DigiLumiCorrHistogramMaker MultiplicityInvestigator::m_digilumicorrhmevent
private

Definition at line 71 of file MultiplicityInvestigator.cc.

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

DigiPileupCorrHistogramMaker MultiplicityInvestigator::m_digipileupcorrhmevent
private

Definition at line 72 of file MultiplicityInvestigator.cc.

Referenced by analyze(), and MultiplicityInvestigator().

DigiVertexCorrHistogramMaker MultiplicityInvestigator::m_digivtxcorrhmevent
private

Definition at line 70 of file MultiplicityInvestigator.cc.

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

edm::InputTag MultiplicityInvestigator::m_multiplicityMap
private

Definition at line 74 of file MultiplicityInvestigator.cc.

Referenced by analyze().

edm::InputTag MultiplicityInvestigator::m_vertexCollection
private

Definition at line 75 of file MultiplicityInvestigator.cc.

Referenced by analyze().

const bool MultiplicityInvestigator::m_wantInvestHist
private

Definition at line 65 of file MultiplicityInvestigator.cc.

Referenced by analyze(), and MultiplicityInvestigator().

const bool MultiplicityInvestigator::m_wantLumiCorrHist
private

Definition at line 67 of file MultiplicityInvestigator.cc.

Referenced by analyze(), and MultiplicityInvestigator().

const bool MultiplicityInvestigator::m_wantPileupCorrHist
private

Definition at line 68 of file MultiplicityInvestigator.cc.

Referenced by analyze(), and MultiplicityInvestigator().

const bool MultiplicityInvestigator::m_wantVtxCorrHist
private

Definition at line 66 of file MultiplicityInvestigator.cc.

Referenced by analyze(), and MultiplicityInvestigator().