Regressor function object for JEnergy fit.
More...
#include <JEnergyRegressor.hh>
|
| JRegressor (const std::string &fileDescriptor) |
| Constructor. More...
|
|
double | operator() (const JEnergy &x, const JNPEHit &npe) const |
| Fit function. More...
|
|
JNPE | getNPE (const JPMT &pmt, const double R_Hz) const |
| Create data structure for handling light yields for PMT. More...
|
|
JNPE | getNPE (const JModule &module, const JK40Rates &rates_Hz) const |
| Create data structure for handling light yields for module. More...
|
|
double | getRmax () const |
| Get maximal road width of NPE. More...
|
|
result_type | operator() (const JEnergy &value, T __begin, T __end) |
| Global fit. More...
|
|
result_type | operator() (const JEnergy &value, T1 __begin1, T1 __end1, T2 __begin2, T2 __end2) |
| Global fit. More...
|
|
result_type | operator() (const JFunction_t &fit, T __begin, T __end) |
| Get chi2. More...
|
|
template<>
struct JFIT::JRegressor< JEnergy >
Regressor function object for JEnergy fit.
Definition at line 49 of file JEnergyRegressor.hh.
◆ JNPEMaplist_t
◆ JNPE_t
◆ minimiser_type
◆ regressor_type
◆ result_type
◆ JRegressor()
Constructor.
The PDF file descriptor should contain the wild card character JPHYSICS::WILD_CARD which will be replaced by the PDF types listed in JRegressor<JEnergy, JSimplex>::pdf_t.
- Parameters
-
fileDescriptor | PDF file descriptor |
Definition at line 69 of file JEnergyRegressor.hh.
79 const JPDF_t::JSupervisor supervisor(
new JPDF_t::JDefaultResult(
JMATH::zero));
89 NOTICE(
"loading PDF from file " << file_name <<
"... " << flush);
91 pdf.load(file_name.c_str());
95 pdf.setExceptionHandler(supervisor);
109 if (
Y1.size() == 2) {
Y1[1].add(
Y1[0]);
Y1.erase(
Y1.begin()); }
110 if (
YB.size() == 2) {
YB[1].add(
YB[0]);
YB.erase(
YB.begin()); }
◆ operator()() [1/4]
Fit function.
This method is used to determine chi2 of given number of photo-electrons for given energy of muon.
- Parameters
-
- Returns
- chi2
Definition at line 122 of file JEnergyRegressor.hh.
124 const double E = x.
getE();
◆ getNPE() [1/3]
Create data structure for handling light yields for PMT.
Note that the PMT geometry is relative to the muon trajectory, conform method JDETECTOR::JPMT::transform.
- Parameters
-
pmt | PMT |
R_Hz | singles rate [Hz] |
- Returns
- light yields
Definition at line 140 of file JEnergyRegressor.hh.
145 const double x = pmt.getX();
146 const double y = pmt.getY();
147 const double R = sqrt(x*x + y*y);
150 const double theta = pmt.getTheta();
151 const double phi = fabs(pmt.getPhi());
153 const double yA =
getNPE(
Y1, R, theta, phi);
154 const double yB =
getNPE(
YB, R, theta, phi);
◆ getNPE() [2/3]
Create data structure for handling light yields for module.
Note that the module geometry is relative to the muon trajectory, conform method JDETECTOR::JModule::transform.
- Parameters
-
module | module |
rates_Hz | K40 singles and multiples rates [Hz] |
- Returns
- light yields
Definition at line 169 of file JEnergyRegressor.hh.
174 const double x = module.getX();
175 const double y = module.getY();
176 const double R = sqrt(x*x + y*y);
182 for (JModule::const_iterator pmt = module.begin(); pmt != module.end(); ++pmt) {
184 const JNPE npe = this->
getNPE(*pmt, rates_Hz.getSinglesRate());
190 return JNPE(
JK40(
T_ns, module.size(), rates_Hz), yA, yB, z);
◆ getRmax() [1/2]
◆ getRmax() [2/2]
Get maximal road width of PDF.
- Parameters
-
- Returns
- road width [m]
Definition at line 226 of file JEnergyRegressor.hh.
231 if (!i->empty() && i->getXmax() > xmax) {
◆ getNPE() [3/3]
Get number of photo-electrons.
- Parameters
-
NPE | NPE tables |
R | distance between muon and PMT [m] |
theta | zenith angle orientation PMT [rad] |
phi | azimuth angle orientation PMT [rad] |
- Returns
- number of photo-electrons
Definition at line 249 of file JEnergyRegressor.hh.
260 if (R <= i->getXmax()) {
264 const double y =
get_value((*i)(std::max(R, i->getXmin()), theta, phi));
271 ERROR(error << std::endl);
◆ operator()() [2/4]
Global fit.
- Parameters
-
value | start value |
__begin | begin of data set |
__end | end of data set |
- Returns
- chi2
Definition at line 92 of file JRegressor.hh.
94 static_cast<minimiser_type&>(*this).value =
value;
96 return static_cast<minimiser_type&>(*
this)(static_cast<regressor_type&>(*
this), __begin, __end);
◆ operator()() [3/4]
Global fit.
- Parameters
-
value | start value |
__begin1 | begin of first data set |
__end1 | end of first data set |
__begin2 | begin of second data set |
__end2 | end of second data set |
- Returns
- chi2
Definition at line 111 of file JRegressor.hh.
115 static_cast<minimiser_type&>(*this).value =
value;
117 return static_cast<minimiser_type&>(*
this)(static_cast<regressor_type&>(*
this), __begin1, __end1, __begin2, __end2);
◆ operator()() [4/4]
Get chi2.
- Parameters
-
fit | fit function |
__begin | begin of data |
__end | end of data |
- Returns
- chi2
Definition at line 46 of file JRegressor.hh.
50 for (T i = __begin; i != __end; ++i) {
51 chi2 += fit(
value, *i);
◆ Y1
◆ YB
◆ T_ns
Time window with respect to Cherenkov hypothesis [ns].
Time range.
Definition at line 209 of file JEnergyRegressor.hh.
◆ NUMBER_OF_PDFS
◆ pdf_t
◆ estimator
◆ value
◆ debug
debug level (default is off).
Definition at line 45 of file JMessage.hh.
The documentation for this struct was generated from the following file: