Garfield++ 4.0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
EnTransfCS.cpp
Go to the documentation of this file.
1#include <iomanip>
2#include <fstream>
3#include <algorithm>
9
10// 2003, I. Smirnov
11
12namespace {
13
14double integrate(const Heed::PointCoorMesh<double, const double*>& mesh,
15 const std::vector<double>& y,
16 double x1, double x2, const unsigned int xpower) {
17
18 if (xpower > 1) return 0.;
19 if (x1 >= x2) return 0.;
20 const long qi = mesh.get_qi();
21 if (qi < 1) return 0.;
22 const double xmin = mesh.get_xmin();
23 const double xmax = mesh.get_xmax();
24 if (x2 <= xmin || x1 >= xmax) return 0.;
25
26 double s = 0.;
27 long ibeg = 0;
28 if (x1 <= xmin) {
29 x1 = xmin;
30 } else {
31 long n1, n2;
32 double b1, b2;
33 if (mesh.get_interval(x1, n1, b1, n2, b2) != 1) return 0.;
34 if (b2 - x1 > 0) {
35 if (x2 <= b2) {
36 if (xpower == 0) {
37 s = (x2 - x1) * y[n1];
38 } else {
39 s = 0.5 * (x2 * x2 - x1 * x1) * y[n1];
40 }
41 return s;
42 }
43 if (xpower == 0) {
44 s += (b2 - x1) * y[n1];
45 } else {
46 s += 0.5 * (b2 * b2 - x1 * x1) * y[n1];
47 }
48 }
49 ibeg = n2;
50 }
51 long iend = qi;
52 if (x2 >= xmax) {
53 x2 = xmax;
54 } else {
55 long n1, n2;
56 double b1, b2;
57 if (mesh.get_interval(x2, n1, b1, n2, b2) != 1) return 0.;
58 if (x2 - b1 > 0) {
59 if (xpower == 0) {
60 s += (x2 - b1) * y[n1];
61 } else {
62 s += 0.5 * (x2 * x2 - b1 * b1) * y[n1];
63 }
64 }
65 iend = n1;
66 }
67 double b;
68 mesh.get_scoor(ibeg, b);
69 for (long i = ibeg; i < iend; ++i) {
70 const double a = b;
71 mesh.get_scoor(i + 1, b);
72 if (xpower == 0) {
73 s += (b - a) * y[i];
74 } else {
75 s += 0.5 * (b * b - a * a) * y[i];
76 }
77 }
78 return s;
79}
80
82 const std::vector<double>& y, std::vector<double>& integ_y) {
83
84 const long qi = mesh.get_qi();
85 if (qi < 1) return 0.;
86
87 double s = 0.0;
88 double xp2 = 0.0;
89 mesh.get_scoor(0, xp2);
90 for (long n = 0; n < qi; n++) {
91 const double xp1 = xp2;
92 mesh.get_scoor(n + 1, xp2);
93 const double step = xp2 - xp1;
94 if (y[n] < 0.0) return 0.;
95 s += y[n] * step;
96 integ_y[n] = s;
97 }
98 for (long n = 0; n < qi; n++) integ_y[n] /= s;
99 return s;
100}
101
102}
103
104namespace Heed {
105
106using CLHEP::twopi;
107using CLHEP::electron_mass_c2;
108using CLHEP::fine_structure_const;
109using CLHEP::hbarc;
110using CLHEP::cm;
111
112EnTransfCS::EnTransfCS(double fparticle_mass, double fgamma_1,
113 bool fs_primary_electron, HeedMatterDef* fhmd,
114 long fparticle_charge)
115 : particle_mass(fparticle_mass),
116 particle_charge(fparticle_charge),
117 gamma_1(fgamma_1),
118 s_primary_electron(fs_primary_electron),
119 hmd(fhmd) {
120 mfunnamep("EnTransfCS::EnTransfCS(...)");
121
122 const double beta = lorbeta(fgamma_1);
123 const double beta2 = beta * beta;
124 const double beta12 = 1.0 - beta2;
125 const double gamma = fgamma_1 + 1.;
126 // Particle kinetic energy.
127 const double tkin = particle_mass * gamma_1;
128 const double ener = particle_mass * gamma;
129 // Calculate the max. energy transfer.
130 if (s_primary_electron) {
131 max_etransf = 0.5 * tkin;
132 } else {
133 double rm2 = particle_mass * particle_mass;
134 double rme = electron_mass_c2;
135 if (beta12 > 1.0e-10) {
137 2.0 * rm2 * electron_mass_c2 * beta2 /
138 ((rm2 + rme * rme + 2.0 * rme * gamma * particle_mass) * beta12);
139 if (max_etransf > tkin) max_etransf = tkin;
140 } else {
141 max_etransf = tkin;
142 }
143 }
144 const long qe = hmd->energy_mesh->get_q();
145 log1C.assign(qe, 0.0);
146 log2C.assign(qe, 0.0);
147 chereC.assign(qe, 0.0);
148 chereCangle.assign(qe, 0.0);
149 Rruth.assign(qe, 0.0);
150 addaC.assign(qe, 0.0);
151#ifndef EXCLUDE_A_VALUES
152 addaC_a.assign(qe, 0.0);
153#endif
154
155 const long qa = hmd->matter->qatom();
156 cher.resize(qa);
157 fruth.resize(qa);
158 adda.resize(qa);
159 fadda.resize(qa);
160 quan.resize(qa);
161 mean.resize(qa);
162#ifndef EXCLUDE_A_VALUES
163 cher_a.resize(qa);
164 adda_a.resize(qa);
165 fadda_a.resize(qa);
166 quan_a.resize(qa);
167 mean_a.resize(qa);
168#endif
169
170 for (long na = 0; na < qa; na++) {
171 const long qs = hmd->apacs[na]->get_qshell();
172 cher[na].assign(qs, std::vector<double>(qe, 0.));
173 fruth[na].assign(qs, std::vector<double>(qe, 0.));
174 adda[na].assign(qs, std::vector<double>(qe, 0.));
175 fadda[na].assign(qs, std::vector<double>(qe, 0.));
176 quan[na].assign(qs, 0.);
177 mean[na].assign(qs, 0.);
178#ifndef EXCLUDE_A_VALUES
179 cher_a[na].assign(qs, std::vector<double>(qe, 0.));
180 adda_a[na].assign(qs, std::vector<double>(qe, 0.));
181 fadda_a[na].assign(qs, std::vector<double>(qe, 0.));
182 quan_a[na].assign(qs, 0.);
183 mean_a[na].assign(qs, 0.);
184#endif
185 }
186
187 const long q2 = particle_charge * particle_charge;
188 double coefpa = fine_structure_const * q2 / (beta2 * CLHEP::pi);
189 const double coefCh = coefpa / hmd->eldens;
190 for (long ne = 0; ne < qe; ne++) {
191 const double eps1 = hmd->epsi1[ne];
192 const double eps2 = hmd->epsi2[ne];
193 const double a0 = 1. + eps1;
194 const double a1 = -eps1 + a0 * beta12;
195 const double a2 = beta2 * eps2;
196 log1C[ne] = log(1. / sqrt(a1 * a1 + a2 * a2));
197
198 const double ec = hmd->energy_mesh->get_ec(ne);
199 const double a3 = 2. * electron_mass_c2 * beta2 / ec;
200 log2C[ne] = a3 > 0. ? log(a3) : 0.;
201
202 double a4 = atan(a2 / a1);
203 if (a1 < 0) a4 += CLHEP::pi;
204 chereCangle[ne] = a4;
205
206 const double a5 = eps2 * eps2;
207 const double a6 = (-a0 * a1 + beta2 * a5) / (a0 * a0 + a5);
208 chereC[ne] = coefCh * a6 * a4;
209
210 if (s_simple_form) {
211 Rruth[ne] = 1. / (ec * ec);
212 if (!s_primary_electron) {
213 Rruth[ne] *= (1. - beta2 * ec / max_etransf);
214 }
215 } else {
216 if (!s_primary_electron) {
217 Rruth[ne] = 1. / (ec * ec) * (1. - beta2 * ec / max_etransf +
218 ec * ec / (2. * ener * ener));
219 } else {
220 const double delta = ec / particle_mass;
221 const double pg2 = gamma * gamma;
222 const double dgd = delta * (gamma_1 - delta);
223 Rruth[ne] = beta2 / (particle_mass * particle_mass) * 1.0 /
224 (pg2 - 1.0) * (gamma_1 * gamma_1 * pg2 / (dgd * dgd) -
225 (2.0 * pg2 + 2.0 * gamma - 1.0) / dgd + 1.0);
226 }
227 }
228 }
229
230 double Z_mean = hmd->matter->Z_mean();
231 const double ethr = hmd->min_ioniz_pot;
232 for (long na = 0; na < qa; na++) {
233 auto pacs = hmd->apacs[na];
234 const double awq = hmd->matter->weight_quan(na);
235 const long qs = pacs->get_qshell();
236 for (long ns = 0; ns < qs; ns++) {
237 for (long ne = 0; ne < qe; ne++) {
238 double e1 = hmd->energy_mesh->get_e(ne);
239 double e2 = hmd->energy_mesh->get_e(ne + 1);
240 double ics = 0.;
241 if (hmd->s_use_mixture_thresholds == 1) {
242 ics = pacs->get_integral_TICS(ns, e1, e2, ethr) / (e2 - e1);
243 } else {
244 ics = pacs->get_integral_ICS(ns, e1, e2) / (e2 - e1);
245 }
246 check_econd11a(ics, < 0,
247 "na=" << na << " ns=" << ns << " ne=" << ne << '\n',
248 mcerr);
249 const double tacs = hmd->ACS[ne];
250 if (tacs <= 0.0) continue;
251 cher[na][ns][ne] = chereC[ne] * awq * ics / tacs;
252#ifndef EXCLUDE_A_VALUES
253 double acs = pacs->get_integral_ACS(ns, e1, e2) / (e2 - e1);
254 cher_a[na][ns][ne] = chereC[ne] * awq * acs / tacs;
255#endif
256 }
257 // Calculate the integral.
258 const double cR = C1_MEV2_MBN * awq * coefpa / Z_mean;
259 double s = 0.;
260 for (long ne = 0; ne < qe; ne++) {
261 const double e1 = hmd->energy_mesh->get_e(ne);
262 const double ec = hmd->energy_mesh->get_ec(ne);
263 const double e2 = hmd->energy_mesh->get_e(ne + 1);
264 const double r = pacs->get_integral_ACS(ns, e1, e2) * cR;
265 // Here it must be ACS to satisfy sum rule for Rutherford
266 check_econd11a(r, < 0.0, "na=" << na << " ns=" << ns << " ne=" << ne,
267 mcerr);
268 if (ec > ethr && ec < max_etransf) {
269 fruth[na][ns][ne] = (s + 0.5 * r) * Rruth[ne];
270 check_econd11a(fruth[na][ns][ne], < 0,
271 "na=" << na << " ns=" << ns << " na=" << na, mcerr);
272 }
273 s += r;
274 }
275 }
276 }
277 for (long ne = 0; ne < qe; ++ne) {
278 double s = 0.0;
279#ifndef EXCLUDE_A_VALUES
280 double s_a = 0.0;
281#endif
282 double e1 = hmd->energy_mesh->get_e(ne);
283 double ec = hmd->energy_mesh->get_ec(ne);
284 double e2 = hmd->energy_mesh->get_e(ne + 1);
285 const double eps1 = hmd->epsi1[ne];
286 const double eps2 = hmd->epsi2[ne];
287 const double eps11 = 1. + eps1;
288 const double sqepsi = eps11 * eps11 + eps2 * eps2;
289 const double cL = C1_MEV2_MBN * coefpa * (log1C[ne] + log2C[ne]) /
290 (ec * Z_mean * sqepsi);
291 for (long na = 0; na < qa; na++) {
292 double awq = hmd->matter->weight_quan(na);
293 auto pacs = hmd->apacs[na];
294 const long qs = pacs->get_qshell();
295 for (long ns = 0; ns < qs; ns++) {
296 double ics = 0.;
297 if (hmd->s_use_mixture_thresholds == 1) {
298 ics = pacs->get_integral_TICS(ns, e1, e2, ethr) / (e2 - e1);
299 } else {
300 ics = pacs->get_integral_ICS(ns, e1, e2) / (e2 - e1);
301 }
302 double r = std::max(cL * awq * ics + fruth[na][ns][ne], 0.);
303#ifndef EXCLUDE_A_VALUES
304 double acs = pacs->get_integral_ACS(ns, e1, e2) / (e2 - e1);
305 double r_a = std::max(cL * awq * acs + fruth[na][ns][ne], 0.);
306#endif
307 if (ec > ethr) {
308 r += cher[na][ns][ne];
309 if (r < 0.0) {
310 funnw.whdr(mcout);
311 mcout << "negative adda\n";
312 mcout << "na=" << na << " ns=" << ns << " ne=" << ne
313 << ": " << r << '\n';
314 r = 0.;
315 }
316 }
317#ifndef EXCLUDE_A_VALUES
318 r_a += cher[na][ns][ne];
319 check_econd11a(r_a, < 0,
320 "na=" << na << " ns=" << ns << " na=" << na, mcerr);
321#endif
322 adda[na][ns][ne] = r;
323 s += r;
324#ifndef EXCLUDE_A_VALUES
325 adda_a[na][ns][ne] = r_a;
326 s_a += r_a;
327#endif
328 }
329 }
330 addaC[ne] = s;
331#ifndef EXCLUDE_A_VALUES
332 addaC_a[ne] = s_a;
333#endif
334 }
335
336 const double* aetemp = hmd->energy_mesh->get_ae();
337 PointCoorMesh<double, const double*> pcm_e(qe + 1, &(aetemp));
338 double emin = hmd->energy_mesh->get_emin();
339 double emax = hmd->energy_mesh->get_emax();
340
341 const double rho = hmd->xeldens;
342 quanC = integrate(pcm_e, addaC, emin, emax, 0) * rho;
343 meanC = integrate(pcm_e, addaC, emin, emax, 1) * rho;
344
345#ifndef EXCLUDE_A_VALUES
346 quanC_a = integrate(pcm_e, addaC_a, emin, emax, 0) * rho;
347 meanC_a = integrate(pcm_e, addaC_a, emin, emax, 1) * rho;
348#endif
349 meanC1 = meanC;
350 const double coef = fine_structure_const * fine_structure_const * q2 * twopi /
351 (electron_mass_c2 * beta2) * rho;
352 if (s_simple_form) {
353 if (!s_primary_electron) {
354 if (max_etransf > hmd->energy_mesh->get_e(qe)) {
355 double e1 = hmd->energy_mesh->get_e(qe);
356 double e2 = max_etransf;
357 meanC1 += coef * (log(e2 / e1) - beta2 / max_etransf * (e2 - e1));
358 }
359 } else {
360 if (max_etransf > hmd->energy_mesh->get_e(qe)) {
361 double e1 = hmd->energy_mesh->get_e(qe);
362 double e2 = max_etransf;
363 meanC1 += coef * log(e2 / e1);
364 }
365 }
366 } else {
367 if (!s_primary_electron) {
368 if (max_etransf > hmd->energy_mesh->get_e(qe)) {
369 double e1 = hmd->energy_mesh->get_e(qe);
370 double e2 = max_etransf;
371 meanC1 += coef *
372 (log(e2 / e1) - beta2 / max_etransf * (e2 - e1) +
373 (e2 * e2 - e1 * e1) / (4.0 * ener * ener));
374 }
375#ifndef EXCLUDE_A_VALUES
376 meanC1_a = meanC_a;
377 if (max_etransf > hmd->energy_mesh->get_e(qe)) {
378 double e1 = hmd->energy_mesh->get_e(qe);
379 double e2 = max_etransf;
380 meanC1_a += coef * (log(e2 / e1) - beta2 / max_etransf * (e2 - e1) +
381 (e2 * e2 - e1 * e1) /
382 (4.0 * ener * ener));
383 }
384#endif
385 }
386 }
387
388 for (long na = 0; na < qa; na++) {
389 const long qs = hmd->apacs[na]->get_qshell();
390 for (long ns = 0; ns < qs; ns++) {
391 quan[na][ns] = integrate(pcm_e, adda[na][ns], emin, emax, 0) * rho;
392 mean[na][ns] = integrate(pcm_e, adda[na][ns], emin, emax, 1) * rho;
393#ifndef EXCLUDE_A_VALUES
394 quan_a[na][ns] = integrate(pcm_e, adda_a[na][ns], emin, emax, 0) * rho;
395 mean_a[na][ns] = integrate(pcm_e, adda_a[na][ns], emin, emax, 1) * rho;
396#endif
397 }
398 }
399
400 for (long na = 0; na < qa; na++) {
401 const long qs = hmd->apacs[na]->get_qshell();
402 for (long ns = 0; ns < qs; ns++) {
403 if (quan[na][ns] > 0.0) {
404 const double s = cdf(pcm_e, adda[na][ns], fadda[na][ns]);
405 if (fabs(s * rho - quan[na][ns]) > 1.e-10) {
406 std::cerr << "Heed::EnTransfCS: Integrals differ (warning).\n";
407 }
408 }
409#ifndef EXCLUDE_A_VALUES
410 if (quan_a[na][ns] > 0.0) {
411 const double s = cdf(pcm_e, adda_a[na][ns], fadda_a[na][ns]);
412 if (fabs(s * rho - quan_a[na][ns]) > 1.e-10) {
413 std::cerr << "Heed::EnTransfCS: Integrals differ (warning).\n";
414 }
415 }
416#endif
417 }
418 }
419
420 length_y0.resize(qe, 0.);
421 for (long ne = 0; ne < qe; ne++) {
422 const double k0 = hmd->energy_mesh->get_ec(ne) / (hbarc / cm);
423 const double det_value = 1.0 / (gamma * gamma) - hmd->epsi1[ne] * beta2;
424 length_y0[ne] = det_value > 0. ? beta / k0 * 1.0 / sqrt(det_value) : 0.;
425 }
426
427 /*
428 std::ofstream dcsfile;
429 dcsfile.open("dcs.txt", std::ios::out);
430 dcsfile << "# energy [MeV] vs. diff. cs per electron [Mbarn / MeV]\n";
431 for (int i = 0; i < qe; ++i) {
432 double sumR = 0.;
433 double sumC = 0.;
434 double sumL = 0.;
435 for (long na = 0; na < qa; ++na) {
436 const long qs = hmd->apacs[na]->get_qshell();
437 for (long ns = 0; ns < qs; ++ns) {
438 sumR += fruth[na][ns][i];
439 sumC += cher[na][ns][i];
440 sumL += adda[na][ns][i] - cher[na][ns][i] - fruth[na][ns][i];
441 }
442 }
443 const double f1 = log1C[i] / (log1C[i] + log2C[i]);
444 const double f2 = 1. - f1;
445 sumR /= C1_MEV2_MBN;
446 sumC /= C1_MEV2_MBN;
447 sumL /= C1_MEV2_MBN;
448 const double sumL1 = f1 * sumL;
449 const double sumL2 = f2 * sumL;
450 dcsfile << hmd->energy_mesh->get_ec(i) << " " << addaC[i] / C1_MEV2_MBN
451 << " " << sumL1 << " " << " " << sumC << " " << sumL2 << " " << sumR
452 << "\n";
453 }
454 dcsfile.close();
455 //*/
456
457 log1C.clear();
458 log2C.clear();
459 chereC.clear();
460 chereCangle.clear();
461 Rruth.clear();
462
463 addaC.clear();
464 cher.clear();
465 fruth.clear();
466 adda.clear();
467 mean.clear();
468#ifndef EXCLUDE_A_VALUES
469 addaC_a.clear();
470 cher_a.clear();
471 adda_a.clear();
472 fadda_a.clear();
473 mean_a.clear();
474#endif
475}
476
477void EnTransfCS::print(std::ostream& file, int l) const {
478 if (l <= 0) return;
479 Ifile << "EnTransfCS(l=" << l << "):\n";
480 indn.n += 2;
481 Ifile << "particle_mass=" << particle_mass
482 << "particle_ener=" << particle_mass * (gamma_1 + 1.)
483 << " particle_charge=" << particle_charge << std::endl;
484 Ifile << "max_etransf=" << max_etransf << std::endl;
485 Ifile << "s_primary_electron=" << s_primary_electron << std::endl;
486 Ifile << "hmd:\n";
487 hmd->print(file, 1);
488#ifndef EXCLUDE_A_VALUES
489 Ifile << "quanC=" << quanC << " quanC_a=" << quanC_a << '\n';
490 Ifile << "meanC=" << meanC << " meanC_a=" << meanC_a << '\n';
491 Ifile << "meanC1=" << meanC1 << " meanC1_a=" << meanC1_a << '\n';
492#else
493 Ifile << "quanC=" << quanC << '\n';
494 Ifile << "meanC=" << meanC << '\n';
495 Ifile << "meanC1=" << meanC1 << '\n';
496#endif
497 if (l > 2) {
498 long qe = hmd->energy_mesh->get_q();
499 long ne;
500 if (l > 4) {
501 Ifile << " enerc, log1C, log2C, chereC, addaC, "
502 "chereCangle Rruth length_y0\n";
503 for (ne = 0; ne < qe; ne++) {
504 Ifile << std::setw(12) << hmd->energy_mesh->get_ec(ne) << std::setw(12)
505 << log1C[ne] << std::setw(12) << log2C[ne] << std::setw(12)
506 << chereC[ne] << std::setw(12) << addaC[ne] << std::setw(12)
507 << chereCangle[ne] << std::setw(12) << Rruth[ne]
508 << std::setw(12) << length_y0[ne] << '\n';
509 }
510 }
511 if (l > 3) {
512 long qa = hmd->matter->qatom();
513 long na;
514 Iprintn(file, hmd->matter->qatom());
515 for (na = 0; na < qa; na++) {
516 Iprintn(file, na);
517 long qs = hmd->apacs[na]->get_qshell();
518 long ns;
519 Iprintn(file, hmd->apacs[na]->get_qshell());
520 for (ns = 0; ns < qs; ns++) {
521 Iprintn(file, ns);
522 Ifile << "quan =" << std::setw(13) << quan[na][ns]
523 << " mean =" << std::setw(13) << mean[na][ns] << '\n';
524#ifndef EXCLUDE_A_VALUES
525 Ifile << "quan_a =" << std::setw(13) << quan_a[na][ns]
526 << " mean_a=" << std::setw(13) << mean_a[na][ns] << '\n';
527#endif
528 if (l > 5) {
529 Ifile << " enerc, cher, cher_a, fruth, adda, "
530 " adda_a, fadda, fadda_a\n";
531 for (ne = 0; ne < qe; ne++) {
532 Ifile << std::setw(12)
533 << hmd->energy_mesh->get_ec(ne)
534 << std::setw(12) << cher[na][ns][ne]
535#ifndef EXCLUDE_A_VALUES
536 << std::setw(12) << cher_a[na][ns][ne]
537#endif
538 << std::setw(12) << fruth[na][ns][ne] << std::setw(12)
539 << adda[na][ns][ne]
540#ifndef EXCLUDE_A_VALUES
541 << std::setw(12) << adda_a[na][ns][ne]
542#endif
543 << std::setw(12) << fadda[na][ns][ne]
544#ifndef EXCLUDE_A_VALUES
545 << std::setw(12) << fadda_a[na][ns][ne]
546#endif
547 << '\n';
548 }
549 }
550 }
551 }
552 }
553 }
554 indn.n -= 2;
555}
556}
#define check_econd11a(a, signb, add, stream)
Definition: FunNameStack.h:172
#define mfunnamep(string)
Definition: FunNameStack.h:49
const std::vector< double > & weight_quan() const
Definition: AtomDef.h:136
long qatom() const
Definition: AtomDef.h:133
double Z_mean() const
Definition: AtomDef.h:140
std::vector< std::vector< double > > quan
Number of collisions / cm, for each atom and shell.
Definition: EnTransfCS.h:99
long particle_charge
Charge in units of electron charge (used square, sign does not matter).
Definition: EnTransfCS.h:31
std::vector< double > Rruth
term called R in my paper
Definition: EnTransfCS.h:55
std::vector< double > log2C
common second log without cs
Definition: EnTransfCS.h:52
double gamma_1
Lorentz factor - 1 (the best dimensionless measurement of speed).
Definition: EnTransfCS.h:34
std::vector< double > chereCangle
angle of Cherenkov's radiation
Definition: EnTransfCS.h:54
std::vector< std::vector< double > > mean
First moment, for each atom and shell.
Definition: EnTransfCS.h:101
std::vector< std::vector< std::vector< double > > > fadda
Integral, normalised to unity.
Definition: EnTransfCS.h:88
std::vector< double > log1C
common first log without cs
Definition: EnTransfCS.h:51
double particle_mass
Particle mass [MeV].
Definition: EnTransfCS.h:29
std::vector< std::vector< std::vector< double > > > fruth
Rutherford term.
Definition: EnTransfCS.h:84
HeedMatterDef * hmd
Definition: EnTransfCS.h:47
bool s_primary_electron
Flag indicating whether the primary particle is an electron.
Definition: EnTransfCS.h:45
EnTransfCS()=default
Default constructor.
std::vector< std::vector< std::vector< double > > > adda
Sum.
Definition: EnTransfCS.h:86
std::vector< double > chereC
Cherenkov's radiation.
Definition: EnTransfCS.h:53
std::vector< double > length_y0
Definition: EnTransfCS.h:109
std::vector< double > addaC
Sum of (ionization) differential cross-section terms.
Definition: EnTransfCS.h:58
std::vector< std::vector< std::vector< double > > > cher
Definition: EnTransfCS.h:82
double quanC
Integrated (ionization) cross-section.
Definition: EnTransfCS.h:60
void print(std::ostream &file, int l) const
Definition: EnTransfCS.cpp:477
double max_etransf
Max. energy transfer [MeV].
Definition: EnTransfCS.h:37
const double * get_ae(void) const
Return all left sides.
Definition: EnergyMesh.h:52
double get_emin() const
Return left side of the first bin.
Definition: EnergyMesh.h:44
long get_q() const
Return number of bins.
Definition: EnergyMesh.h:42
double get_emax() const
Return right side of the last bin.
Definition: EnergyMesh.h:46
double get_ec(long n) const
Return center of a given bin.
Definition: EnergyMesh.h:50
double get_e(long n) const
Return left side of a given bin.
Definition: EnergyMesh.h:48
double eldens
Electron density MeV**3.
Definition: HeedMatterDef.h:32
double xeldens
Long. electron density MeV**2/cm (for x=1 cm).
Definition: HeedMatterDef.h:33
std::vector< const AtomPhotoAbsCS * > apacs
Definition: HeedMatterDef.h:29
std::vector< double > ACS
Photoabsorption cross section per one atom(Mb).
Definition: HeedMatterDef.h:43
MatterDef * matter
Definition: HeedMatterDef.h:28
std::vector< double > epsi1
Real part of dielectric constant (e_1 - 1).
Definition: HeedMatterDef.h:50
std::vector< double > epsi2
Imaginary part of dielectric constant.
Definition: HeedMatterDef.h:52
void print(std::ostream &file, int l) const
EnergyMesh * energy_mesh
Definition: HeedMatterDef.h:39
static constexpr int s_use_mixture_thresholds
Definition: HeedMatterDef.h:90
T get_xmin(void) const
Definition: tline.h:392
void get_scoor(long n, T &b) const
Definition: tline.h:394
T get_xmax(void) const
Definition: tline.h:393
long get_qi(void) const
Definition: tline.h:391
virtual int get_interval(long n, T &b1, T &b2) const
Definition: tline.h:401
Definition: BGMesh.cpp:6
double lorbeta(const double gamma_1)
as function of .
Definition: lorgamma.cpp:23
constexpr double C1_MEV2_MBN
DoubleAc fabs(const DoubleAc &f)
Definition: DoubleAc.h:615
indentation indn
Definition: prstream.cpp:15
DoubleAc sqrt(const DoubleAc &f)
Definition: DoubleAc.cpp:314
#define mcout
Definition: prstream.h:126
#define Ifile
Definition: prstream.h:195
#define mcerr
Definition: prstream.h:128
#define Iprintn(file, name)
Definition: prstream.h:204