00001 #ifndef DataFormats_HDigiFP420_h 00002 #define DataFormats_HDigiFP420_h 00003 00004 class HDigiFP420 { 00005 public: 00006 00007 //typedef unsigned int ChannelType; 00008 00009 HDigiFP420() : strip_(0), adc_(0) { 00010 // numStripsY = 201; // Y plane number of strips:200*0.050=10mm (zside=1) H 00011 // numStripsX = 401; // X plane number of strips:400*0.050=20mm (zside=2) V 00012 } 00013 00014 HDigiFP420( int strip, int adc) : strip_(strip), adc_(adc) { 00015 } 00016 HDigiFP420( short strip, short adc) : strip_(strip), adc_(adc) { 00017 // numStripsY = 201; // Y plane number of strips:200*0.050=10mm (zside=1) H 00018 // numStripsX = 401; // X plane number of strips:400*0.050=20mm (zside=2) V 00019 } 00020 00021 // Access to digi information 00022 int strip() const {return strip_;} 00023 int adc() const {return adc_;} 00024 int channel() const {return strip();} 00025 00026 int stripVW() const {return (strip_/numStripsX);} 00027 //int stripVW() const {return (strip_/401);} 00028 int stripV() const {return (strip_-stripVW()*numStripsX);} 00029 //int stripHW() const {return (strip_/201) ;} 00030 int stripHW() const {return (strip_/numStripsY) ;} 00031 int stripH() const {return (strip_-stripHW()*numStripsY) ;} 00032 // // 00033 // int iy= istrip.channel()/numStripsY; 00034 // int ix= istrip.channel() - iy*numStripsY; 00035 // // 00036 private: 00037 static const int numStripsY= 201 ; // Y plate number of strips:200*0.050=10mm (zside=1) 00038 static const int numStripsX= 401 ; // X plate number of strips:400*0.050=20mm (zside=2) 00039 short strip_; 00040 short adc_; 00041 }; 00042 00043 // Comparison operators 00044 inline bool operator<( const HDigiFP420& one, const HDigiFP420& other) { 00045 return one.channel() < other.channel(); 00046 } 00047 //std::ostream& operator<<(std::ostream& s, const HDigiFP420& hit) { 00048 // return s << hit.channel() << ": " << hit.adc() << " adc, " << hit.strip() << " number"; 00049 //} 00050 00051 #endif