1 #ifndef __JPOINT4DREGRESSOR__
2 #define __JPOINT4DREGRESSOR__
68 hpdf2d[0] = (TH2D*)hPDF2D->Clone();
81 template<
class JHit_t>
85 using namespace JGEOMETRY3D;
86 using namespace JTOOLS;
90 const double t_res = hit.getT() - vertex.
getT(hit_pos);
92 const double cosT = photonDir.
getDot(hit.getDirection());
93 const double cosT_th = d_ref / sqrt(d_ref*d_ref + D*D);
99 LogLik = evaluatePrefit(t_res, cosT, cosT_th);
103 LogLik = evaluateFit(t_res, D);
111 double evaluatePrefit(
const double t_res,
const double cosT,
const double cosT_th)
const
118 }
else if(cosT > cosT_th){
121 p_T = p_max * cosT/cosT_th;
124 double lik = 1 / (sqrt(a*a + t_res*t_res) + p_T);
125 double u = -log(lik);
127 return estimator->getRho(u);
134 int x_bin = hpdf2d[0]->GetXaxis()->FindBin(t_res);
135 int y_bin = hpdf2d[0]->GetYaxis()->FindBin(D);
137 int nbinsX = hpdf2d[0]->GetXaxis()->GetNbins();
138 int nbinsY = hpdf2d[0]->GetYaxis()->GetNbins();
142 if(x_bin > 1 && x_bin < nbinsX){
143 if(y_bin > 1 && y_bin < nbinsY){
144 lik = hpdf2d[0]->Interpolate(t_res, D);
152 double u = -log(lik);
153 return estimator->getRho(u);
157 static const double a;
161 static const int NUMBER_OF_PDFS = 1;
162 TH2D *hpdf2d[NUMBER_OF_PDFS];
Template definition of a data regressor of given model.
General purpose data regression method.
static const double p_max
Data structure for direction in three dimensions.
double evaluateFit(const double t_res, const double D) const
Data structure for vertex fit.
JRegressor(const bool __prefit)
Constructor.
static const double d_ref
Definition of zero value for any class.
double getDistance(const JVector3D &pos) const
Get distance to point.
static const double a
constant to prevent the likelihood going to infinity
double getDot(const JAngle3D &angle) const
Get dot product.
Various implementations of functional maps.
Basic data structure for L0 hit.
Numbering scheme for PDF types.
JLANG::JSharedPointer< JMEstimator > estimator
M-Estimator function.
The template JSharedPointer class can be used to share a pointer to an object.
JRegressor(TH2D *hPDF2D, bool __prefit)
Constructor for a 2D histogram as PDF.
const JPosition3D & getPosition() const
Get position.
General purpose messaging.
double evaluatePrefit(const double t_res, const double cosT, const double cosT_th) const
double operator()(const JPoint4D &vertex, const JHit_t &hit) const
Simple fit method based on Powell's algorithm, see reference: Numerical Recipes in C++...
Data structure for position in three dimensions.
double getT(const JVector3D &pos) const
Get arrival time of Cherenkov light at given position.
Abstract class for global fit method.
Tukey's biweight M-estimator.
Maximum likelihood estimator (M-estimators).