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 
12 
17 
18 #include <vector>
19 
23 
24 class ESDigitizer;
25 
26 class APDSimParameters;
27 class EBHitResponse;
28 class EEHitResponse;
29 class ESHitResponse;
30 class CaloHitResponse;
32 class EcalCoder;
33 class EcalElectronicsSim;
34 class ESElectronicsSim;
37 class CaloGeometry;
38 class EBDigiCollection;
39 class EEDigiCollection;
40 class ESDigiCollection;
42 
43 namespace edm {
44  class ConsumesCollector;
45  class ProducerBase;
46  class Event;
47  class EventSetup;
48  template <typename T>
49  class Handle;
50  class ParameterSet;
51  class StreamID;
52 } // namespace edm
53 
54 namespace CLHEP {
55  class HepRandomEngine;
56 }
57 
59 public:
62  ~EcalDigiProducer() override;
63 
64  void initializeEvent(edm::Event const &e, edm::EventSetup const &c) override;
65  void accumulate(edm::Event const &e, edm::EventSetup const &c) override;
66  void accumulate(PileUpEventPrincipal const &e, edm::EventSetup const &c, edm::StreamID const &) override;
67  void finalizeEvent(edm::Event &e, edm::EventSetup const &c) override;
68  void beginLuminosityBlock(edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) override;
69  void beginRun(edm::Run const &run, edm::EventSetup const &setup) override;
70 
71  void setEBNoiseSignalGenerator(EcalBaseSignalGenerator *noiseGenerator);
72  void setEENoiseSignalGenerator(EcalBaseSignalGenerator *noiseGenerator);
73  void setESNoiseSignalGenerator(EcalBaseSignalGenerator *noiseGenerator);
74 
75 private:
76  virtual void cacheEBDigis(const EBDigiCollection *ebDigiPtr) const {}
77  virtual void cacheEEDigis(const EEDigiCollection *eeDigiPtr) const {}
78 
80  void accumulateCaloHits(HitsHandle const &ebHandle,
81  HitsHandle const &eeHandle,
82  HitsHandle const &esHandle,
83  int bunchCrossing);
84 
85  void checkGeometry(const edm::EventSetup &eventSetup);
86 
87  void updateGeometry();
88 
89  void checkCalibrations(const edm::Event &event, const edm::EventSetup &eventSetup);
90 
94  ESShape m_ESShape; // no const because gain must be set
95 
100 
102 
103  const bool m_apdSeparateDigi;
104 
105  const double m_EBs25notCont;
106  const double m_EEs25notCont;
107 
108  const unsigned int m_readoutFrameSize;
109 
110 protected:
111  std::unique_ptr<const EcalSimParameterMap> m_ParameterMap;
112 
113 private:
115  std::unique_ptr<const APDSimParameters> m_apdParameters;
116 
117  std::unique_ptr<EBHitResponse> m_APDResponse;
118 
119 protected:
120  std::unique_ptr<EBHitResponse> m_EBResponse;
121  std::unique_ptr<EEHitResponse> m_EEResponse;
122 
123 private:
124  std::unique_ptr<ESHitResponse> m_ESResponse;
125  std::unique_ptr<CaloHitResponse> m_ESOldResponse;
126 
127  const bool m_addESNoise;
128  const bool m_PreMix1;
129  const bool m_PreMix2;
130 
131  const bool m_doFastES;
132 
133  const bool m_doEB, m_doEE, m_doES;
134 
135  std::unique_ptr<ESElectronicsSim> m_ESElectronicsSim;
136  std::unique_ptr<ESOldDigitizer> m_ESOldDigitizer;
137  std::unique_ptr<ESElectronicsSimFast> m_ESElectronicsSimFast;
138  std::unique_ptr<ESDigitizer> m_ESDigitizer;
139 
140  std::unique_ptr<EBDigitizer> m_APDDigitizer;
141  std::unique_ptr<EBDigitizer> m_BarrelDigitizer;
142  std::unique_ptr<EEDigitizer> m_EndcapDigitizer;
143 
144  std::unique_ptr<EcalElectronicsSim> m_ElectronicsSim;
145  std::unique_ptr<EcalCoder> m_Coder;
146 
147  std::unique_ptr<EcalElectronicsSim> m_APDElectronicsSim;
148  std::unique_ptr<EcalCoder> m_APDCoder;
149 
151 
152  std::array<std::unique_ptr<CorrelatedNoisifier<EcalCorrMatrix>>, 3> m_EBCorrNoise;
153  std::array<std::unique_ptr<CorrelatedNoisifier<EcalCorrMatrix>>, 3> m_EECorrNoise;
154 
155  CLHEP::HepRandomEngine *randomEngine_ = nullptr;
156 };
157 
158 #endif
std::unique_ptr< EcalCoder > m_APDCoder
std::unique_ptr< EcalElectronicsSim > m_ElectronicsSim
CaloTDigitizer< ESOldDigitizerTraits > ESOldDigitizer
EcalTDigitizer< EEDigitizerTraits > EEDigitizer
std::unique_ptr< ESDigitizer > m_ESDigitizer
const std::string m_ESdigiCollection
std::unique_ptr< EEDigitizer > m_EndcapDigitizer
std::unique_ptr< EBHitResponse > m_APDResponse
const std::string m_hitsProducerTag
std::unique_ptr< EcalCoder > m_Coder
def setup(process, global_tag, zero_tesla=False)
Definition: GeneralSetup.py:2
edm::Handle< std::vector< PCaloHit > > HitsHandle
const std::string m_EEdigiCollection
std::unique_ptr< ESHitResponse > m_ESResponse
const bool m_addESNoise
const unsigned int m_readoutFrameSize
std::array< std::unique_ptr< CorrelatedNoisifier< EcalCorrMatrix > >, 3 > m_EECorrNoise
Creates electronics signals from hits.
const double m_EBs25notCont
std::unique_ptr< CaloHitResponse > m_ESOldResponse
std::array< std::unique_ptr< CorrelatedNoisifier< EcalCorrMatrix > >, 3 > m_EBCorrNoise
const CaloGeometry * m_Geometry
std::unique_ptr< EBDigitizer > m_BarrelDigitizer
Definition: EBShape.h:6
std::unique_ptr< ESElectronicsSimFast > m_ESElectronicsSimFast
virtual void cacheEBDigis(const EBDigiCollection *ebDigiPtr) const
std::unique_ptr< EEHitResponse > m_EEResponse
EcalTDigitizer< EBDigitizerTraits > EBDigitizer
const bool m_apdSeparateDigi
std::unique_ptr< ESElectronicsSim > m_ESElectronicsSim
HLT enums.
const std::string m_apdDigiTag
std::unique_ptr< EBHitResponse > m_EBResponse
std::unique_ptr< ESOldDigitizer > m_ESOldDigitizer
std::unique_ptr< EcalElectronicsSim > m_APDElectronicsSim
bool checkGeometry(bool=true)
virtual void cacheEEDigis(const EEDigiCollection *eeDigiPtr) const
const std::string m_EBdigiCollection
std::unique_ptr< EBDigitizer > m_APDDigitizer
const double m_EEs25notCont
Definition: event.py:1
Definition: Run.h:45
Definition: EEShape.h:6
std::unique_ptr< const EcalSimParameterMap > m_ParameterMap
std::unique_ptr< const APDSimParameters > m_apdParameters