1 #ifndef __JFIT__JSHOWERENERGYREGRESSOR__
2 #define __JFIT__JSHOWERENERGYREGRESSOR__
35 namespace JPP {
using namespace JFIT; }
77 const JPDF_t::JSupervisor supervisor(
new JPDF_t::JDefaultResult(
JMATH::zero));
79 for (
int i = 0; i != NUMBER_OF_PDFS; ++i) {
85 const string file_name =
getFilename(fileDescriptor, pdf_t[i]);
87 NOTICE(
"loading PDF from file " << file_name <<
"... " << flush);
89 pdf.
load(file_name.c_str());
104 for (
int i = 1; i < NUMBER_OF_PDFS; i += 2) {
123 const double E = x.
getE();
126 return estimator->getRho(
u);
137 const double R_Hz)
const
144 const double U_length = std::sqrt(U.getDX()*U.getDX() +
145 U.getDY()*U.getDY() +
146 U.getDZ()*U.getDZ());
148 const double ct = U.getDot(
D) / (
D.getLength()*U_length);
150 const double y =
getNPE(Y,
D.getLength(), ct);
172 if (D <= i->getXmax()) {
176 const double y =
get_value((*i)(std::max(D, i->getXmin()), cd));
183 ERROR(error << std::endl);
195 static const int NUMBER_OF_PDFS = 2;
Template definition of a data regressor of given model.
double getE() const
Get energy.
double getChi2(const double E_GeV) const
Get chi2.
void load(const char *file_name)
Load from input file.
General purpose data regression method.
do echo Generating $dir eval D
JRegressor(const std::string &fileDescriptor)
Parameterized constructor.
JTOOLS::JMAPLIST< JTOOLS::JPolint1FunctionalMap, JTOOLS::JPolint1FunctionalGridMap >::maplist JMapList_t
JShowerNPE getNPE(const JPMT &pmt, const double R_Hz) const
Create data structure for handling light yields for PMT.
static double Vmax_npe
Maximal integral of PDF [npe].
This include file containes various data structures that can be used as specific return types for the...
const JDirection3D & getDirection() const
Get direction.
double operator()(const JEnergy &x, const JShowerNPEHit &npe) const
Fit function.
std::vector< JNPE_t > Y
light from EM showers
static const JZero zero
Function object to assign zero value.
Auxiliary class for converting various rates to expectation values of the number of hits within a giv...
direct light from bright point
Definition of zero value for any class.
esac $JPP_DIR examples JDetector JTransitTime o $OUTPUT_FILE n N $NPE T $TTS_NS d $DEBUG for HISTOGRAM in tts tt2 pmt
Numbering scheme for PDF types.
The template JSharedPointer class can be used to share a pointer to an object.
Multi-dimensional PDF table for arrival time of Cherenkov light.
Data structure for PMT geometry and calibration.
JTOOLS::JSplineFunction1S_t JFunction1D_t
static JTimeRange T_ns
Time window with respect to Cherenkov hypothesis [ns].
const JPosition3D & getPosition() const
Get position.
General purpose messaging.
scattered light from bright point
Data structure for PMT geometry and calibration.
Simple fit method based on Powell's algorithm, see reference: Numerical Recipes in C++...
JPHYSICS::JNPETable< double, double, JMapList_t > JNPE_t
Auxiliary class for simultaneously handling light yields and response of PMT.
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 fit of energy.
double getNPE(const Hit &hit)
Get true charge of hit.
Data structure for position in three dimensions.
Auxiliary class for handling EM shower light yield.
virtual const char * what() const
Get error message.
Abstract class for global fit method.
JLANG::JSharedPointer< JMEstimator > estimator
M-Estimator function.
JPHYSICS::JPDFTable< JFunction1D_t, JMapList_t > JPDF_t
Maximum likelihood estimator (M-estimators).
static double getNPE(const std::vector< JNPE_t > &NPE, const double D, const double cd)
Get number of photo-electrons.
then usage $script[input file[working directory[option]]] nWhere option can be E
Custom class for integrated values of the PDF of the arrival time of Cherenkov light.