CMS 3D CMS Logo

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
HBHERecHit::auxHBHE
constexpr uint32_t auxHBHE() const
Definition: HBHERecHit.h:53
HBHERecHit::auxTDC_
uint32_t auxTDC_
Definition: HBHERecHit.h:79
CaloRecHit::energy
constexpr float energy() const
Definition: CaloRecHit.h:29
HBHERecHit::setAuxEnergy
constexpr void setAuxEnergy(const float en)
Definition: HBHERecHit.h:49
HBHERecHit::getMergedIds
void getMergedIds(std::vector< HcalDetId > *ids) const
Definition: HBHERecHit.cc:30
HBHERecHit::eraw
constexpr float eraw() const
Definition: HBHERecHit.h:47
HBHERecHit
Definition: HBHERecHit.h:13
HBHERecHit::auxTDC
constexpr uint32_t auxTDC() const
Definition: HBHERecHit.h:59
HBHERecHit::chi2
constexpr float chi2() const
Definition: HBHERecHit.h:44
HBHERecHit::chiSquared_
float chiSquared_
Definition: HBHERecHit.h:74
CaloRecHit
Definition: CaloRecHit.h:23
HBHERecHit::timeFalling
constexpr float timeFalling() const
get the hit falling time
Definition: HBHERecHit.h:38
CaloRecHit::detid
constexpr const DetId & detid() const
Definition: CaloRecHit.h:33
CaloRecHit.h
HBHERecHit::setAuxHBHE
constexpr void setAuxHBHE(const uint32_t aux)
Definition: HBHERecHit.h:52
HBHERecHit::isMerged
bool isMerged() const
Definition: HBHERecHit.cc:14
HBHERecHit::HBHERecHit
constexpr HBHERecHit()
Definition: HBHERecHit.h:17
alignCSCRings.s
s
Definition: alignCSCRings.py:92
HBHERecHit::setAuxTDC
constexpr void setAuxTDC(const uint32_t aux)
Definition: HBHERecHit.h:58
HBHERecHit::auxPhase1_
uint32_t auxPhase1_
Definition: HBHERecHit.h:78
HBHERecHit::timeFalling_
float timeFalling_
Definition: HBHERecHit.h:73
HBHERecHit::idFront
HcalDetId idFront() const
Definition: HBHERecHit.cc:5
HBHERecHit::setChiSquared
constexpr void setChiSquared(const float chi2)
Definition: HBHERecHit.h:43
HBHERecHit::setRawEnergy
constexpr void setRawEnergy(const float en)
Definition: HBHERecHit.h:46
operator<<
std::ostream & operator<<(std::ostream &s, const HBHERecHit &hit)
Definition: HBHERecHit.cc:16
HcalDetId.h
HcalDetId
Definition: HcalDetId.h:12
HBHERecHit::auxPhase1
constexpr uint32_t auxPhase1() const
Definition: HBHERecHit.h:56
HBHERecHit::rawEnergy_
float rawEnergy_
Definition: HBHERecHit.h:75
HBHERecHit::auxHBHE_
uint32_t auxHBHE_
Definition: HBHERecHit.h:77
HBHERecHit::setTimeFalling
constexpr void setTimeFalling(float timeFalling)
Definition: HBHERecHit.h:39
HBHERecHit::key_type
HcalDetId key_type
Definition: HBHERecHit.h:15
CaloRecHit::aux
constexpr uint32_t aux() const
Definition: CaloRecHit.h:50
HBHERecHit::id
constexpr HcalDetId id() const
get the id
Definition: HBHERecHit.h:41
HBHERecHit::auxEnergy_
float auxEnergy_
Definition: HBHERecHit.h:76
HBHERecHit::eaux
constexpr float eaux() const
Definition: HBHERecHit.h:50
hit
Definition: SiStripHitEffFromCalibTree.cc:88
HBHERecHit::HBHERecHit
constexpr HBHERecHit(const HcalDetId &id, float energy, float timeRising, float timeFalling=0)
Definition: HBHERecHit.h:27
HBHERecHit::setAuxPhase1
constexpr void setAuxPhase1(const uint32_t aux)
Definition: HBHERecHit.h:55