ATLAS Offline Software
StripSpacePointFormationTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 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 
28  return StatusCode::SUCCESS;
29  }
30 
32  const xAOD::StripClusterContainer& clusterContainer,
35  const Amg::Vector3D& beamSpotVertex,
36  std::vector<StripSP>& spacePoints,
37  std::vector<StripSP>& overlapSpacePoints,
38  bool processOverlaps,
39  const std::vector<IdentifierHash>& hashesToProcess,
41  {
46 
80 
83 
84  const auto hashesProc = (hashesToProcess.size() > 0 ? hashesToProcess : stripAccessor.allIdentifiers());
85  for (auto& idHash : hashesProc) {
86  const InDetDD::SiDetectorElement* thisElement = elements.getDetectorElement(idHash);
87  if ( not thisElement->isStereo() ) {
88  // Retrieve the neighbours of the detector element
89  const std::vector<IdentifierHash>* others(properties.neighbours(idHash));
90  if (others==nullptr || others->empty() )
91  continue;
92 
93  // This flag is use to trigger if the search should be performed.
94  // In case there are no clusters on the neighbours of the selected
95  // detector element, the flag stays false.
96  bool search=false;
97  size_t neighbour = 0;
98  while (not search and neighbour<others->size() ) {
99  search = stripAccessor.isIdentifierPresent(others->at(neighbour));
100  neighbour++;
101  }
102  if (not search)
103  continue;
104 
105  // prepare clusters, indices and modules for space point formation
106  std::array<std::vector<std::pair<const xAOD::StripCluster*, size_t>>, nNeighbours> neighbourClusters{};
107  std::array<const InDetDD::SiDetectorElement*, nNeighbours> neighbourElements{};
108 
109  auto groupStart = clusterContainer.begin();
110  // Get the detector element and range for the idHash
111  neighbourElements[0] = thisElement;
112  for (auto& this_range : stripAccessor.rangesForIdentifierDirect(idHash)) {
113  for (auto start=this_range.first; start!=this_range.second; start++) {
114  size_t position = std::distance(groupStart, start);
115  neighbourClusters[0].push_back(std::make_pair(*start, position));
116  }
117  }
118 
119  Identifier thisId = thisElement->identify();
120 
121  // define overlap extends before building space points
122  std::array<double, 14> overlapExtents{};
123  // Default case: you test the opposite element and the overlapping in phi (total 3 elements)
124  int Nmax = 4;
125 
126  // In the barrel, test the eta overlaps as well (total 5 elements)
127  if (m_stripId->is_barrel(thisId))
128  Nmax = 6;
129 
130  // You can remove all the overlaps if requested.
131  // Here you test only the opposite element
132  if(not processOverlaps) Nmax = 2;
133 
134  float hwidth(properties.halfWidth(idHash));
135  int n = 0;
136 
137 
138  // The order of the elements in others is such that you first get the opposite element,
139  // the overlapping in phi and then the overlapping in eta
140  // For this reason you need to re-order the indices, since the SiSpacePointMakerTool will process
141  // first the eta overlaps and then the phi ones
142  const std::array<size_t, nNeighbours> neigbourIndices{ThisOne, Opposite, EtaMinus, EtaPlus, PhiMinus, PhiPlus};
143 
144  for (const auto& otherHash : *others) {
145 
146  if(++n==Nmax) break;
147 
148  if(not stripAccessor.isIdentifierPresent(otherHash))
149  continue;
150 
151  const InDetDD::SiDetectorElement* otherElement = elements.getDetectorElement(otherHash);
152 
153  neighbourElements[neigbourIndices[n]] = otherElement;
154  for (auto& this_range : stripAccessor.rangesForIdentifierDirect(otherHash)) {
155  for (auto start=this_range.first; start!=this_range.second; start++) {
156  size_t position = std::distance(groupStart, start);
157  neighbourClusters[neigbourIndices[n]].push_back(std::make_pair(*start, position));
158  }
159  }
160 
161  switch (n) {
162  case Opposite: {
163  overlapExtents[ 0] = -m_overlapLimitOpposite;
164  overlapExtents[ 1] = m_overlapLimitOpposite;
165  break;
166  }
167  case PhiMinus: {
168  overlapExtents[ 6] =-hwidth;
169  overlapExtents[ 7] =-hwidth+m_overlapLimitPhi;
170  overlapExtents[ 8] = hwidth-m_overlapLimitPhi;
171  overlapExtents[ 9] = hwidth;
172  break;
173  }
174  case PhiPlus: {
175  overlapExtents[10] = hwidth-m_overlapLimitPhi;
176  overlapExtents[11] = hwidth;
177  overlapExtents[12] =-hwidth;
178  overlapExtents[13] =-hwidth+m_overlapLimitPhi;
179  break;
180  }
181  case EtaMinus: {
182  if ((m_stripId->layer_disk(thisId) & 1) == 0) {
183  overlapExtents[ 2] = m_overlapLimitEtaMin;
184  overlapExtents[ 3] = m_overlapLimitEtaMax;
185  } else {
186  overlapExtents[ 2] =-m_overlapLimitEtaMax;
187  overlapExtents[ 3] =-m_overlapLimitEtaMin;
188  }
189  break;
190  }
191  default: {
192  if ((m_stripId->layer_disk(thisId) & 1) == 0) {
193  overlapExtents[ 4] = -m_overlapLimitEtaMax;
194  overlapExtents[ 5] = -m_overlapLimitEtaMin;
195  } else {
196  overlapExtents[ 4] = m_overlapLimitEtaMin;
197  overlapExtents[ 5] = m_overlapLimitEtaMax;
198  }
199  break;
200  }
201  }
202  }
203 
204  // producing and filling space points
205  ATH_CHECK( fillStripSpacePoints(neighbourElements, neighbourClusters, overlapExtents, beamSpotVertex,
206  spacePoints, overlapSpacePoints) );
207  }
208  }
209  return StatusCode::SUCCESS;
210  }
211 
212  StatusCode
214  const std::array<const InDetDD::SiDetectorElement*, nNeighbours>& elements,
215  const std::array<std::vector<std::pair<const xAOD::StripCluster*, size_t>>, nNeighbours>& clusters,
216  const std::array<double, 14>& overlapExtents,
217  const Amg::Vector3D& beamSpotVertex,
218  std::vector<StripSP>& spacePoints,
219  std::vector<StripSP>& overlapSpacePoints ) const
220  {
221 
222  // This function is called once all the needed quantities are collected.
223  // It is used to build space points checking the compatibility of clusters on pairs of detector elements.
224  // Detector elements and cluster collections are elements and clusters, respectively.
225  // [0] is the trigger element
226  // [1] is the opposite element
227  // [2]-[3] are the elements tested for eta overlaps
228  // [4]-[5] are the elements tested for phi overlaps
229  //
230  // To build space points:
231  // - For the opposite element and the ones tested for eta overlaps, you have to check
232  // if clusters are compatible with the local position of the trigger cluster
233  // requiring that the distance between the two clusters in phi is withing a specified range.
234  // - overlapExtents[0], overlapExtents[1] are filled for the opposite element
235  // - overlapExtents[2], overlapExtents[3], overlapExtents[4], overlapExtents[5] are filled for the eta overlapping elements
236  // - For the elements tested for phi overlaps, you have to check
237  // if clusters are compatible with the local position of the trigger cluster.
238  // This needs that the trigger cluster is at the edge of the trigger module
239  // and that the other cluster is on the compatible edge of its module
240  // - overlapExtents[6], overlapExtents[7], overlapExtents[10], overlapExtents[11]
241  // overlapExtents[8], overlapExtents[9], overlapExtents[12], overlapExtents[13] are filled for the phi overlapping elements
242 
243  constexpr int otherSideIndex{1};
244  constexpr int maxEtaIndex{3};
245  std::array<int, nNeighbours-1> elementIndex{};
246  int nElements = 0;
247 
248  // For the nNeighbours sides, fill elementIndex with the indices of the existing elements.
249  // Same the number of elements in nElements to loop on the later on
250  for(int n=1; n!=nNeighbours; ++n) {
251  if(elements[n]) {
252  elementIndex[nElements++] = n;
253  }
254  }
255  // return if all detector elements are nullptr
256  if(!nElements) return StatusCode::SUCCESS;
257 
258  // trigger element and clusters
259  const InDetDD::SiDetectorElement* element = elements[0];
260  bool isEndcap = element->isEndcap();
261 
262  std::vector<StripInformationHelper> stripInfos;
263  stripInfos.reserve(clusters[0].size());
264 
265  // loop on all clusters on the trigger detector element and save the related information
266  for (auto& cluster_index : clusters[0]) {
267  size_t stripIndex = -1;
268  auto ends = getStripEnds(cluster_index.first, element, stripIndex);
269  const auto& localPos = cluster_index.first->localPosition<1>();
270  StripInformationHelper stripInfo(cluster_index.first->identifierHash(), ends.first, ends.second, beamSpotVertex, localPos(0, 0), cluster_index.second, stripIndex);
271  stripInfos.push_back( std::move(stripInfo) );
272  }
273 
274  double limit = 1. + m_stripLengthTolerance;
275  double slimit = 0.;
276 
277  if(not m_allClusters) {
278  // Start processing the opposite side and the eta overlapping elements
279  int n = 0;
280  for(; n < nElements; ++n) {
281  int currentIndex = elementIndex[n];
282  if(currentIndex > maxEtaIndex) break;
283 
284  // get the detector element and the IdentifierHash
285  const InDetDD::SiDetectorElement* currentElement = elements[currentIndex];
286 
287  // retrieve the range
288  double min = overlapExtents[currentIndex*2-2];
289  double max = overlapExtents[currentIndex*2-1];
290 
291  size_t minStrip, maxStrip = 0;
292 
293  if (m_stripGapParameter != 0.) {
294  updateRange(element, currentElement, slimit, min, max);
296  }
297 
298  StripInformationHelper currentStripInfo;
299  for (auto& cluster_index : clusters[currentIndex]) {
300  bool processed = false;
301  const auto& currentLocalPos = cluster_index.first->localPosition<1>();
302 
303  for(auto& stripInfo : stripInfos) {
304  double diff = currentLocalPos(0, 0)-stripInfo.locX();
305 
306  if(diff < min || diff > max) continue;
307 
308  if (not processed) {
309  processed = true;
310  size_t currentStripIndex = 0;
311  auto ends = getStripEnds(cluster_index.first, currentElement, currentStripIndex);
312  currentStripInfo.set(cluster_index.first->identifierHash(), ends.first, ends.second, beamSpotVertex, currentLocalPos(0, 0), cluster_index.second, currentStripIndex);
313  }
314 
315  // depending on the index you are processing, you save the space point in the correct container
316  if (currentIndex==otherSideIndex) {
317  ATH_CHECK( makeStripSpacePoint(spacePoints, stripInfo, currentStripInfo, isEndcap, limit, slimit) );
318  } else {
319  ATH_CHECK( makeStripSpacePoint(overlapSpacePoints, stripInfo, currentStripInfo, isEndcap, limit, slimit) );
320  }
321  }
322  }
323  }
324  // process the phi overlapping elements
325  // if possible n starts from 4
326  for(; n < nElements; ++n) {
327  int currentIndex = elementIndex[n];
328  const InDetDD::SiDetectorElement* currentElement = elements[currentIndex];
329 
330  double min = overlapExtents[4*currentIndex-10];
331  double max = overlapExtents[4*currentIndex- 9];
332 
333  std::size_t minStrip = 0;
334  std::size_t maxStrip = 0;
335 
336  if (m_stripGapParameter != 0.) {
337  updateRange(element, currentElement, slimit, min, max);
339  }
340 
341  std::vector<StripInformationHelper*> stripPhiInfos;
342  stripPhiInfos.reserve(stripInfos.size());
343 
344  for(auto& stripInfo : stripInfos) {
345  auto stripIndex = stripInfo.stripIndex();
346  auto localPosition = stripInfo.locX();
347  auto centralValue = localPosition;
348  auto minValue = min;
349  auto maxValue = max;
350  if (isEndcap) {
351  centralValue = stripIndex;
352  minValue = minStrip;
353  maxValue = maxStrip;
354  }
355 
356  if (minValue <= centralValue and centralValue <= maxValue) {
357  stripPhiInfos.push_back(&stripInfo);
358  }
359  }
360  // continue if you have no cluster from the phi overlapping region of the trigger element
361  if(stripPhiInfos.empty()) continue;
362 
363  min = overlapExtents[4*currentIndex-8];
364  max = overlapExtents[4*currentIndex-7];
365 
366  if (m_stripGapParameter != 0.) {
367  updateRange(element, currentElement, slimit, min, max);
368  correctPolarRange(currentElement, min, max, minStrip, maxStrip);
369  }
370 
371  for (auto& cluster_index : clusters[currentIndex]) {
372  const auto& currentLocalPos = cluster_index.first->localPosition<1>();
373 
374  size_t currentStripIndex = 0;
375  auto ends = getStripEnds(cluster_index.first, currentElement, currentStripIndex);
376  StripInformationHelper currentStripInfo(cluster_index.first->identifierHash(), ends.first, ends.second, beamSpotVertex, currentLocalPos(0, 0), cluster_index.second, currentStripIndex);
377  auto centralValue = currentLocalPos(0, 0);
378  auto minValue = min;
379  auto maxValue = max;
380  if (isEndcap) {
381  centralValue = currentStripIndex;
382  minValue = minStrip;
383  maxValue = maxStrip;
384  }
385 
386  if (centralValue < minValue or centralValue > maxValue)
387  continue;
388 
389  for(auto& stripInfo : stripPhiInfos) {
390  ATH_CHECK( makeStripSpacePoint(overlapSpacePoints, *stripInfo, currentStripInfo, isEndcap, limit, slimit) );
391  }
392  }
393  }
394  return StatusCode::SUCCESS;
395  }
396 
397  for(int n=0; n!=nElements; ++n) {
398 
399  int currentIndex = elementIndex[n];
400  const InDetDD::SiDetectorElement* currentElement = elements[currentIndex];
401 
402  if (m_stripGapParameter != 0.) {
403  offset(element, currentElement, slimit);
404  }
405 
406  for (auto& cluster_index : clusters[currentIndex]) {
407  size_t currentStripIndex = 0;
408  auto ends = getStripEnds(cluster_index.first, element, currentStripIndex);
409  const auto& currentLocalPos = cluster_index.first->localPosition<1>();
410  StripInformationHelper currentStripInfo(cluster_index.first->identifierHash(), ends.first, ends.second, beamSpotVertex, currentLocalPos(0, 0), cluster_index.second, currentStripIndex);
411 
412  for(auto& stripInfo : stripInfos) {
413  // depending on the index you are processing, you save the space point in the correct container
414  if (currentIndex==otherSideIndex) {
415  ATH_CHECK( makeStripSpacePoint(spacePoints, stripInfo, currentStripInfo, isEndcap, limit, slimit) );
416  } else {
417  ATH_CHECK( makeStripSpacePoint(overlapSpacePoints, stripInfo, currentStripInfo, isEndcap, limit, slimit) );
418  }
419  }
420  }
421  }
422  return StatusCode::SUCCESS;
423  }
424 
426  std::vector<StripSP>& collection,
427  const StripInformationHelper& firstInfo,
428  const StripInformationHelper& secondInfo,
429  bool isEndcap,
430  double limit,
431  double slimit) const
432  {
433  double a =-firstInfo.trajDirection().dot(secondInfo.normal());
434  double b = firstInfo.stripDirection().dot(secondInfo.normal());
435  double l0 = firstInfo.oneOverStrip()*slimit+limit ;
436 
437  if(std::abs(a) > (std::abs(b)*l0)) {
438  return StatusCode::SUCCESS;
439  }
440 
441  double c =-secondInfo.trajDirection().dot(firstInfo.normal());
442  double d = secondInfo.stripDirection().dot(firstInfo.normal());
443  double l1 = secondInfo.oneOverStrip()*slimit+limit ;
444 
445  if(std::abs(c) > (std::abs(d)*l1)) {
446  return StatusCode::SUCCESS;
447  }
448 
449  double m = a/b;
450 
451  if(slimit!=0.) {
452  double n = c/d;
453  if (m > limit || n > limit) {
454  double cs = firstInfo.stripDirection().dot(secondInfo.stripDirection())*(firstInfo.oneOverStrip()*firstInfo.oneOverStrip());
455  double dm = (m-1);
456  double dmn = (n-1.)*cs;
457  if(dmn > dm) dm = dmn;
458  m-=dm; n-=(dm/cs);
459  if(std::abs(m) > limit || std::abs(n) > limit) {
460  return StatusCode::SUCCESS;
461  }
462  } else if (m < -limit || n < -limit) {
463  double cs = firstInfo.stripDirection().dot(secondInfo.stripDirection())*(firstInfo.oneOverStrip()*firstInfo.oneOverStrip());
464  double dm = -(1.+m);
465  double dmn = -(1.+n)*cs;
466  if(dmn > dm) dm = dmn;
467  m+=dm; n+=(dm/cs);
468  if(std::abs(m) > limit || std::abs(n) > limit) {
469  return StatusCode::SUCCESS;
470  }
471  }
472  }
473 
474  Eigen::Matrix<double, 3, 1> globalPosition(firstInfo.position(m));
475 
476  // evaluation of the local covariance
477  // Lines taken from SCT_SpacePoint::setupLocalCovarianceSCT()
478  float deltaY = 0.0004; // roughly pitch of SCT (80 mu) / sqrt(12)
479  float covTerm = 1600.*deltaY;
480 
481  Eigen::Matrix<float, 2, 1> variance(0.1, 8.*covTerm);
482  // Swap r/z covariance terms for endcap clusters
483  if ( isEndcap )
484  std::swap( variance(0, 0), variance(1, 0) );
485 
486  // evaluation of measurement details
487  float topHalfStripLength = 0.5*firstInfo.stripDirection().norm();
488  Eigen::Matrix<double, 3, 1> topStripDirection = -firstInfo.stripDirection()/(2.*topHalfStripLength);
489  Eigen::Matrix<double, 3, 1> topStripCenter = 0.5*firstInfo.trajDirection();
490 
491  float bottomHalfStripLength = 0.5*secondInfo.stripDirection().norm();
492  Eigen::Matrix<double, 3, 1> bottomStripDirection = -secondInfo.stripDirection()/(2.*bottomHalfStripLength);
493 
494  Eigen::Matrix<double, 3, 1> stripCenterDistance = firstInfo.stripCenter() - secondInfo.stripCenter();
495 
496  std::vector<std::size_t> measIndexes({firstInfo.clusterIndex(), secondInfo.clusterIndex()});
497 
498 
499  StripSP toAdd;
500  toAdd.idHashes = {firstInfo.idHash(), secondInfo.idHash()};
501  toAdd.globPos = globalPosition.cast<float>();
502  toAdd.cov_r = variance(0,0);
503  toAdd.cov_z = variance(1,0);
504  toAdd.measurementIndexes = measIndexes;
505  toAdd.topHalfStripLength = topHalfStripLength;
506  toAdd.bottomHalfStripLength = bottomHalfStripLength;
507  toAdd.topStripDirection = topStripDirection.cast<float>();
508  toAdd.bottomStripDirection = bottomStripDirection.cast<float>();
509  toAdd.stripCenterDistance = stripCenterDistance.cast<float>();
510  toAdd.topStripCenter = topStripCenter.cast<float>();
511 
512  collection.push_back(toAdd);
513 
514  return StatusCode::SUCCESS;
515  }
516 
518  const InDetDD::SiDetectorElement* element2,
519  double& stripLengthGapTolerance) const
520  {
521  const Amg::Transform3D& T1 = element1->transform();
522  const Amg::Transform3D& T2 = element2->transform();
523  Amg::Vector3D C = element1->center() ;
524  bool isAnnulus = (element1->design().shape() == InDetDD::Annulus);
525 
526  double x12 = T1(0,0)*T2(0,0)+T1(1,0)*T2(1,0)+T1(2,0)*T2(2,0);
527  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));
528  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);
529 
530  double dm = (m_stripGapParameter*r)*std::abs(s*x12);
531  double d = isAnnulus ? dm/.04 : dm/std::sqrt((1.-x12)*(1.+x12));
532 
533  if (std::abs(T1(2,2)) > 0.7) d*=(r/std::abs(T1(2,3)));
534 
535  stripLengthGapTolerance = d;
536 
537  return dm;
538  }
539 
541  const InDetDD::SiDetectorElement* element2,
542  double& stripLengthGapTolerance,
543  double& min, double& max) const
544  {
545  double dm = offset(element1, element2, stripLengthGapTolerance);
546  min -= dm;
547  max += dm;
548  }
549 
551  double& min,
552  double& max,
553  size_t& minStrip,
554  size_t& maxStrip) const
555  {
556  if (element->isBarrel())
557  return;
558 
559  // design for endcap modules
561  = dynamic_cast<const InDetDD::StripStereoAnnulusDesign *> (&element->design());
562  if ( design==nullptr ) {
563  ATH_MSG_FATAL( "Invalid strip annulus design for module with identifier/identifierHash " << element->identify() << "/" << element->identifyHash());
564  return;
565  }
566 
567  // converting min and max from cartesian reference frame to polar frame
568  auto firstPosition = (design->localPositionOfCell(design->strip1Dim(0, 0))+
569  design->localPositionOfCell(design->strip1Dim(design->diodesInRow(0)-1, 0)))*0.5;
570 
571  double radius = firstPosition.xEta();
572 
575 
576  if (not minCellId.isValid()) {
577  minCellId = InDetDD::SiCellId(0);
578  }
579 
580  if (not maxCellId.isValid()) {
581  maxCellId = InDetDD::SiCellId(design->diodesInRow(0)-1);
582  }
583 
584  minStrip = minCellId.strip();
585  maxStrip = maxCellId.strip();
586 
587  // re-evaluate min and max in polar coordinate
588  min = std::atan2(min, radius);
589  max = std::atan2(max, radius);
590  }
591 
592  std::pair<Amg::Vector3D, Amg::Vector3D >
594  const InDetDD::SiDetectorElement* element,
595  size_t& stripIndex) const
596  {
597  const Eigen::Matrix<float,1,1>& localPos = cluster->localPosition<1>();
598 
599  if (element->isEndcap()) {
600  // design for endcap modules
602  = dynamic_cast<const InDetDD::StripStereoAnnulusDesign *> (&element->design());
603  if ( design==nullptr ) {
604  ATH_MSG_FATAL( "Invalid strip annulus design for module with identifier/identifierHash " << element->identify() << "/" << element->identifyHash());
605  return std::pair<Amg::Vector3D, Amg::Vector3D >();
606  }
607 
608  // calculate phi pitch for evaluating the strip index
609  double phiPitchPhi = design->phiWidth()/design->diodesInRow(0);
610  stripIndex = -std::floor(localPos(0, 0) / phiPitchPhi) + design->diodesInRow(0) *0.5 - 0.5;
611 
612  std::pair<Amg::Vector3D, Amg::Vector3D > ends = {
613  element->globalPosition(design->stripPosAtR(stripIndex, 0, design->minR())),
614  element->globalPosition(design->stripPosAtR(stripIndex, 0, design->maxR()))
615  };
616  return ends;
617 
618  }
619 
620  InDetDD::SiLocalPosition localPosition(0., localPos(0, 0), 0.);
621  std::pair<Amg::Vector3D, Amg::Vector3D > ends(element->endsOfStrip(localPosition));
622 
623  return ends;
624  }
625 }
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
beamspotman.r
def r
Definition: beamspotman.py:676
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
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
ActsTrk::StripSP
Definition: IStripSpacePointFormationTool.h:18
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
maxValue
#define maxValue(current, test)
Definition: CompoundLayerMaterialCreator.h:22
max
#define max(a, b)
Definition: cfImp.cxx:41
ContainerAccessor
Definition: ContainerAccessor.h:25
InDetDD::SiDetectorElementCollection
Definition: SiDetectorElementCollection.h:30
InDetDD::StripStereoAnnulusDesign::strip1Dim
virtual int strip1Dim(int strip, int row) const override
only relevant for SCT.
Definition: StripStereoAnnulusDesign.cxx:294
ContainerAccessor::allIdentifiers
std::vector< identifier_t > allIdentifiers() const
Function to return all available identifier (i.e. keys in the map)
Definition: ContainerAccessor.h:84
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
ActsTrk::StripSpacePointFormationTool::correctPolarRange
void correctPolarRange(const InDetDD::SiDetectorElement *element, double &min, double &max, size_t &minStrip, size_t &maxStrip) const
Definition: StripSpacePointFormationTool.cxx:550
makeComparison.deltaY
int deltaY
Definition: makeComparison.py:44
hist_file_dump.d
d
Definition: hist_file_dump.py:137
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.
mergePhysValFiles.start
start
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:14
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
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:540
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:120
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
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:31
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:124
ActsTrk::StripSpacePointFormationTool::m_overlapLimitPhi
Gaudi::Property< float > m_overlapLimitPhi
Definition: StripSpacePointFormationTool.h:119
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:118
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
beamspotman.n
n
Definition: beamspotman.py:731
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:123
ActsTrk::PhiPlus
@ PhiPlus
Definition: StripInformationHelper.h:13
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
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
python.JsonUtils.properties
properties
Definition: JsonUtils.py:96
min
#define min(a, b)
Definition: cfImp.cxx:40
lumiFormat.array
array
Definition: lumiFormat.py:98
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:213
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:425
ActsTrk::StripInformationHelper::position
Amg::Vector3D position(const double &shift) const
Definition: StripInformationHelper.cxx:39
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
SCT_ID::layer_disk
int layer_disk(const Identifier &id) const
Definition: SCT_ID.h:734
dumpNswErrorDb.maxStrip
tuple maxStrip
Definition: dumpNswErrorDb.py:27
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:517
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
ActsTrk::PhiMinus
@ PhiMinus
Definition: StripInformationHelper.h:13
ActsTrk::ThisOne
@ ThisOne
Definition: StripInformationHelper.h:13
InDetDD::SolidStateDetectorElementBase::globalPosition
HepGeom::Point3D< double > globalPosition(const HepGeom::Point3D< double > &localPos) const
transform a reconstruction local position into a global position (inline):
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
RunTileMonitoring.clusters
clusters
Definition: RunTileMonitoring.py:133
dumpNswErrorDb.minStrip
int minStrip
Definition: dumpNswErrorDb.py:26
ReadCellNoiseFromCoolCompare.l0
l0
Definition: ReadCellNoiseFromCoolCompare.py:359
ActsTrk
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
Definition: MuonDetectorBuilderTool.cxx:34
InDetDD::StripStereoAnnulusDesign::localPositionOfCell
virtual SiLocalPosition localPositionOfCell(const SiCellId &cellId) const override
id -> position
Definition: StripStereoAnnulusDesign.cxx:362
skel.l1
l1
Definition: skel.GENtoEVGEN.py:425
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:121
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:45
InDetDD::SiDetectorElementCollection::getDetectorElement
const SiDetectorElement * getDetectorElement(const IdentifierHash &hash) const
Definition: SiDetectorElementCollection.cxx:15
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:593
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
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:721
ActsTrk::StripInformationHelper::trajDirection
const Amg::Vector3D & trajDirection() const
Definition: StripInformationHelper.h:60