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 
43 #include <vector>
44 
48 
49 class ESDigitizer;
50 
51 class APDSimParameters;
52 class EEHitResponse;
53 class ESHitResponse;
54 class CaloHitResponse;
56 class EcalCoder;
57 class ESElectronicsSim;
60 class CaloGeometry;
61 class EBDigiCollection;
62 class EEDigiCollection;
63 class ESDigiCollection;
65 
66 namespace edm {
67  class ConsumesCollector;
68  class Event;
69  class EventSetup;
70  template <typename T>
71  class Handle;
72  class ParameterSet;
73  class StreamID;
74 } // namespace edm
75 
76 namespace CLHEP {
77  class HepRandomEngine;
78 }
79 
81 public:
84  ~EcalDigiProducer() override;
85 
86  void initializeEvent(edm::Event const &e, edm::EventSetup const &c) override;
87  void accumulate(edm::Event const &e, edm::EventSetup const &c) override;
88  void accumulate(PileUpEventPrincipal const &e, edm::EventSetup const &c, edm::StreamID const &) override;
89  void finalizeEvent(edm::Event &e, edm::EventSetup const &c) 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 
107 
108  void updateGeometry();
109 
111 
115  ESShape m_ESShape; // no const because gain must be set
116 
121 
125 
137 
139 
140  const bool m_apdSeparateDigi;
141 
142  const double m_EBs25notCont;
143  const double m_EEs25notCont;
144 
145  const unsigned int m_readoutFrameSize;
146 
147 protected:
148  std::unique_ptr<const EcalSimParameterMap> m_ParameterMap;
149 
150 private:
152  std::unique_ptr<const APDSimParameters> m_apdParameters;
153 
154  std::unique_ptr<EBHitResponse> m_APDResponse;
155 
156 protected:
157  std::unique_ptr<EBHitResponse> m_EBResponse;
158  std::unique_ptr<EEHitResponse> m_EEResponse;
159 
160 private:
161  std::unique_ptr<ESHitResponse> m_ESResponse;
162  std::unique_ptr<CaloHitResponse> m_ESOldResponse;
163 
164  const bool m_addESNoise;
165  const bool m_PreMix1;
166  const bool m_PreMix2;
167 
168  const bool m_doFastES;
169 
170  const bool m_doEB, m_doEE, m_doES;
171 
172  std::unique_ptr<ESElectronicsSim> m_ESElectronicsSim;
173  std::unique_ptr<ESOldDigitizer> m_ESOldDigitizer;
174  std::unique_ptr<ESElectronicsSimFast> m_ESElectronicsSimFast;
175  std::unique_ptr<ESDigitizer> m_ESDigitizer;
176 
177  std::unique_ptr<EBDigitizer> m_APDDigitizer;
178  std::unique_ptr<EBDigitizer> m_BarrelDigitizer;
179  std::unique_ptr<EEDigitizer> m_EndcapDigitizer;
180 
182 
184  std::unique_ptr<EcalElectronicsSim_Ph1> m_ElectronicsSim;
185  std::unique_ptr<EcalCoder> m_Coder;
186 
187  std::unique_ptr<EcalElectronicsSim_Ph1> m_APDElectronicsSim;
188  std::unique_ptr<EcalCoder> m_APDCoder;
189 
191 
192  std::array<std::unique_ptr<CorrelatedNoisifier<EcalCorrMatrix>>, 3> m_EBCorrNoise;
193  std::array<std::unique_ptr<CorrelatedNoisifier<EcalCorrMatrix>>, 3> m_EECorrNoise;
194 
195  CLHEP::HepRandomEngine *randomEngine_ = nullptr;
196 };
197 
198 #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
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
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< EcalElectronicsSim_Ph1 > m_ElectronicsSim
std::unique_ptr< CaloHitResponse > m_ESOldResponse
std::array< std::unique_ptr< CorrelatedNoisifier< EcalCorrMatrix > >, 3 > m_EBCorrNoise
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
const bool m_apdSeparateDigi
std::unique_ptr< ESElectronicsSim > m_ESElectronicsSim
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