1#ifndef __JPOINT4DREGRESSOR__
2#define __JPOINT4DREGRESSOR__
6#include "JPhysics/JConstants.hh"
8#include "JGeometry3D/JVector3D.hh"
10#include "JLang/JSharedPointer.hh"
18#include "Jeep/JMessage.hh"
51 template<
class JHit_t>
56 const double dt = hit.getT() - vx.getT(hit.getPosition());
58 const double u = dt / sigma;
60 return estimator->getRho(u) * hit.getW();
88 template<
class JHit_t>
93 const double dt = hit.getT() - vx.getT(hit.getPosition());
95 const double u = dt / sigma;
97 result.
chi2 = estimator->getRho(u) * hit.getW();
99 JVector3D d = hit.getPosition() - vx.getPosition();
101 double weight = getIndexOfRefraction() * getInverseSpeedOfLight()/(d.getLength() * sigma);
105 result.
gradient.mul(0.5 * estimator->getPsi(u));
Maximum likelihood estimator (M-estimators).
General purpose data regression method.
Fit method based on the Levenberg-Marquardt method.
Data structure for vertex fit.
Simple fit method based on Powell's algorithm, see reference: Numerical Recipes in C++,...
Auxiliary classes and methods for linear and iterative data regression.
Abstract class for global fit method.
Data structure for return value of fit function.
JModel_t gradient
partial derivatives of chi2
result_type operator()(const JPoint4D &vx, const JHit_t &hit) const
JLANG::JSharedPointer< JMEstimator > estimator
M-Estimator function.
JRegressor(double sigma)
Constructor.
double sigma
Time resolution [ns].
double sigma
Time resolution [ns].
JLANG::JSharedPointer< JMEstimator > estimator
M-Estimator function
double operator()(const JPoint4D &vx, const JHit_t &hit) const
JRegressor(double sigma)
Constructor.
Template definition of a data regressor of given model.