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 
9 
14 class HBHERecHit : public CaloRecHit {
15 public:
17 
18  HBHERecHit();
19  //HBHERecHit(const HcalDetId& id, float energy, float time);
20  HBHERecHit(const HcalDetId& id, float amplitude, float timeRising, float timeFalling=0);
21 
23  inline float timeFalling() const { return timeFalling_; }
25  inline HcalDetId id() const { return HcalDetId(detid()); }
26 
27  inline void setChiSquared(const float chi2) {chiSquared_ = chi2;}
28  inline float chi2() const {return chiSquared_;}
29 
30  inline void setRawEnergy(const float en) {rawEnergy_ = en;}
31  inline float eraw() const {return rawEnergy_;}
32 
33  inline void setAuxEnergy(const float en) {auxEnergy_ = en;}
34  inline float eaux() const {return auxEnergy_;}
35 
36  inline void setAuxHBHE(const uint32_t aux) { auxHBHE_ = aux;}
37  inline uint32_t auxHBHE() const {return auxHBHE_;}
38 
39  inline void setAuxPhase1(const uint32_t aux) { auxPhase1_ = aux;}
40  inline uint32_t auxPhase1() const {return auxPhase1_;}
41 
42  // The following method returns "true" for "Plan 1" merged rechits
43  bool isMerged() const;
44 
45  // The following method fills the vector with the ids of the
46  // rechits that have been merged to construct the "Plan 1" rechit.
47  // For normal (i.e., not merged) rechits the vector will be cleared.
48  void getMergedIds(std::vector<HcalDetId>* ids) const;
49 
50  // Returns the DetId of the front Id if it is a merged RecHit in "Plan 1"
51  HcalDetId idFront() const;
52 private:
53  float timeFalling_;
54  float chiSquared_;
55  float rawEnergy_;
56  float auxEnergy_;
57  uint32_t auxHBHE_;
58  uint32_t auxPhase1_;
59 };
60 
61 std::ostream& operator<<(std::ostream& s, const HBHERecHit& hit);
62 
63 
64 #endif
float chi2() const
Definition: HBHERecHit.h:28
uint32_t aux() const
Definition: CaloRecHit.h:27
const DetId & detid() const
Definition: CaloRecHit.h:21
float auxEnergy_
Definition: HBHERecHit.h:56
HcalDetId id() const
get the id
Definition: HBHERecHit.h:25
uint32_t auxPhase1() const
Definition: HBHERecHit.h:40
float chiSquared_
Definition: HBHERecHit.h:54
uint32_t auxPhase1_
Definition: HBHERecHit.h:58
HcalDetId idFront() const
Definition: HBHERecHit.cc:67
HcalDetId key_type
Definition: HBHERecHit.h:16
bool isMerged() const
Definition: HBHERecHit.cc:40
float timeFalling_
Definition: HBHERecHit.h:53
void setAuxHBHE(const uint32_t aux)
Definition: HBHERecHit.h:36
float timeFalling() const
get the hit falling time
Definition: HBHERecHit.h:23
uint32_t auxHBHE_
Definition: HBHERecHit.h:57
void getMergedIds(std::vector< HcalDetId > *ids) const
Definition: HBHERecHit.cc:45
uint32_t auxHBHE() const
Definition: HBHERecHit.h:37
void setAuxEnergy(const float en)
Definition: HBHERecHit.h:33
void setChiSquared(const float chi2)
Definition: HBHERecHit.h:27
float eraw() const
Definition: HBHERecHit.h:31
void setRawEnergy(const float en)
Definition: HBHERecHit.h:30
void setAuxPhase1(const uint32_t aux)
Definition: HBHERecHit.h:39
float eaux() const
Definition: HBHERecHit.h:34
float rawEnergy_
Definition: HBHERecHit.h:55
std::ostream & operator<<(std::ostream &s, const HBHERecHit &hit)
Definition: HBHERecHit.cc:26