1#ifndef __JFIT__JSHOWERBJORKENYREGRESSOR__
2#define __JFIT__JSHOWERBJORKENYREGRESSOR__
101 for (
int i = 0; i != NUMBER_OF_PDFS; ++i) {
108 const string file_name = getFilename(fileDescriptor, pdf_t[i]);
110 NOTICE(
"loading PDF from file " << file_name <<
"... " << flush);
114 pdf.
load(file_name.c_str());
138 for (
int i = 1; i < (NUMBER_OF_PDFS-2); i += 2) {
140 npe[ i ].add(npe[i-1]);
144 npe[i-1].swap(buffer);
146 npe2[ i ].
add(npe2[i-1]);
178 const double x = D.
getX() - z * shower.
getDX();
179 const double y = D.
getY() - z * shower.
getDY();
185 const double phi = fabs(U.
getPhi());
187 double H0 = getH0(pmt.
getR());
191 if (
H1 >= Vmax_npe) {
197 const bool hit = pmt.
getN() != 0;
200 return estimator->getRho(
u);
209 double getH0(
const double R_Hz)
const
234 const double Y)
const
239 for (
int i = 0; i != (NUMBER_OF_PDFS-1); ++i) {
241 if (!npe[i].empty() && D <= npe[i].getXmax() && !npe2[i].empty() && D <= npe2[i].getXmax()) {
248 P_em = fabs(
Eem) * npe[i](std::max(D, npe[i].getXmin()),
cosDelta, theta, phi);
250 P_h = fabs(
Eh) * npe2[i](std::max(D, npe2[i].getXmin()), ct);
252 double y1 = get_value(
P_em) + get_value(
P_h);
260 ERROR(error << std::endl);
271 static const int NUMBER_OF_PDFS = 4;
273 static const JPDFType_t pdf_t[NUMBER_OF_PDFS];
285 SCATTERED_LIGHT_FROM_EMSHOWER,
286 DIRECT_LIGHT_FROM_BRIGHT_POINT,
287 SCATTERED_LIGHT_FROM_BRIGHT_POINT };
Various implementations of functional maps.
Maximum likelihood estimator (M-estimators).
General purpose messaging.
Numbering scheme for PDF types.
Auxiliary class to define a range between two values.
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.
const JVersor3Z & getDirection() const
Get direction.
Data structure for fit of straight line in positive z-direction with energy.
double getEem() const
Get EM energy.
double getEh() const
Get Hadronic energy.
double getBy() const
Get bjorken y.
Simple fit method based on Powell's algorithm, see reference: Numerical Recipes in C++,...
Data structure for direction in three dimensions.
JDirection3D & rotate(const JRotation3D &R)
Rotate.
const JDirection3D & getDirection() const
Get direction.
double getDot(const JAngle3D &angle) const
Get dot product.
Data structure for position in three dimensions.
double getDot(const JAngle3D &angle) const
Get dot product.
const JPosition3D & getPosition() const
Get position.
double getY() const
Get y position.
double getLength() const
Get length.
JVector3D & sub(const JVector3D &vector)
Subtract vector.
double getX() const
Get x position.
Data structure for normalised vector in three dimensions.
double getTheta() const
Get theta angle.
double getPhi() const
Get phi angle.
double getDY() const
Get y direction.
double getDX() const
Get x direction.
virtual const char * what() const override
Get error message.
The template JSharedPointer class can be used to share a pointer to an object.
Template definition of a multi-dimensional oscillation probability interpolation table.
void load()
Load oscillation probability table.
Custom class for integrated values of the PDF of the arrival time of Cherenkov light.
multifunction_t::result_type result_type
void add(const JNPETable &input)
Add NPE table.
Multi-dimensional PDF table for arrival time of Cherenkov light.
Auxiliary classes and methods for linear and iterative data regression.
double getChi2(const double P)
Get chi2 corresponding to given probability.
static const JZero zero
Function object to assign zero value.
@ SCATTERED_LIGHT_FROM_EMSHOWER
scattered light from EM shower
@ SCATTERED_LIGHT_FROM_BRIGHT_POINT
scattered light from bright point
@ DIRECT_LIGHT_FROM_BRIGHT_POINT
direct light from bright point
@ DIRECT_LIGHT_FROM_EMSHOWER
direct light from EM shower
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Abstract class for global fit method.
Auxiliary class for handling PMT geometry, rate and response.
int getN() const
Get number of hits.
double getR() const
Get rate.
JPHYSICS::JPDFTable< JFunction1D_t, JMapList_t2 > JPDF_t2
double getH1(const double D, const double ct, const double cosDelta, const double theta, const double phi, const double Eem, const double Eh, const double Y) const
Get signal hypothesis value for time integrated PDF.
JRegressor(const std::string &fileDescriptor)
Parameterized constructor.
JTOOLS::JMapList< JTOOLS::JPolint0FunctionalMap, JTOOLS::JMapList< JTOOLS::JPolint0FunctionalMap, JTOOLS::JMapList< JTOOLS::JPolint0FunctionalGridMap, JTOOLS::JMapList< JTOOLS::JPolint0FunctionalGridMap > > > > JPDFMaplist_t
double operator()(const JShowerEH &shower, const JPMTW0 &pmt) const
Fit function.
JLANG::JSharedPointer< JMEstimator > estimator
M-Estimator function.
JPHYSICS::JPDFTable< JFunction1D_t, JPDFMaplist_t > JPDF_t
JPHYSICS::JNPETable< double, double, JNPEMaplist_t > JNPE_t
JPHYSICS::JNPETable< double, double, JNPEMapList_t2 > JNPE_t2
static JTimeRange T_ns
Time window with respect to Cherenkov hypothesis [ns].
double getH0(const double R_Hz) const
Get background hypothesis value for time integrated PDF.
static double Vmax_npe
Maximal integral of PDF [npe].
JTOOLS::JMapList< JTOOLS::JPolint0FunctionalMap, JTOOLS::JMapList< JTOOLS::JPolint0FunctionalMap, JTOOLS::JMapList< JTOOLS::JPolint0FunctionalGridMap, JTOOLS::JMapList< JTOOLS::JPolint0FunctionalGridMap > > > > JNPEMaplist_t
JTOOLS::JMAPLIST< JTOOLS::JPolint1FunctionalMap, JTOOLS::JPolint1FunctionalGridMap >::maplist JNPEMapList_t2
JTOOLS::JSplineFunction1S_t JFunction1D_t
JTOOLS::JMAPLIST< JTOOLS::JPolint1FunctionalMap, JTOOLS::JPolint1FunctionalGridMap >::maplist JMapList_t2
Template definition of a data regressor of given model.
void load(const char *file_name)
Load from input file.