ATLAS Offline Software
Functions
Trk::MultiComponentStateModeCalculator Namespace Reference

Functions

std::array< double, 10 > calculateMode (const MultiComponentState &)
 Method to calculate mode with MultiComponentState state as input. More...
 

Function Documentation

◆ calculateMode()

std::array< double, 10 > Trk::MultiComponentStateModeCalculator::calculateMode ( const MultiComponentState multiComponentState)

Method to calculate mode with MultiComponentState state as input.

Definition at line 386 of file MultiComponentStateModeCalculator.cxx.

388 {
389  // Check to see if all components have covariance
390  if (!MultiComponentStateHelpers::allHaveCovariance(multiComponentState)) {
391  return {};
392  }
393  std::array<VecOfComponents, 5> mixture;
394 
395  fillMixture(multiComponentState, mixture);
396  return evaluateMode(mixture);
397 }
Trk::MultiComponentStateHelpers::allHaveCovariance
bool allHaveCovariance(const MultiComponentState &in)
Check to see if all components have covariance Matrix.
Definition: ComponentParameters.cxx:66