ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
ActsTrk::detail::FitterHelperFunctions::ATLASOutlierFinder Struct Reference

Outlier finder using a Chi2 cut. More...

#include <FitterHelperFunctions.h>

Collaboration diagram for ActsTrk::detail::FitterHelperFunctions::ATLASOutlierFinder:

Public Member Functions

template<typename trajectory_t >
bool operator() (typename Acts::MultiTrajectory< trajectory_t >::ConstTrackStateProxy state) const
 Classify a measurement as a valid one or an outlier. More...
 

Public Attributes

double StateChiSquaredPerNumberDoFCut = std::numeric_limits<double>::max()
 

Detailed Description

Outlier finder using a Chi2 cut.

Definition at line 49 of file FitterHelperFunctions.h.

Member Function Documentation

◆ operator()()

template<typename trajectory_t >
bool ActsTrk::detail::FitterHelperFunctions::ATLASOutlierFinder::operator() ( typename Acts::MultiTrajectory< trajectory_t >::ConstTrackStateProxy  state) const
inline

Classify a measurement as a valid one or an outlier.

Template Parameters
track_state_tType of the track state
Parameters
stateThe track state to classify
Return values
Falseif the measurement is not an outlier
Trueif the measurement is an outlier

Definition at line 58 of file FitterHelperFunctions.h.

58  {
59  // can't determine an outlier w/o a measurement or predicted parameters
60  if (not state.hasCalibrated() or not state.hasPredicted()) {
61  return false;
62  }
63  return Acts::visit_measurement(
64  state.calibratedSize(),
65  [&] (auto N) -> bool {
66  constexpr size_t kMeasurementSize = decltype(N)::value;
67 
68  auto subspaceHelper = state.template projectorSubspaceHelper<kMeasurementSize>();
69 
70  typename Acts::TrackStateTraits<kMeasurementSize, true>::Calibrated calibrated{
71  state.template calibrated<Acts::MultiTrajectoryTraits::MeasurementSizeMax>().data()};
72 
73  typename Acts::TrackStateTraits<kMeasurementSize, true>::CalibratedCovariance
74  calibratedCovariance{state.template calibratedCovariance<Acts::MultiTrajectoryTraits::MeasurementSizeMax>().data()};
75 
76  // Take the projector (measurement mapping function)
77  // TODO use the subspace helper directly
78  const auto H = subspaceHelper.projector();
79 
80  const auto residual = calibrated - H * state.predicted();
81  double chi2 = (residual.transpose() * (calibratedCovariance + H * state.predictedCovariance() * H.transpose()).inverse() * residual).value();
82  return (chi2 > StateChiSquaredPerNumberDoFCut * kMeasurementSize);
83  });
84  }

Member Data Documentation

◆ StateChiSquaredPerNumberDoFCut

double ActsTrk::detail::FitterHelperFunctions::ATLASOutlierFinder::StateChiSquaredPerNumberDoFCut = std::numeric_limits<double>::max()

Definition at line 50 of file FitterHelperFunctions.h.


The documentation for this struct was generated from the following file:
ClusterSeg::residual
@ residual
Definition: ClusterNtuple.h:20
JetTiledMap::N
@ N
Definition: TiledEtaPhiMap.h:44
H
#define H(x, y, z)
Definition: MD5.cxx:114
chi2
double chi2(TH1 *h0, TH1 *h1)
Definition: comparitor.cxx:523
ActsTrk::detail::FitterHelperFunctions::ATLASOutlierFinder::StateChiSquaredPerNumberDoFCut
double StateChiSquaredPerNumberDoFCut
Definition: FitterHelperFunctions.h:50