CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CSCFrontRearLUT.cc
Go to the documentation of this file.
2 
3 unsigned CSCFrontRearLUT::getFRBit(int sector, int subsector, int station, int cscid)
4 {
5  unsigned dc=0, sector_type=0;
6  unsigned fr_table[16][6]={{0,1,1,0,1,0},
7  {1,0,0,1,0,1},
8  {0,1,1,0,1,0},
9  {0,0,1,1,1,0},
10  {1,1,0,0,0,1},
11  {0,0,1,1,1,0},
12  {1,1,0,0,dc,dc},
13  {0,0,1,1,dc,dc},
14  {1,1,0,0,dc,dc},
15  {dc,dc,dc,dc,1,0}, // cscid 10-12 are me1a
16  {dc,dc,dc,dc,0,1},
17  {dc,dc,dc,dc,1,0},
18  {dc,dc,dc,dc,dc,dc},
19  {dc,dc,dc,dc,dc,dc},
20  {dc,dc,dc,dc,dc,dc},
21  {dc,dc,dc,dc,dc,dc}};
22 
23  switch(station)
24  {
25  case 1: sector_type = 4 + subsector;
26  break;
27  case 2: sector_type = 1 - (sector%2);
28  break;
29  case 3: sector_type = 3 - (sector%2);
30  break;
31  case 4: sector_type = 3 - (sector%2);
32  break;
33  //default:
34  //std::cout << "+++ Error: unforeseen station " << stn << "in GetFRBit +++"; // replace with message logger or exception
35  }
36  return fr_table[cscid-1][sector_type];
37 }
static unsigned getFRBit(int sector, int subsector, int station, int cscid)