CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DeDxHit.h
Go to the documentation of this file.
1 #ifndef TrackDeDxHits_H
2 #define TrackDeDxHits_H
4 #include <vector>
5 
6 namespace reco
7 {
11 class DeDxHit
12 {
13 
14 public:
15  DeDxHit() {}
16 
17  DeDxHit(float ch, float mom, float len, DetId detId);
18 
20  float charge() const {
21  return m_charge;
22  }
23 
25  float momentum() const {
26  return m_momentum;
27  }
28 
30  float pathLength() const {
31  return m_pathLength;
32  }
33 
35  int subDet() const {
36  return (m_subDetId >> 5) & 0x7;
37  }
38 
40  int subDetSide() const {
41  return ((m_subDetId >> 4) & 0x1) + 1;
42  }
43 
45  int layer() const {
46  return m_subDetId & 0xF;
47  }
48 
50  char subDetId() const {
51  return m_subDetId;
52  }
53 
54  bool operator< (const DeDxHit &other) const {
55  return m_charge < other.m_charge;
56  }
57 
58 private:
59  // Those data members should be "compressed" once usage
60  // of ROOT/reflex precision specifier will be available in CMSSW
61  float m_charge;
62  float m_momentum;
63  float m_pathLength;
64  char m_subDetId;
65 };
66 
67 typedef std::vector<DeDxHit> DeDxHitCollection;
68 
69 } // namespace reco
70 #endif
71 
int subDetSide() const
Return the plus/minus side for TEC/TID.
Definition: DeDxHit.h:40
float charge() const
Return the angle and thick normalized, calibrated energy release.
Definition: DeDxHit.h:20
char m_subDetId
Definition: DeDxHit.h:64
float m_pathLength
Definition: DeDxHit.h:63
std::vector< DeDxHit > DeDxHitCollection
Definition: DeDxHit.h:67
float m_momentum
Definition: DeDxHit.h:62
float momentum() const
Return the momentum of the trajectory at the interaction point.
Definition: DeDxHit.h:25
float pathLength() const
Return the path length.
Definition: DeDxHit.h:30
Definition: DetId.h:18
bool operator<(const DeDxHit &other) const
Definition: DeDxHit.h:54
char subDetId() const
Return the encoded layer + sub det id.
Definition: DeDxHit.h:50
int subDet() const
Return the subdet.
Definition: DeDxHit.h:35
int layer() const
Return the layer/disk.
Definition: DeDxHit.h:45
float m_charge
Definition: DeDxHit.h:61