Namespace Acts::Experimental¶
-
namespace Experimental
Enums
-
enum Chi2FitterError
Values:
-
enumerator NoMeasurementFound
-
enumerator NoMeasurementFound
-
enum GsfError
Values:
-
enumerator ComponentNumberMismatch
-
enumerator AllComponentsSteppingError
-
enumerator NoComponentCreated
-
enumerator NoStatesCreated
-
enumerator StartParametersNotOnStartSurface
-
enumerator PropagationEndedOnWrongSurface
-
enumerator LastStepParamsContainNan
-
enumerator SmoothingFailed
-
enumerator ComponentNumberMismatch
Functions
-
std::error_code make_error_code(Chi2FitterError e)
-
std::error_code make_error_code(GsfError e)
-
auto 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
-
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
-
std::array<ActsScalar, PolyDegree + 1> meanCoeffs
-
using Data = std::array<PolyData, NComponents>
-
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
-
inline constexpr auto numComponents() const
-
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)
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
trajectory – Input trajectory storage to append into
- 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.
-
using Calibrator = Delegate<void(const GeometryContext&, TrackStateProxy)>
-
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_, LoggerWrapper logger_, 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
logger_ – The logger wrapper
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.
-
LoggerWrapper logger
Logger.
-
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
-
std::shared_ptr<traj_t> fittedStates
-
BoundMatrix jacobianFromStart = BoundMatrix::Identity()
-
size_t lastMeasurementIndex = SIZE_MAX
-
size_t lastTrackIndex = SIZE_MAX
-
size_t measurementHoles = 0
-
size_t measurementStates = 0
-
std::vector<const Surface*> missedActiveSurfaces
-
size_t processedStates = 0
-
ActsDynamicVector residuals
-
ActsScalar chisquare = -1
-
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, there are certain differences at the moment:
There is always a backward pass during fitting.
There are only measurement states in the result
Passed-again-surfaces is always empty at the moment
Probably some more differences which I don’t think of at the moment.
- 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.
The navigator type.
Public Functions
-
inline GaussianSumFitter(propagator_t &&propagator, bethe_heitler_approx_t &&bha)
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
Public Members
-
bethe_heitler_approx_t m_bethe_heitler_approx
The fitter holds the instance of the bethe heitler approx.
-
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, LoggerWrapper)>
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.
-
using Calibrator = Delegate<void(const GeometryContext&, TrackStateProxy)>
-
template<typename traj_t>
struct GsfOptions - #include <Acts/TrackFitting/GsfOptions.hpp>
Public Members
-
bool abortOnError = true
-
std::reference_wrapper<const CalibrationContext> calibrationContext
-
bool disableAllMaterialHandling = false
-
GsfExtensions<traj_t> extensions
-
std::reference_wrapper<const GeometryContext> geoContext
-
LoggerWrapper logger
-
std::reference_wrapper<const MagneticFieldContext> magFieldContext
-
std::size_t maxComponents = 4
-
PropagatorPlainOptions propagatorPlainOptions
-
const Surface *referenceSurface = nullptr
-
bool abortOnError = true
-
enum Chi2FitterError