CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CSCToAFEB.h
Go to the documentation of this file.
1 #ifndef CSCToAFEB_h
2 #define CSCToAFEB_h
3 
11 class CSCToAFEB{
12 
13 private:
18 public:
19 
21 
23 
24  for(int i=1; i<=6; i++) for(int j=1;j<=8;j++) {
25  if(i==1 || i==3 || i==5) {
26  if(j<5) layer_wire_to_channel_[i-1][j-1] =j+4;
27  if(j>4) layer_wire_to_channel_[i-1][j-1] =j+8;
28  }
29  if(i==2 || i==4 || i==6) {
30  if(j<5) layer_wire_to_channel_[i-1][j-1] =j;
31  if(j>4) layer_wire_to_channel_[i-1][j-1] =j+4;
32  }
33  }
34 
35  for(int i=1; i<=6; i++) for(int j=1;j<=8;j++)
36  layer_wire_to_board_[i-1][j-1]=(i-1)/2+1;
37 
38  for(int i=1; i<=4; i++) for(int j=1;j<=3;j++) {
39  if(i==1) {
40  if(j==1) station_ring_to_nmxafeb_[i-1][j-1]=18;
41  if(j==2) station_ring_to_nmxafeb_[i-1][j-1]=24;
42  if(j==3) station_ring_to_nmxafeb_[i-1][j-1]=12;
43  }
44  if(i==2) {
45  if(j==1) station_ring_to_nmxafeb_[i-1][j-1]=42;
46  if(j==2) station_ring_to_nmxafeb_[i-1][j-1]=24;
47  if(j==3) station_ring_to_nmxafeb_[i-1][j-1]=0;
48  }
49  if(i==3) {
50  if(j==1) station_ring_to_nmxafeb_[i-1][j-1]=36;
51  if(j==2) station_ring_to_nmxafeb_[i-1][j-1]=24;
52  if(j==3) station_ring_to_nmxafeb_[i-1][j-1]=0;
53  }
54  if(i==4) {
55  if(j==1) station_ring_to_nmxafeb_[i-1][j-1]=36;
56  if(j==2) station_ring_to_nmxafeb_[i-1][j-1]=24;
57  if(j==3) station_ring_to_nmxafeb_[i-1][j-1]=0;
58  }
59  }
60 
61  for(int i=1; i<=4; i++) for(int j=1;j<=3;j++) {
62  if(i==1) {
63  if(j==1) station_ring_to_nmxwire_[i-1][j-1]=48;
64  if(j==2) station_ring_to_nmxwire_[i-1][j-1]=64;
65  if(j==3) station_ring_to_nmxwire_[i-1][j-1]=32;
66  }
67  if(i==2) {
68  if(j==1) station_ring_to_nmxwire_[i-1][j-1]=112;
69  if(j==2) station_ring_to_nmxwire_[i-1][j-1]=64;
70  if(j==3) station_ring_to_nmxwire_[i-1][j-1]=0;
71  }
72  if(i==3) {
73  if(j==1) station_ring_to_nmxwire_[i-1][j-1]=96;
74  if(j==2) station_ring_to_nmxwire_[i-1][j-1]=64;
75  if(j==3) station_ring_to_nmxwire_[i-1][j-1]=0;
76  }
77  if(i==4) {
78  if(j==1) station_ring_to_nmxwire_[i-1][j-1]=96;
79  if(j==2) station_ring_to_nmxwire_[i-1][j-1]=64;
80  if(j==3) station_ring_to_nmxwire_[i-1][j-1]=0;
81  }
82  }
83 
84 
85  /*
86  layer_wire_to_channel_[6][8] = {{ 5,6,7,8,13,14,15,16 },
87  { 1,2,3,4, 9,10,11,12 },
88  { 5,6,7,8,13,14,15,16 },
89  { 1,2,3,4, 9,10,11,12 },
90  { 5,6,7,8,13,14,15,16 },
91  { 1,2,3,4, 9,10,11,12 }};
92  gives AFEB channel number for given layer and wire numbers.
93 
94  layer_wire_to_board_[6][8] = {{ 1,1,1,1,1,1,1,1 },
95  { 1,1,1,1,1,1,1,1 },
96  { 2,2,2,2,2,2,2,2 },
97  { 2,2,2,2,2,2,2,2 },
98  { 3,3,3,3,3,3,3,3 },
99  { 3,3,3,3,3,3,3,3 }};
100  gives position of AFEB in column for given layer and wire numbers.
101 
102  station_ring_to_nmxafeb_[4][3]= {{18?,24,12},
103  {42, 24,0 },
104  {36, 24,0 ],
105  {36, 24,0 }};
106  gives max. # of AFEBs in CSC of different types for given station and ring.
107 
108  station_ring_to_nmxwire_[4][3]= {{48?,64,32},
109  {112,64,0 },
110  {96, 64,0 ],
111  {96, 64,0 }};
112  gives max. # of wiregroups in one layer of CSC of different types
113  for given station and ring.
114  */
115  }
116 
118  int getAfebCh(int layer, int wiregroup) const;
120  int getAfebPos(int layer, int wiregroup) const;
122  int getLayer(int afeb, int channel) const;
124  int getWireGroup(int afeb, int channel) const;
126  int getMaxAfeb(int station, int ring) const;
128  int getMaxWire(int station, int ring) const;
129 
131  void print() const;
132 
133 };
134 
135 #endif
int i
Definition: DBlmapReader.cc:9
int getAfebCh(int layer, int wiregroup) const
return AFEB channel number
Definition: CSCToAFEB.cc:14
int getMaxAfeb(int station, int ring) const
return max. number of AFEBs
Definition: CSCToAFEB.cc:45
int station_ring_to_nmxafeb_[4][3]
Definition: CSCToAFEB.h:16
int getLayer(int afeb, int channel) const
return layer number
Definition: CSCToAFEB.cc:27
int j
Definition: DBlmapReader.cc:9
int getMaxWire(int station, int ring) const
return max. number of wiregroups per layer
Definition: CSCToAFEB.cc:50
int station_ring_to_nmxwire_[4][3]
Definition: CSCToAFEB.h:17
int getWireGroup(int afeb, int channel) const
return wiregroup number
Definition: CSCToAFEB.cc:35
CSCToAFEB()
Constructor.
Definition: CSCToAFEB.h:22
int layer_wire_to_channel_[6][8]
Definition: CSCToAFEB.h:14
void print() const
Print content.
int getAfebPos(int layer, int wiregroup) const
return AFEB position number
Definition: CSCToAFEB.cc:20
int layer_wire_to_board_[6][8]
Definition: CSCToAFEB.h:15