Jpp test-rotations-old-533-g2bdbdb559
the software that should make you happy
Loading...
Searching...
No Matches
JPDFToolkit.hh
Go to the documentation of this file.
1#ifndef __JPHYSICS__JPDFTOOLKIT__
2#define __JPHYSICS__JPDFTOOLKIT__
3
4#include <cmath>
5
9
10
11/**
12 * \file
13 * Auxiliary methods for PDF calculations.
14 * \author mdejong, bjung
15 */
16
17namespace JPHYSICS {}
18namespace JPP { using namespace JPHYSICS; }
19
20namespace JPHYSICS {
21
22 /**
23 * Get minimal wavelength for PDF evaluations.
24 *
25 * \return wavelength of light [nm]
26 */
27 inline double getMinimalWavelength()
28 {
29 return 300.0;
30 }
31
32
33 /**
34 * Get maximal wavelength for PDF evaluations.
35 *
36 * \return wavelength of light [nm]
37 */
38 inline double getMaximalWavelength()
39 {
40 return 700.0;
41 }
42
43
44 /**
45 * Number of Cherenkov photons per unit track length and per unit wavelength.
46 *
47 * \param lambda wavelength of light [nm]
48 * \param n index of refraction
49 * \return number of photons per unit track length and per unit wavelength [m^-1 nm^-1]
50 */
51 inline double cherenkov(const double lambda,
52 const double n)
53 {
54 const double x = n*lambda;
55
56 return 1.0e9 * 2 * PI * ALPHA_ELECTRO_MAGNETIC * (n*n - 1.0) / (x*x);
57 }
58
59
60 /**
61 * Rayleigh cross section.
62 *
63 * \param n index of refraction
64 * \param lambda wavelength of light [nm]
65 * \return cross section [cm^2]
66 */
67 inline const double getRayleighCrossSection(const double n,
68 const double lambda)
69 {
70 static const double d = 0.36; // size of H2O molecule [nm]
71 static const double U = PI*PI*PI*PI*PI*2.0/3.0;
72 static const double V = d*d*d*d*d*d;
73
74 const double W = (n*n - 1.0) / (n*n + 2.0);
75 const double sigma = 1.0e-14 * U*V*W*W / (lambda*lambda*lambda*lambda); // [cm^2]
76
77 return sigma;
78 }
79
80
81 /**
82 * Rayleigh scattering length.
83 *
84 * \param n index of refraction
85 * \param lambda wavelength of light [nm]
86 * \return scattering length [m]
87 */
88 inline const double getRayleighScatteringLength(const double n,
89 const double lambda)
90 {
91 static const double amu = 18.01528; // H20 mass in Atomic mass units
92
93 const double sigma = getRayleighCrossSection(n, lambda);
94 const double ls = 1.0e-2 / (DENSITY_SEA_WATER * AVOGADRO * sigma / amu); // [m]
95
96 return ls;
97 }
98}
99
100#endif
Auxiliary methods for physics calculations.
Physics constants.
Auxiliary methods for light properties of deep-sea water.
static const double ALPHA_ELECTRO_MAGNETIC
Electro-Magnetic coupling constant.
static const double DENSITY_SEA_WATER
Fixed environment values.
const double getRayleighScatteringLength(const double n, const double lambda)
Rayleigh scattering length.
const double getRayleighCrossSection(const double n, const double lambda)
Rayleigh cross section.
double cherenkov(const double lambda, const double n)
Number of Cherenkov photons per unit track length and per unit wavelength.
double getMinimalWavelength()
Get minimal wavelength for PDF evaluations.
static const double AVOGADRO
Avogadro's number.
double getMaximalWavelength()
Get maximal wavelength for PDF evaluations.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).