ATLAS Offline Software
Loading...
Searching...
No Matches
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
15
16namespace ActsTrk {
17
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
42
59
74
75 enum class SeedType : std::size_t {
82 };
83
84 enum class TrackType : std::size_t {
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
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
123
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;
143 };
144
145} // namespace
146
148
149#endif
Property holding a SG store/key/clid from which a WriteHandle is made.
SG::ReadHandleKeyArray< ActsTrk::SeedContainer > m_seeds
std::string to_string(ActsInspectTruthContentAlg::SeedType type) const
StatusCode fillStatClusters(const xAOD::UncalibratedMeasurementContainer &container, const ActsTrk::MeasurementToTruthParticleAssociation &truth, cluster_stat_t &stat) const
virtual StatusCode execute(const EventContext &ctx) const override
std::array< std::array< std::size_t, 1 >, static_cast< std::size_t >(EStatTracks::kNStat)> track_stat_t
std::string to_string(xAOD::UncalibMeasType type) const
SeedType deduceSeedType(const ActsTrk::Seed &) const
std::array< std::array< std::size_t, s_nClusterTypes >, static_cast< std::size_t >(EStatClusters::kNStat)> cluster_stat_t
StatusCode printStatTables(const std::string &objectCollectionName, const stat_t &stat) const
SG::ReadHandleKeyArray< ActsTrk::TrackContainer > m_tracks
std::string to_label(ActsInspectTruthContentAlg::EStatTracks type) const
std::string to_string(ActsInspectTruthContentAlg::TrackType type) const
StatusCode copyStatTable(const stat_t &contextual, stat_t &global) const
ActsInspectTruthContentAlg(const std::string &name, ISvcLocator *pSvcLocator)
StatusCode fillStatTracks(const ActsTrk::TrackContainer &tracks, std::array< const ActsTrk::MeasurementToTruthParticleAssociation *, s_nClusterTypes > &truths, track_stat_t &trackStat, cluster_stat_t &onTrackClusterStat) const
StatusCode fillStatSeeds(const ActsTrk::SeedContainer &seeds, std::array< const ActsTrk::MeasurementToTruthParticleAssociation *, s_nClusterTypes > &truths, seed_stat_t &stat) const
virtual ~ActsInspectTruthContentAlg() override=default
std::string to_label(ActsInspectTruthContentAlg::EStatClusters type) const
SG::ReadHandleKeyArray< xAOD::UncalibratedMeasurementContainer > m_clusters
SG::ReadHandleKeyArray< ActsTrk::MeasurementToTruthParticleAssociation > m_associationMap_key
std::string to_label(ActsInspectTruthContentAlg::EStatSeeds type) const
std::array< std::array< std::size_t, s_nSeedTypes >, static_cast< std::size_t >(EStatSeeds::kNStat)> seed_stat_t
An algorithm that can be simultaneously executed in multiple threads.
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
HandleKeyArray< ReadHandle< T >, ReadHandleKey< T >, Gaudi::DataHandle::Reader > ReadHandleKeyArray
UncalibMeasType
Define the type of the uncalibrated measurement.
UncalibratedMeasurementContainer_v1 UncalibratedMeasurementContainer
Define the version of the uncalibrated measurement container.