ATLAS Offline Software
SiDetectorElement.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 
16 #include "GeoModelKernel/GeoVFullPhysVol.h"
19 #include "InDetIdentifier/SCT_ID.h"
20 #include "InDetIdentifier/PLR_ID.h"
24 
25 #include "CLHEP/Geometry/Vector3D.h"
26 #include "CLHEP/Units/SystemOfUnits.h"
27 #include "CLHEP/Vector/ThreeVector.h"
28 
29 #include <cassert>
30 #include <cmath>
31 
32 namespace InDetDD {
33  using Trk::distPhi;
34  using Trk::distEta;
35  using Trk::distDepth;
36 
37  // Constructor with parameters:
39  const SiDetectorDesign* design,
40  const GeoVFullPhysVol* geophysvol,
41  const SiCommonItems* commonItems,
42  const GeoAlignmentStore* geoAlignStore) :
43  SolidStateDetectorElementBase(id,design,geophysvol,commonItems,geoAlignStore),
44  m_siDesign(design)
45  {
47  }
48 
49  // Destructor:
51 
52  bool
54  {
55  if (const auto *const pIdHelper= getIdHelper();isPixel() and isBarrel() and
56  pIdHelper->helper() == AtlasDetectorID::HelperType::Pixel) {
57  const PixelID* p_pixelId = static_cast<const PixelID*>(pIdHelper);
58  return (0==p_pixelId->layer_disk(m_id));
59  } else {
60  return false;
61  }
62  }
63 
64  bool
66  {
67  if (const auto *const pIdHelper= getIdHelper(); isPixel() and isBarrel()
68  and pIdHelper->helper() == AtlasDetectorID::HelperType::Pixel) {
69  const PixelID* p_pixelId = static_cast<const PixelID*>(pIdHelper);
70  return ( 0==p_pixelId->layer_disk(m_id));
71  } else {
72  return false;
73  }
74  }
75 
76  bool
78  {
79  if (const auto *const pIdHelper = getIdHelper(); isPixel() and isBarrel() and
80  pIdHelper->helper() == AtlasDetectorID::HelperType::Pixel) {
81  const PixelID* p_pixelId = static_cast<const PixelID*>(pIdHelper);
82  return ( 1==p_pixelId->layer_disk(m_id));
83  } else {
84  return false;
85  }
86  }
87 
90  {
91  Identifier id; // Will be initialized in an invalid state.
92 
93  // If something fails it returns the id in an invalid state.
94 
95  if (cellId.isValid()) {
96  const auto *const pAtlasHelper = getIdHelper();
97  if (isPixel()) {
98  if (pAtlasHelper->helper() == AtlasDetectorID::HelperType::Pixel) {
99  const PixelID* pixelIdHelper = static_cast<const PixelID*>(pAtlasHelper);
100  id = pixelIdHelper->pixel_id(m_id, cellId.phiIndex(), cellId.etaIndex());
101  }
102  } else if (isSCT()) {
103 
104  if (pAtlasHelper->helper() == AtlasDetectorID::HelperType::SCT) {
105  const SCT_ID* sctIdHelper = static_cast<const SCT_ID*>(pAtlasHelper);
106  id = sctIdHelper->strip_id(m_id, cellId.strip());
107  }
108  } else if (isPLR()) {
109  if (pAtlasHelper->helper() == AtlasDetectorID::HelperType::PLR) {
110  const PLR_ID* plrIdHelper = static_cast<const PLR_ID*>(pAtlasHelper);
111  id = plrIdHelper->pixel_id(m_id, cellId.phiIndex(), cellId.etaIndex());
112  }
113  }
114  }
115 
116  return id;
117  }
118 
119  SiCellId
121  {
122  SiCellId cellId; // Initialized in invalid state.
123 
124  // If something fails it returns the cellId in an invalid state.
125 
126  if (identifier.is_valid()) {
127  const auto *const pAtlasHelper = getIdHelper();
128  if (isPixel() and pAtlasHelper->helper() == AtlasDetectorID::HelperType::Pixel) {
129  const auto *const pixelIdHelper = static_cast<const PixelID*>(pAtlasHelper);
130  cellId = SiCellId(pixelIdHelper->phi_index(identifier), pixelIdHelper->eta_index(identifier));
131  } else if (isSCT() and pAtlasHelper->helper() == AtlasDetectorID::HelperType::SCT) {
132  const SCT_ID* sctIdHelper = static_cast<const SCT_ID*>(pAtlasHelper);
133  //This adds some extra code for supporting rows,
134  //but this method is only used in validation-type code
135  //So should not add an overhead in normal running
136  //(although we perhaps still try to avoid this...)
137  int strip = sctIdHelper->strip(identifier);
138  int row = sctIdHelper->row(identifier);
139  if(row>0){
140  const auto &sctDesign = *static_cast<const SiDetectorDesign *>(m_siDesign);
141  int strip1D = sctDesign.strip1Dim(strip, row);
142  cellId = SiCellId(strip1D);
143  }else {
144  cellId = SiCellId(strip);
145  }
146 
147  } else if (isPLR() and pAtlasHelper->helper() == AtlasDetectorID::HelperType::PLR) {
148  const PLR_ID* plrIdHelper = static_cast<const PLR_ID*>(pAtlasHelper);
149  cellId = SiCellId(plrIdHelper->phi_index(identifier), plrIdHelper->eta_index(identifier));
150  }
151  }
152 
153  return cellId;
154  }
155 
156  const std::vector<const Trk::Surface*>&
158  {
159  if (!m_surfaces.isValid()) {
160  std::vector<const Trk::Surface*> s;
161  s.push_back(&surface());
162  if (otherSide()) {
163  s.push_back(&(otherSide()->surface()));
164  }
165  m_surfaces.set (std::move (s));
166  }
167 
168  // return the surfaces
169  return *m_surfaces.ptr();
170  }
171 
172  const Amg::Transform3D&
174  {
175  return (isModuleFrame()) ? transform() : m_otherSide->transform();
176  }
177 
180  {
182  }
183 
184  // Take a transform in the local reconstruction and return it in the module frame
185  // For a given transform l in frame A. The equivalent transform in frame B is
186  // B.inverse() * A * l * A.inverse() * B
187  // Here A is the local to global transform of the element and B is the local to global
188  // transform of the module.
189  // If we are already in the module frame then there is nothing to do, we just return the
190  // transform that is input. Otherwise we use the above formula.
193  {
194  if (isModuleFrame()) {
195  return localTransform;
196  } else {
197  return m_otherSide->transform().inverse() * transform() * localTransform * transform().inverse() * m_otherSide->transform();
198  }
199  }
200 
203  {
204  if (isModuleFrame()) {
205  return {}; // Identity
206  } else {
207  return m_otherSide->transform().inverse() * transform();
208  }
209  }
210 
211  bool
213  {
214  // The module frame is the axial side.
215  // NB isStereo returns false for the pixel and so
216  // isModuleFrame is always true for the pixel.
217 
218  return !isStereo();
219  }
220 
221  // compute sin(tilt angle) at center:
222  double
224  {
225  // Tilt is defined as the angle between a refVector and the sensor normal.
226  // In barrel refVector = unit vector radial.
227  // in endcap it is assumed there is no tilt.
228  // sinTilt = (refVector cross normal) . z
229 
230  // tilt angle is not defined for the endcap
231  if (isEndcap()) return 0.;
232 
233  // Angle between normal and radial vector.
234  // HepGeom::Vector3D<double> refVector(m_center.x(), m_center.y(), 0);
235  // return (refVector.cross(m_normal)).z()/refVector.mag();
236  // or the equivalent
237  const Amg::Vector3D& normal = this->normal();
238  const Amg::Vector3D& center = this->center();
239  return (center.x() * normal.y() - center.y() * normal.x()) / center.perp();
240  }
241 
242  double
244  {
245  // tilt angle is not defined for the endcap
246  if (isEndcap()) return 0.;
247 
248  Amg::Vector3D point = globalPosition(localPos);
249  return sinTilt(point);
250  }
251 
252  double
254  {
255  // It is assumed that the global position is already in the plane of the element.
256 
257  // tilt angle is not defined for the endcap
258  if (isEndcap()) return 0.;
259 
260  // Angle between normal and radial vector.
261  //HepGeom::Vector3D<double> refVector(globalPos.x(), globalPos.y(), 0);
262  //return (refVector.cross(m_normal)).z()/refVector.mag();
263  // or the equivalent
264  const Amg::Vector3D& normal = this->normal();
265  return (globalPos.x() * normal.y() - globalPos.y() * normal.x()) / globalPos.perp();
266  }
267 
268  double
270  {
271  return sinStereoImpl();
272  }
273 
274  double
276  {
277  Amg::Vector3D point=globalPosition(localPos);
278  return sinStereoImpl(point);
279  }
280 
281  double
283  {
284  return sinStereoImpl(globalPos);
285  }
286 
287  double
289  {
290  return static_cast<const SiDetectorDesign *>(m_design)->sinStripAngleReco(localPos[0], localPos[1]);
291  }
292 
293  double
295  {
296  return sinStereoLocal(localPosition(globalPos));
297  }
298 
299  bool
301  {
302  if (!m_isStereo.isValid()) {
304  }
305 
306  return *m_isStereo.ptr();
307  }
308 
310  {
311  // Calculate rz = r (barrel) or z (endcap)
312  // Use center of sensor ((0,0,0) in local coordinates) for determining this.
313  // HepGeom::Point3D<double> globalCenter = globalPosition(HepGeom::Point3D<double>(0,0,0));
314  if (isBarrel()) {
315  return center().perp(); // r
316  } else {
317  return center().z(); // z
318  }
319  }
320 
321 
322  bool
323  SiDetectorElement::nearBondGap(const Amg::Vector2D& localPosition, double etaTol) const
324  {
325  //again, can we avoid casting here?
326  return static_cast<const SiDetectorDesign *>(m_siDesign)->nearBondGap(localPosition, etaTol);
327  }
328 
329  bool
330  SiDetectorElement::nearBondGap(const Amg::Vector3D& globalPosition, double etaTol) const
331  {
332  return static_cast<const SiDetectorDesign *>(m_siDesign)->nearBondGap(localPosition(globalPosition), etaTol);
333  }
334 
335 
336 
337  // Special method for SCT to retrieve the two ends of a "strip"
338  std::pair<Amg::Vector3D,Amg::Vector3D>
340  {
341  //again with the casting...
342  const std::pair<Amg::Vector2D,Amg::Vector2D> localEnds=
343  static_cast<const SiDetectorDesign *>(m_siDesign)->endsOfStrip(position);
344  return std::pair<Amg::Vector3D,Amg::Vector3D >(globalPosition(localEnds.first),
345  globalPosition(localEnds.second));
346  }
347 
348  void
350  {
351  if (!m_id.is_valid()) throw std::runtime_error("SiDetectorElement: Invalid identifier");
352 
353  // Set booleans for wether we are pixel/sct barrel/endcap
356  // we use is_lumi here instead of is_plr because is_plr is currently only setup
357  // for ExpandedIdentifiers and not Identifiers, which is what is needed here.
359  if (!m_isPixel && !m_isSCT && !m_isPLR) {
360  ATH_MSG_WARNING("Element id is not for pixel, SCT, or PLR");
361  }
362 
363  // Set m_idHash. Also set m_isBarrel.
365  const PixelID* pixelId = static_cast<const PixelID*>(getIdHelper());
366  if (pixelId) {
367  m_isBarrel = pixelId->is_barrel(m_id);
368  m_idHash = pixelId->wafer_hash(m_id);
369 
370  if (pixelId->is_dbm(m_id)) {
371  m_isBarrel = false;
372  m_isDBM = true;
373  }
374  }
375  } else if (isSCT() and getIdHelper()->helper() == AtlasDetectorID::HelperType::SCT) {
376  const SCT_ID* sctId = static_cast<const SCT_ID*>(getIdHelper());
377  if (sctId) {
378  m_isBarrel = sctId->is_barrel(m_id);
379  m_idHash = sctId->wafer_hash(m_id);
380  }
381  } else if (isPLR() and getIdHelper()->helper() == AtlasDetectorID::HelperType::PLR) {
382  const PLR_ID* plrId = static_cast<const PLR_ID*>(getIdHelper());
383  if (plrId) {
384  m_isBarrel = plrId->is_barrel(m_id);
385  m_idHash = plrId->wafer_hash(m_id);
386  }
387  }
388 
389  if (!m_idHash.is_valid()) throw std::runtime_error("SiDetectorElement: Unable to set IdentifierHash");
390 
391  // Set surface
392  m_surface = std::make_unique<Trk::PlaneSurface>(*this);
393 
394  }
395 
396  // update cache
397  // This is supposed to be called inside a block like
398  //
399  // if (!m_cache.isValid()) updateCache();
400  //
401  void
403  {
404 
405 
407 
408  //Similar to 21.9, but ... Do we actually need this? If not, we could just rely on the base-class implementation?
409  if (isBarrel() && !m_axisDir.ptr()->m_barrelLike) {
410  ATH_MSG_WARNING("Element has endcap like orientation with barrel identifier.");
411  } else if (!isBarrel() && m_axisDir.ptr()->m_barrelLike && (m_siDesign->type())!=InDetDD::PixelInclined && (m_siDesign->type())!=InDetDD::PLR) {
412  ATH_MSG_WARNING("Element has barrel like orientation with endcap identifier.");
413  }
414  }
415 
416  bool
418  {
420  double sinStereoThis = std::abs(sinStereoImpl()); // Call the private impl method
421  double sinStereoOther = std::abs(m_otherSide->sinStereo());
422  if (std::abs(sinStereoThis - sinStereoOther) < 1e-5) {
423  // If they happen to be equal then set side0 as axial and side1 as stereo.
424  const SCT_ID* sctId = static_cast<const SCT_ID*>(getIdHelper());
425  if (sctId) {
426  int side = sctId->side(m_id);
427  return (side == 1);
428  }
429  } else {
430  // set the stereo side as the one with largest absolute sinStereo.
431  return (sinStereoThis > sinStereoOther);
432  }
433  }
434 
435  return false;
436  }
437 
438  double
440  {
441  // Stereo is the angle between a refVector and a vector along the strip/pixel in eta direction.
442  // I'm not sure how the sign should be defined. I've defined it here
443  // with rotation sense respect to normal,
444  // where normal is away from IP in barrel and in -ve z direction in endcap
445 
446  // In Barrel refVector = unit vector along z axis,
447  // in endcap refVector = unit vector radial.
448  //
449  // sinStereo = (refVector cross stripAxis) . normal
450  // = (refVector cross etaAxis) . normal
451  // = refVector . (etaAxis cross normal)
452  // = refVector . phiAxis
453  //
454  // in Barrel we use
455  // sinStereo = refVector . phiAxis
456  // = phiAxis.z()
457  //
458  // in endcap we use
459  // sinStereo = (refVector cross etaAxis) . normal
460  // = -(center cross etaAxis) . zAxis
461  // = (etaAxis cross center). z()
462 
463  //Since these are barrel, endcap, sensor-type, specific, might be better for these to be calculated in the design()
464  //However, not clear how one could do that for the annulus calculation which uses global frame
465  double sinStereo = 0.;
466  auto designShape = m_siDesign->shape();
467  if (isBarrel()) {
468  sinStereo = this->phiAxis().z();
469  } else { // endcap
470  if (designShape == InDetDD::Annulus) { //built-in Stereo angle for Annulus shape sensor
471  Amg::Vector3D sensorCenter = m_siDesign->sensorCenter();
472  //Below retrieved method will return -sin(m_Stereo), thus sinStereolocal = sin(m_Stereo)
473  double sinStereoReco = - (m_siDesign->sinStripAngleReco(sensorCenter[1], sensorCenter[0]));
474  double cosStereoReco = sqrt(1-sinStereoReco*sinStereoReco);
475  double radialShift = sensorCenter[0];
476  //The focus of all strips in the local reco frame
477  Amg::Vector2D localfocus(-radialShift*sinStereoReco, radialShift - radialShift*cosStereoReco);
478  //The focus of all strips in the global frame
479  Amg::Vector3D globalfocus(globalPosition(localfocus));
480  //The direction of x-axis of the Strip frame in the global frame
481  const Amg::Vector3D& center = this->center();
482  Amg::Vector3D globalSFxAxis =(center - globalfocus)/radialShift;
483  //Stereo angle is the angle between global radial direction and the x-axis of the Strip frame in the global frame
484  sinStereo = (center.y() * globalSFxAxis.x() - center.x() * globalSFxAxis.y()) / center.perp();
485  }
486  // else if (designShape == InDetDD::PolarAnnulus) {} // Polar specialisation in future
487  else { // barrel
488  const Amg::Vector3D& etaAxis = this->etaAxis();
489  const Amg::Vector3D& center = this->center();
490  sinStereo = (center.y() * etaAxis.x() - center.x() * etaAxis.y()) / center.perp();
491  }
492  }
493  return sinStereo;
494  }
495 
496  double
498  {
499  //
500  // sinStereo = (refVector cross stripAxis) . normal
501  //
502  double sinStereo = 0.;
503  if (isBarrel()) {
504  if (m_siDesign->shape() != InDetDD::Trapezoid) {
505  sinStereo = this->phiAxis().z();
506  } else { // trapezoid
507  assert (minWidth() != maxWidth());
508  double radius = width() * length() / (maxWidth() - minWidth());
509  const Amg::Vector3D& etaAxis = this->etaAxis();
510  const Amg::Vector3D& center = this->center();
511  const Amg::Vector3D& normal = this->normal();
512  Amg::Vector3D stripAxis = radius * etaAxis + globalPos - center;
513  sinStereo = (stripAxis.x() * normal.y() - stripAxis.y() * normal.x()) / stripAxis.mag();
514  }
515  } else { // endcap
516  if (m_siDesign->shape() != InDetDD::Trapezoid) {
517  const Amg::Vector3D& etaAxis = this->etaAxis();
518  sinStereo = (globalPos.y() * etaAxis.x() - globalPos.x() * etaAxis.y()) / globalPos.perp();
519  } else { // trapezoid
520  assert (minWidth() != maxWidth());
521  const Amg::Vector3D& etaAxis = this->etaAxis();
522  const Amg::Vector3D& center = this->center();
523  double radius = width() * length() / (maxWidth() - minWidth());
524  // Only need projection in xy plane.
525  double stripAxisX = globalPos.x() - center.x() + etaAxis.x()*radius;
526  double stripAxisY = globalPos.y() - center.y() + etaAxis.y()*radius;
527  double norm = 1./(radius*sqrt(stripAxisX*stripAxisX + stripAxisY*stripAxisY));
528  sinStereo = norm * (stripAxisX * globalPos.y() - stripAxisY * globalPos.x());
529  }
530  }
531  return sinStereo;
532  }
533 
534 
535 
536 } // namespace InDetDD
PixelID.h
This is an Identifier helper class for the Pixel subdetector. This class is a factory for creating co...
AtlasDetectorID::is_pixel
bool is_pixel(Identifier id) const
Definition: AtlasDetectorID.h:760
query_example.row
row
Definition: query_example.py:24
GeoAlignmentStore
Ensure that the extensions for the Vector3D are properly loaded.
Definition: GeoAlignmentStore.h:24
InDetDD::SiDetectorElement::isEndcap
bool isEndcap() const
PlotCalibFromCool.norm
norm
Definition: PlotCalibFromCool.py:100
SCT_ID.h
This is an Identifier helper class for the SCT subdetector. This class is a factory for creating comp...
PixelID::phi_index
int phi_index(const Identifier &id) const
Definition: PixelID.h:658
InDetDD::SiDetectorElement::localToModuleTransform
Amg::Transform3D localToModuleTransform() const
Transformation from local element to module frame.
Definition: SiDetectorElement.cxx:202
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
CxxUtils::CachedValue::ptr
const T * ptr() const
Return a pointer to the cached value.
InDetDD::PLR
@ PLR
Definition: DetectorDesign.h:46
AthMsgStreamMacros.h
AtlasDetectorID::HelperType::Pixel
@ Pixel
InDetDD::SolidStateDetectorElementBase
Definition: SolidStateDetectorElementBase.h:132
InDetDD::DetectorDesign::sensorCenter
virtual Amg::Vector3D sensorCenter() const
Return the centre of a sensor in the local reference frame.
Definition: DetectorDesign.cxx:60
InDetDD::SolidStateDetectorElementBase::m_idHash
IdentifierHash m_idHash
hash id of this detector element
Definition: SolidStateDetectorElementBase.h:649
AtlasDetectorID::is_sct
bool is_sct(Identifier id) const
Definition: AtlasDetectorID.h:770
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
Trk::distDepth
@ distDepth
Definition: SiLocalPosition.h:19
CxxUtils::CachedValue::isValid
bool isValid() const
Test to see if the value is valid.
InDetDD::DetectorDesign::shape
virtual DetectorShape shape() const
Shape of element.
Definition: DetectorDesign.cxx:96
InDetDD::SiDetectorElement::surfaces
const std::vector< const Trk::Surface * > & surfaces() const
Returns the full list of surfaces associated to this detector element.
Definition: SiDetectorElement.cxx:157
InDetDD::SolidStateDetectorElementBase::center
virtual const Amg::Vector3D & center() const override final
Center in global coordinates.
InDetDD::SolidStateDetectorElementBase::etaAxis
const Amg::Vector3D & etaAxis() const
Definition: SolidStateDetectorElementBase.cxx:88
InDetDD::SiDetectorElement::localToModuleFrame
Amg::Transform3D localToModuleFrame(const Amg::Transform3D &localTransform) const
Take a transform of the local element frame and return its equivalent in the module frame.
Definition: SiDetectorElement.cxx:192
PLR_ID.h
This is an Identifier helper class for the PLR subdetector. This class inherits from PicelID.
InDetDD::SiCellId::isValid
bool isValid() const
Test if its in a valid state.
Definition: SiCellId.h:136
AtlasDetectorID::HelperType::SCT
@ SCT
InDetDD::SolidStateDetectorElementBase::surface
Trk::Surface & surface()
Element Surface.
PLR_ID
This is an Identifier helper class for the PLR subdetector. This class inherits from PixelID.
Definition: PLR_ID.h:24
InDetDD::SiCellId::phiIndex
int phiIndex() const
Get phi index. Equivalent to strip().
Definition: SiCellId.h:122
InDetDD::SiDetectorElement::m_isDBM
bool m_isDBM
Definition: SiDetectorElement.h:473
xAOD::identifier
identifier
Definition: UncalibratedMeasurement_v1.cxx:15
InDetDD::SiCellId::strip
int strip() const
Get strip number. Equivalent to phiIndex().
Definition: SiCellId.h:131
InDetDD::SiDetectorElement::m_surfaces
CxxUtils::CachedValue< std::vector< const Trk::Surface * > > m_surfaces
Definition: SiDetectorElement.h:456
InDetDD::SiDetectorElement::SiDetectorElement
SiDetectorElement()=delete
Don't allow no-argument constructor.
Identifier::is_valid
bool is_valid() const
Check if id is in a valid state.
InDetDD::SiDetectorElement::m_isStereo
CxxUtils::CachedValue< bool > m_isStereo
Definition: SiDetectorElement.h:492
InDetDD::SolidStateDetectorElementBase::getIdHelper
const AtlasDetectorID * getIdHelper() const
Returns the id helper (inline)
InDetDD::PixelInclined
@ PixelInclined
Definition: DetectorDesign.h:46
InDetDD::SiDetectorDesign::sinStripAngleReco
virtual double sinStripAngleReco(double phiCoord, double etaCoord) const
Give strip angle in the reco frame.
Definition: SiDetectorDesign.h:132
InDetDD::SolidStateDetectorElementBase::m_surface
std::unique_ptr< Trk::Surface > m_surface
Definition: SolidStateDetectorElementBase.h:631
AtlasDetectorID::HelperType::PLR
@ PLR
TRT::Hit::side
@ side
Definition: HitInfo.h:83
runBeamSpotCalibration.helper
helper
Definition: runBeamSpotCalibration.py:112
InDetDD::SiDetectorElement::commonConstructor
void commonConstructor()
Common code for constructors.
Definition: SiDetectorElement.cxx:349
InDetDD::SiDetectorElement::sinTilt
double sinTilt() const
Compute sin(tilt angle) at a given position: at center.
Definition: SiDetectorElement.cxx:223
InDetDD::SiDetectorElement::m_siDesign
const SiDetectorDesign * m_siDesign
Definition: SiDetectorElement.h:463
SurfaceBounds.h
AtlasDetectorID.h
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
InDetDD::SolidStateDetectorElementBase::m_design
const DetectorDesign * m_design
local description of this detector element
Definition: SolidStateDetectorElementBase.h:628
InDetDD::SolidStateDetectorElementBase::defTransform
const Amg::Transform3D defTransform() const
Definition: SolidStateDetectorElementBase.cxx:60
PixelID::is_barrel
bool is_barrel(const Identifier &id) const
Test for barrel - WARNING: id MUST be pixel id, otherwise answer is not accurate. Use SiliconID for g...
Definition: PixelID.h:605
InDetDD::SiDetectorElement::cellIdFromIdentifier
virtual SiCellId cellIdFromIdentifier(const Identifier &identifier) const override final
SiCellId from Identifier.
Definition: SiDetectorElement.cxx:120
SiReadoutCellId.h
InDetDD::SiCellId::etaIndex
int etaIndex() const
Get eta index.
Definition: SiCellId.h:114
PixelID::wafer_hash
IdentifierHash wafer_hash(Identifier wafer_id) const
wafer hash from id
Definition: PixelID.h:387
InDetDD::SiDetectorElement::~SiDetectorElement
virtual ~SiDetectorElement()
Destructor.
InDetDD::SiDetectorElement::moduleTransform
const Amg::Transform3D & moduleTransform() const
Module to global frame transform.
Definition: SiDetectorElement.cxx:173
Trk::distEta
@ distEta
readout for silicon
Definition: ParamDefs.h:57
InDetDD::SiDetectorElement::isModuleFrame
bool isModuleFrame() const
Check if the element and module frame are the same.
Definition: SiDetectorElement.cxx:212
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
InDetDD::SiDetectorElement::updateCache
virtual void updateCache() const override final
Recalculate cached values.
Definition: SiDetectorElement.cxx:402
InDetDD::Annulus
@ Annulus
Definition: DetectorDesign.h:42
SCT_ID::row
int row(const Identifier &id) const
Definition: SCT_ID.h:758
InDetDD::SolidStateDetectorElementBase::updateCache
virtual void updateCache() const
Recalculate cached values.
Definition: SolidStateDetectorElementBase.cxx:272
InDetDD::SiDetectorElement::identifierFromCellId
virtual Identifier identifierFromCellId(const SiCellId &cellId) const override final
Identifier <-> SiCellId (ie strip number or pixel eta_index,phi_index) Identifier from SiCellId (ie s...
Definition: SiDetectorElement.cxx:89
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
InDetDD::SolidStateDetectorElementBase::width
double width() const
Methods from design (inline)
PixelID::eta_index
int eta_index(const Identifier &id) const
Definition: PixelID.h:664
InDetDD::DetectorDesign::type
virtual DetectorType type() const
Type of element.
Definition: DetectorDesign.cxx:101
SCT_ID::wafer_hash
IdentifierHash wafer_hash(const Identifier &wafer_id) const
wafer hash from id - optimized
Definition: SCT_ID.h:492
InDetDD::SiDetectorElement::isBlayer
bool isBlayer() const
Definition: SiDetectorElement.cxx:53
InDetDD::SiDetectorElement::m_isSCT
bool m_isSCT
Definition: SiDetectorElement.h:471
InDetDD::SiDetectorElement::isInnermostPixelLayer
bool isInnermostPixelLayer() const
Definition: SiDetectorElement.cxx:65
InDetDD::SolidStateDetectorElementBase::normal
virtual const Amg::Vector3D & normal() const override final
Get reconstruction local normal axes in global frame.
Trk::distPhi
@ distPhi
Definition: ParamDefs.h:56
IdentifierHash::is_valid
bool is_valid() const
Check if id is in a valid state.
InDetDD::SiDetectorElement::isPixel
bool isPixel() const
InDetDD::SiDetectorElement::sinStereo
double sinStereo() const
Compute sin(stereo angle) at a given position: at center.
Definition: SiDetectorElement.cxx:269
PixelID::layer_disk
int layer_disk(const Identifier &id) const
Definition: PixelID.h:626
AtlasDetectorID::helper
virtual HelperType helper() const
Type of helper, defaulted to 'Unimplemented'.
Definition: AtlasDetectorID.h:95
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
GeoAlignmentStore.h
InDetDD::SiDetectorElement::otherSide
const SiDetectorElement * otherSide() const
Useful for SCT only.
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:191
InDetDD::SiCommonItems
Definition: SiCommonItems.h:45
InDetDD::SiDetectorElement::m_isPixel
bool m_isPixel
Definition: SiDetectorElement.h:470
InDetDD::SiDetectorElement::isBarrel
bool isBarrel() const
CxxUtils::CachedValue::set
void set(const T &val) const
Set the value, assuming it is currently invalid.
InDetDD::SiDetectorElement::defModuleTransform
Amg::Transform3D defModuleTransform() const
Default module to global frame transform, ie with no misalignment.
Definition: SiDetectorElement.cxx:179
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
ParticleGun_SamplingFraction.radius
radius
Definition: ParticleGun_SamplingFraction.py:96
SiDetectorElement.h
InDetDD::SiDetectorDesign::strip1Dim
virtual int strip1Dim(int strip, int row) const
only relevant for SCT.
Definition: SiDetectorDesign.h:136
InDetDD::SiCellId
Definition: SiCellId.h:29
InDetDD::SiDetectorElement::m_otherSide
const SiDetectorElement * m_otherSide
Definition: SiDetectorElement.h:485
PixelID::is_dbm
bool is_dbm(const Identifier &id) const
Test for dbm - WARNING: id MUST be pixel id, otherwise answer is not accurate. Use SiliconID for gene...
Definition: PixelID.h:612
InDetDD::SolidStateDetectorElementBase::m_id
Identifier m_id
identifier of this detector element
Definition: SolidStateDetectorElementBase.h:623
AtlasDetectorID::is_lumi
bool is_lumi(Identifier id) const
Definition: AtlasDetectorID.h:806
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
InDetDD::SolidStateDetectorElementBase::minWidth
double minWidth() const
Min width.
SCT_ID
Definition: SCT_ID.h:68
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
SCT_ID::strip
int strip(const Identifier &id) const
Definition: SCT_ID.h:764
InDetDD
Message Stream Member.
Definition: FakeTrackBuilder.h:8
InDetDD::SolidStateDetectorElementBase::globalPosition
HepGeom::Point3D< double > globalPosition(const HepGeom::Point3D< double > &localPos) const
transform a reconstruction local position into a global position (inline):
PlaneSurface.h
InDetDD::SolidStateDetectorElementBase::phiAxis
const Amg::Vector3D & phiAxis() const
Definition: SolidStateDetectorElementBase.cxx:74
PixelID::pixel_id
Identifier pixel_id(int barrel_ec, int layer_disk, int phi_module, int eta_module, int phi_index, int eta_index) const
For an individual pixel.
Definition: PixelID.h:432
InDetDD::SiDetectorElement::sinStereoLocal
double sinStereoLocal(const Amg::Vector2D &localPos) const
Angle of strip in local frame with respect to the etaAxis.
Definition: SiDetectorElement.cxx:288
InDetDD::SiDetectorElement::get_rz
virtual double get_rz() const override final
Definition: SiDetectorElement.cxx:309
SCT_ID::side
int side(const Identifier &id) const
Definition: SCT_ID.h:752
InDetDD::SiDetectorElement::isSCT
bool isSCT() const
InDetDD::SiDetectorElement::sinStereoImpl
double sinStereoImpl() const
Private implementation method with no lock at center.
Definition: SiDetectorElement.cxx:439
InDetDD::SiDetectorElement::nearBondGap
bool nearBondGap(const Amg::Vector2D &localPosition, double etaTol) const
Test if near bond gap within tolerances.
Definition: SiDetectorElement.cxx:323
InDetDD::SolidStateDetectorElementBase::localPosition
Amg::Vector2D localPosition(const HepGeom::Point3D< double > &globalPosition) const
transform a global position into a 2D local position (reconstruction frame) (inline)
InDetDD::SolidStateDetectorElementBase::length
double length() const
Length in eta direction (z - barrel, r - endcap)
InDetDD::SiDetectorDesign
Definition: SiDetectorDesign.h:50
InDetDD::SiDetectorElement::determineStereo
bool determineStereo() const
Find isStereo.
Definition: SiDetectorElement.cxx:417
InDetDD::SiDetectorElement::isStereo
bool isStereo() const
Check if it is the stereo side (useful for SCT)
Definition: SiDetectorElement.cxx:300
PixelID
Definition: PixelID.h:67
InDetDD::SiDetectorElement::m_isBarrel
bool m_isBarrel
Definition: SiDetectorElement.h:474
InDetDD::SiDetectorElement::isPLR
bool isPLR() const
InDetDD::SiDetectorElement::isNextToInnermostPixelLayer
bool isNextToInnermostPixelLayer() const
Definition: SiDetectorElement.cxx:77
InDetDD::SolidStateDetectorElementBase::transform
virtual const Amg::Transform3D & transform() const override final
Return local to global transform.
InDetDD::Trapezoid
@ Trapezoid
Definition: DetectorDesign.h:42
InDetDD::SiDetectorElement::m_isPLR
bool m_isPLR
Definition: SiDetectorElement.h:472
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
InDetDD::SolidStateDetectorElementBase::m_axisDir
CxxUtils::CachedValue< AxisDir > m_axisDir
Definition: SolidStateDetectorElementBase.h:681
SCT_ID::strip_id
Identifier strip_id(int barrel_ec, int layer_disk, int phi_module, int eta_module, int side, int strip) const
For an individual strip.
Definition: SCT_ID.h:535
InDetDD::SolidStateDetectorElementBase::maxWidth
double maxWidth() const
Max width.