#include <EcalUncalibratedRecHit.h>
Public Types | |
enum | Flags { kGood, kPoorReco, kSaturated, kOutOfTime, kLeadingEdgeRecovered, kFake } |
typedef DetId | key_type |
Public Member Functions | |
double | amplitude () const |
double | chi2 () const |
EcalUncalibratedRecHit () | |
EcalUncalibratedRecHit (const DetId &detId, double ampl, double ped, double jit, double chi2, uint32_t flags=0, uint32_t aux=0) | |
DetId | id () const |
bool | isJitterErrorValid () const |
bool | isJitterValid () const |
bool | isSaturated () const |
double | jitter () const |
float | jitterError () const |
uint8_t | jitterErrorBits () const |
float | outOfTimeChi2 () const |
float | outOfTimeEnergy () const |
double | pedestal () const |
uint32_t | recoFlag () const |
void | setAmplitude (double amplitude) |
void | setAux (uint32_t aux) |
void | setChi2 (double chi2) |
void | setFlags (uint32_t flags) |
void | setId (DetId id) |
void | setJitter (double jitter) |
void | setJitterError (float jitterErr) |
void | setOutOfTimeChi2 (float chi2) |
void | setOutOfTimeEnergy (float energy) |
void | setPedestal (double pedestal) |
void | setRecoFlag (uint32_t flags) |
virtual | ~EcalUncalibratedRecHit () |
Private Attributes | |
double | amplitude_ |
uint32_t | aux_ |
double | chi2_ |
uint32_t | flags_ |
DetId | id_ |
double | jitter_ |
double | pedestal_ |
Definition at line 7 of file EcalUncalibratedRecHit.h.
Definition at line 11 of file EcalUncalibratedRecHit.h.
Definition at line 13 of file EcalUncalibratedRecHit.h.
{ kGood, // channel is good kPoorReco, // channel has been badly reconstructed (e.g. bad shape, bad chi2 etc.) kSaturated, // saturated channel kOutOfTime, // channel out of time kLeadingEdgeRecovered, // saturated channel: energy estimated from the leading edge before saturation kFake // the signal in the channel is a fake (e.g. a so-called spike) };
EcalUncalibratedRecHit::EcalUncalibratedRecHit | ( | ) |
Definition at line 5 of file EcalUncalibratedRecHit.cc.
EcalUncalibratedRecHit::EcalUncalibratedRecHit | ( | const DetId & | detId, |
double | ampl, | ||
double | ped, | ||
double | jit, | ||
double | chi2, | ||
uint32_t | flags = 0 , |
||
uint32_t | aux = 0 |
||
) |
EcalUncalibratedRecHit::~EcalUncalibratedRecHit | ( | ) | [virtual] |
Definition at line 12 of file EcalUncalibratedRecHit.cc.
{ }
double EcalUncalibratedRecHit::amplitude | ( | ) | const [inline] |
Definition at line 27 of file EcalUncalibratedRecHit.h.
References amplitude_.
Referenced by EcalURecHitHists::analyze(), EcalPulseShapeGrapher::analyze(), EcalSimpleUncalibRecHitFilter::filter(), CosmicClusterAlgo::makeCluster(), CosmicClusterAlgo::makeClusters(), EcalRecHitSimpleAlgo::makeRecHit(), EcalTBWeightUncalibRecHitProducer::produce(), EcalUncalibRecHitWorkerAnalFit::run(), and setAmplitude().
{ return amplitude_; }
double EcalUncalibratedRecHit::chi2 | ( | void | ) | const [inline] |
Definition at line 30 of file EcalUncalibratedRecHit.h.
References chi2_.
Referenced by EcalRecHitSimpleAlgo::makeRecHit(), and setChi2().
{ return chi2_; }
DetId EcalUncalibratedRecHit::id | ( | void | ) | const [inline] |
Definition at line 36 of file EcalUncalibratedRecHit.h.
References id_.
Referenced by EcalURecHitHists::analyze(), EcalPulseShapeGrapher::analyze(), EcalSimpleUncalibRecHitFilter::filter(), CosmicClusterAlgo::makeCluster(), EcalRecHitSimpleAlgo::makeRecHit(), EcalRecHitWorkerRecover::run(), EcalRecHitWorkerSimple::run(), and setId().
{ return id_; }
bool EcalUncalibratedRecHit::isJitterErrorValid | ( | ) | const |
Definition at line 118 of file EcalUncalibratedRecHit.cc.
References isJitterValid(), and jitterError().
{ if(!isJitterValid()) return false; if(jitterError() >= 10000) return false; return true; }
bool EcalUncalibratedRecHit::isJitterValid | ( | ) | const |
Definition at line 110 of file EcalUncalibratedRecHit.cc.
References jitterError().
Referenced by isJitterErrorValid().
{ if(jitterError() <= 0) return false; else return true; }
bool EcalUncalibratedRecHit::isSaturated | ( | ) | const |
Definition at line 15 of file EcalUncalibratedRecHit.cc.
References kSaturated, and recoFlag().
Referenced by EcalRecHitSimpleAlgo::makeRecHit().
{ return ( recoFlag() == kSaturated ); }
double EcalUncalibratedRecHit::jitter | ( | ) | const [inline] |
Definition at line 29 of file EcalUncalibratedRecHit.h.
References jitter_.
Referenced by EcalURecHitHists::analyze(), EcalRecHitSimpleAlgo::makeRecHit(), and setJitter().
{ return jitter_; }
float EcalUncalibratedRecHit::jitterError | ( | ) | const |
Definition at line 57 of file EcalUncalibratedRecHit.cc.
References aux_, jitterErrorBits(), and funct::pow().
Referenced by isJitterErrorValid(), and isJitterValid().
{ // stored in ps, but return BXs to match with jitter units uint32_t jitterErrorBits = 0xFF & aux_; // all bits off --> time reco bailed out (return negative value) if( (0xFF & jitterErrorBits) == 0x00) return -1; // all bits on --> time error over 5 ns (return large value) if( (0xFF & jitterErrorBits) == 0xFF) return 10000; float LSB = 1.26008; uint8_t exponent = jitterErrorBits>>5; uint8_t significand = jitterErrorBits & ~(0x7<<5); return (float)(pow(2.,exponent)*significand*LSB)/(25.*1000); }
uint8_t EcalUncalibratedRecHit::jitterErrorBits | ( | ) | const |
Definition at line 128 of file EcalUncalibratedRecHit.cc.
References aux_.
Referenced by jitterError(), EcalRecHitSimpleAlgo::makeRecHit(), and setJitterError().
{ uint8_t jitterErrorBits = 0xFF & aux_; return jitterErrorBits; }
float EcalUncalibratedRecHit::outOfTimeChi2 | ( | ) | const |
Definition at line 51 of file EcalUncalibratedRecHit.cc.
References flags_.
Referenced by EcalRecHitSimpleAlgo::makeRecHit().
{ uint32_t rawChi2 = 0x7F & (flags_>>17); return (float)rawChi2 / (float)((1<<7)-1) * 64.; }
float EcalUncalibratedRecHit::outOfTimeEnergy | ( | ) | const |
Definition at line 19 of file EcalUncalibratedRecHit.cc.
References flags_, and funct::pow().
Referenced by EcalRecHitSimpleAlgo::makeRecHit().
double EcalUncalibratedRecHit::pedestal | ( | ) | const [inline] |
Definition at line 28 of file EcalUncalibratedRecHit.h.
References pedestal_.
Referenced by setPedestal().
{ return pedestal_; }
uint32_t EcalUncalibratedRecHit::recoFlag | ( | ) | const [inline] |
Definition at line 31 of file EcalUncalibratedRecHit.h.
References flags_.
Referenced by isSaturated(), EcalRecHitSimpleAlgo::makeRecHit(), and EcalRecHitWorkerRecover::run().
{ return 0xF & flags_; }
void EcalUncalibratedRecHit::setAmplitude | ( | double | amplitude | ) | [inline] |
Definition at line 38 of file EcalUncalibratedRecHit.h.
References amplitude(), and amplitude_.
Referenced by EcalUncalibRecHitWorkerRatio::run().
{ amplitude_ = amplitude; }
void EcalUncalibratedRecHit::setAux | ( | uint32_t | aux | ) | [inline] |
Definition at line 50 of file EcalUncalibratedRecHit.h.
References printConversionInfo::aux, and aux_.
void EcalUncalibratedRecHit::setChi2 | ( | double | chi2 | ) | [inline] |
void EcalUncalibratedRecHit::setFlags | ( | uint32_t | flags | ) | [inline] |
Definition at line 43 of file EcalUncalibratedRecHit.h.
Referenced by setOutOfTimeChi2(), and setOutOfTimeEnergy().
void EcalUncalibratedRecHit::setId | ( | DetId | id | ) | [inline] |
void EcalUncalibratedRecHit::setJitter | ( | double | jitter | ) | [inline] |
Definition at line 40 of file EcalUncalibratedRecHit.h.
References jitter(), and jitter_.
Referenced by EcalUncalibRecHitWorkerRatio::run().
void EcalUncalibratedRecHit::setJitterError | ( | float | jitterErr | ) |
Definition at line 74 of file EcalUncalibratedRecHit.cc.
References aux_, jitterErrorBits(), and funct::pow().
Referenced by EcalUncalibRecHitWorkerRatio::run().
{ // use 8 bits (3 exp, 5 mant) and store in ps // has range of 5 ps - 5000 ps // expect input in BX units // all bits off --> time reco bailed out if(jitterErr < 0) { aux_ = (~0xFF & aux_); return; } // all bits on --> time error over 5 ns if(25*jitterErr >= 5) { aux_ = (0xFF | aux_); return; } float LSB = 1.26008; float quantityInLSB = (1000*25*jitterErr)/LSB; int log2OfQuantity = (int) (log2( quantityInLSB )); int exponentTmp = log2OfQuantity - 4; uint8_t exponent=0; if (exponentTmp>0) exponent = exponentTmp; uint8_t significand = (int) ( lround( quantityInLSB / pow(2.,exponent) ) ); uint32_t jitterErrorBits = exponent<<5 | significand; if( (0xFF & jitterErrorBits) == 0xFF) jitterErrorBits = 0xFE; if( (0xFF & jitterErrorBits) == 0x00) jitterErrorBits = 0x01; aux_ = (~0xFF & aux_) | (jitterErrorBits & 0xFF); }
void EcalUncalibratedRecHit::setOutOfTimeChi2 | ( | float | chi2 | ) |
Definition at line 42 of file EcalUncalibratedRecHit.cc.
References flags_, and setFlags().
void EcalUncalibratedRecHit::setOutOfTimeEnergy | ( | float | energy | ) |
Definition at line 32 of file EcalUncalibratedRecHit.cc.
References flags_, funct::pow(), and setFlags().
void EcalUncalibratedRecHit::setPedestal | ( | double | pedestal | ) | [inline] |
Definition at line 39 of file EcalUncalibratedRecHit.h.
References pedestal(), and pedestal_.
void EcalUncalibratedRecHit::setRecoFlag | ( | uint32_t | flags | ) |
Definition at line 27 of file EcalUncalibratedRecHit.cc.
References flags_.
Referenced by EcalUncalibRecHitWorkerGlobal::run().
double EcalUncalibratedRecHit::amplitude_ [private] |
Definition at line 57 of file EcalUncalibratedRecHit.h.
Referenced by amplitude(), and setAmplitude().
uint32_t EcalUncalibratedRecHit::aux_ [private] |
Definition at line 62 of file EcalUncalibratedRecHit.h.
Referenced by jitterError(), jitterErrorBits(), setAux(), and setJitterError().
double EcalUncalibratedRecHit::chi2_ [private] |
Definition at line 60 of file EcalUncalibratedRecHit.h.
uint32_t EcalUncalibratedRecHit::flags_ [private] |
Definition at line 61 of file EcalUncalibratedRecHit.h.
Referenced by outOfTimeChi2(), outOfTimeEnergy(), recoFlag(), setFlags(), setOutOfTimeChi2(), setOutOfTimeEnergy(), and setRecoFlag().
DetId EcalUncalibratedRecHit::id_ [private] |
Definition at line 63 of file EcalUncalibratedRecHit.h.
double EcalUncalibratedRecHit::jitter_ [private] |
Definition at line 59 of file EcalUncalibratedRecHit.h.
Referenced by jitter(), and setJitter().
double EcalUncalibratedRecHit::pedestal_ [private] |
Definition at line 58 of file EcalUncalibratedRecHit.h.
Referenced by pedestal(), and setPedestal().