8 triggerCSCID < MIN_CSCID || triggerCSCID >
MAX_CSCID)
9 throw cms::Exception(
"CSCTriggerNumbering::InvalidInput") <<
"CSCTriggerNumbering::ringFromTriggerLabels():" 10 <<
" Station: " << station
11 <<
" TriggerCSCID: " << triggerCSCID
12 <<
" is not a valid set of labels." 13 <<
" Cannot Convert!!";
20 else if(triggerCSCID <= 6)
35 if(TriggerSector < MIN_TRIGSECTOR || TriggerSector >
MAX_TRIGSECTOR ||
38 TriggerCSCID < MIN_CSCID || TriggerCSCID >
MAX_CSCID)
39 throw cms::Exception(
"CSCTriggerNumbering::InvalidInput") <<
"CSCTriggerNumbering::chamberFromTriggerLabels():" 40 <<
" Trigger Sector: " << TriggerSector
41 <<
" Trigger SubSector: " << TriggerSubSector
42 <<
" Station: " << station
43 <<
" TriggerCSCID: " << TriggerCSCID
44 <<
" is not a valid set of labels." 45 <<
" Cannot Convert!!";
49 int realsubsector = (TriggerSubSector + 2*(TriggerSector - 1))%12 + 1;
53 chamber = (TriggerCSCID + 3*(TriggerSector - 1))%18 + 1;
56 chamber = (TriggerCSCID + 6*(TriggerSector - 1) - 2)%36 + 1;
59 chamber = (TriggerCSCID + 3*(realsubsector - 1)+34)%36 + 1;
60 else if(TriggerCSCID <= 6)
61 chamber = (TriggerCSCID + 3*(realsubsector - 1)+31)%36 + 1;
63 chamber = (TriggerCSCID + 3*(realsubsector - 1)+28)%36 + 1;
70 if(TriggerSector < MIN_TRIGSECTOR || TriggerSector >
MAX_TRIGSECTOR ||
73 throw cms::Exception(
"CSCTriggerNumbering::InvalidInput") <<
"CSCTriggerNumbering::sectorFromTriggerLabels():" 74 <<
" Trigger Sector: " << TriggerSector
75 <<
" Trigger SubSector: " << TriggerSubSector
76 <<
" Station: " << station
77 <<
" is not a valid set of labels." 78 <<
" Cannot Convert!!";
80 return ((station == 1) ? ((TriggerSubSector + 2*(TriggerSector - 1))%12 + 1) : TriggerSector);
88 throw cms::Exception(
"CSCTriggerNumbering::InvalidInput") <<
"CSCTriggerNumbering::triggerSectorFromLabels():" 89 <<
" Station: " << station
91 <<
" Chamber: " << chamber
92 <<
" is not a valid set of labels." 93 <<
" Cannot Convert!!";
101 if(station > 1 && ring > 1 ) {
102 result = ((
static_cast<unsigned>(chamber-3) & 0x7f) / 6) + 1;
105 result = (station != 1) ? ((static_cast<unsigned>(chamber-2) & 0x1f) / 3) + 1 :
106 ((
static_cast<unsigned>(chamber-3) & 0x7f) / 6) + 1;
109 return (result <= 6) ? result : 6;
122 throw cms::Exception(
"CSCTriggerNumbering::InvalidInput") <<
"CSCTriggerNumbering::triggerSectorFromLabels():" 123 <<
" Station: " << station
124 <<
" Chamber: " << chamber
125 <<
" is not a valid set of labels." 126 <<
" Cannot Convert!!";
128 if(station != 1)
return 0;
142 chamber = ((chamber-1)%6) + 1;
144 return ((chamber-1) / 3) + 1;
157 throw cms::Exception(
"CSCTriggerNumbering::InvalidInput") <<
"CSCTriggerNumbering::triggerSectorFromLabels():" 158 <<
" Station: " << station
160 <<
" Chamber: " << chamber
161 <<
" is not a valid set of labels." 162 <<
" Cannot Convert!!";
181 result = (chamber+1) % 3 + 1;
184 result = (chamber+3) % 6 + 4;
static int maxStationId()
static int ringFromTriggerLabels(int station, int triggerCSCID)
static int minChamberId()
static int sectorFromTriggerLabels(int TriggerSector, int TriggerSubSector, int station)
static int minStationId()
static int triggerCscIdFromLabels(int station, int ring, int chamber)
static int maxChamberId()
static int triggerSectorFromLabels(int station, int ring, int chamber)
static int triggerSubSectorFromLabels(int station, int chamber)
static int chamberFromTriggerLabels(int TriggerSector, int TriggerSubSector, int station, int TriggerCSCID)