Go to the documentation of this file. 1 #ifndef __JFIT__JENERGYREGRESSOR__
2 #define __JFIT__JENERGYREGRESSOR__
32 namespace JPP {
using namespace JFIT; }
79 const JPDF_t::JSupervisor supervisor(
new JPDF_t::JDefaultResult(
JMATH::zero));
81 for (
int i = 0; i != NUMBER_OF_PDFS; ++i) {
87 const string file_name =
getFilename(fileDescriptor, pdf_t[i]);
89 NOTICE(
"loading PDF from file " << file_name <<
"... " << flush);
91 pdf.load(file_name.c_str());
95 pdf.setExceptionHandler(supervisor);
100 YB.push_back(
JNPE_t(pdf));
109 if (Y1.size() == 2) { Y1[1].add(Y1[0]); Y1.erase(Y1.begin()); }
110 if (YB.size() == 2) { YB[1].add(YB[0]); YB.erase(YB.begin()); }
124 const double E = x.
getE();
127 return estimator->getRho(
u);
141 const double R_Hz)
const
145 const double x = pmt.
getX();
146 const double y = pmt.
getY();
147 const double R = sqrt(x*x + y*y);
150 const double theta = pmt.
getTheta();
151 const double phi = fabs(pmt.
getPhi());
153 const double yA =
getNPE(Y1, R, theta, phi);
154 const double yB =
getNPE(YB, R, theta, phi);
156 return JNPE(
JK40(T_ns, R_Hz), yA, yB, z);
174 const double x = module.
getX();
175 const double y = module.
getY();
176 const double R = sqrt(x*x + y*y);
182 for (JModule::const_iterator pmt = module.begin(); pmt != module.end(); ++pmt) {
190 return JNPE(
JK40(T_ns, module.size(), rates_Hz), yA, yB, z);
201 return std::max(getRmax(Y1),
212 static const int NUMBER_OF_PDFS = 4;
231 if (!i->empty() && i->getXmax() > xmax) {
260 if (R <= i->getXmax()) {
264 const double y =
get_value((*i)(std::max(R, i->getXmin()), theta, phi));
271 ERROR(error << std::endl);
double operator()(const JEnergy &x, const JNPEHit &npe) const
Fit function.
Data structure for fit of energy.
Abstract class for global fit method.
The template JSinglePointer class can be used to hold a pointer to an object.
Auxiliary classes and methods for linear and iterative data regression.
double getE() const
Get energy.
JNPE getNPE(const JModule &module, const JK40Rates &rates_Hz) const
Create data structure for handling light yields for module.
double getZ() const
Get z position.
static JTimeRange T_ns
Time window with respect to Cherenkov hypothesis [ns].
Auxiliary classes and methods for calculation of PDF and muon energy loss.
Auxiliary class for simultaneously handling light yields and response of PMT.
double getYB() const
Get light yield due to bremsstrahlung.
double getNPE(const Hit &hit)
Get true charge of hit.
std::vector< JNPE_t > Y1
light from muon
static double getNPE(const std::vector< JNPE_t > &NPE, const double R, const double theta, const double phi)
Get number of photo-electrons.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary class for K40 rates.
double getTheta() const
Get theta angle.
double getSinglesRate() const
Get singles rate.
JTOOLS::JMAPLIST< JTOOLS::JPolint1FunctionalMap, JTOOLS::JPolint1FunctionalGridMap, JTOOLS::JPolint1FunctionalGridMap >::maplist JNPEMaplist_t
static double getRmax(const std::vector< JNPE_t > &NPE)
Get maximal road width of PDF.
double getChi2(const double E_GeV) const
Get chi2.
Template definition of a data regressor of given model.
JNPE getNPE(const JPMT &pmt, const double R_Hz) const
Create data structure for handling light yields for PMT.
bool is_bremsstrahlung(const int pdf)
Test if given PDF type corresponds to Cherenkov light from Bremsstrahlung.
Data structure for a composite optical module.
Auxiliary class for converting various rates to expectation values of the number of hits within a giv...
std::string getFilename(const std::string &file_name)
Get file name part, i.e.
Multi-dimensional PDF table for arrival time of Cherenkov light.
Data structure for PMT geometry and calibration.
scattered light from EM showers
Auxiliary class for handling various light yields.
double getRmax() const
Get maximal road width of NPE.
std::vector< JNPE_t > YB
light from EM showers
double getY() const
Get y position.
virtual const char * what() const
Get error message.
JRegressor(const std::string &fileDescriptor)
Constructor.
static const JZero zero
Function object to assign zero value.
double getX() const
Get x position.
JLANG::JSinglePointer< JMEstimator > estimator
M-Estimator function.
direct light from EM showers
double getYA() const
Get light yield due to muon itself.
Auxiliary class for handling debug parameter within a class.
JPHYSICS::JNPETable< double, double, JNPEMaplist_t > JNPE_t
double getPhi() const
Get phi angle.
scattered light from muon