Back to home page

Project CMSSW displayed by LXR

 
 

    


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  * Class defining the dedx hits, i.e. track hits with only dedx need informations
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     /// Return the angle and thick normalized, calibrated energy release
0019     float charge() const { return m_charge; }
0020 
0021     /// Return the momentum of the trajectory at the interaction point
0022     float momentum() const { return m_momentum; }
0023 
0024     /// Return the path length
0025     float pathLength() const { return m_pathLength; }
0026 
0027     /// Return the rawDetId
0028     uint32_t rawDetId() const { return m_rawDetId; }
0029 
0030     /// Return the error of the energy release
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     // Those data members should be "compressed" once usage
0037     // of ROOT/reflex precision specifier will be available in CMSSW
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 }  // namespace reco
0048 #endif