Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JKatoomba.hh
Go to the documentation of this file.
1 #ifndef __JACOUSTICS__JKATOOMBA__
2 #define __JACOUSTICS__JKATOOMBA__
3 
4 #include <vector>
5 
6 #include "JFit/JEstimator.hh"
7 #include "JFit/JRegressor.hh"
8 #include "JFit/JSimplex.hh"
9 #include "JFit/JMEstimator.hh"
10 #include "JMath/JMatrixNS.hh"
11 #include "JLang/JSharedPointer.hh"
12 
13 #include "JMath/JMatrixNS.hh"
14 #include "Jeep/JMessage.hh"
15 
17 #include "JAcoustics/JEKey.hh"
18 #include "JAcoustics/JGeometry.hh"
19 #include "JAcoustics/JModel.hh"
20 #include "JAcoustics/JHit.hh"
21 
22 
23 /**
24  * \file
25  *
26  * Fit functions of acoustic model.
27  * \author mdejong
28  */
29 namespace JACOUSTICS {}
30 namespace JPP { using namespace JACOUSTICS; }
31 
32 namespace JACOUSTICS {
33 
34  using JMATH::JMath;
35  using JFIT::JEstimator;
37  using JFIT::JSimplex;
38  using JFIT::JMEstimator;
39 
40 
41  /**
42  * Enumeration for fit algorithms.
43  */
44  enum JFit_t {
45  linear_t = 0,
48  };
49 
50 
51  /**
52  * Auxiliary base class for fit function of acoustic model.
53  */
54  struct JKatoomba_t :
55  public JGeometry
56  {
57  /**
58  * Constructor
59  *
60  * \param detector detector
61  * \param velocity sound velocity
62  */
64  const JSoundVelocity& velocity) :
65  detector(detector),
66  velocity(velocity)
67  {};
68 
69 
70  /**
71  * Get estimated time-of-arrival for given hit.
72  *
73  * \param model model
74  * \param hit hit
75  * \return time-of-arrival
76  */
77  template<class JPDF_t>
78  double getToA(const JModel& model, const JHit<JPDF_t>& hit) const
79  {
80  const JGEOMETRY::JString& string = detector[hit.getString()];
81  const JMODEL ::JString& parameters = model.string[hit.getString()];
82  const JPosition3D position = string.getPosition(parameters, hit.getFloor());
83 
84  const double D = hit.getDistance(position);
85  const double Vi = velocity.getInverseVelocity(D, hit.getZ(), position.getZ());
86 
87  return model.emitter[hit.getEKey()].t1 + D * Vi;
88  }
89 
90 
93 
94  JLANG::JSharedPointer<JMEstimator> estimator; //!< M-Estimator function
95 
96  protected:
97  /**
98  * H-equation as per hit.
99  */
100  struct H_t :
101  public JMODEL::JEmitter,
102  public JMODEL::JString,
103  public JMath<H_t>
104  {
105  /**
106  * Default constructor.
107  */
108  H_t() :
109  JMODEL::JEmitter(),
110  JMODEL::JString ()
111  {}
112 
113 
114  /**
115  * Constructor.
116  *
117  * \param emitter emitter
118  * \param string string
119  */
120  H_t(const JMODEL::JEmitter& emitter,
121  const JMODEL::JString& string) :
122  JMODEL::JEmitter(emitter),
123  JMODEL::JString (string)
124  {}
125 
126 
127  /**
128  * Scale H-equation.
129  *
130  * \param factor multiplication factor
131  * \return this H-equation
132  */
133  H_t& mul(const double factor)
134  {
135  static_cast<JMODEL::JEmitter&>(*this).mul(factor);
136  static_cast<JMODEL::JString&> (*this).mul(factor);
137 
138  return *this;
139  }
140  };
141 
142  /**
143  * Indices of H-equation in global model.
144  */
145  struct I_t
146  {
147  /**
148  * Default constructor.
149  */
150  I_t() :
151  t1(0),
152  tx(0),
153  ty(0)
154  {}
155 
156 
157  /**
158  * Constructor.
159  *
160  * \param t1 index t1
161  * \param tx index tx
162  * \param ty index ty
163  */
164  I_t(const int t1,
165  const int tx,
166  const int ty) :
167  t1(t1),
168  tx(tx),
169  ty(ty)
170  {}
171 
172  int t1;
173  int tx;
174  int ty;
175  };
176  };
177 
178 
179  /**
180  * Template definition of fit function of acoustic model.
181  */
182  template<template<class T> class JMinimiser_t>
183  struct JKatoomba;
184 
185 
186  /**
187  * Template specialisation of fit function of acoustic model based on JAbstractMinimiser minimiser.\n
188  * This class can be used to evaluate the chi2.
189  */
190  template<>
192  public JAbstractMinimiser<JModel>,
193  public JKatoomba_t
194  {
195  typedef double result_type;
196 
197 
198  /**
199  * Constructor
200  *
201  * \param detector detector
202  * \param velocity sound velocity
203  */
205  const JSoundVelocity& velocity) :
206  JKatoomba_t(detector, velocity)
207  {};
208 
209 
210  /**
211  * Fit function.\n
212  * This method is used to determine the chi2 of given hit with respect to actual model.
213  *
214  * \param model model
215  * \param hit hit
216  * \return chi2 and gradient
217  */
218  template<class JPDF_t>
219  result_type operator()(const JModel& model, const JHit<JPDF_t>& hit) const
220  {
221  const double toa_s = this->getToA(model, hit);
222  const double u = (toa_s - hit.getValue()) / hit.sigma;
223 
224  return estimator->getRho(u);
225  }
226 
227 
228  /**
229  * Fit.
230  *
231  * \param model model
232  * \param __begin begin of hits
233  * \param __end end of hits
234  * \return chi2
235  */
236  template<class T>
237  result_type operator()(const JModel& model, T __begin, T __end)
238  {
239  this->value = model;
240 
241  return JAbstractMinimiser<JModel>::operator()(*this, __begin, __end);
242  }
243  };
244 
245 
246  /**
247  * Template specialisation of fit function of acoustic model based on linear approximation.
248  */
249  template<>
251  public JKatoomba_t
252  {
253  /**
254  * Constructor
255  *
256  * \param detector detector
257  * \param velocity sound velocity
258  */
260  const JSoundVelocity& velocity) :
261  JKatoomba_t(detector, velocity)
262  {};
263 
264 
265  /**
266  * Get start values of string parameters.\n
267  * Note that this method may throw an exception.
268  *
269  * \param __begin begin of hits
270  * \param __end end of hits
271  * \return model
272  */
273  template<class T>
274  const JModel& operator()(T __begin, T __end) const
275  {
276  using namespace std;
277  using namespace JPP;
278  using namespace JGEOMETRY;
279 
280  value = JModel(__begin, __end); // set up global model according data
281 
282  H_t H; // H-equation as per hit
283  I_t i; // indices of H-equation in global model
284 
285  JMatrixNS V(value.getN()); // V = H^T x H
286  vector<double> Y(value.getN(), 0.0); // Y = H^T x y
287 
288 
289  for (T hit = __begin; hit != __end; ++hit) {
290 
291  const JString& string = detector[hit->getString()];
292  const JPosition3D position = string.getPosition(hit->getFloor());
293  const double Vi = velocity.getInverseVelocity(hit->getDistance(position), hit->getZ(), position.getZ());
294 
295  const double h1 = string.getHeight(hit->getFloor());
296  const JPosition3D p1 = string.getPosition() - hit->getPosition();
297  const double ds = sqrt(p1.getLengthSquared() + h1*h1 + 2.0*p1.getZ()*h1);
298  const double y = hit->getValue() - Vi*ds;
299  const double W = sqrt(hit->getWeight());
300 
301  H.t1 = W * 1.0;
302  H.tx = W * Vi * p1.getX() * h1 / ds;
303  H.ty = W * Vi * p1.getY() * h1 / ds;
304 
305  i.t1 = value.getIndex(hit->getEKey(), &H_t::t1);
306  i.tx = value.getIndex(hit->getString(), &H_t::tx);
307  i.ty = value.getIndex(hit->getString(), &H_t::ty);
308 
309  V(i.t1, i.t1) += H.t1 * H.t1; V(i.t1, i.tx) += H.t1 * H.tx; V(i.t1, i.ty) += H.t1 * H.ty;
310  V(i.tx, i.t1) += H.tx * H.t1;
311  V(i.ty, i.t1) += H.ty * H.t1;
312 
313  V(i.tx, i.tx) += H.tx * H.tx; V(i.tx, i.ty) += H.tx * H.ty;
314  V(i.ty, i.tx) += H.ty * H.tx;
315 
316  V(i.ty, i.ty) += H.ty * H.ty;
317 
318  Y[i.t1] += W * H.t1 * y;
319  Y[i.tx] += W * H.tx * y;
320  Y[i.ty] += W * H.ty * y;
321  }
322 
323  // evaluate (H^T x H)^-1 x H^T x y
324 
325  V.invert();
326 
327  for (size_t row = 0; row != value.getN(); ++row) {
328  for (size_t col = 0; col != value.getN(); ++col) {
329  value[row] += V(row,col) * Y[col];
330  }
331  }
332 
333  return value;
334  }
335 
336  private:
337  mutable JModel value;
338  };
339 
340 
341  /**
342  * Template specialisation of fit function of acoustic model based on JSimplex minimiser.
343  */
344  template<>
345  struct JKatoomba<JSimplex> :
346  public JSimplex<JModel>,
347  public JKatoomba_t
348  {
349  /**
350  * Constructor
351  *
352  * \param detector detector
353  * \param velocity sound velocity
354  */
356  const JSoundVelocity& velocity) :
357  JKatoomba_t(detector, velocity)
358  {};
359 
360 
361  /**
362  * Fit function.\n
363  * This method is used to determine the chi2 of given hit with respect to actual model.
364  *
365  * \param model model
366  * \param hit hit
367  * \return chi2
368  */
369  template<class JPDF_t>
370  double operator()(const JModel& model, const JHit<JPDF_t>& hit) const
371  {
372  const double toa_s = this->getToA(model, hit);
373  const double u = (toa_s - hit.getValue()) / hit.sigma;
374 
375  return estimator->getRho(u);
376  }
377 
378 
379  /**
380  * Fit.
381  *
382  * \param __begin begin of hits
383  * \param __end end of hits
384  * \return chi2
385  */
386  template<class T>
387  double operator()(T __begin, T __end)
388  {
389  this->step.clear();
390 
391  for (JModel::string_type::const_iterator i = this->value.string.begin(); i != this->value.string.end(); ++i) {
392 
393  JModel model;
394 
395  model.string[i->first] = JMODEL::JString(1.0e-3, 0.0);
396 
397  this->step.push_back(model);
398 
399  model.string[i->first] = JMODEL::JString(0.0, 1.0e-3);
400 
401  this->step.push_back(model);
402  }
403 
404  for (JModel::emitter_type::const_iterator i = this->value.emitter.begin(); i != this->value.emitter.end(); ++i) {
405 
406  JModel model;
407 
408  model.emitter[i->first] = JMODEL::JEmitter(5.0e-5);
409 
410  this->step.push_back(model);
411  }
412 
413  return JSimplex<JModel>::operator()(*this, __begin, __end);
414  }
415  };
416 
417 
418  template<class T>
419  class JGandalf {};
420 
421 
422  /**
423  * Template specialisation of fit function of acoustic model based on JGandalf minimiser.
424  */
425  template<>
426  struct JKatoomba<JGandalf> :
427  public JKatoomba_t
428  {
429  typedef double result_type;
430 
431 
432  /**
433  * Constructor
434  *
435  * \param detector detector
436  * \param velocity sound velocity
437  */
439  const JSoundVelocity& velocity) :
440  JKatoomba_t(detector, velocity)
441  {};
442 
443 
444  /**
445  * Fit.
446  *
447  * \param __begin begin of hits
448  * \param __end end of hits
449  * \return chi2 and gradient
450  */
451  template<class T>
452  result_type operator()(T __begin, T __end)
453  {
454  using namespace std;
455  using namespace JPP;
456 
457  const int N = value.getN();
458 
459  V.resize(N);
460  Y.resize(N);
461  h.resize(N);
462 
463  lambda = LAMBDA_MIN;
464 
465  result_type precessor = numeric_limits<double>::max();
466 
467  for (numberOfIterations = 0; numberOfIterations != MAXIMUM_ITERATIONS; ++numberOfIterations) {
468 
469  DEBUG("step: " << numberOfIterations << endl);
470 
471  evaluate(__begin, __end);
472 
473  DEBUG("lambda: " << FIXED(12,5) << lambda << endl);
474  DEBUG("chi2: " << FIXED(12,5) << successor << endl);
475 
476  if (successor < precessor) {
477 
478  if (numberOfIterations != 0) {
479 
480  if (fabs(precessor - successor) < EPSILON*fabs(precessor)) {
481  return successor;
482  }
483 
484  if (lambda > LAMBDA_MIN) {
485  lambda /= LAMBDA_DOWN;
486  }
487  }
488 
489  precessor = successor;
490  previous = value;
491 
492  } else {
493 
494  value = previous;
495  lambda *= LAMBDA_UP;
496 
497  if (lambda > LAMBDA_MAX) {
498  return precessor; // no improvement found
499  }
500 
501  evaluate(__begin, __end);
502  }
503 
504 
505  // force definite positiveness
506 
507  for (int i = 0; i != N; ++i) {
508 
509  if (V(i,i) < PIVOT) {
510  V(i,i) = PIVOT;
511  }
512 
513  h[i] = 1.0 / sqrt(V(i,i));
514  }
515 
516 
517  // normalisation
518 
519  for (int i = 0; i != N; ++i) {
520  for (int j = 0; j != i; ++j) {
521  V(j,i) *= h[i] * h[j];
522  V(i,j) = V(j,i);
523  }
524  }
525 
526  for (int i = 0; i != N; ++i) {
527  V(i,i) = 1.0 + lambda;
528  }
529 
530 
531  try {
532  V.invert();
533  }
534  catch (const JException& error) {
535  ERROR("JKatoomb<JGandalf>: " << error.what() << endl);
536  return precessor;
537  }
538 
539 
540  for (int i = 0; i != N; ++i) {
541 
542  DEBUG("u[" << noshowpos << i << "] = " << showpos << FIXED(15,5) << value[i]);
543 
544  double y = 0.0;
545 
546  for (int j = 0; j != N; ++j) {
547  y += V(i,j) * Y[j] * h[i] * h[j];
548  }
549 
550  value[i] -= y;
551 
552  DEBUG(' ' << FIXED(15,5) << y << noshowpos << endl);
553  }
554  }
555 
556  return 0.0;
557  }
558 
559  static int debug; //!< debug level
560  static int MAXIMUM_ITERATIONS; //!< maximal number of iterations
561  static double EPSILON; //!< maximal distance to minimum
562  static double LAMBDA_MIN; //!< minimal value control parameter
563  static double LAMBDA_MAX; //!< maximal value control parameter
564  static double LAMBDA_UP; //!< multiplication factor control parameter
565  static double LAMBDA_DOWN; //!< multiplication factor control parameter
566  static double PIVOT; //!< minimal value diagonal element of matrix
567 
568  double lambda;
572 
573  private:
574  /**
575  * Evaluation of fit.
576  *
577  * \param __begin begin of data
578  * \param __end end of data
579  */
580  template<class T>
581  inline void evaluate(T __begin, T __end)
582  {
583  using namespace std;
584  using namespace JPP;
585 
586  successor = 0.0;
587 
588  V.reset();
589 
590  for (std::vector<double>::iterator i = Y.begin(); i != Y.end(); ++i) {
591  *i = 0.0;
592  }
593 
594  for (T hit = __begin; hit != __end; ++hit) {
595 
596  const JGEOMETRY::JString& string = detector[hit->getString()];
597  const JMODEL ::JString& parameters = value.string[hit->getString()];
598  const JPosition3D position = string.getPosition(parameters, hit->getFloor());
599 
600  const double D = hit->getDistance(position);
601  const double Vi = velocity.getInverseVelocity(D, hit->getZ(), position.getZ());
602  const double toa_s = value.emitter[hit->getEKey()].t1 + D * Vi;
603 
604  const double u = (toa_s - hit->getValue()) / hit->sigma;
605  const double W = sqrt(hit->getWeight());
606 
607  successor += (W*W) * estimator->getRho(u);
608 
609  H_t H(1.0, string.getGradient(parameters, hit->getPosition(), hit->getFloor()) * Vi);
610 
611  H *= W * estimator->getPsi(u) / hit->sigma;
612 
613  I_t i;
614 
615  i.t1 = value.getIndex(hit->getEKey(), &H_t::t1);
616  i.tx = value.getIndex(hit->getString(), &H_t::tx);
617  i.ty = value.getIndex(hit->getString(), &H_t::ty);
618 
619  V(i.t1, i.t1) += H.t1 * H.t1; V(i.t1, i.tx) += H.t1 * H.tx; V(i.t1, i.ty) += H.t1 * H.ty;
620  V(i.tx, i.t1) += H.tx * H.t1;
621  V(i.ty, i.t1) += H.ty * H.t1;
622 
623  V(i.tx, i.tx) += H.tx * H.tx; V(i.tx, i.ty) += H.tx * H.ty;
624  V(i.ty, i.tx) += H.ty * H.tx;
625 
626  V(i.ty, i.ty) += H.ty * H.ty;
627 
628  Y[i.t1] += W * H.t1;
629  Y[i.tx] += W * H.tx;
630  Y[i.ty] += W * H.ty;
631  }
632  }
633 
634 
635  std::vector<double> Y; // gradient
638  std::vector<double> h; // normalisation vector
639  };
640 
641 
642  /**
643  * debug level.
644  */
646 
647 
648  /**
649  * maximal number of iterations.
650  */
652 
653 
654  /**
655  * maximal distance to minimum.
656  */
657  double JKatoomba<JGandalf>::EPSILON = 1.0e-3;
658 
659 
660  /**
661  * minimal value control parameter
662  */
663  double JKatoomba<JGandalf>::LAMBDA_MIN = 0.01;
664 
665 
666  /**
667  * maximal value control parameter
668  */
669  double JKatoomba<JGandalf>::LAMBDA_MAX = 100.0;
670 
671 
672  /**
673  * multiplication factor control parameter
674  */
675  double JKatoomba<JGandalf>::LAMBDA_UP = 9.0;
676 
677 
678  /**
679  * multiplication factor control parameter
680  */
681  double JKatoomba<JGandalf>::LAMBDA_DOWN = 11.0;
682 
683 
684  /**
685  * minimal value diagonal element of matrix
686  */
687  double JKatoomba<JGandalf>::PIVOT = 1.0e-3;
688 }
689 
690 #endif
Auxiliary base class for fit function of acoustic model.
Definition: JKatoomba.hh:54
JKatoomba(const JDetector &detector, const JSoundVelocity &velocity)
Constructor.
Definition: JKatoomba.hh:355
Linear fit methods.
Acoustic hit.
JKatoomba(const JDetector &detector, const JSoundVelocity &velocity)
Constructor.
Definition: JKatoomba.hh:204
JFit_t
Enumeration for fit algorithms.
Definition: JKatoomba.hh:44
General exception.
Definition: JException.hh:23
General purpose data regression method.
do echo Generating $dir eval D
Definition: JDrawLED.sh:50
JString & mul(const double factor)
Scale string.
Wrapper class around STL string class.
Definition: JString.hh:27
Auxiliary base class for aritmetic operations of derived class types.
Definition: JMath.hh:110
TPaveText * p1
Sound velocity.
int getFloor() const
Get floor number.
Definition: JLocation.hh:145
static double LAMBDA_UP
multiplication factor control parameter
Definition: JKatoomba.hh:564
Interface for maximum likelihood estimator (M-estimator).
Definition: JMEstimator.hh:20
Detector data structure.
Definition: JDetector.hh:80
result_type operator()(const JFunction_t &fit, T __begin, T __end)
Get chi2.
Definition: JRegressor.hh:46
I_t(const int t1, const int tx, const int ty)
Constructor.
Definition: JKatoomba.hh:164
Acoustic geometries.
Indices of H-equation in global model.
Definition: JKatoomba.hh:145
static const double H
Planck constant [eV s].
*fatal Wrong number of arguments esac JCookie sh typeset Z DETECTOR typeset Z SOURCE_RUN typeset Z TARGET_RUN set_variable PARAMETERS_FILE $WORKDIR parameters
Definition: diff-Tuna.sh:38
JEmitter & mul(const double factor)
Scale emitter.
then for HISTOGRAM in h0 h1
Definition: JMatrixNZ.sh:69
double operator()(const JModel &model, const JHit< JPDF_t > &hit) const
Fit function.
Definition: JKatoomba.hh:370
I_t()
Default constructor.
Definition: JKatoomba.hh:150
then fatal Wrong number of arguments fi set_variable STRING $argv[1] set_variable DETECTORXY_TXT $WORKDIR $DETECTORXY_TXT tail read X Y CHI2 RMS printf optimum n $X $Y $CHI2 $RMS awk v Y
Auxiliary data structure for floating point format specification.
Definition: JManip.hh:445
JEKey getEKey() const
Get emitter hash key of this hit.
Abstract minimiser.
Definition: JRegressor.hh:25
Template definition of linear fit.
Definition: JEstimator.hh:25
double getDistance(const JVector3D &pos) const
Get distance to point.
Definition: JVector3D.hh:270
Acoustics hit.
Model for fit to acoustics data.
H_t(const JMODEL::JEmitter &emitter, const JMODEL::JString &string)
Constructor.
Definition: JKatoomba.hh:120
virtual double getInverseVelocity(const double D_m, const double z1, const double z2) const
Get inverse velocity of sound.
static double EPSILON
maximal distance to minimum
Definition: JKatoomba.hh:561
Detector file.
Definition: JHead.hh:196
The template JSharedPointer class can be used to share a pointer to an object.
result_type operator()(T __begin, T __end)
Fit.
Definition: JKatoomba.hh:452
Acoustic emitter.
Definition: JEmitter.hh:27
JLANG::JSharedPointer< JMEstimator > estimator
M-Estimator function.
Definition: JKatoomba.hh:94
JKatoomba_t(const JDetector &detector, const JSoundVelocity &velocity)
Constructor.
Definition: JKatoomba.hh:63
static double LAMBDA_MIN
minimal value control parameter
Definition: JKatoomba.hh:562
void evaluate(T __begin, T __end)
Evaluation of fit.
Definition: JKatoomba.hh:581
JKatoomba(const JDetector &detector, const JSoundVelocity &velocity)
Constructor.
Definition: JKatoomba.hh:438
static int debug
debug level
Definition: JKatoomba.hh:559
do set_variable OUTPUT_DIRECTORY $WORKDIR T
double operator()(T __begin, T __end)
Fit.
Definition: JKatoomba.hh:387
#define ERROR(A)
Definition: JMessage.hh:66
result_type operator()(const JModel &model, const JHit< JPDF_t > &hit) const
Fit function.
Definition: JKatoomba.hh:219
double getY() const
Get y position.
Definition: JVector3D.hh:104
const JPosition3D & getPosition() const
Get position.
Definition: JPosition3D.hh:130
N x N symmetric matrix.
Definition: JMatrixNS.hh:27
double getLengthSquared() const
Get length squared.
Definition: JVector3D.hh:235
General purpose messaging.
Implementation for velocity of sound.
static double LAMBDA_MAX
maximal value control parameter
Definition: JKatoomba.hh:563
static int MAXIMUM_ITERATIONS
maximal number of iterations
Definition: JKatoomba.hh:560
std::vector< double > h
Definition: JKatoomba.hh:638
double operator()(const JFunction_t &fit, T __begin, T __end)
Multi-dimensional fit.
Definition: JSimplex.hh:71
Emitter hash key.
JACOUSTICS::JModel::string_type string
JACOUSTICS::JModel::emitter_type emitter
int getString() const
Get string number.
Definition: JLocation.hh:134
virtual const char * what() const override
Get error message.
Definition: JException.hh:48
const JModel & operator()(T __begin, T __end) const
Get start values of string parameters.
Definition: JKatoomba.hh:274
static double LAMBDA_DOWN
multiplication factor control parameter
Definition: JKatoomba.hh:565
Simple fit method based on Powell&#39;s algorithm, see reference: Numerical Recipes in C++...
Definition: JSimplex.hh:42
result_type operator()(const JModel &model, T __begin, T __end)
Fit.
Definition: JKatoomba.hh:237
H_t()
Default constructor.
Definition: JKatoomba.hh:108
static double PIVOT
minimal value diagonal element of matrix
Definition: JKatoomba.hh:566
double getToA(const JModel &model, const JHit< JPDF_t > &hit) const
Get estimated time-of-arrival for given hit.
Definition: JKatoomba.hh:78
double getX() const
Get x position.
Definition: JVector3D.hh:94
H_t & mul(const double factor)
Scale H-equation.
Definition: JKatoomba.hh:133
int j
Definition: JPolint.hh:666
Data structure for position in three dimensions.
Definition: JPosition3D.hh:36
const JDetector & detector
Definition: JKatoomba.hh:91
container_type::const_iterator const_iterator
Definition: JHashMap.hh:85
double u[N+1]
Definition: JPolint.hh:739
Model for fit to acoutsics data.
H-equation as per hit.
Definition: JKatoomba.hh:100
JSoundVelocity velocity
Definition: JKatoomba.hh:92
then usage $script[input file[working directory[option]]] nWhere option can be N
Definition: JMuonPostfit.sh:37
double getZ() const
Get z position.
Definition: JVector3D.hh:115
Maximum likelihood estimator (M-estimators).
JKatoomba(const JDetector &detector, const JSoundVelocity &velocity)
Constructor.
Definition: JKatoomba.hh:259
Template definition of fit function of acoustic model.
Definition: JKatoomba.hh:183
#define DEBUG(A)
Message macros.
Definition: JMessage.hh:62
std::vector< double > Y
Definition: JKatoomba.hh:635