ATLAS Offline Software
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 
8 namespace {
11  static const SG::Accessor<SurfLink_t> acc_surfLink{"surfaceLink"};
12 }
13 
14 namespace 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 
18  unsigned AuxiliaryMeasurement_v1::numDimensions() const{
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());
50  }
51  return *m_surface.ptr();
52  }
53 
54 }
CxxUtils::CachedValue::reset
void reset()
Reset the value to invalid.
CxxUtils::CachedValue::ptr
const T * ptr() const
Return a pointer to the cached value.
SG::Accessor
Helper class to provide type-safe access to aux data.
Definition: Control/AthContainers/AthContainers/Accessor.h:68
AuxStoreAccessorMacros.h
CxxUtils::CachedValue::isValid
bool isValid() const
Test to see if the value is valid.
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
xAOD::AuxiliaryMeasurement_v1::surface
const SurfacePtr_t & surface() const
Returns the reference to the Acts::Surface.
Definition: AuxiliaryMeasurement_v1.cxx:44
xAOD::unsigned
unsigned
Definition: RingSetConf_v1.cxx:662
xAOD::AuxiliaryMeasurement_v1::surfaceLink
const SurfLink_t & surfaceLink() const
Returns the link to the associated xAOD::TrackSurface.
Definition: AuxiliaryMeasurement_v1.cxx:34
ActsTrk::detail::MeasurementCalibratorBase::ProjectorType
ProjectorType
Enum encoding the possible projectors used in ATLAS.
Definition: MeasurementCalibratorBase.h:29
xAOD::AuxiliaryMeasurement_v1::SurfLink_t
ElementLink< xAOD::TrackSurfaceContainer > SurfLink_t
Surfaces are passed via xAOD::TrackSurfaces which are internally converted by the measurement class i...
Definition: AuxiliaryMeasurement_v1.h:37
AuxiliaryMeasurement_v1.h
xAOD::AUXSTORE_PRIMITIVE_SETTER_WITH_CAST
AUXSTORE_PRIMITIVE_SETTER_WITH_CAST(CompositeParticle_v1, float, double, px, setPx) AUXSTORE_PRIMITIVE_SETTER_WITH_CAST(CompositeParticle_v1
SurfaceEncoding.h
xAOD::AUXSTORE_PRIMITIVE_GETTER_WITH_CAST
AUXSTORE_PRIMITIVE_GETTER_WITH_CAST(Muon_v1, uint8_t, Muon_v1::EnergyLossType, energyLossType) AUXSTORE_PRIMITIVE_SETTER_WITH_CAST(Muon_v1
xAOD::AuxiliaryMeasurement_v1
Implementation of an uncalibrated AuxiliaryMeasurement which may serve as an external constraint in t...
Definition: AuxiliaryMeasurement_v1.h:24
xAOD::AuxiliaryMeasurement_v1::ProjectorType
ActsTrk::detail::MeasurementCalibratorBase::ProjectorType ProjectorType
Use the calibration projector.
Definition: AuxiliaryMeasurement_v1.h:54
CxxUtils::CachedValue::set
void set(const T &val) const
Set the value, assuming it is currently invalid.
xAOD::AuxiliaryMeasurement_v1::setSurface
void setSurface(const SurfacePtr_t &surfPtr, SurfLink_t &&surfLink)
Associates a surface with the Auxiliary measurement together with its persitifiable surface link.
Definition: AuxiliaryMeasurement_v1.cxx:37
xAOD::AuxiliaryMeasurement_v1::SurfacePtr_t
std::shared_ptr< const Acts::Surface > SurfacePtr_t
Definition: AuxiliaryMeasurement_v1.h:42
ActsTrk::decodeSurface
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 ...
Definition: SurfaceEncoding.cxx:136
xAOD::AuxiliaryMeasurement_v1::m_surface
CxxUtils::CachedValue< SurfacePtr_t > m_surface
Definition: AuxiliaryMeasurement_v1.h:61