17 uint32_t rawChi2 = 0x7F & (
flags()>>4);
18 return (
float)rawChi2 / (
float)((1<<7)-1) * 64.
f;
22 uint32_t rawChi2Prob = 0x7F & (
flags()>>24);
23 return (
float)rawChi2Prob / (
float)((1<<7)-1) * 64.
f;
27 uint32_t rawEnergy = (0x1FFF &
flags()>>11);
29 uint16_t significand = ~(0xE<<9) & rawEnergy;
30 return (
float) significand*
pow(10,exponent-5);
35 if ( chi2 > 64 ) chi2 = 64;
37 uint32_t rawChi2 = lround( chi2 / 64.
f * ((1<<7)-1) );
43 if ( energy > 0.001
f ) {
44 uint16_t
exponent = lround(floor(log10(energy)))+3;
45 uint16_t significand = lround(energy/
pow(10,exponent-5));
47 uint32_t rawEnergy = exponent<<10 | significand;
49 setFlags( ( ~(0x1FFF<<11) &
flags()) | ((rawEnergy & 0x1FFF)<<11) );
55 if ( chi2 > 64 ) chi2 = 64;
57 uint32_t rawChi2 = lround( chi2 / 64.
f * ((1<<7)-1) );
64 if(sOverNoise > 32.
f) sOverNoise = 32.f;
79 uint32_t timeErrorBits = 0xFF &
aux();
81 if( (0xFF & timeErrorBits) == 0x00 )
84 if( (0xFF & timeErrorBits) == 0xFF )
89 uint8_t significand = timeErrorBits & ~(0x7<<5);
90 return pow(2.,exponent)*significand*LSB/1000.f;
112 for (std::vector<int>::const_iterator flagPtr = flagsvec.begin();
113 flagPtr!= flagsvec.end(); ++flagPtr) {
132 return s <<
"HGCRecHit undefined subdetector" ;
constexpr float energy() const
void setSignalOverSigmaNoise(float sOverNoise)
uint8_t signalOverSigmaNoise_
constexpr const DetId & detid() const
bool checkFlags(const std::vector< int > &flagsvec) const
check if one of the flags in a set is true
bool isTimeErrorValid() const
float outOfTimeEnergy() const
float signalOverSigmaNoise() const
bool checkFlag(int flag) const
check if the flag is true
void setOutOfTimeEnergy(float energy)
std::ostream & operator<<(std::ostream &s, const HGCRecHit &hit)
uint32_t flagBits_
store rechit condition (see Flags enum) in a bit-wise way
constexpr float time() const
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
void setOutOfTimeChi2(float chi2)
constexpr void setFlags(uint32_t flags)
constexpr uint32_t aux() const
float outOfTimeChi2() const
constexpr void setAux(uint32_t value)
constexpr uint32_t flags() const
void setTimeError(uint8_t timeErrBits)
Power< A, B >::type pow(const A &a, const B &b)
constexpr Detector det() const
get the detector field from this detid