File indexing completed on 2024-04-06 11:58:11
0001
0002
0003
0004
0005
0006
0007 #include <iostream>
0008
0009 #include "CalibFormats/CastorObjects/interface/QieShape.h"
0010
0011 namespace reco {
0012 namespace castor {
0013
0014 QieShape::QieShape(const double fAdcShape[32], const double fAdcBin[32]) {
0015 for (int i = 0; i < 32; i++) {
0016 mLinearization[i] = fAdcShape[i];
0017 mBinSize[i] = fAdcBin[i];
0018
0019 }
0020 double factor = 1;
0021 for (int range = 1; range < 4; range++) {
0022 factor = factor * 5;
0023 int offset = 32 * range;
0024 mLinearization[offset] = mLinearization[offset - 2];
0025 for (int bin = 1; bin < 32; bin++) {
0026 mLinearization[offset + bin] =
0027 mLinearization[offset + bin - 1] +
0028 factor * (mLinearization[bin] - mLinearization[bin - 1]);
0029 mBinSize[offset + bin] = factor * mBinSize[bin];
0030 }
0031 }
0032 }
0033
0034 }
0035 }