13 const IndexType lastplusznonme42layer = 1404;
27 if (isi <= lastnonme42)
29 if (isi > lastplusznonme42) {
31 isi -= lastplusznonme42;
36 layerOffset = lastme13layer;
37 }
else if (isi >= firstme13)
39 istart = firstme13 - 1;
40 layerOffset = firstme13layer - 1;
46 layerOffset = lastnonme42layer;
54 ili += lastplusznonme42layer;
67 const IndexType lastplusznonme42layer = 1404;
81 if (ici <= lastnonme42)
83 if (ici > lastplusznonme42) {
85 ici -= lastplusznonme42;
90 layerOffset = lastme13layer;
91 }
else if (ici >= firstme13)
93 istart = firstme13 - 1;
94 layerOffset = firstme13layer - 1;
100 layerOffset = lastnonme42layer;
104 IndexType ichip = (ici - 1) % nchipPerLayer + 1;
105 IndexType ili = (ici - 1) / nchipPerLayer + 1;
108 ili += lastplusznonme42layer;
115 int ec =
id.endcap();
116 int st =
id.station();
118 int ch =
id.chamber();
122 if (st == 1 && rg == 4) {
127 return ec * 100000 + st * 10000 + rg * 1000 + ch * 10 + la;
131 const int n_types = 18;
132 const IndexType type_starts[n_types] = {1,
153 const int endcaps[n_types] = {1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2};
154 const int stations[n_types] = {1, 1, 1, 2, 2, 3, 3, 4, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4};
155 const int rings[n_types] = {1, 2, 3, 1, 2, 1, 2, 1, 1, 2, 3, 1, 2, 1, 2, 1, 2, 2};
158 std::vector<IndexType> v_type_starts(type_starts, type_starts + n_types);
167 IndexType igg_chamber_and_layer = (igg_chamber_etc - 1) / sectors_per_layer + 1;
170 int chamber = (igg_chamber_and_layer - 1) / 6 + 1;
171 int layer = (igg_chamber_and_layer - 1) % 6 + 1;
173 IndexType igg_hvseg_etc = (igg_chamber_etc - 1) % sectors_per_layer + 1;
176 IndexType hvsegment = (igg_hvseg_etc - 1) / chips_per_layer + 1;
177 IndexType chip = (igg_hvseg_etc - 1) % chips_per_layer + 1;
180 return std::make_tuple(
id, hvsegment, chip);
std::pair< CSCDetId, IndexType > detIdFromStripChannelIndex(LongIndexType ichi) const override
GasGainIndexType detIdFromGasGainIndex(IndexType igg) const override
constexpr std::array< uint8_t, layerIndexSize > layer
CSCDetId detIdFromLayerIndex(IndexType ili) const
int dbIndex(const CSCDetId &id, int &channel) const override
~CSCIndexerStartup() override
std::pair< CSCDetId, IndexType > detIdFromChipIndex(IndexType ichi) const override
IndexType sectorsPerLayer(IndexType is, IndexType ir) const
IndexType chipsPerLayer(IndexType is, IndexType ir) const override
std::tuple< CSCDetId, IndexType, IndexType > GasGainIndexType