Jpp  15.0.4
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JPDFToolkit.hh
Go to the documentation of this file.
1 #ifndef __JPHYSICS__JPDFTOOLKIT__
2 #define __JPHYSICS__JPDFTOOLKIT__
3 
4 #include <cmath>
5 
6 #include "JPhysics/JConstants.hh"
7 
8 
9 /**
10  * \file
11  * Auxiliary methods for PDF calculations.
12  * \author mdejong
13  */
14 
15 namespace JPHYSICS {}
16 namespace JPP { using namespace JPHYSICS; }
17 
18 namespace JPHYSICS {
19 
20 
21  /**
22  * Get minimal wavelength for PDF evaluations.
23  *
24  * \return wavelength of light [nm]
25  */
26  inline double getMinimalWavelength()
27  {
28  return 300.0;
29  }
30 
31 
32  /**
33  * Get maximal wavelength for PDF evaluations.
34  *
35  * \return wavelength of light [nm]
36  */
37  inline double getMaximalWavelength()
38  {
39  return 700.0;
40  }
41 
42 
43  /**
44  * Number of Cherenkov photons per unit track length and per unit wavelength.
45  *
46  * \param lambda wavelength of light [nm]
47  * \param n index of refraction
48  * \return number of photons per unit track length and per unit wavelength [m^-1 nm^-1]
49  */
50  inline double cherenkov(const double lambda,
51  const double n)
52  {
53  const double x = n*lambda;
54 
55  return 1.0e9 * 2 * PI * ALPHA_ELECTRO_MAGNETIC * (n*n - 1.0) / (x*x);
56  }
57 
58 
59  /**
60  * Equivalent EM-shower energy due to delta-rays per unit muon track length.
61  *
62  * Internal parameters are obtained with application [script] JDeltaRays[.sh].
63  *
64  * \param E muon energy [GeV]
65  * \return equivalent energy loss [GeV/m]
66  */
67  inline double getDeltaRaysFromMuon(const double E)
68  {
69  static const double a = 3.186e-01;
70  static const double b = 3.384e-01;
71  static const double c = -2.759e-02;
72  static const double d = 1.630e-03;
73  static const double Emin = 0.13078; // [GeV]
74 
75  if (E > Emin) {
76 
77  const double x = log10(E); //
78  const double y = a + x*(b + x*(c + x*(d))); // [MeV g^-1 cm^2]
79 
80  return y * DENSITY_SEA_WATER * 1.0e-1; // [GeV/m]
81  }
82 
83  return 0.0;
84  }
85 
86 
87  /**
88  * Equivalent EM-shower energy due to delta-rays per unit tau track length.
89  *
90  * Internal parameters are obtained with application [script] JDeltaRays[.sh].
91  *
92  * \param E tau energy [GeV]
93  * \return equivalent energy loss [GeV/m]
94  */
95  inline double getDeltaRaysFromTau(const double E)
96  {
97  static const double a = -2.374e-01;
98  static const double b = 5.143e-01;
99  static const double c = -4.213e-02;
100  static const double d = 1.804e-03;
101  static const double Emin = 2.19500; // [GeV]
102 
103  if (E > Emin) {
104 
105  const double x = log10(E); //
106  const double y = a + x*(b + x*(c + x*(d))); // [MeV g^-1 cm^2]
107 
108  return y * DENSITY_SEA_WATER * 1.0e-1; // [GeV/m]
109  }
110 
111  return 0.0;
112  }
113 
114 
115  /**
116  * Rayleigh cross section.
117  *
118  * \param n index of refraction
119  * \param lambda wavelength of light [nm]
120  * \return cross section [cm^2]
121  */
122  inline const double getRayleighCrossSection(const double n,
123  const double lambda)
124  {
125  static const double d = 0.36; // size of H2O molecule [nm]
126  static const double U = PI*PI*PI*PI*PI*2.0/3.0;
127  static const double V = d*d*d*d*d*d;
128 
129  const double W = (n*n - 1.0) / (n*n + 2.0);
130  const double sigma = 1.0e-14 * U*V*W*W / (lambda*lambda*lambda*lambda); // [cm^2]
131 
132  return sigma;
133  }
134 
135 
136  /**
137  * Rayleigh scattering length.
138  *
139  * \param n index of refraction
140  * \param lambda wavelength of light [nm]
141  * \return scattering length [m]
142  */
143  inline const double getRayleighScatteringLength(const double n,
144  const double lambda)
145  {
146  static const double amu = 18.01528; // H20 mass in Atomic mass units
147 
148  const double sigma = getRayleighCrossSection(n, lambda);
149  const double ls = 1.0e-2 / (DENSITY_SEA_WATER * AVOGADRO * sigma / amu); // [m]
150 
151  return ls;
152  }
153 }
154 
155 #endif
double getDeltaRaysFromTau(const double E)
Equivalent EM-shower energy due to delta-rays per unit tau track length.
Definition: JPDFToolkit.hh:95
static const double AVOGADRO
Avogadro&#39;s number [gr^-1].
static const double DENSITY_SEA_WATER
Fixed environment values.
double getMinimalWavelength()
Get minimal wavelength for PDF evaluations.
Definition: JPDFToolkit.hh:26
const double getRayleighScatteringLength(const double n, const double lambda)
Rayleigh scattering length.
Definition: JPDFToolkit.hh:143
then usage E
Definition: JMuonPostfit.sh:35
const double getRayleighCrossSection(const double n, const double lambda)
Rayleigh cross section.
Definition: JPDFToolkit.hh:122
const int n
Definition: JPolint.hh:660
double getMaximalWavelength()
Get maximal wavelength for PDF evaluations.
Definition: JPDFToolkit.hh:37
Physics constants.
static const double PI
Mathematical constants.
double cherenkov(const double lambda, const double n)
Number of Cherenkov photons per unit track length and per unit wavelength.
Definition: JPDFToolkit.hh:50
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JMuonPath.sh:47
then JCalibrateToT a
Definition: JTuneHV.sh:116
static const double ALPHA_ELECTRO_MAGNETIC
Electro-Magnetic coupling constant.
double getDeltaRaysFromMuon(const double E)
Equivalent EM-shower energy due to delta-rays per unit muon track length.
Definition: JPDFToolkit.hh:67