7 amplitude_(0.), amplitudeError_(0.), pedestal_(0.), jitter_(0.), chi2_(10000.), flags_(0), aux_(0) {
9 for(
unsigned int ibx=0; ibx<nsample; ++ibx)
OOTamplitudes_[ibx] = 0.;
13 float jit,
float chi2, uint32_t
flags, uint32_t
aux):
14 amplitude_(ampl), amplitudeError_(0.), pedestal_(ped), jitter_(jit), chi2_(chi2), flags_(flags), aux_(aux), id_(id) {
16 for(
unsigned int ibx=0; ibx<nsample; ++ibx)
OOTamplitudes_[ibx] = 0.;
29 if( (0xFF & jitterErrorBits) == 0x00)
32 if( (0xFF & jitterErrorBits) == 0xFF)
36 uint8_t
exponent = jitterErrorBits>>5;
37 uint8_t significand = jitterErrorBits & ~(0x7<<5);
38 return (
float)(
std::pow(2,exponent)*significand*LSB)/(25.*1000);
60 float quantityInLSB = (1000*25*jitterErr)/LSB;
61 int log2OfQuantity = (int) (log2( quantityInLSB ));
62 int exponentTmp = log2OfQuantity - 4;
64 if (exponentTmp>0) exponent = exponentTmp;
65 uint8_t significand = (int) ( std::lround( quantityInLSB /
std::pow(2,exponent) ) );
68 if( (0xFF & jitterErrorBits) == 0xFF)
69 jitterErrorBits = 0xFE;
70 if( (0xFF & jitterErrorBits) == 0x00)
71 jitterErrorBits = 0x01;
73 aux_ = (~0xFF &
aux_) | (jitterErrorBits & 0xFF);
114 if(flag ==
kGood){
if ( !
flags_ )
return true;
else return false;}
115 return flags_ & ( 0x1<<flag);
bool isJitterValid() const
std::vector< Variable::Flags > flags
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 const int MAXSAMPLES
Power< A, B >::type pow(const A &a, const B &b)