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  // Destructor:
85  virtual ~PixelModuleDesign() = default;
86 
88  // Const methods:
90 
94  virtual void distanceToDetectorEdge(const SiLocalPosition & localPosition,
95  double & etaDist, double & phiDist) const;
96 
98  virtual SiDiodesParameters parameters(const SiCellId & cellId) const;
99  virtual SiLocalPosition localPositionOfCell(const SiCellId & cellId) const;
100 
102  virtual int numberOfConnectedCells(const SiReadoutCellId & readoutId) const;
103  virtual SiCellId connectedCell(const SiReadoutCellId & readoutId, int number) const;
104 
106  virtual SiCellId gangedCell(const SiCellId & cellId) const;
107 
109  virtual SiReadoutCellId readoutIdOfCell(const SiCellId & cellId) const;
110 
112  virtual SiReadoutCellId readoutIdOfPosition(const SiLocalPosition & localPos) const;
113  virtual SiCellId cellIdOfPosition(const SiLocalPosition & localPos) const;
114 
116  virtual SiCellId cellIdInRange(const SiCellId & cellId) const;
117 
119  virtual HepGeom::Vector3D<double> phiMeasureSegment(const SiLocalPosition&) const;
120 
122  virtual std::pair<SiLocalPosition,SiLocalPosition> endsOfStrip(const SiLocalPosition &position) const;
123 
128  SiLocalPosition positionFromColumnRow(const int column, const int row) const;
129 
133  virtual void neighboursOfCell(const SiCellId & cellId,
134  std::vector<SiCellId> &neighbours) const;
135 
140  double intersectionLength(const SiCellId &diode1, const SiCellId &diode2) const;
141 
143  double sensorLeftColumn() const;
144  double sensorRightColumn() const;
145  double sensorLeftRow() const;
146  double sensorRightRow() const;
147 
149  int numberOfDiodes() const;
150 
152  int numberOfCircuits() const;
153 
155  int numberOfCircuitsPerColumn() const;
156 
158  int numberOfCircuitsPerRow() const;
159 
161  int columnsPerCircuit() const;
162 
164  int rowsPerCircuit() const;
165 
167  int columns() const;
168 
170  int rows() const;
171 
173  virtual double length() const;
174 
176  virtual double width() const;
177 
179  virtual double minWidth() const;
180 
182  virtual double maxWidth() const;
183 
185  virtual double phiPitch() const;
186 
188  virtual double phiPitch(const SiLocalPosition & localPosition) const;
189 
191  virtual double etaPitch() const;
192 
194  double widthFromColumnRange(const int colMin, const int colMax) const;
195 
197  double widthFromRowRange(const int rowMin, const int rowMax) const;
198 
201  virtual bool nearBondGap(const SiLocalPosition & localPosition, double etaTol) const;
202 
204  virtual bool swapHitPhiReadoutDirection() const;
205  virtual bool swapHitEtaReadoutDirection() const;
206 
208  virtual const Trk::SurfaceBounds & bounds() const;
209 
210  virtual bool is3D() const;
211 
213 
214  virtual DetectorType type() const final;
215 
217  // Non-const methods:
219 
220 
225  void addMultipleRowConnection(const int lowerRow,
226  const std::vector<int> &connections);
227 
230  void setGeneralLayout();
231 
233  std::string debugStringRepr() const;
234 
235 
237  // Private methods:
239  private:
240 
242 
243  // Copy constructor:
245 
246  // Assignment operator:
248 
249 
251  // Private data:
253  private:
256  CxxUtils::CachedUniquePtr<Trk::RectangleBounds> m_bounds;
257  bool m_is3D;
259 
260  };
261 
263  // Inline methods:
265 
267  const std::vector<int> &connections)
268  {
269  m_readoutScheme.addMultipleRowConnection(lowerRow,connections);
270  }
271 
273  {
274  return m_diodeMap.leftColumn();
275  }
276 
278  {
279  return m_diodeMap.rightColumn();
280  }
281 
282  inline double PixelModuleDesign::sensorLeftRow() const
283  {
284  return m_diodeMap.leftRow();
285  }
286 
287  inline double PixelModuleDesign::sensorRightRow() const
288  {
289  return m_diodeMap.rightRow();
290  }
291 
293  {
294  return m_diodeMap.diodes();
295  }
296 
298  {
300  }
301 
303  {
305  }
306 
308  {
310  }
311 
313  {
315  }
316 
318  {
320  }
321 
322  inline int PixelModuleDesign::columns() const
323  {
324  return m_readoutScheme.columns();
325  }
326 
327  inline int PixelModuleDesign::rows() const
328  {
329  return m_readoutScheme.rows();
330  }
331 
332  inline bool PixelModuleDesign::nearBondGap(const SiLocalPosition &, double) const
333  {
334  // No bond gap in pixel module
335  return false;
336  }
337 
339  {
340  return true;
341  }
342 
344  {
345  return true;
346  }
347 
348 
349  inline void PixelModuleDesign::neighboursOfCell(const SiCellId & cellId,
350  std::vector<SiCellId> &neighbours) const
351  {
352  return m_diodeMap.neighboursOfCell(cellId, neighbours);
353  }
354 
355  inline double PixelModuleDesign::intersectionLength(const SiCellId &diode1,
356  const SiCellId &diode2) const
357  {
358  return m_diodeMap.intersectionLength(diode1, diode2);
359  }
360 
361 
362 
363  inline bool PixelModuleDesign::is3D() const
364  {
365  return m_is3D;
366  }
367 
373  {
375  }
376 
377  const int maxRow = m_readoutScheme.rowsPerCircuit();
378  const int maxCol = m_readoutScheme.columnsPerCircuit();
379  if (maxRow*maxCol>26000) { return PixelReadoutTechnology::FEI4; }
380  else { return PixelReadoutTechnology::FEI3; }
381  }
382 
383  inline std::string PixelModuleDesign::debugStringRepr() const
384  {
385  return m_diodeMap.debugStringRepr();
386  }
387 
388 } // namespace InDetDD
389 
390 #endif // READOUTGEOMETRYBASE_PIXELMODULEDESIGN_H
InDetDD::PixelModuleDesign::m_diodeMap
PixelDiodeMap m_diodeMap
Definition: PixelModuleDesign.h:254
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::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::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:113
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:144
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:322
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:355
InDetDD::PixelModuleDesign::rows
int rows() const
Number of cell rows per module:
Definition: PixelModuleDesign.h:327
InDetDD::PixelModuleDesign::cellIdInRange
virtual SiCellId cellIdInRange(const SiCellId &cellId) const
Check if cell is in range.
Definition: PixelModuleDesign.cxx:242
InDetDD::PixelModuleDesign::connectedCell
virtual SiCellId connectedCell(const SiReadoutCellId &readoutId, int number) const
readout id -> id of connected diodes.
Definition: PixelModuleDesign.cxx:191
InDetDD::PixelModuleDesign::sensorRightRow
double sensorRightRow() const
Definition: PixelModuleDesign.h:287
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:338
InDetDD::PixelInclined
@ PixelInclined
Definition: DetectorDesign.h:46
InDetDD::PixelModuleDesign::etaPitch
virtual double etaPitch() const
Pitch in eta direction.
Definition: PixelModuleDesign.cxx:173
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:226
InDetDD::PixelEndcap
@ PixelEndcap
Definition: DetectorDesign.h:46
InDetDD::PixelModuleDesign::length
virtual double length() const
Method to calculate length of a module.
Definition: PixelModuleDesign.cxx:107
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:219
InDetDD::PixelModuleDesign::debugStringRepr
std::string debugStringRepr() const
Debug string representation.
Definition: PixelModuleDesign.h:383
InDetDD::PixelModuleDesign::phiPitch
virtual double phiPitch() const
Pitch in phi direction.
Definition: PixelModuleDesign.cxx:157
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:332
InDetDD::PixelModuleDesign::m_is3D
bool m_is3D
Definition: PixelModuleDesign.h:257
InDetDD::PixelModuleDesign::widthFromColumnRange
double widthFromColumnRange(const int colMin, const int colMax) const
Method to calculate eta width from a column range.
Definition: PixelModuleDesign.cxx:132
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:258
InDetDD::PixelModuleDesign::numberOfCircuitsPerColumn
int numberOfCircuitsPerColumn() const
Number of circuits per column:
Definition: PixelModuleDesign.h:302
vector
Definition: MultiHisto.h:13
InDetDD::PixelModuleDesign::numberOfCircuits
int numberOfCircuits() const
Total number of circuits:
Definition: PixelModuleDesign.h:297
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:61
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:85
InDetDD::PixelModuleDesign::swapHitEtaReadoutDirection
virtual bool swapHitEtaReadoutDirection() const
Definition: PixelModuleDesign.h:343
InDetDD::PixelModuleDesign::readoutIdOfPosition
virtual SiReadoutCellId readoutIdOfPosition(const SiLocalPosition &localPos) const
position -> id
Definition: PixelModuleDesign.cxx:210
InDetDD::PixelModuleDesign::m_bounds
CxxUtils::CachedUniquePtr< Trk::RectangleBounds > m_bounds
Definition: PixelModuleDesign.h:256
InDetDD::PixelModuleDesign::phiMeasureSegment
virtual HepGeom::Vector3D< double > phiMeasureSegment(const SiLocalPosition &) const
Helper method for stereo angle computation.
Definition: PixelModuleDesign.cxx:92
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:292
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:307
InDetDD::PixelModuleDesign::numberOfConnectedCells
virtual int numberOfConnectedCells(const SiReadoutCellId &readoutId) const
readout id -> id of connected diodes
Definition: PixelModuleDesign.cxx:185
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:368
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:197
python.testIfMatch.matrix
matrix
Definition: testIfMatch.py:66
PixelReadoutDefinitions.h
InDetDD::PixelModuleDesign::is3D
virtual bool is3D() const
Definition: PixelModuleDesign.h:363
InDetDD::CarrierType
CarrierType
Definition: InDetDD_Defs.h:17
InDetDD::PixelModuleDesign::rowsPerCircuit
int rowsPerCircuit() const
Number of cell rows per circuit:
Definition: PixelModuleDesign.h:317
InDetDD::PixelModuleDesign::m_readoutScheme
PixelReadoutScheme m_readoutScheme
Definition: PixelModuleDesign.h:255
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:80
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:236
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:266
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:277
InDetDD::PixelModuleDesign::~PixelModuleDesign
virtual ~PixelModuleDesign()=default
InDetDD::PixelModuleDesign::cellIdOfPosition
virtual SiCellId cellIdOfPosition(const SiLocalPosition &localPos) const
position -> id
Definition: PixelModuleDesign.cxx:179
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:349
InDetDD::PixelModuleDesign::PixelModuleDesign
PixelModuleDesign()
InDetDD::PixelModuleDesign::readoutIdOfCell
virtual SiReadoutCellId readoutIdOfCell(const SiCellId &cellId) const
diode id -> readout id
Definition: PixelModuleDesign.cxx:203
InDetDD::Undefined
@ Undefined
Definition: DetectorDesign.h:46
InDetDD::SiReadoutCellId
Definition: SiReadoutCellId.h:42
InDetDD::PixelModuleDesign::sensorLeftRow
double sensorLeftRow() const
Definition: PixelModuleDesign.h:282
InDetDD::SiDetectorDesign
Definition: SiDetectorDesign.h:50
InDetDD::PixelModuleDesign::minWidth
virtual double minWidth() const
Method to calculate minimum width of a module.
Definition: PixelModuleDesign.cxx:119
InDetDD::PixelModuleDesign::endsOfStrip
virtual std::pair< SiLocalPosition, SiLocalPosition > endsOfStrip(const SiLocalPosition &position) const
Special method for SCT (irrelevant here):
Definition: PixelModuleDesign.cxx:100
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:125
InDetDD::PixelModuleDesign::columnsPerCircuit
int columnsPerCircuit() const
Number of cell columns per circuit:
Definition: PixelModuleDesign.h:312
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:247
InDetDD::SiDiodesParameters
Definition: SiDiodesParameters.h:25
InDetDD::PixelModuleDesign::sensorLeftColumn
double sensorLeftColumn() const
Global sensor size:
Definition: PixelModuleDesign.h:272