CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Types | Private Member Functions | Private Attributes
PreMixingPhase2TrackerWorker Class Reference
Inheritance diagram for PreMixingPhase2TrackerWorker:
PreMixingWorker

Public Member Functions

void addPileups (PileUpEventPrincipal const &pep, edm::EventSetup const &es) override
 
void addSignals (edm::Event const &e, edm::EventSetup const &es) override
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &es) override
 
void initializeEvent (edm::Event const &e, edm::EventSetup const &es) override
 
 PreMixingPhase2TrackerWorker (const edm::ParameterSet &ps, edm::ProducesCollector, edm::ConsumesCollector &&iC)
 
void put (edm::Event &e, edm::EventSetup const &iSetup, std::vector< PileupSummaryInfo > const &ps, int bs) override
 
 ~PreMixingPhase2TrackerWorker () override=default
 
- Public Member Functions inherited from PreMixingWorker
virtual void beginRun (edm::Run const &iRun, edm::EventSetup const &iSetup)
 
virtual void endRun ()
 
virtual void finalizeBunchCrossing (edm::Event &iEvent, edm::EventSetup const &iSetup, int bunchCrossing)
 
virtual void initializeBunchCrossing (edm::Event const &iEvent, edm::EventSetup const &iSetup, int bunchCrossing)
 
 PreMixingWorker ()=default
 
virtual ~PreMixingWorker ()=default
 

Private Types

using SignalMap = std::map< uint32_t, std::map< int, float >>
 

Private Member Functions

void accumulate (const edm::DetSetVector< PixelDigi > &digis, const float electronsPerADC)
 

Private Attributes

SignalMap accumulator_
 
cms::Phase2TrackerDigitizer digitizer_
 
float pixelElectronPerAdc_
 
edm::InputTag pixelPileupLabel_
 
edm::EDGetTokenT
< edm::DetSetVector< PixelDigi > > 
pixelSignalToken_
 
float trackerElectronPerAdc_
 
edm::InputTag trackerPileupLabel_
 
edm::EDGetTokenT
< edm::DetSetVector< PixelDigi > > 
trackerSignalToken_
 

Detailed Description

Definition at line 20 of file PreMixingPhase2TrackerWorker.cc.

Member Typedef Documentation

using PreMixingPhase2TrackerWorker::SignalMap = std::map<uint32_t, std::map<int, float>>
private

Definition at line 46 of file PreMixingPhase2TrackerWorker.cc.

Constructor & Destructor Documentation

PreMixingPhase2TrackerWorker::PreMixingPhase2TrackerWorker ( const edm::ParameterSet ps,
edm::ProducesCollector  producesCollector,
edm::ConsumesCollector &&  iC 
)

Definition at line 50 of file PreMixingPhase2TrackerWorker.cc.

53  : digitizer_(ps, producesCollector, iC),
56  pixelPileupLabel_(ps.getParameter<edm::InputTag>("pixelPileInputTag")),
57  trackerPileupLabel_(ps.getParameter<edm::InputTag>("trackerPileInputTag")),
58  pixelElectronPerAdc_(ps.getParameter<double>("pixelPmxStage1ElectronPerAdc")),
59  trackerElectronPerAdc_(ps.getParameter<double>("trackerPmxStage1ElectronPerAdc")) {}
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
cms::Phase2TrackerDigitizer digitizer_
edm::EDGetTokenT< edm::DetSetVector< PixelDigi > > pixelSignalToken_
edm::EDGetTokenT< edm::DetSetVector< PixelDigi > > trackerSignalToken_
PreMixingPhase2TrackerWorker::~PreMixingPhase2TrackerWorker ( )
overridedefault

Member Function Documentation

void PreMixingPhase2TrackerWorker::accumulate ( const edm::DetSetVector< PixelDigi > &  digis,
const float  electronsPerADC 
)
private

Definition at line 87 of file PreMixingPhase2TrackerWorker.cc.

References accumulator_.

Referenced by addPileups(), and addSignals().

87  {
88  for (const auto& detset : digis) {
89  auto& accDet = accumulator_[detset.detId()];
90  for (const auto& digi : detset) {
91  // note: according to C++ standard operator[] does
92  // value-initializiation, which for float means initial value of 0
93  auto& acc = accDet[digi.channel()];
94  acc += digi.adc() * electronPerADC;
95  }
96  }
97 }
void PreMixingPhase2TrackerWorker::addPileups ( PileUpEventPrincipal const &  pep,
edm::EventSetup const &  es 
)
overridevirtual
void PreMixingPhase2TrackerWorker::addSignals ( edm::Event const &  e,
edm::EventSetup const &  es 
)
overridevirtual

Implements PreMixingWorker.

Definition at line 69 of file PreMixingPhase2TrackerWorker.cc.

References accumulate(), edm::Event::getByToken(), pixelElectronPerAdc_, pixelSignalToken_, trackerElectronPerAdc_, and trackerSignalToken_.

69  {
71  e.getByToken(pixelSignalToken_, hdigis);
73 
74  e.getByToken(trackerSignalToken_, hdigis);
76 }
void accumulate(const edm::DetSetVector< PixelDigi > &digis, const float electronsPerADC)
edm::EDGetTokenT< edm::DetSetVector< PixelDigi > > pixelSignalToken_
edm::EDGetTokenT< edm::DetSetVector< PixelDigi > > trackerSignalToken_
void PreMixingPhase2TrackerWorker::beginLuminosityBlock ( edm::LuminosityBlock const &  lumi,
edm::EventSetup const &  es 
)
overridevirtual

Reimplemented from PreMixingWorker.

Definition at line 61 of file PreMixingPhase2TrackerWorker.cc.

References DigiAccumulatorMixMod::beginLuminosityBlock(), and digitizer_.

61  {
63 }
virtual void beginLuminosityBlock(edm::LuminosityBlock const &lumi, edm::EventSetup const &setup)
list lumi
Definition: dqmdumpme.py:53
cms::Phase2TrackerDigitizer digitizer_
void PreMixingPhase2TrackerWorker::initializeEvent ( edm::Event const &  e,
edm::EventSetup const &  es 
)
overridevirtual

Implements PreMixingWorker.

Definition at line 65 of file PreMixingPhase2TrackerWorker.cc.

References digitizer_, and cms::Phase2TrackerDigitizer::initializeEvent().

65  {
67 }
void initializeEvent(edm::Event const &e, edm::EventSetup const &c) override
cms::Phase2TrackerDigitizer digitizer_
void PreMixingPhase2TrackerWorker::put ( edm::Event e,
edm::EventSetup const &  iSetup,
std::vector< PileupSummaryInfo > const &  ps,
int  bs 
)
overridevirtual

Implements PreMixingWorker.

Definition at line 99 of file PreMixingPhase2TrackerWorker.cc.

References accumulator_, digitizer_, cms::Phase2TrackerDigitizer::finalizeEvent(), and cms::Phase2TrackerDigitizer::loadAccumulator().

102  {
104  digitizer_.finalizeEvent(e, iSetup);
105  decltype(accumulator_){}.swap(accumulator_); // release memory
106 }
void finalizeEvent(edm::Event &e, edm::EventSetup const &c) override
void loadAccumulator(const std::map< uint32_t, std::map< int, float > > &accumulator)
cms::Phase2TrackerDigitizer digitizer_

Member Data Documentation

SignalMap PreMixingPhase2TrackerWorker::accumulator_
private

Definition at line 47 of file PreMixingPhase2TrackerWorker.cc.

Referenced by accumulate(), and put().

cms::Phase2TrackerDigitizer PreMixingPhase2TrackerWorker::digitizer_
private

Definition at line 35 of file PreMixingPhase2TrackerWorker.cc.

Referenced by beginLuminosityBlock(), initializeEvent(), and put().

float PreMixingPhase2TrackerWorker::pixelElectronPerAdc_
private

Definition at line 41 of file PreMixingPhase2TrackerWorker.cc.

Referenced by addPileups(), and addSignals().

edm::InputTag PreMixingPhase2TrackerWorker::pixelPileupLabel_
private

Definition at line 39 of file PreMixingPhase2TrackerWorker.cc.

Referenced by addPileups().

edm::EDGetTokenT<edm::DetSetVector<PixelDigi> > PreMixingPhase2TrackerWorker::pixelSignalToken_
private

Definition at line 37 of file PreMixingPhase2TrackerWorker.cc.

Referenced by addSignals().

float PreMixingPhase2TrackerWorker::trackerElectronPerAdc_
private

Definition at line 42 of file PreMixingPhase2TrackerWorker.cc.

Referenced by addPileups(), and addSignals().

edm::InputTag PreMixingPhase2TrackerWorker::trackerPileupLabel_
private

Definition at line 40 of file PreMixingPhase2TrackerWorker.cc.

Referenced by addPileups().

edm::EDGetTokenT<edm::DetSetVector<PixelDigi> > PreMixingPhase2TrackerWorker::trackerSignalToken_
private

Definition at line 38 of file PreMixingPhase2TrackerWorker.cc.

Referenced by addSignals().