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 
36 
41 
44 #include <vector>
45 
49 
50 class ESDigitizer;
51 
52 class APDSimParameters;
54 class EEHitResponse;
55 class ESHitResponse;
56 class CaloHitResponse;
58 class EcalCoder;
59 class ESElectronicsSim;
62 class CaloGeometry;
63 class EBDigiCollection;
64 class EEDigiCollection;
65 class ESDigiCollection;
67 
68 namespace edm {
69  class ConsumesCollector;
70  class Event;
71  class EventSetup;
72  template <typename T>
73  class Handle;
74  class ParameterSet;
75  class StreamID;
76 } // namespace edm
77 
78 namespace CLHEP {
79  class HepRandomEngine;
80 }
81 
83 public:
86  ~EcalDigiProducer() override;
87 
88  void initializeEvent(edm::Event const &e, edm::EventSetup const &c) override;
89  void accumulate(edm::Event const &e, edm::EventSetup const &c) override;
90  void accumulate(PileUpEventPrincipal const &e, edm::EventSetup const &c, edm::StreamID const &) override;
91  void finalizeEvent(edm::Event &e, edm::EventSetup const &c) override;
93 
97 
98 private:
99  virtual void cacheEBDigis(const EBDigiCollection *ebDigiPtr) const {}
100  virtual void cacheEEDigis(const EEDigiCollection *eeDigiPtr) const {}
101 
103  void accumulateCaloHits(HitsHandle const &ebHandle,
104  HitsHandle const &eeHandle,
105  HitsHandle const &esHandle,
106  int bunchCrossing);
107 
109 
110  void updateGeometry();
111 
113 
118  ESShape m_ESShape; // no const because gain must be set
119 
124 
128 
140 
142 
143  const bool m_apdSeparateDigi;
145 
146  const double m_EBs25notCont;
147  const double m_EEs25notCont;
148 
149  const unsigned int m_readoutFrameSize;
150 
151 protected:
152  std::unique_ptr<const EcalSimParameterMap> m_ParameterMap;
153 
154 private:
156  std::unique_ptr<const APDSimParameters> m_apdParameters;
157 
159  std::unique_ptr<const ComponentSimParameterMap> m_componentParameters;
160 
161  std::unique_ptr<EBHitResponse> m_APDResponse;
162 
163  std::unique_ptr<EBHitResponse> m_ComponentResponse;
164 
165 protected:
166  std::unique_ptr<EBHitResponse> m_EBResponse;
167  std::unique_ptr<EEHitResponse> m_EEResponse;
168 
169 private:
170  std::unique_ptr<ESHitResponse> m_ESResponse;
171  std::unique_ptr<CaloHitResponse> m_ESOldResponse;
172 
173  const bool m_addESNoise;
174  const bool m_PreMix1;
175  const bool m_PreMix2;
176 
177  const bool m_doFastES;
178 
179  const bool m_doEB, m_doEE, m_doES;
180 
181  std::unique_ptr<ESElectronicsSim> m_ESElectronicsSim;
182  std::unique_ptr<ESOldDigitizer> m_ESOldDigitizer;
183  std::unique_ptr<ESElectronicsSimFast> m_ESElectronicsSimFast;
184  std::unique_ptr<ESDigitizer> m_ESDigitizer;
185 
186  std::unique_ptr<EBDigitizer> m_APDDigitizer;
187  std::unique_ptr<EBDigitizer> m_ComponentDigitizer;
188  std::unique_ptr<EBDigitizer> m_BarrelDigitizer;
189  std::unique_ptr<EEDigitizer> m_EndcapDigitizer;
190 
192 
194  std::unique_ptr<EcalElectronicsSim_Ph1> m_ElectronicsSim;
195  std::unique_ptr<EcalCoder> m_Coder;
196 
197  std::unique_ptr<EcalElectronicsSim_Ph1> m_APDElectronicsSim;
198  std::unique_ptr<EcalCoder> m_APDCoder;
199  std::unique_ptr<EcalElectronicsSim_Ph1> m_ComponentElectronicsSim;
200  std::unique_ptr<EcalCoder> m_ComponentCoder;
201 
203 
204  std::array<std::unique_ptr<CorrelatedNoisifier<EcalCorrMatrix>>, 3> m_EBCorrNoise;
205  std::array<std::unique_ptr<CorrelatedNoisifier<EcalCorrMatrix>>, 3> m_EECorrNoise;
206 
207  CLHEP::HepRandomEngine *randomEngine_ = nullptr;
208 };
209 
210 #endif
std::unique_ptr< EcalCoder > m_APDCoder
edm::ESWatcher< CaloGeometryRecord > m_geometryWatcher
const edm::EDGetTokenT< std::vector< PCaloHit > > m_HitsEEToken_
CaloTDigitizer< ESOldDigitizerTraits > ESOldDigitizer
EcalTDigitizer< EEDigitizerTraits > EEDigitizer
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
EcalElectronicsSim< EcalCoder, EcalSamples, EcalDataFrame > EcalElectronicsSim_Ph1
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
virtual void cacheEBDigis(const EBDigiCollection *ebDigiPtr) const
edm::ESGetToken< ESGain, ESGainRcd > m_esGainToken
edm::Handle< std::vector< PCaloHit > > HitsHandle
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
void setEENoiseSignalGenerator(EcalBaseSignalGenerator *noiseGenerator)
const bool m_addESNoise
void initializeEvent(edm::Event const &e, edm::EventSetup const &c) override
const unsigned int m_readoutFrameSize
std::unique_ptr< EBHitResponse > m_ComponentResponse
void setEBNoiseSignalGenerator(EcalBaseSignalGenerator *noiseGenerator)
void setESNoiseSignalGenerator(EcalBaseSignalGenerator *noiseGenerator)
void accumulateCaloHits(HitsHandle const &ebHandle, HitsHandle const &eeHandle, HitsHandle const &esHandle, int bunchCrossing)
std::array< std::unique_ptr< CorrelatedNoisifier< EcalCorrMatrix > >, 3 > m_EECorrNoise
std::unique_ptr< EcalElectronicsSim_Ph1 > m_APDElectronicsSim
void accumulate(edm::Event const &e, edm::EventSetup const &c) override
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
void beginLuminosityBlock(edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) override
const CaloGeometry * m_Geometry
void checkCalibrations(const edm::Event &event, const edm::EventSetup &eventSetup)
void checkGeometry(const edm::EventSetup &eventSetup)
std::unique_ptr< EBDigitizer > m_BarrelDigitizer
Definition: EBShape.h:7
std::unique_ptr< ESElectronicsSimFast > m_ESElectronicsSimFast
const edm::ESGetToken< EcalADCToGeVConstant, EcalADCToGeVConstantRcd > m_agcToken
CLHEP::HepRandomEngine * randomEngine_
std::unique_ptr< EEHitResponse > m_EEResponse
EcalTDigitizer< EBDigitizerTraits > EBDigitizer
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
const bool m_componentSeparateDigi
HLT enums.
const std::string m_apdDigiTag
CaloTSamples< float, 10 > EcalSamples
const edm::ESGetToken< EcalPedestals, EcalPedestalsRcd > m_pedestalsToken
std::unique_ptr< EBHitResponse > m_EBResponse
std::unique_ptr< ESOldDigitizer > m_ESOldDigitizer
virtual void cacheEEDigis(const EEDigiCollection *eeDigiPtr) const
~EcalDigiProducer() override
EcalDigiProducer(const edm::ParameterSet &params, edm::ProducesCollector, edm::ConsumesCollector &iC)
const std::string m_EBdigiCollection
std::unique_ptr< EBDigitizer > m_APDDigitizer
void finalizeEvent(edm::Event &e, edm::EventSetup const &c) override
const edm::ESGetToken< EcalGainRatios, EcalGainRatiosRcd > m_grToken
const double m_EEs25notCont
Definition: event.py:1
Definition: EEShape.h:7
std::unique_ptr< const EcalSimParameterMap > m_ParameterMap
std::unique_ptr< const APDSimParameters > m_apdParameters