CMS 3D CMS Logo

CSCFrontRearLUT.cc

Go to the documentation of this file.
00001 #include <L1Trigger/CSCCommonTrigger/interface/CSCFrontRearLUT.h>
00002 
00003 unsigned CSCFrontRearLUT::getFRBit(int sector, int subsector, int station, int cscid)
00004 {
00005   unsigned dc=0, sector_type=0;
00006   unsigned fr_table[16][6]={{0,1,1,0,1,0},
00007                             {1,0,0,1,0,1},
00008                             {0,1,1,0,1,0},
00009                             {0,0,1,1,1,0},
00010                             {1,1,0,0,0,1},
00011                             {0,0,1,1,1,0},
00012                             {1,1,0,0,dc,dc},
00013                             {0,0,1,1,dc,dc},
00014                             {1,1,0,0,dc,dc},
00015                             {dc,dc,dc,dc,1,0},  // cscid 10-12 are me1a
00016                             {dc,dc,dc,dc,0,1},
00017                             {dc,dc,dc,dc,1,0},
00018                             {dc,dc,dc,dc,dc,dc},
00019                             {dc,dc,dc,dc,dc,dc},
00020                             {dc,dc,dc,dc,dc,dc},
00021                             {dc,dc,dc,dc,dc,dc}};
00022 
00023   switch(station)
00024     {
00025     case 1: sector_type = 4 + subsector;
00026       break;
00027     case 2: sector_type =  1 - (sector%2);
00028       break;
00029     case 3: sector_type = 3 - (sector%2);
00030       break;
00031     case 4: sector_type = 3 - (sector%2);
00032       break;
00033       //default:
00034       //cout << "+++ Error: unforeseen station " << stn << "in GetFRBit +++"; // replace with message logger or exception
00035     }
00036   return fr_table[cscid-1][sector_type];
00037 }

Generated on Tue Jun 9 17:39:41 2009 for CMSSW by  doxygen 1.5.4