#ifndef __JPHYSICS_JIONIZATION__ #define __JPHYSICS_JIONIZATION__ #include "JLang/JException.hh" /** * \author vcarretero */ namespace JPHYSICS {} namespace JPP { using namespace JPHYSICS; } namespace JPHYSICS { using JLANG::JValueOutOfRange; /** * Struct for the Sternheimer coefficients.\n * Reference: R.M. Sternheimer, M.J. Berger, S.M. Seltzer. Density effect for the ionization loss of charged particles in various substances, Atomic Data and Nuclear Data Tables, Volume 30, Issue 2, 1984, Pages 261-271,ISSN 0092-640X, https://doi.org/10.1016/0092-640X(84)90002-0. */ struct JSter { double I; //!< Ionization potentian [GeV] double X0; //!< Correction density parameter double X1; //!< Correction density parameter double a; //!< Correction density parameter double m; //!< Correction density parameter double C; //!< Correction density parameter }; /** * Auxiliary data structure Ster coefficients as a function of proton number. */ struct JSterCoefficient : public std::map { /** * Default constructor. */ JSterCoefficient() { (*this)[ 1] = { 21.8e-9, 0.4400, 1.8856, 0.1348, 5.6249, -3.0977}; // H (*this)[ 8] = { 95.0e-9, 0.2868, 2.0000, 0.5223, 3.0000, -3.9471}; // O (*this)[11] = { 149.0e-9, 0.2880, 3.1962, 0.0777, 3.6452, -5.0526}; // Na (*this)[17] = { 174.0e-9, 0.2000, 3.0000, 0.1802, 3.0000, -4.8776}; // Cl (*this)[ 6] = { 78.0e-9,-0.0090, 2.4817, 0.2076, 2.9532, -2.8926}; // C (*this)[12] = { 156.0e-9, 0.1499, 3.0668, 0.0816, 3.6166, -4.5297}; // Mg (*this)[19] = { 190.0e-9, 0.3851, 3.1724, 0.1983, 2.9233, -5.6423}; // K (*this)[16] = { 180.0e-9, 0.1580, 2.7159, 0.3399, 2.6456, -4.6659}; // S (*this)[14] = { 173.0e-9, 0.2015, 2.8716, 0.1492, 3.2546, -4.4355}; // Si (*this)[13] = { 166.0e-9, 0.1708, 3.0127, 0.0802, 3.6345, -4.2395}; // Al (*this)[26] = { 286.0e-9,-0.0012, 3.1531, 0.1468, 2.9632, -4.2911}; // Fe (*this)[22] = { 233.0e-9, 0.0957, 3.0386, 0.1566, 3.0302, -4.4450}; // Ti (*this)[20] = { 191.0e-9, 0.3228, 3.1191, 0.1564, 3.0745, -5.0396}; // Ca (*this)[35] = { 357.0e-9, 0.3669, 3.0000, 0.2211, 3.0000, -5.7268}; // Br } /** * Get Ster coefficients for given proton number. * * \param Z proton number * \return Ster coefficients */ const JSter& operator()(const int Z) const { const_iterator i = this->find(Z); if (i != this->end()) return i->second; else THROW(JValueOutOfRange, "Invalid proton number " << Z); } }; /** * Function object for Ster coefficients. */ static JSterCoefficient getSterCoefficient; } #endif