14 const IndexType lastplusznonme42layer = 1404;
31 if (isi <= lastnonme42) {
34 if (isi > lastplusznonme42) {
36 isi -= lastplusznonme42;
41 layerOffset = lastme13layer;
42 }
else if (isi >= firstme13)
44 istart = firstme13 - 1;
45 layerOffset = firstme13layer - 1;
48 }
else if (isi <= lastnonme1a)
51 layerOffset = lastnonme42layer;
56 if (isi > lastpluszme1a)
68 ili += lastplusznonme42layer;
77 return std::make_pair(
id, ichan);
89 const IndexType lastplusznonme42layer = 1404;
105 if (ici <= lastnonme42) {
108 if (ici > lastplusznonme42) {
110 ici -= lastplusznonme42;
115 layerOffset = lastme13layer;
116 }
else if (ici >= firstme13)
118 istart = firstme13 - 1;
119 layerOffset = firstme13layer - 1;
122 }
else if (ici <= lastnonme1a)
124 istart = lastnonme42;
125 layerOffset = lastnonme42layer;
130 if (ici > lastpluszme1a)
132 istart = lastnonme1a;
138 IndexType ichip = (ici - 1) % nchipPerLayer + 1;
139 IndexType ili = (ici - 1) / nchipPerLayer + 1;
142 ili += lastplusznonme42layer;
151 return std::make_pair(
id, ichip);
155 int ec =
id.endcap();
156 int st =
id.station();
158 int ch =
id.chamber();
161 return ec * 100000 + st * 10000 + rg * 1000 + ch * 10 + la;
165 const int n_types = 20;
166 const IndexType type_starts[n_types] = {1, 1081, 4321, 6913, 8533, 13933, 15553, 20953, 22573, 23653,
167 26893, 29485, 31105, 36505, 38125, 43525, 45145, 50545, 55945, 56593};
171 const int endcaps[n_types] = {1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 1, 2};
172 const int stations[n_types] = {1, 1, 1, 2, 2, 3, 3, 4, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 1, 1};
173 const int rings[n_types] = {1, 2, 3, 1, 2, 1, 2, 1, 1, 2, 3, 1, 2, 1, 2, 1, 2, 2, 4, 4};
176 std::vector<IndexType> v_type_starts(type_starts, type_starts + n_types);
185 IndexType igg_chamber_and_layer = (igg_chamber_etc - 1) / sectors_per_layer + 1;
188 int chamber = (igg_chamber_and_layer - 1) / 6 + 1;
189 int layer = (igg_chamber_and_layer - 1) % 6 + 1;
191 IndexType igg_hvseg_etc = (igg_chamber_etc - 1) % sectors_per_layer + 1;
194 IndexType hvsegment = (igg_hvseg_etc - 1) / chips_per_layer + 1;
195 IndexType chip = (igg_hvseg_etc - 1) % chips_per_layer + 1;
198 return boost::make_tuple(
id, hvsegment, chip);