Regressor function object for fit of muon energy.
More...
#include <JEnergyRegressor.hh>
|
| | JRegressor (const std::string &fileDescriptor, const JTimeRange &T_ns=JTimeRange()) |
| | Constructor.
|
| |
| | JRegressor (const storage_type &storage) |
| | Constructor.
|
| |
| double | operator() (const JEnergy &x, const JNPEHit &npe) const |
| | Fit function.
|
| |
| double | getY1 (const JAxis3D &axis) const |
| | Get number of photo-electrons from muon.
|
| |
| double | getYA (const JAxis3D &axis) const |
| | Get number of photo-electrons from delta-rays.
|
| |
| double | getYB (const JAxis3D &axis) const |
| | Get number of photo-electrons from Bremsstrahlung.
|
| |
| JNPE | getNPE (const JAxis3D &axis, const double R_Hz) const |
| | Create data structure for handling light yields for PMT.
|
| |
| double | getRmax () const |
| | Get maximal road width of NPE.
|
| |
| const JNPEs_t & | getY1 () const |
| | Get light from muon.
|
| |
| const JNPEs_t & | getYA () const |
| | Get light from delta-rays.
|
| |
| const JNPEs_t & | getYB () const |
| | Get light from EM showers.
|
| |
| result_type | operator() (const JEnergy &value, T __begin, T __end) |
| | Global fit.
|
| |
|
| static double | getRmax (const JNPEs_t &NPE) |
| | Get maximal road width of PDF.
|
| |
| static double | getNPE (const JNPEs_t &NPE, const double R, const double theta, const double phi) |
| | Get number of photo-electrons.
|
| |
Regressor function object for fit of muon energy.
Definition at line 180 of file JEnergyRegressor.hh.
◆ storage_type
◆ minimiser_type
◆ regressor_type
◆ result_type
◆ JNPEMaplist_t
| typedef JTOOLS::JMAPLIST<JTOOLS::JPolint1FunctionalMap,JTOOLS::JPolint1FunctionalGridMap,JTOOLS::JPolint1FunctionalGridMap>::maplist JFIT::JRegressorStorage< JEnergy >::JNPEMaplist_t |
|
inherited |
◆ JNPE_t
◆ JNPEs_t
◆ JRegressor() [1/2]
| JFIT::JRegressor< JEnergy >::JRegressor |
( |
const std::string & | fileDescriptor, |
|
|
const JTimeRange & | T_ns = JTimeRange() ) |
|
inline |
Constructor.
The PDF file descriptor should contain the wild card character JPHYSICS::WILDCARD which will be replaced by the PDF types listed in JRegressor<JEnergy>::pdf_t.
- Parameters
-
| fileDescriptor | PDF file descriptor |
| T_ns | time range [ns] |
Definition at line 202 of file JEnergyRegressor.hh.
202 :
208 {}
JTimeRange T_ns
Time window with respect to Cherenkov hypothesis [ns].
JRegressorStorage< JEnergy > storage_type
const JNPEs_t & getYB() const
Get light from EM showers.
std::shared_ptr< JMEstimator > estimator
M-Estimator function.
const JNPEs_t & getY1() const
Get light from muon.
const JNPEs_t & getYA() const
Get light from delta-rays.
◆ JRegressor() [2/2]
◆ operator()() [1/2]
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 234 of file JEnergyRegressor.hh.
235 {
236 const double E = x.getE();
237 const double u = npe.getChi2(E);
238
240 }
◆ getY1() [1/2]
Get number of photo-electrons from muon.
Note that the PMT geometry should be relative to the muon trajectory, conform method JGEOMETRY3D::JAxis3D::transform.
- Parameters
-
- Returns
- npe
Definition at line 251 of file JEnergyRegressor.hh.
252 {
253 return getNPE(
Y1, hypot(axis.getX(), axis.getY()), axis.getTheta(), fabs(axis.getPhi()));
254 }
JNPE getNPE(const JAxis3D &axis, const double R_Hz) const
Create data structure for handling light yields for PMT.
◆ getYA() [1/2]
Get number of photo-electrons from delta-rays.
Note that the PMT geometry should be relative to the muon trajectory, conform method JGEOMETRY3D::JAxis3D::transform.
- Parameters
-
- Returns
- npe
Definition at line 265 of file JEnergyRegressor.hh.
266 {
267 return getNPE(
YA, hypot(axis.getX(), axis.getY()), axis.getTheta(), fabs(axis.getPhi()));
268 }
◆ getYB() [1/2]
Get number of photo-electrons from Bremsstrahlung.
Note that the PMT geometry should be relative to the muon trajectory, conform method JGEOMETRY3D::JAxis3D::transform.
- Parameters
-
- Returns
- npe
Definition at line 279 of file JEnergyRegressor.hh.
280 {
281 return getNPE(
YB, hypot(axis.getX(), axis.getY()), axis.getTheta(), fabs(axis.getPhi()));
282 }
◆ getNPE() [1/2]
Create data structure for handling light yields for PMT.
Note that the PMT geometry should be relative to the muon trajectory, conform method JGEOMETRY3D::JAxis3D::transform.
- Parameters
-
| axis | PMT axis |
| R_Hz | singles rate [Hz] |
- Returns
- light yields
Definition at line 294 of file JEnergyRegressor.hh.
296 {
297 using namespace std;
299
300 const double x = axis.getX();
301 const double y = axis.getY();
302 const double R = sqrt(x*x + y*y);
303 const double z = axis.getZ() - R / getTanThetaC();
304
305 const double theta = axis.getTheta();
306 const double phi = fabs(axis.getPhi());
307
308 const double y1 =
getNPE(
Y1, R, theta, phi);
309 const double yA =
getNPE(
YA, R, theta, phi);
310 const double yB =
getNPE(
YB, R, theta, phi);
311
312 return JNPE(getN(
T_ns, R_Hz * 1.0e-9), y1, yA, yB, z);
313 }
Auxiliary class for handling various light yields.
◆ getRmax() [1/2]
Get maximal road width of NPE.
- Returns
- road width [m]
Definition at line 321 of file JEnergyRegressor.hh.
322 {
324 }
double getRmax() const
Get maximal road width of NPE.
◆ getRmax() [2/2]
Get maximal road width of PDF.
- Parameters
-
- Returns
- road width [m]
Definition at line 340 of file JEnergyRegressor.hh.
341 {
342 double xmax = 0.0;
343
344 for (JNPEs_t::const_iterator i = NPE.begin(); i != NPE.end(); ++i) {
345 if (!i->empty() && i->getXmax() > xmax) {
346 xmax = i->getXmax();
347 }
348 }
349
350 return xmax;
351 }
◆ getNPE() [2/2]
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 363 of file JEnergyRegressor.hh.
367 {
368 using JTOOLS::get_value;
369
370 double npe = 0.0;
371
372 for (JNPEs_t::const_iterator i = NPE.begin(); i != NPE.end(); ++i) {
373
374 if (R <= i->getXmax()) {
375
376 try {
377
378 const double y = get_value((*i)(std::max(R, i->getXmin()), theta, phi));
379
380 if (y > 0.0) {
381 npe += y;
382 }
383 }
384 catch(const JLANG::JException& error) {
385 ERROR(error << std::endl);
386 }
387 }
388 }
389
390 return npe;
391 }
◆ getY1() [2/2]
Get light from muon.
- Returns
- NPEs
Definition at line 122 of file JEnergyRegressor.hh.
123 {
125 }
JNPEs_t _Y1
light from muon
◆ getYA() [2/2]
Get light from delta-rays.
- Returns
- NPEs
Definition at line 133 of file JEnergyRegressor.hh.
134 {
136 }
JNPEs_t _YA
light from delta-rays
◆ getYB() [2/2]
Get light from EM showers.
- Returns
- NPEs
Definition at line 144 of file JEnergyRegressor.hh.
145 {
147 }
JNPEs_t _YB
light from EM showers
◆ 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.
◆ Y1
◆ YA
◆ YB
◆ estimator
◆ NUMBER_OF_PDFS
◆ pdf_t
Initial value:= { DIRECT_LIGHT_FROM_MUON,
SCATTERED_LIGHT_FROM_MUON,
DIRECT_LIGHT_FROM_DELTARAYS,
SCATTERED_LIGHT_FROM_DELTARAYS,
DIRECT_LIGHT_FROM_EMSHOWERS,
SCATTERED_LIGHT_FROM_EMSHOWERS }
PDF types.
Definition at line 153 of file JEnergyRegressor.hh.
◆ T_ns
◆ _Y1
◆ _YA
◆ _YB
The documentation for this struct was generated from the following file: