ATLAS Offline Software
Loading...
Searching...
No Matches
KalmanFitterTool.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
6
7// ATHENA
8#include "Acts/EventData/Types.hpp"
9#include "GaudiKernel/TypeNameString.h"
14#include "GaudiKernel/EventContext.h"
17#include "TrkTrack/Track.h"
18
19// ACTS
20#include "Acts/EventData/Types.hpp"
21#include "Acts/Definitions/TrackParametrization.hpp"
22#include "Acts/Definitions/Units.hpp"
23#include "Acts/Propagator/SympyStepper.hpp"
24#include "Acts/Propagator/Navigator.hpp"
25#include "Acts/Propagator/Propagator.hpp"
26#include "Acts/Surfaces/PerigeeSurface.hpp"
27#include "Acts/Surfaces/Surface.hpp"
28#include "Acts/TrackFitting/KalmanFitter.hpp"
29#include "Acts/Utilities/Helpers.hpp"
30#include "Acts/Utilities/Logger.hpp"
31#include "Acts/Utilities/CalibrationContext.hpp"
32#include "Acts/EventData/VectorTrackContainer.hpp"
33
38
41// PACKAGE
45#include "ActsInterop/Logger.h"
46
47
48
49#include "Acts/Propagator/DirectNavigator.hpp"
51
52// STL
53#include <vector>
54
55namespace ActsTrk {
56
57
59
60 ATH_MSG_DEBUG(name() << "::" << __FUNCTION__);
64 ATH_CHECK(m_ROTcreator.retrieve(EnableTool{m_doReFitFromPRD}));
65 m_logger = makeActsAthenaLogger(this, "KalmanRefit");
66
67 auto field = std::make_shared<ATLASMagneticFieldWrapper>();
68
69 // Fitter
70 Acts::SympyStepper stepper(field);
71 Acts::Navigator navigator( Acts::Navigator::Config{ m_trackingGeometryTool->trackingGeometry() },
72 logger().cloneWithSuffix("Navigator"));
73 Acts::Propagator<Acts::SympyStepper, Acts::Navigator> propagator(stepper,
74 std::move(navigator),
75 logger().cloneWithSuffix("Prop"));
76
77 m_fitter = std::make_unique<Fitter>(std::move(propagator),
78 logger().cloneWithSuffix("KalmanFitter"));
79
80 // Direct Fitter
81 Acts::DirectNavigator directNavigator( logger().cloneWithSuffix("DirectNavigator") );
82 Acts::Propagator<Acts::SympyStepper, Acts::DirectNavigator> directPropagator(std::move(stepper),
83 std::move(directNavigator),
84 logger().cloneWithSuffix("DirectPropagator"));
85
86 m_directFitter = std::make_unique<DirectFitter>(std::move(directPropagator),
87 logger().cloneWithSuffix("DirectKalmanFitter"));
88
90
91 m_outlierFinder.StateChiSquaredPerNumberDoFCut = m_option_outlierChi2Cut;
93
94 FitterExtension_t extensionTemplate{};
95 extensionTemplate.outlierFinder.connect<&detail::FitterHelperFunctions::ATLASOutlierFinder::operator()<MutableTrackStateBackend>>(&m_outlierFinder);
96 extensionTemplate.reverseFilteringLogic.connect<&detail::FitterHelperFunctions::ReverseFilteringLogic::operator()<MutableTrackStateBackend>>(&m_reverseFilteringLogic);
99
100 extensionTemplate.outlierFinder.connect<&detail::FitterHelperFunctions::ATLASOutlierFinder::operator()
103
105 {
107
109 configureMe = extensionTemplate;
111 configureMe.surfaceAccessor.connect<&detail::TrkMeasSurfaceAccessor::operator()>(&m_trkSurfAcc);
112 }
114 {
118 configureMe = extensionTemplate;
120 configureMe.surfaceAccessor.connect<&detail::TrkPrepRawDataSurfaceAcc::operator()>(&m_prdSurfAcc);
121 }
123 {
127 configureMe = extensionTemplate;
128 configureMe.surfaceAccessor.connect<&detail::xAODUncalibMeasSurfAcc::operator()>(&m_unalibMeasSurfAcc);
129 configureMe.calibrator.connect<&xAODUnCalibrator_t::calibrate>(&m_uncalibMeasCalibrator);
130 }
131 return StatusCode::SUCCESS;
132}
133
134
136 KalmanFitterTool::configureFit(const Acts::GeometryContext& tgContext,
137 const Acts::MagneticFieldContext& mfContext,
138 const Acts::CalibrationContext& calContext,
139 const Acts::Surface* surface,
140 detail::SourceLinkType slType) const {
141
142
143 const auto& kfExtensions = m_kfExtensions[static_cast<int>(slType)];
144
145 Acts::PropagatorPlainOptions propagationOption(tgContext, mfContext);
146 propagationOption.maxSteps = m_option_maxPropagationStep;
147 // Set the KalmanFitter options
148 return FitterOptions_t{tgContext, mfContext, calContext,
149 kfExtensions, propagationOption,
150 surface};
151}
152// refit a track
153// -------------------------------------------------------
154std::unique_ptr<Trk::Track>
155KalmanFitterTool::fit(const EventContext& ctx,
156 const Trk::Track& inputTrack,
157 const Trk::RunOutlierRemoval /*runOutlier*/,
158 const Trk::ParticleHypothesis hypothesis) const {
159
160 ATH_MSG_VERBOSE ("--> enter KalmanFitter::fit(Track,,) with Track from author = "
161 << inputTrack.info().dumpInfo()<<", "<<hypothesis);
162
163 // protection against not having measurements on the input track
164 if (!inputTrack.measurementsOnTrack() || inputTrack.measurementsOnTrack()->size() < 2) {
165 ATH_MSG_DEBUG("called to refit empty track or track with too little information, reject fit");
166 return nullptr;
167 }
168
169 // protection against not having track parameters on the input track
170 if (!inputTrack.trackParameters() || inputTrack.trackParameters()->empty()) {
171 ATH_MSG_DEBUG("input fails to provide track parameters for seeding the KF, reject fit");
172 return nullptr;
173 }
174
175 // Construct a perigee surface as the target surface
176 auto pSurface = Acts::Surface::makeShared<Acts::PerigeeSurface>(Acts::Vector3::Zero());
177
178 const Acts::GeometryContext tgContext = m_trackingGeometryTool->getGeometryContext(ctx).context();
179 const Acts::MagneticFieldContext mfContext = m_extrapolationTool->getMagneticFieldContext(ctx);
180 const Acts::CalibrationContext calContext{getCalibrationContext(ctx)};
181 // Set the KalmanFitter options
182 Acts::KalmanFitterOptions kfOptions = configureFit(tgContext, mfContext, calContext, pSurface.get(),
184
185 std::vector<Acts::SourceLink> trackSourceLinks = m_ATLASConverterTool->trkTrackToSourceLinks(inputTrack);
186 // protection against error in the conversion from Atlas masurement to Acts source link
187 if (trackSourceLinks.empty()) {
188 ATH_MSG_DEBUG("input contain measurement but no source link created, probable issue with the converter, reject fit ");
189 return nullptr;
190 }
191
192 const auto initialParams = m_ATLASConverterTool->trkTrackParametersToActsParameters((*inputTrack.perigeeParameters()), tgContext);
193
194 // The covariance from already fitted track are too small and would result an incorect smoothing.
195 // We scale up the input covaraiance to avoid this.
196 Acts::BoundSquareMatrix scaledCov = Acts::BoundSquareMatrix::Identity();
197 for (int i=0; i<6; ++i) {
198 double scale = m_option_seedCovarianceScale;
199 (scaledCov)(i,i) = scale * initialParams.covariance().value()(i,i);
200 }
201
202 const Acts::BoundTrackParameters scaledInitialParams(initialParams.referenceSurface().getSharedPtr(),
203 initialParams.parameters(),
204 scaledCov,
205 Acts::ParticleHypothesis::pion());
206
207 ActsTrk::MutableTrackBackend trackContainerBackEnd;
208 ActsTrk::MutableTrackStateBackend multiTrajBackEnd;
209 ActsTrk::MutableTrackContainer tracks( std::move(trackContainerBackEnd),
210 std::move(multiTrajBackEnd));
211
212 // Perform the fit
213 auto result = m_fitter->fit(trackSourceLinks.begin(), trackSourceLinks.end(),
214 scaledInitialParams, kfOptions, tracks);
215 return m_ATLASConverterTool->convertFitResult(ctx, tracks, result,
218}
219
220// fit a set of MeasurementBase objects
221// --------------------------------
222std::unique_ptr<Trk::Track>
223KalmanFitterTool::fit(const EventContext& ctx,
224 const Trk::MeasurementSet& inputMeasSet,
225 const Trk::TrackParameters& estimatedStartParameters,
226 const Trk::RunOutlierRemoval /*runOutlier*/,
227 const Trk::ParticleHypothesis /*matEffects*/) const {
228
229 // protection against not having measurements on the input track
230 if (inputMeasSet.size() < 2) {
231 ATH_MSG_DEBUG("called to refit empty measurement set or a measurement set with too little information, reject fit");
232 return nullptr;
233 }
234
235 // Construct a perigee surface as the target surface
236 auto pSurface = Acts::Surface::makeShared<Acts::PerigeeSurface>(Acts::Vector3::Zero());
237
238 const Acts::GeometryContext tgContext = m_trackingGeometryTool->getGeometryContext(ctx).context();
239 const Acts::MagneticFieldContext mfContext = m_extrapolationTool->getMagneticFieldContext(ctx);
240 const Acts::CalibrationContext calContext{getCalibrationContext(ctx)};
241
242 Acts::KalmanFitterOptions kfOptions = configureFit(tgContext, mfContext, calContext, pSurface.get(),
244
245 std::vector<Acts::SourceLink> trackSourceLinks;
246 m_ATLASConverterTool->toSourceLinks(inputMeasSet, trackSourceLinks);
247 // protection against error in the conversion from Atlas masurement to Acts source link
248 if (trackSourceLinks.empty()) {
249 ATH_MSG_DEBUG("input contain measurement but no source link created, probable issue with the converter, reject fit ");
250 return nullptr;
251 }
252
253 const auto initialParams = m_ATLASConverterTool->trkTrackParametersToActsParameters(estimatedStartParameters, tgContext);
254
255 ActsTrk::MutableTrackBackend trackContainerBackEnd;
256 ActsTrk::MutableTrackStateBackend multiTrajBackEnd;
257 ActsTrk::MutableTrackContainer tracks( std::move(trackContainerBackEnd),
258 std::move(multiTrajBackEnd));
259
260 // Perform the fit
261 auto result = m_fitter->fit(trackSourceLinks.begin(), trackSourceLinks.end(),
262 initialParams, kfOptions, tracks);
263 return m_ATLASConverterTool->convertFitResult(ctx, tracks, result,
266}
267
268// fit a set of PrepRawData objects
269// --------------------------------
270std::unique_ptr<Trk::Track>
271KalmanFitterTool::fit(const EventContext& ctx,
272 const Trk::PrepRawDataSet& inputPRDColl,
273 const Trk::TrackParameters& estimatedStartParameters,
274 const Trk::RunOutlierRemoval /*runOutlier*/,
275 const Trk::ParticleHypothesis /*prtHypothesis*/) const {
276 ATH_MSG_DEBUG("--> entering KalmanFitter::fit(PRDS,TP,)");
277
278 // Construct a perigee surface as the target surface
279 auto pSurface = Acts::Surface::makeShared<Acts::PerigeeSurface>(Acts::Vector3::Zero());
280
281 const Acts::GeometryContext tgContext = m_trackingGeometryTool->getGeometryContext(ctx).context();
282 const Acts::MagneticFieldContext mfContext = m_extrapolationTool->getMagneticFieldContext(ctx);
283 const Acts::CalibrationContext calContext{getCalibrationContext(ctx)};
284
285 Acts::KalmanFitterOptions kfOptions = configureFit(tgContext, mfContext, calContext, pSurface.get(),
287
288 std::vector<Acts::SourceLink> trackSourceLinks;
289 m_ATLASConverterTool->toSourceLinks(inputPRDColl, trackSourceLinks);
290 // protection against error in the conversion from Atlas masurement to Acts source link
291 if (trackSourceLinks.empty()) {
292 ATH_MSG_WARNING("input contain measurement but no source link created, probable issue with the converter, reject fit ");
293 return nullptr;
294 }
295 //
296
297 const auto initialParams = m_ATLASConverterTool->trkTrackParametersToActsParameters(estimatedStartParameters, tgContext);
298
299 ActsTrk::MutableTrackBackend trackContainerBackEnd;
300 ActsTrk::MutableTrackStateBackend multiTrajBackEnd;
301 ActsTrk::MutableTrackContainer tracks( std::move(trackContainerBackEnd),
302 std::move(multiTrajBackEnd));
303
304 // Perform the fit
305 auto result = m_fitter->fit(trackSourceLinks.begin(), trackSourceLinks.end(),
306 initialParams, kfOptions, tracks);
307 return m_ATLASConverterTool->convertFitResult(ctx, tracks, result,
310}
311
312// fit a set of PrepRawData objects
313// --------------------------------
314std::unique_ptr< MutableTrackContainer >
315KalmanFitterTool::fit(const std::vector< ATLASUncalibSourceLink> & clusterList,
316 const Acts::BoundTrackParameters& initialParams,
317 const Acts::GeometryContext& tgContext,
318 const Acts::MagneticFieldContext& mfContext,
319 const Acts::CalibrationContext& calContext,
320 const Acts::Surface* targetSurface) const{
321 ATH_MSG_DEBUG("--> entering KalmanFitter::fit(xAODMeasure...things,TP,)");
322
323 std::vector<Acts::SourceLink> sourceLinks;
324 sourceLinks.reserve(clusterList.size());
325
326 std::vector<const Acts::Surface*> surfaces;
327 surfaces.reserve(clusterList.size());
328
329
330 for (const ATLASUncalibSourceLink& el : clusterList) {
331 sourceLinks.emplace_back( el );
332 surfaces.push_back(m_unalibMeasSurfAcc.get(el));
333 }
334
335 // Construct a perigee surface as the target surface if none is provided
336 std::shared_ptr<Acts::Surface> pSurface{nullptr};
337 if (!targetSurface){
338 pSurface = Acts::Surface::makeShared<Acts::PerigeeSurface>(Acts::Vector3::Zero());
339 targetSurface = pSurface.get();
340 }
341
342 // Set the KalmanFitter options
343
344 Acts::KalmanFitterOptions kfOptions = configureFit(tgContext, mfContext, calContext, targetSurface,
346
347 ActsTrk::MutableTrackBackend trackContainerBackEnd;
348 ActsTrk::MutableTrackStateBackend multiTrajBackEnd;
349 std::unique_ptr< MutableTrackContainer > tracks = std::make_unique< MutableTrackContainer >( std::move(trackContainerBackEnd),
350 std::move(multiTrajBackEnd) );
351
352
353 auto result = m_directFitter->fit(sourceLinks.begin(),
354 sourceLinks.end(),
355 initialParams,
356 kfOptions,
357 surfaces,
358 *tracks.get());
359
360 if (not result.ok()) {
361 ATH_MSG_VERBOSE("Kalman Fitter on Seed has failed");
362 return nullptr;
363 }
364 return tracks;
365}
366
367// extend a track fit to include an additional set of MeasurementBase objects
368// re-implements the TrkFitterUtils/TrackFitter.cxx general code in a more
369// mem efficient and stable way
370// --------------------------------
371std::unique_ptr<Trk::Track>
372KalmanFitterTool::fit(const EventContext& ctx,
373 const Trk::Track& inputTrack,
374 const Trk::MeasurementSet& addMeasColl,
375 const Trk::RunOutlierRemoval /*runOutlier*/,
376 const Trk::ParticleHypothesis /*matEffects*/) const
377{
378 ATH_MSG_VERBOSE ("--> enter KalmanFitter::fit(Track,Meas'BaseSet,,)");
379 ATH_MSG_VERBOSE (" with Track from author = " << inputTrack.info().dumpInfo());
380
381 // protection, if empty MeasurementSet
382 if (addMeasColl.empty()) {
383 ATH_MSG_DEBUG( "client tries to add an empty MeasurementSet to the track fit." );
384 return fit(ctx,inputTrack);
385 }
386
387 // protection against not having measurements on the input track
388 if (!inputTrack.measurementsOnTrack() || (inputTrack.measurementsOnTrack()->size() < 2 && addMeasColl.empty())) {
389 ATH_MSG_DEBUG("called to refit empty track or track with too little information, reject fit");
390 return nullptr;
391 }
392
393 // protection against not having track parameters on the input track
394 if (!inputTrack.trackParameters() || inputTrack.trackParameters()->empty()) {
395 ATH_MSG_DEBUG("input fails to provide track parameters for seeding the KF, reject fit");
396 return nullptr;
397 }
398
399
400 // Construct a perigee surface as the target surface
401 auto pSurface = Acts::Surface::makeShared<Acts::PerigeeSurface>(Acts::Vector3::Zero());
402
403 const Acts::GeometryContext tgContext = m_trackingGeometryTool->getGeometryContext(ctx).context();
404 const Acts::MagneticFieldContext mfContext = m_extrapolationTool->getMagneticFieldContext(ctx);
405 const Acts::CalibrationContext calContext{getCalibrationContext(ctx)};
406
407 // Set the KalmanFitter options
408 Acts::KalmanFitterOptions kfOptions = configureFit(tgContext, mfContext, calContext, pSurface.get(),
410
411 std::vector<Acts::SourceLink> trackSourceLinks = m_ATLASConverterTool->trkTrackToSourceLinks(inputTrack);
412 m_ATLASConverterTool->toSourceLinks(addMeasColl, trackSourceLinks);
413
414 // protection against error in the conversion from Atlas masurement to Acts source link
415 if (trackSourceLinks.empty()) {
416 ATH_MSG_DEBUG("input contain measurement but no source link created, probable issue with the converter, reject fit ");
417 return nullptr;
418 }
419 const auto initialParams = m_ATLASConverterTool->trkTrackParametersToActsParameters(*(inputTrack.perigeeParameters()), tgContext);
420
421 ActsTrk::MutableTrackBackend trackContainerBackEnd;
422 ActsTrk::MutableTrackStateBackend multiTrajBackEnd;
423 ActsTrk::MutableTrackContainer tracks( std::move(trackContainerBackEnd),
424 std::move(multiTrajBackEnd));
425
426 // Perform the fit
427 auto result = m_fitter->fit(trackSourceLinks.begin(), trackSourceLinks.end(),
428 initialParams, kfOptions, tracks);
429 return m_ATLASConverterTool->convertFitResult(ctx, tracks, result,
432}
433
434// extend a track fit to include an additional set of PrepRawData objects
435// --------------------------------
436std::unique_ptr<Trk::Track>
437KalmanFitterTool::fit(const EventContext& /*ctx*/,
438 const Trk::Track& /*inputTrack*/,
439 const Trk::PrepRawDataSet& /*addPrdColl*/,
440 const Trk::RunOutlierRemoval /*runOutlier*/,
441 const Trk::ParticleHypothesis /*matEffects*/) const
442{
443 ATH_MSG_DEBUG("Fit of Track with additional PrepRawDataSet not yet implemented");
444 return nullptr;
445}
446
447// combined fit of two tracks
448// --------------------------------
449std::unique_ptr<Trk::Track>
450KalmanFitterTool::fit(const EventContext& ctx,
451 const Trk::Track& intrk1,
452 const Trk::Track& intrk2,
453 const Trk::RunOutlierRemoval /*runOutlier*/,
454 const Trk::ParticleHypothesis hypothesis) const
455{
456 ATH_MSG_VERBOSE ("--> enter KalmanFitter::fit(Track,Track,)");
457 ATH_MSG_VERBOSE (" with Tracks from #1 = " << intrk1.info().dumpInfo()
458 << " and #2 = " << intrk2.info().dumpInfo()<<", "<<hypothesis);
459
460 // protection, if empty track2
461 if (!intrk2.measurementsOnTrack()) {
462 ATH_MSG_DEBUG( "input #2 is empty try to fit track 1 alone" );
463 return fit(ctx,intrk1);
464 }
465
466 // protection, if empty track1
467 if (!intrk1.measurementsOnTrack()) {
468 ATH_MSG_DEBUG( "input #1 is empty try to fit track 2 alone" );
469 return fit(ctx,intrk2);
470 }
471
472 // protection against not having track parameters on the input track
473 if (!intrk1.trackParameters() || intrk1.trackParameters()->empty()) {
474 ATH_MSG_DEBUG("input #1 fails to provide track parameters for seeding the KF, reject fit");
475 return nullptr;
476 }
477
478 // Construct a perigee surface as the target surface
479 auto pSurface = Acts::Surface::makeShared<Acts::PerigeeSurface>(Acts::Vector3::Zero());
480
481 const Acts::GeometryContext tgContext = m_trackingGeometryTool->getGeometryContext(ctx).context();
482 const Acts::MagneticFieldContext mfContext = m_extrapolationTool->getMagneticFieldContext(ctx);
483 const Acts::CalibrationContext calContext{getCalibrationContext(ctx)};
484
485 // Set the KalmanFitter options
486 Acts::KalmanFitterOptions kfOptions = configureFit(tgContext, mfContext, calContext, pSurface.get(),
488
489 std::vector<Acts::SourceLink> trackSourceLinks = m_ATLASConverterTool->trkTrackToSourceLinks(intrk1);
490 std::vector<Acts::SourceLink> trackSourceLinks2 = m_ATLASConverterTool->trkTrackToSourceLinks(intrk2);
491 trackSourceLinks.insert(trackSourceLinks.end(), std::make_move_iterator(trackSourceLinks2.begin()),
492 std::make_move_iterator(trackSourceLinks2.end()));
493 // protection against error in the conversion from Atlas masurement to Acts source link
494 if (trackSourceLinks.empty()) {
495 ATH_MSG_DEBUG("input contain measurement but no source link created, probable issue with the converter, reject fit ");
496 return nullptr;
497 }
498
499 const auto &initialParams = m_ATLASConverterTool->trkTrackParametersToActsParameters(*(intrk1.perigeeParameters()), tgContext);
500
501 // The covariance from already fitted track are too small and would result an incorect smoothing.
502 // We scale up the input covaraiance to avoid this.
503 Acts::BoundSquareMatrix scaledCov = Acts::BoundSquareMatrix::Identity();
504 for (int i=0; i<6; ++i) {
505 double scale = m_option_seedCovarianceScale;
506 (scaledCov)(i,i) = scale * initialParams.covariance().value()(i,i);
507 }
508
509 const Acts::BoundTrackParameters scaledInitialParams(initialParams.referenceSurface().getSharedPtr(),
510 initialParams.parameters(),
511 scaledCov, Acts::ParticleHypothesis::pion());
512
513
514 ActsTrk::MutableTrackBackend trackContainerBackEnd;
515 ActsTrk::MutableTrackStateBackend multiTrajBackEnd;
516 ActsTrk::MutableTrackContainer tracks( std::move(trackContainerBackEnd),
517 std::move(multiTrajBackEnd));
518
519 // Perform the fit
520 auto result = m_fitter->fit(trackSourceLinks.begin(), trackSourceLinks.end(),
521 scaledInitialParams, kfOptions, tracks);
522 return m_ATLASConverterTool->convertFitResult(ctx, tracks, result,
525}
526
527std::unique_ptr< MutableTrackContainer >
529 const Acts::BoundTrackParameters& initialParams,
530 const Acts::GeometryContext& tgContext,
531 const Acts::MagneticFieldContext& mfContext,
532 const Acts::CalibrationContext& calContext,
533 const Acts::Surface& targetSurface) const {
534
535 std::vector<ATLASUncalibSourceLink> sourceLinks;
536 sourceLinks.reserve(6);
537
538 const auto& sps = seed.sp();
539 for (const xAOD::SpacePoint* sp : sps) {
540 const auto& measurements = sp->measurements();
541 for (const xAOD::UncalibratedMeasurement *umeas : measurements) {
542 sourceLinks.emplace_back(umeas);
543 }
544 }
545 return fit(sourceLinks, initialParams, tgContext, mfContext, calContext, &targetSurface);
546}
547
548 StatusCode
549 KalmanFitterTool::fit(const EventContext& /*ctx*/,
550 const TrackContainer::ConstTrackProxy& /*track*/,
551 MutableTrackContainer& /*trackContainer*/,
552 const Acts::PerigeeSurface& /*pSurface*/) const
553 {
554 ATH_MSG_ERROR("Track refit method not implemented in KalmanFitterTool yet");
555 return StatusCode::FAILURE;
556 }
557
558}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
static Double_t sp
std::unique_ptr< const Acts::Logger > makeActsAthenaLogger(IMessageSvc *svc, const std::string &name, int level, std::optional< std::string > parent_name)
ActsTrk::detail::FitterHelperFunctions::ReverseFilteringLogic m_reverseFilteringLogic
Acts::KalmanFitterExtensions< MutableTrackStateBackend > FitterExtension_t
Abbrivation of the fitter extensions.
detail::TrkPrepRawDataCalibrator m_prdCalibrator
Calibrator for the Trk::PrepRawData track states (legacy EDM)
detail::TrkPrepRawDataSurfaceAcc m_prdSurfAcc
Surface accessor for the Trk::PrepRawData track states (legacy EDM)
ToolHandle< ActsTrk::IActsToTrkConverterTool > m_ATLASConverterTool
detail::xAODUncalibMeasSurfAcc m_unalibMeasSurfAcc
Accessor to fetch surfaces from the xAOD::UncalibratedMeasurements (Phase-II EDM)
virtual std::unique_ptr< Trk::Track > fit(const EventContext &ctx, const Trk::Track &, const Trk::RunOutlierRemoval runOutlier=false, const Trk::ParticleHypothesis matEffects=Trk::nonInteracting) const override
refit a track
std::unique_ptr< const Acts::Logger > m_logger
logging instance
std::unique_ptr< Fitter > m_fitter
ActsTrk::detail::FitterHelperFunctions::ATLASOutlierFinder m_outlierFinder
ToolHandle< Trk::IRIO_OnTrackCreator > m_ROTcreator
std::array< FitterExtension_t, s_nExtensions > m_kfExtensions
detail::TrkMeasSurfaceAccessor m_trkSurfAcc
Accessor to fetch surfaces from the Trk::MeasurementBase track states (legacy EDM)
Acts::KalmanFitterOptions< MutableTrackStateBackend > FitterOptions_t
Abbrivation of the configuration to launch the fit.
Gaudi::Property< double > m_option_outlierChi2Cut
PublicToolHandle< ActsTrk::ITrackingGeometryTool > m_trackingGeometryTool
std::unique_ptr< DirectFitter > m_directFitter
const Acts::Logger & logger() const
Private access to the logger.
detail::TrkMeasurementCalibrator m_trkCalibrator
Calibrator for the Trk::MeasurementBase track states (legacy EDM)
virtual StatusCode initialize() override
xAODUnCalibrator_t m_uncalibMeasCalibrator
Gaudi::Property< double > m_option_ReverseFilteringPt
ToolHandle< ActsTrk::IExtrapolationTool > m_extrapolationTool
Gaudi::Property< int > m_option_maxPropagationStep
FitterOptions_t configureFit(const Acts::GeometryContext &tgContext, const Acts::MagneticFieldContext &mfContext, const Acts::CalibrationContext &calContext, const Acts::Surface *surface, detail::SourceLinkType slType) const
Helper method to pack the last information (Calibration, Alignment, B-Field, etc.) for the fit.
Gaudi::Property< double > m_option_seedCovarianceScale
void calibrate(const Acts::GeometryContext &geoctx, const Acts::CalibrationContext &cctx, const Acts::SourceLink &link, TrackStateProxy state) const
static OnTrackCalibrator NoCalibration(const ActsTrk::ITrackingGeometryTool *trackGeoTool)
Helper class to access the Acts::Surface for a given Acts::SourceLink which is poiniting to a Trk::Me...
void calibrate(const Acts::GeometryContext &gctx, const Acts::CalibrationContext &cctx, const Acts::SourceLink &sl, TrackState_t< trajectory_t > trackState) const
Calibrator delegate implementation to calibrate the ActsTrk fit from Trk::MeasurementBase objects.
Class to calibrate the Acts track states with uncalibrated Trk::PrepRaw data objects.
void calibrate(const Acts::GeometryContext &gctx, const Acts::CalibrationContext &cctx, const Acts::SourceLink &sl, TrackState_t< trajectory_t > trackState) const
Calibrator delegate implementation to calibrate the ActsTrk fit from Trk::PrepRawData objects.
Helper class to access the Acts::surface associated with a Trk::PrepRawData measurement.
Helper class to access the Acts::surface associated with an Uncalibrated xAOD measurement.
std::string dumpInfo() const
Returns a string with the name of the fitter of this track (i.e.
@ KalmanFitter
tracks produced by the Kalman Fitter
const DataVector< const MeasurementBase > * measurementsOnTrack() const
return a pointer to a vector of MeasurementBase (NOT including any that come from outliers).
const DataVector< const TrackParameters > * trackParameters() const
Return a pointer to a vector of TrackParameters.
const TrackInfo & info() const
Returns a const ref to info of a const tracks.
const Perigee * perigeeParameters() const
return Perigee.
Acts::Result< void > gainMatrixUpdate(const Acts::GeometryContext &gctx, typename trajectory_t::TrackStateProxy trackState, const Acts::Logger &logger)
Acts::Result< void > mbfSmoother(const Acts::GeometryContext &gctx, trajectory_t &trajectory, size_t entryIndex, const Acts::Logger &logger)
SourceLinkType
Enumeration to distinguish between the ATLAS EDM -> Acts::SourceLink variants.
@ xAODUnCalibMeas
UnCalibrated Trk::PrepRawData objects.
@ TrkPrepRawData
Calibrated Trk::MeasurementBase objects.
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
Acts::VectorMultiTrajectory MutableTrackStateBackend
Acts::TrackContainer< MutableTrackBackend, MutableTrackStateBackend, Acts::detail::ValueHolder > MutableTrackContainer
Acts::CalibrationContext getCalibrationContext(const EventContext &ctx)
The Acts::Calibration context is piped through the Acts fitters to (re)calibrate the Acts::SourceLink...
Acts::VectorTrackContainer MutableTrackBackend
const xAOD::UncalibratedMeasurement * ATLASUncalibSourceLink
std::vector< const MeasurementBase * > MeasurementSet
vector of fittable measurements
Definition FitterTypes.h:30
bool RunOutlierRemoval
switch to toggle quality processing after fit
Definition FitterTypes.h:22
ParticleHypothesis
Enumeration for Particle hypothesis respecting the interaction with material.
ParametersBase< TrackParametersDim, Charged > TrackParameters
std::vector< const PrepRawData * > PrepRawDataSet
vector of clusters and drift circles
Definition FitterTypes.h:26
UncalibratedMeasurement_v1 UncalibratedMeasurement
Define the version of the uncalibrated measurement class.