Go to the documentation of this file.00001 #ifndef DATAFORMATS_ECALUNCALIBRATEDRECHIT
00002 #define DATAFORMATS_ECALUNCALIBRATEDRECHIT
00003
00004 #include <vector>
00005 #include "DataFormats/DetId/interface/DetId.h"
00006
00007 class EcalUncalibratedRecHit {
00008
00009 public:
00010
00011 typedef DetId key_type;
00012
00013 enum Flags {
00014 kGood,
00015 kPoorReco,
00016 kSaturated,
00017 kOutOfTime,
00018 kLeadingEdgeRecovered,
00019 kFake
00020 };
00021
00022 EcalUncalibratedRecHit();
00023 EcalUncalibratedRecHit(const DetId& detId, double ampl, double ped,
00024 double jit, double chi2, uint32_t flags = 0, uint32_t aux = 0);
00025
00026 virtual ~EcalUncalibratedRecHit();
00027 double amplitude() const { return amplitude_; }
00028 double pedestal() const { return pedestal_; }
00029 double jitter() const { return jitter_; }
00030 double chi2() const { return chi2_; }
00031 uint32_t recoFlag() const { return 0xF & flags_; }
00032 float outOfTimeEnergy() const;
00033 float outOfTimeChi2() const;
00034 float jitterError() const;
00035 uint8_t jitterErrorBits() const;
00036 DetId id() const { return id_; }
00037
00038 void setAmplitude( double amplitude ) { amplitude_ = amplitude; }
00039 void setPedestal( double pedestal ) { pedestal_ = pedestal; }
00040 void setJitter( double jitter ) { jitter_ = jitter; }
00041 void setJitterError( float jitterErr );
00042 void setChi2( double chi2 ) { chi2_ = chi2; }
00043 void setFlags( uint32_t flags ) { flags_ = flags; }
00044 void setRecoFlag( uint32_t flags );
00045
00046
00047 void setOutOfTimeEnergy( float energy );
00048 void setOutOfTimeChi2( float chi2 );
00049 void setId( DetId id ) { id_ = id; }
00050 void setAux( uint32_t aux ) { aux_ = aux; }
00051
00052 bool isSaturated() const;
00053 bool isJitterValid() const;
00054 bool isJitterErrorValid() const;
00055
00056 private:
00057 double amplitude_;
00058 double pedestal_;
00059 double jitter_;
00060 double chi2_;
00061 uint32_t flags_;
00062 uint32_t aux_;
00063 DetId id_;
00064 };
00065
00066 #endif