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  Acts::SympyStepper 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 }
145 
146 // refit a track
147 // -------------------------------------------------------
148 std::unique_ptr<Trk::Track> GlobalChiSquareFitterTool::fit(
149  const EventContext& ctx, const Trk::Track& inputTrack,
150  const Trk::RunOutlierRemoval /*runOutlier*/,
151  const Trk::ParticleHypothesis hypothesis) const {
152 
153  ATH_MSG_VERBOSE("--> enter GlobalChiSquareFitterTool::fit(Track,,) with Track from author = "
154  << inputTrack.info().dumpInfo());
155 
156  // protection against not having measurements on the input track
157  if (!inputTrack.measurementsOnTrack() || inputTrack.measurementsOnTrack()->size() < 2) {
158  ATH_MSG_DEBUG("called to refit empty track or track with too little information, reject fit");
159  return nullptr;
160  }
161 
162  // protection against not having track parameters on the input track
163  if (!inputTrack.trackParameters() || inputTrack.trackParameters()->empty()) {
164  ATH_MSG_DEBUG("input fails to provide track parameters for seeding the GX2F, reject fit");
165  return nullptr;
166  }
167 
168  // Construct a perigee surface as the target surface
169  auto pSurface = Acts::Surface::makeShared<Acts::PerigeeSurface>(Acts::Vector3::Zero());
170 
171  std::vector<Acts::SourceLink> trackSourceLinks = m_ATLASConverterTool->trkTrackToSourceLinks(inputTrack);
172  // protection against error in the conversion from Atlas measurement to ACTS
173  // source link
174  if (trackSourceLinks.empty()) {
175  ATH_MSG_DEBUG("input contain measurement but no source link created, probable issue "
176  <<"with the converter, reject fit ");
177  return nullptr;
178  }
179 
180  const Acts::GeometryContext tgContext{m_trackingGeometryTool->getGeometryContext(ctx).context()};
181  const Acts::MagneticFieldContext mfContext{m_extrapolationTool->getMagneticFieldContext(ctx)};
182  const Acts::CalibrationContext calContext{getCalibrationContext(ctx)};
183  const auto initialParams = m_ATLASConverterTool->trkTrackParametersToActsParameters((*inputTrack.perigeeParameters()), tgContext);
184 
185 
186  const Acts::BoundTrackParameters initialParamsWithHypothesis(
187  initialParams.referenceSurface().getSharedPtr(),
188  initialParams.parameters(), initialParams.covariance(),
189  ParticleHypothesis::convert(hypothesis));
190 
191  Gx2FitterOptions_t gx2fOptions = configureFit(tgContext, mfContext, calContext,
193 
194  ActsTrk::MutableTrackBackend trackContainerBackEnd;
195  ActsTrk::MutableTrackStateBackend multiTrajBackEnd;
196  ActsTrk::MutableTrackContainer tracks( std::move(trackContainerBackEnd),
197  std::move(multiTrajBackEnd));
198  // Perform the fit
199  auto result = fit(trackSourceLinks, initialParamsWithHypothesis, gx2fOptions, tracks);
200 
201  return m_ATLASConverterTool->convertFitResult(ctx, tracks, result,
204 }
205 
206 // fit a set of MeasurementBase objects
207 // --------------------------------
208 std::unique_ptr<Trk::Track> GlobalChiSquareFitterTool::fit(
209  const EventContext& ctx, const Trk::MeasurementSet& inputMeasSet,
210  const Trk::TrackParameters& estimatedStartParameters,
211  const Trk::RunOutlierRemoval /*runOutlier*/,
212  const Trk::ParticleHypothesis /*matEffects*/) const {
213 
214  // protection against not having measurements on the input track
215  if (inputMeasSet.size() < 2) {
216  ATH_MSG_DEBUG("Called to refit empty measurement set or a measurement set with too "
217  <<"little information, reject fit");
218  return nullptr;
219  }
220 
221  // Construct a perigee surface as the target surface
222  auto pSurface = Acts::Surface::makeShared<Acts::PerigeeSurface>(Acts::Vector3::Zero());
223 
224  const Acts::GeometryContext tgContext{m_trackingGeometryTool->getGeometryContext(ctx).context()};
225  const Acts::MagneticFieldContext mfContext{m_extrapolationTool->getMagneticFieldContext(ctx)};
226  const Acts::CalibrationContext calContext{getCalibrationContext(ctx)};
227 
228 
229 
230  std::vector<Acts::SourceLink> trackSourceLinks;
231  m_ATLASConverterTool->toSourceLinks(inputMeasSet, trackSourceLinks);
232  // protection against error in the conversion from Atlas measurement to ACTS
233  // source link
234  if (trackSourceLinks.empty()) {
235  ATH_MSG_DEBUG("input contain measurement but no source link created, probable issue "
236  <<"with the converter, reject fit ");
237  return nullptr;
238  }
239 
240  const auto initialParams = m_ATLASConverterTool->trkTrackParametersToActsParameters(estimatedStartParameters, tgContext);
241 
242  ActsTrk::MutableTrackBackend trackContainerBackEnd;
243  ActsTrk::MutableTrackStateBackend multiTrajBackEnd;
244  ActsTrk::MutableTrackContainer tracks( std::move(trackContainerBackEnd),
245  std::move(multiTrajBackEnd));
246 
247  Gx2FitterOptions_t gx2fOptions = configureFit(tgContext, mfContext, calContext,
249  // Perform the fit
250  auto result = fit(trackSourceLinks, initialParams, gx2fOptions, tracks);
251  return m_ATLASConverterTool->convertFitResult(ctx, tracks, result,
254 }
255 
256 // fit a set of PrepRawData objects
257 // --------------------------------
258 std::unique_ptr<Trk::Track> GlobalChiSquareFitterTool::fit(const EventContext& ctx,
259  const Trk::PrepRawDataSet& inputPRDColl,
260  const Trk::TrackParameters& estimatedStartParameters,
261  const Trk::RunOutlierRemoval /*runOutlier*/,
262  const Trk::ParticleHypothesis /*prtHypothesis*/) const {
263 
264  ATH_MSG_DEBUG("--> entering GlobalChiSquareFitterTool::fit(PRDS,TP,)");
265 
266  // Construct a perigee surface as the target surface
267  auto pSurface = Acts::Surface::makeShared<Acts::PerigeeSurface>(Acts::Vector3::Zero());
268 
269  const Acts::GeometryContext tgContext = m_trackingGeometryTool->getGeometryContext(ctx).context();
270  const Acts::MagneticFieldContext mfContext = m_extrapolationTool->getMagneticFieldContext(ctx);
271  const Acts::CalibrationContext calContext{getCalibrationContext(ctx)};
272 
273  std::vector<Acts::SourceLink> trackSourceLinks;
274  m_ATLASConverterTool->toSourceLinks(inputPRDColl, trackSourceLinks);
275 
276  // protection against error in the conversion from Atlas measurement to ACTS
277  // source link
278  if (trackSourceLinks.empty()) {
279  ATH_MSG_WARNING("input contain measurement but no source link created, probable issue "
280  "with the converter, reject fit ");
281  return nullptr;
282  }
283 
284  const auto initialParams = m_ATLASConverterTool->trkTrackParametersToActsParameters(estimatedStartParameters, tgContext);
285 
286 
287  Gx2FitterOptions_t gx2fOptions = configureFit(tgContext, mfContext, calContext,
289 
290 
291  ActsTrk::MutableTrackBackend trackContainerBackEnd;
292  ActsTrk::MutableTrackStateBackend multiTrajBackEnd;
293  ActsTrk::MutableTrackContainer tracks( std::move(trackContainerBackEnd),
294  std::move(multiTrajBackEnd));
295  // Perform the fit
296  auto result = fit(trackSourceLinks, initialParams, gx2fOptions, tracks);
297 
298  return m_ATLASConverterTool->convertFitResult(ctx, tracks, result,
301 }
302 
303 // fit a set of PrepRawData objects
304 // --------------------------------
305 std::unique_ptr<MutableTrackContainer> GlobalChiSquareFitterTool::fit(
306  const std::vector<ATLASUncalibSourceLink>& measList,
307  const Acts::BoundTrackParameters& initialParams,
308  const Acts::GeometryContext& tgContext,
309  const Acts::MagneticFieldContext& mfContext,
310  const Acts::CalibrationContext& calContext,
311  const Acts::Surface* targetSurface) const {
312 
313  if (measList.empty()) {
314  ATH_MSG_DEBUG("No measurements given. Nothing to do");
315  return nullptr;
316  }
317  // Construct a perigee surface as the target surface
318  std::shared_ptr<Acts::Surface> pSurface{};
319  if (!targetSurface) {
320  pSurface = Acts::Surface::makeShared<Acts::PerigeeSurface>(Acts::Vector3::Zero());
321  targetSurface = pSurface.get();
322  }
323 
324  std::vector<Acts::SourceLink> sourceLinks;
325  sourceLinks.reserve(measList.size());
326  std::ranges::transform(measList, std::back_inserter(sourceLinks),
327  [](const xAOD::UncalibratedMeasurement* meas){
329  });
330 
331  Gx2FitterOptions_t gx2fOptions = configureFit(tgContext, mfContext, calContext,
333 
334 
335  ActsTrk::MutableTrackBackend trackContainerBackEnd;
336  ActsTrk::MutableTrackStateBackend multiTrajBackEnd;
337  auto tracks = std::make_unique<MutableTrackContainer>( std::move(trackContainerBackEnd),
338  std::move(multiTrajBackEnd) );
339  // Perform the fit
340  auto result = fit(sourceLinks, initialParams, gx2fOptions, *tracks);
341  if (not result.ok()) {
342  ATH_MSG_VERBOSE("Global chi2 fit failed");
343  return nullptr;
344  }
345  return tracks;
346 }
347 
348 // extend a track fit to include an additional set of MeasurementBase objects
349 // re-implements the TrkFitterUtils/TrackFitter.cxx general code in a more
350 // mem efficient and stable way
351 // --------------------------------
352 std::unique_ptr<Trk::Track> GlobalChiSquareFitterTool::fit(
353  const EventContext& ctx, const Trk::Track& inputTrack,
354  const Trk::MeasurementSet& addMeasColl,
355  const Trk::RunOutlierRemoval /*runOutlier*/,
356  const Trk::ParticleHypothesis /*matEffects*/) const {
357  ATH_MSG_VERBOSE("--> enter GlobalChiSquareFitterTool::fit(Track,Meas'BaseSet,,)");
358  ATH_MSG_VERBOSE(" with Track from author = " << inputTrack.info().dumpInfo());
359 
360  // protection, if empty MeasurementSet
361  if (addMeasColl.empty()) {
362  ATH_MSG_DEBUG("client tries to add an empty MeasurementSet to the track fit.");
363  return fit(ctx, inputTrack);
364  }
365 
366  // protection against not having measurements on the input track
367  if (!inputTrack.measurementsOnTrack() || (inputTrack.measurementsOnTrack()->size() < 2 && addMeasColl.empty())) {
368  ATH_MSG_DEBUG("Called to refit empty track or track with too little information, reject fit");
369  return nullptr;
370  }
371 
372  // protection against not having track parameters on the input track
373  if (!inputTrack.trackParameters() || inputTrack.trackParameters()->empty()) {
374  ATH_MSG_DEBUG("input fails to provide track parameters for seeding the GX2F, reject fit");
375  return nullptr;
376  }
377 
378  // Construct a perigee surface as the target surface
379  auto pSurface = Acts::Surface::makeShared<Acts::PerigeeSurface>(Acts::Vector3::Zero());
380 
381  const Acts::GeometryContext tgContext{m_trackingGeometryTool->getGeometryContext(ctx).context()};
382  const Acts::MagneticFieldContext mfContext{m_extrapolationTool->getMagneticFieldContext(ctx)};
383  const Acts::CalibrationContext calContext{getCalibrationContext(ctx)};
384 
385  std::vector<Acts::SourceLink> trackSourceLinks = m_ATLASConverterTool->trkTrackToSourceLinks(inputTrack);
386  m_ATLASConverterTool->toSourceLinks(addMeasColl, trackSourceLinks);
387  // protection against error in the conversion from Atlas measurement to ACTS
388  // source link
389  if (trackSourceLinks.empty()) {
390  ATH_MSG_DEBUG("input contain measurement but no source link created, probable issue "
391  <<"with the converter, reject fit ");
392  return nullptr;
393  }
394  const auto initialParams = m_ATLASConverterTool->trkTrackParametersToActsParameters(*(inputTrack.perigeeParameters()),
395  tgContext);
396 
397  ActsTrk::MutableTrackBackend trackContainerBackEnd;
398  ActsTrk::MutableTrackStateBackend multiTrajBackEnd;
399  ActsTrk::MutableTrackContainer tracks( std::move(trackContainerBackEnd),
400  std::move(multiTrajBackEnd));
401 
402  Gx2FitterOptions_t gx2fOptions = configureFit(tgContext, mfContext, calContext,
404  // Perform the fit
405  auto result = fit(trackSourceLinks, initialParams, gx2fOptions, tracks);
406  return m_ATLASConverterTool->convertFitResult(ctx, tracks, result,
409 }
410 
411 // extend a track fit to include an additional set of PrepRawData objects
412 // --------------------------------
413 std::unique_ptr<Trk::Track> GlobalChiSquareFitterTool::fit(
414  const EventContext& /*ctx*/, const Trk::Track& /*inputTrack*/,
415  const Trk::PrepRawDataSet& /*addPrdColl*/,
416  const Trk::RunOutlierRemoval /*runOutlier*/,
417  const Trk::ParticleHypothesis /*matEffects*/) const {
419  "Fit of Track with additional PrepRawDataSet not yet implemented");
420  return nullptr;
421 }
422 
423 // combined fit of two tracks
424 // --------------------------------
425 std::unique_ptr<Trk::Track> GlobalChiSquareFitterTool::fit(
426  const EventContext& ctx, const Trk::Track& intrk1, const Trk::Track& intrk2,
427  const Trk::RunOutlierRemoval /*runOutlier*/,
428  const Trk::ParticleHypothesis matEffects) const {
429  ATH_MSG_VERBOSE("--> enter GlobalChiSquareFitterTool::fit(Track,Track,)");
430  ATH_MSG_VERBOSE(" with Tracks from #1 = " << intrk1.info().dumpInfo()
431  << " and #2 = "
432  << intrk2.info().dumpInfo());
433 
434  // protection, if empty track2
435  if (!intrk2.measurementsOnTrack()) {
436  ATH_MSG_DEBUG("input #2 is empty try to fit track 1 alone");
437  return fit(ctx, intrk1);
438  }
439 
440  // protection, if empty track1
441  if (!intrk1.measurementsOnTrack()) {
442  ATH_MSG_DEBUG("input #1 is empty try to fit track 2 alone");
443  return fit(ctx, intrk2);
444  }
445 
446  // protection against not having track parameters on the input track
447  if (!intrk1.trackParameters() || intrk1.trackParameters()->empty()) {
448  ATH_MSG_DEBUG("input #1 fails to provide track parameters for seeding the GX2F, reject fit");
449  return nullptr;
450  }
451 
452  // Construct a perigee surface as the target surface
453  auto pSurface = Acts::Surface::makeShared<Acts::PerigeeSurface>(Acts::Vector3::Zero());
454 
455  const Acts::GeometryContext tgContext{m_trackingGeometryTool->getGeometryContext(ctx).context()};
456  const Acts::MagneticFieldContext mfContext{m_extrapolationTool->getMagneticFieldContext(ctx)};
457  const Acts::CalibrationContext calContext{getCalibrationContext(ctx)};
458 
459  std::vector<Acts::SourceLink> trackSourceLinks = m_ATLASConverterTool->trkTrackToSourceLinks(intrk1);
460  std::vector<Acts::SourceLink> trackSourceLinks2 = m_ATLASConverterTool->trkTrackToSourceLinks(intrk2);
461  trackSourceLinks.insert(trackSourceLinks.end(), std::make_move_iterator(trackSourceLinks2.begin()),
462  std::make_move_iterator(trackSourceLinks2.end()));
463  // protection against error in the conversion from Atlas measurement to ACTS
464  // source link
465  if (trackSourceLinks.empty()) {
466  ATH_MSG_DEBUG("input contain measurement but no source link created, probable issue "
467  <<"with the converter, reject fit ");
468  return nullptr;
469  }
470 
471  const auto initialParams = m_ATLASConverterTool->trkTrackParametersToActsParameters(*(intrk1.perigeeParameters()), tgContext);
472 
473 
474  const Acts::BoundTrackParameters initialParamsWithHypothesis(
475  initialParams.referenceSurface().getSharedPtr(),
476  initialParams.parameters(), initialParams.covariance(),
477  ParticleHypothesis::convert(matEffects));
478 
479  ActsTrk::MutableTrackBackend trackContainerBackEnd;
480  ActsTrk::MutableTrackStateBackend multiTrajBackEnd;
481  ActsTrk::MutableTrackContainer tracks( std::move(trackContainerBackEnd),
482  std::move(multiTrajBackEnd));
483 
484  Gx2FitterOptions_t gx2fOptions = configureFit(tgContext, mfContext, calContext,
486  // Perform the fit
487  auto result = fit(trackSourceLinks, initialParamsWithHypothesis, gx2fOptions, tracks);
488 
489  return m_ATLASConverterTool->convertFitResult(ctx, tracks, result,
492 }
493 
494 std::unique_ptr<MutableTrackContainer> GlobalChiSquareFitterTool::fit(
495  const Seed& seed,
496  const Acts::BoundTrackParameters& initialParams,
497  const Acts::GeometryContext& tgContext,
498  const Acts::MagneticFieldContext& mfContext,
499  const Acts::CalibrationContext& calContext,
500  const Acts::Surface& targetSurface) const {
501 
502  std::vector<ATLASUncalibSourceLink> sourceLinks;
503  sourceLinks.reserve(6);
504 
505  for (const xAOD::SpacePoint* sp : seed.sp()) {
506  sourceLinks.insert(sourceLinks.end(), sp->measurements().begin(), sp->measurements().end());
507  }
508  return fit(sourceLinks, initialParams, tgContext, mfContext, calContext, &targetSurface);
509 }
510 
511 
513  const EventContext& /*ctx*/,
514  const TrackContainer::ConstTrackProxy& /*track*/,
515  MutableTrackContainer& /*trackContainer*/,
516  const Acts::PerigeeSurface& /*pSurface*/) const
517 {
518  ATH_MSG_ERROR("Track refit method not implemented in GlobalChiSquareFitterTool yet");
519  return StatusCode::FAILURE;
520 }
521 } // 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
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:208
PerigeeSurface.h
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
ActsGeometryContext.h
ActsTrk::GlobalChiSquareFitterTool::m_extrapolationTool
ToolHandle< IActsExtrapolationTool > m_extrapolationTool
Definition: GlobalChiSquareFitterTool.h:184
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:15
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:26
xAOD::UncalibMeasType::MMClusterType
@ MMClusterType
ActsTrk::GlobalChiSquareFitterTool::m_logger
std::unique_ptr< const Acts::Logger > m_logger
logging instance
Definition: GlobalChiSquareFitterTool.h:233
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:221
ActsTrk::GlobalChiSquareFitterTool::logger
const Acts::Logger & logger() const
Private access to the logger.
Definition: GlobalChiSquareFitterTool.h:230
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::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:148
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:218
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:214
Trk::ParticleHypothesis
ParticleHypothesis
Definition: ParticleHypothesis.h:28
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:210
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:212
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:223
ActsTrk::MutableTrackStateBackend
Acts::VectorMultiTrajectory MutableTrackStateBackend
Definition: TrackContainer.h:17
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:225
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:216
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: MSTrackingVolumeBuilder.cxx:24
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:227
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
ActsTrk::GlobalChiSquareFitterTool::CurvedPropagator_t
Acts::Propagator< Acts::SympyStepper, Acts::Navigator > CurvedPropagator_t
Definition: GlobalChiSquareFitterTool.h:149