Regressor function object for JShower3EZ fit using JSimplex minimiser.
More...
#include <JShowerEnergyRegressor.hh>
|
| static double | getNPE (const std::vector< JNPE_t > &NPE, const double D, const double cd) |
| | Get number of photo-electrons.
|
| |
|
| static JTimeRange | T_ns |
| | Time window with respect to Cherenkov hypothesis [ns].
|
| |
| static double | Vmax_npe = std::numeric_limits<double>::max() |
| | Maximal integral of PDF [npe].
|
| |
| static const int | NUMBER_OF_PDFS = 2 |
| |
| static const JPDFType_t | pdf_t [NUMBER_OF_PDFS] |
| | PDF types.
|
| |
Regressor function object for JShower3EZ fit using JSimplex minimiser.
Definition at line 51 of file JShowerEnergyRegressor.hh.
◆ JFunction1D_t
◆ JMapList_t
◆ JPDF_t
◆ JNPE_t
◆ minimiser_type
◆ regressor_type
◆ result_type
◆ JRegressor()
Parameterized constructor.
The PDF file descriptor should contain the wild card character JPHYSICS::WILDCARD which will be replaced by the corresponding PDF types listed in JRegressor<JEnergy, JSimplex>::pdf_t.
- Parameters
-
| fileDescriptor | PDF file descriptor |
Definition at line 72 of file JShowerEnergyRegressor.hh.
72 :
74 {
75 using namespace std;
77
78
79 const JPDF_t::JSupervisor supervisor(new JPDF_t::JDefaultResult(JMATH::zero));
80
82
83 try {
84
86
87 const string file_name = getFilename(fileDescriptor,
pdf_t[i]);
88
89 NOTICE("loading PDF from file " << file_name << "... " << flush);
90
91 pdf.load(file_name.c_str());
92
93 NOTICE("OK" << endl);
94
95 pdf.setExceptionHandler(supervisor);
96
98 }
99 catch(const JException& error) {
100 FATAL(error.what() << endl);
101 }
102 }
103
104
105
108 }
109
111 }
static const int NUMBER_OF_PDFS
static const JPDFType_t pdf_t[NUMBER_OF_PDFS]
PDF types.
JPHYSICS::JNPETable< double, double, JMapList_t > JNPE_t
JPHYSICS::JPDFTable< JFunction1D_t, JMapList_t > JPDF_t
std::vector< JNPE_t > Y
light from EM showers
JLANG::JSharedPointer< JMEstimator > estimator
M-Estimator function.
◆ operator()() [1/2]
Fit function.
This method is used to determine the chi2 of given PMT with respect to shower hypothesis.
- Parameters
-
| x | energy |
| npe | number of photoelectrons |
- Returns
- chi2
Definition at line 121 of file JShowerEnergyRegressor.hh.
122 {
124
125 const double E = x.getE();
126 const double u = npe.getChi2(E);
127
129 }
◆ getNPE() [1/2]
Create data structure for handling light yields for PMT.
- Parameters
-
| axis | PMT axis |
| R_Hz | singles rate [Hz] |
- Returns
- light yields
Definition at line 138 of file JShowerEnergyRegressor.hh.
140 {
142
143 const JPosition3D D(axis.getPosition());
144 const JDirection3D U(axis.getDirection());
145
146 const double U_length = std::sqrt(U.getDX()*U.getDX() +
147 U.getDY()*U.getDY() +
148 U.getDZ()*U.getDZ());
149
150 const double ct = U.getDot(D) / (D.getLength()*U_length);
151
152 const double y =
getNPE(
Y, D.getLength(), ct);
153
155 }
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.
Auxiliary class for handling EM shower light yield.
◆ getNPE() [2/2]
Get number of photo-electrons.
- Parameters
-
| NPE | NPE tables |
| D | PMT distance from shower [m] |
| cd | cosine of the PMT angle wrt the photon direction |
- Returns
- number of photo-electrons
Definition at line 166 of file JShowerEnergyRegressor.hh.
169 {
170 double npe = 0.0;
171
172 for (std::vector<JNPE_t>::const_iterator i = NPE.begin(); i != NPE.end(); ++i) {
173
174 if (D <= i->getXmax()) {
175
176 try {
177
178 const double y = get_value((*i)(std::max(D, i->getXmin()), cd));
179
180 if (y > 0.0) {
181 npe += y;
182 }
183 }
184 catch(const JLANG::JException& error) {
185 ERROR(error << std::endl);
186 }
187 }
188 }
189
190 return npe;
191 }
◆ operator()() [2/2]
Global fit.
- Parameters
-
| value | start value |
| __begin | begin of data set |
| __end | end of data set |
- Returns
- chi2
Definition at line 94 of file JRegressor.hh.
◆ T_ns
◆ Vmax_npe
◆ NUMBER_OF_PDFS
◆ pdf_t
Initial value:= { DIRECT_LIGHT_FROM_BRIGHT_POINT,
SCATTERED_LIGHT_FROM_BRIGHT_POINT }
PDF types.
Definition at line 199 of file JShowerEnergyRegressor.hh.
◆ estimator
The documentation for this struct was generated from the following file: