CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_2_9_HLT1_bphpatch4/src/DataFormats/FP420Digi/interface/HDigiFP420.h

Go to the documentation of this file.
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 }
00011 
00012   HDigiFP420( int strip, int adc) : strip_(strip), adc_(adc) {
00013 }
00014     HDigiFP420( short strip, short adc) : strip_(strip), adc_(adc) {
00015 //    numStripsY = 200;        // Y plane number of strips:200*0.050=10mm (zside=1) H
00016 //    numStripsX = 400;        // X plane number of strips:400*0.050=20mm (zside=2) V
00017 }
00018 
00019   // Access to digi information
00020   int strip() const   {return strip_;}
00021   int adc() const     {return adc_;}
00022   int channel() const {return strip();}
00023 
00024   int stripVW() const {return (strip_/numStripsX);}
00025   //int stripVW() const {return (strip_/401);}
00026   int stripV() const {return (strip_-stripVW()*numStripsX);}
00027   //int stripHW() const {return (strip_/201) ;}
00028   int stripHW() const {return (strip_/numStripsY) ;}
00029   int stripH() const {return (strip_-stripHW()*numStripsY) ;}
00030   //                                             //
00031   //              int iy= istrip.channel()/numStripsY;
00032   //              int ix= istrip.channel() - iy*numStripsY;
00033   //                                             //
00034 private:
00035   static const int  numStripsY = 144;        // Y plate number of strips:144*0.050=7.2mm (xytype=1)
00036   static const int  numStripsX = 160;        // X plate number of strips:160*0.050=8.0mm (xytype=2)
00037   //static const int  numStripsY= 200 ;        // Y plate number of strips:200*0.050=10mm (zside=1)
00038   //static const int  numStripsX= 400 ;        // 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