File indexing completed on 2025-01-18 09:11:46
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/Measurement.hpp>
0018
0019 #include <cassert>
0020
0021 namespace Acts {
0022 class VectorMultiTrajectory;
0023 }
0024
0025 namespace ActsExamples {
0026
0027
0028 class MeasurementCalibrator {
0029 public:
0030 virtual void calibrate(
0031 const MeasurementContainer& measurements,
0032 const ClusterContainer* clusters, const Acts::GeometryContext& gctx,
0033 const Acts::CalibrationContext& cctx, const Acts::SourceLink& sourceLink,
0034 Acts::VectorMultiTrajectory::TrackStateProxy& trackState) const = 0;
0035
0036 virtual ~MeasurementCalibrator() = default;
0037 virtual bool needsClusters() const { return false; }
0038 };
0039
0040
0041 class PassThroughCalibrator : public MeasurementCalibrator {
0042 public:
0043
0044
0045
0046
0047
0048 void calibrate(
0049 const MeasurementContainer& measurements,
0050 const ClusterContainer* clusters, const Acts::GeometryContext& gctx,
0051 const Acts::CalibrationContext& cctx, const Acts::SourceLink& sourceLink,
0052 Acts::VectorMultiTrajectory::TrackStateProxy& trackState) const override;
0053 };
0054
0055
0056
0057 class MeasurementCalibratorAdapter {
0058 public:
0059 MeasurementCalibratorAdapter(const MeasurementCalibrator& calibrator,
0060 const MeasurementContainer& measurements,
0061 const ClusterContainer* clusters = nullptr);
0062
0063 MeasurementCalibratorAdapter() = delete;
0064
0065 void calibrate(const Acts::GeometryContext& gctx,
0066 const Acts::CalibrationContext& cctx,
0067 const Acts::SourceLink& sourceLink,
0068 Acts::VectorMultiTrajectory::TrackStateProxy trackState) const;
0069
0070 private:
0071 const MeasurementCalibrator& m_calibrator;
0072 const MeasurementContainer& m_measurements;
0073 const ClusterContainer* m_clusters;
0074 };
0075
0076 }