Jpp 20.0.0-rc.2
the software that should make you happy
Loading...
Searching...
No Matches
JShowerNPEHit.hh
Go to the documentation of this file.
1#ifndef __JFIT__JSHOWERNPEHIT__
2#define __JFIT__JSHOWERNPEHIT__
3
4#include "JFit/JShowerNPE.hh"
5
6
7/**
8 * \author mdejong, adomi
9 */
10
11namespace JFIT {}
12namespace JPP { using namespace JFIT; }
13
14namespace JFIT {
15
16 /**
17 * Auxiliary class for simultaneously handling light yields and response of PMT.
18 */
20 public JShowerNPE
21 {
22 using JShowerNPE::getP;
24
25 /**
26 * Default constructor.
27 */
29 JShowerNPE(),
30 __n (0)
31 {}
32
33
34 /**
35 * Constructor.
36 *
37 * \param npe npe
38 * \param n number of hits
39 */
41 const size_t n) :
42 JShowerNPE(npe),
43 __n (n)
44 {}
45
46
47 /**
48 * Get number of hits.
49 *
50 * \return number of hits
51 */
52 inline size_t getN() const
53 {
54 return __n;
55 }
56
57
58 /**
59 * Get probability.
60 *
61 * \return probability
62 */
63 double getP() const
64 {
65 return this->getP(this->getN());
66 }
67
68
69 /**
70 * Get shower energy dependent probability.
71 *
72 * \param E_GeV energy [GeV]
73 * \return probability
74 */
75 double getP(const double E_GeV) const
76 {
77 return this->getP(E_GeV, this->getN() > 0);
78 }
79
80
81 /**
82 * Get chi2.
83 *
84 * \param E_GeV energy [GeV]
85 * \return chi2
86 */
87 double getChi2(const double E_GeV) const
88 {
89 return this->getChi2(E_GeV, this->getN() > 0);
90 }
91
92 protected:
93 size_t __n;
94 };
95}
96
97#endif
Auxiliary classes and methods for linear and iterative data regression.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary class for simultaneously handling light yields and response of PMT.
size_t getN() const
Get number of hits.
JShowerNPEHit()
Default constructor.
JShowerNPEHit(const JShowerNPE &npe, const size_t n)
Constructor.
double getP() const
Get probability.
double getP(const double E_GeV) const
Get shower energy dependent probability.
double getChi2(const double E_GeV) const
Get chi2.
Auxiliary class for handling EM shower light yield.
Definition JShowerNPE.hh:27
double getP(const double E_GeV, const bool hit) const
Get probability for observing a hit or not as a function of shower energy.
Definition JShowerNPE.hh:80
double getChi2(const double E_GeV, const bool hit) const
Get chi2 for observing a hit or not as a function of shower energy.
Definition JShowerNPE.hh:93