6 amplitude_(0.), pedestal_(0.), jitter_(0.), chi2_(10000.), flags_(0), aux_(0) { }
10 amplitude_(ampl), pedestal_(ped), jitter_(jit), chi2_(chi2), flags_(flags), aux_(aux), id_(id) { }
21 uint32_t rawEnergy = (0x1FFF &
flags_>>4);
22 uint16_t exponent = rawEnergy>>10;
23 uint16_t significand = ~(0xE<<9) & rawEnergy;
24 return (
float) significand*
pow(10,exponent-5);
34 if ( energy > 0.001 ) {
35 uint16_t exponent = lround(floor(log10(energy)))+3;
36 uint16_t significand = lround(energy/
pow(10,exponent-5));
37 uint32_t rawEnergy = exponent<<10 | significand;
45 if ( chi2 > 64. ) chi2 = 64.;
46 uint32_t rawChi2 = lround( chi2 / 64. * ((1<<7)-1) );
53 uint32_t rawChi2 = 0x7F & (
flags_>>17);
54 return (
float)rawChi2 / (float)((1<<7)-1) * 64.;
62 if( (0xFF & jitterErrorBits) == 0x00)
65 if( (0xFF & jitterErrorBits) == 0xFF)
69 uint8_t exponent = jitterErrorBits>>5;
70 uint8_t significand = jitterErrorBits & ~(0x7<<5);
71 return (
float)(
pow(2.,exponent)*significand*LSB)/(25.*1000);
93 float quantityInLSB = (1000*25*jitterErr)/LSB;
94 int log2OfQuantity = (int) (log2( quantityInLSB ));
95 int exponentTmp = log2OfQuantity - 4;
97 if (exponentTmp>0) exponent = exponentTmp;
98 uint8_t significand = (int) ( lround( quantityInLSB /
pow(2.,exponent) ) );
101 if( (0xFF & jitterErrorBits) == 0xFF)
102 jitterErrorBits = 0xFE;
103 if( (0xFF & jitterErrorBits) == 0x00)
104 jitterErrorBits = 0x01;
106 aux_ = (~0xFF &
aux_) | (jitterErrorBits & 0xFF);
void setRecoFlag(uint32_t flags)
bool isJitterValid() const
virtual ~EcalUncalibratedRecHit()
std::vector< Variable::Flags > flags
void setJitterError(float jitterErr)
void setOutOfTimeChi2(float chi2)
float outOfTimeChi2() const
uint8_t jitterErrorBits() const
void setFlags(uint32_t flags)
float jitterError() const
uint32_t recoFlag() const
float outOfTimeEnergy() const
bool isJitterErrorValid() const
void setOutOfTimeEnergy(float energy)
Power< A, B >::type pow(const A &a, const B &b)