|
ATLAS Offline Software
|
Go to the documentation of this file.
4 #ifndef INDET_PIXELMODULEHELPER_H
5 #define INDET_PIXELMODULEHELPER_H
15 template<
unsigned int bit,
unsigned int end>
16 static consteval
unsigned int createMask() {
19 if constexpr(bit>31
u) {
22 else if constexpr(bit>=
end) {
26 return (1
u<<bit) | createMask<bit+1u,end>();
40 static constexpr
unsigned int CHIP_MASK = MaskUtils::createMask<24,28>();
41 static constexpr
unsigned int COL_MASK = MaskUtils::createMask<12,24>();
42 static constexpr
unsigned int ROW_MASK = MaskUtils::createMask<0,12>();
140 static constexpr
unsigned int getChip(
unsigned int hardware_coordinates) {
143 static constexpr
unsigned int getRow(
unsigned int hardware_coordinates) {
146 static constexpr
unsigned int getColumn(
unsigned int hardware_coordinates) {
160 return (key_ref & mask_out_rows_and_cols_per_group)
161 == (key_test & mask_out_rows_and_cols_per_group);
166 constexpr
static bool isSameDefect(
unsigned int key_ref,
unsigned int key_test) {
195 throw std::runtime_error(
"invalid key");
211 column_end =
columns() - column_end -1;
244 return std::array<unsigned int,4>{
row,
row + 1,
static constexpr bool inSameColumnGroup(unsigned int key_ref, unsigned int key_test)
Test whether the two packed hardware coorindates refer to the same column group.
constexpr static bool isSameDefectWithGroups(unsigned int key_ref, unsigned int key_test)
Convenience function to test whether the given packed hardware coordinates refer to overlapping defec...
int columns() const
Number of cell columns per module:
unsigned short m_columnsPerCircuit
Helper class to convert between offline column, row and hardware chip, column, row coordinates.
static constexpr unsigned int COLGROUP_DEFECT_BIT_MASK
int rows() const
Number of cell rows per module:
std::array< unsigned int, 4 > offlineRange(unsigned int key) const
Convenience function to return oflline column and row ranges matching the defect-area of the given ke...
unsigned int nPixels() const
bool const RAWDATA *ch2 const
bool swapOfflineRowsColumns() const
const InDetDD::PixelModuleDesign * m_pixelModuleDesign
static constexpr unsigned int ROW_MASK
static constexpr unsigned int getColumn(unsigned int hardware_coordinates)
static constexpr unsigned int N_COLS_PER_GROUP
@ u
Enums for curvilinear frames.
unsigned short m_rowsPerCircuit
static constexpr unsigned int getRow(unsigned int hardware_coordinates)
unsigned char m_circuitsPerRow
int numberOfCircuitsPerColumn() const
Number of circuits per column:
static constexpr unsigned int ROW_SHIFT
static constexpr unsigned int CHIP_SHIFT
unsigned char m_circuitsPerColumn
unsigned int hardwareCoordinates(unsigned int row, unsigned int column) const
compute "hardware" coordinates from offline coordinates.
unsigned int nColumns() const
unsigned int columnGroupDefect(unsigned int row, unsigned int column) const
Create a "column group" defect for the given offline coordinates.
static constexpr unsigned int getChip(unsigned int hardware_coordinates)
static constexpr unsigned int COL_MASK
int numberOfCircuitsPerRow() const
Number of circuits per row:
static constexpr bool isColumnGroupDefect(unsigned int key)
Test whether the column group flag is set in the packed hardware coordinate tripplet.
bool m_swapOfflineRowsColumns
unsigned int rows() const
unsigned int columnsPerCircuit() const
static constexpr unsigned int CHIP_MASK
int rowsPerCircuit() const
Number of cell rows per circuit:
unsigned int rowsPerCircuit() const
static constexpr unsigned int COL_MASK_FOR_GROUP
PixelModuleHelper(const InDetDD::SiDetectorDesign &design)
constexpr static bool isSameDefect(unsigned int key_ref, unsigned int key_test)
Test whether the given packed hardware coordinates refer to the same pixel.
unsigned int circuitsPerRow() const
unsigned int circuitsPerColumn() const
setBGCode setTAP setLVL2ErrorBits bool
int columnsPerCircuit() const
Number of cell columns per circuit:
unsigned int nRows() const
unsigned int columns() const
static constexpr unsigned int COL_SHIFT