ATLAS Offline Software
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
ActsTrk::KalmanFitterTool Class Reference

#include <KalmanFitterTool.h>

Inheritance diagram for ActsTrk::KalmanFitterTool:
Collaboration diagram for ActsTrk::KalmanFitterTool:

Public Member Functions

 KalmanFitterTool (const std::string &, const std::string &, const IInterface *)
 
virtual ~KalmanFitterTool ()=default
 
virtual StatusCode initialize () override
 
virtual std::unique_ptr< Trk::Trackfit (const EventContext &ctx, const Trk::Track &, const Trk::RunOutlierRemoval runOutlier=false, const Trk::ParticleHypothesis matEffects=Trk::nonInteracting) const override
 refit a track More...
 
virtual std::unique_ptr< Trk::Trackfit (const EventContext &ctx, const Trk::PrepRawDataSet &, const Trk::TrackParameters &, const Trk::RunOutlierRemoval runOutlier=false, const Trk::ParticleHypothesis matEffects=Trk::nonInteracting) const override
 fit a set of PrepRawData objects More...
 
virtual std::unique_ptr< Trk::Trackfit (const EventContext &ctx, const Trk::MeasurementSet &, const Trk::TrackParameters &, const Trk::RunOutlierRemoval runOutlier=false, const Trk::ParticleHypothesis matEffects=Trk::nonInteracting) const override
 fit a set of MeasurementBase objects More...
 
virtual std::unique_ptr< Trk::Trackfit (const EventContext &ctx, const Trk::Track &, const Trk::PrepRawDataSet &, const Trk::RunOutlierRemoval runOutlier=false, const Trk::ParticleHypothesis matEffects=Trk::nonInteracting) const override
 extend a track fit including a new set of PrepRawData objects More...
 
virtual std::unique_ptr< ActsTrk::MutableTrackContainerfit (const EventContext &ctx, const std::vector< ActsTrk::ATLASUncalibSourceLink > &clusterList, const Acts::BoundTrackParameters &initialParams, const Acts::GeometryContext &tgContext, const Acts::MagneticFieldContext &mfContext, const Acts::CalibrationContext &calContext, const DetectorElementToActsGeometryIdMap &detectorElementToGeometryIdMap, const Acts::Surface *targetSurface=nullptr) const override
 fit a set of xAOD uncalibrated Measurements More...
 
virtual std::unique_ptr< Trk::Trackfit (const EventContext &ctx, const Trk::Track &, const Trk::MeasurementSet &, const Trk::RunOutlierRemoval runOutlier=false, const Trk::ParticleHypothesis matEffects=Trk::nonInteracting) const override
 extend a track fit including a new set of MeasurementBase objects More...
 
virtual std::unique_ptr< Trk::Trackfit (const EventContext &ctx, const Trk::Track &intrk1, const Trk::Track &intrk2, const Trk::RunOutlierRemoval runOutlier=false, const Trk::ParticleHypothesis matEffects=Trk::nonInteracting) const override
 combined track fit More...
 
virtual std::unique_ptr< ActsTrk::MutableTrackContainerfit (const EventContext &ctx, const ActsTrk::Seed &seed, const Acts::BoundTrackParameters &initialParams, const Acts::GeometryContext &tgContext, const Acts::MagneticFieldContext &mfContext, const Acts::CalibrationContext &calContext, const DetectorElementToActsGeometryIdMap &detectorElementToGeometryIdMap) const override
 Acts seed fit. More...
 

Private Types

using Fitter = Acts::KalmanFitter< Acts::Propagator< Acts::SympyStepper, Acts::Navigator >, ActsTrk::MutableTrackStateBackend >
 Type erased track fitter function. More...
 
using DirectFitter = Acts::KalmanFitter< Acts::Propagator< Acts::SympyStepper, Acts::DirectNavigator >, ActsTrk::MutableTrackStateBackend >
 

Private Member Functions

std::unique_ptr< Trk::TrackmakeTrack (const EventContext &ctx, Acts::GeometryContext &tgContext, ActsTrk::MutableTrackContainer &tracks, Acts::Result< ActsTrk::MutableTrackContainer::TrackProxy, std::error_code > &fitResult, bool SourceLinkType=false) const
 
const Acts::Logger & logger () const
 Private access to the logger. More...
 

Private Attributes

ToolHandle< IActsExtrapolationToolm_extrapolationTool {this, "ExtrapolationTool", ""}
 
ToolHandle< IActsTrackingGeometryToolm_trackingGeometryTool {this, "TrackingGeometryTool", ""}
 
ToolHandle< ActsTrk::IActsToTrkConverterToolm_ATLASConverterTool {this, "ATLASConverterTool", ""}
 
ToolHandle< Trk::IExtendedTrackSummaryToolm_trkSummaryTool {this, "SummaryTool", "", "ToolHandle for track summary tool"}
 
ToolHandle< Trk::IBoundaryCheckToolm_boundaryCheckTool
 
Gaudi::Property< double > m_option_outlierChi2Cut
 
Gaudi::Property< double > m_option_ReverseFilteringPt
 
Gaudi::Property< int > m_option_maxPropagationStep
 
Gaudi::Property< double > m_option_seedCovarianceScale
 
std::unique_ptr< ActsTrk::detail::TrkMeasurementCalibratorm_calibrator {nullptr}
 
std::unique_ptr< Fitterm_fitter {nullptr}
 
std::unique_ptr< DirectFitterm_directFitter {nullptr}
 
Acts::KalmanFitterExtensions< ActsTrk::MutableTrackStateBackendm_kfExtensions
 
ActsTrk::detail::FitterHelperFunctions::ATLASOutlierFinder m_outlierFinder {0}
 
ActsTrk::detail::FitterHelperFunctions::ReverseFilteringLogic m_reverseFilteringLogic {0}
 
std::unique_ptr< const Acts::Logger > m_logger
 logging instance More...
 
ToolHandle< Trk::IRIO_OnTrackCreatorm_broadROTcreator {this, "BroadRotCreatorTool", ""}
 
ToolHandle< Trk::IRIO_OnTrackCreatorm_ROTcreator {this, "RotCreatorTool", ""}
 
Gaudi::Property< bool > m_doReFitFromPRD {this, "DoReFitFromPRD", false, "Do Refit From PRD instead of ROT"}
 

Detailed Description

Definition at line 87 of file KalmanFitterTool.h.

Member Typedef Documentation

◆ DirectFitter

using ActsTrk::KalmanFitterTool::DirectFitter = Acts::KalmanFitter<Acts::Propagator<Acts::SympyStepper, Acts::DirectNavigator>, ActsTrk::MutableTrackStateBackend>
private

Definition at line 206 of file KalmanFitterTool.h.

◆ Fitter

using ActsTrk::KalmanFitterTool::Fitter = Acts::KalmanFitter<Acts::Propagator<Acts::SympyStepper, Acts::Navigator>, ActsTrk::MutableTrackStateBackend>
private

Type erased track fitter function.

Definition at line 203 of file KalmanFitterTool.h.

Constructor & Destructor Documentation

◆ KalmanFitterTool()

ActsTrk::KalmanFitterTool::KalmanFitterTool ( const std::string &  t,
const std::string &  n,
const IInterface *  p 
)

Definition at line 169 of file KalmanFitterTool.cxx.

171  :
172  base_class(t,n,p)
173 {}

◆ ~KalmanFitterTool()

virtual ActsTrk::KalmanFitterTool::~KalmanFitterTool ( )
virtualdefault

Member Function Documentation

◆ fit() [1/8]

std::unique_ptr< ActsTrk::MutableTrackContainer > ActsTrk::KalmanFitterTool::fit ( const EventContext &  ctx,
const ActsTrk::Seed seed,
const Acts::BoundTrackParameters &  initialParams,
const Acts::GeometryContext &  tgContext,
const Acts::MagneticFieldContext &  mfContext,
const Acts::CalibrationContext &  calContext,
const DetectorElementToActsGeometryIdMap detectorElementToGeometryIdMap 
) const
overridevirtual

Acts seed fit.

Definition at line 880 of file KalmanFitterTool.cxx.

887 {
888  const Acts::TrackingGeometry *
889  actsTrackingGeometry = m_trackingGeometryTool->trackingGeometry().get();
890  if (!actsTrackingGeometry) {
891  throw std::runtime_error("No Acts tracking geometry.");
892  }
893 
894  std::vector<ActsTrk::ATLASUncalibSourceLink> sourceLinks;
895  sourceLinks.reserve(6);
896 
897  std::vector<const Acts::Surface*> surfaces;
898  surfaces.reserve(6);
899 
900  const auto& sps = seed.sp();
901  for (const xAOD::SpacePoint* sp : sps) {
902  const auto& measurements = sp->measurements();
903  for (const xAOD::UncalibratedMeasurement *umeas : measurements) {
905  sourceLinks.emplace_back( el );
906  surfaces.push_back(ActsTrk::getSurfaceOfMeasurement(*actsTrackingGeometry, detectorElementToGeometryIdMap, *umeas));
907  }
908  }
909  return fit(ctx, sourceLinks, initialParams, tgContext, mfContext, calContext, detectorElementToGeometryIdMap, surfaces.front());
910 }

◆ fit() [2/8]

std::unique_ptr< ActsTrk::MutableTrackContainer > ActsTrk::KalmanFitterTool::fit ( const EventContext &  ctx,
const std::vector< ActsTrk::ATLASUncalibSourceLink > &  clusterList,
const Acts::BoundTrackParameters &  initialParams,
const Acts::GeometryContext &  tgContext,
const Acts::MagneticFieldContext &  mfContext,
const Acts::CalibrationContext &  calContext,
const DetectorElementToActsGeometryIdMap detectorElementToGeometryIdMap,
const Acts::Surface *  targetSurface = nullptr 
) const
overridevirtual

fit a set of xAOD uncalibrated Measurements

Definition at line 446 of file KalmanFitterTool.cxx.

453  {
454  ATH_MSG_DEBUG("--> entering KalmanFitter::fit(xAODMeasure...things,TP,)");
455 
456  std::vector<Acts::SourceLink> sourceLinks;
457  sourceLinks.reserve(clusterList.size());
458 
459  std::vector<const Acts::Surface*> surfaces;
460  surfaces.reserve(clusterList.size());
461 
462  const Acts::TrackingGeometry *
463  actsTrackingGeometry = m_trackingGeometryTool->trackingGeometry().get();
464  if (!actsTrackingGeometry) {
465  throw std::runtime_error("No Acts tracking geometry.");
466  }
467 
468  for (const ActsTrk::ATLASUncalibSourceLink& el : clusterList) {
469  sourceLinks.emplace_back( el );
470  surfaces.push_back(ActsTrk::getSurfaceOfMeasurement(*actsTrackingGeometry, detectorElementToGeometryIdMap, getUncalibratedMeasurement(el) ));
471  }
472 
473  Acts::KalmanFitterExtensions<ActsTrk::MutableTrackStateBackend> kfExtensions = m_kfExtensions;
474 
475  ActsTrk::ATLASUncalibSourceLinkSurfaceAccessor surfaceAccessor( *actsTrackingGeometry, detectorElementToGeometryIdMap);
476  kfExtensions.surfaceAccessor.connect<&ActsTrk::ATLASUncalibSourceLinkSurfaceAccessor::operator()>(&surfaceAccessor);
477 
478  detail::OnTrackCalibrator calibrator = detail::OnTrackCalibrator<ActsTrk::MutableTrackStateBackend>
479  ::NoCalibration(*actsTrackingGeometry, detectorElementToGeometryIdMap);
480 
481  kfExtensions.calibrator.connect<&detail::OnTrackCalibrator<ActsTrk::MutableTrackStateBackend>::calibrate>(&calibrator);
482 
483  Acts::PropagatorPlainOptions propagationOption(tgContext, mfContext);
484  propagationOption.maxSteps = m_option_maxPropagationStep;
485 
486  // Construct a perigee surface as the target surface if none is provided
487  std::shared_ptr<Acts::Surface> pSurface{nullptr};
488  if (!targetSurface){
489  pSurface = Acts::Surface::makeShared<Acts::PerigeeSurface>(Acts::Vector3{0., 0., 0.});
490  targetSurface = pSurface.get();
491  }
492 
493  // Set the KalmanFitter options
494  Acts::KalmanFitterOptions<ActsTrk::MutableTrackStateBackend>
495  kfOptions(tgContext, mfContext, calContext,
496  kfExtensions,
497  propagationOption,
498  targetSurface);
499 
500  std::unique_ptr< ActsTrk::MutableTrackContainer > tracks = std::make_unique< ActsTrk::MutableTrackContainer >();
501 
502 
503  auto result = m_directFitter->fit(sourceLinks.begin(),
504  sourceLinks.end(),
505  initialParams,
506  kfOptions,
507  surfaces,
508  *tracks.get());
509 
510  if (not result.ok()) {
511  ATH_MSG_VERBOSE("Kalman Fitter on Seed has failed");
512  return nullptr;
513  }
514  return tracks;
515 }

◆ fit() [3/8]

std::unique_ptr< Trk::Track > ActsTrk::KalmanFitterTool::fit ( const EventContext &  ctx,
const Trk::MeasurementSet inputMeasSet,
const Trk::TrackParameters estimatedStartParameters,
const Trk::RunOutlierRemoval  runOutlier = false,
const Trk::ParticleHypothesis  matEffects = Trk::nonInteracting 
) const
overridevirtual

fit a set of MeasurementBase objects

Definition at line 311 of file KalmanFitterTool.cxx.

316 {
317  std::unique_ptr<Trk::Track> track = nullptr;
318 
319  // protection against not having measurements on the input track
320  if (inputMeasSet.size() < 2) {
321  ATH_MSG_DEBUG("called to refit empty measurement set or a measurement set with too little information, reject fit");
322  return nullptr;
323  }
324 
325  // Construct a perigee surface as the target surface
326  auto pSurface = Acts::Surface::makeShared<Acts::PerigeeSurface>(
327  Acts::Vector3{0., 0., 0.});
328 
329  Acts::GeometryContext tgContext = m_trackingGeometryTool->getGeometryContext(ctx).context();
330  Acts::MagneticFieldContext mfContext = m_extrapolationTool->getMagneticFieldContext(ctx);
331  // CalibrationContext converter not implemented yet.
332  Acts::CalibrationContext calContext = Acts::CalibrationContext();
333 
334  Acts::KalmanFitterExtensions<ActsTrk::MutableTrackStateBackend> kfExtensions = m_kfExtensions;
335 
336  ATLASSourceLinkSurfaceAccessor surfaceAccessor{&(*m_ATLASConverterTool)};
337  kfExtensions.surfaceAccessor.connect<&ATLASSourceLinkSurfaceAccessor::operator()>(&surfaceAccessor);
338 
339  Acts::PropagatorPlainOptions propagationOption(tgContext, mfContext);
340  propagationOption.maxSteps = m_option_maxPropagationStep;
341  // Set the KalmanFitter options
342  Acts::KalmanFitterOptions
343  kfOptions(tgContext, mfContext, calContext,
344  kfExtensions,
345  propagationOption,
346  &(*pSurface));
347 
348  std::vector<Acts::SourceLink> trackSourceLinks;
349  trackSourceLinks.reserve(inputMeasSet.size());
350 
351  for (auto it = inputMeasSet.begin(); it != inputMeasSet.end(); ++it){
352  trackSourceLinks.push_back(m_ATLASConverterTool->trkMeasurementToSourceLink(tgContext, **it));
353  }
354  // protection against error in the conversion from Atlas masurement to Acts source link
355  if (trackSourceLinks.empty()) {
356  ATH_MSG_DEBUG("input contain measurement but no source link created, probable issue with the converter, reject fit ");
357  return track;
358  }
359 
360  const auto& initialParams = m_ATLASConverterTool->trkTrackParametersToActsParameters(estimatedStartParameters, tgContext);
361 
363 
364  // Perform the fit
365  auto result = m_fitter->fit(trackSourceLinks.begin(), trackSourceLinks.end(),
366  initialParams, kfOptions, tracks);
367  if (result.ok()) {
368  track = makeTrack(ctx, tgContext, tracks, result);
369  }
370  return track;
371 }

◆ fit() [4/8]

std::unique_ptr< Trk::Track > ActsTrk::KalmanFitterTool::fit ( const EventContext &  ctx,
const Trk::PrepRawDataSet inputPRDColl,
const Trk::TrackParameters estimatedStartParameters,
const Trk::RunOutlierRemoval  runOutlier = false,
const Trk::ParticleHypothesis  matEffects = Trk::nonInteracting 
) const
overridevirtual

fit a set of PrepRawData objects

Definition at line 376 of file KalmanFitterTool.cxx.

381 {
382  ATH_MSG_DEBUG("--> entering KalmanFitter::fit(PRDS,TP,)");
383 
384 
385  std::unique_ptr<Trk::Track> track = nullptr;
386 
387  // Construct a perigee surface as the target surface
388  auto pSurface = Acts::Surface::makeShared<Acts::PerigeeSurface>(
389  Acts::Vector3{0., 0., 0.});
390 
391  Acts::GeometryContext tgContext = m_trackingGeometryTool->getGeometryContext(ctx).context();
392  Acts::MagneticFieldContext mfContext = m_extrapolationTool->getMagneticFieldContext(ctx);
393  // CalibrationContext converter not implemented yet.
394  Acts::CalibrationContext calContext = Acts::CalibrationContext();
395 
396  Acts::KalmanFitterExtensions<ActsTrk::MutableTrackStateBackend> kfExtensions = m_kfExtensions;
397 
398  PRDSourceLinkCalibrator calibrator{}; // @TODO: Set tool pointers
399  calibrator.rotCreator =m_ROTcreator.get();
400  calibrator.broadRotCreator = m_broadROTcreator.get();
401  calibrator.converterTool = m_ATLASConverterTool.get();
402  kfExtensions.calibrator.connect<&PRDSourceLinkCalibrator::calibrate<ActsTrk::MutableTrackStateBackend>>(&calibrator);
403 
404  PRDSourceLinkSurfaceAccessor surfaceAccessor{m_ATLASConverterTool.get()};
405  kfExtensions.surfaceAccessor.connect<&PRDSourceLinkSurfaceAccessor::operator()>(&surfaceAccessor);
406 
407  Acts::PropagatorPlainOptions propagationOption(tgContext, mfContext);
408  propagationOption.maxSteps = m_option_maxPropagationStep;
409  // Set the KalmanFitter options
410  Acts::KalmanFitterOptions
411  kfOptions(tgContext, mfContext, calContext,
412  kfExtensions,
413  propagationOption,
414  &(*pSurface));
415 
416 
417  std::vector<Acts::SourceLink> trackSourceLinks;
418  trackSourceLinks.reserve(inputPRDColl.size());
419 
420  for(const Trk::PrepRawData* prd : inputPRDColl) {
421  trackSourceLinks.push_back(Acts::SourceLink{PRDSourceLink{prd}});
422  }
423  // protection against error in the conversion from Atlas masurement to Acts source link
424  if (trackSourceLinks.empty()) {
425  ATH_MSG_WARNING("input contain measurement but no source link created, probable issue with the converter, reject fit ");
426  return track;
427  }
428  //
429 
430  const auto& initialParams = m_ATLASConverterTool->trkTrackParametersToActsParameters(estimatedStartParameters, tgContext);
431 
432 
434  // Perform the fit
435  auto result = m_fitter->fit(trackSourceLinks.begin(), trackSourceLinks.end(),
436  initialParams, kfOptions, tracks);
437  if (result.ok()) {
438  track = makeTrack(ctx, tgContext, tracks, result, true);
439  }
440  return track;
441 }

◆ fit() [5/8]

std::unique_ptr< Trk::Track > ActsTrk::KalmanFitterTool::fit ( const EventContext &  ctx,
const Trk::Track inputTrack,
const Trk::MeasurementSet addMeasColl,
const Trk::RunOutlierRemoval  runOutlier = false,
const Trk::ParticleHypothesis  matEffects = Trk::nonInteracting 
) const
overridevirtual

extend a track fit including a new set of MeasurementBase objects

Definition at line 522 of file KalmanFitterTool.cxx.

527 {
528  ATH_MSG_VERBOSE ("--> enter KalmanFitter::fit(Track,Meas'BaseSet,,)");
529  ATH_MSG_VERBOSE (" with Track from author = " << inputTrack.info().dumpInfo());
530 
531  // protection, if empty MeasurementSet
532  if (addMeasColl.empty()) {
533  ATH_MSG_DEBUG( "client tries to add an empty MeasurementSet to the track fit." );
534  return fit(ctx,inputTrack);
535  }
536 
537  // protection against not having measurements on the input track
538  if (!inputTrack.measurementsOnTrack() || (inputTrack.measurementsOnTrack()->size() < 2 && addMeasColl.empty())) {
539  ATH_MSG_DEBUG("called to refit empty track or track with too little information, reject fit");
540  return nullptr;
541  }
542 
543  // protection against not having track parameters on the input track
544  if (!inputTrack.trackParameters() || inputTrack.trackParameters()->empty()) {
545  ATH_MSG_DEBUG("input fails to provide track parameters for seeding the KF, reject fit");
546  return nullptr;
547  }
548 
549  std::unique_ptr<Trk::Track> track = nullptr;
550 
551  // Construct a perigee surface as the target surface
552  auto pSurface = Acts::Surface::makeShared<Acts::PerigeeSurface>(
553  Acts::Vector3{0., 0., 0.});
554 
555  Acts::GeometryContext tgContext = m_trackingGeometryTool->getGeometryContext(ctx).context();
556  Acts::MagneticFieldContext mfContext = m_extrapolationTool->getMagneticFieldContext(ctx);
557  // CalibrationContext converter not implemented yet.
558  Acts::CalibrationContext calContext = Acts::CalibrationContext();
559 
560  Acts::KalmanFitterExtensions<ActsTrk::MutableTrackStateBackend> kfExtensions = m_kfExtensions;
561 
562  Acts::PropagatorPlainOptions propagationOption(tgContext, mfContext);
563  propagationOption.maxSteps = m_option_maxPropagationStep;
564  // Set the KalmanFitter options
565  Acts::KalmanFitterOptions
566  kfOptions(tgContext, mfContext, calContext,
567  kfExtensions,
568  propagationOption,
569  &(*pSurface));
570 
571  std::vector<Acts::SourceLink> trackSourceLinks = m_ATLASConverterTool->trkTrackToSourceLinks(tgContext, inputTrack);
572  const auto& initialParams = m_ATLASConverterTool->trkTrackParametersToActsParameters(*(inputTrack.perigeeParameters()), tgContext);
573 
574  for (auto it = addMeasColl.begin(); it != addMeasColl.end(); ++it)
575  {
576  trackSourceLinks.push_back(m_ATLASConverterTool->trkMeasurementToSourceLink(tgContext, **it));
577  }
578  // protection against error in the conversion from Atlas masurement to Acts source link
579  if (trackSourceLinks.empty()) {
580  ATH_MSG_DEBUG("input contain measurement but no source link created, probable issue with the converter, reject fit ");
581  return track;
582  }
583 
585  // Perform the fit
586  auto result = m_fitter->fit(trackSourceLinks.begin(), trackSourceLinks.end(),
587  initialParams, kfOptions, tracks);
588  if (result.ok()) {
589  track = makeTrack(ctx, tgContext, tracks, result);
590  }
591  return track;
592 }

◆ fit() [6/8]

std::unique_ptr< Trk::Track > ActsTrk::KalmanFitterTool::fit ( const EventContext &  ctx,
const Trk::Track ,
const Trk::PrepRawDataSet ,
const Trk::RunOutlierRemoval  runOutlier = false,
const Trk::ParticleHypothesis  matEffects = Trk::nonInteracting 
) const
overridevirtual

extend a track fit including a new set of PrepRawData objects

Definition at line 597 of file KalmanFitterTool.cxx.

602 {
603  ATH_MSG_DEBUG("Fit of Track with additional PrepRawDataSet not yet implemented");
604  return nullptr;
605 }

◆ fit() [7/8]

std::unique_ptr< Trk::Track > ActsTrk::KalmanFitterTool::fit ( const EventContext &  ctx,
const Trk::Track inputTrack,
const Trk::RunOutlierRemoval  runOutlier = false,
const Trk::ParticleHypothesis  matEffects = Trk::nonInteracting 
) const
overridevirtual

refit a track

Definition at line 228 of file KalmanFitterTool.cxx.

232 {
233  std::unique_ptr<Trk::Track> track = nullptr;
234  ATH_MSG_VERBOSE ("--> enter KalmanFitter::fit(Track,,) with Track from author = "
235  << inputTrack.info().dumpInfo());
236 
237  // protection against not having measurements on the input track
238  if (!inputTrack.measurementsOnTrack() || inputTrack.measurementsOnTrack()->size() < 2) {
239  ATH_MSG_DEBUG("called to refit empty track or track with too little information, reject fit");
240  return nullptr;
241  }
242 
243  // protection against not having track parameters on the input track
244  if (!inputTrack.trackParameters() || inputTrack.trackParameters()->empty()) {
245  ATH_MSG_DEBUG("input fails to provide track parameters for seeding the KF, reject fit");
246  return nullptr;
247  }
248 
249  // Construct a perigee surface as the target surface
250  auto pSurface = Acts::Surface::makeShared<Acts::PerigeeSurface>(
251  Acts::Vector3{0., 0., 0.});
252 
253  Acts::GeometryContext tgContext = m_trackingGeometryTool->getGeometryContext(ctx).context();
254  Acts::MagneticFieldContext mfContext = m_extrapolationTool->getMagneticFieldContext(ctx);
255  // CalibrationContext converter not implemented yet.
256  Acts::CalibrationContext calContext = Acts::CalibrationContext();
257 
258  Acts::KalmanFitterExtensions<ActsTrk::MutableTrackStateBackend> kfExtensions = m_kfExtensions;
259 
260  ATLASSourceLinkSurfaceAccessor surfaceAccessor{&(*m_ATLASConverterTool)};
261  kfExtensions.surfaceAccessor.connect<&ATLASSourceLinkSurfaceAccessor::operator()>(&surfaceAccessor);
262 
263  Acts::PropagatorPlainOptions propagationOption(tgContext, mfContext);
264  propagationOption.maxSteps = m_option_maxPropagationStep;
265  // Set the KalmanFitter options
266  Acts::KalmanFitterOptions
267  kfOptions(tgContext, mfContext, calContext,
268  kfExtensions,
269  propagationOption,
270  &(*pSurface));
271 
272  std::vector<Acts::SourceLink> trackSourceLinks = m_ATLASConverterTool->trkTrackToSourceLinks(tgContext,inputTrack);
273  // protection against error in the conversion from Atlas masurement to Acts source link
274  if (trackSourceLinks.empty()) {
275  ATH_MSG_DEBUG("input contain measurement but no source link created, probable issue with the converter, reject fit ");
276  return track;
277  }
278 
279  const auto& initialParams = m_ATLASConverterTool->trkTrackParametersToActsParameters((*inputTrack.perigeeParameters()), tgContext);
280 
281  // The covariance from already fitted track are too small and would result an incorect smoothing.
282  // We scale up the input covaraiance to avoid this.
283  Acts::BoundSquareMatrix scaledCov = Acts::BoundSquareMatrix::Identity();
284  for (int i=0; i<6; ++i) {
286  (scaledCov)(i,i) = scale * initialParams.covariance().value()(i,i);
287  }
288 
289  // @TODO: Synchronize with prtHypothesis
291 
292  const Acts::BoundTrackParameters scaledInitialParams(initialParams.referenceSurface().getSharedPtr(),
293  initialParams.parameters(),
294  scaledCov,
295  hypothesis);
296 
298 
299  // Perform the fit
300  auto result = m_fitter->fit(trackSourceLinks.begin(), trackSourceLinks.end(),
301  scaledInitialParams, kfOptions, tracks);
302  if (result.ok()) {
303  track = makeTrack(ctx, tgContext, tracks, result);
304  }
305  return track;
306 }

◆ fit() [8/8]

std::unique_ptr< Trk::Track > ActsTrk::KalmanFitterTool::fit ( const EventContext &  ctx,
const Trk::Track intrk1,
const Trk::Track intrk2,
const Trk::RunOutlierRemoval  runOutlier = false,
const Trk::ParticleHypothesis  matEffects = Trk::nonInteracting 
) const
overridevirtual

combined track fit

Definition at line 610 of file KalmanFitterTool.cxx.

615 {
616  ATH_MSG_VERBOSE ("--> enter KalmanFitter::fit(Track,Track,)");
617  ATH_MSG_VERBOSE (" with Tracks from #1 = " << intrk1.info().dumpInfo()
618  << " and #2 = " << intrk2.info().dumpInfo());
619 
620  // protection, if empty track2
621  if (!intrk2.measurementsOnTrack()) {
622  ATH_MSG_DEBUG( "input #2 is empty try to fit track 1 alone" );
623  return fit(ctx,intrk1);
624  }
625 
626  // protection, if empty track1
627  if (!intrk1.measurementsOnTrack()) {
628  ATH_MSG_DEBUG( "input #1 is empty try to fit track 2 alone" );
629  return fit(ctx,intrk2);
630  }
631 
632  // protection against not having track parameters on the input track
633  if (!intrk1.trackParameters() || intrk1.trackParameters()->empty()) {
634  ATH_MSG_DEBUG("input #1 fails to provide track parameters for seeding the KF, reject fit");
635  return nullptr;
636  }
637 
638  std::unique_ptr<Trk::Track> track = nullptr;
639 
640  // Construct a perigee surface as the target surface
641  auto pSurface = Acts::Surface::makeShared<Acts::PerigeeSurface>(
642  Acts::Vector3{0., 0., 0.});
643 
644  Acts::GeometryContext tgContext = m_trackingGeometryTool->getGeometryContext(ctx).context();
645  Acts::MagneticFieldContext mfContext = m_extrapolationTool->getMagneticFieldContext(ctx);
646  // CalibrationContext converter not implemented yet.
647  Acts::CalibrationContext calContext = Acts::CalibrationContext();
648 
649  Acts::KalmanFitterExtensions<ActsTrk::MutableTrackStateBackend> kfExtensions = m_kfExtensions;
650 
651  Acts::PropagatorPlainOptions propagationOption(tgContext, mfContext);
652  propagationOption.maxSteps = m_option_maxPropagationStep;
653  // Set the KalmanFitter options
654  Acts::KalmanFitterOptions
655  kfOptions(tgContext, mfContext, calContext,
656  kfExtensions,
657  propagationOption,
658  &(*pSurface));
659 
660  std::vector<Acts::SourceLink> trackSourceLinks = m_ATLASConverterTool->trkTrackToSourceLinks(tgContext, intrk1);
661  std::vector<Acts::SourceLink> trackSourceLinks2 = m_ATLASConverterTool->trkTrackToSourceLinks(tgContext, intrk2);
662  trackSourceLinks.insert(trackSourceLinks.end(), trackSourceLinks2.begin(), trackSourceLinks2.end());
663  // protection against error in the conversion from Atlas masurement to Acts source link
664  if (trackSourceLinks.empty()) {
665  ATH_MSG_DEBUG("input contain measurement but no source link created, probable issue with the converter, reject fit ");
666  return track;
667  }
668 
669  const auto &initialParams = m_ATLASConverterTool->trkTrackParametersToActsParameters(*(intrk1.perigeeParameters()), tgContext);
670 
671  // The covariance from already fitted track are too small and would result an incorect smoothing.
672  // We scale up the input covaraiance to avoid this.
673  Acts::BoundSquareMatrix scaledCov = Acts::BoundSquareMatrix::Identity();
674  for (int i=0; i<6; ++i) {
676  (scaledCov)(i,i) = scale * initialParams.covariance().value()(i,i);
677  }
678 
679  const Acts::BoundTrackParameters scaledInitialParams(initialParams.referenceSurface().getSharedPtr(),
680  initialParams.parameters(),
681  scaledCov,
683 
684 
686  // Perform the fit
687  auto result = m_fitter->fit(trackSourceLinks.begin(), trackSourceLinks.end(),
688  scaledInitialParams, kfOptions, tracks);
689  if (result.ok()) {
690  track = makeTrack(ctx, tgContext, tracks, result);
691  }
692  return track;
693 }

◆ initialize()

StatusCode ActsTrk::KalmanFitterTool::initialize ( )
overridevirtual

Definition at line 175 of file KalmanFitterTool.cxx.

175  {
176 
177  ATH_MSG_DEBUG(name() << "::" << __FUNCTION__);
178  ATH_CHECK(m_trackingGeometryTool.retrieve());
179  ATH_CHECK(m_extrapolationTool.retrieve());
180  ATH_CHECK(m_ATLASConverterTool.retrieve());
181  ATH_CHECK(m_trkSummaryTool.retrieve());
182  if(m_doReFitFromPRD){
183  ATH_CHECK(m_ROTcreator.retrieve());
184  ATH_CHECK(m_broadROTcreator.retrieve());
185  }
186 
187  m_logger = makeActsAthenaLogger(this, "KalmanRefit");
188 
189  auto field = std::make_shared<ATLASMagneticFieldWrapper>();
190 
191  // Fitter
192  Acts::SympyStepper stepper(field);
193  Acts::Navigator navigator( Acts::Navigator::Config{ m_trackingGeometryTool->trackingGeometry() },
194  logger().cloneWithSuffix("Navigator"));
195  Acts::Propagator<Acts::SympyStepper, Acts::Navigator> propagator(stepper,
196  std::move(navigator),
197  logger().cloneWithSuffix("Prop"));
198 
199  m_fitter = std::make_unique<Fitter>(std::move(propagator),
200  logger().cloneWithSuffix("KalmanFitter"));
201 
202  // Direct Fitter
203  Acts::DirectNavigator directNavigator( logger().cloneWithSuffix("DirectNavigator") );
204  Acts::Propagator<Acts::SympyStepper, Acts::DirectNavigator> directPropagator(std::move(stepper),
205  std::move(directNavigator),
206  logger().cloneWithSuffix("DirectPropagator"));
207 
208  m_directFitter = std::make_unique<DirectFitter>(std::move(directPropagator),
209  logger().cloneWithSuffix("DirectKalmanFitter"));
210 
212  m_calibrator = std::make_unique<ActsTrk::detail::TrkMeasurementCalibrator>(*m_ATLASConverterTool);
215 
216  m_kfExtensions.outlierFinder.connect<&ActsTrk::detail::FitterHelperFunctions::ATLASOutlierFinder::operator()<ActsTrk::MutableTrackStateBackend>>(&m_outlierFinder);
217  m_kfExtensions.reverseFilteringLogic.connect<&ActsTrk::detail::FitterHelperFunctions::ReverseFilteringLogic::operator()<ActsTrk::MutableTrackStateBackend>>(&m_reverseFilteringLogic);
218  m_kfExtensions.updater.connect<&ActsTrk::detail::FitterHelperFunctions::gainMatrixUpdate<ActsTrk::MutableTrackStateBackend>>();
219  m_kfExtensions.smoother.connect<&ActsTrk::detail::FitterHelperFunctions::mbfSmoother<ActsTrk::MutableTrackStateBackend>>();
220  m_kfExtensions.calibrator.connect<&ActsTrk::detail::TrkMeasurementCalibrator::calibrate<ActsTrk::MutableTrackStateBackend>>(m_calibrator.get());
221 
222  return StatusCode::SUCCESS;
223 }

◆ logger()

const Acts::Logger& ActsTrk::KalmanFitterTool::logger ( ) const
inlineprivate

Private access to the logger.

Definition at line 215 of file KalmanFitterTool.h.

215  {
216  return *m_logger;
217  }

◆ makeTrack()

std::unique_ptr< Trk::Track > ActsTrk::KalmanFitterTool::makeTrack ( const EventContext &  ctx,
Acts::GeometryContext &  tgContext,
ActsTrk::MutableTrackContainer tracks,
Acts::Result< ActsTrk::MutableTrackContainer::TrackProxy, std::error_code > &  fitResult,
bool  SourceLinkType = false 
) const
private

Definition at line 696 of file KalmanFitterTool.cxx.

700  {
701 
702  if (not fitResult.ok())
703  return nullptr;
704 
705  std::unique_ptr<Trk::Track> newtrack = nullptr;
706  // Get the fit output object
707  const auto& acts_track = fitResult.value();
708  auto finalTrajectory = std::make_unique<Trk::TrackStates>();
709  // initialise the number of dead Pixel and Acts strip
710  int numberOfDeadPixel = 0;
711  int numberOfDeadSCT = 0;
712 
713  std::vector<std::unique_ptr<const Acts::BoundTrackParameters>> actsSmoothedParam;
714  // Loop over all the output state to create track state
715  tracks.trackStateContainer().visitBackwards(acts_track.tipIndex(),
716  [&] (const auto &state) -> void
717  {
718  // First only concider state with an associated detector element not in the TRT
719  auto flag = state.typeFlags();
720  const auto* associatedDetEl = state.referenceSurface().associatedDetectorElement();
721  if (not associatedDetEl)
722  return;
723 
724  const auto* actsElement = dynamic_cast<const ActsDetectorElement*>(associatedDetEl);
725  if (not actsElement)
726  return;
727 
728  const auto* upstreamDetEl = actsElement->upstreamDetectorElement();
729  if (not upstreamDetEl)
730  return;
731 
732  ATH_MSG_VERBOSE("Try casting to TRT for if");
733  if (dynamic_cast<const InDetDD::TRT_BaseElement*>(upstreamDetEl))
734  return;
735 
736  const auto* trkDetElem = dynamic_cast<const Trk::TrkDetElementBase*>(upstreamDetEl);
737  if (not trkDetElem)
738  return;
739 
740  ATH_MSG_VERBOSE("trkDetElem type: " << static_cast<std::underlying_type_t<Trk::DetectorElemType>>(trkDetElem->detectorType()));
741 
742  ATH_MSG_VERBOSE("Try casting to SiDetectorElement");
743  const auto* detElem = dynamic_cast<const InDetDD::SiDetectorElement*>(upstreamDetEl);
744  if (not detElem)
745  return;
746  ATH_MSG_VERBOSE("detElem = " << detElem);
747 
748  // We need to determine the type of state
749  std::bitset<Trk::TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes> typePattern;
750  std::unique_ptr<Trk::TrackParameters> parm;
751 
752  // State is a hole (no associated measurement), use predicted parameters
753  if (flag.test(Acts::TrackStateFlag::HoleFlag)){
754  ATH_MSG_VERBOSE("State is a hole (no associated measurement), use predicted parameters");
755  const Acts::BoundTrackParameters actsParam(state.referenceSurface().getSharedPtr(),
756  state.predicted(),
757  state.predictedCovariance(),
758  acts_track.particleHypothesis());
759  parm = m_ATLASConverterTool->actsTrackParametersToTrkParameters(actsParam, tgContext);
760  auto boundaryCheck = m_boundaryCheckTool->boundaryCheck(*parm);
761 
762  // Check if this is a hole, a dead sensors or a state outside the sensor boundary
763  ATH_MSG_VERBOSE("Check if this is a hole, a dead sensors or a state outside the sensor boundary");
764  if(boundaryCheck == Trk::BoundaryCheckResult::DeadElement){
765  if (detElem->isPixel()) {
766  ++numberOfDeadPixel;
767  }
768  else if (detElem->isSCT()) {
769  ++numberOfDeadSCT;
770  }
771  // Dead sensors states are not stored
772  return;
773  } else if (boundaryCheck != Trk::BoundaryCheckResult::Candidate){
774  // States outside the sensor boundary are ignored
775  return;
776  }
777  typePattern.set(Trk::TrackStateOnSurface::Hole);
778  }
779  // The state was tagged as an outlier or was missed in the reverse filtering, use filtered parameters
780  else if (flag.test(Acts::TrackStateFlag::OutlierFlag) or !state.hasSmoothed()) {
781  ATH_MSG_VERBOSE("The state was tagged as an outlier or was missed in the reverse filtering, use filtered parameters");
782  const Acts::BoundTrackParameters actsParam(state.referenceSurface().getSharedPtr(),
783  state.filtered(),
784  state.filteredCovariance(),
785  acts_track.particleHypothesis());
786  parm = m_ATLASConverterTool->actsTrackParametersToTrkParameters(actsParam, tgContext);
787  typePattern.set(Trk::TrackStateOnSurface::Outlier);
788  }
789  // The state is a measurement state, use smoothed parameters
790  else{
791  ATH_MSG_VERBOSE("The state is a measurement state, use smoothed parameters");
792 
793  const Acts::BoundTrackParameters actsParam(state.referenceSurface().getSharedPtr(),
794  state.smoothed(),
795  state.smoothedCovariance(),
796  acts_track.particleHypothesis());
797 
798  actsSmoothedParam.push_back(std::make_unique<const Acts::BoundTrackParameters>(Acts::BoundTrackParameters(actsParam)));
799  parm = m_ATLASConverterTool->actsTrackParametersToTrkParameters(actsParam, tgContext);
800  typePattern.set(Trk::TrackStateOnSurface::Measurement);
801  }
802  std::unique_ptr<Trk::MeasurementBase> measState;
803  if (state.hasUncalibratedSourceLink() && !SourceLinkType){
804  auto sl = state.getUncalibratedSourceLink().template get<ATLASSourceLink>();
805  assert(sl);
806  measState = sl->uniqueClone();
807  }
808  else if (state.hasUncalibratedSourceLink() && SourceLinkType){ //If the SourceLink is of type PRDSourceLink, we need to create the RIO_OnTrack here.
809  auto sl = state.getUncalibratedSourceLink().template get<PRDSourceLink>().prd;
810 
811  //ROT creation
812  const IdentifierHash idHash = sl->detectorElement()->identifyHash();
813  int dim = state.calibratedSize();
814  std::unique_ptr<Trk::RIO_OnTrack> rot;
815  if (dim == 1) {
816  const InDet::SCT_Cluster* sct_Cluster = dynamic_cast<const InDet::SCT_Cluster*>(sl);
817  if(!sct_Cluster){
818  ATH_MSG_ERROR("ERROR could not cast PRD to SCT_Cluster");
819  return;
820  }
821  rot = std::make_unique<InDet::SCT_ClusterOnTrack>(sct_Cluster,Trk::LocalParameters(Trk::DefinedParameter(state.template calibrated<1>()[0], Trk::loc1)), state.template calibratedCovariance<1>(),idHash);
822  }
823  else if (dim == 2) {
824  const InDet::PixelCluster* pixelCluster = dynamic_cast<const InDet::PixelCluster*>(sl);
825  if(!pixelCluster){
826  //sometimes even with dim=2, only the SCT_Cluster implementation work for RIO_OnTrack creation
827  ATH_MSG_VERBOSE("Dimension is 2 but we need SCT_Cluster for this measurment");
828  const InDet::SCT_Cluster* sct_Cluster = dynamic_cast<const InDet::SCT_Cluster*>(sl);
829  rot = std::make_unique<InDet::SCT_ClusterOnTrack>(sct_Cluster,Trk::LocalParameters(Trk::DefinedParameter(state.template calibrated<1>()[0], Trk::loc1)), state.template calibratedCovariance<1>(),idHash);
830  }
831  else{
832  rot = std::make_unique<InDet::PixelClusterOnTrack>(pixelCluster,Trk::LocalParameters(state.template calibrated<2>()),state.template calibratedCovariance<2>(),idHash);
833  }
834  }
835  else {
836  throw std::domain_error("Cannot handle measurement dim>2");
837  }
838  measState = rot->uniqueClone();
839  }
840  double nDoF = state.calibratedSize();
841  auto quality =Trk::FitQualityOnSurface(state.chi2(), nDoF);
842  const Trk::TrackStateOnSurface *perState = new Trk::TrackStateOnSurface(quality, std::move(measState), std::move(parm), nullptr, typePattern);
843  // If a state was succesfully created add it to the trajectory
844  if (perState) {
845  ATH_MSG_VERBOSE("State succesfully creates, adding it to the trajectory");
846  finalTrajectory->insert(finalTrajectory->begin(), perState);
847  }
848  });
849  // Convert the perigee state and add it to the trajectory
850  const Acts::BoundTrackParameters actsPer(acts_track.referenceSurface().getSharedPtr(),
851  acts_track.parameters(),
852  acts_track.covariance(),
853  acts_track.particleHypothesis());
854  std::unique_ptr<Trk::TrackParameters> per = m_ATLASConverterTool->actsTrackParametersToTrkParameters(actsPer, tgContext);
855  std::bitset<Trk::TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes> typePattern;
856  typePattern.set(Trk::TrackStateOnSurface::Perigee);
857  const Trk::TrackStateOnSurface *perState = new Trk::TrackStateOnSurface(nullptr, std::move(per), nullptr, typePattern);
858  if (perState) finalTrajectory->insert(finalTrajectory->begin(), perState);
859 
860  // Create the track using the states
862  newInfo.setTrackFitter(Trk::TrackInfo::TrackFitter::KalmanFitter); //Mark the fitter as KalmanFitter
863  newtrack = std::make_unique<Trk::Track>(newInfo, std::move(finalTrajectory), nullptr);
864  if (newtrack) {
865  // Create the track summary and update the holes information
866  if (!newtrack->trackSummary()) {
867  newtrack->setTrackSummary(std::make_unique<Trk::TrackSummary>());
869  newtrack->trackSummary()->update(Trk::numberOfSCTHoles, 0);
870  newtrack->trackSummary()->update(Trk::numberOfTRTHoles, 0);
871  newtrack->trackSummary()->update(Trk::numberOfPixelDeadSensors, numberOfDeadPixel);
872  newtrack->trackSummary()->update(Trk::numberOfSCTDeadSensors, numberOfDeadSCT);
873  }
874  m_trkSummaryTool->updateTrackSummary(ctx, *newtrack, true);
875  }
876  return newtrack;
877 }

Member Data Documentation

◆ m_ATLASConverterTool

ToolHandle<ActsTrk::IActsToTrkConverterTool> ActsTrk::KalmanFitterTool::m_ATLASConverterTool {this, "ATLASConverterTool", ""}
private

Definition at line 184 of file KalmanFitterTool.h.

◆ m_boundaryCheckTool

ToolHandle<Trk::IBoundaryCheckTool> ActsTrk::KalmanFitterTool::m_boundaryCheckTool
private
Initial value:
{this,
"BoundaryCheckTool",
"",
"Boundary checking tool for detector sensitivities"}

Definition at line 186 of file KalmanFitterTool.h.

◆ m_broadROTcreator

ToolHandle<Trk::IRIO_OnTrackCreator> ActsTrk::KalmanFitterTool::m_broadROTcreator {this, "BroadRotCreatorTool", ""}
private

Definition at line 222 of file KalmanFitterTool.h.

◆ m_calibrator

std::unique_ptr<ActsTrk::detail::TrkMeasurementCalibrator> ActsTrk::KalmanFitterTool::m_calibrator {nullptr}
private

Definition at line 200 of file KalmanFitterTool.h.

◆ m_directFitter

std::unique_ptr<DirectFitter> ActsTrk::KalmanFitterTool::m_directFitter {nullptr}
private

Definition at line 207 of file KalmanFitterTool.h.

◆ m_doReFitFromPRD

Gaudi::Property<bool> ActsTrk::KalmanFitterTool::m_doReFitFromPRD {this, "DoReFitFromPRD", false, "Do Refit From PRD instead of ROT"}
private

Definition at line 225 of file KalmanFitterTool.h.

◆ m_extrapolationTool

ToolHandle<IActsExtrapolationTool> ActsTrk::KalmanFitterTool::m_extrapolationTool {this, "ExtrapolationTool", ""}
private

Definition at line 182 of file KalmanFitterTool.h.

◆ m_fitter

std::unique_ptr<Fitter> ActsTrk::KalmanFitterTool::m_fitter {nullptr}
private

Definition at line 204 of file KalmanFitterTool.h.

◆ m_kfExtensions

Acts::KalmanFitterExtensions<ActsTrk::MutableTrackStateBackend> ActsTrk::KalmanFitterTool::m_kfExtensions
private

Definition at line 209 of file KalmanFitterTool.h.

◆ m_logger

std::unique_ptr<const Acts::Logger> ActsTrk::KalmanFitterTool::m_logger
private

logging instance

Definition at line 220 of file KalmanFitterTool.h.

◆ m_option_maxPropagationStep

Gaudi::Property< int > ActsTrk::KalmanFitterTool::m_option_maxPropagationStep
private
Initial value:
{this, "MaxPropagationStep", 5000,
"Maximum number of steps for one propagate call"}

Definition at line 195 of file KalmanFitterTool.h.

◆ m_option_outlierChi2Cut

Gaudi::Property< double > ActsTrk::KalmanFitterTool::m_option_outlierChi2Cut
private
Initial value:
{this, "OutlierChi2Cut", 12.5,
"Chi2 cut used by the outlier finder" }

Definition at line 191 of file KalmanFitterTool.h.

◆ m_option_ReverseFilteringPt

Gaudi::Property< double > ActsTrk::KalmanFitterTool::m_option_ReverseFilteringPt
private
Initial value:
{this, "ReverseFilteringPt", 1.0 * Acts::UnitConstants::GeV,
"Pt cut used for the ReverseFiltering logic"}

Definition at line 193 of file KalmanFitterTool.h.

◆ m_option_seedCovarianceScale

Gaudi::Property< double > ActsTrk::KalmanFitterTool::m_option_seedCovarianceScale
private
Initial value:
{this, "SeedCovarianceScale", 100.,
"Scale factor for the input seed covariance when doing refitting"}

Definition at line 197 of file KalmanFitterTool.h.

◆ m_outlierFinder

ActsTrk::detail::FitterHelperFunctions::ATLASOutlierFinder ActsTrk::KalmanFitterTool::m_outlierFinder {0}
private

Definition at line 211 of file KalmanFitterTool.h.

◆ m_reverseFilteringLogic

ActsTrk::detail::FitterHelperFunctions::ReverseFilteringLogic ActsTrk::KalmanFitterTool::m_reverseFilteringLogic {0}
private

Definition at line 212 of file KalmanFitterTool.h.

◆ m_ROTcreator

ToolHandle<Trk::IRIO_OnTrackCreator> ActsTrk::KalmanFitterTool::m_ROTcreator {this, "RotCreatorTool", ""}
private

Definition at line 223 of file KalmanFitterTool.h.

◆ m_trackingGeometryTool

ToolHandle<IActsTrackingGeometryTool> ActsTrk::KalmanFitterTool::m_trackingGeometryTool {this, "TrackingGeometryTool", ""}
private

Definition at line 183 of file KalmanFitterTool.h.

◆ m_trkSummaryTool

ToolHandle<Trk::IExtendedTrackSummaryTool> ActsTrk::KalmanFitterTool::m_trkSummaryTool {this, "SummaryTool", "", "ToolHandle for track summary tool"}
private

Definition at line 185 of file KalmanFitterTool.h.


The documentation for this class was generated from the following files:
Trk::noHypothesis
@ noHypothesis
Definition: ParticleHypothesis.h:37
Trk::LocalParameters
Definition: LocalParameters.h:98
Trk::TrackInfo
Contains information about the 'fitter' of this track.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:32
Trk::TrackStateOnSurface::Perigee
@ Perigee
This represents a perigee, and so will contain a Perigee object only.
Definition: TrackStateOnSurface.h:117
GeV
#define GeV
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:17
ActsTrk::KalmanFitterTool::m_option_maxPropagationStep
Gaudi::Property< int > m_option_maxPropagationStep
Definition: KalmanFitterTool.h:195
yodamerge_tmp.dim
dim
Definition: yodamerge_tmp.py:239
get_generator_info.result
result
Definition: get_generator_info.py:21
ActsTrk::KalmanFitterTool::logger
const Acts::Logger & logger() const
Private access to the logger.
Definition: KalmanFitterTool.h:215
ActsTrk::detail::Navigator
Acts::Navigator Navigator
Definition: Tracking/Acts/ActsTrackReconstruction/src/detail/Definitions.h:31
Trk::numberOfSCTDeadSensors
@ numberOfSCTDeadSensors
number of TRT hits
Definition: Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:76
Trk::Track::info
const TrackInfo & info() const
Returns a const ref to info of a const tracks.
ActsTrk::KalmanFitterTool::m_fitter
std::unique_ptr< Fitter > m_fitter
Definition: KalmanFitterTool.h:204
skel.it
it
Definition: skel.GENtoEVGEN.py:396
xAOD::pion
@ pion
Definition: TrackingPrimitives.h:196
xAOD::SpacePoint_v1
Definition: SpacePoint_v1.h:29
ActsTrk::KalmanFitterTool::m_ROTcreator
ToolHandle< Trk::IRIO_OnTrackCreator > m_ROTcreator
Definition: KalmanFitterTool.h:223
ReadOfcFromCool.field
field
Definition: ReadOfcFromCool.py:48
ActsTrk::detail::FitterHelperFunctions::ReverseFilteringLogic::momentumMax
double momentumMax
Definition: FitterHelperFunctions.h:90
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
yodamerge_tmp.scale
scale
Definition: yodamerge_tmp.py:138
Trk::numberOfSCTHoles
@ numberOfSCTHoles
number of Holes in both sides of a SCT module
Definition: Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:73
Trk::numberOfTRTHoles
@ numberOfTRTHoles
number of TRT hits which pass the high threshold (only xenon counted) total number of TRT hits which ...
Definition: Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:83
Trk::TrackSummary::update
bool update(Trk::SummaryType type, int new_value)
Update unset summary information.
Trk::DefinedParameter
std::pair< double, ParamDefs > DefinedParameter
Definition: DefinedParameter.h:27
ActsTrk::KalmanFitterTool::m_directFitter
std::unique_ptr< DirectFitter > m_directFitter
Definition: KalmanFitterTool.h:207
ActsTrk::getSurfaceOfMeasurement
const Acts::Surface * getSurfaceOfMeasurement(const Acts::TrackingGeometry &tracking_geometry, const DetectorElementToActsGeometryIdMap &detector_element_to_geoid, const xAOD::UncalibratedMeasurement &measurement)
Definition: SurfaceOfMeasurementUtil.h:13
ActsTrk::KalmanFitterTool::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: KalmanFitterTool.cxx:228
ActsTrk::KalmanFitterTool::m_outlierFinder
ActsTrk::detail::FitterHelperFunctions::ATLASOutlierFinder m_outlierFinder
Definition: KalmanFitterTool.h:211
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
Trk::FitQualityOnSurface
Definition: FitQualityOnSurface.h:19
ActsTrk::MutableMultiTrajectory
Athena implementation of ACTS::MultiTrajectory (ReadWrite version) The data is stored in 4 external b...
Definition: MultiTrajectory.h:81
ActsTrk::KalmanFitterTool::m_extrapolationTool
ToolHandle< IActsExtrapolationTool > m_extrapolationTool
Definition: KalmanFitterTool.h:182
ActsTrk::KalmanFitterTool::m_trkSummaryTool
ToolHandle< Trk::IExtendedTrackSummaryTool > m_trkSummaryTool
Definition: KalmanFitterTool.h:185
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
xAOD::UncalibratedMeasurement_v1
Definition: UncalibratedMeasurement_v1.h:13
ActsTrk::makeATLASUncalibSourceLink
ATLASUncalibSourceLink makeATLASUncalibSourceLink(const xAOD::UncalibratedMeasurementContainer *container, std::size_t index, [[maybe_unused]] const EventContext &ctx)
Definition: ATLASSourceLink.h:30
Generate_dsid_ranseed.seed
seed
Definition: Generate_dsid_ranseed.py:10
ActsTrk::KalmanFitterTool::m_logger
std::unique_ptr< const Acts::Logger > m_logger
logging instance
Definition: KalmanFitterTool.h:220
ActsTrk::detail::OnTrackCalibrator::calibrate
void calibrate(const Acts::GeometryContext &geoctx, const Acts::CalibrationContext &cctx, const Acts::SourceLink &link, TrackStateProxy state) const
lumiFormat.i
int i
Definition: lumiFormat.py:85
beamspotman.n
n
Definition: beamspotman.py:731
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
Trk::numberOfPixelDeadSensors
@ numberOfPixelDeadSensors
number of pixel hits with broad errors (width/sqrt(12))
Definition: Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:65
ActsTrk::KalmanFitterTool::m_calibrator
std::unique_ptr< ActsTrk::detail::TrkMeasurementCalibrator > m_calibrator
Definition: KalmanFitterTool.h:200
master.flag
bool flag
Definition: master.py:29
ActsTrk::KalmanFitterTool::m_option_outlierChi2Cut
Gaudi::Property< double > m_option_outlierChi2Cut
Definition: KalmanFitterTool.h:191
ActsTrk::KalmanFitterTool::m_option_seedCovarianceScale
Gaudi::Property< double > m_option_seedCovarianceScale
Definition: KalmanFitterTool.h:197
plotIsoValidation.el
el
Definition: plotIsoValidation.py:197
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
ActsTrk::KalmanFitterTool::makeTrack
std::unique_ptr< Trk::Track > makeTrack(const EventContext &ctx, Acts::GeometryContext &tgContext, ActsTrk::MutableTrackContainer &tracks, Acts::Result< ActsTrk::MutableTrackContainer::TrackProxy, std::error_code > &fitResult, bool SourceLinkType=false) const
Definition: KalmanFitterTool.cxx:696
InDet::SCT_Cluster
Definition: InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/SCT_Cluster.h:34
ActsTrk::KalmanFitterTool::m_ATLASConverterTool
ToolHandle< ActsTrk::IActsToTrkConverterTool > m_ATLASConverterTool
Definition: KalmanFitterTool.h:184
ActsTrk::KalmanFitterTool::m_doReFitFromPRD
Gaudi::Property< bool > m_doReFitFromPRD
Definition: KalmanFitterTool.h:225
ActsTrk::KalmanFitterTool::m_kfExtensions
Acts::KalmanFitterExtensions< ActsTrk::MutableTrackStateBackend > m_kfExtensions
Definition: KalmanFitterTool.h:209
ActsTrk::KalmanFitterTool::m_broadROTcreator
ToolHandle< Trk::IRIO_OnTrackCreator > m_broadROTcreator
Definition: KalmanFitterTool.h:222
Trk::numberOfPixelHoles
@ numberOfPixelHoles
number of pixels which have a ganged ambiguity.
Definition: Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:59
Trk::PrepRawData
Definition: PrepRawData.h:62
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
xAOD::KalmanFitter
@ KalmanFitter
tracks produced by the Kalman Fitter
Definition: TrackingPrimitives.h:47
Trk::TrackStateOnSurface
represents the track state (measurement, material, fit parameters and quality) at a surface.
Definition: TrackStateOnSurface.h:71
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
ActsTrk::getUncalibratedMeasurement
const xAOD::UncalibratedMeasurement & getUncalibratedMeasurement(const ATLASUncalibSourceLink &source_link)
Definition: ATLASSourceLink.h:26
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::KalmanFitterTool::m_reverseFilteringLogic
ActsTrk::detail::FitterHelperFunctions::ReverseFilteringLogic m_reverseFilteringLogic
Definition: KalmanFitterTool.h:212
xAOD::ParticleHypothesis
ParticleHypothesis
Definition: TrackingPrimitives.h:192
InDet::PixelCluster
Definition: InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/PixelCluster.h:49
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
Trk::pixelCluster
@ pixelCluster
Definition: MeasurementType.h:22
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
Trk::Track::trackSummary
const Trk::TrackSummary * trackSummary() const
Returns a pointer to the const Trk::TrackSummary owned by this const track (could be nullptr)
ActsTrk::detail::FitterHelperFunctions::ATLASOutlierFinder::StateChiSquaredPerNumberDoFCut
double StateChiSquaredPerNumberDoFCut
Definition: FitterHelperFunctions.h:50
if
if(febId1==febId2)
Definition: LArRodBlockPhysicsV0.cxx:567
Trk::Track::setTrackSummary
void setTrackSummary(std::unique_ptr< Trk::TrackSummary > input)
Set the track summary.
ActsTrk::KalmanFitterTool::m_trackingGeometryTool
ToolHandle< IActsTrackingGeometryTool > m_trackingGeometryTool
Definition: KalmanFitterTool.h:183
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
ActsTrk::ATLASUncalibSourceLinkSurfaceAccessor
Definition: ATLASSourceLinkSurfaceAccessor.h:26
ActsTrk::KalmanFitterTool::m_option_ReverseFilteringPt
Gaudi::Property< double > m_option_ReverseFilteringPt
Definition: KalmanFitterTool.h:193
Trk::loc1
@ loc1
Definition: ParamDefs.h:34
ActsTrk::MutableTrackContainer
Definition: TrackContainer.h:122
ActsTrk::detail::OnTrackCalibrator::NoCalibration
static OnTrackCalibrator NoCalibration(const Acts::TrackingGeometry &trackingGeometry, const ActsTrk::DetectorElementToActsGeometryIdMap &detectorElementToGeoId)