ATLAS Offline Software
|
#include <PixelDiodeMatrix.h>
Public Types | |
enum | Direction { phiDir, etaDir } |
Public Member Functions | |
~PixelDiodeMatrix ()=default | |
Destructor. More... | |
const PixelDiodeMatrix * | cellIdOfPosition (const Amg::Vector2D &position, SiCellId &cellId) const |
Return cell Id corresponding to a relative position within the matrix. More... | |
const PixelDiodeMatrix * | positionOfCell (const SiCellId &cellId, Amg::Vector2D &position) const |
Return position correspong to cell with relative id withing the matrix. More... | |
double | phiWidth () const |
Width in phi (x) direction. More... | |
double | phiWidthInverse () const |
Inverse of width in phi (x) direction. More... | |
double | etaWidth () const |
Width in eta (y) direction. More... | |
double | etaWidthInverse () const |
Inverse of width in eta (y) direction. More... | |
int | phiCells () const |
Number of cells in phi (x) direction. More... | |
int | etaCells () const |
Number of cells in eta (y) direction. More... | |
bool | singleCell () const |
Query wether the matrix is just a single cell. More... | |
std::string | createDebugStringRepr () const |
Create debug representation. More... | |
Static Public Member Functions | |
static std::shared_ptr< const PixelDiodeMatrix > | construct (double phiWidth, double etaWidth) |
Construct method for just a single cell. More... | |
static std::shared_ptr< const PixelDiodeMatrix > | construct (Direction direction, std::shared_ptr< const PixelDiodeMatrix > lowerCell, std::shared_ptr< const PixelDiodeMatrix > middleCells, int numCells, std::shared_ptr< const PixelDiodeMatrix > upperCells) |
Construct method with multiple matrices. More... | |
Private Member Functions | |
PixelDiodeMatrix () | |
Hidden constructor. More... | |
void | initialize (double phiWidth, double etaWidth) |
Initialize for just a single cell. More... | |
void | initialize (Direction direction, std::shared_ptr< const PixelDiodeMatrix > lowerCell, std::shared_ptr< const PixelDiodeMatrix > middleCells, int numCells, std::shared_ptr< const PixelDiodeMatrix > upperCells) |
Initialize for multiple matrices. More... | |
std::string | createDebugStringRepr (unsigned int level) const |
Create debug representation for a specific level. More... | |
Private Attributes | |
double | m_phiWidth = 0 |
double | m_phiWidthInverse = 0 |
double | m_etaWidth = 0 |
double | m_etaWidthInverse = 0 |
int | m_phiCells = 0 |
int | m_etaCells = 0 |
Direction | m_direction {} |
int | m_numCells = 0 |
std::shared_ptr< const PixelDiodeMatrix > | m_lowerCell |
std::shared_ptr< const PixelDiodeMatrix > | m_middleCells |
std::shared_ptr< const PixelDiodeMatrix > | m_upperCell |
bool | m_singleCell = false |
Class used to describe the segmentation of the pixel and allow for conversion between cell id and position.
The class PixelDiodeMatrix represents what it calls a cell. In the context of this class a cell can either be just a simple cell as one would normally think of a pixel cell (eg a 50x400um or 50x600um cell) or it can be a container of multiple cells. To allow for different size cells and layout, it contains a lower cell, an upper cell and multiple middle cells. The middle cells are all the same (so all have the same size), but the upper and lower cells can be different and can have different size or be left out if they are not needed. The direction of replication is also specified (eta or phi direction). The size of the cells in the direction orthoganal to the replication direction must all be the same (there is no check for this though).
To help understand the structure and its use, consider the current pixel geometry. The pixel module has two cell sizes short and long cells. These are refered to as normal and big bellow. The long cells are in the region at the edge of the the FE chips in order to cover the gap between FE chips.
The assembly of this structure is done when building the sensitive detector in GeoModel in the class GeoPixelSiCrystal.
Each cell knows its total size and total number of child cells in the phi and eta direction. This is determined by totaling up these quantities when the object is constructed.
The structure allows for efficient navigation from cell number to position and vice-versa. There are two main methods which allow for this navigation: cellIdOfPosition() (from cell id to position) and positionOfCell() (from position to cell id).
As it is assumed that child cells fill up completely its parent, there is no range check in these methods. The methods are called from PixelDiodeMap where it first checks that is within range of the top level cell (refered to as the top level matrix).
PixelDiodeMatrix might inherit std::shared_ptr but needs to return std::shared_ptr of this pointer. To do this, std::enable_shared_from_this and shared_from_this() have to be used. https://en.cppreference.com/w/cpp/memory/enable_shared_from_this
See the description of these methods for more details.
Definition at line 93 of file PixelDiodeMatrix.h.
|
default |
Destructor.
|
inlineprivate |
const PixelDiodeMatrix * InDetDD::PixelDiodeMatrix::cellIdOfPosition | ( | const Amg::Vector2D & | relPosition, |
SiCellId & | cellId | ||
) | const |
Return cell Id corresponding to a relative position within the matrix.
Description.
The cellId is modified and returns the id relative to the passed cellId. That is, it adds the relative cellId to the cellId passed to the function. A pointer to the correspond cell is returned. This can be used to get the size of the cell.
Overview of algoritm:
Definition at line 131 of file PixelDiodeMatrix.cxx.
|
static |
Construct method with multiple matrices.
There may be zero or one lower matrix (pointer can be 0). Multiple (numCells) middle matrics (must pass a non zero pointer). There may be zero or one upper matrix (pointer can be 0). These must all have the same width and cells in the non replicating direction.
Definition at line 38 of file PixelDiodeMatrix.cxx.
|
static |
Construct method for just a single cell.
Definition at line 14 of file PixelDiodeMatrix.cxx.
|
inline |
Create debug representation.
Definition at line 225 of file PixelDiodeMatrix.h.
|
private |
Create debug representation for a specific level.
Definition at line 347 of file PixelDiodeMatrix.cxx.
|
inline |
Number of cells in eta (y) direction.
Definition at line 215 of file PixelDiodeMatrix.h.
|
inline |
Width in eta (y) direction.
Definition at line 200 of file PixelDiodeMatrix.h.
|
inline |
Inverse of width in eta (y) direction.
Definition at line 205 of file PixelDiodeMatrix.h.
|
private |
Initialize for multiple matrices.
There may be zero or one lower matrix (pointer can be 0). Multiple (numCells) middle matrics (must pass a non zero pointer). There may be zero or one upper matrix (pointer can be 0). These must all have the same width and cells in the non replicating direction.
Definition at line 54 of file PixelDiodeMatrix.cxx.
|
private |
|
inline |
Number of cells in phi (x) direction.
Definition at line 210 of file PixelDiodeMatrix.h.
|
inline |
Width in phi (x) direction.
Definition at line 190 of file PixelDiodeMatrix.h.
|
inline |
Inverse of width in phi (x) direction.
Definition at line 195 of file PixelDiodeMatrix.h.
const PixelDiodeMatrix * InDetDD::PixelDiodeMatrix::positionOfCell | ( | const SiCellId & | cellId, |
Amg::Vector2D & | position | ||
) | const |
Return position correspong to cell with relative id withing the matrix.
Description.
Returns the relative position added to the position passed in. A pointer to the correspond cell is returned. This can be used to get the size of the cell.
Overview of algoritm:
Definition at line 255 of file PixelDiodeMatrix.cxx.
|
inline |
Query wether the matrix is just a single cell.
Mainly for internal use.
Definition at line 220 of file PixelDiodeMatrix.h.
|
private |
Definition at line 181 of file PixelDiodeMatrix.h.
|
private |
Definition at line 180 of file PixelDiodeMatrix.h.
|
private |
Definition at line 177 of file PixelDiodeMatrix.h.
|
private |
Definition at line 178 of file PixelDiodeMatrix.h.
|
private |
Definition at line 183 of file PixelDiodeMatrix.h.
|
private |
Definition at line 184 of file PixelDiodeMatrix.h.
|
private |
Definition at line 182 of file PixelDiodeMatrix.h.
|
private |
Definition at line 179 of file PixelDiodeMatrix.h.
|
private |
Definition at line 175 of file PixelDiodeMatrix.h.
|
private |
Definition at line 176 of file PixelDiodeMatrix.h.
|
private |
Definition at line 186 of file PixelDiodeMatrix.h.
|
private |
Definition at line 185 of file PixelDiodeMatrix.h.