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