Jpp  15.0.4
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Protected Attributes | List of all members
JFIT::JShowerNPE Struct Reference

Auxiliary class for handling EM shower light yield. More...

#include <JShowerNPE.hh>

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

Public Types

typedef std::vector< double > JL1_t
 Type definition of expectation values of number of multiple hits. More...
 

Public Member Functions

 JShowerNPE ()
 Default constructor. More...
 
 JShowerNPE (const JK40 &k40, const double y)
 Constructor. More...
 
double getY () const
 Get light yield due to bremsstrahlung. More...
 
double getH0 () const
 Expected number of photo-electrons for random background hypothesis. More...
 
double getH0 (const size_t M) const
 Expected number of photo-electrons for random background hypothesis. More...
 
double getH1 (const double E_GeV) const
 Expected number of photo-electrons for EM shower hypothesis as a function of shower energy. More...
 
double getP (const double E_GeV, const bool hit) const
 Get probability for observing a hit or not as a function of shower energy. More...
 
double getChi2 (const double E_GeV, const bool hit) const
 Get chi2 for observing a hit or not as a function of shower energy. More...
 
double getY0 () const
 Get expectation value for number of single hits. More...
 
double getY1 (const size_t M) const
 Get expectation value for number of multiple hits. More...
 
double getP (size_t M) const
 Get probability to observe a hit with given multiplicity. More...
 

Protected Attributes

double __y
 light yield [npe/GeV] More...
 
double __y0
 expectation value of number of single hits More...
 
JL1_t __y1
 expectation values of number of multiple hits More...
 

Detailed Description

Auxiliary class for handling EM shower light yield.

Note that the effective light yield due to bremsstrahlung is proportional to the EM shower energy.

Definition at line 25 of file JShowerNPE.hh.

Member Typedef Documentation

typedef std::vector<double> JFIT::JK40::JL1_t
inherited

Type definition of expectation values of number of multiple hits.

Definition at line 33 of file JK40.hh.

Constructor & Destructor Documentation

JFIT::JShowerNPE::JShowerNPE ( )
inline

Default constructor.

Definition at line 35 of file JShowerNPE.hh.

35  :
36  JK40(),
37  __y(0.0)
38  {}
JK40()
Default constructor.
Definition: JK40.hh:39
double __y
light yield [npe/GeV]
Definition: JShowerNPE.hh:128
JFIT::JShowerNPE::JShowerNPE ( const JK40 k40,
const double  y 
)
inline

Constructor.

Parameters
k40K40 light yields [npe]
ylight yield due to bremsstrahlung [npe/GeV]

Definition at line 47 of file JShowerNPE.hh.

48  :
49  JK40(k40),
50  __y(y)
51  {}
JK40()
Default constructor.
Definition: JK40.hh:39
double __y
light yield [npe/GeV]
Definition: JShowerNPE.hh:128

Member Function Documentation

double JFIT::JShowerNPE::getY ( ) const
inline

Get light yield due to bremsstrahlung.

Returns
light yield [npe/GeV]

Definition at line 59 of file JShowerNPE.hh.

60  {
61  return __y;
62  }
double __y
light yield [npe/GeV]
Definition: JShowerNPE.hh:128
double JFIT::JShowerNPE::getH0 ( ) const
inline

Expected number of photo-electrons for random background hypothesis.

Returns
light yield [npe]

Definition at line 69 of file JShowerNPE.hh.

70  {
71  return this->getY0();
72  }
double getY0() const
Get expectation value for number of single hits.
Definition: JK40.hh:100
double JFIT::JShowerNPE::getH0 ( const size_t  M) const
inline

Expected number of photo-electrons for random background hypothesis.

Parameters
Mmultiplicity
Returns
light yield [npe]

Definition at line 81 of file JShowerNPE.hh.

82  {
83  return this->getY1(M);
84  }
do $JPP JMEstimator M
Definition: JMEstimator.sh:37
double getY1(const size_t M) const
Get expectation value for number of multiple hits.
Definition: JK40.hh:112
double JFIT::JShowerNPE::getH1 ( const double  E_GeV) const
inline

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

Parameters
E_GeVenergy [GeV]
Returns
light yield [npe]

Definition at line 93 of file JShowerNPE.hh.

94  {
95  using namespace JTOOLS;
96  using namespace JPHYSICS;
97 
98  return E_GeV * this->getY();
99  }
double getY() const
Get light yield due to bremsstrahlung.
Definition: JShowerNPE.hh:59
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 109 of file JShowerNPE.hh.

110  {
111  return JFIT::getP(this->getH1(E_GeV) + this->getH0(), hit);
112  }
double getH0() const
Expected number of photo-electrons for random background hypothesis.
Definition: JShowerNPE.hh:69
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...
Definition: JFitToolkit.hh:34
double getH1(const double E_GeV) const
Expected number of photo-electrons for EM shower hypothesis as a function of shower energy...
Definition: JShowerNPE.hh:93
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 122 of file JShowerNPE.hh.

123  {
124  return JFIT::getChi2(this->getH1(E_GeV) + this->getH0(), hit);
125  }
double getH0() const
Expected number of photo-electrons for random background hypothesis.
Definition: JShowerNPE.hh:69
double getH1(const double E_GeV) const
Expected number of photo-electrons for EM shower hypothesis as a function of shower energy...
Definition: JShowerNPE.hh:93
double getChi2(const double P)
Get chi2 corresponding to given probability.
Definition: JFitToolkit.hh:70
double JFIT::JK40::getY0 ( ) const
inlineinherited

Get expectation value for number of single hits.

Returns
expectation value

Definition at line 100 of file JK40.hh.

101  {
102  return __y0;
103  }
double __y0
expectation value of number of single hits
Definition: JK40.hh:141
double JFIT::JK40::getY1 ( const size_t  M) const
inlineinherited

Get expectation value for number of multiple hits.

Parameters
Mmultiplicity (M >= 2)
Returns
expectation value

Definition at line 112 of file JK40.hh.

113  {
114  if (M >= 2 && M - 2 < __y1.size())
115  return __y1[M-2];
116  else
117  return 0.0;
118  }
do $JPP JMEstimator M
Definition: JMEstimator.sh:37
JL1_t __y1
expectation values of number of multiple hits
Definition: JK40.hh:142
double JFIT::JK40::getP ( size_t  M) const
inlineinherited

Get probability to observe a hit with given multiplicity.

Note that if M = 0, the probability corresponds to observing no hits.

Parameters
Mmultiplicity (M >= 0)
Returns
probability

Definition at line 128 of file JK40.hh.

129  {
130  double expval = 0.0;
131 
132  if (M < 2)
133  expval = getY0();
134  else
135  expval = getY1(M);
136 
137  return JFIT::getP(expval, M != 0);
138  }
do $JPP JMEstimator M
Definition: JMEstimator.sh:37
double getY0() const
Get expectation value for number of single hits.
Definition: JK40.hh:100
double getY1(const size_t M) const
Get expectation value for number of multiple hits.
Definition: JK40.hh:112
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...
Definition: JFitToolkit.hh:34

Member Data Documentation

double JFIT::JShowerNPE::__y
protected

light yield [npe/GeV]

Definition at line 128 of file JShowerNPE.hh.

double JFIT::JK40::__y0
protectedinherited

expectation value of number of single hits

Definition at line 141 of file JK40.hh.

JL1_t JFIT::JK40::__y1
protectedinherited

expectation values of number of multiple hits

Definition at line 142 of file JK40.hh.


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