ATLAS Offline Software
Loading...
Searching...
No Matches
GlobalChiSquareFitterTool.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
6
7// ATHENA
8#include "Acts/EventData/Types.hpp"
13#include "TrkTrack/Track.h"
15
16// ACTS
17#include "Acts/Definitions/TrackParametrization.hpp"
18#include "Acts/Definitions/Units.hpp"
19#include "Acts/EventData/Types.hpp"
20#include "Acts/EventData/VectorTrackContainer.hpp"
21#include "Acts/Propagator/Navigator.hpp"
22#include "Acts/Propagator/Propagator.hpp"
23#include "Acts/Propagator/SympyStepper.hpp"
24#include "Acts/Surfaces/PerigeeSurface.hpp"
25#include "Acts/Surfaces/Surface.hpp"
26#include "Acts/TrackFitting/GlobalChiSquareFitter.hpp"
27#include "Acts/Utilities/CalibrationContext.hpp"
28#include "Acts/Utilities/Helpers.hpp"
29#include "Acts/Utilities/Logger.hpp"
32
33// PACKAGE
37#include "ActsInterop/Logger.h"
38
40// STL
41#include <vector>
42
43namespace ActsTrk {
44
46
47 ATH_MSG_DEBUG(name() << "::" << __FUNCTION__);
51 ATH_CHECK(m_ROTcreator.retrieve(EnableTool{m_doReFitFromPRD}));
52 ATH_CHECK(m_muonCalibrator.retrieve(EnableTool{!m_muonCalibrator.empty()}));
53
54 m_logger = makeActsAthenaLogger(this, "Gx2fRefit");
55 if (!m_doStraightLine){
56 // Fitter
57 CurvedPropagator_t::Stepper stepper{std::make_shared<ATLASMagneticFieldWrapper>()};
58 Acts::Navigator::Config navConfig{m_trackingGeometryTool->trackingGeometry()};
59 Acts::Navigator navigator(std::move(navConfig), logger().cloneWithSuffix("Navigator"));
60 CurvedPropagator_t propagator{stepper, std::move(navigator), logger().cloneWithSuffix("Prop")};
61
62 m_fitter = std::make_unique<CurvedFitter_t>(std::move(propagator),
63 logger().cloneWithSuffix("GlobalChiSquareFitter"));
64 } else {
65 Acts::StraightLineStepper stepper{};
66 Acts::Navigator::Config navConfig{m_trackingGeometryTool->trackingGeometry()};
67 Acts::Navigator navigator(std::move(navConfig), logger().cloneWithSuffix("Navigator"));
68 StraightPropagator_t propagator{stepper, std::move(navigator), logger().cloneWithSuffix("Prop")};
69
70 m_slFitter = std::make_unique<StraightFitter_t>(std::move(propagator),
71 logger().cloneWithSuffix("GlobalChiSquareFitter"));
72 }
73
74
75 m_outlierFinder.StateChiSquaredPerNumberDoFCut = m_option_outlierChi2Cut;
76
77 Gx2FitterExtension_t extensionTemplate{};
78 extensionTemplate.outlierFinder.connect<&detail::FitterHelperFunctions::ATLASOutlierFinder::operator()
81
83 {
86
88 configureMe = extensionTemplate;
90 configureMe.surfaceAccessor.connect<&detail::TrkMeasSurfaceAccessor::operator()>(&m_trkMeasSurfAcc);
91 }
93 {
97 configureMe = extensionTemplate;
99 configureMe.surfaceAccessor.connect<&detail::TrkPrepRawDataSurfaceAcc::operator()>(&m_prdSurfaceAcc);
100 }
101 {
105 configureMe = extensionTemplate;
106 configureMe.surfaceAccessor.connect<&detail::xAODUncalibMeasSurfAcc::operator()>(&m_unalibMeasSurfAcc);
109 if (m_muonCalibrator.isEnabled()) {
114 }
115 }
116 }
117 return StatusCode::SUCCESS;
118}
120 GlobalChiSquareFitterTool::fit(const std::vector<Acts::SourceLink>& soureLinks,
121 const Acts::BoundTrackParameters& initialPars,
122 const Gx2FitterOptions_t& gx2fOptions,
123 MutableTrackContainer& tracks) const {
124 return ATH_LIKELY(m_fitter) ?
125 m_fitter->fit(soureLinks.begin(), soureLinks.end(), initialPars, gx2fOptions, tracks) :
126 m_slFitter->fit(soureLinks.begin(), soureLinks.end(), initialPars, gx2fOptions, tracks);
127}
128
130 GlobalChiSquareFitterTool::configureFit(const Acts::GeometryContext& tgContext,
131 const Acts::MagneticFieldContext& mfContext,
132 const Acts::CalibrationContext& calContext,
133 const Acts::Surface* surface,
134 detail::SourceLinkType slType) const {
135 Acts::PropagatorPlainOptions propagationOption{tgContext, mfContext};
136 propagationOption.maxSteps = m_option_maxPropagationStep;
137 propagationOption.maxTargetSkipping = m_option_maxNavSurfaces;
138 // Set the Gx2Fitter options
139 return Gx2FitterOptions_t{tgContext, mfContext, calContext,
140 m_gx2fExtensions[static_cast<int>(slType)],
141 std::move(propagationOption),
142 surface, m_option_includeScat,
144 Acts::FreeToBoundCorrection{m_doJacobianCorr},
145 m_nIterMax};
146}
147
148// refit a track
149// -------------------------------------------------------
150std::unique_ptr<Trk::Track> GlobalChiSquareFitterTool::fit(
151 const EventContext& ctx, const Trk::Track& inputTrack,
152 const Trk::RunOutlierRemoval /*runOutlier*/,
153 const Trk::ParticleHypothesis hypothesis) const {
154
155 ATH_MSG_VERBOSE("--> enter GlobalChiSquareFitterTool::fit(Track,,) with Track from author = "
156 << inputTrack.info().dumpInfo());
157
158 // protection against not having measurements on the input track
159 if (!inputTrack.measurementsOnTrack() || inputTrack.measurementsOnTrack()->size() < 2) {
160 ATH_MSG_DEBUG("called to refit empty track or track with too little information, reject fit");
161 return nullptr;
162 }
163
164 // protection against not having track parameters on the input track
165 if (!inputTrack.trackParameters() || inputTrack.trackParameters()->empty()) {
166 ATH_MSG_DEBUG("input fails to provide track parameters for seeding the GX2F, reject fit");
167 return nullptr;
168 }
169
170 // Construct a perigee surface as the target surface
171 auto pSurface = Acts::Surface::makeShared<Acts::PerigeeSurface>(Acts::Vector3::Zero());
172
173 std::vector<Acts::SourceLink> trackSourceLinks = m_ATLASConverterTool->trkTrackToSourceLinks(inputTrack);
174 // protection against error in the conversion from Atlas measurement to ACTS
175 // source link
176 if (trackSourceLinks.empty()) {
177 ATH_MSG_DEBUG("input contain measurement but no source link created, probable issue "
178 <<"with the converter, reject fit ");
179 return nullptr;
180 }
181
182 const Acts::GeometryContext tgContext{m_trackingGeometryTool->getGeometryContext(ctx).context()};
183 const Acts::MagneticFieldContext mfContext{m_extrapolationTool->getMagneticFieldContext(ctx)};
184 const Acts::CalibrationContext calContext{getCalibrationContext(ctx)};
185 const auto initialParams = m_ATLASConverterTool->trkTrackParametersToActsParameters((*inputTrack.perigeeParameters()), tgContext);
186
187
188 const Acts::BoundTrackParameters initialParamsWithHypothesis(
189 initialParams.referenceSurface().getSharedPtr(),
190 initialParams.parameters(), initialParams.covariance(),
191 ParticleHypothesis::convert(hypothesis));
192
193 Gx2FitterOptions_t gx2fOptions = configureFit(tgContext, mfContext, calContext,
195
196 ActsTrk::MutableTrackBackend trackContainerBackEnd;
197 ActsTrk::MutableTrackStateBackend multiTrajBackEnd;
198 ActsTrk::MutableTrackContainer tracks( std::move(trackContainerBackEnd),
199 std::move(multiTrajBackEnd));
200 // Perform the fit
201 auto result = fit(trackSourceLinks, initialParamsWithHypothesis, gx2fOptions, tracks);
202
203 return m_ATLASConverterTool->convertFitResult(ctx, tracks, result,
206}
207
208// fit a set of MeasurementBase objects
209// --------------------------------
210std::unique_ptr<Trk::Track> GlobalChiSquareFitterTool::fit(
211 const EventContext& ctx, const Trk::MeasurementSet& inputMeasSet,
212 const Trk::TrackParameters& estimatedStartParameters,
213 const Trk::RunOutlierRemoval /*runOutlier*/,
214 const Trk::ParticleHypothesis /*matEffects*/) const {
215
216 // protection against not having measurements on the input track
217 if (inputMeasSet.size() < 2) {
218 ATH_MSG_DEBUG("Called to refit empty measurement set or a measurement set with too "
219 <<"little information, reject fit");
220 return nullptr;
221 }
222
223 // Construct a perigee surface as the target surface
224 auto pSurface = Acts::Surface::makeShared<Acts::PerigeeSurface>(Acts::Vector3::Zero());
225
226 const Acts::GeometryContext tgContext{m_trackingGeometryTool->getGeometryContext(ctx).context()};
227 const Acts::MagneticFieldContext mfContext{m_extrapolationTool->getMagneticFieldContext(ctx)};
228 const Acts::CalibrationContext calContext{getCalibrationContext(ctx)};
229
230
231
232 std::vector<Acts::SourceLink> trackSourceLinks;
233 m_ATLASConverterTool->toSourceLinks(inputMeasSet, trackSourceLinks);
234 // protection against error in the conversion from Atlas measurement to ACTS
235 // source link
236 if (trackSourceLinks.empty()) {
237 ATH_MSG_DEBUG("input contain measurement but no source link created, probable issue "
238 <<"with the converter, reject fit ");
239 return nullptr;
240 }
241
242 const auto initialParams = m_ATLASConverterTool->trkTrackParametersToActsParameters(estimatedStartParameters, tgContext);
243
244 ActsTrk::MutableTrackBackend trackContainerBackEnd;
245 ActsTrk::MutableTrackStateBackend multiTrajBackEnd;
246 ActsTrk::MutableTrackContainer tracks( std::move(trackContainerBackEnd),
247 std::move(multiTrajBackEnd));
248
249 Gx2FitterOptions_t gx2fOptions = configureFit(tgContext, mfContext, calContext,
251 // Perform the fit
252 auto result = fit(trackSourceLinks, initialParams, gx2fOptions, tracks);
253 return m_ATLASConverterTool->convertFitResult(ctx, tracks, result,
256}
257
258// fit a set of PrepRawData objects
259// --------------------------------
260std::unique_ptr<Trk::Track> GlobalChiSquareFitterTool::fit(const EventContext& ctx,
261 const Trk::PrepRawDataSet& inputPRDColl,
262 const Trk::TrackParameters& estimatedStartParameters,
263 const Trk::RunOutlierRemoval /*runOutlier*/,
264 const Trk::ParticleHypothesis /*prtHypothesis*/) const {
265
266 ATH_MSG_DEBUG("--> entering GlobalChiSquareFitterTool::fit(PRDS,TP,)");
267
268 // Construct a perigee surface as the target surface
269 auto pSurface = Acts::Surface::makeShared<Acts::PerigeeSurface>(Acts::Vector3::Zero());
270
271 const Acts::GeometryContext tgContext = m_trackingGeometryTool->getGeometryContext(ctx).context();
272 const Acts::MagneticFieldContext mfContext = m_extrapolationTool->getMagneticFieldContext(ctx);
273 const Acts::CalibrationContext calContext{getCalibrationContext(ctx)};
274
275 std::vector<Acts::SourceLink> trackSourceLinks;
276 m_ATLASConverterTool->toSourceLinks(inputPRDColl, trackSourceLinks);
277
278 // protection against error in the conversion from Atlas measurement to ACTS
279 // source link
280 if (trackSourceLinks.empty()) {
281 ATH_MSG_WARNING("input contain measurement but no source link created, probable issue "
282 "with the converter, reject fit ");
283 return nullptr;
284 }
285
286 const auto initialParams = m_ATLASConverterTool->trkTrackParametersToActsParameters(estimatedStartParameters, tgContext);
287
288
289 Gx2FitterOptions_t gx2fOptions = configureFit(tgContext, mfContext, calContext,
291
292
293 ActsTrk::MutableTrackBackend trackContainerBackEnd;
294 ActsTrk::MutableTrackStateBackend multiTrajBackEnd;
295 ActsTrk::MutableTrackContainer tracks( std::move(trackContainerBackEnd),
296 std::move(multiTrajBackEnd));
297 // Perform the fit
298 auto result = fit(trackSourceLinks, initialParams, gx2fOptions, tracks);
299
300 return m_ATLASConverterTool->convertFitResult(ctx, tracks, result,
303}
304
305// fit a set of PrepRawData objects
306// --------------------------------
307std::unique_ptr<MutableTrackContainer> GlobalChiSquareFitterTool::fit(
308 const std::vector<ATLASUncalibSourceLink>& measList,
309 const Acts::BoundTrackParameters& initialParams,
310 const Acts::GeometryContext& tgContext,
311 const Acts::MagneticFieldContext& mfContext,
312 const Acts::CalibrationContext& calContext,
313 const Acts::Surface* targetSurface) const {
314
315 if (measList.empty()) {
316 ATH_MSG_DEBUG("No measurements given. Nothing to do");
317 return nullptr;
318 }
319 // Construct a perigee surface as the target surface
320 std::shared_ptr<Acts::Surface> pSurface{};
321 if (!targetSurface) {
322 pSurface = Acts::Surface::makeShared<Acts::PerigeeSurface>(Acts::Vector3::Zero());
323 targetSurface = pSurface.get();
324 }
325
326 std::vector<Acts::SourceLink> sourceLinks;
327 sourceLinks.reserve(measList.size());
328 std::ranges::transform(measList, std::back_inserter(sourceLinks),
329 [](const xAOD::UncalibratedMeasurement* meas){
331 });
332
333 Gx2FitterOptions_t gx2fOptions = configureFit(tgContext, mfContext, calContext,
335
336
337 ActsTrk::MutableTrackBackend trackContainerBackEnd;
338 ActsTrk::MutableTrackStateBackend multiTrajBackEnd;
339 auto tracks = std::make_unique<MutableTrackContainer>( std::move(trackContainerBackEnd),
340 std::move(multiTrajBackEnd) );
341 // Perform the fit
342 auto result = fit(sourceLinks, initialParams, gx2fOptions, *tracks);
343 if (not result.ok()) {
344 ATH_MSG_VERBOSE("Global chi2 fit failed");
345 return nullptr;
346 }
347 return tracks;
348}
349
350// extend a track fit to include an additional set of MeasurementBase objects
351// re-implements the TrkFitterUtils/TrackFitter.cxx general code in a more
352// mem efficient and stable way
353// --------------------------------
354std::unique_ptr<Trk::Track> GlobalChiSquareFitterTool::fit(
355 const EventContext& ctx, const Trk::Track& inputTrack,
356 const Trk::MeasurementSet& addMeasColl,
357 const Trk::RunOutlierRemoval /*runOutlier*/,
358 const Trk::ParticleHypothesis /*matEffects*/) const {
359 ATH_MSG_VERBOSE("--> enter GlobalChiSquareFitterTool::fit(Track,Meas'BaseSet,,)");
360 ATH_MSG_VERBOSE(" with Track from author = " << inputTrack.info().dumpInfo());
361
362 // protection, if empty MeasurementSet
363 if (addMeasColl.empty()) {
364 ATH_MSG_DEBUG("client tries to add an empty MeasurementSet to the track fit.");
365 return fit(ctx, inputTrack);
366 }
367
368 // protection against not having measurements on the input track
369 if (!inputTrack.measurementsOnTrack() || (inputTrack.measurementsOnTrack()->size() < 2 && addMeasColl.empty())) {
370 ATH_MSG_DEBUG("Called to refit empty track or track with too little information, reject fit");
371 return nullptr;
372 }
373
374 // protection against not having track parameters on the input track
375 if (!inputTrack.trackParameters() || inputTrack.trackParameters()->empty()) {
376 ATH_MSG_DEBUG("input fails to provide track parameters for seeding the GX2F, reject fit");
377 return nullptr;
378 }
379
380 // Construct a perigee surface as the target surface
381 auto pSurface = Acts::Surface::makeShared<Acts::PerigeeSurface>(Acts::Vector3::Zero());
382
383 const Acts::GeometryContext tgContext{m_trackingGeometryTool->getGeometryContext(ctx).context()};
384 const Acts::MagneticFieldContext mfContext{m_extrapolationTool->getMagneticFieldContext(ctx)};
385 const Acts::CalibrationContext calContext{getCalibrationContext(ctx)};
386
387 std::vector<Acts::SourceLink> trackSourceLinks = m_ATLASConverterTool->trkTrackToSourceLinks(inputTrack);
388 m_ATLASConverterTool->toSourceLinks(addMeasColl, trackSourceLinks);
389 // protection against error in the conversion from Atlas measurement to ACTS
390 // source link
391 if (trackSourceLinks.empty()) {
392 ATH_MSG_DEBUG("input contain measurement but no source link created, probable issue "
393 <<"with the converter, reject fit ");
394 return nullptr;
395 }
396 const auto initialParams = m_ATLASConverterTool->trkTrackParametersToActsParameters(*(inputTrack.perigeeParameters()),
397 tgContext);
398
399 ActsTrk::MutableTrackBackend trackContainerBackEnd;
400 ActsTrk::MutableTrackStateBackend multiTrajBackEnd;
401 ActsTrk::MutableTrackContainer tracks( std::move(trackContainerBackEnd),
402 std::move(multiTrajBackEnd));
403
404 Gx2FitterOptions_t gx2fOptions = configureFit(tgContext, mfContext, calContext,
406 // Perform the fit
407 auto result = fit(trackSourceLinks, initialParams, gx2fOptions, tracks);
408 return m_ATLASConverterTool->convertFitResult(ctx, tracks, result,
411}
412
413// extend a track fit to include an additional set of PrepRawData objects
414// --------------------------------
415std::unique_ptr<Trk::Track> GlobalChiSquareFitterTool::fit(
416 const EventContext& /*ctx*/, const Trk::Track& /*inputTrack*/,
417 const Trk::PrepRawDataSet& /*addPrdColl*/,
418 const Trk::RunOutlierRemoval /*runOutlier*/,
419 const Trk::ParticleHypothesis /*matEffects*/) const {
421 "Fit of Track with additional PrepRawDataSet not yet implemented");
422 return nullptr;
423}
424
425// combined fit of two tracks
426// --------------------------------
427std::unique_ptr<Trk::Track> GlobalChiSquareFitterTool::fit(
428 const EventContext& ctx, const Trk::Track& intrk1, const Trk::Track& intrk2,
429 const Trk::RunOutlierRemoval /*runOutlier*/,
430 const Trk::ParticleHypothesis matEffects) const {
431 ATH_MSG_VERBOSE("--> enter GlobalChiSquareFitterTool::fit(Track,Track,)");
432 ATH_MSG_VERBOSE(" with Tracks from #1 = " << intrk1.info().dumpInfo()
433 << " and #2 = "
434 << intrk2.info().dumpInfo());
435
436 // protection, if empty track2
437 if (!intrk2.measurementsOnTrack()) {
438 ATH_MSG_DEBUG("input #2 is empty try to fit track 1 alone");
439 return fit(ctx, intrk1);
440 }
441
442 // protection, if empty track1
443 if (!intrk1.measurementsOnTrack()) {
444 ATH_MSG_DEBUG("input #1 is empty try to fit track 2 alone");
445 return fit(ctx, intrk2);
446 }
447
448 // protection against not having track parameters on the input track
449 if (!intrk1.trackParameters() || intrk1.trackParameters()->empty()) {
450 ATH_MSG_DEBUG("input #1 fails to provide track parameters for seeding the GX2F, reject fit");
451 return nullptr;
452 }
453
454 // Construct a perigee surface as the target surface
455 auto pSurface = Acts::Surface::makeShared<Acts::PerigeeSurface>(Acts::Vector3::Zero());
456
457 const Acts::GeometryContext tgContext{m_trackingGeometryTool->getGeometryContext(ctx).context()};
458 const Acts::MagneticFieldContext mfContext{m_extrapolationTool->getMagneticFieldContext(ctx)};
459 const Acts::CalibrationContext calContext{getCalibrationContext(ctx)};
460
461 std::vector<Acts::SourceLink> trackSourceLinks = m_ATLASConverterTool->trkTrackToSourceLinks(intrk1);
462 std::vector<Acts::SourceLink> trackSourceLinks2 = m_ATLASConverterTool->trkTrackToSourceLinks(intrk2);
463 trackSourceLinks.insert(trackSourceLinks.end(), std::make_move_iterator(trackSourceLinks2.begin()),
464 std::make_move_iterator(trackSourceLinks2.end()));
465 // protection against error in the conversion from Atlas measurement to ACTS
466 // source link
467 if (trackSourceLinks.empty()) {
468 ATH_MSG_DEBUG("input contain measurement but no source link created, probable issue "
469 <<"with the converter, reject fit ");
470 return nullptr;
471 }
472
473 const auto initialParams = m_ATLASConverterTool->trkTrackParametersToActsParameters(*(intrk1.perigeeParameters()), tgContext);
474
475
476 const Acts::BoundTrackParameters initialParamsWithHypothesis(
477 initialParams.referenceSurface().getSharedPtr(),
478 initialParams.parameters(), initialParams.covariance(),
479 ParticleHypothesis::convert(matEffects));
480
481 ActsTrk::MutableTrackBackend trackContainerBackEnd;
482 ActsTrk::MutableTrackStateBackend multiTrajBackEnd;
483 ActsTrk::MutableTrackContainer tracks( std::move(trackContainerBackEnd),
484 std::move(multiTrajBackEnd));
485
486 Gx2FitterOptions_t gx2fOptions = configureFit(tgContext, mfContext, calContext,
488 // Perform the fit
489 auto result = fit(trackSourceLinks, initialParamsWithHypothesis, gx2fOptions, tracks);
490
491 return m_ATLASConverterTool->convertFitResult(ctx, tracks, result,
494}
495
496std::unique_ptr<MutableTrackContainer> GlobalChiSquareFitterTool::fit(
497 const Seed& seed,
498 const Acts::BoundTrackParameters& initialParams,
499 const Acts::GeometryContext& tgContext,
500 const Acts::MagneticFieldContext& mfContext,
501 const Acts::CalibrationContext& calContext,
502 const Acts::Surface& targetSurface) const {
503
504 std::vector<ATLASUncalibSourceLink> sourceLinks;
505 sourceLinks.reserve(6);
506
507 for (const xAOD::SpacePoint* sp : seed.sp()) {
508 sourceLinks.insert(sourceLinks.end(), sp->measurements().begin(), sp->measurements().end());
509 }
510 return fit(sourceLinks, initialParams, tgContext, mfContext, calContext, &targetSurface);
511}
512
513
515 const EventContext& /*ctx*/,
516 const TrackContainer::ConstTrackProxy& /*track*/,
517 MutableTrackContainer& /*trackContainer*/,
518 const Acts::PerigeeSurface& /*pSurface*/) const
519{
520 ATH_MSG_ERROR("Track refit method not implemented in GlobalChiSquareFitterTool yet");
521 return StatusCode::FAILURE;
522}
523} // namespace ActsTrk
#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)
#define ATH_LIKELY(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)
Acts::Experimental::Gx2FitterOptions< MutableTrackStateBackend > Gx2FitterOptions_t
Abbrivation of the configuration to launch the fit.
Gaudi::Property< double > m_option_outlierChi2Cut
Chi2 cut used by the outlier finder.
std::unique_ptr< const Acts::Logger > m_logger
logging instance
detail::TrkMeasSurfaceAccessor m_trkMeasSurfAcc
Surface accessor delegate for Trk::MeasurementBase objects.
detail::TrkPrepRawDataCalibrator m_prdCalibrator
Calibrator of the uncalibrated Trk::PrepRawData objects to RIO_OnTrack objects.
Acts::Propagator< Acts::StraightLineStepper, Acts::Navigator > StraightPropagator_t
Type erased track fitter function.
const Acts::Logger & logger() const
Private access to the logger.
Gaudi::Property< bool > m_doJacobianCorr
Account for non linear effects from free -> bound jacobian.
ToolHandle< MuonR4::ISpacePointCalibrator > m_muonCalibrator
ToolHandle< ActsTrk::IExtrapolationTool > m_extrapolationTool
ToolHandle< IActsToTrkConverterTool > m_ATLASConverterTool
Acts::Experimental::Gx2FitterExtensions< MutableTrackStateBackend > Gx2FitterExtension_t
Abbrivation of the fitter extensions.
std::array< Gx2FitterExtension_t, s_nExtensions > m_gx2fExtensions
Gaudi::Property< unsigned > m_option_maxPropagationStep
Maximum number of steps per propagation call.
detail::FitterHelperFunctions::ATLASOutlierFinder m_outlierFinder
Gaudi::Property< bool > m_option_includeScat
Consider multiple scattering of the particle.
PublicToolHandle< ITrackingGeometryTool > m_trackingGeometryTool
IActsToTrkConverterTool::TrackFitResult_t TrackFitResult_t
detail::TrkPrepRawDataSurfaceAcc m_prdSurfaceAcc
Surface accessor delegate for Trk::PrepRawData objects.
ToolHandle< Trk::IRIO_OnTrackCreator > m_ROTcreator
std::unique_ptr< StraightFitter_t > m_slFitter
The underlying straight line Acts fitter.
Gaudi::Property< bool > m_option_includeELoss
Consider particle's energy loss in the fit.
Gaudi::Property< unsigned > m_option_maxNavSurfaces
Number of maximum surfaces to be tried before the navigrator aborts.
std::unique_ptr< CurvedFitter_t > m_fitter
The underlying curved Acts fitter.
Gx2FitterOptions_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.
detail::TrkMeasurementCalibrator m_trkMeasCalibrator
Pass through calibrator of the Trk::MeasurementBase objects from the TrackState container.
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
detail::xAODUncalibMeasSurfAcc m_unalibMeasSurfAcc
Surface accessor delegate for xAOD::UncalibratedMeasurement objects.
Acts::Propagator< Acts::EigenStepper<>, Acts::Navigator > CurvedPropagator_t
Gaudi::Property< unsigned > m_nIterMax
Number of iterations a fit may take.
Gaudi::Property< bool > m_doStraightLine
Option to toggle whether a straight line fitter shall be used.
detail::xAODUncalibMeasCalibrator m_uncalibMeasCalibrator
Calibrator for the uncalibrated xAOD::UnCalibratedMeasurement objects.
Helper class to access the Acts::Surface for a given Acts::SourceLink which is poiniting to a Trk::Me...
Calibrator class that links the legacy Trk::MeasurementBase objects with the Acts MultiTrajectory tra...
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.
void calibrate(const Acts::GeometryContext &gctx, const Acts::CalibrationContext &cctx, const Acts::SourceLink &sl, const MutableTrackStateBackend::TrackStateProxy trackState) const
: Interface method for the Acts fitter to calibrate the trajectory track states from the source link ...
static Acts::SourceLink pack(const xAOD::UncalibratedMeasurement *meas)
Helper method to pack an uncalibrated measurement to an Acts source link.
Helper class to access the Acts::surface associated with an Uncalibrated xAOD measurement.
virtual void calibrateSourceLink(const Acts::GeometryContext &geoctx, const Acts::CalibrationContext &cctx, const Acts::SourceLink &link, ActsTrk::MutableTrackStateBackend::TrackStateProxy state) const =0
Function that's hooked to the calibration delegate of the implemented Acts fitters.
std::string dumpInfo() const
Returns a string with the name of the fitter of this track (i.e.
@ GlobalChi2Fitter
Track's from Thijs' global chi^2 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.
xAOD::ParticleHypothesis convert(Acts::ParticleHypothesis h)
Acts::Result< void > gainMatrixUpdate(const Acts::GeometryContext &gctx, typename trajectory_t::TrackStateProxy trackState, 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
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.