CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes
EcalDigiProducer Class Reference

#include <EcalDigiProducer.h>

Inheritance diagram for EcalDigiProducer:
DigiAccumulatorMixMod

Public Member Functions

void accumulate (edm::Event const &e, edm::EventSetup const &c) override
 
void accumulate (PileUpEventPrincipal const &e, edm::EventSetup const &c, edm::StreamID const &) override
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) override
 
 EcalDigiProducer (const edm::ParameterSet &params, edm::ProducesCollector, edm::ConsumesCollector &iC)
 
 EcalDigiProducer (const edm::ParameterSet &params, edm::ConsumesCollector &iC)
 
void finalizeEvent (edm::Event &e, edm::EventSetup const &c) override
 
void initializeEvent (edm::Event const &e, edm::EventSetup const &c) override
 
void setEBNoiseSignalGenerator (EcalBaseSignalGenerator *noiseGenerator)
 
void setEENoiseSignalGenerator (EcalBaseSignalGenerator *noiseGenerator)
 
void setESNoiseSignalGenerator (EcalBaseSignalGenerator *noiseGenerator)
 
 ~EcalDigiProducer () override
 
- Public Member Functions inherited from DigiAccumulatorMixMod
virtual void beginRun (edm::Run const &run, edm::EventSetup const &setup)
 
 DigiAccumulatorMixMod ()
 
 DigiAccumulatorMixMod (DigiAccumulatorMixMod const &)=delete
 
virtual void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup)
 
virtual void endRun (edm::Run const &run, edm::EventSetup const &setup)
 
virtual void finalizeBunchCrossing (edm::Event &event, edm::EventSetup const &setup, int bunchCrossing)
 
virtual PileupMixingContentgetEventPileupInfo ()
 
virtual void initializeBunchCrossing (edm::Event const &event, edm::EventSetup const &setup, int bunchCrossing)
 
DigiAccumulatorMixMod const & operator= (DigiAccumulatorMixMod const &)=delete
 
virtual void StorePileupInformation (std::vector< int > &numInteractionList, std::vector< int > &bunchCrossingList, std::vector< float > &TrueInteractionList, std::vector< edm::EventID > &eventList, int bunchSpace)
 
virtual ~DigiAccumulatorMixMod ()
 

Protected Attributes

std::unique_ptr< EBHitResponsem_EBResponse
 
std::unique_ptr< EEHitResponsem_EEResponse
 
std::unique_ptr< const EcalSimParameterMapm_ParameterMap
 

Private Types

typedef EcalElectronicsSim< EcalCoder, EcalSamples, EcalDataFrameEcalElectronicsSim_Ph1
 
typedef CaloTSamples< float, 10 > EcalSamples
 
typedef edm::Handle< std::vector< PCaloHit > > HitsHandle
 

Private Member Functions

void accumulateCaloHits (HitsHandle const &ebHandle, HitsHandle const &eeHandle, HitsHandle const &esHandle, int bunchCrossing)
 
virtual void cacheEBDigis (const EBDigiCollection *ebDigiPtr) const
 
virtual void cacheEEDigis (const EEDigiCollection *eeDigiPtr) const
 
void checkCalibrations (const edm::Event &event, const edm::EventSetup &eventSetup)
 
void checkGeometry (const edm::EventSetup &eventSetup)
 
void updateGeometry ()
 

Private Attributes

const bool m_addESNoise
 
const edm::ESGetToken< EcalADCToGeVConstant, EcalADCToGeVConstantRcdm_agcToken
 
std::unique_ptr< EcalCoderm_APDCoder
 
const std::string m_apdDigiTag
 
std::unique_ptr< EBDigitizerm_APDDigitizer
 
std::unique_ptr< EcalElectronicsSim_Ph1m_APDElectronicsSim
 
std::unique_ptr< const APDSimParametersm_apdParameters
 
std::unique_ptr< EBHitResponsem_APDResponse
 
const bool m_apdSeparateDigi
 
APDShape m_APDShape
 
std::unique_ptr< EBDigitizerm_BarrelDigitizer
 
std::unique_ptr< EcalCoderm_Coder
 
std::unique_ptr< EcalCoderm_ComponentCoder
 
const std::string m_componentDigiTag
 
std::unique_ptr< EBDigitizerm_ComponentDigitizer
 
std::unique_ptr< EcalElectronicsSim_Ph1m_ComponentElectronicsSim
 
std::unique_ptr< const ComponentSimParameterMapm_componentParameters
 
std::unique_ptr< EBHitResponsem_ComponentResponse
 
const bool m_componentSeparateDigi
 
ComponentShapeCollection m_ComponentShapes
 
const bool m_doEB
 
const bool m_doEE
 
const bool m_doES
 
const bool m_doFastES
 
std::array< std::unique_ptr< CorrelatedNoisifier< EcalCorrMatrix > >, 3 > m_EBCorrNoise
 
const std::string m_EBdigiCollection
 
const double m_EBs25notCont
 
EBShape m_EBShape
 
std::array< std::unique_ptr< CorrelatedNoisifier< EcalCorrMatrix > >, 3 > m_EECorrNoise
 
const std::string m_EEdigiCollection
 
const double m_EEs25notCont
 
EEShape m_EEShape
 
std::unique_ptr< EcalElectronicsSim_Ph1m_ElectronicsSim
 
std::unique_ptr< EEDigitizerm_EndcapDigitizer
 
const std::string m_ESdigiCollection
 
std::unique_ptr< ESDigitizerm_ESDigitizer
 
std::unique_ptr< ESElectronicsSimm_ESElectronicsSim
 
std::unique_ptr< ESElectronicsSimFastm_ESElectronicsSimFast
 
edm::ESGetToken< ESGain, ESGainRcdm_esGainToken
 
edm::ESGetToken< ESIntercalibConstants, ESIntercalibConstantsRcdm_esMIPsToken
 
edm::ESGetToken< ESMIPToGeVConstant, ESMIPToGeVConstantRcdm_esMIPToGeVToken
 
std::unique_ptr< ESOldDigitizerm_ESOldDigitizer
 
std::unique_ptr< CaloHitResponsem_ESOldResponse
 
edm::ESGetToken< ESPedestals, ESPedestalsRcdm_esPedestalsToken
 
std::unique_ptr< ESHitResponsem_ESResponse
 
ESShape m_ESShape
 
const CaloGeometrym_Geometry
 
const edm::ESGetToken< CaloGeometry, CaloGeometryRecordm_geometryToken
 
edm::ESWatcher< CaloGeometryRecordm_geometryWatcher
 
const edm::ESGetToken< EcalGainRatios, EcalGainRatiosRcdm_grToken
 
const edm::EDGetTokenT< std::vector< PCaloHit > > m_HitsEBToken_
 
const edm::EDGetTokenT< std::vector< PCaloHit > > m_HitsEEToken_
 
const edm::EDGetTokenT< std::vector< PCaloHit > > m_HitsESToken_
 
const std::string m_hitsProducerTag
 
const edm::ESGetToken< EcalIntercalibConstantsMC, EcalIntercalibConstantsMCRcdm_icalToken
 
const edm::ESGetToken< EcalLaserDbService, EcalLaserDbRecordm_laserToken
 
const edm::ESGetToken< EcalPedestals, EcalPedestalsRcdm_pedestalsToken
 
const bool m_PreMix1
 
const bool m_PreMix2
 
const unsigned int m_readoutFrameSize
 
bool m_useLCcorrection
 
CLHEP::HepRandomEngine * randomEngine_ = nullptr
 

Detailed Description

Definition at line 82 of file EcalDigiProducer.h.

Member Typedef Documentation

◆ EcalElectronicsSim_Ph1

Definition at line 193 of file EcalDigiProducer.h.

◆ EcalSamples

typedef CaloTSamples<float, 10> EcalDigiProducer::EcalSamples
private

Definition at line 191 of file EcalDigiProducer.h.

◆ HitsHandle

typedef edm::Handle<std::vector<PCaloHit> > EcalDigiProducer::HitsHandle
private

Definition at line 102 of file EcalDigiProducer.h.

Constructor & Destructor Documentation

◆ EcalDigiProducer() [1/2]

EcalDigiProducer::EcalDigiProducer ( const edm::ParameterSet params,
edm::ProducesCollector  producesCollector,
edm::ConsumesCollector iC 
)

Definition at line 37 of file EcalDigiProducer.cc.

References m_apdDigiTag, m_apdSeparateDigi, m_componentDigiTag, m_componentSeparateDigi, m_EBdigiCollection, m_EEdigiCollection, m_ESdigiCollection, and edm::ProducesCollector::produces().

40  : EcalDigiProducer(params, iC) {
42  producesCollector.produces<EBDigiCollection>(m_apdDigiTag);
43 
45  producesCollector.produces<EBDigiCollection>(m_componentDigiTag);
46 
47  producesCollector.produces<EBDigiCollection>(m_EBdigiCollection);
48  producesCollector.produces<EEDigiCollection>(m_EEdigiCollection);
49  producesCollector.produces<ESDigiCollection>(m_ESdigiCollection);
50 }
const std::string m_ESdigiCollection
ProductRegistryHelper::BranchAliasSetterT< ProductType > produces()
const std::string m_componentDigiTag
const std::string m_EEdigiCollection
const bool m_apdSeparateDigi
const bool m_componentSeparateDigi
const std::string m_apdDigiTag
EcalDigiProducer(const edm::ParameterSet &params, edm::ProducesCollector, edm::ConsumesCollector &iC)
const std::string m_EBdigiCollection

◆ EcalDigiProducer() [2/2]

EcalDigiProducer::EcalDigiProducer ( const edm::ParameterSet params,
edm::ConsumesCollector iC 
)

Definition at line 53 of file EcalDigiProducer.cc.

55  m_APDShape(iC),
57  m_EBShape(iC),
58  m_EEShape(iC),
59  m_ESShape(),
60  m_EBdigiCollection(params.getParameter<std::string>("EBdigiCollection")),
61  m_EEdigiCollection(params.getParameter<std::string>("EEdigiCollection")),
62  m_ESdigiCollection(params.getParameter<std::string>("ESdigiCollection")),
63  m_hitsProducerTag(params.getParameter<std::string>("hitsProducer")),
64  m_HitsEBToken_(iC.consumes<std::vector<PCaloHit>>(edm::InputTag(m_hitsProducerTag, "EcalHitsEB"))),
65  m_HitsEEToken_(iC.consumes<std::vector<PCaloHit>>(edm::InputTag(m_hitsProducerTag, "EcalHitsEE"))),
66  m_HitsESToken_(iC.consumes<std::vector<PCaloHit>>(edm::InputTag(m_hitsProducerTag, "EcalHitsES"))),
68  m_icalToken(iC.esConsumes()),
70  m_agcToken(iC.esConsumes()),
71  m_grToken(iC.esConsumes()),
73  m_useLCcorrection(params.getUntrackedParameter<bool>("UseLCcorrection")),
74  m_apdSeparateDigi(params.getParameter<bool>("apdSeparateDigi")),
75  m_componentSeparateDigi(params.getParameter<bool>("componentSeparateDigi")),
76 
77  m_EBs25notCont(params.getParameter<double>("EBs25notContainment")),
78  m_EEs25notCont(params.getParameter<double>("EEs25notContainment")),
79 
81  m_ParameterMap(new EcalSimParameterMap(params.getParameter<double>("simHitToPhotoelectronsBarrel"),
82  params.getParameter<double>("simHitToPhotoelectronsEndcap"),
83  params.getParameter<double>("photoelectronsToAnalogBarrel"),
84  params.getParameter<double>("photoelectronsToAnalogEndcap"),
85  params.getParameter<double>("samplingFactor"),
86  params.getParameter<double>("timePhase"),
88  params.getParameter<int>("binOfMaximum"),
89  params.getParameter<bool>("doPhotostatistics"),
90  params.getParameter<bool>("syncPhase"))),
91 
92  m_apdDigiTag(params.getParameter<std::string>("apdDigiTag")),
93  m_apdParameters(new APDSimParameters(params.getParameter<bool>("apdAddToBarrel"),
95  params.getParameter<double>("apdSimToPELow"),
96  params.getParameter<double>("apdSimToPEHigh"),
97  params.getParameter<double>("apdTimeOffset"),
98  params.getParameter<double>("apdTimeOffWidth"),
99  params.getParameter<bool>("apdDoPEStats"),
100  m_apdDigiTag,
101  params.getParameter<std::vector<double>>("apdNonlParms"))),
102 
103  m_componentDigiTag(params.getParameter<std::string>("componentDigiTag")),
105  std::make_unique<ComponentSimParameterMap>(params.getParameter<bool>("componentAddToBarrel"),
107  params.getParameter<double>("simHitToPhotoelectronsBarrel"),
108  0, // endcap parameters not needed
109  params.getParameter<double>("photoelectronsToAnalogBarrel"),
110  0,
111  params.getParameter<double>("samplingFactor"),
112  params.getParameter<double>("componentTimePhase"),
114  params.getParameter<int>("binOfMaximum"),
115  params.getParameter<bool>("doPhotostatistics"),
116  params.getParameter<bool>("syncPhase"))),
117 
119  : new EBHitResponse(m_ParameterMap.get(),
120  &m_EBShape,
121  true,
122  false,
123  m_apdParameters.get(),
124  &m_APDShape,
125  m_componentParameters.get(),
127 
129  ? nullptr
130  : std::make_unique<EBHitResponse>(
131  m_ParameterMap.get(),
132  &m_EBShape,
133  false,
134  true,
135  m_apdParameters.get(),
136  &m_APDShape,
137  m_componentParameters.get(),
138  &m_ComponentShapes)), // check if that false is correct // TODO HERE JCH
139 
141  &m_EBShape,
142  false, // barrel
143  false, // normal non-component shape based
144  m_apdParameters.get(),
145  &m_APDShape,
146  m_componentParameters.get(),
148 
152 
153  m_addESNoise(params.getParameter<bool>("doESNoise")),
154  m_PreMix1(params.getParameter<bool>("EcalPreMixStage1")),
155  m_PreMix2(params.getParameter<bool>("EcalPreMixStage2")),
156 
157  m_doFastES(params.getParameter<bool>("doFast")),
158 
159  m_doEB(params.getParameter<bool>("doEB")),
160  m_doEE(params.getParameter<bool>("doEE")),
161  m_doES(params.getParameter<bool>("doES")),
162 
164 
165  m_ESOldDigitizer(m_doFastES ? nullptr
167 
169 
170  m_ESDigitizer(!m_doFastES ? nullptr
172 
173  m_APDDigitizer(nullptr),
174  m_ComponentDigitizer(nullptr),
175  m_BarrelDigitizer(nullptr),
176  m_EndcapDigitizer(nullptr),
177  m_ElectronicsSim(nullptr),
178  m_Coder(nullptr),
179  m_APDElectronicsSim(nullptr),
180  m_APDCoder(nullptr),
181  m_Geometry(nullptr),
182  m_EBCorrNoise({{nullptr, nullptr, nullptr}}),
183  m_EECorrNoise({{nullptr, nullptr, nullptr}}) {
184  // "produces" statements taken care of elsewhere.
185  // if(m_apdSeparateDigi) mixMod.produces<EBDigiCollection>(m_apdDigiTag);
186  // mixMod.produces<EBDigiCollection>(m_EBdigiCollection);
187  // mixMod.produces<EEDigiCollection>(m_EEdigiCollection);
188  // mixMod.produces<ESDigiCollection>(m_ESdigiCollection);
189  if (m_doEB)
190  iC.consumes<std::vector<PCaloHit>>(edm::InputTag(m_hitsProducerTag, "EcalHitsEB"));
191  if (m_doEE)
192  iC.consumes<std::vector<PCaloHit>>(edm::InputTag(m_hitsProducerTag, "EcalHitsEE"));
193  if (m_doES) {
194  iC.consumes<std::vector<PCaloHit>>(edm::InputTag(m_hitsProducerTag, "EcalHitsES"));
195  m_esGainToken = iC.esConsumes();
198  m_esMIPsToken = iC.esConsumes();
199  }
200 
201  const std::vector<double> ebCorMatG12 = params.getParameter<std::vector<double>>("EBCorrNoiseMatrixG12");
202  const std::vector<double> eeCorMatG12 = params.getParameter<std::vector<double>>("EECorrNoiseMatrixG12");
203  const std::vector<double> ebCorMatG06 = params.getParameter<std::vector<double>>("EBCorrNoiseMatrixG06");
204  const std::vector<double> eeCorMatG06 = params.getParameter<std::vector<double>>("EECorrNoiseMatrixG06");
205  const std::vector<double> ebCorMatG01 = params.getParameter<std::vector<double>>("EBCorrNoiseMatrixG01");
206  const std::vector<double> eeCorMatG01 = params.getParameter<std::vector<double>>("EECorrNoiseMatrixG01");
207 
208  const bool applyConstantTerm = params.getParameter<bool>("applyConstantTerm");
209  const double rmsConstantTerm = params.getParameter<double>("ConstantTerm");
210 
211  const bool addNoise = params.getParameter<bool>("doENoise");
212  const bool cosmicsPhase = params.getParameter<bool>("cosmicsPhase");
213  const double cosmicsShift = params.getParameter<double>("cosmicsShift");
214 
215  //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
216 
217  // further phase for cosmics studies
218  if (cosmicsPhase) {
219  if (m_doEB)
220  m_EBResponse->setPhaseShift(1. + cosmicsShift);
221  if (m_doEE)
222  m_EEResponse->setPhaseShift(1. + cosmicsShift);
223  }
224 
225  EcalCorrMatrix ebMatrix[3];
226  EcalCorrMatrix eeMatrix[3];
227 
228  assert(ebCorMatG12.size() == m_readoutFrameSize);
229  assert(eeCorMatG12.size() == m_readoutFrameSize);
230  assert(ebCorMatG06.size() == m_readoutFrameSize);
231  assert(eeCorMatG06.size() == m_readoutFrameSize);
232  assert(ebCorMatG01.size() == m_readoutFrameSize);
233  assert(eeCorMatG01.size() == m_readoutFrameSize);
234 
235  assert(1.e-7 > fabs(ebCorMatG12[0] - 1.0));
236  assert(1.e-7 > fabs(ebCorMatG06[0] - 1.0));
237  assert(1.e-7 > fabs(ebCorMatG01[0] - 1.0));
238  assert(1.e-7 > fabs(eeCorMatG12[0] - 1.0));
239  assert(1.e-7 > fabs(eeCorMatG06[0] - 1.0));
240  assert(1.e-7 > fabs(eeCorMatG01[0] - 1.0));
241 
242  for (unsigned int row(0); row != m_readoutFrameSize; ++row) {
243  assert(0 == row || 1. >= ebCorMatG12[row]);
244  assert(0 == row || 1. >= ebCorMatG06[row]);
245  assert(0 == row || 1. >= ebCorMatG01[row]);
246  assert(0 == row || 1. >= eeCorMatG12[row]);
247  assert(0 == row || 1. >= eeCorMatG06[row]);
248  assert(0 == row || 1. >= eeCorMatG01[row]);
249  for (unsigned int column(0); column <= row; ++column) {
250  const unsigned int index(row - column);
251  ebMatrix[0](row, column) = ebCorMatG12[index];
252  eeMatrix[0](row, column) = eeCorMatG12[index];
253  ebMatrix[1](row, column) = ebCorMatG06[index];
254  eeMatrix[1](row, column) = eeCorMatG06[index];
255  ebMatrix[2](row, column) = ebCorMatG01[index];
256  eeMatrix[2](row, column) = eeCorMatG01[index];
257  }
258  }
259 
260  m_EBCorrNoise[0] = std::make_unique<CorrelatedNoisifier<EcalCorrMatrix>>(ebMatrix[0]);
261  m_EECorrNoise[0] = std::make_unique<CorrelatedNoisifier<EcalCorrMatrix>>(eeMatrix[0]);
262  m_EBCorrNoise[1] = std::make_unique<CorrelatedNoisifier<EcalCorrMatrix>>(ebMatrix[1]);
263  m_EECorrNoise[1] = std::make_unique<CorrelatedNoisifier<EcalCorrMatrix>>(eeMatrix[1]);
264  m_EBCorrNoise[2] = std::make_unique<CorrelatedNoisifier<EcalCorrMatrix>>(ebMatrix[2]);
265  m_EECorrNoise[2] = std::make_unique<CorrelatedNoisifier<EcalCorrMatrix>>(eeMatrix[2]);
266 
267  m_Coder = std::make_unique<EcalCoder>(addNoise,
268  m_PreMix1,
269  m_EBCorrNoise[0].get(),
270  m_EECorrNoise[0].get(),
271  m_EBCorrNoise[1].get(),
272  m_EECorrNoise[1].get(),
273  m_EBCorrNoise[2].get(),
274  m_EECorrNoise[2].get());
275 
277  std::make_unique<EcalElectronicsSim_Ph1>(m_ParameterMap.get(), m_Coder.get(), applyConstantTerm, rmsConstantTerm);
278 
279  if (m_apdSeparateDigi) {
280  m_APDCoder = std::make_unique<EcalCoder>(false,
281  m_PreMix1,
282  m_EBCorrNoise[0].get(),
283  m_EECorrNoise[0].get(),
284  m_EBCorrNoise[1].get(),
285  m_EECorrNoise[1].get(),
286  m_EBCorrNoise[2].get(),
287  m_EECorrNoise[2].get());
288 
289  m_APDElectronicsSim = std::make_unique<EcalElectronicsSim_Ph1>(
290  m_ParameterMap.get(), m_APDCoder.get(), applyConstantTerm, rmsConstantTerm);
291 
292  m_APDDigitizer = std::make_unique<EBDigitizer>(m_APDResponse.get(), m_APDElectronicsSim.get(), false);
293  }
295  m_ComponentCoder = std::make_unique<EcalCoder>(addNoise,
296  m_PreMix1,
297  m_EBCorrNoise[0].get(),
298  m_EECorrNoise[0].get(),
299  m_EBCorrNoise[1].get(),
300  m_EECorrNoise[1].get(),
301  m_EBCorrNoise[2].get(),
302  m_EECorrNoise[2].get());
303  m_ComponentElectronicsSim = std::make_unique<EcalElectronicsSim_Ph1>(
304  m_ParameterMap.get(), m_ComponentCoder.get(), applyConstantTerm, rmsConstantTerm);
306  std::make_unique<EBDigitizer>(m_ComponentResponse.get(), m_ComponentElectronicsSim.get(), addNoise);
307  }
308 
309  if (m_doEB) {
310  m_BarrelDigitizer = std::make_unique<EBDigitizer>(m_EBResponse.get(), m_ElectronicsSim.get(), addNoise);
311  }
312 
313  if (m_doEE) {
314  m_EndcapDigitizer = std::make_unique<EEDigitizer>(m_EEResponse.get(), m_ElectronicsSim.get(), addNoise);
315  }
316 }
std::unique_ptr< EcalCoder > m_APDCoder
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
const edm::EDGetTokenT< std::vector< PCaloHit > > m_HitsEEToken_
CaloTDigitizer< ESOldDigitizerTraits > ESOldDigitizer
std::unique_ptr< ESDigitizer > m_ESDigitizer
edm::ESGetToken< ESMIPToGeVConstant, ESMIPToGeVConstantRcd > m_esMIPToGeVToken
const std::string m_ESdigiCollection
const edm::ESGetToken< EcalIntercalibConstantsMC, EcalIntercalibConstantsMCRcd > m_icalToken
std::unique_ptr< EEDigitizer > m_EndcapDigitizer
const std::string m_componentDigiTag
std::unique_ptr< EBHitResponse > m_APDResponse
const edm::ESGetToken< EcalLaserDbService, EcalLaserDbRecord > m_laserToken
const std::string m_hitsProducerTag
const edm::EDGetTokenT< std::vector< PCaloHit > > m_HitsESToken_
std::unique_ptr< EcalCoder > m_Coder
edm::ESGetToken< ESGain, ESGainRcd > m_esGainToken
assert(be >=bs)
const edm::EDGetTokenT< std::vector< PCaloHit > > m_HitsEBToken_
const edm::ESGetToken< CaloGeometry, CaloGeometryRecord > m_geometryToken
const std::string m_EEdigiCollection
std::unique_ptr< ESHitResponse > m_ESResponse
const bool m_addESNoise
const unsigned int m_readoutFrameSize
std::unique_ptr< EBHitResponse > m_ComponentResponse
std::array< std::unique_ptr< CorrelatedNoisifier< EcalCorrMatrix > >, 3 > m_EECorrNoise
std::unique_ptr< EcalElectronicsSim_Ph1 > m_APDElectronicsSim
Creates electronics signals from hits.
const double m_EBs25notCont
edm::ESGetToken< ESIntercalibConstants, ESIntercalibConstantsRcd > m_esMIPsToken
std::unique_ptr< EcalCoder > m_ComponentCoder
std::unique_ptr< EcalElectronicsSim_Ph1 > m_ElectronicsSim
ComponentShapeCollection m_ComponentShapes
std::unique_ptr< CaloHitResponse > m_ESOldResponse
std::array< std::unique_ptr< CorrelatedNoisifier< EcalCorrMatrix > >, 3 > m_EBCorrNoise
std::unique_ptr< EcalElectronicsSim_Ph1 > m_ComponentElectronicsSim
const CaloGeometry * m_Geometry
std::unique_ptr< EBDigitizer > m_BarrelDigitizer
std::unique_ptr< ESElectronicsSimFast > m_ESElectronicsSimFast
const edm::ESGetToken< EcalADCToGeVConstant, EcalADCToGeVConstantRcd > m_agcToken
std::unique_ptr< EEHitResponse > m_EEResponse
edm::ESGetToken< ESPedestals, ESPedestalsRcd > m_esPedestalsToken
std::unique_ptr< const ComponentSimParameterMap > m_componentParameters
std::unique_ptr< EBDigitizer > m_ComponentDigitizer
const bool m_apdSeparateDigi
std::unique_ptr< ESElectronicsSim > m_ESElectronicsSim
static constexpr unsigned int sampleSize
Definition: EcalConstants.h:53
const bool m_componentSeparateDigi
math::ErrorD< ecalPh1::sampleSize >::type EcalCorrMatrix
const std::string m_apdDigiTag
const edm::ESGetToken< EcalPedestals, EcalPedestalsRcd > m_pedestalsToken
std::unique_ptr< EBHitResponse > m_EBResponse
std::unique_ptr< ESOldDigitizer > m_ESOldDigitizer
const std::string m_EBdigiCollection
EBHitResponseImpl< ecalPh1 > EBHitResponse
std::unique_ptr< EBDigitizer > m_APDDigitizer
const edm::ESGetToken< EcalGainRatios, EcalGainRatiosRcd > m_grToken
const double m_EEs25notCont
std::unique_ptr< const EcalSimParameterMap > m_ParameterMap
std::unique_ptr< const APDSimParameters > m_apdParameters

◆ ~EcalDigiProducer()

EcalDigiProducer::~EcalDigiProducer ( )
override

Definition at line 318 of file EcalDigiProducer.cc.

318 {}

Member Function Documentation

◆ accumulate() [1/2]

void EcalDigiProducer::accumulate ( edm::Event const &  e,
edm::EventSetup const &  c 
)
overridevirtual

Implements DigiAccumulatorMixMod.

Definition at line 375 of file EcalDigiProducer.cc.

References accumulateCaloHits(), MillePedeFileConverter_cfg::e, options_cfi::eventSetup, m_APDShape, m_ComponentShapes, m_doEB, m_doEE, m_EBShape, m_EEShape, m_HitsEBToken_, m_HitsEEToken_, m_HitsESToken_, ComponentShapeCollection::setEventSetup(), and EcalShapeBase::setEventSetup().

Referenced by PreMixingEcalWorker::addSignals().

375  {
376  // Step A: Get Inputs
377  const edm::Handle<std::vector<PCaloHit>> &ebHandle = e.getHandle(m_HitsEBToken_);
378  if (m_doEB) {
382  }
383 
384  const edm::Handle<std::vector<PCaloHit>> &eeHandle = e.getHandle(m_HitsEEToken_);
385  if (m_doEE) {
387  }
388 
389  const edm::Handle<std::vector<PCaloHit>> &esHandle = e.getHandle(m_HitsESToken_);
390 
391  accumulateCaloHits(ebHandle, eeHandle, esHandle, 0);
392 }
const edm::EDGetTokenT< std::vector< PCaloHit > > m_HitsEEToken_
const edm::EDGetTokenT< std::vector< PCaloHit > > m_HitsESToken_
const edm::EDGetTokenT< std::vector< PCaloHit > > m_HitsEBToken_
void accumulateCaloHits(HitsHandle const &ebHandle, HitsHandle const &eeHandle, HitsHandle const &esHandle, int bunchCrossing)
ComponentShapeCollection m_ComponentShapes
void setEventSetup(const edm::EventSetup &evtSetup)
void setEventSetup(const edm::EventSetup &evtSetup, bool normalize=true)

◆ accumulate() [2/2]

void EcalDigiProducer::accumulate ( PileUpEventPrincipal const &  e,
edm::EventSetup const &  c,
edm::StreamID const &  streamID 
)
overridevirtual

Implements DigiAccumulatorMixMod.

Definition at line 394 of file EcalDigiProducer.cc.

References accumulateCaloHits(), MillePedeFileConverter_cfg::e, m_doEB, m_doEE, m_doES, and m_hitsProducerTag.

396  {
397  // Step A: Get Inputs
399  if (m_doEB) {
400  edm::InputTag ebTag(m_hitsProducerTag, "EcalHitsEB");
401  e.getByLabel(ebTag, ebHandle);
402  }
403 
405  if (m_doEE) {
406  edm::InputTag eeTag(m_hitsProducerTag, "EcalHitsEE");
407  e.getByLabel(eeTag, eeHandle);
408  }
409 
411  if (m_doES) {
412  edm::InputTag esTag(m_hitsProducerTag, "EcalHitsES");
413  e.getByLabel(esTag, esHandle);
414  }
415 
416  accumulateCaloHits(ebHandle, eeHandle, esHandle, e.bunchCrossing());
417 }
const std::string m_hitsProducerTag
void accumulateCaloHits(HitsHandle const &ebHandle, HitsHandle const &eeHandle, HitsHandle const &esHandle, int bunchCrossing)

◆ accumulateCaloHits()

void EcalDigiProducer::accumulateCaloHits ( HitsHandle const &  ebHandle,
HitsHandle const &  eeHandle,
HitsHandle const &  esHandle,
int  bunchCrossing 
)
private

Definition at line 347 of file EcalDigiProducer.cc.

References edm::HandleBase::isValid(), m_APDDigitizer, m_apdSeparateDigi, m_BarrelDigitizer, m_ComponentDigitizer, m_componentSeparateDigi, m_doEB, m_doEE, m_doES, m_doFastES, m_EndcapDigitizer, m_ESDigitizer, m_ESOldDigitizer, edm::Handle< T >::product(), and randomEngine_.

Referenced by accumulate().

350  {
351  if (m_doEB && ebHandle.isValid()) {
352  m_BarrelDigitizer->add(*ebHandle.product(), bunchCrossing, randomEngine_);
353 
354  if (m_apdSeparateDigi) {
355  m_APDDigitizer->add(*ebHandle.product(), bunchCrossing, randomEngine_);
356  }
358  m_ComponentDigitizer->add(*ebHandle.product(), bunchCrossing, randomEngine_);
359  }
360  }
361 
362  if (m_doEE && eeHandle.isValid()) {
363  m_EndcapDigitizer->add(*eeHandle.product(), bunchCrossing, randomEngine_);
364  }
365 
366  if (m_doES && esHandle.isValid()) {
367  if (m_doFastES) {
368  m_ESDigitizer->add(*esHandle.product(), bunchCrossing, randomEngine_);
369  } else {
370  m_ESOldDigitizer->add(*esHandle.product(), bunchCrossing, randomEngine_);
371  }
372  }
373 }
std::unique_ptr< ESDigitizer > m_ESDigitizer
std::unique_ptr< EEDigitizer > m_EndcapDigitizer
std::unique_ptr< EBDigitizer > m_BarrelDigitizer
CLHEP::HepRandomEngine * randomEngine_
std::unique_ptr< EBDigitizer > m_ComponentDigitizer
const bool m_apdSeparateDigi
const bool m_componentSeparateDigi
std::unique_ptr< ESOldDigitizer > m_ESOldDigitizer
std::unique_ptr< EBDigitizer > m_APDDigitizer

◆ beginLuminosityBlock()

void EcalDigiProducer::beginLuminosityBlock ( edm::LuminosityBlock const &  lumi,
edm::EventSetup const &  setup 
)
overridevirtual

Reimplemented from DigiAccumulatorMixMod.

Definition at line 475 of file EcalDigiProducer.cc.

References Exception, edm::RandomNumberGenerator::getEngine(), edm::Service< T >::isAvailable(), m_APDResponse, m_ComponentResponse, m_doEB, and m_EBResponse.

Referenced by PreMixingEcalWorker::beginLuminosityBlock().

475  {
477  if (!rng.isAvailable()) {
478  throw cms::Exception("Configuration") << "RandomNumberGenerator service is not available.\n"
479  "You must add the service in the configuration file\n"
480  "or remove the module that requires it.";
481  }
482  CLHEP::HepRandomEngine *engine = &rng->getEngine(lumi.index());
483 
484  if (m_doEB) {
485  if (nullptr != m_APDResponse)
486  m_APDResponse->initialize(engine);
487  if (nullptr != m_ComponentResponse)
488  m_ComponentResponse->initialize(engine);
489  m_EBResponse->initialize(engine);
490  }
491 }
std::unique_ptr< EBHitResponse > m_APDResponse
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
std::unique_ptr< EBHitResponse > m_ComponentResponse
std::unique_ptr< EBHitResponse > m_EBResponse
bool isAvailable() const
Definition: Service.h:40

◆ cacheEBDigis()

virtual void EcalDigiProducer::cacheEBDigis ( const EBDigiCollection ebDigiPtr) const
inlineprivatevirtual

Definition at line 99 of file EcalDigiProducer.h.

Referenced by finalizeEvent().

99 {}

◆ cacheEEDigis()

virtual void EcalDigiProducer::cacheEEDigis ( const EEDigiCollection eeDigiPtr) const
inlineprivatevirtual

Definition at line 100 of file EcalDigiProducer.h.

Referenced by finalizeEvent().

100 {}

◆ checkCalibrations()

void EcalDigiProducer::checkCalibrations ( const edm::Event event,
const edm::EventSetup eventSetup 
)
private

Definition at line 493 of file EcalDigiProducer.cc.

References options_cfi::eventSetup, EcalMGPAGainRatio::gain12Over6(), EcalMGPAGainRatio::gain6Over1(), EcalADCToGeVConstant::getEBValue(), EcalADCToGeVConstant::getEEValue(), ESGain::getESGain(), ESMIPToGeVConstant::getESValueHigh(), ESMIPToGeVConstant::getESValueLow(), EcalCondDBWriter_cfi::laser, LogDebug, m_agcToken, m_APDCoder, m_APDResponse, m_Coder, m_ComponentCoder, m_ComponentResponse, m_doES, m_doFastES, m_EBResponse, m_EBs25notCont, m_EEResponse, m_EEs25notCont, m_ESDigitizer, m_ESElectronicsSim, m_ESElectronicsSimFast, m_esGainToken, m_esMIPsToken, m_esMIPToGeVToken, m_esPedestalsToken, m_ESShape, m_grToken, m_icalToken, m_laserToken, m_pedestalsToken, m_useLCcorrection, and ESShape::setGain().

Referenced by initializeEvent().

493  {
494  // Pedestals from event setup
495 
496  const EcalPedestals *pedestals = &eventSetup.getData(m_pedestalsToken);
497 
498  m_Coder->setPedestals(pedestals);
499  if (nullptr != m_APDCoder)
500  m_APDCoder->setPedestals(pedestals);
501  if (nullptr != m_ComponentCoder)
502  m_ComponentCoder->setPedestals(pedestals);
503 
504  // Ecal Intercalibration Constants
505  const EcalIntercalibConstantsMC *ical = &eventSetup.getData(m_icalToken);
506 
507  m_Coder->setIntercalibConstants(ical);
508  if (nullptr != m_APDCoder)
509  m_APDCoder->setIntercalibConstants(ical);
510  if (nullptr != m_ComponentCoder)
511  m_ComponentCoder->setIntercalibConstants(ical);
512 
513  m_EBResponse->setIntercal(ical);
514  if (nullptr != m_APDResponse)
515  m_APDResponse->setIntercal(ical);
516  if (nullptr != m_ComponentResponse)
517  m_ComponentResponse->setIntercal(ical);
518 
519  // Ecal LaserCorrection Constants
520  const EcalLaserDbService *laser = &eventSetup.getData(m_laserToken);
521  const edm::TimeValue_t eventTimeValue = event.time().value();
522 
523  m_EBResponse->setEventTime(eventTimeValue);
524  m_EBResponse->setLaserConstants(laser, m_useLCcorrection);
525 
526  m_EEResponse->setEventTime(eventTimeValue);
527  m_EEResponse->setLaserConstants(laser, m_useLCcorrection);
528 
529  // ADC -> GeV Scale
530  const EcalADCToGeVConstant *agc = &eventSetup.getData(m_agcToken);
531 
532  // Gain Ratios
533  const EcalGainRatios *gr = &eventSetup.getData(m_grToken);
534 
535  m_Coder->setGainRatios(gr);
536  if (nullptr != m_APDCoder)
537  m_APDCoder->setGainRatios(gr);
538  if (nullptr != m_ComponentCoder)
539  m_ComponentCoder->setGainRatios(gr);
540 
541  EcalMGPAGainRatio *defaultRatios = new EcalMGPAGainRatio();
542 
543  double theGains[m_Coder->NGAINS + 1];
544  theGains[0] = 0.;
545  theGains[3] = 1.;
546  theGains[2] = defaultRatios->gain6Over1();
547  theGains[1] = theGains[2] * (defaultRatios->gain12Over6());
548 
549  LogDebug("EcalDigi") << " Gains: "
550  << "\n"
551  << " g1 = " << theGains[1] << "\n"
552  << " g2 = " << theGains[2] << "\n"
553  << " g3 = " << theGains[3];
554 
555  delete defaultRatios;
556 
557  const double EBscale((agc->getEBValue()) * theGains[1] * (m_Coder->MAXADC) * m_EBs25notCont);
558 
559  LogDebug("EcalDigi") << " GeV/ADC = " << agc->getEBValue() << "\n"
560  << " notCont = " << m_EBs25notCont << "\n"
561  << " saturation for EB = " << EBscale << ", " << m_EBs25notCont;
562 
563  const double EEscale((agc->getEEValue()) * theGains[1] * (m_Coder->MAXADC) * m_EEs25notCont);
564 
565  LogDebug("EcalDigi") << " GeV/ADC = " << agc->getEEValue() << "\n"
566  << " notCont = " << m_EEs25notCont << "\n"
567  << " saturation for EB = " << EEscale << ", " << m_EEs25notCont;
568 
569  m_Coder->setFullScaleEnergy(EBscale, EEscale);
570  if (nullptr != m_APDCoder)
571  m_APDCoder->setFullScaleEnergy(EBscale, EEscale);
572  if (nullptr != m_ComponentCoder)
573  m_ComponentCoder->setFullScaleEnergy(EBscale, EEscale);
574 
575  if (m_doES) {
576  // ES condition objects
577  const ESGain *esgain = &eventSetup.getData(m_esGainToken);
578  const ESPedestals *espeds = &eventSetup.getData(m_esPedestalsToken);
579  const ESIntercalibConstants *esmips = &eventSetup.getData(m_esMIPsToken);
580  const ESMIPToGeVConstant *esMipToGeV = &eventSetup.getData(m_esMIPToGeVToken);
581  const int ESGain(1.1 > esgain->getESGain() ? 1 : 2);
582  const double ESMIPToGeV((1 == ESGain) ? esMipToGeV->getESValueLow() : esMipToGeV->getESValueHigh());
583 
585  if (!m_doFastES) {
586  m_ESElectronicsSim->setGain(ESGain);
587  m_ESElectronicsSim->setPedestals(espeds);
588  m_ESElectronicsSim->setMIPs(esmips);
589  m_ESElectronicsSim->setMIPToGeV(ESMIPToGeV);
590  } else {
591  m_ESDigitizer->setGain(ESGain);
592  m_ESElectronicsSimFast->setPedestals(espeds);
593  m_ESElectronicsSimFast->setMIPs(esmips);
594  m_ESElectronicsSimFast->setMIPToGeV(ESMIPToGeV);
595  }
596  }
597 }
std::unique_ptr< EcalCoder > m_APDCoder
float getESValueHigh() const
std::unique_ptr< ESDigitizer > m_ESDigitizer
edm::ESGetToken< ESMIPToGeVConstant, ESMIPToGeVConstantRcd > m_esMIPToGeVToken
const edm::ESGetToken< EcalIntercalibConstantsMC, EcalIntercalibConstantsMCRcd > m_icalToken
Definition: ESGain.h:7
void setGain(const int gain)
Definition: ESShape.h:23
std::unique_ptr< EBHitResponse > m_APDResponse
const edm::ESGetToken< EcalLaserDbService, EcalLaserDbRecord > m_laserToken
std::unique_ptr< EcalCoder > m_Coder
edm::ESGetToken< ESGain, ESGainRcd > m_esGainToken
std::unique_ptr< EBHitResponse > m_ComponentResponse
const double m_EBs25notCont
edm::ESGetToken< ESIntercalibConstants, ESIntercalibConstantsRcd > m_esMIPsToken
std::unique_ptr< EcalCoder > m_ComponentCoder
float getESValueLow() const
unsigned long long TimeValue_t
Definition: Timestamp.h:21
std::unique_ptr< ESElectronicsSimFast > m_ESElectronicsSimFast
float gain12Over6() const
const edm::ESGetToken< EcalADCToGeVConstant, EcalADCToGeVConstantRcd > m_agcToken
std::unique_ptr< EEHitResponse > m_EEResponse
edm::ESGetToken< ESPedestals, ESPedestalsRcd > m_esPedestalsToken
float gain6Over1() const
std::unique_ptr< ESElectronicsSim > m_ESElectronicsSim
const edm::ESGetToken< EcalPedestals, EcalPedestalsRcd > m_pedestalsToken
std::unique_ptr< EBHitResponse > m_EBResponse
const edm::ESGetToken< EcalGainRatios, EcalGainRatiosRcd > m_grToken
float getESGain() const
Definition: ESGain.h:13
const double m_EEs25notCont
#define LogDebug(id)

◆ checkGeometry()

void EcalDigiProducer::checkGeometry ( const edm::EventSetup eventSetup)
private

Definition at line 599 of file EcalDigiProducer.cc.

References edm::ESWatcher< T >::check(), options_cfi::eventSetup, m_Geometry, m_geometryToken, m_geometryWatcher, and updateGeometry().

Referenced by initializeEvent().

599  {
602  updateGeometry();
603  }
604 }
edm::ESWatcher< CaloGeometryRecord > m_geometryWatcher
const edm::ESGetToken< CaloGeometry, CaloGeometryRecord > m_geometryToken
const CaloGeometry * m_Geometry
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:57

◆ finalizeEvent()

void EcalDigiProducer::finalizeEvent ( edm::Event e,
edm::EventSetup const &  c 
)
overridevirtual

Implements DigiAccumulatorMixMod.

Definition at line 419 of file EcalDigiProducer.cc.

References cacheEBDigis(), cacheEEDigis(), m_APDDigitizer, m_apdSeparateDigi, m_BarrelDigitizer, m_componentDigiTag, m_ComponentDigitizer, m_componentSeparateDigi, m_doEB, m_doEE, m_doES, m_doFastES, m_EBdigiCollection, m_EEdigiCollection, m_EndcapDigitizer, m_ESdigiCollection, m_ESDigitizer, m_ESOldDigitizer, eostools::move(), and randomEngine_.

Referenced by PreMixingEcalWorker::put().

419  {
420  // Step B: Create empty output
421  std::unique_ptr<EBDigiCollection> apdResult(!m_apdSeparateDigi || !m_doEB ? nullptr : new EBDigiCollection());
422  std::unique_ptr<EBDigiCollection> componentResult(!m_componentSeparateDigi || !m_doEB ? nullptr
423  : new EBDigiCollection());
424  std::unique_ptr<EBDigiCollection> barrelResult(new EBDigiCollection());
425  std::unique_ptr<EEDigiCollection> endcapResult(new EEDigiCollection());
426  std::unique_ptr<ESDigiCollection> preshowerResult(new ESDigiCollection());
427 
428  // run the algorithm
429 
430  if (m_doEB) {
431  m_BarrelDigitizer->run(*barrelResult, randomEngine_);
432  cacheEBDigis(&*barrelResult);
433 
434  edm::LogInfo("DigiInfo") << "EB Digis: " << barrelResult->size();
435 
436  if (m_apdSeparateDigi) {
437  m_APDDigitizer->run(*apdResult, randomEngine_);
438  edm::LogInfo("DigiInfo") << "APD Digis: " << apdResult->size();
439  }
441  m_ComponentDigitizer->run(*componentResult, randomEngine_);
442  edm::LogInfo("DigiInfo") << "Component Digis: " << componentResult->size();
443  }
444  }
445 
446  if (m_doEE) {
447  m_EndcapDigitizer->run(*endcapResult, randomEngine_);
448  edm::LogInfo("EcalDigi") << "EE Digis: " << endcapResult->size();
449  cacheEEDigis(&*endcapResult);
450  }
451  if (m_doES) {
452  if (m_doFastES) {
453  m_ESDigitizer->run(*preshowerResult, randomEngine_);
454  } else {
455  m_ESOldDigitizer->run(*preshowerResult, randomEngine_);
456  }
457  edm::LogInfo("EcalDigi") << "ES Digis: " << preshowerResult->size();
458  }
459 
460  // Step D: Put outputs into event
461  if (m_apdSeparateDigi) {
462  // event.put(std::move(apdResult), m_apdDigiTag ) ;
463  }
464 
465  event.put(std::move(barrelResult), m_EBdigiCollection);
467  event.put(std::move(componentResult), m_componentDigiTag);
468  }
469  event.put(std::move(endcapResult), m_EEdigiCollection);
470  event.put(std::move(preshowerResult), m_ESdigiCollection);
471 
472  randomEngine_ = nullptr; // to prevent access outside event
473 }
std::unique_ptr< ESDigitizer > m_ESDigitizer
const std::string m_ESdigiCollection
std::unique_ptr< EEDigitizer > m_EndcapDigitizer
const std::string m_componentDigiTag
virtual void cacheEBDigis(const EBDigiCollection *ebDigiPtr) const
const std::string m_EEdigiCollection
std::unique_ptr< EBDigitizer > m_BarrelDigitizer
Log< level::Info, false > LogInfo
CLHEP::HepRandomEngine * randomEngine_
std::unique_ptr< EBDigitizer > m_ComponentDigitizer
const bool m_apdSeparateDigi
const bool m_componentSeparateDigi
std::unique_ptr< ESOldDigitizer > m_ESOldDigitizer
virtual void cacheEEDigis(const EEDigiCollection *eeDigiPtr) const
const std::string m_EBdigiCollection
std::unique_ptr< EBDigitizer > m_APDDigitizer
def move(src, dest)
Definition: eostools.py:511

◆ initializeEvent()

void EcalDigiProducer::initializeEvent ( edm::Event const &  e,
edm::EventSetup const &  c 
)
overridevirtual

Implements DigiAccumulatorMixMod.

Definition at line 320 of file EcalDigiProducer.cc.

References checkCalibrations(), checkGeometry(), options_cfi::eventSetup, edm::RandomNumberGenerator::getEngine(), m_APDDigitizer, m_apdSeparateDigi, m_BarrelDigitizer, m_ComponentDigitizer, m_componentSeparateDigi, m_doEB, m_doEE, m_doES, m_doFastES, m_EndcapDigitizer, m_ESDigitizer, m_ESOldDigitizer, and randomEngine_.

Referenced by PreMixingEcalWorker::initializeEvent().

320  {
322  randomEngine_ = &rng->getEngine(event.streamID());
323 
326  if (m_doEB) {
327  m_BarrelDigitizer->initializeHits();
328  if (m_apdSeparateDigi) {
329  m_APDDigitizer->initializeHits();
330  }
332  m_ComponentDigitizer->initializeHits();
333  }
334  }
335  if (m_doEE) {
336  m_EndcapDigitizer->initializeHits();
337  }
338  if (m_doES) {
339  if (m_doFastES) {
340  m_ESDigitizer->initializeHits();
341  } else {
342  m_ESOldDigitizer->initializeHits();
343  }
344  }
345 }
std::unique_ptr< ESDigitizer > m_ESDigitizer
std::unique_ptr< EEDigitizer > m_EndcapDigitizer
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
void checkCalibrations(const edm::Event &event, const edm::EventSetup &eventSetup)
void checkGeometry(const edm::EventSetup &eventSetup)
std::unique_ptr< EBDigitizer > m_BarrelDigitizer
CLHEP::HepRandomEngine * randomEngine_
std::unique_ptr< EBDigitizer > m_ComponentDigitizer
const bool m_apdSeparateDigi
const bool m_componentSeparateDigi
std::unique_ptr< ESOldDigitizer > m_ESOldDigitizer
std::unique_ptr< EBDigitizer > m_APDDigitizer
Definition: event.py:1

◆ setEBNoiseSignalGenerator()

void EcalDigiProducer::setEBNoiseSignalGenerator ( EcalBaseSignalGenerator noiseGenerator)

Definition at line 636 of file EcalDigiProducer.cc.

References m_BarrelDigitizer.

Referenced by PreMixingEcalWorker::PreMixingEcalWorker().

636  {
637  // noiseGenerator->setParameterMap(theParameterMap);
638  if (nullptr != m_BarrelDigitizer)
639  m_BarrelDigitizer->setNoiseSignalGenerator(noiseGenerator);
640 }
std::unique_ptr< EBDigitizer > m_BarrelDigitizer

◆ setEENoiseSignalGenerator()

void EcalDigiProducer::setEENoiseSignalGenerator ( EcalBaseSignalGenerator noiseGenerator)

Definition at line 642 of file EcalDigiProducer.cc.

References m_EndcapDigitizer.

Referenced by PreMixingEcalWorker::PreMixingEcalWorker().

642  {
643  // noiseGenerator->setParameterMap(theParameterMap);
644  if (nullptr != m_EndcapDigitizer)
645  m_EndcapDigitizer->setNoiseSignalGenerator(noiseGenerator);
646 }
std::unique_ptr< EEDigitizer > m_EndcapDigitizer

◆ setESNoiseSignalGenerator()

void EcalDigiProducer::setESNoiseSignalGenerator ( EcalBaseSignalGenerator noiseGenerator)

Definition at line 648 of file EcalDigiProducer.cc.

References m_ESDigitizer.

Referenced by PreMixingEcalWorker::PreMixingEcalWorker().

648  {
649  // noiseGenerator->setParameterMap(theParameterMap);
650  if (nullptr != m_ESDigitizer)
651  m_ESDigitizer->setNoiseSignalGenerator(noiseGenerator);
652 }
std::unique_ptr< ESDigitizer > m_ESDigitizer

◆ updateGeometry()

void EcalDigiProducer::updateGeometry ( )
private

Definition at line 606 of file EcalDigiProducer.cc.

References DetId::Ecal, EcalBarrel, EcalEndcap, EcalPreshower, CaloGeometry::getSubdetectorGeometry(), CaloSubdetectorGeometry::getValidDetIds(), m_APDResponse, m_ComponentResponse, m_doEB, m_doEE, m_doES, m_doFastES, m_EBResponse, m_EEResponse, m_ESDigitizer, m_ESOldDigitizer, m_ESOldResponse, m_ESResponse, and m_Geometry.

Referenced by checkGeometry().

606  {
607  if (m_doEB) {
608  if (nullptr != m_APDResponse)
610  if (nullptr != m_ComponentResponse)
613  }
614  if (m_doEE) {
616  }
617  if (m_doES) {
619  m_ESOldResponse->setGeometry(m_Geometry);
620 
621  const std::vector<DetId> *theESDets(
624  : nullptr);
625 
626  if (!m_doFastES) {
627  if (nullptr != m_ESOldDigitizer && nullptr != theESDets)
628  m_ESOldDigitizer->setDetIds(*theESDets);
629  } else {
630  if (nullptr != m_ESDigitizer && nullptr != theESDets)
631  m_ESDigitizer->setDetIds(*theESDets);
632  }
633  }
634 }
std::unique_ptr< ESDigitizer > m_ESDigitizer
std::unique_ptr< EBHitResponse > m_APDResponse
std::unique_ptr< ESHitResponse > m_ESResponse
std::unique_ptr< EBHitResponse > m_ComponentResponse
std::unique_ptr< CaloHitResponse > m_ESOldResponse
virtual const std::vector< DetId > & getValidDetIds(DetId::Detector det=DetId::Detector(0), int subdet=0) const
Get a list of valid detector ids (for the given subdetector)
const CaloGeometry * m_Geometry
std::unique_ptr< EEHitResponse > m_EEResponse
std::unique_ptr< EBHitResponse > m_EBResponse
std::unique_ptr< ESOldDigitizer > m_ESOldDigitizer
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Definition: CaloGeometry.cc:34

Member Data Documentation

◆ m_addESNoise

const bool EcalDigiProducer::m_addESNoise
private

Definition at line 173 of file EcalDigiProducer.h.

◆ m_agcToken

const edm::ESGetToken<EcalADCToGeVConstant, EcalADCToGeVConstantRcd> EcalDigiProducer::m_agcToken
private

Definition at line 132 of file EcalDigiProducer.h.

Referenced by checkCalibrations().

◆ m_APDCoder

std::unique_ptr<EcalCoder> EcalDigiProducer::m_APDCoder
private

Definition at line 198 of file EcalDigiProducer.h.

Referenced by checkCalibrations().

◆ m_apdDigiTag

const std::string EcalDigiProducer::m_apdDigiTag
private

Definition at line 155 of file EcalDigiProducer.h.

Referenced by EcalDigiProducer().

◆ m_APDDigitizer

std::unique_ptr<EBDigitizer> EcalDigiProducer::m_APDDigitizer
private

Definition at line 186 of file EcalDigiProducer.h.

Referenced by accumulateCaloHits(), finalizeEvent(), and initializeEvent().

◆ m_APDElectronicsSim

std::unique_ptr<EcalElectronicsSim_Ph1> EcalDigiProducer::m_APDElectronicsSim
private

Definition at line 197 of file EcalDigiProducer.h.

◆ m_apdParameters

std::unique_ptr<const APDSimParameters> EcalDigiProducer::m_apdParameters
private

Definition at line 156 of file EcalDigiProducer.h.

◆ m_APDResponse

std::unique_ptr<EBHitResponse> EcalDigiProducer::m_APDResponse
private

Definition at line 161 of file EcalDigiProducer.h.

Referenced by beginLuminosityBlock(), checkCalibrations(), and updateGeometry().

◆ m_apdSeparateDigi

const bool EcalDigiProducer::m_apdSeparateDigi
private

◆ m_APDShape

APDShape EcalDigiProducer::m_APDShape
private

Definition at line 114 of file EcalDigiProducer.h.

Referenced by accumulate().

◆ m_BarrelDigitizer

std::unique_ptr<EBDigitizer> EcalDigiProducer::m_BarrelDigitizer
private

◆ m_Coder

std::unique_ptr<EcalCoder> EcalDigiProducer::m_Coder
private

Definition at line 195 of file EcalDigiProducer.h.

Referenced by checkCalibrations().

◆ m_ComponentCoder

std::unique_ptr<EcalCoder> EcalDigiProducer::m_ComponentCoder
private

Definition at line 200 of file EcalDigiProducer.h.

Referenced by checkCalibrations().

◆ m_componentDigiTag

const std::string EcalDigiProducer::m_componentDigiTag
private

Definition at line 158 of file EcalDigiProducer.h.

Referenced by EcalDigiProducer(), and finalizeEvent().

◆ m_ComponentDigitizer

std::unique_ptr<EBDigitizer> EcalDigiProducer::m_ComponentDigitizer
private

Definition at line 187 of file EcalDigiProducer.h.

Referenced by accumulateCaloHits(), finalizeEvent(), and initializeEvent().

◆ m_ComponentElectronicsSim

std::unique_ptr<EcalElectronicsSim_Ph1> EcalDigiProducer::m_ComponentElectronicsSim
private

Definition at line 199 of file EcalDigiProducer.h.

◆ m_componentParameters

std::unique_ptr<const ComponentSimParameterMap> EcalDigiProducer::m_componentParameters
private

Definition at line 159 of file EcalDigiProducer.h.

◆ m_ComponentResponse

std::unique_ptr<EBHitResponse> EcalDigiProducer::m_ComponentResponse
private

Definition at line 163 of file EcalDigiProducer.h.

Referenced by beginLuminosityBlock(), checkCalibrations(), and updateGeometry().

◆ m_componentSeparateDigi

const bool EcalDigiProducer::m_componentSeparateDigi
private

◆ m_ComponentShapes

ComponentShapeCollection EcalDigiProducer::m_ComponentShapes
private

Definition at line 115 of file EcalDigiProducer.h.

Referenced by accumulate().

◆ m_doEB

const bool EcalDigiProducer::m_doEB
private

◆ m_doEE

const bool EcalDigiProducer::m_doEE
private

◆ m_doES

const bool EcalDigiProducer::m_doES
private

◆ m_doFastES

const bool EcalDigiProducer::m_doFastES
private

◆ m_EBCorrNoise

std::array<std::unique_ptr<CorrelatedNoisifier<EcalCorrMatrix> >, 3> EcalDigiProducer::m_EBCorrNoise
private

Definition at line 204 of file EcalDigiProducer.h.

◆ m_EBdigiCollection

const std::string EcalDigiProducer::m_EBdigiCollection
private

Definition at line 120 of file EcalDigiProducer.h.

Referenced by EcalDigiProducer(), and finalizeEvent().

◆ m_EBResponse

std::unique_ptr<EBHitResponse> EcalDigiProducer::m_EBResponse
protected

Definition at line 166 of file EcalDigiProducer.h.

Referenced by beginLuminosityBlock(), checkCalibrations(), and updateGeometry().

◆ m_EBs25notCont

const double EcalDigiProducer::m_EBs25notCont
private

Definition at line 146 of file EcalDigiProducer.h.

Referenced by checkCalibrations().

◆ m_EBShape

EBShape EcalDigiProducer::m_EBShape
private

Definition at line 116 of file EcalDigiProducer.h.

Referenced by accumulate().

◆ m_EECorrNoise

std::array<std::unique_ptr<CorrelatedNoisifier<EcalCorrMatrix> >, 3> EcalDigiProducer::m_EECorrNoise
private

Definition at line 205 of file EcalDigiProducer.h.

◆ m_EEdigiCollection

const std::string EcalDigiProducer::m_EEdigiCollection
private

Definition at line 121 of file EcalDigiProducer.h.

Referenced by EcalDigiProducer(), and finalizeEvent().

◆ m_EEResponse

std::unique_ptr<EEHitResponse> EcalDigiProducer::m_EEResponse
protected

Definition at line 167 of file EcalDigiProducer.h.

Referenced by checkCalibrations(), and updateGeometry().

◆ m_EEs25notCont

const double EcalDigiProducer::m_EEs25notCont
private

Definition at line 147 of file EcalDigiProducer.h.

Referenced by checkCalibrations().

◆ m_EEShape

EEShape EcalDigiProducer::m_EEShape
private

Definition at line 117 of file EcalDigiProducer.h.

Referenced by accumulate().

◆ m_ElectronicsSim

std::unique_ptr<EcalElectronicsSim_Ph1> EcalDigiProducer::m_ElectronicsSim
private

Definition at line 194 of file EcalDigiProducer.h.

◆ m_EndcapDigitizer

std::unique_ptr<EEDigitizer> EcalDigiProducer::m_EndcapDigitizer
private

◆ m_ESdigiCollection

const std::string EcalDigiProducer::m_ESdigiCollection
private

Definition at line 122 of file EcalDigiProducer.h.

Referenced by EcalDigiProducer(), and finalizeEvent().

◆ m_ESDigitizer

std::unique_ptr<ESDigitizer> EcalDigiProducer::m_ESDigitizer
private

◆ m_ESElectronicsSim

std::unique_ptr<ESElectronicsSim> EcalDigiProducer::m_ESElectronicsSim
private

Definition at line 181 of file EcalDigiProducer.h.

Referenced by checkCalibrations().

◆ m_ESElectronicsSimFast

std::unique_ptr<ESElectronicsSimFast> EcalDigiProducer::m_ESElectronicsSimFast
private

Definition at line 183 of file EcalDigiProducer.h.

Referenced by checkCalibrations().

◆ m_esGainToken

edm::ESGetToken<ESGain, ESGainRcd> EcalDigiProducer::m_esGainToken
private

Definition at line 135 of file EcalDigiProducer.h.

Referenced by checkCalibrations().

◆ m_esMIPsToken

edm::ESGetToken<ESIntercalibConstants, ESIntercalibConstantsRcd> EcalDigiProducer::m_esMIPsToken
private

Definition at line 138 of file EcalDigiProducer.h.

Referenced by checkCalibrations().

◆ m_esMIPToGeVToken

edm::ESGetToken<ESMIPToGeVConstant, ESMIPToGeVConstantRcd> EcalDigiProducer::m_esMIPToGeVToken
private

Definition at line 136 of file EcalDigiProducer.h.

Referenced by checkCalibrations().

◆ m_ESOldDigitizer

std::unique_ptr<ESOldDigitizer> EcalDigiProducer::m_ESOldDigitizer
private

◆ m_ESOldResponse

std::unique_ptr<CaloHitResponse> EcalDigiProducer::m_ESOldResponse
private

Definition at line 171 of file EcalDigiProducer.h.

Referenced by updateGeometry().

◆ m_esPedestalsToken

edm::ESGetToken<ESPedestals, ESPedestalsRcd> EcalDigiProducer::m_esPedestalsToken
private

Definition at line 137 of file EcalDigiProducer.h.

Referenced by checkCalibrations().

◆ m_ESResponse

std::unique_ptr<ESHitResponse> EcalDigiProducer::m_ESResponse
private

Definition at line 170 of file EcalDigiProducer.h.

Referenced by updateGeometry().

◆ m_ESShape

ESShape EcalDigiProducer::m_ESShape
private

Definition at line 118 of file EcalDigiProducer.h.

Referenced by checkCalibrations().

◆ m_Geometry

const CaloGeometry* EcalDigiProducer::m_Geometry
private

Definition at line 202 of file EcalDigiProducer.h.

Referenced by checkGeometry(), and updateGeometry().

◆ m_geometryToken

const edm::ESGetToken<CaloGeometry, CaloGeometryRecord> EcalDigiProducer::m_geometryToken
private

Definition at line 134 of file EcalDigiProducer.h.

Referenced by checkGeometry().

◆ m_geometryWatcher

edm::ESWatcher<CaloGeometryRecord> EcalDigiProducer::m_geometryWatcher
private

Definition at line 139 of file EcalDigiProducer.h.

Referenced by checkGeometry().

◆ m_grToken

const edm::ESGetToken<EcalGainRatios, EcalGainRatiosRcd> EcalDigiProducer::m_grToken
private

Definition at line 133 of file EcalDigiProducer.h.

Referenced by checkCalibrations().

◆ m_HitsEBToken_

const edm::EDGetTokenT<std::vector<PCaloHit> > EcalDigiProducer::m_HitsEBToken_
private

Definition at line 125 of file EcalDigiProducer.h.

Referenced by accumulate().

◆ m_HitsEEToken_

const edm::EDGetTokenT<std::vector<PCaloHit> > EcalDigiProducer::m_HitsEEToken_
private

Definition at line 126 of file EcalDigiProducer.h.

Referenced by accumulate().

◆ m_HitsESToken_

const edm::EDGetTokenT<std::vector<PCaloHit> > EcalDigiProducer::m_HitsESToken_
private

Definition at line 127 of file EcalDigiProducer.h.

Referenced by accumulate().

◆ m_hitsProducerTag

const std::string EcalDigiProducer::m_hitsProducerTag
private

Definition at line 123 of file EcalDigiProducer.h.

Referenced by accumulate().

◆ m_icalToken

const edm::ESGetToken<EcalIntercalibConstantsMC, EcalIntercalibConstantsMCRcd> EcalDigiProducer::m_icalToken
private

Definition at line 130 of file EcalDigiProducer.h.

Referenced by checkCalibrations().

◆ m_laserToken

const edm::ESGetToken<EcalLaserDbService, EcalLaserDbRecord> EcalDigiProducer::m_laserToken
private

Definition at line 131 of file EcalDigiProducer.h.

Referenced by checkCalibrations().

◆ m_ParameterMap

std::unique_ptr<const EcalSimParameterMap> EcalDigiProducer::m_ParameterMap
protected

Definition at line 152 of file EcalDigiProducer.h.

◆ m_pedestalsToken

const edm::ESGetToken<EcalPedestals, EcalPedestalsRcd> EcalDigiProducer::m_pedestalsToken
private

Definition at line 129 of file EcalDigiProducer.h.

Referenced by checkCalibrations().

◆ m_PreMix1

const bool EcalDigiProducer::m_PreMix1
private

Definition at line 174 of file EcalDigiProducer.h.

◆ m_PreMix2

const bool EcalDigiProducer::m_PreMix2
private

Definition at line 175 of file EcalDigiProducer.h.

◆ m_readoutFrameSize

const unsigned int EcalDigiProducer::m_readoutFrameSize
private

Definition at line 149 of file EcalDigiProducer.h.

◆ m_useLCcorrection

bool EcalDigiProducer::m_useLCcorrection
private

Definition at line 141 of file EcalDigiProducer.h.

Referenced by checkCalibrations().

◆ randomEngine_

CLHEP::HepRandomEngine* EcalDigiProducer::randomEngine_ = nullptr
private

Definition at line 207 of file EcalDigiProducer.h.

Referenced by accumulateCaloHits(), finalizeEvent(), and initializeEvent().