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

Normal M-estimator with background. More...

#include <JMEstimator.hh>

Inheritance diagram for JFIT::JMEstimatorNormalWithBackground:
JFIT::JMEstimator

Public Member Functions

 JMEstimatorNormalWithBackground (const double p)
 Constructor.
 
virtual double getRho (const double z) const override
 Get maximum likelihood estimate.
 
virtual double getPsi (const double z) const override
 Get derivative of maximum likelihood estimate.
 

Public Attributes

double p
 

Detailed Description

Normal M-estimator with background.

Definition at line 155 of file JMEstimator.hh.

Constructor & Destructor Documentation

◆ JMEstimatorNormalWithBackground()

JFIT::JMEstimatorNormalWithBackground::JMEstimatorNormalWithBackground ( const double p)
inline

Constructor.

Parameters
pbackground probability

Definition at line 163 of file JMEstimator.hh.

163 :
164 p(p)
165 {}

Member Function Documentation

◆ getRho()

virtual double JFIT::JMEstimatorNormalWithBackground::getRho ( const double z) const
inlineoverridevirtual

Get maximum likelihood estimate.

Parameters
zdeviation
Returns
likelihood

Implements JFIT::JMEstimator.

Definition at line 167 of file JMEstimator.hh.

168 {
169 const double w = exp(-0.5*z*z);
170
171 return -log(w + p);
172 }

◆ getPsi()

virtual double JFIT::JMEstimatorNormalWithBackground::getPsi ( const double z) const
inlineoverridevirtual

Get derivative of maximum likelihood estimate.

Parameters
zdeviation
Returns
derivative

Implements JFIT::JMEstimator.

Definition at line 174 of file JMEstimator.hh.

175 {
176 const double w = exp(-0.5*z*z);
177
178 return z * w / (w + p);
179 }

Member Data Documentation

◆ p

double JFIT::JMEstimatorNormalWithBackground::p

Definition at line 181 of file JMEstimator.hh.


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