![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
4 #ifndef ACTSTRK_HITSUMMARYDATAUTILS_H
5 #define ACTSTRK_HITSUMMARYDATAUTILS_H 1
17 class SiDetectorElementCollection;
23 template <
typename T_EnumClass >
28 namespace HitCategory {
68 constexpr
static unsigned short makeKey(
unsigned short region,
unsigned short layer,
int eta_mod) {
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,
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) {
206 template <
unsigned short HIT_
SELECTION>
210 for (
auto &[stat_key, stat_hits, stat_outlier_hits] :
m_stat) {
216 total += stat_outlier_hits;
224 std::vector< std::tuple<unsigned short, uint8_t, uint8_t> >
m_stat;
228 static constexpr std::array<uint8_t, unknown+1>
s_type
251 double inv_n =
m_n>0 ? 1/
m_n : 0 ;
256 double inv_n =
m_n>0 ? 1./
m_n : 0 ;
272 const typename ActsTrk::TrackContainer::ConstTrackProxy &
track,
276 &measurement_to_summary_type,
277 SumOfValues &chi2_stat_out,
278 HitSummaryData &hit_info_out,
279 std::vector<ActsTrk::TrackStateBackend::ConstTrackStateProxy::IndexType > ¶m_state_idx_out,
This is an Identifier helper class for the Pixel subdetector. This class is a factory for creating co...
constexpr static unsigned short LAYER_MASK
This is an Identifier helper class for the SCT subdetector. This class is a factory for creating comp...
void mean(std::vector< double > &bins, std::vector< double > &values, const std::vector< std::string > &files, const std::string &histname, const std::string &tplotname, const std::string &label="")
constexpr static unsigned short LAYER_REGION_MASK
constexpr static unsigned short SIGNED_ETA_MOD_MASK
Helper class to gather statistics and compute the biased variance.
std::array< uint8_t, Total+1 > m_hits
void gatherTrackSummaryData(const ActsTrk::TrackContainer &tracksContainer, const typename ActsTrk::TrackContainer::ConstTrackProxy &track, const std::array< const InDetDD::SiDetectorElementCollection *, to_underlying(xAOD::UncalibMeasType::nTypes)> &siDetEleColl, const std::array< unsigned short, to_underlying(xAOD::UncalibMeasType::nTypes)> &measurement_to_summary_type, SumOfValues &chi2_stat_out, HitSummaryData &hit_info_out, std::vector< ActsTrk::TrackStateBackend::ConstTrackStateProxy::IndexType > ¶m_state_idx_out, std::array< std::array< uint8_t, to_underlying(HitCategory::N)>, to_underlying(xAOD::UncalibMeasType::nTypes)> &special_hit_counts_out)
Helper to gather track summary information from the track states of the specified track.
constexpr std::underlying_type< T_EnumClass >::type to_underlying(T_EnumClass an_enum)
Helper to convert class enum into an integer.
@ u
Enums for curvilinear frames.
uint8_t sum(DetectorRegion region, uint8_t layer) const
return the total number of hits, outliers or hits+outliers in the givrn detector region and layer.
const AtlasDetectorID * getIdHelper() const
Returns the id helper (inline)
void reset()
reset all summary counters to zero.
uint8_t contributingHits(DetectorRegion region) const
return the number of hits in a certain detector region.
uint8_t contributingOutlierHits(DetectorRegion region) const
return the number of outliers in a certain detector region.
constexpr static unsigned short REGION_MASK
DetectorRegion
Regions for which hit counts are computed.
bool addHit(const InDetDD::SiDetectorElementCollection *detector_elements, unsigned int id_hash, EHitSelection hit_selection)
update summaries to take the given hit into account.
constexpr static unsigned short SIGNED_ETA_MOD_BITS
std::array< double, 2 > meanAndBiasedVariance() const
virtual DetectorType type() const
Type of element.
std::array< uint8_t, Total+1 > m_outlierHits
int layer_disk(const Identifier &id) const
int eta_module(const Identifier &id) const
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.
int layer_disk(const Identifier &id) const
void computeSummaries()
Compute the varius summaries.
std::array< uint8_t, Total+1 > m_layers
int eta_module(const Identifier &id) const
static constexpr std::array< uint8_t, unknown+1 > s_type
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
double biasedVariance() const
constexpr static uint8_t layerFromKey(unsigned short key)
extract the layer index from the given key.
uint8_t contributingLayers(DetectorRegion region) const
return the number of layers contributing to the hit collection in the given detector region.
constexpr static unsigned short REGION_BITS
virtual const SiDetectorDesign & design() const override final
access to the local description (inline):
constexpr static DetectorRegion regionFromKey(unsigned short key)
extract the region index from the given key.
virtual Identifier identify() const override final
identifier of this detector element (inline)
constexpr static unsigned short LAYER_BITS
Helper class to gather hit summary information for e.g.
std::vector< std::tuple< unsigned short, uint8_t, uint8_t > > m_stat