12 const IndexType lastplusznonme42layer = 1404;
26 if (isi <= lastnonme42)
28 if (isi > lastplusznonme42) {
30 isi -= lastplusznonme42;
35 layerOffset = lastme13layer;
36 }
else if (isi >= firstme13)
38 istart = firstme13 - 1;
39 layerOffset = firstme13layer - 1;
45 layerOffset = lastnonme42layer;
53 ili += lastplusznonme42layer;
66 const IndexType lastplusznonme42layer = 1404;
80 if (ici <= lastnonme42)
82 if (ici > lastplusznonme42) {
84 ici -= lastplusznonme42;
89 layerOffset = lastme13layer;
90 }
else if (ici >= firstme13)
92 istart = firstme13 - 1;
93 layerOffset = firstme13layer - 1;
99 layerOffset = lastnonme42layer;
103 IndexType ichip = (ici - 1) % nchipPerLayer + 1;
104 IndexType ili = (ici - 1) / nchipPerLayer + 1;
107 ili += lastplusznonme42layer;
114 int ec =
id.endcap();
115 int st =
id.station();
117 int ch =
id.chamber();
121 if (st == 1 && rg == 4) {
126 return ec * 100000 + st * 10000 + rg * 1000 + ch * 10 + la;
130 const int n_types = 18;
131 const IndexType type_starts[n_types] = {1,
152 const int endcaps[n_types] = {1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2};
153 const int stations[n_types] = {1, 1, 1, 2, 2, 3, 3, 4, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4};
154 const int rings[n_types] = {1, 2, 3, 1, 2, 1, 2, 1, 1, 2, 3, 1, 2, 1, 2, 1, 2, 2};
157 std::vector<IndexType> v_type_starts(type_starts, type_starts + n_types);
166 IndexType igg_chamber_and_layer = (igg_chamber_etc - 1) / sectors_per_layer + 1;
169 int chamber = (igg_chamber_and_layer - 1) / 6 + 1;
170 int layer = (igg_chamber_and_layer - 1) % 6 + 1;
172 IndexType igg_hvseg_etc = (igg_chamber_etc - 1) % sectors_per_layer + 1;
175 IndexType hvsegment = (igg_hvseg_etc - 1) / chips_per_layer + 1;
176 IndexType chip = (igg_hvseg_etc - 1) % chips_per_layer + 1;
179 return boost::make_tuple(
id, hvsegment, chip);