File indexing completed on 2025-01-30 09:32:31
0001
0002
0003
0004
0005
0006
0007
0008
0009 #pragma once
0010
0011 #include "Acts/EventData/MultiTrajectory.hpp"
0012 #include "Acts/EventData/SourceLink.hpp"
0013 #include "Acts/EventData/VectorMultiTrajectory.hpp"
0014 #include "Acts/Geometry/GeometryContext.hpp"
0015 #include "Acts/Utilities/CalibrationContext.hpp"
0016 #include "ActsExamples/EventData/Cluster.hpp"
0017 #include "ActsExamples/EventData/IndexSourceLink.hpp"
0018 #include <ActsExamples/EventData/Measurement.hpp>
0019
0020 #include <cassert>
0021
0022 namespace Acts {
0023 class VectorMultiTrajectory;
0024 }
0025
0026 namespace ActsExamples {
0027
0028
0029 class MeasurementCalibrator {
0030 public:
0031 virtual void calibrate(
0032 const MeasurementContainer& measurements,
0033 const ClusterContainer* clusters, const Acts::GeometryContext& gctx,
0034 const Acts::CalibrationContext& cctx, const Acts::SourceLink& sourceLink,
0035 Acts::VectorMultiTrajectory::TrackStateProxy& trackState) const = 0;
0036
0037 virtual ~MeasurementCalibrator() = default;
0038 virtual bool needsClusters() const { return false; }
0039 };
0040
0041
0042 class PassThroughCalibrator : public MeasurementCalibrator {
0043 public:
0044
0045
0046
0047
0048
0049 void calibrate(
0050 const MeasurementContainer& measurements,
0051 const ClusterContainer* clusters, const Acts::GeometryContext& gctx,
0052 const Acts::CalibrationContext& cctx, const Acts::SourceLink& sourceLink,
0053 Acts::VectorMultiTrajectory::TrackStateProxy& trackState) const override;
0054 };
0055
0056
0057
0058 class MeasurementCalibratorAdapter {
0059 public:
0060 MeasurementCalibratorAdapter(const MeasurementCalibrator& calibrator,
0061 const MeasurementContainer& measurements,
0062 const ClusterContainer* clusters = nullptr);
0063
0064 MeasurementCalibratorAdapter() = delete;
0065
0066 void calibrate(const Acts::GeometryContext& gctx,
0067 const Acts::CalibrationContext& cctx,
0068 const Acts::SourceLink& sourceLink,
0069 Acts::VectorMultiTrajectory::TrackStateProxy trackState) const;
0070
0071 private:
0072 const MeasurementCalibrator& m_calibrator;
0073 const MeasurementContainer& m_measurements;
0074 const ClusterContainer* m_clusters;
0075 };
0076
0077 }