ATLAS Offline Software
Loading...
Searching...
No Matches
ActsClusterComparisonAlg.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 EFTRACKING_ACTSCLUSTERCOMPARISONALG_H
6#define EFTRACKING_ACTSCLUSTERCOMPARISONALG_H
7
8// Athena includes
9#include <array>
10#include <optional>
11#include <unordered_map>
12#include <utility>
13
14#include "Acts/Definitions/Units.hpp"
34
35#include <Gaudi/Accumulators.h>
36
37namespace ActsTrk {
38
59public:
60 using AthReentrantAlgorithm::AthReentrantAlgorithm;
61
63 virtual StatusCode initialize() override;
65 virtual StatusCode execute(const EventContext& ctx) const override;
67 virtual StatusCode finalize() override;
68
69 private:
70 StatusCode validateClusters(const EventContext& eventContext, std::unordered_map<const xAOD::PixelCluster*, const xAOD::PixelCluster*>& pixel_cluster_matches, std::unordered_map<const xAOD::StripCluster*, const xAOD::StripCluster*>& strip_cluster_matches) const;
71 StatusCode validatePixelSpacepoints(const EventContext& eventContext, std::unordered_map<const xAOD::PixelCluster*, const xAOD::PixelCluster*>& pixel_cluster_matches) const;
72
74 std::vector<const xAOD::PixelCluster*>& monitored_list,
75 std::vector<const xAOD::PixelCluster*>& reference_list,
76 const std::string& module_id,
77 std::vector<std::pair<const xAOD::PixelCluster*, const xAOD::PixelCluster*>>& pairs) const;
78
80 std::vector<const xAOD::StripCluster*>& monitored_list,
81 std::vector<const xAOD::StripCluster*>& reference_list,
82 const std::string& module_id,
83 std::vector<std::pair<const xAOD::StripCluster*, const xAOD::StripCluster*>>& pairs) const;
84
86 std::optional<std::pair<float, float>> tracccLorentzShift(
87 const Identifier& athenaId,
88 const traccc::detector_conditions_description::host& cond) const;
89
92 std::optional<std::array<float, 2>> tracccCellPosition(
93 const Identifier& athenaId, unsigned int channel0, unsigned int channel1,
94 const traccc::detector_design_description::host& design,
95 const traccc::detector_conditions_description::host& cond) const;
96
97 Gaudi::Property<std::string> m_monDesignObjectName{
98 this, "TracccDesignObjectName", "", "Candidate host design object in detStore"};
100 this, "TracccCondKey", "DeviceDetectorDescriptionHostCond",
101 "Key for reading the candidate host conditions object"};
102
103 Gaudi::Property<std::string> m_geoIdMappingObjectName{this, "GeoIdMapping", "", "ID mapping between the three detector description realms."};
105
108 Gaudi::Property<bool> m_checkSpacepoints{
109 this, "checkSpacepoints", false,
110 "If you also want to validate spacepounts."};
111
112
116 this, "monitoredSpacepointsKey", "xAODSpacepointsFromTracccCluster",
117 "Input monitored spacepoints"};
118
120 this, "referenceSpacepointsKey", "ITkPixelSpacePoints",
121 "Input reference spacepoints"};
122
124 this, "monitoredPixelClustersKey", "xAODPixelClustersFromTracccCluster",
125 "Input monitored pixel clusters"};
126
128 this, "monitoredStripClustersKey", "xAODStripClustersFromTracccCluster",
129 "Input monitored strip clusters"};
130
132 this, "referencePixelClustersKey", "ITkPixelClusters",
133 "Input reference pixel clusters"};
134
136 this, "referenceStripClustersKey", "ITkStripClusters",
137 "Input reference strip clusters"};
138
139
140
141 // cluster sumamry
142 mutable Gaudi::Accumulators::Counter<> m_pixel_unequal;
143 mutable Gaudi::Accumulators::Counter<> m_strip_unequal;
144 mutable Gaudi::Accumulators::Counter<> m_matched_pixel;
145 mutable Gaudi::Accumulators::Counter<> m_matched_strip;
146 mutable Gaudi::Accumulators::Counter<> m_pix_unmatched_mon;
147 mutable Gaudi::Accumulators::Counter<> m_pix_unmatched_ref;
148 mutable Gaudi::Accumulators::Counter<> m_strip_unmatched_mon;
149 mutable Gaudi::Accumulators::Counter<> m_strip_unmatched_ref;
150 mutable Gaudi::Accumulators::Counter<> m_pixel_pos_diff_1sig;
151 mutable Gaudi::Accumulators::Counter<> m_pixel_pos_diff_0p5sig;
152 mutable Gaudi::Accumulators::Counter<> m_pixel_pos_diff_0p25sig;
153 mutable Gaudi::Accumulators::Counter<> m_strip_pos_diff_1sig;
154 mutable Gaudi::Accumulators::Counter<> m_strip_pos_diff_0p5sig;
155 mutable Gaudi::Accumulators::Counter<> m_strip_pos_diff_0p25sig;
156 mutable Gaudi::Accumulators::Counter<> m_strip_pos_diff_barrel;
157 mutable Gaudi::Accumulators::Counter<> m_strip_pos_diff_EC;
158
159 // spacepoint summary
160 mutable Gaudi::Accumulators::Counter<> m_nMonSp;
161 mutable Gaudi::Accumulators::Counter<> m_nRefSp;
162 mutable Gaudi::Accumulators::Counter<> m_nMatchedSp;
163 mutable Gaudi::Accumulators::Counter<> m_nUnmatchedMonSp;
164 mutable Gaudi::Accumulators::Counter<> m_nUnmatchedRefSp;
165 mutable Gaudi::Accumulators::Counter<> m_nSpPosDiff1mm;
166 mutable Gaudi::Accumulators::Counter<> m_nSpPosDiff5mm;
167 mutable Gaudi::Accumulators::Counter<> m_nSpVarRDiff;
168 mutable Gaudi::Accumulators::Counter<> m_nSpVarZDiff;
169
170 Gaudi::Property<std::string> m_pixelManagerKey{
171 this, "PixelManager", "ITkPixel"};
172 Gaudi::Property<std::string> m_stripManagerKey{
173 this, "StripManager", "ITkStrip"};
176 const SCT_ID* m_stripID {nullptr};
177 ToolHandle<ISiLorentzAngleTool> m_stripLorentzAngleTool{
178 this, "StripLorentzAngleTool", "SiLorentzAngleTool",
179 "Tool to retrieve Lorentz angle of Strip"};
180 ToolHandle<ISiLorentzAngleTool> m_pixelLorentzAngleTool{
181 this, "PixelLorentzAngleTool", "",
182 "Tool to retreive Lorentz angle of Pixel"};
183};
184
185} // end of namespace
186
187#endif
This is an Identifier helper class for the Pixel subdetector.
This is an Identifier helper class for the SCT subdetector.
Property holding a SG store/key/clid from which a ReadHandle is made.
Gaudi::Accumulators::Counter m_nMatchedSp
StatusCode validateClusters(const EventContext &eventContext, std::unordered_map< const xAOD::PixelCluster *, const xAOD::PixelCluster * > &pixel_cluster_matches, std::unordered_map< const xAOD::StripCluster *, const xAOD::StripCluster * > &strip_cluster_matches) const
Gaudi::Accumulators::Counter m_pix_unmatched_mon
Gaudi::Accumulators::Counter m_strip_pos_diff_barrel
SG::ReadHandleKey< xAOD::PixelClusterContainer > m_referencePixelClustersKey
void matchPixelClusters(std::vector< const xAOD::PixelCluster * > &monitored_list, std::vector< const xAOD::PixelCluster * > &reference_list, const std::string &module_id, std::vector< std::pair< const xAOD::PixelCluster *, const xAOD::PixelCluster * > > &pairs) const
ToolHandle< ISiLorentzAngleTool > m_pixelLorentzAngleTool
Gaudi::Accumulators::Counter m_pixel_unequal
Gaudi::Accumulators::Counter m_strip_pos_diff_EC
Gaudi::Accumulators::Counter m_strip_unmatched_ref
std::optional< std::pair< float, float > > tracccLorentzShift(const Identifier &athenaId, const traccc::detector_conditions_description::host &cond) const
Lorentz shift stored in the traccc host conditions object for the given Athena module (side).
Gaudi::Property< std::string > m_monDesignObjectName
SG::ReadHandleKey< xAOD::SpacePointContainer > m_monitoredSpacepointsKey
const ActsTrk::GeometryIdMapping * m_idMapping
SG::ReadHandleKey< xAOD::StripClusterContainer > m_referenceStripClustersKey
SG::ReadHandleKey< xAOD::PixelClusterContainer > m_monitoredPixelClustersKey
Gaudi::Accumulators::Counter m_nUnmatchedRefSp
std::optional< std::array< float, 2 > > tracccCellPosition(const Identifier &athenaId, unsigned int channel0, unsigned int channel1, const traccc::detector_design_description::host &design, const traccc::detector_conditions_description::host &cond) const
Centre of the traccc readout bin (channel0, channel1) on the given Athena module, computed like tracc...
Gaudi::Accumulators::Counter m_strip_unequal
Gaudi::Accumulators::Counter m_pixel_pos_diff_0p25sig
Gaudi::Property< std::string > m_stripManagerKey
Gaudi::Accumulators::Counter m_nSpPosDiff5mm
Gaudi::Accumulators::Counter m_strip_pos_diff_0p5sig
const InDetDD::PixelDetectorManager * m_pixelManager
Gaudi::Accumulators::Counter m_nSpVarRDiff
SG::ReadHandleKey< xAOD::StripClusterContainer > m_monitoredStripClustersKey
Gaudi::Accumulators::Counter m_matched_pixel
Gaudi::Accumulators::Counter m_nSpVarZDiff
virtual StatusCode execute(const EventContext &ctx) const override
Execute the algorithm.
Gaudi::Accumulators::Counter m_nSpPosDiff1mm
Gaudi::Accumulators::Counter m_strip_pos_diff_0p25sig
virtual StatusCode finalize() override
Finalize the algorithm.
ToolHandle< ISiLorentzAngleTool > m_stripLorentzAngleTool
Gaudi::Accumulators::Counter m_nUnmatchedMonSp
Gaudi::Accumulators::Counter m_strip_pos_diff_1sig
const InDetDD::SCT_DetectorManager * m_stripManager
Gaudi::Accumulators::Counter m_pixel_pos_diff_1sig
Gaudi::Accumulators::Counter m_strip_unmatched_mon
Gaudi::Accumulators::Counter m_matched_strip
SG::ReadCondHandleKey< traccc::detector_conditions_description::host > m_monCondKey
SG::ReadHandleKey< xAOD::SpacePointContainer > m_referenceSpacepointsKey
Gaudi::Accumulators::Counter m_pix_unmatched_ref
virtual StatusCode initialize() override
Initialize the algorithm.
Gaudi::Property< std::string > m_pixelManagerKey
void matchStripClusters(std::vector< const xAOD::StripCluster * > &monitored_list, std::vector< const xAOD::StripCluster * > &reference_list, const std::string &module_id, std::vector< std::pair< const xAOD::StripCluster *, const xAOD::StripCluster * > > &pairs) const
Gaudi::Accumulators::Counter m_pixel_pos_diff_0p5sig
Gaudi::Property< std::string > m_geoIdMappingObjectName
StatusCode validatePixelSpacepoints(const EventContext &eventContext, std::unordered_map< const xAOD::PixelCluster *, const xAOD::PixelCluster * > &pixel_cluster_matches) const
Lookup table between the three surface-identifier "worlds" used across the ACTS / Detray / Athena tra...
An algorithm that can be simultaneously executed in multiple threads.
Dedicated detector manager extending the functionality of the SiDetectorManager with dedicated pixel ...
Dedicated detector manager extending the functionality of the SiDetectorManager with dedicated SCT in...
This is an Identifier helper class for the SCT subdetector.
Definition SCT_ID.h:68
Property holding a SG store/key/clid from which a ReadHandle is made.
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...