ATLAS Offline Software
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 
43 namespace ActsTrk {
44 
46 
47  ATH_MSG_DEBUG(name() << "::" << __FUNCTION__);
49  ATH_CHECK(m_extrapolationTool.retrieve());
50  ATH_CHECK(m_ATLASConverterTool.retrieve());
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 
76 
77  Gx2FitterExtension_t extensionTemplate{};
78  extensionTemplate.outlierFinder.connect<&detail::FitterHelperFunctions::ATLASOutlierFinder::operator()
80  extensionTemplate.updater.connect<&detail::FitterHelperFunctions::gainMatrixUpdate<MutableTrackStateBackend>>();
81 
83  {
86 
88  configureMe = extensionTemplate;
89  configureMe.calibrator.connect<&detail::TrkMeasurementCalibrator::calibrate<MutableTrackStateBackend>>(&m_trkMeasCalibrator);
90  configureMe.surfaceAccessor.connect<&detail::TrkMeasSurfaceAccessor::operator()>(&m_trkMeasSurfAcc);
91  }
93  {
97  configureMe = extensionTemplate;
98  configureMe.calibrator.connect<&detail::TrkPrepRawDataCalibrator::calibrate<MutableTrackStateBackend>>(&m_prdCalibrator);
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 // -------------------------------------------------------
150 std::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 // --------------------------------
210 std::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 // --------------------------------
260 std::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 // --------------------------------
307 std::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 // --------------------------------
354 std::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 // --------------------------------
415 std::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 // --------------------------------
427 std::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 
496 std::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
ActsTrk::getCalibrationContext
Acts::CalibrationContext getCalibrationContext(const EventContext &ctx)
The Acts::Calibration context is piped through the Acts fitters to (re)calibrate the Acts::SourceLink...
Definition: CalibrationContext.h:15
ActsTrk::GlobalChiSquareFitterTool::m_ATLASConverterTool
ToolHandle< IActsToTrkConverterTool > m_ATLASConverterTool
Definition: GlobalChiSquareFitterTool.h:186
ActsTrk::GlobalChiSquareFitterTool::m_doJacobianCorr
Gaudi::Property< bool > m_doJacobianCorr
Account for non linear effects from free -> bound jacobian
Definition: GlobalChiSquareFitterTool.h:207
Trk::PrepRawDataSet
std::vector< const PrepRawData * > PrepRawDataSet
vector of clusters and drift circles
Definition: FitterTypes.h:26
get_generator_info.result
result
Definition: get_generator_info.py:21
TrackParameters.h
MeasurementBase.h
ActsTrk::GlobalChiSquareFitterTool::m_trkMeasCalibrator
detail::TrkMeasurementCalibrator m_trkMeasCalibrator
Pass through calibrator of the Trk::MeasurementBase objects from the TrackState container.
Definition: GlobalChiSquareFitterTool.h:211
PerigeeSurface.h
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
ActsTrk::detail::TrkMeasurementCalibrator
Calibrator class that links the legacy Trk::MeasurementBase objects with the Acts MultiTrajectory tra...
Definition: TrkMeasurementCalibrator.h:18
ActsTrk::detail::Navigator
Acts::Navigator Navigator
Definition: Tracking/Acts/ActsTrackReconstruction/src/detail/Definitions.h:31
ActsTrk::detail::TrkPrepRawDataSurfaceAcc
Helper class to access the Acts::surface associated with a Trk::PrepRawData measurement.
Definition: TrkPrepRawDataSurfaceAcc.h:14
Trk::Track::info
const TrackInfo & info() const
Returns a const ref to info of a const tracks.
ActsTrk::MutableTrackBackend
Acts::VectorTrackContainer MutableTrackBackend
Definition: TrackContainer.h:16
ActsTrk::ParticleHypothesis::convert
xAOD::ParticleHypothesis convert(Acts::ParticleHypothesis h)
Definition: ParticleHypothesisEncoding.cxx:12
ActsTrk::detail::SourceLinkType::TrkPrepRawData
@ TrkPrepRawData
Calibrated Trk::MeasurementBase objects.
ActsTrk::MutableTrackContainer
Acts::TrackContainer< MutableTrackBackend, MutableTrackStateBackend, Acts::detail::ValueHolder > MutableTrackContainer
Definition: TrackContainer.h:27
xAOD::UncalibMeasType::MMClusterType
@ MMClusterType
ActsTrk::GlobalChiSquareFitterTool::m_logger
std::unique_ptr< const Acts::Logger > m_logger
logging instance
Definition: GlobalChiSquareFitterTool.h:236
ATLASMagneticFieldWrapper.h
ActsTrk::detail::SourceLinkType::xAODUnCalibMeas
@ xAODUnCalibMeas
UnCalibrated Trk::PrepRawData objects.
xAOD::SpacePoint_v1
Definition: SpacePoint_v1.h:29
ActsTrk::GlobalChiSquareFitterTool::m_gx2fExtensions
std::array< Gx2FitterExtension_t, s_nExtensions > m_gx2fExtensions
Definition: GlobalChiSquareFitterTool.h:224
ActsTrk::GlobalChiSquareFitterTool::logger
const Acts::Logger & logger() const
Private access to the logger.
Definition: GlobalChiSquareFitterTool.h:233
ActsTrk::detail::xAODUncalibMeasCalibrator::connect
void connect(const xAOD::UncalibMeasType type, const Type *instance)
Register a calibrator implementation instance for a given measurement type.
Definition: xAODUncalibMeasCalibrator.h:36
xAOD::GlobalChi2Fitter
@ GlobalChi2Fitter
Track's from Thijs' global chi^2 fitter or the ACTS implementation.
Definition: TrackingPrimitives.h:52
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
xAOD::UncalibMeasType::sTgcStripType
@ sTgcStripType
ActsTrk::GlobalChiSquareFitterTool::m_nIterMax
Gaudi::Property< unsigned > m_nIterMax
Number of iterations a fit may take.
Definition: GlobalChiSquareFitterTool.h:209
ActsTrk::detail::xAODUncalibMeasCalibrator::pack
static Acts::SourceLink pack(const xAOD::UncalibratedMeasurement *meas)
Helper method to pack an uncalibrated measurement to an Acts source link.
Definition: xAODUncalibMeasCalibrator.cxx:9
ActsTrk::GlobalChiSquareFitterTool::fit
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
Definition: GlobalChiSquareFitterTool.cxx:150
ActsTrk::GlobalChiSquareFitterTool::CurvedPropagator_t
Acts::Propagator< Acts::EigenStepper<>, Acts::Navigator > CurvedPropagator_t
Definition: GlobalChiSquareFitterTool.h:149
ActsTrk::GlobalChiSquareFitterTool::m_option_outlierChi2Cut
Gaudi::Property< double > m_option_outlierChi2Cut
Chi2 cut used by the outlier finder.
Definition: GlobalChiSquareFitterTool.h:193
PrepRawData.h
Trk::RunOutlierRemoval
bool RunOutlierRemoval
switch to toggle quality processing after fit
Definition: FitterTypes.h:22
xAOD::UncalibMeasType::TgcStripType
@ TgcStripType
ActsTrk::GlobalChiSquareFitterTool::m_uncalibMeasCalibrator
detail::xAODUncalibMeasCalibrator m_uncalibMeasCalibrator
Calibrator for the uncalibrated xAOD::UnCalibratedMeasurement objects.
Definition: GlobalChiSquareFitterTool.h:221
Track.h
makeActsAthenaLogger
std::unique_ptr< const Acts::Logger > makeActsAthenaLogger(IMessageSvc *svc, const std::string &name, int level, std::optional< std::string > parent_name)
Definition: Tracking/Acts/ActsInterop/src/Logger.cxx:64
ActsTrk::GlobalChiSquareFitterTool::m_prdSurfaceAcc
detail::TrkPrepRawDataSurfaceAcc m_prdSurfaceAcc
Surface accessor delegate for Trk::PrepRawData objects.
Definition: GlobalChiSquareFitterTool.h:217
Trk::ParticleHypothesis
ParticleHypothesis
Definition: ParticleHypothesis.h:28
GeometryContext.h
ActsTrk::GlobalChiSquareFitterTool::StraightPropagator_t
Acts::Propagator< Acts::StraightLineStepper, Acts::Navigator > StraightPropagator_t
Type erased track fitter function.
Definition: GlobalChiSquareFitterTool.h:148
CalibrationContext.h
xAOD::UncalibratedMeasurement_v1
Definition: UncalibratedMeasurement_v1.h:13
ActsTrk::GlobalChiSquareFitterTool::m_option_maxNavSurfaces
Gaudi::Property< unsigned > m_option_maxNavSurfaces
Number of maximum surfaces to be tried before the navigrator aborts.
Definition: GlobalChiSquareFitterTool.h:197
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
ActsTrk::GlobalChiSquareFitterTool::m_trackingGeometryTool
PublicToolHandle< ITrackingGeometryTool > m_trackingGeometryTool
Definition: GlobalChiSquareFitterTool.h:185
ActsTrk::GlobalChiSquareFitterTool::m_muonCalibrator
ToolHandle< MuonR4::ISpacePointCalibrator > m_muonCalibrator
Definition: GlobalChiSquareFitterTool.h:188
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
Amg::transform
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Definition: GeoPrimitivesHelpers.h:156
ActsTrk::GlobalChiSquareFitterTool::m_prdCalibrator
detail::TrkPrepRawDataCalibrator m_prdCalibrator
Calibrator of the uncalibrated Trk::PrepRawData objects to RIO_OnTrack objects.
Definition: GlobalChiSquareFitterTool.h:213
ActsTrk::GlobalChiSquareFitterTool::m_option_maxPropagationStep
Gaudi::Property< unsigned > m_option_maxPropagationStep
Maximum number of steps per propagation call.
Definition: GlobalChiSquareFitterTool.h:195
ActsTrk::detail::SourceLinkType
SourceLinkType
Enumeration to distinguish between the ATLAS EDM -> Acts::SourceLink variants.
Definition: SourceLinkType.h:9
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
GlobalChiSquareFitterTool.h
TrackSummary.h
Trk::ParametersBase
Definition: ParametersBase.h:55
ActsTrk::GlobalChiSquareFitterTool::TrackFitResult_t
IActsToTrkConverterTool::TrackFitResult_t TrackFitResult_t
Definition: GlobalChiSquareFitterTool.h:160
ActsTrk::GlobalChiSquareFitterTool::m_trkMeasSurfAcc
detail::TrkMeasSurfaceAccessor m_trkMeasSurfAcc
Surface accessor delegate for Trk::MeasurementBase objects.
Definition: GlobalChiSquareFitterTool.h:215
Trk::MeasurementSet
std::vector< const MeasurementBase * > MeasurementSet
vector of fittable measurements
Definition: FitterTypes.h:30
Trk::Track::trackParameters
const DataVector< const TrackParameters > * trackParameters() const
Return a pointer to a vector of TrackParameters.
Definition: Tracking/TrkEvent/TrkTrack/src/Track.cxx:97
Trk::Track::perigeeParameters
const Perigee * perigeeParameters() const
return Perigee.
Definition: Tracking/TrkEvent/TrkTrack/src/Track.cxx:163
ActsTrk::GlobalChiSquareFitterTool::initialize
virtual StatusCode initialize() override
Definition: GlobalChiSquareFitterTool.cxx:45
ActsTrk::GlobalChiSquareFitterTool::m_ROTcreator
ToolHandle< Trk::IRIO_OnTrackCreator > m_ROTcreator
Definition: GlobalChiSquareFitterTool.h:190
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
Trk::TrackInfo::dumpInfo
std::string dumpInfo() const
Returns a string with the name of the fitter of this track (i.e.
Definition: Tracking/TrkEvent/TrkTrack/src/TrackInfo.cxx:45
ActsTrk::GlobalChiSquareFitterTool::m_option_includeScat
Gaudi::Property< bool > m_option_includeScat
Consider multiple scattering of the particle.
Definition: GlobalChiSquareFitterTool.h:201
ActsTrk::GlobalChiSquareFitterTool::m_fitter
std::unique_ptr< CurvedFitter_t > m_fitter
The underlying curved Acts fitter.
Definition: GlobalChiSquareFitterTool.h:226
ActsTrk::MutableTrackStateBackend
Acts::VectorMultiTrajectory MutableTrackStateBackend
Definition: TrackContainer.h:18
ActsTrk::detail::Stepper
Acts::SympyStepper Stepper
Adapted from Acts Examples/Algorithms/TrackFinding/src/TrackFindingAlgorithmFunction....
Definition: Tracking/Acts/ActsTrackReconstruction/src/detail/Definitions.h:30
ActsTrk::ActsSeed
Definition: Seed.h:18
ActsTrk::GlobalChiSquareFitterTool::m_slFitter
std::unique_ptr< StraightFitter_t > m_slFitter
The underlying straight line Acts fitter.
Definition: GlobalChiSquareFitterTool.h:228
ActsTrk::GlobalChiSquareFitterTool::Gx2FitterExtension_t
Acts::Experimental::Gx2FitterExtensions< MutableTrackStateBackend > Gx2FitterExtension_t
Abbrivation of the fitter extensions.
Definition: GlobalChiSquareFitterTool.h:157
ActsTrk::detail::xAODUncalibMeasCalibrator::calibrate
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 ...
Definition: xAODUncalibMeasCalibrator.cxx:58
ParticleHypothesisEncoding.h
Trk::Track::measurementsOnTrack
const DataVector< const MeasurementBase > * measurementsOnTrack() const
return a pointer to a vector of MeasurementBase (NOT including any that come from outliers).
Definition: Tracking/TrkEvent/TrkTrack/src/Track.cxx:178
ActsTrk::GlobalChiSquareFitterTool::m_unalibMeasSurfAcc
detail::xAODUncalibMeasSurfAcc m_unalibMeasSurfAcc
Surface accessor delegate for xAOD::UncalibratedMeasurement objects.
Definition: GlobalChiSquareFitterTool.h:219
MuonR4::ISpacePointCalibrator::calibrateSourceLink
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.
ATH_LIKELY
#define ATH_LIKELY(x)
Definition: AthUnlikelyMacros.h:16
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
ActsTrk::GlobalChiSquareFitterTool::Gx2FitterOptions_t
Acts::Experimental::Gx2FitterOptions< MutableTrackStateBackend > Gx2FitterOptions_t
Abbrivation of the configuration to launch the fit
Definition: GlobalChiSquareFitterTool.h:155
ActsTrk::GlobalChiSquareFitterTool::configureFit
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.
Definition: GlobalChiSquareFitterTool.cxx:130
ActsTrk::detail::FitterHelperFunctions::ATLASOutlierFinder::StateChiSquaredPerNumberDoFCut
double StateChiSquaredPerNumberDoFCut
Definition: FitterHelperFunctions.h:50
ActsTrk::detail::SourceLinkType::TrkMeasurement
@ TrkMeasurement
ActsTrk
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
Definition: MdtCalibInput.h:31
ActsTrk::GlobalChiSquareFitterTool::m_doStraightLine
Gaudi::Property< bool > m_doStraightLine
Option to toggle whether a straight line fitter shall be used.
Definition: GlobalChiSquareFitterTool.h:205
ActsTrk::detail::xAODUncalibMeasSurfAcc
Helper class to access the Acts::surface associated with an Uncalibrated xAOD measurement.
Definition: xAODUncalibMeasSurfAcc.h:22
Logger.h
xAOD::UncalibMeasType::RpcStripType
@ RpcStripType
TrackContainer.h
xAOD::UncalibMeasType::MdtDriftCircleType
@ MdtDriftCircleType
ActsTrk::detail::TrkMeasSurfaceAccessor
Helper class to access the Acts::Surface for a given Acts::SourceLink which is poiniting to a Trk::Me...
Definition: TrkMeasSurfaceAccessor.h:14
ActsTrk::detail::TrkPrepRawDataCalibrator
Class to calibrate the Acts track states with uncalibrated Trk::PrepRaw data objects.
Definition: TrkPrepRawDataCalibrator.h:17
ActsTrk::GlobalChiSquareFitterTool::m_outlierFinder
detail::FitterHelperFunctions::ATLASOutlierFinder m_outlierFinder
Definition: GlobalChiSquareFitterTool.h:230
ActsTrk::GlobalChiSquareFitterTool::m_extrapolationTool
ToolHandle< ActsTrk::IExtrapolationTool > m_extrapolationTool
Definition: GlobalChiSquareFitterTool.h:184
generate::Zero
void Zero(TH1D *hin)
Definition: generate.cxx:32
ActsTrk::GlobalChiSquareFitterTool::m_option_includeELoss
Gaudi::Property< bool > m_option_includeELoss
Consider particle's energy loss in the fit
Definition: GlobalChiSquareFitterTool.h:199