ATLAS Offline Software
StripSpacePointFormationTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
13 
14 namespace ActsTrk {
15 
17  const std::string& name,
18  const IInterface* parent)
19  : base_class(type, name, parent)
20  {}
21 
23 
24  ATH_CHECK(detStore()->retrieve(m_stripId,"SCT_ID"));
25 
26  ATH_CHECK(m_lorentzAngleTool.retrieve());
27 
29  ATH_MSG_INFO("Use SCT SP overlap cuts based on layer number parity");
30 
31  return StatusCode::SUCCESS;
32  }
33 
35  const xAOD::StripClusterContainer& clusterContainer,
38  const Amg::Vector3D& beamSpotVertex,
39  std::vector<StripSP>& spacePoints,
40  std::vector<StripSP>& overlapSpacePoints,
41  bool processOverlaps,
42  const std::vector<IdentifierHash>& hashesToProcess,
44  {
49 
83 
86 
87  const auto hashesProc = (hashesToProcess.size() > 0 ? hashesToProcess : stripAccessor.allIdentifiers());
88 
89  //factor out floating point conversions
90  double overlapLimitOpposite = m_overlapLimitOpposite;
91  double overlapLimitPhi = m_overlapLimitPhi;
92  double overlapLimitEtaMin = m_overlapLimitEtaMin;
93  double overlapLimitEtaMax = m_overlapLimitEtaMax;
94 
95  for (auto& idHash : hashesProc) {
96  const InDetDD::SiDetectorElement* thisElement = elements.getDetectorElement(idHash);
97  if ( not thisElement->isStereo() ) {
98  // Retrieve the neighbours of the detector element
99  const std::vector<IdentifierHash>* others(properties.neighbours(idHash));
100  if (others==nullptr || others->empty() )
101  continue;
102 
103  // This flag is use to trigger if the search should be performed.
104  // In case there are no clusters on the neighbours of the selected
105  // detector element, the flag stays false.
106  bool search=false;
107  size_t neighbour = 0;
108  while (not search and neighbour<others->size() ) {
109  search = stripAccessor.isIdentifierPresent(others->at(neighbour));
110  neighbour++;
111  }
112  if (not search)
113  continue;
114 
115  // prepare clusters, indices and modules for space point formation
116  std::array<std::vector<std::pair<const xAOD::StripCluster*, size_t>>, nNeighbours> neighbourClusters{};
117  std::array<const InDetDD::SiDetectorElement*, nNeighbours> neighbourElements{};
118 
119  auto groupStart = clusterContainer.begin();
120  // Get the detector element and range for the idHash
121  neighbourElements[0] = thisElement;
122  for (auto& this_range : stripAccessor.rangesForIdentifierDirect(idHash)) {
123  for (auto start=this_range.first; start!=this_range.second; start++) {
124  size_t position = std::distance(groupStart, start);
125  neighbourClusters[0].push_back(std::make_pair(*start, position));
126  }
127  }
128 
129  Identifier thisId = thisElement->identify();
130 
131  // define overlap extends before building space points
132  std::array<double, 14> overlapExtents{};
133  // Default case: you test the opposite element and the overlapping in phi (total 3 elements)
134  int Nmax = 4;
135 
136  // In the barrel, test the eta overlaps as well (total 5 elements)
137  if (m_stripId->is_barrel(thisId))
138  Nmax = 6;
139 
140  // You can remove all the overlaps if requested.
141  // Here you test only the opposite element
142  if(not processOverlaps) Nmax = 2;
143  //factor double conversion outside of loop
144  double hwidth(static_cast<double>(properties.halfWidth(idHash)));
145  int n = 0;
146 
147 
148  // The order of the elements in others is such that you first get the opposite element,
149  // the overlapping in phi and then the overlapping in eta
150  // For this reason you need to re-order the indices, since the SiSpacePointMakerTool will process
151  // first the eta overlaps and then the phi ones
152  const std::array<size_t, nNeighbours> neigbourIndices{ThisOne, Opposite, EtaMinus, EtaPlus, PhiMinus, PhiPlus};
153 
154  for (const auto& otherHash : *others) {
155 
156  if(++n==Nmax) break;
157 
158  if(not stripAccessor.isIdentifierPresent(otherHash))
159  continue;
160 
161  const InDetDD::SiDetectorElement* otherElement = elements.getDetectorElement(otherHash);
162 
163  neighbourElements[neigbourIndices[n]] = otherElement;
164  for (auto& this_range : stripAccessor.rangesForIdentifierDirect(otherHash)) {
165  for (auto start=this_range.first; start!=this_range.second; start++) {
166  size_t position = std::distance(groupStart, start);
167  neighbourClusters[neigbourIndices[n]].push_back(std::make_pair(*start, position));
168  }
169  }
170 
171  switch (n) {
172  case Opposite: {
173  overlapExtents[ 0] = -overlapLimitOpposite;
174  overlapExtents[ 1] = overlapLimitOpposite;
175  break;
176  }
177  case PhiMinus: {
178  overlapExtents[ 6] =-hwidth;
179  overlapExtents[ 7] =-hwidth+overlapLimitPhi;
180  overlapExtents[ 8] = hwidth-overlapLimitPhi;
181  overlapExtents[ 9] = hwidth;
182  break;
183  }
184  case PhiPlus: {
185  overlapExtents[10] = hwidth-overlapLimitPhi;
186  overlapExtents[11] = hwidth;
187  overlapExtents[12] =-hwidth;
188  overlapExtents[13] =-hwidth+overlapLimitPhi;
189  break;
190  }
191  case EtaMinus: {
192  overlapExtents[ 2] = overlapLimitEtaMin;
193  overlapExtents[ 3] = overlapLimitEtaMax;
194  if (m_useSCTLayerDep_OverlapCuts && (m_stripId->layer_disk(thisId) & 1) != 0) {
195  overlapExtents[ 2] =-overlapLimitEtaMax;
196  overlapExtents[ 3] =-overlapLimitEtaMin;
197  }
198  break;
199  }
200  default: {
201  overlapExtents[ 4] = overlapLimitEtaMin;
202  overlapExtents[ 5] = overlapLimitEtaMax;
203  if (m_useSCTLayerDep_OverlapCuts && (m_stripId->layer_disk(thisId) & 1) == 0) {
204  overlapExtents[ 4] = -overlapLimitEtaMax;
205  overlapExtents[ 5] = -overlapLimitEtaMin;
206  }
207  break;
208  }
209  }
210  }
211 
212  // producing and filling space points
213  ATH_CHECK( fillStripSpacePoints(neighbourElements, neighbourClusters, overlapExtents, beamSpotVertex,
214  spacePoints, overlapSpacePoints) );
215  }
216  }
217  return StatusCode::SUCCESS;
218  }
219 
220  StatusCode
222  const std::array<const InDetDD::SiDetectorElement*, nNeighbours>& elements,
223  const std::array<std::vector<std::pair<const xAOD::StripCluster*, size_t>>, nNeighbours>& clusters,
224  const std::array<double, 14>& overlapExtents,
225  const Amg::Vector3D& beamSpotVertex,
226  std::vector<StripSP>& spacePoints,
227  std::vector<StripSP>& overlapSpacePoints ) const
228  {
229 
230  // This function is called once all the needed quantities are collected.
231  // It is used to build space points checking the compatibility of clusters on pairs of detector elements.
232  // Detector elements and cluster collections are elements and clusters, respectively.
233  // [0] is the trigger element
234  // [1] is the opposite element
235  // [2]-[3] are the elements tested for eta overlaps
236  // [4]-[5] are the elements tested for phi overlaps
237  //
238  // To build space points:
239  // - For the opposite element and the ones tested for eta overlaps, you have to check
240  // if clusters are compatible with the local position of the trigger cluster
241  // requiring that the distance between the two clusters in phi is withing a specified range.
242  // - overlapExtents[0], overlapExtents[1] are filled for the opposite element
243  // - overlapExtents[2], overlapExtents[3], overlapExtents[4], overlapExtents[5] are filled for the eta overlapping elements
244  // - For the elements tested for phi overlaps, you have to check
245  // if clusters are compatible with the local position of the trigger cluster.
246  // This needs that the trigger cluster is at the edge of the trigger module
247  // and that the other cluster is on the compatible edge of its module
248  // - overlapExtents[6], overlapExtents[7], overlapExtents[10], overlapExtents[11]
249  // overlapExtents[8], overlapExtents[9], overlapExtents[12], overlapExtents[13] are filled for the phi overlapping elements
250 
251  constexpr int otherSideIndex{1};
252  constexpr int maxEtaIndex{3};
253  std::array<int, nNeighbours-1> elementIndex{};
254  int nElements = 0;
255 
256  // For the nNeighbours sides, fill elementIndex with the indices of the existing elements.
257  // Same the number of elements in nElements to loop on the later on
258  for(int n=1; n!=nNeighbours; ++n) {
259  if(elements[n]) {
260  elementIndex[nElements++] = n;
261  }
262  }
263  // return if all detector elements are nullptr
264  if(!nElements) return StatusCode::SUCCESS;
265 
266  // trigger element and clusters
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  // loop on all clusters on the trigger detector element and save the related information
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 
282  double limit = 1. + m_stripLengthTolerance;
283  double slimit = 0.;
284 
285  if(not m_allClusters) {
286  // Start processing the opposite side and the eta overlapping elements
287  int n = 0;
288  for(; n < nElements; ++n) {
289  int currentIndex = elementIndex[n];
290  if(currentIndex > maxEtaIndex) break;
291 
292  // get the detector element and the IdentifierHash
293  const InDetDD::SiDetectorElement* currentElement = elements[currentIndex];
294 
295  // retrieve the range
296  double min = overlapExtents[currentIndex*2-2];
297  double max = overlapExtents[currentIndex*2-1];
298 
299  size_t minStrip, maxStrip = 0;
300 
301  if (m_stripGapParameter != 0.) {
302  updateRange(element, currentElement, slimit, min, max);
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  // In negative endcap, local z is opposite of positive endcap
314  // need to invert the difference for proper comparison
315  if( m_stripId->barrel_ec(currentElement->identify())<0 ) diff = -diff;
316 
317  if(diff < min || diff > max) continue;
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  // depending on the index you are processing, you save the space point in the correct container
327  if (currentIndex==otherSideIndex) {
328  ATH_CHECK( makeStripSpacePoint(spacePoints, stripInfo, currentStripInfo, isEndcap, limit, slimit) );
329  } else {
330  ATH_CHECK( makeStripSpacePoint(overlapSpacePoints, stripInfo, currentStripInfo, isEndcap, limit, slimit) );
331  }
332  }
333  }
334  }
335  // process the phi overlapping elements
336  // if possible n starts from 4
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 
344  std::size_t minStrip = 0;
345  std::size_t maxStrip = 0;
346 
347  if (m_stripGapParameter != 0.) {
348  updateRange(element, currentElement, slimit, min, max);
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;
359  auto minValue = min;
360  auto maxValue = max;
361  if (isEndcap and m_isITk) { // for Inner Detector SCT, use the same cut as barrel
362  centralValue = stripIndex;
363  minValue = minStrip;
364  maxValue = maxStrip;
365  }
366 
367  if (minValue <= centralValue and centralValue <= maxValue) {
368  stripPhiInfos.push_back(&stripInfo);
369  }
370  }
371  // continue if you have no cluster from the phi overlapping region of the trigger element
372  if(stripPhiInfos.empty()) continue;
373 
374  min = overlapExtents[4*currentIndex-8];
375  max = overlapExtents[4*currentIndex-7];
376 
377  if (m_stripGapParameter != 0.) {
378  updateRange(element, currentElement, slimit, min, max);
379  correctPolarRange(currentElement, min, max, minStrip, maxStrip);
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);
389  auto minValue = min;
390  auto maxValue = max;
391  if (isEndcap and m_isITk) { // for Inner Detector SCT, use the same cut as barrel
392  centralValue = currentStripIndex;
393  minValue = minStrip;
394  maxValue = maxStrip;
395  }
396 
397  if (centralValue < minValue or centralValue > maxValue)
398  continue;
399 
400  for(auto& stripInfo : stripPhiInfos) {
401  ATH_CHECK( makeStripSpacePoint(overlapSpacePoints, *stripInfo, currentStripInfo, isEndcap, limit, slimit) );
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 
413  if (m_stripGapParameter != 0.) {
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  // depending on the index you are processing, you save the space point in the correct container
425  if (currentIndex==otherSideIndex) {
426  ATH_CHECK( makeStripSpacePoint(spacePoints, stripInfo, currentStripInfo, isEndcap, limit, slimit) );
427  } else {
428  ATH_CHECK( makeStripSpacePoint(overlapSpacePoints, stripInfo, currentStripInfo, isEndcap, limit, slimit) );
429  }
430  }
431  }
432  }
433  return StatusCode::SUCCESS;
434  }
435 
437  std::vector<StripSP>& collection,
438  const StripInformationHelper& firstInfo,
439  const StripInformationHelper& secondInfo,
440  bool isEndcap,
441  double limit,
442  double slimit) const
443  {
444  double a =-firstInfo.trajDirection().dot(secondInfo.normal());
445  double b = firstInfo.stripDirection().dot(secondInfo.normal());
446  double l0 = firstInfo.oneOverStrip()*slimit+limit ;
447 
448  if(std::abs(a) > (std::abs(b)*l0)) {
449  return StatusCode::SUCCESS;
450  }
451 
452  double c =-secondInfo.trajDirection().dot(firstInfo.normal());
453  double d = secondInfo.stripDirection().dot(firstInfo.normal());
454  double l1 = secondInfo.oneOverStrip()*slimit+limit ;
455 
456  if(std::abs(c) > (std::abs(d)*l1)) {
457  return StatusCode::SUCCESS;
458  }
459 
460  double m = a/b;
461 
462  if(slimit!=0.) {
463  double n = c/d;
464  if (m > limit || n > limit) {
465  double cs = firstInfo.stripDirection().dot(secondInfo.stripDirection())*(firstInfo.oneOverStrip()*firstInfo.oneOverStrip());
466  double dm = (m-1);
467  double dmn = (n-1.)*cs;
468  if(dmn > dm) dm = dmn;
469  m-=dm; n-=(dm/cs);
470  if(std::abs(m) > limit || std::abs(n) > limit) {
471  return StatusCode::SUCCESS;
472  }
473  } else if (m < -limit || n < -limit) {
474  double cs = firstInfo.stripDirection().dot(secondInfo.stripDirection())*(firstInfo.oneOverStrip()*firstInfo.oneOverStrip());
475  double dm = -(1.+m);
476  double dmn = -(1.+n)*cs;
477  if(dmn > dm) dm = dmn;
478  m+=dm; n+=(dm/cs);
479  if(std::abs(m) > limit || std::abs(n) > limit) {
480  return StatusCode::SUCCESS;
481  }
482  }
483  }
484 
485  Eigen::Matrix<double, 3, 1> globalPosition(m_useTopSp ? secondInfo.position(m) : firstInfo.position(m));
486 
487  // evaluation of the local covariance
488  // Lines taken from SCT_SpacePoint::setupLocalCovarianceSCT()
489  constexpr float deltaY = 0.0004; // roughly pitch of SCT (80 mu) / sqrt(12)
490  constexpr float covTerm = 1600.*deltaY;
491 
492  Eigen::Matrix<float, 2, 1> variance(0.1f, 8.f*covTerm);
493  // Swap r/z covariance terms for endcap clusters
494  if ( isEndcap )
495  std::swap( variance(0, 0), variance(1, 0) );
496 
497  // evaluation of measurement details
498  double topHalfStripLength = 0.5*firstInfo.stripDirection().norm();
499  Eigen::Matrix<double, 3, 1> topStripDirection = -firstInfo.stripDirection()/(2.*topHalfStripLength);
500  Eigen::Matrix<double, 3, 1> topStripCenter = 0.5*firstInfo.trajDirection();
501 
502  double bottomHalfStripLength = 0.5*secondInfo.stripDirection().norm();
503  Eigen::Matrix<double, 3, 1> bottomStripDirection = -secondInfo.stripDirection()/(2.*bottomHalfStripLength);
504 
505  Eigen::Matrix<double, 3, 1> stripCenterDistance = firstInfo.stripCenter() - secondInfo.stripCenter();
506 
507 
508 
509  StripSP toAdd;
510  toAdd.idHashes = {firstInfo.idHash(), secondInfo.idHash()};
511  toAdd.globPos = globalPosition.cast<float>();
512  toAdd.cov_r = variance(0,0);
513  toAdd.cov_z = variance(1,0);
514  toAdd.measurementIndexes = std::array<std::size_t,2> ({firstInfo.clusterIndex(), secondInfo.clusterIndex()});
515  toAdd.topHalfStripLength = static_cast<float>(topHalfStripLength);
516  toAdd.bottomHalfStripLength = static_cast<float>(bottomHalfStripLength);
517  toAdd.topStripDirection = topStripDirection.cast<float>();
518  toAdd.bottomStripDirection = bottomStripDirection.cast<float>();
519  toAdd.stripCenterDistance = stripCenterDistance.cast<float>();
520  toAdd.topStripCenter = topStripCenter.cast<float>();
521 
522  collection.push_back(std::move(toAdd));
523 
524  return StatusCode::SUCCESS;
525  }
526 
528  const InDetDD::SiDetectorElement* element2,
529  double& stripLengthGapTolerance) const
530  {
531  const Amg::Transform3D& T1 = element1->transform();
532  const Amg::Transform3D& T2 = element2->transform();
533  Amg::Vector3D C = element1->center() ;
534  bool isAnnulus = (element1->design().shape() == InDetDD::Annulus);
535 
536  double x12 = T1(0,0)*T2(0,0)+T1(1,0)*T2(1,0)+T1(2,0)*T2(2,0);
537  double r = isAnnulus ? std::sqrt(C[0]*C[0]+C[1]*C[1]) : std::sqrt(T1(0,3)*T1(0,3)+T1(1,3)*T1(1,3));
538  double s = (T1(0,3)-T2(0,3))*T1(0,2)+(T1(1,3)-T2(1,3))*T1(1,2)+(T1(2,3)-T2(2,3))*T1(2,2);
539 
540  double dm = (m_stripGapParameter*r)*std::abs(s*x12);
541  double d = isAnnulus ? dm/.04 : dm/std::sqrt((1.-x12)*(1.+x12));
542 
543  if (std::abs(T1(2,2)) > 0.7) d*=(r/std::abs(T1(2,3)));
544 
545  stripLengthGapTolerance = d;
546 
547  return dm;
548  }
549 
551  const InDetDD::SiDetectorElement* element2,
552  double& stripLengthGapTolerance,
553  double& min, double& max) const
554  {
555  double dm = offset(element1, element2, stripLengthGapTolerance);
556  min -= dm;
557  max += dm;
558  }
559 
561  double& min,
562  double& max,
563  size_t& minStrip,
564  size_t& maxStrip) const
565  {
566  // for Inner Detector SCT, gap = 0 in config.
567  if (element->isBarrel() or (not m_isITk))
568  return;
569 
570  // design for endcap modules
572  = dynamic_cast<const InDetDD::StripStereoAnnulusDesign *> (&element->design());
573  if ( design==nullptr ) {
574  ATH_MSG_FATAL( "Invalid strip annulus design for module with identifier/identifierHash " << element->identify() << "/" << element->identifyHash());
575  return;
576  }
577 
578  // converting min and max from cartesian reference frame to polar frame
579  auto firstPosition = (design->localPositionOfCell(design->strip1Dim(0, 0))+
580  design->localPositionOfCell(design->strip1Dim(design->diodesInRow(0)-1, 0)))*0.5;
581 
582  double radius = firstPosition.xEta();
583 
586 
587  if (not minCellId.isValid()) {
588  minCellId = InDetDD::SiCellId(0);
589  }
590 
591  if (not maxCellId.isValid()) {
592  maxCellId = InDetDD::SiCellId(design->diodesInRow(0)-1);
593  }
594 
595  minStrip = minCellId.strip();
596  maxStrip = maxCellId.strip();
597 
598  // re-evaluate min and max in polar coordinate
599  min = std::atan2(min, radius);
600  max = std::atan2(max, radius);
601  }
602 
603  std::pair<Amg::Vector3D, Amg::Vector3D >
605  const InDetDD::SiDetectorElement* element,
606  size_t& stripIndex) const
607  {
608  const Eigen::Matrix<float,1,1>& localPos = cluster->localPosition<1>();
609 
610  if (element->isEndcap() and m_isITk) {
611  // design for endcap modules
613  = dynamic_cast<const InDetDD::StripStereoAnnulusDesign *> (&element->design());
614  if ( design==nullptr ) {
615  ATH_MSG_FATAL( "Invalid strip annulus design for module with identifier/identifierHash " << element->identify() << "/" << element->identifyHash());
616  return std::pair<Amg::Vector3D, Amg::Vector3D >();
617  }
618 
619  // calculate phi pitch for evaluating the strip index
620  double phiPitchPhi = design->phiWidth()/design->diodesInRow(0);
621  stripIndex = -std::floor(localPos(0, 0) / phiPitchPhi) + design->diodesInRow(0) *0.5 - 0.5;
622 
623  std::pair<Amg::Vector3D, Amg::Vector3D > ends = {
624  element->globalPosition(design->stripPosAtR(stripIndex, 0, design->minR())),
625  element->globalPosition(design->stripPosAtR(stripIndex, 0, design->maxR()))
626  };
627  return ends;
628 
629  }
630 
631  InDetDD::SiLocalPosition localPosition(0., localPos(0, 0), 0.);
632  std::pair<Amg::Vector3D, Amg::Vector3D > ends(element->endsOfStrip(localPosition));
633 
634  return ends;
635  }
636 }
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
beamspotman.r
def r
Definition: beamspotman.py:672
ActsTrk::EtaMinus
@ EtaMinus
Definition: StripInformationHelper.h:13
InDetDD::SiDetectorElement::isEndcap
bool isEndcap() const
ActsTrk::StripInformationHelper::oneOverStrip
const double & oneOverStrip() const
Definition: StripInformationHelper.h:62
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
SCT_ID.h
This is an Identifier helper class for the SCT subdetector. This class is a factory for creating comp...
InDetDD::SolidStateDetectorElementBase::cellIdOfPosition
SiCellId cellIdOfPosition(const Amg::Vector2D &localPos) const
As in previous method but returns SiCellId.
Definition: SolidStateDetectorElementBase.cxx:224
ActsTrk::StripSP
Definition: IStripSpacePointFormationTool.h:18
maxValue
#define maxValue(current, test)
Definition: CompoundLayerMaterialCreator.h:22
ContainerAccessor
Definition: ContainerAccessor.h:25
InDetDD::SiDetectorElementCollection
Definition: SiDetectorElementCollection.h:27
InDetDD::StripStereoAnnulusDesign::strip1Dim
virtual int strip1Dim(int strip, int row) const override
only relevant for SCT.
Definition: StripStereoAnnulusDesign.cxx:294
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
ContainerAccessor::allIdentifiers
std::vector< identifier_t > allIdentifiers() const
Function to return all available identifier (i.e. keys in the map)
Definition: ContainerAccessor.h:84
python.TestDriveDummies.properties
dictionary properties
Definition: TestDriveDummies.py:14
ActsTrk::StripSpacePointFormationTool::correctPolarRange
void correctPolarRange(const InDetDD::SiDetectorElement *element, double &min, double &max, size_t &minStrip, size_t &maxStrip) const
Definition: StripSpacePointFormationTool.cxx:560
makeComparison.deltaY
int deltaY
Definition: makeComparison.py:44
hist_file_dump.d
d
Definition: hist_file_dump.py:142
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
ActsTrk::StripInformationHelper::clusterIndex
const size_t & clusterIndex() const
Definition: StripInformationHelper.h:57
InDetDD::DetectorDesign::shape
virtual DetectorShape shape() const
Shape of element.
Definition: DetectorDesign.cxx:96
InDetDD::SolidStateDetectorElementBase::center
virtual const Amg::Vector3D & center() const override final
Center in global coordinates.
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
mergePhysValFiles.start
start
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:13
InDetDD::SiCellId::isValid
bool isValid() const
Test if its in a valid state.
Definition: SiCellId.h:136
mc.diff
diff
Definition: mc.SFGenPy8_MuMu_DD.py:14
InDetDD::StripStereoAnnulusDesign::phiWidth
double phiWidth() const
Definition: StripStereoAnnulusDesign.h:331
ActsTrk::StripSpacePointFormationTool::m_lorentzAngleTool
ToolHandle< ISiLorentzAngleTool > m_lorentzAngleTool
Using Lorentz angle tool.
Definition: StripSpacePointFormationTool.h:103
SCT_ID::barrel_ec
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
Definition: SCT_ID.h:686
ISiLorentzAngleTool.h
ActsTrk::StripSpacePointFormationTool::updateRange
void updateRange(const InDetDD::SiDetectorElement *element1, const InDetDD::SiDetectorElement *element2, double &stripLengthGapTolerance, double &min, double &max) const
Definition: StripSpacePointFormationTool.cxx:550
InDetDD::SiCellId::strip
int strip() const
Get strip number. Equivalent to phiIndex().
Definition: SiCellId.h:131
ActsTrk::StripSpacePointFormationTool::StripSpacePointFormationTool
StripSpacePointFormationTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: StripSpacePointFormationTool.cxx:16
ActsTrk::Opposite
@ Opposite
Definition: StripInformationHelper.h:13
ActsTrk::StripSpacePointFormationTool::m_overlapLimitEtaMin
Gaudi::Property< float > m_overlapLimitEtaMin
Definition: StripSpacePointFormationTool.h:122
ActsTrk::StripSpacePointFormationTool::m_isITk
Gaudi::Property< bool > m_isITk
Definition: StripSpacePointFormationTool.h:111
ActsTrk::EtaPlus
@ EtaPlus
Definition: StripInformationHelper.h:13
search
void search(TDirectory *td, const std::string &s, std::string cwd, node *n)
recursive directory search for TH1 and TH2 and TProfiles
Definition: hcg.cxx:738
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
InDetDD::SolidStateDetectorElementBase::identifyHash
virtual IdentifierHash identifyHash() const override final
identifier hash (inline)
ActsTrk::StripInformationHelper
Definition: StripInformationHelper.h:15
StripSpacePointFormationTool.h
ActsTrk::StripSpacePointFormationTool::produceSpacePoints
virtual StatusCode produceSpacePoints(const EventContext &ctx, const xAOD::StripClusterContainer &clusterContainer, const InDet::SiElementPropertiesTable &properties, const InDetDD::SiDetectorElementCollection &elements, const Amg::Vector3D &beamSpotVertex, std::vector< StripSP > &spacePoints, std::vector< StripSP > &overlapSpacePoints, bool processOverlaps, const std::vector< IdentifierHash > &hashesToProcess, const ContainerAccessor< xAOD::StripCluster, IdentifierHash, 1 > &stripAccessor) const override
Definition: StripSpacePointFormationTool.cxx:34
InDetDD::SiLocalPosition
Definition: SiLocalPosition.h:31
InDetDD::StripStereoAnnulusDesign::diodesInRow
virtual int diodesInRow(const int row) const override
Definition: StripStereoAnnulusDesign.h:251
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
ActsTrk::StripSpacePointFormationTool::m_stripGapParameter
Gaudi::Property< float > m_stripGapParameter
Definition: StripSpacePointFormationTool.h:126
ActsTrk::StripSpacePointFormationTool::m_overlapLimitPhi
Gaudi::Property< float > m_overlapLimitPhi
Definition: StripSpacePointFormationTool.h:121
InDetDD::StripStereoAnnulusDesign::stripPosAtR
SiLocalPosition stripPosAtR(int strip, int row, double r) const
Definition: StripStereoAnnulusDesign.cxx:385
ContainerAccessor::rangesForIdentifierDirect
const boost::container::small_vector< Range, inline_size > rangesForIdentifierDirect(const identifier_t &identifier) const
Function to return the list of ranges corresponding to a given identifier.
Definition: ContainerAccessor.h:69
InDetDD::StripStereoAnnulusDesign::minR
double minR() const
Definition: StripStereoAnnulusDesign.h:322
ActsTrk::StripSpacePointFormationTool::m_overlapLimitOpposite
Gaudi::Property< float > m_overlapLimitOpposite
Definition: StripSpacePointFormationTool.h:120
beamspotman.n
n
Definition: beamspotman.py:727
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
InDetDD::Annulus
@ Annulus
Definition: DetectorDesign.h:42
InDetDD::StripStereoAnnulusDesign
Definition: StripStereoAnnulusDesign.h:50
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
test_pyathena.parent
parent
Definition: test_pyathena.py:15
xAOD::StripCluster_v1
Definition: StripCluster_v1.h:17
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
ActsTrk::StripSpacePointFormationTool::m_stripLengthTolerance
Gaudi::Property< float > m_stripLengthTolerance
The following are parameters to build the space points.
Definition: StripSpacePointFormationTool.h:125
ActsTrk::PhiPlus
@ PhiPlus
Definition: StripInformationHelper.h:13
hist_file_dump.f
f
Definition: hist_file_dump.py:140
F600IntegrationConfig.spacePoints
spacePoints
Definition: F600IntegrationConfig.py:122
DataVector
Derived DataVector<T>.
Definition: DataVector.h:795
WriteCalibToCool.swap
swap
Definition: WriteCalibToCool.py:94
xAOD::UncalibratedMeasurement_v1::localPosition
ConstVectorMap< N > localPosition() const
Returns the local position of the measurement.
DeMoUpdate.toAdd
bool toAdd
Definition: DeMoUpdate.py:1304
ReadCellNoiseFromCool.dm
dm
Definition: ReadCellNoiseFromCool.py:235
lumiFormat.array
array
Definition: lumiFormat.py:91
ActsTrk::StripSpacePointFormationTool::fillStripSpacePoints
StatusCode fillStripSpacePoints(const std::array< const InDetDD::SiDetectorElement *, nNeighbours > &neighbourElements, const std::array< std::vector< std::pair< const xAOD::StripCluster *, size_t >>, nNeighbours > &neighbourClusters, const std::array< double, 14 > &overlapExtents, const Amg::Vector3D &beamSpotVertex, std::vector< StripSP > &spacePoints, std::vector< StripSP > &overlapSpacePoints) const
Definition: StripSpacePointFormationTool.cxx:221
ActsTrk::StripInformationHelper::normal
const Amg::Vector3D & normal() const
Definition: StripInformationHelper.h:61
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
InDetDD::SiDetectorElement::endsOfStrip
std::pair< Amg::Vector3D, Amg::Vector3D > endsOfStrip(const Amg::Vector2D &position) const
Special method for SCT to retrieve the two ends of a "strip" Returned coordinates are in global frame...
Definition: SiDetectorElement.cxx:339
ActsTrk::StripSpacePointFormationTool::makeStripSpacePoint
StatusCode makeStripSpacePoint(std::vector< StripSP > &, const StripInformationHelper &firstInfo, const StripInformationHelper &secondInfo, bool isEndcap, double limit, double slimit) const
Definition: StripSpacePointFormationTool.cxx:436
ActsTrk::StripSpacePointFormationTool::m_useTopSp
Gaudi::Property< bool > m_useTopSp
Definition: StripSpacePointFormationTool.h:110
ActsTrk::StripInformationHelper::position
Amg::Vector3D position(const double &shift) const
Definition: StripInformationHelper.cxx:39
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:76
SCT_ID::layer_disk
int layer_disk(const Identifier &id) const
Definition: SCT_ID.h:692
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
InDet::SiElementPropertiesTable
Definition: SiElementPropertiesTable.h:30
InDetDD::SiDetectorElement::isBarrel
bool isBarrel() const
ActsTrk::StripSpacePointFormationTool::offset
double offset(const InDetDD::SiDetectorElement *element1, const InDetDD::SiDetectorElement *element2, double &stripLengthGapTolerance) const
Definition: StripSpacePointFormationTool.cxx:527
ActsTrk::StripInformationHelper::stripCenter
const Amg::Vector3D & stripCenter() const
Definition: StripInformationHelper.h:58
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
ParticleGun_SamplingFraction.radius
radius
Definition: ParticleGun_SamplingFraction.py:96
SiDetectorElement.h
InDetDD::SiCellId
Definition: SiCellId.h:29
StripClusterAuxContainer.h
StripStereoAnnulusDesign.h
ContainerAccessor.h
ActsTrk::StripSpacePointFormationTool::initialize
virtual StatusCode initialize() override
Definition: StripSpacePointFormationTool.cxx:22
ActsTrk::StripInformationHelper::idHash
const unsigned int & idHash() const
Definition: StripInformationHelper.h:56
a
TList * a
Definition: liststreamerinfos.cxx:10
python.CaloAddPedShiftConfig.int
int
Definition: CaloAddPedShiftConfig.py:45
ActsTrk::PhiMinus
@ PhiMinus
Definition: StripInformationHelper.h:13
ActsTrk::ThisOne
@ ThisOne
Definition: StripInformationHelper.h:13
ActsTrk::StripSpacePointFormationTool::m_useSCTLayerDep_OverlapCuts
Gaudi::Property< bool > m_useSCTLayerDep_OverlapCuts
Definition: StripSpacePointFormationTool.h:127
dumpNswErrorDb.maxStrip
tuple maxStrip
Definition: dumpNswErrorDb.py:63
InDetDD::SolidStateDetectorElementBase::globalPosition
HepGeom::Point3D< double > globalPosition(const HepGeom::Point3D< double > &localPos) const
transform a reconstruction local position into a global position (inline):
RunTileMonitoring.clusters
clusters
Definition: RunTileMonitoring.py:133
dumpNswErrorDb.minStrip
int minStrip
Definition: dumpNswErrorDb.py:62
ReadCellNoiseFromCoolCompare.l0
l0
Definition: ReadCellNoiseFromCoolCompare.py:359
python.SystemOfUnits.s
float s
Definition: SystemOfUnits.py:147
ActsTrk
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
Definition: MdtCalibInput.h:31
InDetDD::StripStereoAnnulusDesign::localPositionOfCell
virtual SiLocalPosition localPositionOfCell(const SiCellId &cellId) const override
id -> position
Definition: StripStereoAnnulusDesign.cxx:362
skel.l1
l1
Definition: skel.GENtoEVGEN.py:409
InDetDD::SiDetectorElement::isStereo
bool isStereo() const
Check if it is the stereo side (useful for SCT)
Definition: SiDetectorElement.cxx:300
SiCellId.h
InDetDD::SiDetectorElement::design
virtual const SiDetectorDesign & design() const override final
access to the local description (inline):
ActsTrk::StripInformationHelper::set
void set(const unsigned int &idHash, const Amg::Vector3D &stripStart, const Amg::Vector3D &stripEnd, const Amg::Vector3D &beamSpotVertex, const float &locx, const size_t &clusterIndex, const size_t &stripIndex)
Definition: StripInformationHelper.cxx:20
ActsTrk::StripSpacePointFormationTool::m_allClusters
Gaudi::Property< bool > m_allClusters
Definition: StripSpacePointFormationTool.h:109
ActsTrk::StripSpacePointFormationTool::m_overlapLimitEtaMax
Gaudi::Property< float > m_overlapLimitEtaMax
Definition: StripSpacePointFormationTool.h:123
minValue
#define minValue(current, test)
Definition: CompoundLayerMaterialCreator.h:21
ActsTrk::StripInformationHelper::stripDirection
const Amg::Vector3D & stripDirection() const
Definition: StripInformationHelper.h:59
Amg::distance
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
Definition: GeoPrimitivesHelpers.h:54
ContainerAccessor::isIdentifierPresent
bool isIdentifierPresent(const identifier_t &identifier) const
Function to verify if a given identifier is present in the map, i.e.
Definition: ContainerAccessor.h:77
python.compressB64.c
def c
Definition: compressB64.py:93
updateCoolNtuple.limit
int limit
Definition: updateCoolNtuple.py:44
InDetDD::SiDetectorElementCollection::getDetectorElement
const SiDetectorElement * getDetectorElement(const IdentifierHash &hash) const
Definition: SiDetectorElementCollection.cxx:9
ActsTrk::nNeighbours
@ nNeighbours
Definition: StripInformationHelper.h:13
InDetDD::SolidStateDetectorElementBase::identify
virtual Identifier identify() const override final
identifier of this detector element (inline)
InDetDD::StripStereoAnnulusDesign::maxR
double maxR() const
Definition: StripStereoAnnulusDesign.h:326
ActsTrk::StripSpacePointFormationTool::getStripEnds
std::pair< Amg::Vector3D, Amg::Vector3D > getStripEnds(const xAOD::StripCluster *cluster, const InDetDD::SiDetectorElement *element, size_t &stripIndex) const
Definition: StripSpacePointFormationTool.cxx:604
InDetDD::SolidStateDetectorElementBase::transform
virtual const Amg::Transform3D & transform() const override final
Return local to global transform.
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
ActsTrk::StripSpacePointFormationTool::m_stripId
const SCT_ID * m_stripId
Definition: StripSpacePointFormationTool.h:97
python.SystemOfUnits.m
float m
Definition: SystemOfUnits.py:106
SCT_ID::is_barrel
bool is_barrel(const Identifier &id) const
Test for barrel - WARNING: id MUST be sct id, otherwise answer is not accurate. Use SiliconID for gen...
Definition: SCT_ID.h:679
ActsTrk::StripInformationHelper::trajDirection
const Amg::Vector3D & trajDirection() const
Definition: StripInformationHelper.h:60
Identifier
Definition: IdentifierFieldParser.cxx:14