CMS 3D CMS Logo

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 () override
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
 ~EDAnalyzer () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void beginJob () override
 
void beginRun (const edm::Run &, const edm::EventSetup &) override
 
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::VertexCollectionm_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 &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- 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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
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(), 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.

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_wantVtxPosCorrHist(iConfig.getParameter<bool>("wantVtxPosCorrHist")),
107  ? DigiPileupCorrHistogramMaker(iConfig.getParameter<edm::ParameterSet>("digiPileupCorrConfig"),
112  ? DigiVtxPosCorrHistogramMaker(iConfig.getParameter<edm::ParameterSet>("digiVtxPosCorrConfig"),
116  consumes<std::map<unsigned int, int> >(iConfig.getParameter<edm::InputTag>("multiplicityMap"))),
118  mayConsume<reco::VertexCollection>(iConfig.getParameter<edm::InputTag>("vertexCollection"))) {
119  //now do what ever initialization is needed
120 
121  if (m_wantInvestHist) {
122  m_digiinvesthmevent.book("EventProcs");
123  }
124  if (m_wantVtxCorrHist) {
126  }
127  if (m_wantLumiCorrHist) {
129  }
130  if (m_wantPileupCorrHist) {
131  m_digipileupcorrhmevent.book("PileupCorr");
132  }
133  if (m_wantVtxPosCorrHist) {
134  m_digivtxposcorrhmevent.book("VtxPosCorr");
135  }
136 }
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 ( )
override

Definition at line 138 of file MultiplicityInvestigator.cc.

138  {
139  // do anything here that needs to be done at desctruction time
140  // (e.g. close files, deallocate resources etc.)
141 }

Member Function Documentation

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

Definition at line 148 of file MultiplicityInvestigator.cc.

References DigiInvestigatorHistogramMaker::fill(), DigiVtxPosCorrHistogramMaker::fill(), DigiPileupCorrHistogramMaker::fill(), DigiVertexCorrHistogramMaker::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 pwdgSkimBPark_cfi::vertices.

148  {
149  using namespace edm;
150 
152  iEvent.getByToken(m_multiplicityMapToken, mults);
153 
154  if (m_wantInvestHist)
155  m_digiinvesthmevent.fill(iEvent, *mults);
156  if (m_wantVtxCorrHist) {
158  iEvent.getByToken(m_vertexCollectionToken, vertices);
159 
160  m_digivtxcorrhmevent.fill(iEvent, vertices->size(), *mults);
161  }
162 
163  if (m_wantLumiCorrHist)
164  m_digilumicorrhmevent.fill(iEvent, *mults);
166  m_digipileupcorrhmevent.fill(iEvent, *mults);
168  m_digivtxposcorrhmevent.fill(iEvent, *mults);
169 }
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:525
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
HLT enums.
DigiVertexCorrHistogramMaker m_digivtxcorrhmevent
DigiInvestigatorHistogramMaker m_digiinvesthmevent
void MultiplicityInvestigator::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 172 of file MultiplicityInvestigator.cc.

172 {}
void MultiplicityInvestigator::beginRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
)
overrideprivate
void MultiplicityInvestigator::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 180 of file MultiplicityInvestigator.cc.

References DEFINE_FWK_MODULE.

180 {}

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().

DigiVtxPosCorrHistogramMaker MultiplicityInvestigator::m_digivtxposcorrhmevent
private

Definition at line 73 of file MultiplicityInvestigator.cc.

Referenced by analyze(), and MultiplicityInvestigator().

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

Definition at line 75 of file MultiplicityInvestigator.cc.

Referenced by analyze().

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

Definition at line 76 of file MultiplicityInvestigator.cc.

Referenced by analyze().

const bool MultiplicityInvestigator::m_wantInvestHist
private

Definition at line 64 of file MultiplicityInvestigator.cc.

Referenced by analyze(), and MultiplicityInvestigator().

const bool MultiplicityInvestigator::m_wantLumiCorrHist
private

Definition at line 66 of file MultiplicityInvestigator.cc.

Referenced by analyze(), and MultiplicityInvestigator().

const bool MultiplicityInvestigator::m_wantPileupCorrHist
private

Definition at line 67 of file MultiplicityInvestigator.cc.

Referenced by analyze(), and MultiplicityInvestigator().

const bool MultiplicityInvestigator::m_wantVtxCorrHist
private

Definition at line 65 of file MultiplicityInvestigator.cc.

Referenced by analyze(), and MultiplicityInvestigator().

const bool MultiplicityInvestigator::m_wantVtxPosCorrHist
private

Definition at line 68 of file MultiplicityInvestigator.cc.

Referenced by analyze(), and MultiplicityInvestigator().