Jpp  18.6.0-rc.1
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Public Attributes | Private Attributes | List of all members
JPHYSICS::JGeanx Class Reference

Probability density function of photon emission from EM-shower as a function of cosine of the emission angle. More...

#include <JGeanx.hh>

Public Member Functions

 JGeanx (const double __a, const double __b, const double __n=getIndexOfRefractionPhase())
 Constructor. More...
 
double operator() (const double ct) const
 Number of photons from EM-shower as a function of emission angle. More...
 
double operator() (const double xmin, const double xmax) const
 Integral number of photons from EM-shower between two emission angles. More...
 
double evaluate (const double ct) const
 Functional dependence. More...
 
double evaluate (const double xmin, const double xmax) const
 Integral. More...
 

Public Attributes

const double a
 power More...
 
const double b
 slope More...
 
const double n
 index of refraction More...
 

Private Attributes

double c
 normalisation constant More...
 

Detailed Description

Probability density function of photon emission from EM-shower as a function of cosine of the emission angle.

\[ P(\cos(\theta)) = c \times e^{b \times |\cos(\theta) - 1/n|^a} \]

where $ c $ is a normalisation constant such that the integral of $ P $ over the full solid angle is one.

The parametrisation is taken from reference: R. Mirani, "Parametrisation of EM-showers in the ANTARES detector volume.", Doctoral thesis in computational physics, University of Amsterdam.

Definition at line 31 of file JGeanx.hh.

Constructor & Destructor Documentation

JPHYSICS::JGeanx::JGeanx ( const double  __a,
const double  __b,
const double  __n = getIndexOfRefractionPhase() 
)
inline

Constructor.

Parameters
__apower
__bexponential slope
__nindex of refraction

Definition at line 41 of file JGeanx.hh.

43  :
44  a(__a),
45  b(__b),
46  n(__n)
47  {
48  const double y = evaluate(-1.0, +1.0);
49 
50  c = 1.0 / (y * 2*PI);
51  }
const double b
slope
Definition: JGeanx.hh:134
const double n
index of refraction
Definition: JGeanx.hh:135
static const double PI
Mathematical constants.
double c
normalisation constant
Definition: JGeanx.hh:138
const double a
power
Definition: JGeanx.hh:133
double evaluate(const double ct) const
Functional dependence.
Definition: JGeanx.hh:89

Member Function Documentation

double JPHYSICS::JGeanx::operator() ( const double  ct) const
inline

Number of photons from EM-shower as a function of emission angle.

The integral over full solid angle is normalised to one.

Parameters
ctcosine angle of emmision
Returns
d^2P/dcos()dphi

Definition at line 61 of file JGeanx.hh.

62  {
63  return c * evaluate(ct);
64  }
double c
normalisation constant
Definition: JGeanx.hh:138
double evaluate(const double ct) const
Functional dependence.
Definition: JGeanx.hh:89
double JPHYSICS::JGeanx::operator() ( const double  xmin,
const double  xmax 
) const
inline

Integral number of photons from EM-shower between two emission angles.

The integral over full solid angle is normalised to one.

Parameters
xminminimal cosine angle of emmision
xmaxmaximal cosine angle of emmision
Returns
dnpe/dphi

Definition at line 75 of file JGeanx.hh.

77  {
78  return c * evaluate(xmin, xmax);
79  }
const double xmax
Definition: JQuadrature.cc:24
double c
normalisation constant
Definition: JGeanx.hh:138
const double xmin
Definition: JQuadrature.cc:23
double evaluate(const double ct) const
Functional dependence.
Definition: JGeanx.hh:89
double JPHYSICS::JGeanx::evaluate ( const double  ct) const
inline

Functional dependence.

In this, the normalisation constant c = 1.

Parameters
ctcosine angle of emmision
Returns
f()

Definition at line 89 of file JGeanx.hh.

90  {
91  const double x = fabs(ct - 1.0/n);
92 
93  return exp(b * pow(x,a));
94  }
const double b
slope
Definition: JGeanx.hh:134
T pow(const T &x, const double y)
Power .
Definition: JMath.hh:97
const double n
index of refraction
Definition: JGeanx.hh:135
const double a
power
Definition: JGeanx.hh:133
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"` source JAcousticsToolkit.sh typeset -A TRIPODS get_tripods $WORKDIR/tripod.txt TRIPODS XMEAN
double JPHYSICS::JGeanx::evaluate ( const double  xmin,
const double  xmax 
) const
inline

Integral.

In this, the normalisation constant c = 1.

Parameters
xminminimal cosine angle of emmision
xmaxmaximal cosine angle of emmision
Returns
integral f() x dcos()

Definition at line 105 of file JGeanx.hh.

107  {
108  using namespace std;
109  using namespace JPP;
110 
111  const double x = 1.0 / n;
112 
113  const double ai = 1.0 / a;
114  const double bi = 1.0 / b;
115 
116  const double xl = pow(fabs(x - xmin), a) * -b;
117  const double xr = pow(fabs(x - xmax), a) * -b;
118 
119  const double gp = tgamma(ai);
120 
121  double yl = Gamma(ai, xl) * gp;
122  double yr = Gamma(ai, xr) * gp;
123 
124  if (xmin > x)
125  yl = -yl;
126  if (xmax < x)
127  yr = -yr;
128 
129  return ai * pow(-bi,ai) * (yl + yr);
130  }
const double xmax
Definition: JQuadrature.cc:24
const double b
slope
Definition: JGeanx.hh:134
double Gamma(const double a, const double x)
Incomplete gamma function.
T pow(const T &x, const double y)
Power .
Definition: JMath.hh:97
const double n
index of refraction
Definition: JGeanx.hh:135
const double xmin
Definition: JQuadrature.cc:23
const double a
power
Definition: JGeanx.hh:133

Member Data Documentation

const double JPHYSICS::JGeanx::a

power

Definition at line 133 of file JGeanx.hh.

const double JPHYSICS::JGeanx::b

slope

Definition at line 134 of file JGeanx.hh.

const double JPHYSICS::JGeanx::n

index of refraction

Definition at line 135 of file JGeanx.hh.

double JPHYSICS::JGeanx::c
private

normalisation constant

Definition at line 138 of file JGeanx.hh.


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