6 : amplitude_(0.), amplitudeError_(0.), pedestal_(0.), jitter_(0.), chi2_(10000.), flags_(0), aux_(0) {
8 for (
unsigned int ibx = 0; ibx < nsample; ++ibx)
13 const DetId&
id,
float ampl,
float ped,
float jit,
float chi2, uint32_t flags, uint32_t
aux)
23 for (
unsigned int ibx = 0; ibx < nsample; ++ibx)
33 if ((0xFF & jitterErrorBits) == 0x00)
36 if ((0xFF & jitterErrorBits) == 0xFF)
40 uint8_t
exponent = jitterErrorBits >> 5;
41 uint8_t significand = jitterErrorBits & ~(0x7 << 5);
42 return (
float)(
std::pow(2, exponent) * significand * LSB) / (25. * 1000);
55 if (25 * jitterErr >= 5) {
61 float quantityInLSB = (1000 * 25 * jitterErr) / LSB;
62 int log2OfQuantity = (int)(log2(quantityInLSB));
63 int exponentTmp = log2OfQuantity - 4;
66 exponent = exponentTmp;
67 uint8_t significand = (int)(std::lround(quantityInLSB /
std::pow(2, exponent)));
70 if ((0xFF & jitterErrorBits) == 0xFF)
71 jitterErrorBits = 0xFE;
72 if ((0xFF & jitterErrorBits) == 0x00)
73 jitterErrorBits = 0x01;
75 aux_ = (~0xFF &
aux_) | (jitterErrorBits & 0xFF);
116 return flags_ & (0x1 << flag);
bool isJitterValid() const
void setJitterError(float jitterErr)
uint8_t jitterErrorBits() const
float OOTamplitudes_[EcalDataFrame::MAXSAMPLES]
bool checkFlag(Flags flag) const
float jitterError() const
void setFlagBit(Flags flag)
bool isJitterErrorValid() const
static constexpr int MAXSAMPLES
Power< A, B >::type pow(const A &a, const B &b)