ATLAS Offline Software
StripStereoAnnulusDesign.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 #include "Identifier/Identifier.h"
8 
9 #include <stdexcept>
10 #include <algorithm> // For upper_bound
11 #include <iterator> // for std::distance()
12 #include <cmath>
13 
14 namespace InDetDD {
16  const SiDetectorDesign::Axis &thicknessDirection,
17  const double &thickness,
18  const int &readoutSide,
19  const InDetDD::CarrierType &carrier,
20  const int &nRows,
21  const std::vector<int> &nStrips,
22  const std::vector<double> &pitch,
23  const std::vector<double> &stripStartRadius,
24  const std::vector<double> &stripEndRadius,
25  const double &stereoAngle,
26  const double &centreR,
27  const double &waferCentreR,
28  const bool &usePC,
29  InDetDD::DetectorType detectorType) :
30  SCT_ModuleSideDesign(thickness, false, false, true, 1, 0, 0, 0, false, carrier,
31  readoutSide, stripDirection, thicknessDirection),
32  m_nRows(nRows),
33  m_nStrips(nStrips),
34  m_pitch(pitch),
35  m_stripStartRadius(stripStartRadius),
36  m_stripEndRadius(stripEndRadius),
37  m_stereo(stereoAngle),
38  m_R(centreR),
39  m_waferCentreR(waferCentreR),//if not specified in constructor, wafer centre assumed to simply be element centre
40  m_lengthBF(2. * waferCentreR * std::sin(stereoAngle*0.5)),// Eq. 5 p. 7
41  m_sinStereo(std::sin(m_stereo)),
42  m_cosStereo(std::cos(m_stereo)),
43  m_sinNegStereo(-m_sinStereo),
44  m_cosNegStereo(m_cosStereo),
45  m_usePC(usePC)
46 {
47 
48  m_detectorType = detectorType;
49 
50  if (nRows < 0) {
51  throw std::runtime_error(
52  "ERROR: StripStereoAnnulusDesign called with negative number of rows");
53  }
54 
55  if (pitch.size() != (unsigned) nRows) {
56  throw std::runtime_error(
57  "ERROR: StripStereoAnnulusDesign called with insufficiant pitch values for no. of rows");
58  }
59 
60  if (stripStartRadius.size() != (unsigned) nRows) {
61  throw std::runtime_error(
62  "ERROR: StripStereoAnnulusDesign called with insufficiant strip start-positions for no. of rows");
63  }
64 
65  if (stripEndRadius.size() != (unsigned) nRows) {
66  throw std::runtime_error(
67  "ERROR: StripStereoAnnulusDesign called with insufficiant strip end-positions for no. of rows");
68  }
69 
70  int startStrip = 0;
71  for (int r = 0; r < nRows; ++r) {
72  m_firstStrip.push_back(startStrip);
73  startStrip += m_nStrips[r];
74  }
75  int totalStrips = startStrip;
76  m_firstStrip.push_back(totalStrips); // Add one more as total number of strips, so you can safely use row + 1 in a loop
77 
78  m_scheme.setCells(totalStrips);
79  m_scheme.setDiodes(totalStrips);
80 
81 
82  double phi = m_nStrips[0] * m_pitch[0];
83 
84  if (m_usePC) {
85  // Maths for calculating PC bounds is based off
86  // Trk::AnnulusBoundsPC::fromCartesian() and detailed at
87  // https://hep.ph.liv.ac.uk/~jsmith/dropbox/AnnulusBoundsPC_Constructor_Maths.pdf.
88  // This will later form some kind of INT Note or report or similar
89  // internal documentation,
90  Amg::Vector2D origin(m_R * (1.0 - std::cos(m_stereo)),
91  m_R * std::sin(-m_stereo));
92  m_bounds = std::make_unique<Trk::AnnulusBoundsPC>(
94  m_stripEndRadius.back(),
95  phi * -0.5,
96  phi * 0.5,
97  origin,
98  0));
99  } else {
100  m_bounds = std::make_unique<Trk::AnnulusBounds>(
102  m_stripEndRadius.back(),
104  phi,
105  m_stereo));
106  }
107 }
108 
110  const SiDetectorDesign::Axis &thicknessDirection,
111  const double &thickness,
112  const int &readoutSide,
113  const InDetDD::CarrierType &carrier,
114  const int &nRows,
115  const std::vector<int> &nStrips,
116  const std::vector<double> &pitch,
117  const std::vector<double> &stripStartRadius,
118  const std::vector<double> &stripEndRadius,
119  const double &stereoAngle,
120  const double &centreR,
121  const bool &usePC,
122  InDetDD::DetectorType detectorType):
123  StripStereoAnnulusDesign(stripDirection,thicknessDirection,thickness,readoutSide,carrier,nRows,nStrips,
124  pitch,stripStartRadius,stripEndRadius,stereoAngle,centreR,centreR,usePC,detectorType){
125 //assuming here that centreR==waferCentreR
126 }
127 
129  if (m_usePC) return beamToStripPC(pos);
130 
131  const double x_beam = pos.xEta();
132  const double y_beam = pos.xPhi();
133 
134  // Transform to strip frame SF (eq. 36 in ver G, combined with eq. 2 since we are in beam frame)
135  //
136  // x_strip cos(-m_stereo) -sin(-m_stereo) x-R R
137  // ( ) = [ ]( ) + ( )
138  // y_strip sin(-m_stereo) cos(-m_stereo) y 0
139  const double x_strip = m_cosNegStereo * (x_beam - m_waferCentreR) - m_sinNegStereo * y_beam + m_waferCentreR;
140  const double y_strip = m_sinNegStereo * (x_beam - m_waferCentreR) + m_cosNegStereo * y_beam;
141 
142  return {x_strip, y_strip};
143 }
144 
146  const double phi_beam = pos.xPhi();
147  const double rad_beam = pos.xEta();
148 
149  // Convert to cart and use cartesian transform
150  const double x_beam = rad_beam * std::cos(phi_beam);
151  const double y_beam = rad_beam * std::sin(phi_beam);
152 
153  // Transform to strip frame SF (eq. 36 in ver G, combined with eq. 2 since we are in beam frame)
154  //
155  // x_strip cos(-m_stereo) -sin(-m_stereo) x-R R
156  // ( ) = [ ]( ) + ( )
157  // y_strip sin(-m_stereo) cos(-m_stereo) y 0
158  const double x_strip = m_cosNegStereo * (x_beam - m_waferCentreR) - m_sinNegStereo * y_beam + m_waferCentreR;
159  const double y_strip = m_sinNegStereo * (x_beam - m_waferCentreR) + m_cosNegStereo * y_beam;
160 
161  const double phi_strip = std::atan2(y_strip, x_strip);
162  const double rad_strip = std::hypot(x_strip, y_strip);
163 
164  return {rad_strip, phi_strip};
165 }
166 
176  const double phi_beam = pos.xPhi();
177  const double rad_beam = pos.xEta();
178 
179  // Exclusively-polar transform:
180  // Trig which can be precalculated in the future
181  const double stereo_2 = m_stereo*0.5;
182  const double cosStereo_2 = std::cos(stereo_2);
183  const double sin_plus_stereo_2 = std::sin(stereo_2);
184 
185  // calculation for strip-frame radius uses cosine law - see ATL-COM-ITK-2021-048
186  const double rad_conv = 2.0*m_waferCentreR*std::abs(sin_plus_stereo_2);
187  const double rad_strip = std::sqrt( std::pow(rad_beam,2.0) + std::pow(rad_conv,2.0) + 2.0*rad_beam*rad_conv*cosStereo_2);
188 
189  // calculation for strip-frame angle uses sine law - see ATL-COM-ITK-2021-048
190  const double phi_strip = M_PI_2 - stereo_2 - std::asin((rad_beam*std::sin(M_PI + phi_beam - stereo_2))/rad_strip);
191 
192  return {rad_strip, phi_strip};
193 }
194 
196  if (m_usePC) return stripToBeamPC(pos);
197 
198  const double x_strip = pos.xEta();
199  const double y_strip = pos.xPhi();
200 
201  // Transform to beam frame (eq. 36 in ver G, combined with eq. 2 since we are in strip frame)
202  //
203  // x_beam cos(m_stereo) -sin(m_stereo) x-R R
204  // ( ) = [ ]( ) + ( )
205  // y_beam sin(m_stereo) cos(m_stereo) y 0
206  const double x_beam = m_cosStereo * (x_strip - m_waferCentreR) - m_sinStereo * y_strip + m_waferCentreR;
207  const double y_beam = m_sinStereo * (x_strip - m_waferCentreR) + m_cosStereo * y_strip;
208 
209  return {x_beam, y_beam};
210 }
211 
213  const double phi_strip = pos.xPhi();
214  const double rad_strip = pos.xEta();
215 
216  // Convert to cart and use previous transform
217  const double x_strip = rad_strip * std::cos(phi_strip);
218  const double y_strip = rad_strip * std::sin(phi_strip);
219 
220  // Transform to beam frame (eq. 36 in ver G, combined with eq. 2 since we are in strip frame)
221  //
222  // x_beam cos(m_stereo) -sin(m_stereo) x-R R
223  // ( ) = [ ]( ) + ( )
224  // y_beam sin(m_stereo) cos(m_stereo) y 0
225  const double x_beam = m_cosStereo * (x_strip - m_waferCentreR) - m_sinStereo * y_strip + m_waferCentreR;
226  const double y_beam = m_sinStereo * (x_strip - m_waferCentreR) + m_cosStereo * y_strip;
227 
228  const double phi_beam = std::atan2(y_beam, x_beam);
229  const double rad_beam = std::hypot(x_beam, y_beam);
230 
231  return {rad_beam, phi_beam};
232 }
233 
243  const double phi_strip = pos.xPhi();
244  const double rad_strip = pos.xEta();
245 
246  // Exclusively-polar transform:
247  // Trig which can be precalculated in the future
248  const double stereo_2 = m_stereo*0.5;
249  const double sin_plus_stereo_2 = std::sin(stereo_2);
250 
251  // calculation for beam-frame radius uses cosine law - see ATL-COM-ITK-2021-048
252  const double rad_conv = 2.0*m_waferCentreR*std::abs(sin_plus_stereo_2);
253  const double rad_beam = std::sqrt( std::pow(rad_strip,2.0) + std::pow(rad_conv,2.0) + 2.0*rad_strip*rad_conv*std::cos(M_PI_2 - stereo_2 - phi_strip));
254 
255  // calculation for beam-frame angle uses sine law - see ATL-COM-ITK-2021-048
256  const double phi_beam = stereo_2 - M_PI_2 + std::asin((rad_strip*std::sin(M_PI_2 - stereo_2 - phi_strip))/rad_beam);
257 
258  return {rad_beam, phi_beam};
259 }
260 
261 
263  return Amg::Vector3D(m_R, 0., 0.);
264 }
265 
266 double StripStereoAnnulusDesign::sinStripAngleReco(double phiCoord, double etaCoord) const {
267 //
268 // Transform to strip frame SF (eq. 36 in ver G, combined with eq. 2 since we are in beam frame)
269 //
270  SiLocalPosition pos_strip = beamToStrip({etaCoord, phiCoord});
271 
272  double phi_strip = (m_usePC) ? pos_strip.xPhi() : std::atan2(pos_strip.xPhi(), pos_strip.xEta());
273 
274  // The minus sign below is because this routine is called by tracking software, which swaps x and y, then measures angles from y
275  // to x
276  return -std::sin(phi_strip + m_stereo);
277 }
278 
287 std::pair<int,int> StripStereoAnnulusDesign::getStripRow(SiCellId cellId) const {
288  int strip1D = cellId.phiIndex();
289  int rowNum = row(strip1D);
290  int strip2D = strip1D - m_firstStrip[rowNum];
291  return {strip2D,rowNum};
292 }
293 
294 int StripStereoAnnulusDesign::strip1Dim(int strip, int row) const {
295 
296  return m_firstStrip[row] + strip;
297 }
298 
299 void StripStereoAnnulusDesign::neighboursOfCell(const SiCellId &cellId, std::vector<SiCellId> &neighbours) const {
300 
301 
302  neighbours.clear();
303 
304  if (!cellId.isValid()) {
305  return;
306  }
307 
308  auto [strip, row] = getStripRow(cellId);
309  int stripM = strip - 1;
310  int stripP = strip + 1;
311 
312  if (stripM >= m_firstStrip[row]) {
313  neighbours.emplace_back(stripM);
314  }
315  if (stripP < m_firstStrip[row] + m_nStrips[row]) {
316  neighbours.emplace_back(stripP);
317  }
318 
319 }
320 
327  return *(m_bounds); // Equivalent but more explicit than *m_bounds -
328  // gets the normal pointer from the unique then dereferences it.
329 }
330 
332 //
333 // Find the row
334 //
335  double rad_beam = (m_usePC) ? pos.xEta() : pos.r();
336  if (rad_beam < m_stripStartRadius[0] || rad_beam >= m_stripEndRadius.back()) {
337  return {}; // return an invalid id
338  }
339 
340  std::vector<double>::const_iterator endPtr = upper_bound(m_stripStartRadius.begin(), m_stripStartRadius.end(), rad_beam);
341  int row = distance(m_stripStartRadius.begin(), endPtr) - 1;
342  // Following should never happen, check is done on r above
343  if (row < 0 || row >= m_nRows) {
344  return {}; // return an invalid id
345  }
346 
347  // Transform to strip frame SF (eq. 36 in ver G, combined with eq. 2 since we are in beam frame)
348  SiLocalPosition pos_strip = beamToStrip(pos);
349  double phi_strip = (m_usePC) ? pos_strip.xPhi() : std::atan2(pos_strip.xPhi(), pos_strip.xEta());
350  int strip = std::floor(phi_strip / m_pitch[row]) + m_nStrips[row] *0.5;
351  if (strip < 0) { // Outside
352  return {}; // return an invalid id
353  }
354  if (strip >= m_nStrips[row]) { // Outside
355  return {}; // return an invalid id
356  }
357 
358  int strip1D = strip1Dim(strip, row);
359  return {strip1D, 0};
360 }
361 
363  auto [strip, row] = getStripRow(cellId);
364  double r = (m_stripEndRadius[row] + m_stripStartRadius[row])*0.5;
365 
366  // Modified StripPosAtR?
367  // get phi of strip in the strip system
368  double phi_strip = (strip - m_nStrips[row] / 2. + 0.5) * m_pitch[row];
369 
370  double b = -2. * m_lengthBF * std::sin(m_stereo/2. + phi_strip);
371  double c = m_lengthBF * m_lengthBF - r * r;
372  // this is the radius in the strip system
373  double rad_strip = (-b + std::sqrt(b * b - 4. * c))/2.;
374 
375  if (m_usePC) return stripToBeam({rad_strip,phi_strip});
376  else {
377  //else use cart
378  double x_strip = rad_strip * std::cos(phi_strip);
379  double y_strip = rad_strip * std::sin(phi_strip);
380  //Return strip pos not beam pos?
381  return stripToBeam({x_strip, y_strip});
382  }
383 }
384 
386 
387  double phi_strip = (strip - m_nStrips[row]*0.5 + 0.5) * m_pitch[row];
388 
389  double b = -2. * m_lengthBF * std::sin(m_stereo*0.5 + phi_strip);
390  double c = m_lengthBF * m_lengthBF - r * r;
391  double rad_strip = (-b + std::sqrt(b * b - 4. * c))*0.5;
392 
393  if (m_usePC) return stripToBeam({rad_strip,phi_strip});
394 
395  double x_strip = rad_strip * std::cos(phi_strip);
396  double y_strip = rad_strip * std::sin(phi_strip);
397 
398  return stripToBeam({x_strip, y_strip});
399 }
400 
402 //
403 // Return the average centre-position of the first and last strips.
404 //
405 
406  SiLocalPosition startPos = localPositionOfCell(cellId); // Should automatically detect PC Usage
407 
408  if (clusterSize <= 1) {
409  return startPos;
410  }
411 
412  auto [strip, row] = getStripRow(cellId);
413  int stripEnd = strip + clusterSize - 1;
414  SiCellId endId = strip1Dim(stripEnd, row);
415  SiLocalPosition endPos = localPositionOfCell(endId); // Should automatically detect PC Usage
416 
417  return (startPos + endPos)*0.5;
418 }
419 
429 
430  auto [strip, row] = getStripRow(cellId);
431  // this is the radius in the module / radial system
432  double r = (m_stripEndRadius[row] + m_stripStartRadius[row])*0.5;
433 
434  // get phi of strip in the strip system
435  double phiPrime = (strip - m_nStrips[row]*0.5 + 0.5) * m_pitch[row];
436 
437  double b = -2. * m_lengthBF * std::sin(m_stereo*0.5 + phiPrime);
438  double c = m_lengthBF * m_lengthBF - r * r;
439  // this is the radius in the strip systems
440  double rPrime = (-b + std::sqrt(b * b - 4. * c))*0.5;
441 
442  // flip this, since coordinate system is defined the other way round
443  double phi = -1*phiPrime;
444 
445  // xEta => r, xPhi = phi
446  return SiLocalPosition(rPrime, phi);
447 }
448 
459  SiLocalPosition startPos = localPositionOfCellPC(cellId);
460 
461  if (clusterSize <= 1) {
462  return startPos;
463  }
464 
465  auto [strip, row] = getStripRow(cellId);
466  int stripEnd = strip + clusterSize - 1;
467  SiCellId endId = strip1Dim(stripEnd, row);
468  SiLocalPosition endPos = localPositionOfCellPC(endId);
469 
470  return (startPos + endPos)*0.5;
471 }
472 
474 std::pair<SiLocalPosition, SiLocalPosition> StripStereoAnnulusDesign::endsOfStrip(SiLocalPosition const &pos) const {
475 
476  SiCellId cellId = cellIdOfPosition(pos);
477 
478  auto [strip, row] = getStripRow(cellId);
479 
481 
483 
484  return std::pair<SiLocalPosition, SiLocalPosition>(innerEnd, outerEnd);
485 }
486 
487 bool StripStereoAnnulusDesign::inActiveArea(SiLocalPosition const &pos, bool /*checkBondGap*/) const {
488 
490  bool inside = id.isValid();
491 
492  return inside;
493 }
494 
495 // Used in surfaceChargesGenerator
497 
498 
499  // Get stripframe phi of pos
500  SiLocalPosition pos_stripframe = beamToStrip(pos);
501  double pos_phi_stripframe = (m_usePC) ? pos_stripframe.xPhi() : std::atan2(pos_stripframe.xPhi(),pos_stripframe.xEta());
502 
503  // Get stripframe phi of strip
504  SiCellId cellId = cellIdOfPosition(pos);
505  SiLocalPosition stripPos_beamframe = localPositionOfCell(cellId);
506  SiLocalPosition stripPos_stripframe = beamToStrip(stripPos_beamframe);
507  double strip_phi_stripframe = (m_usePC) ? stripPos_stripframe.xPhi() : std::atan2(stripPos_stripframe.xPhi(),stripPos_stripframe.xEta());
508 
509  auto [strip, row] = getStripRow(cellId);
510  return std::abs(pos_phi_stripframe - strip_phi_stripframe) / m_pitch[row];
511 }
512 
515  throw std::runtime_error("Call to StripStereoAnnulusDesign::parameters; not yet implemented");
516 }
517 
518 // Used in VP1 graphics. DEPRECATED.
520 // throw std::runtime_error("Deprecated positionFromStrip called.");
521  return localPositionOfCell(cellId);
522 }
523 
524 // DEPRECATED but pure virtual in base class; which row?? - assume row 0.
526  return localPositionOfCell(SiCellId(stripNumber, 0));
527 }
528 
531 // returns an invalid id.
533 
534  if (!cellId.isValid()) {
535  return {}; // Invalid
536  }
537  int row = cellId.etaIndex();
538  int strip = cellId.phiIndex();
539  if (strip < 0 || row < 0 || row >= m_nRows || strip >= m_nStrips[row]) {
540  return {}; // Invalid
541  }
542  return cellId;
543 }
544 
546 // Return the total length of all strips, i.e. the active area length.
547  return m_stripEndRadius.back() - m_stripStartRadius[0];
548 }
549 
551 // Return approximate width between the two central rows
552 float middleRow = m_stripStartRadius.size() * 0.5 - 1;
553 if (middleRow < 0) {
554  //single-row version
555  return 2. * tan((m_pitch[0] * m_nStrips[0])*0.5) * ((m_stripStartRadius[0] + m_stripEndRadius[0])*0.5);
556  }
557 else return 2. * tan((m_pitch[middleRow] * m_nStrips[middleRow]) * 0.5) * m_stripEndRadius[middleRow];
558 
559 }
560 
562  return 2. * tan((m_pitch[0] * m_nStrips[0]) * 0.5 ) * m_stripStartRadius[0];
563 }
564 
566  return 2. * tan((m_pitch.back() * m_nStrips.back()) * 0.5) * m_stripEndRadius.back();
567 }
568 
570 // Return average strip length
571  return length() / m_stripStartRadius.size();
572 }
573 
574 HepGeom::Vector3D<double> StripStereoAnnulusDesign::phiMeasureSegment(const SiLocalPosition & /*position*/)
575 const {
576  throw std::runtime_error("Call to phiMeasureSegment, DEPRECATED, not implemented.");
577 }
578 
579 void StripStereoAnnulusDesign::distanceToDetectorEdge(SiLocalPosition const & pos, double & etaDist, double & phiDist) const {
580  // For eta, we use the Strip frame. This is centred at the beamline, x along eta, y along phi, z along depth
581  // Happens to coincide with SiLocalPosition; no transform needed.
582  double rInner = m_stripStartRadius[0];
583  double rOuter = m_stripEndRadius[m_nRows - 1];
584 
585  double rad_beam = (m_usePC) ? pos.xEta() : std::hypot(pos.xEta(), pos.xPhi());
586 
587  if (rad_beam < rInner)
588  etaDist = rad_beam - rInner;
589  else if (rad_beam > rOuter)
590  etaDist = rOuter - rad_beam;
591  else
592  etaDist = std::min(rOuter - rad_beam, rad_beam - rInner);
593 
594  // For phi, we use the Strip frame. Transform to Strip-frame:
595  SiLocalPosition pos_strip = beamToStrip(pos);
596 
597  // Put these into polar coordinates
598  double rad_strip = (m_usePC) ? pos_strip.xEta() : std::hypot(pos_strip.xEta(), pos_strip.xPhi());
599  double phi_strip = (m_usePC) ? pos_strip.xPhi() : std::atan2(pos_strip.xPhi(), pos_strip.xEta());
600 
601  double phiAngleMax = m_pitch[0] * m_nStrips[0]*0.5;
602  double phiAngleMin = -phiAngleMax;
603 
604  if (phi_strip < phiAngleMin)
605  phiDist = rad_strip * (phi_strip - phiAngleMin);
606  else if (phi_strip > phiAngleMax)
607  phiDist = rad_strip * (phiAngleMax - phi_strip);
608  else
609  phiDist = rad_strip * std::min(phiAngleMax - phi_strip, phi_strip - phiAngleMin);
610 }
611 
613  {
614  if (m_usePC) return InDetDD::PolarAnnulus;
615  else return InDetDD::Annulus;
616  }
617 
619 {
620  SiLocalPosition lpoc = localPositionOfCell(cellId);
621  std::pair<SiLocalPosition, SiLocalPosition> end = endsOfStrip(lpoc);
622  double dx = end.second.xEta() - end.first.xEta();
623  double dy = end.second.xPhi() - end.first.xPhi();
624  return std::sqrt(dx * dx + dy * dy);
625 }
626 
627 
628 } // namespace InDetDD
629 
InDetDD::StripStereoAnnulusDesign::width
virtual double width() const override
Method to calculate average width of a module.
Definition: StripStereoAnnulusDesign.cxx:550
InDetDD::StripStereoAnnulusDesign::m_pitch
const std::vector< double > m_pitch
Definition: StripStereoAnnulusDesign.h:232
query_example.row
row
Definition: query_example.py:24
InDetDD::StripStereoAnnulusDesign::length
virtual double length() const override
Method to calculate length of a module.
Definition: StripStereoAnnulusDesign.cxx:545
beamspotman.r
def r
Definition: beamspotman.py:676
InDetDD::StripStereoAnnulusDesign::m_sinStereo
const double m_sinStereo
Definition: StripStereoAnnulusDesign.h:241
InDetDD::StripStereoAnnulusDesign::scaledDistanceToNearestDiode
virtual double scaledDistanceToNearestDiode(const SiLocalPosition &chargePos) const override
give distance to the nearest diode in units of pitch, from 0.0 to 0.5, this method should be fast as ...
Definition: StripStereoAnnulusDesign.cxx:496
InDetDD::StripStereoAnnulusDesign::localPositionOfClusterPC
SiLocalPosition localPositionOfClusterPC(const SiCellId &cellId, int clusterSize) const
This is for debugging only.
Definition: StripStereoAnnulusDesign.cxx:458
InDetDD::StripStereoAnnulusDesign::m_R
const double m_R
Definition: StripStereoAnnulusDesign.h:236
InDetDD::StripStereoAnnulusDesign::positionFromStrip
SiLocalPosition positionFromStrip(const SiCellId &cellId) const
Definition: StripStereoAnnulusDesign.cxx:519
InDetDD::StripStereoAnnulusDesign::stripToBeamPC
SiLocalPosition stripToBeamPC(const SiLocalPosition &pos) const
Definition: StripStereoAnnulusDesign.cxx:212
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
InDetDD::StripStereoAnnulusDesign::parameters
virtual SiDiodesParameters parameters(const SiCellId &cellId) const override
Return strip width, centre, length etc. Hard to find if this is used or not.
Definition: StripStereoAnnulusDesign.cxx:514
InDetDD::StripStereoAnnulusDesign::strip1Dim
virtual int strip1Dim(int strip, int row) const override
only relevant for SCT.
Definition: StripStereoAnnulusDesign.cxx:294
InDetDD::StripStereoAnnulusDesign::cellIdInRange
virtual SiCellId cellIdInRange(const SiCellId &) const override
DEPRECATED: only used in a stupid example (2014) Check if cell is in range.
Definition: StripStereoAnnulusDesign.cxx:532
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
InDetDD::StripStereoAnnulusDesign::m_usePC
const bool m_usePC
Definition: StripStereoAnnulusDesign.h:245
InDetDD::SCT_ModuleSideDesign
Definition: SCT_ModuleSideDesign.h:40
InDetDD::StripStereoAnnulusDesign::beamToStripPC
SiLocalPosition beamToStripPC(const SiLocalPosition &pos) const
Definition: StripStereoAnnulusDesign.cxx:145
Trk::SurfaceBounds
Definition: SurfaceBounds.h:47
Trk::AnnulusBounds
Definition: AnnulusBounds.h:45
conifer::pow
constexpr int pow(int x)
Definition: conifer.h:20
InDetDD::SiCellId::isValid
bool isValid() const
Test if its in a valid state.
Definition: SiCellId.h:136
M_PI
#define M_PI
Definition: ActiveFraction.h:11
InDetDD::StripStereoAnnulusDesign::inActiveArea
virtual bool inActiveArea(const SiLocalPosition &chargePos, bool checkBondGap=true) const override
check if the position is in active area
Definition: StripStereoAnnulusDesign.cxx:487
InDetDD::StripStereoAnnulusDesign::m_stripEndRadius
const std::vector< double > m_stripEndRadius
Definition: StripStereoAnnulusDesign.h:234
InDetDD::DetectorDesign::Axis
Axis
Definition: DetectorDesign.h:59
InDetDD::SiCellId::phiIndex
int phiIndex() const
Get phi index. Equivalent to strip().
Definition: SiCellId.h:122
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
InDetDD::StripStereoAnnulusDesign::bounds
virtual const Trk::SurfaceBounds & bounds() const override
Get a reference to the module bounds object.
Definition: StripStereoAnnulusDesign.cxx:326
InDetDD::StripStereoAnnulusDesign::StripStereoAnnulusDesign
StripStereoAnnulusDesign(const SiDetectorDesign::Axis &stripDirection, const SiDetectorDesign::Axis &thicknessDirection, const double &thickness, const int &readoutSide, const InDetDD::CarrierType &carrier, const int &nRows, const std::vector< int > &nStrips, const std::vector< double > &pitch, const std::vector< double > &stripStart, const std::vector< double > &stripEnd, const double &stereoAngle, const double &centreR, const bool &usePC, InDetDD::DetectorType detectorType=InDetDD::Undefined)
Definition: StripStereoAnnulusDesign.cxx:109
InDetDD::StripStereoAnnulusDesign::distanceToDetectorEdge
virtual void distanceToDetectorEdge(const SiLocalPosition &localPosition, double &etaDist, double &phiDist) const override
Returns distance to nearest detector active edge +ve = inside -ve = outside.
Definition: StripStereoAnnulusDesign.cxx:579
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
InDetDD::SiLocalPosition
Definition: SiLocalPosition.h:31
InDetDD::SiLocalPosition::xPhi
double xPhi() const
position along phi direction:
Definition: SiLocalPosition.h:123
InDetDD::StripStereoAnnulusDesign::beamToStripPCpolar
SiLocalPosition beamToStripPCpolar(const SiLocalPosition &pos) const
Version of StripStereoAnnulusDesign::beamToStripPC transform based exclusively in a polar system.
Definition: StripStereoAnnulusDesign.cxx:175
InDetDD::StripStereoAnnulusDesign::minWidth
virtual double minWidth() const override
Method to calculate minimum width of a module.
Definition: StripStereoAnnulusDesign.cxx:561
InDetDD::StripStereoAnnulusDesign::stripPosAtR
SiLocalPosition stripPosAtR(int strip, int row, double r) const
Definition: StripStereoAnnulusDesign.cxx:385
InDetDD::SiCellId::etaIndex
int etaIndex() const
Get eta index.
Definition: SiCellId.h:114
InDetDD::StripStereoAnnulusDesign::m_stripStartRadius
const std::vector< double > m_stripStartRadius
Definition: StripStereoAnnulusDesign.h:233
InDetDD::DetectorType
DetectorType
Definition: DetectorDesign.h:45
InDetDD::SCT_ModuleSideDesign::m_detectorType
InDetDD::DetectorType m_detectorType
Definition: SCT_ModuleSideDesign.h:197
InDetDD::StripStereoAnnulusDesign::pitch
double pitch(const SiCellId &cellId) const
InDetDD::SiLocalPosition::xEta
double xEta() const
position along eta direction:
Definition: SiLocalPosition.h:118
Trk::AnnulusBoundsPC
Class that implements the asymmetric shape of the ITk strip endcap modules.
Definition: AnnulusBoundsPC.h:30
InDetDD::Annulus
@ Annulus
Definition: DetectorDesign.h:42
InDetDD::StripStereoAnnulusDesign
Definition: StripStereoAnnulusDesign.h:50
InDetDD::StripStereoAnnulusDesign::neighboursOfCell
virtual void neighboursOfCell(const SiCellId &cellId, std::vector< SiCellId > &neighbours) const override
Get the neighbouring diodes of a given diode: Cell for which the neighbours must be found List of cel...
Definition: StripStereoAnnulusDesign.cxx:299
InDetDD::PolarAnnulus
@ PolarAnnulus
Definition: DetectorDesign.h:42
InDetDD::SCT_ModuleSideDesign::m_scheme
SCT_ReadoutScheme m_scheme
Definition: SCT_ModuleSideDesign.h:196
InDetDD::StripStereoAnnulusDesign::localPositionOfCluster
virtual SiLocalPosition localPositionOfCluster(const SiCellId &cellId, int clusterSize) const override
Definition: StripStereoAnnulusDesign.cxx:401
InDetDD::StripStereoAnnulusDesign::m_waferCentreR
const double m_waferCentreR
Definition: StripStereoAnnulusDesign.h:237
drawFromPickle.tan
tan
Definition: drawFromPickle.py:36
InDetDD::StripStereoAnnulusDesign::m_sinNegStereo
const double m_sinNegStereo
Definition: StripStereoAnnulusDesign.h:243
InDetDD::StripStereoAnnulusDesign::strip
virtual int strip(int stripId1Dim) const override
Definition: StripStereoAnnulusDesign.h:351
InDetDD::StripStereoAnnulusDesign::m_bounds
std::unique_ptr< Trk::SurfaceBounds > m_bounds
Definition: StripStereoAnnulusDesign.h:239
InDetDD::StripStereoAnnulusDesign::endsOfStrip
virtual std::pair< SiLocalPosition, SiLocalPosition > endsOfStrip(const SiLocalPosition &position) const override
Give end points of the strip that covers the given position.
Definition: StripStereoAnnulusDesign.cxx:474
InDetDD::StripStereoAnnulusDesign::m_stereo
const double m_stereo
Definition: StripStereoAnnulusDesign.h:235
min
#define min(a, b)
Definition: cfImp.cxx:40
InDetDD::StripStereoAnnulusDesign::row
virtual int row(int stripId1Dim) const override
Definition: StripStereoAnnulusDesign.h:339
InDetDD::StripStereoAnnulusDesign::stripToBeamPCpolar
SiLocalPosition stripToBeamPCpolar(const SiLocalPosition &pos) const
Version of StripStereoAnnulusDesign::stripToBeamPC transform based exclusively in a polar system.
Definition: StripStereoAnnulusDesign.cxx:242
InDetDD::StripStereoAnnulusDesign::getStripRow
std::pair< int, int > getStripRow(SiCellId cellId) const final
Get the strip and row number of the cell.
Definition: StripStereoAnnulusDesign.cxx:287
MuonGM::nStrips
int nStrips(const MuonGM::TgcReadoutElement &readoutEle, int layer)
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.cxx:46
InDetDD::StripStereoAnnulusDesign::sensorCenter
virtual Amg::Vector3D sensorCenter() const override
Return the centre of a sensor in the local reference frame.
Definition: StripStereoAnnulusDesign.cxx:262
InDetDD::StripStereoAnnulusDesign::m_firstStrip
std::vector< int > m_firstStrip
Definition: StripStereoAnnulusDesign.h:231
InDetDD::StripStereoAnnulusDesign::m_cosStereo
const double m_cosStereo
Definition: StripStereoAnnulusDesign.h:242
InDetDD::StripStereoAnnulusDesign::m_cosNegStereo
const double m_cosNegStereo
Definition: StripStereoAnnulusDesign.h:244
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
InDetDD::StripStereoAnnulusDesign::etaPitch
virtual double etaPitch() const override
Definition: StripStereoAnnulusDesign.cxx:569
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
InDetDD::SCT_ReadoutScheme::setCells
void setCells(int numReadoutCells)
Definition: SCT_ReadoutScheme.h:109
InDetDD::StripStereoAnnulusDesign::shape
virtual DetectorShape shape() const override
Shape of element.
Definition: StripStereoAnnulusDesign.cxx:612
InDetDD::DetectorShape
DetectorShape
Definition: DetectorDesign.h:41
InDetDD::StripStereoAnnulusDesign::stripToBeam
SiLocalPosition stripToBeam(const SiLocalPosition &pos) const
Definition: StripStereoAnnulusDesign.cxx:195
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
InDetDD::SiCellId
Definition: SiCellId.h:29
StripStereoAnnulusDesign.h
InDetDD::StripStereoAnnulusDesign::cellIdOfPosition
virtual SiCellId cellIdOfPosition(const SiLocalPosition &localPos) const override
position -> id
Definition: StripStereoAnnulusDesign.cxx:331
Trk::inside
@ inside
Definition: PropDirection.h:29
makeTRTBarrelCans.dy
tuple dy
Definition: makeTRTBarrelCans.py:21
InDetDD::CarrierType
CarrierType
Definition: InDetDD_Defs.h:17
InDetDD
Message Stream Member.
Definition: FakeTrackBuilder.h:8
GeoPrimitivesHelpers.h
makeTRTBarrelCans.dx
tuple dx
Definition: makeTRTBarrelCans.py:20
InDetDD::StripStereoAnnulusDesign::m_lengthBF
const double m_lengthBF
Definition: StripStereoAnnulusDesign.h:238
InDetDD::StripStereoAnnulusDesign::beamToStrip
SiLocalPosition beamToStrip(const SiLocalPosition &pos) const
Definition: StripStereoAnnulusDesign.cxx:128
InDetDD::StripStereoAnnulusDesign::maxWidth
virtual double maxWidth() const override
Method to calculate maximum width of a module.
Definition: StripStereoAnnulusDesign.cxx:565
InDetDD::StripStereoAnnulusDesign::localPositionOfCell
virtual SiLocalPosition localPositionOfCell(const SiCellId &cellId) const override
id -> position
Definition: StripStereoAnnulusDesign.cxx:362
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
InDetDD::StripStereoAnnulusDesign::localPositionOfCellPC
SiLocalPosition localPositionOfCellPC(const SiCellId &cellId) const
This is for debugging only.
Definition: StripStereoAnnulusDesign.cxx:428
InDetDD::StripStereoAnnulusDesign::m_nStrips
const std::vector< int > m_nStrips
Definition: StripStereoAnnulusDesign.h:230
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
InDetDD::StripStereoAnnulusDesign::m_nRows
const int m_nRows
Definition: StripStereoAnnulusDesign.h:229
python.compressB64.c
def c
Definition: compressB64.py:93
InDetDD::StripStereoAnnulusDesign::phiMeasureSegment
virtual HepGeom::Vector3D< double > phiMeasureSegment(const SiLocalPosition &position) const override
Helper method for stereo angle computation, DEPRECATED.
Definition: StripStereoAnnulusDesign.cxx:574
InDetDD::SCT_ReadoutScheme::setDiodes
void setDiodes(int numDiodes)
Definition: SCT_ReadoutScheme.h:105
InDetDD::StripStereoAnnulusDesign::stripLength
double stripLength(const SiCellId &cellId) const
Definition: StripStereoAnnulusDesign.cxx:618
InDetDD::StripStereoAnnulusDesign::sinStripAngleReco
virtual double sinStripAngleReco(double phiCoord, double etaCoord) const override
Give strip angle in the reco frame.
Definition: StripStereoAnnulusDesign.cxx:266
InDetDD::SiDiodesParameters
Definition: SiDiodesParameters.h:25