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