28 uint32_t rawChi2 = 0x7F & (
flags()>>4);
29 return (
float)rawChi2 / (float)((1<<7)-1) * 64.;
36 uint32_t rawChi2Prob = 0x7F & (
flags()>>24);
37 return (
float)rawChi2Prob / (float)((1<<7)-1) * 64.;
42 uint32_t rawEnergy = (0x1FFF &
flags()>>11);
43 uint16_t exponent = rawEnergy>>10;
44 uint16_t significand = ~(0xE<<9) & rawEnergy;
45 return (
float) significand*
pow(10,exponent-5);
55 if ( chi2 > 64 ) chi2 = 64;
57 uint32_t rawChi2 = lround( chi2 / 64. * ((1<<7)-1) );
64 if ( energy > 0.001 ) {
65 uint16_t exponent = lround(floor(log10(energy)))+3;
66 uint16_t significand = lround(energy/
pow(10,exponent-5));
68 uint32_t rawEnergy = exponent<<10 | significand;
70 setFlags( ( ~(0x1FFF<<11) &
flags()) | ((rawEnergy & 0x1FFF)<<11) );
80 if ( chi2 > 64 ) chi2 = 64;
82 uint32_t rawChi2 = lround( chi2 / 64. * ((1<<7)-1) );
97 uint32_t timeErrorBits = 0xFF &
aux();
99 if( (0xFF & timeErrorBits) == 0x00 )
102 if( (0xFF & timeErrorBits) == 0xFF )
106 uint8_t exponent = timeErrorBits>>5;
107 uint8_t significand = timeErrorBits & ~(0x7<<5);
108 return pow(2.,exponent)*significand*LSB/1000.;
152 return s <<
"EcalRecHit undefined subdetector" ;
bool isTimeErrorValid() const
const DetId & detid() const
std::vector< Variable::Flags > flags
Flags recoFlag() const
DEPRECATED provided for temporary backward compatibility.
std::ostream & operator<<(std::ostream &out, const ALILine &li)
void setTimeError(uint8_t timeErrBits)
float outOfTimeEnergy() const
bool checkFlag(int flag) const
check if the flag is true
float outOfTimeChi2() const
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
void setFlags(uint32_t flags)
void setOutOfTimeChi2(float chi2)
void setOutOfTimeEnergy(float energy)
void setAux(uint32_t value)
Detector det() const
get the detector field from this detid
Power< A, B >::type pow(const A &a, const B &b)