|
ATLAS Offline Software
|
Go to the documentation of this file.
4 #ifndef MUONPATTERNHELPERS_MDTSEGMENTFITTER_H
5 #define MUONPATTERNHELPERS_MDTSEGMENTFITTER_H
13 #include <GaudiKernel/SystemOfUnits.h>
17 class ISpacePointCalibrator;
22 using HitType = std::unique_ptr<CalibratedSpacePoint>;
133 template <
unsigned int nDim>
140 template <
unsigned int nDim>
ParamDefs
This file defines the parameter enums in the Trk namespace.
void blockCovariance(const AmgSymMatrix(5)&hessian, SegmentFit::Covariance &covariance) const
AmgVector(toInt(ParamDefs::nPars)) Parameters
SegmentFit::Parameters Parameters
static Amg::Vector3D partialPlaneIntersect(const Amg::Vector3D &normal, const double offset, const Amg::Vector3D &segPos, const Amg::Vector3D &segDir, const LinePartialArray &linePartials, const ParamDefs fitPar)
Calculates the partial derivative of the intersection point between the segment line and the measurem...
SpacePointPerLayerSorter::HitVec HitVec
unsigned int noMoveIter
How many iterations with changes below tolerance.
SegmentFitResult fitSegment(const EventContext &ctx, HitVec &&calibHits, const Parameters &startPars, const Amg::Transform3D &localToGlobal) const
const ISpacePointCalibrator * calibrator
Pointer to the calibrator tool.
static Amg::Vector3D partialClosestApproach(const MuonR4::CalibratedSpacePoint &sp, const Amg::Vector3D &segPos, const Amg::Vector3D &segDir, const LinePartialArray &linePartials, const ParamDefs fitPar)
Calculates the partial derivative of the point of closest approach to the meausrement's wire w....
CalibratedSpacePoint::Covariance_t MeasCov_t
Updates the chi2, its Gradient & Hessian from the measurement residual.
std::unique_ptr< CalibratedSpacePoint > HitType
Eigen::Affine3d Transform3D
double chi2(TH1 *h0, TH1 *h1)
Class to provide easy MsgStream access and capabilities.
unsigned int nParsOutOfBounds
Abort the fit as soon as more than n parameters leave the fit range.
void updateDerivatives(const Amg::Vector3D &residual, const LinePartialArray &residualPartials, const MeasCov_t &measCovariance, AmgVector(5)&gradient, AmgSymMatrix(5)&hessian, double &chi2, int startPar) const
void updateLinePartials(const Parameters &fitPars, LinePartialArray &linePartials) const
Updates the partial derivaitves of the line w.r.t the fit parameters.
MdtSegmentFitter(const std::string &name, Config &&config)
unsigned int nMaxCalls
How many calls shall be executed.
constexpr int toInt(const ParamDefs p)
Interface class to refine the space point calibration with an external seed.
Eigen::Matrix< double, 3, 1 > Vector3D
This header ties the generic definitions in this package.
std::array< std::array< double, 2 >, SegmentFit::toInt(ParamDefs::nPars)> RangeArray
Allowed parameter ranges.
std::array< Amg::Vector3D, toInt(ParamDefs::nPars)> LinePartialArray
Store the partial derivative of the line w.r.t.
AmgSymMatrix(toInt(ParamDefs::nPars)) Covariance
bool doTimeFit
Switch toggling whether the T0 shall be fitted or not.
std::vector< HitType > HitVec
The calibrated Space point is created during the calibration process.
static RangeArray defaultRanges()
Function that returns a set of predefined ranges for testing.
const AmgSymMatrix(2) &SpacePoint
UpdateStatus updateParameters(Parameters ¤tPars, Parameters &previousPars, Parameters &currGrad, Parameters &prevGrad, const AmgSymMatrix(5)&hessian) const
Update step of the segment parameters using the Hessian and the gradient.
std::variant< AmgSymMatrix(2), AmgSymMatrix(3)> Covariance_t
The spatial covariance matrix of the calibrated space point.