1 #ifndef __JFIT__JENERGYREGRESSOR__ 
    2 #define __JFIT__JENERGYREGRESSOR__ 
   31 namespace JPP { 
using namespace JFIT; }
 
   75       typedef JSplineFunction1D_t                                     JFunction1D_t;
 
   76       typedef JPDFTable<JFunction1D_t, JNPEMaplist_t>                 JPDF_t;
 
   78       const JPDF_t::JSupervisor supervisor(
new JPDF_t::JDefaultResult(
JMATH::zero));
 
   80       for (
int i = 0; i != NUMBER_OF_PDFS; ++i) {
 
   87           const string     file_name = 
getFilename(fileDescriptor, type);
 
   89           NOTICE(
"loading PDF from file " << file_name << 
"... " << flush);
 
   91           pdf.load(file_name.c_str());
 
   95           pdf.setExceptionHandler(supervisor);
 
  100             YA.push_back(
JNPE_t(pdf));
 
  102             Y1.push_back(
JNPE_t(pdf));
 
  111       if (Y1.size() == 2) { Y1[1].add(Y1[0]); Y1.erase(Y1.begin()); }
 
  112       if (YA.size() == 2) { YA[1].add(YA[0]); YA.erase(YA.begin()); }
 
  113       if (YB.size() == 2) { YB[1].add(YB[0]); YB.erase(YB.begin()); }
 
  127       const double E = x.
getE();
 
  130       return estimator->getRho(u);
 
  144                        const double   R_Hz)
 const 
  149       const double x  = axis.
getX();
 
  150       const double y  = axis.
getY();
 
  151       const double R  = sqrt(x*x + y*y);
 
  154       const double theta = axis.
getTheta();
 
  155       const double phi   = fabs(axis.
getPhi());
 
  157       const double y1 = 
getNPE(Y1, 
R, theta, phi);
 
  158       const double yA = 
getNPE(YA, 
R, theta, phi);
 
  159       const double yB = 
getNPE(YB, 
R, theta, phi);
 
  161       return JNPE(
JK40(T_ns, R_Hz), y1, yA, yB, z);
 
  188       for (
T i = __begin; i != __end; ++i) {
 
  191         const double x   = i->getX();
 
  192         const double y   = i->getY();
 
  193         const double R   = sqrt(x*x + y*y);
 
  203       return JNPE(
JK40(T_ns, 
N, rates_Hz), y1, yA, yB, z / 
N);
 
  214       return std::max(getRmax(Y1), std::max(getRmax(YA), getRmax(YB)));
 
  225     static const int NUMBER_OF_PDFS = 6;
 
  244         if (!i->empty() && i->getXmax() > xmax) {
 
  273         if (R <= i->getXmax()) {
 
  277             const double y = 
get_value((*i)(std::max(R, i->getXmin()), theta, phi));
 
  284             ERROR(error << std::endl);
 
Template definition of a data regressor of given model. 
 
JPHYSICS::JNPETable< double, double, JNPEMaplist_t > JNPE_t
 
double getE() const 
Get energy. 
 
General purpose data regression method. 
 
std::vector< JNPE_t > YA
light from delta-rays 
 
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance. 
 
static double getNPE(const std::vector< JNPE_t > &NPE, const double R, const double theta, const double phi)
Get number of photo-electrons. 
 
JTOOLS::JRange< double > JTimeRange
Type definition for time range (unit [ns]). 
 
double getYB() const 
Get light yield due to bremsstrahlung. 
 
direct light from EM showers 
 
static const JZero zero
Function object to assign zero value. 
 
JNPE getNPE(T __begin, T __end, const JK40Rates &rates_Hz) const 
Create data structure for handling light yields for set of PMTs. 
 
Auxiliary class for converting various rates to expectation values of the number of hits within a giv...
 
double getChi2(const double E_GeV) const 
Get chi2. 
 
double getPhi() const 
Get phi angle. 
 
Various implementations of functional maps. 
 
double getYA() const 
Get light yield due to delta-rays. 
 
Numbering scheme for PDF types. 
 
double getY1() const 
Get light yield due to muon itself. 
 
The template JSinglePointer class can be used to hold a pointer to an object. 
 
bool is_bremsstrahlung(const int pdf)
Test if given PDF type corresponds to Cherenkov light from Bremsstrahlung. 
 
JNPE getNPE(const JAxis3D &axis, const double R_Hz) const 
Create data structure for handling light yields for PMT. 
 
scattered light from muon 
 
JLANG::JSinglePointer< JMEstimator > estimator
M-Estimator function. 
 
JRegressor(const std::string &fileDescriptor)
Constructor. 
 
std::vector< JNPE_t > Y1
light from muon 
 
do set_variable OUTPUT_DIRECTORY $WORKDIR T
 
static JTimeRange T_ns
Time window with respect to Cherenkov hypothesis [ns]. 
 
double operator()(const JEnergy &x, const JNPEHit &npe) const 
Fit function. 
 
double getTheta() const 
Get theta angle. 
 
scattered light from delta-rays 
 
Auxiliary class for handling various light yields. 
 
Auxiliary class for simultaneously handling light yields and response of PMT. 
 
scattered light from EM showers 
 
double getY() const 
Get y position. 
 
General purpose messaging. 
 
direct light from delta-rays 
 
double getRmax() const 
Get maximal road width of NPE. 
 
double getSinglesRate() const 
Get singles rate. 
 
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR set_variable NORTH set_variable EAST set_variable SOUTH set_variable WEST set_variable WORKDIR tmp set_variable R set_variable CT set_variable YMAX set_variable YMIN if do_usage *then usage $script[distance] fi case set_variable R
 
virtual const char * what() const override
Get error message. 
 
static double getRmax(const std::vector< JNPE_t > &NPE)
Get maximal road width of PDF. 
 
JTOOLS::JMAPLIST< JTOOLS::JPolint1FunctionalMap, JTOOLS::JPolint1FunctionalGridMap, JTOOLS::JPolint1FunctionalGridMap >::maplist JNPEMaplist_t
 
bool is_deltarays(const int pdf)
Test if given PDF type corresponds to Cherenkov light from delta-rays. 
 
double getX() const 
Get x position. 
 
std::string getFilename(const std::string &file_name)
Get file name part, i.e. part after last JEEP::PATHNAME_SEPARATOR if any. 
 
Data structure for fit of energy. 
 
double getTanThetaC()
Get average tangent of Cherenkov angle of water corresponding to group velocity. 
 
double getNPE(const Hit &hit)
Get true charge of hit. 
 
Abstract class for global fit method. 
 
then usage $script[input file[working directory[option]]] nWhere option can be N
 
double getZ() const 
Get z position. 
 
Maximum likelihood estimator (M-estimators). 
 
Auxiliary class for K40 rates. 
 
then usage $script[input file[working directory[option]]] nWhere option can be E
 
Auxiliary class for handling debug parameter within a class. 
 
std::vector< JNPE_t > YB
light from EM showers