test
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 {
10 class DeDxHit {
11 public:
12  DeDxHit() {}
13  DeDxHit(float ch,float dist,float len,DetId detId);
14 
16  float charge() const {return m_charge;}
17 
19  float distance() const {return m_distance;}
20 
22  float pathLength() const {return m_pathLength;}
23 
25  int subDet() const {return (m_subDetId>>5)&0x7; }
26 
28  int subDetSide() const {return ((m_subDetId>>4)&0x1 )+ 1; }
29 
31  int layer() const {return m_subDetId & 0xF ; }
32 
34  char subDetId() const {return m_subDetId; }
35 
36  bool operator< (const DeDxHit & other) const {return m_charge < other.m_charge; }
37 
38 private:
39  //Those data members should be "compressed" once usage
40  //of ROOT/reflex precision specifier will be available in CMSSW
41  float m_charge;
42  float m_distance;
43  float m_pathLength;
44  char m_subDetId;
45 
46 };
47 
48 
49  typedef std::vector<DeDxHit> DeDxHitCollection;
50 
51 }
52 #endif
int subDetSide() const
Return the plus/minus side for TEC/TID.
Definition: DeDxHit.h:28
float charge() const
Return the angle and thick normalized, calibrated energy release.
Definition: DeDxHit.h:16
char m_subDetId
Definition: DeDxHit.h:44
float m_pathLength
Definition: DeDxHit.h:43
std::vector< DeDxHit > DeDxHitCollection
Definition: DeDxHit.h:49
float m_distance
Definition: DeDxHit.h:42
float pathLength() const
Return the path length.
Definition: DeDxHit.h:22
float distance() const
Return the distance of the hit from the interaction point.
Definition: DeDxHit.h:19
Definition: DetId.h:18
bool operator<(const DeDxHit &other) const
Definition: DeDxHit.h:36
char subDetId() const
Return the encoded layer + sub det id.
Definition: DeDxHit.h:34
int subDet() const
Return the subdet.
Definition: DeDxHit.h:25
int layer() const
Return the layer/disk.
Definition: DeDxHit.h:31
float m_charge
Definition: DeDxHit.h:41