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

Outlier finder using a Chi2 cut. More...

#include <FitterHelperFunctions.h>

Collaboration diagram for ActsTrk::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 39 of file FitterHelperFunctions.h.

Member Function Documentation

◆ operator()()

template<typename trajectory_t >
bool ActsTrk::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 48 of file FitterHelperFunctions.h.

48  {
49  // can't determine an outlier w/o a measurement or predicted parameters
50  if (not state.hasCalibrated() or not state.hasPredicted()) {
51  return false;
52  }
53  return Acts::visit_measurement(
54  state.calibratedSize(),
55  [&] (auto N) -> bool {
56  constexpr size_t kMeasurementSize = decltype(N)::value;
57 
58  typename Acts::TrackStateTraits<kMeasurementSize, true>::Measurement calibrated{
59  state.template calibrated<Acts::MultiTrajectoryTraits::MeasurementSizeMax>().data()};
60 
61  typename Acts::TrackStateTraits<kMeasurementSize, true>::MeasurementCovariance
62  calibratedCovariance{state.template calibratedCovariance<Acts::MultiTrajectoryTraits::MeasurementSizeMax>().data()};
63 
64  // Take the projector (measurement mapping function)
65  const auto H =
66  state.projector()
67  .template topLeftCorner<kMeasurementSize, Acts::BoundIndices::eBoundSize>()
68  .eval();
69 
70  const auto residual = calibrated - H * state.predicted();
71  double chi2 = (residual.transpose() * (calibratedCovariance + H * state.predictedCovariance() * H.transpose()).inverse() * residual).value();
72  return (chi2 > StateChiSquaredPerNumberDoFCut * kMeasurementSize);
73  });
74  }

Member Data Documentation

◆ StateChiSquaredPerNumberDoFCut

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

Definition at line 40 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
ActsTrk::FitterHelperFunctions::ATLASOutlierFinder::StateChiSquaredPerNumberDoFCut
double StateChiSquaredPerNumberDoFCut
Definition: FitterHelperFunctions.h:40
H
#define H(x, y, z)
Definition: MD5.cxx:114
chi2
double chi2(TH1 *h0, TH1 *h1)
Definition: comparitor.cxx:522