Jpp  18.4.0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JIonization.hh
Go to the documentation of this file.
1 #ifndef __JPHYSICS_JIONIZATION__
2 #define __JPHYSICS_JIONIZATION__
3 
4 #include "JLang/JException.hh"
5 
6 /**
7  * \author vcarretero
8  */
9 
10 namespace JPHYSICS {}
11 namespace JPP { using namespace JPHYSICS; }
12 
13 namespace JPHYSICS {
14 
16 
17  /**
18  * Struct for the Sternheimer coefficients.\n
19  * 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.
20  */
21  struct JSter {
22  double I; //!< Ionization potentian [GeV]
23  double X0; //!< Correction density parameter
24  double X1; //!< Correction density parameter
25  double a; //!< Correction density parameter
26  double m; //!< Correction density parameter
27  double C; //!< Correction density parameter
28  };
29 
30 
31  /**
32  * Auxiliary data structure Ster coefficients as a function of proton number.
33  */
34  struct JSterCoefficient :
35  public std::map<int, JSter>
36  {
37  /**
38  * Default constructor.
39  */
41  {
42  (*this)[ 1] = { 21.8e-9, 0.4400, 1.8856, 0.1348, 5.6249, -3.0977}; // H
43  (*this)[ 8] = { 95.0e-9, 0.2868, 2.0000, 0.5223, 3.0000, -3.9471}; // O
44  (*this)[11] = { 149.0e-9, 0.2880, 3.1962, 0.0777, 3.6452, -5.0526}; // Na
45  (*this)[17] = { 174.0e-9, 0.2000, 3.0000, 0.1802, 3.0000, -4.8776}; // Cl
46  (*this)[ 6] = { 78.0e-9,-0.0090, 2.4817, 0.2076, 2.9532, -2.8926}; // C
47  (*this)[12] = { 156.0e-9, 0.1499, 3.0668, 0.0816, 3.6166, -4.5297}; // Mg
48  (*this)[19] = { 190.0e-9, 0.3851, 3.1724, 0.1983, 2.9233, -5.6423}; // K
49  (*this)[16] = { 180.0e-9, 0.1580, 2.7159, 0.3399, 2.6456, -4.6659}; // S
50  (*this)[14] = { 173.0e-9, 0.2015, 2.8716, 0.1492, 3.2546, -4.4355}; // Si
51  (*this)[13] = { 166.0e-9, 0.1708, 3.0127, 0.0802, 3.6345, -4.2395}; // Al
52  (*this)[26] = { 286.0e-9,-0.0012, 3.1531, 0.1468, 2.9632, -4.2911}; // Fe
53  (*this)[22] = { 233.0e-9, 0.0957, 3.0386, 0.1566, 3.0302, -4.4450}; // Ti
54  (*this)[20] = { 191.0e-9, 0.3228, 3.1191, 0.1564, 3.0745, -5.0396}; // Ca
55  (*this)[35] = { 357.0e-9, 0.3669, 3.0000, 0.2211, 3.0000, -5.7268}; // Br
56  }
57 
58 
59  /**
60  * Get Ster coefficients for given proton number.
61  *
62  * \param Z proton number
63  * \return Ster coefficients
64  */
65  const JSter& operator()(const int Z) const
66  {
67  const_iterator i = this->find(Z);
68 
69  if (i != this->end())
70  return i->second;
71  else
72  THROW(JValueOutOfRange, "Invalid proton number " << Z);
73  }
74  };
75 
76 
77  /**
78  * Function object for Ster coefficients.
79  */
81 }
82 
83 #endif
Exceptions.
double I
Ionization potentian [GeV].
Definition: JIonization.hh:22
Struct for the Sternheimer coefficients.
Definition: JIonization.hh:21
Auxiliary data structure Ster coefficients as a function of proton number.
Definition: JIonization.hh:34
double a
Correction density parameter.
Definition: JIonization.hh:25
double m
Correction density parameter.
Definition: JIonization.hh:26
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Definition: JException.hh:712
double X0
Correction density parameter.
Definition: JIonization.hh:23
const JSter & operator()(const int Z) const
Get Ster coefficients for given proton number.
Definition: JIonization.hh:65
JSterCoefficient()
Default constructor.
Definition: JIonization.hh:40
do set_variable MODULE getModule a $WORKDIR detector_a datx L $STRING JEditDetector a $WORKDIR detector_a datx M $MODULE setz o $WORKDIR detector_a datx JEditDetector a $WORKDIR detector_b datx M $MODULE setz o $WORKDIR detector_b datx done echo Output stored at $WORKDIR detector_a datx and $WORKDIR tripod_a txt JDrawDetector2D a $WORKDIR detector_a datx a $WORKDIR detector_b datx L BL o detector $FORMAT $BATCH JDrawDetector2D T $WORKDIR tripod_a txt T $WORKDIR tripod_b txt L BL o tripod $FORMAT $BATCH JCompareDetector a $WORKDIR detector_a datx b $WORKDIR detector_b datx o $WORKDIR abc root &dev null for KEY in X Y Z
Exception for accessing a value in a collection that is outside of its range.
Definition: JException.hh:178
double C
Correction density parameter.
Definition: JIonization.hh:27
double X1
Correction density parameter.
Definition: JIonization.hh:24
static JSterCoefficient getSterCoefficient
Function object for Ster coefficients.
Definition: JIonization.hh:80