Jpp
 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 ()
 Clear. More...
 
virtual const ordinate_typeget (typename JClass< abscissa_type >::argument_type x) const
 Get ordinate value. More...
 
virtual ordinate_typeget (typename JClass< abscissa_type >::argument_type x)
 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
 Get number of elements. More...
 
virtual abscissa_type getX (int index) const
 Get abscissa value. More...
 
virtual abscissa_type getXmin () const
 Get minimal abscissa value. More...
 
virtual abscissa_type getXmax () const
 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 2181 of file JPDF.hh.

Member Typedef Documentation

Definition at line 81 of file JCollection.hh.

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

Definition at line 88 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 90 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 91 of file JCollection.hh.

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

Definition at line 92 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 93 of file JCollection.hh.

Definition at line 95 of file JCollection.hh.

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

2199  :
2200  JPDF(Wmin, Wmax, numberOfPoints, epsilon),
2201  JDispersion(P_atm)
2202  {}
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:297

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

328  {
329  double value = 0.0;
330 
331  const double xmin = 1.0 / wmax;
332  const double xmax = 1.0 / wmin;
333 
334  for (const_iterator i = begin(); i != end(); ++i) {
335 
336  const double x = 0.5 * (xmax + xmin) + i->getX() * 0.5 * (xmax - xmin);
337  const double dx = i->getY() * 0.5 * (xmax - xmin);
338 
339  const double w = 1.0 / x;
340  const double dw = dx * w*w;
341 
342  const double n = getIndexOfRefractionPhase(w);
343 
344  value += cherenkov(w,n) * dw;
345  }
346 
347  return value;
348  }
data_type w[N+1][M+1]
Definition: JPolint.hh:708
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:2171
double cherenkov(const double lambda, const double n)
Number of Cherenkov photons per unit track length and per unit wavelength.
Definition: JPDFToolkit.hh:58
alias put_queue eval echo n
Definition: qlib.csh:19
const double wmin
Integration limits.
Definition: JPDF.hh:2170
container_type::const_iterator const_iterator
Definition: JCollection.hh:90
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 359 of file JPDF.hh.

362  {
363  using namespace JTOOLS;
364 
365  double value = 0;
366 
367  const double R = std::max(R_m, getRmin());
368  const double A = getPhotocathodeArea();
369 
370  const double px = sin(theta)*cos(phi);
371  const double pz = cos(theta);
372 
373  for (const_iterator m = begin(); m != end(); ++m) {
374 
375  const double w = 0.5 * (wmax + wmin) + m->getX() * 0.5 * (wmax - wmin);
376  const double dw = m->getY() * 0.5 * (wmax - wmin);
377 
378  const double n = getIndexOfRefractionPhase(w);
379 
380  const double l_abs = getAbsorptionLength(w);
381  const double ls = getScatteringLength(w);
382 
383  const double npe = cherenkov(w,n) * dw * getQE(w);
384 
385  const double ct0 = 1.0 / n;
386  const double st0 = sqrt((1.0 + ct0)*(1.0 - ct0));
387 
388  const double d = R / st0; // distance traveled by photon
389  const double ct = st0*px + ct0*pz; // cosine angle of incidence on PMT
390 
391  const double U = getAngularAcceptance(ct); // PMT angular acceptance
392  const double V = exp(-d/l_abs) * exp(-d/ls); // absorption & scattering
393  const double W = A / (2.0*PI*R*st0); // solid angle
394 
395  value += npe * U * V * W;
396  }
397 
398  return value;
399  }
data_type w[N+1][M+1]
Definition: JPolint.hh:708
static const double PI
Constants.
Definition: JConstants.hh:20
virtual double getScatteringLength(const double lambda) const =0
Scattering length.
then print_variable DETECTOR INPUT_FILE INTERMEDIATE_FILE check_input_file $DETECTOR $INPUT_FILE check_output_file $INTERMEDIATE_FILE $OUTPUT_FILE JMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JPath.sh:52
virtual double getAbsorptionLength(const double lambda) const =0
Absorption length.
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:40
static double getRmin()
minimal distance of approach of muon to PMT [m]
Definition: JPDF.hh:2126
const double wmax
maximal wavelength for integration [nm]
Definition: JPDF.hh:2171
double cherenkov(const double lambda, const double n)
Number of Cherenkov photons per unit track length and per unit wavelength.
Definition: JPDFToolkit.hh:58
alias put_queue eval echo n
Definition: qlib.csh:19
const double wmin
Integration limits.
Definition: JPDF.hh:2170
virtual double getAngularAcceptance(const double ct) const =0
Angular acceptence of PMT.
container_type::const_iterator const_iterator
Definition: JCollection.hh:90
virtual double getQE(const double lambda) const =0
Quantum efficiency of PMT (incl.
source $JPP_DIR setenv csh $JPP_DIR eval JShellParser o a A
then set_variable FORMULA *[0] exp(-0.5 *(x-[1])*(x-[1])/([2]*[2]))" set_variable OUTPUT_FILE histogram.root JHistogram1D -o $WORKDIR/$OUTPUT_FILE -F "$FORMULA" -
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 411 of file JPDF.hh.

415  {
416  using namespace JTOOLS;
417 
418  static const int N = 100; // maximal number of iterations
419  static const double eps = 1.0e-6; // precision index of refraction
420 
421  const double R = std::max(R_m, getRmin());
422  const double t = R * getTanThetaC() / C + t_ns; // time [ns]
423  const double a = C*t/R; // target value
424  const double A = getPhotocathodeArea();
425 
426  const double px = sin(theta)*cos(phi);
427  const double pz = cos(theta);
428 
429  // check validity range for index of refraction
430 
431  for (double buffer[] = { wmin, wmax, 0.0 }, *p = buffer; *p != 0.0; ++p) {
432 
433  const double n = getIndexOfRefractionPhase(*p);
434  const double ng = getIndexOfRefractionGroup(*p);
435 
436  const double ct0 = 1.0 / n;
437  const double st0 = sqrt((1.0 + ct0)*(1.0 - ct0));
438 
439  const double b = (ng - ct0) / st0; // running value
440 
441  if (*p == wmin && b < a) { return 0.0; }
442  if (*p == wmax && b > a) { return 0.0; }
443  }
444 
445 
446  double umin = wmin;
447  double umax = wmax;
448 
449  for (int i = 0; i != N; ++i) { // binary search for wavelength
450 
451  const double w = 0.5 * (umin + umax);
452 
453  const double n = getIndexOfRefractionPhase(w);
454  const double ng = getIndexOfRefractionGroup(w);
455 
456  const double ct0 = 1.0 / n;
457  const double st0 = sqrt((1.0 + ct0)*(1.0 - ct0));
458 
459  const double b = (ng - ct0) / st0; // running value
460 
461  if (fabs(b-a) < a*eps) {
462 
463  const double np = getDispersionPhase(w);
464  const double ngp = getDispersionGroup(w);
465 
466  const double l_abs = getAbsorptionLength(w);
467  const double ls = getScatteringLength(w);
468 
469  const double d = R / st0; // distance traveled by photon
470  const double ct = st0*px + ct0*pz; // cosine angle of incidence on PMT
471 
472  const double i3 = ct0*ct0*ct0 / (st0*st0*st0);
473 
474  const double U = getAngularAcceptance(ct); // PMT angular acceptance
475  const double V = exp(-d/l_abs - d/ls); // absorption & scattering
476  const double W = A / (2.0*PI*R*st0); // solid angle
477 
478  const double Ja = R * (ngp/st0 + np*(n-ng)*i3) / C; // dt/dlambda
479 
480  return cherenkov(w,n) * getQE(w) * U * V * W / fabs(Ja);
481  }
482 
483  if (b > a)
484  umin = w;
485  else
486  umax = w;
487  }
488 
489  return 0.0;
490  }
data_type w[N+1][M+1]
Definition: JPolint.hh:708
static const double PI
Constants.
Definition: JConstants.hh:20
virtual double getDispersionGroup(const double lambda) const =0
Dispersion of light for group velocity.
fi JEventTimesliceWriter a
virtual double getScatteringLength(const double lambda) const =0
Scattering length.
then print_variable DETECTOR INPUT_FILE INTERMEDIATE_FILE check_input_file $DETECTOR $INPUT_FILE check_output_file $INTERMEDIATE_FILE $OUTPUT_FILE JMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JPath.sh:52
virtual double getAbsorptionLength(const double lambda) const =0
Absorption length.
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:40
static double getRmin()
minimal distance of approach of muon to PMT [m]
Definition: JPDF.hh:2126
const double wmax
maximal wavelength for integration [nm]
Definition: JPDF.hh:2171
double cherenkov(const double lambda, const double n)
Number of Cherenkov photons per unit track length and per unit wavelength.
Definition: JPDFToolkit.hh:58
virtual double getIndexOfRefractionGroup(const double lambda) const
Index of refraction for group velocity.
alias put_queue eval echo n
Definition: qlib.csh:19
const double wmin
Integration limits.
Definition: JPDF.hh:2170
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.
static const double C
Speed of light in vacuum [m/ns].
Definition: JConstants.hh:22
double getTanThetaC()
Get average tangent of Cherenkov angle of water.
Definition: JConstants.hh:133
then usage $script[input file[working directory[option]]] nWhere option can be N
Definition: JMuonPostfit.sh:37
virtual double getDispersionPhase(const double lambda) const =0
Dispersion of light for phase velocity.
source $JPP_DIR setenv csh $JPP_DIR eval JShellParser o a A
then set_variable FORMULA *[0] exp(-0.5 *(x-[1])*(x-[1])/([2]*[2]))" set_variable OUTPUT_FILE histogram.root JHistogram1D -o $WORKDIR/$OUTPUT_FILE -F "$FORMULA" -
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 502 of file JPDF.hh.

506  {
507  using namespace JTOOLS;
508 
509  static const double eps = 1.0e-10;
510 
511  double value = 0;
512 
513  const double R = std::max(R_m, getRmin());
514  const double t = R * getTanThetaC() / C + t_ns; // time [ns]
515  const double A = getPhotocathodeArea();
516 
517  const double px = sin(theta)*cos(phi);
518  const double py = sin(theta)*sin(phi);
519  const double pz = cos(theta);
520 
521  const double n0 = getIndexOfRefractionGroup(wmax);
522  const double n1 = getIndexOfRefractionGroup(wmin);
523  const double ni = sqrt(R*R + C*t*C*t) / R; // maximal index of refraction
524 
525  if (n0 >= ni) {
526  return value;
527  }
528 
529  const double nj = std::min(ni,n1);
530 
531  double w = wmax;
532 
533  for (const_iterator i = begin(); i != end(); ++i) {
534 
535  const double ng = 0.5 * (nj + n0) + i->getX() * 0.5 * (nj - n0);
536  const double dn = i->getY() * 0.5 * (nj - n0);
537 
538  w = getWavelength(ng, w, 1.0e-5);
539 
540  const double dw = dn / fabs(getDispersionGroup(w));
541 
542  const double n = getIndexOfRefractionPhase(w);
543 
544  const double l_abs = getAbsorptionLength(w);
545  const double ls = getScatteringLength(w);
546 
547  const double npe = cherenkov(w,n) * dw * getQE(w);
548 
549  if (npe <= 0) { continue; }
550 
551  const double Jc = 1.0 / ls; // dN/dx
552 
553  const double ct0 = 1.0 / n; // photon direction before scattering
554  const double st0 = sqrt((1.0 + ct0)*(1.0 - ct0));
555 
556  JRoot rz(R, ng, t); // square root
557 
558  if (!rz.is_valid) { continue; }
559 
560  const double zmin = rz.first;
561  const double zmax = rz.second;
562 
563  const double zap = 1.0 / l_abs;
564 
565  const double xmin = exp(zap*zmax);
566  const double xmax = exp(zap*zmin);
567 
568  for (const_iterator j = begin(); j != end(); ++j) {
569 
570  const double x = 0.5 * (xmax + xmin) + j->getX() * 0.5 * (xmax - xmin);
571  const double dx = j->getY() * 0.5 * (xmax - xmin);
572 
573  const double z = log(x) / zap;
574  const double dz = -dx / (zap*x);
575 
576  const double D = sqrt(z*z + R*R);
577  const double cd = -z / D;
578  const double sd = R / D;
579 
580  const double d = (C*t - z) / ng; // photon path
581 
582  //const double V = exp(-d/l_abs); // absorption
583 
584  const double cta = cd*ct0 + sd*st0;
585  const double dca = d - 0.5*(d+D)*(d-D) / (d - D*cta);
586  const double tip = -log(D*D/(dca*dca) + eps) / PI;
587 
588  const double ymin = exp(tip*PI);
589  const double ymax = 1.0;
590 
591  for (const_iterator k = begin(); k != end(); ++k) {
592 
593  const double y = 0.5 * (ymax + ymin) + k->getX() * 0.5 * (ymax - ymin);
594  const double dy = k->getY() * 0.5 * (ymax - ymin);
595 
596  const double phi = log(y) / tip;
597  const double dp = -dy / (tip*y);
598 
599  const double cp0 = cos(phi);
600  const double sp0 = sin(phi);
601 
602  const double u = (R*R + z*z - d*d) / (2*R*st0*cp0 - 2*z*ct0 - 2*d);
603  const double v = d - u;
604 
605  if (u <= 0) { continue; }
606  if (v <= 0) { continue; }
607 
608  const double vi = 1.0 / v;
609  const double cts = (R*st0*cp0 - z*ct0 - u)*vi; // cosine scattering angle
610 
611  const double V = exp(-d*getInverseAttenuationLength(l_abs, ls, cts));
612 
613  if (cts < 0.0 && v * sqrt((1.0 + cts) * (1.0 - cts)) < MODULE_RADIUS_M) { continue; }
614 
615  const double vx = R - u*st0*cp0;
616  const double vy = - u*st0*sp0;
617  const double vz = -z - u*ct0;
618 
619  const double ct[] = { // cosine angle of incidence on PMT
620  (vx*px + vy*py + vz*pz) * vi,
621  (vx*px - vy*py + vz*pz) * vi
622  };
623 
624  const double U =
625  getAngularAcceptance(ct[0]) +
626  getAngularAcceptance(ct[1]); // PMT angular acceptance
627  const double W = std::min(A*vi*vi, 2.0*PI); // solid angle
628 
629  const double Ja = getScatteringProbability(cts); // d^2P/dcos/dphi
630  const double Jd = ng * (1.0 - cts) / C; // dt/du
631 
632  value += (npe * dz * dp / (2*PI)) * U * V * W * Ja * Jc / fabs(Jd);
633  }
634  }
635  }
636 
637  return value;
638  }
*fatal Wrong number of arguments esac JCookie sh JRuns D $DETECTOR d sort n k
Definition: JRunrange.sh:16
data_type w[N+1][M+1]
Definition: JPolint.hh:708
do echo Generating $dir eval D
Definition: JDrawLED.sh:50
static const double PI
Constants.
Definition: JConstants.hh:20
virtual double getDispersionGroup(const double lambda) const =0
Dispersion of light for group velocity.
static double MODULE_RADIUS_M
Radius of optical module [m].
Definition: JPDF.hh:42
virtual double getScatteringLength(const double lambda) const =0
Scattering length.
then print_variable DETECTOR INPUT_FILE INTERMEDIATE_FILE check_input_file $DETECTOR $INPUT_FILE check_output_file $INTERMEDIATE_FILE $OUTPUT_FILE JMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JPath.sh:52
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:2065
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:40
static double getRmin()
minimal distance of approach of muon to PMT [m]
Definition: JPDF.hh:2126
const double wmax
maximal wavelength for integration [nm]
Definition: JPDF.hh:2171
double cherenkov(const double lambda, const double n)
Number of Cherenkov photons per unit track length and per unit wavelength.
Definition: JPDFToolkit.hh:58
virtual double getIndexOfRefractionGroup(const double lambda) const
Index of refraction for group velocity.
alias put_queue eval echo n
Definition: qlib.csh:19
virtual double getInverseAttenuationLength(const double l_abs, const double ls, const double cts) const
Get the inverse of the attenuation length.
Definition: JPDF.hh:2137
const double wmin
Integration limits.
Definition: JPDF.hh:2170
virtual double getAngularAcceptance(const double ct) const =0
Angular acceptence of PMT.
container_type::const_iterator const_iterator
Definition: JCollection.hh:90
int j
Definition: JPolint.hh:634
virtual double getQE(const double lambda) const =0
Quantum efficiency of PMT (incl.
data_type v[N+1][M+1]
Definition: JPolint.hh:707
double u[N+1]
Definition: JPolint.hh:706
static const double C
Speed of light in vacuum [m/ns].
Definition: JConstants.hh:22
double getTanThetaC()
Get average tangent of Cherenkov angle of water.
Definition: JConstants.hh:133
source $JPP_DIR setenv csh $JPP_DIR eval JShellParser o a A
virtual double getScatteringProbability(const double ct) const =0
Model specific function to describe light scattering in water (integral over full solid angle normali...
then set_variable FORMULA *[0] exp(-0.5 *(x-[1])*(x-[1])/([2]*[2]))" set_variable OUTPUT_FILE histogram.root JHistogram1D -o $WORKDIR/$OUTPUT_FILE -F "$FORMULA" -
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 890 of file JPDF.hh.

895  {
896  using namespace JTOOLS;
897 
898  static const double eps = 1.0e-10;
899 
900  double value = 0;
901 
902  const double sd = sqrt((1.0 + cd)*(1.0 - cd));
903  const double D = std::max(D_m, getRmin());
904  const double R = sd * D; // minimal distance of approach [m]
905  const double Z = -cd * D; // photon emission point
906  const double L = D;
907  const double t = D * getIndexOfRefraction() / C + t_ns; // time [ns]
908  const double A = getPhotocathodeArea();
909 
910  const double px = sin(theta)*cos(phi);
911  const double py = sin(theta)*sin(phi);
912  const double pz = cos(theta);
913 
914  const double n0 = getIndexOfRefractionGroup(wmax);
915  const double n1 = getIndexOfRefractionGroup(wmin);
916 
917  const double ni = C*t / L; // maximal index of refraction
918 
919  if (n0 >= ni) {
920  return value;
921  }
922 
923  const double nj = std::min(ni,n1);
924 
925  double w = wmax;
926 
927  for (const_iterator i = begin(); i != end(); ++i) {
928 
929  const double ng = 0.5 * (nj + n0) + i->getX() * 0.5 * (nj - n0);
930  const double dn = i->getY() * 0.5 * (nj - n0);
931 
932  w = getWavelength(ng, w, 1.0e-5);
933 
934  const double dw = dn / fabs(getDispersionGroup(w));
935 
936  const double n = getIndexOfRefractionPhase(w);
937 
938  const double l_abs = getAbsorptionLength(w);
939  const double ls = getScatteringLength(w);
940 
941  const double npe = cherenkov(w,n) * dw * getQE(w);
942 
943  if (npe <= 0) { continue; }
944 
945  const double Jc = 1.0 / ls; // dN/dx
946 
947  const double ct0 = 1.0 / n; // photon direction before scattering
948  const double st0 = sqrt((1.0 + ct0)*(1.0 - ct0));
949 
950  const double d = C*t / ng; // photon path
951 
952  //const double V = exp(-d/l_abs); // absorption
953 
954  const double cta = cd*ct0 + sd*st0;
955  const double dca = d - 0.5*(d+L)*(d-L) / (d - L*cta);
956  const double tip = -log(L*L/(dca*dca) + eps) / PI;
957 
958  const double ymin = exp(tip*PI);
959  const double ymax = 1.0;
960 
961  for (const_iterator j = begin(); j != end(); ++j) {
962 
963  const double y = 0.5 * (ymax + ymin) + j->getX() * 0.5 * (ymax - ymin);
964  const double dy = j->getY() * 0.5 * (ymax - ymin);
965 
966  const double phi = log(y) / tip;
967  const double dp = -dy / (tip*y);
968 
969  const double cp0 = cos(phi);
970  const double sp0 = sin(phi);
971 
972  const double u = (R*R + Z*Z - d*d) / (2*R*st0*cp0 - 2*Z*ct0 - 2*d);
973  const double v = d - u;
974 
975  if (u <= 0) { continue; }
976  if (v <= 0) { continue; }
977 
978  const double vi = 1.0 / v;
979  const double cts = (R*st0*cp0 - Z*ct0 - u)*vi; // cosine scattering angle
980 
981  const double V = exp(-d*getInverseAttenuationLength(l_abs, ls, cts));
982 
983  if (cts < 0.0 && v * sqrt((1.0 + cts) * (1.0 - cts)) < MODULE_RADIUS_M) { continue; }
984 
985  const double vx = R - u*st0*cp0;
986  const double vy = - u*st0*sp0;
987  const double vz = -Z - u*ct0;
988 
989  const double ct[] = { // cosine angle of incidence on PMT
990  (vx*px + vy*py + vz*pz) * vi,
991  (vx*px - vy*py + vz*pz) * vi
992  };
993 
994  const double U =
995  getAngularAcceptance(ct[0]) +
996  getAngularAcceptance(ct[1]); // PMT angular acceptance
997  const double W = std::min(A*vi*vi, 2.0*PI); // solid angle
998 
999  const double Ja = getScatteringProbability(cts); // d^2P/dcos/dphi
1000  const double Jd = ng * (1.0 - cts) / C; // dt/du
1001 
1002  value += (npe * dp / (2*PI)) * U * V * W * Ja * Jc / fabs(Jd);
1003  }
1004  }
1005 
1006  return value;
1007  }
data_type w[N+1][M+1]
Definition: JPolint.hh:708
do echo Generating $dir eval D
Definition: JDrawLED.sh:50
double getIndexOfRefraction()
Get average index of refraction of water.
Definition: JConstants.hh:111
static const double PI
Constants.
Definition: JConstants.hh:20
virtual double getDispersionGroup(const double lambda) const =0
Dispersion of light for group velocity.
static double MODULE_RADIUS_M
Radius of optical module [m].
Definition: JPDF.hh:42
virtual double getScatteringLength(const double lambda) const =0
Scattering length.
then print_variable DETECTOR INPUT_FILE INTERMEDIATE_FILE check_input_file $DETECTOR $INPUT_FILE check_output_file $INTERMEDIATE_FILE $OUTPUT_FILE JMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JPath.sh:52
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:2065
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:40
static double getRmin()
minimal distance of approach of muon to PMT [m]
Definition: JPDF.hh:2126
const double wmax
maximal wavelength for integration [nm]
Definition: JPDF.hh:2171
double cherenkov(const double lambda, const double n)
Number of Cherenkov photons per unit track length and per unit wavelength.
Definition: JPDFToolkit.hh:58
virtual double getIndexOfRefractionGroup(const double lambda) const
Index of refraction for group velocity.
alias put_queue eval echo n
Definition: qlib.csh:19
virtual double getInverseAttenuationLength(const double l_abs, const double ls, const double cts) const
Get the inverse of the attenuation length.
Definition: JPDF.hh:2137
const double wmin
Integration limits.
Definition: JPDF.hh:2170
virtual double getAngularAcceptance(const double ct) const =0
Angular acceptence of PMT.
container_type::const_iterator const_iterator
Definition: JCollection.hh:90
int j
Definition: JPolint.hh:634
virtual double getQE(const double lambda) const =0
Quantum efficiency of PMT (incl.
data_type v[N+1][M+1]
Definition: JPolint.hh:707
double u[N+1]
Definition: JPolint.hh:706
static const double C
Speed of light in vacuum [m/ns].
Definition: JConstants.hh:22
source $JPP_DIR setenv csh $JPP_DIR eval JShellParser o a A
virtual double getScatteringProbability(const double ct) const =0
Model specific function to describe light scattering in water (integral over full solid angle normali...
then set_variable FORMULA *[0] exp(-0.5 *(x-[1])*(x-[1])/([2]*[2]))" set_variable OUTPUT_FILE histogram.root JHistogram1D -o $WORKDIR/$OUTPUT_FILE -F "$FORMULA" -
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 650 of file JPDF.hh.

654  {
655  using namespace JTOOLS;
656 
657  double value = 0;
658 
659  const double R = std::max(R_m, getRmin());
660  const double t = R * getTanThetaC() / C + t_ns; // time [ns]
661  const double A = getPhotocathodeArea();
662  const double D = 2.0*sqrt(A/PI);
663 
664  const double px = sin(theta)*cos(phi);
665  //const double py = sin(theta)*sin(phi);
666  const double pz = cos(theta);
667 
668  const double n0 = getIndexOfRefractionGroup(wmax);
669  const double n1 = getIndexOfRefractionGroup(wmin);
670  const double ni = sqrt(R*R + C*t*C*t) / R; // maximal index of refraction
671 
672  if (n0 >= ni) {
673  return value;
674  }
675 
676  const double nj = std::min(n1, ni);
677 
678  double w = wmax;
679 
680  for (const_iterator i = begin(); i != end(); ++i) {
681 
682  const double ng = 0.5 * (nj + n0) + i->getX() * 0.5 * (nj - n0);
683  const double dn = i->getY() * 0.5 * (nj - n0);
684 
685  w = getWavelength(ng, w, 1.0e-5);
686 
687  const double dw = dn / fabs(getDispersionGroup(w));
688 
689  const double n = getIndexOfRefractionPhase(w);
690 
691  const double l_abs = getAbsorptionLength(w);
692  const double ls = getScatteringLength(w);
693 
694  const double npe = cherenkov(w,n) * dw * getQE(w);
695 
696  JRoot rz(R, ng, t); // square root
697 
698  if (!rz.is_valid) { continue; }
699 
700  for (int j = 0; j != 2; ++j) {
701 
702  const double z = rz[j];
703 
704  if (C*t <= z) continue;
705 
706  const double d = sqrt(z*z + R*R); // distance traveled by photon
707 
708  const double ct0 = -z / d;
709  const double st0 = R / d;
710 
711  const double dz = D / st0; // average track length
712 
713  const double ct = st0*px + ct0*pz; // cosine angle of incidence on PMT
714 
715  const double U = getAngularAcceptance(ct); // PMT angular acceptance
716  const double V = exp(-d/l_abs - d/ls); // absorption & scattering
717  const double W = A/(d*d); // solid angle
718 
719  const double Ja = geant(n,ct0); // d^2N/dcos/dphi
720  const double Jd = (1.0 - ng*ct0) / C; // d t/ dz
721  const double Je = ng*st0*st0*st0 / (R*C); // d^2t/(dz)^2
722 
723  value += gWater() * npe * U * V * W * Ja / (fabs(Jd) + 0.5*Je*dz);
724  }
725  }
726 
727  return value;
728  }
data_type w[N+1][M+1]
Definition: JPolint.hh:708
do echo Generating $dir eval D
Definition: JDrawLED.sh:50
static const double PI
Constants.
Definition: JConstants.hh:20
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:328
static const JGeant geant(geanx, 0.0001)
Function object for the number of photons from EM-shower as a function of emission angle...
virtual double getScatteringLength(const double lambda) const =0
Scattering length.
then print_variable DETECTOR INPUT_FILE INTERMEDIATE_FILE check_input_file $DETECTOR $INPUT_FILE check_output_file $INTERMEDIATE_FILE $OUTPUT_FILE JMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JPath.sh:52
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:2065
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:40
static double getRmin()
minimal distance of approach of muon to PMT [m]
Definition: JPDF.hh:2126
const double wmax
maximal wavelength for integration [nm]
Definition: JPDF.hh:2171
double cherenkov(const double lambda, const double n)
Number of Cherenkov photons per unit track length and per unit wavelength.
Definition: JPDFToolkit.hh:58
virtual double getIndexOfRefractionGroup(const double lambda) const
Index of refraction for group velocity.
alias put_queue eval echo n
Definition: qlib.csh:19
const double wmin
Integration limits.
Definition: JPDF.hh:2170
virtual double getAngularAcceptance(const double ct) const =0
Angular acceptence of PMT.
container_type::const_iterator const_iterator
Definition: JCollection.hh:90
int j
Definition: JPolint.hh:634
virtual double getQE(const double lambda) const =0
Quantum efficiency of PMT (incl.
static const double C
Speed of light in vacuum [m/ns].
Definition: JConstants.hh:22
double getTanThetaC()
Get average tangent of Cherenkov angle of water.
Definition: JConstants.hh:133
source $JPP_DIR setenv csh $JPP_DIR eval JShellParser o a A
then set_variable FORMULA *[0] exp(-0.5 *(x-[1])*(x-[1])/([2]*[2]))" set_variable OUTPUT_FILE histogram.root JHistogram1D -o $WORKDIR/$OUTPUT_FILE -F "$FORMULA" -
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 740 of file JPDF.hh.

744  {
745  using namespace JTOOLS;
746 
747  double value = 0;
748 
749  const double R = std::max(R_m, getRmin());
750  const double t = R * getTanThetaC() / C + t_ns; // time [ns]
751  const double A = getPhotocathodeArea();
752 
753  const double px = sin(theta)*cos(phi);
754  const double py = sin(theta)*sin(phi);
755  const double pz = cos(theta);
756 
757  const double n0 = getIndexOfRefractionGroup(wmax);
758  const double n1 = getIndexOfRefractionGroup(wmin);
759  const double ni = sqrt(R*R + C*t*C*t) / R; // maximal index of refraction
760 
761  if (n0 >= ni) {
762  return value;
763  }
764 
765  const double nj = std::min(ni,n1);
766 
767  double w = wmax;
768 
769  for (const_iterator i = begin(); i != end(); ++i) {
770 
771  const double ng = 0.5 * (nj + n0) + i->getX() * 0.5 * (nj - n0);
772  const double dn = i->getY() * 0.5 * (nj - n0);
773 
774  w = getWavelength(ng, w, 1.0e-5);
775 
776  const double dw = dn / fabs(getDispersionGroup(w));
777 
778  const double n = getIndexOfRefractionPhase(w);
779 
780  const double l_abs = getAbsorptionLength(w);
781  const double ls = getScatteringLength(w);
782 
783  const double npe = cherenkov(w,n) * dw * getQE(w);
784 
785  if (npe <= 0) { continue; }
786 
787  const double Jc = 1.0 / ls; // dN/dx
788 
789  JRoot rz(R, ng, t); // square root
790 
791  if (!rz.is_valid) { continue; }
792 
793  const double zmin = rz.first;
794  const double zmax = rz.second;
795 
796  const double zap = 1.0 / l_abs;
797 
798  const double xmin = exp(zap*zmax);
799  const double xmax = exp(zap*zmin);
800 
801  for (const_iterator j = begin(); j != end(); ++j) {
802 
803  const double x = 0.5 * (xmax + xmin) + j->getX() * 0.5 * (xmax - xmin);
804  const double dx = j->getY() * 0.5 * (xmax - xmin);
805 
806  const double z = log(x) / zap;
807  const double dz = -dx / (zap*x);
808 
809  const double D = sqrt(z*z + R*R);
810  const double cd = -z / D;
811  const double sd = R / D;
812 
813  const double qx = cd*px + 0 - sd*pz;
814  const double qy = 1*py;
815  const double qz = sd*px + 0 + cd*pz;
816 
817  const double d = (C*t - z) / ng; // photon path
818 
819  //const double V = exp(-d/l_abs); // absorption
820 
821  const double ds = 2.0 / (size() + 1);
822 
823  for (double sb = 0.5*ds; sb < 1.0 - 0.25*ds; sb += ds) {
824 
825  for (int buffer[] = { -1, +1, 0}, *k = buffer; *k != 0; ++k) {
826 
827  const double cb = (*k) * sqrt((1.0 + sb)*(1.0 - sb));
828  const double dcb = (*k) * ds*sb/cb;
829 
830  const double v = 0.5 * (d + D) * (d - D) / (d - D*cb);
831  const double u = d - v;
832 
833  if (u <= 0) { continue; }
834  if (v <= 0) { continue; }
835 
836  const double cts = (D*cb - v) / u; // cosine scattering angle
837 
838  const double V = exp(-d*getInverseAttenuationLength(l_abs, ls, cts));
839 
840  if (cts < 0.0 && v * sqrt((1.0 + cts) * (1.0 - cts)) < MODULE_RADIUS_M) { continue; }
841 
842  const double W = std::min(A/(v*v), 2.0*PI); // solid angle
843  const double Ja = getScatteringProbability(cts); // d^2P/dcos/dphi
844  const double Jd = ng * (1.0 - cts) / C; // dt/du
845 
846  const double ca = (D - v*cb) / u;
847  const double sa = v*sb / u;
848 
849  const double dp = PI / phd.size();
850  const double dom = dcb*dp * v*v / (u*u);
851 
852  for (const_iterator l = phd.begin(); l != phd.end(); ++l) {
853 
854  const double cp = l->getX();
855  const double sp = l->getY();
856 
857  const double ct0 = cd*ca - sd*sa*cp;
858 
859  const double vx = sb*cp * qx;
860  const double vy = sb*sp * qy;
861  const double vz = cb * qz;
862 
863  const double U =
864  getAngularAcceptance(vx + vy + vz) +
865  getAngularAcceptance(vx - vy + vz); // PMT angular acceptance
866 
867  const double Jb = geant(n,ct0); // d^2N/dcos/dphi
868 
869  value += dom * gWater() * npe * dz * U * V * W * Ja * Jb * Jc / fabs(Jd);
870  }
871  }
872  }
873  }
874  }
875 
876  return value;
877  }
*fatal Wrong number of arguments esac JCookie sh JRuns D $DETECTOR d sort n k
Definition: JRunrange.sh:16
data_type w[N+1][M+1]
Definition: JPolint.hh:708
do echo Generating $dir eval D
Definition: JDrawLED.sh:50
static const double PI
Constants.
Definition: JConstants.hh:20
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:328
static const JGeant geant(geanx, 0.0001)
Function object for the number of photons from EM-shower as a function of emission angle...
std::vector< element_type > phd
fast evaluation of phi integral
Definition: JPDF.hh:2173
static double MODULE_RADIUS_M
Radius of optical module [m].
Definition: JPDF.hh:42
virtual double getScatteringLength(const double lambda) const =0
Scattering length.
then print_variable DETECTOR INPUT_FILE INTERMEDIATE_FILE check_input_file $DETECTOR $INPUT_FILE check_output_file $INTERMEDIATE_FILE $OUTPUT_FILE JMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JPath.sh:52
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:2065
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:40
static double getRmin()
minimal distance of approach of muon to PMT [m]
Definition: JPDF.hh:2126
const double wmax
maximal wavelength for integration [nm]
Definition: JPDF.hh:2171
double cherenkov(const double lambda, const double n)
Number of Cherenkov photons per unit track length and per unit wavelength.
Definition: JPDFToolkit.hh:58
virtual double getIndexOfRefractionGroup(const double lambda) const
Index of refraction for group velocity.
alias put_queue eval echo n
Definition: qlib.csh:19
virtual double getInverseAttenuationLength(const double l_abs, const double ls, const double cts) const
Get the inverse of the attenuation length.
Definition: JPDF.hh:2137
const double wmin
Integration limits.
Definition: JPDF.hh:2170
virtual double getAngularAcceptance(const double ct) const =0
Angular acceptence of PMT.
container_type::const_iterator const_iterator
Definition: JCollection.hh:90
int j
Definition: JPolint.hh:634
virtual double getQE(const double lambda) const =0
Quantum efficiency of PMT (incl.
data_type v[N+1][M+1]
Definition: JPolint.hh:707
double u[N+1]
Definition: JPolint.hh:706
static const double C
Speed of light in vacuum [m/ns].
Definition: JConstants.hh:22
double getTanThetaC()
Get average tangent of Cherenkov angle of water.
Definition: JConstants.hh:133
source $JPP_DIR setenv csh $JPP_DIR eval JShellParser o a A
virtual double getScatteringProbability(const double ct) const =0
Model specific function to describe light scattering in water (integral over full solid angle normali...
then set_variable FORMULA *[0] exp(-0.5 *(x-[1])*(x-[1])/([2]*[2]))" set_variable OUTPUT_FILE histogram.root JHistogram1D -o $WORKDIR/$OUTPUT_FILE -F "$FORMULA" -
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 1020 of file JPDF.hh.

1025  {
1026  using namespace JTOOLS;
1027 
1028  const double ct0 = cd;
1029  const double st0 = sqrt((1.0 + ct0)*(1.0 - ct0));
1030 
1031  const double D = std::max(D_m, getRmin());
1032  const double t = D * getIndexOfRefraction() / C + t_ns; // time [ns]
1033  const double A = getPhotocathodeArea();
1034 
1035  const double px = sin(theta)*cos(phi);
1036  const double pz = cos(theta);
1037 
1038  const double n0 = getIndexOfRefractionGroup(wmax);
1039  const double n1 = getIndexOfRefractionGroup(wmin);
1040  const double ng = C*t/D; // index of refraction
1041 
1042  if (n0 >= ng) { return 0.0; }
1043  if (n1 <= ng) { return 0.0; }
1044 
1045  const double w = getWavelength(ng);
1046  const double n = getIndexOfRefractionPhase(w);
1047 
1048  const double l_abs = getAbsorptionLength(w);
1049  const double ls = getScatteringLength(w);
1050 
1051  const double npe = cherenkov(w,n) * getQE(w);
1052 
1053  const double ct = st0*px + ct0*pz; // cosine angle of incidence on PMT
1054 
1055  const double U = getAngularAcceptance(ct); // PMT angular acceptance
1056  const double V = exp(-D/l_abs - D/ls); // absorption & scattering
1057  const double W = A/(D*D); // solid angle
1058 
1059  const double ngp = getDispersionGroup(w);
1060 
1061  const double Ja = D * ngp / C; // dt/dlambda
1062  const double Jb = geant(n,ct0); // d^2N/dcos/dphi
1063 
1064  return npe * geanc() * U * V * W * Jb / fabs(Ja);
1065  }
data_type w[N+1][M+1]
Definition: JPolint.hh:708
do echo Generating $dir eval D
Definition: JDrawLED.sh:50
double getIndexOfRefraction()
Get average index of refraction of water.
Definition: JConstants.hh:111
double geanc()
Equivalent muon track length per unit shower energy.
Definition: JGeane.hh:31
virtual double getDispersionGroup(const double lambda) const =0
Dispersion of light for group velocity.
static const JGeant geant(geanx, 0.0001)
Function object for the number of photons from EM-shower as a function of emission angle...
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:2065
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:2126
const double wmax
maximal wavelength for integration [nm]
Definition: JPDF.hh:2171
double cherenkov(const double lambda, const double n)
Number of Cherenkov photons per unit track length and per unit wavelength.
Definition: JPDFToolkit.hh:58
virtual double getIndexOfRefractionGroup(const double lambda) const
Index of refraction for group velocity.
alias put_queue eval echo n
Definition: qlib.csh:19
const double wmin
Integration limits.
Definition: JPDF.hh:2170
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.
static const double C
Speed of light in vacuum [m/ns].
Definition: JConstants.hh:22
source $JPP_DIR setenv csh $JPP_DIR eval JShellParser o a A
then set_variable FORMULA *[0] exp(-0.5 *(x-[1])*(x-[1])/([2]*[2]))" set_variable OUTPUT_FILE histogram.root JHistogram1D -o $WORKDIR/$OUTPUT_FILE -F "$FORMULA" -
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 1216 of file JPDF.hh.

1222  {
1223  using namespace JTOOLS;
1224 
1225  double value = 0;
1226 
1227  const double sd = sqrt((1.0 + cd)*(1.0 - cd));
1228  const double D = std::max(D_m, getRmin());
1229  const double R = D * sd; // minimal distance of approach [m]
1230  const double Z = -D * cd;
1231  const double t = D * getIndexOfRefraction() / C + t_ns; // time [ns]
1232 
1233  const double n0 = getIndexOfRefractionGroup(wmax);
1234  const double n1 = getIndexOfRefractionGroup(wmin);
1235 
1236  double zmin = 0.0; // minimal shower length [m]
1237  double zmax = geanz.getLength(E, 1.0); // maximal shower length [m]
1238 
1239  const double d = sqrt((Z+zmax)*(Z+zmax) + R*R);
1240 
1241  if (C*t > std::max(n1*D, zmax + n1*d)) {
1242  return value;
1243  }
1244 
1245  if (C*t < n0*D) {
1246 
1247  JRoot rz(R, n0, t + Z/C); // square root
1248 
1249  if (!rz.is_valid) {
1250  return value;
1251  }
1252 
1253  if (rz.second > Z) { zmin = rz.second - Z; }
1254  if (rz.first > Z) { zmin = rz.first - Z; }
1255  }
1256 
1257  if (C*t > n1*D) {
1258 
1259  JRoot rz(R, n1, t + Z/C); // square root
1260 
1261  if (!rz.is_valid) {
1262  return value;
1263  }
1264 
1265  if (rz.second > Z) { zmin = rz.second - Z; }
1266  if (rz.first > Z) { zmin = rz.first - Z; }
1267  }
1268 
1269  if (C*t < zmax + n0*d) {
1270 
1271  JRoot rz(R, n0, t + Z/C); // square root
1272 
1273  if (!rz.is_valid) {
1274  return value;
1275  }
1276 
1277  if (rz.first > Z) { zmax = rz.first - Z; }
1278  if (rz.second > Z) { zmax = rz.second - Z; }
1279  }
1280 
1281  if (zmin < 0.0) {
1282  zmin = 0.0;
1283  }
1284 
1285  if (zmax > zmin) {
1286 
1287  const double ymin = geanz.getIntegral(E, zmin);
1288  const double ymax = geanz.getIntegral(E, zmax);
1289  const double dy = (ymax - ymin) / size();
1290 
1291  if (dy > 2*std::numeric_limits<double>::epsilon()) {
1292 
1293  for (double y = ymin + 0.5*dy; y < ymax; y += dy) {
1294 
1295  const double z = Z + geanz.getLength(E, y);
1296  const double d = sqrt(R*R + z*z);
1297  const double t1 = t + (Z - z) / C - d * getIndexOfRefraction() / C;
1298 
1299  value += dy * E * getDirectLightFromEMshower(d, -z/d, theta, phi, t1);
1300  }
1301 
1302  }
1303  }
1304 
1305  return value;
1306  }
do echo Generating $dir eval D
Definition: JDrawLED.sh:50
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:1020
double getIndexOfRefraction()
Get average index of refraction of water.
Definition: JConstants.hh:111
static const JGeanz geanz(1.85, 0.62, 0.54)
Function object for longitudinal EM-shower profile.
then print_variable DETECTOR INPUT_FILE INTERMEDIATE_FILE check_input_file $DETECTOR $INPUT_FILE check_output_file $INTERMEDIATE_FILE $OUTPUT_FILE JMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JPath.sh:52
then usage $script[distance] fi case set_variable R
Definition: JDrawLED.sh:40
static double getRmin()
minimal distance of approach of muon to PMT [m]
Definition: JPDF.hh:2126
const double wmax
maximal wavelength for integration [nm]
Definition: JPDF.hh:2171
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
const double wmin
Integration limits.
Definition: JPDF.hh:2170
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
static const double C
Speed of light in vacuum [m/ns].
Definition: JConstants.hh:22
then usage $script[input file[working directory[option]]] nWhere option can be E
Definition: JMuonPostfit.sh:37
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 1078 of file JPDF.hh.

1083  {
1084  using namespace JTOOLS;
1085 
1086  double value = 0;
1087 
1088  const double sd = sqrt((1.0 + cd)*(1.0 - cd));
1089  const double D = std::max(D_m, getRmin());
1090  const double L = D;
1091  const double t = D * getIndexOfRefraction() / C + t_ns; // time [ns]
1092 
1093  const double A = getPhotocathodeArea();
1094 
1095  const double px = sin(theta)*cos(phi);
1096  const double py = sin(theta)*sin(phi);
1097  const double pz = cos(theta);
1098 
1099  const double qx = cd*px + 0 - sd*pz;
1100  const double qy = 1*py;
1101  const double qz = sd*px + 0 + cd*pz;
1102 
1103  const double n0 = getIndexOfRefractionGroup(wmax);
1104  const double n1 = getIndexOfRefractionGroup(wmin);
1105 
1106  const double ni = C*t / L; // maximal index of refraction
1107 
1108  if (n0 >= ni) {
1109  return value;
1110  }
1111 
1112  const double nj = std::min(ni,n1);
1113 
1114  double w = wmax;
1115 
1116  for (const_iterator i = begin(); i != end(); ++i) {
1117 
1118  const double ng = 0.5 * (nj + n0) + i->getX() * 0.5 * (nj - n0);
1119  const double dn = i->getY() * 0.5 * (nj - n0);
1120 
1121  w = getWavelength(ng, w, 1.0e-5);
1122 
1123  const double dw = dn / fabs(getDispersionGroup(w));
1124 
1125  const double n = getIndexOfRefractionPhase(w);
1126 
1127  const double l_abs = getAbsorptionLength(w);
1128  const double ls = getScatteringLength(w);
1129 
1130  const double npe = cherenkov(w,n) * dw * getQE(w);
1131 
1132  if (npe <= 0) { continue; }
1133 
1134  const double Jc = 1.0 / ls; // dN/dx
1135 
1136  const double d = C*t / ng; // photon path
1137 
1138  //const double V = exp(-d/l_abs); // absorption
1139 
1140  const double ds = 2.0 / (size() + 1);
1141 
1142  for (double sb = 0.5*ds; sb < 1.0 - 0.25*ds; sb += ds) {
1143 
1144  for (int buffer[] = { -1, +1, 0}, *k = buffer; *k != 0; ++k) {
1145 
1146  const double cb = (*k) * sqrt((1.0 + sb)*(1.0 - sb));
1147  const double dcb = (*k) * ds*sb/cb;
1148 
1149  const double v = 0.5 * (d + L) * (d - L) / (d - L*cb);
1150  const double u = d - v;
1151 
1152  if (u <= 0) { continue; }
1153  if (v <= 0) { continue; }
1154 
1155  const double cts = (L*cb - v) / u; // cosine scattering angle
1156 
1157  const double V = exp(-d*getInverseAttenuationLength(l_abs, ls, cts));
1158 
1159  if (cts < 0.0 && v * sqrt((1.0 + cts) * (1.0 - cts)) < MODULE_RADIUS_M) { continue; }
1160 
1161  const double W = std::min(A/(v*v), 2.0*PI); // solid angle
1162  const double Ja = getScatteringProbability(cts); // d^2P/dcos/dphi
1163  const double Jd = ng * (1.0 - cts) / C; // dt/du
1164 
1165  const double ca = (L - v*cb) / u;
1166  const double sa = v*sb / u;
1167 
1168  const double dp = PI / phd.size();
1169  const double dom = dcb*dp * v*v / (u*u);
1170  const double dos = sqrt(dom);
1171 
1172  for (const_iterator l = phd.begin(); l != phd.end(); ++l) {
1173 
1174  const double cp = l->getX();
1175  const double sp = l->getY();
1176 
1177  const double ct0 = cd*ca - sd*sa*cp;
1178 
1179  const double vx = -sb*cp * qx;
1180  const double vy = -sb*sp * qy;
1181  const double vz = cb * qz;
1182 
1183  const double U =
1184  getAngularAcceptance(vx + vy + vz) +
1185  getAngularAcceptance(vx - vy + vz); // PMT angular acceptance
1186 
1187  //const double Jb = geant(n,ct0); // d^2N/dcos/dphi
1188 
1189  //value += npe * geanc() * dom * U * V * W * Ja * Jb * Jc / fabs(Jd);
1190 
1191  const double Jb = geant(n,
1192  ct0 - 0.5*dos,
1193  ct0 + 0.5*dos); // dN/dphi
1194 
1195  value += npe * geanc() * dos * U * V * W * Ja * Jb * Jc / fabs(Jd);
1196  }
1197  }
1198  }
1199  }
1200 
1201  return value;
1202  }
*fatal Wrong number of arguments esac JCookie sh JRuns D $DETECTOR d sort n k
Definition: JRunrange.sh:16
data_type w[N+1][M+1]
Definition: JPolint.hh:708
do echo Generating $dir eval D
Definition: JDrawLED.sh:50
double getIndexOfRefraction()
Get average index of refraction of water.
Definition: JConstants.hh:111
double geanc()
Equivalent muon track length per unit shower energy.
Definition: JGeane.hh:31
static const double PI
Constants.
Definition: JConstants.hh:20
virtual double getDispersionGroup(const double lambda) const =0
Dispersion of light for group velocity.
static const JGeant geant(geanx, 0.0001)
Function object for the number of photons from EM-shower as a function of emission angle...
std::vector< element_type > phd
fast evaluation of phi integral
Definition: JPDF.hh:2173
static double MODULE_RADIUS_M
Radius of optical module [m].
Definition: JPDF.hh:42
virtual double getScatteringLength(const double lambda) const =0
Scattering length.
then print_variable DETECTOR INPUT_FILE INTERMEDIATE_FILE check_input_file $DETECTOR $INPUT_FILE check_output_file $INTERMEDIATE_FILE $OUTPUT_FILE JMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JPath.sh:52
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:2065
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:2126
const double wmax
maximal wavelength for integration [nm]
Definition: JPDF.hh:2171
double cherenkov(const double lambda, const double n)
Number of Cherenkov photons per unit track length and per unit wavelength.
Definition: JPDFToolkit.hh:58
virtual double getIndexOfRefractionGroup(const double lambda) const
Index of refraction for group velocity.
alias put_queue eval echo n
Definition: qlib.csh:19
virtual double getInverseAttenuationLength(const double l_abs, const double ls, const double cts) const
Get the inverse of the attenuation length.
Definition: JPDF.hh:2137
const double wmin
Integration limits.
Definition: JPDF.hh:2170
virtual double getAngularAcceptance(const double ct) const =0
Angular acceptence of PMT.
container_type::const_iterator const_iterator
Definition: JCollection.hh:90
virtual double getQE(const double lambda) const =0
Quantum efficiency of PMT (incl.
data_type v[N+1][M+1]
Definition: JPolint.hh:707
double u[N+1]
Definition: JPolint.hh:706
static const double C
Speed of light in vacuum [m/ns].
Definition: JConstants.hh:22
source $JPP_DIR setenv csh $JPP_DIR eval JShellParser o a A
virtual double getScatteringProbability(const double ct) const =0
Model specific function to describe light scattering in water (integral over full solid angle normali...
then set_variable FORMULA *[0] exp(-0.5 *(x-[1])*(x-[1])/([2]*[2]))" set_variable OUTPUT_FILE histogram.root JHistogram1D -o $WORKDIR/$OUTPUT_FILE -F "$FORMULA" -
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 1320 of file JPDF.hh.

1326  {
1327  using namespace JTOOLS;
1328 
1329  double value = 0;
1330 
1331  const double sd = sqrt((1.0 + cd)*(1.0 - cd));
1332  const double D = std::max(D_m, getRmin());
1333  const double R = D * sd; // minimal distance of approach [m]
1334  const double Z = -D * cd;
1335  const double t = D * getIndexOfRefraction() / C + t_ns; // time [ns]
1336 
1337  const double n0 = getIndexOfRefractionGroup(wmax);
1338 
1339  double zmin = 0.0; // minimal shower length [m]
1340  double zmax = geanz.getLength(E, 1.0); // maximal shower length [m]
1341 
1342  const double d = sqrt((Z+zmax)*(Z+zmax) + R*R);
1343 
1344  if (C*t < n0*D) {
1345 
1346  JRoot rz(R, n0, t + Z/C); // square root
1347 
1348  if (!rz.is_valid) {
1349  return value;
1350  }
1351 
1352  if (rz.second > Z) { zmin = rz.second - Z; }
1353  if (rz.first > Z) { zmin = rz.first - Z; }
1354  }
1355 
1356  if (C*t < zmax + n0*d) {
1357 
1358  JRoot rz(R, n0, t + Z/C); // square root
1359 
1360  if (!rz.is_valid) {
1361  return value;
1362  }
1363 
1364  if (rz.first > Z) { zmax = rz.first - Z; }
1365  if (rz.second > Z) { zmax = rz.second - Z; }
1366  }
1367 
1368  const double ymin = geanz.getIntegral(E, zmin);
1369  const double ymax = geanz.getIntegral(E, zmax);
1370  const double dy = (ymax - ymin) / size();
1371 
1372  if (dy > 2*std::numeric_limits<double>::epsilon()) {
1373 
1374  for (double y = ymin + 0.5*dy; y < ymax; y += dy) {
1375 
1376  const double z = Z + geanz.getLength(E, y);
1377  const double d = sqrt(R*R + z*z);
1378  const double t1 = t + (Z - z) / C - d * getIndexOfRefraction() / C;
1379 
1380  value += dy * E * getScatteredLightFromEMshower(d, -z/d, theta, phi, t1);
1381  }
1382  }
1383 
1384  return value;
1385  }
do echo Generating $dir eval D
Definition: JDrawLED.sh:50
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:1078
double getIndexOfRefraction()
Get average index of refraction of water.
Definition: JConstants.hh:111
static const JGeanz geanz(1.85, 0.62, 0.54)
Function object for longitudinal EM-shower profile.
then print_variable DETECTOR INPUT_FILE INTERMEDIATE_FILE check_input_file $DETECTOR $INPUT_FILE check_output_file $INTERMEDIATE_FILE $OUTPUT_FILE JMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JPath.sh:52
then usage $script[distance] fi case set_variable R
Definition: JDrawLED.sh:40
static double getRmin()
minimal distance of approach of muon to PMT [m]
Definition: JPDF.hh:2126
const double wmax
maximal wavelength for integration [nm]
Definition: JPDF.hh:2171
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
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
static const double C
Speed of light in vacuum [m/ns].
Definition: JConstants.hh:22
then usage $script[input file[working directory[option]]] nWhere option can be E
Definition: JMuonPostfit.sh:37
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 1397 of file JPDF.hh.

1401  {
1402  using namespace JTOOLS;
1403 
1404  double value = 0;
1405 
1406  const double R = std::max(R_m, getRmin());
1407  const double t = R * getTanThetaC() / C + t_ns; // time [ns]
1408  const double A = getPhotocathodeArea();
1409  const double D = 2.0*sqrt(A/PI);
1410 
1411  const double px = sin(theta)*cos(phi);
1412  const double pz = cos(theta);
1413 
1414  const double n0 = getIndexOfRefractionGroup(wmax);
1415  const double n1 = getIndexOfRefractionGroup(wmin);
1416  const double ni = sqrt(R*R + C*t*C*t) / R; // maximal index of refraction
1417 
1418  if (n0 >= ni) {
1419  return value;
1420  }
1421 
1422  const double nj = std::min(n1, ni);
1423 
1424  double w = wmax;
1425 
1426  for (const_iterator i = begin(); i != end(); ++i) {
1427 
1428  const double ng = 0.5 * (nj + n0) + i->getX() * 0.5 * (nj - n0);
1429  const double dn = i->getY() * 0.5 * (nj - n0);
1430 
1431  w = getWavelength(ng, w, 1.0e-5);
1432 
1433  const double dw = dn / fabs(getDispersionGroup(w));
1434 
1435  const double n = getIndexOfRefractionPhase(w);
1436 
1437  const double l_abs = getAbsorptionLength(w);
1438  const double ls = getScatteringLength(w);
1439 
1440  const double npe = cherenkov(w,n) * dw * getQE(w);
1441 
1442  JRoot rz(R, ng, t); // square root
1443 
1444  if (!rz.is_valid) { continue; }
1445 
1446  for (int j = 0; j != 2; ++j) {
1447 
1448  const double z = rz[j];
1449 
1450  if (C*t <= z) continue;
1451 
1452  const double d = sqrt(z*z + R*R); // distance traveled by photon
1453 
1454  const double ct0 = -z / d;
1455  const double st0 = R / d;
1456 
1457  const double dz = D / st0; // average track length
1458  const double ct = st0*px + ct0*pz; // cosine angle of incidence on PMT
1459 
1460  const double U = getAngularAcceptance(ct); // PMT angular acceptance
1461  const double V = exp(-d/l_abs - d/ls); // absorption & scattering
1462  const double W = A/(d*d); // solid angle
1463 
1464  const double Ja = 1.0/(4*PI); // d^2N/dcos/dphi
1465  const double Jd = (1.0 - ng*ct0) / C; // d t/ dz
1466  const double Je = ng*st0*st0*st0 / (R*C); // d^2t/(dz)^2
1467 
1468  value += npe * geanc() * U * V * W * Ja / (fabs(Jd) + 0.5*Je*dz);
1469  }
1470  }
1471 
1472  return value;
1473  }
data_type w[N+1][M+1]
Definition: JPolint.hh:708
do echo Generating $dir eval D
Definition: JDrawLED.sh:50
double geanc()
Equivalent muon track length per unit shower energy.
Definition: JGeane.hh:31
static const double PI
Constants.
Definition: JConstants.hh:20
virtual double getDispersionGroup(const double lambda) const =0
Dispersion of light for group velocity.
virtual double getScatteringLength(const double lambda) const =0
Scattering length.
then print_variable DETECTOR INPUT_FILE INTERMEDIATE_FILE check_input_file $DETECTOR $INPUT_FILE check_output_file $INTERMEDIATE_FILE $OUTPUT_FILE JMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JPath.sh:52
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:2065
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:40
static double getRmin()
minimal distance of approach of muon to PMT [m]
Definition: JPDF.hh:2126
const double wmax
maximal wavelength for integration [nm]
Definition: JPDF.hh:2171
double cherenkov(const double lambda, const double n)
Number of Cherenkov photons per unit track length and per unit wavelength.
Definition: JPDFToolkit.hh:58
virtual double getIndexOfRefractionGroup(const double lambda) const
Index of refraction for group velocity.
alias put_queue eval echo n
Definition: qlib.csh:19
const double wmin
Integration limits.
Definition: JPDF.hh:2170
virtual double getAngularAcceptance(const double ct) const =0
Angular acceptence of PMT.
container_type::const_iterator const_iterator
Definition: JCollection.hh:90
int j
Definition: JPolint.hh:634
virtual double getQE(const double lambda) const =0
Quantum efficiency of PMT (incl.
static const double C
Speed of light in vacuum [m/ns].
Definition: JConstants.hh:22
double getTanThetaC()
Get average tangent of Cherenkov angle of water.
Definition: JConstants.hh:133
source $JPP_DIR setenv csh $JPP_DIR eval JShellParser o a A
then set_variable FORMULA *[0] exp(-0.5 *(x-[1])*(x-[1])/([2]*[2]))" set_variable OUTPUT_FILE histogram.root JHistogram1D -o $WORKDIR/$OUTPUT_FILE -F "$FORMULA" -
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 1485 of file JPDF.hh.

1489  {
1490  using namespace JTOOLS;
1491 
1492  double value = 0;
1493 
1494  const double R = std::max(R_m, getRmin());
1495  const double t = R * getTanThetaC() / C + t_ns; // time [ns]
1496  const double A = getPhotocathodeArea();
1497 
1498  const double px = sin(theta)*cos(phi);
1499  const double py = sin(theta)*sin(phi);
1500  const double pz = cos(theta);
1501 
1502  const double n0 = getIndexOfRefractionGroup(wmax);
1503  const double n1 = getIndexOfRefractionGroup(wmin);
1504  const double ni = sqrt(R*R + C*t*C*t) / R; // maximal index of refraction
1505 
1506  if (n0 >= ni) {
1507  return value;
1508  }
1509 
1510  const double nj = std::min(ni,n1);
1511 
1512  double w = wmax;
1513 
1514  for (const_iterator i = begin(); i != end(); ++i) {
1515 
1516  const double ng = 0.5 * (nj + n0) + i->getX() * 0.5 * (nj - n0);
1517  const double dn = i->getY() * 0.5 * (nj - n0);
1518 
1519  w = getWavelength(ng, w, 1.0e-5);
1520 
1521  const double dw = dn / fabs(getDispersionGroup(w));
1522 
1523  const double n = getIndexOfRefractionPhase(w);
1524 
1525  const double l_abs = getAbsorptionLength(w);
1526  const double ls = getScatteringLength(w);
1527 
1528  const double npe = cherenkov(w,n) * dw * getQE(w);
1529 
1530  if (npe <= 0) { continue; }
1531 
1532  const double Jc = 1.0 / ls; // dN/dx
1533 
1534  JRoot rz(R, ng, t); // square root
1535 
1536  if (!rz.is_valid) { continue; }
1537 
1538  const double zmin = rz.first;
1539  const double zmax = rz.second;
1540 
1541  const double zap = 1.0 / l_abs;
1542 
1543  const double xmin = exp(zap*zmax);
1544  const double xmax = exp(zap*zmin);
1545 
1546  for (const_iterator j = begin(); j != end(); ++j) {
1547 
1548  const double x = 0.5 * (xmax + xmin) + j->getX() * 0.5 * (xmax - xmin);
1549  const double dx = j->getY() * 0.5 * (xmax - xmin);
1550 
1551  const double z = log(x) / zap;
1552  const double dz = -dx / (zap*x);
1553 
1554  const double D = sqrt(z*z + R*R);
1555  const double cd = -z / D;
1556  const double sd = R / D;
1557 
1558  const double qx = cd*px + 0 - sd*pz;
1559  const double qy = 1*py;
1560  const double qz = sd*px + 0 + cd*pz;
1561 
1562  const double d = (C*t - z) / ng; // photon path
1563 
1564  //const double V = exp(-d/l_abs); // absorption
1565 
1566  const double ds = 2.0 / (size() + 1);
1567 
1568  for (double sb = 0.5*ds; sb < 1.0 - 0.25*ds; sb += ds) {
1569 
1570  for (int buffer[] = { -1, +1, 0}, *k = buffer; *k != 0; ++k) {
1571 
1572  const double cb = (*k) * sqrt((1.0 + sb)*(1.0 - sb));
1573  const double dcb = (*k) * ds*sb/cb;
1574 
1575  const double v = 0.5 * (d + D) * (d - D) / (d - D*cb);
1576  const double u = d - v;
1577 
1578  if (u <= 0) { continue; }
1579  if (v <= 0) { continue; }
1580 
1581  const double cts = (D*cb - v) / u; // cosine scattering angle
1582 
1583  const double V = exp(-d*getInverseAttenuationLength(l_abs, ls, cts));
1584 
1585  if (cts < 0.0 && v * sqrt((1.0 + cts) * (1.0 - cts)) < MODULE_RADIUS_M) { continue; }
1586 
1587  const double W = std::min(A/(v*v), 2.0*PI); // solid angle
1588  const double Ja = getScatteringProbability(cts); // d^2P/dcos/dphi
1589  const double Jd = ng * (1.0 - cts) / C; // dt/du
1590 
1591  const double dp = PI / phd.size();
1592  const double dom = dcb*dp * v*v / (u*u);
1593 
1594  for (const_iterator l = phd.begin(); l != phd.end(); ++l) {
1595 
1596  const double cp = l->getX();
1597  const double sp = l->getY();
1598 
1599  const double vx = sb*cp * qx;
1600  const double vy = sb*sp * qy;
1601  const double vz = cb * qz;
1602 
1603  const double U =
1604  getAngularAcceptance(vx + vy + vz) +
1605  getAngularAcceptance(vx - vy + vz); // PMT angular acceptance
1606 
1607  const double Jb = 1.0/(4*PI); // d^2N/dcos/dphi
1608 
1609  value += dom * npe * geanc() * dz * U * V * W * Ja * Jb * Jc / fabs(Jd);
1610  }
1611  }
1612  }
1613  }
1614  }
1615 
1616  return value;
1617  }
*fatal Wrong number of arguments esac JCookie sh JRuns D $DETECTOR d sort n k
Definition: JRunrange.sh:16
data_type w[N+1][M+1]
Definition: JPolint.hh:708
do echo Generating $dir eval D
Definition: JDrawLED.sh:50
double geanc()
Equivalent muon track length per unit shower energy.
Definition: JGeane.hh:31
static const double PI
Constants.
Definition: JConstants.hh:20
virtual double getDispersionGroup(const double lambda) const =0
Dispersion of light for group velocity.
std::vector< element_type > phd
fast evaluation of phi integral
Definition: JPDF.hh:2173
static double MODULE_RADIUS_M
Radius of optical module [m].
Definition: JPDF.hh:42
virtual double getScatteringLength(const double lambda) const =0
Scattering length.
then print_variable DETECTOR INPUT_FILE INTERMEDIATE_FILE check_input_file $DETECTOR $INPUT_FILE check_output_file $INTERMEDIATE_FILE $OUTPUT_FILE JMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JPath.sh:52
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:2065
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:40
static double getRmin()
minimal distance of approach of muon to PMT [m]
Definition: JPDF.hh:2126
const double wmax
maximal wavelength for integration [nm]
Definition: JPDF.hh:2171
double cherenkov(const double lambda, const double n)
Number of Cherenkov photons per unit track length and per unit wavelength.
Definition: JPDFToolkit.hh:58
virtual double getIndexOfRefractionGroup(const double lambda) const
Index of refraction for group velocity.
alias put_queue eval echo n
Definition: qlib.csh:19
virtual double getInverseAttenuationLength(const double l_abs, const double ls, const double cts) const
Get the inverse of the attenuation length.
Definition: JPDF.hh:2137
const double wmin
Integration limits.
Definition: JPDF.hh:2170
virtual double getAngularAcceptance(const double ct) const =0
Angular acceptence of PMT.
container_type::const_iterator const_iterator
Definition: JCollection.hh:90
int j
Definition: JPolint.hh:634
virtual double getQE(const double lambda) const =0
Quantum efficiency of PMT (incl.
data_type v[N+1][M+1]
Definition: JPolint.hh:707
double u[N+1]
Definition: JPolint.hh:706
static const double C
Speed of light in vacuum [m/ns].
Definition: JConstants.hh:22
double getTanThetaC()
Get average tangent of Cherenkov angle of water.
Definition: JConstants.hh:133
source $JPP_DIR setenv csh $JPP_DIR eval JShellParser o a A
virtual double getScatteringProbability(const double ct) const =0
Model specific function to describe light scattering in water (integral over full solid angle normali...
then set_variable FORMULA *[0] exp(-0.5 *(x-[1])*(x-[1])/([2]*[2]))" set_variable OUTPUT_FILE histogram.root JHistogram1D -o $WORKDIR/$OUTPUT_FILE -F "$FORMULA" -
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 1628 of file JPDF.hh.

1631  {
1632  using namespace JTOOLS;
1633 
1634  const double D = std::max(D_m, getRmin());
1635  const double t = D * getIndexOfRefraction() / C + t_ns; // time [ns]
1636  const double A = getPhotocathodeArea();
1637 
1638  const double n0 = getIndexOfRefractionGroup(wmax);
1639  const double n1 = getIndexOfRefractionGroup(wmin);
1640  const double ng = C*t/D; // index of refraction
1641 
1642  if (n0 >= ng) { return 0.0; }
1643  if (n1 <= ng) { return 0.0; }
1644 
1645  const double w = getWavelength(ng);
1646  const double n = getIndexOfRefractionPhase(w);
1647 
1648  const double l_abs = getAbsorptionLength(w);
1649  const double ls = getScatteringLength(w);
1650 
1651  const double npe = cherenkov(w,n) * getQE(w);
1652 
1653  const double U = getAngularAcceptance(ct); // PMT angular acceptance
1654  const double V = exp(-D/l_abs - D/ls); // absorption & scattering
1655  const double W = A/(D*D); // solid angle
1656 
1657  const double ngp = getDispersionGroup(w);
1658 
1659  const double Ja = D * ngp / C; // dt/dlambda
1660  const double Jb = 1.0 / (4.0*PI); // d^2N/dOmega
1661 
1662  return npe * geanc() * U * V * W * Jb / fabs(Ja);
1663  }
data_type w[N+1][M+1]
Definition: JPolint.hh:708
do echo Generating $dir eval D
Definition: JDrawLED.sh:50
double getIndexOfRefraction()
Get average index of refraction of water.
Definition: JConstants.hh:111
double geanc()
Equivalent muon track length per unit shower energy.
Definition: JGeane.hh:31
static const double PI
Constants.
Definition: JConstants.hh:20
virtual double getDispersionGroup(const double lambda) const =0
Dispersion of light for group velocity.
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:2065
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:2126
const double wmax
maximal wavelength for integration [nm]
Definition: JPDF.hh:2171
double cherenkov(const double lambda, const double n)
Number of Cherenkov photons per unit track length and per unit wavelength.
Definition: JPDFToolkit.hh:58
virtual double getIndexOfRefractionGroup(const double lambda) const
Index of refraction for group velocity.
alias put_queue eval echo n
Definition: qlib.csh:19
const double wmin
Integration limits.
Definition: JPDF.hh:2170
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.
static const double C
Speed of light in vacuum [m/ns].
Definition: JConstants.hh:22
source $JPP_DIR setenv csh $JPP_DIR eval JShellParser o a A
then set_variable FORMULA *[0] exp(-0.5 *(x-[1])*(x-[1])/([2]*[2]))" set_variable OUTPUT_FILE histogram.root JHistogram1D -o $WORKDIR/$OUTPUT_FILE -F "$FORMULA" -
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 1674 of file JPDF.hh.

1677  {
1678  using namespace JTOOLS;
1679 
1680  double value = 0;
1681 
1682  const double D = std::max(D_m, getRmin());
1683  const double t = D * getIndexOfRefraction() / C + t_ns; // time [ns]
1684  const double st = sqrt((1.0 + ct)*(1.0 - ct));
1685 
1686  const double A = getPhotocathodeArea();
1687 
1688  const double n0 = getIndexOfRefractionGroup(wmax);
1689  const double n1 = getIndexOfRefractionGroup(wmin);
1690 
1691  const double ni = C*t / D; // maximal index of refraction
1692 
1693  if (n0 >= ni) {
1694  return value;
1695  }
1696 
1697  const double nj = std::min(ni,n1);
1698 
1699  double w = wmax;
1700 
1701  for (const_iterator i = begin(); i != end(); ++i) {
1702 
1703  const double ng = 0.5 * (nj + n0) + i->getX() * 0.5 * (nj - n0);
1704  const double dn = i->getY() * 0.5 * (nj - n0);
1705 
1706  w = getWavelength(ng, w, 1.0e-5);
1707 
1708  const double dw = dn / fabs(getDispersionGroup(w));
1709 
1710  const double n = getIndexOfRefractionPhase(w);
1711 
1712  const double npe = cherenkov(w,n) * dw * getQE(w);
1713 
1714  if (npe <= 0) { continue; }
1715 
1716  const double l_abs = getAbsorptionLength(w);
1717  const double ls = getScatteringLength(w);
1718 
1719  const double Jc = 1.0 / ls; // dN/dx
1720  const double Jb = 1.0 / (4.0*PI); // d^2N/dcos/dphi
1721 
1722  const double d = C*t / ng; // photon path
1723 
1724  const double dcb = 2.0 / (size() + 1);
1725 
1726  for (double cb = -1.0 + 0.5*dcb; cb < +1.0; cb += dcb) {
1727 
1728  const double sb = sqrt((1.0 + cb)*(1.0 - cb));
1729 
1730  const double v = 0.5 * (d + D) * (d - D) / (d - D*cb);
1731  const double u = d - v;
1732 
1733  if (u <= 0) { continue; }
1734  if (v <= 0) { continue; }
1735 
1736  const double cts = (D*cb - v) / u; // cosine scattering angle
1737 
1738  const double V = exp(-d*getInverseAttenuationLength(l_abs, ls, cts));
1739 
1740  if (cts < 0.0 && v * sqrt((1.0 + cts) * (1.0 - cts)) < MODULE_RADIUS_M) { continue; }
1741 
1742  const double W = std::min(A/(v*v), 2.0*PI); // solid angle
1743  const double Ja = getScatteringProbability(cts); // d^2P/dcos/dphi
1744  const double Jd = ng * (1.0 - cts) / C; // dt/du
1745 
1746  const double dp = PI / phd.size();
1747  const double dom = dcb*dp * v*v / (u*u); // dOmega
1748 
1749  for (const_iterator l = phd.begin(); l != phd.end(); ++l) {
1750 
1751  const double cp = l->getX();
1752  const double dot = cb*ct + sb*cp*st;
1753 
1754  const double U = 2 * getAngularAcceptance(dot); // PMT angular acceptance
1755 
1756  value += npe * geanc() * dom * U * V * W * Ja * Jb * Jc / fabs(Jd);
1757  }
1758  }
1759  }
1760 
1761  return value;
1762  }
data_type w[N+1][M+1]
Definition: JPolint.hh:708
do echo Generating $dir eval D
Definition: JDrawLED.sh:50
double getIndexOfRefraction()
Get average index of refraction of water.
Definition: JConstants.hh:111
double geanc()
Equivalent muon track length per unit shower energy.
Definition: JGeane.hh:31
static const double PI
Constants.
Definition: JConstants.hh:20
virtual double getDispersionGroup(const double lambda) const =0
Dispersion of light for group velocity.
std::vector< element_type > phd
fast evaluation of phi integral
Definition: JPDF.hh:2173
static double MODULE_RADIUS_M
Radius of optical module [m].
Definition: JPDF.hh:42
virtual double getScatteringLength(const double lambda) const =0
Scattering length.
then print_variable DETECTOR INPUT_FILE INTERMEDIATE_FILE check_input_file $DETECTOR $INPUT_FILE check_output_file $INTERMEDIATE_FILE $OUTPUT_FILE JMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JPath.sh:52
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:2065
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:2126
const double wmax
maximal wavelength for integration [nm]
Definition: JPDF.hh:2171
double cherenkov(const double lambda, const double n)
Number of Cherenkov photons per unit track length and per unit wavelength.
Definition: JPDFToolkit.hh:58
virtual double getIndexOfRefractionGroup(const double lambda) const
Index of refraction for group velocity.
alias put_queue eval echo n
Definition: qlib.csh:19
virtual double getInverseAttenuationLength(const double l_abs, const double ls, const double cts) const
Get the inverse of the attenuation length.
Definition: JPDF.hh:2137
const double wmin
Integration limits.
Definition: JPDF.hh:2170
virtual double getAngularAcceptance(const double ct) const =0
Angular acceptence of PMT.
container_type::const_iterator const_iterator
Definition: JCollection.hh:90
virtual double getQE(const double lambda) const =0
Quantum efficiency of PMT (incl.
data_type v[N+1][M+1]
Definition: JPolint.hh:707
double u[N+1]
Definition: JPolint.hh:706
static const double C
Speed of light in vacuum [m/ns].
Definition: JConstants.hh:22
source $JPP_DIR setenv csh $JPP_DIR eval JShellParser o a A
virtual double getScatteringProbability(const double ct) const =0
Model specific function to describe light scattering in water (integral over full solid angle normali...
then set_variable FORMULA *[0] exp(-0.5 *(x-[1])*(x-[1])/([2]*[2]))" set_variable OUTPUT_FILE histogram.root JHistogram1D -o $WORKDIR/$OUTPUT_FILE -F "$FORMULA" -
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 1776 of file JPDF.hh.

1782  {
1783  switch (type) {
1784 
1786  return getDirectLightFromMuon (R_m, theta, phi, t_ns);
1787 
1789  return getScatteredLightFromMuon (R_m, theta, phi, t_ns);
1790 
1792  return getDirectLightFromEMshowers (R_m, theta, phi, t_ns) * E_GeV;
1793 
1795  return getScatteredLightFromEMshowers(R_m, theta, phi, t_ns) * E_GeV;
1796 
1798  return getDirectLightFromDeltaRays (R_m, theta, phi, t_ns) * getDeltaRaysFromMuon(E_GeV);
1799 
1801  return getScatteredLightFromDeltaRays(R_m, theta, phi, t_ns) * getDeltaRaysFromMuon(E_GeV);
1802 
1803  default:
1804  return 0.0;
1805  }
1806  }
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:359
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:740
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:502
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:1397
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:77
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:1485
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:650
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 1819 of file JPDF.hh.

1824  {
1825  return (getDirectLightFromMuon (R_m, theta, phi, t_ns) +
1826  getScatteredLightFromMuon (R_m, theta, phi, t_ns) +
1827  getDirectLightFromEMshowers (R_m, theta, phi, t_ns) * E_GeV +
1828  getScatteredLightFromEMshowers(R_m, theta, phi, t_ns) * E_GeV +
1829  getDirectLightFromDeltaRays (R_m, theta, phi, t_ns) * getDeltaRaysFromMuon(E_GeV) +
1830  getScatteredLightFromDeltaRays(R_m, theta, phi, t_ns) * getDeltaRaysFromMuon(E_GeV));
1831  }
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:359
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:740
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:502
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:1397
double getDeltaRaysFromMuon(const double E)
Equivalent EM-shower energy due to delta-rays per unit muon track length.
Definition: JPDFToolkit.hh:77
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:1485
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:650
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 1845 of file JPDF.hh.

1851  {
1852  switch (type) {
1853 
1855  return getDirectLightFromEMshower (D_m, cd, theta, phi, t_ns);
1856 
1858  return getScatteredLightFromEMshower(D_m, cd, theta, phi, t_ns);
1859 
1860  default:
1861  return 0.0;
1862  }
1863  }
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:1020
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:1078
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 1876 of file JPDF.hh.

1881  {
1882  return (getDirectLightFromEMshower (D_m, cd, theta, phi, t_ns) +
1883  getScatteredLightFromEMshower(D_m, cd, theta, phi, t_ns));
1884  }
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:1020
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:1078
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 1899 of file JPDF.hh.

1906  {
1907  switch (type) {
1908 
1910  return getDirectLightFromEMshower (E_GeV, D_m, cd, theta, phi, t_ns);
1911 
1913  return getScatteredLightFromEMshower(E_GeV, D_m, cd, theta, phi, t_ns);
1914 
1915  default:
1916  return 0.0;
1917  }
1918  }
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:1020
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:1078
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 1932 of file JPDF.hh.

1938  {
1939  return (getDirectLightFromEMshower (E_GeV, D_m, cd, theta, phi, t_ns) +
1940  getScatteredLightFromEMshower(E_GeV, D_m, cd, theta, phi, t_ns));
1941  }
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:1020
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:1078
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 1953 of file JPDF.hh.

1957  {
1958  switch (type) {
1959 
1961  return getDirectLightFromBrightPoint (D_m, ct, t_ns);
1962 
1964  return getScatteredLightFromBrightPoint(D_m, ct, t_ns);
1965 
1966  default:
1967  return 0.0;
1968  }
1969  }
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:1674
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:1628
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 1980 of file JPDF.hh.

1983  {
1984  return (getDirectLightFromBrightPoint (D_m, ct, t_ns) +
1985  getScatteredLightFromBrightPoint(D_m, ct, t_ns));
1986  }
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:1674
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:1628
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 2065 of file JPDF.hh.

2067  {
2068  //return getWavelength(n, 0.5*(wmin + wmax), eps);
2069 
2070  double vmin = wmin;
2071  double vmax = wmax;
2072 
2073  for (int i = 0; i != 1000; ++i) {
2074 
2075  const double v = 0.5 * (vmin + vmax);
2076  const double y = getIndexOfRefractionGroup(v);
2077 
2078  if (fabs(y - n) < eps) {
2079  return v;
2080  }
2081 
2082  if (y < n)
2083  vmax = v;
2084  else
2085  vmin = v;
2086  }
2087 
2088  return 0.5 * (vmin + vmax);
2089  }
const double wmax
maximal wavelength for integration [nm]
Definition: JPDF.hh:2171
virtual double getIndexOfRefractionGroup(const double lambda) const
Index of refraction for group velocity.
alias put_queue eval echo n
Definition: qlib.csh:19
const double wmin
Integration limits.
Definition: JPDF.hh:2170
data_type v[N+1][M+1]
Definition: JPolint.hh:707
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 2103 of file JPDF.hh.

2106  {
2107  double v = w;
2108 
2109  // determine wavelength by linear extrapolation
2110 
2111  for ( ; ; ) {
2112 
2113  const double y = getIndexOfRefractionGroup(v);
2114 
2115  if (fabs(y - n) < eps) {
2116  break;
2117  }
2118 
2119  v += (n - y) / getDispersionGroup(v);
2120  }
2121 
2122  return v;
2123  }
data_type w[N+1][M+1]
Definition: JPolint.hh:708
virtual double getDispersionGroup(const double lambda) const =0
Dispersion of light for group velocity.
virtual double getIndexOfRefractionGroup(const double lambda) const
Index of refraction for group velocity.
alias put_queue eval echo n
Definition: qlib.csh:19
data_type v[N+1][M+1]
Definition: JPolint.hh:707
static double JPHYSICS::JPDF::getRmin ( )
inlinestaticprotectedinherited

minimal distance of approach of muon to PMT [m]

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

2138  {
2140 
2141  if (f1.empty()) {
2142 
2143  const int nx = 100000;
2144  const double xmin = -1.0;
2145  const double xmax = +1.0;
2146 
2147  const double dx = (xmax - xmin) / (nx - 1);
2148 
2149  for (double x = xmin, W = 0.0; x < xmax; x += dx) {
2150 
2151  f1[x] = W;
2152 
2153  W += 2*PI * dx * getScatteringProbability(x + 0.5*dx);
2154  }
2155 
2156  f1[xmin] = 0.0;
2157  f1[xmax] = 1.0;
2158 
2159  f1.compile();
2160  }
2161 
2162  return 1.0/l_abs + f1(cts)/ls;
2163  }
static const double PI
Constants.
Definition: JConstants.hh:20
Type definition of a 1st degree polynomial interpolation based on a JGridCollection with result type ...
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 ( )
inlinevirtualinherited

Clear.

Implements JTOOLS::JMappableCollection< JKey_t, JValue_t >.

Definition at line 149 of file JCollection.hh.

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

Get ordinate value.

Parameters
xabscissa value
Returns
ordinate value

Definition at line 161 of file JCollection.hh.

162  {
163  const_iterator i = this->lower_bound(x);
164 
165  if (i == this->end() || this->getDistance(x, i->getX()) > distance_type::precision) {
166  THROW(JValueOutOfRange, "Invalid abscissa value " << x);
167  }
168 
169  return i->getY();
170  }
JDistance< typename JElement2D_t::abscissa_type > getDistance
Function object for distance evaluation.
Definition: JCollection.hh:773
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Definition: JException.hh:670
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:293
container_type::const_iterator const_iterator
Definition: JCollection.hh:90
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)
inlinevirtualinherited

Get ordinate value.

Parameters
xabscissa value
Returns
ordinate value

Definition at line 179 of file JCollection.hh.

180  {
181  iterator i = this->lower_bound(x);
182 
183  if (i == this->end() || this->getDistance(x, i->getX()) > distance_type::precision) {
184  i = container_type::insert(i, value_type(x, ordinate_type()));
185  }
186 
187  return i->getY();
188  }
JDistance< typename JElement2D_t::abscissa_type > getDistance
Function object for distance evaluation.
Definition: JCollection.hh:773
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:293
container_type::iterator iterator
Definition: JCollection.hh:92
JElement2D_t::ordinate_type ordinate_type
Definition: JCollection.hh:82
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
inlinevirtualinherited

Get number of elements.

Returns
number of elements

Implements JTOOLS::JAbstractCollection< JAbscissa_t >.

Definition at line 196 of file JCollection.hh.

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

Get abscissa value.

Parameters
indexindex
Returns
abscissa value

Implements JTOOLS::JAbstractCollection< JAbscissa_t >.

Definition at line 208 of file JCollection.hh.

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

Get minimal abscissa value.

Returns
abscissa value

Implements JTOOLS::JAbstractCollection< JAbscissa_t >.

Definition at line 219 of file JCollection.hh.

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

Get maximal abscissa value.

Returns
abscissa value

Implements JTOOLS::JAbstractCollection< JAbscissa_t >.

Definition at line 230 of file JCollection.hh.

231  {
232  return this->rbegin()->getX();
233  }
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 243 of file JCollection.hh.

244  {
245  return this->at(index).getY();
246  }
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 255 of file JCollection.hh.

256  {
257  return this->at(index).getY();
258  }
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 266 of file JCollection.hh.

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

Sort elements.

Definition at line 281 of file JCollection.hh.

282  {
283  std::sort(this->begin(), this->end(), compare);
284  }
JComparator compare
Function object for comparison.
Definition: JCollection.hh:780
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 293 of file JCollection.hh.

294  {
295  return std::lower_bound(this->begin(), this->end(), x, compare);
296  }
JComparator compare
Function object for comparison.
Definition: JCollection.hh:780
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 305 of file JCollection.hh.

306  {
307  return std::lower_bound(this->begin(), this->end(), x, compare);
308  }
JComparator compare
Function object for comparison.
Definition: JCollection.hh:780
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 317 of file JCollection.hh.

318  {
319  iterator i = this->lower_bound(element.getX());
320 
321  if (i == this->end() || this->getDistance(element.getX(), i->getX()) > 0.0)
322  return pair_type(container_type::insert(i, element), true);
323  else
324  return pair_type(this->end(), false);
325  }
std::pair< const_iterator, bool > pair_type
Definition: JCollection.hh:96
JDistance< typename JElement2D_t::abscissa_type > getDistance
Function object for distance evaluation.
Definition: JCollection.hh:773
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:293
container_type::iterator iterator
Definition: JCollection.hh:92
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 333 of file JCollection.hh.

334  {
335  configure(bounds, JMATH::getZero<ordinate_type>());
336  }
void configure(const JAbstractCollection< abscissa_type > &bounds)
Configure collection.
Definition: JCollection.hh:333
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 345 of file JCollection.hh.

347  {
348  this->resize(bounds.getSize());
349 
350  for (iterator i = this->begin(); i != this->end(); ++i) {
351 
352  const abscissa_type x = bounds.getX(std::distance(this->begin(),i));
353 
354  *i = value_type(x,value);
355  }
356  }
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:788
JElement2D_t::abscissa_type abscissa_type
Definition: JCollection.hh:81
container_type::iterator iterator
Definition: JCollection.hh:92
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 366 of file JCollection.hh.

368  {
369  using namespace JLANG;
370 
371  collection_type* out = (is_identical(*this, function) ? new collection_type() : this);
372 
373  for (int i = 0; i != bounds.getSize(); ++i) {
374 
375  const abscissa_type x = bounds.getX(i);
376 
377  out->put(x, function(x));
378  }
379 
380  if (is_identical(*this, function)) {
381 
382  this->swap(*out);
383 
384  delete out;
385  }
386  }
JCollection< JElement2D_t, JDistance< typename JElement2D_t::abscissa_type > > collection_type
Definition: JCollection.hh:86
JElement2D_t::abscissa_type abscissa_type
Definition: JCollection.hh:81
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 395 of file JCollection.hh.

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

Negate collection.

Returns
this collection

Definition at line 437 of file JCollection.hh.

438  {
439  for (iterator i = this->begin(); i != this->end(); ++i) {
440  i->getY() = -i->getY();
441  }
442 
443  return *this;
444  }
container_type::iterator iterator
Definition: JCollection.hh:92
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 453 of file JCollection.hh.

454  {
455  if (!collection.empty()) {
456 
457  if (this->empty()) {
458 
459  for (const_iterator i = collection.begin(); i != collection.end(); ++i) {
460  this->put(i->getX(), +i->getY());
461  }
462 
463  } else if (this->is_compatible(collection)) {
464 
465  const double precision = JDistance<abscissa_type>::precision;
466 
467  iterator p = this->begin();
468  const_iterator q = collection.begin();
469 
470  if (getDistance(p->getX(), q->getX()) > precision) {
471 
472  do {
473  ++p;
474  } while (p != this->end() && getDistance(p->getX(), q->getX()) > precision);
475 
476  } else if (getDistance(q->getX(), p->getX()) > precision) {
477 
478  do {
479  ++q;
480  } while (q != collection.end() && getDistance(q->getX(), p->getX()) > precision);
481  }
482 
483  const_iterator i = q;
484 
485  for ( ; p != this->end() && i != collection.end(); ++p, ++i) {
486  p->getY() += i->getY();
487  }
488 
489  for ( ; i != collection.end(); ++i) {
490  this->put(i->getX(), +i->getY());
491  }
492 
493  for (i = collection.begin(); i != q; ++i) {
494  this->put(i->getX(), +i->getY());
495  }
496  }
497  }
498 
499  return *this;
500  }
Template class for distance evaluation.
Definition: JDistance.hh:24
JDistance< typename JElement2D_t::abscissa_type > getDistance
Function object for distance evaluation.
Definition: JCollection.hh:773
bool is_compatible(const JCollection &collection) const
Test whether collections are compatible.
Definition: JCollection.hh:395
container_type::iterator iterator
Definition: JCollection.hh:92
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:90
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 601 of file JCollection.hh.

602  {
603  for (iterator i = this->begin(); i != this->end(); ++i) {
604  i->getY() += value;
605  }
606 
607  return *this;
608  }
container_type::iterator iterator
Definition: JCollection.hh:92
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 634 of file JCollection.hh.

635  {
636  for (iterator i = this->begin(); i != this->end(); ++i) {
637  i->getY() += function(i->getX());
638  }
639 
640  return *this;
641  }
container_type::iterator iterator
Definition: JCollection.hh:92
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 509 of file JCollection.hh.

510  {
511  if (!collection.empty()) {
512 
513  if (this->empty()) {
514 
515  for (const_iterator i = collection.begin(); i != collection.end(); ++i) {
516  this->put(i->getX(), -i->getY());
517  }
518 
519  } else if (this->is_compatible(collection)) {
520 
521  const double precision = JDistance<abscissa_type>::precision;
522 
523  iterator p = this->begin();
524  const_iterator q = collection.begin();
525 
526  if (getDistance(p->getX(), q->getX()) > precision) {
527 
528  do {
529  ++p;
530  } while (p != this->end() && getDistance(p->getX(), q->getX()) > precision);
531 
532  } else if (getDistance(q->getX(), p->getX()) > precision) {
533 
534  do {
535  ++q;
536  } while (q != collection.end() && getDistance(q->getX(), p->getX()) > precision);
537  }
538 
539  const_iterator i = q;
540 
541  for ( ; p != this->end() && i != collection.end(); ++p, ++i) {
542  p->getY() -= i->getY();
543  }
544 
545  for ( ; i != collection.end(); ++i) {
546  this->put(i->getX(), -i->getY());
547  }
548 
549  for (i = collection.begin(); i != q; ++i) {
550  this->put(i->getX(), -i->getY());
551  }
552 
553  } else {
554 
555  throw JException("JCollection::add() collections incompatible.");
556  }
557  }
558 
559  return *this;
560  }
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:773
bool is_compatible(const JCollection &collection) const
Test whether collections are compatible.
Definition: JCollection.hh:395
container_type::iterator iterator
Definition: JCollection.hh:92
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:90
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 617 of file JCollection.hh.

618  {
619  for (iterator i = this->begin(); i != this->end(); ++i) {
620  i->getY() -= value;
621  }
622 
623  return *this;
624  }
container_type::iterator iterator
Definition: JCollection.hh:92
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 651 of file JCollection.hh.

652  {
653  for (iterator i = this->begin(); i != this->end(); ++i) {
654  i->getY() -= function(i->getX());
655  }
656 
657  return *this;
658  }
container_type::iterator iterator
Definition: JCollection.hh:92
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 569 of file JCollection.hh.

570  {
571  for (iterator i = this->begin(); i != this->end(); ++i) {
572  i->getY() *= value;
573  }
574 
575  return *this;
576  }
container_type::iterator iterator
Definition: JCollection.hh:92
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 273 of file JMath.hh.

274  {
275  return static_cast<JFirst_t&>(*this) = JCalculator<JFirst_t>::calculator.mul(static_cast<const JFirst_t&>(*this), object);
276  }
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 585 of file JCollection.hh.

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

Get comparator.

Returns
comparator

Definition at line 764 of file JCollection.hh.

765  {
766  return compare;
767  }
JComparator compare
Function object for comparison.
Definition: JCollection.hh:780
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 788 of file JCollection.hh.

789  {
790  container_type::resize(size);
791  }
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  }
virtual double getIndexOfRefractionPhase(const double lambda) const =0
Index of refraction for phase velocity.
alias put_queue eval echo n
Definition: qlib.csh:19
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  }
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.
alias put_queue eval echo n
Definition: qlib.csh:19
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
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
alias put_queue eval echo n
Definition: qlib.csh:19
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 2170 of file JPDF.hh.

const double JPHYSICS::JPDF::wmax
protectedinherited

maximal wavelength for integration [nm]

Definition at line 2171 of file JPDF.hh.

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

fast evaluation of phi integral

Definition at line 2173 of file JPDF.hh.

Function object for distance evaluation.

Definition at line 773 of file JCollection.hh.

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

Function object for comparison.

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