1#ifndef __JPOINT4DREGRESSOR__
2#define __JPOINT4DREGRESSOR__
52 template<
class JHit_t>
55 const double dt = hit.getT() - vx.
getT(hit.getPosition());
57 const double u = dt / sigma;
59 return estimator->getRho(u) * hit.getW();
73 constexpr static const double DMIN = 0.1;
91 template<
class JHit_t>
92 result_type operator()(
const JPoint4D& vx,
const JHit_t& hit)
const
98 const double dt = hit.getT() - vx.getT(hit.getPosition());
100 const double u = dt / sigma;
102 const JVector3D pos = hit.getPosition() - vx.getPosition();
105 const double weight = getIndexOfRefraction() * getInverseSpeedOfLight() / ((D < DMIN ? DMIN : D) * sigma);
107 result.chi2 = estimator->getRho(u) * hit.getW();
109 result.gradient = hit.getW() *
JPoint4D(pos * weight, -1.0 / sigma);
111 result.gradient.mul(0.5 * estimator->getPsi(u));
116 std::shared_ptr<JMEstimator> estimator;
Maximum likelihood estimator (M-estimators).
General purpose messaging.
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++,...
Data structure for vector in three dimensions.
double getLength() const
Get length.
double getT(const JVector3D &pos) const
Get arrival time of Cherenkov light at given position.
Auxiliary classes and methods for linear and iterative data regression.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Abstract class for global fit method.
double sigma
Time resolution [ns].
std::shared_ptr< 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.