1 #ifndef __JPHYSICS__JGEANT__
2 #define __JPHYSICS__JGEANT__
19 namespace JPP {
using namespace JPHYSICS; }
55 const double dx = 0.0001)
59 const double n0 = geanx.
n - 0.02;
60 const double n1 = geanx.
n + 0.02;
62 const JGeanx g0(geanx.
a, geanx.
b, n0);
65 const double y0 = g0.
evaluate(-1.0, +1.0);
66 const double y1 = g1.
evaluate(-1.0, +1.0);
68 const double c = 1.0 / (y0 * 2*
PI);
72 for (
double x = -2.0; x < 1.0; x += dx) {
73 (*this)[x] = c * g0.
evaluate(x + 1.0/n0);
80 u = (y1 - y0) / y0 / (n1 - n0);
90 JTOOLS::JGridPolint0Function1D_t::compile();
109 const double ct)
const
113 return y * (
z -
u*n);
128 const double xmax)
const
130 const double x_max = std::min(xmax - 1.0/n,
buffer.rbegin()->getX());
131 const double x_min = std::max(xmin - 1.0/n,
buffer. begin()->getX());
138 return y * (
z -
u*n);
172 out << static_cast<const JTOOLS::JGridPolint0Function1D_t&>(
geant);
double u
slope of the normalisation dependence
Interface for binary output.
JTOOLS::JGridPolint0Function1D_t buffer
static const JGeant geant(geanx, 0.0001)
Function object for the number of photons from EM-shower as a function of emission angle...
friend JReader & operator>>(JReader &in, JGeant &geant)
Read geant from input.
JGeant(const JGeanx &geanx, const double dx=0.0001)
Constructor.
double z
offset of the normalisation dependence
double operator()(const double n, const double xmin, const double xmax) const
Integral number of photons from EM-shower between two emission angles.
const double n
index of refraction
Interface for binary input.
virtual void compile()
Function compilation.
JGeant()
Default constructor.
Photon emission profile EM-shower.
Probability density function of photon emission from EM-shower as a function of cosine of the emissio...
static const JGeanx geanx(0.35,-5.40)
Function object for the number of photons from EM-shower as a function of emission angle...
Function object for the probability density function of photon emission from EM-shower as a function ...
double operator()(const double n, const double ct) const
Number of photons from EM-shower as a function of emission angle.
double evaluate(const double ct) const
Functional dependence.
friend JWriter & operator<<(JWriter &out, const JGeant &geant)
Write geant to output.
Double_t g1(const Double_t x)
Function.