Jpp 21.0.0-rc.1
the software that should make you happy
Loading...
Searching...
No Matches
JROOT::m_value Struct Reference

Data point for value with error. More...

#include <JRootfit.hh>

Public Types

typedef std::shared_ptr< JMEstimatorestimator_type
 

Public Member Functions

 m_value ()
 Default constructor.
 
 m_value (const double value, const double error)
 Constructor.
 
double getRho (const double z) const
 Get chi2.
 
double getPsi (const double z) const
 Get derivative of chi2.
 

Static Public Member Functions

static const estimator_typegetMEstimator ()
 Get M-estimator.
 
static const void setMEstimator (int type)
 Set M-estimator.
 

Public Attributes

double value
 value
 
double error
 error
 

Static Private Member Functions

static estimator_typeget_mestimator ()
 Get M-estimator.
 

Detailed Description

Data point for value with error.

Definition at line 189 of file JRootfit.hh.

Member Typedef Documentation

◆ estimator_type

Definition at line 191 of file JRootfit.hh.

Constructor & Destructor Documentation

◆ m_value() [1/2]

JROOT::m_value::m_value ( )
inline

Default constructor.

Definition at line 196 of file JRootfit.hh.

196 :
197 value(0.0),
198 error(0.0)
199 {}
double value
value
Definition JRootfit.hh:243
double error
error
Definition JRootfit.hh:244

◆ m_value() [2/2]

JROOT::m_value::m_value ( const double value,
const double error )
inline

Constructor.

Parameters
valuevalue
errorerror

Definition at line 208 of file JRootfit.hh.

209 :
210 value(value),
211 error (error)
212 {}

Member Function Documentation

◆ getRho()

double JROOT::m_value::getRho ( const double z) const
inline

Get chi2.

Parameters
zexpectation value
Returns
chi2

Definition at line 221 of file JRootfit.hh.

222 {
223 const double u = (z - value) / error;
224
225 return getMEstimator()->getRho(u) / getMEstimator()->getRho(1.0);
226 }
static const estimator_type & getMEstimator()
Get M-estimator.
Definition JRootfit.hh:252

◆ getPsi()

double JROOT::m_value::getPsi ( const double z) const
inline

Get derivative of chi2.

Parameters
zexpectation value
Returns
derivative of chi2

Definition at line 235 of file JRootfit.hh.

236 {
237 const double u = (z - value) / error;
238
239 return getMEstimator()->getPsi(u) * getMEstimator()->getRho(1.0);
240 }

◆ getMEstimator()

static const estimator_type & JROOT::m_value::getMEstimator ( )
inlinestatic

Get M-estimator.

Returns
M-estimator

Definition at line 252 of file JRootfit.hh.

253 {
254 return get_mestimator();
255 }
static estimator_type & get_mestimator()
Get M-estimator.
Definition JRootfit.hh:274

◆ setMEstimator()

static const void JROOT::m_value::setMEstimator ( int type)
inlinestatic

Set M-estimator.

Parameters
typeM-estimator type

Definition at line 263 of file JRootfit.hh.

264 {
265 get_mestimator().reset(JFIT::getMEstimator(type));
266 }
JMEstimator * getMEstimator(const int type)
Get M-Estimator.

◆ get_mestimator()

static estimator_type & JROOT::m_value::get_mestimator ( )
inlinestaticprivate

Get M-estimator.

Returns
M-estimator

Definition at line 274 of file JRootfit.hh.

275 {
276 static estimator_type estimator(new JFIT::JMEstimatorNormal());
277
278 return estimator;
279 }
Normal M-estimator.
std::shared_ptr< JMEstimator > estimator_type
Definition JRootfit.hh:191

Member Data Documentation

◆ value

double JROOT::m_value::value

value

Definition at line 243 of file JRootfit.hh.

◆ error

double JROOT::m_value::error

error

Definition at line 244 of file JRootfit.hh.


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