CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
HBHERecHit.h
Go to the documentation of this file.
1 #ifndef DATAFORMATS_HCALRECHIT_HBHERECHIT_H
2 #define DATAFORMATS_HCALRECHIT_HBHERECHIT_H 1
3 
4 #include <vector>
5 
8 
13 class HBHERecHit : public CaloRecHit {
14 public:
16 
17  constexpr HBHERecHit()
18  : CaloRecHit(),
19  timeFalling_(0),
20  chiSquared_(-1),
21  rawEnergy_(-1.0e21),
22  auxEnergy_(-1.0e21),
23  auxHBHE_(0),
24  auxPhase1_(0),
25  auxTDC_(0) {}
26 
27  constexpr HBHERecHit(const HcalDetId& id, float energy, float timeRising, float timeFalling = 0)
28  : CaloRecHit(id, energy, timeRising),
30  chiSquared_(-1),
31  rawEnergy_(-1.0e21),
32  auxEnergy_(-1.0e21),
33  auxHBHE_(0),
34  auxPhase1_(0),
35  auxTDC_(0) {}
36 
38  constexpr inline float timeFalling() const { return timeFalling_; }
39  constexpr inline void setTimeFalling(float timeFalling) { timeFalling_ = timeFalling; }
41  constexpr inline HcalDetId id() const { return HcalDetId(detid()); }
42 
43  constexpr inline void setChiSquared(const float chi2) { chiSquared_ = chi2; }
44  constexpr inline float chi2() const { return chiSquared_; }
45 
46  constexpr inline void setRawEnergy(const float en) { rawEnergy_ = en; }
47  constexpr inline float eraw() const { return rawEnergy_; }
48 
49  constexpr inline void setAuxEnergy(const float en) { auxEnergy_ = en; }
50  constexpr inline float eaux() const { return auxEnergy_; }
51 
52  constexpr inline void setAuxHBHE(const uint32_t aux) { auxHBHE_ = aux; }
53  constexpr inline uint32_t auxHBHE() const { return auxHBHE_; }
54 
55  constexpr inline void setAuxPhase1(const uint32_t aux) { auxPhase1_ = aux; }
56  constexpr inline uint32_t auxPhase1() const { return auxPhase1_; }
57 
58  constexpr inline void setAuxTDC(const uint32_t aux) { auxTDC_ = aux; }
59  constexpr inline uint32_t auxTDC() const { return auxTDC_; }
60 
61  // The following method returns "true" for "Plan 1" merged rechits
62  bool isMerged() const;
63 
64  // The following method fills the vector with the ids of the
65  // rechits that have been merged to construct the "Plan 1" rechit.
66  // For normal (i.e., not merged) rechits the vector will be cleared.
67  void getMergedIds(std::vector<HcalDetId>* ids) const;
68 
69  // Returns the DetId of the front Id if it is a merged RecHit in "Plan 1"
70  HcalDetId idFront() const;
71 
72 private:
73  float timeFalling_;
74  float chiSquared_;
75  float rawEnergy_;
76  float auxEnergy_;
77  uint32_t auxHBHE_;
78  uint32_t auxPhase1_;
79  uint32_t auxTDC_;
80 };
81 
82 std::ostream& operator<<(std::ostream& s, const HBHERecHit& hit);
83 
84 #endif
constexpr float energy() const
Definition: CaloRecHit.h:29
constexpr uint32_t auxHBHE() const
Definition: HBHERecHit.h:53
constexpr uint32_t auxPhase1() const
Definition: HBHERecHit.h:56
constexpr const DetId & detid() const
Definition: CaloRecHit.h:33
float auxEnergy_
Definition: HBHERecHit.h:76
float chiSquared_
Definition: HBHERecHit.h:74
uint32_t auxPhase1_
Definition: HBHERecHit.h:78
HcalDetId idFront() const
Definition: HBHERecHit.cc:5
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:167
uint32_t auxTDC_
Definition: HBHERecHit.h:79
constexpr void setChiSquared(const float chi2)
Definition: HBHERecHit.h:43
constexpr void setAuxEnergy(const float en)
Definition: HBHERecHit.h:49
constexpr uint32_t auxTDC() const
Definition: HBHERecHit.h:59
constexpr void setAuxPhase1(const uint32_t aux)
Definition: HBHERecHit.h:55
constexpr void setTimeFalling(float timeFalling)
Definition: HBHERecHit.h:39
constexpr void setAuxTDC(const uint32_t aux)
Definition: HBHERecHit.h:58
constexpr HcalDetId id() const
get the id
Definition: HBHERecHit.h:41
HcalDetId key_type
Definition: HBHERecHit.h:15
bool isMerged() const
Definition: HBHERecHit.cc:14
constexpr void setAuxHBHE(const uint32_t aux)
Definition: HBHERecHit.h:52
float timeFalling_
Definition: HBHERecHit.h:73
uint32_t auxHBHE_
Definition: HBHERecHit.h:77
void getMergedIds(std::vector< HcalDetId > *ids) const
Definition: HBHERecHit.cc:30
constexpr float eaux() const
Definition: HBHERecHit.h:50
constexpr float chi2() const
Definition: HBHERecHit.h:44
constexpr float eraw() const
Definition: HBHERecHit.h:47
constexpr HBHERecHit(const HcalDetId &id, float energy, float timeRising, float timeFalling=0)
Definition: HBHERecHit.h:27
constexpr uint32_t aux() const
Definition: CaloRecHit.h:50
constexpr float timeFalling() const
get the hit falling time
Definition: HBHERecHit.h:38
float rawEnergy_
Definition: HBHERecHit.h:75
constexpr void setRawEnergy(const float en)
Definition: HBHERecHit.h:46
constexpr HBHERecHit()
Definition: HBHERecHit.h:17