CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EcalUncalibratedRecHit.h
Go to the documentation of this file.
1 #ifndef DATAFORMATS_ECALUNCALIBRATEDRECHIT
2 #define DATAFORMATS_ECALUNCALIBRATEDRECHIT
3 
4 #include <vector>
6 
8 
9  public:
10 
11  typedef DetId key_type;
12 
13  enum Flags {
14  kGood, // channel is good
15  kPoorReco, // channel has been badly reconstructed (e.g. bad shape, bad chi2 etc.)
16  kSaturated, // saturated channel
17  kOutOfTime, // channel out of time
18  kLeadingEdgeRecovered, // saturated channel: energy estimated from the leading edge before saturation
19  kFake // the signal in the channel is a fake (e.g. a so-called spike)
20  };
21 
23  EcalUncalibratedRecHit(const DetId& detId, double ampl, double ped,
24  double jit, double chi2, uint32_t flags = 0, uint32_t aux = 0);
25 
26  virtual ~EcalUncalibratedRecHit();
27  double amplitude() const { return amplitude_; }
28  double pedestal() const { return pedestal_; }
29  double jitter() const { return jitter_; }
30  double chi2() const { return chi2_; }
31  uint32_t recoFlag() const { return 0xF & flags_; }
32  float outOfTimeEnergy() const;
33  float outOfTimeChi2() const;
34  float jitterError() const;
35  uint8_t jitterErrorBits() const;
36  DetId id() const { return id_; }
37 
39  void setPedestal( double pedestal ) { pedestal_ = pedestal; }
40  void setJitter( double jitter ) { jitter_ = jitter; }
41  void setJitterError( float jitterErr );
42  void setChi2( double chi2 ) { chi2_ = chi2; }
43  void setFlags( uint32_t flags ) { flags_ = flags; }
44  void setRecoFlag( uint32_t flags );
45  // set the energy for out of time events
46  // (only energy >= 0 will be stored)
47  void setOutOfTimeEnergy( float energy );
48  void setOutOfTimeChi2( float chi2 );
49  void setId( DetId id ) { id_ = id; }
50  void setAux( uint32_t aux ) { aux_ = aux; }
51 
52  bool isSaturated() const;
53  bool isJitterValid() const;
54  bool isJitterErrorValid() const;
55 
56  private:
57  double amplitude_; //< Reconstructed amplitude
58  double pedestal_; //< Reconstructed pedestal
59  double jitter_; //< Reconstructed time jitter
60  double chi2_; //< Chi2 of the fit
61  uint32_t flags_; //< flag to be propagated to RecHit
62  uint32_t aux_; //< aux word; first 8 bits contain time (jitter) error
63  DetId id_; //< Detector ID
64 };
65 
66 #endif
void setRecoFlag(uint32_t flags)
std::vector< Variable::Flags > flags
Definition: MVATrainer.cc:135
void setJitterError(float jitterErr)
void setPedestal(double pedestal)
void setJitter(double jitter)
void setFlags(uint32_t flags)
Definition: DetId.h:20
void setOutOfTimeEnergy(float energy)
void setAmplitude(double amplitude)