Jpp test-rotations-new
the software that should make you happy
Loading...
Searching...
No Matches
JCOMPASS::JChi2 Struct Reference

Auxiliary data structure for chi2 evaluation. More...

#include <JModel.hh>

Public Member Functions

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

Public Attributes

JLANG::JSharedPointer< JMEstimatorestimator
 M-Estimator function.
 

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 {}
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 getAngle(const JQuaternion3D &first, const JQuaternion3D &second)
Get space angle between quanternions.

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: