Jpp master_rocky-44-g75b7c4f75
the software that should make you happy
Loading...
Searching...
No Matches
JShower3EZRegressor.hh
Go to the documentation of this file.
1#ifndef __JFIT__JSHOWER3EZREGRESSOR__
2#define __JFIT__JSHOWER3EZREGRESSOR__
3
8
12#include "JTools/JRange.hh"
13#include "JTools/JResult.hh"
17
21
22#include "JMath/JZero.hh"
23
24#include "JFit/JTimeRange.hh"
25#include "JFit/JPMTW0.hh"
26#include "JFit/JSimplex.hh"
27#include "JFit/JGandalf.hh"
28#include "JFit/JMEstimator.hh"
29#include "JFit/JRegressor.hh"
30#include "JFit/JShower3EZ.hh"
31#include "JFit/JFitToolkit.hh"
32#include "JFit/JLine3Z.hh"
33
34#include "Jeep/JMessage.hh"
35
36/**
37 * \file
38 * Data regression method for JFIT::JShower3EZ.
39 * \author mdejong, vcarretero
40 */
41
42namespace JFIT {
43
48
49 /**
50 * Constrain PMT angle to [0,pi].
51 *
52 * \param angle angle [rad]
53 * \return angle [rad]
54 */
55 inline double getPMTAngle(const double angle)
56 {
57 const double epsilon = 1.0e-6;
58 const JTOOLS::JRange<double> range(epsilon, JMATH::PI - epsilon);
59
60 return range.constrain(fabs(angle));
61 }
62
63
64 /**
65 * Function to constrain the versor and energy during the fit, to prevent unphysical values.
66 *
67 * \param value model (I/O)
68 */
69 void model(JShower3EZ& value)
70 {
71 using namespace std;
72
73
74 double Tx = value.getDX();
75 double Ty = value.getDY();
76 double E = max(0.0,value.getE());
77 const double u = hypot(Tx, Ty);
78
79 if (u > 1.0) {
80 Tx /= u;
81 Ty /= u;
82 }
83
84 value = JShower3EZ(static_cast<const JPoint4D&>(value), JVersor3Z(Tx,Ty), E, value.getBy());
85
86 }
87
88 /**
89 * Regressor function object for JShower3EZ fit using JSimplex minimiser.
90 */
91 template<>
93 public JAbstractRegressor<JShower3EZ, JSimplex>
94 {
95 using JAbstractRegressor<JShower3EZ, JSimplex>::operator();
96
103
109
110 /**
111 * Parameterized constructor
112 *
113 * The PDF file descriptor should contain the wild card character JPHYSICS::WILDCARD which
114 * will be replaced by the corresponding PDF types listed in JRegressor<JShower3Z, JGandalf>::pdf_t.
115 *
116 * \param fileDescriptor PDF file descriptor
117 */
118
119 JRegressor(const std::string& fileDescriptor):
120 estimator(new JMEstimatorNull())
121 {
122 using namespace std;
123 using namespace JPP;
124
125 const JPDF_t::JSupervisor supervisor(new JPDF_t::JDefaultResult(JMATH::zero));
126
127 for (int i = 0; i != NUMBER_OF_PDFS; ++i) {
128
129 try {
130
131 JPDF_t pdf;
132
133 const string file_name = getFilename(fileDescriptor, pdf_t[i]);
134
135 NOTICE("loading PDF from file " << file_name << "... " << flush);
136
137 pdf.load(file_name.c_str());
138
139 NOTICE("OK" << endl);
140
141 pdf.setExceptionHandler(supervisor);
142
143 npe[ i ] = JNPE_t(pdf);
144 }
145 catch(const JException& error) {
146 FATAL(error.what() << endl);
147 }
148 }
149
150 // Add PDFs
151 for (int i = 1; i < NUMBER_OF_PDFS; i += 2) {
152
153 npe[ i ].add(npe[i-1]);
154
155 JNPE_t buffer;
156
157 npe[i-1].swap(buffer);
158 }
159 }
160
161 /**
162 * Fit function.
163 * This method is used to determine the chi2 of given PMT with respect to shower hypothesis.
164 *
165 * \param shower shower
166 * \param pmt pmt
167 * \return chi2
168 */
169 double operator()(const JShower3EZ& shower, const JPMTW0& pmt) const
170 {
171 using namespace JPP;
172
173 JPosition3D D(pmt.getPosition());
174 JDirection3D U(pmt.getDirection());
175
176 D.sub(shower.getPosition());
177
178 const double z = D.getDot(shower.getDirection());
179 const double x = D.getX();
180 const double y = D.getY();
181 const double cd = z/D.getLength(); // cosine angle between shower direction and PMT position
182
183 U.rotate(JRotation3Z(-atan2(y,x))); // rotate PMT axis to x-z plane
184
185 const double theta = getPMTAngle(U.getTheta());
186 const double phi = getPMTAngle(U.getPhi());
187
188 JNPE_t::result_type H0 = getH0(pmt.getR()); // background hypothesis value for time integrated PDF.
189 JNPE_t::result_type H1 = getH1(D.getLength(), cd, theta, phi, shower.getE()); // signal hypothesis value for time integrated PDF.
190
191 if (get_value(H1) >= Vmax_npe) {
192 H1 *= Vmax_npe / get_value(H1);
193 }
194
195 H1 += H0; // now H1 is signal + background
196
197 const bool hit = pmt.getN() != 0;
198 const double u = getChi2(get_value(H1), hit) - getChi2(get_value(H0), hit); // - log likelihood ratio
199
200 return estimator->getRho(u);
201 }
202
203 /**
204 * Get background hypothesis value for time integrated PDF.
205 *
206 * \param R_Hz rate [Hz]
207 * \return hypothesis value
208 */
209 JNPE_t::result_type getH0(const double R_Hz) const
210 {
211 return JNPE_t::result_type(R_Hz * 1e-9 * T_ns.getLength());
212 }
213
214 /**
215 * Get signal hypothesis value for time integrated PDF.
216 *
217 * \param D PMT distance from shower [m]
218 * \param cd cosine angle between shower direction and PMT position
219 * \param theta PMT zenith angle [deg]
220 * \param phi PMT azimuth angle [deg]
221 * \param E shower energy [GeV]
222 * \return hypothesis value
223 */
225 const double cd,
226 const double theta,
227 const double phi,
228 const double E) const
229 {
231
232 for (int i = 0; i != NUMBER_OF_PDFS; ++i) {
233
234 if (!npe[i].empty() && D <= npe[i].getXmax()) {
235
236 try {
237
238 JNPE_t::result_type y1 = E * npe[i](std::max(D, npe[i].getXmin()), cd, theta, phi);
239
240 // safety measure
241
242 if(y1 < 0){
243 y1 = 0;
244 }
245
246 h1 += y1;
247
248 }
249 catch(JLANG::JException& error) {
250 ERROR(error << std::endl);
251 }
252 }
253 }
254
255 return h1;
256 }
257
258
259 static JTimeRange T_ns; //!< Time window with respect to Cherenkov hypothesis [ns]
260 static double Vmax_npe; //!< Maximal integral of PDF [npe]
261
262 static const int NUMBER_OF_PDFS = 2;
263
264 static const JPDFType_t pdf_t[NUMBER_OF_PDFS];
265
266 JNPE_t npe[NUMBER_OF_PDFS]; //!< PDF
267
269 };
270
271
272 /**
273 * Regressor function object for JShower3EZ fit using JGandalf minimiser.
274 */
275 template<>
277 public JAbstractRegressor<JShower3EZ, JGandalf>
278 {
279 using JAbstractRegressor<JShower3EZ, JGandalf>::operator();
280
281 typedef JTOOLS::JSplineFunction1S_t JFunction1D_t;
287
293
294 /**
295 * Parameterized constructor
296 *
297 * The PDF file descriptor should contain the wild card character JPHYSICS::WILDCARD which
298 * will be replaced by the corresponding PDF types listed in JRegressor<JShower3Z, JGandalf>::pdf_t.
299 *
300 * \param fileDescriptor PDF file descriptor
301 */
302
303 JRegressor(const std::string& fileDescriptor):
304 estimator(new JMEstimatorNull())
305 {
306 using namespace std;
307 using namespace JPP;
308
309 const JPDF_t::JSupervisor supervisor(new JPDF_t::JDefaultResult(JMATH::zero));
310
311 for (int i = 0; i != NUMBER_OF_PDFS; ++i) {
312
313 try {
314
315 JPDF_t pdf;
316
317 const string file_name = getFilename(fileDescriptor, pdf_t[i]);
318
319 NOTICE("loading PDF from file " << file_name << "... " << flush);
320
321 pdf.load(file_name.c_str());
322
323 NOTICE("OK" << endl);
324
325 pdf.setExceptionHandler(supervisor);
326
327 npe[i] = JNPE_t(pdf);
328 }
329 catch(const JException& error) {
330 FATAL(error.what() << endl);
331 }
332 }
333
334 // Add PDFs
335 for (int i = 1; i < NUMBER_OF_PDFS; i += 2) {
336
337 npe[ i ].add(npe[i-1]);
338
339 JNPE_t buffer;
340
341 npe[i-1].swap(buffer);
342 }
343 }
344
345 /**
346 * Fit function.
347 * This method is used to determine the chi2 of given PMT with respect to shower hypothesis.
348 *
349 * \param shower shower
350 * \param pmt pmt
351 * \return chi2
352 */
353 result_type operator()(const JShower3EZ& shower, const JPMTW0& pmt) const
354 {
355 using namespace JPP;
356 using namespace std;
357
358 JPosition3D D(pmt.getPosition());
359 JDirection3D U(pmt.getDirection());
360
361 D.sub(shower.getPosition());
362
363 const double x = D.getX();
364 const double y = D.getY();
365 const double d = D.getLength();
366 const double cd = D.getDot(shower.getDirection())/d; // cosine angle between shower direction and PMT position
367
368 U.rotate(JRotation3Z(-atan2(y,x))); // rotate PMT axis to x-z plane
369
370 const double theta = getPMTAngle(U.getTheta());
371 const double phi = getPMTAngle(U.getPhi());
372
373 JNPE_t::result_type H0 = getH0(pmt.getR()); // background hypothesis value for time integrated PDF.
374 JNPE_t::result_type H1 = getH1(d, cd, theta, phi, shower.getE()); // signal hypothesis value for time integrated PDF.
375
376 if (get_value(H1) >= Vmax_npe) {
377 H1 *= Vmax_npe / get_value(H1);
378 }
379
380 double signal_npe = get_value(H1);
381
382 H1 += H0; // now H1 is signal + background
383
384 double expectation = get_value(H1);
385
386 const bool hit = pmt.getN() != 0;
387 const double u = H1.getChi2(hit) - H0.getChi2(hit);
388
389 result_type result;
390
391 result.chi2 = estimator->getRho(u);
392
393 double energy_gradient = signal_npe/shower.getE(); // dP/dE
394 if(hit) energy_gradient *= -exp(-expectation)/(1-exp(-expectation)); //dchi2/d(H1), if !hit is 1
395
396 result.gradient = JShower3EZ(JPoint4D(JVector3D(0, // d(cos_th0)/d(x)
397 0, // d(cos_th0)/d(y)
398 0), // d(cos_th0)/d(z)
399 0.0), // d(cos_th0)/d(t)
400 JVersor3Z(x/d, // d(cos_th0)/d(dx)
401 y/d), // d(cos_th0)/d(dy)
402 energy_gradient); // d(chi2)/d(E)
403
404 result.gradient.mul(estimator->getPsi(u));
405 static_cast<JShower3Z&>(result.gradient).mul(H1.getDerivativeOfChi2(hit) - H0.getDerivativeOfChi2(hit)); // x d(chi2)/d(cos_th0)
406
407 return result;
408 }
409
410 /**
411 * Get background hypothesis value for time integrated PDF.
412 *
413 * \param R_Hz rate [Hz]
414 * \return hypothesis value
415 */
416 JNPE_t::result_type getH0(const double R_Hz) const
417 {
418 return JNPE_t::result_type(R_Hz * 1e-9 * T_ns.getLength(), 0.0);
419 }
420
421 /**
422 * Get signal hypothesis value for time integrated PDF.
423 *
424 * \param D PMT distance from shower [m]
425 * \param cd cosine angle between shower direction and PMT position
426 * \param theta PMT zenith angle [deg]
427 * \param phi PMT azimuth angle [deg]
428 * \param E shower energy [GeV]
429 * \return hypothesis value
430 */
431 JNPE_t::result_type getH1(const double D,
432 const double cd,
433 const double theta,
434 const double phi,
435 const double E) const
436 {
437 JNPE_t::result_type h1 = JMATH::zero;
438
439 for (int i = 0; i != NUMBER_OF_PDFS; ++i) {
440
441 if (!npe[i].empty() && D <= npe[i].getXmax()) {
442
443 try {
444
445 JNPE_t::result_type y1 = E * npe[i](std::max(D, npe[i].getXmin()), cd, theta, phi);
446
447 if (get_value(y1) > 0.0) {
448 h1 += y1;
449 }
450
451 }
452 catch(JLANG::JException& error) {
453 ERROR(error << std::endl);
454 }
455 }
456 }
457
458 return h1;
459 }
460
461
462 static JTimeRange T_ns; //!< Time window with respect to Cherenkov hypothesis [ns]
463 static double Vmax_npe; //!< Maximal integral of PDF [npe]
464
465 static const int NUMBER_OF_PDFS = 2;
466
467 static const JFIT::JPDFType_t pdf_t[NUMBER_OF_PDFS];
468
469 JNPE_t npe[NUMBER_OF_PDFS]; //!< PDF
470
471 JLANG::JSharedPointer<JMEstimator> estimator; //!< M-Estimator function
472 };
473
474/**
475 * Regressor function object for JShower3EZ fit using Abstract minimiser, that just computes the chi2 without a fit.
476 */
477 template<>
479 public JAbstractRegressor<JShower3EZ, JAbstractMinimiser>
480 {
482
483 typedef JTOOLS::JSplineFunction1S_t JFunction1D_t;
489
495
496 /**
497 * Parameterized constructor
498 *
499 * The PDF file descriptor should contain the wild card character JPHYSICS::WILDCARD which
500 * will be replaced by the corresponding PDF types listed in JRegressor<JShower3Z, JGandalf>::pdf_t.
501 *
502 * \param fileDescriptor PDF file descriptor
503 */
504
505 JRegressor(const std::string& fileDescriptor):
506 estimator(new JMEstimatorNull())
507 {
508 using namespace std;
509 using namespace JPP;
510
511 const JPDF_t::JSupervisor supervisor(new JPDF_t::JDefaultResult(JMATH::zero));
512
513 for (int i = 0; i != NUMBER_OF_PDFS; ++i) {
514
515 try {
516
517 JPDF_t pdf;
518
519 const string file_name = getFilename(fileDescriptor, pdf_t[i]);
520
521 NOTICE("loading PDF from file " << file_name << "... " << flush);
522
523 pdf.load(file_name.c_str());
524
525 NOTICE("OK" << endl);
526
527 pdf.setExceptionHandler(supervisor);
528
529 npe[ i ] = JNPE_t(pdf);
530 }
531 catch(const JException& error) {
532 FATAL(error.what() << endl);
533 }
534 }
535
536 // Add PDFs
537 for (int i = 1; i < NUMBER_OF_PDFS; i += 2) {
538
539 npe[ i ].add(npe[i-1]);
540
541 JNPE_t buffer;
542
543 npe[i-1].swap(buffer);
544 }
545 }
546
547 /**
548 * Fit function.
549 * This method is used to determine the chi2 of given PMT with respect to shower hypothesis.
550 *
551 * \param shower shower
552 * \param pmt pmt
553 * \return chi2
554 */
555 double operator()(const JShower3EZ& shower, const JPMTW0& pmt) const
556 {
557 using namespace JPP;
558
559 JPosition3D D(pmt.getPosition());
560 JDirection3D U(pmt.getDirection());
561
562 D.sub(shower.getPosition());
563
564 const double z = D.getDot(shower.getDirection());
565 const double x = D.getX();
566 const double y = D.getY();
567 const double cd = z/D.getLength(); // cosine angle between shower direction and PMT position
568
569 U.rotate(JRotation3Z(-atan2(y,x))); // rotate PMT axis to x-z plane
570
571 const double theta = getPMTAngle(U.getTheta());
572 const double phi = getPMTAngle(U.getPhi());
573
574 JNPE_t::result_type H0 = getH0(pmt.getR()); // background hypothesis value for time integrated PDF.
575 JNPE_t::result_type H1 = getH1(D.getLength(), cd, theta, phi, shower.getE()); // signal hypothesis value for time integrated PDF.
576
577 if (get_value(H1) >= Vmax_npe) {
578 H1 *= Vmax_npe / get_value(H1);
579 }
580
581 H1 += H0; // now H1 is signal + background
582
583 const bool hit = pmt.getN() != 0;
584 const double u = getChi2(get_value(H1), hit) - getChi2(get_value(H0), hit); // -log likelihood ratio
585
586 return estimator->getRho(u);
587 }
588
589 /**
590 * Get background hypothesis value for time integrated PDF.
591 *
592 * \param R_Hz rate [Hz]
593 * \return hypothesis value
594 */
595 JNPE_t::result_type getH0(const double R_Hz) const
596 {
597 return JNPE_t::result_type(R_Hz * 1e-9 * T_ns.getLength());
598 }
599
600 /**
601 * Get signal hypothesis value for time integrated PDF.
602 *
603 * \param D PMT distance from shower [m]
604 * \param cd cosine angle between shower direction and PMT position
605 * \param theta PMT zenith angle [deg]
606 * \param phi PMT azimuth angle [deg]
607 * \param E shower energy [GeV]
608 * \return hypothesis value
609 */
610 JNPE_t::result_type getH1(const double D,
611 const double cd,
612 const double theta,
613 const double phi,
614 const double E) const
615 {
616 JNPE_t::result_type h1 = JMATH::zero;
617
618 for (int i = 0; i != NUMBER_OF_PDFS; ++i) {
619
620 if (!npe[i].empty() && D <= npe[i].getXmax()) {
621
622 try {
623
624 JNPE_t::result_type y1 = E * npe[i](std::max(D, npe[i].getXmin()), cd, theta, phi);
625
626 // safety measure
627
628 if(y1 < 0){
629 y1 = 0;
630 }
631
632 h1 += y1;
633
634 }
635 catch(JLANG::JException& error) {
636 ERROR(error << std::endl);
637 }
638 }
639 }
640
641 return h1;
642 }
643
644/**
645 * Get signal hypothesis value for time integrated PDF.
646 *
647 * \param shower shower
648 * \param pmt pmt
649 * \return hypothesis value
650 */
651 JNPE_t::result_type getH1(const JShower3EZ& shower, const JPMTW0& pmt) const
652 {
653 using namespace JPP;
654
655 JPosition3D D(pmt.getPosition());
656 JDirection3D U(pmt.getDirection());
657
658
659 const double z = D.getDot(shower.getDirection());
660 const double x = D.getX();
661 const double y = D.getY();
662 const double cd = z/D.getLength(); // cosine angle between shower direction and PMT position
663
664 U.rotate(JRotation3Z(-atan2(y,x))); // rotate PMT axis to x-z plane
665
666 const double theta = getPMTAngle(U.getTheta());
667 const double phi = getPMTAngle(U.getPhi());
668
669 JNPE_t::result_type H1 = getH1(D.getLength(), cd, theta, phi, 1.0); // signal hypothesis value for time integrated PDF. E=1 because it is linear with E.
670
671 if (get_value(H1) >= Vmax_npe) {
672 H1 *= Vmax_npe / get_value(H1);
673 }
674
675 return H1;
676 }
677 static JTimeRange T_ns; //!< Time window with respect to Cherenkov hypothesis [ns]
678 static double Vmax_npe; //!< Maximal integral of PDF [npe]
679
680 static const int NUMBER_OF_PDFS = 2;
681
682 static const JPDFType_t pdf_t[NUMBER_OF_PDFS];
683
684 JNPE_t npe[NUMBER_OF_PDFS]; //!< PDF
685
686 JLANG::JSharedPointer<JMEstimator> estimator; //!< M-Estimator function
687
688 };
689
690 /**
691 * PDF types.
692 */
693 const JPDFType_t JRegressor<JShower3EZ, JSimplex>::pdf_t[] = { DIRECT_LIGHT_FROM_EMSHOWER,
694 SCATTERED_LIGHT_FROM_EMSHOWER };
695
696 const JPDFType_t JRegressor<JShower3EZ, JGandalf>::pdf_t[] = { DIRECT_LIGHT_FROM_EMSHOWER,
697 SCATTERED_LIGHT_FROM_EMSHOWER };
698 const JPDFType_t JRegressor<JShower3EZ, JAbstractMinimiser>::pdf_t[] = { DIRECT_LIGHT_FROM_EMSHOWER,
699 SCATTERED_LIGHT_FROM_EMSHOWER };
700 /**
701 * Default values.
702 */
704 double JRegressor<JShower3EZ, JSimplex>::Vmax_npe = std::numeric_limits<double>::max();
705
707 double JRegressor<JShower3EZ, JGandalf>::Vmax_npe = std::numeric_limits<double>::max();
708
710 double JRegressor<JShower3EZ, JAbstractMinimiser>::Vmax_npe = std::numeric_limits<double>::max();
711
712
713
714}
715
716#endif
Auxiliary methods to evaluate Poisson probabilities and chi2.
Various implementations of functional maps.
Maximum likelihood estimator (M-estimators).
General purpose messaging.
#define ERROR(A)
Definition JMessage.hh:66
#define NOTICE(A)
Definition JMessage.hh:64
#define FATAL(A)
Definition JMessage.hh:67
Auxiliary methods for PDF calculations.
Numbering scheme for PDF types.
Physics constants.
Auxiliary class to define a range between two values.
General purpose data regression method.
This include file containes various data structures that can be used as specific return types for the...
Definition of zero value for any class.
Fit method based on the Levenberg-Marquardt method.
Data structure for vertex fit.
Definition JPoint4D.hh:24
Data structure for fit of straight line in positive z-direction with energy.
Definition JShower3EZ.hh:30
double getBy() const
Get bjorken y.
Definition JShower3EZ.hh:76
double getE() const
Get E.
Definition JShower3EZ.hh:86
Data structure for cascade in positive z-direction.
Definition JShower3Z.hh:36
const JVersor3Z & getDirection() const
Get direction.
Definition JVersor3Z.hh:81
Simple fit method based on Powell's algorithm, see reference: Numerical Recipes in C++,...
Definition JSimplex.hh:44
Data structure for direction in three dimensions.
JDirection3D & rotate(const JRotation3D &R)
Rotate.
const JDirection3D & getDirection() const
Get direction.
Data structure for position in three dimensions.
double getDot(const JAngle3D &angle) const
Get dot product.
const JPosition3D & getPosition() const
Get position.
Rotation around Z-axis.
Data structure for vector in three dimensions.
Definition JVector3D.hh:36
double getY() const
Get y position.
Definition JVector3D.hh:104
double getLength() const
Get length.
Definition JVector3D.hh:246
JVector3D & sub(const JVector3D &vector)
Subtract vector.
Definition JVector3D.hh:158
double getX() const
Get x position.
Definition JVector3D.hh:94
double getTheta() const
Get theta angle.
Definition JVersor3D.hh:128
double getPhi() const
Get phi angle.
Definition JVersor3D.hh:144
Data structure for normalised vector in positive z-direction.
Definition JVersor3Z.hh:41
double getDY() const
Get y direction.
Definition JVersor3Z.hh:158
double getDX() const
Get x direction.
Definition JVersor3Z.hh:147
General exception.
Definition JException.hh:24
virtual const char * what() const override
Get error message.
Definition JException.hh:64
The template JSharedPointer class can be used to share a pointer to an object.
Custom class for integrated values of the PDF of the arrival time of Cherenkov light.
Definition JNPETable.hh:43
Multi-dimensional PDF table for arrival time of Cherenkov light.
Definition JPDFTable.hh:44
void setExceptionHandler(const typename function_type::supervisor_type &supervisor)
Set the supervisor for handling of exceptions.
Range of values.
Definition JRange.hh:42
T constrain(argument_type x) const
Constrain value to range.
Definition JRange.hh:350
Auxiliary classes and methods for linear and iterative data regression.
Definition JEnergy.hh:15
double getPMTAngle(const double angle)
Constrain PMT angle to [0,pi].
double getChi2(const double P)
Get chi2 corresponding to given probability.
void model(JModel_t &value)
Auxiliary function to constrain model during fit.
Definition JGandalf.hh:56
static const JZero zero
Function object to assign zero value.
Definition JZero.hh:105
static const double PI
Mathematical constants.
JPDFType_t
PDF types.
Definition JPDFTypes.hh:24
@ SCATTERED_LIGHT_FROM_EMSHOWER
scattered light from EM shower
Definition JPDFTypes.hh:38
@ DIRECT_LIGHT_FROM_EMSHOWER
direct light from EM shower
Definition JPDFTypes.hh:37
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
double u[N+1]
Definition JPolint.hh:865
JResultEvaluator< JResult_t >::result_type get_value(const JResult_t &value)
Helper method to recursively evaluate a to function value.
Definition JResult.hh:998
Abstract class for global fit method.
Definition JRegressor.hh:79
Null M-estimator.
Auxiliary class for handling PMT geometry, rate and response.
Definition JPMTW0.hh:24
int getN() const
Get number of hits.
Definition JPMTW0.hh:67
double getR() const
Get rate.
Definition JPMTW0.hh:56
JPHYSICS::JPDFTable< JFunction1D_t, JPDFMaplist_t > JPDF_t
JLANG::JSharedPointer< JMEstimator > estimator
M-Estimator function.
JTOOLS::JMapList< JTOOLS::JPolint0FunctionalMap, JTOOLS::JMapList< JTOOLS::JPolint0FunctionalMap, JTOOLS::JMapList< JTOOLS::JPolint0FunctionalGridMap, JTOOLS::JMapList< JTOOLS::JPolint0FunctionalGridMap > > > > JPDFMaplist_t
static double Vmax_npe
Maximal integral of PDF [npe].
JNPE_t::result_type getH0(const double R_Hz) const
Get background hypothesis value for time integrated PDF.
JNPE_t::result_type getH1(const double D, const double cd, const double theta, const double phi, const double E) const
Get signal hypothesis value for time integrated PDF.
double operator()(const JShower3EZ &shower, const JPMTW0 &pmt) const
Fit function.
JTOOLS::JMapList< JTOOLS::JPolint0FunctionalMap, JTOOLS::JMapList< JTOOLS::JPolint0FunctionalMap, JTOOLS::JMapList< JTOOLS::JPolint0FunctionalGridMap, JTOOLS::JMapList< JTOOLS::JPolint0FunctionalGridMap > > > > JNPEMaplist_t
static JTimeRange T_ns
Time window with respect to Cherenkov hypothesis [ns].
JRegressor(const std::string &fileDescriptor)
Parameterized constructor.
JPHYSICS::JNPETable< double, double, JNPEMaplist_t > JNPE_t
Template definition of a data regressor of given model.
Definition JRegressor.hh:70
void load(const char *file_name)
Load from input file.
Map list.
Definition JMapList.hh:25
Type definition of a zero degree polynomial interpolation based on a JGridMap implementation.
Type definition of a zero degree polynomial interpolation based on a JMap implementation.
Type definition of a 1st degree polynomial interpolation based on a JGridMap implementation.
Type definition of a 1st degree polynomial interpolation based on a JMap implementation.
Type definition of a 1st degree polynomial interpolation based on a JMap implementation.
Type definition of a spline interpolation method based on a JCollection with JResultPDF result type.