Namespace Acts::Experimental

namespace Experimental

Typedefs

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 PortalGenerator = Delegate<std::vector<std::shared_ptr<Portal>>(const Transform3&, const VolumeBounds&, const std::shared_ptr<DetectorVolume>&)>

The Portal genertor definition.

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

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

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 unconnectedUpdator()

A dummy constructed updator.

struct AllPortalsExtractor
#include <Acts/Geometry/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 AllSubVolumesExtractor
#include <Acts/Geometry/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/Geometry/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

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/Geometry/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/Geometry/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/Geometry/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/Geometry/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/Geometry/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

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/Geometry/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

struct IndexedSubVolumesExtractor
#include <Acts/Geometry/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/Geometry/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

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

A navigation state struct that is holding the current navigation information about volume, surfaces, and portals.

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/Geometry/NavigationState.hpp>

A surface candidate and its intersection.

candidates can either be surfaces or portals (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/Geometry/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/Geometry/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 SurfacesFiller
#include <Acts/Geometry/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