Jpp  16.0.0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JPhysicsToolkit.hh
Go to the documentation of this file.
1 #ifndef __JPHYSICS_JPHYSICSTOOLKIT__
2 #define __JPHYSICS_JPHYSICSTOOLKIT__
3 
4 #include "JPhysics/JConstants.hh"
5 
6 
7 /**
8  * \author mdejong
9  */
10 
11 namespace JPHYSICS {}
12 namespace JPP { using namespace JPHYSICS; }
13 
14 /**
15  * Auxiliary classes and methods for calculation of PDF and muon energy loss.
16  */
17 namespace JPHYSICS {
18 
19  /**
20  * Get multiple Coulomb scattering angle.
21  *
22  * The formula is taken from reference:
23  * Particle Data Book, formula 27.14.
24  *
25  * \param E Energy [GeV]
26  * \param x distance [m]
27  * \param X0 radiation length [m]
28  * \param M mass [GeV]
29  * \param Q charge [unit]
30  * \return angle [rad]
31  */
32  inline double getThetaMCS(const double E,
33  const double x,
34  const double X0,
35  const double M,
36  const double Q)
37  {
38  using JTOOLS::THETA_MCS;
39 
40  if (E > M) {
41 
42  const double p = sqrt((E + M) * (E - M));
43  const double beta = p / E;
44 
45  return THETA_MCS * Q * sqrt(x/X0) * (1.0 + 0.038*log(x/X0)) / (beta*p);
46  }
47 
48  return 0.0;
49  }
50 
51 
52  /**
53  * Get multiple Coulomb scattering angle.
54  *
55  * \param E Energy [GeV]
56  * \param x distance [m]
57  * \return angle [rad]
58  */
59  inline double getThetaMCS(const double E, const double x)
60  {
61  using namespace JTOOLS;
62 
63  return getThetaMCS(E, x, X0_WATER_M, MASS_MUON, 1.0);
64  }
65 }
66 
67 #endif
Q(UTCMax_s-UTCMin_s)-livetime_s
do $JPP JMEstimator M
Definition: JMEstimator.sh:37
then usage E
Definition: JMuonPostfit.sh:35
static const double MASS_MUON
muon mass [GeV]
double getThetaMCS(const double E, const double x, const double X0, const double M, const double Q)
Get multiple Coulomb scattering angle.
Physics constants.
static const double THETA_MCS
Multiple Coulomb scattering constant [GeV].
static const double X0_WATER_M
Radiation length pure water [m].