139 {{
nullptr,
nullptr,
nullptr}}) {
146 iC.consumes<std::vector<PCaloHit>>(
edm::InputTag(m_hitsProducerTag,
"EcalHitsEB"));
148 iC.consumes<std::vector<PCaloHit>>(
edm::InputTag(m_hitsProducerTag,
"EcalHitsEE"));
150 iC.consumes<std::vector<PCaloHit>>(
edm::InputTag(m_hitsProducerTag,
"EcalHitsES"));
151 m_esGainToken = iC.esConsumes();
152 m_esMIPToGeVToken = iC.esConsumes();
153 m_esPedestalsToken = iC.esConsumes();
154 m_esMIPsToken = iC.esConsumes();
157 const std::vector<double> ebCorMatG12 =
params.getParameter<std::vector<double>>(
"EBCorrNoiseMatrixG12");
158 const std::vector<double> eeCorMatG12 =
params.getParameter<std::vector<double>>(
"EECorrNoiseMatrixG12");
159 const std::vector<double> ebCorMatG06 =
params.getParameter<std::vector<double>>(
"EBCorrNoiseMatrixG06");
160 const std::vector<double> eeCorMatG06 =
params.getParameter<std::vector<double>>(
"EECorrNoiseMatrixG06");
161 const std::vector<double> ebCorMatG01 =
params.getParameter<std::vector<double>>(
"EBCorrNoiseMatrixG01");
162 const std::vector<double> eeCorMatG01 =
params.getParameter<std::vector<double>>(
"EECorrNoiseMatrixG01");
176 m_EBResponse->setPhaseShift(1. + cosmicsShift);
178 m_EEResponse->setPhaseShift(1. + cosmicsShift);
184 assert(ebCorMatG12.size() == m_readoutFrameSize);
185 assert(eeCorMatG12.size() == m_readoutFrameSize);
186 assert(ebCorMatG06.size() == m_readoutFrameSize);
187 assert(eeCorMatG06.size() == m_readoutFrameSize);
188 assert(ebCorMatG01.size() == m_readoutFrameSize);
189 assert(eeCorMatG01.size() == m_readoutFrameSize);
191 assert(1.
e-7 > fabs(ebCorMatG12[0] - 1.0));
192 assert(1.
e-7 > fabs(ebCorMatG06[0] - 1.0));
193 assert(1.
e-7 > fabs(ebCorMatG01[0] - 1.0));
194 assert(1.
e-7 > fabs(eeCorMatG12[0] - 1.0));
195 assert(1.
e-7 > fabs(eeCorMatG06[0] - 1.0));
196 assert(1.
e-7 > fabs(eeCorMatG01[0] - 1.0));
198 for (
unsigned int row(0); row != m_readoutFrameSize; ++row) {
199 assert(0 == row || 1. >= ebCorMatG12[row]);
200 assert(0 == row || 1. >= ebCorMatG06[row]);
201 assert(0 == row || 1. >= ebCorMatG01[row]);
202 assert(0 == row || 1. >= eeCorMatG12[row]);
203 assert(0 == row || 1. >= eeCorMatG06[row]);
204 assert(0 == row || 1. >= eeCorMatG01[row]);
205 for (
unsigned int column(0); column <= row; ++column) {
206 const unsigned int index(row - column);
207 ebMatrix[0](row, column) = ebCorMatG12[
index];
208 eeMatrix[0](row, column) = eeCorMatG12[
index];
209 ebMatrix[1](row, column) = ebCorMatG06[
index];
210 eeMatrix[1](row, column) = eeCorMatG06[
index];
211 ebMatrix[2](row, column) = ebCorMatG01[
index];
212 eeMatrix[2](row, column) = eeCorMatG01[
index];
216 m_EBCorrNoise[0] = std::make_unique<CorrelatedNoisifier<EcalCorrMatrix>>(ebMatrix[0]);
217 m_EECorrNoise[0] = std::make_unique<CorrelatedNoisifier<EcalCorrMatrix>>(eeMatrix[0]);
218 m_EBCorrNoise[1] = std::make_unique<CorrelatedNoisifier<EcalCorrMatrix>>(ebMatrix[1]);
219 m_EECorrNoise[1] = std::make_unique<CorrelatedNoisifier<EcalCorrMatrix>>(eeMatrix[1]);
220 m_EBCorrNoise[2] = std::make_unique<CorrelatedNoisifier<EcalCorrMatrix>>(ebMatrix[2]);
221 m_EECorrNoise[2] = std::make_unique<CorrelatedNoisifier<EcalCorrMatrix>>(eeMatrix[2]);
225 m_EBCorrNoise[0].get(),
226 m_EECorrNoise[0].get(),
227 m_EBCorrNoise[1].get(),
228 m_EECorrNoise[1].get(),
229 m_EBCorrNoise[2].get(),
230 m_EECorrNoise[2].get());
235 if (m_apdSeparateDigi) {
236 m_APDCoder = std::make_unique<EcalCoder>(
false,
238 m_EBCorrNoise[0].get(),
239 m_EECorrNoise[0].get(),
240 m_EBCorrNoise[1].get(),
241 m_EECorrNoise[1].get(),
242 m_EBCorrNoise[2].get(),
243 m_EECorrNoise[2].get());
245 m_APDElectronicsSim = std::make_unique<EcalElectronicsSim_Ph1>(
248 m_APDDigitizer = std::make_unique<EBDigitizer>(m_APDResponse.get(), m_APDElectronicsSim.get(),
false);
256 m_EndcapDigitizer = std::make_unique<EEDigitizer>(m_EEResponse.get(), m_ElectronicsSim.get(),
addNoise);
const bool applyConstantTerm
EcalCorrMatrix_Ph2 ebMatrix[2]
const double rmsConstantTerm
const double cosmicsShift
m_EECorrNoise({{nullptr, nullptr, nullptr}})