CMS 3D CMS Logo

EcalUncalibratedRecHit.h
Go to the documentation of this file.
1 #ifndef DATAFORMATS_ECALUNCALIBRATEDRECHIT
2 #define DATAFORMATS_ECALUNCALIBRATEDRECHIT
3 
4 #include <vector>
7 
9 public:
10  typedef DetId key_type;
11 
12  enum Flags {
13  kGood = -1, // channel is good (mutually exclusive with other states) setFlagBit(kGood) reset flags_ to zero
14  kPoorReco, // channel has been badly reconstructed (e.g. bad shape, bad chi2 etc.)
15  kSaturated, // saturated channel
16  kOutOfTime, // channel out of time
17  kLeadingEdgeRecovered, // saturated channel: energy estimated from the leading edge before saturation
18  kHasSwitchToGain6, // at least one data frame is in G6
19  kHasSwitchToGain1 // at least one data frame is in G1
20 
21  };
22 
24 
26  const DetId& id, float ampl, float ped, float jit, float chi2, uint32_t flags = 0, uint32_t aux = 0);
27 
28  float amplitude() const { return amplitude_; }
29  float amplitudeError() const { return amplitudeError_; }
30  float pedestal() const { return pedestal_; }
31  float jitter() const { return jitter_; }
32  float chi2() const { return chi2_; }
33  float outOfTimeAmplitude(int bx) const { return OOTamplitudes_[bx]; }
34 
35  uint32_t flags() const { return flags_; }
36  float jitterError() const;
37  uint8_t jitterErrorBits() const;
38  DetId id() const { return id_; }
39 
41  void setAmplitudeError(float amplitudeerror) { amplitudeError_ = amplitudeerror; }
43  void setJitter(float jitter) { jitter_ = jitter; }
44  void setChi2(float chi2) { chi2_ = chi2; }
46 
47  void setJitterError(float jitterErr);
48  void setFlags(uint32_t flags) { flags_ = flags; }
49  void setId(DetId id) { id_ = id; }
50  void setAux(uint32_t aux) { aux_ = aux; }
51  void setFlagBit(Flags flag);
52  bool checkFlag(Flags flag) const;
53 
54  bool isSaturated() const;
55  bool isJitterValid() const;
56  bool isJitterErrorValid() const;
57 
58 private:
59  float amplitude_; //< Reconstructed amplitude
60  float amplitudeError_; //< Reconstructed amplitude uncertainty
61  float pedestal_; //< Reconstructed pedestal
62  float jitter_; //< Reconstructed time jitter
63  float chi2_; //< Chi2 of the pulse
64  //< Out-Of-Time reconstructed amplitude, one for each active BX, from readout sample 0 to 9
66  float OOTchi2_; //< Out-Of-Time Chi2
67  uint32_t flags_; //< flag to be propagated to RecHit
68  uint32_t aux_; //< aux word; first 8 bits contain time (jitter) error
69  DetId id_; //< Detector ID
70 };
71 
72 #endif
EcalDataFrame::MAXSAMPLES
static constexpr int MAXSAMPLES
Definition: EcalDataFrame.h:48
EcalUncalibratedRecHit::kHasSwitchToGain6
Definition: EcalUncalibratedRecHit.h:18
EcalUncalibratedRecHit::setAmplitudeError
void setAmplitudeError(float amplitudeerror)
Definition: EcalUncalibratedRecHit.h:41
EcalUncalibratedRecHit::setChi2
void setChi2(float chi2)
Definition: EcalUncalibratedRecHit.h:44
EcalUncalibratedRecHit::setPedestal
void setPedestal(float pedestal)
Definition: EcalUncalibratedRecHit.h:42
EcalUncalibratedRecHit::setFlags
void setFlags(uint32_t flags)
Definition: EcalUncalibratedRecHit.h:48
EcalUncalibratedRecHit::key_type
DetId key_type
Definition: EcalUncalibratedRecHit.h:10
EcalUncalibratedRecHit::amplitude
float amplitude() const
Definition: EcalUncalibratedRecHit.h:28
EcalUncalibratedRecHit::isJitterErrorValid
bool isJitterErrorValid() const
Definition: EcalUncalibratedRecHit.cc:85
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
EcalUncalibratedRecHit::jitterError
float jitterError() const
Definition: EcalUncalibratedRecHit.cc:29
EcalUncalibratedRecHit::jitterErrorBits
uint8_t jitterErrorBits() const
Definition: EcalUncalibratedRecHit.cc:94
EcalUncalibratedRecHit::setOutOfTimeAmplitude
void setOutOfTimeAmplitude(int bx, float amplitude)
Definition: EcalUncalibratedRecHit.h:45
EcalUncalibratedRecHit::id_
DetId id_
Definition: EcalUncalibratedRecHit.h:69
EcalUncalibratedRecHit::kGood
Definition: EcalUncalibratedRecHit.h:13
EcalUncalibratedRecHit::amplitude_
float amplitude_
Definition: EcalUncalibratedRecHit.h:59
EcalUncalibratedRecHit::EcalUncalibratedRecHit
EcalUncalibratedRecHit()
Definition: EcalUncalibratedRecHit.cc:5
EcalDataFrame.h
EcalUncalibratedRecHit::setFlagBit
void setFlagBit(Flags flag)
Definition: EcalUncalibratedRecHit.cc:99
EcalUncalibratedRecHit::amplitudeError_
float amplitudeError_
Definition: EcalUncalibratedRecHit.h:60
DetId
Definition: DetId.h:17
EcalUncalibratedRecHit::pedestal_
float pedestal_
Definition: EcalUncalibratedRecHit.h:61
EcalUncalibratedRecHit::kPoorReco
Definition: EcalUncalibratedRecHit.h:14
EcalUncalibratedRecHit::isJitterValid
bool isJitterValid() const
Definition: EcalUncalibratedRecHit.cc:78
EcalUncalibratedRecHit::kLeadingEdgeRecovered
Definition: EcalUncalibratedRecHit.h:17
EcalUncalibratedRecHit::kOutOfTime
Definition: EcalUncalibratedRecHit.h:16
EcalUncalibratedRecHit::OOTchi2_
float OOTchi2_
Definition: EcalUncalibratedRecHit.h:66
EcalUncalibratedRecHit::setJitter
void setJitter(float jitter)
Definition: EcalUncalibratedRecHit.h:43
EcalUncalibratedRecHit::chi2_
float chi2_
Definition: EcalUncalibratedRecHit.h:63
EcalUncalibratedRecHit::aux_
uint32_t aux_
Definition: EcalUncalibratedRecHit.h:68
EcalUncalibratedRecHit::setAmplitude
void setAmplitude(float amplitude)
Definition: EcalUncalibratedRecHit.h:40
EcalUncalibratedRecHit::id
DetId id() const
Definition: EcalUncalibratedRecHit.h:38
EcalUncalibratedRecHit::pedestal
float pedestal() const
Definition: EcalUncalibratedRecHit.h:30
EcalUncalibratedRecHit::checkFlag
bool checkFlag(Flags flag) const
Definition: EcalUncalibratedRecHit.cc:109
printConversionInfo.aux
aux
Definition: printConversionInfo.py:19
EcalUncalibratedRecHit::flags_
uint32_t flags_
Definition: EcalUncalibratedRecHit.h:67
EcalUncalibratedRecHit::chi2
float chi2() const
Definition: EcalUncalibratedRecHit.h:32
EcalUncalibratedRecHit::amplitudeError
float amplitudeError() const
Definition: EcalUncalibratedRecHit.h:29
EcalUncalibratedRecHit
Definition: EcalUncalibratedRecHit.h:8
EcalUncalibratedRecHit::Flags
Flags
Definition: EcalUncalibratedRecHit.h:12
EcalUncalibratedRecHit::setJitterError
void setJitterError(float jitterErr)
Definition: EcalUncalibratedRecHit.cc:45
EcalUncalibratedRecHit::jitter_
float jitter_
Definition: EcalUncalibratedRecHit.h:62
DetId.h
EcalUncalibratedRecHit::setAux
void setAux(uint32_t aux)
Definition: EcalUncalibratedRecHit.h:50
EcalUncalibratedRecHit::isSaturated
bool isSaturated() const
Definition: EcalUncalibratedRecHit.cc:27
EcalUncalibratedRecHit::kSaturated
Definition: EcalUncalibratedRecHit.h:15
EcalUncalibratedRecHit::jitter
float jitter() const
Definition: EcalUncalibratedRecHit.h:31
EcalUncalibratedRecHit::outOfTimeAmplitude
float outOfTimeAmplitude(int bx) const
Definition: EcalUncalibratedRecHit.h:33
EcalUncalibratedRecHit::kHasSwitchToGain1
Definition: EcalUncalibratedRecHit.h:19
EcalUncalibratedRecHit::setId
void setId(DetId id)
Definition: EcalUncalibratedRecHit.h:49
EcalUncalibratedRecHit::flags
uint32_t flags() const
Definition: EcalUncalibratedRecHit.h:35
EcalUncalibratedRecHit::OOTamplitudes_
float OOTamplitudes_[EcalDataFrame::MAXSAMPLES]
Definition: EcalUncalibratedRecHit.h:65
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:116