ATLAS Offline Software
Loading...
Searching...
No Matches
AuxiliaryMeasurement_v1.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
7
8namespace {
11 static const SG::Accessor<SurfLink_t> acc_surfLink{"surfaceLink"};
12}
13
14namespace xAOD{
15 AUXSTORE_PRIMITIVE_GETTER_WITH_CAST(AuxiliaryMeasurement_v1, char, ProjectorType, calibProjector)
16 AUXSTORE_PRIMITIVE_SETTER_WITH_CAST(AuxiliaryMeasurement_v1, char, ProjectorType, calibProjector, setProjector)
17
19 switch (calibProjector()){
20 using enum ProjectorType;
21 case e1DimNoTime:
22 case e1DimRotNoTime:
23 return 1;
24 case e2DimNoTime:
25 case e1DimWithTime:
26 case e1DimRotWithTime:
27 return 2;
28 case e2DimWithTime:
29 return 3;
30 };
31 return 0;
32 }
33
35 return acc_surfLink(*this);
36 }
38 SurfLink_t&& link) {
39 m_surface.reset();
40 acc_surfLink(*this) = std::move(link);
41 m_surface.set(surfPtr);
42 }
45 if (!m_surface.isValid()) {
46 SurfLink_t assocLink = surfaceLink();
47 assert(assocLink.isValid());
49 m_surface.set(ActsTrk::decodeSurface(*assocLink));
50 }
51 return *m_surface.ptr();
52 }
53
54}
#define AUXSTORE_PRIMITIVE_GETTER_WITH_CAST(CL, PERSTYPE, TRANSTYPE, NAME)
Macro creating a getter function with a type conversion.
#define AUXSTORE_PRIMITIVE_SETTER_WITH_CAST(CL, PERSTYPE, TRANSTYPE, NAME, SETTER)
Macro creating a setter function with a type conversion.
Helper class to provide type-safe access to aux data.
Implementation of an uncalibrated AuxiliaryMeasurement which may serve as an external constraint in t...
const SurfacePtr_t & surface() const
Returns the reference to the Acts::Surface.
ElementLink< xAOD::TrackSurfaceContainer > SurfLink_t
Surfaces are passed via xAOD::TrackSurfaces which are internally converted by the measurement class i...
CxxUtils::CachedValue< SurfacePtr_t > m_surface
ProjectorType calibProjector() const
Returns the calibration projector.
virtual unsigned numDimensions() const override final
number of dimensions
const SurfLink_t & surfaceLink() const
Returns the link to the associated xAOD::TrackSurface.
ActsTrk::detail::MeasurementCalibratorBase::ProjectorType ProjectorType
Use the calibration projector.
void setSurface(const SurfacePtr_t &surfPtr, SurfLink_t &&surfLink)
Associates a surface with the Auxiliary measurement together with its persitifiable surface link.
std::shared_ptr< const Acts::Surface > SurfacePtr_t
AuxiliaryMeasurement_v1()=default
Default constructor.
std::shared_ptr< const Acts::Surface > decodeSurface(const xAOD::TrackSurface *backend)
Creates transient Acts Surface objects given a surface backend implementation should be exact mirror ...
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.