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 constexpr int RegionMask_
static constexpr int minLayerId
static constexpr unsigned int SectorMask_
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 constexpr unsigned int SubSectorMask_
static constexpr int SectorStartBit_
static constexpr int SubSectorStartBit_
static constexpr int minRingForwardId
static constexpr int minRingBarrelId
static constexpr unsigned int StationMask_
static constexpr unsigned int LayerMask_
std::ostream & operator<<(std::ostream &out, const ALILine &li)
constexpr std::array< uint8_t, layerIndexSize > layer
static constexpr int maxSectorId
static constexpr int maxRingBarrelId
static constexpr int RollStartBit_
static constexpr int minRegionId
static constexpr int maxRollId
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
static constexpr int minSubSectorId
Abs< T >::type abs(const T &t)
static constexpr int maxRingForwardId
static constexpr int RingStartBit_
static constexpr int StationStartBit_
static constexpr int LayerStartBit_
static constexpr int minStationId
static constexpr int minSectorId
static constexpr int RingBarrelOffSet
static constexpr int maxLayerId
static constexpr int maxRegionId
static constexpr int RegionStartBit_
static constexpr unsigned int RollMask_
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 constexpr unsigned int RingMask_
static constexpr int minRollId
static constexpr int maxSubSectorId
static constexpr int maxStationId
constexpr Detector det() const
get the detector field from this detid
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.