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

Probability Density Functions of the time response of a PMT with an implementation of the JAbstractPMT and JAbstractMedium interfaces via C-like methods. More...

#include <JPDF.hh>

Inheritance diagram for JPHYSICS::JPDF_C:
JPHYSICS::JAbstractPDF JPHYSICS::JPDF JPHYSICS::JDispersion JTOOLS::JGaussLegendre JPHYSICS::JDispersionInterface JPHYSICS::JAbstractPMT JPHYSICS::JAbstractMedium JPHYSICS::JDispersionInterface JTOOLS::JQuadrature JTOOLS::JCollection< JElement2D_t > std::vector< JElement2D_t > JTOOLS::JMappableCollection< JElement2D_t::abscissa_type, JElement2D_t::ordinate_type > JTOOLS::JAbstractCollection< JElement2D_t::abscissa_type > JMATH::JMath< JFirst_t, JSecond_t >

Public Types

typedef JElement2D_t::abscissa_type abscissa_type
 
typedef JElement2D_t::ordinate_type ordinate_type
 
typedef JElement2D_t value_type
 
typedef JDistance_t distance_type
 
typedef JCollection< JElement2D_t, JDistance_t > collection_type
 
typedef std::vector< value_type > container_type
 
typedef container_type::const_iterator const_iterator
 
typedef container_type::const_reverse_iterator const_reverse_iterator
 
typedef container_type::iterator iterator
 
typedef container_type::reverse_iterator reverse_iterator
 
typedef JCollectionElementTransformer< value_type > transformer_type
 
typedef std::pair< const_iterator, bool > pair_type
 
typedef JElement2D_t::abscissa_type key_type
 
typedef JElement2D_t::ordinate_type mapped_type
 

Public Member Functions

 JPDF_C (const double Apmt, double(*pF_qe)(const double), double(*pF_pmt)(const double), double(*pF_l_abs)(const double), double(*pF_ls)(const double), double(*pF_ps)(const double), const double P_atm, const double Wmin, const double Wmax, const int numberOfPoints=20, const double epsilon=1e-12)
 Constructor.
 
virtual double getPhotocathodeArea () const override
 Photo-cathode area of PMT.
 
virtual double getQE (const double lambda) const override
 Quantum efficiency of PMT (incl.
 
virtual double getAngularAcceptance (const double ct) const override
 Angular acceptance of PMT.
 
virtual double getAbsorptionLength (const double lambda) const override
 Absorption length.
 
virtual double getScatteringLength (const double lambda) const override
 Scattering length.
 
virtual double getScatteringProbability (const double ct) const override
 Model specific function to describe light scattering in water (integral over full solid angle normalised to one).
 
double getNumberOfPhotons () const
 Number of Cherenkov photons per unit track length.
 
double getDirectLightFromMuon (const double R_m, const double theta, const double phi) const
 Number of photo-electrons from direct Cherenkov light from muon.
 
double getDirectLightFromMuon (const double R_m, const double theta, const double phi, const double t_ns) const
 Probability density function for direct light from muon.
 
double getScatteredLightFromMuon (const double R_m, const double theta, const double phi, const double t_ns) const
 Probability density function for scattered light from muon.
 
double getScatteredLightFromMuon (const double D_m, const double cd, const double theta, const double phi, const double t_ns) const
 Probability density function for scattered light from muon.
 
double getDirectLightFromEMshowers (const double R_m, const double theta, const double phi, const double t_ns) const
 Probability density function for direct light from EM-showers.
 
double getScatteredLightFromEMshowers (const double R_m, const double theta, const double phi, const double t_ns) const
 Probability density function for scattered light from EM-showers.
 
double getDirectLightFromEMshower (const double D_m, const double cd, const double theta, const double phi, const double t_ns) const
 Probability density function for direct light from EM-shower.
 
double getDirectLightFromEMshower (const double E, const double D_m, const double cd, const double theta, const double phi, const double t_ns) const
 Probability density function for direct light from EM-shower.
 
double getScatteredLightFromEMshower (const double D_m, const double cd, const double theta, const double phi, const double t_ns) const
 Probability density function for scattered light from EM-shower.
 
double getScatteredLightFromEMshower (const double E, const double D_m, const double cd, const double theta, const double phi, const double t_ns) const
 Probability density function for scattered light from EM-shower.
 
double getDirectLightFromDeltaRays (const double R_m, const double theta, const double phi, const double t_ns) const
 Probability density function for direct light from delta-rays.
 
double getScatteredLightFromDeltaRays (const double R_m, const double theta, const double phi, const double t_ns) const
 Probability density function for scattered light from delta-rays.
 
double getDirectLightFromBrightPoint (const double D_m, const double ct, const double t_ns) const
 Probability density function for direct light from isotropic light source.
 
double getScatteredLightFromBrightPoint (const double D_m, const double ct, const double t_ns) const
 Probability density function for scattered light from isotropic light source.
 
double getLightFromMuon (const int type, const double E_GeV, const double R_m, const double theta, const double phi, const double t_ns) const
 Probability density function for light from muon.
 
double getLightFromMuon (const double E_GeV, const double R_m, const double theta, const double phi, const double t_ns) const
 Probability density function for light from muon.
 
double getLightFromEMshower (const int type, const double D_m, const double cd, const double theta, const double phi, const double t_ns) const
 Probability density function for light from EM-shower.
 
double getLightFromEMshower (const double D_m, const double cd, const double theta, const double phi, const double t_ns) const
 Probability density function for light from EM-shower.
 
double getLightFromEMshower (const int type, const double E_GeV, const double D_m, const double cd, const double theta, const double phi, const double t_ns) const
 Probability density function for light from EM-shower.
 
double getLightFromEMshower (const double E_GeV, const double D_m, const double cd, const double theta, const double phi, const double t_ns) const
 Probability density function for light from EM-shower.
 
double getLightFromBrightPoint (const int type, const double D_m, const double ct, const double t_ns) const
 Probability density function for direct light from isotropic light source.
 
double getLightFromBrightPoint (const double D_m, const double ct, const double t_ns) const
 Probability density function for direct light from isotropic light source.
 
virtual void clear () override
 Clear.
 
virtual const ordinate_typeget (typename JClass< abscissa_type >::argument_type x) const override
 Get ordinate value.
 
virtual ordinate_typeget (typename JClass< abscissa_type >::argument_type x) override
 Get ordinate value.
 
virtual int getSize () const override
 Get number of elements.
 
virtual abscissa_type getX (int index) const override
 Get abscissa value.
 
virtual abscissa_type getXmin () const override
 Get minimal abscissa value.
 
virtual abscissa_type getXmax () const override
 Get maximal abscissa value.
 
const ordinate_typegetY (int index) const
 Get ordinate value.
 
ordinate_typegetY (int index)
 Get ordinate value.
 
void transform (const transformer_type &transformer)
 Transform collection.
 
void sort ()
 Sort elements.
 
const_iterator lower_bound (typename JClass< abscissa_type >::argument_type x) const
 Get first position of element i, where x >= i->getX().
 
iterator lower_bound (typename JClass< abscissa_type >::argument_type x)
 Get first position of element i, where x >= i->getX().
 
pair_type insert (const value_type &element)
 Insert element.
 
void configure (const JAbstractCollection< abscissa_type > &bounds)
 Configure collection.
 
void configure (const JAbstractCollection< abscissa_type > &bounds, typename JClass< ordinate_type >::argument_type value)
 Configure collection.
 
void configure (const JAbstractCollection< abscissa_type > &bounds, const JFunction1D_t &function)
 Configure collection.
 
bool is_compatible (const JCollection &collection) const
 Test whether collections are compatible.
 
bool in_range (typename JClass< abscissa_type >::argument_type x) const
 Check if given abscissa is in range of this collection.
 
JCollection & negate ()
 Negate collection.
 
JCollection & add (const JCollection &collection)
 Add collection.
 
JCollection & add (typename JClass< ordinate_type >::argument_type value)
 Add offset.
 
JCollection & add (const JFunction1D_t &function)
 Add function.
 
JCollection & sub (const JCollection &collection)
 Subtract collection.
 
JCollection & sub (typename JClass< ordinate_type >::argument_type value)
 Subtract offset.
 
JCollection & sub (const JFunction1D_t &function)
 Subtract function.
 
JCollection & mul (const double value)
 Scale contents.
 
JFirst_t & mul (const JSecond_t &object)
 Multiply with object.
 
JCollection & div (const double value)
 Scale contents.
 
const JComparator & getComparator () const
 Get comparator.
 
const mapped_typeoperator[] (typename JClass< key_type >::argument_type key) const
 Get mapped value.
 
mapped_typeoperator[] (typename JClass< key_type >::argument_type key)
 Get mapped value.
 
void put (typename JClass< key_type > ::argument_type key, typename JClass< mapped_type >::argument_type value)
 Put pair-wise element (key,value) into collection.
 
bool is_equal (const JAbstractCollection &collection) const
 Test whether abstract collections are equal.
 
virtual double getIndexOfRefractionPhase (const double lambda) const
 Index of refraction (phase velocity).
 
virtual double getDispersionPhase (const double lambda) const
 Dispersion of light for phase velocity.
 
virtual double getIndexOfRefractionGroup (const double lambda) const
 Index of refraction for group velocity.
 
virtual double getDispersionGroup (const double lambda) const
 Dispersion of light for group velocity.
 
double getKappa (const double lambda) const
 Get effective index of refraction for muon light.
 
double getKmin (const double lambda) const
 Get smallest index of refraction for Bremsstrahlung light (i.e. point at which dt/dz = 0).
 

Public Attributes

JDistance_t getDistance
 Function object for distance evaluation.
 
const double P
 Dispersion parameters (x = 1/lambda)
 
const double a0
 offset
 
const double a1
 dn/dP
 
const double a2
 d^1n/(dx)^1
 
const double a3
 d^2n/(dx)^2
 
const double a4
 d^3n/(dx)^3

 

Protected Member Functions

virtual double getWavelength (const double n, const double eps=1.0e-10) const
 Determine wavelength for a given index of refraction corresponding to the group velocity.
 
virtual double getWavelength (const double n, const double w, const double eps) const
 Determine wavelength for a given index of refraction corresponding to the group velocity.
 
virtual double getInverseAttenuationLength (const double l_abs, const double ls, const double cts) const
 Get the inverse of the attenuation length.
 
void resize (typename container_type::size_type size)
 Resize collection.
 

Static Protected Member Functions

static double getRmin ()
 minimal distance of approach of muon to PMT [m]
 

Protected Attributes

const double A
 photo-cathode area [m2]
 
double(* qe )(const double lambda)
 Quantum efficiency of PMT (incl.
 
double(* l_abs )(const double lambda)
 Absorption length.
 
double(* ls )(const double lambda)
 Scattering length.
 
double(* pmt )(const double ct)
 Angular acceptance of PMT.
 
double(* ps )(const double ct)
 Model specific function to describe light scattering in water.
 
const double wmin
 Integration limits.
 
const double wmax
 maximal wavelength for integration [nm]
 
std::vector< element_typephd
 fast evaluation of phi integral
 
JComparator compare
 Function object for comparison.
 

Private Types

typedef JTOOLS::JElement2D< double, double > element_type
 

Private Member Functions

void erase ()
 
void push_back ()
 
void pop_back ()
 

Detailed Description

Probability Density Functions of the time response of a PMT with an implementation of the JAbstractPMT and JAbstractMedium interfaces via C-like methods.

Definition at line 2184 of file JPDF.hh.

Member Typedef Documentation

◆ element_type

JTOOLS::JElement2D<double, double> JPHYSICS::JPDF::element_type
privateinherited

Definition at line 285 of file JPDF.hh.

◆ abscissa_type

JElement2D_t::abscissa_type JTOOLS::JCollection< JElement2D_t, JDistance_t >::abscissa_type
inherited

Definition at line 82 of file JCollection.hh.

◆ ordinate_type

JElement2D_t::ordinate_type JTOOLS::JCollection< JElement2D_t, JDistance_t >::ordinate_type
inherited

Definition at line 83 of file JCollection.hh.

◆ value_type

JElement2D_t JTOOLS::JCollection< JElement2D_t, JDistance_t >::value_type
inherited

Definition at line 84 of file JCollection.hh.

◆ distance_type

JDistance_t JTOOLS::JCollection< JElement2D_t, JDistance_t >::distance_type
inherited

Definition at line 85 of file JCollection.hh.

◆ collection_type

JCollection<JElement2D_t, JDistance_t> JTOOLS::JCollection< JElement2D_t, JDistance_t >::collection_type
inherited

Definition at line 87 of file JCollection.hh.

◆ container_type

std::vector<value_type> JTOOLS::JCollection< JElement2D_t, JDistance_t >::container_type
inherited

Definition at line 89 of file JCollection.hh.

◆ const_iterator

container_type::const_iterator JTOOLS::JCollection< JElement2D_t, JDistance_t >::const_iterator
inherited

Definition at line 91 of file JCollection.hh.

◆ const_reverse_iterator

container_type::const_reverse_iterator JTOOLS::JCollection< JElement2D_t, JDistance_t >::const_reverse_iterator
inherited

Definition at line 92 of file JCollection.hh.

◆ iterator

container_type::iterator JTOOLS::JCollection< JElement2D_t, JDistance_t >::iterator
inherited

Definition at line 93 of file JCollection.hh.

◆ reverse_iterator

container_type::reverse_iterator JTOOLS::JCollection< JElement2D_t, JDistance_t >::reverse_iterator
inherited

Definition at line 94 of file JCollection.hh.

◆ transformer_type

JCollectionElementTransformer<value_type> JTOOLS::JCollection< JElement2D_t, JDistance_t >::transformer_type
inherited

Definition at line 96 of file JCollection.hh.

◆ pair_type

std::pair<const_iterator, bool> JTOOLS::JCollection< JElement2D_t, JDistance_t >::pair_type
inherited

Definition at line 97 of file JCollection.hh.

◆ key_type

◆ mapped_type

Constructor & Destructor Documentation

◆ JPDF_C()

JPHYSICS::JPDF_C::JPDF_C ( const double Apmt,
double(* pF_qe )(const double),
double(* pF_pmt )(const double),
double(* pF_l_abs )(const double),
double(* pF_ls )(const double),
double(* pF_ps )(const double),
const double P_atm,
const double Wmin,
const double Wmax,
const int numberOfPoints = 20,
const double epsilon = 1e-12 )
inline

Constructor.

Parameters
Apmtphoto-cathode area [m^2]
pF_qepointer to function for quantum efficiency of PMT
pF_pmtpointer to function for angular acceptance of PMT
pF_l_abspointer to function for absorption length [m]
pF_lspointer to function for scattering length [m]
pF_pspointer to model specific function to describe light scattering in water
P_atmambient pressure [atm]
Wminminimal wavelength for integration [nm]
Wmaxmaximal wavelength for integration [nm]
numberOfPointsnumber of points for integration
epsilonprecision of points for integration

Definition at line 2203 of file JPDF.hh.

2219 :
2220 JAbstractPDF(P_atm, Wmin, Wmax, numberOfPoints, epsilon),
2221 A (Apmt),
2222 qe (pF_qe),
2223 l_abs(pF_l_abs),
2224 ls (pF_ls),
2225 pmt (pF_pmt),
2226 ps (pF_ps)
2227 {}
int numberOfPoints
Definition JResultPDF.cc:22
JAbstractPDF(const double P_atm, const double Wmin, const double Wmax, const int numberOfPoints=20, const double epsilon=1e-12)
Constructor.
Definition JPDF.hh:2169
const double A
photo-cathode area [m2]
Definition JPDF.hh:2305
double(* ls)(const double lambda)
Scattering length.
Definition JPDF.hh:2329
double(* pmt)(const double ct)
Angular acceptance of PMT.
Definition JPDF.hh:2337
double(* qe)(const double lambda)
Quantum efficiency of PMT (incl.
Definition JPDF.hh:2313
double(* l_abs)(const double lambda)
Absorption length.
Definition JPDF.hh:2321
double(* ps)(const double ct)
Model specific function to describe light scattering in water.
Definition JPDF.hh:2345

Member Function Documentation

◆ getPhotocathodeArea()

virtual double JPHYSICS::JPDF_C::getPhotocathodeArea ( ) const
inlineoverridevirtual

Photo-cathode area of PMT.

Returns
photo-cathode area [m^2]

Implements JPHYSICS::JAbstractPMT.

Definition at line 2235 of file JPDF.hh.

2236 {
2237 return A;
2238 }

◆ getQE()

virtual double JPHYSICS::JPDF_C::getQE ( const double lambda) const
inlineoverridevirtual

Quantum efficiency of PMT (incl.

absorption in glass, gel, etc.).

Parameters
lambdawavelenth [nm]
Returns
QE

Implements JPHYSICS::JAbstractPMT.

Definition at line 2247 of file JPDF.hh.

2248 {
2249 return qe(lambda);
2250 }

◆ getAngularAcceptance()

virtual double JPHYSICS::JPDF_C::getAngularAcceptance ( const double ct) const
inlineoverridevirtual

Angular acceptance of PMT.

Parameters
ctcosine angle of incidence
Returns
relative efficiency

Implements JPHYSICS::JAbstractPMT.

Definition at line 2259 of file JPDF.hh.

2260 {
2261 return pmt(ct);
2262 }

◆ getAbsorptionLength()

virtual double JPHYSICS::JPDF_C::getAbsorptionLength ( const double lambda) const
inlineoverridevirtual

Absorption length.

Parameters
lambdawavelenth [nm]
Returns
absorption length [m]

Implements JPHYSICS::JAbstractMedium.

Definition at line 2271 of file JPDF.hh.

2272 {
2273 return l_abs(lambda);
2274 }

◆ getScatteringLength()

virtual double JPHYSICS::JPDF_C::getScatteringLength ( const double lambda) const
inlineoverridevirtual

Scattering length.

Parameters
lambdawavelenth [nm]
Returns
scattering length [m]

Implements JPHYSICS::JAbstractMedium.

Definition at line 2283 of file JPDF.hh.

2284 {
2285 return ls(lambda);
2286 }

◆ getScatteringProbability()

virtual double JPHYSICS::JPDF_C::getScatteringProbability ( const double ct) const
inlineoverridevirtual

Model specific function to describe light scattering in water (integral over full solid angle normalised to one).

Parameters
ctcosine scattering angle
Returns
probability

Implements JPHYSICS::JAbstractMedium.

Definition at line 2296 of file JPDF.hh.

2297 {
2298 return ps(ct);
2299 }

◆ getNumberOfPhotons()

double JPHYSICS::JPDF::getNumberOfPhotons ( ) const
inlineinherited

Number of Cherenkov photons per unit track length.

Returns
number of photons per unit track length [m^-1]

Definition at line 326 of file JPDF.hh.

327 {
328 double value = 0.0;
329
330 const double xmin = 1.0 / wmax;
331 const double xmax = 1.0 / wmin;
332
333 for (const_iterator i = begin(); i != end(); ++i) {
334
335 const double x = 0.5 * (xmax + xmin) + i->getX() * 0.5 * (xmax - xmin);
336 const double dx = i->getY() * 0.5 * (xmax - xmin);
337
338 const double w = 1.0 / x;
339 const double dw = dx * w*w;
340
341 const double n = getIndexOfRefractionPhase(w);
342
343 value += cherenkov(w,n) * dw;
344 }
345
346 return value;
347 }
const double wmax
maximal wavelength for integration [nm]
Definition JPDF.hh:2145
const double wmin
Integration limits.
Definition JPDF.hh:2144
container_type::const_iterator const_iterator
double cherenkov(const double lambda, const double n)
Number of Cherenkov photons per unit track length and per unit wavelength.
double getIndexOfRefractionPhase()
Get average index of refraction of water corresponding to phase velocity.
const int n
Definition JPolint.hh:791

◆ getDirectLightFromMuon() [1/2]

double JPHYSICS::JPDF::getDirectLightFromMuon ( const double R_m,
const double theta,
const double phi ) const
inlineinherited

Number of photo-electrons from direct Cherenkov light from muon.

Parameters
R_mdistance between muon and PMT [m]
thetazenith angle orientation PMT [rad]
phiazimuth angle orientation PMT [rad]
Returns
P [npe]

Definition at line 358 of file JPDF.hh.

361 {
362 double value = 0;
363
364 const double R = std::max(R_m, getRmin());
365 const double A = getPhotocathodeArea();
366
367 const double px = sin(theta)*cos(phi);
368 const double pz = cos(theta);
369
370 for (const_iterator m = begin(); m != end(); ++m) {
371
372 const double w = 0.5 * (wmax + wmin) + m->getX() * 0.5 * (wmax - wmin);
373 const double dw = m->getY() * 0.5 * (wmax - wmin);
374
375 const double n = getIndexOfRefractionPhase(w);
376
377 const double l_abs = getAbsorptionLength(w);
378 const double ls = getScatteringLength(w);
379
380 const double npe = cherenkov(w,n) * dw * getQE(w);
381
382 const double ct0 = 1.0 / n;
383 const double st0 = sqrt((1.0 + ct0)*(1.0 - ct0));
384
385 const double d = R / st0; // distance traveled by photon
386 const double ct = st0*px + ct0*pz; // cosine angle of incidence on PMT
387
388 const double U = getAngularAcceptance(ct); // PMT angular acceptance
389 const double V = exp(-d/l_abs) * exp(-d/ls); // absorption & scattering
390 const double W = A / (2.0*PI*R*st0); // solid angle
391
392 value += npe * U * V * W;
393 }
394
395 return value;
396 }
virtual double getAbsorptionLength(const double lambda) const =0
Absorption length.
virtual double getScatteringLength(const double lambda) const =0
Scattering length.
virtual double getPhotocathodeArea() const =0
Photo-cathode area of PMT.
virtual double getQE(const double lambda) const =0
Quantum efficiency of PMT (incl.
virtual double getAngularAcceptance(const double ct) const =0
Angular acceptence of PMT.
static double getRmin()
minimal distance of approach of muon to PMT [m]
Definition JPDF.hh:2100

◆ getDirectLightFromMuon() [2/2]

double JPHYSICS::JPDF::getDirectLightFromMuon ( const double R_m,
const double theta,
const double phi,
const double t_ns ) const
inlineinherited

Probability density function for direct light from muon.

Parameters
R_mdistance between muon and PMT [m]
thetazenith angle orientation PMT [rad]
phiazimuth angle orientation PMT [rad]
t_nstime difference relative to direct Cherenkov light [ns]
Returns
dP/dt [npe/ns]

Definition at line 408 of file JPDF.hh.

412 {
413 static const int N = 100; // maximal number of iterations
414 static const double eps = 1.0e-6; // precision index of refraction
415
416 const double R = std::max(R_m, getRmin());
417 const double t = R * getTanThetaC() / C + t_ns; // time [ns]
418 const double a = C*t/R; // target value
419 const double A = getPhotocathodeArea();
420
421 const double px = sin(theta)*cos(phi);
422 const double pz = cos(theta);
423
424 // check validity range for index of refraction
425
426 for (double buffer[] = { wmin, wmax, 0.0 }, *p = buffer; *p != 0.0; ++p) {
427
428 const double n = getIndexOfRefractionPhase(*p);
429 const double ng = getIndexOfRefractionGroup(*p);
430
431 const double ct0 = 1.0 / n;
432 const double st0 = sqrt((1.0 + ct0)*(1.0 - ct0));
433
434 const double b = (ng - ct0) / st0; // running value
435
436 if (*p == wmin && b < a) { return 0.0; }
437 if (*p == wmax && b > a) { return 0.0; }
438 }
439
440
441 double umin = wmin;
442 double umax = wmax;
443
444 for (int i = 0; i != N; ++i) { // binary search for wavelength
445
446 const double w = 0.5 * (umin + umax);
447
448 const double n = getIndexOfRefractionPhase(w);
449 const double ng = getIndexOfRefractionGroup(w);
450
451 const double ct0 = 1.0 / n;
452 const double st0 = sqrt((1.0 + ct0)*(1.0 - ct0));
453
454 const double b = (ng - ct0) / st0; // running value
455
456 if (fabs(b-a) < a*eps) {
457
458 const double np = getDispersionPhase(w);
459 const double ngp = getDispersionGroup(w);
460
461 const double l_abs = getAbsorptionLength(w);
462 const double ls = getScatteringLength(w);
463
464 const double d = R / st0; // distance traveled by photon
465 const double ct = st0*px + ct0*pz; // cosine angle of incidence on PMT
466
467 const double i3 = ct0*ct0*ct0 / (st0*st0*st0);
468
469 const double U = getAngularAcceptance(ct); // PMT angular acceptance
470 const double V = exp(-d/l_abs - d/ls); // absorption & scattering
471 const double W = A / (2.0*PI*R*st0); // solid angle
472
473 const double Ja = R * (ngp/st0 + np*(n-ng)*i3) / C; // dt/dlambda
474
475 return cherenkov(w,n) * getQE(w) * U * V * W / fabs(Ja);
476 }
477
478 if (b > a)
479 umin = w;
480 else
481 umax = w;
482 }
483
484 return 0.0;
485 }
virtual double getIndexOfRefractionGroup(const double lambda) const
Index of refraction for group velocity.
virtual double getDispersionGroup(const double lambda) const =0
Dispersion of light for group velocity.
virtual double getDispersionPhase(const double lambda) const =0
Dispersion of light for phase velocity.
double getTanThetaC()
Get average tangent of Cherenkov angle of water corresponding to group velocity.

◆ getScatteredLightFromMuon() [1/2]

double JPHYSICS::JPDF::getScatteredLightFromMuon ( const double R_m,
const double theta,
const double phi,
const double t_ns ) const
inlineinherited

Probability density function for scattered light from muon.

Parameters
R_mdistance between muon and PMT [m]
thetazenith angle orientation PMT [rad]
phiazimuth angle orientation PMT [rad]
t_nstime difference relative to direct Cherenkov light [ns]
Returns
dP/dt [npe/ns]

Definition at line 497 of file JPDF.hh.

501 {
502 static const double eps = 1.0e-10;
503
504 double value = 0;
505
506 const double R = std::max(R_m, getRmin());
507 const double t = R * getTanThetaC() / C + t_ns; // time [ns]
508 const double A = getPhotocathodeArea();
509
510 const double px = sin(theta)*cos(phi);
511 const double py = sin(theta)*sin(phi);
512 const double pz = cos(theta);
513
514 const double n0 = getIndexOfRefractionGroup(wmax);
515 const double n1 = getIndexOfRefractionGroup(wmin);
516 const double ni = sqrt(R*R + C*t*C*t) / R; // maximal index of refraction
517
518 if (n0 >= ni) {
519 return value;
520 }
521
522 const double nj = std::min(ni,n1);
523
524 double w = wmax;
525
526 for (const_iterator i = begin(); i != end(); ++i) {
527
528 const double ng = 0.5 * (nj + n0) + i->getX() * 0.5 * (nj - n0);
529 const double dn = i->getY() * 0.5 * (nj - n0);
530
531 w = getWavelength(ng, w, 1.0e-5);
532
533 const double dw = dn / fabs(getDispersionGroup(w));
534
535 const double n = getIndexOfRefractionPhase(w);
536
537 const double l_abs = getAbsorptionLength(w);
538 const double ls = getScatteringLength(w);
539
540 const double npe = cherenkov(w,n) * dw * getQE(w);
541
542 if (npe <= 0) { continue; }
543
544 const double Jc = 1.0 / ls; // dN/dx
545
546 const double ct0 = 1.0 / n; // photon direction before scattering
547 const double st0 = sqrt((1.0 + ct0)*(1.0 - ct0));
548
549 JRoot rz(R, ng, t); // square root
550
551 if (!rz.is_valid) { continue; }
552
553 const double zmin = rz.first;
554 const double zmax = rz.second;
555
556 const double zap = 1.0 / l_abs;
557
558 const double xmin = exp(zap*zmax);
559 const double xmax = exp(zap*zmin);
560
561 for (const_iterator j = begin(); j != end(); ++j) {
562
563 const double x = 0.5 * (xmax + xmin) + j->getX() * 0.5 * (xmax - xmin);
564 const double dx = j->getY() * 0.5 * (xmax - xmin);
565
566 const double z = log(x) / zap;
567 const double dz = -dx / (zap*x);
568
569 const double D = sqrt(z*z + R*R);
570 const double cd = -z / D;
571 const double sd = R / D;
572
573 const double d = (C*t - z) / ng; // photon path
574
575 //const double V = exp(-d/l_abs); // absorption
576
577 const double cta = cd*ct0 + sd*st0;
578 const double dca = d - 0.5*(d+D)*(d-D) / (d - D*cta);
579 const double tip = -log(D*D/(dca*dca) + eps) / PI;
580
581 const double ymin = exp(tip*PI);
582 const double ymax = 1.0;
583
584 for (const_iterator k = begin(); k != end(); ++k) {
585
586 const double y = 0.5 * (ymax + ymin) + k->getX() * 0.5 * (ymax - ymin);
587 const double dy = k->getY() * 0.5 * (ymax - ymin);
588
589 const double phi = log(y) / tip;
590 const double dp = -dy / (tip*y);
591
592 const double cp0 = cos(phi);
593 const double sp0 = sin(phi);
594
595 const double u = (R*R + z*z - d*d) / (2*R*st0*cp0 - 2*z*ct0 - 2*d);
596 const double v = d - u;
597
598 if (u <= 0) { continue; }
599 if (v <= 0) { continue; }
600
601 const double vi = 1.0 / v;
602 const double cts = (R*st0*cp0 - z*ct0 - u)*vi; // cosine scattering angle
603
604 const double V = exp(-d*getInverseAttenuationLength(l_abs, ls, cts));
605
606 if (cts < 0.0 && v * sqrt((1.0 + cts) * (1.0 - cts)) < MODULE_RADIUS_M) { continue; }
607
608 const double vx = R - u*st0*cp0;
609 const double vy = - u*st0*sp0;
610 const double vz = -z - u*ct0;
611
612 const double ct[] = { // cosine angle of incidence on PMT
613 (vx*px + vy*py + vz*pz) * vi,
614 (vx*px - vy*py + vz*pz) * vi
615 };
616
617 const double U =
618 getAngularAcceptance(ct[0]) +
619 getAngularAcceptance(ct[1]); // PMT angular acceptance
620 const double W = std::min(A*vi*vi, 2.0*PI); // solid angle
621
622 const double Ja = getScatteringProbability(cts); // d^2P/dcos/dphi
623 const double Jd = ng * (1.0 - cts) / C; // dt/du
624
625 value += (npe * dz * dp / (2*PI)) * U * V * W * Ja * Jc / fabs(Jd);
626 }
627 }
628 }
629
630 return value;
631 }
virtual double getScatteringProbability(const double ct) const =0
Model specific function to describe light scattering in water (integral over full solid angle normali...
virtual double getInverseAttenuationLength(const double l_abs, const double ls, const double cts) const
Get the inverse of the attenuation length.
Definition JPDF.hh:2111
virtual double getWavelength(const double n, const double eps=1.0e-10) const
Determine wavelength for a given index of refraction corresponding to the group velocity.
Definition JPDF.hh:2039
static double MODULE_RADIUS_M
Radius of optical module [m].
Definition JPDF.hh:41
int j
Definition JPolint.hh:801

◆ getScatteredLightFromMuon() [2/2]

double JPHYSICS::JPDF::getScatteredLightFromMuon ( const double D_m,
const double cd,
const double theta,
const double phi,
const double t_ns ) const
inlineinherited

Probability density function for scattered light from muon.

Parameters
D_mdistance between track segment and PMT [m]
cdcosine angle muon direction and track segment - PMT position
thetazenith angle orientation PMT [rad]
phiazimuth angle orientation PMT [rad]
t_nstime difference relative to direct Cherenkov light [ns]
Returns
d^2P/dt/dx [npe/ns/m]

Definition at line 879 of file JPDF.hh.

884 {
885 static const double eps = 1.0e-10;
886
887 double value = 0;
888
889 const double sd = sqrt((1.0 + cd)*(1.0 - cd));
890 const double D = std::max(D_m, getRmin());
891 const double R = sd * D; // minimal distance of approach [m]
892 const double Z = -cd * D; // photon emission point
893 const double L = D;
894 const double t = D * getIndexOfRefraction() / C + t_ns; // time [ns]
895 const double A = getPhotocathodeArea();
896
897 const double px = sin(theta)*cos(phi);
898 const double py = sin(theta)*sin(phi);
899 const double pz = cos(theta);
900
901 const double n0 = getIndexOfRefractionGroup(wmax);
902 const double n1 = getIndexOfRefractionGroup(wmin);
903
904 const double ni = C*t / L; // maximal index of refraction
905
906 if (n0 >= ni) {
907 return value;
908 }
909
910 const double nj = std::min(ni,n1);
911
912 double w = wmax;
913
914 for (const_iterator i = begin(); i != end(); ++i) {
915
916 const double ng = 0.5 * (nj + n0) + i->getX() * 0.5 * (nj - n0);
917 const double dn = i->getY() * 0.5 * (nj - n0);
918
919 w = getWavelength(ng, w, 1.0e-5);
920
921 const double dw = dn / fabs(getDispersionGroup(w));
922
923 const double n = getIndexOfRefractionPhase(w);
924
925 const double l_abs = getAbsorptionLength(w);
926 const double ls = getScatteringLength(w);
927
928 const double npe = cherenkov(w,n) * dw * getQE(w);
929
930 if (npe <= 0) { continue; }
931
932 const double Jc = 1.0 / ls; // dN/dx
933
934 const double ct0 = 1.0 / n; // photon direction before scattering
935 const double st0 = sqrt((1.0 + ct0)*(1.0 - ct0));
936
937 const double d = C*t / ng; // photon path
938
939 //const double V = exp(-d/l_abs); // absorption
940
941 const double cta = cd*ct0 + sd*st0;
942 const double dca = d - 0.5*(d+L)*(d-L) / (d - L*cta);
943 const double tip = -log(L*L/(dca*dca) + eps) / PI;
944
945 const double ymin = exp(tip*PI);
946 const double ymax = 1.0;
947
948 for (const_iterator j = begin(); j != end(); ++j) {
949
950 const double y = 0.5 * (ymax + ymin) + j->getX() * 0.5 * (ymax - ymin);
951 const double dy = j->getY() * 0.5 * (ymax - ymin);
952
953 const double phi = log(y) / tip;
954 const double dp = -dy / (tip*y);
955
956 const double cp0 = cos(phi);
957 const double sp0 = sin(phi);
958
959 const double u = (R*R + Z*Z - d*d) / (2*R*st0*cp0 - 2*Z*ct0 - 2*d);
960 const double v = d - u;
961
962 if (u <= 0) { continue; }
963 if (v <= 0) { continue; }
964
965 const double vi = 1.0 / v;
966 const double cts = (R*st0*cp0 - Z*ct0 - u)*vi; // cosine scattering angle
967
968 const double V = exp(-d*getInverseAttenuationLength(l_abs, ls, cts));
969
970 if (cts < 0.0 && v * sqrt((1.0 + cts) * (1.0 - cts)) < MODULE_RADIUS_M) { continue; }
971
972 const double vx = R - u*st0*cp0;
973 const double vy = - u*st0*sp0;
974 const double vz = -Z - u*ct0;
975
976 const double ct[] = { // cosine angle of incidence on PMT
977 (vx*px + vy*py + vz*pz) * vi,
978 (vx*px - vy*py + vz*pz) * vi
979 };
980
981 const double U =
982 getAngularAcceptance(ct[0]) +
983 getAngularAcceptance(ct[1]); // PMT angular acceptance
984 const double W = std::min(A*vi*vi, 2.0*PI); // solid angle
985
986 const double Ja = getScatteringProbability(cts); // d^2P/dcos/dphi
987 const double Jd = ng * (1.0 - cts) / C; // dt/du
988
989 value += (npe * dp / (2*PI)) * U * V * W * Ja * Jc / fabs(Jd);
990 }
991 }
992
993 return value;
994 }
double getIndexOfRefraction()
Get average index of refraction of water corresponding to group velocity.

◆ getDirectLightFromEMshowers()

double JPHYSICS::JPDF::getDirectLightFromEMshowers ( const double R_m,
const double theta,
const double phi,
const double t_ns ) const
inlineinherited

Probability density function for direct light from EM-showers.

Parameters
R_mdistance between muon and PMT [m]
thetazenith angle orientation PMT [rad]
phiazimuth angle orientation PMT [rad]
t_nstime difference relative to direct Cherenkov light [ns]
Returns
dP/dt [npe/ns/GeV]

Definition at line 643 of file JPDF.hh.

647 {
648 double value = 0;
649
650 const double R = std::max(R_m, getRmin());
651 const double t = R * getTanThetaC() / C + t_ns; // time [ns]
652 const double A = getPhotocathodeArea();
653 const double D = 2.0*sqrt(A/PI);
654
655 const double px = sin(theta)*cos(phi);
656 //const double py = sin(theta)*sin(phi);
657 const double pz = cos(theta);
658
659 const double n0 = getIndexOfRefractionGroup(wmax);
660 const double n1 = getIndexOfRefractionGroup(wmin);
661 const double ni = sqrt(R*R + C*t*C*t) / R; // maximal index of refraction
662
663 if (n0 >= ni) {
664 return value;
665 }
666
667 const double nj = std::min(n1, ni);
668
669 double w = wmax;
670
671 for (const_iterator i = begin(); i != end(); ++i) {
672
673 const double ng = 0.5 * (nj + n0) + i->getX() * 0.5 * (nj - n0);
674 const double dn = i->getY() * 0.5 * (nj - n0);
675
676 w = getWavelength(ng, w, 1.0e-5);
677
678 const double dw = dn / fabs(getDispersionGroup(w));
679
680 const double n = getIndexOfRefractionPhase(w);
681
682 const double l_abs = getAbsorptionLength(w);
683 const double ls = getScatteringLength(w);
684
685 const double npe = cherenkov(w,n) * dw * getQE(w);
686
687 JRoot rz(R, ng, t); // square root
688
689 if (!rz.is_valid) { continue; }
690
691 for (int j = 0; j != 2; ++j) {
692
693 const double z = rz[j];
694
695 if (C*t <= z) continue;
696
697 const double d = sqrt(z*z + R*R); // distance traveled by photon
698
699 const double ct0 = -z / d;
700 const double st0 = R / d;
701
702 const double dz = D / st0; // average track length
703
704 const double ct = st0*px + ct0*pz; // cosine angle of incidence on PMT
705
706 const double U = getAngularAcceptance(ct); // PMT angular acceptance
707 const double V = exp(-d/l_abs - d/ls); // absorption & scattering
708 const double W = A/(d*d); // solid angle
709
710 const double Ja = geant(n,ct0); // d^2N/dcos/dphi
711 const double Jd = (1.0 - ng*ct0) / C; // d t/ dz
712 const double Je = ng*st0*st0*st0 / (R*C); // d^2t/(dz)^2
713
714 value += gWater() * npe * U * V * W * Ja / (fabs(Jd) + 0.5*Je*dz);
715 }
716 }
717
718 return value;
719 }
static const JGeaneWater gWater
Function object for energy loss of muon in sea water.
Definition JGeane.hh:381
static const JGeant geant(geanx, 0.0001)
Function object for the number of photons from EM-shower as a function of emission angle.
static const double C
Physics constants.

◆ getScatteredLightFromEMshowers()

double JPHYSICS::JPDF::getScatteredLightFromEMshowers ( const double R_m,
const double theta,
const double phi,
const double t_ns ) const
inlineinherited

Probability density function for scattered light from EM-showers.

Parameters
R_mdistance between muon and PMT [m]
thetazenith angle orientation PMT [rad]
phiazimuth angle orientation PMT [rad]
t_nstime difference relative to direct Cherenkov light [ns]
Returns
dP/dt [npe/ns/GeV]

Definition at line 731 of file JPDF.hh.

735 {
736 double value = 0;
737
738 const double R = std::max(R_m, getRmin());
739 const double t = R * getTanThetaC() / C + t_ns; // time [ns]
740 const double A = getPhotocathodeArea();
741
742 const double px = sin(theta)*cos(phi);
743 const double py = sin(theta)*sin(phi);
744 const double pz = cos(theta);
745
746 const double n0 = getIndexOfRefractionGroup(wmax);
747 const double n1 = getIndexOfRefractionGroup(wmin);
748 const double ni = sqrt(R*R + C*t*C*t) / R; // maximal index of refraction
749
750 if (n0 >= ni) {
751 return value;
752 }
753
754 const double nj = std::min(ni,n1);
755
756 double w = wmax;
757
758 for (const_iterator i = begin(); i != end(); ++i) {
759
760 const double ng = 0.5 * (nj + n0) + i->getX() * 0.5 * (nj - n0);
761 const double dn = i->getY() * 0.5 * (nj - n0);
762
763 w = getWavelength(ng, w, 1.0e-5);
764
765 const double dw = dn / fabs(getDispersionGroup(w));
766
767 const double n = getIndexOfRefractionPhase(w);
768
769 const double l_abs = getAbsorptionLength(w);
770 const double ls = getScatteringLength(w);
771
772 const double npe = cherenkov(w,n) * dw * getQE(w);
773
774 if (npe <= 0) { continue; }
775
776 const double Jc = 1.0 / ls; // dN/dx
777
778 JRoot rz(R, ng, t); // square root
779
780 if (!rz.is_valid) { continue; }
781
782 const double zmin = rz.first;
783 const double zmax = rz.second;
784
785 const double zap = 1.0 / l_abs;
786
787 const double xmin = exp(zap*zmax);
788 const double xmax = exp(zap*zmin);
789
790 for (const_iterator j = begin(); j != end(); ++j) {
791
792 const double x = 0.5 * (xmax + xmin) + j->getX() * 0.5 * (xmax - xmin);
793 const double dx = j->getY() * 0.5 * (xmax - xmin);
794
795 const double z = log(x) / zap;
796 const double dz = -dx / (zap*x);
797
798 const double D = sqrt(z*z + R*R);
799 const double cd = -z / D;
800 const double sd = R / D;
801
802 const double qx = cd*px + 0 - sd*pz;
803 const double qy = 1*py;
804 const double qz = sd*px + 0 + cd*pz;
805
806 const double d = (C*t - z) / ng; // photon path
807
808 //const double V = exp(-d/l_abs); // absorption
809
810 const double ds = 2.0 / (size() + 1);
811
812 for (double sb = 0.5*ds; sb < 1.0 - 0.25*ds; sb += ds) {
813
814 for (int buffer[] = { -1, +1, 0}, *k = buffer; *k != 0; ++k) {
815
816 const double cb = (*k) * sqrt((1.0 + sb)*(1.0 - sb));
817 const double dcb = (*k) * ds*sb/cb;
818
819 const double v = 0.5 * (d + D) * (d - D) / (d - D*cb);
820 const double u = d - v;
821
822 if (u <= 0) { continue; }
823 if (v <= 0) { continue; }
824
825 const double cts = (D*cb - v) / u; // cosine scattering angle
826
827 const double V = exp(-d*getInverseAttenuationLength(l_abs, ls, cts));
828
829 if (cts < 0.0 && v * sqrt((1.0 + cts) * (1.0 - cts)) < MODULE_RADIUS_M) { continue; }
830
831 const double W = std::min(A/(v*v), 2.0*PI); // solid angle
832 const double Ja = getScatteringProbability(cts); // d^2P/dcos/dphi
833 const double Jd = ng * (1.0 - cts) / C; // dt/du
834
835 const double ca = (D - v*cb) / u;
836 const double sa = v*sb / u;
837
838 const double dp = PI / phd.size();
839 const double dom = dcb*dp * v*v / (u*u);
840
841 for (const_iterator l = phd.begin(); l != phd.end(); ++l) {
842
843 const double cp = l->getX();
844 const double sp = l->getY();
845
846 const double ct0 = cd*ca - sd*sa*cp;
847
848 const double vx = sb*cp * qx;
849 const double vy = sb*sp * qy;
850 const double vz = cb * qz;
851
852 const double U =
853 getAngularAcceptance(vx + vy + vz) +
854 getAngularAcceptance(vx - vy + vz); // PMT angular acceptance
855
856 const double Jb = geant(n,ct0); // d^2N/dcos/dphi
857
858 value += dom * gWater() * npe * dz * U * V * W * Ja * Jb * Jc / fabs(Jd);
859 }
860 }
861 }
862 }
863 }
864
865 return value;
866 }
std::vector< element_type > phd
fast evaluation of phi integral
Definition JPDF.hh:2147

◆ getDirectLightFromEMshower() [1/2]

double JPHYSICS::JPDF::getDirectLightFromEMshower ( const double D_m,
const double cd,
const double theta,
const double phi,
const double t_ns ) const
inlineinherited

Probability density function for direct light from EM-shower.

Parameters
D_mdistance between EM-shower and PMT [m]
cdcosine angle EM-shower direction and EM-shower - PMT position
thetazenith angle orientation PMT [rad]
phiazimuth angle orientation PMT [rad]
t_nstime difference relative to direct Cherenkov light [ns]
Returns
d^2P/dt/dE [npe/ns/GeV]

Definition at line 1007 of file JPDF.hh.

1012 {
1013 const double ct0 = cd;
1014 const double st0 = sqrt((1.0 + ct0)*(1.0 - ct0));
1015
1016 const double D = std::max(D_m, getRmin());
1017 const double t = D * getIndexOfRefraction() / C + t_ns; // time [ns]
1018 const double A = getPhotocathodeArea();
1019
1020 const double px = sin(theta)*cos(phi);
1021 const double pz = cos(theta);
1022
1023 const double n0 = getIndexOfRefractionGroup(wmax);
1024 const double n1 = getIndexOfRefractionGroup(wmin);
1025 const double ng = C*t/D; // index of refraction
1026
1027 if (n0 >= ng) { return 0.0; }
1028 if (n1 <= ng) { return 0.0; }
1029
1030 const double w = getWavelength(ng);
1031 const double n = getIndexOfRefractionPhase(w);
1032
1033 const double l_abs = getAbsorptionLength(w);
1034 const double ls = getScatteringLength(w);
1035
1036 const double npe = cherenkov(w,n) * getQE(w);
1037
1038 const double ct = st0*px + ct0*pz; // cosine angle of incidence on PMT
1039
1040 const double U = getAngularAcceptance(ct); // PMT angular acceptance
1041 const double V = exp(-D/l_abs - D/ls); // absorption & scattering
1042 const double W = A/(D*D); // solid angle
1043
1044 const double ngp = getDispersionGroup(w);
1045
1046 const double Ja = D * ngp / C; // dt/dlambda
1047 const double Jb = geant(n,ct0); // d^2N/dcos/dphi
1048
1049 return npe * geanc() * U * V * W * Jb / fabs(Ja);
1050 }
double geanc()
Equivalent muon track length per unit shower energy.
Definition JGeane.hh:28

◆ getDirectLightFromEMshower() [2/2]

double JPHYSICS::JPDF::getDirectLightFromEMshower ( const double E,
const double D_m,
const double cd,
const double theta,
const double phi,
const double t_ns ) const
inlineinherited

Probability density function for direct light from EM-shower.

Parameters
EEM-shower energy [GeV]
D_mdistance between EM-shower and PMT [m]
cdcosine angle EM-shower direction and EM-shower - PMT position
thetazenith angle orientation PMT [rad]
phiazimuth angle orientation PMT [rad]
t_nstime difference relative to direct Cherenkov light [ns]
Returns
dP/dt [npe/ns]

Definition at line 1199 of file JPDF.hh.

1205 {
1206 double value = 0;
1207
1208 const double sd = sqrt((1.0 + cd)*(1.0 - cd));
1209 const double D = std::max(D_m, getRmin());
1210 const double R = D * sd; // minimal distance of approach [m]
1211 const double Z = -D * cd;
1212 const double t = D * getIndexOfRefraction() / C + t_ns; // time [ns]
1213
1214 const double n0 = getIndexOfRefractionGroup(wmax);
1215 const double n1 = getIndexOfRefractionGroup(wmin);
1216
1217 double zmin = 0.0; // minimal shower length [m]
1218 double zmax = geanz.getLength(E, 1.0); // maximal shower length [m]
1219
1220 const double d = sqrt((Z+zmax)*(Z+zmax) + R*R);
1221
1222 if (C*t > std::max(n1*D, zmax + n1*d)) {
1223 return value;
1224 }
1225
1226 if (C*t < n0*D) {
1227
1228 JRoot rz(R, n0, t + Z/C); // square root
1229
1230 if (!rz.is_valid) {
1231 return value;
1232 }
1233
1234 if (rz.second > Z) { zmin = rz.second - Z; }
1235 if (rz.first > Z) { zmin = rz.first - Z; }
1236 }
1237
1238 if (C*t > n1*D) {
1239
1240 JRoot rz(R, n1, t + Z/C); // square root
1241
1242 if (!rz.is_valid) {
1243 return value;
1244 }
1245
1246 if (rz.second > Z) { zmin = rz.second - Z; }
1247 if (rz.first > Z) { zmin = rz.first - Z; }
1248 }
1249
1250 if (C*t < zmax + n0*d) {
1251
1252 JRoot rz(R, n0, t + Z/C); // square root
1253
1254 if (!rz.is_valid) {
1255 return value;
1256 }
1257
1258 if (rz.first > Z) { zmax = rz.first - Z; }
1259 if (rz.second > Z) { zmax = rz.second - Z; }
1260 }
1261
1262 if (zmin < 0.0) {
1263 zmin = 0.0;
1264 }
1265
1266 if (zmax > zmin) {
1267
1268 const double ymin = geanz.getIntegral(E, zmin);
1269 const double ymax = geanz.getIntegral(E, zmax);
1270 const double dy = (ymax - ymin) / size();
1271
1272 if (dy > 2*std::numeric_limits<double>::epsilon()) {
1273
1274 for (double y = ymin + 0.5*dy; y < ymax; y += dy) {
1275
1276 const double z = Z + geanz.getLength(E, y);
1277 const double d = sqrt(R*R + z*z);
1278 const double t1 = t + (Z - z) / C - d * getIndexOfRefraction() / C;
1279
1280 value += dy * E * getDirectLightFromEMshower(d, -z/d, theta, phi, t1);
1281 }
1282
1283 }
1284 }
1285
1286 return value;
1287 }
double getLength(const double E, const double P, const double eps=1.0e-5) const
Get shower length for a given integrated probability.
Definition JGeanz.hh:146
double getIntegral(const double E, const double z) const
Integral of PDF (starting from 0).
Definition JGeanz.hh:98
double getDirectLightFromEMshower(const double D_m, const double cd, const double theta, const double phi, const double t_ns) const
Probability density function for direct light from EM-shower.
Definition JPDF.hh:1007
static const JGeanz geanz(1.85, 0.62, 0.54)
Function object for longitudinal EM-shower profile.

◆ getScatteredLightFromEMshower() [1/2]

double JPHYSICS::JPDF::getScatteredLightFromEMshower ( const double D_m,
const double cd,
const double theta,
const double phi,
const double t_ns ) const
inlineinherited

Probability density function for scattered light from EM-shower.

Parameters
D_mdistance between EM-shower and PMT [m]
cdcosine angle EM-shower direction and EM-shower - PMT position
thetazenith angle orientation PMT [rad]
phiazimuth angle orientation PMT [rad]
t_nstime difference relative to direct Cherenkov light [ns]
Returns
d^2P/dt/dE [npe/ns/GeV]

Definition at line 1063 of file JPDF.hh.

1068 {
1069 double value = 0;
1070
1071 const double sd = sqrt((1.0 + cd)*(1.0 - cd));
1072 const double D = std::max(D_m, getRmin());
1073 const double L = D;
1074 const double t = D * getIndexOfRefraction() / C + t_ns; // time [ns]
1075
1076 const double A = getPhotocathodeArea();
1077
1078 const double px = sin(theta)*cos(phi);
1079 const double py = sin(theta)*sin(phi);
1080 const double pz = cos(theta);
1081
1082 const double qx = cd*px + 0 - sd*pz;
1083 const double qy = 1*py;
1084 const double qz = sd*px + 0 + cd*pz;
1085
1086 const double n0 = getIndexOfRefractionGroup(wmax);
1087 const double n1 = getIndexOfRefractionGroup(wmin);
1088
1089 const double ni = C*t / L; // maximal index of refraction
1090
1091 if (n0 >= ni) {
1092 return value;
1093 }
1094
1095 const double nj = std::min(ni,n1);
1096
1097 double w = wmax;
1098
1099 for (const_iterator i = begin(); i != end(); ++i) {
1100
1101 const double ng = 0.5 * (nj + n0) + i->getX() * 0.5 * (nj - n0);
1102 const double dn = i->getY() * 0.5 * (nj - n0);
1103
1104 w = getWavelength(ng, w, 1.0e-5);
1105
1106 const double dw = dn / fabs(getDispersionGroup(w));
1107
1108 const double n = getIndexOfRefractionPhase(w);
1109
1110 const double l_abs = getAbsorptionLength(w);
1111 const double ls = getScatteringLength(w);
1112
1113 const double npe = cherenkov(w,n) * dw * getQE(w);
1114
1115 if (npe <= 0) { continue; }
1116
1117 const double Jc = 1.0 / ls; // dN/dx
1118
1119 const double d = C*t / ng; // photon path
1120
1121 //const double V = exp(-d/l_abs); // absorption
1122
1123 const double ds = 2.0 / (size() + 1);
1124
1125 for (double sb = 0.5*ds; sb < 1.0 - 0.25*ds; sb += ds) {
1126
1127 for (int buffer[] = { -1, +1, 0}, *k = buffer; *k != 0; ++k) {
1128
1129 const double cb = (*k) * sqrt((1.0 + sb)*(1.0 - sb));
1130 const double dcb = (*k) * ds*sb/cb;
1131
1132 const double v = 0.5 * (d + L) * (d - L) / (d - L*cb);
1133 const double u = d - v;
1134
1135 if (u <= 0) { continue; }
1136 if (v <= 0) { continue; }
1137
1138 const double cts = (L*cb - v) / u; // cosine scattering angle
1139
1140 const double V = exp(-d*getInverseAttenuationLength(l_abs, ls, cts));
1141
1142 if (cts < 0.0 && v * sqrt((1.0 + cts) * (1.0 - cts)) < MODULE_RADIUS_M) { continue; }
1143
1144 const double W = std::min(A/(v*v), 2.0*PI); // solid angle
1145 const double Ja = getScatteringProbability(cts); // d^2P/dcos/dphi
1146 const double Jd = ng * (1.0 - cts) / C; // dt/du
1147
1148 const double ca = (L - v*cb) / u;
1149 const double sa = v*sb / u;
1150
1151 const double dp = PI / phd.size();
1152 const double dom = dcb*dp * v*v / (u*u);
1153 const double dos = sqrt(dom);
1154
1155 for (const_iterator l = phd.begin(); l != phd.end(); ++l) {
1156
1157 const double cp = l->getX();
1158 const double sp = l->getY();
1159
1160 const double ct0 = cd*ca - sd*sa*cp;
1161
1162 const double vx = -sb*cp * qx;
1163 const double vy = -sb*sp * qy;
1164 const double vz = cb * qz;
1165
1166 const double U =
1167 getAngularAcceptance(vx + vy + vz) +
1168 getAngularAcceptance(vx - vy + vz); // PMT angular acceptance
1169
1170 //const double Jb = geant(n,ct0); // d^2N/dcos/dphi
1171
1172 //value += npe * geanc() * dom * U * V * W * Ja * Jb * Jc / fabs(Jd);
1173
1174 const double Jb = geant(n,
1175 ct0 - 0.5*dos,
1176 ct0 + 0.5*dos); // dN/dphi
1177
1178 value += npe * geanc() * dos * U * V * W * Ja * Jb * Jc / fabs(Jd);
1179 }
1180 }
1181 }
1182 }
1183
1184 return value;
1185 }

◆ getScatteredLightFromEMshower() [2/2]

double JPHYSICS::JPDF::getScatteredLightFromEMshower ( const double E,
const double D_m,
const double cd,
const double theta,
const double phi,
const double t_ns ) const
inlineinherited

Probability density function for scattered light from EM-shower.

Parameters
EEM-shower energy [GeV]
D_mdistance between EM-shower and PMT [m]
cdcosine angle EM-shower direction and EM-shower - PMT position
thetazenith angle orientation PMT [rad]
phiazimuth angle orientation PMT [rad]
t_nstime difference relative to direct Cherenkov light [ns]
Returns
dP/dt [npe/ns]

Definition at line 1301 of file JPDF.hh.

1307 {
1308 double value = 0;
1309
1310 const double sd = sqrt((1.0 + cd)*(1.0 - cd));
1311 const double D = std::max(D_m, getRmin());
1312 const double R = D * sd; // minimal distance of approach [m]
1313 const double Z = -D * cd;
1314 const double t = D * getIndexOfRefraction() / C + t_ns; // time [ns]
1315
1316 const double n0 = getIndexOfRefractionGroup(wmax);
1317
1318 double zmin = 0.0; // minimal shower length [m]
1319 double zmax = geanz.getLength(E, 1.0); // maximal shower length [m]
1320
1321 const double d = sqrt((Z+zmax)*(Z+zmax) + R*R);
1322
1323 if (C*t < n0*D) {
1324
1325 JRoot rz(R, n0, t + Z/C); // square root
1326
1327 if (!rz.is_valid) {
1328 return value;
1329 }
1330
1331 if (rz.second > Z) { zmin = rz.second - Z; }
1332 if (rz.first > Z) { zmin = rz.first - Z; }
1333 }
1334
1335 if (C*t < zmax + n0*d) {
1336
1337 JRoot rz(R, n0, t + Z/C); // square root
1338
1339 if (!rz.is_valid) {
1340 return value;
1341 }
1342
1343 if (rz.first > Z) { zmax = rz.first - Z; }
1344 if (rz.second > Z) { zmax = rz.second - Z; }
1345 }
1346
1347 const double ymin = geanz.getIntegral(E, zmin);
1348 const double ymax = geanz.getIntegral(E, zmax);
1349 const double dy = (ymax - ymin) / size();
1350
1351 if (dy > 2*std::numeric_limits<double>::epsilon()) {
1352
1353 for (double y = ymin + 0.5*dy; y < ymax; y += dy) {
1354
1355 const double z = Z + geanz.getLength(E, y);
1356 const double d = sqrt(R*R + z*z);
1357 const double t1 = t + (Z - z) / C - d * getIndexOfRefraction() / C;
1358
1359 value += dy * E * getScatteredLightFromEMshower(d, -z/d, theta, phi, t1);
1360 }
1361 }
1362
1363 return value;
1364 }
double getScatteredLightFromEMshower(const double D_m, const double cd, const double theta, const double phi, const double t_ns) const
Probability density function for scattered light from EM-shower.
Definition JPDF.hh:1063

◆ getDirectLightFromDeltaRays()

double JPHYSICS::JPDF::getDirectLightFromDeltaRays ( const double R_m,
const double theta,
const double phi,
const double t_ns ) const
inlineinherited

Probability density function for direct light from delta-rays.

Parameters
R_mdistance between muon and PMT [m]
thetazenith angle orientation PMT [rad]
phiazimuth angle orientation PMT [rad]
t_nstime difference relative to direct Cherenkov light [ns]
Returns
d^2P/dt/dE [npe/ns x m/GeV]

Definition at line 1376 of file JPDF.hh.

1380 {
1381 double value = 0;
1382
1383 const double R = std::max(R_m, getRmin());
1384 const double t = R * getTanThetaC() / C + t_ns; // time [ns]
1385 const double A = getPhotocathodeArea();
1386 const double D = 2.0*sqrt(A/PI);
1387
1388 const double px = sin(theta)*cos(phi);
1389 const double pz = cos(theta);
1390
1391 const double n0 = getIndexOfRefractionGroup(wmax);
1392 const double n1 = getIndexOfRefractionGroup(wmin);
1393 const double ni = sqrt(R*R + C*t*C*t) / R; // maximal index of refraction
1394
1395 if (n0 >= ni) {
1396 return value;
1397 }
1398
1399 const double nj = std::min(n1, ni);
1400
1401 double w = wmax;
1402
1403 for (const_iterator i = begin(); i != end(); ++i) {
1404
1405 const double ng = 0.5 * (nj + n0) + i->getX() * 0.5 * (nj - n0);
1406 const double dn = i->getY() * 0.5 * (nj - n0);
1407
1408 w = getWavelength(ng, w, 1.0e-5);
1409
1410 const double dw = dn / fabs(getDispersionGroup(w));
1411
1412 const double n = getIndexOfRefractionPhase(w);
1413
1414 const double l_abs = getAbsorptionLength(w);
1415 const double ls = getScatteringLength(w);
1416
1417 const double npe = cherenkov(w,n) * dw * getQE(w);
1418
1419 JRoot rz(R, ng, t); // square root
1420
1421 if (!rz.is_valid) { continue; }
1422
1423 for (int j = 0; j != 2; ++j) {
1424
1425 const double z = rz[j];
1426
1427 if (C*t <= z) continue;
1428
1429 const double d = sqrt(z*z + R*R); // distance traveled by photon
1430
1431 const double ct0 = -z / d;
1432 const double st0 = R / d;
1433
1434 const double dz = D / st0; // average track length
1435 const double ct = st0*px + ct0*pz; // cosine angle of incidence on PMT
1436
1437 const double U = getAngularAcceptance(ct); // PMT angular acceptance
1438 const double V = exp(-d/l_abs - d/ls); // absorption & scattering
1439 const double W = A/(d*d); // solid angle
1440
1441 const double Ja = JDeltaRays::getProbability(ct0); // d^2N/dcos/dphi
1442 const double Jd = (1.0 - ng*ct0) / C; // d t/ dz
1443 const double Je = ng*st0*st0*st0 / (R*C); // d^2t/(dz)^2
1444
1445 value += npe * geanc() * U * V * W * Ja / (fabs(Jd) + 0.5*Je*dz);
1446 }
1447 }
1448
1449 return value;
1450 }
static double getProbability(const double x)
Emission profile of photons from delta-rays.

◆ getScatteredLightFromDeltaRays()

double JPHYSICS::JPDF::getScatteredLightFromDeltaRays ( const double R_m,
const double theta,
const double phi,
const double t_ns ) const
inlineinherited

Probability density function for scattered light from delta-rays.

Parameters
R_mdistance between muon and PMT [m]
thetazenith angle orientation PMT [rad]
phiazimuth angle orientation PMT [rad]
t_nstime difference relative to direct Cherenkov light [ns]
Returns
d^2P/dt/dx [npe/ns x m/GeV]

Definition at line 1462 of file JPDF.hh.

1466 {
1467 double value = 0;
1468
1469 const double R = std::max(R_m, getRmin());
1470 const double t = R * getTanThetaC() / C + t_ns; // time [ns]
1471 const double A = getPhotocathodeArea();
1472
1473 const double px = sin(theta)*cos(phi);
1474 const double py = sin(theta)*sin(phi);
1475 const double pz = cos(theta);
1476
1477 const double n0 = getIndexOfRefractionGroup(wmax);
1478 const double n1 = getIndexOfRefractionGroup(wmin);
1479 const double ni = sqrt(R*R + C*t*C*t) / R; // maximal index of refraction
1480
1481 if (n0 >= ni) {
1482 return value;
1483 }
1484
1485 const double nj = std::min(ni,n1);
1486
1487 double w = wmax;
1488
1489 for (const_iterator i = begin(); i != end(); ++i) {
1490
1491 const double ng = 0.5 * (nj + n0) + i->getX() * 0.5 * (nj - n0);
1492 const double dn = i->getY() * 0.5 * (nj - n0);
1493
1494 w = getWavelength(ng, w, 1.0e-5);
1495
1496 const double dw = dn / fabs(getDispersionGroup(w));
1497
1498 const double n = getIndexOfRefractionPhase(w);
1499
1500 const double l_abs = getAbsorptionLength(w);
1501 const double ls = getScatteringLength(w);
1502
1503 const double npe = cherenkov(w,n) * dw * getQE(w);
1504
1505 if (npe <= 0) { continue; }
1506
1507 const double Jc = 1.0 / ls; // dN/dx
1508
1509 JRoot rz(R, ng, t); // square root
1510
1511 if (!rz.is_valid) { continue; }
1512
1513 const double zmin = rz.first;
1514 const double zmax = rz.second;
1515
1516 const double zap = 1.0 / l_abs;
1517
1518 const double xmin = exp(zap*zmax);
1519 const double xmax = exp(zap*zmin);
1520
1521 for (const_iterator j = begin(); j != end(); ++j) {
1522
1523 const double x = 0.5 * (xmax + xmin) + j->getX() * 0.5 * (xmax - xmin);
1524 const double dx = j->getY() * 0.5 * (xmax - xmin);
1525
1526 const double z = log(x) / zap;
1527 const double dz = -dx / (zap*x);
1528
1529 const double D = sqrt(z*z + R*R);
1530 const double cd = -z / D;
1531 const double sd = R / D;
1532
1533 const double qx = cd*px + 0 - sd*pz;
1534 const double qy = 1*py;
1535 const double qz = sd*px + 0 + cd*pz;
1536
1537 const double d = (C*t - z) / ng; // photon path
1538
1539 //const double V = exp(-d/l_abs); // absorption
1540
1541 const double ds = 2.0 / (size() + 1);
1542
1543 for (double sb = 0.5*ds; sb < 1.0 - 0.25*ds; sb += ds) {
1544
1545 for (int buffer[] = { -1, +1, 0}, *k = buffer; *k != 0; ++k) {
1546
1547 const double cb = (*k) * sqrt((1.0 + sb)*(1.0 - sb));
1548 const double dcb = (*k) * ds*sb/cb;
1549
1550 const double v = 0.5 * (d + D) * (d - D) / (d - D*cb);
1551 const double u = d - v;
1552
1553 if (u <= 0) { continue; }
1554 if (v <= 0) { continue; }
1555
1556 const double cts = (D*cb - v) / u; // cosine scattering angle
1557
1558 const double V = exp(-d*getInverseAttenuationLength(l_abs, ls, cts));
1559
1560 if (cts < 0.0 && v * sqrt((1.0 + cts) * (1.0 - cts)) < MODULE_RADIUS_M) { continue; }
1561
1562 const double W = std::min(A/(v*v), 2.0*PI); // solid angle
1563 const double Ja = getScatteringProbability(cts); // d^2P/dcos/dphi
1564 const double Jd = ng * (1.0 - cts) / C; // dt/du
1565
1566 const double ca = (D - v*cb) / u;
1567 const double sa = v*sb / u;
1568
1569 const double dp = PI / phd.size();
1570 const double dom = dcb*dp * v*v / (u*u);
1571
1572 for (const_iterator l = phd.begin(); l != phd.end(); ++l) {
1573
1574 const double cp = l->getX();
1575 const double sp = l->getY();
1576
1577 const double ct0 = cd*ca - sd*sa*cp;
1578
1579 const double vx = sb*cp * qx;
1580 const double vy = sb*sp * qy;
1581 const double vz = cb * qz;
1582
1583 const double U =
1584 getAngularAcceptance(vx + vy + vz) +
1585 getAngularAcceptance(vx - vy + vz); // PMT angular acceptance
1586
1587 const double Jb = JDeltaRays::getProbability(ct0); // d^2N/dcos/dphi
1588
1589 value += dom * npe * geanc() * dz * U * V * W * Ja * Jb * Jc / fabs(Jd);
1590 }
1591 }
1592 }
1593 }
1594 }
1595
1596 return value;
1597 }

◆ getDirectLightFromBrightPoint()

double JPHYSICS::JPDF::getDirectLightFromBrightPoint ( const double D_m,
const double ct,
const double t_ns ) const
inlineinherited

Probability density function for direct light from isotropic light source.

Parameters
D_mdistance between light source and PMT [m]
ctcosine angle PMT
t_nstime difference relative to direct Cherenkov light [ns]
Returns
d^2P/dt/dE [npe/ns/GeV]

Definition at line 1608 of file JPDF.hh.

1611 {
1612 const double D = std::max(D_m, getRmin());
1613 const double t = D * getIndexOfRefraction() / C + t_ns; // time [ns]
1614 const double A = getPhotocathodeArea();
1615
1616 const double n0 = getIndexOfRefractionGroup(wmax);
1617 const double n1 = getIndexOfRefractionGroup(wmin);
1618 const double ng = C*t/D; // index of refraction
1619
1620 if (n0 >= ng) { return 0.0; }
1621 if (n1 <= ng) { return 0.0; }
1622
1623 const double w = getWavelength(ng);
1624 const double n = getIndexOfRefractionPhase(w);
1625
1626 const double l_abs = getAbsorptionLength(w);
1627 const double ls = getScatteringLength(w);
1628
1629 const double npe = cherenkov(w,n) * getQE(w);
1630
1631 const double U = getAngularAcceptance(ct); // PMT angular acceptance
1632 const double V = exp(-D/l_abs - D/ls); // absorption & scattering
1633 const double W = A/(D*D); // solid angle
1634
1635 const double ngp = getDispersionGroup(w);
1636
1637 const double Ja = D * ngp / C; // dt/dlambda
1638 const double Jb = 1.0 / (4.0*PI); // d^2N/dOmega
1639
1640 return npe * geanc() * U * V * W * Jb / fabs(Ja);
1641 }

◆ getScatteredLightFromBrightPoint()

double JPHYSICS::JPDF::getScatteredLightFromBrightPoint ( const double D_m,
const double ct,
const double t_ns ) const
inlineinherited

Probability density function for scattered light from isotropic light source.

Parameters
D_mdistance between light source and PMT [m]
ctcosine angle PMT
t_nstime difference relative to direct Cherenkov light [ns]
Returns
d^2P/dt/dE [npe/ns/GeV]

Definition at line 1652 of file JPDF.hh.

1655 {
1656 double value = 0;
1657
1658 const double D = std::max(D_m, getRmin());
1659 const double t = D * getIndexOfRefraction() / C + t_ns; // time [ns]
1660 const double st = sqrt((1.0 + ct)*(1.0 - ct));
1661
1662 const double A = getPhotocathodeArea();
1663
1664 const double n0 = getIndexOfRefractionGroup(wmax);
1665 const double n1 = getIndexOfRefractionGroup(wmin);
1666
1667 const double ni = C*t / D; // maximal index of refraction
1668
1669 if (n0 >= ni) {
1670 return value;
1671 }
1672
1673 const double nj = std::min(ni,n1);
1674
1675 double w = wmax;
1676
1677 for (const_iterator i = begin(); i != end(); ++i) {
1678
1679 const double ng = 0.5 * (nj + n0) + i->getX() * 0.5 * (nj - n0);
1680 const double dn = i->getY() * 0.5 * (nj - n0);
1681
1682 w = getWavelength(ng, w, 1.0e-5);
1683
1684 const double dw = dn / fabs(getDispersionGroup(w));
1685
1686 const double n = getIndexOfRefractionPhase(w);
1687
1688 const double npe = cherenkov(w,n) * dw * getQE(w);
1689
1690 if (npe <= 0) { continue; }
1691
1692 const double l_abs = getAbsorptionLength(w);
1693 const double ls = getScatteringLength(w);
1694
1695 const double Jc = 1.0 / ls; // dN/dx
1696 const double Jb = 1.0 / (4.0*PI); // d^2N/dcos/dphi
1697
1698 const double d = C*t / ng; // photon path
1699
1700 const double dcb = 2.0 / (size() + 1);
1701
1702 for (double cb = -1.0 + 0.5*dcb; cb < +1.0; cb += dcb) {
1703
1704 const double sb = sqrt((1.0 + cb)*(1.0 - cb));
1705
1706 const double v = 0.5 * (d + D) * (d - D) / (d - D*cb);
1707 const double u = d - v;
1708
1709 if (u <= 0) { continue; }
1710 if (v <= 0) { continue; }
1711
1712 const double cts = (D*cb - v) / u; // cosine scattering angle
1713
1714 const double V = exp(-d*getInverseAttenuationLength(l_abs, ls, cts));
1715
1716 if (cts < 0.0 && v * sqrt((1.0 + cts) * (1.0 - cts)) < MODULE_RADIUS_M) { continue; }
1717
1718 const double W = std::min(A/(v*v), 2.0*PI); // solid angle
1719 const double Ja = getScatteringProbability(cts); // d^2P/dcos/dphi
1720 const double Jd = ng * (1.0 - cts) / C; // dt/du
1721
1722 const double dp = PI / phd.size();
1723 const double dom = dcb*dp * v*v / (u*u); // dOmega
1724
1725 for (const_iterator l = phd.begin(); l != phd.end(); ++l) {
1726
1727 const double cp = l->getX();
1728 const double dot = cb*ct + sb*cp*st;
1729
1730 const double U = 2 * getAngularAcceptance(dot); // PMT angular acceptance
1731
1732 value += npe * geanc() * dom * U * V * W * Ja * Jb * Jc / fabs(Jd);
1733 }
1734 }
1735 }
1736
1737 return value;
1738 }

◆ getLightFromMuon() [1/2]

double JPHYSICS::JPDF::getLightFromMuon ( const int type,
const double E_GeV,
const double R_m,
const double theta,
const double phi,
const double t_ns ) const
inlineinherited

Probability density function for light from muon.

Parameters
typePDF type
E_GeVmuon energy [GeV]
R_mdistance between muon and PMT [m]
thetazenith angle orientation PMT [rad]
phiazimuth angle orientation PMT [rad]
t_nstime difference relative to direct Cherenkov light [ns]
Returns
d^2P/dt/dx [npe/ns]

Definition at line 1752 of file JPDF.hh.

1758 {
1759 switch (type) {
1760
1762 return getDirectLightFromMuon (R_m, theta, phi, t_ns);
1763
1765 return getScatteredLightFromMuon (R_m, theta, phi, t_ns);
1766
1768 return getDirectLightFromEMshowers (R_m, theta, phi, t_ns) * E_GeV;
1769
1771 return getScatteredLightFromEMshowers(R_m, theta, phi, t_ns) * E_GeV;
1772
1774 return getDirectLightFromDeltaRays (R_m, theta, phi, t_ns) * JDeltaRays::getEnergyLossFromMuon(E_GeV);
1775
1777 return getScatteredLightFromDeltaRays(R_m, theta, phi, t_ns) * JDeltaRays::getEnergyLossFromMuon(E_GeV);
1778
1779 default:
1780 return 0.0;
1781 }
1782 }
double getScatteredLightFromDeltaRays(const double R_m, const double theta, const double phi, const double t_ns) const
Probability density function for scattered light from delta-rays.
Definition JPDF.hh:1462
double getDirectLightFromMuon(const double R_m, const double theta, const double phi) const
Number of photo-electrons from direct Cherenkov light from muon.
Definition JPDF.hh:358
double getDirectLightFromDeltaRays(const double R_m, const double theta, const double phi, const double t_ns) const
Probability density function for direct light from delta-rays.
Definition JPDF.hh:1376
double getScatteredLightFromEMshowers(const double R_m, const double theta, const double phi, const double t_ns) const
Probability density function for scattered light from EM-showers.
Definition JPDF.hh:731
double getScatteredLightFromMuon(const double R_m, const double theta, const double phi, const double t_ns) const
Probability density function for scattered light from muon.
Definition JPDF.hh:497
double getDirectLightFromEMshowers(const double R_m, const double theta, const double phi, const double t_ns) const
Probability density function for direct light from EM-showers.
Definition JPDF.hh:643
@ SCATTERED_LIGHT_FROM_DELTARAYS
scattered light from delta-rays
Definition JPDFTypes.hh:33
@ DIRECT_LIGHT_FROM_EMSHOWERS
direct light from EM showers
Definition JPDFTypes.hh:29
@ SCATTERED_LIGHT_FROM_EMSHOWERS
scattered light from EM showers
Definition JPDFTypes.hh:30
@ SCATTERED_LIGHT_FROM_MUON
scattered light from muon
Definition JPDFTypes.hh:27
@ DIRECT_LIGHT_FROM_DELTARAYS
direct light from delta-rays
Definition JPDFTypes.hh:32
@ DIRECT_LIGHT_FROM_MUON
direct light from muon
Definition JPDFTypes.hh:26
static double getEnergyLossFromMuon(const double E, const JEnergyRange T_GeV=JEnergyRange(TMIN_GEV, TMAX_GEV))
Equivalent EM-shower energy loss due to delta-rays per unit muon track length in sea water.

◆ getLightFromMuon() [2/2]

double JPHYSICS::JPDF::getLightFromMuon ( const double E_GeV,
const double R_m,
const double theta,
const double phi,
const double t_ns ) const
inlineinherited

Probability density function for light from muon.

Parameters
E_GeVmuon energy [GeV]
R_mdistance between muon and PMT [m]
thetazenith angle orientation PMT [rad]
phiazimuth angle orientation PMT [rad]
t_nstime difference relative to direct Cherenkov light [ns]
Returns
d^2P/dt/dx [npe/ns]

Definition at line 1795 of file JPDF.hh.

1800 {
1801 return (getDirectLightFromMuon (R_m, theta, phi, t_ns) +
1802 getScatteredLightFromMuon (R_m, theta, phi, t_ns) +
1803 getDirectLightFromEMshowers (R_m, theta, phi, t_ns) * E_GeV +
1804 getScatteredLightFromEMshowers(R_m, theta, phi, t_ns) * E_GeV +
1805 getDirectLightFromDeltaRays (R_m, theta, phi, t_ns) * JDeltaRays::getEnergyLossFromMuon(E_GeV) +
1807 }

◆ getLightFromEMshower() [1/4]

double JPHYSICS::JPDF::getLightFromEMshower ( const int type,
const double D_m,
const double cd,
const double theta,
const double phi,
const double t_ns ) const
inlineinherited

Probability density function for light from EM-shower.

Parameters
typePDF type
D_mdistance between EM-shower and PMT [m]
cdcosine angle EM-shower direction and EM-shower - PMT position
thetazenith angle orientation PMT [rad]
phiazimuth angle orientation PMT [rad]
t_nstime difference relative to direct Cherenkov light [ns]
Returns
d^2P/dt/dE [npe/ns/GeV]

Definition at line 1821 of file JPDF.hh.

1827 {
1828 switch (type) {
1829
1831 return getDirectLightFromEMshower (D_m, cd, theta, phi, t_ns);
1832
1834 return getScatteredLightFromEMshower(D_m, cd, theta, phi, t_ns);
1835
1836 default:
1837 return 0.0;
1838 }
1839 }
@ SCATTERED_LIGHT_FROM_EMSHOWER
scattered light from EM shower
Definition JPDFTypes.hh:38
@ DIRECT_LIGHT_FROM_EMSHOWER
direct light from EM shower
Definition JPDFTypes.hh:37

◆ getLightFromEMshower() [2/4]

double JPHYSICS::JPDF::getLightFromEMshower ( const double D_m,
const double cd,
const double theta,
const double phi,
const double t_ns ) const
inlineinherited

Probability density function for light from EM-shower.

Parameters
D_mdistance between EM-shower and PMT [m]
cdcosine angle EM-shower direction and EM-shower - PMT position
thetazenith angle orientation PMT [rad]
phiazimuth angle orientation PMT [rad]
t_nstime difference relative to direct Cherenkov light [ns]
Returns
d^2P/dt/dE [npe/ns/GeV]

Definition at line 1852 of file JPDF.hh.

1857 {
1858 return (getDirectLightFromEMshower (D_m, cd, theta, phi, t_ns) +
1859 getScatteredLightFromEMshower(D_m, cd, theta, phi, t_ns));
1860 }

◆ getLightFromEMshower() [3/4]

double JPHYSICS::JPDF::getLightFromEMshower ( const int type,
const double E_GeV,
const double D_m,
const double cd,
const double theta,
const double phi,
const double t_ns ) const
inlineinherited

Probability density function for light from EM-shower.

Parameters
typePDF type
E_GeVEM-shower energy [GeV]
D_mdistance between EM-shower and PMT [m]
cdcosine angle EM-shower direction and EM-shower - PMT position
thetazenith angle orientation PMT [rad]
phiazimuth angle orientation PMT [rad]
t_nstime difference relative to direct Cherenkov light [ns]
Returns
d^2P/dt/dE [npe/ns/GeV]

Definition at line 1875 of file JPDF.hh.

1882 {
1883 switch (type) {
1884
1886 return getDirectLightFromEMshower (E_GeV, D_m, cd, theta, phi, t_ns);
1887
1889 return getScatteredLightFromEMshower(E_GeV, D_m, cd, theta, phi, t_ns);
1890
1891 default:
1892 return 0.0;
1893 }
1894 }

◆ getLightFromEMshower() [4/4]

double JPHYSICS::JPDF::getLightFromEMshower ( const double E_GeV,
const double D_m,
const double cd,
const double theta,
const double phi,
const double t_ns ) const
inlineinherited

Probability density function for light from EM-shower.

Parameters
E_GeVEM-shower energy [GeV]
D_mdistance between EM-shower and PMT [m]
cdcosine angle EM-shower direction and EM-shower - PMT position
thetazenith angle orientation PMT [rad]
phiazimuth angle orientation PMT [rad]
t_nstime difference relative to direct Cherenkov light [ns]
Returns
d^2P/dt/dE [npe/ns/GeV]

Definition at line 1908 of file JPDF.hh.

1914 {
1915 return (getDirectLightFromEMshower (E_GeV, D_m, cd, theta, phi, t_ns) +
1916 getScatteredLightFromEMshower(E_GeV, D_m, cd, theta, phi, t_ns));
1917 }

◆ getLightFromBrightPoint() [1/2]

double JPHYSICS::JPDF::getLightFromBrightPoint ( const int type,
const double D_m,
const double ct,
const double t_ns ) const
inlineinherited

Probability density function for direct light from isotropic light source.

Parameters
typePDF type
D_mdistance between light source and PMT [m]
ctcosine angle PMT
t_nstime difference relative to direct Cherenkov light [ns]
Returns
d^2P/dt/dE [npe/ns/GeV]

Definition at line 1929 of file JPDF.hh.

1933 {
1934 switch (type) {
1935
1937 return getDirectLightFromBrightPoint (D_m, ct, t_ns);
1938
1940 return getScatteredLightFromBrightPoint(D_m, ct, t_ns);
1941
1942 default:
1943 return 0.0;
1944 }
1945 }
double getScatteredLightFromBrightPoint(const double D_m, const double ct, const double t_ns) const
Probability density function for scattered light from isotropic light source.
Definition JPDF.hh:1652
double getDirectLightFromBrightPoint(const double D_m, const double ct, const double t_ns) const
Probability density function for direct light from isotropic light source.
Definition JPDF.hh:1608
@ SCATTERED_LIGHT_FROM_BRIGHT_POINT
scattered light from bright point
Definition JPDFTypes.hh:43
@ DIRECT_LIGHT_FROM_BRIGHT_POINT
direct light from bright point
Definition JPDFTypes.hh:42

◆ getLightFromBrightPoint() [2/2]

double JPHYSICS::JPDF::getLightFromBrightPoint ( const double D_m,
const double ct,
const double t_ns ) const
inlineinherited

Probability density function for direct light from isotropic light source.

Parameters
D_mdistance between light source and PMT [m]
ctcosine angle PMT
t_nstime difference relative to direct Cherenkov light [ns]
Returns
d^2P/dt/dE [npe/ns/GeV]

Definition at line 1956 of file JPDF.hh.

1959 {
1960 return (getDirectLightFromBrightPoint (D_m, ct, t_ns) +
1961 getScatteredLightFromBrightPoint(D_m, ct, t_ns));
1962 }

◆ getWavelength() [1/2]

virtual double JPHYSICS::JPDF::getWavelength ( const double n,
const double eps = 1.0e-10 ) const
inlineprotectedvirtualinherited

Determine wavelength for a given index of refraction corresponding to the group velocity.

Parameters
nindex of refraction
epsprecision index of refraction
Returns
wavelength [nm]

Definition at line 2039 of file JPDF.hh.

2041 {
2042 //return getWavelength(n, 0.5*(wmin + wmax), eps);
2043
2044 double vmin = wmin;
2045 double vmax = wmax;
2046
2047 for (int i = 0; i != 1000; ++i) {
2048
2049 const double v = 0.5 * (vmin + vmax);
2050 const double y = getIndexOfRefractionGroup(v);
2051
2052 if (fabs(y - n) < eps) {
2053 return v;
2054 }
2055
2056 if (y < n)
2057 vmax = v;
2058 else
2059 vmin = v;
2060 }
2061
2062 return 0.5 * (vmin + vmax);
2063 }

◆ getWavelength() [2/2]

virtual double JPHYSICS::JPDF::getWavelength ( const double n,
const double w,
const double eps ) const
inlineprotectedvirtualinherited

Determine wavelength for a given index of refraction corresponding to the group velocity.

The estimate of the wavelength is made by successive linear extrapolations. The procedure starts from the given wavelength and terminates if the index of refraction is equal to the target value within the given precision.

Parameters
nindex of refraction
wstart value wavelength [nm]
epsprecision index of refraction
Returns
return value wavelength [nm]

Definition at line 2077 of file JPDF.hh.

2080 {
2081 double v = w;
2082
2083 // determine wavelength by linear extrapolation
2084
2085 for ( ; ; ) {
2086
2087 const double y = getIndexOfRefractionGroup(v);
2088
2089 if (fabs(y - n) < eps) {
2090 break;
2091 }
2092
2093 v += (n - y) / getDispersionGroup(v);
2094 }
2095
2096 return v;
2097 }

◆ getRmin()

static double JPHYSICS::JPDF::getRmin ( )
inlinestaticprotectedinherited

minimal distance of approach of muon to PMT [m]

Definition at line 2100 of file JPDF.hh.

◆ getInverseAttenuationLength()

virtual double JPHYSICS::JPDF::getInverseAttenuationLength ( const double l_abs,
const double ls,
const double cts ) const
inlineprotectedvirtualinherited

Get the inverse of the attenuation length.

Parameters
l_absabsorption length [m]
lsscattering length [m]
ctscosine scattering angle
Returns
inverse attenuation length [m^-1]

Definition at line 2111 of file JPDF.hh.

2112 {
2114
2115 if (f1.empty()) {
2116
2117 const int nx = 100000;
2118 const double xmin = -1.0;
2119 const double xmax = +1.0;
2120
2121 const double dx = (xmax - xmin) / (nx - 1);
2122
2123 for (double x = xmin, W = 0.0; x < xmax; x += dx) {
2124
2125 f1[x] = W;
2126
2127 W += 2*PI * dx * getScatteringProbability(x + 0.5*dx);
2128 }
2129
2130 f1[xmin] = 0.0;
2131 f1[xmax] = 1.0;
2132
2133 f1.compile();
2134 }
2135
2136 return 1.0/l_abs + f1(cts)/ls;
2137 }
Type definition of a 1st degree polynomial interpolation based on a JGridCollection with result type ...

◆ clear()

virtual void JTOOLS::JCollection< JElement2D_t, JDistance_t >::clear ( )
inlineoverridevirtualinherited

Clear.

Implements JTOOLS::JMappableCollection< JElement2D_t::abscissa_type, JElement2D_t::ordinate_type >.

Definition at line 150 of file JCollection.hh.

151 {
152 container_type::clear();
153 }

◆ get() [1/2]

virtual const ordinate_type & JTOOLS::JCollection< JElement2D_t, JDistance_t >::get ( typename JClass< abscissa_type >::argument_type x) const
inlineoverridevirtualinherited

Get ordinate value.

Parameters
xabscissa value
Returns
ordinate value

Implements JTOOLS::JMappableCollection< JElement2D_t::abscissa_type, JElement2D_t::ordinate_type >.

Definition at line 162 of file JCollection.hh.

163 {
164 const_iterator i = this->lower_bound(x);
165
166 if (i == this->end() || this->getDistance(x, i->getX()) > distance_type::precision) {
167 THROW(JValueOutOfRange, "Invalid abscissa value " << x);
168 }
169
170 return i->getY();
171 }
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
const_iterator lower_bound(typename JClass< abscissa_type >::argument_type x) const

◆ get() [2/2]

virtual ordinate_type & JTOOLS::JCollection< JElement2D_t, JDistance_t >::get ( typename JClass< abscissa_type >::argument_type x)
inlineoverridevirtualinherited

Get ordinate value.

Parameters
xabscissa value
Returns
ordinate value

Implements JTOOLS::JMappableCollection< JElement2D_t::abscissa_type, JElement2D_t::ordinate_type >.

Definition at line 180 of file JCollection.hh.

181 {
182 iterator i = this->lower_bound(x);
183
184 if (i == this->end() || this->getDistance(x, i->getX()) > distance_type::precision) {
185 i = container_type::insert(i, value_type(x, JMATH::getZero<ordinate_type>()));
186 }
187
188 return i->getY();
189 }
container_type::iterator iterator
T getZero()
Get zero value for a given data type.
Definition JZero.hh:26

◆ getSize()

virtual int JTOOLS::JCollection< JElement2D_t, JDistance_t >::getSize ( ) const
inlineoverridevirtualinherited

Get number of elements.

Returns
number of elements

Implements JTOOLS::JAbstractCollection< JElement2D_t::abscissa_type >.

Definition at line 197 of file JCollection.hh.

198 {
199 return (int) this->size();
200 }

◆ getX()

virtual abscissa_type JTOOLS::JCollection< JElement2D_t, JDistance_t >::getX ( int index) const
inlineoverridevirtualinherited

Get abscissa value.

Parameters
indexindex
Returns
abscissa value

Implements JTOOLS::JAbstractCollection< JElement2D_t::abscissa_type >.

Definition at line 209 of file JCollection.hh.

210 {
211 return this->at(index).getX();
212 }

◆ getXmin()

virtual abscissa_type JTOOLS::JCollection< JElement2D_t, JDistance_t >::getXmin ( ) const
inlineoverridevirtualinherited

Get minimal abscissa value.

Returns
abscissa value

Implements JTOOLS::JAbstractCollection< JElement2D_t::abscissa_type >.

Definition at line 220 of file JCollection.hh.

221 {
222 return this->begin()->getX();
223 }

◆ getXmax()

virtual abscissa_type JTOOLS::JCollection< JElement2D_t, JDistance_t >::getXmax ( ) const
inlineoverridevirtualinherited

Get maximal abscissa value.

Returns
abscissa value

Implements JTOOLS::JAbstractCollection< JElement2D_t::abscissa_type >.

Definition at line 231 of file JCollection.hh.

232 {
233 return this->rbegin()->getX();
234 }

◆ getY() [1/2]

const ordinate_type & JTOOLS::JCollection< JElement2D_t, JDistance_t >::getY ( int index) const
inlineinherited

Get ordinate value.

Parameters
indexindex
Returns
ordinate value

Definition at line 244 of file JCollection.hh.

245 {
246 return this->at(index).getY();
247 }

◆ getY() [2/2]

ordinate_type & JTOOLS::JCollection< JElement2D_t, JDistance_t >::getY ( int index)
inlineinherited

Get ordinate value.

Parameters
indexindex
Returns
ordinate value

Definition at line 256 of file JCollection.hh.

257 {
258 return this->at(index).getY();
259 }

◆ transform()

void JTOOLS::JCollection< JElement2D_t, JDistance_t >::transform ( const transformer_type & transformer)
inlineinherited

Transform collection.

Parameters
transformerelement transformer

Definition at line 267 of file JCollection.hh.

268 {
269 for (iterator i = this->begin(); i != this->end(); ++i) {
270 *i = transformer(*i);
271 }
272
273 sort();
274 }

◆ sort()

void JTOOLS::JCollection< JElement2D_t, JDistance_t >::sort ( )
inlineinherited

Sort elements.

Definition at line 280 of file JCollection.hh.

281 {
282 std::sort(this->begin(), this->end(), compare);
283 }

◆ lower_bound() [1/2]

const_iterator JTOOLS::JCollection< JElement2D_t, JDistance_t >::lower_bound ( typename JClass< abscissa_type >::argument_type x) const
inlineinherited

Get first position of element i, where x >= i->getX().

Parameters
xabscissa value
Returns
position of corresponding element

Definition at line 292 of file JCollection.hh.

293 {
294 return std::lower_bound(this->begin(), this->end(), x, compare);
295 }

◆ lower_bound() [2/2]

iterator JTOOLS::JCollection< JElement2D_t, JDistance_t >::lower_bound ( typename JClass< abscissa_type >::argument_type x)
inlineinherited

Get first position of element i, where x >= i->getX().

Parameters
xabscissa value
Returns
position of corresponding element

Definition at line 304 of file JCollection.hh.

305 {
306 return std::lower_bound(this->begin(), this->end(), x, compare);
307 }

◆ insert()

pair_type JTOOLS::JCollection< JElement2D_t, JDistance_t >::insert ( const value_type & element)
inlineinherited

Insert element.

Parameters
elementelement
Returns
(iterator, status), where status is true if inserted; else false

Definition at line 316 of file JCollection.hh.

317 {
318 iterator i = this->lower_bound(element.getX());
319
320 if (i == this->end() || this->getDistance(element.getX(), i->getX()) > 0.0)
321 return pair_type(container_type::insert(i, element), true);
322 else
323 return pair_type(this->end(), false);
324 }
std::pair< const_iterator, bool > pair_type

◆ configure() [1/3]

void JTOOLS::JCollection< JElement2D_t, JDistance_t >::configure ( const JAbstractCollection< abscissa_type > & bounds)
inlineinherited

Configure collection.

Parameters
boundsabscissa values

Definition at line 332 of file JCollection.hh.

333 {
335 }
void configure(const JAbstractCollection< abscissa_type > &bounds)

◆ configure() [2/3]

void JTOOLS::JCollection< JElement2D_t, JDistance_t >::configure ( const JAbstractCollection< abscissa_type > & bounds,
typename JClass< ordinate_type >::argument_type value )
inlineinherited

Configure collection.

Parameters
boundsabscissa values
valueordinate value

Definition at line 344 of file JCollection.hh.

346 {
347 this->resize(bounds.getSize());
348
349 for (iterator i = this->begin(); i != this->end(); ++i) {
350
351 const abscissa_type x = bounds.getX(std::distance(this->begin(),i));
352
353 *i = value_type(x,value);
354 }
355 }
void resize(typename container_type::size_type size)
JElement2D_t::abscissa_type abscissa_type

◆ configure() [3/3]

void JTOOLS::JCollection< JElement2D_t, JDistance_t >::configure ( const JAbstractCollection< abscissa_type > & bounds,
const JFunction1D_t & function )
inlineinherited

Configure collection.

Parameters
boundsabscissa values
functionfunction

Definition at line 365 of file JCollection.hh.

367 {
368 using namespace JLANG;
369
370 collection_type* out = (is_identical(*this, function) ? new collection_type() : this);
371
372 for (int i = 0; i != bounds.getSize(); ++i) {
373
374 const abscissa_type x = bounds.getX(i);
375
376 out->put(x, function(x));
377 }
378
379 if (is_identical(*this, function)) {
380
381 this->swap(*out);
382
383 delete out;
384 }
385 }
JCollection< JElement2D_t, JDistance_t > collection_type
Auxiliary classes and methods for language specific functionality.
bool is_identical(JFirst_t &first, JSecond_t &second)
Check if two objects are indentical.

◆ is_compatible()

bool JTOOLS::JCollection< JElement2D_t, JDistance_t >::is_compatible ( const JCollection< JElement2D_t > & collection) const
inlineinherited

Test whether collections are compatible.

Parameters
collectioncollection
Returns
true if collections are compatible; else false

Definition at line 394 of file JCollection.hh.

395 {
396 if (this->empty() || collection.empty()) {
397
398 return true;
399
400 } else {
401
402 const double precision = JDistance<abscissa_type>::precision;
403
404 const_iterator p = this->begin();
405 const_iterator q = collection.begin();
406
407 if (getDistance(p->getX(), q->getX()) > precision) {
408
409 do {
410 ++p;
411 } while (p != this->end() && getDistance(p->getX(), q->getX()) > precision);
412
413 } else if (getDistance(q->getX(), p->getX()) > precision) {
414
415 do {
416 ++q;
417 } while (q != collection.end() && getDistance(q->getX(), p->getX()) > precision);
418 }
419
420 for ( ; p != this->end() && q != collection.end(); ++p, ++q) {
421 if (fabs(getDistance(p->getX(), q->getX())) > precision) {
422 return false;
423 }
424 }
425
426 return true;
427 }
428 }
static double precision
Default precision.
Definition JDistance.hh:44

◆ in_range()

bool JTOOLS::JCollection< JElement2D_t, JDistance_t >::in_range ( typename JClass< abscissa_type >::argument_type x) const
inlineinherited

Check if given abscissa is in range of this collection.

Parameters
xabscissa value
Returns
true if in tange: else false

Definition at line 437 of file JCollection.hh.

438 {
439 if (!this->empty())
440 return (this->getDistance(this->getXmin(), x) >= 0.0 &&
441 this->getDistance(this->getXmax(), x) <= 0.0);
442 else
443 return false;
444 }
virtual abscissa_type getXmin() const override
virtual abscissa_type getXmax() const override

◆ negate()

JCollection & JTOOLS::JCollection< JElement2D_t, JDistance_t >::negate ( )
inlineinherited

Negate collection.

Returns
this collection

Definition at line 452 of file JCollection.hh.

453 {
454 for (iterator i = this->begin(); i != this->end(); ++i) {
455 i->getY() = -i->getY();
456 }
457
458 return *this;
459 }

◆ add() [1/3]

JCollection & JTOOLS::JCollection< JElement2D_t, JDistance_t >::add ( const JCollection< JElement2D_t > & collection)
inlineinherited

Add collection.

Parameters
collectioncollection
Returns
this collection

Definition at line 468 of file JCollection.hh.

469 {
470 if (!collection.empty()) {
471
472 if (this->empty()) {
473
474 for (const_iterator i = collection.begin(); i != collection.end(); ++i) {
475 this->put(i->getX(), +i->getY());
476 }
477
478 } else if (this->is_compatible(collection)) {
479
480 const double precision = JDistance<abscissa_type>::precision;
481
482 iterator p = this->begin();
483 const_iterator q = collection.begin();
484
485 if (getDistance(p->getX(), q->getX()) > precision) {
486
487 do {
488 ++p;
489 } while (p != this->end() && getDistance(p->getX(), q->getX()) > precision);
490
491 } else if (getDistance(q->getX(), p->getX()) > precision) {
492
493 do {
494 ++q;
495 } while (q != collection.end() && getDistance(q->getX(), p->getX()) > precision);
496 }
497
498 const_iterator i = q;
499
500 for ( ; p != this->end() && i != collection.end(); ++p, ++i) {
501 p->getY() += i->getY();
502 }
503
504 for ( ; i != collection.end(); ++i) {
505 this->put(i->getX(), +i->getY());
506 }
507
508 for (i = collection.begin(); i != q; ++i) {
509 this->put(i->getX(), +i->getY());
510 }
511
512 } else {
513
514 THROW(JException, "JCollection::add(): collections incompatible.");
515 }
516 }
517
518 return *this;
519 }
bool is_compatible(const JCollection &collection) const
void put(typename JClass< key_type > ::argument_type key, typename JClass< mapped_type >::argument_type value)

◆ add() [2/3]

JCollection & JTOOLS::JCollection< JElement2D_t, JDistance_t >::add ( typename JClass< ordinate_type >::argument_type value)
inlineinherited

Add offset.

Parameters
valueoffset
Returns
this collection

Definition at line 620 of file JCollection.hh.

621 {
622 for (iterator i = this->begin(); i != this->end(); ++i) {
623 i->getY() += value;
624 }
625
626 return *this;
627 }

◆ add() [3/3]

JCollection & JTOOLS::JCollection< JElement2D_t, JDistance_t >::add ( const JFunction1D_t & function)
inlineinherited

Add function.

Parameters
functionfunction
Returns
this collection

Definition at line 653 of file JCollection.hh.

654 {
655 for (iterator i = this->begin(); i != this->end(); ++i) {
656 i->getY() += function(i->getX());
657 }
658
659 return *this;
660 }

◆ sub() [1/3]

JCollection & JTOOLS::JCollection< JElement2D_t, JDistance_t >::sub ( const JCollection< JElement2D_t > & collection)
inlineinherited

Subtract collection.

Parameters
collectioncollection
Returns
this collection

Definition at line 528 of file JCollection.hh.

529 {
530 if (!collection.empty()) {
531
532 if (this->empty()) {
533
534 for (const_iterator i = collection.begin(); i != collection.end(); ++i) {
535 this->put(i->getX(), -i->getY());
536 }
537
538 } else if (this->is_compatible(collection)) {
539
540 const double precision = JDistance<abscissa_type>::precision;
541
542 iterator p = this->begin();
543 const_iterator q = collection.begin();
544
545 if (getDistance(p->getX(), q->getX()) > precision) {
546
547 do {
548 ++p;
549 } while (p != this->end() && getDistance(p->getX(), q->getX()) > precision);
550
551 } else if (getDistance(q->getX(), p->getX()) > precision) {
552
553 do {
554 ++q;
555 } while (q != collection.end() && getDistance(q->getX(), p->getX()) > precision);
556 }
557
558 const_iterator i = q;
559
560 for ( ; p != this->end() && i != collection.end(); ++p, ++i) {
561 p->getY() -= i->getY();
562 }
563
564 for ( ; i != collection.end(); ++i) {
565 this->put(i->getX(), -i->getY());
566 }
567
568 for (i = collection.begin(); i != q; ++i) {
569 this->put(i->getX(), -i->getY());
570 }
571
572 } else {
573
574 THROW(JException, "JCollection::sub(): collections incompatible.");
575 }
576 }
577
578 return *this;
579 }

◆ sub() [2/3]

JCollection & JTOOLS::JCollection< JElement2D_t, JDistance_t >::sub ( typename JClass< ordinate_type >::argument_type value)
inlineinherited

Subtract offset.

Parameters
valueoffset
Returns
this collection

Definition at line 636 of file JCollection.hh.

637 {
638 for (iterator i = this->begin(); i != this->end(); ++i) {
639 i->getY() -= value;
640 }
641
642 return *this;
643 }

◆ sub() [3/3]

JCollection & JTOOLS::JCollection< JElement2D_t, JDistance_t >::sub ( const JFunction1D_t & function)
inlineinherited

Subtract function.

Parameters
functionfunction
Returns
this collection

Definition at line 670 of file JCollection.hh.

671 {
672 for (iterator i = this->begin(); i != this->end(); ++i) {
673 i->getY() -= function(i->getX());
674 }
675
676 return *this;
677 }

◆ mul() [1/2]

JCollection & JTOOLS::JCollection< JElement2D_t, JDistance_t >::mul ( const double value)
inlineinherited

Scale contents.

Parameters
valuemultiplication factor
Returns
this collection

Definition at line 588 of file JCollection.hh.

589 {
590 for (iterator i = this->begin(); i != this->end(); ++i) {
591 i->getY() *= value;
592 }
593
594 return *this;
595 }

◆ mul() [2/2]

template<class JFirst_t , class JSecond_t >
JFirst_t & JMATH::JMath< JFirst_t, JSecond_t >::mul ( const JSecond_t & object)
inlineinherited

Multiply with object.

Parameters
objectobject
Returns
result object

Definition at line 354 of file JMath.hh.

355 {
356 return static_cast<JFirst_t&>(*this) = JFirst_t().mul(static_cast<const JFirst_t&>(*this), object);
357 }

◆ div()

JCollection & JTOOLS::JCollection< JElement2D_t, JDistance_t >::div ( const double value)
inlineinherited

Scale contents.

Parameters
valuedivision factor
Returns
this collection

Definition at line 604 of file JCollection.hh.

605 {
606 for (iterator i = this->begin(); i != this->end(); ++i) {
607 i->getY() /= value;
608 }
609
610 return *this;
611 }

◆ getComparator()

const JComparator & JTOOLS::JCollection< JElement2D_t, JDistance_t >::getComparator ( ) const
inlineinherited

Get comparator.

Returns
comparator

Definition at line 784 of file JCollection.hh.

785 {
786 return compare;
787 }

◆ resize()

void JTOOLS::JCollection< JElement2D_t, JDistance_t >::resize ( typename container_type::size_type size)
inlineprotectedinherited

Resize collection.

Parameters
sizesize

Definition at line 808 of file JCollection.hh.

809 {
810 container_type::resize(size);
811 }

◆ erase()

void JTOOLS::JCollection< JElement2D_t, JDistance_t >::erase ( )
privateinherited

◆ push_back()

void JTOOLS::JCollection< JElement2D_t, JDistance_t >::push_back ( )
privateinherited

◆ pop_back()

void JTOOLS::JCollection< JElement2D_t, JDistance_t >::pop_back ( )
privateinherited

◆ operator[]() [1/2]

const mapped_type & JTOOLS::JMappableCollection< JElement2D_t::abscissa_type, JElement2D_t::ordinate_type >::operator[] ( typename JClass< key_type >::argument_type key) const
inlineinherited

Get mapped value.

Parameters
keykey
Returns
value

Definition at line 73 of file JMappableCollection.hh.

74 {
75 return get(key);
76 }

◆ operator[]() [2/2]

mapped_type & JTOOLS::JMappableCollection< JElement2D_t::abscissa_type, JElement2D_t::ordinate_type >::operator[] ( typename JClass< key_type >::argument_type key)
inlineinherited

Get mapped value.

Parameters
keykey
Returns
value

Definition at line 85 of file JMappableCollection.hh.

86 {
87 return get(key);
88 }

◆ put()

void JTOOLS::JMappableCollection< JElement2D_t::abscissa_type, JElement2D_t::ordinate_type >::put ( typename JClass< key_type > ::argument_type key,
typename JClass< mapped_type >::argument_type value )
inlineinherited

Put pair-wise element (key,value) into collection.

Parameters
keykey
valuevalue

Definition at line 97 of file JMappableCollection.hh.

99 {
100 get(key) = value;
101 }

◆ is_equal()

bool JTOOLS::JAbstractCollection< JElement2D_t::abscissa_type >::is_equal ( const JAbstractCollection< JElement2D_t::abscissa_type > & collection) const
inlineinherited

Test whether abstract collections are equal.

Parameters
collectionabstract collection
Returns
true if collections are equals; else false

Definition at line 72 of file JAbstractCollection.hh.

73 {
74 if (this->getSize() == collection.getSize()) {
75
76 for (int i = 0; i != this->getSize(); ++i) {
77
78 if (this->getX(i) != collection.getX(i)) {
79 return false;
80 }
81 }
82
83 return true;
84 }
85
86 return false;
87 }
virtual abscissa_type getX(int index) const=0

◆ getIndexOfRefractionPhase()

virtual double JPHYSICS::JDispersion::getIndexOfRefractionPhase ( const double lambda) const
inlinevirtualinherited

Index of refraction (phase velocity).

Parameters
lambdawavelenth [nm]
Returns
index of refraction

Implements JPHYSICS::JDispersionInterface.

Definition at line 51 of file JDispersion.hh.

52 {
53 const double x = 1.0 / lambda;
54
55 return a0 + a1*P + x*(a2 + x*(a3 + x*a4));
56 }
const double a1
dn/dP
const double a0
offset
const double P
Dispersion parameters (x = 1/lambda)
const double a4
d^3n/(dx)^3
const double a2
d^1n/(dx)^1
const double a3
d^2n/(dx)^2

◆ getDispersionPhase()

virtual double JPHYSICS::JDispersion::getDispersionPhase ( const double lambda) const
inlinevirtualinherited

Dispersion of light for phase velocity.

Parameters
lambdawavelength of light [nm]
Returns
dn/dlambda

Implements JPHYSICS::JDispersionInterface.

Definition at line 65 of file JDispersion.hh.

66 {
67 const double x = 1.0 / lambda;
68
69 return -x*x*(a2 + x*(2.0*a3 + x*3.0*a4));
70 }

◆ getIndexOfRefractionGroup()

virtual double JPHYSICS::JDispersionInterface::getIndexOfRefractionGroup ( const double lambda) const
inlinevirtualinherited

Index of refraction for group velocity.

Parameters
lambdawavelenth [nm]
Returns
index of refraction

Definition at line 52 of file JDispersionInterface.hh.

53 {
54 const double n = getIndexOfRefractionPhase(lambda);
55 const double y = getDispersionPhase(lambda);
56
57 return n / (1.0 + y*lambda/n);
58 }

◆ getDispersionGroup()

virtual double JPHYSICS::JDispersion::getDispersionGroup ( const double lambda) const
inlinevirtualinherited

Dispersion of light for group velocity.

Parameters
lambdawavelength of light [nm]
Returns
dn/dlambda

Implements JPHYSICS::JDispersionInterface.

Definition at line 79 of file JDispersion.hh.

80 {
81 const double x = 1.0 / lambda;
82
83 const double n = getIndexOfRefractionPhase(lambda);
84 const double np = getDispersionPhase(lambda);
85 const double npp = x*x*x*(2.0*a2 + x*(6.0*a3 + x*12.0*a4));
86 const double ng = n / (1.0 + np*lambda/n);
87
88 return ng*ng * (2*np*np - n*npp) * lambda / (n*n*n);
89 }
virtual double getDispersionPhase(const double lambda) const
Dispersion of light for phase velocity.

◆ getKappa()

double JPHYSICS::JDispersionInterface::getKappa ( const double lambda) const
inlineinherited

Get effective index of refraction for muon light.

Parameters
lambdawavelength of light [nm]
Returns
index of refraction

Definition at line 76 of file JDispersionInterface.hh.

77 {
78 const double n = getIndexOfRefractionPhase(lambda);
79 const double ng = getIndexOfRefractionGroup(lambda);
80
81 return (ng * n - 1.0) / sqrt(n*n - 1.0);
82 }

◆ getKmin()

double JPHYSICS::JDispersionInterface::getKmin ( const double lambda) const
inlineinherited

Get smallest index of refraction for Bremsstrahlung light (i.e. point at which dt/dz = 0).

Parameters
lambdawavelength of light [nm]
Returns
index of refraction

Definition at line 91 of file JDispersionInterface.hh.

92 {
93 const double ng = getIndexOfRefractionGroup(lambda);
94
95 return sqrt(ng*ng - 1.0);
96 }

Member Data Documentation

◆ A

const double JPHYSICS::JPDF_C::A
protected

photo-cathode area [m2]

Definition at line 2305 of file JPDF.hh.

◆ qe

double(* JPHYSICS::JPDF_C::qe) (const double lambda)
protected

Quantum efficiency of PMT (incl.

absorption in glass, gel, etc.)

Parameters
lambdawavelenth [nm]
Returns
QE

Definition at line 2313 of file JPDF.hh.

◆ l_abs

double(* JPHYSICS::JPDF_C::l_abs) (const double lambda)
protected

Absorption length.

Parameters
lambdawavelenth [nm]
Returns
absorption length [m]

Definition at line 2321 of file JPDF.hh.

◆ ls

double(* JPHYSICS::JPDF_C::ls) (const double lambda)
protected

Scattering length.

Parameters
lambdawavelenth [nm]
Returns
scattering length [m]

Definition at line 2329 of file JPDF.hh.

◆ pmt

double(* JPHYSICS::JPDF_C::pmt) (const double ct)
protected

Angular acceptance of PMT.

Parameters
ctcosine angle of incidence
Returns
relative efficiency

Definition at line 2337 of file JPDF.hh.

◆ ps

double(* JPHYSICS::JPDF_C::ps) (const double ct)
protected

Model specific function to describe light scattering in water.

Parameters
ctcosine scattering angle
Returns
probability

Definition at line 2345 of file JPDF.hh.

◆ wmin

const double JPHYSICS::JPDF::wmin
protectedinherited

Integration limits.

minimal wavelength for integration [nm]

Definition at line 2144 of file JPDF.hh.

◆ wmax

const double JPHYSICS::JPDF::wmax
protectedinherited

maximal wavelength for integration [nm]

Definition at line 2145 of file JPDF.hh.

◆ phd

std::vector<element_type> JPHYSICS::JPDF::phd
protectedinherited

fast evaluation of phi integral

Definition at line 2147 of file JPDF.hh.

◆ getDistance

JDistance_t JTOOLS::JCollection< JElement2D_t, JDistance_t >::getDistance
inherited

Function object for distance evaluation.

Definition at line 793 of file JCollection.hh.

◆ compare

JComparator JTOOLS::JCollection< JElement2D_t, JDistance_t >::compare
protectedinherited

Function object for comparison.

Definition at line 800 of file JCollection.hh.

◆ P

const double JPHYSICS::JDispersion::P
inherited

Dispersion parameters (x = 1/lambda)

ambient pressure [atm]

Definition at line 95 of file JDispersion.hh.

◆ a0

const double JPHYSICS::JDispersion::a0
inherited

offset

Definition at line 96 of file JDispersion.hh.

◆ a1

const double JPHYSICS::JDispersion::a1
inherited

dn/dP

Definition at line 97 of file JDispersion.hh.

◆ a2

const double JPHYSICS::JDispersion::a2
inherited

d^1n/(dx)^1

Definition at line 98 of file JDispersion.hh.

◆ a3

const double JPHYSICS::JDispersion::a3
inherited

d^2n/(dx)^2

Definition at line 99 of file JDispersion.hh.

◆ a4

const double JPHYSICS::JDispersion::a4
inherited

d^3n/(dx)^3

Definition at line 100 of file JDispersion.hh.


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