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 
15 
20 
22 #include <vector>
23 
27 
28 class ESDigitizer;
29 
30 class APDSimParameters;
31 class EEHitResponse;
32 class ESHitResponse;
33 class CaloHitResponse;
35 class EcalCoder;
36 class ESElectronicsSim;
39 class CaloGeometry;
40 class EBDigiCollection;
41 class EEDigiCollection;
42 class ESDigiCollection;
44 
45 namespace edm {
46  class ConsumesCollector;
47  class Event;
48  class EventSetup;
49  template <typename T>
50  class Handle;
51  class ParameterSet;
52  class StreamID;
53 } // namespace edm
54 
55 namespace CLHEP {
56  class HepRandomEngine;
57 }
58 
60 public:
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;
70  void beginRun(edm::Run const &run, edm::EventSetup const &setup) override;
71 
75 
76 private:
77  virtual void cacheEBDigis(const EBDigiCollection *ebDigiPtr) const {}
78  virtual void cacheEEDigis(const EEDigiCollection *eeDigiPtr) const {}
79 
81  void accumulateCaloHits(HitsHandle const &ebHandle,
82  HitsHandle const &eeHandle,
83  HitsHandle const &esHandle,
84  int bunchCrossing);
85 
86  void checkGeometry(const edm::EventSetup &eventSetup);
87 
88  void updateGeometry();
89 
90  void checkCalibrations(const edm::Event &event, const edm::EventSetup &eventSetup);
91 
95  ESShape m_ESShape; // no const because gain must be set
96 
101 
103 
104  const bool m_apdSeparateDigi;
105 
106  const double m_EBs25notCont;
107  const double m_EEs25notCont;
108 
109  const unsigned int m_readoutFrameSize;
110 
111 protected:
112  std::unique_ptr<const EcalSimParameterMap> m_ParameterMap;
113 
114 private:
116  std::unique_ptr<const APDSimParameters> m_apdParameters;
117 
118  std::unique_ptr<EBHitResponse> m_APDResponse;
119 
120 protected:
121  std::unique_ptr<EBHitResponse> m_EBResponse;
122  std::unique_ptr<EEHitResponse> m_EEResponse;
123 
124 private:
125  std::unique_ptr<ESHitResponse> m_ESResponse;
126  std::unique_ptr<CaloHitResponse> m_ESOldResponse;
127 
128  const bool m_addESNoise;
129  const bool m_PreMix1;
130  const bool m_PreMix2;
131 
132  const bool m_doFastES;
133 
134  const bool m_doEB, m_doEE, m_doES;
135 
136  std::unique_ptr<ESElectronicsSim> m_ESElectronicsSim;
137  std::unique_ptr<ESOldDigitizer> m_ESOldDigitizer;
138  std::unique_ptr<ESElectronicsSimFast> m_ESElectronicsSimFast;
139  std::unique_ptr<ESDigitizer> m_ESDigitizer;
140 
141  std::unique_ptr<EBDigitizer> m_APDDigitizer;
142  std::unique_ptr<EBDigitizer> m_BarrelDigitizer;
143  std::unique_ptr<EEDigitizer> m_EndcapDigitizer;
144 
146 
148  std::unique_ptr<EcalElectronicsSim_Ph1> m_ElectronicsSim;
149  std::unique_ptr<EcalCoder> m_Coder;
150 
151  std::unique_ptr<EcalElectronicsSim_Ph1> m_APDElectronicsSim;
152  std::unique_ptr<EcalCoder> m_APDCoder;
153 
155 
156  std::array<std::unique_ptr<CorrelatedNoisifier<EcalCorrMatrix>>, 3> m_EBCorrNoise;
157  std::array<std::unique_ptr<CorrelatedNoisifier<EcalCorrMatrix>>, 3> m_EECorrNoise;
158 
159  CLHEP::HepRandomEngine *randomEngine_ = nullptr;
160 };
161 
162 #endif
CaloTDigitizer
Definition: CaloTDigitizer.h:42
EcalDigiProducer::accumulate
void accumulate(edm::Event const &e, edm::EventSetup const &c) override
Definition: EcalDigiProducer.cc:320
EcalDigiProducer::beginLuminosityBlock
void beginLuminosityBlock(edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) override
Definition: EcalDigiProducer.cc:420
EEHitResponse
Definition: EEHitResponse.h:7
EcalDigiProducer::m_EBs25notCont
const double m_EBs25notCont
Definition: EcalDigiProducer.h:106
edm::StreamID
Definition: StreamID.h:30
EcalDigiProducer::m_Geometry
const CaloGeometry * m_Geometry
Definition: EcalDigiProducer.h:154
EcalDigiProducer::m_ElectronicsSim
std::unique_ptr< EcalElectronicsSim_Ph1 > m_ElectronicsSim
Definition: EcalDigiProducer.h:148
EcalTDigitizer.h
EcalDigiProducer::m_doEB
const bool m_doEB
Definition: EcalDigiProducer.h:134
EcalDigiProducer::m_APDElectronicsSim
std::unique_ptr< EcalElectronicsSim_Ph1 > m_APDElectronicsSim
Definition: EcalDigiProducer.h:151
EcalDigiProducer::m_doFastES
const bool m_doFastES
Definition: EcalDigiProducer.h:132
ESElectronicsSim
Definition: ESElectronicsSim.h:16
EcalDigiProducer::m_EEShape
EEShape m_EEShape
Definition: EcalDigiProducer.h:94
edm::LuminosityBlock
Definition: LuminosityBlock.h:50
EBShape
Definition: EBShape.h:6
CalibrationSummaryClient_cfi.params
params
Definition: CalibrationSummaryClient_cfi.py:14
edm::Run
Definition: Run.h:45
Handle
edm
HLT enums.
Definition: AlignableModifier.h:19
EcalDigiProducer::m_EEResponse
std::unique_ptr< EEHitResponse > m_EEResponse
Definition: EcalDigiProducer.h:122
EcalDigiProducer::m_ESOldResponse
std::unique_ptr< CaloHitResponse > m_ESOldResponse
Definition: EcalDigiProducer.h:126
EcalDigiProducer::m_apdDigiTag
const std::string m_apdDigiTag
Definition: EcalDigiProducer.h:115
EcalDigiProducer::EcalSamples
CaloTSamples< float, 10 > EcalSamples
Definition: EcalDigiProducer.h:145
EcalDigiProducer::randomEngine_
CLHEP::HepRandomEngine * randomEngine_
Definition: EcalDigiProducer.h:159
PileUpEventPrincipal
Definition: PileUpEventPrincipal.h:19
EBHitResponse.h
EcalDigitizerTraits.h
APDShape.h
ESShape.h
APDSimParameters
Definition: APDSimParameters.h:8
EcalDigiProducer::EcalDigiProducer
EcalDigiProducer(const edm::ParameterSet &params, edm::ProducesCollector, edm::ConsumesCollector &iC)
Definition: EcalDigiProducer.cc:57
EcalDigiProducer::~EcalDigiProducer
~EcalDigiProducer() override
Definition: EcalDigiProducer.cc:269
edm::Handle
Definition: AssociativeIterator.h:50
EcalDigiProducer::m_ESElectronicsSimFast
std::unique_ptr< ESElectronicsSimFast > m_ESElectronicsSimFast
Definition: EcalDigiProducer.h:138
EcalDigiProducer::m_doES
const bool m_doES
Definition: EcalDigiProducer.h:134
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
ProducesCollector.h
EcalDigiProducer::m_useLCcorrection
bool m_useLCcorrection
Definition: EcalDigiProducer.h:102
EcalDigiProducer::m_ESOldDigitizer
std::unique_ptr< ESOldDigitizer > m_ESOldDigitizer
Definition: EcalDigiProducer.h:137
EcalDigiProducer::m_ESElectronicsSim
std::unique_ptr< ESElectronicsSim > m_ESElectronicsSim
Definition: EcalDigiProducer.h:136
CorrelatedNoisifier.h
EBShape.h
EEShape.h
CaloGeometry
Definition: CaloGeometry.h:21
EcalSimParameterMap
Definition: EcalSimParameterMap.h:11
EcalDigiProducer::m_EBdigiCollection
const std::string m_EBdigiCollection
Definition: EcalDigiProducer.h:97
EcalDigiProducer::beginRun
void beginRun(edm::Run const &run, edm::EventSetup const &setup) override
Definition: EcalDigiProducer.cc:612
CaloTSamples
Definition: CaloTSamples.h:14
EcalBaseSignalGenerator
Definition: EcalBaseSignalGenerator.h:7
EcalDigiProducer::m_apdSeparateDigi
const bool m_apdSeparateDigi
Definition: EcalDigiProducer.h:104
DigiAccumulatorMixMod.h
EcalDigiProducer::finalizeEvent
void finalizeEvent(edm::Event &e, edm::EventSetup const &c) override
Definition: EcalDigiProducer.cc:373
EcalDigiProducer::m_apdParameters
std::unique_ptr< const APDSimParameters > m_apdParameters
Definition: EcalDigiProducer.h:116
EcalDigiProducer::m_ESDigitizer
std::unique_ptr< ESDigitizer > m_ESDigitizer
Definition: EcalDigiProducer.h:139
Event
DigiAccumulatorMixMod
Definition: DigiAccumulatorMixMod.h:41
EEShape
Definition: EEShape.h:6
EcalDigiProducer::m_APDDigitizer
std::unique_ptr< EBDigitizer > m_APDDigitizer
Definition: EcalDigiProducer.h:141
EcalDigiProducer::m_EBResponse
std::unique_ptr< EBHitResponse > m_EBResponse
Definition: EcalDigiProducer.h:121
ESDigiCollection
Definition: EcalDigiCollections.h:82
CLHEP
Definition: CocoaGlobals.h:27
CaloTSamples.h
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EcalDigiProducer::m_EEs25notCont
const double m_EEs25notCont
Definition: EcalDigiProducer.h:107
Error.h
EcalDigiProducer::m_ParameterMap
std::unique_ptr< const EcalSimParameterMap > m_ParameterMap
Definition: EcalDigiProducer.h:112
EcalDigiProducer::cacheEEDigis
virtual void cacheEEDigis(const EEDigiCollection *eeDigiPtr) const
Definition: EcalDigiProducer.h:78
edm::ParameterSet
Definition: ParameterSet.h:47
EcalDigiProducer::m_APDCoder
std::unique_ptr< EcalCoder > m_APDCoder
Definition: EcalDigiProducer.h:152
ParameterSet
Definition: Functions.h:16
EcalElectronicsSim
Definition: EcalElectronicsSim.h:20
EBDigiCollection
Definition: EcalDigiCollections.h:56
APDShape
Definition: APDShape.h:6
EEDigiCollection
Definition: EcalDigiCollections.h:69
EEDigitizer
EcalTDigitizer< EEDigitizerTraits > EEDigitizer
Definition: EcalDigiProducer.h:25
ESOldDigitizer
CaloTDigitizer< ESOldDigitizerTraits > ESOldDigitizer
Definition: EcalDigiProducer.h:26
CaloHitResponse
Creates electronics signals from hits.
Definition: CaloHitResponse.h:33
edm::EventSetup
Definition: EventSetup.h:58
CaloTDigitizer.h
ESElectronicsSimFast
Definition: ESElectronicsSimFast.h:16
EcalDigiProducer::initializeEvent
void initializeEvent(edm::Event const &e, edm::EventSetup const &c) override
Definition: EcalDigiProducer.cc:271
EcalTDigitizer
Definition: EcalTDigitizer.h:23
EcalDigiProducer::cacheEBDigis
virtual void cacheEBDigis(const EBDigiCollection *ebDigiPtr) const
Definition: EcalDigiProducer.h:77
EcalDigiProducer::m_ESShape
ESShape m_ESShape
Definition: EcalDigiProducer.h:95
EcalDigiProducer::m_doEE
const bool m_doEE
Definition: EcalDigiProducer.h:134
EcalDigiProducer::m_readoutFrameSize
const unsigned int m_readoutFrameSize
Definition: EcalDigiProducer.h:109
EcalDigiProducer::m_APDResponse
std::unique_ptr< EBHitResponse > m_APDResponse
Definition: EcalDigiProducer.h:118
EcalDigiProducer::EcalElectronicsSim_Ph1
EcalElectronicsSim< EcalCoder, EcalSamples, EcalDataFrame > EcalElectronicsSim_Ph1
Definition: EcalDigiProducer.h:147
EcalDigiProducer::updateGeometry
void updateGeometry()
Definition: EcalDigiProducer.cc:566
EcalDigiProducer::m_hitsProducerTag
const std::string m_hitsProducerTag
Definition: EcalDigiProducer.h:100
EcalDigiProducer
Definition: EcalDigiProducer.h:59
writedatasetfile.run
run
Definition: writedatasetfile.py:27
EcalDigiProducer::m_EEdigiCollection
const std::string m_EEdigiCollection
Definition: EcalDigiProducer.h:98
edm::ProducesCollector
Definition: ProducesCollector.h:43
EcalDigiProducer::accumulateCaloHits
void accumulateCaloHits(HitsHandle const &ebHandle, HitsHandle const &eeHandle, HitsHandle const &esHandle, int bunchCrossing)
Definition: EcalDigiProducer.cc:295
EcalDigiProducer::setESNoiseSignalGenerator
void setESNoiseSignalGenerator(EcalBaseSignalGenerator *noiseGenerator)
Definition: EcalDigiProducer.cc:606
EcalDigiProducer::m_EndcapDigitizer
std::unique_ptr< EEDigitizer > m_EndcapDigitizer
Definition: EcalDigiProducer.h:143
EcalDigiProducer::m_ESdigiCollection
const std::string m_ESdigiCollection
Definition: EcalDigiProducer.h:99
ESDigitizer
Definition: ESDigitizer.h:14
EcalCoder
Definition: EcalCoder.h:27
EcalElectronicsSim.h
EcalDigiProducer::m_Coder
std::unique_ptr< EcalCoder > m_Coder
Definition: EcalDigiProducer.h:149
EcalDigiProducer::m_PreMix1
const bool m_PreMix1
Definition: EcalDigiProducer.h:129
EBDigitizer
EcalTDigitizer< EBDigitizerTraits > EBDigitizer
Definition: EcalDigiProducer.h:24
ESHitResponse
Definition: ESHitResponse.h:7
EcalDigiProducer::m_PreMix2
const bool m_PreMix2
Definition: EcalDigiProducer.h:130
EventSetup
EcalDigiProducer::setEENoiseSignalGenerator
void setEENoiseSignalGenerator(EcalBaseSignalGenerator *noiseGenerator)
Definition: EcalDigiProducer.cc:600
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:46
event
Definition: event.py:1
edm::Event
Definition: Event.h:73
ESShape
Definition: ESShape.h:16
lumi
Definition: LumiSectionData.h:20
EcalDigiProducer::HitsHandle
edm::Handle< std::vector< PCaloHit > > HitsHandle
Definition: EcalDigiProducer.h:80
EcalDigiProducer::checkCalibrations
void checkCalibrations(const edm::Event &event, const edm::EventSetup &eventSetup)
Definition: EcalDigiProducer.cc:436
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
EcalCorrelatedNoiseMatrix.h
EcalDigiProducer::m_EBCorrNoise
std::array< std::unique_ptr< CorrelatedNoisifier< EcalCorrMatrix > >, 3 > m_EBCorrNoise
Definition: EcalDigiProducer.h:156
EcalDigiProducer::m_ESResponse
std::unique_ptr< ESHitResponse > m_ESResponse
Definition: EcalDigiProducer.h:125
EcalDigiProducer::m_BarrelDigitizer
std::unique_ptr< EBDigitizer > m_BarrelDigitizer
Definition: EcalDigiProducer.h:142
EcalDigiProducer::setEBNoiseSignalGenerator
void setEBNoiseSignalGenerator(EcalBaseSignalGenerator *noiseGenerator)
Definition: EcalDigiProducer.cc:594
EcalDigiProducer::checkGeometry
void checkGeometry(const edm::EventSetup &eventSetup)
Definition: EcalDigiProducer.cc:553
EcalDigiProducer::m_APDShape
APDShape m_APDShape
Definition: EcalDigiProducer.h:92
EcalDigiProducer::m_EBShape
EBShape m_EBShape
Definition: EcalDigiProducer.h:93
EcalDigiProducer::m_addESNoise
const bool m_addESNoise
Definition: EcalDigiProducer.h:128
EcalDigiProducer::m_EECorrNoise
std::array< std::unique_ptr< CorrelatedNoisifier< EcalCorrMatrix > >, 3 > m_EECorrNoise
Definition: EcalDigiProducer.h:157
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
ESElectronicsSim.h