Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Helper class to convert between offline column, row and hardware chip, column, row coordinates.
More...
#include <StripModuleHelper.h>
|
static constexpr unsigned short | makeKeyPart ([[maybe_unused]] unsigned short val) |
| Convenience method to create part of a key. More...
|
|
static constexpr unsigned short | makeKey (unsigned int mask_sel, unsigned int chip, unsigned int col, unsigned int row=0u) |
| Create a key from mask, chip, column and row indices. More...
|
|
Helper class to convert between offline column, row and hardware chip, column, row coordinates.
Definition at line 17 of file StripModuleHelper.h.
◆ KEY_TYPE
◆ StripModuleHelper()
◆ circuitsPerColumn()
static constexpr unsigned int InDet::StripModuleHelper::circuitsPerColumn |
( |
| ) |
|
|
inlinestaticconstexpr |
◆ circuitsPerRow()
static constexpr unsigned int InDet::StripModuleHelper::circuitsPerRow |
( |
| ) |
|
|
inlinestaticconstexpr |
◆ columns()
unsigned int InDet::StripModuleHelper::columns |
( |
| ) |
const |
|
inline |
◆ columnsPerCircuit()
static constexpr unsigned int InDet::StripModuleHelper::columnsPerCircuit |
( |
| ) |
|
|
inlinestaticconstexpr |
◆ columnsPerMask()
static constexpr unsigned int InDet::StripModuleHelper::columnsPerMask |
( |
[[maybe_unused] ] unsigned int |
mask_idx | ) |
|
|
inlinestaticconstexpr |
◆ getChip()
static constexpr unsigned short InDet::ModuleKeyHelper< unsigned short , T_ROW_BITS, T_COL_BITS, T_CHIP_BITS, T_MASK_SEL_BITS, T_N_MASKS >::getChip |
( |
unsigned short |
key | ) |
|
|
inlinestaticconstexprinherited |
◆ getChipMask()
static constexpr unsigned int InDet::StripModuleHelper::getChipMask |
( |
| ) |
|
|
inlinestaticconstexpr |
Definition at line 30 of file StripModuleHelper.h.
30 {
return MaskUtils::createMask<ROW_BITS,ROW_BITS+CHIP_BITS>(); }
◆ getColumn()
static constexpr unsigned short InDet::ModuleKeyHelper< unsigned short , T_ROW_BITS, T_COL_BITS, T_CHIP_BITS, T_MASK_SEL_BITS, T_N_MASKS >::getColumn |
( |
unsigned short |
key | ) |
|
|
inlinestaticconstexprinherited |
◆ getMask()
unsigned short InDet::ModuleKeyHelper< unsigned short , T_ROW_BITS, T_COL_BITS, T_CHIP_BITS, T_MASK_SEL_BITS, T_N_MASKS >::getMask |
( |
unsigned short |
key | ) |
const |
|
inlineinherited |
Get the mask specified by the full key.
- Parameters
-
The mask index must be smaller than the total number of masks available in this helper. The result will be undefined otherwise.
Definition at line 134 of file ModuleKeyHelper.h.
147 return static_cast<T>(1
u);
◆ getMaskIdx()
static constexpr unsigned short InDet::ModuleKeyHelper< unsigned short , T_ROW_BITS, T_COL_BITS, T_CHIP_BITS, T_MASK_SEL_BITS, T_N_MASKS >::getMaskIdx |
( |
unsigned short |
key | ) |
|
|
inlinestaticconstexprinherited |
◆ getRow()
static constexpr unsigned short InDet::ModuleKeyHelper< unsigned short , T_ROW_BITS, T_COL_BITS, T_CHIP_BITS, T_MASK_SEL_BITS, T_N_MASKS >::getRow |
( |
unsigned short |
key | ) |
|
|
inlinestaticconstexprinherited |
◆ getStripMask()
static constexpr unsigned int InDet::StripModuleHelper::getStripMask |
( |
| ) |
|
|
inlinestaticconstexpr |
Definition at line 28 of file StripModuleHelper.h.
28 {
return MaskUtils::createMask<0,ROW_BITS+CHIP_BITS>(); }
◆ hardwareCoordinates()
KEY_TYPE InDet::StripModuleHelper::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 57 of file StripModuleHelper.h.
◆ isMatchingDefect()
bool InDet::StripModuleHelper::isMatchingDefect |
( |
unsigned int |
key_ref, |
|
|
unsigned int |
key_test |
|
) |
| const |
|
inline |
Test whether the given packed hardware coordinates match the given defect.
- Parameters
-
key_ref | the packed "coordinates" of the defect |
key_test | the packed coordinates of a strip. |
Definition at line 101 of file StripModuleHelper.h.
◆ isOverlapping()
bool InDet::ModuleKeyHelper< unsigned short , T_ROW_BITS, T_COL_BITS, T_CHIP_BITS, T_MASK_SEL_BITS, T_N_MASKS >::isOverlapping |
( |
unsigned short |
key_ref, |
|
|
unsigned short |
key_test |
|
) |
| const |
|
inlineinherited |
Test whether a single cell (e.g.
pixel or strip) key is compatible with a defect key
- Parameters
-
key_ref | a defect key |
key_test | a single cell (e.g. pixel or strip) key. The defect key can be either the key of a single cell (e.g. pixel or strip) or the first cell (e.g. pixel or strip) of a group, which is fully identified by this key and the mask also specified by the key and which can be obtained by getMask. |
Definition at line 195 of file ModuleKeyHelper.h.
198 return (key_ref &
mask) == (key_test &
mask);
201 return key_ref == key_test;
◆ makeKey()
static constexpr unsigned short InDet::ModuleKeyHelper< unsigned short , T_ROW_BITS, T_COL_BITS, T_CHIP_BITS, T_MASK_SEL_BITS, T_N_MASKS >::makeKey |
( |
unsigned int |
mask_sel, |
|
|
unsigned int |
chip, |
|
|
unsigned int |
col, |
|
|
unsigned int |
row = 0u |
|
) |
| |
|
inlinestaticconstexprprotectedinherited |
Create a key from mask, chip, column and row indices.
- Parameters
-
mask_sel | the index of a mask starting from zero |
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 89 of file ModuleKeyHelper.h.
90 return makeKeyPart<MASK_SEL_SHIFT,MASK_SEL_MASK>(mask_sel)
91 | makeKeyPart<CHIP_SHIFT,CHIP_MASK>(chip)
92 | makeKeyPart<COL_SHIFT,COL_MASK>(
col)
93 | makeKeyPart<ROW_SHIFT,ROW_MASK>(
row);
◆ makeKeyPart()
static constexpr unsigned short InDet::ModuleKeyHelper< unsigned short , T_ROW_BITS, T_COL_BITS, T_CHIP_BITS, T_MASK_SEL_BITS, T_N_MASKS >::makeKeyPart |
( |
[[maybe_unused] ] unsigned short |
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 71 of file ModuleKeyHelper.h.
72 if constexpr(
MASK==0) {
76 assert (((
val << SHIFT) &
MASK) == (
val << SHIFT));
77 return (
val << SHIFT);
◆ maskedKey() [1/2]
unsigned int InDet::ModuleKeyHelper< unsigned short , T_ROW_BITS, T_COL_BITS, T_CHIP_BITS, T_MASK_SEL_BITS, T_N_MASKS >::maskedKey |
( |
[[maybe_unused] ] unsigned int |
mask_idx, |
|
|
unsigned int |
chip, |
|
|
unsigned int |
col, |
|
|
unsigned int |
row = 0u |
|
) |
| const |
|
inlineinherited |
Create a key for a group defect.
- Parameters
-
mask_idx | the index of mask associated to this group defect |
chip | the chip index of one cell (e.g. pixel or strip) of this group defect |
column | the column index of one cell (e.g. pixel or strip) of this group defect |
row | the row index of one cell (e.g. pixel or strip) of this group defect |
The resulting key will be the key of the first cell (e.g. pixel or strip) of this group defect, and the mask index will be set accordingly.
Definition at line 160 of file ModuleKeyHelper.h.
162 assert( mask_idx <
m_masks.size());
◆ maskedKey() [2/2]
unsigned int InDet::ModuleKeyHelper< unsigned short , T_ROW_BITS, T_COL_BITS, T_CHIP_BITS, T_MASK_SEL_BITS, T_N_MASKS >::maskedKey |
( |
unsigned int |
mask_idx, |
|
|
unsigned int |
key |
|
) |
| const |
|
inlineinherited |
Turn a single cell (e.g.
pixel or strip) defect key into a group defect key.
- Parameters
-
mask_idx | the index of mask associated to this group defect |
key | single pixel key |
The resulting key will be the key of the first pixel of this group defect, and the mask index will be set accordingly.
Definition at line 177 of file ModuleKeyHelper.h.
179 assert( mask_idx <
m_masks.size());
◆ nCells()
unsigned int InDet::StripModuleHelper::nCells |
( |
| ) |
const |
|
inline |
◆ nElements()
unsigned int InDet::StripModuleHelper::nElements |
( |
[[maybe_unused] ] unsigned int |
mask_i | ) |
const |
|
inline |
return the maximum number of unique mask (or group) defects per module.
For strips there is a single mask which covers all strips.
Definition at line 92 of file StripModuleHelper.h.
◆ nMasks()
static constexpr unsigned int InDet::ModuleKeyHelper< unsigned short , T_ROW_BITS, T_COL_BITS, T_CHIP_BITS, T_MASK_SEL_BITS, T_N_MASKS >::nMasks |
|
inlinestaticconstexprinherited |
◆ nSensorColumns()
unsigned int InDet::StripModuleHelper::nSensorColumns |
( |
| ) |
const |
|
inline |
Number of offline columns aka.
upper bound of eta index
Definition at line 81 of file StripModuleHelper.h.
◆ nSensorRows()
unsigned int InDet::StripModuleHelper::nSensorRows |
( |
| ) |
const |
|
inline |
◆ offlineRange()
std::array<unsigned int,4> InDet::StripModuleHelper::offlineRange |
( |
unsigned int |
key | ) |
const |
|
inline |
Convenience function to return offline column and row ranges matching the defect-area of the given key (for histogramming.
- Parameters
-
key | packed hardware coordinates addressing a single strip (or a group defect) |
- Returns
- offline start column, end column, start row, end row, where the end is meant not to be inclusive i.e. [start, end)
Definition at line 109 of file StripModuleHelper.h.
111 if (mask_index !=0) {
113 throw std::runtime_error(
"invalid key");
129 column_end =
columns() - column_end -1;
162 return std::array<unsigned int,4>{
row,
row + 1,
◆ operator bool()
InDet::StripModuleHelper::operator bool |
( |
| ) |
const |
|
inline |
◆ rows()
unsigned int InDet::StripModuleHelper::rows |
( |
| ) |
const |
|
inline |
◆ rowsPerCircuit()
unsigned int InDet::StripModuleHelper::rowsPerCircuit |
( |
| ) |
const |
|
inline |
◆ swapOfflineRowsColumns()
static constexpr bool InDet::StripModuleHelper::swapOfflineRowsColumns |
( |
| ) |
|
|
inlinestaticconstexpr |
◆ CHIP_BITS
constexpr unsigned int InDet::ModuleKeyHelper< unsigned short , T_ROW_BITS, T_COL_BITS, T_CHIP_BITS, T_MASK_SEL_BITS, T_N_MASKS >::CHIP_BITS |
|
staticconstexprinherited |
◆ CHIP_MASK
constexpr unsigned short InDet::ModuleKeyHelper< unsigned short , T_ROW_BITS, T_COL_BITS, T_CHIP_BITS, T_MASK_SEL_BITS, T_N_MASKS >::CHIP_MASK |
|
staticconstexprinherited |
◆ CHIP_SHIFT
constexpr unsigned short InDet::ModuleKeyHelper< unsigned short , T_ROW_BITS, T_COL_BITS, T_CHIP_BITS, T_MASK_SEL_BITS, T_N_MASKS >::CHIP_SHIFT |
|
staticconstexprinherited |
◆ COL_BITS
constexpr unsigned int InDet::ModuleKeyHelper< unsigned short , T_ROW_BITS, T_COL_BITS, T_CHIP_BITS, T_MASK_SEL_BITS, T_N_MASKS >::COL_BITS |
|
staticconstexprinherited |
◆ COL_MASK
constexpr unsigned short InDet::ModuleKeyHelper< unsigned short , T_ROW_BITS, T_COL_BITS, T_CHIP_BITS, T_MASK_SEL_BITS, T_N_MASKS >::COL_MASK |
|
staticconstexprinherited |
◆ COL_SHIFT
constexpr unsigned short InDet::ModuleKeyHelper< unsigned short , T_ROW_BITS, T_COL_BITS, T_CHIP_BITS, T_MASK_SEL_BITS, T_N_MASKS >::COL_SHIFT |
|
staticconstexprinherited |
◆ m_columns
unsigned short InDet::StripModuleHelper::m_columns = 0 |
|
private |
◆ m_masks
std::conditional< (N_MASKS>0), std::array<unsigned short , MASKS_SIZE>, Empty>::type InDet::ModuleKeyHelper< unsigned short , T_ROW_BITS, T_COL_BITS, T_CHIP_BITS, T_MASK_SEL_BITS, T_N_MASKS >::m_masks |
|
protectedinherited |
◆ m_rows
unsigned short InDet::StripModuleHelper::m_rows = 0 |
|
private |
◆ MASK_SEL_BITS
constexpr unsigned int InDet::ModuleKeyHelper< unsigned short , T_ROW_BITS, T_COL_BITS, T_CHIP_BITS, T_MASK_SEL_BITS, T_N_MASKS >::MASK_SEL_BITS |
|
staticconstexprinherited |
◆ MASK_SEL_MASK
constexpr unsigned short InDet::ModuleKeyHelper< unsigned short , T_ROW_BITS, T_COL_BITS, T_CHIP_BITS, T_MASK_SEL_BITS, T_N_MASKS >::MASK_SEL_MASK |
|
staticconstexprinherited |
◆ MASK_SEL_SHIFT
constexpr unsigned short InDet::ModuleKeyHelper< unsigned short , T_ROW_BITS, T_COL_BITS, T_CHIP_BITS, T_MASK_SEL_BITS, T_N_MASKS >::MASK_SEL_SHIFT |
|
staticconstexprinherited |
◆ MASKS_SIZE
constexpr unsigned int InDet::ModuleKeyHelper< unsigned short , T_ROW_BITS, T_COL_BITS, T_CHIP_BITS, T_MASK_SEL_BITS, T_N_MASKS >::MASKS_SIZE |
|
staticconstexprinherited |
◆ N_MASKS
constexpr unsigned int InDet::ModuleKeyHelper< unsigned short , T_ROW_BITS, T_COL_BITS, T_CHIP_BITS, T_MASK_SEL_BITS, T_N_MASKS >::N_MASKS |
|
staticconstexprinherited |
◆ ROW_BITS
constexpr unsigned int InDet::ModuleKeyHelper< unsigned short , T_ROW_BITS, T_COL_BITS, T_CHIP_BITS, T_MASK_SEL_BITS, T_N_MASKS >::ROW_BITS |
|
staticconstexprinherited |
◆ ROW_MASK
constexpr unsigned short InDet::ModuleKeyHelper< unsigned short , T_ROW_BITS, T_COL_BITS, T_CHIP_BITS, T_MASK_SEL_BITS, T_N_MASKS >::ROW_MASK |
|
staticconstexprinherited |
◆ ROW_SHIFT
constexpr unsigned short InDet::ModuleKeyHelper< unsigned short , T_ROW_BITS, T_COL_BITS, T_CHIP_BITS, T_MASK_SEL_BITS, T_N_MASKS >::ROW_SHIFT |
|
staticconstexprinherited |
The documentation for this class was generated from the following file:
static constexpr unsigned int columnsPerCircuit()
static constexpr unsigned short getChip(unsigned short key)
Get the column index from a full key.
static constexpr unsigned int circuitsPerRow()
static constexpr unsigned short ROW_SHIFT
static constexpr unsigned short MASK_SEL_SHIFT
static constexpr unsigned int N_MASKS
int cells() const
number of readout stips within module side:
@ u
Enums for curvilinear frames.
static constexpr unsigned short CHIP_SHIFT
unsigned int nCells() const
Return the total number strips of this module.
unsigned int rowsPerCircuit() const
static constexpr unsigned short getColumn(unsigned short key)
Get the column index from a full key.
static constexpr unsigned short makeKey(unsigned int mask_sel, unsigned int chip, unsigned int col, unsigned int row=0u)
Create a key from mask, chip, column and row indices.
static constexpr unsigned short CHIP_MASK
static constexpr unsigned int circuitsPerColumn()
static constexpr bool swapOfflineRowsColumns()
static constexpr unsigned int columnsPerMask([[maybe_unused]] unsigned int mask_idx)
static constexpr unsigned short getRow(unsigned short key)
Get the row index from a full key.
std::conditional<(N_MASKS >0), std::array< unsigned short, MASKS_SIZE >, Empty >::type m_masks
the masks for this helper.
static constexpr unsigned short MASK_SEL_MASK
unsigned int columns() const
static constexpr unsigned short ROW_MASK
bool isOverlapping(unsigned short key_ref, unsigned short key_test) const
Test whether a single cell (e.g.
static constexpr unsigned short getMaskIdx(unsigned short key)
Get the mask index from a full key.
unsigned short getMask(unsigned short key) const
Get the mask specified by the full key.
static constexpr unsigned short COL_MASK
static constexpr unsigned short COL_SHIFT