Jpp  19.1.0
the software that should make you happy
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
JACOUSTICS::JKatoomba< JAbstractMinimiser > Struct Reference

Template specialisation of fit function of acoustic model based on JAbstractMinimiser minimiser. More...

#include <JKatoomba_t.hh>

Inheritance diagram for JACOUSTICS::JKatoomba< JAbstractMinimiser >:
JFIT::JAbstractMinimiser< JModel_t > JACOUSTICS::JKatoomba< JMinimiser_t > JEEP::JMessage< T >

Public Types

typedef double result_type
 

Public Member Functions

 JKatoomba (const JGeometry &geometry, const JSoundVelocity &velocity, const int option)
 Constructor The option corresponds to the use of fit parameters in the model of the detector geometry. More...
 
result_type operator() (const JModel &model, const JHit &hit) const
 Fit function. More...
 
template<class T >
result_type operator() (T __begin, T __end)
 Fit. More...
 
template<class T >
result_type operator() (const JModel &model, T __begin, T __end)
 Fit. More...
 
template<class JFunction_t , class T >
result_type operator() (const JFunction_t &fit, T __begin, T __end)
 Get chi2. More...
 

Public Attributes

JModel_t value
 model value More...
 

Static Public Attributes

static int debug = 0
 debug level (default is off). More...
 

Detailed Description

Template specialisation of fit function of acoustic model based on JAbstractMinimiser minimiser.


This class can be used to evaluate the chi2.

Definition at line 269 of file JKatoomba_t.hh.

Member Typedef Documentation

◆ result_type

Definition at line 273 of file JKatoomba_t.hh.

Constructor & Destructor Documentation

◆ JKatoomba()

JACOUSTICS::JKatoomba< JAbstractMinimiser >::JKatoomba ( const JGeometry geometry,
const JSoundVelocity velocity,
const int  option 
)
inline

Constructor The option corresponds to the use of fit parameters in the model of the detector geometry.


A negative implies that all strings in the detector use common fit parameters.

Parameters
geometrydetector geometry
velocitysound velocity
optionoption

Definition at line 285 of file JKatoomba_t.hh.

287  :
288  JKatoomba<>(geometry, velocity, option)
289  {};
Template definition of fit function of acoustic model.
Definition: JKatoomba_t.hh:77

Member Function Documentation

◆ operator()() [1/4]

result_type JACOUSTICS::JKatoomba< JAbstractMinimiser >::operator() ( const JModel model,
const JHit hit 
) const
inline

Fit function.


This method is used to determine the chi2 of given hit with respect to actual model.

Parameters
modelmodel
hithit
Returns
chi2

Definition at line 300 of file JKatoomba_t.hh.

301  {
302  const double toa_s = this->getToA(model, hit);
303  const double u = (toa_s - hit.getValue()) / hit.getSigma();
304 
305  return estimator->getRho(u) * hit.getWeight();
306  }
double u[N+1]
Definition: JPolint.hh:865
double getSigma() const
Get resolution of time-of-arrival.
double getValue() const
Get expectation value of time-of-arrival.
double getWeight() const
Get weight.

◆ operator()() [2/4]

template<class T >
result_type JACOUSTICS::JKatoomba< JAbstractMinimiser >::operator() ( __begin,
__end 
)
inline

Fit.

Parameters
__beginbegin of hits
__endend of hits
Returns
chi2

Definition at line 317 of file JKatoomba_t.hh.

318  {
319  this->value.setOption(this->option);
320 
321  return JAbstractMinimiser<JModel>::operator()(*this, __begin, __end);
322  }
JModel_t value
model value
Definition: JRegressor.hh:59
result_type operator()(const JFunction_t &fit, T __begin, T __end)
Get chi2.
Definition: JRegressor.hh:48

◆ operator()() [3/4]

template<class T >
result_type JACOUSTICS::JKatoomba< JAbstractMinimiser >::operator() ( const JModel model,
__begin,
__end 
)
inline

Fit.

Parameters
modelmodel
__beginbegin of hits
__endend of hits
Returns
chi2

Definition at line 334 of file JKatoomba_t.hh.

335  {
336  this->value = model;
337 
338  return (*this)(__begin, __end);
339  }

◆ operator()() [4/4]

template<class JModel_t >
template<class JFunction_t , class T >
result_type JFIT::JAbstractMinimiser< JModel_t >::operator() ( const JFunction_t &  fit,
__begin,
__end 
)
inlineinherited

Get chi2.

Parameters
fitfit function
__beginbegin of data
__endend of data
Returns
chi2

Definition at line 48 of file JRegressor.hh.

49  {
50  double chi2 = 0.0;
51 
52  for (T i = __begin; i != __end; ++i) {
53  chi2 += fit(value, *i);
54  }
55 
56  return chi2;
57  }

Member Data Documentation

◆ value

template<class JModel_t >
JModel_t JFIT::JAbstractMinimiser< JModel_t >::value
inherited

model value

Definition at line 59 of file JRegressor.hh.

◆ debug

template<class T >
int JEEP::JMessage< T >::debug = 0
staticinherited

debug level (default is off).

Definition at line 45 of file JMessage.hh.


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