Garfield++ v2r0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
Heed::EnTransfCS Class Reference

#include <EnTransfCS.h>

+ Inheritance diagram for Heed::EnTransfCS:

Public Member Functions

 EnTransfCS ()
 Default constructor.
 
 EnTransfCS (double fparticle_mass, double fgamma_1, int fs_primary_electron, HeedMatterDef *fhmd, long fparticle_charge=1)
 Constructor.
 
virtual void print (std::ostream &file, int l) const
 
virtual EnTransfCScopy () const
 
- Public Member Functions inherited from Heed::RegPassivePtr
 RegPassivePtr (void)
 
 RegPassivePtr (char fs_ban_del, char fs_ban_sub, char fs_ban_cop=0)
 
 RegPassivePtr (const RegPassivePtr &f)
 
RegPassivePtroperator= (const RegPassivePtr &f)
 
CountPP_ns::CountPassivePtrbook (void) const
 
void clear_pointers (void) const
 
virtual RegPassivePtrcopy () const
 
virtual ~RegPassivePtr ()
 
virtual void print (std::ostream &file, int l=1) const
 
void set_s_ban_del (char fs_ban_del)
 
char get_s_ban_del (void) const
 
void set_s_ban_sub (char fs_ban_sub)
 
char get_s_ban_sub (void) const
 
void set_s_ban_cop (char fs_ban_cop)
 
char get_s_ban_cop (void) const
 
void set_s_allow_del_at_zero_count (char fs_allow_del_at_zero_count)
 
char get_s_allow_del_at_zero_count (void) const
 
long get_total_number_of_references (void) const
 

Public Attributes

double particle_mass
 Particle mass [MeV].
 
double particle_ener
 Total energy [MeV].
 
long particle_charge
 Charge in units of electron charge (used square, sign does not matter).
 
double gamma_1
 Lorentz factor - 1 (the best dimensionless measurement of speed).
 
double max_etransf
 Max. energy transfer [MeV].
 
bool s_simple_form
 
int s_primary_electron
 Flag that the primary particle is the electron.
 
PassivePtr< HeedMatterDefhmd
 
std::vector< double > log1C
 common first log without cs
 
std::vector< double > log2C
 common second log without cs
 
std::vector< double > chereC
 Cherenkov's radiation.
 
std::vector< double > chereCangle
 angle of Cherenkov's radiation
 
std::vector< double > Rruth
 term called R in my paper
 
std::vector< double > addaC
 Sum of (ionization) differential cross-section terms.
 
double quanC
 Integrated (ionization) cross-section.
 
double meanC
 
double meanC1
 
double meaneleC
 
double meaneleC1
 
std::vector< std::vector< std::vector< double > > > cher
 
std::vector< std::vector< std::vector< double > > > fruth
 Rutherford term.
 
std::vector< std::vector< std::vector< double > > > adda
 Sum.
 
std::vector< std::vector< std::vector< double > > > fadda
 Integral, normalised to unity.
 
std::vector< std::vector< double > > quan
 
std::vector< std::vector< double > > mean
 
std::vector< double > length_y0
 

Additional Inherited Members

- Static Public Member Functions inherited from Heed::RegPassivePtr
static void set_s_ban_del_ignore (char fs_ban_del_ignore)
 
static char get_s_ban_del_ignore (void)
 
static void set_s_print_adr_cpp (char fs_print_adr_cpp)
 
static char get_s_print_adr_cpp (void)
 

Detailed Description

The PAI cross section of energy transfers from charged particle to media. The particle has fixed parameters (energy, speed, etc.), which are not affected by energy transfers, since they are considered too small compared with the particle energy.

2003, I. Smirnov

Definition at line 21 of file EnTransfCS.h.

Constructor & Destructor Documentation

◆ EnTransfCS() [1/2]

Heed::EnTransfCS::EnTransfCS ( )
inline

Default constructor.

Definition at line 24 of file EnTransfCS.h.

24{}

Referenced by copy().

◆ EnTransfCS() [2/2]

Heed::EnTransfCS::EnTransfCS ( double  fparticle_mass,
double  fgamma_1,
int  fs_primary_electron,
HeedMatterDef fhmd,
long  fparticle_charge = 1 
)

Constructor.

Definition at line 19 of file EnTransfCS.cpp.

22 : particle_mass(fparticle_mass),
23 particle_charge(fparticle_charge),
24 gamma_1(fgamma_1),
25 s_simple_form(true),
26 s_primary_electron(fs_primary_electron),
27 hmd(fhmd),
28 quanC(0.0),
29 meanC(0.0),
30 meanC1(0.0),
31 meaneleC(0.0),
32 meaneleC1(0.0) {
33 mfunnamep("EnTransfCS::EnTransfCS(...)");
34
35 const double beta = lorbeta(fgamma_1);
36 const double beta2 = beta * beta;
37 const double beta12 = 1.0 - beta2;
38 const double gamma = fgamma_1 + 1.;
39 // Particle kinetic energy.
40 const double tkin = particle_mass * gamma_1;
42 // Calculate the max. energy transfer.
43 if (s_primary_electron == 1) {
44 max_etransf = 0.5 * tkin;
45 } else {
46 double rm2 = particle_mass * particle_mass;
47 double rme = electron_mass_c2;
48 if (beta12 > 1.0e-10) {
50 2.0 * rm2 * electron_mass_c2 * beta2 /
51 ((rm2 + rme * rme + 2.0 * rme * gamma * particle_mass) * beta12);
52 if (max_etransf > tkin) max_etransf = tkin;
53 } else {
54 max_etransf = tkin;
55 }
56 }
57 const long qe = hmd->energy_mesh->get_q();
58 log1C.resize(qe, 0.0);
59 log2C.resize(qe, 0.0);
60 chereC.resize(qe, 0.0);
61 chereCangle.resize(qe, 0.0);
62 Rruth.resize(qe, 0.0);
63#ifdef DEBUG_EnTransfCS
64 truth.resize(qe, 0.0);
65#endif
66 addaC.resize(qe, 0.0);
67#ifndef EXCLUDE_A_VALUES
68 addaC_a.resize(qe, 0.0);
69#endif
70
71 const long qa = hmd->matter->qatom();
72 cher.resize(qa);
73 fruth.resize(qa);
74 adda.resize(qa);
75 fadda.resize(qa);
76 quan.resize(qa);
77 mean.resize(qa);
78#ifndef EXCLUDE_A_VALUES
79 cher_a.resize(qa);
80 adda_a.resize(qa);
81 fadda_a.resize(qa);
82 quan_a.resize(qa);
83 mean_a.resize(qa);
84#endif
85
86#ifndef EXCLUDE_VAL_FADDA
87 val_fadda.resize(qa);
88#ifndef EXCLUDE_A_VALUES
89 val_fadda_a.resize(qa);
90#endif
91#endif
92
93 for (long na = 0; na < qa; na++) {
94 const long qs = hmd->apacs[na]->get_qshell();
95 cher[na].resize(qs, std::vector<double>(qe, 0.));
96 fruth[na].resize(qs, std::vector<double>(qe, 0.));
97 adda[na].resize(qs, std::vector<double>(qe, 0.));
98 fadda[na].resize(qs, std::vector<double>(qe, 0.));
99 quan[na].resize(qs);
100 mean[na].resize(qs);
101#ifndef EXCLUDE_A_VALUES
102 cher_a[na].resize(qs, std::vector<double>(qe, 0.));
103 adda_a[na].resize(qs, std::vector<double>(qe, 0.));
104 fadda_a[na].resize(qs, std::vector<double>(qe, 0.));
105 quan_a[na].resize(qs);
106 mean_a[na].resize(qs);
107#endif
108#ifndef EXCLUDE_VAL_FADDA
109 val_fadda[na].resize(qs);
110#ifndef EXCLUDE_A_VALUES
111 val_fadda_a[na].resize(qs);
112#endif
113#endif
114 }
115
116 for (long ne = 0; ne < qe; ne++) {
117 double r = -hmd->epsi1[ne] + (1.0 + hmd->epsi1[ne]) * beta12;
118 r = r * r + beta2 * beta2 * hmd->epsi2[ne] * hmd->epsi2[ne];
119 log1C[ne] = log(1. / sqrt(r));
120 }
121 for (long ne = 0; ne < qe; ne++) {
122 double r = 2. * electron_mass_c2 * beta2 / hmd->energy_mesh->get_ec(ne);
123 log2C[ne] = r > 0. ? log(r) : 0.;
124 }
125 const long q2 = particle_charge * particle_charge;
126 double coefpa = fine_structure_const * q2 / (beta2 * CLHEP::pi);
127 for (long ne = 0; ne < qe; ne++) {
128 const double r0 = 1.0 + hmd->epsi1[ne];
129 double r = -hmd->epsi1[ne] + r0 * beta12;
130 const double rr12 = r0 * r0;
131 const double rr22 = hmd->epsi2[ne] * hmd->epsi2[ne];
132 const double r1 = (-r0 * r + beta2 * rr22) / (rr12 + rr22);
133 const double r2 = hmd->epsi2[ne] * beta2 / r;
134 double r3 = atan(r2);
135 if (r < 0) r3 += CLHEP::pi;
136 chereCangle[ne] = r3;
137 chereC[ne] = (coefpa / hmd->eldens) * r1 * r3;
138 }
139
140 for (long ne = 0; ne < qe; ne++) {
141 const double ec = hmd->energy_mesh->get_ec(ne);
142 if (s_simple_form) {
143 if (s_primary_electron == 0) {
144 Rruth[ne] = 1. / (ec * ec) * (1. - beta2 * ec / max_etransf);
145 } else {
146 Rruth[ne] = 1. / (ec * ec);
147 }
148 } else {
149 if (s_primary_electron == 0) {
150 Rruth[ne] =
151 1. / (ec * ec) * (1. - beta2 * ec / max_etransf +
152 ec * ec / (2. * particle_ener * particle_ener));
153 } else {
154 const double delta = ec / particle_mass;
155 const double pg2 = gamma * gamma;
156 const double dgd = delta * (gamma_1 - delta);
157 Rruth[ne] = beta2 / (particle_mass * particle_mass) * 1.0 /
158 (pg2 - 1.0) * (gamma_1 * gamma_1 * pg2 / (dgd * dgd) -
159 (2.0 * pg2 + 2.0 * gamma - 1.0) / dgd + 1.0);
160 }
161 }
162 }
163
164 double Z_mean = hmd->matter->Z_mean();
165 for (long na = 0; na < qa; na++) {
166 PassivePtr<const AtomPhotoAbsCS> pacs = hmd->apacs[na];
167 const double awq = hmd->matter->weight_quan(na);
168 const long qs = pacs->get_qshell();
169 for (long ns = 0; ns < qs; ns++) {
170 std::vector<double>& acher = cher[na][ns];
171#ifndef EXCLUDE_A_VALUES
172 std::vector<double>& acher_a = cher_a[na][ns];
173#endif
174 std::vector<double>& afruth = fruth[na][ns];
175
176 for (long ne = 0; ne < qe; ne++) {
177 double e1 = hmd->energy_mesh->get_e(ne);
178 double e2 = hmd->energy_mesh->get_e(ne + 1);
179 double ics = 0.;
180 if (hmd->s_use_mixture_thresholds == 1) {
181 ics = pacs->get_integral_TICS(ns, e1, e2, hmd->min_ioniz_pot) /
182 (e2 - e1) * C1_MEV2_MBN;
183 } else {
184 ics = pacs->get_integral_ICS(ns, e1, e2) / (e2 - e1) * C1_MEV2_MBN;
185 }
186#ifndef EXCLUDE_A_VALUES
187 double acs =
188 pac->get_integral_ACS(ns, e1, e2) / (e2 - e1) * C1_MEV2_MBN;
189#endif
190 check_econd11a(ics, < 0,
191 "na=" << na << " ns=" << ns << " ne=" << ne << '\n',
192 mcerr);
193 if (hmd->ACS[ne] > 0.0) {
194 acher[ne] = chereC[ne] * awq * ics / (hmd->ACS[ne] * C1_MEV2_MBN);
195#ifndef EXCLUDE_A_VALUES
196 acher_a[ne] = chereC[ne] * awq * acs / (hmd->ACS[ne] * C1_MEV2_MBN);
197#endif
198 } else {
199 acher[ne] = 0.0;
200#ifndef EXCLUDE_A_VALUES
201 acher_a[ne] = 0.0;
202#endif
203 }
204 }
205 // Calculate the integral.
206 double s = 0.;
207 for (long ne = 0; ne < qe; ne++) {
208 const double e1 = hmd->energy_mesh->get_e(ne);
209 const double ec = hmd->energy_mesh->get_ec(ne);
210 const double e2 = hmd->energy_mesh->get_e(ne + 1);
211 double r = pacs->get_integral_ACS(ns, e1, e2) * C1_MEV2_MBN * awq;
212 // Here it must be ACS to satisfy sum rule for Rutherford
213 check_econd11a(r, < 0.0, "na=" << na << " ns=" << ns << " na=" << na,
214 mcerr);
215 if (ec > hmd->min_ioniz_pot && ec < max_etransf) {
216 afruth[ne] = (s + 0.5 * r) * coefpa * Rruth[ne] / Z_mean;
217 check_econd11a(afruth[ne], < 0,
218 "na=" << na << " ns=" << ns << " na=" << na, mcerr);
219 } else {
220 afruth[ne] = 0.0;
221 }
222 s += r;
223#ifdef DEBUG_EnTransfCS
224 truth[ne] += afruth[ne];
225#endif
226 }
227 }
228 }
229 for (long ne = 0; ne < qe; ++ne) {
230 double s = 0.0;
231#ifndef EXCLUDE_A_VALUES
232 double s_a = 0.0;
233#endif
234 double e1 = hmd->energy_mesh->get_e(ne);
235 double ec = hmd->energy_mesh->get_ec(ne);
236 double e2 = hmd->energy_mesh->get_e(ne + 1);
237 double sqepsi = pow((1 + hmd->epsi1[ne]), 2) + pow(hmd->epsi2[ne], 2);
238 for (long na = 0; na < qa; na++) {
239 double awq = hmd->matter->weight_quan(na);
240 PassivePtr<const AtomPhotoAbsCS> pacs = hmd->apacs[na];
241 const long qs = pacs->get_qshell();
242 for (long ns = 0; ns < qs; ns++) {
243 double ics;
244 if (hmd->s_use_mixture_thresholds == 1) {
245 ics = pacs->get_integral_TICS(ns, e1, e2, hmd->min_ioniz_pot) /
246 (e2 - e1) * C1_MEV2_MBN;
247 } else {
248 ics = pacs->get_integral_ICS(ns, e1, e2) / (e2 - e1) * C1_MEV2_MBN;
249 }
250 double r1 = awq * log1C[ne] * coefpa * ics / (ec * Z_mean * sqepsi);
251 double r2 = awq * log2C[ne] * coefpa * ics / (ec * Z_mean * sqepsi);
252 double& r_adda = adda[na][ns][ne];
253 double& r_fruth = fruth[na][ns][ne];
254 r_adda = r1 + r2 + r_fruth;
255 if (r_adda < 0.0) r_adda = 0.0;
256
257#ifndef EXCLUDE_A_VALUES
258 double acs =
259 pacs->get_integral_ACS(ns, e1, e2) / (e2 - e1) * C1_MEV2_MBN;
260 double r1_a = awq * log1C[ne] * coefpa * acs / (ec * Z_mean * sqepsi);
261 double r2_a = awq * log2C[ne] * coefpa * acs / (ec * Z_mean * sqepsi);
262 double& r_adda_a = adda_a[na][ns][ne];
263 r_adda_a = r1_a + r2_a + fruth;
264 if (r_adda_a < 0.0) r_adda_a = 0.0;
265#endif
266 if (ec > hmd->min_ioniz_pot) {
267 r_adda += cher[na][ns][ne];
268 if (r_adda < 0.0) {
269 funnw.whdr(mcout);
270 mcout << "negative adda\n";
271 mcout << "na=" << na << " ns=" << ns << " ne=" << ne
272 << " adda[na][ns][ne] = " << adda[na][ns][ne] << '\n';
273 adda[na][ns][ne] = 0.0;
274 }
275 }
276#ifndef EXCLUDE_A_VALUES
277 adda_a[na][ns][ne] += cher[na][ns][ne];
278 check_econd11a(adda_a[na][ns][ne], < 0,
279 "na=" << na << " ns=" << ns << " na=" << na, mcerr);
280#endif
281 s += r_adda;
282#ifndef EXCLUDE_A_VALUES
283 s_a += r_adda_a;
284#endif
285 }
286 }
287 addaC[ne] = s;
288#ifndef EXCLUDE_A_VALUES
289 addaC_a[ne] = s_a;
290#endif
291 }
292
293 const double* aetemp = hmd->energy_mesh->get_ae();
294 PointCoorMesh<double, const double*> pcm_e(qe + 1, &(aetemp));
295 double emin = hmd->energy_mesh->get_emin();
296 double emax = hmd->energy_mesh->get_emax();
297
298 quanC = t_integ_step_ar<double, std::vector<double>,
299 PointCoorMesh<double, const double*> >(
300 pcm_e, addaC, emin, emax, 0) *
301 hmd->xeldens;
302
303#ifndef EXCLUDE_A_VALUES
304 quanC_a = t_integ_step_ar<double, std::vector<double>,
305 PointCoorMesh<double, const double*> >(
306 pcm_e, addaC_a, emin, emax, 0) *
307 hmd->xeldens;
308#endif
309
310 meanC = t_integ_step_ar<double, std::vector<double>,
311 PointCoorMesh<double, const double*> >(
312 pcm_e, addaC, emin, emax, 1) *
313 hmd->xeldens;
314
315#ifndef EXCLUDE_A_VALUES
316 meanC_a = t_integ_step_ar<double, std::vector<double>,
317 PointCoorMesh<double, const double*> >(
318 pcm_e, addaC_a, emin, emax, 1) *
319 hmd->xeldens;
320#endif
321 meanC1 = meanC;
322 const double coef = fine_structure_const * fine_structure_const * q2 * twopi /
323 (electron_mass_c2 * beta2) * hmd->xeldens;
324 if (s_simple_form) {
325 if (s_primary_electron == 0) {
326 if (max_etransf > hmd->energy_mesh->get_e(qe)) {
327 double e1 = hmd->energy_mesh->get_e(qe);
328 double e2 = max_etransf;
329 meanC1 += coef * (log(e2 / e1) - beta2 / max_etransf * (e2 - e1));
330 }
331 } else {
332 if (max_etransf > hmd->energy_mesh->get_e(qe)) {
333 double e1 = hmd->energy_mesh->get_e(qe);
334 double e2 = max_etransf;
335 meanC1 += coef * log(e2 / e1);
336 }
337 }
338 } else {
339 if (s_primary_electron == 0) {
340 if (max_etransf > hmd->energy_mesh->get_e(qe)) {
341 double e1 = hmd->energy_mesh->get_e(qe);
342 double e2 = max_etransf;
343 meanC1 += coef *
344 (log(e2 / e1) - beta2 / max_etransf * (e2 - e1) +
345 (e2 * e2 - e1 * e1) / (4.0 * particle_ener * particle_ener));
346 }
347#ifndef EXCLUDE_A_VALUES
348 meanC1_a = meanC_a;
349 if (max_etransf > hmd->energy_mesh->get_e(qe)) {
350 double e1 = hmd->energy_mesh->get_e(qe);
351 double e2 = max_etransf;
352 meanC1_a += coef * (log(e2 / e1) - beta2 / max_etransf * (e2 - e1) +
353 (e2 * e2 - e1 * e1) /
354 (4.0 * particle_ener * particle_ener));
355 }
356#endif
357 }
358 }
359
360 meaneleC = meanC / hmd->W;
361 meaneleC1 = meanC1 / hmd->W;
362
363 for (long na = 0; na < qa; na++) {
364 long qs = hmd->apacs[na]->get_qshell();
365 for (long ns = 0; ns < qs; ns++) {
366 quan[na][ns] = t_integ_step_ar<double, std::vector<double>,
367 PointCoorMesh<double, const double*> >(
368 pcm_e, adda[na][ns], emin, emax, 0) *
369 hmd->xeldens;
370#ifndef EXCLUDE_A_VALUES
371 quan_a[na][ns] = t_integ_step_ar<double, std::vector<double>,
372 PointCoorMesh<double, const double*> >(
373 pcm_e, adda_a[na][ns], emin, emax, 0) *
374 hmd->xeldens;
375#endif
376 mean[na][ns] = t_integ_step_ar<double, std::vector<double>,
377 PointCoorMesh<double, const double*> >(
378 pcm_e, adda[na][ns], emin, emax, 1) *
379 hmd->xeldens;
380#ifndef EXCLUDE_A_VALUES
381 mean_a[na][ns] = t_integ_step_ar<double, std::vector<double>,
382 PointCoorMesh<double, const double*> >(
383 pcm_e, adda_a[na][ns], emin, emax, 1) *
384 hmd->xeldens;
385#endif
386 }
387 }
388
389 for (long na = 0; na < qa; na++) {
390 long qs = hmd->apacs[na]->get_qshell();
391 for (long ns = 0; ns < qs; ns++) {
392 if (quan[na][ns] > 0.0)
393#ifndef EXCLUDE_VAL_FADDA
394 val_fadda[na][ns] =
395#endif
396 t_hispre_step_ar<double, std::vector<double>,
397 PointCoorMesh<double, const double*> >(
398 pcm_e, adda[na][ns], fadda[na][ns]);
399
400#ifndef EXCLUDE_A_VALUES
401 if (quan_a[na][ns] > 0.0)
402#ifndef EXCLUDE_VAL_FADDA
403 val_fadda_a[na][ns] =
404#endif
405 t_hispre_step_ar<double, std::vector<double>,
406 PointCoorMesh<double, const double*> >(
407 pcm_e, adda_a[na][ns], fadda_a[na][ns]);
408#endif
409 }
410 }
411
412 length_y0.resize(qe, 0.);
413 for (long ne = 0; ne < qe; ne++) {
414 const double k0 = hmd->energy_mesh->get_ec(ne) / (hbarc / cm);
415 const double det_value = 1.0 / (gamma * gamma) - hmd->epsi1[ne] * beta2;
416 length_y0[ne] = det_value > 0. ? beta / k0 * 1.0 / sqrt(det_value) : 0.;
417 }
418
419 log1C.clear();
420 log2C.clear();
421 chereC.clear();
422 chereCangle.clear();
423 Rruth.clear();
424#ifdef DEBUG_EnTransfCS
425 truth.clear();
426#endif
427 std::ofstream dcsfile;
428 dcsfile.open("dcs.txt", std::ios::out);
429 dcsfile << "# energy [MeV] vs. diff. cs per electron [Mbarn / MeV]\n";
430 for (int i = 0; i < qe; ++i) {
431 dcsfile << hmd->energy_mesh->get_ec(i) << " " << addaC[i] / C1_MEV2_MBN
432 << "\n";
433 }
434 dcsfile.close();
435
436 addaC.clear();
437#ifndef EXCLUDE_A_VALUES
438 addaC_a.clear();
439#endif
440 cher.clear();
441#ifndef EXCLUDE_A_VALUES
442 cher_a.clear();
443#endif
444 fruth.clear();
445 adda.clear();
446#ifndef EXCLUDE_A_VALUES
447 adda_a.clear();
448#endif
449#ifndef EXCLUDE_A_VALUES
450 fadda_a.clear();
451#endif
452#ifndef EXCLUDE_VAL_FADDA
453 val_fadda.clear();
454#ifndef EXCLUDE_A_VALUES
455 val_fadda_a.clear();
456#endif
457#endif
458 mean.clear();
459#ifndef EXCLUDE_A_VALUES
460 mean_a.clear();
461#endif
462}
#define EXCLUDE_A_VALUES
Definition: EnTransfCS.h:11
#define check_econd11a(a, signb, add, stream)
Definition: FunNameStack.h:172
#define mfunnamep(string)
Definition: FunNameStack.h:49
std::vector< std::vector< double > > quan
Definition: EnTransfCS.h:118
long particle_charge
Charge in units of electron charge (used square, sign does not matter).
Definition: EnTransfCS.h:36
std::vector< double > Rruth
term called R in my paper
Definition: EnTransfCS.h:60
std::vector< double > log2C
common second log without cs
Definition: EnTransfCS.h:57
double gamma_1
Lorentz factor - 1 (the best dimensionless measurement of speed).
Definition: EnTransfCS.h:39
std::vector< double > chereCangle
angle of Cherenkov's radiation
Definition: EnTransfCS.h:59
double particle_ener
Total energy [MeV].
Definition: EnTransfCS.h:34
std::vector< std::vector< double > > mean
Definition: EnTransfCS.h:119
std::vector< std::vector< std::vector< double > > > fadda
Integral, normalised to unity.
Definition: EnTransfCS.h:101
std::vector< double > log1C
common first log without cs
Definition: EnTransfCS.h:56
double particle_mass
Particle mass [MeV].
Definition: EnTransfCS.h:32
std::vector< std::vector< std::vector< double > > > fruth
Rutherford term.
Definition: EnTransfCS.h:97
int s_primary_electron
Flag that the primary particle is the electron.
Definition: EnTransfCS.h:50
PassivePtr< HeedMatterDef > hmd
Definition: EnTransfCS.h:52
std::vector< std::vector< std::vector< double > > > adda
Sum.
Definition: EnTransfCS.h:99
std::vector< double > chereC
Cherenkov's radiation.
Definition: EnTransfCS.h:58
double meaneleC1
Definition: EnTransfCS.h:90
std::vector< double > length_y0
Definition: EnTransfCS.h:125
std::vector< double > addaC
Sum of (ionization) differential cross-section terms.
Definition: EnTransfCS.h:68
std::vector< std::vector< std::vector< double > > > cher
Definition: EnTransfCS.h:95
double quanC
Integrated (ionization) cross-section.
Definition: EnTransfCS.h:70
double max_etransf
Max. energy transfer [MeV].
Definition: EnTransfCS.h:42
double lorbeta(const double gamma_1)
as function of .
Definition: lorgamma.cpp:23
DoubleAc pow(const DoubleAc &f, double p)
Definition: DoubleAc.cpp:337
const double C1_MEV2_MBN
T t_integ_step_ar(const M &mesh, const D &y, T x1, T x2, int xpower)
Definition: tline.h:897
DoubleAc sqrt(const DoubleAc &f)
Definition: DoubleAc.cpp:314
#define mcout
Definition: prstream.h:126
#define mcerr
Definition: prstream.h:128

Member Function Documentation

◆ copy()

virtual EnTransfCS * Heed::EnTransfCS::copy ( ) const
inlinevirtual

Reimplemented from Heed::RegPassivePtr.

Reimplemented in Garfield::HeedChamber.

Definition at line 29 of file EnTransfCS.h.

29{ return new EnTransfCS(*this); }
EnTransfCS()
Default constructor.
Definition: EnTransfCS.h:24

◆ print()

void Heed::EnTransfCS::print ( std::ostream &  file,
int  l 
) const
virtual

Reimplemented from Heed::RegPassivePtr.

Definition at line 464 of file EnTransfCS.cpp.

464 {
465 if (l <= 0) return;
466 Ifile << "EnTransfCS(l=" << l << "):\n";
467 indn.n += 2;
468 Ifile << "particle_mass=" << particle_mass
469 << " particle_ener=" << particle_ener
470 << " particle_charge=" << particle_charge << std::endl;
471 Ifile << "max_etransf=" << max_etransf << std::endl;
472 Ifile << "s_primary_electron=" << s_primary_electron << std::endl;
473 Ifile << "hmd:\n";
474 hmd->print(file, 1);
475#ifndef EXCLUDE_A_VALUES
476 Ifile << "quanC=" << quanC << " quanC_a=" << quanC_a << '\n';
477 Ifile << "meanC=" << meanC << " meanC_a=" << meanC_a << '\n';
478 Ifile << "meaneleC=" << meaneleC << '\n';
479 Ifile << "meanC1=" << meanC1 << " meanC1_a=" << meanC1_a << '\n';
480#else
481 Ifile << "quanC=" << quanC << '\n';
482 Ifile << "meanC=" << meanC << '\n';
483 Ifile << "meaneleC=" << meaneleC << '\n';
484 Ifile << "meanC1=" << meanC1 << '\n';
485#endif
486 Ifile << " meaneleC1=" << meaneleC1 << '\n';
487 if (l > 2) {
488 long qe = hmd->energy_mesh->get_q();
489 long ne;
490 if (l > 4) {
491#ifdef DEBUG_EnTransfCS
492 Ifile << " enerc, log1C, log2C, chereC, addaC, "
493 "chereCangle Rruth truth length_y0\n";
494#else
495 Ifile << " enerc, log1C, log2C, chereC, addaC, "
496 "chereCangle Rruth length_y0\n";
497#endif
498 for (ne = 0; ne < qe; ne++) {
499 Ifile << std::setw(12) << hmd->energy_mesh->get_ec(ne) << std::setw(12)
500 << log1C[ne] << std::setw(12) << log2C[ne] << std::setw(12)
501 << chereC[ne] << std::setw(12) << addaC[ne] << std::setw(12)
502 << chereCangle[ne] << std::setw(12) << Rruth[ne]
503#ifdef DEBUG_EnTransfCS
504 << std::setw(12) << truth[ne]
505#endif
506 << std::setw(12) << length_y0[ne] << '\n';
507 }
508 }
509 if (l > 3) {
510 long qa = hmd->matter->qatom();
511 long na;
512 Iprintn(file, hmd->matter->qatom());
513 for (na = 0; na < qa; na++) {
514 Iprintn(file, na);
515 long qs = hmd->apacs[na]->get_qshell();
516 long ns;
517 Iprintn(file, hmd->apacs[na]->get_qshell());
518 for (ns = 0; ns < qs; ns++) {
519 Iprintn(file, ns);
520 Ifile << "quan =" << std::setw(13) << quan[na][ns]
521 << " mean =" << std::setw(13) << mean[na][ns] << '\n';
522#ifndef EXCLUDE_A_VALUES
523 Ifile << "quan_a =" << std::setw(13) << quan_a[na][ns]
524 << " mean_a=" << std::setw(13) << mean_a[na][ns] << '\n';
525#endif
526#ifndef EXCLUDE_VAL_FADDA
527 Ifile << "val_fadda=" << std::setw(13) << val_fadda[na][ns]
528#ifndef EXCLUDE_A_VALUES
529 << " val_fadda_a=" << std::setw(13) << val_fadda_a[na][ns]
530#endif
531 << '\n';
532#endif
533 if (l > 5) {
534 Ifile << " enerc, cher, cher_a, fruth, adda, "
535 " adda_a, fadda, fadda_a\n";
536 for (ne = 0; ne < qe; ne++) {
537 Ifile << std::setw(12)
538 << hmd->energy_mesh->get_ec(ne)
539 // << std::setw(12) << flog1[na][ns][ne]
540 // << std::setw(12) << flog2[na][ns][ne]
541 << std::setw(12) << cher[na][ns][ne]
542#ifndef EXCLUDE_A_VALUES
543 << std::setw(12) << cher_a[na][ns][ne]
544#endif
545 // << std::setw(12) << ruth[na][ns][ne]
546 << std::setw(12) << fruth[na][ns][ne] << std::setw(12)
547 << adda[na][ns][ne]
548#ifndef EXCLUDE_A_VALUES
549 << std::setw(12) << adda_a[na][ns][ne]
550#endif
551 << std::setw(12) << fadda[na][ns][ne]
552#ifndef EXCLUDE_A_VALUES
553 << std::setw(12) << fadda_a[na][ns][ne]
554#endif
555 << '\n';
556 }
557 }
558 }
559 }
560 }
561 }
562 indn.n -= 2;
563}
indentation indn
Definition: prstream.cpp:15
#define Ifile
Definition: prstream.h:196
#define Iprintn(file, name)
Definition: prstream.h:205

Member Data Documentation

◆ adda

std::vector<std::vector<std::vector<double> > > Heed::EnTransfCS::adda

Sum.

Definition at line 99 of file EnTransfCS.h.

Referenced by EnTransfCS(), and print().

◆ addaC

std::vector<double> Heed::EnTransfCS::addaC

Sum of (ionization) differential cross-section terms.

Definition at line 68 of file EnTransfCS.h.

Referenced by EnTransfCS(), and print().

◆ cher

std::vector<std::vector<std::vector<double> > > Heed::EnTransfCS::cher

In the following arrays there are three indices: atom number in the matter, shell number in atom, energy Fraction of Cherenkov term.

Definition at line 95 of file EnTransfCS.h.

Referenced by EnTransfCS(), and print().

◆ chereC

std::vector<double> Heed::EnTransfCS::chereC

Cherenkov's radiation.

Definition at line 58 of file EnTransfCS.h.

Referenced by EnTransfCS(), and print().

◆ chereCangle

std::vector<double> Heed::EnTransfCS::chereCangle

angle of Cherenkov's radiation

Definition at line 59 of file EnTransfCS.h.

Referenced by EnTransfCS(), and print().

◆ fadda

std::vector<std::vector<std::vector<double> > > Heed::EnTransfCS::fadda

Integral, normalised to unity.

Definition at line 101 of file EnTransfCS.h.

Referenced by EnTransfCS(), Heed::HeedParticle::physics(), and print().

◆ fruth

std::vector<std::vector<std::vector<double> > > Heed::EnTransfCS::fruth

Rutherford term.

Definition at line 97 of file EnTransfCS.h.

Referenced by EnTransfCS(), and print().

◆ gamma_1

double Heed::EnTransfCS::gamma_1

Lorentz factor - 1 (the best dimensionless measurement of speed).

Definition at line 39 of file EnTransfCS.h.

Referenced by EnTransfCS().

◆ hmd

◆ length_y0

std::vector<double> Heed::EnTransfCS::length_y0

Definition at line 125 of file EnTransfCS.h.

Referenced by EnTransfCS(), and print().

◆ log1C

std::vector<double> Heed::EnTransfCS::log1C

common first log without cs

In the following arrays there is the only index: the energy. The meaning: the average value on the energy interval.

Definition at line 56 of file EnTransfCS.h.

Referenced by EnTransfCS(), and print().

◆ log2C

std::vector<double> Heed::EnTransfCS::log2C

common second log without cs

Definition at line 57 of file EnTransfCS.h.

Referenced by EnTransfCS(), and print().

◆ max_etransf

double Heed::EnTransfCS::max_etransf

Max. energy transfer [MeV].

Definition at line 42 of file EnTransfCS.h.

Referenced by EnTransfCS(), and print().

◆ mean

std::vector<std::vector<double> > Heed::EnTransfCS::mean

Definition at line 119 of file EnTransfCS.h.

Referenced by EnTransfCS(), and print().

◆ meanC

double Heed::EnTransfCS::meanC

Definition at line 80 of file EnTransfCS.h.

Referenced by EnTransfCS(), and print().

◆ meanC1

double Heed::EnTransfCS::meanC1

Definition at line 83 of file EnTransfCS.h.

Referenced by EnTransfCS(), Garfield::TrackHeed::GetStoppingPower(), and print().

◆ meaneleC

double Heed::EnTransfCS::meaneleC

Definition at line 89 of file EnTransfCS.h.

Referenced by EnTransfCS(), and print().

◆ meaneleC1

double Heed::EnTransfCS::meaneleC1

Definition at line 90 of file EnTransfCS.h.

Referenced by EnTransfCS(), and print().

◆ particle_charge

long Heed::EnTransfCS::particle_charge

Charge in units of electron charge (used square, sign does not matter).

Definition at line 36 of file EnTransfCS.h.

Referenced by EnTransfCS(), and print().

◆ particle_ener

double Heed::EnTransfCS::particle_ener

Total energy [MeV].

Definition at line 34 of file EnTransfCS.h.

Referenced by EnTransfCS(), and print().

◆ particle_mass

double Heed::EnTransfCS::particle_mass

Particle mass [MeV].

Definition at line 32 of file EnTransfCS.h.

Referenced by EnTransfCS(), and print().

◆ quan

std::vector<std::vector<double> > Heed::EnTransfCS::quan

In the following arrays there are two indices: atom number in the matter, shell number in atom.

Definition at line 118 of file EnTransfCS.h.

Referenced by EnTransfCS(), Heed::HeedParticle::physics(), and print().

◆ quanC

double Heed::EnTransfCS::quanC

Integrated (ionization) cross-section.

Definition at line 70 of file EnTransfCS.h.

Referenced by EnTransfCS(), Garfield::TrackHeed::GetClusterDensity(), and print().

◆ Rruth

std::vector<double> Heed::EnTransfCS::Rruth

term called R in my paper

Definition at line 60 of file EnTransfCS.h.

Referenced by EnTransfCS(), and print().

◆ s_primary_electron

int Heed::EnTransfCS::s_primary_electron

Flag that the primary particle is the electron.

Definition at line 50 of file EnTransfCS.h.

Referenced by EnTransfCS(), and print().

◆ s_simple_form

bool Heed::EnTransfCS::s_simple_form

Flag controlling the form of Rutherford scattering. For our purposes it is good to have simple form, so this variable is initialized to 1. Simple form means that there are two terms. The third term is assumed zero.

Definition at line 48 of file EnTransfCS.h.

Referenced by EnTransfCS().


The documentation for this class was generated from the following files: