1 #ifndef __JFIT__JSHOWERBRIGHTPOINTREGRESSOR__
2 #define __JFIT__JSHOWERBRIGHTPOINTREGRESSOR__
31 namespace JPP {
using namespace JFIT; }
69 const double epsilon = 1.0e-10):
75 const JPDF_t::JSupervisor supervisor(
new JPDF_t::JDefaultResult(
JMATH::zero));
77 for (
int i = 0; i != NUMBER_OF_PDFS; ++i) {
81 const string file_name =
getFilename(fileDescriptor, pdf_t[i]);
83 NOTICE(
"loading PDF from file " << file_name <<
"... " << flush);
85 pdf[i].load(file_name.c_str());
89 pdf[i].setExceptionHandler(supervisor);
97 for (
int i = 1; i < NUMBER_OF_PDFS; i += 2) {
99 pdf[ i ].add(pdf[i-1]);
103 pdf[i-1].swap(buffer);
107 }
else if (TTS < 0.0) {
108 ERROR(
"Illegal value of TTS [ns]: " << TTS << endl);
139 double ct = U.getDot(
D) /
D.getLength();
140 if (ct > +1.0) { ct = +1.0; }
141 if (ct < -1.0) { ct = -1.0; }
145 const double dt = T_ns.constrain(hit.
getT() - t);
158 result.chi2 = H1.getChi2() - H0.getChi2();
169 H0.getDerivativeOfChi2()));
183 const double t1)
const
202 const double E)
const
208 for (
int i = 0; i != NUMBER_OF_PDFS; ++i) {
210 if (!pdf[i].empty() && D <= pdf[i].getXmax()) {
222 ERROR(error << std::endl);
241 for (
int i = 0; i != NUMBER_OF_PDFS; ++i) {
243 if (!pdf[i].empty() && pdf[i].getXmax() > xmax) {
244 xmax = pdf[i].getXmax();
255 static const int NUMBER_OF_PDFS = 2;
Template definition of a data regressor of given model.
double getT() const
Get calibrated time of hit.
General purpose data regression method.
do echo Generating $dir eval D
Data structure for direction in three dimensions.
JPHYSICS::JPDFTable< JFunction1D_t, JPDFMapList_t > JPDF_t
double getRmax() const
Get maximal road width of PDF.
This include file containes various data structures that can be used as specific return types for the...
Data structure for vertex fit.
const JDirection3D & getDirection() const
Get direction.
void blur(const double TTS, const int numberOfPoints=25, const double epsilon=1.0e-10, const double quantile=0.99)
Blur PDF.
then for HISTOGRAM in h0 h1
static const JZero zero
Function object to assign zero value.
direct light from bright point
double E_GeV
Energy of the shower [GeV].
Definition of zero value for any class.
Numbering scheme for PDF types.
JTOOLS::JSplineFunction1S_t JFunction1D_t
minimiser_type::result_type result_type
JPDF_t::result_type getH0(const double R_Hz, const double t1) const
Get background hypothesis value for time differentiated PDF.
Data structure for vector in three dimensions.
JRegressor(const std::string &fileDescriptor, const double TTS, const int numberOfPoints=25, const double epsilon=1.0e-10)
Parameterized constructor.
Auxiliary class for a hit with background rate value.
const JPosition3D & getPosition() const
Get position.
double getR() const
Get rate.
General purpose messaging.
scattered light from bright point
Fit method based on the Levenberg-Marquardt method.
static double Vmax_npe
Maximal integral of PDF [npe].
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 position in three dimensions.
transformablemultifunction_type::result_type result_type
virtual const char * what() const
Get error message.
double getT(const JVector3D &pos) const
Get arrival time of Cherenkov light at given position.
Abstract class for global fit method.
result_type operator()(const JPoint4D &vx, const JHitW0 &hit) const
Fit function.
Maximum likelihood estimator (M-estimators).
JPDF_t::result_type getH1(const double D, const double ct, const double t, const double E) const
Get signal hypothesis value for bright point emission PDF.
JTOOLS::JMAPLIST< JTOOLS::JPolint2FunctionalMap, JTOOLS::JPolint1FunctionalGridMap >::maplist JPDFMapList_t
then usage $script[input file[working directory[option]]] nWhere option can be E
static JTimeRange T_ns
Time window with respect to Cherenkov hypothesis [ns].