ATLAS Offline Software
Loading...
Searching...
No Matches
AuxiliaryMeasurementHandler.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 ActsEvent_AuxiliaryMeasurementHandler_H
5#define ActsEvent_AuxiliaryMeasurementHandler_H
6
12#include "Acts/Utilities/Result.hpp"
13
14#include <unordered_map>
15
16namespace ActsTrk{
23 public:
29 template <class PropOwner>
30 AuxiliaryMeasurementHandler(PropOwner* owner);
34 StatusCode initialize(const std::string& preFix,
35 bool used = true);
36
39 public:
51
60 template<size_t N>
62 const ProjectorType projector,
63 const AmgSymMatrix(N)& locCov,
64 const AmgVector(N) locPos = AmgVector(N)::Zero());
65
66 private:
75 MeasurementProvider(const EventContext& ctx,
76 const Acts::GeometryContext& gctx,
77 const AuxiliaryMeasurementHandler* parent);
79 StatusCode setupContainers();
81 template<typename AuxCont_t, typename Cont_t>
82 StatusCode recordContainer(SG::WriteHandle<Cont_t>& handle);
83
84
85 const EventContext& m_ctx;
86 const Acts::GeometryContext m_gctx;
91
103 std::unordered_map<SurfacePtr_t, const xAOD::TrackSurface*> m_cachedSurfs{};
104
105 };
106
107 enum class HandleStatus: std::uint8_t{
108 ok = 0,
111 };
112 using HandleReturn_t = Acts::Result<MeasurementProvider, HandleStatus>;
113
122 HandleReturn_t makeHandle(const EventContext& ctx,
123 const Acts::GeometryContext& gctx) const;
124
125 private:
128 std::function<MsgStream&(const MSG::Level)> m_msgPrinter{};
130 std::function<bool(const MSG::Level)> m_msgLevel{};
143 MsgStream& msg(const MSG::Level lvl) const;
145 bool msgLvl(const MSG::Level lvl) const;
146 };
147}
149#endif
#define AmgSymMatrix(dim)
#define AmgVector(rows)
Property holding a SG store/key/clid from which a WriteHandle is made.
Handle class for recording to StoreGate.
WriteHandle_t m_handle2D
Dedicated write handle to store 2D measurements.
MeasurementProvider & operator=(const MeasurementProvider &other)=delete
Delete the copy assignment.
WriteHandle_t m_viewHandle
Write handle to the VIEW_Elements container containing all created measurements.
MeasurementProvider & operator=(MeasurementProvider &&other)=delete
Default move assignment operator.
SG::WriteHandle< xAOD::AuxiliaryMeasurementContainer > WriteHandle_t
Abrivation of the WriteHandle.
StatusCode recordContainer(SG::WriteHandle< Cont_t > &handle)
WriteHandle_t m_handle1D
Dedicated write handle to store 1D measurements.
StatusCode setupContainers()
Setup method to record the Auxiliary measurement containers into StoreGate.
MeasurementProvider(const MeasurementProvider &other)=delete
Delete the copy constructor.
MeasurementProvider(MeasurementProvider &&other)=default
Default move constructor.
WriteHandle_t m_handle3D
Dedicated write handle to store 2D + time measurements.
SG::WriteHandle< xAOD::TrackSurfaceContainer > SurfaceHandle_t
xAOD::AuxiliaryMeasurement * newMeasurement(const SurfacePtr_t &surface, const ProjectorType projector, const AmgSymMatrix(N)&locCov, const AmgVector(N) locPos=AmgVector(N)::Zero())
Create a new auxiliary measurement.
std::unordered_map< SurfacePtr_t, const xAOD::TrackSurface * > m_cachedSurfs
List of precached surfaces.
Key_t m_writeKey2D
Key to write the 2D measurements.
Key_t m_writeKey1D
Key to write the 1D measurements.
SG::WriteHandleKey< xAOD::AuxiliaryMeasurementContainer > Key_t
HandleReturn_t makeHandle(const EventContext &ctx, const Acts::GeometryContext &gctx) const
Creates a new MeasurementProvider and triggers the write of the container backend to StoreGate.
Acts::Result< MeasurementProvider, HandleStatus > HandleReturn_t
xAOD::AuxiliaryMeasurement::SurfacePtr_t SurfacePtr_t
bool msgLvl(const MSG::Level lvl) const
Returns whether the stream satisfies the logging level.
AuxiliaryMeasurementHandler(PropOwner *owner)
Constructor taking the pointer to the class holding the object used to declare the data dependency fr...
Key_t m_viewKey
Key to write the view container.
std::function< bool(const MSG::Level)> m_msgLevel
Lambda to return the msg level from the parent's msg stream.
Key_t m_writeKey3D
Key to write the 2D + time measurements.
std::function< MsgStream &(const MSG::Level)> m_msgPrinter
Lambda to access the parent's msg stream.
SG::WriteHandleKey< xAOD::TrackSurfaceContainer > m_surfaceKey
Key to write the surfaces associated to the measurements.
Property holding a SG store/key/clid from which a WriteHandle is made.
holding In fact this class is here in order to allow STL container for all features This class is sho...
ActsTrk::detail::MeasurementCalibratorBase::ProjectorType ProjectorType
Use the calibration projector.
std::shared_ptr< const Acts::Surface > SurfacePtr_t
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
AuxiliaryMeasurement_v1 AuxiliaryMeasurement
void initialize()
MsgStream & msg
Definition testRead.cxx:32