 |
ATLAS Offline Software
|
Helper class to convert between offline column, row and hardware chip, column, row coordinates.
More...
#include <PixelModuleHelper.h>
|
static constexpr unsigned int | getPixelMask () |
|
static constexpr unsigned int | getColGroup8Mask () |
|
static constexpr unsigned int | getColGroup4Mask () |
|
static constexpr unsigned int | getChipMask () |
|
static constexpr unsigned int | nMasks () |
|
static constexpr unsigned int | makeKey (bool is_range, unsigned int chip, unsigned int col, unsigned int row=0u) |
| Create a key from mask, chip, column and row indices. More...
|
|
static constexpr unsigned int | getColumn (unsigned int key) |
| Get the column index from a full key. More...
|
|
static constexpr unsigned int | getRow (unsigned int key) |
| Get the row index from a full key. More...
|
|
static constexpr unsigned int | getLimitRowMax () |
| Get the maximum row value. More...
|
|
static constexpr unsigned int | getLimitColumnMax () |
| Get the maximum row value. More...
|
|
static constexpr unsigned int | getChip (unsigned int key) |
| Get the column index from a full key. More...
|
|
static constexpr unsigned int | getDefectType (unsigned int key) |
| Get an associated defect type. More...
|
|
static constexpr unsigned int | getDefectTypeComponent (unsigned int key) |
| Get key component of an associated defect type. More...
|
|
static constexpr unsigned int | makeDefectTypeKey (unsigned int defect_type) |
| Make the key component representing the an associated defect type. More...
|
|
static constexpr bool | isRangeKey (unsigned int key) |
| Test whether a key is a range key. More...
|
|
static constexpr unsigned int | makeRangeKey (unsigned int key) |
| Turn a key into a range key. More...
|
|
static constexpr unsigned int | makeBaseKey (unsigned int key) |
| Return the key with the range flag removed. More...
|
|
static constexpr std::pair< unsigned int, unsigned int > | makeRangeForMask (unsigned int key, unsigned int mask) |
| Return a key pair marking the beginning and the end of the range for the given mask and key. More...
|
|
static constexpr bool | isMatchingDefect (unsigned int defect_key, unsigned int key) |
| Convenience method to check whether the key matches the defect. More...
|
|
|
static constexpr unsigned int | makeKeyPart ([[maybe_unused]] unsigned int val) |
| Convenience method to create part of a key. More...
|
|
Helper class to convert between offline column, row and hardware chip, column, row coordinates.
Definition at line 16 of file PixelModuleHelper.h.
◆ KEY_TYPE
◆ PixelModuleHelper()
◆ circuitsPerColumn()
unsigned int InDet::PixelModuleHelper::circuitsPerColumn |
( |
| ) |
const |
|
inline |
◆ circuitsPerRow()
unsigned int InDet::PixelModuleHelper::circuitsPerRow |
( |
| ) |
const |
|
inline |
◆ columnPitch()
float InDet::PixelModuleHelper::columnPitch |
( |
| ) |
const |
|
inline |
◆ columns()
unsigned int InDet::PixelModuleHelper::columns |
( |
| ) |
const |
|
inline |
◆ columnsPerCircuit()
unsigned int InDet::PixelModuleHelper::columnsPerCircuit |
( |
| ) |
const |
|
inline |
◆ getChip()
static constexpr unsigned int InDet::ModuleKeyHelper< unsigned int , T_ROW_BITS, T_COL_BITS, T_CHIP_BITS, T_TYPE_BITS >::getChip |
( |
unsigned int |
key | ) |
|
|
inlinestaticconstexprinherited |
◆ getChipMask()
static constexpr unsigned int InDet::PixelModuleHelper::getChipMask |
( |
| ) |
|
|
inlinestaticconstexpr |
Definition at line 35 of file PixelModuleHelper.h.
35 {
return MaskUtils::createMask<ROW_BITS+COL_BITS,ROW_BITS+COL_BITS+CHIP_BITS>(); }
◆ getColGroup4Mask()
static constexpr unsigned int InDet::PixelModuleHelper::getColGroup4Mask |
( |
| ) |
|
|
inlinestaticconstexpr |
Definition at line 33 of file PixelModuleHelper.h.
33 {
return MaskUtils::createMask<ROW_BITS+2,ROW_BITS+COL_BITS+CHIP_BITS>(); }
◆ getColGroup8Mask()
static constexpr unsigned int InDet::PixelModuleHelper::getColGroup8Mask |
( |
| ) |
|
|
inlinestaticconstexpr |
Definition at line 31 of file PixelModuleHelper.h.
31 {
return MaskUtils::createMask<ROW_BITS+3,ROW_BITS+COL_BITS+CHIP_BITS>(); }
◆ getColumn()
static constexpr unsigned int InDet::ModuleKeyHelper< unsigned int , T_ROW_BITS, T_COL_BITS, T_CHIP_BITS, T_TYPE_BITS >::getColumn |
( |
unsigned int |
key | ) |
|
|
inlinestaticconstexprinherited |
◆ getDefectType()
static constexpr unsigned int InDet::ModuleKeyHelper< unsigned int , T_ROW_BITS, T_COL_BITS, T_CHIP_BITS, T_TYPE_BITS >::getDefectType |
( |
unsigned int |
key | ) |
|
|
inlinestaticconstexprinherited |
◆ getDefectTypeComponent()
static constexpr unsigned int InDet::ModuleKeyHelper< unsigned int , T_ROW_BITS, T_COL_BITS, T_CHIP_BITS, T_TYPE_BITS >::getDefectTypeComponent |
( |
unsigned int |
key | ) |
|
|
inlinestaticconstexprinherited |
◆ getLimitColumnMax()
static constexpr unsigned int InDet::ModuleKeyHelper< unsigned int , T_ROW_BITS, T_COL_BITS, T_CHIP_BITS, T_TYPE_BITS >::getLimitColumnMax |
|
inlinestaticconstexprinherited |
◆ getLimitRowMax()
static constexpr unsigned int InDet::ModuleKeyHelper< unsigned int , T_ROW_BITS, T_COL_BITS, T_CHIP_BITS, T_TYPE_BITS >::getLimitRowMax |
|
inlinestaticconstexprinherited |
◆ getPixelMask()
static constexpr unsigned int InDet::PixelModuleHelper::getPixelMask |
( |
| ) |
|
|
inlinestaticconstexpr |
Definition at line 29 of file PixelModuleHelper.h.
29 {
return MaskUtils::createMask<0,ROW_BITS+COL_BITS+CHIP_BITS>(); }
◆ getRow()
static constexpr unsigned int InDet::ModuleKeyHelper< unsigned int , T_ROW_BITS, T_COL_BITS, T_CHIP_BITS, T_TYPE_BITS >::getRow |
( |
unsigned int |
key | ) |
|
|
inlinestaticconstexprinherited |
◆ hardwareCoordinates()
unsigned int InDet::PixelModuleHelper::hardwareCoordinates |
( |
unsigned int |
row, |
|
|
unsigned int |
column |
|
) |
| const |
|
inline |
compute "hardware" coordinates from offline coordinates.
- Parameters
-
row | offline row aka. phi index |
column | offline column aka. eta index |
- Returns
- packed triplet of chip, column, row.
Definition at line 99 of file PixelModuleHelper.h.
100 unsigned int chip =0;
◆ isMatchingDefect()
static constexpr bool InDet::ModuleKeyHelper< unsigned int , T_ROW_BITS, T_COL_BITS, T_CHIP_BITS, T_TYPE_BITS >::isMatchingDefect |
( |
unsigned int |
defect_key, |
|
|
unsigned int |
key |
|
) |
| |
|
inlinestaticconstexprinherited |
Convenience method to check whether the key matches the defect.
- Parameters
-
defect_key | the key of the defect returned by lower_bound of the emulated defects. |
key | the key to test |
- Returns
- true if key overlaps with the defect range or defect.
Definition at line 184 of file ModuleKeyHelper.h.
◆ isRangeKey()
static constexpr bool InDet::ModuleKeyHelper< unsigned int , T_ROW_BITS, T_COL_BITS, T_CHIP_BITS, T_TYPE_BITS >::isRangeKey |
( |
unsigned int |
key | ) |
|
|
inlinestaticconstexprinherited |
◆ makeBaseKey()
static constexpr unsigned int InDet::ModuleKeyHelper< unsigned int , T_ROW_BITS, T_COL_BITS, T_CHIP_BITS, T_TYPE_BITS >::makeBaseKey |
( |
unsigned int |
key | ) |
|
|
inlinestaticconstexprinherited |
Return the key with the range flag removed.
If the key is a range key return the key without the range flag otherwise return the the same key.
Definition at line 168 of file ModuleKeyHelper.h.
◆ makeDefectTypeKey()
static constexpr unsigned int InDet::ModuleKeyHelper< unsigned int , T_ROW_BITS, T_COL_BITS, T_CHIP_BITS, T_TYPE_BITS >::makeDefectTypeKey |
( |
unsigned int |
defect_type | ) |
|
|
inlinestaticconstexprinherited |
Make the key component representing the an associated defect type.
Definition at line 136 of file ModuleKeyHelper.h.
◆ makeKey()
static constexpr unsigned int InDet::ModuleKeyHelper< unsigned int , T_ROW_BITS, T_COL_BITS, T_CHIP_BITS, T_TYPE_BITS >::makeKey |
( |
bool |
is_range, |
|
|
unsigned int |
chip, |
|
|
unsigned int |
col, |
|
|
unsigned int |
row = 0u |
|
) |
| |
|
inlinestaticconstexprinherited |
Create a key from mask, chip, column and row indices.
- Parameters
-
is_range | if true the key marks the beginning of an inclusive range |
chip | the index of a chip starting from zero |
col | the index of a column starting from zero |
row | the index of a row starting from zero |
The indices must be representable by the number of reserved bits.
Definition at line 85 of file ModuleKeyHelper.h.
87 | makeKeyPart<CHIP_SHIFT,CHIP_MASK>(chip)
88 | makeKeyPart<COL_SHIFT,COL_MASK>(col)
89 | makeKeyPart<ROW_SHIFT,ROW_MASK>(
row);
◆ makeKeyPart()
static constexpr unsigned int InDet::ModuleKeyHelper< unsigned int , T_ROW_BITS, T_COL_BITS, T_CHIP_BITS, T_TYPE_BITS >::makeKeyPart |
( |
[[maybe_unused] ] unsigned int |
val | ) |
|
|
inlinestaticconstexprprotectedinherited |
Convenience method to create part of a key.
- Template Parameters
-
SHIFT | the given value will be shifted by this ammount |
MASK | the shifted value must not overflow this mask. |
- Parameters
-
val | the value to be stored in the key part |
Definition at line 66 of file ModuleKeyHelper.h.
67 if constexpr(
MASK==0) {
71 assert (((
val << SHIFT) &
MASK) == (
val << SHIFT));
72 return (
val << SHIFT);
◆ makeRangeForMask()
static constexpr std::pair<unsigned int , unsigned int > InDet::ModuleKeyHelper< unsigned int , T_ROW_BITS, T_COL_BITS, T_CHIP_BITS, T_TYPE_BITS >::makeRangeForMask |
( |
unsigned int |
key, |
|
|
unsigned int |
mask |
|
) |
| |
|
inlinestaticconstexprinherited |
Return a key pair marking the beginning and the end of the range for the given mask and key.
- Parameters
-
key | a key which marks a point in the range |
mask | a mask which defines the range @preturn a pair containing the start key and end key of the range |
Definition at line 175 of file ModuleKeyHelper.h.
◆ makeRangeKey()
static constexpr unsigned int InDet::ModuleKeyHelper< unsigned int , T_ROW_BITS, T_COL_BITS, T_CHIP_BITS, T_TYPE_BITS >::makeRangeKey |
( |
unsigned int |
key | ) |
|
|
inlinestaticconstexprinherited |
Turn a key into a range key.
Such keys mark the beginning of an inclusive range.
Definition at line 162 of file ModuleKeyHelper.h.
◆ masks()
std::array<unsigned int, N_MASKS> InDet::PixelModuleHelper::masks |
( |
| ) |
const |
|
inline |
◆ nCells()
unsigned int InDet::PixelModuleHelper::nCells |
( |
| ) |
const |
|
inline |
◆ nElements()
unsigned int InDet::PixelModuleHelper::nElements |
( |
unsigned int |
mask_i | ) |
const |
|
inline |
return the maximum number of unique mask (or group) defects per module.
Definition at line 171 of file PixelModuleHelper.h.
◆ nMasks()
static constexpr unsigned int InDet::PixelModuleHelper::nMasks |
( |
| ) |
|
|
inlinestaticconstexpr |
◆ nSensorColumns()
unsigned int InDet::PixelModuleHelper::nSensorColumns |
( |
| ) |
const |
|
inline |
◆ nSensorRows()
unsigned int InDet::PixelModuleHelper::nSensorRows |
( |
| ) |
const |
|
inline |
◆ offlineCoordinates()
std::pair<unsigned int,unsigned int> InDet::PixelModuleHelper::offlineCoordinates |
( |
unsigned int |
key | ) |
const |
|
inline |
compute offline coordinates from "hardware" coordinates
- Parameters
-
key | packed hardware coordinates |
- Returns
- offline row, column pair
Definition at line 125 of file PixelModuleHelper.h.
149 throw std::runtime_error(
"Invvalid offline coordinates");
◆ offlineRange()
std::array<unsigned int,4> InDet::PixelModuleHelper::offlineRange |
( |
const std::pair< unsigned int, unsigned int > & |
range | ) |
const |
|
inline |
Function to return offline column and row ranges matching the defect-area of the given key (used for histogramming)
- Parameters
-
range | pair of packed hardware coordinates addressing the start and end pixel of an rectangular inclusive pixel range. |
- Returns
- offline start column, end column, start row, end row, where the end is meant to be exclusive i.e. [start, end)
Definition at line 187 of file PixelModuleHelper.h.
200 return std::array<unsigned int,4>{
start.first,
start.first+1,
◆ operator bool()
InDet::PixelModuleHelper::operator bool |
( |
| ) |
const |
|
inline |
◆ rowPitch()
float InDet::PixelModuleHelper::rowPitch |
( |
| ) |
const |
|
inline |
◆ rows()
unsigned int InDet::PixelModuleHelper::rows |
( |
| ) |
const |
|
inline |
◆ rowsPerCircuit()
unsigned int InDet::PixelModuleHelper::rowsPerCircuit |
( |
| ) |
const |
|
inline |
◆ swapOfflineRowsColumns()
bool InDet::PixelModuleHelper::swapOfflineRowsColumns |
( |
| ) |
const |
|
inline |
◆ CHIP_BITS
constexpr unsigned int InDet::ModuleKeyHelper< unsigned int , T_ROW_BITS, T_COL_BITS, T_CHIP_BITS, T_TYPE_BITS >::CHIP_BITS |
|
staticconstexprinherited |
◆ CHIP_MASK
constexpr unsigned int InDet::ModuleKeyHelper< unsigned int , T_ROW_BITS, T_COL_BITS, T_CHIP_BITS, T_TYPE_BITS >::CHIP_MASK |
|
staticconstexprinherited |
◆ CHIP_SHIFT
constexpr unsigned int InDet::ModuleKeyHelper< unsigned int , T_ROW_BITS, T_COL_BITS, T_CHIP_BITS, T_TYPE_BITS >::CHIP_SHIFT |
|
staticconstexprinherited |
◆ COL_BITS
constexpr unsigned int InDet::ModuleKeyHelper< unsigned int , T_ROW_BITS, T_COL_BITS, T_CHIP_BITS, T_TYPE_BITS >::COL_BITS |
|
staticconstexprinherited |
◆ COL_MASK
constexpr unsigned int InDet::ModuleKeyHelper< unsigned int , T_ROW_BITS, T_COL_BITS, T_CHIP_BITS, T_TYPE_BITS >::COL_MASK |
|
staticconstexprinherited |
◆ COL_SHIFT
constexpr unsigned int InDet::ModuleKeyHelper< unsigned int , T_ROW_BITS, T_COL_BITS, T_CHIP_BITS, T_TYPE_BITS >::COL_SHIFT |
|
staticconstexprinherited |
◆ m_circuitsPerColumn
unsigned char InDet::PixelModuleHelper::m_circuitsPerColumn = 0 |
|
private |
◆ m_circuitsPerRow
unsigned char InDet::PixelModuleHelper::m_circuitsPerRow = 0 |
|
private |
◆ m_columnPitch
float InDet::PixelModuleHelper::m_columnPitch = 0 |
|
private |
◆ m_columns
unsigned short InDet::PixelModuleHelper::m_columns = 0 |
|
private |
◆ m_columnsPerCircuit
unsigned short InDet::PixelModuleHelper::m_columnsPerCircuit = 0 |
|
private |
◆ m_rectangularPixels
bool InDet::PixelModuleHelper::m_rectangularPixels = false |
|
private |
◆ m_rowPitch
float InDet::PixelModuleHelper::m_rowPitch = 0 |
|
private |
◆ m_rows
unsigned short InDet::PixelModuleHelper::m_rows = 0 |
|
private |
◆ m_rowsPerCircuit
unsigned short InDet::PixelModuleHelper::m_rowsPerCircuit = 0 |
|
private |
◆ m_sensorColumns
unsigned short InDet::PixelModuleHelper::m_sensorColumns =0 |
|
private |
◆ m_sensorRows
unsigned short InDet::PixelModuleHelper::m_sensorRows =0 |
|
private |
◆ m_swapOfflineRowsColumns
bool InDet::PixelModuleHelper::m_swapOfflineRowsColumns =false |
|
private |
◆ N_COLS_PER_GROUP
constexpr std::array<unsigned short,2> InDet::PixelModuleHelper::N_COLS_PER_GROUP |
|
staticconstexpr |
◆ N_MASKS
constexpr unsigned int InDet::PixelModuleHelper::N_MASKS =3 |
|
staticconstexpr |
◆ RANGE_FLAG_BITS
constexpr unsigned int InDet::ModuleKeyHelper< unsigned int , T_ROW_BITS, T_COL_BITS, T_CHIP_BITS, T_TYPE_BITS >::RANGE_FLAG_BITS |
|
staticconstexprinherited |
◆ RANGE_FLAG_MASK
constexpr unsigned int InDet::ModuleKeyHelper< unsigned int , T_ROW_BITS, T_COL_BITS, T_CHIP_BITS, T_TYPE_BITS >::RANGE_FLAG_MASK |
|
staticconstexprinherited |
◆ RANGE_FLAG_SHIFT
constexpr unsigned int InDet::ModuleKeyHelper< unsigned int , T_ROW_BITS, T_COL_BITS, T_CHIP_BITS, T_TYPE_BITS >::RANGE_FLAG_SHIFT |
|
staticconstexprinherited |
◆ ROW_BITS
constexpr unsigned int InDet::ModuleKeyHelper< unsigned int , T_ROW_BITS, T_COL_BITS, T_CHIP_BITS, T_TYPE_BITS >::ROW_BITS |
|
staticconstexprinherited |
◆ ROW_MASK
constexpr unsigned int InDet::ModuleKeyHelper< unsigned int , T_ROW_BITS, T_COL_BITS, T_CHIP_BITS, T_TYPE_BITS >::ROW_MASK |
|
staticconstexprinherited |
◆ ROW_SHIFT
constexpr unsigned int InDet::ModuleKeyHelper< unsigned int , T_ROW_BITS, T_COL_BITS, T_CHIP_BITS, T_TYPE_BITS >::ROW_SHIFT |
|
staticconstexprinherited |
◆ TYPE_BITS
constexpr unsigned int InDet::ModuleKeyHelper< unsigned int , T_ROW_BITS, T_COL_BITS, T_CHIP_BITS, T_TYPE_BITS >::TYPE_BITS |
|
staticconstexprinherited |
◆ TYPE_MASK
constexpr unsigned int InDet::ModuleKeyHelper< unsigned int , T_ROW_BITS, T_COL_BITS, T_CHIP_BITS, T_TYPE_BITS >::TYPE_MASK |
|
staticconstexprinherited |
◆ TYPE_SHIFT
constexpr unsigned int InDet::ModuleKeyHelper< unsigned int , T_ROW_BITS, T_COL_BITS, T_CHIP_BITS, T_TYPE_BITS >::TYPE_SHIFT |
|
staticconstexprinherited |
The documentation for this class was generated from the following file:
static constexpr unsigned int getColumn(unsigned int key)
Get the column index from a full key.
unsigned int nSensorColumns() const
Return the number of offline columns.
static constexpr unsigned int getRow(unsigned int key)
Get the row index from a full key.
static constexpr unsigned int CHIP_MASK
int columns() const
Number of cell columns per module:
unsigned short m_columnsPerCircuit
static constexpr unsigned int RANGE_FLAG_MASK
int rows() const
Number of cell rows per module:
static constexpr unsigned int TYPE_BITS
bool swapOfflineRowsColumns() const
unsigned short m_sensorRows
@ u
Enums for curvilinear frames.
virtual double etaPitch() const
Pitch in eta direction.
unsigned short m_rowsPerCircuit
unsigned char m_circuitsPerRow
virtual double phiPitch() const
Pitch in phi direction.
static constexpr unsigned int CHIP_SHIFT
static constexpr unsigned int getColGroup4Mask()
static constexpr unsigned int makeBaseKey(unsigned int key)
Return the key with the range flag removed.
static constexpr unsigned int COL_SHIFT
int numberOfCircuitsPerColumn() const
Number of circuits per column:
unsigned char m_circuitsPerColumn
static constexpr unsigned int getColGroup8Mask()
static constexpr unsigned int ROW_MASK
static constexpr unsigned int getChip(unsigned int key)
Get the column index from a full key.
static constexpr unsigned int TYPE_MASK
unsigned short m_sensorColumns
int numberOfCircuitsPerRow() const
Number of circuits per row:
static constexpr unsigned int COL_MASK
bool m_swapOfflineRowsColumns
static constexpr unsigned int ROW_SHIFT
unsigned int columnsPerCircuit() const
int rowsPerCircuit() const
Number of cell rows per circuit:
static constexpr unsigned int makeKey(bool is_range, unsigned int chip, unsigned int col, unsigned int row=0u)
Create a key from mask, chip, column and row indices.
unsigned int nCells() const
Return total number of pixels per module.
static constexpr unsigned int getChipMask()
unsigned int rowsPerCircuit() const
static constexpr unsigned int TYPE_SHIFT
unsigned int nSensorRows() const
Return the number of offline rows.
PixelModuleHelper(const InDetDD::SiDetectorDesign &design)
std::pair< unsigned int, unsigned int > offlineCoordinates(unsigned int key) const
compute offline coordinates from "hardware" coordinates
static constexpr unsigned int N_MASKS
unsigned int circuitsPerRow() const
unsigned int circuitsPerColumn() const
static constexpr unsigned int RANGE_FLAG_SHIFT
static constexpr unsigned int getLimitRowMax()
Get the maximum row value.
static constexpr bool isRangeKey(unsigned int key)
Test whether a key is a range key.
int columnsPerCircuit() const
Number of cell columns per circuit:
static constexpr unsigned int getPixelMask()
unsigned int columns() const