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