Regressor function object for JLine3Z fit using JSimplex minimiser.  
 More...
#include <JLine3ZRegressor.hh>
template<>
struct JFIT::JRegressor< JLine3Z, JSimplex >
Regressor function object for JLine3Z fit using JSimplex minimiser. 
Definition at line 52 of file JLine3ZRegressor.hh.
 
Constructor. 
- Parameters
 - 
  
    | sigma | time resolution of hit [ns]  | 
  
   
Definition at line 62 of file JLine3ZRegressor.hh.
JLANG::JSharedPointer< JMEstimator > estimator
M-Estimator function. 
 
double sigma
Time resolution [ns]. 
 
 
 
 
Fit function. 
This method is used to determine the chi2 of given hit with respect to trajectory of muon.
The template argument JHit_t refers to a data structure which should have the following member methods:
- double getX(); // [m]
 
- double getY(); // [m]
 
- double getZ(); // [m]
 
- double getT(); // [ns]
 
- Parameters
 - 
  
  
 
- Returns
 - chi2 
 
Definition at line 84 of file JLine3ZRegressor.hh.
   93       const double R  = sqrt(
D.getLengthSquared() - z*z);
 
   97       const double u  = (t1 - hit.getT()) / 
sigma;
 
do echo Generating $dir eval D
 
double getKappaC()
Get average R-dependence of arrival time of Cherenkov light (a.k.a. 
 
double getT(const JVector3D &pos) const 
Get arrival time of Cherenkov light at given position. 
 
JVersor3D getDirection(const JVector3D &pos) const 
Get photon direction of Cherenkov light on PMT. 
 
JLANG::JSharedPointer< JMEstimator > estimator
M-Estimator function. 
 
const JPosition3D & getPosition() const 
Get position. 
 
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR set_variable NORTH set_variable EAST set_variable SOUTH set_variable WEST set_variable WORKDIR tmp set_variable R set_variable CT set_variable YMAX set_variable YMIN if do_usage *then usage $script[distance] fi case set_variable R
 
double sigma
Time resolution [ns]. 
 
const double getInverseSpeedOfLight()
Get inverse speed of light. 
 
Data structure for position in three dimensions. 
 
 
 
 
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< JLine3Z > minimiser_type
 
JRegressor< JLine3Z, 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) {
 
Auxiliary data structure for floating point format specification. 
 
then usage $script< input_file >< detector_file > fi set_variable OUTPUT_DIR set_variable SELECTOR JDAQTimesliceL1 set_variable DEBUG case set_variable DEBUG
 
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 
 
then usage $script[input file[working directory[option]]] nWhere option can be N
 
std::vector< JLine3Z > 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. 
 
then usage $script< input_file >< detector_file > fi set_variable OUTPUT_DIR set_variable SELECTOR JDAQTimesliceL1 set_variable DEBUG case set_variable DEBUG
 
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 
 
std::vector< JLine3Z > 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: