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  namespace stream {
47  class EDProducerBase;
48  }
49  class Event;
50  class EventSetup;
51  template<typename T> class Handle;
52  class ParameterSet;
53  class StreamID;
54 }
55 
56 namespace CLHEP {
57  class HepRandomEngine;
58 }
59 
61  public:
62 
65  ~EcalDigiProducer() override;
66 
67  void initializeEvent(edm::Event const& e, edm::EventSetup const& c) override;
68  void accumulate(edm::Event const& e, edm::EventSetup const& c) override;
69  void accumulate(PileUpEventPrincipal const& e, edm::EventSetup const& c, edm::StreamID const&) override;
70  void finalizeEvent(edm::Event& e, edm::EventSetup const& c) override;
71  void beginLuminosityBlock(edm::LuminosityBlock const& lumi, edm::EventSetup const& setup) override;
72 
73  void setEBNoiseSignalGenerator(EcalBaseSignalGenerator * noiseGenerator);
74  void setEENoiseSignalGenerator(EcalBaseSignalGenerator * noiseGenerator);
75  void setESNoiseSignalGenerator(EcalBaseSignalGenerator * noiseGenerator);
76 
77  private:
78 
79  virtual void cacheEBDigis( const EBDigiCollection* ebDigiPtr ) const { }
80  virtual void cacheEEDigis( const EEDigiCollection* eeDigiPtr ) const { }
81 
83  void accumulateCaloHits(HitsHandle const& ebHandle, HitsHandle const& eeHandle, HitsHandle const& esHandle, int bunchCrossing, CLHEP::HepRandomEngine*);
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 
91  CLHEP::HepRandomEngine* randomEngine(edm::StreamID const& streamID);
92 
96  ESShape m_ESShape ; // no const because gain must be set
97 
102 
104 
105  const bool m_apdSeparateDigi ;
106 
107  const double m_EBs25notCont ;
108  const double m_EEs25notCont ;
109 
110  const unsigned int m_readoutFrameSize ;
111  protected:
112  std::unique_ptr<const EcalSimParameterMap> m_ParameterMap ;
113  private:
115  std::unique_ptr<const APDSimParameters> m_apdParameters ;
116 
117  std::unique_ptr<EBHitResponse> m_APDResponse ;
118  protected:
119  std::unique_ptr<EBHitResponse> m_EBResponse ;
120  std::unique_ptr<EEHitResponse> m_EEResponse ;
121  private:
122  std::unique_ptr<ESHitResponse> m_ESResponse ;
123  std::unique_ptr<CaloHitResponse> m_ESOldResponse ;
124 
125  const bool m_addESNoise ;
126  const bool m_PreMix1 ;
127  const bool m_PreMix2 ;
128 
129  const bool m_doFastES ;
130 
131  const bool m_doEB, m_doEE, m_doES;
132 
133  std::unique_ptr<ESElectronicsSim> m_ESElectronicsSim ;
134  std::unique_ptr<ESOldDigitizer> m_ESOldDigitizer ;
135  std::unique_ptr<ESElectronicsSimFast> m_ESElectronicsSimFast ;
136  std::unique_ptr<ESDigitizer> m_ESDigitizer ;
137 
138  std::unique_ptr<EBDigitizer> m_APDDigitizer ;
139  std::unique_ptr<EBDigitizer> m_BarrelDigitizer ;
140  std::unique_ptr<EEDigitizer> m_EndcapDigitizer ;
141 
142  std::unique_ptr<EcalElectronicsSim> m_ElectronicsSim ;
143  std::unique_ptr<EcalCoder> m_Coder ;
144 
145  std::unique_ptr<EcalElectronicsSim> m_APDElectronicsSim ;
146  std::unique_ptr<EcalCoder> m_APDCoder ;
147 
149 
150  std::array< std::unique_ptr<CorrelatedNoisifier<EcalCorrMatrix> >, 3 > m_EBCorrNoise ;
151  std::array< std::unique_ptr<CorrelatedNoisifier<EcalCorrMatrix> >, 3 > m_EECorrNoise ;
152 
153  std::vector<CLHEP::HepRandomEngine*> randomEngines_;
154 };
155 
156 #endif
CLHEP::HepRandomEngine * randomEngine
Definition: Dummies.cc:7
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::vector< CLHEP::HepRandomEngine * > randomEngines_
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