Jpp - 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::JNPEHit Struct Reference

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

#include <JNPEHit.hh>

Inheritance diagram for JFIT::JNPEHit:
JFIT::JNPE JFIT::JK40

Public Types

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

Public Member Functions

 JNPEHit ()
 Default constructor. More...
 
 JNPEHit (const JNPE &npe, const size_t n)
 Constructor. More...
 
size_t getN () const
 Get number of hits. More...
 
double getP () const
 Get probability. More...
 
double getP (const double E_GeV) const
 Get muon energy dependent probability. More...
 
double getChi2 (const double E_GeV) const
 Get chi2. More...
 
double getY1 () const
 Get light yield due to muon itself. More...
 
double getY1 (const size_t M) const
 Get expectation value for number of multiple hits. More...
 
double getYA () const
 Get light yield due to delta-rays. More...
 
double getYB () const
 Get light yield due to bremsstrahlung. More...
 
double getZ () const
 Get position along muon path. 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 muon hypothesis as a function of muon energy. More...
 
double getP (const double E_GeV, const bool hit) const
 Get probability for observing a hit or not as a function of muon energy. More...
 
double getP (size_t M) const
 Get probability to observe a hit with given multiplicity. More...
 
double getChi2 (const double E_GeV, const bool hit) const
 Get chi2 for observing a hit or not as a function of muon energy. More...
 
double getY0 () const
 Get expectation value for number of single hits. More...
 

Protected Attributes

size_t __n
 
double y1
 light yield due to minimum ionizing particle [npe] More...
 
double yA
 light yield due to delta-rays [npe*m/GeV] More...
 
double yB
 light yield due to bremsstrahlung [npe/GeV] More...
 
double z
 position along muon path [m] 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 simultaneously handling light yields and response of PMT.

Definition at line 19 of file JNPEHit.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::JNPEHit::JNPEHit ( )
inline

Default constructor.

Definition at line 28 of file JNPEHit.hh.

28  :
29  JNPE(),
30  __n (0)
31  {}
size_t __n
Definition: JNPEHit.hh:93
JNPE()
Default constructor.
Definition: JNPE.hh:34
JFIT::JNPEHit::JNPEHit ( const JNPE npe,
const size_t  n 
)
inline

Constructor.

Parameters
npenpe
nnumber of hits

Definition at line 40 of file JNPEHit.hh.

41  :
42  JNPE(npe),
43  __n (n)
44  {}
size_t __n
Definition: JNPEHit.hh:93
JNPE()
Default constructor.
Definition: JNPE.hh:34
alias put_queue eval echo n
Definition: qlib.csh:19

Member Function Documentation

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

Get number of hits.

Returns
number of hits

Definition at line 52 of file JNPEHit.hh.

53  {
54  return __n;
55  }
size_t __n
Definition: JNPEHit.hh:93
double JFIT::JNPEHit::getP ( ) const
inline

Get probability.

Returns
probability

Definition at line 63 of file JNPEHit.hh.

64  {
65  return this->getP(this->getN());
66  }
size_t getN() const
Get number of hits.
Definition: JNPEHit.hh:52
double getP() const
Get probability.
Definition: JNPEHit.hh:63
double JFIT::JNPEHit::getP ( const double  E_GeV) const
inline

Get muon energy dependent probability.

Parameters
E_GeVenergy [GeV]
Returns
probability

Definition at line 75 of file JNPEHit.hh.

76  {
77  return this->getP(E_GeV, this->getN() > 0);
78  }
size_t getN() const
Get number of hits.
Definition: JNPEHit.hh:52
double getP() const
Get probability.
Definition: JNPEHit.hh:63
double JFIT::JNPEHit::getChi2 ( const double  E_GeV) const
inline

Get chi2.

Parameters
E_GeVenergy [GeV]
Returns
chi2

Definition at line 87 of file JNPEHit.hh.

88  {
89  return this->getChi2(E_GeV, this->getN() > 0);
90  }
size_t getN() const
Get number of hits.
Definition: JNPEHit.hh:52
double getChi2(const double E_GeV) const
Get chi2.
Definition: JNPEHit.hh:87
double JFIT::JNPE::getY1 ( ) const
inlineinherited

Get light yield due to muon itself.

Returns
light yield [npe]

Definition at line 70 of file JNPE.hh.

71  {
72  return y1;
73  }
double y1
light yield due to minimum ionizing particle [npe]
Definition: JNPE.hh:179
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::JNPE::getYA ( ) const
inlineinherited

Get light yield due to delta-rays.

Returns
light yield [npe*m/GeV]

Definition at line 81 of file JNPE.hh.

82  {
83  return yA;
84  }
double yA
light yield due to delta-rays [npe*m/GeV]
Definition: JNPE.hh:180
double JFIT::JNPE::getYB ( ) const
inlineinherited

Get light yield due to bremsstrahlung.

Returns
light yield [npe/GeV]

Definition at line 92 of file JNPE.hh.

93  {
94  return yB;
95  }
double yB
light yield due to bremsstrahlung [npe/GeV]
Definition: JNPE.hh:181
double JFIT::JNPE::getZ ( ) const
inlineinherited

Get position along muon path.

Returns
position along muon path [m]

Definition at line 103 of file JNPE.hh.

104  {
105  return z;
106  }
double z
position along muon path [m]
Definition: JNPE.hh:182
double JFIT::JNPE::getH0 ( ) const
inlineinherited

Expected number of photo-electrons for random background hypothesis.

Returns
light yield [npe]

Definition at line 114 of file JNPE.hh.

115  {
116  return this->JK40::getY0();
117  }
double getY0() const
Get expectation value for number of single hits.
Definition: JK40.hh:100
double JFIT::JNPE::getH0 ( const size_t  M) const
inlineinherited

Expected number of photo-electrons for random background hypothesis.

Parameters
Mmultiplicity
Returns
light yield [npe]

Definition at line 126 of file JNPE.hh.

127  {
128  return this->JK40::getY1(M);
129  }
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::JNPE::getH1 ( const double  E_GeV) const
inlineinherited

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

Parameters
E_GeVenergy [GeV]
Returns
light yield [npe]

Definition at line 138 of file JNPE.hh.

139  {
140  using namespace JPP;
141 
142  const double E = gWater.getE(E_GeV, this->getZ());
143 
145  return (this->getY1() +
146  this->getYA() * getDeltaRaysFromMuon(E) +
147  this->getYB() * E);
148  else
149  return 0.0;
150  }
double getYB() const
Get light yield due to bremsstrahlung.
Definition: JNPE.hh:92
static const double MASS_MUON
muon mass [GeV]
static const double INDEX_OF_REFRACTION_WATER
Average index of refraction of water corresponding to the group velocity.
static const JGeaneWater gWater
Function object for energy loss of muon in sea water.
Definition: JGeane.hh:323
double getYA() const
Get light yield due to delta-rays.
Definition: JNPE.hh:81
double getY1() const
Get light yield due to muon itself.
Definition: JNPE.hh:70
virtual double getE(const double E, const double dx) const override
Get energy of muon after specified distance.
Definition: JGeane.hh:255
double getDeltaRaysFromMuon(const double E)
Equivalent EM-shower energy due to delta-rays per unit muon track length.
Definition: JPDFToolkit.hh:75
double getZ() const
Get position along muon path.
Definition: JNPE.hh:103
then usage $script[input file[working directory[option]]] nWhere option can be E
Definition: JMuonPostfit.sh:35
double JFIT::JNPE::getP ( const double  E_GeV,
const bool  hit 
) const
inlineinherited

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

Parameters
E_GeVenergy [GeV]
hithit
Returns
probability

Definition at line 160 of file JNPE.hh.

161  {
162  return JFIT::getP(this->getH1(E_GeV) + this->getH0(), hit);
163  }
double getH1(const double E_GeV) const
Expected number of photo-electrons for muon hypothesis as a function of muon energy.
Definition: JNPE.hh:138
double getH0() const
Expected number of photo-electrons for random background hypothesis.
Definition: JNPE.hh:114
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 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
double JFIT::JNPE::getChi2 ( const double  E_GeV,
const bool  hit 
) const
inlineinherited

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

Parameters
E_GeVenergy [GeV]
hithit
Returns
probability

Definition at line 173 of file JNPE.hh.

174  {
175  return JFIT::getChi2(this->getH1(E_GeV) + this->getH0(), hit);
176  }
double getH1(const double E_GeV) const
Expected number of photo-electrons for muon hypothesis as a function of muon energy.
Definition: JNPE.hh:138
double getH0() const
Expected number of photo-electrons for random background hypothesis.
Definition: JNPE.hh:114
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

Member Data Documentation

size_t JFIT::JNPEHit::__n
protected

Definition at line 93 of file JNPEHit.hh.

double JFIT::JNPE::y1
protectedinherited

light yield due to minimum ionizing particle [npe]

Definition at line 179 of file JNPE.hh.

double JFIT::JNPE::yA
protectedinherited

light yield due to delta-rays [npe*m/GeV]

Definition at line 180 of file JNPE.hh.

double JFIT::JNPE::yB
protectedinherited

light yield due to bremsstrahlung [npe/GeV]

Definition at line 181 of file JNPE.hh.

double JFIT::JNPE::z
protectedinherited

position along muon path [m]

Definition at line 182 of file JNPE.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: