72 size_t numberOfXtals = pedestalsData.size();
75 auto view = product->view();
78 const auto barrelSize = pedestalsData.barrelItems().size();
79 const auto endcapSize = pedestalsData.endcapItems().size();
81 auto const& pedestalsEB = pedestalsData.barrelItems();
82 auto const& pedestalsEE = pedestalsData.endcapItems();
83 auto const& gainRatiosEB = gainRatiosData.barrelItems();
84 auto const& gainRatiosEE = gainRatiosData.endcapItems();
85 auto const& pulseShapesEB = pulseShapesData.barrelItems();
86 auto const& pulseShapesEE = pulseShapesData.endcapItems();
87 auto const& pulseCovariancesEB = pulseCovariancesData.barrelItems();
88 auto const& pulseCovariancesEE = pulseCovariancesData.endcapItems();
89 auto const& timeCalibConstantsEB = timeCalibConstantsData.barrelItems();
90 auto const& timeCalibConstantsEE = timeCalibConstantsData.endcapItems();
92 for (
unsigned int i = 0;
i < barrelSize; ++
i) {
95 vi.pedestals_mean_x12() = pedestalsEB[
i].mean_x12;
96 vi.pedestals_rms_x12() = pedestalsEB[
i].rms_x12;
97 vi.pedestals_mean_x6() = pedestalsEB[
i].mean_x6;
98 vi.pedestals_rms_x6() = pedestalsEB[
i].rms_x6;
99 vi.pedestals_mean_x1() = pedestalsEB[
i].mean_x1;
100 vi.pedestals_rms_x1() = pedestalsEB[
i].rms_x1;
102 vi.gain12Over6() = gainRatiosEB[
i].gain12Over6();
103 vi.gain6Over1() = gainRatiosEB[
i].gain6Over1();
105 vi.timeCalibConstants() = timeCalibConstantsEB[
i];
110 vi.pulseCovariance()(
j,
k) = pulseCovariancesEB[
i].
val(
j,
k);
114 for (
unsigned int i = 0;
i < endcapSize; ++
i) {
115 auto vi =
view[barrelSize +
i];
117 vi.pedestals_mean_x12() = pedestalsEE[
i].mean_x12;
118 vi.pedestals_rms_x12() = pedestalsEE[
i].rms_x12;
119 vi.pedestals_mean_x6() = pedestalsEE[
i].mean_x6;
120 vi.pedestals_rms_x6() = pedestalsEE[
i].rms_x6;
121 vi.pedestals_mean_x1() = pedestalsEE[
i].mean_x1;
122 vi.pedestals_rms_x1() = pedestalsEE[
i].rms_x1;
124 vi.gain12Over6() = gainRatiosEE[
i].gain12Over6();
125 vi.gain6Over1() = gainRatiosEE[
i].gain6Over1();
127 vi.timeCalibConstants() = timeCalibConstantsEE[
i];
133 vi.pulseCovariance()(
j,
k) = pulseCovariancesEE[
i].
val(
j,
k);
140 auto const timeCorrAmplBinsSizeEB = timeBiasCorrectionsData.EBTimeCorrAmplitudeBins.size();
141 auto const timeCorrShiftBinsSizeEB = timeBiasCorrectionsData.EBTimeCorrShiftBins.size();
145 std::memcpy(
view.timeBiasCorrections_amplitude_EB().data(),
146 timeBiasCorrectionsData.EBTimeCorrAmplitudeBins.data(),
147 sizeof(
float) * timeCorrAmplBinsSizeEB);
148 std::memcpy(
view.timeBiasCorrections_shift_EB().data(),
149 timeBiasCorrectionsData.EBTimeCorrShiftBins.data(),
150 sizeof(
float) * timeCorrShiftBinsSizeEB);
152 auto const timeCorrAmplBinsSizeEE = timeBiasCorrectionsData.EETimeCorrAmplitudeBins.size();
153 auto const timeCorrShiftBinsSizeEE = timeBiasCorrectionsData.EETimeCorrShiftBins.size();
157 std::memcpy(
view.timeBiasCorrections_amplitude_EE().data(),
158 timeBiasCorrectionsData.EETimeCorrAmplitudeBins.data(),
159 sizeof(
float) * timeCorrAmplBinsSizeEE);
160 std::memcpy(
view.timeBiasCorrections_shift_EE().data(),
161 timeBiasCorrectionsData.EETimeCorrShiftBins.data(),
162 sizeof(
float) * timeCorrShiftBinsSizeEE);
168 std::memcpy(
view.sampleCorrelation_EB_G12().data(),
169 samplesCorrelationData.EBG12SamplesCorrelation.data(),
171 std::memcpy(
view.sampleCorrelation_EB_G6().data(),
172 samplesCorrelationData.EBG6SamplesCorrelation.data(),
174 std::memcpy(
view.sampleCorrelation_EB_G1().data(),
175 samplesCorrelationData.EBG1SamplesCorrelation.data(),
178 std::memcpy(
view.sampleCorrelation_EE_G12().data(),
179 samplesCorrelationData.EEG12SamplesCorrelation.data(),
181 std::memcpy(
view.sampleCorrelation_EE_G6().data(),
182 samplesCorrelationData.EEG6SamplesCorrelation.data(),
184 std::memcpy(
view.sampleCorrelation_EE_G1().data(),
185 samplesCorrelationData.EEG1SamplesCorrelation.data(),
189 view.sampleMask_EB() = sampleMaskData.getEcalSampleMaskRecordEB();
190 view.sampleMask_EE() = sampleMaskData.getEcalSampleMaskRecordEE();
193 view.timeOffset_EB() = timeOffsetConstantData.getEBValue();
194 view.timeOffset_EE() = timeOffsetConstantData.getEEValue();
197 view.offsetEE() = barrelSize;
edm::ESGetToken< EcalSamplesCorrelation, EcalSamplesCorrelationRcd > samplesCorrelationToken_
edm::ESGetToken< EcalPulseShapes, EcalPulseShapesRcd > pulseShapesToken_
static const int TEMPLATESAMPLES
constexpr size_t kMaxTimeBiasCorrectionBinsEB
edm::ESGetToken< EcalTimeBiasCorrections, EcalTimeBiasCorrectionsRcd > timeBiasCorrectionsToken_
edm::ESGetToken< EcalTimeCalibConstants, EcalTimeCalibConstantsRcd > timeCalibConstantsToken_
constexpr size_t kMaxTimeBiasCorrectionBinsEE
edm::ESGetToken< EcalPulseCovariances, EcalPulseCovariancesRcd > pulseCovariancesToken_
edm::ESGetToken< EcalTimeOffsetConstant, EcalTimeOffsetConstantRcd > timeOffsetConstantToken_
edm::ESGetToken< EcalGainRatios, EcalGainRatiosRcd > gainRatiosToken_
static constexpr unsigned int sampleSize
edm::ESGetToken< EcalPedestals, EcalPedestalsRcd > pedestalsToken_
edm::ESGetToken< EcalSampleMask, EcalSampleMaskRcd > sampleMaskToken_