Class Acts::MultiTrajectory

class Acts::MultiTrajectory

Store a trajectory of track states with multiple components.

This container supports both simple, sequential trajectories as well as combinatorial or multi-component trajectories. Each point can store a parent point such that the trajectory forms a directed, acyclic graph of sub-trajectories. From a set of endpoints, all possible sub-components can be easily identified. Some functionality is provided to simplify iterating over specific sub-components.

Public Types

enum [anonymous]

Values:

enumerator MeasurementSizeMax
using ConstTrackStateProxy = detail_lt::TrackStateProxy<MeasurementSizeMax, true>
using TrackStateProxy = detail_lt::TrackStateProxy<MeasurementSizeMax, false>

Public Functions

MultiTrajectory() = default

Create an empty trajectory.

size_t addTrackState(TrackStatePropMask mask = TrackStatePropMask::All, size_t iprevious = SIZE_MAX)

Add a track state without providing explicit information.

Which components of the track state are initialized/allocated can be controlled via mask

Parameters
  • mask – The bitmask that instructs which components to allocate and which to leave invalid

  • iprevious – index of the previous state, SIZE_MAX if first

Returns

Index of the newly added track state

template<typename F>
void applyBackwards(size_t iendpoint, F &&callable)

Apply a function to all previous states starting at a given endpoint.

Warning

If the trajectory contains multiple components with common points, this can have an impact on the other components.

Parameters
  • iendpoint – index of the last state

  • callable – modifying functor to be called with each point

inline void clear()

Clear the MultiTrajectory. Leaves the underlying storage untouched.

inline ConstTrackStateProxy getTrackState(size_t istate) const

Access a read-only point on the trajectory by index.

Parameters

istate – The index to access

Returns

Read only proxy to the stored track state

inline TrackStateProxy getTrackState(size_t istate)

Access a writable point on the trajectory by index.

Parameters

istate – The index to access

Returns

Read-write proxy to the stored track state

inline size_t size() const

Returns the number of track states contained.

template<typename F>
void visitBackwards(size_t iendpoint, F &&callable) const

Visit all previous states starting at a given endpoint.

Parameters
  • iendpoint – index of the last state

  • callable – non-modifying functor to be called with each point

Friends

friend class detail_lt::TrackStateProxy< MeasurementSizeMax, false >
friend class detail_lt::TrackStateProxy< MeasurementSizeMax, true >