File indexing completed on 2024-06-22 02:23:23
0001 #ifndef TrackDeDxHits_H
0002 #define TrackDeDxHits_H
0003
0004 #include <cstdint>
0005 #include <vector>
0006
0007 namespace reco {
0008
0009
0010
0011 class DeDxHit {
0012 public:
0013 DeDxHit() {}
0014
0015 DeDxHit(float ch, float mom, float len, uint32_t rawDetId, float err = 0)
0016 : m_charge(ch), m_momentum(mom), m_pathLength(len), m_rawDetId(rawDetId), m_error(err) {}
0017
0018
0019 float charge() const { return m_charge; }
0020
0021
0022 float momentum() const { return m_momentum; }
0023
0024
0025 float pathLength() const { return m_pathLength; }
0026
0027
0028 uint32_t rawDetId() const { return m_rawDetId; }
0029
0030
0031 float error() const { return m_error; }
0032
0033 bool operator<(const DeDxHit &other) const { return m_charge < other.m_charge; }
0034
0035 private:
0036
0037
0038 float m_charge;
0039 float m_momentum;
0040 float m_pathLength;
0041 uint32_t m_rawDetId;
0042 float m_error;
0043 };
0044
0045 typedef std::vector<DeDxHit> DeDxHitCollection;
0046
0047 }
0048 #endif