ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Tracking
Acts
ActsMonitoring
src
ActsInspectTruthContentAlg.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef ACTSMONITORING_INSPECTTRUTHCONTENTALG_H
6
#define ACTSMONITORING_INSPECTTRUTHCONTENTALG_H
7
8
#include "
AthenaBaseComps/AthReentrantAlgorithm.h
"
9
#include "
StoreGate/ReadHandleKeyArray.h
"
10
#include "
StoreGate/WriteHandleKey.h
"
11
#include "
ActsEvent/MeasurementToTruthParticleAssociation.h
"
12
#include "
ActsEvent/SeedContainer.h
"
13
#include "
xAODMeasurementBase/MeasurementDefs.h
"
14
#include "
ActsEvent/TrackContainer.h
"
15
16
namespace
ActsTrk
{
17
18
class
ActsInspectTruthContentAlg
19
:
public
AthReentrantAlgorithm
{
20
public
:
21
ActsInspectTruthContentAlg
(
const
std::string& name, ISvcLocator* pSvcLocator);
22
virtual
~ActsInspectTruthContentAlg
()
override
=
default
;
23
24
virtual
StatusCode
initialize
()
override
;
25
virtual
StatusCode
execute
(
const
EventContext& ctx)
const override
;
26
virtual
StatusCode
finalize
()
override
;
27
28
// enum defs
29
enum class
EStatClusters
: std::size_t {
30
kNTotal
,
31
kNClustersFromPrimaries
,
32
kNClustersWithNoBarcode
,
33
kNClustersWith1Contribution
,
34
kNClustersWith1ValidContribution
,
35
kNClustersWith2Contribution
,
36
kNClustersWith2ValidContribution
,
37
kNClustersWith3Contribution
,
38
kNClustersWith3ValidContribution
,
39
kNClustersWith200kBarcode
,
40
kNStat
41
};
42
43
enum class
EStatSeeds
: std::size_t {
44
kNTotal
,
45
nKSeedsWith0Matches
,
46
nKSeedsWith1Matches
,
47
nKSeedsWith2Matches
,
48
nKSeedsSame2Matches
,
49
nKSeedsWith3Matches
,
50
nKSeedsSame3Matches
,
51
nKSeedsWith4Matches
,
52
nKSeedsSame4Matches
,
53
nKSeedsWith5Matches
,
54
nKSeedsSame5Matches
,
55
nKSeedsWith6Matches
,
56
nKSeedsSame6Matches
,
57
kNStat
58
};
59
60
enum class
EStatTracks
: std::size_t {
61
kNTotal
,
62
kNFullMatch
,
63
kNPerfectMatch
,
64
kNTracks0Holes
,
65
kNTracks1Holes
,
66
kNTracks2Holes
,
67
kNTracks3Holes
,
68
kNTracks0Outliers
,
69
kNTracks1Outliers
,
70
kNTracks2Outliers
,
71
kNTracks3Outliers
,
72
kNStat
73
};
74
75
enum class
SeedType
: std::size_t {
76
PPP
,
77
SSS
,
78
PPS
,
79
PSS
,
80
Others
,
81
nTypes
82
};
83
84
enum class
TrackType
: std::size_t {
85
Main
,
86
nTypes
87
};
88
89
private
:
90
static
constexpr
std::size_t
s_nClusterTypes
=
static_cast<
std::size_t
>
(
xAOD::UncalibMeasType::nTypes
);
91
static
constexpr
std::size_t
s_nSeedTypes
=
static_cast<
std::size_t
>
(
SeedType::nTypes
);
92
using
cluster_stat_t
= std::array<
93
std::array<std::size_t, s_nClusterTypes>,
94
static_cast<
std::size_t
>
(
EStatClusters::kNStat
)>;
95
using
seed_stat_t
= std::array<
96
std::array<std::size_t, s_nSeedTypes>,
97
static_cast<
std::size_t
>
(
EStatSeeds::kNStat
)>;
98
using
track_stat_t
= std::array<
99
std::array<std::size_t, 1>,
100
static_cast<
std::size_t
>
(
EStatTracks::kNStat
)>;
101
102
StatusCode
fillStatClusters
(
const
xAOD::UncalibratedMeasurementContainer
& container,
103
const
ActsTrk::MeasurementToTruthParticleAssociation
& truth,
104
cluster_stat_t
& stat)
const
;
105
StatusCode
fillStatSeeds
(
const
ActsTrk::SeedContainer
& seeds,
106
std::array<const ActsTrk::MeasurementToTruthParticleAssociation*, s_nClusterTypes>& truths,
107
seed_stat_t
& stat)
const
;
108
StatusCode
fillStatTracks
(
const
ActsTrk::TrackContainer
& tracks,
109
std::array<const ActsTrk::MeasurementToTruthParticleAssociation*, s_nClusterTypes>& truths,
110
track_stat_t
& trackStat,
111
cluster_stat_t
& onTrackClusterStat)
const
;
112
113
template
<
typename
row_t,
114
typename
coll_t,
115
typename
stat_t>
116
StatusCode
printStatTables
(
const
std::string& objectCollectionName,
117
const
stat_t& stat)
const
;
118
template
<
typename
stat_t>
119
StatusCode
copyStatTable
(
const
stat_t& contextual,
120
stat_t& global)
const
;
121
122
SeedType
deduceSeedType
(
const
ActsTrk::Seed
&)
const
;
123
124
SG::ReadHandleKeyArray<xAOD::UncalibratedMeasurementContainer>
m_clusters
{
this
,
"Clusters"
, {}};
125
SG::ReadHandleKeyArray<ActsTrk::SeedContainer>
m_seeds
{
this
,
"Seeds"
, {}};
126
SG::ReadHandleKeyArray<ActsTrk::MeasurementToTruthParticleAssociation>
m_associationMap_key
{
this
,
"TruthAssociationMaps"
, {}};
127
SG::ReadHandleKeyArray<ActsTrk::TrackContainer>
m_tracks
{
this
,
"Tracks"
, {}};
128
129
private
:
130
mutable
std::mutex m_mutex
ATLAS_THREAD_SAFE
{};
131
mutable
cluster_stat_t
m_clusterStat
ATLAS_THREAD_SAFE
{};
132
mutable
seed_stat_t
m_seedStat
ATLAS_THREAD_SAFE
{};
133
mutable
std::vector<std::pair<std::string, track_stat_t>> m_trackStat
ATLAS_THREAD_SAFE
{};
134
mutable
std::vector<std::pair<std::string, cluster_stat_t>> m_onTrack_clusterStat
ATLAS_THREAD_SAFE
{};
135
136
private
:
137
inline
std::string
to_string
(
xAOD::UncalibMeasType
type
)
const
;
138
inline
std::string
to_string
(
ActsInspectTruthContentAlg::SeedType
type
)
const
;
139
inline
std::string
to_string
(
ActsInspectTruthContentAlg::TrackType
type
)
const
;
140
inline
std::string
to_label
(
ActsInspectTruthContentAlg::EStatClusters
type
)
const
;
141
inline
std::string
to_label
(
ActsInspectTruthContentAlg::EStatSeeds
type
)
const
;
142
inline
std::string
to_label
(
ActsInspectTruthContentAlg::EStatTracks
type
)
const
;
143
};
144
145
}
// namespace
146
147
#include "
src/ActsInspectTruthContentAlg.icc
"
148
149
#endif
ActsInspectTruthContentAlg.icc
AthReentrantAlgorithm.h
MeasurementDefs.h
MeasurementToTruthParticleAssociation.h
SeedContainer.h
ReadHandleKeyArray.h
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
TrackContainer.h
ActsTrk::ActsInspectTruthContentAlg::EStatClusters
EStatClusters
Definition
ActsInspectTruthContentAlg.h:29
ActsTrk::ActsInspectTruthContentAlg::EStatClusters::kNClustersWith1Contribution
@ kNClustersWith1Contribution
Definition
ActsInspectTruthContentAlg.h:33
ActsTrk::ActsInspectTruthContentAlg::EStatClusters::kNClustersWith200kBarcode
@ kNClustersWith200kBarcode
Definition
ActsInspectTruthContentAlg.h:39
ActsTrk::ActsInspectTruthContentAlg::EStatClusters::kNClustersWith2ValidContribution
@ kNClustersWith2ValidContribution
Definition
ActsInspectTruthContentAlg.h:36
ActsTrk::ActsInspectTruthContentAlg::EStatClusters::kNClustersWith3ValidContribution
@ kNClustersWith3ValidContribution
Definition
ActsInspectTruthContentAlg.h:38
ActsTrk::ActsInspectTruthContentAlg::EStatClusters::kNClustersWith3Contribution
@ kNClustersWith3Contribution
Definition
ActsInspectTruthContentAlg.h:37
ActsTrk::ActsInspectTruthContentAlg::EStatClusters::kNTotal
@ kNTotal
Definition
ActsInspectTruthContentAlg.h:30
ActsTrk::ActsInspectTruthContentAlg::EStatClusters::kNClustersFromPrimaries
@ kNClustersFromPrimaries
Definition
ActsInspectTruthContentAlg.h:31
ActsTrk::ActsInspectTruthContentAlg::EStatClusters::kNClustersWith2Contribution
@ kNClustersWith2Contribution
Definition
ActsInspectTruthContentAlg.h:35
ActsTrk::ActsInspectTruthContentAlg::EStatClusters::kNClustersWith1ValidContribution
@ kNClustersWith1ValidContribution
Definition
ActsInspectTruthContentAlg.h:34
ActsTrk::ActsInspectTruthContentAlg::EStatClusters::kNClustersWithNoBarcode
@ kNClustersWithNoBarcode
Definition
ActsInspectTruthContentAlg.h:32
ActsTrk::ActsInspectTruthContentAlg::EStatClusters::kNStat
@ kNStat
Definition
ActsInspectTruthContentAlg.h:40
ActsTrk::ActsInspectTruthContentAlg::m_seeds
SG::ReadHandleKeyArray< ActsTrk::SeedContainer > m_seeds
Definition
ActsInspectTruthContentAlg.h:125
ActsTrk::ActsInspectTruthContentAlg::to_string
std::string to_string(ActsInspectTruthContentAlg::SeedType type) const
ActsTrk::ActsInspectTruthContentAlg::fillStatClusters
StatusCode fillStatClusters(const xAOD::UncalibratedMeasurementContainer &container, const ActsTrk::MeasurementToTruthParticleAssociation &truth, cluster_stat_t &stat) const
Definition
ActsInspectTruthContentAlg.cxx:143
ActsTrk::ActsInspectTruthContentAlg::ATLAS_THREAD_SAFE
std::mutex m_mutex ATLAS_THREAD_SAFE
Definition
ActsInspectTruthContentAlg.h:130
ActsTrk::ActsInspectTruthContentAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition
ActsInspectTruthContentAlg.cxx:76
ActsTrk::ActsInspectTruthContentAlg::to_string
std::string to_string(xAOD::UncalibMeasType type) const
ActsTrk::ActsInspectTruthContentAlg::deduceSeedType
SeedType deduceSeedType(const ActsTrk::Seed &) const
Definition
ActsInspectTruthContentAlg.cxx:274
ActsTrk::ActsInspectTruthContentAlg::track_stat_t
std::array< std::array< std::size_t, 1 >, static_cast< std::size_t >(EStatTracks::kNStat)> track_stat_t
Definition
ActsInspectTruthContentAlg.h:98
ActsTrk::ActsInspectTruthContentAlg::cluster_stat_t
std::array< std::array< std::size_t, s_nClusterTypes >, static_cast< std::size_t >(EStatClusters::kNStat)> cluster_stat_t
Definition
ActsInspectTruthContentAlg.h:92
ActsTrk::ActsInspectTruthContentAlg::printStatTables
StatusCode printStatTables(const std::string &objectCollectionName, const stat_t &stat) const
ActsTrk::ActsInspectTruthContentAlg::m_tracks
SG::ReadHandleKeyArray< ActsTrk::TrackContainer > m_tracks
Definition
ActsInspectTruthContentAlg.h:127
ActsTrk::ActsInspectTruthContentAlg::TrackType
TrackType
Definition
ActsInspectTruthContentAlg.h:84
ActsTrk::ActsInspectTruthContentAlg::TrackType::Main
@ Main
Definition
ActsInspectTruthContentAlg.h:85
ActsTrk::ActsInspectTruthContentAlg::to_label
std::string to_label(ActsInspectTruthContentAlg::EStatTracks type) const
ActsTrk::ActsInspectTruthContentAlg::finalize
virtual StatusCode finalize() override
Definition
ActsInspectTruthContentAlg.cxx:42
ActsTrk::ActsInspectTruthContentAlg::to_string
std::string to_string(ActsInspectTruthContentAlg::TrackType type) const
ActsTrk::ActsInspectTruthContentAlg::copyStatTable
StatusCode copyStatTable(const stat_t &contextual, stat_t &global) const
ActsTrk::ActsInspectTruthContentAlg::ActsInspectTruthContentAlg
ActsInspectTruthContentAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition
ActsInspectTruthContentAlg.cxx:14
ActsTrk::ActsInspectTruthContentAlg::fillStatTracks
StatusCode fillStatTracks(const ActsTrk::TrackContainer &tracks, std::array< const ActsTrk::MeasurementToTruthParticleAssociation *, s_nClusterTypes > &truths, track_stat_t &trackStat, cluster_stat_t &onTrackClusterStat) const
Definition
ActsInspectTruthContentAlg.cxx:305
ActsTrk::ActsInspectTruthContentAlg::EStatSeeds
EStatSeeds
Definition
ActsInspectTruthContentAlg.h:43
ActsTrk::ActsInspectTruthContentAlg::EStatSeeds::nKSeedsWith4Matches
@ nKSeedsWith4Matches
Definition
ActsInspectTruthContentAlg.h:51
ActsTrk::ActsInspectTruthContentAlg::EStatSeeds::nKSeedsWith2Matches
@ nKSeedsWith2Matches
Definition
ActsInspectTruthContentAlg.h:47
ActsTrk::ActsInspectTruthContentAlg::EStatSeeds::nKSeedsWith0Matches
@ nKSeedsWith0Matches
Definition
ActsInspectTruthContentAlg.h:45
ActsTrk::ActsInspectTruthContentAlg::EStatSeeds::nKSeedsSame2Matches
@ nKSeedsSame2Matches
Definition
ActsInspectTruthContentAlg.h:48
ActsTrk::ActsInspectTruthContentAlg::EStatSeeds::nKSeedsWith6Matches
@ nKSeedsWith6Matches
Definition
ActsInspectTruthContentAlg.h:55
ActsTrk::ActsInspectTruthContentAlg::EStatSeeds::nKSeedsWith3Matches
@ nKSeedsWith3Matches
Definition
ActsInspectTruthContentAlg.h:49
ActsTrk::ActsInspectTruthContentAlg::EStatSeeds::nKSeedsSame3Matches
@ nKSeedsSame3Matches
Definition
ActsInspectTruthContentAlg.h:50
ActsTrk::ActsInspectTruthContentAlg::EStatSeeds::nKSeedsWith5Matches
@ nKSeedsWith5Matches
Definition
ActsInspectTruthContentAlg.h:53
ActsTrk::ActsInspectTruthContentAlg::EStatSeeds::nKSeedsWith1Matches
@ nKSeedsWith1Matches
Definition
ActsInspectTruthContentAlg.h:46
ActsTrk::ActsInspectTruthContentAlg::EStatSeeds::nKSeedsSame4Matches
@ nKSeedsSame4Matches
Definition
ActsInspectTruthContentAlg.h:52
ActsTrk::ActsInspectTruthContentAlg::EStatSeeds::nKSeedsSame6Matches
@ nKSeedsSame6Matches
Definition
ActsInspectTruthContentAlg.h:56
ActsTrk::ActsInspectTruthContentAlg::EStatSeeds::nKSeedsSame5Matches
@ nKSeedsSame5Matches
Definition
ActsInspectTruthContentAlg.h:54
ActsTrk::ActsInspectTruthContentAlg::EStatSeeds::kNStat
@ kNStat
Definition
ActsInspectTruthContentAlg.h:57
ActsTrk::ActsInspectTruthContentAlg::SeedType
SeedType
Definition
ActsInspectTruthContentAlg.h:75
ActsTrk::ActsInspectTruthContentAlg::SeedType::PPS
@ PPS
Definition
ActsInspectTruthContentAlg.h:78
ActsTrk::ActsInspectTruthContentAlg::SeedType::Others
@ Others
Definition
ActsInspectTruthContentAlg.h:80
ActsTrk::ActsInspectTruthContentAlg::SeedType::PSS
@ PSS
Definition
ActsInspectTruthContentAlg.h:79
ActsTrk::ActsInspectTruthContentAlg::SeedType::nTypes
@ nTypes
Definition
ActsInspectTruthContentAlg.h:81
ActsTrk::ActsInspectTruthContentAlg::SeedType::PPP
@ PPP
Definition
ActsInspectTruthContentAlg.h:76
ActsTrk::ActsInspectTruthContentAlg::SeedType::SSS
@ SSS
Definition
ActsInspectTruthContentAlg.h:77
ActsTrk::ActsInspectTruthContentAlg::fillStatSeeds
StatusCode fillStatSeeds(const ActsTrk::SeedContainer &seeds, std::array< const ActsTrk::MeasurementToTruthParticleAssociation *, s_nClusterTypes > &truths, seed_stat_t &stat) const
Definition
ActsInspectTruthContentAlg.cxx:196
ActsTrk::ActsInspectTruthContentAlg::~ActsInspectTruthContentAlg
virtual ~ActsInspectTruthContentAlg() override=default
ActsTrk::ActsInspectTruthContentAlg::seed_stat_t
std::array< std::array< std::size_t, s_nSeedTypes >, static_cast< std::size_t >(EStatSeeds::kNStat)> seed_stat_t
Definition
ActsInspectTruthContentAlg.h:95
ActsTrk::ActsInspectTruthContentAlg::s_nSeedTypes
static constexpr std::size_t s_nSeedTypes
Definition
ActsInspectTruthContentAlg.h:91
ActsTrk::ActsInspectTruthContentAlg::EStatTracks
EStatTracks
Definition
ActsInspectTruthContentAlg.h:60
ActsTrk::ActsInspectTruthContentAlg::EStatTracks::kNTracks0Outliers
@ kNTracks0Outliers
Definition
ActsInspectTruthContentAlg.h:68
ActsTrk::ActsInspectTruthContentAlg::EStatTracks::kNTracks0Holes
@ kNTracks0Holes
Definition
ActsInspectTruthContentAlg.h:64
ActsTrk::ActsInspectTruthContentAlg::EStatTracks::kNTracks3Outliers
@ kNTracks3Outliers
Definition
ActsInspectTruthContentAlg.h:71
ActsTrk::ActsInspectTruthContentAlg::EStatTracks::kNFullMatch
@ kNFullMatch
Definition
ActsInspectTruthContentAlg.h:62
ActsTrk::ActsInspectTruthContentAlg::EStatTracks::kNTracks1Holes
@ kNTracks1Holes
Definition
ActsInspectTruthContentAlg.h:65
ActsTrk::ActsInspectTruthContentAlg::EStatTracks::kNTracks2Holes
@ kNTracks2Holes
Definition
ActsInspectTruthContentAlg.h:66
ActsTrk::ActsInspectTruthContentAlg::EStatTracks::kNTracks1Outliers
@ kNTracks1Outliers
Definition
ActsInspectTruthContentAlg.h:69
ActsTrk::ActsInspectTruthContentAlg::EStatTracks::kNPerfectMatch
@ kNPerfectMatch
Definition
ActsInspectTruthContentAlg.h:63
ActsTrk::ActsInspectTruthContentAlg::EStatTracks::kNTracks3Holes
@ kNTracks3Holes
Definition
ActsInspectTruthContentAlg.h:67
ActsTrk::ActsInspectTruthContentAlg::EStatTracks::kNStat
@ kNStat
Definition
ActsInspectTruthContentAlg.h:72
ActsTrk::ActsInspectTruthContentAlg::EStatTracks::kNTracks2Outliers
@ kNTracks2Outliers
Definition
ActsInspectTruthContentAlg.h:70
ActsTrk::ActsInspectTruthContentAlg::initialize
virtual StatusCode initialize() override
Definition
ActsInspectTruthContentAlg.cxx:19
ActsTrk::ActsInspectTruthContentAlg::to_label
std::string to_label(ActsInspectTruthContentAlg::EStatClusters type) const
ActsTrk::ActsInspectTruthContentAlg::s_nClusterTypes
static constexpr std::size_t s_nClusterTypes
Definition
ActsInspectTruthContentAlg.h:90
ActsTrk::ActsInspectTruthContentAlg::m_clusters
SG::ReadHandleKeyArray< xAOD::UncalibratedMeasurementContainer > m_clusters
Definition
ActsInspectTruthContentAlg.h:124
ActsTrk::ActsInspectTruthContentAlg::m_associationMap_key
SG::ReadHandleKeyArray< ActsTrk::MeasurementToTruthParticleAssociation > m_associationMap_key
Definition
ActsInspectTruthContentAlg.h:126
ActsTrk::ActsInspectTruthContentAlg::to_label
std::string to_label(ActsInspectTruthContentAlg::EStatSeeds type) const
ActsTrk::MeasurementToTruthParticleAssociation
Definition
MeasurementToTruthParticleAssociation.h:18
ActsTrk::TrackContainer
Definition
TrackContainer.h:31
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition
AthReentrantAlgorithm.h:74
ActsTrk
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
Definition
MdtCalibInput.h:31
SG::ReadHandleKeyArray
HandleKeyArray< ReadHandle< T >, ReadHandleKey< T >, Gaudi::DataHandle::Reader > ReadHandleKeyArray
Definition
StoreGate/StoreGate/ReadHandleKeyArray.h:32
xAOD::UncalibMeasType
UncalibMeasType
Define the type of the uncalibrated measurement.
Definition
MeasurementDefs.h:24
xAOD::UncalibMeasType::nTypes
@ nTypes
Definition
MeasurementDefs.h:38
xAOD::UncalibratedMeasurementContainer
UncalibratedMeasurementContainer_v1 UncalibratedMeasurementContainer
Define the version of the uncalibrated measurement container.
Definition
UncalibratedMeasurementContainer.h:14
ActsTrk::SeedContainer
Definition
SeedContainer.h:67
ActsTrk::Seed
Definition
SeedContainer.h:44
type
Generated on
for ATLAS Offline Software by
1.17.0