|
ATLAS Offline Software
|
Go to the documentation of this file.
14 #include "GaudiKernel/SystemOfUnits.h"
15 #include "GaudiKernel/ThreadLocalContext.h"
23 const std::string&
name,
26 declareInterface<IGlobalTrackFitter>(
this);
49 auto [refittedTrack, fitState] =
50 fitWithState(Gaudi::Hive::currentContext(), trk, runOutlier, matEffects);
58 return refittedTrack.release();
68 int numberParameters = 5;
70 numberParameters = fitState.
parameters->numberParameters();
75 if (!
m->isPositionMeasurement()) {
78 rows +=
m->numberDoF();
81 if (!numberParameters || !
rows) {
86 <<
" measurement objects giving " <<
rows
87 <<
" rows and " << numberParameters
88 <<
" columns (parameters)");
90 auto derivativeMatrix =
91 std::make_unique<Amg::MatrixX>(
rows, numberParameters);
94 if (!
m->numberDoF() || !
m->isPositionMeasurement()) {
98 if (
m->weight() > 0.) {
99 norm = 1. /
m->weight();
102 for (
int col = 0;
col < numberParameters; ++
col) {
108 if (fitState.
parameters->fitEnergyDeposit()) {
112 if (
m->numberDoF() < 2) {
118 if (
m->weight2() > 0.)
119 norm = 1. /
m->weight2();
120 for (
int col = 0;
col < numberParameters; ++
col) {
124 if (fitState.
parameters->fitEnergyDeposit()) {
131 ATH_MSG_WARNING(
"iPatGlobalFitter: inconsistent #rows in deriv matrix ");
134 return derivativeMatrix;
139 int numberParameters = 5;
142 numberParameters = fitState.
parameters->numberParameters();
147 return std::make_unique<Amg::MatrixX>(
m_fitProcedure->fullCovariance()->block(
148 0, 0, numberParameters, numberParameters));
Amg::MatrixX * m_derivMatrix
access to the matrix of derivatives used during the latest global-chi2 track fit.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
bool hasMeasurements() const
Main Fitter tool providing the implementation for the different fitting, extension and refitting use ...
std::unique_ptr< Amg::MatrixX > derivMatrix(const FitState &fitState) const
GlobalTrackFitter methods: access to the matrix of derivatives used during the latest track fit.
int m_iterationsOfLastFit
returns the number of iterations used by the last fit (count starts at 1 for a single-iteration fit)
#define ATH_MSG_VERBOSE(x)
bool RunOutlierRemoval
switch to toggle quality processing after fit
Amg::MatrixX * m_fullCovarianceMatrix
access to the global fitter's full covariance matrix.
std::unique_ptr< FitParameters > parameters
std::unique_ptr< FitProcedure > m_fitProcedure
void setMinIterations(int minIterations)
set method for the minimum number of iterations for (alignment) friend
iPatGlobalFitter(const std::string &type, const std::string &name, const IInterface *parent)
Ensure that the ATLAS eigen extensions are properly loaded.
static int iterationsOfLastFit(const FitState &fitState)
access to the number of iterations taken by the latest track fit
std::pair< std::unique_ptr< Track >, std::unique_ptr< FitState > > fitWithState(const EventContext &ctx, const Track &, const RunOutlierRemoval runOutlier=false, const ParticleHypothesis particleHypothesis=Trk::nonInteracting) const
Track * alignmentFit(AlignmentCache &, const Track &, const RunOutlierRemoval runOutlier=false, const ParticleHypothesis matEffects=Trk::nonInteracting) const
RE-FIT A TRACK FOR ALIGNMENT.
#define ATH_MSG_WARNING(x)
std::unique_ptr< Amg::MatrixX > fullCovarianceMatrix(const FitState &fitState) const
access to the global fitter's full covariance matrix
std::vector< FitMeasurement * > & getMeasurements()