File GlobalChiSquareFitter.hpp
-
namespace Acts
Note
This file is foreseen for the
Geometry
module to replaceExtent
-
namespace Experimental
Functions
-
template<size_t measDim, typename traj_t>
void collector(typename traj_t::TrackStateProxy &trackStateProxy, Gx2FitterResult<traj_t> &result, const Logger &logger) Collector for the GX2F Actor The collector prepares each measurement for the actual fitting process.
Each n-dimensional measurement is split into n 1-dimensional linearly independent measurements. Then the collector saves the following information:
Residual: Calculated from measurement and prediction
Covariance: The covariance of the measurement
Projected Jacobian: This implicitly contains the measurement type It also checks if the covariance is above a threshold, to detect and avoid too small covariances for a stable fit.
- Template Parameters
measDim – Number of dimensions of the measurement
traj_t – The trajectory type
- Parameters
trackStateProxy – is the current track state
result – is the mutable result/cache object
logger – a logger instance
-
template<typename propagator_t, typename traj_t>
class Gx2Fitter - #include <Acts/TrackFitting/GlobalChiSquareFitter.hpp>
Global Chi Square fitter (GX2F) implementation.
TODO Write description
- Template Parameters
propagator_t – Type of the propagation class
Public Functions
-
inline Gx2Fitter(propagator_t pPropagator, std::unique_ptr<const Logger> _logger = getDefaultLogger("Gx2Fitter", Logging::INFO))
-
template<typename source_link_iterator_t, typename start_parameters_t, typename parameters_t = BoundTrackParameters, typename track_container_t, template<typename> class holder_t, bool _isdn = isDirectNavigator>
inline auto fit(source_link_iterator_t it, source_link_iterator_t end, const start_parameters_t &sParameters, const Gx2FitterOptions<traj_t> &gx2fOptions, TrackContainer<track_container_t, traj_t, holder_t> &trackContainer) const -> std::enable_if_t<!_isdn, Result<typename TrackContainer<track_container_t, traj_t, holder_t>::TrackProxy>> Fit implementation.
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
track_container_t – Type of the track container backend
holder_t – Type defining track container backend ownership
- Parameters
it – Begin iterator for the fittable uncalibrated measurements
end – End iterator for the fittable uncalibrated measurements
sParameters – The initial track parameters
gx2fOptions – Gx2FitterOptions steering the fit
trackContainer – Input track container storage to append into
- Returns
the output as an output track
Private Types
The navigator type.
Private Members
-
propagator_t m_propagator
The propagator for the transport and material update.
Private Static Attributes
The navigator has DirectNavigator type or not.
-
template<typename parameters_t>
class Aborter Aborter can stay like this probably.
Public Types
-
using action_type = Actor<parameters_t>
Broadcast the result_type.
Public Functions
-
using action_type = Actor<parameters_t>
-
template<typename parameters_t>
class Actor Propagator Actor plugin for the GX2F.
The GX2FnActor does not rely on the measurements to be sorted along the track. /// TODO is this true?
- Template Parameters
parameters_t – The type of parameters used for “local” parameters.
calibrator_t – The type of calibrator
outlier_finder_t – Type of the outlier finder class
Public Types
-
using result_type = Gx2FitterResult<traj_t>
Broadcast the result_type.
Public Functions
Gx2f actor operation.
- Template Parameters
propagator_state_t – is the type of Propagator state
stepper_t – Type of the stepper
navigator_t – Type of the navigator
- Parameters
state – is the mutable propagator state object
stepper – The stepper in use
navigator – The navigator in use
result – is the mutable result state object
Public Members
-
const CalibrationContext *calibrationContext = {nullptr}
Calibration context for the fit.
-
bool energyLoss = false
TODO implement later.
Whether to consider energy loss.
-
Gx2FitterExtensions<traj_t> extensions
-
FreeToBoundCorrection freeToBoundCorrection
TODO implement later.
Whether to include non-linear correction during global to local transformation
-
const std::map<GeometryIdentifier, SourceLink> *inputMeasurements = nullptr
Allows retrieving measurements for a surface.
-
bool multipleScattering = false
Whether to consider multiple scattering.
-
std::shared_ptr<MultiTrajectory<traj_t>> outputStates
Input MultiTrajectory.
-
SurfaceReached targetReached
The Surface being.
-
template<typename traj_t>
struct Gx2FitterExtensions - #include <Acts/TrackFitting/GlobalChiSquareFitter.hpp>
Extension struct which holds delegates to customize the KF behavior.
Public Types
-
using Calibrator = Delegate<void(const GeometryContext&, const CalibrationContext&, const SourceLink&, 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
-
using Updater = Delegate<Result<void>(const GeometryContext&, TrackStateProxy, Direction, const Logger&)>
Public Functions
-
inline Gx2FitterExtensions()
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.
-
SourceLinkSurfaceAccessor surfaceAccessor
Retrieves the associated surface from a source link.
-
using Calibrator = Delegate<void(const GeometryContext&, const CalibrationContext&, const SourceLink&, TrackStateProxy)>
-
template<typename traj_t>
struct Gx2FitterOptions - #include <Acts/TrackFitting/GlobalChiSquareFitter.hpp>
Combined options for the Global-Chi-Square fitter.
- Template Parameters
traj_t – The trajectory type
Public Functions
-
Gx2FitterOptions() = delete
Contexts are required and the options must not be default-constructible.
-
inline Gx2FitterOptions(const GeometryContext &gctx, const MagneticFieldContext &mctx, std::reference_wrapper<const CalibrationContext> cctx, Gx2FitterExtensions<traj_t> extensions_, const PropagatorPlainOptions &pOptions, const Surface *rSurface = nullptr, bool mScattering = false, bool eLoss = false, const FreeToBoundCorrection &freeToBoundCorrection_ = FreeToBoundCorrection(false), const size_t nUpdateMax_ = 5)
PropagatorOptions with context.
- Parameters
gctx – The geometry context for this fit
mctx – The magnetic context for this fit
cctx – The calibration context for this fit
extensions_ – The KF extensions
pOptions – The plain propagator options
rSurface – The reference surface for the fit to be expressed at
mScattering – Whether to include multiple scattering
eLoss – Whether to include energy loss
freeToBoundCorrection_ – Correction for non-linearity effect during transform from free to bound
nUpdateMax_ – Max number of iterations for updating the parameters
Public Members
-
std::reference_wrapper<const CalibrationContext> calibrationContext
context object for the calibration
-
bool energyLoss = false
Whether to consider energy loss.
-
Gx2FitterExtensions<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.
-
size_t nUpdateMax = 5
Max number of iterations during the fit.
-
PropagatorPlainOptions propagatorPlainOptions
The trivial propagator options.
-
template<typename traj_t>
struct Gx2FitterResult - #include <Acts/TrackFitting/GlobalChiSquareFitter.hpp>
Public Members
-
std::vector<ActsScalar> collectorCovariances
-
std::vector<BoundVector> collectorProjectedJacobians
-
std::vector<ActsScalar> collectorResiduals
-
bool finished = false
-
std::optional<BoundTrackParameters> fittedParameters
-
BoundMatrix jacobianFromStart = BoundMatrix::Identity()
-
size_t lastMeasurementIndex = Acts::MultiTrajectoryTraits::kInvalid
-
size_t lastTrackIndex = Acts::MultiTrajectoryTraits::kInvalid
-
size_t measurementHoles = 0
-
size_t measurementStates = 0
-
size_t processedStates = 0
-
size_t surfaceCount = 0
-
std::vector<ActsScalar> collectorCovariances
-
template<size_t measDim, typename traj_t>
-
namespace Experimental