Jpp 20.0.0-rc.8
the software that should make you happy
Loading...
Searching...
No Matches
JSeaWater.hh
Go to the documentation of this file.
1#ifndef __JPHYSICS__SEAWATER__
2#define __JPHYSICS__SEAWATER__
3
4/**
5 * \author mdejong
6 */
7
8namespace JPHYSICS {}
9namespace JPP { using namespace JPHYSICS; }
10
11namespace JPHYSICS {
12
13 /**
14 * Sea water composition.
15 */
16 struct JSeaWater
17 {
18 struct atom_type {
19
20 constexpr double operator()() const { return f; }
21
22 const char* const ps; //!< short name
23 double Z; //!< electric charge
24 double A; //!< mass number
25 double f; //!< mass fraction
26 };
27
28#ifndef RADIATION
29 static constexpr atom_type H = { "H", 1.0, 1.0, 0.10870 };
30 static constexpr atom_type O = { "O", 8.0, 16.0, 0.85890 };
31 static constexpr atom_type Na = { "Na", 11.0, 23.0, 0.01180 };
32 static constexpr atom_type Cl = { "Cl", 17.0, 35.5, 0.02060 };
33#else
34 static constexpr atom_type H = { "H", 1.0, 1.0, 0.10790 };
35 static constexpr atom_type O = { "O", 8.0, 16.0, 0.85630 };
36 static constexpr atom_type Na = { "Na", 11.0, 23.0, 0.01160 };
37 static constexpr atom_type Mg = { "Mg", 12.0, 24.3, 0.00140 };
38 static constexpr atom_type S = { "S", 16.0, 32.0, 0.00100 };
39 static constexpr atom_type Cl = { "Cl", 17.0, 35.5, 0.02090 };
40 static constexpr atom_type K = { "K", 19.0, 39.0, 0.00045 };
41 static constexpr atom_type Ca = { "Ca", 20.0, 40.0, 0.00045 };
42#endif
43 };
44}
45
46#endif
static const uint32_t K[64]
Definition crypt.cc:77
Auxiliary methods for light properties of deep-sea water.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
constexpr double operator()() const
Definition JSeaWater.hh:20
double f
mass fraction
Definition JSeaWater.hh:25
const char *const ps
short name
Definition JSeaWater.hh:22
double Z
electric charge
Definition JSeaWater.hh:23
Sea water composition.
Definition JSeaWater.hh:17
static constexpr atom_type Cl
Definition JSeaWater.hh:32
static constexpr atom_type H
Definition JSeaWater.hh:29
static constexpr atom_type O
Definition JSeaWater.hh:30
static constexpr atom_type Na
Definition JSeaWater.hh:31