186 {
187
188
189
190
191
192
193 constexpr int otherSideIndex{1};
194 constexpr int maxEtaIndex{3};
196 int nElements = 0;
197
198
199
201 if(elements[n]) {
202 elementIndex[nElements++] =
n;
203 }
204 }
205
206 if(!nElements) return StatusCode::SUCCESS;
207
208
209 const InDetDD::SiDetectorElement* element = elements[0];
210 bool isEndcap = element->
isEndcap();
211
212 std::vector<StripInformationHelper> stripInfos;
213 stripInfos.reserve(clusters[0].
size());
214
215
216 for (auto& cluster_index : clusters[0]) {
217 size_t stripIndex = -1;
218 auto ends =
getStripEnds(cluster_index.first, element, stripIndex);
219 const auto& localPos = cluster_index.first->localPosition<1>();
220 StripInformationHelper stripInfo(cluster_index.first->identifierHash(), ends.first, ends.second, beamSpotVertex, localPos(0, 0), cluster_index.second, stripIndex);
221 stripInfos.push_back( std::move(stripInfo) );
222 }
223
225 double slimit = 0.;
226
228
230 for(;
n < nElements; ++
n) {
231 int currentIndex = elementIndex[
n];
232 if(currentIndex > maxEtaIndex) break;
233
234
235 const InDetDD::SiDetectorElement* currentElement = elements[currentIndex];
236
237
238 double min = overlapExtents[currentIndex*2-2];
239 double max = overlapExtents[currentIndex*2-1];
240
242
246 }
247
248 StripInformationHelper currentStripInfo;
249 for (auto& cluster_index : clusters[currentIndex]) {
250 bool processed = false;
251 const auto& currentLocalPos = cluster_index.first->localPosition<1>();
252
253 for(auto& stripInfo : stripInfos) {
254 double diff = currentLocalPos(0, 0)-stripInfo.locX();
255
256
258
260
261 if (not processed) {
262 processed = true;
263 size_t currentStripIndex = 0;
264 auto ends =
getStripEnds(cluster_index.first, currentElement, currentStripIndex);
265 currentStripInfo.set(cluster_index.first->identifierHash(), ends.first, ends.second, beamSpotVertex, currentLocalPos(0, 0), cluster_index.second, currentStripIndex);
266 }
267
268
269 if (currentIndex==otherSideIndex) {
271 } else {
273 }
274 }
275 }
276 }
277
278
279 for(;
n < nElements; ++
n) {
280 int currentIndex = elementIndex[
n];
281 const InDetDD::SiDetectorElement* currentElement = elements[currentIndex];
282
283 double min = overlapExtents[4*currentIndex-10];
284 double max = overlapExtents[4*currentIndex- 9];
285
288
292 }
293
294 std::vector<StripInformationHelper*> stripPhiInfos;
295 stripPhiInfos.reserve(stripInfos.size());
296
297 for(auto& stripInfo : stripInfos) {
298 auto stripIndex = stripInfo.stripIndex();
299 auto localPosition = stripInfo.locX();
300 auto centralValue = localPosition;
304 centralValue = stripIndex;
307 }
308
310 stripPhiInfos.push_back(&stripInfo);
311 }
312 }
313
314 if(stripPhiInfos.empty()) continue;
315
316 min = overlapExtents[4*currentIndex-8];
317 max = overlapExtents[4*currentIndex-7];
318
322 }
323
324 for (auto& cluster_index : clusters[currentIndex]) {
325 const auto& currentLocalPos = cluster_index.first->localPosition<1>();
326
327 size_t currentStripIndex = 0;
328 auto ends =
getStripEnds(cluster_index.first, currentElement, currentStripIndex);
329 StripInformationHelper currentStripInfo(cluster_index.first->identifierHash(), ends.first, ends.second, beamSpotVertex, currentLocalPos(0, 0), cluster_index.second, currentStripIndex);
330 auto centralValue = currentLocalPos(0, 0);
334 centralValue = currentStripIndex;
337 }
338
339 if (centralValue < minValue or centralValue >
maxValue)
340 continue;
341
342 for(auto& stripInfo : stripPhiInfos) {
344 }
345 }
346 }
347 return StatusCode::SUCCESS;
348 }
349
350 for(
int n=0;
n!=nElements; ++
n) {
351
352 int currentIndex = elementIndex[
n];
353 const InDetDD::SiDetectorElement* currentElement = elements[currentIndex];
354
356 offset(element, currentElement, slimit);
357 }
358
359 for (auto& cluster_index : clusters[currentIndex]) {
360 size_t currentStripIndex = 0;
361 auto ends =
getStripEnds(cluster_index.first, element, currentStripIndex);
362 const auto& currentLocalPos = cluster_index.first->localPosition<1>();
363 StripInformationHelper currentStripInfo(cluster_index.first->identifierHash(), ends.first, ends.second, beamSpotVertex, currentLocalPos(0, 0), cluster_index.second, currentStripIndex);
364
365 for(auto& stripInfo : stripInfos) {
366
367 if (currentIndex==otherSideIndex) {
369 } else {
371 }
372 }
373 }
374 }
375 return StatusCode::SUCCESS;
376 }
#define ATH_CHECK
Evaluate an expression and check for errors.
#define maxValue(current, test)
#define minValue(current, test)
void diff(const Jet &rJet1, const Jet &rJet2, std::map< std::string, double > varDiff)
Difference between jets - Non-Class function required by trigger.
size_t size() const
Number of registered mappings.