Jpp 19.3.0-rc.3
the software that should make you happy
Loading...
Searching...
No Matches
JPHYSICS::JAbstractPDF Class Referenceabstract

Probability Density Functions of the time response of a PMT with an implementation for the JDispersionInterface interface. More...

#include <JPDF.hh>

Inheritance diagram for 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 > JPHYSICS::JPDF_C

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

 JAbstractPDF (const double P_atm, const double Wmin, const double Wmax, const int numberOfPoints=20, const double epsilon=1e-12)
 Constructor.
 
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 getDispersionGroup (const double lambda) const
 Dispersion of light for group velocity.
 
virtual double getIndexOfRefractionGroup (const double lambda) const
 Index of refraction 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).
 
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.
 
virtual double getAbsorptionLength (const double lambda) const =0
 Absorption length.
 
virtual double getScatteringLength (const double lambda) const =0
 Scattering length.
 
virtual double getScatteringProbability (const double ct) const =0
 Model specific function to describe light scattering in water (integral over full solid angle normalised to unity).
 

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 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 for the JDispersionInterface interface.

Definition at line 2154 of file JPDF.hh.

Member Typedef Documentation

◆ element_type

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

Definition at line 284 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

◆ JAbstractPDF()

JPHYSICS::JAbstractPDF::JAbstractPDF ( const double P_atm,
const double Wmin,
const double Wmax,
const int numberOfPoints = 20,
const double epsilon = 1e-12 )
inline

Constructor.

Parameters
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 2168 of file JPDF.hh.

2172 :
2173 JPDF(Wmin, Wmax, numberOfPoints, epsilon),
2174 JDispersion(P_atm)
2175 {}
int numberOfPoints
Definition JResultPDF.cc:22
JDispersion(const double P_atm)
Constructor.
JPDF(const double Wmin, const double Wmax, const int numberOfPoints=20, const double epsilon=1e-12)
Constructor.
Definition JPDF.hh:295

Member Function Documentation

◆ 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 325 of file JPDF.hh.

326 {
327 double value = 0.0;
328
329 const double xmin = 1.0 / wmax;
330 const double xmax = 1.0 / wmin;
331
332 for (const_iterator i = begin(); i != end(); ++i) {
333
334 const double x = 0.5 * (xmax + xmin) + i->getX() * 0.5 * (xmax - xmin);
335 const double dx = i->getY() * 0.5 * (xmax - xmin);
336
337 const double w = 1.0 / x;
338 const double dw = dx * w*w;
339
340 const double n = getIndexOfRefractionPhase(w);
341
342 value += cherenkov(w,n) * dw;
343 }
344
345 return value;
346 }
const double wmax
maximal wavelength for integration [nm]
Definition JPDF.hh:2144
const double wmin
Integration limits.
Definition JPDF.hh:2143
container_type::const_iterator const_iterator
const double xmax
const double xmin
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 357 of file JPDF.hh.

360 {
361 double value = 0;
362
363 const double R = std::max(R_m, getRmin());
364 const double A = getPhotocathodeArea();
365
366 const double px = sin(theta)*cos(phi);
367 const double pz = cos(theta);
368
369 for (const_iterator m = begin(); m != end(); ++m) {
370
371 const double w = 0.5 * (wmax + wmin) + m->getX() * 0.5 * (wmax - wmin);
372 const double dw = m->getY() * 0.5 * (wmax - wmin);
373
374 const double n = getIndexOfRefractionPhase(w);
375
376 const double l_abs = getAbsorptionLength(w);
377 const double ls = getScatteringLength(w);
378
379 const double npe = cherenkov(w,n) * dw * getQE(w);
380
381 const double ct0 = 1.0 / n;
382 const double st0 = sqrt((1.0 + ct0)*(1.0 - ct0));
383
384 const double d = R / st0; // distance traveled by photon
385 const double ct = st0*px + ct0*pz; // cosine angle of incidence on PMT
386
387 const double U = getAngularAcceptance(ct); // PMT angular acceptance
388 const double V = exp(-d/l_abs) * exp(-d/ls); // absorption & scattering
389 const double W = A / (2.0*PI*R*st0); // solid angle
390
391 value += npe * U * V * W;
392 }
393
394 return value;
395 }
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:2099

◆ 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 407 of file JPDF.hh.

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

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

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

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

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

◆ 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 1006 of file JPDF.hh.

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

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

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

◆ 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 1300 of file JPDF.hh.

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

◆ 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 1375 of file JPDF.hh.

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

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

◆ 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 1607 of file JPDF.hh.

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

◆ 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 1651 of file JPDF.hh.

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

◆ 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 1751 of file JPDF.hh.

1757 {
1758 switch (type) {
1759
1761 return getDirectLightFromMuon (R_m, theta, phi, t_ns);
1762
1764 return getScatteredLightFromMuon (R_m, theta, phi, t_ns);
1765
1767 return getDirectLightFromEMshowers (R_m, theta, phi, t_ns) * E_GeV;
1768
1770 return getScatteredLightFromEMshowers(R_m, theta, phi, t_ns) * E_GeV;
1771
1773 return getDirectLightFromDeltaRays (R_m, theta, phi, t_ns) * getDeltaRaysFromMuon(E_GeV);
1774
1776 return getScatteredLightFromDeltaRays(R_m, theta, phi, t_ns) * getDeltaRaysFromMuon(E_GeV);
1777
1778 default:
1779 return 0.0;
1780 }
1781 }
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:1461
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:357
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:1375
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:730
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:496
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:642
double getDeltaRaysFromMuon(const double E, const JRange< double > T_GeV=JRange< double >(DELTARAY_TMIN, DELTARAY_TMAX))
Equivalent EM-shower energy due to delta-rays per unit muon track length.
@ 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

◆ 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 1794 of file JPDF.hh.

1799 {
1800 return (getDirectLightFromMuon (R_m, theta, phi, t_ns) +
1801 getScatteredLightFromMuon (R_m, theta, phi, t_ns) +
1802 getDirectLightFromEMshowers (R_m, theta, phi, t_ns) * E_GeV +
1803 getScatteredLightFromEMshowers(R_m, theta, phi, t_ns) * E_GeV +
1804 getDirectLightFromDeltaRays (R_m, theta, phi, t_ns) * getDeltaRaysFromMuon(E_GeV) +
1805 getScatteredLightFromDeltaRays(R_m, theta, phi, t_ns) * getDeltaRaysFromMuon(E_GeV));
1806 }

◆ 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 1820 of file JPDF.hh.

1826 {
1827 switch (type) {
1828
1830 return getDirectLightFromEMshower (D_m, cd, theta, phi, t_ns);
1831
1833 return getScatteredLightFromEMshower(D_m, cd, theta, phi, t_ns);
1834
1835 default:
1836 return 0.0;
1837 }
1838 }
@ 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 1851 of file JPDF.hh.

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

◆ 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 1874 of file JPDF.hh.

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

◆ 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 1907 of file JPDF.hh.

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

◆ 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 1928 of file JPDF.hh.

1932 {
1933 switch (type) {
1934
1936 return getDirectLightFromBrightPoint (D_m, ct, t_ns);
1937
1939 return getScatteredLightFromBrightPoint(D_m, ct, t_ns);
1940
1941 default:
1942 return 0.0;
1943 }
1944 }
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:1651
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:1607
@ 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 1955 of file JPDF.hh.

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

◆ 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 2038 of file JPDF.hh.

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

◆ 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 2076 of file JPDF.hh.

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

◆ getRmin()

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

minimal distance of approach of muon to PMT [m]

Definition at line 2099 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 2110 of file JPDF.hh.

2111 {
2113
2114 if (f1.empty()) {
2115
2116 const int nx = 100000;
2117 const double xmin = -1.0;
2118 const double xmax = +1.0;
2119
2120 const double dx = (xmax - xmin) / (nx - 1);
2121
2122 for (double x = xmin, W = 0.0; x < xmax; x += dx) {
2123
2124 f1[x] = W;
2125
2126 W += 2*PI * dx * getScatteringProbability(x + 0.5*dx);
2127 }
2128
2129 f1[xmin] = 0.0;
2130 f1[xmax] = 1.0;
2131
2132 f1.compile();
2133 }
2134
2135 return 1.0/l_abs + f1(cts)/ls;
2136 }
const JPolynome f1(1.0, 2.0, 3.0)
Function.
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 }
513
514 return *this;
515 }
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 616 of file JCollection.hh.

617 {
618 for (iterator i = this->begin(); i != this->end(); ++i) {
619 i->getY() += value;
620 }
621
622 return *this;
623 }

◆ 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 649 of file JCollection.hh.

650 {
651 for (iterator i = this->begin(); i != this->end(); ++i) {
652 i->getY() += function(i->getX());
653 }
654
655 return *this;
656 }

◆ 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 524 of file JCollection.hh.

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

◆ 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 632 of file JCollection.hh.

633 {
634 for (iterator i = this->begin(); i != this->end(); ++i) {
635 i->getY() -= value;
636 }
637
638 return *this;
639 }

◆ 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 666 of file JCollection.hh.

667 {
668 for (iterator i = this->begin(); i != this->end(); ++i) {
669 i->getY() -= function(i->getX());
670 }
671
672 return *this;
673 }

◆ 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 584 of file JCollection.hh.

585 {
586 for (iterator i = this->begin(); i != this->end(); ++i) {
587 i->getY() *= value;
588 }
589
590 return *this;
591 }

◆ 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 600 of file JCollection.hh.

601 {
602 for (iterator i = this->begin(); i != this->end(); ++i) {
603 i->getY() /= value;
604 }
605
606 return *this;
607 }

◆ getComparator()

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

Get comparator.

Returns
comparator

Definition at line 780 of file JCollection.hh.

781 {
782 return compare;
783 }

◆ resize()

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

Resize collection.

Parameters
sizesize

Definition at line 804 of file JCollection.hh.

805 {
806 container_type::resize(size);
807 }

◆ 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 }

◆ 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.

◆ 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 }

◆ 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 }

◆ getPhotocathodeArea()

virtual double JPHYSICS::JAbstractPMT::getPhotocathodeArea ( ) const
pure virtualinherited

Photo-cathode area of PMT.

Returns
photo-cathode area [m^2]

Implemented in JPHYSICS::JLED_C, and JPHYSICS::JPDF_C.

◆ getQE()

virtual double JPHYSICS::JAbstractPMT::getQE ( const double lambda) const
pure virtualinherited

Quantum efficiency of PMT (incl.

absorption in glass, gel, etc.).

Parameters
lambdawavelenth [nm]
Returns
QE

Implemented in JPHYSICS::JLED_C, and JPHYSICS::JPDF_C.

◆ getAngularAcceptance()

virtual double JPHYSICS::JAbstractPMT::getAngularAcceptance ( const double ct) const
pure virtualinherited

Angular acceptence of PMT.

Parameters
ctcosine angle of incidence
Returns
acceptance

Implemented in JPHYSICS::JLED_C, and JPHYSICS::JPDF_C.

◆ getAbsorptionLength()

virtual double JPHYSICS::JAbstractMedium::getAbsorptionLength ( const double lambda) const
pure virtualinherited

Absorption length.

Parameters
lambdawavelenth [nm]
Returns
absorption length [m]

Implemented in JPHYSICS::JLED_C, and JPHYSICS::JPDF_C.

◆ getScatteringLength()

virtual double JPHYSICS::JAbstractMedium::getScatteringLength ( const double lambda) const
pure virtualinherited

Scattering length.

Parameters
lambdawavelenth [nm]
Returns
scattering length [m]

Implemented in JPHYSICS::JLED_C, and JPHYSICS::JPDF_C.

◆ getScatteringProbability()

virtual double JPHYSICS::JAbstractMedium::getScatteringProbability ( const double ct) const
pure virtualinherited

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

Parameters
ctcosine scattering angle
Returns
probability

Implemented in JPHYSICS::JLED_C, and JPHYSICS::JPDF_C.

Member Data Documentation

◆ wmin

const double JPHYSICS::JPDF::wmin
protectedinherited

Integration limits.

minimal wavelength for integration [nm]

Definition at line 2143 of file JPDF.hh.

◆ wmax

const double JPHYSICS::JPDF::wmax
protectedinherited

maximal wavelength for integration [nm]

Definition at line 2144 of file JPDF.hh.

◆ phd

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

fast evaluation of phi integral

Definition at line 2146 of file JPDF.hh.

◆ getDistance

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

Function object for distance evaluation.

Definition at line 789 of file JCollection.hh.

◆ compare

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

Function object for comparison.

Definition at line 796 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: