Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
JPHYSICS::JGeanz Class Reference

Function object for longitudinal profile of EM-shower. More...

#include <JGeanz.hh>

Public Member Functions

 JGeanz (const double __a0, const double __a1, const double __b)
 constructor
 
double getProbability (const double E, const double z) const
 Probability Density Function.
 
double operator() (const double E, const double z) const
 Probability Density Function.
 
double getIntegral (const double E, const double z) const
 Integral of PDF (starting from 0).
 
double getLength (const double E, const double P, const double eps=1.0e-3) const
 Get shower length for a given integrated probability.
 
double getMaximum (const double E) const
 Get depth of shower maximum.
 

Static Public Member Functions

static double getMinimalShowerSize ()
 Get minimal shower size.
 

Protected Attributes

const double a0
 
const double a1
 
const double b
 
const double Emin
 

Detailed Description

Function object for longitudinal profile of EM-shower.

    \f[P(z)  \propto  z^{a-1} \times e^{-z/b}\f]

where:

\[a = a_{0} + a_{1} \times \ln(E)\]

The parametrisation is taken from reference: C. Kopper, "Performance Studies for the KM3NeT Neutrino Telescope.", PhD thesis, University of Erlangen.

Definition at line 31 of file JGeanz.hh.

Constructor & Destructor Documentation

◆ JGeanz()

JPHYSICS::JGeanz::JGeanz ( const double __a0,
const double __a1,
const double __b )
inline

constructor

Parameters
__a0power term (constant)
__a1power term (E dependence)
__bexpontial slope

Definition at line 39 of file JGeanz.hh.

41 :
42 a0(__a0),
43 a1(__a1),
44 b (__b),
45 Emin(exp(-a0/a1))
46 {}
const double a1
Definition JGeanz.hh:182
const double b
Definition JGeanz.hh:183
const double a0
Definition JGeanz.hh:181
const double Emin
Definition JGeanz.hh:184

Member Function Documentation

◆ getProbability()

double JPHYSICS::JGeanz::getProbability ( const double E,
const double z ) const
inline

Probability Density Function.

Parameters
EEM-shower energy [GeV]
zz position of light emission point relative to vertex location (z >= 0) [m]
Returns
dP/dz

Definition at line 56 of file JGeanz.hh.

58 {
59 if (E > Emin) {
60
61 const double a = a0 + a1 * log(E);
62 const double y = pow(z,a-1.0) * exp(-z/b) / (pow(b,a) * std::tgamma(a));
63
64 return y;
65 }
66
67 if (z <= getMinimalShowerSize())
68 return 1.0 / getMinimalShowerSize();
69 else
70 return 0.0;
71 }
static double getMinimalShowerSize()
Get minimal shower size.
Definition JGeanz.hh:175
const double a
T pow(const T &x, const double y)
Power .
Definition JMath.hh:97

◆ operator()()

double JPHYSICS::JGeanz::operator() ( const double E,
const double z ) const
inline

Probability Density Function.

Parameters
EEM-shower energy [GeV]
zz position of light emission point relative to vertex location (z >= 0) [m]
Returns
dP/dz

Definition at line 81 of file JGeanz.hh.

83 {
84 return getProbability(E, z);
85 }
double getProbability(const double E, const double z) const
Probability Density Function.
Definition JGeanz.hh:56

◆ getIntegral()

double JPHYSICS::JGeanz::getIntegral ( const double E,
const double z ) const
inline

Integral of PDF (starting from 0).

Parameters
EEM-shower energy [GeV]
zz position [m] (>= 0)
Returns
dP

Definition at line 95 of file JGeanz.hh.

97 {
98 if (E > Emin) {
99
100 const double a = a0 + a1 * log(E);
101 const double x = z / b;
102 const double y = JMATH::Gamma(a,x);
103
104 return y;
105 }
106
107 if (z <= getMinimalShowerSize())
108 return z / getMinimalShowerSize();
109 else
110 return 1.0;
111 }
double Gamma(const double a, const double x)
Incomplete gamma function.

◆ getLength()

double JPHYSICS::JGeanz::getLength ( const double E,
const double P,
const double eps = 1.0e-3 ) const
inline

Get shower length for a given integrated probability.

Parameters
EEM-shower energy [GeV]
Pintegrated probability [0,1]
epsrelative precision
Returns
shower length [m]

Definition at line 122 of file JGeanz.hh.

125 {
126 double zmin = 0.0; // [m]
127 double zmax = 30.0; // [m]
128
129 if (E > Emin) {
130
131 const double Q = P * (1.0 - eps);
132
133 for (int i = 100; i != 0; --i) {
134
135 const double z = 0.5 * (zmin + zmax);
136 const double p = getIntegral(E, z);
137
138 if (fabs(p-Q) < p*eps) {
139 return z;
140 }
141
142 if (p > P)
143 zmax = z;
144 else
145 zmin = z;
146 }
147
148 return 0.5 * (zmin + zmax);
149
150 } else
151
152 return 0.0;
153 }
double getIntegral(const double E, const double z) const
Integral of PDF (starting from 0).
Definition JGeanz.hh:95

◆ getMaximum()

double JPHYSICS::JGeanz::getMaximum ( const double E) const
inline

Get depth of shower maximum.

Parameters
EEM-shower energy[GeV]
Returns
depth of maximum [m]

Definition at line 162 of file JGeanz.hh.

163 {
164 const double a = a0 + a1 * log(E);
165
166 return (a-1)*b;
167 }

◆ getMinimalShowerSize()

static double JPHYSICS::JGeanz::getMinimalShowerSize ( )
inlinestatic

Get minimal shower size.

Returns
size [m]

Definition at line 175 of file JGeanz.hh.

176 {
177 return 1e-6;
178 }

Member Data Documentation

◆ a0

const double JPHYSICS::JGeanz::a0
protected

Definition at line 181 of file JGeanz.hh.

◆ a1

const double JPHYSICS::JGeanz::a1
protected

Definition at line 182 of file JGeanz.hh.

◆ b

const double JPHYSICS::JGeanz::b
protected

Definition at line 183 of file JGeanz.hh.

◆ Emin

const double JPHYSICS::JGeanz::Emin
protected

Definition at line 184 of file JGeanz.hh.


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