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, CLHEP::HepRandomEngine*);
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 
89  CLHEP::HepRandomEngine* randomEngine(edm::StreamID const& streamID);
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  protected:
110  std::unique_ptr<const EcalSimParameterMap> m_ParameterMap ;
111  private:
113  std::unique_ptr<const APDSimParameters> m_apdParameters ;
114 
115  std::unique_ptr<EBHitResponse> m_APDResponse ;
116  protected:
117  std::unique_ptr<EBHitResponse> m_EBResponse ;
118  std::unique_ptr<EEHitResponse> m_EEResponse ;
119  private:
120  std::unique_ptr<ESHitResponse> m_ESResponse ;
121  std::unique_ptr<CaloHitResponse> m_ESOldResponse ;
122 
123  const bool m_addESNoise ;
124  const bool m_PreMix1 ;
125  const bool m_PreMix2 ;
126 
127  const bool m_doFastES ;
128 
129  const bool m_doEB, m_doEE, m_doES;
130 
131  std::unique_ptr<ESElectronicsSim> m_ESElectronicsSim ;
132  std::unique_ptr<ESOldDigitizer> m_ESOldDigitizer ;
133  std::unique_ptr<ESElectronicsSimFast> m_ESElectronicsSimFast ;
134  std::unique_ptr<ESDigitizer> m_ESDigitizer ;
135 
136  std::unique_ptr<EBDigitizer> m_APDDigitizer ;
137  std::unique_ptr<EBDigitizer> m_BarrelDigitizer ;
138  std::unique_ptr<EEDigitizer> m_EndcapDigitizer ;
139 
140  std::unique_ptr<EcalElectronicsSim> m_ElectronicsSim ;
141  std::unique_ptr<EcalCoder> m_Coder ;
142 
143  std::unique_ptr<EcalElectronicsSim> m_APDElectronicsSim ;
144  std::unique_ptr<EcalCoder> m_APDCoder ;
145 
147 
148  std::array< std::unique_ptr<CorrelatedNoisifier<EcalCorrMatrix> >, 3 > m_EBCorrNoise ;
149  std::array< std::unique_ptr<CorrelatedNoisifier<EcalCorrMatrix> >, 3 > m_EECorrNoise ;
150 
151  std::vector<CLHEP::HepRandomEngine*> randomEngines_;
152 };
153 
154 #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