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 
13 
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;
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 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;
69  void beginRun(edm::Run const &run, edm::EventSetup const &setup) override;
70 
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
CaloTDigitizer
Definition: CaloTDigitizer.h:42
EcalDigiProducer::accumulate
void accumulate(edm::Event const &e, edm::EventSetup const &c) override
Definition: EcalDigiProducer.cc:318
EcalDigiProducer::beginLuminosityBlock
void beginLuminosityBlock(edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) override
Definition: EcalDigiProducer.cc:418
EEHitResponse
Definition: EEHitResponse.h:7
EcalDigiProducer::m_EBs25notCont
const double m_EBs25notCont
Definition: EcalDigiProducer.h:105
edm::StreamID
Definition: StreamID.h:30
EcalDigiProducer::m_Geometry
const CaloGeometry * m_Geometry
Definition: EcalDigiProducer.h:150
EBHitResponse
Definition: EBHitResponse.h:14
EcalTDigitizer.h
EcalDigiProducer::m_doEB
const bool m_doEB
Definition: EcalDigiProducer.h:133
EcalDigiProducer::m_doFastES
const bool m_doFastES
Definition: EcalDigiProducer.h:131
ESElectronicsSim
Definition: ESElectronicsSim.h:16
EcalDigiProducer::m_EEShape
EEShape m_EEShape
Definition: EcalDigiProducer.h:93
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:121
EcalDigiProducer::m_ESOldResponse
std::unique_ptr< CaloHitResponse > m_ESOldResponse
Definition: EcalDigiProducer.h:125
EcalDigiProducer::m_apdDigiTag
const std::string m_apdDigiTag
Definition: EcalDigiProducer.h:114
EcalDigiProducer::randomEngine_
CLHEP::HepRandomEngine * randomEngine_
Definition: EcalDigiProducer.h:155
PileUpEventPrincipal
Definition: PileUpEventPrincipal.h:19
EcalDigitizerTraits.h
APDShape.h
ESShape.h
APDSimParameters
Definition: APDSimParameters.h:8
EcalDigiProducer::m_APDElectronicsSim
std::unique_ptr< EcalElectronicsSim > m_APDElectronicsSim
Definition: EcalDigiProducer.h:147
EcalDigiProducer::EcalDigiProducer
EcalDigiProducer(const edm::ParameterSet &params, edm::ProducesCollector, edm::ConsumesCollector &iC)
Definition: EcalDigiProducer.cc:55
EcalDigiProducer::~EcalDigiProducer
~EcalDigiProducer() override
Definition: EcalDigiProducer.cc:267
edm::Handle
Definition: AssociativeIterator.h:50
EcalDigiProducer::m_ESElectronicsSimFast
std::unique_ptr< ESElectronicsSimFast > m_ESElectronicsSimFast
Definition: EcalDigiProducer.h:137
EcalDigiProducer::m_doES
const bool m_doES
Definition: EcalDigiProducer.h:133
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
ProducesCollector.h
EcalDigiProducer::m_useLCcorrection
bool m_useLCcorrection
Definition: EcalDigiProducer.h:101
EcalDigiProducer::m_ESOldDigitizer
std::unique_ptr< ESOldDigitizer > m_ESOldDigitizer
Definition: EcalDigiProducer.h:136
EcalDigiProducer::m_ESElectronicsSim
std::unique_ptr< ESElectronicsSim > m_ESElectronicsSim
Definition: EcalDigiProducer.h:135
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:96
EcalDigiProducer::beginRun
void beginRun(edm::Run const &run, edm::EventSetup const &setup) override
Definition: EcalDigiProducer.cc:610
EcalBaseSignalGenerator
Definition: EcalBaseSignalGenerator.h:8
EcalDigiProducer::m_apdSeparateDigi
const bool m_apdSeparateDigi
Definition: EcalDigiProducer.h:103
DigiAccumulatorMixMod.h
EcalDigiProducer::finalizeEvent
void finalizeEvent(edm::Event &e, edm::EventSetup const &c) override
Definition: EcalDigiProducer.cc:371
EcalDigiProducer::m_apdParameters
std::unique_ptr< const APDSimParameters > m_apdParameters
Definition: EcalDigiProducer.h:115
EcalDigiProducer::m_ESDigitizer
std::unique_ptr< ESDigitizer > m_ESDigitizer
Definition: EcalDigiProducer.h:138
Event
EcalDigiProducer::m_ElectronicsSim
std::unique_ptr< EcalElectronicsSim > m_ElectronicsSim
Definition: EcalDigiProducer.h:144
DigiAccumulatorMixMod
Definition: DigiAccumulatorMixMod.h:41
EEShape
Definition: EEShape.h:6
EcalDigiProducer::m_APDDigitizer
std::unique_ptr< EBDigitizer > m_APDDigitizer
Definition: EcalDigiProducer.h:140
EcalDigiProducer::m_EBResponse
std::unique_ptr< EBHitResponse > m_EBResponse
Definition: EcalDigiProducer.h:120
ESDigiCollection
Definition: EcalDigiCollections.h:58
CLHEP
Definition: CocoaGlobals.h:27
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EcalDigiProducer::m_EEs25notCont
const double m_EEs25notCont
Definition: EcalDigiProducer.h:106
Error.h
EcalDigiProducer::m_ParameterMap
std::unique_ptr< const EcalSimParameterMap > m_ParameterMap
Definition: EcalDigiProducer.h:111
EcalDigiProducer::cacheEEDigis
virtual void cacheEEDigis(const EEDigiCollection *eeDigiPtr) const
Definition: EcalDigiProducer.h:77
edm::ParameterSet
Definition: ParameterSet.h:36
EcalDigiProducer::m_APDCoder
std::unique_ptr< EcalCoder > m_APDCoder
Definition: EcalDigiProducer.h:148
ParameterSet
Definition: Functions.h:16
EcalElectronicsSim
Definition: EcalElectronicsSim.h:20
EBDigiCollection
Definition: EcalDigiCollections.h:32
APDShape
Definition: APDShape.h:6
EEDigiCollection
Definition: EcalDigiCollections.h:45
EEDigitizer
EcalTDigitizer< EEDigitizerTraits > EEDigitizer
Definition: EcalDigiProducer.h:22
ESOldDigitizer
CaloTDigitizer< ESOldDigitizerTraits > ESOldDigitizer
Definition: EcalDigiProducer.h:23
CaloHitResponse
Creates electronics signals from hits.
Definition: CaloHitResponse.h:33
edm::EventSetup
Definition: EventSetup.h:57
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
CaloTDigitizer.h
ESElectronicsSimFast
Definition: ESElectronicsSimFast.h:16
EcalDigiProducer::initializeEvent
void initializeEvent(edm::Event const &e, edm::EventSetup const &c) override
Definition: EcalDigiProducer.cc:269
EcalTDigitizer
Definition: EcalTDigitizer.h:23
EcalDigiProducer::cacheEBDigis
virtual void cacheEBDigis(const EBDigiCollection *ebDigiPtr) const
Definition: EcalDigiProducer.h:76
EcalDigiProducer::m_ESShape
ESShape m_ESShape
Definition: EcalDigiProducer.h:94
EcalDigiProducer::m_doEE
const bool m_doEE
Definition: EcalDigiProducer.h:133
EcalDigiProducer::m_readoutFrameSize
const unsigned int m_readoutFrameSize
Definition: EcalDigiProducer.h:108
EcalDigiProducer::m_APDResponse
std::unique_ptr< EBHitResponse > m_APDResponse
Definition: EcalDigiProducer.h:117
EcalDigiProducer::updateGeometry
void updateGeometry()
Definition: EcalDigiProducer.cc:564
EcalDigiProducer::m_hitsProducerTag
const std::string m_hitsProducerTag
Definition: EcalDigiProducer.h:99
EcalDigiProducer
Definition: EcalDigiProducer.h:58
writedatasetfile.run
run
Definition: writedatasetfile.py:27
EcalDigiProducer::m_EEdigiCollection
const std::string m_EEdigiCollection
Definition: EcalDigiProducer.h:97
edm::ProducesCollector
Definition: ProducesCollector.h:43
EcalDigiProducer::accumulateCaloHits
void accumulateCaloHits(HitsHandle const &ebHandle, HitsHandle const &eeHandle, HitsHandle const &esHandle, int bunchCrossing)
Definition: EcalDigiProducer.cc:293
EcalDigiProducer::setESNoiseSignalGenerator
void setESNoiseSignalGenerator(EcalBaseSignalGenerator *noiseGenerator)
Definition: EcalDigiProducer.cc:604
EcalDigiProducer::m_EndcapDigitizer
std::unique_ptr< EEDigitizer > m_EndcapDigitizer
Definition: EcalDigiProducer.h:142
EcalDigiProducer::m_ESdigiCollection
const std::string m_ESdigiCollection
Definition: EcalDigiProducer.h:98
ESDigitizer
Definition: ESDigitizer.h:14
EcalCoder
Definition: EcalCoder.h:27
EcalDigiProducer::m_Coder
std::unique_ptr< EcalCoder > m_Coder
Definition: EcalDigiProducer.h:145
EcalDigiProducer::m_PreMix1
const bool m_PreMix1
Definition: EcalDigiProducer.h:128
EBDigitizer
EcalTDigitizer< EBDigitizerTraits > EBDigitizer
Definition: EcalDigiProducer.h:21
ESHitResponse
Definition: ESHitResponse.h:7
EcalDigiProducer::m_PreMix2
const bool m_PreMix2
Definition: EcalDigiProducer.h:129
EventSetup
EcalDigiProducer::setEENoiseSignalGenerator
void setEENoiseSignalGenerator(EcalBaseSignalGenerator *noiseGenerator)
Definition: EcalDigiProducer.cc:598
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:79
EcalDigiProducer::checkCalibrations
void checkCalibrations(const edm::Event &event, const edm::EventSetup &eventSetup)
Definition: EcalDigiProducer.cc:434
edm::ConsumesCollector
Definition: ConsumesCollector.h:39
EcalCorrelatedNoiseMatrix.h
EcalDigiProducer::m_EBCorrNoise
std::array< std::unique_ptr< CorrelatedNoisifier< EcalCorrMatrix > >, 3 > m_EBCorrNoise
Definition: EcalDigiProducer.h:152
EcalDigiProducer::m_ESResponse
std::unique_ptr< ESHitResponse > m_ESResponse
Definition: EcalDigiProducer.h:124
EcalDigiProducer::m_BarrelDigitizer
std::unique_ptr< EBDigitizer > m_BarrelDigitizer
Definition: EcalDigiProducer.h:141
EcalDigiProducer::setEBNoiseSignalGenerator
void setEBNoiseSignalGenerator(EcalBaseSignalGenerator *noiseGenerator)
Definition: EcalDigiProducer.cc:592
EcalDigiProducer::checkGeometry
void checkGeometry(const edm::EventSetup &eventSetup)
Definition: EcalDigiProducer.cc:551
EcalDigiProducer::m_APDShape
APDShape m_APDShape
Definition: EcalDigiProducer.h:91
EcalDigiProducer::m_EBShape
EBShape m_EBShape
Definition: EcalDigiProducer.h:92
EcalDigiProducer::m_addESNoise
const bool m_addESNoise
Definition: EcalDigiProducer.h:127
EcalDigiProducer::m_EECorrNoise
std::array< std::unique_ptr< CorrelatedNoisifier< EcalCorrMatrix > >, 3 > m_EECorrNoise
Definition: EcalDigiProducer.h:153
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
ESElectronicsSim.h