Jpp  15.0.4
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
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 More...
 
double getProbability (const double E, const double z) const
 Probability Density Function. More...
 
double operator() (const double E, const double z) const
 Probability Density Function. More...
 
double getIntegral (const double E, const double z) const
 Integral of PDF (starting from 0). More...
 
double getLength (const double E, const double P, const double eps=1.0e-3) const
 Get shower length for a given integrated probability. More...
 
double getMaximum (const double E) const
 Get depth of shower maximum. More...
 

Static Public Member Functions

static double getMinimalShowerSize ()
 Get minimal shower size. More...
 

Protected Attributes

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

Detailed Description

Function object for longitudinal profile of EM-shower.

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

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

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  {}
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable STRING $argv[2] set_array QUANTILES set_variable FORMULA *[0] exp(-0.5 *(x-[1])*(x-[1])/([2]*[2]))" set_variable MODULE `getModule -a $DETECTOR -L "$STRING 0"` typeset -Z 4 STRING JOpera1D -f hydrophone.root
const double a1
Definition: JGeanz.hh:182
const double a0
Definition: JGeanz.hh:181
const double Emin
Definition: JGeanz.hh:184
const double b
Definition: JGeanz.hh:183

Member Function Documentation

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  }
then usage E
Definition: JMuonPostfit.sh:35
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable STRING $argv[2] set_array QUANTILES set_variable FORMULA *[0] exp(-0.5 *(x-[1])*(x-[1])/([2]*[2]))" set_variable MODULE `getModule -a $DETECTOR -L "$STRING 0"` typeset -Z 4 STRING JOpera1D -f hydrophone.root
const double a1
Definition: JGeanz.hh:182
T pow(const T &x, const double y)
Power .
Definition: JMath.hh:98
const double a0
Definition: JGeanz.hh:181
static double getMinimalShowerSize()
Get minimal shower size.
Definition: JGeanz.hh:175
const double Emin
Definition: JGeanz.hh:184
then JCalibrateToT a
Definition: JTuneHV.sh:116
const double b
Definition: JGeanz.hh:183
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  }
then usage E
Definition: JMuonPostfit.sh:35
double getProbability(const double E, const double z) const
Probability Density Function.
Definition: JGeanz.hh:56
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.
then usage E
Definition: JMuonPostfit.sh:35
const double a1
Definition: JGeanz.hh:182
const double a0
Definition: JGeanz.hh:181
static double getMinimalShowerSize()
Get minimal shower size.
Definition: JGeanz.hh:175
const double Emin
Definition: JGeanz.hh:184
then JCalibrateToT a
Definition: JTuneHV.sh:116
const double b
Definition: JGeanz.hh:183
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  }
Q(UTCMax_s-UTCMin_s)-livetime_s
then usage E
Definition: JMuonPostfit.sh:35
const double Emin
Definition: JGeanz.hh:184
double getIntegral(const double E, const double z) const
Integral of PDF (starting from 0).
Definition: JGeanz.hh:95
then $DIR JPlotNPE PDG P
Definition: JPlotNPE-PDG.sh:62
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  }
then usage E
Definition: JMuonPostfit.sh:35
const double a1
Definition: JGeanz.hh:182
const double a0
Definition: JGeanz.hh:181
then JCalibrateToT a
Definition: JTuneHV.sh:116
const double b
Definition: JGeanz.hh:183
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

const double JPHYSICS::JGeanz::a0
protected

Definition at line 181 of file JGeanz.hh.

const double JPHYSICS::JGeanz::a1
protected

Definition at line 182 of file JGeanz.hh.

const double JPHYSICS::JGeanz::b
protected

Definition at line 183 of file JGeanz.hh.

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: