12#ifndef PIXELREADOUTGEOMETRY_PIXELMODULEDESIGN_H
13#define PIXELREADOUTGEOMETRY_PIXELMODULEDESIGN_H
69 const int circuitsPerColumn,
70 const int circuitsPerRow,
71 const int cellColumnsPerCircuit,
72 const int cellRowsPerCircuit,
73 const int diodeColumnsPerCircuit,
74 const int diodeRowsPerCircuit,
87 const int circuitsPerColumn,
88 const int circuitsPerRow,
89 const int cellColumnsPerCircuit,
90 const int cellRowsPerCircuit,
91 const int diodeColumnsPerCircuit,
92 const int diodeRowsPerCircuit,
111 double & etaDist,
double & phiDist)
const;
137 bool isInsideMatrix(
const std::array<InDetDD::PixelDiodeTree::IndexType,2> &idx)
const;
157 std::vector<SiCellId> &neighbours)
const;
190 virtual double length()
const;
193 virtual double width()
const;
227 virtual bool is3D()
const;
252 return m_diodeTree.diodeProxyFromIdxCachePosition(idx);
296 const std::vector<int> &connections)
359 std::vector<SiCellId> &neighbours)
const
372 std::array<int,2> abs_delta;
376 if (abs_delta[0]+abs_delta[1]==1) {
381 return diode1_proxy.
width() [ abs_delta[0]==1 ];
401 return m_diodeTree.isInsideMatrix( std::array<PixelDiodeTree::CellIndexType,2>{cellId.
phiIndex(),
Cached unique_ptr with atomic update.
bool depthSymmetric() const
double thickness() const
Method which returns thickness of the silicon wafer.
bool etaSymmetric() const
bool phiSymmetric() const
InDetDD::CarrierType carrierType() const
Return carrier type (ie electrons or holes)
int readoutSide() const
ReadoutSide.
Tree structure to find the position, index or pitch of a pixel on a semi-regular grid The grid is con...
static constexpr std::array< PixelDiodeTree::CellIndexType, 2 > makeCellIndex(T local_x_idx, T local_y_idx)
Create a 2D cell index from the indices in local-x (phi, row) and local-y (eta, column) direction.
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...
CxxUtils::CachedUniquePtr< Trk::RectangleBounds > m_bounds
PixelDiodeTree::DiodeProxyWithPosition diodeProxyFromIdxCachePosition(const std::array< PixelDiodeTree::IndexType, 2 > &idx) const
virtual SiLocalPosition localPositionOfCell(const SiCellId &cellId) const
readout or diode id -> position.
virtual ~PixelModuleDesign()=default
virtual SiDiodesParameters parameters(const SiCellId &cellId) const
readout or diode id -> position, size
virtual int numberOfConnectedCells(const SiReadoutCellId &readoutId) const
readout id -> id of connected diodes
virtual bool swapHitEtaReadoutDirection() const
PixelReadoutTechnology m_readoutTechnology
PixelReadoutTechnology getReadoutTechnology() const
bool isInsideMatrix(const SiCellId &cellId) const
Return true if the given index describes a pixel of this matrix.
InDetDD::DetectorType m_detectorType
virtual bool nearBondGap(const SiLocalPosition &localPosition, double etaTol) const
Test if near bond gap within tolerances Only relevant for SCT.
virtual DetectorType type() const final
Type of element.
PixelModuleDesign(const PixelModuleDesign &design)
int columns() const
Number of cell columns per module:
virtual void distanceToDetectorEdge(const SiLocalPosition &localPosition, double &etaDist, double &phiDist) const
Returns distance to nearest detector active edge +ve = inside -ve = outside.
PixelDiodeTree::DiodeProxy diodeProxyFromIdx(const std::array< PixelDiodeTree::IndexType, 2 > &idx) const
virtual double length() const
Method to calculate length of a module.
PixelReadoutScheme m_readoutScheme
int rows() const
Number of cell rows per module:
virtual double maxWidth() const
Method to calculate maximum width of a module.
PixelDiodeTree::DiodeProxy diodeProxyFromPosition(const Amg::Vector2D &pos) const
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...
double widthFromRowRange(const int rowMin, const int rowMax) const
Method to calculate phi width from a row range.
PixelModuleDesign & operator=(const PixelModuleDesign &design)
virtual SiReadoutCellId readoutIdOfCell(const SiCellId &cellId) const
diode id -> readout id
virtual bool swapHitPhiReadoutDirection() const
Return true if hit local direction is the same as readout direction.
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...
static InDetDD::PixelDiodeType getDiodeType(const PixelDiodeTree::DiodeProxy &diode_proxy)
virtual HepGeom::Vector3D< double > phiMeasureSegment(const SiLocalPosition &) const
Helper method for stereo angle computation.
virtual SiCellId cellIdOfPosition(const SiLocalPosition &localPos) const
position -> id
virtual bool is3D() const
int numberOfCircuitsPerRow() const
Number of circuits per row:
virtual SiCellId gangedCell(const SiCellId &cellId) const
If cell is ganged return the other cell, otherwise return an invalid id.
int numberOfDiodes() const
Total number of diodes:
int rowsPerCircuit() const
Number of cell rows per circuit:
virtual SiCellId cellIdInRange(const SiCellId &cellId) const
Check if cell is in range.
int numberOfCircuitsPerColumn() const
Number of circuits per column:
double widthFromColumnRange(const int colMin, const int colMax) const
Method to calculate eta width from a column range.
virtual double minWidth() const
Method to calculate minimum width of a module.
int numberOfCircuits() const
Total number of circuits:
virtual SiReadoutCellId readoutIdOfPosition(const SiLocalPosition &localPos) const
position -> id
virtual double width() const
Method to calculate average width of a module.
std::string debugStringRepr() const
Debug string representation.
virtual SiCellId connectedCell(const SiReadoutCellId &readoutId, int number) const
readout id -> id of connected diodes.
PixelDiodeTree m_diodeTree
virtual const Trk::SurfaceBounds & bounds() const
Element boundary.
int columnsPerCircuit() const
Number of cell columns per circuit:
virtual std::pair< SiLocalPosition, SiLocalPosition > endsOfStrip(const SiLocalPosition &position) const
Special method for SCT (irrelevant here):
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...
virtual double etaPitch() const
Pitch in eta direction.
static unsigned int getFE(const PixelDiodeTree::DiodeProxy &diode_proxy)
PixelModuleDesign(const double thickness, const int circuitsPerColumn, const int circuitsPerRow, const int cellColumnsPerCircuit, const int cellRowsPerCircuit, const int diodeColumnsPerCircuit, const int diodeRowsPerCircuit, PixelDiodeTree &&diode_tree, InDetDD::CarrierType carrierType, int readoutSide, bool is3D, InDetDD::DetectorType detectorType, PixelReadoutTechnology readoutTechnology)
Constructor with parameters: local axis corresponding to eta direction local axis corresponding to ph...
virtual double phiPitch() const
Pitch in phi direction.
Class used to describe the connection scheme of a diode matrix to a set of readout circuits.
Identifier for the strip or pixel cell.
int phiIndex() const
Get phi index. Equivalent to strip().
int etaIndex() const
Get eta index.
SiDetectorDesign(double thickness, bool phiSymmetric, bool etaSymmetric, bool depthSymmetric, InDetDD::CarrierType carrierType, int readoutSide)
Constructor.
Class to handle the position of the centre and the width of a diode or a cluster of diodes Version 1....
Class to represent a position in the natural frame of a silicon sensor, for Pixel and SCT For Pixel: ...
Identifier for the strip or pixel readout cell.
Abstract base class for surface bounds to be specified.
Eigen::Matrix< double, 2, 1 > Vector2D
CachedUniquePtrT< const T > CachedUniquePtr
Ensure that the ATLAS eigen extensions are properly loaded.
A diode proxy which caches the position of a diode.
Helper class to access parameters of a diode.
unsigned int diodeAttribute() const
get the attribute associated to this diode (to be interpreted)
unsigned int subMatrixAttribute() const
get the attribute associated to the sub-matrix of this diode (to be interpreted)
const PixelDiodeTree::Vector2D & width() const
get the width stored for this diode.
std::string number(const double &d, const std::string &s)