228 {
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251 constexpr int otherSideIndex{1};
252 constexpr int maxEtaIndex{3};
254 int nElements = 0;
255
256
257
259 if(elements[n]) {
260 elementIndex[nElements++] =
n;
261 }
262 }
263
264 if(!nElements) return StatusCode::SUCCESS;
265
266
267 const InDetDD::SiDetectorElement* element = elements[0];
268 bool isEndcap = element->
isEndcap();
269
270 std::vector<StripInformationHelper> stripInfos;
271 stripInfos.reserve(clusters[0].
size());
272
273
274 for (auto& cluster_index : clusters[0]) {
275 size_t stripIndex = -1;
276 auto ends =
getStripEnds(cluster_index.first, element, stripIndex);
277 const auto& localPos = cluster_index.first->localPosition<1>();
278 StripInformationHelper stripInfo(cluster_index.first->identifierHash(), ends.first, ends.second, beamSpotVertex, localPos(0, 0), cluster_index.second, stripIndex);
279 stripInfos.push_back( std::move(stripInfo) );
280 }
281
283 double slimit = 0.;
284
286
288 for(;
n < nElements; ++
n) {
289 int currentIndex = elementIndex[
n];
290 if(currentIndex > maxEtaIndex) break;
291
292
293 const InDetDD::SiDetectorElement* currentElement = elements[currentIndex];
294
295
296 double min = overlapExtents[currentIndex*2-2];
297 double max = overlapExtents[currentIndex*2-1];
298
300
304 }
305
306 StripInformationHelper currentStripInfo;
307 for (auto& cluster_index : clusters[currentIndex]) {
308 bool processed = false;
309 const auto& currentLocalPos = cluster_index.first->localPosition<1>();
310
311 for(auto& stripInfo : stripInfos) {
312 double diff = currentLocalPos(0, 0)-stripInfo.locX();
313
314
316
318
319 if (not processed) {
320 processed = true;
321 size_t currentStripIndex = 0;
322 auto ends =
getStripEnds(cluster_index.first, currentElement, currentStripIndex);
323 currentStripInfo.set(cluster_index.first->identifierHash(), ends.first, ends.second, beamSpotVertex, currentLocalPos(0, 0), cluster_index.second, currentStripIndex);
324 }
325
326
327 if (currentIndex==otherSideIndex) {
329 } else {
331 }
332 }
333 }
334 }
335
336
337 for(;
n < nElements; ++
n) {
338 int currentIndex = elementIndex[
n];
339 const InDetDD::SiDetectorElement* currentElement = elements[currentIndex];
340
341 double min = overlapExtents[4*currentIndex-10];
342 double max = overlapExtents[4*currentIndex- 9];
343
346
350 }
351
352 std::vector<StripInformationHelper*> stripPhiInfos;
353 stripPhiInfos.reserve(stripInfos.size());
354
355 for(auto& stripInfo : stripInfos) {
356 auto stripIndex = stripInfo.stripIndex();
357 auto localPosition = stripInfo.locX();
358 auto centralValue = localPosition;
362 centralValue = stripIndex;
365 }
366
368 stripPhiInfos.push_back(&stripInfo);
369 }
370 }
371
372 if(stripPhiInfos.empty()) continue;
373
374 min = overlapExtents[4*currentIndex-8];
375 max = overlapExtents[4*currentIndex-7];
376
380 }
381
382 for (auto& cluster_index : clusters[currentIndex]) {
383 const auto& currentLocalPos = cluster_index.first->localPosition<1>();
384
385 size_t currentStripIndex = 0;
386 auto ends =
getStripEnds(cluster_index.first, currentElement, currentStripIndex);
387 StripInformationHelper currentStripInfo(cluster_index.first->identifierHash(), ends.first, ends.second, beamSpotVertex, currentLocalPos(0, 0), cluster_index.second, currentStripIndex);
388 auto centralValue = currentLocalPos(0, 0);
392 centralValue = currentStripIndex;
395 }
396
397 if (centralValue < minValue or centralValue >
maxValue)
398 continue;
399
400 for(auto& stripInfo : stripPhiInfos) {
402 }
403 }
404 }
405 return StatusCode::SUCCESS;
406 }
407
408 for(
int n=0;
n!=nElements; ++
n) {
409
410 int currentIndex = elementIndex[
n];
411 const InDetDD::SiDetectorElement* currentElement = elements[currentIndex];
412
414 offset(element, currentElement, slimit);
415 }
416
417 for (auto& cluster_index : clusters[currentIndex]) {
418 size_t currentStripIndex = 0;
419 auto ends =
getStripEnds(cluster_index.first, element, currentStripIndex);
420 const auto& currentLocalPos = cluster_index.first->localPosition<1>();
421 StripInformationHelper currentStripInfo(cluster_index.first->identifierHash(), ends.first, ends.second, beamSpotVertex, currentLocalPos(0, 0), cluster_index.second, currentStripIndex);
422
423 for(auto& stripInfo : stripInfos) {
424
425 if (currentIndex==otherSideIndex) {
427 } else {
429 }
430 }
431 }
432 }
433 return StatusCode::SUCCESS;
434 }
#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.