Jpp - the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JDispersion.hh
Go to the documentation of this file.
1 #ifndef __JPHYSICS__JDISPERSION__
2 #define __JPHYSICS__JDISPERSION__
3 
5 
6 
7 /**
8  * \author mdejong
9  */
10 
11 namespace JPHYSICS {}
12 namespace JPP { using namespace JPHYSICS; }
13 
14 namespace JPHYSICS {
15 
16  /**
17  * Implementation of dispersion for water in deep sea.
18  * This class implements the JDispersionInterface interface.
19  *
20  * Light dispersion data are taken from reference:
21  * David J.L. Bailey,
22  * "Monte Carlo tools and analysis methods for understanding the ANTARES experiment and
23  * predicting its sensitivity to Dark Matter",
24  * PhD thesis, University of Oxford, United Kingdom, 2002.
25  */
26  class JDispersion :
27  public virtual JDispersionInterface
28  {
29  public:
30  /**
31  * Constructor.
32  *
33  * \param P_atm ambient pressure [atm]
34  */
35  JDispersion(const double P_atm) :
36  P (P_atm), // ambient pressure [atm]
37  a0( 1.3201), // offset
38  a1( 1.4e-5), // dn/dP
39  a2( 16.2566), // d^1n/(dx)^1
40  a3(-4383.0), // d^2n/(dx)^2
41  a4( 1.1455e6) // d^3n/(dx)^3
42  {}
43 
44 
45  /**
46  * Index of refraction (phase velocity).
47  *
48  * \param lambda wavelenth [nm]
49  * \return index of refraction
50  */
51  virtual double getIndexOfRefractionPhase(const double lambda) const
52  {
53  const double x = 1.0 / lambda;
54 
55  return a0 + a1*P + x*(a2 + x*(a3 + x*a4));
56  }
57 
58 
59  /**
60  * Dispersion of light for phase velocity.
61  *
62  * \param lambda wavelength of light [nm]
63  * \return dn/dlambda
64  */
65  virtual double getDispersionPhase(const double lambda) const
66  {
67  const double x = 1.0 / lambda;
68 
69  return -x*x*(a2 + x*(2.0*a3 + x*3.0*a4));
70  }
71 
72 
73  /**
74  * Dispersion of light for group velocity.
75  *
76  * \param lambda wavelength of light [nm]
77  * \return dn/dlambda
78  */
79  virtual double getDispersionGroup(const double lambda) const
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  }
90 
91 
92  /**
93  * Dispersion parameters (x = 1/lambda)
94  */
95  const double P; //!< ambient pressure [atm]
96  const double a0; //!< offset
97  const double a1; //!< dn/dP
98  const double a2; //!< d^1n/(dx)^1
99  const double a3; //!< d^2n/(dx)^2
100  const double a4; //!< d^3n/(dx)^3
101  };
102 }
103 
104 #endif
const double a4
d^3n/(dx)^3
Definition: JDispersion.hh:100
Implementation of dispersion for water in deep sea.
Definition: JDispersion.hh:26
const double a1
dn/dP
Definition: JDispersion.hh:97
virtual double getIndexOfRefractionPhase(const double lambda) const
Index of refraction (phase velocity).
Definition: JDispersion.hh:51
const double P
Dispersion parameters (x = 1/lambda)
Definition: JDispersion.hh:95
virtual double getDispersionGroup(const double lambda) const
Dispersion of light for group velocity.
Definition: JDispersion.hh:79
JDispersion(const double P_atm)
Constructor.
Definition: JDispersion.hh:35
const double a0
offset
Definition: JDispersion.hh:96
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
Light dispersion inteface.