ATLAS Offline Software
Loading...
Searching...
No Matches
HitSummary.h
Go to the documentation of this file.
1
2
3/*
4 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
5*/
6#ifndef MUONTRACKEVENT_HITSUMMARY_H
7#define MUONTRACKEVENT_HITSUMMARY_H
8
9
11#include "Acts/Utilities/Helpers.hpp"
12
13#include <ostream>
14#include <cstdint>
15
16namespace MuonR4{
22 struct HitSummary{
23 using value_type = std::uint8_t;
27 HitSummary() = default;
35
36 enum class Status {
37 OnTrack = 0,
41 };
42
43 static std::string toString(const HitCategory c);
45 static std::string toString(const Status s);
52 const Status status,
53 const LayerIndex layer,
54 const bool isSmall) const;
55
62 value_type& value(const HitCategory cat,
63 const Status status,
64 const LayerIndex layer,
65 const bool isSmall);
67 friend std::ostream& operator<<(std::ostream& ostr, const HitSummary& sum){
68 sum.print(ostr);
69 return ostr;
70 }
71 private:
78 unsigned translate(const HitCategory cat,
79 const Status status,
80 LayerIndex layer,
81 const bool isSmall) const;
83 void print(std::ostream& ostr) const;
85 using Counter_t = std::array<value_type, Acts::toUnderlying(HitCategory::nCategories) *
86 (Acts::toUnderlying(LayerIndex::LayerIndexMax) -1)*
87 Acts::toUnderlying(Status::MaxValue) * 2>;
88
90 };
91}
92
93#endif
This header ties the generic definitions in this package.
MuonR4::HitSummary::Status Status
bool isSmall(const ChIndex index)
Returns true if the chamber index is in a small sector.
LayerIndex
enum to classify the different layers in the muon spectrometer
void print(std::ostream &ostr) const
Print the summary as an ASCII table.
std::uint8_t value_type
Definition HitSummary.h:23
Muon::MuonStationIndex::LayerIndex LayerIndex
Abrivation of the layer index.
Definition HitSummary.h:25
friend std::ostream & operator<<(std::ostream &ostr, const HitSummary &sum)
Output string stream operator.
Definition HitSummary.h:67
std::array< value_type, Acts::toUnderlying(HitCategory::nCategories) *(Acts::toUnderlying(LayerIndex::LayerIndexMax) -1) * Acts::toUnderlying(Status::MaxValue) *2 > Counter_t
Abrivation to store the hits per layer.
Definition HitSummary.h:85
Counter_t m_counts
Definition HitSummary.h:89
unsigned translate(const HitCategory cat, const Status status, LayerIndex layer, const bool isSmall) const
Translates the 4 classification indices to a unique consecutive number (used for storage access)
static std::string toString(const HitCategory c)
Converts the hit category to a string.
HitCategory
Category of the hit.
Definition HitSummary.h:29
@ nCategories
Trigger phi hits (Tgc, Rpc)
Definition HitSummary.h:33
@ TriggerPhi
Trigger eta hits (Tgc, Rpc)
Definition HitSummary.h:32
@ TriggerEta
Precision hits (Mdt, NSW) on track.
Definition HitSummary.h:31
HitSummary()=default
Default constructor.
Status
Contribution to the track fit.
Definition HitSummary.h:36
@ Hole
Added to the trajectory but rejected.
Definition HitSummary.h:39
@ Outlier
Added to the trajectory & contributing to the fit.
Definition HitSummary.h:38
@ MaxValue
Expected hit but missing.
Definition HitSummary.h:40
value_type value(const HitCategory cat, const Status status, const LayerIndex layer, const bool isSmall) const
Returns the value type for a defined hit category & layer.