Namespace Acts::Experimental

namespace Experimental

Typedefs

using DetectorBlock = std::tuple<DetectorVolumes, ProtoContainer>

Current block (volumes and shell)

using DetectorBlockBuilder = std::function<void(DetectorBlock&, const GeometryContext&, Acts::Logging::Level)>

The detector builder function.

using DetectorVolumes = std::vector<std::shared_ptr<DetectorVolume>>

Current volumes (connected)

using DetectorVolumeUpdator = OwningDelegate<void(const GeometryContext &gctx, NavigationState &nState), INavigationDelegate>

Declare a Detctor Volume finding or switching delegate.

Param gctx

is the current geometry context

Param nState

[in, out] is the navigation state to be updated

Return

the new DetectorVolume into which one changes at this switch

using IndexedDetectorVolumeImpl = IndexedUpdatorImpl<grid_type, IndexedDetectorVolumeExtractor, DetectorVolumeFiller>

An indexed volume implementation access.

Template Parameters

grid_type – is the grid type used for this

using IndexedSurfacesImpl = IndexedUpdatorImpl<grid_type, IndexedSurfacesExtractor, SurfacesFiller>

An indexed surface implementation access.

Template Parameters

grid_type – is the grid type used for this

using PortalGenerator = Delegate<std::vector<std::shared_ptr<Portal>>(const Transform3&, const VolumeBounds&, const std::shared_ptr<DetectorVolume>&)>

The Portal genertor definition.

using PortalReplacement = std::tuple<std::shared_ptr<Experimental::Portal>, unsigned int, NavigationDirection, std::vector<ActsScalar>, BinningValue>

Definition of a portal replacement when building proto containers It consists of the new portal, the index, the direction, the parameters gathered from the sub volumes, the binning description.

using ProtoContainer = std::map<unsigned int, std::shared_ptr<Portal>>

Current shell (i.e. outside portals)

using SingleIndex = std::size_t
using SurfaceCandidatesUpdator = OwningDelegate<void(const GeometryContext &gctx, NavigationState &nState), INavigationDelegate>

Declare an updator for the local navigation, i.e.

the navigation inside a detector volume. This can be called either directly after a volume switch or in order to update within a volume after some progression

This delegate dispatches the local navigation action to a dedicated struct or function that is optimised for the given environment.

Note

it relies on the detector volume to be set to the state Memory managed navigation state updator

Param gctx

is the current geometry context

Param nState

[in,out] is the navigation state to be updated

using VariableBoundAxis = Acts::detail::Axis<Acts::detail::AxisType::Variable, Acts::detail::AxisBoundaryType::Bound>
using VariableBoundIndexGrid1 = Acts::detail::Grid<SingleIndex, VariableBoundAxis>

Enums

enum Chi2FitterError

Values:

enumerator NoMeasurementFound
enum GsfError

Values:

enumerator NavigationFailed
enumerator ComponentNumberMismatch
enumerator AllComponentsSteppingError
enumerator NoComponentCreated
enumerator NoStatesCreated
enumerator StartParametersNotOnStartSurface
enumerator PropagationEndedOnWrongSurface
enumerator LastStepParamsContainNan
enumerator SmoothingFailed

Functions

static inline SurfaceCandidatesUpdator allPortals()

Generate a provider for all portals.

Returns

a connected navigationstate updator

static inline SurfaceCandidatesUpdator allPortalsAndSurfaces()

Generate a provider for all portals and Surfacess.

Note

this is a try-and error navigation, not recommended for production setup with many surfaces

Returns

a connected navigationstate updator

void attachDetectorVolumeUpdators(const GeometryContext &gctx, const std::vector<std::shared_ptr<DetectorVolume>> &volumes, std::vector<PortalReplacement> &pReplacements)

Create and attach the multi link updator.

Parameters
  • gctx – the geometry context

  • volumes – are the volumes that are pointed to

  • pReplacements – are the portal replacements that are newly connected

std::vector<std::shared_ptr<DetectorVolume>> attachedDetectorVolumes(Portal &portal) noexcept(false)

Method that strips out attached volumes from portals.

Note

it throws an exception if both sides are already taken

Parameters

portal – the portal to be resolved

Returns

a vector of attached volumes

static inline Delegate< std::vector< std::shared_ptr< Portal > > const Transform3 &, const VolumeBounds &, const std::shared_ptr< DetectorVolume > &)> defaultPortalAndSubPortalGenerator ()

Create a default portal generator that connects to the static method.

Note

parameters are ignored in this case

static inline Delegate< std::vector< std::shared_ptr< Portal > > const Transform3 &, const VolumeBounds &, const std::shared_ptr< DetectorVolume > &)> defaultPortalGenerator ()

Create a default portal generator that connects to the static method.

static inline std::vector<std::shared_ptr<Portal>> generatePortals(const Transform3 &dTransform, const VolumeBounds &dBounds, const std::shared_ptr<DetectorVolume> &dVolume) noexcept(false)

Generator function for creation of portal surfaces.

Parameters
  • dTransform – a contextually resolved transform

  • dBounds – the detecor volume bounds

  • dVolume – the reference to the detector volume which generates this volume

Returns

a vector of newly created portals with registered inside volume

static inline std::vector<std::shared_ptr<Portal>> generatePortalsUpdateInternals(const Transform3 &dTransform, const VolumeBounds &dBounds, const std::shared_ptr<DetectorVolume> &dVolume) noexcept(false)

Calls the portal generation and adds registration to sub portals.

This code is split off the PortalGenerator code in order to allow unit testing of the portal generation wihtout detector volume construction

Parameters
  • dTransform – a contextually resolved transform

  • dBounds – the detecor volume bounds

  • dVolume – the reference to the detector volume which generates this volume

Returns

a vector of newly created portals with registered inside volume

std::error_code make_error_code(Chi2FitterError e)
std::error_code make_error_code(GsfError e)
AtlasBetheHeitlerApprox<6, 5> makeDefaultBetheHeitlerApprox()

Creates a AtlasBetheHeitlerApprox object based on an ATLAS configuration, that are stored as static data in the source code.

This may not be an optimal configuration, but should allow to run the GSF without the need to load files

static inline DetectorVolumeUpdator tryAllVolumes()

Generate a delegate to try all volume.

Note

this is a try-and error navigation, not recommended for production setup with many surfaces

Returns

a connected navigationstate updator

static inline DetectorVolumeUpdator unconnectedUpdator()

A dummy constructed updator.

static inline void updateCandidates(const GeometryContext &gctx, NavigationState &nState)

Helper method to update the candidates (portals/surfaces), this can be called for initial surface/portal estimation, but also during the navigation to update the current list of candidates.

Parameters
  • gctx – is the Geometry context of this call

  • nState – [in,out] is the navigation state to be updated

struct AdditionalSurfacesImpl : public Acts::Experimental::INavigationDelegate
#include <Acts/Navigation/SurfaceCandidatesUpdators.hpp>

This holds and extracts a collection of surfaces without much checking, this could be e.g.

support surfaces for layer structures, e.g.

Public Functions

inline void update([[maybe_unused]] const GeometryContext &gctx, NavigationState &nState) const

Extract the sub volumes from the volume.

Parameters
  • gctx – the geometry contextfor this extraction call (ignored)

  • nState – is the navigation state

Public Members

std::vector<const Surface*> surfaces = {}

The volumes held by this collection.

struct AllPortalsAndSurfacesImpl : public Acts::Experimental::INavigationDelegate
#include <Acts/Navigation/SurfaceCandidatesUpdators.hpp>

Public Functions

inline void update(const GeometryContext &gctx, NavigationState &nState) const

An ordered list of portals and surfaces provider.

Note

that the intersections are ordered, such that the smallest intersection pathlength >= overstep tolerance is the lowest

Parameters
  • gctx – is the Geometry context of this call

  • nState – is the navigation state to be updated

Returns

an ordered list of portal and surface candidates

struct AllPortalsExtractor
#include <Acts/Detector/DetectorVolume.hpp>

Helper extractors: all portals.

Public Static Functions

static inline const std::vector<const Portal*> extract([[maybe_unused]] const GeometryContext &gctx, const NavigationState &nState)

Extract the portals from the volume.

Parameters
  • gctx – the geometry contextfor this extraction call

  • nState – is the current navigation state

Returns

a vector of raw Portal pointers

struct AllPortalsImpl : public Acts::Experimental::INavigationDelegate
#include <Acts/Navigation/SurfaceCandidatesUpdators.hpp>

Public Functions

inline void update(const GeometryContext &gctx, NavigationState &nState) const

A ordered portal provider.

Note

that the intersections are ordered, such that the smallest intersection pathlength >= overstep tolerance is the lowest

Parameters
  • gctx – is the Geometry context of this call

  • nState – is the navigation state to be updated

Returns

an ordered list of portal candidates

struct AllSubVolumesExtractor
#include <Acts/Detector/DetectorVolume.hpp>

Helper extractors: all sub volumes of a volume.

Public Static Functions

static inline const std::vector<const DetectorVolume*> extract([[maybe_unused]] const GeometryContext &gctx, const NavigationState &nState, [[maybe_unused]] const std::vector<size_t> &indices = {})

Extract the sub volumes from the volume.

Parameters
  • gctx – the geometry contextfor this extraction call

  • nState – is the current navigation state

  • indices – are access indices into the volume store (ignored)

Returns

a vector of raw DetectorVolume pointers

struct AllSurfacesExtractor
#include <Acts/Detector/DetectorVolume.hpp>

Helper extractors: all surfaces.

Public Static Functions

static inline const std::vector<const Surface*> extract([[maybe_unused]] const GeometryContext &gctx, const NavigationState &nState, [[maybe_unused]] const std::vector<size_t> &indices = {})

Extract the surfaces from the volume.

Parameters
  • gctx – the geometry contextfor this extraction call

  • nState – is the current navigation state

  • indices – is an ignored index vector

Returns

a vector of raw Surface pointers

template<int NComponents, int PolyDegree>
class AtlasBetheHeitlerApprox
#include <Acts/TrackFitting/BetheHeitlerApprox.hpp>

This class approximates the Bethe-Heitler distribution as a gaussian mixture.

To enable an approximation for continuous input variables, the weights, means and variances are internally parametrized as a Nth order polynomial.

Public Types

using Data = std::array<PolyData, NComponents>

Public Functions

inline constexpr AtlasBetheHeitlerApprox(const Data &low_data, const Data &high_data, bool low_transform, bool high_transform)

Construct the Bethe-Heitler approximation description.

Additional to the coefficients of the polynomials, the information whether these values need to be transformed beforehand must be given (see ATLAS code).

Parameters
  • low_data – data for the lower x/x0 range

  • high_data – data for the higher x/x0 range

  • low_transform – wether the low data need to be transformed

  • high_transform – wether the high data need to be transformed

inline auto mixture(ActsScalar x) const

Generates the mixture from the polynomials and reweights them, so that the sum of all weights is 1.

Parameters

x – pathlength in terms of the radiation length

inline constexpr auto numComponents() const

Returns the number of components the returned mixture will have.

inline constexpr bool validXOverX0(ActsScalar x) const

Checks if an input is valid for the parameterization.

Parameters

x – pathlength in terms of the radiation length

Public Static Functions

static inline auto loadFromFiles(const std::string &low_parameters_path, const std::string &high_parameters_path)

Loads a parameterization from a file according to the Atlas file description.

Parameters
  • low_parameters_path – Path to the foo.par file that stores the parameterization for low x/x0

  • high_parameters_path – Path to the foo.par file that stores the parameterization for high x/x0

Public Static Attributes

static constexpr double higherLimit = 0.20
static constexpr double lowerLimit = 0.10
static constexpr double noChangeLimit = 0.0001
static constexpr double singleGaussianLimit = 0.002
struct PolyData
#include <Acts/TrackFitting/BetheHeitlerApprox.hpp>

Public Members

std::array<ActsScalar, PolyDegree + 1> meanCoeffs
std::array<ActsScalar, PolyDegree + 1> varCoeffs
std::array<ActsScalar, PolyDegree + 1> weightCoeffs
struct BetheHeitlerApproxSingleCmp
#include <Acts/TrackFitting/BetheHeitlerApprox.hpp>

This class approximates the Bethe-Heitler with only one component.

This is mainly inside AtlasBetheHeitlerApprox, but can also be used as the only component approximation (then probably for debugging)

Public Functions

inline constexpr auto numComponents() const

Returns the number of components the returned mixture will have.

inline constexpr bool validXOverX0(ActsScalar x) const

Checks if an input is valid for the parameterization.

The threshold for x/x0 is 0.002 and orientates on the values used in ATLAS

Public Static Functions

static inline auto mixture(const ActsScalar x)

Returns array with length 1 containing a 1-component-representation of the Bethe-Heitler-Distribution.

Parameters

x – pathlength in terms of the radiation length

struct BoundVolumesGrid1Impl : public Acts::Experimental::INavigationDelegate
#include <Acts/Navigation/DetectorVolumeUpdators.hpp>

This is used for volumes that are indexed in a bound 1-dimensional grid, e.g.

a z-spaced array, or an r-spaced array of volumes.

Public Functions

inline BoundVolumesGrid1Impl(const std::vector<ActsScalar> &gBoundaries, BinningValue bValue, const std::vector<const DetectorVolume*> &cVolumes, const Transform3 &bTransform = Transform3::Identity()) noexcept(false)

Allowed constructor with explicit arguments.

Parameters
  • gBoundaries – the grid boundaries

  • bValue – the binning value

  • cVolumes – the contained volumes

  • bTransform – is the optional transform

BoundVolumesGrid1Impl() = delete
inline void update(const GeometryContext &gctx, NavigationState &nState) const

This updator relies on an 1D single index grid.

Parameters
  • gctx – the geometry context

  • nState – [in,out] the navigation state to be updated

Public Members

IndexedUpdator indexedUpdator
template<typename ...updators_t>
class ChainedUpdatorImpl : public Acts::Experimental::INavigationDelegate
#include <Acts/Navigation/NavigationStateUpdators.hpp>

This is a chained extractor/filler implementation Since there is no control whether it is a static or payload extractor, these have to be provided by a tuple.

Template Parameters

updators_t – the updators that will be called in sequence

Public Functions

inline ChainedUpdatorImpl(const std::tuple<updators_t...> &upts)

Constructor for chained updators in a tuple, this will unroll the tuple and call them in sequence.

Parameters

upts – the updators to be called in chain

inline void update(const GeometryContext &gctx, NavigationState &nState) const

A combined navigation state updator w/o intersection specifics.

Parameters
  • gctx – is the Geometry context of this call

  • nState – the navigation state to which the objects are attached

template<typename propagator_t, typename traj_t>
class Chi2Fitter
#include <Acts/TrackFitting/Chi2Fitter.hpp>

Chi2 fitter implementation.

Template Parameters

propagator_t – Type of the propagation class

Public Functions

inline Chi2Fitter(propagator_t pPropagator, std::unique_ptr<const Logger> _logger = getDefaultLogger("Chi2Fitter", Logging::INFO))

Fit implementation of the GX2F.

Note

The input measurements are given in the form of SourceLink s. It’s the calibrators job to turn them into calibrated measurements used in the fit.

Template Parameters
  • source_link_iterator_t – Iterator type used to pass source links

  • start_parameters_t – Type of the initial parameters

  • parameters_t – Type of parameters used for local parameters

Parameters
  • it – Begin iterator for the fittable uncalibrated measurements

  • end – End iterator for the fittable uncalibrated measurements

  • sParameters – The initial track parameters

  • chi2FitterOptions – Chi2FitterOptions steering the fit

  • trackContainer – The target track container

Returns

the output as an output track

template<typename traj_t>
struct Chi2FitterExtensions
#include <Acts/TrackFitting/Chi2Fitter.hpp>

Extension struct which holds delegates to customize the GX2F behavior.

Public Types

using Calibrator = Delegate<void(const GeometryContext&, TrackStateProxy)>
using ConstTrackStateProxy = typename MultiTrajectory<traj_t>::ConstTrackStateProxy
using OutlierFinder = Delegate<bool(ConstTrackStateProxy)>
using Parameters = typename TrackStateProxy::Parameters
using TrackStateProxy = typename MultiTrajectory<traj_t>::TrackStateProxy

Public Functions

inline Chi2FitterExtensions()

Default constructor which connects the default void components.

Public Members

Calibrator calibrator

The Calibrator is a dedicated calibration algorithm that allows to calibrate measurements using track information, this could be e.g.

sagging for wires, module deformations, etc.

OutlierFinder outlierFinder

Determines whether a measurement is supposed to be considered as an outlier.

template<typename traj_t>
struct Chi2FitterOptions
#include <Acts/TrackFitting/Chi2Fitter.hpp>

Combined options for the GX2F fitter.

Template Parameters

traj_t – The trajectory type

Public Functions

inline Chi2FitterOptions(const GeometryContext &gctx, const MagneticFieldContext &mctx, std::reference_wrapper<const CalibrationContext> cctx, Chi2FitterExtensions<traj_t> extensions_, const PropagatorPlainOptions &pOptions, bool mScattering = false, bool eLoss = false, int nIter = 1, bool calcFinalChi2_ = true, const FreeToBoundCorrection &freeToBoundCorrection_ = FreeToBoundCorrection(false))

PropagatorOptions with context.

Parameters
  • gctx – The goemetry context for this fit

  • mctx – The magnetic context for this fit

  • cctx – The calibration context for this fit

  • extensions_ – The chi2 extensions

  • pOptions – The plain propagator options

  • mScattering – Whether to include multiple scattering

  • eLoss – Whether to include energy loss

  • nIter – Number of update steps to the parameters

  • calcFinalChi2_ – Whether to run additional propagation to calculate final chi2

  • freeToBoundCorrection_ – Correction for non-linearity effect during transform from free to bound

Chi2FitterOptions() = delete

Contexts are required and the options must not be default-constructible.

Public Members

bool calcFinalChi2 = true

Whether to do an additional propagation step, just to get the latest chi2 value.

std::reference_wrapper<const CalibrationContext> calibrationContext

context object for the calibration

bool energyLoss = false

Whether to consider energy loss.

Chi2FitterExtensions<traj_t> extensions
FreeToBoundCorrection freeToBoundCorrection

Whether to include non-linear correction during global to local transformation.

std::reference_wrapper<const GeometryContext> geoContext

Context object for the geometry.

std::reference_wrapper<const MagneticFieldContext> magFieldContext

Context object for the magnetic field.

bool multipleScattering = false

Whether to consider multiple scattering.

int nUpdates = 1

Number of iterations to improve chi2.

PropagatorPlainOptions propagatorPlainOptions

The trivial propagator options.

template<typename traj_t>
struct Chi2FitterResult
#include <Acts/TrackFitting/Chi2Fitter.hpp>

Public Members

ActsScalar chisquare = -1
std::vector<ActsScalar> chisquares
std::vector<ActsScalar> collectorCovariance
BoundVector collectorDerive1Chi2Sum = BoundVector::Zero()

first derivative of chi2 wrt starting track parameters

BoundMatrix collectorDerive2Chi2Sum = BoundMatrix::Zero()
std::vector<ActsScalar> collectorMeasurements
std::vector<ActsScalar> collectorResiduals
ActsDynamicMatrix covariance
bool finished = false
std::optional<BoundTrackParameters> fittedParameters
traj_t *fittedStates = {nullptr}
BoundMatrix jacobianFromStart = BoundMatrix::Identity()
size_t lastMeasurementIndex = SIZE_MAX
size_t lastTrackIndex = Acts::MultiTrajectoryTraits::kInvalid
size_t measurementHoles = 0
size_t measurementStates = 0
std::vector<const Surface*> missedActiveSurfaces
size_t processedStates = 0
ActsDynamicVector residuals
Result<void> result = {Result<void>::success()}
class Detector : public std::enable_shared_from_this<Detector>
#include <Acts/Detector/Detector.hpp>

Public Functions

inline const DetectorVolumeUpdator &detectorVolumeFinder() const

Const access to the volume finder.

const DetectorVolume *findDetectorVolume(const GeometryContext &gctx, const Vector3 &position) const

Find a volume from a position.

Note

this creates internally a NavigationState object

Parameters
  • gctx – is the Geometry context of the call

  • position – is the position of the call

Returns

the volume pointer or nullptr (if outside)

const DetectorVolume *findDetectorVolume(const std::string &name) const

Find a volume by name.

Parameters

name – with which the volume is searched for

Returns

the volume pointer or nullptr (if not found)

std::shared_ptr<Detector> getSharedPtr()

Retrieve a std::shared_ptr for this surface (non-const version)

Note

Will error if this was not created through the makeShared factory since it needs access to the original reference. In C++14 this is undefined behavior (but most likely implemented as a bad_weak_ptr exception), in C++17 it is defined as that exception.

Note

Only call this if you need shared ownership of this object.

Returns

The shared pointer

std::shared_ptr<const Detector> getSharedPtr() const

Retrieve a std::shared_ptr for this surface (const version)

Note

Will error if this was not created through the makeShared factory since it needs access to the original reference. In C++14 this is undefined behavior, but most likely implemented as a bad_weak_ptr exception, in C++17 it is defined as that exception.

Note

Only call this if you need shared ownership of this object.

Returns

The shared pointer

inline const std::string &name() const

Return the name of the detector.

void updateDetectorVolume(const GeometryContext &gctx, NavigationState &nState) const

Update the current volume of a given navigation state.

Parameters
  • gctx – is the Geometry context of the call

  • nState – [in, out] is the navigation state

inline void updateDetectorVolumeFinder(DetectorVolumeUpdator &&mVolumeFinder)

Update the volume finder.

Parameters

mVolumeFinder – the new volume finder

inline std::vector<std::shared_ptr<DetectorVolume>> &volumePtrs()

Non-const access to the volumes.

Returns

the volumes shared pointer store

inline const std::vector<const DetectorVolume*> &volumes() const

Const access to sub volumes.

Returns

a vector to const DetectorVolume raw pointers

Public Static Functions

template<typename ...Args>
static inline std::shared_ptr<Detector> makeShared(Args&&... args)

Factory for producing memory managed instances of Detector.

Will forward all parameters and will attempt to find a suitable constructor.

Template Parameters

Args – the arguments that will be forwarded

class DetectorVolume : public std::enable_shared_from_this<DetectorVolume>
#include <Acts/Detector/DetectorVolume.hpp>

A detector volume description which can be:

Note

A detector volume holds non-const objects internally that are allowed to be modified as long as the geometry is not yet closed. Using this, material can be attached, and GeometryIdentifier can be set at construction time.

Note

The construction of DetectorVolumes is done via a dedicated factory, this is necessary as then the shared_ptr is non-weak and it can be registred in the portal generator for further geometry processing.

Note

Navigation is always done by plain pointers, while object ownership is done by shared/unique pointers.

Public Types

using BoundingBox = Acts::AxisAlignedBoundingBox<Acts::Experimental::DetectorVolume, Acts::ActsScalar, 3>

Public Functions

inline void assignDetector(const Detector &detector)

Assign Detector to this volume (for back navigation issues)

Parameters

detector – the parenting detector class

void assignSurfaceCandidatesUpdator(SurfaceCandidatesUpdator &&surfaceCandidateUpdator, const std::vector<std::shared_ptr<Surface>> &surfaces = {}, const std::vector<std::shared_ptr<DetectorVolume>> &volumes = {})

This method allows to udate the navigation state updator module.

Parameters
  • surfaceCandidateUpdator – the new navigation state updator for surfaces

  • surfaces – the surfaces the new navigation state updator points to

  • volumes – the volumes the new navigation state updator points to

inline void assignVolumeMaterial(std::shared_ptr<IVolumeMaterial> material)

Assign the volume material description.

This method allows to load a material description during the detector geometry building, and assigning it (potentially multiple) times to detector volumes.

Parameters

material – Material description associated to this volumw

inline Vector3 center(const GeometryContext &gctx = GeometryContext()) const

Const access to the center.

Note

the geometry context is currently ignored, but is a placeholder for eventually misaligned volumes

Parameters

gctx – the geometry contect

Returns

a contextually created center

void closePortals()

Final closing of portal, i.e. this sets the end of world.

inline const Detector *detector() const

Const access to the detector.

Extent extent(const GeometryContext &gctx, size_t nseg = 1) const

The Extent for this volume.

Parameters
  • gctx – is the geometry context

  • nseg – is the number of segements to approximate

Returns

an Extent object

inline const GeometryIdentifier &geometryId() const
Returns

the geometry identifier

const BoundingBox &getBoundingBox() const
std::shared_ptr<DetectorVolume> getSharedPtr()

Retrieve a std::shared_ptr for this surface (non-const version)

Note

Will error if this was not created through the makeShared factory since it needs access to the original reference. In C++14 this is undefined behavior (but most likely implemented as a bad_weak_ptr exception), in C++17 it is defined as that exception.

Note

Only call this if you need shared ownership of this object.

Returns

The shared pointer

std::shared_ptr<const DetectorVolume> getSharedPtr() const

Retrieve a std::shared_ptr for this surface (const version)

Note

Will error if this was not created through the makeShared factory since it needs access to the original reference. In C++14 this is undefined behavior, but most likely implemented as a bad_weak_ptr exception, in C++17 it is defined as that exception.

Note

Only call this if you need shared ownership of this object.

Returns

The shared pointer

bool inside(const GeometryContext &gctx, const Vector3 &position, bool excludeInserts = true) const

Inside/outside method.

Parameters
  • gctx – the geometry context

  • position – the position for the inside check

  • excludeInserts – steers whether inserted volumes overwrite this

Returns

a bool to indicate inside/outside

inline const std::string &name() const
Returns

the name of the volume

inline std::vector<std::shared_ptr<Portal>> &portalPtrs()

Non-const access to the portals.

Returns

the portal shared pointer store

inline const std::vector<const Portal*> &portals() const

Const access to the detector portals.

Note

an empty vector indicates a container volume that has not been properly connected

Returns

a vector to const Portal raw pointers

inline const SurfaceCandidatesUpdator &surfaceCandidatesUpdator() const

Const access to the navigation state updator.

inline std::vector<std::shared_ptr<Surface>> &surfacePtrs()

Non-const access to the surfaces.

Returns

the surfaces shared pointer store

inline const std::vector<const Surface*> &surfaces() const

Const access to the surfaces.

Note

an empty vector indicates either gap volume or container volume, a non-empty vector indicates a layer volume.

Returns

a vector to const Surface raw pointers

inline const Transform3 &transform(const GeometryContext &gctx = GeometryContext()) const

Const access to the transform.

Note

the geometry context is currently ignored, but is a placeholder for eventually misaligned volumes

Parameters

gctx – the geometry contect

Returns

const reference to the contextual transform

void updateNavigationState(const GeometryContext &gctx, NavigationState &nState) const

Initialize/update the navigation status in this environment.

This method calls:

  • the local navigation delegate for candidate surfaces

  • the portal navigation delegate for candidate exit portals

  • set the current detector volume

Parameters
  • gctx – is the current geometry context

  • nState – [in,out] is the detector navigation state to be updated

void updatePortal(std::shared_ptr<Portal> portal, unsigned int pIndex) noexcept(false)

Update a portal given a portal index.

Note

throws exception if portal index out of bounds

Parameters
  • portal – the portal to be updated

  • pIndex – the portal index

inline const VolumeBounds &volumeBounds() const

Const access to the volume bounds.

Returns

const reference to the volume bounds object

inline const IVolumeMaterial *volumeMaterial() const

Const access to the volume amterial.

inline std::shared_ptr<IVolumeMaterial> volumeMaterialPtr()

Non-const access to the voume material (for scaling, e.g.)

inline std::vector<std::shared_ptr<DetectorVolume>> &volumePtrs()

Non-const access to the volumes.

Returns

the volumes shared pointer store

inline const std::vector<const DetectorVolume*> &volumes() const

Const access to sub volumes.

Note

and empty vector indicates this is either a gap volume or a layer volume, in any case it means the volume is on navigation level and the portals need to be connected

Returns

a vector to const DetectorVolume raw pointers

Friends

friend class DetectorVolumeFactory
template<typename internal_type>
struct ObjectStore
#include <Acts/Detector/DetectorVolume.hpp>

Nested object store that holds the internal (non-const), reference counted objects and provides an external (const raw pointer) access.

Template Parameters

internal_type – is the internal storage representation, has to comply with std::shared_ptr semantics

Public Functions

inline ObjectStore(const std::vector<internal_type> &objects)

Store constructor.

Parameters

objects – are the ones copied into the internal store

ObjectStore() = default

Public Members

std::vector<const typename internal_type::element_type*> external = {}

The external storage vector, const raw pointer.

std::vector<internal_type> internal = {}

The internal storage vector.

class DetectorVolumeFactory
#include <Acts/Detector/DetectorVolume.hpp>

A detector volume factory which first constructs the detector volume and then constructs the portals.

This ensures that the std::shared_ptr holding the detector volume is not weak when assigning to the portals.

Public Static Functions

template<typename ...Args>
static inline std::shared_ptr<DetectorVolume> construct(const PortalGenerator &portalGenerator, const GeometryContext &gctx, Args&&... args)

Create a detector volume - from factory.

Parameters
  • portalGenerator – the volume portal generator

  • gctx – the geometry context for construction and potential contextual store

  • args – the arguments forwarded to the detector volume contructor

Returns

a shared object DetectorVolume

struct DetectorVolumeFiller
#include <Acts/Navigation/NavigationState.hpp>

Filler of the current volume.

Public Static Functions

static inline void fill(NavigationState &nState, const DetectorVolume *volume)

Helper struct that allows to fill a volume into the navigation state, it allows to use common navigation structs for volume, portal, surfaces.

Parameters
  • nState – the navigation state

  • volume – the volume that is filled

struct DetectorVolumesCollection
#include <Acts/Navigation/DetectorVolumeUpdators.hpp>

This holds and extracts a collection of detector volumes.

Alternatively an extractor could also use the detector and its associated detector volume container for volume extraction.

Public Functions

inline const DetectorVolume *extract(const GeometryContext&, const NavigationState&, const SingleIndex &index) const

Extract a voume from a collection.

Note

that geometry context and navigation state are ignored here

Parameters

index – are access indices into the surfaces store

Returns

the extracted volume

Public Members

std::vector<const DetectorVolume*> dVolumes = {}

The volumes held by this collection.

struct EndOfWorldImpl : public Acts::Experimental::INavigationDelegate
#include <Acts/Navigation/DetectorVolumeUpdators.hpp>

The end of world sets the volume pointer of the navigation state to nullptr, usually indicates the end of the known world, hence the name.

Public Functions

inline void update(const GeometryContext&, NavigationState &nState) const

a null volume link - explicitely

Note

the method parameters are ignored

template<typename propagator_t, typename bethe_heitler_approx_t, typename traj_t>
struct GaussianSumFitter
#include <Acts/TrackFitting/GaussianSumFitter.hpp>

Gaussian Sum Fitter implementation.

Note

This GSF implementation tries to be as compatible to the KalmanFitter as possible. However, strict compatibility is not garantueed.

Note

Currently there is no possibility to export the states of the individual components from the GSF, the only information returned in the MultiTrajectory are the means of the states. Therefore, also NO dedicated component smoothing is performed as described e.g. by R. Fruewirth.

Template Parameters
  • propagator_t – The propagator type on which the algorithm is built on

  • bethe_heitler_approx_t – The type of the Bethe-Heitler-Approximation

  • traj_t – The MultiTrajectory type (backend)

Public Types

using GsfActor = detail::GsfActor<bethe_heitler_approx_t, traj_t>

The actor type.

using GsfNavigator = typename propagator_t::Navigator

The navigator type.

Public Functions

inline GaussianSumFitter(propagator_t &&propagator, bethe_heitler_approx_t &&bha, std::unique_ptr<const Logger> _logger = getDefaultLogger("GSF", Logging::INFO))

The fit function for the Direct navigator.

The fit function for the standard navigator.

The generic implementation of the fit function.

TODO check what this function does with the referenceSurface is e.g. the first measuerementSurface

inline const Logger &logger() const

Public Members

std::unique_ptr<const Logger> m_actorLogger
bethe_heitler_approx_t m_betheHeitlerApproximation

The fitter holds the instance of the bethe heitler approx.

std::unique_ptr<const Logger> m_logger

The logger.

propagator_t m_propagator

The propagator instance used by the fit function.

template<typename traj_t>
struct GsfExtensions
#include <Acts/TrackFitting/GsfOptions.hpp>

The extensions needed for the GSF.

Public Types

using Calibrator = Delegate<void(const GeometryContext&, TrackStateProxy)>
using ConstTrackStateProxy = typename MultiTrajectory<traj_t>::ConstTrackStateProxy
using OutlierFinder = Delegate<bool(ConstTrackStateProxy)>
using TrackStateProxy = typename MultiTrajectory<traj_t>::TrackStateProxy
using Updater = Delegate<Result<void>(const GeometryContext&, TrackStateProxy, NavigationDirection, const Logger&)>

Public Functions

inline GsfExtensions()

Default constructor which connects the default void components.

Public Members

Calibrator calibrator

The Calibrator is a dedicated calibration algorithm that allows to calibrate measurements using track information, this could be e.g.

sagging for wires, module deformations, etc.

OutlierFinder outlierFinder

Determines whether a measurement is supposed to be considered as an outlier.

Updater updater

The updater incorporates measurement information into the track parameters.

template<typename traj_t>
struct GsfOptions
#include <Acts/TrackFitting/GsfOptions.hpp>

Public Functions

GsfOptions() = delete

Public Members

bool abortOnError = true
std::reference_wrapper<const CalibrationContext> calibrationContext
bool disableAllMaterialHandling = false
GsfExtensions<traj_t> extensions
std::reference_wrapper<const GeometryContext> geoContext
std::reference_wrapper<const MagneticFieldContext> magFieldContext
std::size_t maxComponents = 4
PropagatorPlainOptions propagatorPlainOptions
const Surface *referenceSurface = nullptr
double weightCutoff = 1.e-4
class INavigationDelegate
#include <Acts/Navigation/NavigationDelegates.hpp>

Base class for navigation delegates This allows to define a common Owning delegate schema, which in turn allows for accessing the holder of the delegate implementation for e.g.

I/O or display

Subclassed by Acts::Experimental::AdditionalSurfacesImpl, Acts::Experimental::AllPortalsAndSurfacesImpl, Acts::Experimental::AllPortalsImpl, Acts::Experimental::BoundVolumesGrid1Impl, Acts::Experimental::ChainedUpdatorImpl< updators_t >, Acts::Experimental::EndOfWorldImpl, Acts::Experimental::IndexedUpdatorImpl< grid_type, extractor_type, filler_type >, Acts::Experimental::SingleDetectorVolumeImpl, Acts::Experimental::SingleObjectImpl< object_type, filler_type >, Acts::Experimental::StaticUpdatorImpl< extractor_type, filler_type >, Acts::Experimental::TrialAndErrorImpl, Acts::Experimental::IndexedUpdatorImpl< VariableBoundIndexGrid1, DetectorVolumesCollection, DetectorVolumeFiller >

struct IndexedDetectorVolumeExtractor
#include <Acts/Navigation/DetectorVolumeFinders.hpp>

A helper struct that allows to extrace a volume from the detector by its index.

Public Static Functions

static inline const DetectorVolume *extract([[maybe_unused]] const GeometryContext &gctx, const NavigationState &nState, size_t index) noexcept(false)

Extract the surfaces from the volume.

Parameters
  • gctx – the geometry contextfor this extraction call

  • nState – is the current navigation state

  • index – is the index in the global detector volume store

Returns

a raw DetectorVolume pointer

struct IndexedSubVolumesExtractor
#include <Acts/Detector/DetectorVolume.hpp>

Helper extractors: indexed sub volume of a volume.

Public Static Functions

static inline const std::vector<const DetectorVolume*> extract([[maybe_unused]] const GeometryContext &gctx, const NavigationState &nState, const std::vector<size_t> &indices)

Extract the sub volumes from the volume.

Parameters
  • gctx – the geometry contextfor this extraction call

  • nState – is the current navigation state

  • indices – are access indices into the volume store

Returns

a vector of raw DetectorVolume pointers

struct IndexedSurfacesExtractor
#include <Acts/Detector/DetectorVolume.hpp>

Helper extractors: indexed surfaces.

Public Static Functions

static inline const std::vector<const Surface*> extract([[maybe_unused]] const GeometryContext &gctx, const NavigationState &nState, const std::vector<size_t> &indices)

Extract the surfaces from the volume.

Parameters
  • gctx – the geometry contextfor this extraction call

  • nState – is the current navigation state

  • indices – are access indices into the surfaces store

Returns

a vector of raw Surface pointers

template<typename grid_type, typename extractor_type, typename filler_type>
class IndexedUpdatorImpl : public Acts::Experimental::INavigationDelegate
#include <Acts/Navigation/NavigationStateUpdators.hpp>

This is an index grid based navigation state updator, it uses an extractor type and a filler type to handle the navigation state.

It can be used for volumes, surfaces at convenience

Note

a transform is applied p3l = transform * p3 in order to allow shifted, transformed grids

Template Parameters
  • grid_type – is the type of the grid

  • extractor_type – is the helper to extract the object

  • filler_type – is the helper to fill the object into the nState

Public Functions

inline IndexedUpdatorImpl(grid_type &&igrid, const std::array<BinningValue, grid_type::DIM> &icasts, const Transform3 &itr = Transform3::Identity())

Constructor for a grid based surface attacher.

Parameters
  • igrid – the grid that is moved into this attacher

  • icasts – is the cast values array

  • itr – a transform applied to the global position

IndexedUpdatorImpl() = delete
inline std::array<ActsScalar, grid_type::DIM> castPosition(const Vector3 &position) const

Cast into a lookup position.

Parameters

position – is the position of the update call

inline void update(const GeometryContext &gctx, NavigationState &nState) const

updates the navigation state with objects from the grid according to the filling type AFTER applying p3loc = transform * p3

Note

this is attaching objects without intersecting nor checking

Parameters
  • gctx – is the Geometry context of this call

  • nState – the navigation state to which the surfaces are attached

Public Members

extractor_type extractor

An extractor helper to get the object(s) from the volume.

grid_type grid

The grid where the indices are stored.

struct NavigationState
#include <Acts/Navigation/NavigationState.hpp>

A navigation state struct that is holding the current navigation information.

It relies on Surfaces and Portals, all navigation entities have to be described in these terms.

Public Types

using SurfaceCandidates = std::vector<SurfaceCandidate>

Surface candidate vector alias, this allows to use e.g.

boost_small vector or other stl like containers

Public Members

ActsScalar absMomentum = 0.

The current absolute momentum.

std::any auxilliary

Auxilliary attached information.

ActsScalar charge = 0.

The current charge.

const Detector *currentDetector = nullptr

The current detector in processing.

const Surface *currentSurface = nullptr

The current surface, i.e the position is on surface.

const DetectorVolume *currentVolume = nullptr

The current volume in processing, i.e. the position is inside.

Vector3 direction = Vector3(0., 0., 0.)

The current direction.

Vector3 magneticField = Vector3(0., 0., 0.)

The current magnetic field.

ActsScalar overstepTolerance = -0.1

An overstep tolerance.

Vector3 position = Vector3(0., 0., 0.)

The current position.

BoundaryCheck surfaceBoundaryCheck = true

Boundary directives for surfaces.

SurfaceCandidates::iterator surfaceCandidate = surfaceCandidates.end()
SurfaceCandidates surfaceCandidates = {}

That are the candidate surfaces to process.

struct SurfaceCandidate
#include <Acts/Navigation/NavigationState.hpp>

A surface candidate and its intersection.

A candidates can either be a surface or a portal (which contain a surface)

Public Members

BoundaryCheck bCheck = true

The boundary check used for the candidate, boundary checks can differ for sensitive surfaces and portals.

ObjectIntersection<Surface> objectIntersection

A candidate intersection, in Surface view.

const Portal *portal = nullptr

Or a portal.

const Surface *surface = nullptr

A candidate is either a detector Surface.

class Portal : public std::enable_shared_from_this<Portal>
#include <Acts/Detector/Portal.hpp>

A portal description between the detector volumes.

It has a Surface representation for navigation and propagation and guides from one volume to the next.

The surface can carry material to allow mapping onto portal positions if required.

Public Types

using AttachedDetectorVolumes = std::array<std::vector<std::shared_ptr<DetectorVolume>>, 2u>

The vector of attached volumes forward/backward, this is useful in the geometry building.

using DetectorVolumeUpdators = std::array<DetectorVolumeUpdator, 2u>

The volume links forward/backward with respect to the surface normal.

Public Functions

Portal() = delete
virtual ~Portal() = default
void assignDetectorVolumeUpdator(NavigationDirection nDir, DetectorVolumeUpdator &&dVolumeUpdator, const std::vector<std::shared_ptr<DetectorVolume>> &attachedVolumes)

Update the volume link.

Note

this overwrites the existing link

Parameters
  • nDir – the navigation direction for the link

  • dVolumeUpdator – is the mangaged volume updator delegate

  • attachedVolumes – is the list of attached volumes for book keeping

void assignDetectorVolumeUpdator(DetectorVolumeUpdator &&dVolumeUpdator, const std::vector<std::shared_ptr<DetectorVolume>> &attachedVolumes) noexcept(false)

Update the volume link, w/o directive, i.e.

it relies that there’s only one remaining link to be set, throws an exception if that’s not the case

Note

this overwrites the existing link

Parameters
  • dVolumeUpdator – is the mangaged volume updator delegate

  • attachedVolumes – is the list of attached volumes for book keeping

void assignGeometryId(const GeometryIdentifier &geometryId)

Set the geometry identifier (to the underlying surface)

Parameters

geometryId – the geometry identifier to be assigned

inline AttachedDetectorVolumes &attachedDetectorVolumes()
inline const DetectorVolumeUpdators &detectorVolumeUpdators() const
void fuse(std::shared_ptr<Portal> &other) noexcept(false)

Fuse with another portal, this one is kept.

Note

this will move the portal links from the other into this volume, it will throw an exception if the portals are not fusable

Note

that other will be overwritten to point to this

Parameters

other – is the portal that will be fused

std::shared_ptr<Portal> getSharedPtr()

Retrieve a std::shared_ptr for this surface (non-const version)

Note

Will error if this was not created through the makeShared factory since it needs access to the original reference. In C++14 this is undefined behavior (but most likely implemented as a bad_weak_ptr exception), in C++17 it is defined as that exception.

Note

Only call this if you need shared ownership of this object.

Returns

The shared pointer

std::shared_ptr<const Portal> getSharedPtr() const

Retrieve a std::shared_ptr for this surface (const version)

Note

Will error if this was not created through the makeShared factory since it needs access to the original reference. In C++14 this is undefined behavior, but most likely implemented as a bad_weak_ptr exception, in C++17 it is defined as that exception.

Note

Only call this if you need shared ownership of this object.

Returns

The shared pointer

inline const Surface &surface() const

Const access to the surface representation.

inline Surface &surface()

Non-const access to the surface reference.

void updateDetectorVolume(const GeometryContext &gctx, NavigationState &nState) const noexcept(false)

Update the current volume.

Parameters
  • gctx – is the Geometry context of this call

  • nState – [in,out] the navigation state for the volume to be updated

Public Static Functions

template<typename ...Args>
static inline std::shared_ptr<Portal> makeShared(Args&&... args)

Factory for producing memory managed instances of Portal.

Will forward all parameters and will attempt to find a suitable constructor.

Friends

friend class DetectorVolume
struct PortalsFiller
#include <Acts/Navigation/NavigationState.hpp>

Fillers and attachers for portals to act on the navigation state.

Public Static Functions

static inline void fill(NavigationState &nState, const std::vector<const Portal*> &portals)

Helper struct that allows to fill surfaces into the candidate vector it allows to use common navigation structs for volume, portal, surfaces.

Parameters
  • nState – the navigation state

  • portals – the portals that are filled in

struct SingleDetectorVolumeImpl : public Acts::Experimental::INavigationDelegate
#include <Acts/Navigation/DetectorVolumeUpdators.hpp>

Single volume updator, it sets the current navigation volume to the volume in question.

Public Functions

inline SingleDetectorVolumeImpl(const DetectorVolume *sVolume) noexcept(false)

Allowed constructor.

Parameters

sVolume – the volume to which it points

SingleDetectorVolumeImpl() = delete
inline void update(const GeometryContext&, NavigationState &nState) const

a null volume link - explicitely

Note

the method parameters are ignored

Public Members

const DetectorVolume *dVolume = nullptr
template<typename object_type, typename filler_type>
class SingleObjectImpl : public Acts::Experimental::INavigationDelegate
#include <Acts/Navigation/NavigationStateUpdators.hpp>

This sets a single object, e.g.

single surface or single volume

Template Parameters
  • object_type – the type of the object to be filled

  • filler_type – is the helper to fill the object into nState

Public Functions

inline SingleObjectImpl(const object_type *so)

Convenience constructor.

Parameters

so – the single object

inline void update([[maybe_unused]] const GeometryContext &gctx, NavigationState &nState) const

updates the navigation state with a single object that is filled in

Note

this is attaching objects without intersecting nor checking

Parameters
  • gctx – is the Geometry context of this call

  • nState – the navigation state to which the surfaces are attached

template<typename extractor_type, typename filler_type>
class StaticUpdatorImpl : public Acts::Experimental::INavigationDelegate
#include <Acts/Navigation/NavigationStateUpdators.hpp>

This uses state less extractor and fillers to manipulate the navigation state.

Template Parameters
  • extractor_type – the helper to extract the objects from

  • filler_type – is the helper to fill the object into nState

Public Functions

inline void update([[maybe_unused]] const GeometryContext &gctx, NavigationState &nState) const

updates the navigation state with a single object that is filled in

Note

this is attaching objects without intersecting nor checking

Parameters
  • gctx – is the Geometry context of this call

  • nState – the navigation state to which the surfaces are attached

struct SurfacesFiller
#include <Acts/Navigation/NavigationState.hpp>

Fillers and attachers for surfaces to act on the navigation state.

Public Static Functions

static inline void fill(NavigationState &nState, const std::vector<const Surface*> &surfaces)

Helper struct that allows to fill surfaces into the candidate vector it allows to use common navigation structs for volume, portal, surfaces.

Parameters
  • nState – the navigation state

  • surfaces – the surfaces that are filled in

struct TrialAndErrorImpl : public Acts::Experimental::INavigationDelegate
#include <Acts/Navigation/DetectorVolumeFinders.hpp>

The end of world sets the volume pointer of the navigation state to nullptr, usually indicates the end of the known world, hence the name.

Public Functions

inline void update(const GeometryContext &gctx, NavigationState &nState) const

a null volume link - explicitely

Parameters
  • gctx – the geometry context for this call

  • nState – the navigation state into which the volume is set