CMS 3D CMS Logo

EcalDigiProducer.h
Go to the documentation of this file.
1 #ifndef SimCalorimetry_EcalSimProducers_EcalDigiProducer_h
2 #define SimCalorimetry_EcalSimProducers_EcalDigiProducer_h
3 
35 
40 
42 #include <vector>
43 
47 
48 class ESDigitizer;
49 
50 class APDSimParameters;
51 class EEHitResponse;
52 class ESHitResponse;
53 class CaloHitResponse;
55 class EcalCoder;
56 class ESElectronicsSim;
59 class CaloGeometry;
60 class EBDigiCollection;
61 class EEDigiCollection;
62 class ESDigiCollection;
64 
65 namespace edm {
66  class ConsumesCollector;
67  class Event;
68  class EventSetup;
69  template <typename T>
70  class Handle;
71  class ParameterSet;
72  class StreamID;
73 } // namespace edm
74 
75 namespace CLHEP {
76  class HepRandomEngine;
77 }
78 
80 public:
83  ~EcalDigiProducer() override;
84 
85  void initializeEvent(edm::Event const &e, edm::EventSetup const &c) override;
86  void accumulate(edm::Event const &e, edm::EventSetup const &c) override;
87  void accumulate(PileUpEventPrincipal const &e, edm::EventSetup const &c, edm::StreamID const &) override;
88  void finalizeEvent(edm::Event &e, edm::EventSetup const &c) override;
90  void beginRun(edm::Run const &run, edm::EventSetup const &setup) override;
91 
95 
96 private:
97  virtual void cacheEBDigis(const EBDigiCollection *ebDigiPtr) const {}
98  virtual void cacheEEDigis(const EEDigiCollection *eeDigiPtr) const {}
99 
101  void accumulateCaloHits(HitsHandle const &ebHandle,
102  HitsHandle const &eeHandle,
103  HitsHandle const &esHandle,
104  int bunchCrossing);
105 
106  void checkGeometry(const edm::EventSetup &eventSetup);
107 
108  void updateGeometry();
109 
110  void checkCalibrations(const edm::Event &event, const edm::EventSetup &eventSetup);
111 
115  ESShape m_ESShape; // no const because gain must be set
116 
121 
133 
135 
136  const bool m_apdSeparateDigi;
137 
138  const double m_EBs25notCont;
139  const double m_EEs25notCont;
140 
141  const unsigned int m_readoutFrameSize;
142 
143 protected:
144  std::unique_ptr<const EcalSimParameterMap> m_ParameterMap;
145 
146 private:
148  std::unique_ptr<const APDSimParameters> m_apdParameters;
149 
150  std::unique_ptr<EBHitResponse> m_APDResponse;
151 
152 protected:
153  std::unique_ptr<EBHitResponse> m_EBResponse;
154  std::unique_ptr<EEHitResponse> m_EEResponse;
155 
156 private:
157  std::unique_ptr<ESHitResponse> m_ESResponse;
158  std::unique_ptr<CaloHitResponse> m_ESOldResponse;
159 
160  const bool m_addESNoise;
161  const bool m_PreMix1;
162  const bool m_PreMix2;
163 
164  const bool m_doFastES;
165 
166  const bool m_doEB, m_doEE, m_doES;
167 
168  std::unique_ptr<ESElectronicsSim> m_ESElectronicsSim;
169  std::unique_ptr<ESOldDigitizer> m_ESOldDigitizer;
170  std::unique_ptr<ESElectronicsSimFast> m_ESElectronicsSimFast;
171  std::unique_ptr<ESDigitizer> m_ESDigitizer;
172 
173  std::unique_ptr<EBDigitizer> m_APDDigitizer;
174  std::unique_ptr<EBDigitizer> m_BarrelDigitizer;
175  std::unique_ptr<EEDigitizer> m_EndcapDigitizer;
176 
178 
180  std::unique_ptr<EcalElectronicsSim_Ph1> m_ElectronicsSim;
181  std::unique_ptr<EcalCoder> m_Coder;
182 
183  std::unique_ptr<EcalElectronicsSim_Ph1> m_APDElectronicsSim;
184  std::unique_ptr<EcalCoder> m_APDCoder;
185 
187 
188  std::array<std::unique_ptr<CorrelatedNoisifier<EcalCorrMatrix>>, 3> m_EBCorrNoise;
189  std::array<std::unique_ptr<CorrelatedNoisifier<EcalCorrMatrix>>, 3> m_EECorrNoise;
190 
191  CLHEP::HepRandomEngine *randomEngine_ = nullptr;
192 };
193 
194 #endif
CaloTDigitizer
Definition: CaloTDigitizer.h:42
EcalDigiProducer::accumulate
void accumulate(edm::Event const &e, edm::EventSetup const &c) override
Definition: EcalDigiProducer.cc:311
EcalDigiProducer::beginLuminosityBlock
void beginLuminosityBlock(edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) override
Definition: EcalDigiProducer.cc:411
EEHitResponse
Definition: EEHitResponse.h:7
EcalDigiProducer::m_EBs25notCont
const double m_EBs25notCont
Definition: EcalDigiProducer.h:138
edm::StreamID
Definition: StreamID.h:30
EcalIntercalibConstantsMC.h
EcalDigiProducer::m_esMIPsToken
edm::ESGetToken< ESIntercalibConstants, ESIntercalibConstantsRcd > m_esMIPsToken
Definition: EcalDigiProducer.h:131
EcalPedestals.h
EcalDigiProducer::m_Geometry
const CaloGeometry * m_Geometry
Definition: EcalDigiProducer.h:186
EcalDigiProducer::m_ElectronicsSim
std::unique_ptr< EcalElectronicsSim_Ph1 > m_ElectronicsSim
Definition: EcalDigiProducer.h:180
EcalTDigitizer.h
EcalDigiProducer::m_doEB
const bool m_doEB
Definition: EcalDigiProducer.h:166
edm::ESWatcher< CaloGeometryRecord >
EcalDigiProducer::m_agcToken
const edm::ESGetToken< EcalADCToGeVConstant, EcalADCToGeVConstantRcd > m_agcToken
Definition: EcalDigiProducer.h:125
EcalDigiProducer::m_APDElectronicsSim
std::unique_ptr< EcalElectronicsSim_Ph1 > m_APDElectronicsSim
Definition: EcalDigiProducer.h:183
EcalDigiProducer::m_doFastES
const bool m_doFastES
Definition: EcalDigiProducer.h:164
ESIntercalibConstants.h
ESElectronicsSim
Definition: ESElectronicsSim.h:16
EcalDigiProducer::m_EEShape
EEShape m_EEShape
Definition: EcalDigiProducer.h:114
edm::LuminosityBlock
Definition: LuminosityBlock.h:50
EBShape
Definition: EBShape.h:6
CalibrationSummaryClient_cfi.params
params
Definition: CalibrationSummaryClient_cfi.py:14
edm::Run
Definition: Run.h:45
Handle
edm
HLT enums.
Definition: AlignableModifier.h:19
EcalDigiProducer::m_EEResponse
std::unique_ptr< EEHitResponse > m_EEResponse
Definition: EcalDigiProducer.h:154
EcalDigiProducer::m_ESOldResponse
std::unique_ptr< CaloHitResponse > m_ESOldResponse
Definition: EcalDigiProducer.h:158
EcalDigiProducer::m_apdDigiTag
const std::string m_apdDigiTag
Definition: EcalDigiProducer.h:147
EcalDigiProducer::EcalSamples
CaloTSamples< float, 10 > EcalSamples
Definition: EcalDigiProducer.h:177
EcalDigiProducer::randomEngine_
CLHEP::HepRandomEngine * randomEngine_
Definition: EcalDigiProducer.h:191
PileUpEventPrincipal
Definition: PileUpEventPrincipal.h:19
EBHitResponse.h
EcalDigitizerTraits.h
ESGain.h
APDShape.h
ESShape.h
APDSimParameters
Definition: APDSimParameters.h:8
EcalDigiProducer::EcalDigiProducer
EcalDigiProducer(const edm::ParameterSet &params, edm::ProducesCollector, edm::ConsumesCollector &iC)
Definition: EcalDigiProducer.cc:37
EcalDigiProducer::~EcalDigiProducer
~EcalDigiProducer() override
Definition: EcalDigiProducer.cc:260
edm::Handle
Definition: AssociativeIterator.h:50
ESGainRcd.h
EcalDigiProducer::m_ESElectronicsSimFast
std::unique_ptr< ESElectronicsSimFast > m_ESElectronicsSimFast
Definition: EcalDigiProducer.h:170
EcalDigiProducer::m_doES
const bool m_doES
Definition: EcalDigiProducer.h:166
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
ProducesCollector.h
EcalDigiProducer::m_grToken
const edm::ESGetToken< EcalGainRatios, EcalGainRatiosRcd > m_grToken
Definition: EcalDigiProducer.h:126
EcalDigiProducer::m_useLCcorrection
bool m_useLCcorrection
Definition: EcalDigiProducer.h:134
EcalDigiProducer::m_ESOldDigitizer
std::unique_ptr< ESOldDigitizer > m_ESOldDigitizer
Definition: EcalDigiProducer.h:169
EcalDigiProducer::m_ESElectronicsSim
std::unique_ptr< ESElectronicsSim > m_ESElectronicsSim
Definition: EcalDigiProducer.h:168
CorrelatedNoisifier.h
EBShape.h
EEShape.h
CaloGeometry
Definition: CaloGeometry.h:21
ESPedestals.h
EcalSimParameterMap
Definition: EcalSimParameterMap.h:11
EcalDigiProducer::m_esPedestalsToken
edm::ESGetToken< ESPedestals, ESPedestalsRcd > m_esPedestalsToken
Definition: EcalDigiProducer.h:130
EcalDigiProducer::m_EBdigiCollection
const std::string m_EBdigiCollection
Definition: EcalDigiProducer.h:117
EcalDigiProducer::beginRun
void beginRun(edm::Run const &run, edm::EventSetup const &setup) override
Definition: EcalDigiProducer.cc:576
EcalIntercalibConstantsMCRcd.h
CaloTSamples
Definition: CaloTSamples.h:14
EcalBaseSignalGenerator
Definition: EcalBaseSignalGenerator.h:7
EcalDigiProducer::m_apdSeparateDigi
const bool m_apdSeparateDigi
Definition: EcalDigiProducer.h:136
DigiAccumulatorMixMod.h
EcalDigiProducer::finalizeEvent
void finalizeEvent(edm::Event &e, edm::EventSetup const &c) override
Definition: EcalDigiProducer.cc:364
EcalLaserDbService.h
EcalDigiProducer::m_apdParameters
std::unique_ptr< const APDSimParameters > m_apdParameters
Definition: EcalDigiProducer.h:148
ESMIPToGeVConstantRcd.h
EcalDigiProducer::m_ESDigitizer
std::unique_ptr< ESDigitizer > m_ESDigitizer
Definition: EcalDigiProducer.h:171
Event
DigiAccumulatorMixMod
Definition: DigiAccumulatorMixMod.h:41
EEShape
Definition: EEShape.h:6
EcalDigiProducer::m_APDDigitizer
std::unique_ptr< EBDigitizer > m_APDDigitizer
Definition: EcalDigiProducer.h:173
EcalDigiProducer::m_EBResponse
std::unique_ptr< EBHitResponse > m_EBResponse
Definition: EcalDigiProducer.h:153
CaloGeometryRecord.h
ESDigiCollection
Definition: EcalDigiCollections.h:82
EcalDigiProducer::m_pedestalsToken
const edm::ESGetToken< EcalPedestals, EcalPedestalsRcd > m_pedestalsToken
Definition: EcalDigiProducer.h:122
CLHEP
Definition: CocoaGlobals.h:27
CaloTSamples.h
EcalADCToGeVConstant.h
EcalDigiProducer::m_EEs25notCont
const double m_EEs25notCont
Definition: EcalDigiProducer.h:139
ESIntercalibConstantsRcd.h
Error.h
EcalDigiProducer::m_laserToken
const edm::ESGetToken< EcalLaserDbService, EcalLaserDbRecord > m_laserToken
Definition: EcalDigiProducer.h:124
EcalDigiProducer::m_ParameterMap
std::unique_ptr< const EcalSimParameterMap > m_ParameterMap
Definition: EcalDigiProducer.h:144
EcalDigiProducer::cacheEEDigis
virtual void cacheEEDigis(const EEDigiCollection *eeDigiPtr) const
Definition: EcalDigiProducer.h:98
edm::ParameterSet
Definition: ParameterSet.h:47
EcalDigiProducer::m_APDCoder
std::unique_ptr< EcalCoder > m_APDCoder
Definition: EcalDigiProducer.h:184
ParameterSet
Definition: Functions.h:16
EcalElectronicsSim
Definition: EcalElectronicsSim.h:20
EBDigiCollection
Definition: EcalDigiCollections.h:56
EcalDigiProducer::m_icalToken
const edm::ESGetToken< EcalIntercalibConstantsMC, EcalIntercalibConstantsMCRcd > m_icalToken
Definition: EcalDigiProducer.h:123
APDShape
Definition: APDShape.h:6
EcalDigiProducer::m_geometryWatcher
edm::ESWatcher< CaloGeometryRecord > m_geometryWatcher
Definition: EcalDigiProducer.h:132
EEDigiCollection
Definition: EcalDigiCollections.h:69
EEDigitizer
EcalTDigitizer< EEDigitizerTraits > EEDigitizer
Definition: EcalDigiProducer.h:45
ESOldDigitizer
CaloTDigitizer< ESOldDigitizerTraits > ESOldDigitizer
Definition: EcalDigiProducer.h:46
EcalADCToGeVConstantRcd.h
CaloHitResponse
Creates electronics signals from hits.
Definition: CaloHitResponse.h:33
EcalDigiProducer::m_esMIPToGeVToken
edm::ESGetToken< ESMIPToGeVConstant, ESMIPToGeVConstantRcd > m_esMIPToGeVToken
Definition: EcalDigiProducer.h:129
EcalDigiProducer::m_esGainToken
edm::ESGetToken< ESGain, ESGainRcd > m_esGainToken
Definition: EcalDigiProducer.h:128
EcalDigiProducer::m_geometryToken
const edm::ESGetToken< CaloGeometry, CaloGeometryRecord > m_geometryToken
Definition: EcalDigiProducer.h:127
edm::EventSetup
Definition: EventSetup.h:58
EcalGainRatiosRcd.h
CaloTDigitizer.h
ESElectronicsSimFast
Definition: ESElectronicsSimFast.h:16
edm::ESGetToken
Definition: EventSetup.h:48
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EcalGainRatios.h
EcalDigiProducer::initializeEvent
void initializeEvent(edm::Event const &e, edm::EventSetup const &c) override
Definition: EcalDigiProducer.cc:262
EcalTDigitizer
Definition: EcalTDigitizer.h:23
EcalDigiProducer::cacheEBDigis
virtual void cacheEBDigis(const EBDigiCollection *ebDigiPtr) const
Definition: EcalDigiProducer.h:97
EcalDigiProducer::m_ESShape
ESShape m_ESShape
Definition: EcalDigiProducer.h:115
EcalDigiProducer::m_doEE
const bool m_doEE
Definition: EcalDigiProducer.h:166
EcalDigiProducer::m_readoutFrameSize
const unsigned int m_readoutFrameSize
Definition: EcalDigiProducer.h:141
EcalDigiProducer::m_APDResponse
std::unique_ptr< EBHitResponse > m_APDResponse
Definition: EcalDigiProducer.h:150
EcalDigiProducer::EcalElectronicsSim_Ph1
EcalElectronicsSim< EcalCoder, EcalSamples, EcalDataFrame > EcalElectronicsSim_Ph1
Definition: EcalDigiProducer.h:179
EcalLaserDbRecord.h
EcalDigiProducer::updateGeometry
void updateGeometry()
Definition: EcalDigiProducer.cc:530
EcalDigiProducer::m_hitsProducerTag
const std::string m_hitsProducerTag
Definition: EcalDigiProducer.h:120
EcalDigiProducer
Definition: EcalDigiProducer.h:79
writedatasetfile.run
run
Definition: writedatasetfile.py:27
EcalDigiProducer::m_EEdigiCollection
const std::string m_EEdigiCollection
Definition: EcalDigiProducer.h:118
edm::ProducesCollector
Definition: ProducesCollector.h:43
EcalDigiProducer::accumulateCaloHits
void accumulateCaloHits(HitsHandle const &ebHandle, HitsHandle const &eeHandle, HitsHandle const &esHandle, int bunchCrossing)
Definition: EcalDigiProducer.cc:286
EcalDigiProducer::setESNoiseSignalGenerator
void setESNoiseSignalGenerator(EcalBaseSignalGenerator *noiseGenerator)
Definition: EcalDigiProducer.cc:570
EcalDigiProducer::m_EndcapDigitizer
std::unique_ptr< EEDigitizer > m_EndcapDigitizer
Definition: EcalDigiProducer.h:175
EcalDigiProducer::m_ESdigiCollection
const std::string m_ESdigiCollection
Definition: EcalDigiProducer.h:119
ESWatcher.h
ESDigitizer
Definition: ESDigitizer.h:14
EcalCoder
Definition: EcalCoder.h:27
ESMIPToGeVConstant.h
EcalElectronicsSim.h
EcalDigiProducer::m_Coder
std::unique_ptr< EcalCoder > m_Coder
Definition: EcalDigiProducer.h:181
EcalDigiProducer::m_PreMix1
const bool m_PreMix1
Definition: EcalDigiProducer.h:161
EBDigitizer
EcalTDigitizer< EBDigitizerTraits > EBDigitizer
Definition: EcalDigiProducer.h:44
EcalPedestalsRcd.h
ESHitResponse
Definition: ESHitResponse.h:7
EcalDigiProducer::m_PreMix2
const bool m_PreMix2
Definition: EcalDigiProducer.h:162
EventSetup
EcalDigiProducer::setEENoiseSignalGenerator
void setEENoiseSignalGenerator(EcalBaseSignalGenerator *noiseGenerator)
Definition: EcalDigiProducer.cc:564
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:56
event
Definition: event.py:1
edm::Event
Definition: Event.h:73
ESShape
Definition: ESShape.h:16
lumi
Definition: LumiSectionData.h:20
EcalDigiProducer::HitsHandle
edm::Handle< std::vector< PCaloHit > > HitsHandle
Definition: EcalDigiProducer.h:100
EcalDigiProducer::checkCalibrations
void checkCalibrations(const edm::Event &event, const edm::EventSetup &eventSetup)
Definition: EcalDigiProducer.cc:427
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
EcalCorrelatedNoiseMatrix.h
EcalDigiProducer::m_EBCorrNoise
std::array< std::unique_ptr< CorrelatedNoisifier< EcalCorrMatrix > >, 3 > m_EBCorrNoise
Definition: EcalDigiProducer.h:188
EcalDigiProducer::m_ESResponse
std::unique_ptr< ESHitResponse > m_ESResponse
Definition: EcalDigiProducer.h:157
ESPedestalsRcd.h
EcalDigiProducer::m_BarrelDigitizer
std::unique_ptr< EBDigitizer > m_BarrelDigitizer
Definition: EcalDigiProducer.h:174
EcalDigiProducer::setEBNoiseSignalGenerator
void setEBNoiseSignalGenerator(EcalBaseSignalGenerator *noiseGenerator)
Definition: EcalDigiProducer.cc:558
EcalDigiProducer::checkGeometry
void checkGeometry(const edm::EventSetup &eventSetup)
Definition: EcalDigiProducer.cc:523
EcalDigiProducer::m_APDShape
APDShape m_APDShape
Definition: EcalDigiProducer.h:112
EcalDigiProducer::m_EBShape
EBShape m_EBShape
Definition: EcalDigiProducer.h:113
EcalDigiProducer::m_addESNoise
const bool m_addESNoise
Definition: EcalDigiProducer.h:160
EcalDigiProducer::m_EECorrNoise
std::array< std::unique_ptr< CorrelatedNoisifier< EcalCorrMatrix > >, 3 > m_EECorrNoise
Definition: EcalDigiProducer.h:189
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
ESElectronicsSim.h