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#include "Acts/Utilities/OstreamFormatter.hpp"
13
14#include <ostream>
15#include <cstdint>
16
17namespace MuonR4{
23 struct HitSummary{
24 using value_type = std::uint8_t;
28 HitSummary() = default;
38
39 enum class Status {
40 OnTrack = 0,
44 };
45
46 static std::string toString(const HitCategory c);
47
48 friend std::ostream& operator<<(std::ostream& ostr, const HitCategory c) {
49 return (ostr<<toString(c));
50 }
51
52 static std::string toString(const Status s);
53
54 friend std::ostream& operator<<(std::ostream& ostr, const Status s) {
55 return (ostr<<toString(s));
56 }
57
63 const Status status,
64 const LayerIndex layer,
65 const bool isSmall) const;
66
73 value_type& value(const HitCategory cat,
74 const Status status,
75 const LayerIndex layer,
76 const bool isSmall);
78 friend std::ostream& operator<<(std::ostream& ostr, const HitSummary& sum){
79 sum.print(ostr);
80 return ostr;
81 }
82 private:
89 unsigned translate(const HitCategory cat,
90 const Status status,
91 LayerIndex layer,
92 const bool isSmall) const;
94 void print(std::ostream& ostr) const;
96 using Counter_t = std::array<value_type, Acts::toUnderlying(HitCategory::nCategories) *
97 (Acts::toUnderlying(LayerIndex::LayerIndexMax) -1)*
98 Acts::toUnderlying(Status::MaxValue) * 2>;
99
101 };
102}
105
106
107#endif
ACTS_OSTREAM_FORMATTER(MuonR4::HitSummary::Status)
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:24
friend std::ostream & operator<<(std::ostream &ostr, const HitCategory c)
Definition HitSummary.h:48
Muon::MuonStationIndex::LayerIndex LayerIndex
Abrivation of the layer index.
Definition HitSummary.h:26
friend std::ostream & operator<<(std::ostream &ostr, const HitSummary &sum)
Output string stream operator.
Definition HitSummary.h:78
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:30
@ TriggerPhi
Trigger eta hits (Tgc, Rpc).
Definition HitSummary.h:33
@ sTgcPad
Trigger phi hits (Tgc, Rpc).
Definition HitSummary.h:34
@ TriggerEta
Precision hits (Mdt, NSW) on track.
Definition HitSummary.h:32
friend std::ostream & operator<<(std::ostream &ostr, const Status s)
Definition HitSummary.h:54
HitSummary()=default
Default constructor.
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:96
Status
Contribution to the track fit.
Definition HitSummary.h:39
@ Hole
Added to the trajectory but rejected.
Definition HitSummary.h:42
@ Outlier
Added to the trajectory & contributing to the fit.
Definition HitSummary.h:41
@ MaxValue
Expected hit but missing.
Definition HitSummary.h:43
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.