ATLAS Offline Software
Loading...
Searching...
No Matches
InDetDD::StripBoxDesign Class Reference

#include <StripBoxDesign.h>

Inheritance diagram for InDetDD::StripBoxDesign:
Collaboration diagram for InDetDD::StripBoxDesign:

Public Types

enum  Axis { xAxis =0 , yAxis , zAxis }

Public Member Functions

 StripBoxDesign ()
 StripBoxDesign (const SiDetectorDesign::Axis stripDirection, const SiDetectorDesign::Axis thicknessDirection, const double thickness, const int readoutSide, const InDetDD::CarrierType carrier, const int nRows, const int nStrips, const double pitch, const double length, InDetDD::DetectorType detectorType=InDetDD::Undefined, const double zShift=0.0)
 ~StripBoxDesign ()=default
 StripBoxDesign (const StripBoxDesign &design)
StripBoxDesignoperator= (const StripBoxDesign &design)
std::pair< int, int > getStripRow (SiCellId id) const final
 Get the strip and row number of the cell.
virtual int strip1Dim (int strip, int row) const override
 only relevant for SCT.
int diodes () const
virtual int diodesInRow (const int row) const override
virtual void distanceToDetectorEdge (const SiLocalPosition &localPosition, double &etaDist, double &phiDist) const override
 DEPRECATED: Unused (2014)
virtual bool inActiveArea (const SiLocalPosition &chargePos, bool checkBondGap=true) const override
 check if the position is in active area
virtual const Trk::SurfaceBoundsbounds () const override
 Element boundary.
virtual std::pair< SiLocalPosition, SiLocalPositionendsOfStrip (const SiLocalPosition &position) const override
 Give end points of the strip that covers the given position.
virtual double stripPitch (const SiLocalPosition &localPosition) const override
 give the strip pitch (dependence on position needed for forward)
double stripPitch (const SiCellId &cellId) const
virtual double stripPitch () const override
 give the strip pitch (For Forward returns pitch at center)
virtual double phiPitch (const SiLocalPosition &localPosition) const override
 Pitch in phi direction.
double phiPitch (const SiCellId &cellId) const
virtual double phiPitch () const override
 Pitch in phi direction.
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 it is called for every surface charge in the SCT_SurfaceChargesGenerator
virtual SiDiodesParameters parameters (const SiCellId &cellId) const override
 Return strip width, centre, length etc. Hard to find if this is used or not.
virtual SiLocalPosition localPositionOfCell (const SiCellId &cellId) const override
 id -> position
virtual SiLocalPosition localPositionOfCluster (const SiCellId &cellId, int clusterSize) const override
virtual SiCellId cellIdOfPosition (const SiLocalPosition &localPos) const override
 position -> id
SiLocalPosition positionFromStrip (const SiCellId &cellId) const
virtual SiLocalPosition positionFromStrip (const int stripNumber) const override
 gives position of strip center ALTERNATIVE/PREFERED way is to use localPositionOfCell(const SiCellId & cellId) or rawLocalPositionOfCell method in SiDetectorElement.
virtual int row (int stripId1Dim) const override
virtual int strip (int stripId1Dim) const override
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 cells which are neighbours of the given one.
virtual SiCellId cellIdInRange (const SiCellId &) const override
 DEPRECATED: only used in a stupid example (2014) Check if cell is in range.
virtual SiReadoutCellId readoutIdOfCell (const SiCellId &cellId) const override
 diode id -> readout id
virtual const Amg::Transform3D moduleShift () const override final
virtual InDetDD::DetectorType type () const override final
 Type of element.
virtual HepGeom::Vector3D< double > phiMeasureSegment (const SiLocalPosition &position) const override
 Helper method for stereo angle computation, DEPRECATED.
virtual double length () const override
 Method to calculate length of a module.
virtual double width () const override
 Method to calculate average width of a module.
virtual double minWidth () const override
 Method to calculate minimum width of a module.
virtual double maxWidth () const override
 Method to calculate maximum width of a module.
virtual double etaPitch () const override
virtual bool swapHitPhiReadoutDirection () const override
 Return true if hit local direction is the same as readout direction.
virtual bool swapHitEtaReadoutDirection () const override
virtual bool nearBondGap (const SiLocalPosition &, double) const override
 Test if near bond gap within tolerances, only relevant for SCT.
double pitch (const SiCellId &cellId) const
double stripLength (const SiCellId &cellId) const
virtual double deadAreaUpperBoundary () const override
 DEPRECATED for StripBoxDesign; no dead area.
virtual double deadAreaLowerBoundary () const override
 give lower boundary of dead area
virtual double deadAreaLength () const override
 give length of dead area
virtual int numberOfConnectedCells (const SiReadoutCellId &readoutId) const override
 readout id -> id of connected diodes Not particularly useful for the SCT but implemented to keep a uniform interface.
virtual SiCellId connectedCell (const SiReadoutCellId &readoutId, int number) const override
 readout id -> id of connected diodes.
virtual SiCellId gangedCell (const SiCellId &cellId) const override
 If cell is ganged return the other cell, otherwise return an invalid id.
virtual SiReadoutCellId readoutIdOfPosition (const SiLocalPosition &localPos) const override
 position -> id
int crystals () const
 number of crystals within module side:
int cells () const
 number of readout stips within module side:
int shift () const
 number of edge strips before first readout strip.
void setMother (SCT_ModuleSideDesign *mother)
const SCT_ModuleSideDesigngetMother () const
const std::map< int, const SCT_ModuleSideDesign * > & getChildren () const
void addChildDesign (int index, const SCT_ModuleSideDesign *element)
virtual SiIntersect inDetector (const SiLocalPosition &localPosition, double phiTol, double etaTol) const override
 Test if point is in the active part of the detector with specified tolerances.
virtual double sinStripAngleReco (double phiCoord, double etaCoord) const
 Give strip angle in the reco frame.
virtual Amg::Vector3D sensorCenter () const
 Return the centre of a sensor in the local reference frame.
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 DetectorShape shape () const
 Shape of element.

Protected Attributes

SCT_ReadoutScheme m_scheme
InDetDD::DetectorType m_detectorType {Undefined}

Private Attributes

int m_nRows
int m_nStrips
double m_pitch
double m_length
double m_zShift
Trk::RectangleBounds m_bounds
bool m_swapStripReadout
const SCT_ModuleSideDesignm_motherDesign {nullptr}
std::map< int, const SCT_ModuleSideDesign * > m_childDesigns
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

Definition at line 31 of file StripBoxDesign.h.

Member Enumeration Documentation

◆ Axis

Enumerator
xAxis 
yAxis 
zAxis 

Definition at line 59 of file DetectorDesign.h.

Constructor & Destructor Documentation

◆ StripBoxDesign() [1/3]

InDetDD::StripBoxDesign::StripBoxDesign ( )

◆ StripBoxDesign() [2/3]

InDetDD::StripBoxDesign::StripBoxDesign ( const SiDetectorDesign::Axis stripDirection,
const SiDetectorDesign::Axis thicknessDirection,
const double thickness,
const int readoutSide,
const InDetDD::CarrierType carrier,
const int nRows,
const int nStrips,
const double pitch,
const double length,
InDetDD::DetectorType detectorType = InDetDD::Undefined,
const double zShift = 0.0 )

Definition at line 14 of file StripBoxDesign.cxx.

24 :
25 SCT_ModuleSideDesign(thickness, true, true, true, 1, nRows * nStrips, nRows * nStrips, 0, false, carrier,readoutSide, stripDirection, thicknessDirection) {
26 if (nRows <= 0) {
27 throw std::runtime_error(
28 "ERROR: StripBoxDesign called with non-positive number of rows");
29 }
30
31 m_nRows = nRows;
33 m_pitch = pitch;
35 m_zShift = zShift;
36 m_detectorType = detectorType;
37
38 double width = m_nStrips * m_pitch;
39 double fullLength = m_nRows * m_length;
40 m_bounds = Trk::RectangleBounds(width / 2.0, fullLength / 2.0);
41}
double thickness() const
Method which returns thickness of the silicon wafer.
int readoutSide() const
ReadoutSide.
Trk::RectangleBounds m_bounds
virtual double length() const override
Method to calculate length of a module.
double pitch(const SiCellId &cellId) const
virtual double width() const override
Method to calculate average width of a module.
int nStrips(const MuonGM::TgcReadoutElement &readoutEle, int layer)
unsigned int constexpr nRows
Definition RPDUtils.h:24

◆ ~StripBoxDesign()

InDetDD::StripBoxDesign::~StripBoxDesign ( )
default

◆ StripBoxDesign() [3/3]

InDetDD::StripBoxDesign::StripBoxDesign ( const StripBoxDesign & design)

Member Function Documentation

◆ addChildDesign()

void InDetDD::SCT_ModuleSideDesign::addChildDesign ( int index,
const SCT_ModuleSideDesign * element )
inlineinherited

Definition at line 292 of file SCT_ModuleSideDesign.h.

292 {
293 m_childDesigns.emplace(index,child);
294 }
std::map< int, const SCT_ModuleSideDesign * > m_childDesigns

◆ bounds()

const Trk::SurfaceBounds & InDetDD::StripBoxDesign::bounds ( ) const
overridevirtual

Element boundary.

Implements InDetDD::DetectorDesign.

Definition at line 85 of file StripBoxDesign.cxx.

85 {
86// Return smallest rectangle that fully encompasses the active area.
87
88 return m_bounds;
89}

◆ carrierType()

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

Return carrier type (ie electrons or holes)

Definition at line 275 of file DetectorDesign.h.

275 {
276 return m_carrierType;
277}
InDetDD::CarrierType m_carrierType

◆ cellIdInRange()

SiCellId InDetDD::StripBoxDesign::cellIdInRange ( const SiCellId & cellId) const
overridevirtual

DEPRECATED: only used in a stupid example (2014) Check if cell is in range.

Returns the original cellId if it is in range, otherwise it

Reimplemented from InDetDD::SCT_ModuleSideDesign.

Definition at line 197 of file StripBoxDesign.cxx.

197 {
198
199 if (!cellId.isValid()) {
200 return {}; // Invalid
201 }
202 auto [strip, row] = getStripRow(cellId);
203 if (strip < 0 || row < 0 || row >= m_nRows || strip >= m_nStrips) {
204 return {}; // Invalid
205 }
206 return cellId;
207}
std::pair< int, int > getStripRow(SiCellId id) const final
Get the strip and row number of the cell.
virtual int strip(int stripId1Dim) const override
virtual int row(int stripId1Dim) const override
bool isValid() const
Test if its in a valid state.
Definition SiCellId.h:136

◆ cellIdOfPosition()

SiCellId InDetDD::StripBoxDesign::cellIdOfPosition ( const SiLocalPosition & localPos) const
overridevirtual

position -> id

Implements InDetDD::DetectorDesign.

Definition at line 91 of file StripBoxDesign.cxx.

91 {
92//
93// Find the row
94//
95 int strip = static_cast<int>(std::floor(pos.xPhi() / m_pitch) + m_nStrips / 2);
97
98 return {}; // return an invalid id
99 }
100 int row=0;
101 if(m_nRows>1){
102 row = static_cast<int>(std::floor(pos.xEta() / m_length) + m_nRows / 2);
104
105 return {}; // return an invalid id
106 }
107 }
108 int strip1D = strip1Dim(strip, row);
109
110 return {strip1D, 0};
111}
virtual int strip1Dim(int strip, int row) const override
only relevant for SCT.

◆ cells()

int InDetDD::SCT_ModuleSideDesign::cells ( ) const
inlineinherited

number of readout stips within module side:

Definition at line 228 of file SCT_ModuleSideDesign.h.

228 {
229 return m_scheme.cells();
230}

◆ connectedCell()

SiCellId InDetDD::SCT_ModuleSideDesign::connectedCell ( const SiReadoutCellId & readoutId,
int number ) const
inlineoverridevirtualinherited

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

Implements InDetDD::DetectorDesign.

Definition at line 241 of file SCT_ModuleSideDesign.h.

242 {
243 return m_scheme.connectedCell(readoutId, number);
244}
std::string number(const double &d, const std::string &s)
Definition utils.cxx:186

◆ crystals()

int InDetDD::SCT_ModuleSideDesign::crystals ( ) const
inlineinherited

number of crystals within module side:

Definition at line 216 of file SCT_ModuleSideDesign.h.

216 {
217 return m_scheme.crystals();
218}

◆ deadAreaLength()

double InDetDD::StripBoxDesign::deadAreaLength ( ) const
overridevirtual

give length of dead area

Implements InDetDD::SCT_ModuleSideDesign.

Definition at line 237 of file StripBoxDesign.h.

237 {
238 return 0.;
239}

◆ deadAreaLowerBoundary()

double InDetDD::StripBoxDesign::deadAreaLowerBoundary ( ) const
overridevirtual

give lower boundary of dead area

Implements InDetDD::SCT_ModuleSideDesign.

Definition at line 233 of file StripBoxDesign.h.

233 {
234 return 0.;
235}

◆ deadAreaUpperBoundary()

double InDetDD::StripBoxDesign::deadAreaUpperBoundary ( ) const
overridevirtual

DEPRECATED for StripBoxDesign; no dead area.

Implements InDetDD::SCT_ModuleSideDesign.

Definition at line 229 of file StripBoxDesign.h.

229 {
230 return 0.;
231}

◆ depthAxis()

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

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
inlineinherited

Definition at line 287 of file DetectorDesign.h.

287 {
288 return m_depthSymmetric;
289}

◆ diodes()

int InDetDD::StripBoxDesign::diodes ( ) const
inline

Definition at line 169 of file StripBoxDesign.h.

169 { // Total diodes
170 return m_nRows * m_nStrips;
171}

◆ diodesInRow()

int InDetDD::StripBoxDesign::diodesInRow ( const int row) const
inlineoverridevirtual

Reimplemented from InDetDD::SCT_ModuleSideDesign.

Definition at line 173 of file StripBoxDesign.h.

173 {
174 return m_nStrips;
175}

◆ distanceToDetectorEdge()

void InDetDD::StripBoxDesign::distanceToDetectorEdge ( const SiLocalPosition & localPosition,
double & etaDist,
double & phiDist ) const
overridevirtual

DEPRECATED: Unused (2014)

Implements InDetDD::DetectorDesign.

Definition at line 235 of file StripBoxDesign.cxx.

237 {
238
239 // As the calculation is symmetric around 0,0 we only have to test it for one side.
240 double xEta = std::abs(pos.xEta()); //assuming centered around 0?!?
241 double xPhi = std::abs(pos.xPhi());
242
243 double xEtaEdge = 0.5 * length();
244 double xPhiEdge = 0.5 * width();
245
246 // Distance to top/bottom
247 etaDist = xEtaEdge - xEta;
248
249 // Distance to right/left edge
250 phiDist = xPhiEdge - xPhi;
251
252
253}

◆ endsOfStrip()

std::pair< SiLocalPosition, SiLocalPosition > InDetDD::StripBoxDesign::endsOfStrip ( const SiLocalPosition & position) const
overridevirtual

Give end points of the strip that covers the given position.

Implements InDetDD::SCT_ModuleSideDesign.

Definition at line 140 of file StripBoxDesign.cxx.

141 {
142
143 SiCellId cellId = cellIdOfPosition(pos);
144
145 auto [strip, row] = getStripRow(cellId);
146
147 double etaStart = (row - m_nRows / 2.) * m_length;
148 double etaEnd = etaStart + m_length;
149
150 double phi = (strip - m_nStrips / 2. + 0.5) * m_pitch;
151// cout << "etaStart = " << etaStart << "; etaEnd = " << etaEnd << "; phi coord. = " << phi << endl;
152
153 SiLocalPosition end1(etaStart, phi, 0.0);
154 SiLocalPosition end2(etaEnd, phi, 0.0);
155
156 return std::pair<SiLocalPosition, SiLocalPosition>(end1, end2);
157}
Scalar phi() const
phi method
virtual SiCellId cellIdOfPosition(const SiLocalPosition &localPos) const override
position -> id

◆ etaAxis()

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

local axis corresponding to eta direction:

Definition at line 259 of file DetectorDesign.h.

259 {
260 return m_etaAxis;
261}

◆ etaPitch()

double InDetDD::StripBoxDesign::etaPitch ( ) const
overridevirtual

Implements InDetDD::DetectorDesign.

Definition at line 225 of file StripBoxDesign.cxx.

225 {
226 return m_length;
227}

◆ etaSymmetric()

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

Definition at line 283 of file DetectorDesign.h.

283 {
284 return m_etaSymmetric;
285}

◆ gangedCell()

SiCellId InDetDD::SCT_ModuleSideDesign::gangedCell ( const SiCellId & cellId) const
inlineoverridevirtualinherited

If cell is ganged return the other cell, otherwise return an invalid id.

Not particularly useful for the SCT but implemented to keep a uniform interface. For SCT always returns an invalid id.

Implements InDetDD::SiDetectorDesign.

Definition at line 246 of file SCT_ModuleSideDesign.h.

246 {
247 // No ganged cells in SCT so always return invalid id.
248 return SiCellId();
249}

◆ getChildren()

const std::map< int, const SCT_ModuleSideDesign * > & InDetDD::SCT_ModuleSideDesign::getChildren ( ) const
inlineinherited

Definition at line 287 of file SCT_ModuleSideDesign.h.

287 {
288 return m_childDesigns;
289 }

◆ getMother()

const SCT_ModuleSideDesign * InDetDD::SCT_ModuleSideDesign::getMother ( ) const
inlineinherited

Definition at line 283 of file SCT_ModuleSideDesign.h.

283 {
284 return m_motherDesign;
285 }
const SCT_ModuleSideDesign * m_motherDesign

◆ getStripRow()

std::pair< int, int > InDetDD::StripBoxDesign::getStripRow ( SiCellId cellId) const
finalvirtual

Get the strip and row number of the cell.

Can be used as auto [strip, row] = getStripRow(cellId);

Parameters
cellIdThe SiCellId
Returns
std::pair<int,int> A pair of ints representing the strip ID and row ID

Reimplemented from InDetDD::SCT_ModuleSideDesign.

Definition at line 51 of file StripBoxDesign.cxx.

51 {
52 int strip1D = cellId.phiIndex();
53 int row = strip1D / m_nStrips;
54 int strip = strip1D % m_nStrips;
55 return {strip,row};
56}
int phiIndex() const
Get phi index. Equivalent to strip().
Definition SiCellId.h:122

◆ inActiveArea()

bool InDetDD::StripBoxDesign::inActiveArea ( const SiLocalPosition & chargePos,
bool checkBondGap = true ) const
overridevirtual

check if the position is in active area

Implements InDetDD::SCT_ModuleSideDesign.

Definition at line 159 of file StripBoxDesign.cxx.

160 {
161
162 SiCellId id = cellIdOfPosition(pos);
163
164
165 return id.isValid();
166}

◆ inDetector()

SiIntersect InDetDD::SCT_ModuleSideDesign::inDetector ( const SiLocalPosition & localPosition,
double phiTol,
double etaTol ) const
overridevirtualinherited

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

Reimplemented from InDetDD::DetectorDesign.

Definition at line 131 of file SCT_ModuleSideDesign.cxx.

131 {
132
133 double etaDist = 0;
134 double phiDist = 0;
135
136 distanceToDetectorEdge(localPosition, etaDist, phiDist);
137
138 SiIntersect state;
139
140 if (phiDist < -phiTol || etaDist < -etaTol) {
141 state.setOut();
142 return state;
143 }
144
145 if (phiDist > phiTol && etaDist > etaTol) {
146 state.setIn();
147 return state;
148 }
149
150 // Near boundary.
151 state.setNearBoundary();
152 return state;
153}
virtual void distanceToDetectorEdge(const SiLocalPosition &localPosition, double &etaDist, double &phiDist) const =0
Returns distance to nearest detector active edge +ve = inside -ve = outside.

◆ length()

double InDetDD::StripBoxDesign::length ( ) const
overridevirtual

Method to calculate length of a module.

Implements InDetDD::DetectorDesign.

Definition at line 209 of file StripBoxDesign.cxx.

209 {
210 return m_length*m_nRows;
211}

◆ localPositionOfCell()

SiLocalPosition InDetDD::StripBoxDesign::localPositionOfCell ( const SiCellId & cellId) const
overridevirtual

id -> position

Implements InDetDD::SCT_ModuleSideDesign.

Definition at line 113 of file StripBoxDesign.cxx.

113 {
114
115 auto [strip, row] = getStripRow(cellId);
116 double eta = ((double) row - (double) m_nRows / 2. + 0.5) * m_length;
117
118 double phi = ((double) strip - (double) m_nStrips / 2. + 0.5) * m_pitch;
119
120
121 return SiLocalPosition(eta, phi, 0.0);
122}
Scalar eta() const
pseudorapidity method

◆ localPositionOfCluster()

SiLocalPosition InDetDD::StripBoxDesign::localPositionOfCluster ( const SiCellId & cellId,
int clusterSize ) const
overridevirtual

Implements InDetDD::SCT_ModuleSideDesign.

Definition at line 124 of file StripBoxDesign.cxx.

125 {
126
127 SiLocalPosition pos = localPositionOfCell(cellId);
128
129 if (clusterSize <= 1) {
130 return pos;
131 }
132
133 double clusterWidth = clusterSize * m_pitch;
134 pos.xPhi(pos.xPhi() + clusterWidth / 2.); // get then set xPhi
135
136 return pos;
137}
virtual SiLocalPosition localPositionOfCell(const SiCellId &cellId) const override
id -> position

◆ maxWidth()

double InDetDD::StripBoxDesign::maxWidth ( ) const
overridevirtual

Method to calculate maximum width of a module.

Implements InDetDD::DetectorDesign.

Definition at line 221 of file StripBoxDesign.cxx.

221 {
222 return width();
223}

◆ minWidth()

double InDetDD::StripBoxDesign::minWidth ( ) const
overridevirtual

Method to calculate minimum width of a module.

Implements InDetDD::DetectorDesign.

Definition at line 217 of file StripBoxDesign.cxx.

217 {
218 return width();
219}

◆ moduleShift()

const Amg::Transform3D InDetDD::StripBoxDesign::moduleShift ( ) const
finaloverridevirtual

Reimplemented from InDetDD::DetectorDesign.

Definition at line 255 of file StripBoxDesign.cxx.

255 {
256 //local x is global Z (along strip)
257 //This is defined by the detector geometry
258 //i.e. <param name="stripDirection" value="x"/>
259 //in Sensors.gmx
260 return Amg::Translation3D(m_zShift,0.0, 0.0) * Amg::RotationMatrix3D::Identity();
261 }
Eigen::Translation< double, 3 > Translation3D

◆ nearBondGap()

bool InDetDD::StripBoxDesign::nearBondGap ( const SiLocalPosition & localPosition,
double etaTol ) const
inlineoverridevirtual

Test if near bond gap within tolerances, only relevant for SCT.

Implements InDetDD::SiDetectorDesign.

Definition at line 204 of file StripBoxDesign.h.

204 {
205// No bond gap in strip modules
206 return false;
207}

◆ neighboursOfCell()

void InDetDD::StripBoxDesign::neighboursOfCell ( const SiCellId & cellId,
std::vector< SiCellId > & neighbours ) const
overridevirtual

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.

Reimplemented from InDetDD::SCT_ModuleSideDesign.

Definition at line 62 of file StripBoxDesign.cxx.

63 {
64
65
66 neighbours.clear();
67
68 if (!cellId.isValid()) {
69 return;
70 }
71
72 auto [strip, row] = getStripRow(cellId);
73 int stripM = strip - 1;
74 int stripP = strip + 1;
75
76 if (stripM >= 0) {
77 neighbours.emplace_back(stripM);
78 }
79 if (stripP < m_nStrips) {
80 neighbours.emplace_back(stripP);
81 }
82
83}

◆ numberOfConnectedCells()

int InDetDD::SCT_ModuleSideDesign::numberOfConnectedCells ( const SiReadoutCellId & readoutId) const
inlineoverridevirtualinherited

readout id -> id of connected diodes Not particularly useful for the SCT but implemented to keep a uniform interface.

Implements InDetDD::DetectorDesign.

Definition at line 236 of file SCT_ModuleSideDesign.h.

237 {
238 return m_scheme.numberOfConnectedCells(readoutId);
239}

◆ operator=()

StripBoxDesign & InDetDD::StripBoxDesign::operator= ( const StripBoxDesign & design)

◆ parameters()

SiDiodesParameters InDetDD::StripBoxDesign::parameters ( const SiCellId & cellId) const
overridevirtual

Return strip width, centre, length etc. Hard to find if this is used or not.

Implements InDetDD::DetectorDesign.

Definition at line 179 of file StripBoxDesign.cxx.

179 {
180 throw std::runtime_error("Call to StripBoxDesign::parameters; not yet implemented");
181}

◆ phiAxis()

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

local axis corresponding to phi direction:

Definition at line 263 of file DetectorDesign.h.

263 {
264 return m_phiAxis;
265}

◆ phiMeasureSegment()

HepGeom::Vector3D< double > InDetDD::StripBoxDesign::phiMeasureSegment ( const SiLocalPosition & position) const
overridevirtual

Helper method for stereo angle computation, DEPRECATED.

Implements InDetDD::SiDetectorDesign.

Definition at line 229 of file StripBoxDesign.cxx.

230 {
231 throw std::runtime_error("Call to phiMeasureSegment, DEPRECATED, not implemented.");
232}

◆ phiPitch() [1/3]

double InDetDD::StripBoxDesign::phiPitch ( ) const
inlineoverridevirtual

Pitch in phi direction.

Implements InDetDD::DetectorDesign.

Definition at line 200 of file StripBoxDesign.h.

200 {
201 return m_pitch;
202}

◆ phiPitch() [2/3]

double InDetDD::StripBoxDesign::phiPitch ( const SiCellId & cellId) const
inline

Definition at line 196 of file StripBoxDesign.h.

196 {
197 return m_pitch;
198}

◆ phiPitch() [3/3]

double InDetDD::StripBoxDesign::phiPitch ( const SiLocalPosition & localPosition) const
inlineoverridevirtual

Pitch in phi direction.

Implements InDetDD::DetectorDesign.

Definition at line 192 of file StripBoxDesign.h.

192 {
193 return m_pitch;
194}

◆ phiSymmetric()

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

Definition at line 279 of file DetectorDesign.h.

279 {
280 return m_phiSymmetric;
281}

◆ pitch()

double InDetDD::StripBoxDesign::pitch ( const SiCellId & cellId) const

◆ positionFromStrip() [1/2]

SiLocalPosition InDetDD::StripBoxDesign::positionFromStrip ( const int stripNumber) const
overridevirtual

gives position of strip center ALTERNATIVE/PREFERED way is to use localPositionOfCell(const SiCellId & cellId) or rawLocalPositionOfCell method in SiDetectorElement.

DEPRECATED

Reimplemented from InDetDD::SCT_ModuleSideDesign.

Definition at line 190 of file StripBoxDesign.cxx.

190 {
191 return localPositionOfCell(SiCellId(stripNumber, 0));
192}

◆ positionFromStrip() [2/2]

SiLocalPosition InDetDD::StripBoxDesign::positionFromStrip ( const SiCellId & cellId) const

Definition at line 184 of file StripBoxDesign.cxx.

184 {
185// throw std::runtime_error("Deprecated positionFromStrip called.");
186 return localPositionOfCell(cellId);
187}

◆ readoutIdOfCell()

SiReadoutCellId InDetDD::StripBoxDesign::readoutIdOfCell ( const SiCellId & cellId) const
inlineoverridevirtual

diode id -> readout id

Reimplemented from InDetDD::SCT_ModuleSideDesign.

Definition at line 209 of file StripBoxDesign.h.

209 {
210 int strip = cellId.phiIndex(); /* Gets a 1D strip id */
211 int row = cellId.etaIndex(); /* is junk or 0 in 1D scheme */
212
213 return SiReadoutCellId(strip, row);
214}
int etaIndex() const
Get eta index.
Definition SiCellId.h:114

◆ readoutIdOfPosition()

SiReadoutCellId InDetDD::SCT_ModuleSideDesign::readoutIdOfPosition ( const SiLocalPosition & localPos) const
inlineoverridevirtualinherited

position -> id

Implements InDetDD::DetectorDesign.

Definition at line 256 of file SCT_ModuleSideDesign.h.

257 {
258 // Get the cellId then convert it to a readoutId.
259 // NEED to think about active area and bond gap check
260 return readoutIdOfCell(cellIdOfPosition(localPos));
261}
virtual SiCellId cellIdOfPosition(const SiLocalPosition &localPos) const =0
position -> id
virtual SiReadoutCellId readoutIdOfCell(const SiCellId &cellId) const override
diode id -> readout id

◆ readoutSide()

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

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}

◆ row()

int InDetDD::StripBoxDesign::row ( int stripId1Dim) const
inlineoverridevirtual

Reimplemented from InDetDD::SCT_ModuleSideDesign.

Definition at line 216 of file StripBoxDesign.h.

216 {
217 return stripId1Dim / m_nStrips;
218}

◆ scaledDistanceToNearestDiode()

double InDetDD::StripBoxDesign::scaledDistanceToNearestDiode ( const SiLocalPosition & chargePos) const
overridevirtual

give distance to the nearest diode in units of pitch, from 0.0 to 0.5, this method should be fast as it is called for every surface charge in the SCT_SurfaceChargesGenerator

Implements InDetDD::SCT_ModuleSideDesign.

Definition at line 169 of file StripBoxDesign.cxx.

169 {
170
171 SiCellId cellId = cellIdOfPosition(pos);
172 SiLocalPosition posStrip = localPositionOfCell(cellId);
173
174
175 return std::abs(pos.xPhi() - posStrip.xPhi()) / m_pitch;
176}
double xPhi() const
position along phi direction:

◆ sensorCenter()

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

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

◆ setMother()

void InDetDD::SCT_ModuleSideDesign::setMother ( SCT_ModuleSideDesign * mother)
inherited

Definition at line 109 of file SCT_ModuleSideDesign.cxx.

109 {
110 if(m_motherDesign){
111 const std::string errMsg=std::string("SCT_ModuleSideDesign already has a mother set!");
112 throw std::runtime_error(errMsg);
113 }
114 m_motherDesign = mother;
115
116 }

◆ setSymmetry()

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

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
virtualinherited

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}

◆ shift()

int InDetDD::SCT_ModuleSideDesign::shift ( ) const
inlineinherited

number of edge strips before first readout strip.

Definition at line 232 of file SCT_ModuleSideDesign.h.

232 {
233 return m_scheme.shift();
234}

◆ sinStripAngleReco()

double InDetDD::SiDetectorDesign::sinStripAngleReco ( double phiCoord,
double etaCoord ) const
inlinevirtualinherited

Give strip angle in the reco frame.

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

Definition at line 132 of file SiDetectorDesign.h.

132 {
133 return 0.0; // pixel and barrel strip sensors always zero
134 }

◆ strip()

int InDetDD::StripBoxDesign::strip ( int stripId1Dim) const
inlineoverridevirtual

Reimplemented from InDetDD::SCT_ModuleSideDesign.

Definition at line 220 of file StripBoxDesign.h.

220 {
221 return stripId1Dim % m_nStrips;
222}

◆ strip1Dim()

int InDetDD::StripBoxDesign::strip1Dim ( int strip,
int row ) const
overridevirtual

only relevant for SCT.

Return strip1Dim(int strip, int row) if SCT; otherwise -1

Reimplemented from InDetDD::SCT_ModuleSideDesign.

Definition at line 58 of file StripBoxDesign.cxx.

58 {
59 return m_nStrips * row + strip;
60}

◆ stripLength()

double InDetDD::StripBoxDesign::stripLength ( const SiCellId & cellId) const

◆ stripPitch() [1/3]

double InDetDD::StripBoxDesign::stripPitch ( ) const
inlineoverridevirtual

give the strip pitch (For Forward returns pitch at center)

Implements InDetDD::SCT_ModuleSideDesign.

Definition at line 188 of file StripBoxDesign.h.

188 {
189 return m_pitch;
190}

◆ stripPitch() [2/3]

double InDetDD::StripBoxDesign::stripPitch ( const SiCellId & cellId) const
inline

Definition at line 184 of file StripBoxDesign.h.

184 {
185 return m_pitch;
186}

◆ stripPitch() [3/3]

double InDetDD::StripBoxDesign::stripPitch ( const SiLocalPosition & chargePos) const
inlineoverridevirtual

give the strip pitch (dependence on position needed for forward)

Implements InDetDD::SCT_ModuleSideDesign.

Definition at line 180 of file StripBoxDesign.h.

180 {
181 return m_pitch;
182}

◆ swapHitEtaReadoutDirection()

bool InDetDD::StripBoxDesign::swapHitEtaReadoutDirection ( ) const
overridevirtual

Reimplemented from InDetDD::SCT_ModuleSideDesign.

Definition at line 245 of file StripBoxDesign.h.

245 {
246 return false;
247}

◆ swapHitPhiReadoutDirection()

bool InDetDD::StripBoxDesign::swapHitPhiReadoutDirection ( ) const
overridevirtual

Return true if hit local direction is the same as readout direction.

Reimplemented from InDetDD::SCT_ModuleSideDesign.

Definition at line 241 of file StripBoxDesign.h.

241 {
242 return false;
243}

◆ thickness()

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

Method which returns thickness of the silicon wafer.

Definition at line 271 of file DetectorDesign.h.

271 {
272 return m_thickness;
273}

◆ type()

InDetDD::DetectorType InDetDD::StripBoxDesign::type ( ) const
inlinefinaloverridevirtual

Type of element.

Reimplemented from InDetDD::DetectorDesign.

Definition at line 224 of file StripBoxDesign.h.

224 {
225 return m_detectorType;
226}

◆ width()

double InDetDD::StripBoxDesign::width ( ) const
overridevirtual

Method to calculate average width of a module.

Implements InDetDD::DetectorDesign.

Definition at line 213 of file StripBoxDesign.cxx.

213 {
214 return m_pitch * m_nStrips;
215}

Member Data Documentation

◆ m_bounds

Trk::RectangleBounds InDetDD::StripBoxDesign::m_bounds
private

Definition at line 163 of file StripBoxDesign.h.

◆ m_carrierType

InDetDD::CarrierType InDetDD::DetectorDesign::m_carrierType
privateinherited

Definition at line 240 of file DetectorDesign.h.

◆ m_childDesigns

std::map<int, const SCT_ModuleSideDesign *> InDetDD::SCT_ModuleSideDesign::m_childDesigns
privateinherited

Definition at line 210 of file SCT_ModuleSideDesign.h.

◆ m_depthAxis

Axis InDetDD::DetectorDesign::m_depthAxis
privateinherited

Definition at line 238 of file DetectorDesign.h.

◆ m_depthSymmetric

bool InDetDD::DetectorDesign::m_depthSymmetric
privateinherited

Definition at line 244 of file DetectorDesign.h.

◆ m_detectorType

InDetDD::DetectorType InDetDD::SCT_ModuleSideDesign::m_detectorType {Undefined}
protectedinherited

Definition at line 197 of file SCT_ModuleSideDesign.h.

197{Undefined};

◆ m_etaAxis

Axis InDetDD::DetectorDesign::m_etaAxis
privateinherited

Definition at line 236 of file DetectorDesign.h.

◆ m_etaSymmetric

bool InDetDD::DetectorDesign::m_etaSymmetric
privateinherited

Definition at line 243 of file DetectorDesign.h.

◆ m_length

double InDetDD::StripBoxDesign::m_length
private

Definition at line 161 of file StripBoxDesign.h.

◆ m_motherDesign

const SCT_ModuleSideDesign* InDetDD::SCT_ModuleSideDesign::m_motherDesign {nullptr}
privateinherited

Definition at line 208 of file SCT_ModuleSideDesign.h.

208{nullptr};

◆ m_nRows

int InDetDD::StripBoxDesign::m_nRows
private

Definition at line 158 of file StripBoxDesign.h.

◆ m_nStrips

int InDetDD::StripBoxDesign::m_nStrips
private

Definition at line 159 of file StripBoxDesign.h.

◆ m_phiAxis

Axis InDetDD::DetectorDesign::m_phiAxis
privateinherited

Definition at line 237 of file DetectorDesign.h.

◆ m_phiSymmetric

bool InDetDD::DetectorDesign::m_phiSymmetric
privateinherited

Definition at line 242 of file DetectorDesign.h.

◆ m_pitch

double InDetDD::StripBoxDesign::m_pitch
private

Definition at line 160 of file StripBoxDesign.h.

◆ m_readoutSidePosDepth

bool InDetDD::DetectorDesign::m_readoutSidePosDepth
privateinherited

Definition at line 246 of file DetectorDesign.h.

◆ m_scheme

SCT_ReadoutScheme InDetDD::SCT_ModuleSideDesign::m_scheme
protectedinherited

Definition at line 196 of file SCT_ModuleSideDesign.h.

◆ m_swapStripReadout

bool InDetDD::SCT_ModuleSideDesign::m_swapStripReadout
privateinherited

Definition at line 204 of file SCT_ModuleSideDesign.h.

◆ m_thickness

double InDetDD::DetectorDesign::m_thickness
privateinherited

Definition at line 239 of file DetectorDesign.h.

◆ m_zShift

double InDetDD::StripBoxDesign::m_zShift
private

Definition at line 162 of file StripBoxDesign.h.


The documentation for this class was generated from the following files: