19 <<
" det: " <<
det() <<
" subdet: " <<
subdetId() <<
" is not a valid RPC id";
26 <<
" det: " <<
det() <<
" subdet: " <<
subdetId() <<
" is not a valid RPC id";
32 this->
init(region, ring, station, sector, layer, subsector, roll);
42 bool barrel = (region == 0);
46 if (trlayer == 1 || trlayer == 2)
48 else if (trlayer == 3 || trlayer == 4)
51 station = trlayer - 2;
65 if (station == 3 && subs ==
"+")
68 (sector == 1 || sector == 2 || sector == 3 || sector == 5 || sector == 6 || sector == 7 || sector == 8 ||
69 sector == 10 || sector == 12) &&
74 if (station == 4 && sector == 4) {
89 if (roll ==
"Backward" || roll ==
"A")
91 else if (roll ==
"Central" || roll ==
"B")
93 else if (roll ==
"Forward" || roll ==
"C")
98 std::cout <<
"** RPC: DBSpecToDetUnit, how to assigne roll to: " << roll <<
" ???" << std::endl;
104 int eta_id = 6 +
ring;
110 int sector_id = sector * 3;
113 trIndex = (eta_id * 10000 + plane_id * 1000 + sector_id * 10 + copy_id) * 10 + roll_id;
116 int eta_id = trlayer;
118 eta_id = 12 - trlayer;
119 int plane_id =
abs(ring);
123 if (sector_id < 20) {
124 sector_id = 19 + 1 - sector_id;
126 sector_id = 36 + 20 - sector_id;
134 trIndex = (eta_id * 10000 + plane_id * 1000 + sector_id * 10 + copy_id) * 10 + roll_id;
141 int eta_id = trIndex / 100000;
147 }
else if (eta_id >= 9) {
154 trIndex = trIndex % 100000;
155 int plane_id = trIndex / 10000;
162 station = plane_id - 4;
165 trIndex = trIndex % 10000;
166 int sector_id = trIndex / 100;
177 if (!(ring == 1 && station > 1 && region == 1)) {
179 if (!(ring == 1 && station == 1 && region != 0)) {
188 if (sector_id < 20) {
189 sector_id = 19 + 1 - sector_id;
191 sector_id = 36 + 20 - sector_id;
194 trIndex = trIndex % 100;
195 int copy_id = trIndex / 10;
196 int sector = (sector_id - 1) / 3 + 1;
198 sector = (sector + 1) / 2;
204 if (ring == 1 && station > 1) {
206 subsector = ((sector_id + 1) / 2 - 1) % 3 + 1;
209 subsector = (sector_id - 1) % 6 + 1;
215 int roll = trIndex % 10;
216 this->
init(region, ring, station, sector, layer, subsector, roll);
227 if (region < minRegionId || region >
maxRegionId || ring < minRing || ring > maxRing || station <
minStationId ||
232 <<
" Invalid parameters: " 233 <<
" region " << region <<
" ring " << ring <<
" station " << station
234 <<
" sector " << sector <<
" layer " << layer <<
" subsector " << subsector
235 <<
" roll " << roll << std::endl;
249 int rollInBits =
roll;
258 os <<
" Re " <<
id.region() <<
" Ri " <<
id.ring() <<
" St " <<
id.station() <<
" Se " <<
id.sector() <<
" La " 259 <<
id.layer() <<
" Su " <<
id.subsector() <<
" Ro " <<
id.roll() <<
" Tr " <<
id.trIndex() <<
" ";
static const int maxStationId
static const unsigned int RingMask_
static const int SubSectorStartBit_
void buildfromDB(int region, int ring, int layer, int sector, const std::string &subsector, const std::string &roll, const std::string &dbname)
void buildfromTrIndex(int trIndex)
Built from the trigger det Index.
void init(int region, int ring, int station, int sector, int layer, int subsector, int roll)
static const int maxLayerId
std::ostream & operator<<(std::ostream &os, const RPCDetId &id)
static const int maxRingForwardId
static const int minRingBarrelId
static const int minSubSectorId
static const int LayerStartBit_
static const int minRollId
static const int minSectorId
static const int StationStartBit_
static const unsigned int SectorMask_
static const int minRegionId
static const unsigned int LayerMask_
static const int maxSubSectorId
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
static const int RingStartBit_
Abs< T >::type abs(const T &t)
static const int RegionStartBit_
static const int RegionMask_
static const unsigned int SubSectorMask_
static const int maxRollId
static const int SectorStartBit_
static const int RingBarrelOffSet
static const int maxRegionId
static const int minStationId
static const int RollStartBit_
static const unsigned int StationMask_
static const int maxRingBarrelId
static const int maxSectorId
int sector() const
Sector id: the group of chambers at same phi (and increasing r)
int subsector() const
SubSector id : some sectors are divided along the phi direction in subsectors (from 1 to 4 in Barrel...
static const int minRingForwardId
static const unsigned int RollMask_
static const int minLayerId
constexpr Detector det() const
get the detector field from this detid
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.