CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/src/DataFormats/TrackReco/interface/DeDxHit.h

Go to the documentation of this file.
00001 #ifndef TrackDeDxHits_H
00002 #define TrackDeDxHits_H
00003 #include "DataFormats/DetId/interface/DetId.h"
00004 #include <vector>
00005 
00006 namespace reco {
00010 class DeDxHit {
00011 public:
00012   DeDxHit() {}
00013   DeDxHit(float ch,float dist,float len,DetId detId);
00014 
00016   float charge() const {return m_charge;}
00017 
00019   float distance() const {return m_distance;}
00020   
00022   float pathLength() const {return m_pathLength;}
00023  
00025   int subDet() const {return (m_subDetId>>5)&0x7; }
00026   
00028   int subDetSide() const {return ((m_subDetId>>4)&0x1 )+ 1; }
00029   
00031   int layer() const {return m_subDetId & 0xF ; }
00032 
00034   char subDetId() const {return m_subDetId; }
00035 
00036   bool operator< (const DeDxHit & other) const {return m_charge < other.m_charge; }
00037 
00038 private:
00039   //Those data members should be "compressed" once usage 
00040   //of ROOT/reflex precision specifier will be available in CMSSW
00041   float m_charge;
00042   float m_distance;
00043   float m_pathLength;
00044   char m_subDetId;
00045   
00046 };
00047 
00048 
00049   typedef std::vector<DeDxHit> DeDxHitCollection;
00050 
00051 }
00052 #endif