#ifndef __JCONSTANTS__ #define __JCONSTANTS__ #include namespace JTOOLS { /** * Constants. */ static const double INDEX_OF_REFRACTION_WATER = 1.3800851282; //!< average index of refraction of water // derived quantities static const double TAN_THETA_C_WATER = sqrt((INDEX_OF_REFRACTION_WATER - 1.0) * (INDEX_OF_REFRACTION_WATER + 1.0)); static const double COS_THETA_C_WATER = 1.0 / INDEX_OF_REFRACTION_WATER; static const double SIN_THETA_C_WATER = TAN_THETA_C_WATER * COS_THETA_C_WATER; static const double PI = 3.1415927; //!< pi static const double EULER = 0.577215664901533; //!< Euler number static const double C = 0.299792458; //!< Speed of light in vacuum [m/ns] static const double C_INVERSE = 1.0/C; //!< Inverse speed of light in vacuum [ns/m] static const double AVOGADRO = 6.0221415e23; //!< Avogadro's number [gr^-1] static const double H = 4.13566733e-15; //!< Planck constant [eV s] static const double HBAR = H/(2*PI); //!< Planck constant [eV s] static const double HBARC = HBAR*C*1.0e9; //!< Planck constant [eV m] static const double ALPHA_ELECTRO_MAGNETIC = 1.0/137.036; //!< Electro-Magnetic coupling constant static const double DENSITY_SEA_WATER = 1.027; //!< Density of sea water [g/cm^3] static const double DENSITY_ROCK = 2.65; //!< Density of rock [g/cm^3] static const double SALINITY_SEA_WATER = 0.035; //!< Salinity of sea water static const double MASS_ELECTRON = 0.511e-3; //!< electron mass [GeV] static const double MASS_MUON = 0.10566; //!< muon mass [GeV] static const double MASS_PROTON = 0.938; //!< proton mass [GeV] /** * Get speed of light. * * return speed of light [m/ns] */ inline const double getSpeedOfLight() { return C; } /** * Get inverse speed of light. * * return inverse speed of light [ns/m] */ inline const double getInverseSpeedOfLight() { return C_INVERSE; } /** * Average index of refraction of water. * * \return index of refraction */ inline double getIndexOfRefraction() { return INDEX_OF_REFRACTION_WATER; } /** * Average tangent of Cherenkov angle of water * * \return tan(theta_C) */ inline double getTanThetaC() { return TAN_THETA_C_WATER; } /** * Average cosine of Cherenkov angle of water * * \return cos(theta_C) */ inline double getCosThetaC() { return COS_THETA_C_WATER; } /** * Average sine of Cherenkov angle of water * * \return sin(theta_C) */ inline double getSinThetaC() { return SIN_THETA_C_WATER; } } #endif