ATLAS Offline Software
Loading...
Searching...
No Matches
InDetDD::DetectorDesign Class Referenceabstract

Base class for the detector design classes for ITk and HGTD. More...

#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.
 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.
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.
void setSymmetry (bool phiSymmetric, bool etaSymmetric, bool depthSymmetric)
 Override default symmetries to prevent swapping of axes.
Axis etaAxis () const
 local axis corresponding to eta direction:
Axis phiAxis () const
 local axis corresponding to phi direction:
Axis depthAxis () const
 local axis corresponding to depth direction:
double thickness () const
 Method which returns thickness of the silicon wafer.
InDetDD::CarrierType carrierType () const
 Return carrier type (ie electrons or holes)
bool phiSymmetric () const
bool etaSymmetric () const
bool depthSymmetric () const
int readoutSide () const
 ReadoutSide.
virtual void distanceToDetectorEdge (const SiLocalPosition &localPosition, double &etaDist, double &phiDist) const =0
 Returns distance to nearest detector active edge +ve = inside -ve = outside.
virtual DetectorShape shape () const
 Shape of element.
virtual DetectorType type () const
 Type of element.
virtual double length () const =0
 Method to calculate length of a module.
virtual double width () const =0
 Method to calculate average width of a module.
virtual double minWidth () const =0
 Method to calculate minimum width of a module.
virtual double maxWidth () const =0
 Method to calculate maximum width of a module.
virtual double phiPitch () const =0
 Pitch in phi direction.
virtual double phiPitch (const SiLocalPosition &localPosition) const =0
 Pitch in phi direction.
virtual double etaPitch () const =0
virtual bool swapHitPhiReadoutDirection () const =0
 Return true if hit local direction is the same as readout direction.
virtual bool swapHitEtaReadoutDirection () const =0
virtual const Trk::SurfaceBoundsbounds () const =0
 Element boundary.
virtual const Amg::Transform3D moduleShift () const
virtual SiDiodesParameters parameters (const SiCellId &cellId) const =0
 readout or diode id -> position, size
virtual SiLocalPosition localPositionOfCell (const SiCellId &cellId) const =0
 readout or diode id -> position.
virtual int numberOfConnectedCells (const SiReadoutCellId &readoutId) const =0
 number of connected cells.
virtual SiCellId connectedCell (const SiReadoutCellId &readoutId, int number) const =0
 readout id -> id of connected diodes.
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.
virtual SiReadoutCellId readoutIdOfPosition (const SiLocalPosition &localPos) const =0
 position -> id
virtual SiCellId cellIdOfPosition (const SiLocalPosition &localPos) const =0
 position -> id
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.
virtual SiCellId cellIdInRange (const SiCellId &cellId) const =0
 Check if cell is in range.

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.

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.

16 :
26}
double thickness() const
Method which returns thickness of the silicon wafer.
InDetDD::CarrierType carrierType() const
Return carrier type (ie electrons or holes)
int readoutSide() const
ReadoutSide.
InDetDD::CarrierType m_carrierType

◆ 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()

◆ 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::HGTD_ModuleDesign, InDetDD::PixelModuleDesign, InDetDD::SCT_ModuleSideDesign, InDetDD::StripAnnulusDesign, InDetDD::StripBoxDesign, InDetDD::StripStereoAnnulusDesign, and SCT_ModuleSideDesign.

◆ cellIdOfPosition()

◆ 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::HGTD_ModuleDesign, InDetDD::PixelModuleDesign, InDetDD::SCT_ModuleSideDesign, and SCT_ModuleSideDesign.

◆ 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()

◆ 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, and 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}
virtual void distanceToDetectorEdge(const SiLocalPosition &localPosition, double &etaDist, double &phiDist) const =0
Returns distance to nearest detector active edge +ve = inside -ve = outside.

◆ length()

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

◆ localPositionOfCell()

◆ 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::HGTD_ModuleDesign, InDetDD::PixelModuleDesign, InDetDD::SCT_ModuleSideDesign, InDetDD::StripAnnulusDesign, InDetDD::StripBoxDesign, InDetDD::StripStereoAnnulusDesign, and SCT_ModuleSideDesign.

◆ 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::HGTD_ModuleDesign, InDetDD::PixelModuleDesign, InDetDD::SCT_ModuleSideDesign, and SCT_ModuleSideDesign.

◆ 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]

◆ 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

◆ 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::StripAnnulusDesign, and InDetDD::StripStereoAnnulusDesign.

Definition at line 60 of file DetectorDesign.cxx.

60 {
61 return Amg::Vector3D(0., 0., 0.);
62}
Eigen::Matrix< double, 3, 1 > Vector3D

◆ 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::SCT_ForwardModuleSideDesign, and InDetDD::StripStereoAnnulusDesign.

Definition at line 96 of file DetectorDesign.cxx.

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

◆ swapHitEtaReadoutDirection()

◆ 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::PixelModuleDesign, InDetDD::StripBoxDesign, and InDetDD::StripStereoAnnulusDesign.

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: