Helper class to gather hit summary information for e.g.
More...
#include <HitSummaryDataUtils.h>
|
enum | DetectorRegion {
pixelBarrelFlat = 0,
pixelBarrelInclined = 1,
pixelEndcap = 2,
stripBarrel = 3,
stripEndcap = 4,
unknown = 5,
pixelTotal = 6,
stripTotal = 7,
unknownTotal = 8,
Total = 9
} |
| Regions for which hit counts are computed. More...
|
|
enum | EHitSelection { Hit = 1,
Outlier = 2,
HitAndOutlier = 3
} |
|
|
constexpr static unsigned short | makeKey (unsigned short region, unsigned short layer, int eta_mod) |
| Compute a counter key for the given region, layer and module eta module index. More...
|
|
constexpr static DetectorRegion | regionFromKey (unsigned short key) |
| extract the region index from the given key. More...
|
|
constexpr static uint8_t | layerFromKey (unsigned short key) |
| extract the layer index from the given key. More...
|
|
Helper class to gather hit summary information for e.g.
tracks.
Definition at line 38 of file HitSummaryDataUtils.h.
◆ DetectorRegion
Regions for which hit counts are computed.
Enumerator |
---|
pixelBarrelFlat | |
pixelBarrelInclined | |
pixelEndcap | |
stripBarrel | |
stripEndcap | |
unknown | |
pixelTotal | |
stripTotal | |
unknownTotal | |
Total | |
Definition at line 42 of file HitSummaryDataUtils.h.
◆ EHitSelection
◆ addHit()
update summaries to take the given hit into account.
- Parameters
-
detector_elements | detector element collection relevant for the given hit. |
id_hash | the id_hash of the hit |
hit_selection | should be set to either Hit, or Outlier. |
returns | false in case the hit was not considered. The hit is not considered if the given id_hash is not valid for the given detector element collectio. |
Definition at line 117 of file HitSummaryDataUtils.h.
118 if (!detector_elements || id_hash>=detector_elements->size() || !(*detector_elements)[id_hash]) {
135 else if (detEl->
isSCT()) {
144 for (
auto &[stat_key, stat_hits, stat_outlier_hits] :
m_stat) {
145 if (stat_key ==
key) {
151 m_stat.emplace_back( std::make_tuple(
key,
◆ computeSummaries()
void ActsTrk::HitSummaryData::computeSummaries |
( |
| ) |
|
|
inline |
Compute the varius summaries.
Must be called only after all hits have been gathered, and must not be called more than once.
Definition at line 160 of file HitSummaryDataUtils.h.
161 for (
const auto &[stat_key, stat_hits, stat_outlier_hits] :
m_stat) {
163 m_hits.at(region) += stat_hits;
167 for (
unsigned int region_i=0; region_i<
unknown+1; ++region_i) {
◆ contributingHits()
uint8_t ActsTrk::HitSummaryData::contributingHits |
( |
DetectorRegion |
region | ) |
const |
|
inline |
return the number of hits in a certain detector region.
- Parameters
-
Definition at line 189 of file HitSummaryDataUtils.h.
◆ contributingLayers()
uint8_t ActsTrk::HitSummaryData::contributingLayers |
( |
DetectorRegion |
region | ) |
const |
|
inline |
return the number of layers contributing to the hit collection in the given detector region.
- Parameters
-
Definition at line 181 of file HitSummaryDataUtils.h.
◆ contributingOutlierHits()
uint8_t ActsTrk::HitSummaryData::contributingOutlierHits |
( |
DetectorRegion |
region | ) |
const |
|
inline |
return the number of outliers in a certain detector region.
- Parameters
-
Definition at line 197 of file HitSummaryDataUtils.h.
◆ layerFromKey()
constexpr static uint8_t ActsTrk::HitSummaryData::layerFromKey |
( |
unsigned short |
key | ) |
|
|
inlinestaticconstexpr |
◆ makeKey()
constexpr static unsigned short ActsTrk::HitSummaryData::makeKey |
( |
unsigned short |
region, |
|
|
unsigned short |
layer, |
|
|
int |
eta_mod |
|
) |
| |
|
inlinestaticconstexpr |
Compute a counter key for the given region, layer and module eta module index.
- Parameters
-
region | the detector region index (0..7). |
layer | the layer index (0..63). |
the | signed eta module index (-63..63). |
Definition at line 68 of file HitSummaryDataUtils.h.
◆ regionFromKey()
constexpr static DetectorRegion ActsTrk::HitSummaryData::regionFromKey |
( |
unsigned short |
key | ) |
|
|
inlinestaticconstexpr |
◆ reset()
void ActsTrk::HitSummaryData::reset |
( |
| ) |
|
|
inline |
◆ sum()
template<unsigned short HIT_SELECTION>
uint8_t ActsTrk::HitSummaryData::sum |
( |
DetectorRegion |
region, |
|
|
uint8_t |
layer |
|
) |
| const |
|
inline |
return the total number of hits, outliers or hits+outliers in the givrn detector region and layer.
- Parameters
-
region | the detector region. |
layer | the detector layer. |
Definition at line 207 of file HitSummaryDataUtils.h.
210 for (
auto &[stat_key, stat_hits, stat_outlier_hits] :
m_stat) {
216 total += stat_outlier_hits;
◆ LAYER_BITS
constexpr static unsigned short ActsTrk::HitSummaryData::LAYER_BITS = 6 |
|
staticconstexpr |
◆ LAYER_MASK
constexpr static unsigned short ActsTrk::HitSummaryData::LAYER_MASK = 0x3F |
|
staticconstexpr |
◆ LAYER_REGION_MASK
constexpr static unsigned short ActsTrk::HitSummaryData::LAYER_REGION_MASK = 0x1FF |
|
staticconstexpr |
◆ m_hits
std::array<uint8_t, Total+1> ActsTrk::HitSummaryData::m_hits |
|
private |
◆ m_layers
std::array<uint8_t, Total+1> ActsTrk::HitSummaryData::m_layers |
|
private |
◆ m_outlierHits
std::array<uint8_t, Total+1> ActsTrk::HitSummaryData::m_outlierHits |
|
private |
◆ m_stat
std::vector< std::tuple<unsigned short, uint8_t, uint8_t> > ActsTrk::HitSummaryData::m_stat |
|
private |
◆ REGION_BITS
constexpr static unsigned short ActsTrk::HitSummaryData::REGION_BITS = 3 |
|
staticconstexpr |
◆ REGION_MASK
constexpr static unsigned short ActsTrk::HitSummaryData::REGION_MASK = 0x7 |
|
staticconstexpr |
◆ s_type
◆ SIGNED_ETA_MOD_BITS
constexpr static unsigned short ActsTrk::HitSummaryData::SIGNED_ETA_MOD_BITS = 7 |
|
staticconstexpr |
◆ SIGNED_ETA_MOD_MASK
constexpr static unsigned short ActsTrk::HitSummaryData::SIGNED_ETA_MOD_MASK = 0x7F |
|
staticconstexpr |
The documentation for this class was generated from the following file:
constexpr static unsigned short makeKey(unsigned short region, unsigned short layer, int eta_mod)
Compute a counter key for the given region, layer and module eta module index.