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;
37
38 enum class Status {
39 OnTrack = 0,
43 };
44
45 static std::string toString(const HitCategory c);
47 static std::string toString(const Status s);
54 const Status status,
55 const LayerIndex layer,
56 const bool isSmall) const;
57
64 value_type& value(const HitCategory cat,
65 const Status status,
66 const LayerIndex layer,
67 const bool isSmall);
69 friend std::ostream& operator<<(std::ostream& ostr, const HitSummary& sum){
70 sum.print(ostr);
71 return ostr;
72 }
73 private:
80 unsigned translate(const HitCategory cat,
81 const Status status,
82 LayerIndex layer,
83 const bool isSmall) const;
85 void print(std::ostream& ostr) const;
87 using Counter_t = std::array<value_type, Acts::toUnderlying(HitCategory::nCategories) *
88 (Acts::toUnderlying(LayerIndex::LayerIndexMax) -1)*
89 Acts::toUnderlying(Status::MaxValue) * 2>;
90
92 };
93}
94
95#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:69
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:87
Counter_t m_counts
Definition HitSummary.h:91
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
@ TriggerPhi
Trigger eta hits (Tgc, Rpc)
Definition HitSummary.h:32
@ sTgcPad
Trigger phi hits (Tgc, Rpc)
Definition HitSummary.h:33
@ TriggerEta
Precision hits (Mdt, NSW) on track.
Definition HitSummary.h:31
HitSummary()=default
Default constructor.
Status
Contribution to the track fit.
Definition HitSummary.h:38
@ Hole
Added to the trajectory but rejected.
Definition HitSummary.h:41
@ Outlier
Added to the trajectory & contributing to the fit.
Definition HitSummary.h:40
@ MaxValue
Expected hit but missing.
Definition HitSummary.h:42
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.