Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
JFIT::JShowerNPEHit Struct Reference

Auxiliary class for simultaneously handling light yields and response of PMT. More...

#include <JShowerNPEHit.hh>

Inheritance diagram for JFIT::JShowerNPEHit:
JFIT::JShowerNPE JFIT::JK40

Public Member Functions

 JShowerNPEHit ()
 Default constructor.
 
 JShowerNPEHit (const JShowerNPE &npe, const size_t n)
 Constructor.
 
size_t getN () const
 Get number of hits.
 
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.
 
double getP (const double E_GeV, const bool hit) const
 Get probability for observing a hit or not as a function of shower energy.
 
double getChi2 (const double E_GeV, const bool hit) const
 Get chi2 for observing a hit or not as a function of shower energy.
 
double getY1 () const
 Get light yield due to shower.
 
double getH1 (const double E_GeV) const
 Expected number of photo-electrons for shower hypothesis as a function of shower energy.
 
double getP (const bool hit) const
 Get probability for observing a hit or not.
 
double getChi2 (const bool hit) const
 Get chi2 for observing a hit or not.
 
double getY0 () const
 Get light yield due to random background.
 
double getH0 () const
 Expected number of photo-electrons for random background hypothesis.
 

Protected Attributes

size_t __n
 
double y1
 light yield due to shower [npe/GeV]
 
double y0
 light yield due to random background [npe]
 

Detailed Description

Auxiliary class for simultaneously handling light yields and response of PMT.

Definition at line 19 of file JShowerNPEHit.hh.

Constructor & Destructor Documentation

◆ JShowerNPEHit() [1/2]

JFIT::JShowerNPEHit::JShowerNPEHit ( )
inline

Default constructor.

Definition at line 28 of file JShowerNPEHit.hh.

28 :
29 JShowerNPE(),
30 __n (0)
31 {}
JShowerNPE()
Default constructor.
Definition JShowerNPE.hh:31

◆ JShowerNPEHit() [2/2]

JFIT::JShowerNPEHit::JShowerNPEHit ( const JShowerNPE & npe,
const size_t n )
inline

Constructor.

Parameters
npenpe
nnumber of hits

Definition at line 40 of file JShowerNPEHit.hh.

41 :
42 JShowerNPE(npe),
43 __n (n)
44 {}

Member Function Documentation

◆ getN()

size_t JFIT::JShowerNPEHit::getN ( ) const
inline

Get number of hits.

Returns
number of hits

Definition at line 52 of file JShowerNPEHit.hh.

53 {
54 return __n;
55 }

◆ getP() [1/4]

double JFIT::JShowerNPEHit::getP ( ) const
inline

Get probability.

Returns
probability

Definition at line 63 of file JShowerNPEHit.hh.

64 {
65 return this->getP(this->getN());
66 }
size_t getN() const
Get number of hits.
double getP() const
Get probability.

◆ getP() [2/4]

double JFIT::JShowerNPEHit::getP ( const double E_GeV) const
inline

Get shower energy dependent probability.

Parameters
E_GeVenergy [GeV]
Returns
probability

Definition at line 75 of file JShowerNPEHit.hh.

76 {
77 return this->getP(E_GeV, this->getN() > 0);
78 }

◆ getChi2() [1/3]

double JFIT::JShowerNPEHit::getChi2 ( const double E_GeV) const
inline

Get chi2.

Parameters
E_GeVenergy [GeV]
Returns
chi2

Definition at line 87 of file JShowerNPEHit.hh.

88 {
89 return this->getChi2(E_GeV, this->getN() > 0);
90 }
double getChi2(const double E_GeV) const
Get chi2.

◆ getP() [3/4]

double JFIT::JShowerNPE::getP ( const double E_GeV,
const bool hit ) const
inline

Get probability for observing a hit or not as a function of shower energy.

Parameters
E_GeVenergy [GeV]
hithit
Returns
probability

Definition at line 80 of file JShowerNPE.hh.

81 {
82 return JFIT::getP(this->getH1(E_GeV) + this->getH0(), hit);
83 }
double getP(const double expval, bool hit)
Get Poisson probability to observe a hit or not for given expectation value for the number of hits.
double getH0() const
Expected number of photo-electrons for random background hypothesis.
Definition JK40.hh:60
double getH1(const double E_GeV) const
Expected number of photo-electrons for shower hypothesis as a function of shower energy.
Definition JShowerNPE.hh:67

◆ getChi2() [2/3]

double JFIT::JShowerNPE::getChi2 ( const double E_GeV,
const bool hit ) const
inline

Get chi2 for observing a hit or not as a function of shower energy.

Parameters
E_GeVenergy [GeV]
hithit
Returns
probability

Definition at line 93 of file JShowerNPE.hh.

94 {
95 return JFIT::getChi2(this->getH1(E_GeV) + this->getH0(), hit);
96 }
double getChi2(const double P)
Get chi2 corresponding to given probability.

◆ getY1()

double JFIT::JShowerNPE::getY1 ( ) const
inlineinherited

Get light yield due to shower.

Returns
light yield [npe/GeV]

Definition at line 55 of file JShowerNPE.hh.

56 {
57 return y1;
58 }
double y1
light yield due to shower [npe/GeV]
Definition JShowerNPE.hh:99

◆ getH1()

double JFIT::JShowerNPE::getH1 ( const double E_GeV) const
inlineinherited

Expected number of photo-electrons for shower hypothesis as a function of shower energy.

Parameters
E_GeVenergy [GeV]
Returns
light yield [npe]

Definition at line 67 of file JShowerNPE.hh.

68 {
69 return E_GeV * this->getY1();
70 }
double getY1() const
Get light yield due to shower.
Definition JShowerNPE.hh:55

◆ getP() [4/4]

double JFIT::JK40::getP ( const bool hit) const
inlineinherited

Get probability for observing a hit or not.

Parameters
hithit
Returns
probability

Definition at line 72 of file JK40.hh.

73 {
74 return JFIT::getP(this->getH0(), hit);
75 }

◆ getChi2() [3/3]

double JFIT::JK40::getChi2 ( const bool hit) const
inlineinherited

Get chi2 for observing a hit or not.

Parameters
hithit
Returns
probability

Definition at line 84 of file JK40.hh.

85 {
86 return JFIT::getChi2(this->getH0(), hit);
87 }

◆ getY0()

double JFIT::JK40::getY0 ( ) const
inlineinherited

Get light yield due to random background.

Returns
light yield [npe]

Definition at line 49 of file JK40.hh.

50 {
51 return y0;
52 }
double y0
light yield due to random background [npe]
Definition JK40.hh:90

◆ getH0()

double JFIT::JK40::getH0 ( ) const
inlineinherited

Expected number of photo-electrons for random background hypothesis.

Returns
light yield [npe]

Definition at line 60 of file JK40.hh.

61 {
62 return this->getY0();
63 }
double getY0() const
Get light yield due to random background.
Definition JK40.hh:49

Member Data Documentation

◆ __n

size_t JFIT::JShowerNPEHit::__n
protected

Definition at line 93 of file JShowerNPEHit.hh.

◆ y1

double JFIT::JShowerNPE::y1
protectedinherited

light yield due to shower [npe/GeV]

Definition at line 99 of file JShowerNPE.hh.

◆ y0

double JFIT::JK40::y0
protectedinherited

light yield due to random background [npe]

Definition at line 90 of file JK40.hh.


The documentation for this struct was generated from the following file: