Jpp 19.3.0-rc.1
the software that should make you happy
Loading...
Searching...
No Matches
JDIS.hh
Go to the documentation of this file.
1#ifndef __JPHYSICS__JDIS__
2#define __JPHYSICS__JDIS__
3
4#include <cmath>
5
6#include <TRandom3.h>
7
9
10/**
11 * \file
12 * Deep-inelastic muon-nucleon scattering.
13 *
14 * \author mdejong
15 */
16
17namespace JPHYSICS {}
18namespace JPP { using namespace JPHYSICS; }
19
20namespace JPHYSICS {
21
22 /**
23 * Deep-inelastic muon-nucleon scattering.
24 *
25 * For cross section, see reference:\n
26 * D.A. Timashkov and A.A. Petrukhin, 29th International Cosmic Ray Conference Pune (2005) 9, 89-92.
27 *
28 * For kinematics, see reference:\n
29 * A. van Ginneken, Nucl.\ Instr.\ and Meth.\ A251 (1986) 21.
30 */
31 class JDIS {
32 public:
33 /**
34 * Default constructor.
35 */
37 {}
38
39
40 /**
41 * Get cross section.
42 *
43 * \param E muon energy [GeV]
44 * \return cross section [cm^2]
45 */
46 inline double getCrossSection(const double E) const
47 {
48 const double x = log10(E*1.0e+1);
49
50 if (E > JDIS_t::E0)
51 return 0.35e-30 * pow(1.0 - JDIS_t::E0/E, 2.0) * exp(-2.10/x) * pow(10.0, 0.125*x);
52 else
53 return 0.0;
54 }
55
56
57 /**
58 * Get probability of given energy fraction.
59 *
60 * \param E muon energy [GeV]
61 * \param v energy fraction
62 * \return probability
63 */
64 double getP(const double E, const double v) const
65 {
66 const JDIS_t dis(E);
67
68 return dis.getP(v);
69 }
70
71
72 /**
73 * Get shower energy.
74 *
75 * \param E muon energy [GeV]
76 * \return shower energy [GeV]
77 */
78 double getE(const double E) const
79 {
80 const JDIS_t dis(E);
81
82 return dis.getE();
83 }
84
85
86 /**
87 * Get RMS of scattering angle.
88 *
89 * \param E muon energy [GeV]
90 * \param v energy loss fraction
91 * \return angle [rad]
92 */
93 double getThetaRMS(const double E, const double v) const
94 {
95 const double u = 1.0 - v;
96
97 if (E*v > 0.135)
98 return (0.39 / (E*u)) * pow(sqrt(E)*u*v, 0.17) * (1.0 - 0.135/(E*v));
99 else
100 return 0.0;
101 }
102
103
104 /**
105 * Get breakpoint.
106 *
107 * \param E muon energy [GeV]
108 * \return energy fraction
109 */
110 double getV(const double E) const
111 {
112 return JDIS_t::E1/E;
113 }
114
115
116 /**
117 * Auxiliary helper class for kinematics of deep-inelastic muon-nucleon scattering at fixed muon energy.
118 */
119 class JDIS_t {
120 public:
121 /**
122 * Constructor.
123 *
124 * \param E muon energy [GeV]
125 */
126 JDIS_t(const double E) :
127 E (E),
128 E2(E - MASS_MUON)
129 {
130 k2 = pow(E1, p0 - p1) / pow(1.0 - E1/E, 2);
131
132 const double A = getA(E1/E, false) - getA(E0/E, false);
133 const double B = getB(E2/E, false) - getB(E1/E, false);
134
135 k1 = 1.0 / (A + k2 * B);
136 }
137
138
139 /**
140 * Get probability of given energy fraction.
141 *
142 * \param v energy fraction
143 * \return probability
144 */
145 double getP(const double v) const
146 {
147 const double x = E*v;
148 const double u = 1.0 - v;
149
150 if (x > E2)
151 return 0.0;
152 else if (x > E1)
153 return k1 * k2 * pow(x, p1) * u*u;
154 else if (x > E0)
155 return k1 * pow(x, p0);
156 else
157 return 0.0;
158 }
159
160
161 /**
162 * Get shower energy.
163 *
164 * \return shower energy [GeV]
165 */
166 double getE() const
167 {
168 const double A = getA(E1/E) - getA(E0/E);
169 const double B = getB(E2/E) - getB(E1/E);
170
171 for ( ; ; ) {
172
173 double y = gRandom->Rndm() * (A + B);
174
175 if (y <= A) {
176
177 y += getA(E0/E);
178 y /= k1 * pow(E,p0) / (p0 + 1);
179
180 const double v = pow(y, 1.0 / (p0 + 1));
181
182 return E * v;
183
184 } else {
185
186 y -= A;
187 y *= (getb(E2/E) - getb(E1/E)) / B;
188 y += getb(E1/E);
189 y /= k1 * k2 * pow(E,p1) / (p1 + 1);
190
191 const double v = pow(y, 1.0 / (p1 + 1));
192 const double u = 1.0 - v;
193
194 if (gRandom->Rndm() < u*u) {
195 return E * v;
196 }
197 }
198 }
199 }
200
201 const double E; //!< actual energy [GeV]
202 const double E2; //!< maximal energy [GeV]
203
204 static constexpr double E0 = 0.144; //!< minimal energy [GeV]
205 static constexpr double E1 = 0.35; //!< breakpoint [GeV]
206
207 static constexpr double p0 = 2.0; //!< spectral index upto breakpoint
208 static constexpr double p1 = -1.11; //!< spectral index from breakpoint
209
210 private:
211 /**
212 * Integral upto breakpoint.
213 *
214 * \param v energy fraction
215 * \param option option (if false, suppress normalisation constant)
216 * \return integral
217 */
218 double getA(const double v, const bool option = true) const
219 {
220 return (option ? k1 : 1.0) * pow(E, p0) * pow(v, p0 + 1) * (1.0 / (p0 + 1));
221 }
222
223
224 /**
225 * Integral from breakpoint.
226 *
227 * \param v energy fraction
228 * \param option option (if false, suppress normalisation constant)
229 * \return integral
230 */
231 double getB(const double v, const bool option = true) const
232 {
233 return (option ? k1 * k2 : 1.0) * pow(E, p1) * pow(v, p1 + 1) * (1.0 / (p1 + 1) -
234 2*v / (p1 + 2) +
235 v*v / (p1 + 3));
236 }
237
238
239 /**
240 * Integral from breakpoint without suppression factor.
241 *
242 * \param v energy fraction
243 * \return integral
244 */
245 double getb(const double v) const
246 {
247 return k1 * k2 * pow(E, p1) * pow(v, p1 + 1) / (p1 + 1);
248 }
249
250 double k1; //!< normalisation constant upto breakpoint
251 double k2; //!< normalisation constant from breakpoint
252 };
253 };
254}
255
256#endif
Physics constants.
Auxiliary helper class for kinematics of deep-inelastic muon-nucleon scattering at fixed muon energy.
Definition JDIS.hh:119
const double E2
maximal energy [GeV]
Definition JDIS.hh:202
double getA(const double v, const bool option=true) const
Integral upto breakpoint.
Definition JDIS.hh:218
double getP(const double v) const
Get probability of given energy fraction.
Definition JDIS.hh:145
static constexpr double E1
breakpoint [GeV]
Definition JDIS.hh:205
static constexpr double p1
spectral index from breakpoint
Definition JDIS.hh:208
double getB(const double v, const bool option=true) const
Integral from breakpoint.
Definition JDIS.hh:231
static constexpr double p0
spectral index upto breakpoint
Definition JDIS.hh:207
JDIS_t(const double E)
Constructor.
Definition JDIS.hh:126
double getb(const double v) const
Integral from breakpoint without suppression factor.
Definition JDIS.hh:245
static constexpr double E0
minimal energy [GeV]
Definition JDIS.hh:204
const double E
actual energy [GeV]
Definition JDIS.hh:201
double getE() const
Get shower energy.
Definition JDIS.hh:166
double k1
normalisation constant upto breakpoint
Definition JDIS.hh:250
double k2
normalisation constant from breakpoint
Definition JDIS.hh:251
Deep-inelastic muon-nucleon scattering.
Definition JDIS.hh:31
double getCrossSection(const double E) const
Get cross section.
Definition JDIS.hh:46
double getP(const double E, const double v) const
Get probability of given energy fraction.
Definition JDIS.hh:64
double getThetaRMS(const double E, const double v) const
Get RMS of scattering angle.
Definition JDIS.hh:93
JDIS()
Default constructor.
Definition JDIS.hh:36
double getV(const double E) const
Get breakpoint.
Definition JDIS.hh:110
double getE(const double E) const
Get shower energy.
Definition JDIS.hh:78
Auxiliary methods for light properties of deep-sea water.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).