Jpp  16.0.0-rc.1
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
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< JElement_t, JAllocator_t > JTOOLS::JMappableCollection< JKey_t, JValue_t > JTOOLS::JAbstractCollection< JAbscissa_t > 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< typename
JElement2D_t::abscissa_type
distance_type
 
typedef JCollection
< JElement2D_t, JDistance
< typename
JElement2D_t::abscissa_type > > 
collection_type
 
typedef std::vector< value_typecontainer_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 JKey_t key_type
 
typedef JValue_t 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. More...
 
double getNumberOfPhotons () const
 Number of Cherenkov photons per unit track length. More...
 
double getDirectLightFromMuon (const double R_m, const double theta, const double phi) const
 Number of photo-electrons from direct Cherenkov light from muon. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
double getScatteredLightFromDeltaRays (const double R_m, const double theta, const double phi, const double t_ns) const
 Probability density function for direct light from delta-rays. More...
 
double getDirectLightFromBrightPoint (const double D_m, const double ct, const double t_ns) const
 Probability density function for direct light from isotropic light source. More...
 
double getScatteredLightFromBrightPoint (const double D_m, const double ct, const double t_ns) const
 Probability density function for scattered light from isotropic light source. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
double getLightFromBrightPoint (const double D_m, const double ct, const double t_ns) const
 Probability density function for direct light from isotropic light source. More...
 
virtual void clear () override
 Clear. More...
 
virtual const ordinate_typeget (typename JClass< abscissa_type >::argument_type x) const override
 Get ordinate value. More...
 
virtual ordinate_typeget (typename JClass< abscissa_type >::argument_type x) override
 Get ordinate value. More...
 
virtual const mapped_typeget (typename JClass< key_type >::argument_type key) const =0
 Get mapped value. More...
 
virtual mapped_typeget (typename JClass< key_type >::argument_type key)=0
 Get mapped value. More...
 
virtual int getSize () const override
 Get number of elements. More...
 
virtual abscissa_type getX (int index) const override
 Get abscissa value. More...
 
virtual abscissa_type getXmin () const override
 Get minimal abscissa value. More...
 
virtual abscissa_type getXmax () const override
 Get maximal abscissa value. More...
 
const ordinate_typegetY (int index) const
 Get ordinate value. More...
 
ordinate_typegetY (int index)
 Get ordinate value. More...
 
void transform (const transformer_type &transformer)
 Transform collection. More...
 
void sort ()
 Sort elements. More...
 
const_iterator lower_bound (typename JClass< abscissa_type >::argument_type x) const
 Get first position of element i, where x >= i->getX(). More...
 
iterator lower_bound (typename JClass< abscissa_type >::argument_type x)
 Get first position of element i, where x >= i->getX(). More...
 
pair_type insert (const value_type &element)
 Insert element. More...
 
void configure (const JAbstractCollection< abscissa_type > &bounds)
 Configure collection. More...
 
void configure (const JAbstractCollection< abscissa_type > &bounds, typename JClass< ordinate_type >::argument_type value)
 Configure collection. More...
 
void configure (const JAbstractCollection< abscissa_type > &bounds, const JFunction1D_t &function)
 Configure collection. More...
 
bool is_compatible (const JCollection &collection) const
 Test whether collections are compatible. More...
 
JCollectionnegate ()
 Negate collection. More...
 
JCollectionadd (const JCollection &collection)
 Add collection. More...
 
JCollectionadd (typename JClass< ordinate_type >::argument_type value)
 Add offset. More...
 
JCollectionadd (const JFunction1D_t &function)
 Add function. More...
 
JCollectionsub (const JCollection &collection)
 Subtract collection. More...
 
JCollectionsub (typename JClass< ordinate_type >::argument_type value)
 Subtract offset. More...
 
JCollectionsub (const JFunction1D_t &function)
 Subtract function. More...
 
JCollectionmul (const double value)
 Scale contents. More...
 
JFirst_t & mul (const JSecond_t &object)
 Multiply with object. More...
 
JCollectiondiv (const double value)
 Scale contents. More...
 
const JComparatorgetComparator () const
 Get comparator. More...
 
const mapped_typeoperator[] (typename JClass< key_type >::argument_type key) const
 Get mapped value. More...
 
mapped_typeoperator[] (typename JClass< key_type >::argument_type key)
 Get mapped value. More...
 
void put (typename JClass< key_type >::argument_type key, typename JClass< mapped_type >::argument_type value)
 Put pair-wise element (key,value) into collection. More...
 
bool is_equal (const JAbstractCollection &collection) const
 Test whether abstract collections are equal. More...
 
virtual double getIndexOfRefractionPhase (const double lambda) const =0
 Index of refraction for phase velocity. More...
 
virtual double getDispersionPhase (const double lambda) const =0
 Dispersion of light for phase velocity. More...
 
virtual double getIndexOfRefractionGroup (const double lambda) const
 Index of refraction for group velocity. More...
 
virtual double getDispersionGroup (const double lambda) const =0
 Dispersion of light for group velocity. More...
 
double getKappa (const double lambda) const
 Get effective index of refraction for muon light. More...
 
double getKmin (const double lambda) const
 Get smallest index of refraction for Bremsstrahlung light (i.e. point at which dt/dz = 0). More...
 
virtual double getPhotocathodeArea () const =0
 Photo-cathode area of PMT. More...
 
virtual double getQE (const double lambda) const =0
 Quantum efficiency of PMT (incl. More...
 
virtual double getAngularAcceptance (const double ct) const =0
 Angular acceptence of PMT. More...
 
virtual double getAbsorptionLength (const double lambda) const =0
 Absorption length. More...
 
virtual double getScatteringLength (const double lambda) const =0
 Scattering length. More...
 
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). More...
 
virtual double getIndexOfRefractionPhase (const double lambda) const
 Index of refraction (phase velocity). More...
 
virtual double getDispersionPhase (const double lambda) const
 Dispersion of light for phase velocity. More...
 
virtual double getDispersionGroup (const double lambda) const
 Dispersion of light for group velocity. More...
 

Public Attributes

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

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. More...
 
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. More...
 
virtual double getInverseAttenuationLength (const double l_abs, const double ls, const double cts) const
 Get the inverse of the attenuation length. More...
 
void resize (typename container_type::size_type size)
 Resize collection. More...
 

Static Protected Member Functions

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

Protected Attributes

const double wmin
 Integration limits. More...
 
const double wmax
 maximal wavelength for integration [nm] More...
 
std::vector< element_typephd
 fast evaluation of phi integral More...
 
JComparator compare
 Function object for comparison. More...
 

Detailed Description

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

Definition at line 2149 of file JPDF.hh.

Member Typedef Documentation

Definition at line 82 of file JCollection.hh.

Definition at line 83 of file JCollection.hh.

Definition at line 84 of file JCollection.hh.

Definition at line 85 of file JCollection.hh.

Definition at line 87 of file JCollection.hh.

Definition at line 89 of file JCollection.hh.

typedef container_type::const_iterator JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::const_iterator
inherited

Definition at line 91 of file JCollection.hh.

typedef container_type::const_reverse_iterator JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::const_reverse_iterator
inherited

Definition at line 92 of file JCollection.hh.

typedef container_type::iterator JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::iterator
inherited

Definition at line 93 of file JCollection.hh.

typedef container_type::reverse_iterator JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::reverse_iterator
inherited

Definition at line 94 of file JCollection.hh.

Definition at line 96 of file JCollection.hh.

Definition at line 97 of file JCollection.hh.

template<class JKey_t, class JValue_t>
typedef JKey_t JTOOLS::JMappableCollection< JKey_t, JValue_t >::key_type
inherited

Definition at line 33 of file JMappableCollection.hh.

template<class JKey_t, class JValue_t>
typedef JValue_t JTOOLS::JMappableCollection< JKey_t, JValue_t >::mapped_type
inherited

Definition at line 34 of file JMappableCollection.hh.

Constructor & Destructor Documentation

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

2167  :
2168  JPDF(Wmin, Wmax, numberOfPoints, epsilon),
2169  JDispersion(P_atm)
2170  {}
JDispersion(const double P_atm)
Constructor.
Definition: JDispersion.hh:35
int numberOfPoints
Definition: JResultPDF.cc:22
JPDF(const double Wmin, const double Wmax, const int numberOfPoints=20, const double epsilon=1e-12)
Constructor.
Definition: JPDF.hh:295

Member Function Documentation

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  }
data_type w[N+1][M+1]
Definition: JPolint.hh:757
const int n
Definition: JPolint.hh:676
virtual double getIndexOfRefractionPhase(const double lambda) const =0
Index of refraction for phase velocity.
const double wmax
maximal wavelength for integration [nm]
Definition: JPDF.hh:2139
double cherenkov(const double lambda, const double n)
Number of Cherenkov photons per unit track length and per unit wavelength.
Definition: JPDFToolkit.hh:50
const double wmin
Integration limits.
Definition: JPDF.hh:2138
container_type::const_iterator const_iterator
Definition: JCollection.hh:91
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  }
data_type w[N+1][M+1]
Definition: JPolint.hh:757
V(JDAQEvent-JTriggerReprocessor)*1.0/(JDAQEvent+1.0e-10)
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable STRING $argv[2] set_array QUANTILES set_variable FORMULA *[0] exp(-0.5 *(x-[1])*(x-[1])/([2]*[2]))" set_variable MODULE `getModule -a $DETECTOR -L "$STRING 0"` source JAcoustics.sh -- typeset -A TRIPODS get_tripods $WORKDIR/tripod.txt TRIPODS XMEAN
const int n
Definition: JPolint.hh:676
virtual double getScatteringLength(const double lambda) const =0
Scattering length.
virtual double getAbsorptionLength(const double lambda) const =0
Absorption length.
static const double PI
Mathematical constants.
virtual double getIndexOfRefractionPhase(const double lambda) const =0
Index of refraction for phase velocity.
virtual double getPhotocathodeArea() const =0
Photo-cathode area of PMT.
then usage $script[distance] fi case set_variable R
Definition: JDrawLED.sh:43
static double getRmin()
minimal distance of approach of muon to PMT [m]
Definition: JPDF.hh:2094
const double wmax
maximal wavelength for integration [nm]
Definition: JPDF.hh:2139
double cherenkov(const double lambda, const double n)
Number of Cherenkov photons per unit track length and per unit wavelength.
Definition: JPDFToolkit.hh:50
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JMuonPath.sh:47
const double wmin
Integration limits.
Definition: JPDF.hh:2138
virtual double getAngularAcceptance(const double ct) const =0
Angular acceptence of PMT.
container_type::const_iterator const_iterator
Definition: JCollection.hh:91
virtual double getQE(const double lambda) const =0
Quantum efficiency of PMT (incl.
source $JPP_DIR setenv csh $JPP_DIR &dev null eval JShellParser o a A
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  }
data_type w[N+1][M+1]
Definition: JPolint.hh:757
then JShowerPostfit f $INPUT_FILE o $OUTPUT_FILE N
virtual double getDispersionGroup(const double lambda) const =0
Dispersion of light for group velocity.
V(JDAQEvent-JTriggerReprocessor)*1.0/(JDAQEvent+1.0e-10)
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable STRING $argv[2] set_array QUANTILES set_variable FORMULA *[0] exp(-0.5 *(x-[1])*(x-[1])/([2]*[2]))" set_variable MODULE `getModule -a $DETECTOR -L "$STRING 0"` source JAcoustics.sh -- typeset -A TRIPODS get_tripods $WORKDIR/tripod.txt TRIPODS XMEAN
static const double C
Physics constants.
const int n
Definition: JPolint.hh:676
virtual double getScatteringLength(const double lambda) const =0
Scattering length.
virtual double getAbsorptionLength(const double lambda) const =0
Absorption length.
static const double PI
Mathematical constants.
virtual double getIndexOfRefractionPhase(const double lambda) const =0
Index of refraction for phase velocity.
virtual double getPhotocathodeArea() const =0
Photo-cathode area of PMT.
then usage $script[distance] fi case set_variable R
Definition: JDrawLED.sh:43
static double getRmin()
minimal distance of approach of muon to PMT [m]
Definition: JPDF.hh:2094
const double wmax
maximal wavelength for integration [nm]
Definition: JPDF.hh:2139
double cherenkov(const double lambda, const double n)
Number of Cherenkov photons per unit track length and per unit wavelength.
Definition: JPDFToolkit.hh:50
virtual double getIndexOfRefractionGroup(const double lambda) const
Index of refraction for group velocity.
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JMuonPath.sh:47
then JCalibrateToT a
Definition: JTuneHV.sh:116
const double wmin
Integration limits.
Definition: JPDF.hh:2138
virtual double getAngularAcceptance(const double ct) const =0
Angular acceptence of PMT.
double getTanThetaC()
Get average tangent of Cherenkov angle of water corresponding to group velocity.
virtual double getQE(const double lambda) const =0
Quantum efficiency of PMT (incl.
source $JPP_DIR setenv csh $JPP_DIR &dev null eval JShellParser o a A
virtual double getDispersionPhase(const double lambda) const =0
Dispersion of light for phase velocity.
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  }
data_type w[N+1][M+1]
Definition: JPolint.hh:757
then fatal No hydrophone data file $HYDROPHONE_TXT fi sort gr k
virtual double getDispersionGroup(const double lambda) const =0
Dispersion of light for group velocity.
V(JDAQEvent-JTriggerReprocessor)*1.0/(JDAQEvent+1.0e-10)
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable STRING $argv[2] set_array QUANTILES set_variable FORMULA *[0] exp(-0.5 *(x-[1])*(x-[1])/([2]*[2]))" set_variable MODULE `getModule -a $DETECTOR -L "$STRING 0"` source JAcoustics.sh -- typeset -A TRIPODS get_tripods $WORKDIR/tripod.txt TRIPODS XMEAN
static const double C
Physics constants.
const int n
Definition: JPolint.hh:676
static double MODULE_RADIUS_M
Radius of optical module [m].
Definition: JPDF.hh:40
virtual double getScatteringLength(const double lambda) const =0
Scattering length.
virtual double getAbsorptionLength(const double lambda) const =0
Absorption length.
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:2033
static const double PI
Mathematical constants.
virtual double getIndexOfRefractionPhase(const double lambda) const =0
Index of refraction for phase velocity.
virtual double getPhotocathodeArea() const =0
Photo-cathode area of PMT.
then usage $script[distance] fi case set_variable R
Definition: JDrawLED.sh:43
static double getRmin()
minimal distance of approach of muon to PMT [m]
Definition: JPDF.hh:2094
const double wmax
maximal wavelength for integration [nm]
Definition: JPDF.hh:2139
double cherenkov(const double lambda, const double n)
Number of Cherenkov photons per unit track length and per unit wavelength.
Definition: JPDFToolkit.hh:50
virtual double getIndexOfRefractionGroup(const double lambda) const
Index of refraction for group velocity.
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JMuonPath.sh:47
virtual double getInverseAttenuationLength(const double l_abs, const double ls, const double cts) const
Get the inverse of the attenuation length.
Definition: JPDF.hh:2105
const double wmin
Integration limits.
Definition: JPDF.hh:2138
virtual double getAngularAcceptance(const double ct) const =0
Angular acceptence of PMT.
double getTanThetaC()
Get average tangent of Cherenkov angle of water corresponding to group velocity.
container_type::const_iterator const_iterator
Definition: JCollection.hh:91
int j
Definition: JPolint.hh:682
virtual double getQE(const double lambda) const =0
Quantum efficiency of PMT (incl.
data_type v[N+1][M+1]
Definition: JPolint.hh:756
double u[N+1]
Definition: JPolint.hh:755
source $JPP_DIR setenv csh $JPP_DIR &dev null eval JShellParser o a A
do echo Generating $dir eval D
Definition: JDrawLED.sh:53
virtual double getScatteringProbability(const double ct) const =0
Model specific function to describe light scattering in water (integral over full solid angle normali...
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  }
data_type w[N+1][M+1]
Definition: JPolint.hh:757
double getIndexOfRefraction()
Get average index of refraction of water corresponding to group velocity.
virtual double getDispersionGroup(const double lambda) const =0
Dispersion of light for group velocity.
V(JDAQEvent-JTriggerReprocessor)*1.0/(JDAQEvent+1.0e-10)
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable STRING $argv[2] set_array QUANTILES set_variable FORMULA *[0] exp(-0.5 *(x-[1])*(x-[1])/([2]*[2]))" set_variable MODULE `getModule -a $DETECTOR -L "$STRING 0"` source JAcoustics.sh -- typeset -A TRIPODS get_tripods $WORKDIR/tripod.txt TRIPODS XMEAN
static const double C
Physics constants.
const int n
Definition: JPolint.hh:676
static double MODULE_RADIUS_M
Radius of optical module [m].
Definition: JPDF.hh:40
virtual double getScatteringLength(const double lambda) const =0
Scattering length.
virtual double getAbsorptionLength(const double lambda) const =0
Absorption length.
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:2033
static const double PI
Mathematical constants.
virtual double getIndexOfRefractionPhase(const double lambda) const =0
Index of refraction for phase velocity.
virtual double getPhotocathodeArea() const =0
Photo-cathode area of PMT.
then usage $script[distance] fi case set_variable R
Definition: JDrawLED.sh:43
static double getRmin()
minimal distance of approach of muon to PMT [m]
Definition: JPDF.hh:2094
const double wmax
maximal wavelength for integration [nm]
Definition: JPDF.hh:2139
double cherenkov(const double lambda, const double n)
Number of Cherenkov photons per unit track length and per unit wavelength.
Definition: JPDFToolkit.hh:50
virtual double getIndexOfRefractionGroup(const double lambda) const
Index of refraction for group velocity.
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JMuonPath.sh:47
virtual double getInverseAttenuationLength(const double l_abs, const double ls, const double cts) const
Get the inverse of the attenuation length.
Definition: JPDF.hh:2105
const double wmin
Integration limits.
Definition: JPDF.hh:2138
virtual double getAngularAcceptance(const double ct) const =0
Angular acceptence of PMT.
do set_variable MODULE getModule a $WORKDIR detector_a datx L $STRING JEditDetector a $WORKDIR detector_a datx M $MODULE setz o $WORKDIR detector_a datx JEditDetector a $WORKDIR detector_b datx M $MODULE setz o $WORKDIR detector_b datx done echo Output stored at $WORKDIR detector_a datx and $WORKDIR tripod_a txt JDrawDetector2D a $WORKDIR detector_a datx a $WORKDIR detector_b datx L BL o detector $FORMAT $BATCH JDrawDetector2D T $WORKDIR tripod_a txt T $WORKDIR tripod_b txt L BL o tripod $FORMAT $BATCH JCompareDetector a $WORKDIR detector_a datx b $WORKDIR detector_b datx o $WORKDIR abc root &dev null for KEY in X Y Z
container_type::const_iterator const_iterator
Definition: JCollection.hh:91
int j
Definition: JPolint.hh:682
virtual double getQE(const double lambda) const =0
Quantum efficiency of PMT (incl.
data_type v[N+1][M+1]
Definition: JPolint.hh:756
double u[N+1]
Definition: JPolint.hh:755
source $JPP_DIR setenv csh $JPP_DIR &dev null eval JShellParser o a A
do echo Generating $dir eval D
Definition: JDrawLED.sh:53
virtual double getScatteringProbability(const double ct) const =0
Model specific function to describe light scattering in water (integral over full solid angle normali...
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  }
data_type w[N+1][M+1]
Definition: JPolint.hh:757
virtual double getDispersionGroup(const double lambda) const =0
Dispersion of light for group velocity.
static const JGeaneWater gWater
Function object for energy loss of muon in sea water.
Definition: JGeane.hh:323
V(JDAQEvent-JTriggerReprocessor)*1.0/(JDAQEvent+1.0e-10)
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable STRING $argv[2] set_array QUANTILES set_variable FORMULA *[0] exp(-0.5 *(x-[1])*(x-[1])/([2]*[2]))" set_variable MODULE `getModule -a $DETECTOR -L "$STRING 0"` source JAcoustics.sh -- typeset -A TRIPODS get_tripods $WORKDIR/tripod.txt TRIPODS XMEAN
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.
const int n
Definition: JPolint.hh:676
virtual double getScatteringLength(const double lambda) const =0
Scattering length.
virtual double getAbsorptionLength(const double lambda) const =0
Absorption length.
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:2033
static const double PI
Mathematical constants.
virtual double getIndexOfRefractionPhase(const double lambda) const =0
Index of refraction for phase velocity.
virtual double getPhotocathodeArea() const =0
Photo-cathode area of PMT.
then usage $script[distance] fi case set_variable R
Definition: JDrawLED.sh:43
static double getRmin()
minimal distance of approach of muon to PMT [m]
Definition: JPDF.hh:2094
const double wmax
maximal wavelength for integration [nm]
Definition: JPDF.hh:2139
double cherenkov(const double lambda, const double n)
Number of Cherenkov photons per unit track length and per unit wavelength.
Definition: JPDFToolkit.hh:50
virtual double getIndexOfRefractionGroup(const double lambda) const
Index of refraction for group velocity.
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JMuonPath.sh:47
const double wmin
Integration limits.
Definition: JPDF.hh:2138
virtual double getAngularAcceptance(const double ct) const =0
Angular acceptence of PMT.
double getTanThetaC()
Get average tangent of Cherenkov angle of water corresponding to group velocity.
container_type::const_iterator const_iterator
Definition: JCollection.hh:91
int j
Definition: JPolint.hh:682
virtual double getQE(const double lambda) const =0
Quantum efficiency of PMT (incl.
source $JPP_DIR setenv csh $JPP_DIR &dev null eval JShellParser o a A
do echo Generating $dir eval D
Definition: JDrawLED.sh:53
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  }
data_type w[N+1][M+1]
Definition: JPolint.hh:757
then fatal No hydrophone data file $HYDROPHONE_TXT fi sort gr k
virtual double getDispersionGroup(const double lambda) const =0
Dispersion of light for group velocity.
static const JGeaneWater gWater
Function object for energy loss of muon in sea water.
Definition: JGeane.hh:323
V(JDAQEvent-JTriggerReprocessor)*1.0/(JDAQEvent+1.0e-10)
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable STRING $argv[2] set_array QUANTILES set_variable FORMULA *[0] exp(-0.5 *(x-[1])*(x-[1])/([2]*[2]))" set_variable MODULE `getModule -a $DETECTOR -L "$STRING 0"` source JAcoustics.sh -- typeset -A TRIPODS get_tripods $WORKDIR/tripod.txt TRIPODS XMEAN
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.
const int n
Definition: JPolint.hh:676
std::vector< element_type > phd
fast evaluation of phi integral
Definition: JPDF.hh:2141
static double MODULE_RADIUS_M
Radius of optical module [m].
Definition: JPDF.hh:40
virtual double getScatteringLength(const double lambda) const =0
Scattering length.
virtual double getAbsorptionLength(const double lambda) const =0
Absorption length.
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:2033
static const double PI
Mathematical constants.
virtual double getIndexOfRefractionPhase(const double lambda) const =0
Index of refraction for phase velocity.
virtual double getPhotocathodeArea() const =0
Photo-cathode area of PMT.
then usage $script[distance] fi case set_variable R
Definition: JDrawLED.sh:43
static double getRmin()
minimal distance of approach of muon to PMT [m]
Definition: JPDF.hh:2094
const double wmax
maximal wavelength for integration [nm]
Definition: JPDF.hh:2139
double cherenkov(const double lambda, const double n)
Number of Cherenkov photons per unit track length and per unit wavelength.
Definition: JPDFToolkit.hh:50
virtual double getIndexOfRefractionGroup(const double lambda) const
Index of refraction for group velocity.
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JMuonPath.sh:47
virtual double getInverseAttenuationLength(const double l_abs, const double ls, const double cts) const
Get the inverse of the attenuation length.
Definition: JPDF.hh:2105
const double wmin
Integration limits.
Definition: JPDF.hh:2138
virtual double getAngularAcceptance(const double ct) const =0
Angular acceptence of PMT.
then cp
double getTanThetaC()
Get average tangent of Cherenkov angle of water corresponding to group velocity.
container_type::const_iterator const_iterator
Definition: JCollection.hh:91
int j
Definition: JPolint.hh:682
virtual double getQE(const double lambda) const =0
Quantum efficiency of PMT (incl.
data_type v[N+1][M+1]
Definition: JPolint.hh:756
double u[N+1]
Definition: JPolint.hh:755
source $JPP_DIR setenv csh $JPP_DIR &dev null eval JShellParser o a A
do echo Generating $dir eval D
Definition: JDrawLED.sh:53
virtual double getScatteringProbability(const double ct) const =0
Model specific function to describe light scattering in water (integral over full solid angle normali...
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  }
data_type w[N+1][M+1]
Definition: JPolint.hh:757
double geanc()
Equivalent muon track length per unit shower energy.
Definition: JGeane.hh:26
double getIndexOfRefraction()
Get average index of refraction of water corresponding to group velocity.
virtual double getDispersionGroup(const double lambda) const =0
Dispersion of light for group velocity.
V(JDAQEvent-JTriggerReprocessor)*1.0/(JDAQEvent+1.0e-10)
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable STRING $argv[2] set_array QUANTILES set_variable FORMULA *[0] exp(-0.5 *(x-[1])*(x-[1])/([2]*[2]))" set_variable MODULE `getModule -a $DETECTOR -L "$STRING 0"` source JAcoustics.sh -- typeset -A TRIPODS get_tripods $WORKDIR/tripod.txt TRIPODS XMEAN
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.
const int n
Definition: JPolint.hh:676
virtual double getScatteringLength(const double lambda) const =0
Scattering length.
virtual double getAbsorptionLength(const double lambda) const =0
Absorption length.
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:2033
virtual double getIndexOfRefractionPhase(const double lambda) const =0
Index of refraction for phase velocity.
virtual double getPhotocathodeArea() const =0
Photo-cathode area of PMT.
static double getRmin()
minimal distance of approach of muon to PMT [m]
Definition: JPDF.hh:2094
const double wmax
maximal wavelength for integration [nm]
Definition: JPDF.hh:2139
double cherenkov(const double lambda, const double n)
Number of Cherenkov photons per unit track length and per unit wavelength.
Definition: JPDFToolkit.hh:50
virtual double getIndexOfRefractionGroup(const double lambda) const
Index of refraction for group velocity.
const double wmin
Integration limits.
Definition: JPDF.hh:2138
virtual double getAngularAcceptance(const double ct) const =0
Angular acceptence of PMT.
virtual double getQE(const double lambda) const =0
Quantum efficiency of PMT (incl.
source $JPP_DIR setenv csh $JPP_DIR &dev null eval JShellParser o a A
do echo Generating $dir eval D
Definition: JDrawLED.sh:53
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 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
then usage E
Definition: JMuonPostfit.sh:35
double getIndexOfRefraction()
Get average index of refraction of water corresponding to group velocity.
static const double C
Physics constants.
static const JGeanz geanz(1.85, 0.62, 0.54)
Function object for longitudinal EM-shower profile.
then usage $script[distance] fi case set_variable R
Definition: JDrawLED.sh:43
static double getRmin()
minimal distance of approach of muon to PMT [m]
Definition: JPDF.hh:2094
const double wmax
maximal wavelength for integration [nm]
Definition: JPDF.hh:2139
virtual double getIndexOfRefractionGroup(const double lambda) const
Index of refraction for group velocity.
double getIntegral(const double E, const double z) const
Integral of PDF (starting from 0).
Definition: JGeanz.hh:95
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JMuonPath.sh:47
const double wmin
Integration limits.
Definition: JPDF.hh:2138
do set_variable MODULE getModule a $WORKDIR detector_a datx L $STRING JEditDetector a $WORKDIR detector_a datx M $MODULE setz o $WORKDIR detector_a datx JEditDetector a $WORKDIR detector_b datx M $MODULE setz o $WORKDIR detector_b datx done echo Output stored at $WORKDIR detector_a datx and $WORKDIR tripod_a txt JDrawDetector2D a $WORKDIR detector_a datx a $WORKDIR detector_b datx L BL o detector $FORMAT $BATCH JDrawDetector2D T $WORKDIR tripod_a txt T $WORKDIR tripod_b txt L BL o tripod $FORMAT $BATCH JCompareDetector a $WORKDIR detector_a datx b $WORKDIR detector_b datx o $WORKDIR abc root &dev null for KEY in X Y Z
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
do echo Generating $dir eval D
Definition: JDrawLED.sh:53
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  }
data_type w[N+1][M+1]
Definition: JPolint.hh:757
then fatal No hydrophone data file $HYDROPHONE_TXT fi sort gr k
double geanc()
Equivalent muon track length per unit shower energy.
Definition: JGeane.hh:26
double getIndexOfRefraction()
Get average index of refraction of water corresponding to group velocity.
virtual double getDispersionGroup(const double lambda) const =0
Dispersion of light for group velocity.
V(JDAQEvent-JTriggerReprocessor)*1.0/(JDAQEvent+1.0e-10)
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable STRING $argv[2] set_array QUANTILES set_variable FORMULA *[0] exp(-0.5 *(x-[1])*(x-[1])/([2]*[2]))" set_variable MODULE `getModule -a $DETECTOR -L "$STRING 0"` source JAcoustics.sh -- typeset -A TRIPODS get_tripods $WORKDIR/tripod.txt TRIPODS XMEAN
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.
const int n
Definition: JPolint.hh:676
std::vector< element_type > phd
fast evaluation of phi integral
Definition: JPDF.hh:2141
static double MODULE_RADIUS_M
Radius of optical module [m].
Definition: JPDF.hh:40
virtual double getScatteringLength(const double lambda) const =0
Scattering length.
virtual double getAbsorptionLength(const double lambda) const =0
Absorption length.
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:2033
static const double PI
Mathematical constants.
virtual double getIndexOfRefractionPhase(const double lambda) const =0
Index of refraction for phase velocity.
virtual double getPhotocathodeArea() const =0
Photo-cathode area of PMT.
static double getRmin()
minimal distance of approach of muon to PMT [m]
Definition: JPDF.hh:2094
const double wmax
maximal wavelength for integration [nm]
Definition: JPDF.hh:2139
double cherenkov(const double lambda, const double n)
Number of Cherenkov photons per unit track length and per unit wavelength.
Definition: JPDFToolkit.hh:50
virtual double getIndexOfRefractionGroup(const double lambda) const
Index of refraction for group velocity.
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JMuonPath.sh:47
virtual double getInverseAttenuationLength(const double l_abs, const double ls, const double cts) const
Get the inverse of the attenuation length.
Definition: JPDF.hh:2105
const double wmin
Integration limits.
Definition: JPDF.hh:2138
virtual double getAngularAcceptance(const double ct) const =0
Angular acceptence of PMT.
then cp
container_type::const_iterator const_iterator
Definition: JCollection.hh:91
virtual double getQE(const double lambda) const =0
Quantum efficiency of PMT (incl.
data_type v[N+1][M+1]
Definition: JPolint.hh:756
double u[N+1]
Definition: JPolint.hh:755
source $JPP_DIR setenv csh $JPP_DIR &dev null eval JShellParser o a A
do echo Generating $dir eval D
Definition: JDrawLED.sh:53
virtual double getScatteringProbability(const double ct) const =0
Model specific function to describe light scattering in water (integral over full solid angle normali...
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
then usage E
Definition: JMuonPostfit.sh:35
double getIndexOfRefraction()
Get average index of refraction of water corresponding to group velocity.
static const double C
Physics constants.
static const JGeanz geanz(1.85, 0.62, 0.54)
Function object for longitudinal EM-shower profile.
then usage $script[distance] fi case set_variable R
Definition: JDrawLED.sh:43
static double getRmin()
minimal distance of approach of muon to PMT [m]
Definition: JPDF.hh:2094
const double wmax
maximal wavelength for integration [nm]
Definition: JPDF.hh:2139
virtual double getIndexOfRefractionGroup(const double lambda) const
Index of refraction for group velocity.
double getIntegral(const double E, const double z) const
Integral of PDF (starting from 0).
Definition: JGeanz.hh:95
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JMuonPath.sh:47
do set_variable MODULE getModule a $WORKDIR detector_a datx L $STRING JEditDetector a $WORKDIR detector_a datx M $MODULE setz o $WORKDIR detector_a datx JEditDetector a $WORKDIR detector_b datx M $MODULE setz o $WORKDIR detector_b datx done echo Output stored at $WORKDIR detector_a datx and $WORKDIR tripod_a txt JDrawDetector2D a $WORKDIR detector_a datx a $WORKDIR detector_b datx L BL o detector $FORMAT $BATCH JDrawDetector2D T $WORKDIR tripod_a txt T $WORKDIR tripod_b txt L BL o tripod $FORMAT $BATCH JCompareDetector a $WORKDIR detector_a datx b $WORKDIR detector_b datx o $WORKDIR abc root &dev null for KEY in X Y Z
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
do echo Generating $dir eval D
Definition: JDrawLED.sh:53
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 = 1.0/(4*PI); // 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  }
data_type w[N+1][M+1]
Definition: JPolint.hh:757
double geanc()
Equivalent muon track length per unit shower energy.
Definition: JGeane.hh:26
virtual double getDispersionGroup(const double lambda) const =0
Dispersion of light for group velocity.
V(JDAQEvent-JTriggerReprocessor)*1.0/(JDAQEvent+1.0e-10)
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable STRING $argv[2] set_array QUANTILES set_variable FORMULA *[0] exp(-0.5 *(x-[1])*(x-[1])/([2]*[2]))" set_variable MODULE `getModule -a $DETECTOR -L "$STRING 0"` source JAcoustics.sh -- typeset -A TRIPODS get_tripods $WORKDIR/tripod.txt TRIPODS XMEAN
static const double C
Physics constants.
const int n
Definition: JPolint.hh:676
virtual double getScatteringLength(const double lambda) const =0
Scattering length.
virtual double getAbsorptionLength(const double lambda) const =0
Absorption length.
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:2033
static const double PI
Mathematical constants.
virtual double getIndexOfRefractionPhase(const double lambda) const =0
Index of refraction for phase velocity.
virtual double getPhotocathodeArea() const =0
Photo-cathode area of PMT.
then usage $script[distance] fi case set_variable R
Definition: JDrawLED.sh:43
static double getRmin()
minimal distance of approach of muon to PMT [m]
Definition: JPDF.hh:2094
const double wmax
maximal wavelength for integration [nm]
Definition: JPDF.hh:2139
double cherenkov(const double lambda, const double n)
Number of Cherenkov photons per unit track length and per unit wavelength.
Definition: JPDFToolkit.hh:50
virtual double getIndexOfRefractionGroup(const double lambda) const
Index of refraction for group velocity.
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JMuonPath.sh:47
const double wmin
Integration limits.
Definition: JPDF.hh:2138
virtual double getAngularAcceptance(const double ct) const =0
Angular acceptence of PMT.
double getTanThetaC()
Get average tangent of Cherenkov angle of water corresponding to group velocity.
container_type::const_iterator const_iterator
Definition: JCollection.hh:91
int j
Definition: JPolint.hh:682
virtual double getQE(const double lambda) const =0
Quantum efficiency of PMT (incl.
source $JPP_DIR setenv csh $JPP_DIR &dev null eval JShellParser o a A
do echo Generating $dir eval D
Definition: JDrawLED.sh:53
double JPHYSICS::JPDF::getScatteredLightFromDeltaRays ( 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/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 dp = PI / phd.size();
1566  const double dom = dcb*dp * v*v / (u*u);
1567 
1568  for (const_iterator l = phd.begin(); l != phd.end(); ++l) {
1569 
1570  const double cp = l->getX();
1571  const double sp = l->getY();
1572 
1573  const double vx = sb*cp * qx;
1574  const double vy = sb*sp * qy;
1575  const double vz = cb * qz;
1576 
1577  const double U =
1578  getAngularAcceptance(vx + vy + vz) +
1579  getAngularAcceptance(vx - vy + vz); // PMT angular acceptance
1580 
1581  const double Jb = 1.0/(4*PI); // d^2N/dcos/dphi
1582 
1583  value += dom * npe * geanc() * dz * U * V * W * Ja * Jb * Jc / fabs(Jd);
1584  }
1585  }
1586  }
1587  }
1588  }
1589 
1590  return value;
1591  }
data_type w[N+1][M+1]
Definition: JPolint.hh:757
then fatal No hydrophone data file $HYDROPHONE_TXT fi sort gr k
double geanc()
Equivalent muon track length per unit shower energy.
Definition: JGeane.hh:26
virtual double getDispersionGroup(const double lambda) const =0
Dispersion of light for group velocity.
V(JDAQEvent-JTriggerReprocessor)*1.0/(JDAQEvent+1.0e-10)
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable STRING $argv[2] set_array QUANTILES set_variable FORMULA *[0] exp(-0.5 *(x-[1])*(x-[1])/([2]*[2]))" set_variable MODULE `getModule -a $DETECTOR -L "$STRING 0"` source JAcoustics.sh -- typeset -A TRIPODS get_tripods $WORKDIR/tripod.txt TRIPODS XMEAN
static const double C
Physics constants.
const int n
Definition: JPolint.hh:676
std::vector< element_type > phd
fast evaluation of phi integral
Definition: JPDF.hh:2141
static double MODULE_RADIUS_M
Radius of optical module [m].
Definition: JPDF.hh:40
virtual double getScatteringLength(const double lambda) const =0
Scattering length.
virtual double getAbsorptionLength(const double lambda) const =0
Absorption length.
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:2033
static const double PI
Mathematical constants.
virtual double getIndexOfRefractionPhase(const double lambda) const =0
Index of refraction for phase velocity.
virtual double getPhotocathodeArea() const =0
Photo-cathode area of PMT.
then usage $script[distance] fi case set_variable R
Definition: JDrawLED.sh:43
static double getRmin()
minimal distance of approach of muon to PMT [m]
Definition: JPDF.hh:2094
const double wmax
maximal wavelength for integration [nm]
Definition: JPDF.hh:2139
double cherenkov(const double lambda, const double n)
Number of Cherenkov photons per unit track length and per unit wavelength.
Definition: JPDFToolkit.hh:50
virtual double getIndexOfRefractionGroup(const double lambda) const
Index of refraction for group velocity.
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JMuonPath.sh:47
virtual double getInverseAttenuationLength(const double l_abs, const double ls, const double cts) const
Get the inverse of the attenuation length.
Definition: JPDF.hh:2105
const double wmin
Integration limits.
Definition: JPDF.hh:2138
virtual double getAngularAcceptance(const double ct) const =0
Angular acceptence of PMT.
then cp
double getTanThetaC()
Get average tangent of Cherenkov angle of water corresponding to group velocity.
container_type::const_iterator const_iterator
Definition: JCollection.hh:91
int j
Definition: JPolint.hh:682
virtual double getQE(const double lambda) const =0
Quantum efficiency of PMT (incl.
data_type v[N+1][M+1]
Definition: JPolint.hh:756
double u[N+1]
Definition: JPolint.hh:755
source $JPP_DIR setenv csh $JPP_DIR &dev null eval JShellParser o a A
do echo Generating $dir eval D
Definition: JDrawLED.sh:53
virtual double getScatteringProbability(const double ct) const =0
Model specific function to describe light scattering in water (integral over full solid angle normali...
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 1602 of file JPDF.hh.

1605  {
1606  const double D = std::max(D_m, getRmin());
1607  const double t = D * getIndexOfRefraction() / C + t_ns; // time [ns]
1608  const double A = getPhotocathodeArea();
1609 
1610  const double n0 = getIndexOfRefractionGroup(wmax);
1611  const double n1 = getIndexOfRefractionGroup(wmin);
1612  const double ng = C*t/D; // index of refraction
1613 
1614  if (n0 >= ng) { return 0.0; }
1615  if (n1 <= ng) { return 0.0; }
1616 
1617  const double w = getWavelength(ng);
1618  const double n = getIndexOfRefractionPhase(w);
1619 
1620  const double l_abs = getAbsorptionLength(w);
1621  const double ls = getScatteringLength(w);
1622 
1623  const double npe = cherenkov(w,n) * getQE(w);
1624 
1625  const double U = getAngularAcceptance(ct); // PMT angular acceptance
1626  const double V = exp(-D/l_abs - D/ls); // absorption & scattering
1627  const double W = A/(D*D); // solid angle
1628 
1629  const double ngp = getDispersionGroup(w);
1630 
1631  const double Ja = D * ngp / C; // dt/dlambda
1632  const double Jb = 1.0 / (4.0*PI); // d^2N/dOmega
1633 
1634  return npe * geanc() * U * V * W * Jb / fabs(Ja);
1635  }
data_type w[N+1][M+1]
Definition: JPolint.hh:757
double geanc()
Equivalent muon track length per unit shower energy.
Definition: JGeane.hh:26
double getIndexOfRefraction()
Get average index of refraction of water corresponding to group velocity.
virtual double getDispersionGroup(const double lambda) const =0
Dispersion of light for group velocity.
V(JDAQEvent-JTriggerReprocessor)*1.0/(JDAQEvent+1.0e-10)
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable STRING $argv[2] set_array QUANTILES set_variable FORMULA *[0] exp(-0.5 *(x-[1])*(x-[1])/([2]*[2]))" set_variable MODULE `getModule -a $DETECTOR -L "$STRING 0"` source JAcoustics.sh -- typeset -A TRIPODS get_tripods $WORKDIR/tripod.txt TRIPODS XMEAN
static const double C
Physics constants.
const int n
Definition: JPolint.hh:676
virtual double getScatteringLength(const double lambda) const =0
Scattering length.
virtual double getAbsorptionLength(const double lambda) const =0
Absorption length.
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:2033
static const double PI
Mathematical constants.
virtual double getIndexOfRefractionPhase(const double lambda) const =0
Index of refraction for phase velocity.
virtual double getPhotocathodeArea() const =0
Photo-cathode area of PMT.
static double getRmin()
minimal distance of approach of muon to PMT [m]
Definition: JPDF.hh:2094
const double wmax
maximal wavelength for integration [nm]
Definition: JPDF.hh:2139
double cherenkov(const double lambda, const double n)
Number of Cherenkov photons per unit track length and per unit wavelength.
Definition: JPDFToolkit.hh:50
virtual double getIndexOfRefractionGroup(const double lambda) const
Index of refraction for group velocity.
const double wmin
Integration limits.
Definition: JPDF.hh:2138
virtual double getAngularAcceptance(const double ct) const =0
Angular acceptence of PMT.
virtual double getQE(const double lambda) const =0
Quantum efficiency of PMT (incl.
source $JPP_DIR setenv csh $JPP_DIR &dev null eval JShellParser o a A
do echo Generating $dir eval D
Definition: JDrawLED.sh:53
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 1646 of file JPDF.hh.

1649  {
1650  double value = 0;
1651 
1652  const double D = std::max(D_m, getRmin());
1653  const double t = D * getIndexOfRefraction() / C + t_ns; // time [ns]
1654  const double st = sqrt((1.0 + ct)*(1.0 - ct));
1655 
1656  const double A = getPhotocathodeArea();
1657 
1658  const double n0 = getIndexOfRefractionGroup(wmax);
1659  const double n1 = getIndexOfRefractionGroup(wmin);
1660 
1661  const double ni = C*t / D; // maximal index of refraction
1662 
1663  if (n0 >= ni) {
1664  return value;
1665  }
1666 
1667  const double nj = std::min(ni,n1);
1668 
1669  double w = wmax;
1670 
1671  for (const_iterator i = begin(); i != end(); ++i) {
1672 
1673  const double ng = 0.5 * (nj + n0) + i->getX() * 0.5 * (nj - n0);
1674  const double dn = i->getY() * 0.5 * (nj - n0);
1675 
1676  w = getWavelength(ng, w, 1.0e-5);
1677 
1678  const double dw = dn / fabs(getDispersionGroup(w));
1679 
1680  const double n = getIndexOfRefractionPhase(w);
1681 
1682  const double npe = cherenkov(w,n) * dw * getQE(w);
1683 
1684  if (npe <= 0) { continue; }
1685 
1686  const double l_abs = getAbsorptionLength(w);
1687  const double ls = getScatteringLength(w);
1688 
1689  const double Jc = 1.0 / ls; // dN/dx
1690  const double Jb = 1.0 / (4.0*PI); // d^2N/dcos/dphi
1691 
1692  const double d = C*t / ng; // photon path
1693 
1694  const double dcb = 2.0 / (size() + 1);
1695 
1696  for (double cb = -1.0 + 0.5*dcb; cb < +1.0; cb += dcb) {
1697 
1698  const double sb = sqrt((1.0 + cb)*(1.0 - cb));
1699 
1700  const double v = 0.5 * (d + D) * (d - D) / (d - D*cb);
1701  const double u = d - v;
1702 
1703  if (u <= 0) { continue; }
1704  if (v <= 0) { continue; }
1705 
1706  const double cts = (D*cb - v) / u; // cosine scattering angle
1707 
1708  const double V = exp(-d*getInverseAttenuationLength(l_abs, ls, cts));
1709 
1710  if (cts < 0.0 && v * sqrt((1.0 + cts) * (1.0 - cts)) < MODULE_RADIUS_M) { continue; }
1711 
1712  const double W = std::min(A/(v*v), 2.0*PI); // solid angle
1713  const double Ja = getScatteringProbability(cts); // d^2P/dcos/dphi
1714  const double Jd = ng * (1.0 - cts) / C; // dt/du
1715 
1716  const double dp = PI / phd.size();
1717  const double dom = dcb*dp * v*v / (u*u); // dOmega
1718 
1719  for (const_iterator l = phd.begin(); l != phd.end(); ++l) {
1720 
1721  const double cp = l->getX();
1722  const double dot = cb*ct + sb*cp*st;
1723 
1724  const double U = 2 * getAngularAcceptance(dot); // PMT angular acceptance
1725 
1726  value += npe * geanc() * dom * U * V * W * Ja * Jb * Jc / fabs(Jd);
1727  }
1728  }
1729  }
1730 
1731  return value;
1732  }
data_type w[N+1][M+1]
Definition: JPolint.hh:757
double geanc()
Equivalent muon track length per unit shower energy.
Definition: JGeane.hh:26
double getIndexOfRefraction()
Get average index of refraction of water corresponding to group velocity.
virtual double getDispersionGroup(const double lambda) const =0
Dispersion of light for group velocity.
V(JDAQEvent-JTriggerReprocessor)*1.0/(JDAQEvent+1.0e-10)
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable STRING $argv[2] set_array QUANTILES set_variable FORMULA *[0] exp(-0.5 *(x-[1])*(x-[1])/([2]*[2]))" set_variable MODULE `getModule -a $DETECTOR -L "$STRING 0"` source JAcoustics.sh -- typeset -A TRIPODS get_tripods $WORKDIR/tripod.txt TRIPODS XMEAN
static const double C
Physics constants.
const int n
Definition: JPolint.hh:676
std::vector< element_type > phd
fast evaluation of phi integral
Definition: JPDF.hh:2141
static double MODULE_RADIUS_M
Radius of optical module [m].
Definition: JPDF.hh:40
virtual double getScatteringLength(const double lambda) const =0
Scattering length.
virtual double getAbsorptionLength(const double lambda) const =0
Absorption length.
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:2033
static const double PI
Mathematical constants.
virtual double getIndexOfRefractionPhase(const double lambda) const =0
Index of refraction for phase velocity.
virtual double getPhotocathodeArea() const =0
Photo-cathode area of PMT.
static double getRmin()
minimal distance of approach of muon to PMT [m]
Definition: JPDF.hh:2094
const double wmax
maximal wavelength for integration [nm]
Definition: JPDF.hh:2139
double cherenkov(const double lambda, const double n)
Number of Cherenkov photons per unit track length and per unit wavelength.
Definition: JPDFToolkit.hh:50
virtual double getIndexOfRefractionGroup(const double lambda) const
Index of refraction for group velocity.
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JMuonPath.sh:47
virtual double getInverseAttenuationLength(const double l_abs, const double ls, const double cts) const
Get the inverse of the attenuation length.
Definition: JPDF.hh:2105
const double wmin
Integration limits.
Definition: JPDF.hh:2138
virtual double getAngularAcceptance(const double ct) const =0
Angular acceptence of PMT.
then cp
container_type::const_iterator const_iterator
Definition: JCollection.hh:91
virtual double getQE(const double lambda) const =0
Quantum efficiency of PMT (incl.
data_type v[N+1][M+1]
Definition: JPolint.hh:756
double u[N+1]
Definition: JPolint.hh:755
source $JPP_DIR setenv csh $JPP_DIR &dev null eval JShellParser o a A
do echo Generating $dir eval D
Definition: JDrawLED.sh:53
virtual double getScatteringProbability(const double ct) const =0
Model specific function to describe light scattering in water (integral over full solid angle normali...
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 1746 of file JPDF.hh.

1752  {
1753  switch (type) {
1754 
1756  return getDirectLightFromMuon (R_m, theta, phi, t_ns);
1757 
1759  return getScatteredLightFromMuon (R_m, theta, phi, t_ns);
1760 
1762  return getDirectLightFromEMshowers (R_m, theta, phi, t_ns) * E_GeV;
1763 
1765  return getScatteredLightFromEMshowers(R_m, theta, phi, t_ns) * E_GeV;
1766 
1768  return getDirectLightFromDeltaRays (R_m, theta, phi, t_ns) * getDeltaRaysFromMuon(E_GeV);
1769 
1771  return getScatteredLightFromDeltaRays(R_m, theta, phi, t_ns) * getDeltaRaysFromMuon(E_GeV);
1772 
1773  default:
1774  return 0.0;
1775  }
1776  }
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
direct light from EM showers
Definition: JPDFTypes.hh:32
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
direct light from muon
Definition: JPDFTypes.hh:29
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
scattered light from muon
Definition: JPDFTypes.hh:30
scattered light from delta-rays
Definition: JPDFTypes.hh:36
scattered light from EM showers
Definition: JPDFTypes.hh:33
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
direct light from delta-rays
Definition: JPDFTypes.hh:35
double getDeltaRaysFromMuon(const double E)
Equivalent EM-shower energy due to delta-rays per unit muon track length.
Definition: JPDFToolkit.hh:67
double getScatteredLightFromDeltaRays(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:1461
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 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 1789 of file JPDF.hh.

1794  {
1795  return (getDirectLightFromMuon (R_m, theta, phi, t_ns) +
1796  getScatteredLightFromMuon (R_m, theta, phi, t_ns) +
1797  getDirectLightFromEMshowers (R_m, theta, phi, t_ns) * E_GeV +
1798  getScatteredLightFromEMshowers(R_m, theta, phi, t_ns) * E_GeV +
1799  getDirectLightFromDeltaRays (R_m, theta, phi, t_ns) * getDeltaRaysFromMuon(E_GeV) +
1800  getScatteredLightFromDeltaRays(R_m, theta, phi, t_ns) * getDeltaRaysFromMuon(E_GeV));
1801  }
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 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 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 getDeltaRaysFromMuon(const double E)
Equivalent EM-shower energy due to delta-rays per unit muon track length.
Definition: JPDFToolkit.hh:67
double getScatteredLightFromDeltaRays(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:1461
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 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 1815 of file JPDF.hh.

1821  {
1822  switch (type) {
1823 
1825  return getDirectLightFromEMshower (D_m, cd, theta, phi, t_ns);
1826 
1828  return getScatteredLightFromEMshower(D_m, cd, theta, phi, t_ns);
1829 
1830  default:
1831  return 0.0;
1832  }
1833  }
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
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
scattered light from EM shower
Definition: JPDFTypes.hh:41
direct light from EM shower
Definition: JPDFTypes.hh:40
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 1846 of file JPDF.hh.

1851  {
1852  return (getDirectLightFromEMshower (D_m, cd, theta, phi, t_ns) +
1853  getScatteredLightFromEMshower(D_m, cd, theta, phi, t_ns));
1854  }
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
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
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 1869 of file JPDF.hh.

1876  {
1877  switch (type) {
1878 
1880  return getDirectLightFromEMshower (E_GeV, D_m, cd, theta, phi, t_ns);
1881 
1883  return getScatteredLightFromEMshower(E_GeV, D_m, cd, theta, phi, t_ns);
1884 
1885  default:
1886  return 0.0;
1887  }
1888  }
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
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
scattered light from EM shower
Definition: JPDFTypes.hh:41
direct light from EM shower
Definition: JPDFTypes.hh:40
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 1902 of file JPDF.hh.

1908  {
1909  return (getDirectLightFromEMshower (E_GeV, D_m, cd, theta, phi, t_ns) +
1910  getScatteredLightFromEMshower(E_GeV, D_m, cd, theta, phi, t_ns));
1911  }
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
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
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 1923 of file JPDF.hh.

1927  {
1928  switch (type) {
1929 
1931  return getDirectLightFromBrightPoint (D_m, ct, t_ns);
1932 
1934  return getScatteredLightFromBrightPoint(D_m, ct, t_ns);
1935 
1936  default:
1937  return 0.0;
1938  }
1939  }
direct light from bright point
Definition: JPDFTypes.hh:45
scattered light from bright point
Definition: JPDFTypes.hh:46
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:1646
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:1602
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 1950 of file JPDF.hh.

1953  {
1954  return (getDirectLightFromBrightPoint (D_m, ct, t_ns) +
1955  getScatteredLightFromBrightPoint(D_m, ct, t_ns));
1956  }
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:1646
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:1602
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 2033 of file JPDF.hh.

2035  {
2036  //return getWavelength(n, 0.5*(wmin + wmax), eps);
2037 
2038  double vmin = wmin;
2039  double vmax = wmax;
2040 
2041  for (int i = 0; i != 1000; ++i) {
2042 
2043  const double v = 0.5 * (vmin + vmax);
2044  const double y = getIndexOfRefractionGroup(v);
2045 
2046  if (fabs(y - n) < eps) {
2047  return v;
2048  }
2049 
2050  if (y < n)
2051  vmax = v;
2052  else
2053  vmin = v;
2054  }
2055 
2056  return 0.5 * (vmin + vmax);
2057  }
const int n
Definition: JPolint.hh:676
const double wmax
maximal wavelength for integration [nm]
Definition: JPDF.hh:2139
virtual double getIndexOfRefractionGroup(const double lambda) const
Index of refraction for group velocity.
const double wmin
Integration limits.
Definition: JPDF.hh:2138
data_type v[N+1][M+1]
Definition: JPolint.hh:756
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 2071 of file JPDF.hh.

2074  {
2075  double v = w;
2076 
2077  // determine wavelength by linear extrapolation
2078 
2079  for ( ; ; ) {
2080 
2081  const double y = getIndexOfRefractionGroup(v);
2082 
2083  if (fabs(y - n) < eps) {
2084  break;
2085  }
2086 
2087  v += (n - y) / getDispersionGroup(v);
2088  }
2089 
2090  return v;
2091  }
data_type w[N+1][M+1]
Definition: JPolint.hh:757
virtual double getDispersionGroup(const double lambda) const =0
Dispersion of light for group velocity.
const int n
Definition: JPolint.hh:676
virtual double getIndexOfRefractionGroup(const double lambda) const
Index of refraction for group velocity.
data_type v[N+1][M+1]
Definition: JPolint.hh:756
static double JPHYSICS::JPDF::getRmin ( )
inlinestaticprotectedinherited

minimal distance of approach of muon to PMT [m]

Definition at line 2094 of file JPDF.hh.

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

2106  {
2108 
2109  if (f1.empty()) {
2110 
2111  const int nx = 100000;
2112  const double xmin = -1.0;
2113  const double xmax = +1.0;
2114 
2115  const double dx = (xmax - xmin) / (nx - 1);
2116 
2117  for (double x = xmin, W = 0.0; x < xmax; x += dx) {
2118 
2119  f1[x] = W;
2120 
2121  W += 2*PI * dx * getScatteringProbability(x + 0.5*dx);
2122  }
2123 
2124  f1[xmin] = 0.0;
2125  f1[xmax] = 1.0;
2126 
2127  f1.compile();
2128  }
2129 
2130  return 1.0/l_abs + f1(cts)/ls;
2131  }
Type definition of a 1st degree polynomial interpolation based on a JGridCollection with result type ...
static const double PI
Mathematical constants.
virtual double getScatteringProbability(const double ct) const =0
Model specific function to describe light scattering in water (integral over full solid angle normali...
virtual void JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::clear ( )
inlineoverridevirtualinherited

Clear.

Implements JTOOLS::JMappableCollection< JKey_t, JValue_t >.

Definition at line 150 of file JCollection.hh.

151  {
152  container_type::clear();
153  }
virtual const ordinate_type& JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::get ( typename JClass< abscissa_type >::argument_type  x) const
inlineoverridevirtualinherited

Get ordinate value.

Parameters
xabscissa value
Returns
ordinate value

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  }
JDistance< typename JElement2D_t::abscissa_type > getDistance
Function object for distance evaluation.
Definition: JCollection.hh:774
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Definition: JException.hh:696
const_iterator lower_bound(typename JClass< abscissa_type >::argument_type x) const
Get first position of element i, where x &gt;= i-&gt;getX().
Definition: JCollection.hh:294
container_type::const_iterator const_iterator
Definition: JCollection.hh:91
Exception for accessing a value in a collection that is outside of its range.
Definition: JException.hh:162
virtual ordinate_type& JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::get ( typename JClass< abscissa_type >::argument_type  x)
inlineoverridevirtualinherited

Get ordinate value.

Parameters
xabscissa value
Returns
ordinate value

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, ordinate_type()));
186  }
187 
188  return i->getY();
189  }
JDistance< typename JElement2D_t::abscissa_type > getDistance
Function object for distance evaluation.
Definition: JCollection.hh:774
const_iterator lower_bound(typename JClass< abscissa_type >::argument_type x) const
Get first position of element i, where x &gt;= i-&gt;getX().
Definition: JCollection.hh:294
container_type::iterator iterator
Definition: JCollection.hh:93
JElement2D_t::ordinate_type ordinate_type
Definition: JCollection.hh:83
template<class JKey_t, class JValue_t>
virtual const mapped_type& JTOOLS::JMappableCollection< JKey_t, JValue_t >::get ( typename JClass< key_type >::argument_type  key) const
pure virtualinherited
template<class JKey_t, class JValue_t>
virtual mapped_type& JTOOLS::JMappableCollection< JKey_t, JValue_t >::get ( typename JClass< key_type >::argument_type  key)
pure virtualinherited
virtual int JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::getSize ( ) const
inlineoverridevirtualinherited

Get number of elements.

Returns
number of elements

Implements JTOOLS::JAbstractCollection< JAbscissa_t >.

Definition at line 197 of file JCollection.hh.

198  {
199  return (int) this->size();
200  }
virtual abscissa_type JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::getX ( int  index) const
inlineoverridevirtualinherited

Get abscissa value.

Parameters
indexindex
Returns
abscissa value

Implements JTOOLS::JAbstractCollection< JAbscissa_t >.

Definition at line 209 of file JCollection.hh.

210  {
211  return this->at(index).getX();
212  }
virtual abscissa_type JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::getXmin ( ) const
inlineoverridevirtualinherited

Get minimal abscissa value.

Returns
abscissa value

Implements JTOOLS::JAbstractCollection< JAbscissa_t >.

Definition at line 220 of file JCollection.hh.

221  {
222  return this->begin()->getX();
223  }
virtual abscissa_type JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::getXmax ( ) const
inlineoverridevirtualinherited

Get maximal abscissa value.

Returns
abscissa value

Implements JTOOLS::JAbstractCollection< JAbscissa_t >.

Definition at line 231 of file JCollection.hh.

232  {
233  return this->rbegin()->getX();
234  }
const ordinate_type& JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::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  }
ordinate_type& JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::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  }
void JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::transform ( const transformer_type transformer)
inlineinherited

Transform collection.

Parameters
transformerelement transformer

Definition at line 267 of file JCollection.hh.

268  {
269  collection_type buffer;
270 
271  this->swap(buffer);
272 
273  for (const_iterator i = buffer.begin(); i != buffer.end(); ++i) {
274  this->insert(transformer(*i));
275  }
276  }
JCollection< JElement2D_t, JDistance< typename JElement2D_t::abscissa_type > > collection_type
Definition: JCollection.hh:87
container_type::const_iterator const_iterator
Definition: JCollection.hh:91
pair_type insert(const value_type &element)
Insert element.
Definition: JCollection.hh:318
void JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::sort ( )
inlineinherited

Sort elements.

Definition at line 282 of file JCollection.hh.

283  {
284  std::sort(this->begin(), this->end(), compare);
285  }
JComparator compare
Function object for comparison.
Definition: JCollection.hh:781
const_iterator JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::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 294 of file JCollection.hh.

295  {
296  return std::lower_bound(this->begin(), this->end(), x, compare);
297  }
JComparator compare
Function object for comparison.
Definition: JCollection.hh:781
iterator JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::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 306 of file JCollection.hh.

307  {
308  return std::lower_bound(this->begin(), this->end(), x, compare);
309  }
JComparator compare
Function object for comparison.
Definition: JCollection.hh:781
pair_type JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::insert ( const value_type element)
inlineinherited

Insert element.

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

Definition at line 318 of file JCollection.hh.

319  {
320  iterator i = this->lower_bound(element.getX());
321 
322  if (i == this->end() || this->getDistance(element.getX(), i->getX()) > 0.0)
323  return pair_type(container_type::insert(i, element), true);
324  else
325  return pair_type(this->end(), false);
326  }
std::pair< const_iterator, bool > pair_type
Definition: JCollection.hh:97
JDistance< typename JElement2D_t::abscissa_type > getDistance
Function object for distance evaluation.
Definition: JCollection.hh:774
const_iterator lower_bound(typename JClass< abscissa_type >::argument_type x) const
Get first position of element i, where x &gt;= i-&gt;getX().
Definition: JCollection.hh:294
container_type::iterator iterator
Definition: JCollection.hh:93
void JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::configure ( const JAbstractCollection< abscissa_type > &  bounds)
inlineinherited

Configure collection.

Parameters
boundsabscissa values

Definition at line 334 of file JCollection.hh.

335  {
336  configure(bounds, JMATH::getZero<ordinate_type>());
337  }
void configure(const JAbstractCollection< abscissa_type > &bounds)
Configure collection.
Definition: JCollection.hh:334
void JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::configure ( const JAbstractCollection< abscissa_type > &  bounds,
typename JClass< ordinate_type >::argument_type  value 
)
inlineinherited

Configure collection.

Parameters
boundsabscissa values
valueordinate value

Definition at line 346 of file JCollection.hh.

348  {
349  this->resize(bounds.getSize());
350 
351  for (iterator i = this->begin(); i != this->end(); ++i) {
352 
353  const abscissa_type x = bounds.getX(std::distance(this->begin(),i));
354 
355  *i = value_type(x,value);
356  }
357  }
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance.
void resize(typename container_type::size_type size)
Resize collection.
Definition: JCollection.hh:789
JElement2D_t::abscissa_type abscissa_type
Definition: JCollection.hh:82
container_type::iterator iterator
Definition: JCollection.hh:93
virtual abscissa_type getX(int index) const =0
Get abscissa value.
virtual int getSize() const =0
Get number of elements.
void JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::configure ( const JAbstractCollection< abscissa_type > &  bounds,
const JFunction1D_t &  function 
)
inlineinherited

Configure collection.

Parameters
boundsabscissa values
functionfunction

Definition at line 367 of file JCollection.hh.

369  {
370  using namespace JLANG;
371 
372  collection_type* out = (is_identical(*this, function) ? new collection_type() : this);
373 
374  for (int i = 0; i != bounds.getSize(); ++i) {
375 
376  const abscissa_type x = bounds.getX(i);
377 
378  out->put(x, function(x));
379  }
380 
381  if (is_identical(*this, function)) {
382 
383  this->swap(*out);
384 
385  delete out;
386  }
387  }
JCollection< JElement2D_t, JDistance< typename JElement2D_t::abscissa_type > > collection_type
Definition: JCollection.hh:87
then usage $script< detector file >< detectorfile > nIf the range of floors is the first detector file is aligned to the second before the comparison nIn this
JElement2D_t::abscissa_type abscissa_type
Definition: JCollection.hh:82
bool is_identical(JFirst_t &first, JSecond_t &second)
Check if two objects are indentical.
Definition: JLangToolkit.hh:46
virtual abscissa_type getX(int index) const =0
Get abscissa value.
virtual int getSize() const =0
Get number of elements.
bool JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::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 396 of file JCollection.hh.

397  {
398  if (this->empty() || collection.empty()) {
399 
400  return true;
401 
402  } else {
403 
404  const double precision = JDistance<abscissa_type>::precision;
405 
406  const_iterator p = this->begin();
407  const_iterator q = collection.begin();
408 
409  if (getDistance(p->getX(), q->getX()) > precision) {
410 
411  do {
412  ++p;
413  } while (p != this->end() && getDistance(p->getX(), q->getX()) > precision);
414 
415  } else if (getDistance(q->getX(), p->getX()) > precision) {
416 
417  do {
418  ++q;
419  } while (q != collection.end() && getDistance(q->getX(), p->getX()) > precision);
420  }
421 
422  for ( ; p != this->end() && q != collection.end(); ++p, ++q) {
423  if (fabs(getDistance(p->getX(), q->getX())) > precision) {
424  return false;
425  }
426  }
427 
428  return true;
429  }
430  }
Template class for distance evaluation.
Definition: JDistance.hh:24
JDistance< typename JElement2D_t::abscissa_type > getDistance
Function object for distance evaluation.
Definition: JCollection.hh:774
container_type::const_iterator const_iterator
Definition: JCollection.hh:91
JCollection& JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::negate ( )
inlineinherited

Negate collection.

Returns
this collection

Definition at line 438 of file JCollection.hh.

439  {
440  for (iterator i = this->begin(); i != this->end(); ++i) {
441  i->getY() = -i->getY();
442  }
443 
444  return *this;
445  }
container_type::iterator iterator
Definition: JCollection.hh:93
JCollection& JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::add ( const JCollection< JElement2D_t > &  collection)
inlineinherited

Add collection.

Parameters
collectioncollection
Returns
this collection

Definition at line 454 of file JCollection.hh.

455  {
456  if (!collection.empty()) {
457 
458  if (this->empty()) {
459 
460  for (const_iterator i = collection.begin(); i != collection.end(); ++i) {
461  this->put(i->getX(), +i->getY());
462  }
463 
464  } else if (this->is_compatible(collection)) {
465 
466  const double precision = JDistance<abscissa_type>::precision;
467 
468  iterator p = this->begin();
469  const_iterator q = collection.begin();
470 
471  if (getDistance(p->getX(), q->getX()) > precision) {
472 
473  do {
474  ++p;
475  } while (p != this->end() && getDistance(p->getX(), q->getX()) > precision);
476 
477  } else if (getDistance(q->getX(), p->getX()) > precision) {
478 
479  do {
480  ++q;
481  } while (q != collection.end() && getDistance(q->getX(), p->getX()) > precision);
482  }
483 
484  const_iterator i = q;
485 
486  for ( ; p != this->end() && i != collection.end(); ++p, ++i) {
487  p->getY() += i->getY();
488  }
489 
490  for ( ; i != collection.end(); ++i) {
491  this->put(i->getX(), +i->getY());
492  }
493 
494  for (i = collection.begin(); i != q; ++i) {
495  this->put(i->getX(), +i->getY());
496  }
497  }
498  }
499 
500  return *this;
501  }
Template class for distance evaluation.
Definition: JDistance.hh:24
JDistance< typename JElement2D_t::abscissa_type > getDistance
Function object for distance evaluation.
Definition: JCollection.hh:774
bool is_compatible(const JCollection &collection) const
Test whether collections are compatible.
Definition: JCollection.hh:396
container_type::iterator iterator
Definition: JCollection.hh:93
void put(typename JClass< key_type >::argument_type key, typename JClass< mapped_type >::argument_type value)
Put pair-wise element (key,value) into collection.
container_type::const_iterator const_iterator
Definition: JCollection.hh:91
JCollection& JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::add ( typename JClass< ordinate_type >::argument_type  value)
inlineinherited

Add offset.

Parameters
valueoffset
Returns
this collection

Definition at line 602 of file JCollection.hh.

603  {
604  for (iterator i = this->begin(); i != this->end(); ++i) {
605  i->getY() += value;
606  }
607 
608  return *this;
609  }
container_type::iterator iterator
Definition: JCollection.hh:93
JCollection& JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::add ( const JFunction1D_t &  function)
inlineinherited

Add function.

Parameters
functionfunction
Returns
this collection

Definition at line 635 of file JCollection.hh.

636  {
637  for (iterator i = this->begin(); i != this->end(); ++i) {
638  i->getY() += function(i->getX());
639  }
640 
641  return *this;
642  }
container_type::iterator iterator
Definition: JCollection.hh:93
JCollection& JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::sub ( const JCollection< JElement2D_t > &  collection)
inlineinherited

Subtract collection.

Parameters
collectioncollection
Returns
this collection

Definition at line 510 of file JCollection.hh.

511  {
512  if (!collection.empty()) {
513 
514  if (this->empty()) {
515 
516  for (const_iterator i = collection.begin(); i != collection.end(); ++i) {
517  this->put(i->getX(), -i->getY());
518  }
519 
520  } else if (this->is_compatible(collection)) {
521 
522  const double precision = JDistance<abscissa_type>::precision;
523 
524  iterator p = this->begin();
525  const_iterator q = collection.begin();
526 
527  if (getDistance(p->getX(), q->getX()) > precision) {
528 
529  do {
530  ++p;
531  } while (p != this->end() && getDistance(p->getX(), q->getX()) > precision);
532 
533  } else if (getDistance(q->getX(), p->getX()) > precision) {
534 
535  do {
536  ++q;
537  } while (q != collection.end() && getDistance(q->getX(), p->getX()) > precision);
538  }
539 
540  const_iterator i = q;
541 
542  for ( ; p != this->end() && i != collection.end(); ++p, ++i) {
543  p->getY() -= i->getY();
544  }
545 
546  for ( ; i != collection.end(); ++i) {
547  this->put(i->getX(), -i->getY());
548  }
549 
550  for (i = collection.begin(); i != q; ++i) {
551  this->put(i->getX(), -i->getY());
552  }
553 
554  } else {
555 
556  throw JException("JCollection::add() collections incompatible.");
557  }
558  }
559 
560  return *this;
561  }
General exception.
Definition: JException.hh:23
Template class for distance evaluation.
Definition: JDistance.hh:24
JDistance< typename JElement2D_t::abscissa_type > getDistance
Function object for distance evaluation.
Definition: JCollection.hh:774
bool is_compatible(const JCollection &collection) const
Test whether collections are compatible.
Definition: JCollection.hh:396
container_type::iterator iterator
Definition: JCollection.hh:93
void put(typename JClass< key_type >::argument_type key, typename JClass< mapped_type >::argument_type value)
Put pair-wise element (key,value) into collection.
container_type::const_iterator const_iterator
Definition: JCollection.hh:91
JCollection& JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::sub ( typename JClass< ordinate_type >::argument_type  value)
inlineinherited

Subtract offset.

Parameters
valueoffset
Returns
this collection

Definition at line 618 of file JCollection.hh.

619  {
620  for (iterator i = this->begin(); i != this->end(); ++i) {
621  i->getY() -= value;
622  }
623 
624  return *this;
625  }
container_type::iterator iterator
Definition: JCollection.hh:93
JCollection& JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::sub ( const JFunction1D_t &  function)
inlineinherited

Subtract function.

Parameters
functionfunction
Returns
this collection

Definition at line 652 of file JCollection.hh.

653  {
654  for (iterator i = this->begin(); i != this->end(); ++i) {
655  i->getY() -= function(i->getX());
656  }
657 
658  return *this;
659  }
container_type::iterator iterator
Definition: JCollection.hh:93
JCollection& JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::mul ( const double  value)
inlineinherited

Scale contents.

Parameters
valuemultiplication factor
Returns
this collection

Definition at line 570 of file JCollection.hh.

571  {
572  for (iterator i = this->begin(); i != this->end(); ++i) {
573  i->getY() *= value;
574  }
575 
576  return *this;
577  }
container_type::iterator iterator
Definition: JCollection.hh:93
template<class JFirst_t, class JSecond_t = JNullType>
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 357 of file JMath.hh.

358  {
359  return static_cast<JFirst_t&>(*this) = JCalculator<JFirst_t>::calculator.mul(static_cast<const JFirst_t&>(*this), object);
360  }
Auxiliary class for arithmetic operations on objects.
Definition: JCalculator.hh:18
JCollection& JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::div ( const double  value)
inlineinherited

Scale contents.

Parameters
valuedivision factor
Returns
this collection

Definition at line 586 of file JCollection.hh.

587  {
588  for (iterator i = this->begin(); i != this->end(); ++i) {
589  i->getY() /= value;
590  }
591 
592  return *this;
593  }
container_type::iterator iterator
Definition: JCollection.hh:93
const JComparator& JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::getComparator ( ) const
inlineinherited

Get comparator.

Returns
comparator

Definition at line 765 of file JCollection.hh.

766  {
767  return compare;
768  }
JComparator compare
Function object for comparison.
Definition: JCollection.hh:781
void JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::resize ( typename container_type::size_type  size)
inlineprotectedinherited

Resize collection.

Parameters
sizesize

Definition at line 789 of file JCollection.hh.

790  {
791  container_type::resize(size);
792  }
template<class JKey_t, class JValue_t>
const mapped_type& JTOOLS::JMappableCollection< JKey_t, JValue_t >::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  }
template<class JKey_t, class JValue_t>
mapped_type& JTOOLS::JMappableCollection< JKey_t, JValue_t >::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  }
template<class JKey_t, class JValue_t>
void JTOOLS::JMappableCollection< JKey_t, JValue_t >::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  }
template<class JAbscissa_t>
bool JTOOLS::JAbstractCollection< JAbscissa_t >::is_equal ( const JAbstractCollection< JAbscissa_t > &  collection) const
inlineinherited

Test whether abstract collections are equal.

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

Definition at line 69 of file JAbstractCollection.hh.

70  {
71  if (this->getSize() == collection.getSize()) {
72 
73  for (int i = 0; i != this->getSize(); ++i) {
74 
75  if (this->getX(i) != collection.getX(i)) {
76  return false;
77  }
78  }
79 
80  return true;
81  }
82 
83  return false;
84  }
virtual abscissa_type getX(int index) const =0
Get abscissa value.
virtual int getSize() const =0
Get number of elements.
virtual double JPHYSICS::JDispersionInterface::getIndexOfRefractionPhase ( const double  lambda) const
pure virtualinherited

Index of refraction for phase velocity.

Parameters
lambdawavelenth [nm]
Returns
index of refraction

Implemented in JPHYSICS::JDispersion.

virtual double JPHYSICS::JDispersionInterface::getDispersionPhase ( const double  lambda) const
pure virtualinherited

Dispersion of light for phase velocity.

Parameters
lambdawavelength of light [nm]
Returns
dn/dlambda

Implemented in JPHYSICS::JDispersion.

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  }
const int n
Definition: JPolint.hh:676
virtual double getIndexOfRefractionPhase(const double lambda) const =0
Index of refraction for phase velocity.
virtual double getDispersionPhase(const double lambda) const =0
Dispersion of light for phase velocity.
virtual double JPHYSICS::JDispersionInterface::getDispersionGroup ( const double  lambda) const
pure virtualinherited

Dispersion of light for group velocity.

Parameters
lambdawavelength of light [nm]
Returns
dn/dlambda

Implemented in JPHYSICS::JDispersion.

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  }
const int n
Definition: JPolint.hh:676
virtual double getIndexOfRefractionPhase(const double lambda) const =0
Index of refraction for phase velocity.
virtual double getIndexOfRefractionGroup(const double lambda) const
Index of refraction for group velocity.
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  }
virtual double getIndexOfRefractionGroup(const double lambda) const
Index of refraction for group velocity.
virtual double JPHYSICS::JAbstractPMT::getPhotocathodeArea ( ) const
pure virtualinherited

Photo-cathode area of PMT.

Returns
photo-cathode area [m^2]

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

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::JPDF_C, and JPHYSICS::JLED_C.

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::JPDF_C, and JPHYSICS::JLED_C.

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

Absorption length.

Parameters
lambdawavelenth [nm]
Returns
absorption length [m]

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

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

Scattering length.

Parameters
lambdawavelenth [nm]
Returns
scattering length [m]

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

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::JPDF_C, and JPHYSICS::JLED_C.

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 a4
d^3n/(dx)^3
Definition: JDispersion.hh:100
const double a1
dn/dP
Definition: JDispersion.hh:97
const double P
Dispersion parameters (x = 1/lambda)
Definition: JDispersion.hh:95
const double a0
offset
Definition: JDispersion.hh:96
const double a2
d^1n/(dx)^1
Definition: JDispersion.hh:98
const double a3
d^2n/(dx)^2
Definition: JDispersion.hh:99
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  }
const double a4
d^3n/(dx)^3
Definition: JDispersion.hh:100
const double a2
d^1n/(dx)^1
Definition: JDispersion.hh:98
const double a3
d^2n/(dx)^2
Definition: JDispersion.hh:99
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  }
const double a4
d^3n/(dx)^3
Definition: JDispersion.hh:100
const int n
Definition: JPolint.hh:676
virtual double getIndexOfRefractionPhase(const double lambda) const
Index of refraction (phase velocity).
Definition: JDispersion.hh:51
virtual double getDispersionPhase(const double lambda) const
Dispersion of light for phase velocity.
Definition: JDispersion.hh:65
const double a2
d^1n/(dx)^1
Definition: JDispersion.hh:98
const double a3
d^2n/(dx)^2
Definition: JDispersion.hh:99

Member Data Documentation

const double JPHYSICS::JPDF::wmin
protectedinherited

Integration limits.

minimal wavelength for integration [nm]

Definition at line 2138 of file JPDF.hh.

const double JPHYSICS::JPDF::wmax
protectedinherited

maximal wavelength for integration [nm]

Definition at line 2139 of file JPDF.hh.

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

fast evaluation of phi integral

Definition at line 2141 of file JPDF.hh.

Function object for distance evaluation.

Definition at line 774 of file JCollection.hh.

JComparator JTOOLS::JCollection< JElement2D_t , JDistance<typename JElement2D_t ::abscissa_type> >::compare
protectedinherited

Function object for comparison.

Definition at line 781 of file JCollection.hh.

const double JPHYSICS::JDispersion::P
inherited

Dispersion parameters (x = 1/lambda)

ambient pressure [atm]

Definition at line 95 of file JDispersion.hh.

const double JPHYSICS::JDispersion::a0
inherited

offset

Definition at line 96 of file JDispersion.hh.

const double JPHYSICS::JDispersion::a1
inherited

dn/dP

Definition at line 97 of file JDispersion.hh.

const double JPHYSICS::JDispersion::a2
inherited

d^1n/(dx)^1

Definition at line 98 of file JDispersion.hh.

const double JPHYSICS::JDispersion::a3
inherited

d^2n/(dx)^2

Definition at line 99 of file JDispersion.hh.

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: