Jpp 20.0.0-27-g39925593c-D
the software that should make you happy
Loading...
Searching...
No Matches
JDeltaRays.hh
Go to the documentation of this file.
1#ifndef __JPHYSICS__JDELTARAYS__
2#define __JPHYSICS__JDELTARAYS__
3
8
9/**
10 * \author mdejong
11 */
12
13namespace JPHYSICS {}
14namespace JPP { using namespace JPHYSICS; }
15
16namespace JPHYSICS {
17
18 /**
19 * Auxiliary data structure for delta-rays.
20 */
21 struct JDeltaRays {
22
23 static constexpr double TMIN_GEV = 0.000915499; //!< Minimum allowed delta-ray kinetic energy [GeV]
24 static constexpr double TMAX_GEV = 1.0e10; //!< Maximum allowed delta-ray kinetic energy [GeV]
25 static constexpr double K = 0.307075; //!< internal constant [MeV mol^-1 cm^2]
26
27
28 /**
29 * Get ratio charge to mass number for given atomic parameters.
30 *
31 * \param parameters atomic parameters
32 * \return ratio charge to mass number
33 */
34 static constexpr double getZoverA(const JSeaWater::atom_type& parameters)
35 {
36 return parameters() * parameters.Z / parameters.A;
37 }
38
39
40 /**
41 * Get average ratio charge to mass number for sea water.
42 *
43 * \return ratio charge to mass number
44 */
45 static constexpr double getZoverA()
46 {
47 return (getZoverA(JSeaWater::H) +
51#ifdef RADIATION
52 /**/ +
53 getZoverA(JSeaWater::Ca) +
54 getZoverA(JSeaWater::Mg) +
55 getZoverA(JSeaWater::K) +
56 getZoverA(JSeaWater::S)
57#endif
58 );
59 }
60
61
62 /**
63 * Get minimum delta-ray kinetic energy.
64 *
65 * \return minimum delta-ray kinetic energy [GeV]
66 */
67 static inline double getTmin()
68 {
69 const double Emin = MASS_ELECTRON / getSinThetaC(); // delta-ray Cherenkov threshold [GeV]
70
71 return getKineticEnergy(Emin, MASS_ELECTRON);
72 }
73
74
75 /**
76 * Get maximum delta-ray kinetic energy for given lepton energy and mass.\n
77 * This formula is taken from reference
78 * https://pdg.lbl.gov/2020/reviews/rpp2020-rev-passage-particles-matter.pdf
79 * \n\n
80 * N.B.: This function should not be used for electrons.\n
81 * For electrons use `0.5 * getKineticEnergy(E, MASS_ELECTRON)` instead.
82 *
83 * \param E particle energy [GeV]
84 * \param M particle mass [GeV]
85 * \return maximum delta-ray kinetic energy [GeV]
86 */
87 static inline double getTmax(const double E,
88 const double M)
89 {
90 const double ratio = MASS_ELECTRON / M;
91
92 const double gamma = E / M;
93 const double beta = getBeta(gamma);
94
95 return ( (2.0*MASS_ELECTRON*beta*beta*gamma*gamma) /
96 (1.0 + 2.0*gamma*ratio + ratio*ratio) );
97 }
98
99
100 /**
101 * Auxiliary class for 2nd order polynomial form factor.
102 */
104 {
105 /**
106 * Constructor.
107 *
108 * \param a 2nd order polynomial coefficient [GeV^-2]
109 * \param b 1st order polynomial coefficient [GeV^-1]
110 * \param c 0th order polynomial coefficient [unit]
111 */
112 JFormFactor(const double a,
113 const double b,
114 const double c) :
115 a(a),
116 b(b),
117 c(c)
118 {}
119
120
121 /**
122 * Get form factor for given delta-ray kinetic energy.
123 *
124 * \param T delta-ray kinetic energy [GeV]
125 * \return form factor [unit]
126 */
127 double operator()(const double T) const
128 {
129 return c + T*(b + T*a);
130 }
131
132
133 private:
134 double a; //!< 2nd order polynomial coefficient [GeV^-2]
135 double b; //!< 1st order polynomial coefficient [GeV^-1]
136 double c; //!< 0th order polynomial coefficient [unit]
137 };
138
139
140 /**
141 * Get number of delta-rays per unit track length for an ionising particle with given energy and given mass.
142 *
143 * The template parameter corresponds to a class which contains an `operator()(const double)`\n
144 * to compute the form factor corresponding to a given delta-ray kinetic energy.
145 *
146 * \param E particle energy [GeV]
147 * \param M particle mass [GeV]
148 * \param Tmin minimum delta-ray kinetic energy [GeV]
149 * \param Tmax maximum delta-ray kinetic energy [GeV]
150 * \param Z atomic number [unit]
151 * \param A atomic mass [g/mol]
152 * \param F form factor functor
153 * \param N number of points for numeric integration
154 * \return delta-ray count [g^-1 cm^2]
155 */
156 template<class JFormFactor_t>
157 static inline double getCount(const double E,
158 const double M,
159 const double Tmin,
160 const double Tmax,
161 const double Z,
162 const double A,
163 const JFormFactor_t& F,
164 const int N = 1000000)
165 {
166 if (Tmax > Tmin) {
167
168 const double gamma = E / M;
169 const double beta = getBeta(gamma);
170
171 const double W = 0.5 * K * (Z/A) * (1.0/(beta*beta)) * 1.0e-3; // [GeV g^-1 cm^2]
172
173 const double xmin = 1.0/Tmax;
174 const double xmax = 1.0/Tmin;
175 const double dx = (xmax - xmin) / ((double) N);
176
177 double count = 0.0;
178
179 for (double x = xmin; x <= xmax; x += dx) {
180
181 const double T = 1.0/x;
182 const double y = W * F(T) * dx; // [g^-1 cm^2]
183
184 count += y;
185 }
186
187 return count; // [g^-1 cm^2]
188
189 } else {
190
191 return 0.0;
192 }
193 }
194
195
196 /**
197 * Get equivalent EM-shower energy loss due to delta-rays per unit track length\n
198 * for an ionising particle with given energy and given mass and for a given form factor.
199 *
200 * The template parameter corresponds to a class which contains an `operator()(const double)`\n
201 * to compute the form factor corresponding to a given delta-ray kinetic energy.
202 *
203 * \param E particle energy [GeV]
204 * \param M particle mass [GeV]
205 * \param Tmin minimum delta-ray kinetic energy [GeV]
206 * \param Tmax maximum delta-ray kinetic energy [GeV]
207 * \param Z atomic number [unit]
208 * \param A atomic mass [g/mol]
209 * \param F form factor functor
210 * \param N number of points for numeric integration
211 * \return equivalent energy loss [GeV g^-1 cm^2]
212 */
213 template<class JFormFactor_t>
214 static inline double getEnergyLoss(const double E,
215 const double M,
216 const double Tmin,
217 const double Tmax,
218 const double Z,
219 const double A,
220 const JFormFactor_t& F,
221 const int N = 1000000)
222 {
223 if (Tmax > Tmin) {
224
225 const double gamma = E / M;
226 const double beta = getBeta(gamma);
227
228 const double W = 0.5 * K * (Z/A) * (1.0/(beta*beta)); // [MeV g^-1 cm^2]
229
230 const double xmin = log(Tmin);
231 const double xmax = log(Tmax);
232 const double dx = (xmax - xmin) / ((double) N);
233
234 double weight = 0.0;
235
236 for (double x = xmin; x <= xmax; x += dx) {
237
238 const double T = exp(x);
239 const double y = W * F(T) * dx; // [MeV g^-1 cm^2]
240
241 weight += y;
242 }
243
244 return weight * 1.0e-3; // [GeV g^-1 cm^2]
245
246 } else {
247
248 return 0.0;
249 }
250 }
251
252
253 /**
254 * Get number of delta-rays per unit track length for an ionising particle with given energy and given mass.
255 *
256 * N.B: For this function a form factor \f$F(T) = \frac{1}{2E^2}T^2 - \frac{\beta^2}{T_{\rm max}} + 1\f$ is assumed, where:
257 * - \f$T\f$ corresponds to the delta-ray kinetic energy,
258 * - \f$T_{\rm max}\f$ to the maximum delta-ray kinetic energy,
259 * - \f$E\f$ to the ionising particle's energy and
260 * - \f$\beta\f$ to the corresponding particle velocity, relative to the speed of light.
261 *
262 * \param E particle energy [GeV]
263 * \param M particle mass [GeV]
264 * \param Tmin minimum delta-ray kinetic energy [GeV]
265 * \param Tmax maximum delta-ray kinetic energy [GeV]
266 * \param Z atomic number [unit]
267 * \param A atomic mass [g/mol]
268 * \return delta-ray count [g^-1 cm^2]
269 */
270 static inline double getCount(const double E,
271 const double M,
272 const double Tmin,
273 const double Tmax,
274 const double Z,
275 const double A)
276 {
277 if (Tmax > Tmin) {
278
279 const double gamma = E / M;
280 const double beta = getBeta(gamma);
281
282 const double a = 0.5/(E*E);
283 const double b = beta*beta/Tmax;
284 const double c = 1.0;
285
286 const double W = 0.5 * K * (Z/A) * (1.0/(beta*beta)); // [MeV g^-1 cm^2]
287
288 const double dT = Tmax - Tmin;
289 const double rT = Tmax / Tmin;
290 const double mT = Tmax * Tmin;
291
292 return W * (a*dT - b*log(rT) + c*dT/mT) * 1.0e-3; // [g^-1 cm^2]
293
294 } else {
295
296 return 0.0;
297 }
298 }
299
300
301 /**
302 * Get equivalent EM-shower energy loss due to delta-rays per unit track length\n
303 * for an ionising particle with given energy and given mass.\n\n
304 *
305 * N.B: For this function a form factor \f$F(T) = \frac{1}{2E^2}T^2 - \frac{\beta^2}{T_{\rm max}} + 1\f$ is assumed, where:
306 * - \f$T\f$ corresponds to the delta-ray kinetic energy,
307 * - \f$T_{\rm max}\f$ to the maximum delta-ray kinetic energy,
308 * - \f$E\f$ to the ionising particle's energy and
309 * - \f$\beta\f$ to the corresponding particle velocity, relative to the speed of light.
310 *
311 * \param E particle energy [GeV]
312 * \param M particle mass [GeV]
313 * \param Tmin minimum delta-ray kinetic energy [GeV]
314 * \param Tmax maximum delta-ray kinetic energy [GeV]
315 * \param Z atomic number [unit]
316 * \param A atomic mass [g/mol]
317 * \return equivalent energy loss [GeV g^-1 cm^2]
318 */
319 static inline double getEnergyLoss(const double E,
320 const double M,
321 const double Tmin,
322 const double Tmax,
323 const double Z,
324 const double A)
325 {
326 if (Tmax > Tmin) {
327
328 const double gamma = E / M;
329 const double beta = getBeta(gamma);
330
331 const double a = 0.25/(E*E);
332 const double b = beta*beta/Tmax;
333 const double c = 1.0;
334
335 const double W = 0.5 * K * (Z/A) * (1.0/(beta*beta)); // [MeV g^-1 cm^2]
336
337 const double sT = Tmax + Tmin;
338 const double dT = Tmax - Tmin;
339 const double rT = Tmax / Tmin;
340
341 return W * (a*sT*dT - b*dT + c*log(rT)) * 1.0e-3; // [GeV g^-1 cm^2]
342
343 } else {
344
345 return 0.0;
346 }
347 }
348
349
350 /**
351 * Get number of delta-rays per unit track length for an ionising particle with given energy and given mass in sea water.
352 *
353 * \param E particle energy [GeV]
354 * \param M particle mass [GeV]
355 * \param Tmin minimum delta-ray kinetic energy [GeV]
356 * \param Tmax maximum delta-ray kinetic energy [GeV]
357 * \return delta-ray count [g^-1 cm^2]
358 */
359 static inline double getCount(const double E,
360 const double M,
361 const double Tmin,
362 const double Tmax)
363 {
364 return getCount(E, M, Tmin, Tmax, 1.0, 1.0) * getZoverA();
365 }
366
367
368 /**
369 * Get equivalent EM-shower energy loss due to delta-rays per unit track length\n
370 * for an ionising particle with given energy and given mass in sea water.
371 *
372 * \param E particle energy [GeV]
373 * \param M particle mass [GeV]
374 * \param Tmin minimum delta-ray kinetic energy [GeV]
375 * \param Tmax maximum delta-ray kinetic energy [GeV]
376 * \return equivalent energy loss [GeV g^-1 cm^2]
377 */
378 static inline double getEnergyLoss(const double E,
379 const double M,
380 const double Tmin,
381 const double Tmax)
382 {
383 return getEnergyLoss(E, M, Tmin, Tmax, 1.0, 1.0) * getZoverA();
384 }
385
386
387 /**
388 * Equivalent EM-shower energy loss due to delta-rays per unit electron track length in sea water.
389 *
390 * \param E electron energy [GeV]
391 * \param T_GeV allowed kinetic energy range of delta-rays [GeV]
392 * \return equivalent energy loss [GeV/m]
393 */
394 static inline double getEnergylossFromElectron(const double E,
396 {
397 const double Tmin = T_GeV.constrain(getTmin());
398 const double Tmax = T_GeV.constrain(0.5 * getKineticEnergy(E, MASS_ELECTRON));
399
400 return getEnergyLoss(E, MASS_ELECTRON, Tmin, Tmax) * DENSITY_SEA_WATER * 1.0e2;
401 }
402
403
404 /**
405 * Equivalent EM-shower energy loss due to delta-rays per unit muon track length in sea water.
406 *
407 * \param E muon energy [GeV]
408 * \param T_GeV allowed kinetic energy range of delta-rays [GeV]
409 * \return equivalent energy loss [GeV/m]
410 */
411 static inline double getEnergyLossFromMuon(const double E,
413 {
414 const double Tmin = T_GeV.constrain(getTmin());
415 const double Tmax = T_GeV.constrain(getTmax(E, MASS_MUON));
416
417 return getEnergyLoss(E, MASS_MUON, Tmin, Tmax) * DENSITY_SEA_WATER * 1.0e2;
418 }
419
420
421 /**
422 * Equivalent EM-shower energy loss due to delta-rays per unit tau track length in sea water.
423 *
424 * \param E tau energy [GeV]
425 * \param T_GeV allowed kinetic energy range of delta-rays [GeV]
426 * \return equivalent energy loss [GeV/m]
427 */
428 static inline double getEnergyLossFromTau(const double E,
430 {
431 const double Tmin = T_GeV.constrain(getTmin());
432 const double Tmax = T_GeV.constrain(getTmax(E, MASS_TAU));
433
434 return getEnergyLoss(E, MASS_TAU, Tmin, Tmax) * DENSITY_SEA_WATER * 1.0e2;
435 }
436
437
438 /**
439 * Auxiliary data structure to encapsulate energy loss methods based on fit.
440 */
441 struct FIT {
442
443 /**
444 * Equivalent EM-shower energy loss due to delta-rays per unit muon track length.
445 *
446 * \param E muon energy [GeV]
447 * \return equivalent energy loss [GeV/m]
448 */
449 static inline double getEnergyLossFromMuon(const double E)
450 {
451 static const double a = 3.195e-01;
452 static const double b = 3.373e-01;
453 static const double c = -2.731e-02;
454 static const double d = 1.610e-03;
455 static const double Emin = 0.13078; // [GeV]
456
457 if (E > Emin) {
458
459 const double x = log10(E);
460 const double y = a + x*(b + x*(c + x*(d))); // [MeV g^-1 cm^2]
461
462 if (y > 0.0) {
463 return y * DENSITY_SEA_WATER * 1.0e-1; // [GeV/m]
464 }
465 }
466
467 return 0.0;
468 }
469
470
471 /**
472 * Equivalent EM-shower energy loss due to delta-rays per unit tau track length.
473 *
474 * \param E tau energy [GeV]
475 * \return equivalent energy loss [GeV/m]
476 */
477 static inline double getEnergyLossFromTau(const double E)
478 {
479 static const double a = -2.178e-01;
480 static const double b = 4.995e-01;
481 static const double c = -3.906e-02;
482 static const double d = 1.615e-03;
483 static const double Emin = 2.19500; // [GeV]
484
485 if (E > Emin) {
486
487 const double x = log10(E);
488 const double y = a + x*(b + x*(c + x*(d))); // [MeV g^-1 cm^2]
489
490 if (y > 0) {
491 return y * DENSITY_SEA_WATER * 1.0e-1; // [GeV/m]
492 }
493 }
494
495 return 0.0;
496 }
497 };
498
499
500 /**
501 * Emission profile of photons from delta-rays.
502 *
503 * Profile is taken from reference ANTARES-SOFT-2002-015, J.\ Brunner (fig.\ 3).
504 *
505 * \param x cosine emission angle
506 * \return probability
507 */
508 static inline double getProbability(const double x)
509 {
510 //return 1.0 / (4.0 * PI);
511 return 0.188 * exp(-1.25 * pow(fabs(x - 0.90), 1.30));
512 }
513 };
514}
515
516#endif
517
518
Auxiliary methods for physics calculations.
Physics constants.
Auxiliary methods for light properties of deep-sea water.
static const double DENSITY_SEA_WATER
Fixed environment values.
static const double MASS_ELECTRON
electron mass [GeV]
static const double MASS_TAU
tau mass [GeV]
JTOOLS::JRange< double > JEnergyRange
Type definition for energy range (unit [GeV]).
double getSinThetaC()
Get average sine of Cherenkov angle of water corresponding to group velocity.
double getKineticEnergy(const double E, const double m)
Get kinetic energy of particle with given energy and mass.
double getBeta(const double gamma)
Get relative velocity given Lorentz boost.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary data structure to encapsulate energy loss methods based on fit.
static double getEnergyLossFromTau(const double E)
Equivalent EM-shower energy loss due to delta-rays per unit tau track length.
static double getEnergyLossFromMuon(const double E)
Equivalent EM-shower energy loss due to delta-rays per unit muon track length.
Auxiliary class for 2nd order polynomial form factor.
double operator()(const double T) const
Get form factor for given delta-ray kinetic energy.
double c
0th order polynomial coefficient [unit]
double b
1st order polynomial coefficient [GeV^-1]
JFormFactor(const double a, const double b, const double c)
Constructor.
double a
2nd order polynomial coefficient [GeV^-2]
Auxiliary data structure for delta-rays.
Definition JDeltaRays.hh:21
static double getEnergyLoss(const double E, const double M, const double Tmin, const double Tmax)
Get equivalent EM-shower energy loss due to delta-rays per unit track length for an ionising particle...
static double getEnergyLossFromMuon(const double E, const JEnergyRange T_GeV=JEnergyRange(TMIN_GEV, TMAX_GEV))
Equivalent EM-shower energy loss due to delta-rays per unit muon track length in sea water.
static double getCount(const double E, const double M, const double Tmin, const double Tmax, const double Z, const double A)
Get number of delta-rays per unit track length for an ionising particle with given energy and given m...
static constexpr double getZoverA()
Get average ratio charge to mass number for sea water.
Definition JDeltaRays.hh:45
static double getCount(const double E, const double M, const double Tmin, const double Tmax, const double Z, const double A, const JFormFactor_t &F, const int N=1000000)
Get number of delta-rays per unit track length for an ionising particle with given energy and given m...
static double getProbability(const double x)
Emission profile of photons from delta-rays.
static constexpr double K
internal constant [MeV mol^-1 cm^2]
Definition JDeltaRays.hh:25
static double getEnergylossFromElectron(const double E, const JEnergyRange T_GeV=JEnergyRange(TMIN_GEV, TMAX_GEV))
Equivalent EM-shower energy loss due to delta-rays per unit electron track length in sea water.
static double getEnergyLoss(const double E, const double M, const double Tmin, const double Tmax, const double Z, const double A, const JFormFactor_t &F, const int N=1000000)
Get equivalent EM-shower energy loss due to delta-rays per unit track length for an ionising particle...
static double getTmax(const double E, const double M)
Get maximum delta-ray kinetic energy for given lepton energy and mass.
Definition JDeltaRays.hh:87
static constexpr double getZoverA(const JSeaWater::atom_type &parameters)
Get ratio charge to mass number for given atomic parameters.
Definition JDeltaRays.hh:34
static double getTmin()
Get minimum delta-ray kinetic energy.
Definition JDeltaRays.hh:67
static constexpr double TMIN_GEV
Minimum allowed delta-ray kinetic energy [GeV].
Definition JDeltaRays.hh:23
static double getEnergyLoss(const double E, const double M, const double Tmin, const double Tmax, const double Z, const double A)
Get equivalent EM-shower energy loss due to delta-rays per unit track length for an ionising particle...
static constexpr double TMAX_GEV
Maximum allowed delta-ray kinetic energy [GeV].
Definition JDeltaRays.hh:24
static double getCount(const double E, const double M, const double Tmin, const double Tmax)
Get number of delta-rays per unit track length for an ionising particle with given energy and given m...
static double getEnergyLossFromTau(const double E, const JEnergyRange T_GeV=JEnergyRange(TMIN_GEV, TMAX_GEV))
Equivalent EM-shower energy loss due to delta-rays per unit tau track length in sea water.
double Z
electric charge
Definition JSeaWater.hh:23
static constexpr atom_type Cl
Definition JSeaWater.hh:32
static constexpr atom_type H
Definition JSeaWater.hh:29
static constexpr atom_type O
Definition JSeaWater.hh:30
static constexpr atom_type Na
Definition JSeaWater.hh:31