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::one::EDAnalyzer< edm::one::WatchRuns > edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 MultiplicityInvestigator (const edm::ParameterSet &)
 
 ~MultiplicityInvestigator () override
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::WatchRuns >
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDAnalyzerBase () 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
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (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::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, 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
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
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
 
void endRun (const edm::Run &, const edm::EventSetup &) 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::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
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<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
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)
 
void resetItemsToGetFrom (BranchType iType)
 

Detailed Description

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

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

Definition at line 51 of file MultiplicityInvestigator.cc.

Constructor & Destructor Documentation

◆ MultiplicityInvestigator()

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

Definition at line 91 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.

92  : // m_digiinvesthmevent(iConfig.getParameter<edm::ParameterSet>("digiInvestConfig")),
93  m_wantInvestHist(iConfig.getParameter<bool>("wantInvestHist")),
94  m_wantVtxCorrHist(iConfig.getParameter<bool>("wantVtxCorrHist")),
95  m_wantLumiCorrHist(iConfig.getParameter<bool>("wantLumiCorrHist")),
96  m_wantPileupCorrHist(iConfig.getParameter<bool>("wantPileupCorrHist")),
97  m_wantVtxPosCorrHist(iConfig.getParameter<bool>("wantVtxPosCorrHist")),
108  ? DigiPileupCorrHistogramMaker(iConfig.getParameter<edm::ParameterSet>("digiPileupCorrConfig"),
113  ? DigiVtxPosCorrHistogramMaker(iConfig.getParameter<edm::ParameterSet>("digiVtxPosCorrConfig"),
117  consumes<std::map<unsigned int, int> >(iConfig.getParameter<edm::InputTag>("multiplicityMap"))),
119  mayConsume<reco::VertexCollection>(iConfig.getParameter<edm::InputTag>("vertexCollection"))) {
120  //now do what ever initialization is needed
121 
122  if (m_wantInvestHist) {
123  m_digiinvesthmevent.book("EventProcs");
124  }
125  if (m_wantVtxCorrHist) {
127  }
128  if (m_wantLumiCorrHist) {
130  }
131  if (m_wantPileupCorrHist) {
132  m_digipileupcorrhmevent.book("PileupCorr");
133  }
134  if (m_wantVtxPosCorrHist) {
135  m_digivtxposcorrhmevent.book("VtxPosCorr");
136  }
137 }
void book(const std::string dirname, const std::map< unsigned int, std::string > &labels)
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
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::~MultiplicityInvestigator ( )
override

Definition at line 139 of file MultiplicityInvestigator.cc.

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

Member Function Documentation

◆ analyze()

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

Implements edm::one::EDAnalyzerBase.

Definition at line 149 of file MultiplicityInvestigator.cc.

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

149  {
150  using namespace edm;
151 
153  iEvent.getByToken(m_multiplicityMapToken, mults);
154 
155  if (m_wantInvestHist)
157  if (m_wantVtxCorrHist) {
160 
161  m_digivtxcorrhmevent.fill(iEvent, vertices->size(), *mults);
162  }
163 
164  if (m_wantLumiCorrHist)
170 }
DigiPileupCorrHistogramMaker m_digipileupcorrhmevent
edm::EDGetTokenT< reco::VertexCollection > m_vertexCollectionToken
void fill(const edm::Event &iEvent, const std::map< unsigned int, int > &ndigi)
DigiVtxPosCorrHistogramMaker m_digivtxposcorrhmevent
void fill(const edm::Event &iEvent, const std::map< unsigned int, int > &ndigi)
int iEvent
Definition: GenABIO.cc:224
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

◆ beginJob()

void MultiplicityInvestigator::beginJob ( )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 173 of file MultiplicityInvestigator.cc.

173 {}

◆ beginRun()

void MultiplicityInvestigator::beginRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
)
overrideprivate

◆ endJob()

void MultiplicityInvestigator::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 181 of file MultiplicityInvestigator.cc.

181 {}

◆ endRun()

void MultiplicityInvestigator::endRun ( const edm::Run ,
const edm::EventSetup  
)
inlineoverrideprivate

Definition at line 60 of file MultiplicityInvestigator.cc.

60 {}

Member Data Documentation

◆ m_digiinvesthmevent

DigiInvestigatorHistogramMaker MultiplicityInvestigator::m_digiinvesthmevent
private

Definition at line 70 of file MultiplicityInvestigator.cc.

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

◆ m_digilumicorrhmevent

DigiLumiCorrHistogramMaker MultiplicityInvestigator::m_digilumicorrhmevent
private

Definition at line 72 of file MultiplicityInvestigator.cc.

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

◆ m_digipileupcorrhmevent

DigiPileupCorrHistogramMaker MultiplicityInvestigator::m_digipileupcorrhmevent
private

Definition at line 73 of file MultiplicityInvestigator.cc.

Referenced by analyze(), and MultiplicityInvestigator().

◆ m_digivtxcorrhmevent

DigiVertexCorrHistogramMaker MultiplicityInvestigator::m_digivtxcorrhmevent
private

Definition at line 71 of file MultiplicityInvestigator.cc.

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

◆ m_digivtxposcorrhmevent

DigiVtxPosCorrHistogramMaker MultiplicityInvestigator::m_digivtxposcorrhmevent
private

Definition at line 74 of file MultiplicityInvestigator.cc.

Referenced by analyze(), and MultiplicityInvestigator().

◆ m_multiplicityMapToken

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

Definition at line 76 of file MultiplicityInvestigator.cc.

Referenced by analyze().

◆ m_vertexCollectionToken

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

Definition at line 77 of file MultiplicityInvestigator.cc.

Referenced by analyze().

◆ m_wantInvestHist

const bool MultiplicityInvestigator::m_wantInvestHist
private

Definition at line 65 of file MultiplicityInvestigator.cc.

Referenced by analyze(), and MultiplicityInvestigator().

◆ m_wantLumiCorrHist

const bool MultiplicityInvestigator::m_wantLumiCorrHist
private

Definition at line 67 of file MultiplicityInvestigator.cc.

Referenced by analyze(), and MultiplicityInvestigator().

◆ m_wantPileupCorrHist

const bool MultiplicityInvestigator::m_wantPileupCorrHist
private

Definition at line 68 of file MultiplicityInvestigator.cc.

Referenced by analyze(), and MultiplicityInvestigator().

◆ m_wantVtxCorrHist

const bool MultiplicityInvestigator::m_wantVtxCorrHist
private

Definition at line 66 of file MultiplicityInvestigator.cc.

Referenced by analyze(), and MultiplicityInvestigator().

◆ m_wantVtxPosCorrHist

const bool MultiplicityInvestigator::m_wantVtxPosCorrHist
private

Definition at line 69 of file MultiplicityInvestigator.cc.

Referenced by analyze(), and MultiplicityInvestigator().