![]() |
ATLAS Offline Software
|
Namespaces | |
detail | |
Typedefs | |
using | ModuleData_t = std::array< int, ModuleIdentifierMatchUtil::kAllRows/2 > |
Enumerations | |
enum | EModulePatternPart { kBarrelEndcapSelectRange =0, kLayerRange =2, kEtaRange =4, kPhiRange =6, kColumnStripRange =8, kLength =10, kSideRange =12, kAllRows =14, kNParts =15 } |
The identifier parts used for identifier matching kAllRows denotes the element which contains a flag (0, 1), to specify whether a pattern should match all modules which are connected to the same side of a physical sensor. More... | |
Functions | |
template<ModuleDesignConcept T_ModuleDesign> | |
int | getColumnsOrCells (const T_ModuleDesign &moduleDesign) |
template<bool test_order, typename T > | |
bool | verifyElementCountAndOrder (const std::vector< std::vector< T > > &arr, std::size_t n_expected, [[maybe_unused]] std::size_t test_n=0) |
Test whether the given 2D vector has the expected number of elements, and correct ordering. More... | |
bool | verifyModulePatternList (const std::vector< std::vector< int > > &arr) |
Verify whether a list of module identifier patterns is consistent. More... | |
template<typename T > | |
bool | verifyElementCount (const std::vector< std::vector< T > > &arr, std::size_t n_expected) |
test whether the 2D vector arr has the expected number of elements. More... | |
void | setModuleData (EModulePatternPart part, int value, std::array< int, kAllRows/2 > &dest) |
Convenience function to set the specified element in the given array. More... | |
template<class T_ID , class T_ModuleDesign > | |
void | setModuleData (const T_ID &id_helper, const Identifier &identifier, const T_ModuleDesign &module_design, ModuleData_t &module_data) |
Convenience function to extract various identifier parts and set the given array. More... | |
void | moduleMatches (const std::vector< std::vector< int > > &module_pattern, const ModuleData_t &module_data, std::vector< unsigned int > &module_pattern_idx) |
Test whether an identifier, which is split into various parts, matches some of the given patterns. More... | |
bool | matchesBothSides (const std::vector< int > &a_module_pattern) |
Test whether the given pattern matches identifiers which refer to either side of a sensor. More... | |
bool | isSideMatching (const std::vector< int > &a_module_pattern, int side) |
Test whether the given pattern matches the given side. More... | |
bool | matchesAllModuleRowsOfSensor (const std::vector< int > &a_module_pattern) |
Test whether a pattern matches all module rows of a sensor or just a single row. More... | |
Variables | |
template<typename T_ModuleDesign > | |
concept | HasColumns = requires(T_ModuleDesign design) { design.columns(); } |
template<typename T_ModuleDesign > | |
concept | HasCells = requires(T_ModuleDesign design) { design.cells(); } |
template<typename T_ModuleDesign > | |
concept | ModuleDesignConcept = HasColumns<T_ModuleDesign> || HasCells<T_ModuleDesign> |
using InDet::ModuleIdentifierMatchUtil::ModuleData_t = typedef std::array< int, ModuleIdentifierMatchUtil::kAllRows/2 > |
Definition at line 67 of file ModuleIdentifierMatchUtil.h.
The identifier parts used for identifier matching kAllRows denotes the element which contains a flag (0, 1), to specify whether a pattern should match all modules which are connected to the same side of a physical sensor.
Enumerator | |
---|---|
kBarrelEndcapSelectRange | |
kLayerRange | |
kEtaRange | |
kPhiRange | |
kColumnStripRange | |
kLength | |
kSideRange | |
kAllRows | |
kNParts |
Definition at line 55 of file ModuleIdentifierMatchUtil.h.
int InDet::ModuleIdentifierMatchUtil::getColumnsOrCells | ( | const T_ModuleDesign & | moduleDesign | ) |
Definition at line 40 of file ModuleIdentifierMatchUtil.h.
|
inline |
Test whether the given pattern matches the given side.
Definition at line 186 of file ModuleIdentifierMatchUtil.h.
|
inline |
Test whether a pattern matches all module rows of a sensor or just a single row.
a_module_pattern | a module identifier pattern |
Definition at line 199 of file ModuleIdentifierMatchUtil.h.
|
inline |
Test whether the given pattern matches identifiers which refer to either side of a sensor.
a_module_pattern | a module identifier pattern |
Definition at line 179 of file ModuleIdentifierMatchUtil.h.
|
inline |
Test whether an identifier, which is split into various parts, matches some of the given patterns.
module_pattern | an array which contains ranges for various identifier parts |
module_data | an array which contains various parts of an identifier |
module_pattern_idx | an output vector which will be filled with the indices of matching patterns Will test all "patterns" in module pattern whether they match the given identifier parts. The patterns contain ranges of identifier parts (start and end of the range are inclusive). For a pattern to match, all identifier parts have to be within the allowed range of a pattern. |
Definition at line 150 of file ModuleIdentifierMatchUtil.h.
|
inline |
Convenience function to extract various identifier parts and set the given array.
id_helper | the ID helper e.g. PixelID, SCT_ID to extract various parts from the given identifier |
identifier | the identifier from which the various parts are extracted |
n_columns_or_strips | either the number of columns (e.g. for pixel) or strips |
module_data | the array which will be filled with the identifier parts Fill an array with identifier parts which can be used to match module identifiers. |
Definition at line 129 of file ModuleIdentifierMatchUtil.h.
|
inline |
Convenience function to set the specified element in the given array.
part | specifies the element to set |
value | the value to copy to the array |
dest | the array to which the value is copied |
Definition at line 116 of file ModuleIdentifierMatchUtil.h.
|
inline |
test whether the 2D vector arr has the expected number of elements.
See verifyElementCountAndOrder
Definition at line 107 of file ModuleIdentifierMatchUtil.h.
|
inline |
Test whether the given 2D vector has the expected number of elements, and correct ordering.
test_order | if true test element order otherwise only test element count |
T | element type |
arr | 2D array to be tested |
n_expected | number of elements of in each element vector of the top-level vector |
test_n | number of elements (not pairs) to test when verifying the correct order of element pairs |
Definition at line 81 of file ModuleIdentifierMatchUtil.h.
|
inline |
Verify whether a list of module identifier patterns is consistent.
The function tests whether the given 2D vector has the correct number of elements and whether the element pairs which represent ranges have the expected ascending order. See verifyElementCountAndOrder
Definition at line 99 of file ModuleIdentifierMatchUtil.h.
concept InDet::ModuleIdentifierMatchUtil::HasCells = requires(T_ModuleDesign design) { design.cells(); } |
Definition at line 32 of file ModuleIdentifierMatchUtil.h.
concept InDet::ModuleIdentifierMatchUtil::HasColumns = requires(T_ModuleDesign design) { design.columns(); } |
Definition at line 30 of file ModuleIdentifierMatchUtil.h.
concept InDet::ModuleIdentifierMatchUtil::ModuleDesignConcept = HasColumns<T_ModuleDesign> || HasCells<T_ModuleDesign> |
Definition at line 35 of file ModuleIdentifierMatchUtil.h.