Regressor function object for JPoint4D fit using JSimplex minimiser.  
 More...
#include <JPoint4DRegressor.hh>
template<>
struct JFIT::JRegressor< JPoint4D, JSimplex >
Regressor function object for JPoint4D fit using JSimplex minimiser. 
Definition at line 28 of file JPoint4DRegressor.hh.
 
Definition at line 50 of file JPoint4DRegressor.hh.
   54       const double dt = hit.getT() - vx.getT(hit.getPosition());
 
   56       const double u  = dt / 
sigma;
 
JLANG::JSharedPointer< JMEstimator > estimator
M-Estimator function. 
 
double sigma
Time resolution [ns]. 
 
 
 
 
Global fit. 
- Parameters
 - 
  
    | value | start value  | 
    | __begin | begin of data set  | 
    | __end | end of data set  | 
  
   
- Returns
 - chi2 
 
Definition at line 92 of file JRegressor.hh.
JSimplex< JPoint4D > minimiser_type
 
JRegressor< JPoint4D, JSimplex > regressor_type
 
 
 
 
Multi-dimensional fit. 
The given fit function should return the equivalent of chi2 for the current value of the given model and a given data point.
- Parameters
 - 
  
    | fit | fit function  | 
    | __begin | begin of data  | 
    | __end | end of data  | 
  
   
- Returns
 - chi2 
 
Definition at line 71 of file JSimplex.hh.
   76       double chi2_old = 
evaluate(fit, __begin, __end);
 
   78       const int N = 
step.size();
 
   92           DEBUG(
"old: " << 
FIXED(12,5) << chi2_old << endl);
 
   96           for (
int i = 0; i != 
N; ++i) {
 
  100             chi2[i] = (*this)(fit, __begin, __end, 
step[i]);
 
  108           const double chi2_new = (*this)(fit, __begin, __end, 
wall);
 
  110           DEBUG(
"new: " << 
FIXED(12,5) << chi2_new << endl);
 
  113           if (fabs(chi2_old - chi2_new) < 
EPSILON*fabs(chi2_old)) {
 
  123           const double fe = 
evaluate(fit, __begin, __end);
 
  128           for (
int i = 
N-1; i != 0; --i) {
 
  129             chi2[i] = chi2[i-1] - chi2[i];
 
  132           chi2[0] = chi2_old - chi2[0];
 
  137           for (
int i = 0; i != 
N; ++i) {
 
  143           const double fn = chi2_new;
 
  144           const double f0 = chi2_old;
 
  145           const double ff = f0 - fn - df;
 
  149           if (fe < f0 && 2.0*(f0 - 2.0*fn + fe)*ff*ff < (f0-fe)*(f0-fe)*df) {
 
  151             for (
int i = 0; i != 
N - 1; ++i) {
 
then JShowerPostfit f $INPUT_FILE o $OUTPUT_FILE N
 
Auxiliary data structure for floating point format specification. 
 
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
 
double evaluate(const JFunction_t &fit, T __begin, T __end) const
Evaluate chi2 for given data set. 
 
static int MAXIMUM_ITERATIONS
maximal number of iterations 
 
static double EPSILON
maximal distance to minimum 
 
#define DEBUG(A)
Message macros. 
 
std::vector< JPoint4D > step
 
 
 
 
1D fit. 
The given fit function should return the equivalent of chi2 for the current value of the given model and a given data point.
- Parameters
 - 
  
    | fit | fit function  | 
    | __begin | begin of data  | 
    | __end | end of data  | 
    | step | step direction  | 
  
   
Definition at line 178 of file JSimplex.hh.
  186       double chi2_old = 
evaluate(fit, __begin, __end);
 
  194         const double chi2_new = 
evaluate(fit, __begin, __end);
 
  196         DEBUG(
"step: " << setw(3) << i << 
' ' << 
FIXED(12,5) << chi2_old << 
' ' << 
FIXED(12,5) << chi2_new << 
' ' << 
FIXED(5,2) << lambda << endl);
 
  198         if (fabs(chi2_old - chi2_new) < 
EPSILON*fabs(chi2_old)) {
 
  200           if (chi2_new > chi2_old) {
 
  214         if (chi2_new < chi2_old) {
 
  230         lambda = factor * lambda;
 
Auxiliary data structure for floating point format specification. 
 
double evaluate(const JFunction_t &fit, T __begin, T __end) const
Evaluate chi2 for given data set. 
 
static int MAXIMUM_ITERATIONS
maximal number of iterations 
 
static double EPSILON
maximal distance to minimum 
 
#define DEBUG(A)
Message macros. 
 
std::vector< JPoint4D > step
 
 
 
 
maximal number of iterations 
maximal number of iterations. 
Definition at line 237 of file JSimplex.hh.
 
 
maximal distance to minimum 
maximal distance to minimum. 
Definition at line 238 of file JSimplex.hh.
 
 
debug level (default is off). 
Definition at line 45 of file JMessage.hh.
 
 
The documentation for this struct was generated from the following file: