CMS 3D CMS Logo

HDigiFP420.h
Go to the documentation of this file.
1 #ifndef DataFormats_HDigiFP420_h
2 #define DataFormats_HDigiFP420_h
3 
4 class HDigiFP420 {
5 public:
6 
7  //typedef unsigned int ChannelType;
8 
9  HDigiFP420() : strip_(0), adc_(0) {
10 }
11 
12  HDigiFP420( int strip, int adc) : strip_(strip), adc_(adc) {
13 }
14  HDigiFP420( short strip, short adc) : strip_(strip), adc_(adc) {
15 // numStripsY = 200; // Y plane number of strips:200*0.050=10mm (zside=1) H
16 // numStripsX = 400; // X plane number of strips:400*0.050=20mm (zside=2) V
17 }
18 
19  // Access to digi information
20  int strip() const {return strip_;}
21  int adc() const {return adc_;}
22  int channel() const {return strip();}
23 
24  int stripVW() const {return (strip_/numStripsX);}
25  //int stripVW() const {return (strip_/401);}
26  int stripV() const {return (strip_-stripVW()*numStripsX);}
27  //int stripHW() const {return (strip_/201) ;}
28  int stripHW() const {return (strip_/numStripsY) ;}
29  int stripH() const {return (strip_-stripHW()*numStripsY) ;}
30  // //
31  // int iy= istrip.channel()/numStripsY;
32  // int ix= istrip.channel() - iy*numStripsY;
33  // //
34 private:
35  static const int numStripsY = 144; // Y plate number of strips:144*0.050=7.2mm (xytype=1)
36  static const int numStripsX = 160; // X plate number of strips:160*0.050=8.0mm (xytype=2)
37  //static const int numStripsY= 200 ; // Y plate number of strips:200*0.050=10mm (zside=1)
38  //static const int numStripsX= 400 ; // X plate number of strips:400*0.050=20mm (zside=2)
39  short strip_;
40  short adc_;
41 };
42 
43 // Comparison operators
44 inline bool operator<( const HDigiFP420& one, const HDigiFP420& other) {
45  return one.channel() < other.channel();
46 }
47 //std::ostream& operator<<(std::ostream& s, const HDigiFP420& hit) {
48 // return s << hit.channel() << ": " << hit.adc() << " adc, " << hit.strip() << " number";
49 //}
50 
51 #endif
int channel() const
Definition: HDigiFP420.h:22
HDigiFP420(short strip, short adc)
Definition: HDigiFP420.h:14
int stripVW() const
Definition: HDigiFP420.h:24
short adc_
Definition: HDigiFP420.h:40
HDigiFP420()
Definition: HDigiFP420.h:9
static const int numStripsY
Definition: HDigiFP420.h:35
int strip() const
Definition: HDigiFP420.h:20
static const int numStripsX
Definition: HDigiFP420.h:36
int adc() const
Definition: HDigiFP420.h:21
int stripH() const
Definition: HDigiFP420.h:29
short strip_
Definition: HDigiFP420.h:39
int stripHW() const
Definition: HDigiFP420.h:28
bool operator<(const HDigiFP420 &one, const HDigiFP420 &other)
Definition: HDigiFP420.h:44
int stripV() const
Definition: HDigiFP420.h:26
HDigiFP420(int strip, int adc)
Definition: HDigiFP420.h:12