Go to the documentation of this file.    1 #ifndef __JFIT__JLINE3ZREGRESSOR__ 
    2 #define __JFIT__JLINE3ZREGRESSOR__ 
   34 namespace JPP { 
using namespace JFIT; }
 
   83     template<
class JHit_t>
 
   94       const double R  = sqrt(D.getLengthSquared() - z*z);
 
   98       const double u  = (t1 - hit.getT()) / sigma;
 
  100       return estimator->getRho(
u) * hit.getW();
 
  151                const double       epsilon        = 1.0e-10) :
 
  158       const JPDF_t::JSupervisor supervisor(
new JPDF_t::JDefaultResult(
JMATH::zero));
 
  160       for (
int i = 0; i != NUMBER_OF_PDFS; ++i) {
 
  164           const string file_name = 
getFilename(fileDescriptor, pdf_t[i]);
 
  166           NOTICE(
"loading PDF from file " << file_name << 
"... " << flush);
 
  168           pdf[i].load(file_name.c_str());
 
  172           pdf[i].setExceptionHandler(supervisor);
 
  176           } 
else if (TTS < 0.0) {
 
  177             ERROR(
"Illegal value of TTS [ns]: " << TTS << endl); 
 
  187       for (
int i = 1; i < NUMBER_OF_PDFS; i += 2) {
 
  189         pdf[ i ].add(pdf[i-1]); 
 
  192         npe[ i ] = 
JNPE_t(pdf[i]);
 
  214     template<
class JHit_t>
 
  227       const double x  = D.getX()  -  z * track.
getDX();
 
  228       const double y  = D.getY()  -  z * track.
getDY();
 
  229       const double R  = sqrt(D.getLengthSquared() - z*z);
 
  235       const double theta = U.getTheta();
 
  236       const double phi   = fabs(U.getPhi());
 
  239       const double dt = T_ns.constrain(hit.getT()  -  t1);
 
  244       if (H1.V >= Vmax_npe) {
 
  245         H1 *= Vmax_npe / H1.V;
 
  252       result.chi2     = H1.getChi2() - H0.getChi2();                                                 
 
  261                                           wc * (D.getY() - D.getZ()*track.
getDY()/track.
getDZ())));  
 
  264                                                       H0.getDerivativeOfChi2()));                    
 
  289       const double x  = D.getX()  -  z * track.
getDX();
 
  290       const double y  = D.getY()  -  z * track.
getDY();
 
  291       const double R  = sqrt(D.getLengthSquared() - z*z);
 
  295       const double theta = U.getTheta();
 
  296       const double phi   = fabs(U.getPhi());
 
  303       if (H1.f >= Vmax_npe) {
 
  304         H1 *= Vmax_npe / H1.f;
 
  309       const bool   hit = pmt.
getN() != 0;
 
  310       const double u   = H1.getChi2(hit);
 
  314       result.chi2     = estimator->getRho(
u);
 
  323       result.gradient.mul(estimator->getPsi(
u));
 
  324       result.gradient.mul(H1.getDerivativeOfChi2(hit));              
 
  338                               const double t1)
 const 
  358                               const double t1)
 const 
  364       for (
int i = 0; i != NUMBER_OF_PDFS; ++i) {
 
  366         if (!pdf[i].empty() && R <= pdf[i].getXmax()) {
 
  421                               const double phi)
 const 
  427       for (
int i = 0; i != NUMBER_OF_PDFS; ++i) {
 
  429         if (!npe[i].empty() && R <= npe[i].getXmax()) {
 
  451             ERROR(error << std::endl);
 
  470       for (
int i = 0; i != NUMBER_OF_PDFS; ++i) {
 
  471         if (!pdf[i].empty() && R_compress.
is_valid()) {
 
  472           pdf[ i ].compress(R_compress);
 
  488       for (
int i = 0; i != NUMBER_OF_PDFS; ++i) {
 
  489         if (!pdf[i].empty() && pdf[i].getXmax() > xmax) {
 
  490           xmax = pdf[i].getXmax();
 
  501     static const int    NUMBER_OF_PDFS = 4;
 
 
direct light from delta-rays
 
result_type operator()(const JLine3Z &track, const JHit_t &hit) const
Fit function.
 
Auxiliary class to set-up Hit.
 
JTOOLS::JSplineFunction1S_t JFunction1D_t
 
JNPE_t::result_type getH0(const double R_Hz) const
Get background hypothesis value for time integrated PDF.
 
Abstract class for global fit method.
 
double sigma
Time resolution [ns].
 
Auxiliary classes and methods for linear and iterative data regression.
 
Data structure for fit of straight line in positive z-direction.
 
JPHYSICS::JNPETable< double, double, JNPEMaplist_t > JNPE_t
time integrated PDF
 
static const JGeaneWater gWater
Function object for energy loss of muon in sea water.
 
JRegressor()
Default constructor.
 
JPDF_t::result_type getH0(const double R_Hz, const double t1) const
Get background hypothesis value for time differentiated PDF.
 
Data structure for normalised vector in positive z-direction.
 
multifunction_t::result_type result_type
 
double getR() const
Get rate.
 
bool is_deltarays(const int pdf)
Test if given PDF type corresponds to Cherenkov light from delta-rays.
 
const JDirection3D & getDirection() const
Get direction.
 
static JTimeRange T_ns
Time window with respect to Cherenkov hypothesis [ns].
 
Simple fit method based on Powell's algorithm, see reference: Numerical Recipes in C++,...
 
double getRmax() const
Get maximal road width of PDF.
 
JLANG::JSharedPointer< JMEstimator > estimator
M-Estimator function.
 
Fit method based on the Levenberg-Marquardt method.
 
double getDot(const JAngle3D &angle) const
Get dot product.
 
result_type operator()(const JLine3Z &track, const JPMTW0 &pmt) const
Fit function.
 
Auxiliary classes and methods for calculation of PDF and muon energy loss.
 
Data structure for direction in three dimensions.
 
JTOOLS::JMAPLIST< JTOOLS::JPolint1FunctionalMap, JTOOLS::JPolint0FunctionalGridMap, JTOOLS::JPolint0FunctionalGridMap >::maplist JPDFMaplist_t
 
static double Vmax_npe
Maximal integral of PDF [npe].
 
minimiser_type::result_type result_type
 
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 getDeltaRaysFromMuon(const double E)
Equivalent EM-shower energy due to delta-rays per unit muon track length.
 
virtual double getE(const double E, const double dx) const
Get energy of muon after specified distance.
 
Auxiliary class for handling PMT geometry, rate and response.
 
double E_GeV
Energy of muon at vertex [GeV].
 
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
 
JLANG::JSharedPointer< JMEstimator > estimator
M-Estimator function.
 
int getN() const
Get number of hits.
 
JVersor3D getDirection(const JVector3D &pos) const
Get photon direction of Cherenkov light on PMT.
 
JRegressor(double sigma)
Constructor.
 
Data structure for position in three dimensions.
 
JTOOLS::JMAPLIST< JTOOLS::JPolint1FunctionalMapH, JTOOLS::JPolint1FunctionalGridMap, JTOOLS::JPolint1FunctionalGridMap >::maplist JNPEMaplist_t
 
Template definition of a data regressor of given model.
 
double getT(const JVector3D &pos) const
Get arrival time of Cherenkov light at given position.
 
bool is_bremsstrahlung(const int pdf)
Test if given PDF type corresponds to Cherenkov light from Bremsstrahlung.
 
std::string getFilename(const std::string &file_name)
Get file name part, i.e.
 
scattered light from EM showers
 
void compress(const JRange< typename JFunction1D_t::abscissa_type > &R_compress)
Compresses PDFs to abscissa range specified by R_compress.
 
Data structure for fit of straight line paralel to z-axis.
 
JRegressor(const std::string &fileDescriptor, const double TTS, const int numberOfPoints=25, const double epsilon=1.0e-10)
Constructor.
 
const JPosition3D & getPosition() const
Get position.
 
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.
 
JPHYSICS::JPDFTable< JFunction1D_t, JPDFMaplist_t > JPDF_t
time dependent PDF
 
double getDot(const JVector3D &vector) const
Get dot product.
 
double getDY() const
Get y direction.
 
Auxiliary classes and methods for 3D geometrical objects and operations.
 
virtual const char * what() const
Get error message.
 
static const JZero zero
Function object to assign zero value.
 
transformablemultifunction_t::result_type result_type
 
double getDZ() const
Get z direction.
 
direct light from EM showers
 
JVector3D & sub(const JVector3D &vector)
Subtract vector.
 
scattered light from delta-rays
 
double getDX() const
Get x direction.
 
The template JSharedPointer class can be used to share a pointer to an object.
 
double operator()(const JLine3Z &track, const JHit_t &hit) const
Fit function.
 
scattered light from muon