1 #ifndef __JFIT__JLINE3ZREGRESSOR__ 
    2 #define __JFIT__JLINE3ZREGRESSOR__ 
   36 namespace JPP { 
using namespace JFIT; }
 
   75     template<
class JHit_t>
 
   89       const double u  = (t1 - hit.getT()) / 
sigma;
 
   91       return estimator->getRho(
u) * hit.getW();
 
  137                const double       epsilon        = 1.0e-10) :
 
  150       pdf(storage.getPDF()),
 
  172     template<
class JHit_t>
 
  183       const double x  = D.
getX()  -  z * track.
getDX();
 
  184       const double y  = D.
getY()  -  z * track.
getDY();
 
  186       const double R  = (R2 > Rmin_m*Rmin_m ? sqrt(R2) : Rmin_m);
 
  193       const double phi   = fabs(U.
getPhi());
 
  196       const double dt = T_ns.constrain(hit.getT()  -  t1);
 
  201       if (H1.V >= Vmax_npe) {
 
  202         H1 *= Vmax_npe / H1.V;
 
  209       result.chi2     = H1.getChi2() - H0.getChi2();                                                 
 
  221                                                       H0.getDerivativeOfChi2()));                    
 
  246       const double x  = D.
getX()  -  z * track.
getDX();
 
  247       const double y  = D.
getY()  -  z * track.
getDY();
 
  249       const double R  = (R2 > Rmin_m*Rmin_m ? sqrt(R2) : Rmin_m);
 
  254       const double phi   = fabs(U.
getPhi());
 
  261       if (H1.f >= Vmax_npe) {
 
  262         H1 *= Vmax_npe / H1.f;
 
  267       const bool   hit = pmt.
getN() != 0;
 
  268       const double u   = H1.getChi2(hit);
 
  272       result.chi2     = estimator->getRho(
u);
 
  281       result.gradient.mul(estimator->getPsi(
u));
 
  282       result.gradient.mul(H1.getDerivativeOfChi2(hit));              
 
  296                               const double t1)
 const 
  316                               const double t1)
 const 
  323       for (
int i = 0; i != NUMBER_OF_PDFS; ++i) {
 
  325         if (!pdf[i].empty() && R <= pdf[i].getXmax()) {
 
  380                               const double phi)
 const 
  387       for (
int i = 0; i != NUMBER_OF_PDFS; ++i) {
 
  389         if (!npe[i].empty() && R <= npe[i].getXmax()) {
 
  411             ERROR(error << endl);
 
  429       for (
int i = 0; i != NUMBER_OF_PDFS; ++i) {
 
  430         if (!pdf[i].empty() && pdf[i].getXmax() > 
xmax) {
 
  431           xmax = pdf[i].getXmax();
 
Various implementations of functional maps.
 
Maximum likelihood estimator (M-estimators).
 
General purpose messaging.
 
Numbering scheme for PDF types.
 
Auxiliary class to define a range between two values.
 
General purpose data regression method.
 
Definition of zero value for any class.
 
Fit method based on the Levenberg-Marquardt method.
 
Data structure for fit of straight line paralel to z-axis.
 
Data structure for fit of straight line in positive z-direction.
 
JVersor3D getDirection(const JVector3D &pos) const
Get photon direction of Cherenkov light on PMT.
 
double getT(const JVector3D &pos) const
Get arrival time of Cherenkov light at given position.
 
Simple fit method based on Powell's algorithm, see reference: Numerical Recipes in C++,...
 
Data structure for direction in three dimensions.
 
const JDirection3D & getDirection() const
Get direction.
 
JDirection3D & rotate(const JRotation3D &R)
Rotate.
 
Data structure for position in three dimensions.
 
const JPosition3D & getPosition() const
Get position.
 
double getDot(const JAngle3D &angle) const
Get dot product.
 
double getY() const
Get y position.
 
double getLengthSquared() const
Get length squared.
 
double getZ() const
Get z position.
 
JVector3D & sub(const JVector3D &vector)
Subtract vector.
 
double getX() const
Get x position.
 
double getTheta() const
Get theta angle.
 
double getPhi() const
Get phi angle.
 
Data structure for normalised vector in positive z-direction.
 
double getDZ() const
Get z direction.
 
double getDY() const
Get y direction.
 
double getDX() const
Get x direction.
 
The template JSharedPointer class can be used to share a pointer to an object.
 
virtual double getE(const double E, const double dx) const override
Get energy of muon after specified distance.
 
multifunction_t::result_type result_type
 
transformablemultifunction_type::result_type result_type
 
double getNPE(const Hit &hit)
Get true charge of hit.
 
Auxiliary classes and methods for linear and iterative data regression.
 
Auxiliary classes and methods for 3D geometrical objects and operations.
 
static const JZero zero
Function object to assign zero value.
 
Auxiliary methods for light properties of deep-sea water.
 
double getDeltaRaysFromMuon(const double E, const JRange< double > T_GeV=JRange< double >(DELTARAY_TMIN, DELTARAY_TMAX))
Equivalent EM-shower energy due to delta-rays per unit muon track length.
 
double getKappaC()
Get average R-dependence of arrival time of Cherenkov light (a.k.a.
 
bool is_deltarays(const int pdf)
Test if given PDF type corresponds to Cherenkov light from delta-rays.
 
bool is_bremsstrahlung(const int pdf)
Test if given PDF type corresponds to Cherenkov light from Bremsstrahlung.
 
const double getInverseSpeedOfLight()
Get inverse speed of light.
 
static const JGeaneWater gWater
Function object for energy loss of muon in sea water.
 
double getTanThetaC()
Get average tangent of Cherenkov angle of water corresponding to group velocity.
 
const double getSpeedOfLight()
Get speed of light.
 
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
 
Abstract class for global fit method.
 
Data structure for return value of fit function.
 
Auxiliary class for handling PMT geometry, rate and response.
 
int getN() const
Get number of hits.
 
double getR() const
Get rate.
 
Template specialisation for storage for PDF tables.
 
Template data structure for storage for PDF tables.
 
result_type operator()(const JLine3Z &track, const JHit_t &hit) const
Fit function.
 
static double Rmin_m
Minimal distance of [m].
 
JNPE_t::result_type getH0(const double R_Hz) const
Get background hypothesis value for time integrated PDF.
 
static JTimeRange T_ns
Time window with respect to Cherenkov hypothesis [ns].
 
JRegressorStorage< JLine3Z, JGandalf > JRegressorStorage_t
 
result_type operator()(const JLine3Z &track, const JPMTW0 &pmt) const
Fit function.
 
static double Vmax_npe
Maximal integral of PDF [npe].
 
JRegressor(const std::string &fileDescriptor, const double TTS, const int numberOfPoints=25, const double epsilon=1.0e-10)
Constructor.
 
JNPE_t::result_type getH1(const double E, const double R, const double theta, const double phi) const
Get signal hypothesis value for time integrated PDF.
 
JPDF_t::result_type getH0(const double R_Hz, const double t1) const
Get background hypothesis value for time differentiated PDF.
 
JRegressor()
Default constructor.
 
JRegressor(const JRegressorStorage< JLine3Z, JGandalf > &storage)
Constructor.
 
double getRmax() const
Get maximal road width of PDF.
 
JPDF_t::result_type getH1(const double E, const double R, const double theta, const double phi, const double t1) const
Get signal hypothesis value for time differentiated PDF.
 
double operator()(const JLine3Z &track, const JHit_t &hit) const
Fit function.
 
double sigma
Time resolution [ns].
 
JRegressor(double sigma)
Constructor.
 
JLANG::JSharedPointer< JMEstimator > estimator
M-Estimator function.
 
Template definition of a data regressor of given model.
 
Auxiliary class to set-up Hit.