Jpp  18.0.1-rc.1
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
JACOUSTICS::JKatoomba< JAbstractMinimiser > Struct Template 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<> JEEP::JMessage< T >

Public Types

typedef double result_type
 

Public Member Functions

 JKatoomba (const JGeometry &geometry, const JSoundVelocity &velocity, const int option)
 Constructor. 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<>
struct JACOUSTICS::JKatoomba< JAbstractMinimiser >

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


This class can be used to evaluate the chi2.

Definition at line 259 of file JKatoomba_t.hh.

Member Typedef Documentation

Definition at line 263 of file JKatoomba_t.hh.

Constructor & Destructor Documentation

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

Constructor.

Parameters
geometrydetector geometry
velocitysound velocity
optionoption

Definition at line 273 of file JKatoomba_t.hh.

275  :
276  JKatoomba<>(geometry, velocity, option)
277  {};

Member Function Documentation

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 288 of file JKatoomba_t.hh.

289  {
290  const double toa_s = this->getToA(model, hit);
291  const double u = (toa_s - hit.getValue()) / hit.getSigma();
292 
293  return estimator->getRho(u) * hit.getWeight();
294  }
double getWeight() const
Get weight.
double getValue() const
Get expectation value of time-of-arrival.
double u[N+1]
Definition: JPolint.hh:776
double getSigma() const
Get resolution of time-of-arrival.
template<class T >
result_type JACOUSTICS::JKatoomba< JAbstractMinimiser >::operator() ( T  __begin,
T  __end 
)
inline

Fit.

Parameters
__beginbegin of hits
__endend of hits
Returns
chi2

Definition at line 305 of file JKatoomba_t.hh.

306  {
307  this->value.setOption(this->option);
308 
309  return JAbstractMinimiser<JModel>::operator()(*this, __begin, __end);
310  }
result_type operator()(const JFunction_t &fit, T __begin, T __end)
Get chi2.
Definition: JRegressor.hh:46
JModel_t value
model value
Definition: JRegressor.hh:57
template<class T >
result_type JACOUSTICS::JKatoomba< JAbstractMinimiser >::operator() ( const JModel model,
T  __begin,
T  __end 
)
inline

Fit.

Parameters
modelmodel
__beginbegin of hits
__endend of hits
Returns
chi2

Definition at line 322 of file JKatoomba_t.hh.

323  {
324  this->value = model;
325 
326  return (*this)(__begin, __end);
327  }
JModel_t value
model value
Definition: JRegressor.hh:57
template<class JModel_t>
template<class JFunction_t , class T >
result_type JFIT::JAbstractMinimiser< JModel_t >::operator() ( const JFunction_t &  fit,
T  __begin,
T  __end 
)
inlineinherited

Get chi2.

Parameters
fitfit function
__beginbegin of data
__endend of data
Returns
chi2

Definition at line 46 of file JRegressor.hh.

47  {
48  double chi2 = 0.0;
49 
50  for (T i = __begin; i != __end; ++i) {
51  chi2 += fit(value, *i);
52  }
53 
54  return chi2;
55  }
do set_variable OUTPUT_DIRECTORY $WORKDIR T
JModel_t value
model value
Definition: JRegressor.hh:57
then if[[!-f $DETECTOR]] then JDetector sh $DETECTOR fi cat $WORKDIR trigger_parameters txt<< EOFtrigger3DMuon.enabled=1;trigger3DMuon.numberOfHits=5;trigger3DMuon.gridAngle_deg=1;ctMin=0.0;TMaxLocal_ns=15.0;EOF set_variable TRIGGEREFFICIENCY_TRIGGERED_EVENTS_ONLY INPUT_FILES=() for((i=1;$i<=$NUMBER_OF_RUNS;++i));do JSirene.sh $DETECTOR $JPP_DATA/genhen.km3net_wpd_V2_0.evt.gz $WORKDIR/sirene_ ${i}.root JTriggerEfficiency.sh $DETECTOR $DETECTOR $WORKDIR/sirene_ ${i}.root $WORKDIR/trigger_efficiency_ ${i}.root $WORKDIR/trigger_parameters.txt $JPP_DATA/PMT_parameters.txt INPUT_FILES+=($WORKDIR/trigger_efficiency_ ${i}.root) done for ANGLE_DEG in $ANGLES_DEG[*];do set_variable SIGMA_NS 3.0 set_variable OUTLIERS 3 set_variable OUTPUT_FILE $WORKDIR/matrix\[${ANGLE_DEG}\deg\].root $JPP_DIR/examples/JReconstruction-f"$INPUT_FILES[*]"-o $OUTPUT_FILE-S ${SIGMA_NS}-A ${ANGLE_DEG}-O ${OUTLIERS}-d ${DEBUG}--!fiif[[$OPTION=="plot"]];then if((0));then for H1 in h0 h1;do JPlot1D-f"$WORKDIR/matrix["${^ANGLES_DEG}" deg].root:${H1}"-y"1 2e3"-Y-L TR-T""-\^"number of events [a.u.]"-> o chi2
Definition: JMatrixNZ.sh:106

Member Data Documentation

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

model value

Definition at line 57 of file JRegressor.hh.

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: