1#ifndef __JFIT__JSHOWERENERGYREGRESSOR__
2#define __JFIT__JSHOWERENERGYREGRESSOR__
37namespace 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());
106 for (
int i = 1; i < NUMBER_OF_PDFS; i += 2) {
125 const double E = x.getE();
126 const double u = npe.
getChi2(E);
128 return estimator->getRho(u);
139 const double R_Hz)
const
146 const double U_length = std::sqrt(U.
getDX()*U.
getDX() +
152 const double y = getNPE(Y, D.
getLength(), ct);
154 return JShowerNPE(getN(T_ns, R_Hz * 1.0e-9), y);
172 for (std::vector<JNPE_t>::const_iterator i = NPE.begin(); i != NPE.end(); ++i) {
174 if (D <= i->getXmax()) {
178 const double y = get_value((*i)(std::max(D, i->getXmin()), cd));
185 ERROR(error << std::endl);
197 static const int NUMBER_OF_PDFS = 2;
210 SCATTERED_LIGHT_FROM_BRIGHT_POINT };
Maximum likelihood estimator (M-estimators).
General purpose messaging.
Numbering scheme for PDF types.
General purpose data regression method.
This include file containes various data structures that can be used as specific return types for the...
Definition of zero value for any class.
Data structure for fit of energy.
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.
double getDot(const JAngle3D &angle) const
Get dot product.
Data structure for position in three dimensions.
const JPosition3D & getPosition() const
Get position.
double getLength() const
Get length.
double getDY() const
Get y direction.
double getDX() const
Get x direction.
double getDZ() const
Get z direction.
virtual const char * what() const override
Get error message.
The template JSharedPointer class can be used to share a pointer to an object.
Custom class for integrated values of the PDF of the arrival time of Cherenkov light.
Multi-dimensional PDF table for arrival time of Cherenkov light.
Auxiliary classes and methods for linear and iterative data regression.
static const JZero zero
Function object to assign zero value.
@ SCATTERED_LIGHT_FROM_BRIGHT_POINT
scattered light from bright point
@ DIRECT_LIGHT_FROM_BRIGHT_POINT
direct light from bright point
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Abstract class for global fit method.
static JTimeRange T_ns
Time window with respect to Cherenkov hypothesis [ns].
JShowerNPE getNPE(const JAxis3D &axis, const double R_Hz) const
Create data structure for handling light yields for PMT.
double operator()(const JEnergy &x, const JShowerNPEHit &npe) const
Fit function.
JTOOLS::JSplineFunction1S_t JFunction1D_t
static double getNPE(const std::vector< JNPE_t > &NPE, const double D, const double cd)
Get number of photo-electrons.
std::vector< JNPE_t > Y
light from EM showers
JRegressor(const std::string &fileDescriptor)
Parameterized constructor.
JLANG::JSharedPointer< JMEstimator > estimator
M-Estimator function.
JTOOLS::JMAPLIST< JTOOLS::JPolint1FunctionalMap, JTOOLS::JPolint1FunctionalGridMap >::maplist JMapList_t
static double Vmax_npe
Maximal integral of PDF [npe].
JPHYSICS::JNPETable< double, double, JMapList_t > JNPE_t
JPHYSICS::JPDFTable< JFunction1D_t, JMapList_t > JPDF_t
Template definition of a data regressor of given model.
Auxiliary class for simultaneously handling light yields and response of PMT.
double getChi2(const double E_GeV) const
Get chi2.
Auxiliary class for handling EM shower light yield.
void load(const char *file_name)
Load from input file.