20 uint32_t rawChi2 = 0x7F & (
flags()>>4);
21 return (
float)rawChi2 / (float)((1<<7)-1) * 64.;
28 uint32_t rawChi2Prob = 0x7F & (
flags()>>24);
29 return (
float)rawChi2Prob / (float)((1<<7)-1) * 64.;
34 uint32_t rawEnergy = (0x1FFF &
flags()>>11);
35 uint16_t exponent = rawEnergy>>10;
36 uint16_t significand = ~(0xE<<9) & rawEnergy;
37 return (
float) significand*
pow(10,exponent-5);
47 if ( chi2 > 64 ) chi2 = 64;
49 uint32_t rawChi2 = lround( chi2 / 64. * ((1<<7)-1) );
56 if ( energy > 0.001 ) {
57 uint16_t exponent = lround(floor(log10(energy)))+3;
58 uint16_t significand = lround(energy/
pow(10,exponent-5));
60 uint32_t rawEnergy = exponent<<10 | significand;
62 setFlags( ( ~(0x1FFF<<11) &
flags()) | ((rawEnergy & 0x1FFF)<<11) );
72 if ( chi2 > 64 ) chi2 = 64;
74 uint32_t rawChi2 = lround( chi2 / 64. * ((1<<7)-1) );
89 uint32_t timeErrorBits = 0xFF &
aux();
91 if( (0xFF & timeErrorBits) == 0x00 )
94 if( (0xFF & timeErrorBits) == 0xFF )
98 uint8_t exponent = timeErrorBits>>5;
99 uint8_t significand = timeErrorBits & ~(0x7<<5);
100 return pow(2.,exponent)*significand*LSB/1000.;
126 for (std::vector<int>::const_iterator flagPtr = flagsvec.begin();
127 flagPtr!= flagsvec.end(); ++flagPtr) {
154 return s <<
"EcalRecHit undefined subdetector" ;
bool isTimeErrorValid() const
bool checkFlags(const std::vector< int > &flagsvec) const
check if one of the flags in a set is true
const DetId & detid() const
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)