ATLAS Offline Software
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
InDetDD::DetectorDesign Class Referenceabstract

#include <DetectorDesign.h>

Inheritance diagram for InDetDD::DetectorDesign:
Collaboration diagram for InDetDD::DetectorDesign:

Public Types

enum  Axis { xAxis =0, yAxis, zAxis }
 

Public Member Functions

 DetectorDesign (double thickness, bool phiSymmetric, bool etaSymmetric, bool depthSymmetric, InDetDD::CarrierType carrierType, int readoutSide)
 Constructor. More...
 
 DetectorDesign (double thickness, bool phiSymmetric, bool etaSymmetric, bool depthSymmetric, InDetDD::CarrierType carrierType, int readoutSide, Axis stripDirection, Axis depthDirection)
 
 ~DetectorDesign ()
 
virtual Amg::Vector3D sensorCenter () const
 Return the centre of a sensor in the local reference frame. More...
 
virtual SiIntersect inDetector (const SiLocalPosition &localPosition, double phiTol, double etaTol) const
 Test if point is in the active part of the detector with specified tolerances. More...
 
void setSymmetry (bool phiSymmetric, bool etaSymmetric, bool depthSymmetric)
 Override default symmetries to prevent swapping of axes. More...
 
Axis etaAxis () const
 local axis corresponding to eta direction: More...
 
Axis phiAxis () const
 local axis corresponding to phi direction: More...
 
Axis depthAxis () const
 local axis corresponding to depth direction: More...
 
double thickness () const
 Method which returns thickness of the silicon wafer. More...
 
InDetDD::CarrierType carrierType () const
 Return carrier type (ie electrons or holes) More...
 
bool phiSymmetric () const
 
bool etaSymmetric () const
 
bool depthSymmetric () const
 
int readoutSide () const
 ReadoutSide. More...
 
virtual void distanceToDetectorEdge (const SiLocalPosition &localPosition, double &etaDist, double &phiDist) const =0
 Returns distance to nearest detector active edge +ve = inside -ve = outside. More...
 
virtual DetectorShape shape () const
 Shape of element. More...
 
virtual DetectorType type () const
 Type of element. More...
 
virtual double length () const =0
 Method to calculate length of a module. More...
 
virtual double width () const =0
 Method to calculate average width of a module. More...
 
virtual double minWidth () const =0
 Method to calculate minimum width of a module. More...
 
virtual double maxWidth () const =0
 Method to calculate maximum width of a module. More...
 
virtual double phiPitch () const =0
 Pitch in phi direction. More...
 
virtual double phiPitch (const SiLocalPosition &localPosition) const =0
 Pitch in phi direction. More...
 
virtual double etaPitch () const =0
 
virtual bool swapHitPhiReadoutDirection () const =0
 Return true if hit local direction is the same as readout direction. More...
 
virtual bool swapHitEtaReadoutDirection () const =0
 
virtual const Trk::SurfaceBoundsbounds () const =0
 Element boundary. More...
 
virtual const Amg::Transform3D moduleShift () const
 
virtual SiDiodesParameters parameters (const SiCellId &cellId) const =0
 readout or diode id -> position, size More...
 
virtual SiLocalPosition localPositionOfCell (const SiCellId &cellId) const =0
 readout or diode id -> position. More...
 
virtual int numberOfConnectedCells (const SiReadoutCellId &readoutId) const =0
 number of connected cells. More...
 
virtual SiCellId connectedCell (const SiReadoutCellId &readoutId, int number) const =0
 readout id -> id of connected diodes. More...
 
virtual SiReadoutCellId readoutIdOfCell (const SiCellId &cellId) const =0
 diode id -> readout id NB assignment of a SiReadoutCellId to a SiCellId is allowed so you are can pass SiReadoutCellId variables to functions expecting a SiCellId. More...
 
virtual SiReadoutCellId readoutIdOfPosition (const SiLocalPosition &localPos) const =0
 position -> id More...
 
virtual SiCellId cellIdOfPosition (const SiLocalPosition &localPos) const =0
 position -> id More...
 
virtual void neighboursOfCell (const SiCellId &cellId, std::vector< SiCellId > &neighbours) const =0
 Get the neighbouring diodes of a given diode: Cell for which the neighbours must be found List of cells which are neighbours of the given one. More...
 
virtual SiCellId cellIdInRange (const SiCellId &cellId) const =0
 Check if cell is in range. More...
 

Private Member Functions

 DetectorDesign ()
 
 DetectorDesign (const DetectorDesign &design)
 
DetectorDesignoperator= (const DetectorDesign &design)
 

Private Attributes

Axis m_etaAxis
 
Axis m_phiAxis
 
Axis m_depthAxis
 
double m_thickness
 
InDetDD::CarrierType m_carrierType
 
bool m_phiSymmetric
 
bool m_etaSymmetric
 
bool m_depthSymmetric
 
bool m_readoutSidePosDepth
 

Detailed Description

Base class for the detector design classes for ITk and HGTD. These hold the local description of the detector elements which are shared by a number of detector elements.

Definition at line 57 of file DetectorDesign.h.

Member Enumeration Documentation

◆ Axis

Enumerator
xAxis 
yAxis 
zAxis 

Definition at line 59 of file DetectorDesign.h.

59  {
60  xAxis=0, yAxis, zAxis
61  };

Constructor & Destructor Documentation

◆ DetectorDesign() [1/4]

InDetDD::DetectorDesign::DetectorDesign ( double  thickness,
bool  phiSymmetric,
bool  etaSymmetric,
bool  depthSymmetric,
InDetDD::CarrierType  carrierType,
int  readoutSide 
)

Constructor.

Parameters
thicknessThickness of sensor
phiSymmetric,etaSymmetric,depthSymmetricFlag to indicate if element is symmetric about these axes. ie for rectangular sensor they are all true, for trapezoidal sensor etaSymmetric is false. They can also be used to force element not to swap directions.
carrierTypeCarrier type that drifts to readout (ie electrons for pixels and holes for SCT)
readoutSideReadout side, +ve = positive Depth Side, -ve = negative Depth Side

Definition at line 11 of file DetectorDesign.cxx.

◆ DetectorDesign() [2/4]

InDetDD::DetectorDesign::DetectorDesign ( double  thickness,
bool  phiSymmetric,
bool  etaSymmetric,
bool  depthSymmetric,
InDetDD::CarrierType  carrierType,
int  readoutSide,
Axis  stripDirection,
Axis  depthDirection 
)

Definition at line 29 of file DetectorDesign.cxx.

36  :
37  m_etaAxis(stripDirection),
38  m_depthAxis(thicknessDirection),
45  if (stripDirection == thicknessDirection) {
46  throw std::runtime_error(
47  "ERROR: DetectorDesign called with phi and thickness directions equal");
48  }
49  // phiAxis is "the other one"
50  m_phiAxis = static_cast<Axis> ((xAxis + yAxis + zAxis) - (stripDirection + thicknessDirection));
51 
52 
53 
54 }

◆ ~DetectorDesign()

InDetDD::DetectorDesign::~DetectorDesign ( )
default

◆ DetectorDesign() [3/4]

InDetDD::DetectorDesign::DetectorDesign ( )
private

◆ DetectorDesign() [4/4]

InDetDD::DetectorDesign::DetectorDesign ( const DetectorDesign design)
private

Member Function Documentation

◆ bounds()

virtual const Trk::SurfaceBounds& InDetDD::DetectorDesign::bounds ( ) const
pure virtual

◆ carrierType()

InDetDD::CarrierType InDetDD::DetectorDesign::carrierType ( ) const
inline

Return carrier type (ie electrons or holes)

Definition at line 275 of file DetectorDesign.h.

275  {
276  return m_carrierType;
277 }

◆ cellIdInRange()

virtual SiCellId InDetDD::DetectorDesign::cellIdInRange ( const SiCellId cellId) const
pure virtual

Check if cell is in range.

Returns the original cellId if it is in range, otherwise it returns an invalid id.

Implemented in InDetDD::SCT_ModuleSideDesign, InDetDD::HGTD_ModuleDesign, InDetDD::PixelModuleDesign, InDetDD::StripStereoAnnulusDesign, InDetDD::StripBoxDesign, and InDetDD::StripAnnulusDesign.

◆ cellIdOfPosition()

virtual SiCellId InDetDD::DetectorDesign::cellIdOfPosition ( const SiLocalPosition localPos) const
pure virtual

◆ connectedCell()

virtual SiCellId InDetDD::DetectorDesign::connectedCell ( const SiReadoutCellId readoutId,
int  number 
) const
pure virtual

readout id -> id of connected diodes.

parameter number = 0 will refer to the primary diode and in general the cell number will be the same. NB. SiCellId cellId = connectedCell(readoutId, 0) will in general be equivalent to SiCellId cellId = readoutId

Implemented in InDetDD::SCT_ModuleSideDesign, InDetDD::HGTD_ModuleDesign, and InDetDD::PixelModuleDesign.

◆ depthAxis()

DetectorDesign::Axis InDetDD::DetectorDesign::depthAxis ( ) const
inline

local axis corresponding to depth direction:

Definition at line 267 of file DetectorDesign.h.

267  {
268  return m_depthAxis;
269 }

◆ depthSymmetric()

bool InDetDD::DetectorDesign::depthSymmetric ( ) const
inline

Definition at line 287 of file DetectorDesign.h.

287  {
288  return m_depthSymmetric;
289 }

◆ distanceToDetectorEdge()

virtual void InDetDD::DetectorDesign::distanceToDetectorEdge ( const SiLocalPosition localPosition,
double &  etaDist,
double &  phiDist 
) const
pure virtual

◆ etaAxis()

DetectorDesign::Axis InDetDD::DetectorDesign::etaAxis ( ) const
inline

local axis corresponding to eta direction:

Definition at line 259 of file DetectorDesign.h.

259  {
260  return m_etaAxis;
261 }

◆ etaPitch()

virtual double InDetDD::DetectorDesign::etaPitch ( ) const
pure virtual

◆ etaSymmetric()

bool InDetDD::DetectorDesign::etaSymmetric ( ) const
inline

Definition at line 283 of file DetectorDesign.h.

283  {
284  return m_etaSymmetric;
285 }

◆ inDetector()

SiIntersect InDetDD::DetectorDesign::inDetector ( const SiLocalPosition localPosition,
double  phiTol,
double  etaTol 
) const
virtual

Test if point is in the active part of the detector with specified tolerances.

Reimplemented in InDetDD::SCT_ModuleSideDesign.

Definition at line 106 of file DetectorDesign.cxx.

107  {
108  double etaDist = 0;
109  double phiDist = 0;
110 
111  distanceToDetectorEdge(localPosition, etaDist, phiDist);
112 
113  SiIntersect state;
114 
115  if (phiDist < -phiTol || etaDist < -etaTol) {
116  state.setOut();
117  return state;
118  }
119 
120  if (phiDist > phiTol && etaDist > etaTol) {
121  state.setIn();
122  return state;
123  }
124 
125  // Near boundary.
126  state.setNearBoundary();
127  return state;
128 }

◆ length()

virtual double InDetDD::DetectorDesign::length ( ) const
pure virtual

◆ localPositionOfCell()

virtual SiLocalPosition InDetDD::DetectorDesign::localPositionOfCell ( const SiCellId cellId) const
pure virtual

◆ maxWidth()

virtual double InDetDD::DetectorDesign::maxWidth ( ) const
pure virtual

◆ minWidth()

virtual double InDetDD::DetectorDesign::minWidth ( ) const
pure virtual

◆ moduleShift()

const Amg::Transform3D InDetDD::DetectorDesign::moduleShift ( ) const
virtual

Reimplemented in InDetDD::StripBoxDesign.

Definition at line 130 of file DetectorDesign.cxx.

130  {
131  return Amg::Transform3D::Identity();
132  }

◆ neighboursOfCell()

virtual void InDetDD::DetectorDesign::neighboursOfCell ( const SiCellId cellId,
std::vector< SiCellId > &  neighbours 
) const
pure virtual

Get the neighbouring diodes of a given diode: Cell for which the neighbours must be found List of cells which are neighbours of the given one.

Implemented in InDetDD::StripStereoAnnulusDesign, InDetDD::SCT_ModuleSideDesign, InDetDD::StripBoxDesign, InDetDD::HGTD_ModuleDesign, InDetDD::PixelModuleDesign, and InDetDD::StripAnnulusDesign.

◆ numberOfConnectedCells()

virtual int InDetDD::DetectorDesign::numberOfConnectedCells ( const SiReadoutCellId readoutId) const
pure virtual

number of connected cells.

Generally 1 except for ganged pixels which will be 2.

Implemented in InDetDD::SCT_ModuleSideDesign, InDetDD::HGTD_ModuleDesign, and InDetDD::PixelModuleDesign.

◆ operator=()

DetectorDesign& InDetDD::DetectorDesign::operator= ( const DetectorDesign design)
private

◆ parameters()

virtual SiDiodesParameters InDetDD::DetectorDesign::parameters ( const SiCellId cellId) const
pure virtual

◆ phiAxis()

DetectorDesign::Axis InDetDD::DetectorDesign::phiAxis ( ) const
inline

local axis corresponding to phi direction:

Definition at line 263 of file DetectorDesign.h.

263  {
264  return m_phiAxis;
265 }

◆ phiPitch() [1/2]

virtual double InDetDD::DetectorDesign::phiPitch ( ) const
pure virtual

◆ phiPitch() [2/2]

virtual double InDetDD::DetectorDesign::phiPitch ( const SiLocalPosition localPosition) const
pure virtual

◆ phiSymmetric()

bool InDetDD::DetectorDesign::phiSymmetric ( ) const
inline

Definition at line 279 of file DetectorDesign.h.

279  {
280  return m_phiSymmetric;
281 }

◆ readoutIdOfCell()

virtual SiReadoutCellId InDetDD::DetectorDesign::readoutIdOfCell ( const SiCellId cellId) const
pure virtual

diode id -> readout id NB assignment of a SiReadoutCellId to a SiCellId is allowed so you are can pass SiReadoutCellId variables to functions expecting a SiCellId.


Implemented in InDetDD::StripStereoAnnulusDesign, InDetDD::StripBoxDesign, InDetDD::SCT_ModuleSideDesign, InDetDD::HGTD_ModuleDesign, InDetDD::StripAnnulusDesign, and InDetDD::PixelModuleDesign.

◆ readoutIdOfPosition()

virtual SiReadoutCellId InDetDD::DetectorDesign::readoutIdOfPosition ( const SiLocalPosition localPos) const
pure virtual

◆ readoutSide()

int InDetDD::DetectorDesign::readoutSide ( ) const
inline

ReadoutSide.

+1 = postive depth side, -1 = negative depth side.

Definition at line 291 of file DetectorDesign.h.

291  {
292  return (m_readoutSidePosDepth) ? +1 : -1;
293 }

◆ sensorCenter()

Amg::Vector3D InDetDD::DetectorDesign::sensorCenter ( ) const
virtual

Return the centre of a sensor in the local reference frame.

For most designs, this is the origin of the local reference frame. For StripStereoAnnulusDesign, this is not the case (coordinate origin is "on the beamline")

Reimplemented in InDetDD::StripStereoAnnulusDesign, and InDetDD::StripAnnulusDesign.

Definition at line 60 of file DetectorDesign.cxx.

60  {
61  return Amg::Vector3D(0., 0., 0.);
62 }

◆ setSymmetry()

void InDetDD::DetectorDesign::setSymmetry ( bool  phiSymmetric,
bool  etaSymmetric,
bool  depthSymmetric 
)

Override default symmetries to prevent swapping of axes.

NB. Flags can be changed from true to false but not false to true.

Definition at line 65 of file DetectorDesign.cxx.

66  {
67  // Flags can be changed from true to false but not false to true.
68  if (m_phiSymmetric) {
70  }
71  else if (phiSymmetric) {
72  std::cout <<
73  "SiDetectorDesign: WARNING! Attempt to allow swapping of xPhi axis direction ignored."
74  << std::endl;
75  }
76 
77  if (m_etaSymmetric) {
79  }
80  else if (etaSymmetric) {
81  std::cout <<
82  "SiDetectorDesign: WARNING! Attempt to allow swapping of xEta axis direction ignored."
83  << std::endl;
84  }
85 
86  if (m_depthSymmetric) {
88  }
89  else if (depthSymmetric) {
90  std::cout <<
91  "SiDetectorDesign: WARNING! Attempt to allow swapping of xDepth axis direction ignored."
92  << std::endl;
93  }
94 }

◆ shape()

DetectorShape InDetDD::DetectorDesign::shape ( ) const
virtual

Shape of element.

Reimplemented in InDetDD::StripStereoAnnulusDesign, and InDetDD::SCT_ForwardModuleSideDesign.

Definition at line 96 of file DetectorDesign.cxx.

96  {
97  // Default is Box.
98  return InDetDD::Box;
99 }

◆ swapHitEtaReadoutDirection()

virtual bool InDetDD::DetectorDesign::swapHitEtaReadoutDirection ( ) const
pure virtual

◆ swapHitPhiReadoutDirection()

virtual bool InDetDD::DetectorDesign::swapHitPhiReadoutDirection ( ) const
pure virtual

◆ thickness()

double InDetDD::DetectorDesign::thickness ( ) const
inline

Method which returns thickness of the silicon wafer.

Definition at line 271 of file DetectorDesign.h.

271  {
272  return m_thickness;
273 }

◆ type()

DetectorType InDetDD::DetectorDesign::type ( ) const
virtual

Type of element.

Reimplemented in InDetDD::StripStereoAnnulusDesign, InDetDD::StripBoxDesign, and InDetDD::PixelModuleDesign.

Definition at line 101 of file DetectorDesign.cxx.

101  {
102  // Default is Undefined.
103  return InDetDD::Undefined;
104 }

◆ width()

virtual double InDetDD::DetectorDesign::width ( ) const
pure virtual

Member Data Documentation

◆ m_carrierType

InDetDD::CarrierType InDetDD::DetectorDesign::m_carrierType
private

Definition at line 240 of file DetectorDesign.h.

◆ m_depthAxis

Axis InDetDD::DetectorDesign::m_depthAxis
private

Definition at line 238 of file DetectorDesign.h.

◆ m_depthSymmetric

bool InDetDD::DetectorDesign::m_depthSymmetric
private

Definition at line 244 of file DetectorDesign.h.

◆ m_etaAxis

Axis InDetDD::DetectorDesign::m_etaAxis
private

Definition at line 236 of file DetectorDesign.h.

◆ m_etaSymmetric

bool InDetDD::DetectorDesign::m_etaSymmetric
private

Definition at line 243 of file DetectorDesign.h.

◆ m_phiAxis

Axis InDetDD::DetectorDesign::m_phiAxis
private

Definition at line 237 of file DetectorDesign.h.

◆ m_phiSymmetric

bool InDetDD::DetectorDesign::m_phiSymmetric
private

Definition at line 242 of file DetectorDesign.h.

◆ m_readoutSidePosDepth

bool InDetDD::DetectorDesign::m_readoutSidePosDepth
private

Definition at line 246 of file DetectorDesign.h.

◆ m_thickness

double InDetDD::DetectorDesign::m_thickness
private

Definition at line 239 of file DetectorDesign.h.


The documentation for this class was generated from the following files:
InDetDD::DetectorDesign::xAxis
@ xAxis
Definition: DetectorDesign.h:60
InDetDD::DetectorDesign::m_etaSymmetric
bool m_etaSymmetric
Definition: DetectorDesign.h:243
InDetDD::DetectorDesign::m_phiSymmetric
bool m_phiSymmetric
Definition: DetectorDesign.h:242
InDetDD::DetectorDesign::depthSymmetric
bool depthSymmetric() const
Definition: DetectorDesign.h:287
InDetDD::DetectorDesign::m_thickness
double m_thickness
Definition: DetectorDesign.h:239
InDetDD::DetectorDesign::thickness
double thickness() const
Method which returns thickness of the silicon wafer.
Definition: DetectorDesign.h:271
InDetDD::DetectorDesign::etaSymmetric
bool etaSymmetric() const
Definition: DetectorDesign.h:283
InDetDD::DetectorDesign::m_carrierType
InDetDD::CarrierType m_carrierType
Definition: DetectorDesign.h:240
InDetDD::DetectorDesign::m_depthAxis
Axis m_depthAxis
Definition: DetectorDesign.h:238
InDetDD::DetectorDesign::yAxis
@ yAxis
Definition: DetectorDesign.h:60
InDetDD::DetectorDesign::m_phiAxis
Axis m_phiAxis
Definition: DetectorDesign.h:237
InDetDD::DetectorDesign::readoutSide
int readoutSide() const
ReadoutSide.
Definition: DetectorDesign.h:291
InDetDD::DetectorDesign::carrierType
InDetDD::CarrierType carrierType() const
Return carrier type (ie electrons or holes)
Definition: DetectorDesign.h:275
InDetDD::DetectorDesign::Axis
Axis
Definition: DetectorDesign.h:59
InDetDD::DetectorDesign::m_etaAxis
Axis m_etaAxis
Definition: DetectorDesign.h:236
InDetDD::DetectorDesign::distanceToDetectorEdge
virtual void distanceToDetectorEdge(const SiLocalPosition &localPosition, double &etaDist, double &phiDist) const =0
Returns distance to nearest detector active edge +ve = inside -ve = outside.
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
InDetDD::DetectorDesign::phiSymmetric
bool phiSymmetric() const
Definition: DetectorDesign.h:279
InDetDD::DetectorDesign::m_depthSymmetric
bool m_depthSymmetric
Definition: DetectorDesign.h:244
InDetDD::DetectorDesign::m_readoutSidePosDepth
bool m_readoutSidePosDepth
Definition: DetectorDesign.h:246
InDetDD::Box
@ Box
Definition: DetectorDesign.h:42
InDetDD::Undefined
@ Undefined
Definition: DetectorDesign.h:46
InDetDD::DetectorDesign::zAxis
@ zAxis
Definition: DetectorDesign.h:60