Jpp  19.1.0
the software that should make you happy
Public Member Functions | Public Attributes | List of all members
JCOMPASS::JChi2 Struct Reference

Auxiliary data structure for chi2 evaluation. More...

#include <JModel.hh>

Public Member Functions

 JChi2 (const int type)
 Constructor. More...
 
double operator() (const JModel &model, const JHit &hit) const
 Fit function. More...
 

Public Attributes

JLANG::JSharedPointer< JMEstimatorestimator
 M-Estimator function. More...
 

Detailed Description

Auxiliary data structure for chi2 evaluation.

Definition at line 189 of file JCompass/JModel.hh.

Constructor & Destructor Documentation

◆ JChi2()

JCOMPASS::JChi2::JChi2 ( const int  type)
inline

Constructor.

Parameters
typeM-Estimator type

Definition at line 195 of file JCompass/JModel.hh.

195  :
196  estimator(getMEstimator(type))
197  {}
JMEstimator * getMEstimator(const int type)
Get M-Estimator.
Definition: JMEstimator.hh:203
JLANG::JSharedPointer< JMEstimator > estimator
M-Estimator function.

Member Function Documentation

◆ operator()()

double JCOMPASS::JChi2::operator() ( const JModel model,
const JHit hit 
) const
inline

Fit function.

Parameters
modelmodel
hithit
Returns
chi2

Definition at line 207 of file JCompass/JModel.hh.

208  {
209  return estimator->getRho(getAngle(model(hit.getZ()), hit.getQuaternion()) / hit.getSigma());
210  }
double getZ() const
Get z position.
Definition: JVector3D.hh:115
double getAngle(const JQuaternion3D &first, const JQuaternion3D &second)
Get space angle between quanternions.
double getSigma() const
Get resolution of time-of-arrival.

Member Data Documentation

◆ estimator

JLANG::JSharedPointer<JMEstimator> JCOMPASS::JChi2::estimator

M-Estimator function.

Definition at line 212 of file JCompass/JModel.hh.


The documentation for this struct was generated from the following file: