26 :
totalChannels_{pedestals.getAllContainers()[0].second.size() + pedestals.getAllContainers()[1].second.size()},
28 #ifdef HCAL_MAHI_CPUDEBUG 29 std::cout <<
"hello from converted pedestal widths" << std::endl;
30 std::cout <<
"pedestals HB values = " << pedestals.getAllContainers()[0].second.size()
31 <<
" HE values = " << pedestals.getAllContainers()[1].second.size() << std::endl;
32 std::cout <<
"qiedata HB values = " << qieData.getAllContainers()[0].second.size()
33 <<
" HE values = " << qieData.getAllContainers()[1].second.size() << std::endl;
37 auto const pedestalsAll = pedestals.getAllContainers();
38 auto const pedestalWidthsAll = pedestalWidths.getAllContainers();
39 auto const qieDataAll = qieData.getAllContainers();
40 auto const qieTypesAll = qieTypes.getAllContainers();
43 auto const unitIsADC = pedestals.isADC();
46 auto const& pedestalBarrelValues = pedestalsAll[0].second;
47 auto const& pedestalWidthBarrelValues = pedestalWidthsAll[0].second;
48 auto const& qieDataBarrelValues = qieDataAll[0].second;
49 auto const& qieTypesBarrelValues = qieTypesAll[0].second;
51 #ifdef HCAL_MAHI_CPUDEBUG 52 assert(pedestalWidthBarrelValues.size() == pedestalBarrelValues.size());
53 assert(pedestalBarrelValues.size() == qieDataBarrelValues.size());
54 assert(pedestalBarrelValues.size() == qieTypesBarrelValues.size());
57 for (
uint64_t i = 0;
i < pedestalBarrelValues.size(); ++
i) {
58 auto const& qieCoder = qieDataBarrelValues[
i];
59 auto const qieType = qieTypesBarrelValues[
i].getValue() > 1 ? 1 : 0;
60 auto const& qieShape = qieData.getShape(
qieType);
65 pedestalBarrelValues[
i].
getValue(0), pedestalWidthBarrelValues[
i].getWidth(0), 0, qieCoder, qieShape)
66 : pedestalWidthBarrelValues[
i].getWidth(0);
70 pedestalBarrelValues[
i].
getValue(1), pedestalWidthBarrelValues[
i].getWidth(1), 1, qieCoder, qieShape)
71 : pedestalWidthBarrelValues[
i].getWidth(1);
75 pedestalBarrelValues[
i].
getValue(2), pedestalWidthBarrelValues[
i].getWidth(2), 2, qieCoder, qieShape)
76 : pedestalWidthBarrelValues[
i].getWidth(2);
80 pedestalBarrelValues[
i].
getValue(3), pedestalWidthBarrelValues[
i].getWidth(3), 3, qieCoder, qieShape)
81 : pedestalWidthBarrelValues[
i].getWidth(3);
85 auto const& pedestalEndcapValues = pedestalsAll[1].second;
86 auto const& pedestalWidthEndcapValues = pedestalWidthsAll[1].second;
87 auto const& qieDataEndcapValues = qieDataAll[1].second;
88 auto const& qieTypesEndcapValues = qieTypesAll[1].second;
90 #ifdef HCAL_MAHI_CPUDEBUG 91 assert(pedestalWidthEndcapValues.size() == pedestalEndcapValues.size());
92 assert(pedestalEndcapValues.size() == qieDataEndcapValues.size());
93 assert(pedestalEndcapValues.size() == qieTypesEndcapValues.size());
96 auto const offset = pedestalWidthBarrelValues.size();
97 for (
uint64_t i = 0;
i < pedestalEndcapValues.size(); ++
i) {
98 auto const& qieCoder = qieDataEndcapValues[
i];
99 auto const qieType = qieTypesEndcapValues[
i].getValue() > 1 ? 1 : 0;
100 auto const& qieShape = qieData.getShape(
qieType);
106 pedestalEndcapValues[
i].
getValue(0), pedestalWidthEndcapValues[
i].getWidth(0), 0, qieCoder, qieShape)
107 : pedestalWidthEndcapValues[
i].getWidth(0);
111 pedestalEndcapValues[
i].
getValue(1), pedestalWidthEndcapValues[
i].getWidth(1), 1, qieCoder, qieShape)
112 : pedestalWidthEndcapValues[
i].getWidth(1);
116 pedestalEndcapValues[
i].
getValue(2), pedestalWidthEndcapValues[
i].getWidth(2), 2, qieCoder, qieShape)
117 : pedestalWidthEndcapValues[
i].getWidth(2);
121 pedestalEndcapValues[
i].
getValue(3), pedestalWidthEndcapValues[
i].getWidth(3), 3, qieCoder, qieShape)
122 : pedestalWidthEndcapValues[
i].getWidth(3);
124 #ifdef HCAL_MAHI_CPUDEBUG 125 if (pedestalEndcapValues[
i].
rawId() == DETID_TO_DEBUG) {
126 for (
int i = 0;
i < 4;
i++)
127 printf(
"pedestalWidth(%d) = %f original pedestalWidth(%d) = %f\n",
131 pedestalWidthEndcapValues[
i].getWidth(3));
std::vector< float, cms::cuda::HostAllocator< float > > values_
unsigned long long uint64_t
const JetExtendedData & getValue(const Container &, const reco::JetBaseRef &)
get value for the association. Throw exception if no association found