ATLAS Offline Software
Loading...
Searching...
No Matches
MeasurementCalibratorBase.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4#ifndef ACTSCALIBBASE_DETAIL_MEASUREMENTCALIBRATORBASE_H
5#define ACTSCALIBBASE_DETAIL_MEASUREMENTCALIBRATORBASE_H
6
9#include "Acts/EventData/Types.hpp"
10#include "Acts/Surfaces/SurfaceBounds.hpp"
11#include "Acts/EventData/MultiTrajectory.hpp"
12#include "Acts/EventData/TrackStateProxy.hpp"
13#include "Acts/Utilities/CalibrationContext.hpp"
14#include "Acts/Utilities/PointerTraits.hpp"
15#include "Acts/Utilities/Helpers.hpp"
16#include "Acts/EventData/TrackStateProxyConcept.hpp"
17
20
21
22#include <array>
23
24
25#include <variant>
26
27namespace Trk{
28 class MeasurementBase;
29 class PrepRawData;
30}
31
32
33
34namespace ActsTrk::detail {
40 public:
53
56 using SourceLink_t = std::variant<std::monostate,
58 const Trk::PrepRawData*,
66 static SourceLinkType getType(const Acts::SourceLink& sl);
69 static SourceLink_t unpackBase(const Acts::SourceLink& sl);
75 template <Acts::PointerConcept Ptr_t>
76 static Acts::SourceLink pack(const Ptr_t& measurement);
77
88 template <std::size_t Dim, Acts::TrackStateProxyConcept proxy_t,
89 typename pos_t, typename cov_t>
90 void setState(const ProjectorType projector,
91 const pos_t& locpos,
92 const cov_t& cov,
93 Acts::SourceLink link,
94 proxy_t& trackState) const;
95
96 protected:
103 template <std::size_t Dim, Acts::TrackStateProxyConcept proxy_t>
105 Acts::SourceLink link,
106 proxy_t& trackState) const;
107
108 private:
111 constexpr static std::array<Acts::BoundSubspaceIndices, 6> s_boundSpaceIndices{
112 Acts::BoundSubspaceIndices{Acts::eBoundLoc0}, // One dimenion without time
113 Acts::BoundSubspaceIndices{Acts::eBoundLoc1}, // Complementary one dimension without time
114 Acts::BoundSubspaceIndices{Acts::eBoundLoc0, Acts::eBoundLoc1},
115 Acts::BoundSubspaceIndices{Acts::eBoundLoc0, Acts::eBoundTime}, // One dimension with time
116 Acts::BoundSubspaceIndices{Acts::eBoundLoc1, Acts::eBoundTime}, // Complementary one dimension with time
117 Acts::BoundSubspaceIndices{Acts::eBoundLoc0, Acts::eBoundLoc1, Acts::eBoundTime}
118 };
119 };
120
121} // namespace ActsTrk::detail
122
124
125#endif
static Acts::SourceLink pack(const Ptr_t &measurement)
Pack the measurement type pointer to an Acts::SourceLink including the intermediate conversion into a...
ProjectorType
Enum encoding the possible projectors used in ATLAS.
@ e2DimWithTime
Project out the locY & time coordinate - (Applies to Rpc, Tgc, sTgc).
@ e2DimNoTime
Project out solely the locY - Complementary projector if the strip plane is rotated (Applies to Itk e...
@ e1DimWithTime
Project out the two spatial coordinates - (Applies to ITk pixel, BI-Rpc, sTgc pad).
@ e1DimRotNoTime
Project out solely the locX (Applies to Itk strips, Rpc, Tgc, sTgc, Mm).
@ e1DimRotWithTime
Project out the locX & time coordinate - (Applies to Rpc, Tgc, Mm, sTgc).
std::variant< std::monostate, const xAOD::UncalibratedMeasurement *, const Trk::PrepRawData *, const Trk::MeasurementBase * > SourceLink_t
Encode the source links supported by the Calibrator class as a variant of the measurement class type ...
static constexpr std::array< Acts::BoundSubspaceIndices, 6 > s_boundSpaceIndices
Array to map the Projector types to the bound index configurations used by the ATLAS detector measure...
void prepareCalibratedState(const ProjectorType projector, Acts::SourceLink link, proxy_t &trackState) const
Queries the track proxy to allocate memory for the incoming calibration object.
void setState(const ProjectorType projector, const pos_t &locpos, const cov_t &cov, Acts::SourceLink link, proxy_t &trackState) const
Copy the local position & covariance into the Acts track state proxy.
static SourceLinkType getType(const Acts::SourceLink &sl)
Returns the enumeration corresponding to the object type cached within the Acts::SourceLink.
static SourceLink_t unpackBase(const Acts::SourceLink &sl)
Unpack the SourceLink_t from the passed Acts source link.
This class is the pure abstract base class for all fittable tracking measurements.
Hash functions to pack the source link into unordered_maps / unordered_sets.
SourceLinkType
Enumeration to distinguish between the ATLAS EDM -> Acts::SourceLink variants.
Ensure that the ATLAS eigen extensions are properly loaded.
UncalibratedMeasurement_v1 UncalibratedMeasurement
Define the version of the uncalibrated measurement class.