ATLAS Offline Software
Loading...
Searching...
No Matches
NNClusterCalibratorToolImpl.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef ACTSTRACKRECONSTRUCTION_NNCLUSTERCALIBRATORTOOLIMPL_H
6#define ACTSTRACKRECONSTRUCTION_NNCLUSTERCALIBRATORTOOLIMPL_H
7
17
18namespace ActsTrk::detail {
19
20template <typename calib_data_t, typename traj_t>
22
25
29
31template <typename calib_data_t, typename traj_t>
33 : public AnalogueClusteringCalibrator<calib_data_t, traj_t> {
34 public:
36 friend BASE;
40
42 BaseOptions&& direct_base_options, Options&& options)
43 : BASE(std::move(base_options), std::move(direct_base_options)),
44 m_options(std::move(options)) {}
45
46 protected:
47 std::tuple<
50 unsigned int>
51 calibrate(const EventContext& ctx,
52 const Acts::GeometryContext& gctx,
53 const Acts::CalibrationContext& cctx,
54 const xAOD::PixelCluster& cluster,
55 const InDetDD::SiDetectorElement& detElement,
56 const std::pair<float, float>& angles) const;
57
58 std::pair<std::optional<float>, std::optional<float>> getCorrectedPosition(
59 const EventContext& ctx,
60 const xAOD::PixelCluster& cluster,
61 const error_data_t& errorData,
62 const InDetDD::SiDetectorElement& element,
63 const std::pair<float, float>& angles) const;
64
65 std::pair<std::optional<float>, std::optional<float>> getCorrectedError(
66 const error_data_t& errorData,
67 const InDetDD::SiDetectorElement& element,
68 const std::pair<float, float>& angles,
69 const xAOD::PixelCluster& cluster) const;
70
72};
73
75template <typename calib_data_t, typename traj_t>
77 : public AnalogueClusteringToolImpl<calib_data_t, traj_t> {
78 public:
80 using BASE::BASE;
81
82 virtual StatusCode initialize() override;
83
84 virtual std::unique_ptr<PixelOnBoundStateCalibratorBase> create(
85 const EventContext& ctx) const override {
86 return createOnTrackCalibrator(ctx);
87 }
88 /***
89 * @brief produces configured calibrator object for this event
90 *
91 * The structure is such because the calibrator is used many times per event
92 * and it needs event context for IOV potentially
93 */
94
95 virtual std::unique_ptr<PixelOnTrackCalibratorBase<traj_t>>
96 createOnTrackCalibrator(const EventContext& ctx) const override {
97 return std::make_unique<NNClusterCalibrator<calib_data_t, traj_t>>(
99 createOptions(ctx));
100 }
101
102 private:
104 getErrorData(const EventContext& ctx) const;
105
111 NNClusterCalibratorOptions createOptions(const EventContext&) const {
112 return {
113 .m_minClusterSizeForNN = m_minClusterSizeForNN
114 };
115 }
116
117 Gaudi::Property<int> m_minClusterSizeForNN {this, "minClusterSizeForNN", 3, "how big the cluster needs to be to apply NN to it"};
118
119 // to bo added here is tool to interface with NN inference
120};
121
122} // namespace ActsTrk::detail
123
125
126#endif // ACTSTRACKRECONSTRUCTION_NNCLUSTERINGTOOLIMPL_H
This is an Identifier helper class for the Pixel subdetector.
AnalogueClusteringCalibratorOptions< calib_data_t > Options
AnalogueClusteringCalibrator(PixelClusterCalibratorOptionsBase &&base_options, Options &&options)
AnalogueClusteringCalibratorOptions< calib_data_t >::error_data_t error_data_t
the tool to create the analogue clustering calibrator.
PixelClusterCalibrationToolBase< traj_t > BASE
AnalogueClusteringCalibratorOptions< calib_data_t > createOptions(const EventContext &ctx) const
virtual StatusCode initialize() override
initializes this base class (must be called by the derived class)
const NNClusterCalibrator< calib_data_t, traj_t >::error_data_t * getErrorData(const EventContext &ctx) const
NNClusterCalibratorOptions createOptions(const EventContext &) const
Create a Options object This is needed to configure the per-event calibrator instances.
virtual std::unique_ptr< PixelOnBoundStateCalibratorBase > create(const EventContext &ctx) const override
convenience class to create an OnBoundState calibrator from an OnTrack calibrator.
virtual std::unique_ptr< PixelOnTrackCalibratorBase< traj_t > > createOnTrackCalibrator(const EventContext &ctx) const override
AnalogueClusteringToolImpl< calib_data_t, traj_t > BASE
NNClusterCalibrator(PixelClusterCalibratorOptionsBase &&base_options, BaseOptions &&direct_base_options, Options &&options)
std::pair< std::optional< float >, std::optional< float > > getCorrectedError(const error_data_t &errorData, const InDetDD::SiDetectorElement &element, const std::pair< float, float > &angles, const xAOD::PixelCluster &cluster) const
std::pair< std::optional< float >, std::optional< float > > getCorrectedPosition(const EventContext &ctx, const xAOD::PixelCluster &cluster, const error_data_t &errorData, const InDetDD::SiDetectorElement &element, const std::pair< float, float > &angles) const
AnalogueClusteringCalibrator< calib_data_t, traj_t > BASE
std::tuple< typename NNClusterCalibrator< calib_data_t, traj_t >::BASE::Pos, typename NNClusterCalibrator< calib_data_t, traj_t >::BASE::Cov, unsigned int > calibrate(const EventContext &ctx, const Acts::GeometryContext &gctx, const Acts::CalibrationContext &cctx, const xAOD::PixelCluster &cluster, const InDetDD::SiDetectorElement &detElement, const std::pair< float, float > &angles) const
PixelClusterCalibratorOptionsBase createBaseOptions(const EventContext &) const
create options needed by the calibrator base class.
Class to hold geometrical description of a silicon detector element.
Hash functions to pack the source link into unordered_maps / unordered_sets.
STL namespace.
PixelCluster_v1 PixelCluster
Define the version of the pixel cluster class.
Options for the NN clustering calibrator that is kind of Analogue calibrator.
the base options the options of the options of every PixelClusterCalibrator must be based on