CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
94 
95 private:
96  virtual void cacheEBDigis(const EBDigiCollection *ebDigiPtr) const {}
97  virtual void cacheEEDigis(const EEDigiCollection *eeDigiPtr) const {}
98 
100  void accumulateCaloHits(HitsHandle const &ebHandle,
101  HitsHandle const &eeHandle,
102  HitsHandle const &esHandle,
103  int bunchCrossing);
104 
105  void checkGeometry(const edm::EventSetup &eventSetup);
106 
107  void updateGeometry();
108 
109  void checkCalibrations(const edm::Event &event, const edm::EventSetup &eventSetup);
110 
114  ESShape m_ESShape; // no const because gain must be set
115 
120 
132 
134 
135  const bool m_apdSeparateDigi;
136 
137  const double m_EBs25notCont;
138  const double m_EEs25notCont;
139 
140  const unsigned int m_readoutFrameSize;
141 
142 protected:
143  std::unique_ptr<const EcalSimParameterMap> m_ParameterMap;
144 
145 private:
147  std::unique_ptr<const APDSimParameters> m_apdParameters;
148 
149  std::unique_ptr<EBHitResponse> m_APDResponse;
150 
151 protected:
152  std::unique_ptr<EBHitResponse> m_EBResponse;
153  std::unique_ptr<EEHitResponse> m_EEResponse;
154 
155 private:
156  std::unique_ptr<ESHitResponse> m_ESResponse;
157  std::unique_ptr<CaloHitResponse> m_ESOldResponse;
158 
159  const bool m_addESNoise;
160  const bool m_PreMix1;
161  const bool m_PreMix2;
162 
163  const bool m_doFastES;
164 
165  const bool m_doEB, m_doEE, m_doES;
166 
167  std::unique_ptr<ESElectronicsSim> m_ESElectronicsSim;
168  std::unique_ptr<ESOldDigitizer> m_ESOldDigitizer;
169  std::unique_ptr<ESElectronicsSimFast> m_ESElectronicsSimFast;
170  std::unique_ptr<ESDigitizer> m_ESDigitizer;
171 
172  std::unique_ptr<EBDigitizer> m_APDDigitizer;
173  std::unique_ptr<EBDigitizer> m_BarrelDigitizer;
174  std::unique_ptr<EEDigitizer> m_EndcapDigitizer;
175 
177 
179  std::unique_ptr<EcalElectronicsSim_Ph1> m_ElectronicsSim;
180  std::unique_ptr<EcalCoder> m_Coder;
181 
182  std::unique_ptr<EcalElectronicsSim_Ph1> m_APDElectronicsSim;
183  std::unique_ptr<EcalCoder> m_APDCoder;
184 
186 
187  std::array<std::unique_ptr<CorrelatedNoisifier<EcalCorrMatrix>>, 3> m_EBCorrNoise;
188  std::array<std::unique_ptr<CorrelatedNoisifier<EcalCorrMatrix>>, 3> m_EECorrNoise;
189 
190  CLHEP::HepRandomEngine *randomEngine_ = nullptr;
191 };
192 
193 #endif
std::unique_ptr< EcalCoder > m_APDCoder
edm::ESWatcher< CaloGeometryRecord > m_geometryWatcher
CaloTDigitizer< ESOldDigitizerTraits > ESOldDigitizer
const edm::EventSetup & c
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
std::unique_ptr< EcalCoder > m_Coder
edm::ESGetToken< ESGain, ESGainRcd > m_esGainToken
edm::Handle< std::vector< PCaloHit > > HitsHandle
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
list lumi
Definition: dqmdumpme.py:53
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_
virtual void cacheEBDigis(const EBDigiCollection *ebDigiPtr) const
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
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
~EcalDigiProducer() override
EcalDigiProducer(const edm::ParameterSet &params, edm::ProducesCollector, edm::ConsumesCollector &iC)
virtual void cacheEEDigis(const EEDigiCollection *eeDigiPtr) const
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: EEShape.h:7
std::unique_ptr< const EcalSimParameterMap > m_ParameterMap
std::unique_ptr< const APDSimParameters > m_apdParameters