ATLAS Offline Software
Public Types | Public Member Functions | Protected Attributes | Private Attributes | List of all members
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. More...
 
virtual int strip1Dim (int strip, int row) const override
 only relevant for SCT. More...
 
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) More...
 
virtual bool inActiveArea (const SiLocalPosition &chargePos, bool checkBondGap=true) const override
 check if the position is in active area More...
 
virtual const Trk::SurfaceBoundsbounds () const override
 Element boundary. More...
 
virtual std::pair< SiLocalPosition, SiLocalPositionendsOfStrip (const SiLocalPosition &position) const override
 Give end points of the strip that covers the given position. More...
 
virtual double stripPitch (const SiLocalPosition &localPosition) const override
 give the strip pitch (dependence on position needed for forward)
More...
 
double stripPitch (const SiCellId &cellId) const
 
virtual double stripPitch () const override
 give the strip pitch (For Forward returns pitch at center) More...
 
virtual double phiPitch (const SiLocalPosition &localPosition) const override
 Pitch in phi direction. More...
 
double phiPitch (const SiCellId &cellId) const
 
virtual double phiPitch () const override
 Pitch in phi direction. More...
 
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 More...
 
virtual SiDiodesParameters parameters (const SiCellId &cellId) const override
 Return strip width, centre, length etc. Hard to find if this is used or not. More...
 
virtual SiLocalPosition localPositionOfCell (const SiCellId &cellId) const override
 id -> position More...
 
virtual SiLocalPosition localPositionOfCluster (const SiCellId &cellId, int clusterSize) const override
 
virtual SiCellId cellIdOfPosition (const SiLocalPosition &localPos) const override
 position -> id More...
 
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. More...
 
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. More...
 
virtual SiCellId cellIdInRange (const SiCellId &) const override
 DEPRECATED: only used in a stupid example (2014) Check if cell is in range. More...
 
virtual SiReadoutCellId readoutIdOfCell (const SiCellId &cellId) const override
 diode id -> readout id More...
 
virtual const Amg::Transform3D moduleShift () const override final
 
virtual InDetDD::DetectorType type () const override final
 Type of element. More...
 
virtual HepGeom::Vector3D< double > phiMeasureSegment (const SiLocalPosition &position) const override
 Helper method for stereo angle computation, DEPRECATED. More...
 
virtual double length () const override
 Method to calculate length of a module. More...
 
virtual double width () const override
 Method to calculate average width of a module. More...
 
virtual double minWidth () const override
 Method to calculate minimum width of a module. More...
 
virtual double maxWidth () const override
 Method to calculate maximum width of a module. More...
 
virtual double etaPitch () const override
 
virtual bool swapHitPhiReadoutDirection () const override
 Return true if hit local direction is the same as readout direction. More...
 
virtual bool swapHitEtaReadoutDirection () const override
 
virtual bool nearBondGap (const SiLocalPosition &, double) const override
 Test if near bond gap within tolerances, only relevant for SCT. More...
 
double pitch (const SiCellId &cellId) const
 
double stripLength (const SiCellId &cellId) const
 
virtual double deadAreaUpperBoundary () const override
 DEPRECATED for StripBoxDesign; no dead area. More...
 
virtual double deadAreaLowerBoundary () const override
 give lower boundary of dead area More...
 
virtual double deadAreaLength () const override
 give length of dead area More...
 
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. More...
 
virtual SiCellId connectedCell (const SiReadoutCellId &readoutId, int number) const override
 readout id -> id of connected diodes. More...
 
virtual SiCellId gangedCell (const SiCellId &cellId) const override
 If cell is ganged return the other cell, otherwise return an invalid id. More...
 
virtual SiReadoutCellId readoutIdOfPosition (const SiLocalPosition &localPos) const override
 position -> id More...
 
int crystals () const
 number of crystals within module side: More...
 
int cells () const
 number of readout stips within module side: More...
 
int shift () const
 number of edge strips before first readout strip. More...
 
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. More...
 
virtual double sinStripAngleReco (double phiCoord, double etaCoord) const
 Give strip angle in the reco frame. More...
 
virtual Amg::Vector3D sensorCenter () const
 Return the centre of a sensor in the local reference frame. 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 DetectorShape shape () const
 Shape of element. More...
 

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.

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

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;
34  m_length = length;
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 }

◆ ~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  }

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

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

◆ 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);
96  if (strip < 0 || strip >= m_nStrips) {
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);
103  if (row < 0 || row >= m_nRows) {
104 
105  return {}; // return an invalid id
106  }
107  }
108  int strip1D = strip1Dim(strip, row);
109 
110  return {strip1D, 0};
111 }

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

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

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

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

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

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

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

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

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

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

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

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

Definition at line 60 of file DetectorDesign.cxx.

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

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

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

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.

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

◆ 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:
InDetDD::DetectorDesign::xAxis
@ xAxis
Definition: DetectorDesign.h:60
InDetDD::SCT_ReadoutScheme::cells
int cells() const
Definition: SCT_ReadoutScheme.h:123
InDetDD::DetectorDesign::m_etaSymmetric
bool m_etaSymmetric
Definition: DetectorDesign.h:243
Trk::RectangleBounds
Definition: RectangleBounds.h:38
InDetDD::StripBoxDesign::m_bounds
Trk::RectangleBounds m_bounds
Definition: StripBoxDesign.h:163
test_pyathena.eta
eta
Definition: test_pyathena.py:10
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::StripBoxDesign::cellIdOfPosition
virtual SiCellId cellIdOfPosition(const SiLocalPosition &localPos) const override
position -> id
Definition: StripBoxDesign.cxx:91
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
index
Definition: index.py:1
InDetDD::SCT_ModuleSideDesign::m_childDesigns
std::map< int, const SCT_ModuleSideDesign * > m_childDesigns
Definition: SCT_ModuleSideDesign.h:210
InDetDD::StripBoxDesign::m_nRows
int m_nRows
Definition: StripBoxDesign.h:158
InDetDD::StripBoxDesign::length
virtual double length() const override
Method to calculate length of a module.
Definition: StripBoxDesign.cxx:209
InDetDD::DetectorDesign::yAxis
@ yAxis
Definition: DetectorDesign.h:60
InDetDD::DetectorDesign::m_phiAxis
Axis m_phiAxis
Definition: DetectorDesign.h:237
InDetDD::StripBoxDesign::localPositionOfCell
virtual SiLocalPosition localPositionOfCell(const SiCellId &cellId) const override
id -> position
Definition: StripBoxDesign.cxx:113
InDetDD::SCT_ReadoutScheme::shift
int shift() const
Definition: SCT_ReadoutScheme.h:128
InDetDD::StripBoxDesign::m_pitch
double m_pitch
Definition: StripBoxDesign.h:160
InDetDD::DetectorDesign::readoutSide
int readoutSide() const
ReadoutSide.
Definition: DetectorDesign.h:291
InDetDD::DetectorDesign::m_etaAxis
Axis m_etaAxis
Definition: DetectorDesign.h:236
InDetDD::StripBoxDesign::width
virtual double width() const override
Method to calculate average width of a module.
Definition: StripBoxDesign.cxx:213
xAOD::phi
setEt phi
Definition: TrigEMCluster_v1.cxx:29
InDetDD::StripBoxDesign::m_length
double m_length
Definition: StripBoxDesign.h:161
InDetDD::SCT_ModuleSideDesign::m_detectorType
InDetDD::DetectorType m_detectorType
Definition: SCT_ModuleSideDesign.h:197
InDetDD::SCT_ModuleSideDesign::m_motherDesign
const SCT_ModuleSideDesign * m_motherDesign
Definition: SCT_ModuleSideDesign.h:208
InDetDD::SCT_ReadoutScheme::connectedCell
SiCellId connectedCell(const SiReadoutCellId &readoutId, int number) const
Definition: SCT_ReadoutScheme.h:141
InDetDD::StripBoxDesign::m_nStrips
int m_nStrips
Definition: StripBoxDesign.h:159
InDetDD::SCT_ReadoutScheme::numberOfConnectedCells
int numberOfConnectedCells(const SiReadoutCellId &readoutId) const
Definition: SCT_ReadoutScheme.h:133
InDetDD::SCT_ModuleSideDesign::m_scheme
SCT_ReadoutScheme m_scheme
Definition: SCT_ModuleSideDesign.h:196
xAOD::double
double
Definition: CompositeParticle_v1.cxx:159
InDetDD::SCT_ReadoutScheme::crystals
int crystals() const
Definition: SCT_ReadoutScheme.h:113
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.
InDetDD::StripBoxDesign::getStripRow
std::pair< int, int > getStripRow(SiCellId id) const final
Get the strip and row number of the cell.
Definition: StripBoxDesign.cxx:51
InDetDD::StripBoxDesign::row
virtual int row(int stripId1Dim) const override
Definition: StripBoxDesign.h:216
MuonGM::nStrips
int nStrips(const MuonGM::TgcReadoutElement &readoutEle, int layer)
Definition: MuonDetDescr/MuonGeoModelTest/src/GeoModelTgcTest.cxx:46
python.selection.number
number
Definition: selection.py:20
InDetDD::SCT_ModuleSideDesign::readoutIdOfCell
virtual SiReadoutCellId readoutIdOfCell(const SiCellId &cellId) const override
diode id -> readout id
Definition: SCT_ModuleSideDesign.h:251
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
InDetDD::StripBoxDesign::m_zShift
double m_zShift
Definition: StripBoxDesign.h:162
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
InDetDD::DetectorDesign::cellIdOfPosition
virtual SiCellId cellIdOfPosition(const SiLocalPosition &localPos) const =0
position -> id
InDetDD::StripBoxDesign::pitch
double pitch(const SiCellId &cellId) const
InDetDD::DetectorDesign::phiSymmetric
bool phiSymmetric() const
Definition: DetectorDesign.h:279
Amg::Translation3D
Eigen::Translation< double, 3 > Translation3D
Definition: GeoPrimitives.h:44
InDetDD::DetectorDesign::m_depthSymmetric
bool m_depthSymmetric
Definition: DetectorDesign.h:244
InDetDD::DetectorDesign::m_readoutSidePosDepth
bool m_readoutSidePosDepth
Definition: DetectorDesign.h:246
InDetDD::StripBoxDesign::strip
virtual int strip(int stripId1Dim) const override
Definition: StripBoxDesign.h:220
InDetDD::Box
@ Box
Definition: DetectorDesign.h:42
RPDUtils::nRows
unsigned constexpr int nRows
Definition: RPDUtils.h:24
InDetDD::StripBoxDesign::strip1Dim
virtual int strip1Dim(int strip, int row) const override
only relevant for SCT.
Definition: StripBoxDesign.cxx:58
InDetDD::SCT_ModuleSideDesign::SCT_ModuleSideDesign
SCT_ModuleSideDesign()
InDetDD::DetectorDesign::zAxis
@ zAxis
Definition: DetectorDesign.h:60