ATLAS Offline Software
PixelModuleDesign.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // PixelModuleDesign.h
8 // (c) ATLAS Pixel Detector software
10 
11 
12 #ifndef PIXELREADOUTGEOMETRY_PIXELMODULEDESIGN_H
13 #define PIXELREADOUTGEOMETRY_PIXELMODULEDESIGN_H
14 
15 // Base class
17 
18 // Data member classes
22 
23 // Other includes
27 
28 #include <memory>
29 
30 namespace Trk{
31  class SurfaceBounds;
32 }
33 
34 namespace InDetDD {
35 
36  class PixelDiodeMatrix;
37 
49 
51  // Public methods:
53  public:
54 
56  // Constructors/destructor:
58 
71  PixelModuleDesign(const double thickness,
72  const int circuitsPerColumn,
73  const int circuitsPerRow,
74  const int cellColumnsPerCircuit,
75  const int cellRowsPerCircuit,
76  const int diodeColumnsPerCircuit,
77  const int diodeRowsPerCircuit,
78  std::shared_ptr<const PixelDiodeMatrix> matrix,
80  int readoutSide = -1,
81  bool is3D=false,
83 
84 //Allow also setting of symmetry parameters
85 
86  PixelModuleDesign(const double thickness,
87  const bool phiSymmetric,
88  const bool etaSymmetric,
89  const bool depthSymmetric,
90  const int circuitsPerColumn,
91  const int circuitsPerRow,
92  const int cellColumnsPerCircuit,
93  const int cellRowsPerCircuit,
94  const int diodeColumnsPerCircuit,
95  const int diodeRowsPerCircuit,
96  std::shared_ptr<const PixelDiodeMatrix> matrix,
98  int readoutSide = -1,
99  bool is3D=false,
101 
102  // Destructor:
103  virtual ~PixelModuleDesign() = default;
104 
106  // Const methods:
108 
112  virtual void distanceToDetectorEdge(const SiLocalPosition & localPosition,
113  double & etaDist, double & phiDist) const;
114 
116  virtual SiDiodesParameters parameters(const SiCellId & cellId) const;
117  virtual SiLocalPosition localPositionOfCell(const SiCellId & cellId) const;
118 
120  virtual int numberOfConnectedCells(const SiReadoutCellId & readoutId) const;
121  virtual SiCellId connectedCell(const SiReadoutCellId & readoutId, int number) const;
122 
124  virtual SiCellId gangedCell(const SiCellId & cellId) const;
125 
127  virtual SiReadoutCellId readoutIdOfCell(const SiCellId & cellId) const;
128 
130  virtual SiReadoutCellId readoutIdOfPosition(const SiLocalPosition & localPos) const;
131  virtual SiCellId cellIdOfPosition(const SiLocalPosition & localPos) const;
132 
134  virtual SiCellId cellIdInRange(const SiCellId & cellId) const;
135 
137  virtual HepGeom::Vector3D<double> phiMeasureSegment(const SiLocalPosition&) const;
138 
140  virtual std::pair<SiLocalPosition,SiLocalPosition> endsOfStrip(const SiLocalPosition &position) const;
141 
146  SiLocalPosition positionFromColumnRow(const int column, const int row) const;
147 
151  virtual void neighboursOfCell(const SiCellId & cellId,
152  std::vector<SiCellId> &neighbours) const;
153 
158  double intersectionLength(const SiCellId &diode1, const SiCellId &diode2) const;
159 
161  double sensorLeftColumn() const;
162  double sensorRightColumn() const;
163  double sensorLeftRow() const;
164  double sensorRightRow() const;
165 
167  int numberOfDiodes() const;
168 
170  int numberOfCircuits() const;
171 
173  int numberOfCircuitsPerColumn() const;
174 
176  int numberOfCircuitsPerRow() const;
177 
179  int columnsPerCircuit() const;
180 
182  int rowsPerCircuit() const;
183 
185  int columns() const;
186 
188  int rows() const;
189 
191  virtual double length() const;
192 
194  virtual double width() const;
195 
197  virtual double minWidth() const;
198 
200  virtual double maxWidth() const;
201 
203  virtual double phiPitch() const;
204 
206  virtual double phiPitch(const SiLocalPosition & localPosition) const;
207 
209  virtual double etaPitch() const;
210 
212  double widthFromColumnRange(const int colMin, const int colMax) const;
213 
215  double widthFromRowRange(const int rowMin, const int rowMax) const;
216 
219  virtual bool nearBondGap(const SiLocalPosition & localPosition, double etaTol) const;
220 
222  virtual bool swapHitPhiReadoutDirection() const;
223  virtual bool swapHitEtaReadoutDirection() const;
224 
226  virtual const Trk::SurfaceBounds & bounds() const;
227 
228  virtual bool is3D() const;
229 
231 
232  virtual DetectorType type() const final;
233 
235  // Non-const methods:
237 
238 
243  void addMultipleRowConnection(const int lowerRow,
244  const std::vector<int> &connections);
245 
248  void setGeneralLayout();
249 
251  std::string debugStringRepr() const;
252 
253 
255  // Private methods:
257  private:
258 
260 
261  // Copy constructor:
263 
264  // Assignment operator:
266 
267 
269  // Private data:
271  private:
274  CxxUtils::CachedUniquePtr<Trk::RectangleBounds> m_bounds;
275  bool m_is3D;
277 
278  };
279 
281  // Inline methods:
283 
285  const std::vector<int> &connections)
286  {
287  m_readoutScheme.addMultipleRowConnection(lowerRow,connections);
288  }
289 
291  {
292  return m_diodeMap.leftColumn();
293  }
294 
296  {
297  return m_diodeMap.rightColumn();
298  }
299 
300  inline double PixelModuleDesign::sensorLeftRow() const
301  {
302  return m_diodeMap.leftRow();
303  }
304 
305  inline double PixelModuleDesign::sensorRightRow() const
306  {
307  return m_diodeMap.rightRow();
308  }
309 
311  {
312  return m_diodeMap.diodes();
313  }
314 
316  {
318  }
319 
321  {
323  }
324 
326  {
328  }
329 
331  {
333  }
334 
336  {
338  }
339 
340  inline int PixelModuleDesign::columns() const
341  {
342  return m_readoutScheme.columns();
343  }
344 
345  inline int PixelModuleDesign::rows() const
346  {
347  return m_readoutScheme.rows();
348  }
349 
350  inline bool PixelModuleDesign::nearBondGap(const SiLocalPosition &, double) const
351  {
352  // No bond gap in pixel module
353  return false;
354  }
355 
357  {
358  return true;
359  }
360 
362  {
363  return true;
364  }
365 
366 
367  inline void PixelModuleDesign::neighboursOfCell(const SiCellId & cellId,
368  std::vector<SiCellId> &neighbours) const
369  {
370  return m_diodeMap.neighboursOfCell(cellId, neighbours);
371  }
372 
373  inline double PixelModuleDesign::intersectionLength(const SiCellId &diode1,
374  const SiCellId &diode2) const
375  {
376  return m_diodeMap.intersectionLength(diode1, diode2);
377  }
378 
379 
380 
381  inline bool PixelModuleDesign::is3D() const
382  {
383  return m_is3D;
384  }
385 
391  {
393  }
394 
395  const int maxRow = m_readoutScheme.rowsPerCircuit();
396  const int maxCol = m_readoutScheme.columnsPerCircuit();
397  if (maxRow*maxCol>26000) { return PixelReadoutTechnology::FEI4; }
398  else { return PixelReadoutTechnology::FEI3; }
399  }
400 
401  inline std::string PixelModuleDesign::debugStringRepr() const
402  {
403  return m_diodeMap.debugStringRepr();
404  }
405 
406 } // namespace InDetDD
407 
408 #endif // READOUTGEOMETRYBASE_PIXELMODULEDESIGN_H
InDetDD::PixelModuleDesign::m_diodeMap
PixelDiodeMap m_diodeMap
Definition: PixelModuleDesign.h:272
PixelID.h
This is an Identifier helper class for the Pixel subdetector. This class is a factory for creating co...
query_example.row
row
Definition: query_example.py:24
InDetDD::PixelReadoutScheme::rowsPerCircuit
int rowsPerCircuit() const
number of cell rows per circuit:
Definition: PixelReadoutScheme.h:159
InDetDD::PixelReadoutScheme::columns
int columns() const
number of cell columns per module:
Definition: PixelReadoutScheme.h:164
InDetDD::DetectorDesign::depthSymmetric
bool depthSymmetric() const
Definition: DetectorDesign.h:287
InDetDD::PixelReadoutTechnology
PixelReadoutTechnology
Definition: PixelReadoutDefinitions.h:34
InDetDD::DetectorDesign::thickness
double thickness() const
Method which returns thickness of the silicon wafer.
Definition: DetectorDesign.h:271
InDetDD::PLR
@ PLR
Definition: DetectorDesign.h:46
InDetDD::DetectorDesign::etaSymmetric
bool etaSymmetric() const
Definition: DetectorDesign.h:283
InDetDD::PixelDiodeMap::diodes
int diodes() const
Definition: PixelDiodeMap.h:174
InDetDD::PixelDiodeMap::intersectionLength
double intersectionLength(const SiCellId &diode1, const SiCellId &diode2) const
Compute the intersection length of two diodes: return: the intersection length when the two diodes ar...
Definition: PixelDiodeMap.cxx:218
InDetDD::PixelModuleDesign::width
virtual double width() const
Method to calculate average width of a module.
Definition: PixelModuleDesign.cxx:136
RectangleBounds.h
InDetDD::PixelModuleDesign::widthFromRowRange
double widthFromRowRange(const int rowMin, const int rowMax) const
Method to calculate phi width from a row range.
Definition: PixelModuleDesign.cxx:167
InDetDD::PixelModuleDesign
Definition: PixelModuleDesign.h:48
CxxUtils::CachedUniquePtr
CachedUniquePtrT< const T > CachedUniquePtr
Definition: CachedUniquePtr.h:114
InDetDD::PixelDiodeMap::debugStringRepr
std::string debugStringRepr() const
Debug representation.
Definition: PixelDiodeMap.h:197
InDetDD::PixelModuleDesign::columns
int columns() const
Number of cell columns per module:
Definition: PixelModuleDesign.h:340
Trk::SurfaceBounds
Definition: SurfaceBounds.h:47
InDetDD::PixelModuleDesign::intersectionLength
double intersectionLength(const SiCellId &diode1, const SiCellId &diode2) const
Compute the intersection length of two diodes: return: the intersection length when the two diodes ar...
Definition: PixelModuleDesign.h:373
InDetDD::PixelModuleDesign::rows
int rows() const
Number of cell rows per module:
Definition: PixelModuleDesign.h:345
InDetDD::PixelModuleDesign::cellIdInRange
virtual SiCellId cellIdInRange(const SiCellId &cellId) const
Check if cell is in range.
Definition: PixelModuleDesign.cxx:265
InDetDD::PixelModuleDesign::connectedCell
virtual SiCellId connectedCell(const SiReadoutCellId &readoutId, int number) const
readout id -> id of connected diodes.
Definition: PixelModuleDesign.cxx:214
InDetDD::PixelModuleDesign::sensorRightRow
double sensorRightRow() const
Definition: PixelModuleDesign.h:305
DeMoUpdate.column
dictionary column
Definition: DeMoUpdate.py:1110
InDetDD::DetectorDesign::readoutSide
int readoutSide() const
ReadoutSide.
Definition: DetectorDesign.h:291
InDetDD::PixelReadoutTechnology::FEI3
@ FEI3
InDetDD::DetectorDesign::carrierType
InDetDD::CarrierType carrierType() const
Return carrier type (ie electrons or holes)
Definition: DetectorDesign.h:275
InDetDD::PixelDiodeMap
Definition: PixelDiodeMap.h:43
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
InDetDD::PixelReadoutScheme::numberOfCircuitsPerColumn
int numberOfCircuitsPerColumn() const
number of circuits per column:
Definition: PixelReadoutScheme.h:144
InDetDD::PixelReadoutScheme
Definition: PixelReadoutScheme.h:35
InDetDD::PixelModuleDesign::swapHitPhiReadoutDirection
virtual bool swapHitPhiReadoutDirection() const
Return true if hit local direction is the same as readout direction.
Definition: PixelModuleDesign.h:356
InDetDD::PixelInclined
@ PixelInclined
Definition: DetectorDesign.h:46
InDetDD::PixelModuleDesign::etaPitch
virtual double etaPitch() const
Pitch in eta direction.
Definition: PixelModuleDesign.cxx:196
PixelReadoutScheme.h
InDetDD::PixelReadoutScheme::columnsPerCircuit
int columnsPerCircuit() const
number of cell columns per circuit:
Definition: PixelReadoutScheme.h:154
InDetDD::PixelModuleDesign::bounds
virtual const Trk::SurfaceBounds & bounds() const
Element boundary.
Definition: PixelModuleDesign.cxx:249
InDetDD::PixelEndcap
@ PixelEndcap
Definition: DetectorDesign.h:46
InDetDD::PixelModuleDesign::length
virtual double length() const
Method to calculate length of a module.
Definition: PixelModuleDesign.cxx:130
InDetDD::PixelReadoutScheme::numberOfCircuitsPerRow
int numberOfCircuitsPerRow() const
number of circuits per row:
Definition: PixelReadoutScheme.h:149
InDetDD::PixelReadoutTechnology::RD53
@ RD53
InDetDD::SiLocalPosition
Definition: SiLocalPosition.h:31
InDetDD::PixelModuleDesign::positionFromColumnRow
SiLocalPosition positionFromColumnRow(const int column, const int row) const
Given row and column index of a diode, return position of diode center ALTERNATIVE/PREFERED way is to...
Definition: PixelModuleDesign.cxx:242
InDetDD::PixelModuleDesign::debugStringRepr
std::string debugStringRepr() const
Debug string representation.
Definition: PixelModuleDesign.h:401
InDetDD::PixelModuleDesign::phiPitch
virtual double phiPitch() const
Pitch in phi direction.
Definition: PixelModuleDesign.cxx:180
InDetDD::PixelModuleDesign::nearBondGap
virtual bool nearBondGap(const SiLocalPosition &localPosition, double etaTol) const
Test if near bond gap within tolerances Only relevant for SCT.
Definition: PixelModuleDesign.h:350
InDetDD::PixelModuleDesign::m_is3D
bool m_is3D
Definition: PixelModuleDesign.h:275
InDetDD::PixelModuleDesign::widthFromColumnRange
double widthFromColumnRange(const int colMin, const int colMax) const
Method to calculate eta width from a column range.
Definition: PixelModuleDesign.cxx:155
InDetDD::DetectorType
DetectorType
Definition: DetectorDesign.h:45
InDetDD::PixelDiodeMap::rightColumn
double rightColumn() const
Definition: PixelDiodeMap.h:159
InDetDD::PixelModuleDesign::m_detectorType
InDetDD::DetectorType m_detectorType
Definition: PixelModuleDesign.h:276
InDetDD::PixelModuleDesign::numberOfCircuitsPerColumn
int numberOfCircuitsPerColumn() const
Number of circuits per column:
Definition: PixelModuleDesign.h:320
vector
Definition: MultiHisto.h:13
InDetDD::PixelModuleDesign::numberOfCircuits
int numberOfCircuits() const
Total number of circuits:
Definition: PixelModuleDesign.h:315
InDetDD::PixelModuleDesign::distanceToDetectorEdge
virtual void distanceToDetectorEdge(const SiLocalPosition &localPosition, double &etaDist, double &phiDist) const
Returns distance to nearest detector active edge +ve = inside -ve = outside.
Definition: PixelModuleDesign.cxx:84
CxxUtils
Definition: aligned_vector.h:29
CachedUniquePtr.h
Cached unique_ptr with atomic update.
InDetDD::PixelModuleDesign::localPositionOfCell
virtual SiLocalPosition localPositionOfCell(const SiCellId &cellId) const
readout or diode id -> position.
Definition: PixelModuleDesign.cxx:108
InDetDD::PixelModuleDesign::swapHitEtaReadoutDirection
virtual bool swapHitEtaReadoutDirection() const
Definition: PixelModuleDesign.h:361
InDetDD::PixelModuleDesign::readoutIdOfPosition
virtual SiReadoutCellId readoutIdOfPosition(const SiLocalPosition &localPos) const
position -> id
Definition: PixelModuleDesign.cxx:233
InDetDD::PixelModuleDesign::m_bounds
CxxUtils::CachedUniquePtr< Trk::RectangleBounds > m_bounds
Definition: PixelModuleDesign.h:274
InDetDD::PixelModuleDesign::phiMeasureSegment
virtual HepGeom::Vector3D< double > phiMeasureSegment(const SiLocalPosition &) const
Helper method for stereo angle computation.
Definition: PixelModuleDesign.cxx:115
InDetDD::PixelDiodeMap::rightRow
double rightRow() const
Definition: PixelDiodeMap.h:169
PixelDiodeMap.h
InDetDD::PixelModuleDesign::numberOfDiodes
int numberOfDiodes() const
Total number of diodes:
Definition: PixelModuleDesign.h:310
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
InDetDD::PixelModuleDesign::numberOfCircuitsPerRow
int numberOfCircuitsPerRow() const
Number of circuits per row:
Definition: PixelModuleDesign.h:325
InDetDD::PixelModuleDesign::numberOfConnectedCells
virtual int numberOfConnectedCells(const SiReadoutCellId &readoutId) const
readout id -> id of connected diodes
Definition: PixelModuleDesign.cxx:208
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
python.selection.number
number
Definition: selection.py:20
InDetDD::PixelReadoutScheme::addMultipleRowConnection
void addMultipleRowConnection(const int lowerRow, const std::vector< int > &connections)
Add a new multiple connection for rows: lower diode row for which the connection scheme is given vect...
Definition: PixelReadoutScheme.cxx:102
InDetDD::PixelBarrel
@ PixelBarrel
Definition: DetectorDesign.h:46
InDetDD::PixelReadoutTechnology::FEI4
@ FEI4
InDetDD::PixelModuleDesign::getReadoutTechnology
PixelReadoutTechnology getReadoutTechnology() const
Definition: PixelModuleDesign.h:386
InDetDD::SiCellId
Definition: SiCellId.h:29
InDetDD::PixelDiodeMap::leftColumn
double leftColumn() const
Definition: PixelDiodeMap.h:154
InDetDD::PixelModuleDesign::gangedCell
virtual SiCellId gangedCell(const SiCellId &cellId) const
If cell is ganged return the other cell, otherwise return an invalid id.
Definition: PixelModuleDesign.cxx:220
python.testIfMatch.matrix
matrix
Definition: testIfMatch.py:66
PixelReadoutDefinitions.h
InDetDD::PixelModuleDesign::is3D
virtual bool is3D() const
Definition: PixelModuleDesign.h:381
InDetDD::CarrierType
CarrierType
Definition: InDetDD_Defs.h:17
InDetDD::PixelModuleDesign::rowsPerCircuit
int rowsPerCircuit() const
Number of cell rows per circuit:
Definition: PixelModuleDesign.h:335
InDetDD::PixelModuleDesign::m_readoutScheme
PixelReadoutScheme m_readoutScheme
Definition: PixelModuleDesign.h:273
InDetDD
Message Stream Member.
Definition: FakeTrackBuilder.h:8
InDetDD::PixelModuleDesign::parameters
virtual SiDiodesParameters parameters(const SiCellId &cellId) const
readout or diode id -> position, size
Definition: PixelModuleDesign.cxx:103
InDetDD::DetectorDesign::phiSymmetric
bool phiSymmetric() const
Definition: DetectorDesign.h:279
InDetDD::PixelModuleDesign::setGeneralLayout
void setGeneralLayout()
Indicate that it is a more complex layout where cells are not lined up with each other.
Definition: PixelModuleDesign.cxx:259
InDetDD::PixelModuleDesign::addMultipleRowConnection
void addMultipleRowConnection(const int lowerRow, const std::vector< int > &connections)
Add a new multiple connection for rows: lower diode row for which the connection scheme is given vect...
Definition: PixelModuleDesign.h:284
InDetDD::PixelReadoutScheme::rows
int rows() const
number of cell rows per module:
Definition: PixelReadoutScheme.h:169
InDetDD::PixelDiodeMap::neighboursOfCell
void neighboursOfCell(const SiCellId &cellId, std::vector< SiCellId > &neighbours) const
Get the neighbouring PixelDiodes of a given PixelDiode: Cell for which the neighbours must be found L...
Definition: PixelDiodeMap.cxx:107
InDetDD::PixelModuleDesign::sensorRightColumn
double sensorRightColumn() const
Definition: PixelModuleDesign.h:295
InDetDD::PixelModuleDesign::~PixelModuleDesign
virtual ~PixelModuleDesign()=default
InDetDD::PixelModuleDesign::cellIdOfPosition
virtual SiCellId cellIdOfPosition(const SiLocalPosition &localPos) const
position -> id
Definition: PixelModuleDesign.cxx:202
InDetDD::PixelModuleDesign::neighboursOfCell
virtual void neighboursOfCell(const SiCellId &cellId, std::vector< SiCellId > &neighbours) const
Get the neighbouring diodes of a given diode: Cell for which the neighbours must be found List of cel...
Definition: PixelModuleDesign.h:367
InDetDD::PixelModuleDesign::PixelModuleDesign
PixelModuleDesign()
InDetDD::PixelModuleDesign::readoutIdOfCell
virtual SiReadoutCellId readoutIdOfCell(const SiCellId &cellId) const
diode id -> readout id
Definition: PixelModuleDesign.cxx:226
InDetDD::Undefined
@ Undefined
Definition: DetectorDesign.h:46
InDetDD::SiReadoutCellId
Definition: SiReadoutCellId.h:42
InDetDD::PixelModuleDesign::sensorLeftRow
double sensorLeftRow() const
Definition: PixelModuleDesign.h:300
InDetDD::SiDetectorDesign
Definition: SiDetectorDesign.h:50
InDetDD::PixelModuleDesign::minWidth
virtual double minWidth() const
Method to calculate minimum width of a module.
Definition: PixelModuleDesign.cxx:142
InDetDD::PixelModuleDesign::endsOfStrip
virtual std::pair< SiLocalPosition, SiLocalPosition > endsOfStrip(const SiLocalPosition &position) const
Special method for SCT (irrelevant here):
Definition: PixelModuleDesign.cxx:123
InDetDD::PixelReadoutScheme::numberOfCircuits
int numberOfCircuits() const
total number of circuits:
Definition: PixelReadoutScheme.h:139
InDetDD::PixelModuleDesign::maxWidth
virtual double maxWidth() const
Method to calculate maximum width of a module.
Definition: PixelModuleDesign.cxx:148
InDetDD::PixelModuleDesign::columnsPerCircuit
int columnsPerCircuit() const
Number of cell columns per circuit:
Definition: PixelModuleDesign.h:330
InDetDD::PixelDiodeMap::leftRow
double leftRow() const
Definition: PixelDiodeMap.h:164
SiDetectorDesign.h
InDetDD::PixelModuleDesign::type
virtual DetectorType type() const final
Type of element.
Definition: PixelModuleDesign.cxx:270
InDetDD::SiDiodesParameters
Definition: SiDiodesParameters.h:25
InDetDD::PixelModuleDesign::sensorLeftColumn
double sensorLeftColumn() const
Global sensor size:
Definition: PixelModuleDesign.h:290