Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:54:51

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)
0016         : m_charge(ch), m_momentum(mom), m_pathLength(len), m_rawDetId(rawDetId) {}
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     bool operator<(const DeDxHit &other) const { return m_charge < other.m_charge; }
0031 
0032   private:
0033     // Those data members should be "compressed" once usage
0034     // of ROOT/reflex precision specifier will be available in CMSSW
0035     float m_charge;
0036     float m_momentum;
0037     float m_pathLength;
0038     uint32_t m_rawDetId;
0039   };
0040 
0041   typedef std::vector<DeDxHit> DeDxHitCollection;
0042 
0043 }  // namespace reco
0044 #endif