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=-1, // channel is good (mutually exclusive with other states) setFlagBit(kGood) reset flags_ to zero
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  kHasSwitchToGain6, // at least one data frame is in G6
20  kHasSwitchToGain1 // at least one data frame is in G1
21 
22  };
23 
25  EcalUncalibratedRecHit(const DetId& detId, float ampl, float ped,
26  float jit, float chi2, uint32_t flags = 0, uint32_t aux = 0);
27 
28  virtual ~EcalUncalibratedRecHit();
29  float amplitude() const { return amplitude_; }
30  float pedestal() const { return pedestal_; }
31  float jitter() const { return jitter_; }
32  float chi2() const { return chi2_; }
33  float outOfTimeEnergy() const { return OOTamplitude_; }
34  float outOfTimeChi2() const { return OOTchi2_; }
35 
36  uint32_t flags() const { return flags_; }
37  float jitterError() const;
38  uint8_t jitterErrorBits() const;
39  DetId id() const { return id_; }
40 
42  void setPedestal( float pedestal ) { pedestal_ = pedestal; }
43  void setJitter( float jitter ) { jitter_ = jitter; }
44  void setChi2( float chi2 ) { chi2_ = chi2; }
46  void setOutOfTimeChi2( float chi2 ){ OOTchi2_ = chi2; }
47 
48  void setJitterError( float jitterErr );
49  void setFlags( uint32_t flags ) { flags_ = flags; }
50  void setId( DetId id ) { id_ = id; }
51  void setAux( uint32_t aux ) { aux_ = aux; }
52  void setFlagBit(Flags flag);
53  bool checkFlag(Flags flag) const;
54 
55  bool isSaturated() const;
56  bool isJitterValid() const;
57  bool isJitterErrorValid() const;
58 
59  private:
60  float amplitude_; //< Reconstructed amplitude
61  float pedestal_; //< Reconstructed pedestal
62  float jitter_; //< Reconstructed time jitter
63  float chi2_; //< Chi2 of the pulse
64  float OOTamplitude_; //< Out-Of-Time reconstructed amplitude
65  float OOTchi2_; //< Out-Of-Time Chi2
66  uint32_t flags_; //< flag to be propagated to RecHit
67  uint32_t aux_; //< aux word; first 8 bits contain time (jitter) error
68  DetId id_; //< Detector ID
69 };
70 
71 #endif
long int flag
Definition: mlp_lapack.h:47
void setJitter(float jitter)
void setJitterError(float jitterErr)
void setOutOfTimeChi2(float chi2)
void setFlags(uint32_t flags)
bool checkFlag(Flags flag) const
Definition: DetId.h:20
void setPedestal(float pedestal)
void setOutOfTimeEnergy(float energy)
void setAmplitude(float amplitude)