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);
143 std::memcpy(
view.timeBiasCorrections_amplitude_EB().data(),
144 timeBiasCorrectionsData.EBTimeCorrAmplitudeBins.data(),
146 std::memcpy(
view.timeBiasCorrections_shift_EB().data(),
147 timeBiasCorrectionsData.EBTimeCorrShiftBins.data(),
153 std::memcpy(
view.timeBiasCorrections_amplitude_EE().data(),
154 timeBiasCorrectionsData.EETimeCorrAmplitudeBins.data(),
156 std::memcpy(
view.timeBiasCorrections_shift_EE().data(),
157 timeBiasCorrectionsData.EETimeCorrShiftBins.data(),
160 view.timeBiasCorrectionSizeEB() =
162 view.timeBiasCorrectionSizeEE() =
166 std::memcpy(
view.sampleCorrelation_EB_G12().data(),
167 samplesCorrelationData.EBG12SamplesCorrelation.data(),
169 std::memcpy(
view.sampleCorrelation_EB_G6().data(),
170 samplesCorrelationData.EBG6SamplesCorrelation.data(),
172 std::memcpy(
view.sampleCorrelation_EB_G1().data(),
173 samplesCorrelationData.EBG1SamplesCorrelation.data(),
176 std::memcpy(
view.sampleCorrelation_EE_G12().data(),
177 samplesCorrelationData.EEG12SamplesCorrelation.data(),
179 std::memcpy(
view.sampleCorrelation_EE_G6().data(),
180 samplesCorrelationData.EBG6SamplesCorrelation.data(),
182 std::memcpy(
view.sampleCorrelation_EE_G1().data(),
183 samplesCorrelationData.EEG1SamplesCorrelation.data(),
187 view.sampleMask_EB() = sampleMaskData.getEcalSampleMaskRecordEB();
188 view.sampleMask_EE() = sampleMaskData.getEcalSampleMaskRecordEE();
191 view.timeOffset_EB() = timeOffsetConstantData.getEBValue();
192 view.timeOffset_EE() = timeOffsetConstantData.getEEValue();
195 view.offsetEE() = barrelSize;
edm::ESGetToken< EcalSamplesCorrelation, EcalSamplesCorrelationRcd > samplesCorrelationToken_
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
edm::ESGetToken< EcalPulseShapes, EcalPulseShapesRcd > pulseShapesToken_
uint32_t cc[maxCellsPerHit]
static const int TEMPLATESAMPLES
constexpr size_t kMaxTimeBiasCorrectionBinsEB
edm::ESGetToken< EcalTimeBiasCorrections, EcalTimeBiasCorrectionsRcd > timeBiasCorrectionsToken_
std::unique_ptr< EcalMultifitConditionsHost > produce(EcalMultifitConditionsRcd const &iRecord)
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
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
#define DEFINE_FWK_EVENTSETUP_ALPAKA_MODULE(type)
EcalMultifitConditionsHostESProducer(edm::ParameterSet const &iConfig)
edm::ESGetToken< EcalPedestals, EcalPedestalsRcd > pedestalsToken_
edm::ESGetToken< EcalSampleMask, EcalSampleMaskRcd > sampleMaskToken_
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const