1 #ifndef __JFIT_JREGRESSORHELPER__
2 #define __JFIT_JREGRESSORHELPER__
20 namespace JPP {
using namespace JFIT; }
36 template<
class JModel_t>
38 template<
class JModel_t>
40 template<
class JModel_t>
47 template<
class JModel_t,
template<
class>
class JMinimiser_t>
70 static const int NUMBER_OF_PDFS = 6;
98 template<
class JModel_t,
template<
class>
class JMinimiser_t>
132 const double epsilon = 1.0e-10)
137 const JPDF_t::JSupervisor supervisor(
new JPDF_t::JDefaultResult(
JMATH::zero));
139 for (
int i = 0; i != NUMBER_OF_PDFS; ++i) {
141 const string file_name =
getFilename(fileDescriptor, pdf_t[i]);
143 _pdf[i].load(file_name.c_str());
145 _pdf[i].setExceptionHandler(supervisor);
150 for (
int i = 1; i < NUMBER_OF_PDFS; i += 2) {
152 _pdf[ i ].add(_pdf[i-1]);
156 _pdf[i-1].swap(buffer);
162 _npe[ i ] =
JNPE_t(_pdf[i]);
196 for (
int i = 0; i != NUMBER_OF_PDFS; ++i) {
197 _pdf[i].transform(transformer);
198 _npe[i].transform(transformer);
212 for (
int i = 0; i != NUMBER_OF_PDFS; ++i) {
213 if (!_pdf[i].empty()) {
214 _pdf[i].compress(range);
Various implementations of functional maps.
Numbering scheme for PDF types.
Auxiliary class to define a range between two values.
Fit method based on the Levenberg-Marquardt method.
Data structure for fit of straight line in positive z-direction.
Simple fit method based on Powell's algorithm, see reference: Numerical Recipes in C++,...
void blur(const double TTS, const int numberOfPoints=25, const double epsilon=1.0e-10, const double quantile=0.99)
Blur PDF.
std::string getFilename(const std::string &file_name)
Get file name part, i.e. part after last JEEP::PATHNAME_SEPARATOR if any.
Auxiliary classes and methods for linear and iterative data regression.
static const JZero zero
Function object to assign zero value.
@ SCATTERED_LIGHT_FROM_DELTARAYS
scattered light from delta-rays
@ DIRECT_LIGHT_FROM_EMSHOWERS
direct light from EM showers
@ SCATTERED_LIGHT_FROM_EMSHOWERS
scattered light from EM showers
@ SCATTERED_LIGHT_FROM_MUON
scattered light from muon
@ DIRECT_LIGHT_FROM_DELTARAYS
direct light from delta-rays
@ DIRECT_LIGHT_FROM_MUON
direct light from muon
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
std::array< JPDF_t, NUMBER_OF_PDFS > JPDFs_t
PDFs.
JTOOLS::JMAPLIST< JTOOLS::JPolint1FunctionalMap, JTOOLS::JPolint0FunctionalGridMap, JTOOLS::JPolint0FunctionalGridMap >::maplist JPDFMaplist_t
JPDF_t::transformer_type transformer_type
JTOOLS::JSplineFunction1S_t JFunction1D_t
JTOOLS::JMAPLIST< JTOOLS::JPolint1FunctionalMapH, JTOOLS::JPolint1FunctionalGridMap, JTOOLS::JPolint1FunctionalGridMap >::maplist JNPEMaplist_t
JPHYSICS::JPDFTable< JFunction1D_t, JPDFMaplist_t > JPDF_t
time dependent PDF
JPHYSICS::JNPETable< double, double, JNPEMaplist_t > JNPE_t
time integrated PDF
std::array< JNPE_t, NUMBER_OF_PDFS > JNPEs_t
NPEs.
Template data structure for PDF tables.
JRegressorStorage()
Default constructor.
void setRmax(const double Rmax)
Set maximal road width of PDF.
const JPDFs_t & getPDF() const
Get PDFs.
const JNPEs_t & getNPE() const
Get NPEs.
JRegressorStorage(const std::string &fileDescriptor, const double TTS, const int numberOfPoints=25, const double epsilon=1.0e-10)
Constructor.
void transform(const transformer_type &transformer)
Transform PDFs and NPEs.
Template data structure for storage for PDF tables.