Garfield++ 4.0
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
 Default constructor.
 
 EnTransfCS (double fparticle_mass, double fgamma_1, bool fs_primary_electron, HeedMatterDef *fhmd, long fparticle_charge=1)
 Constructor.
 
void print (std::ostream &file, int l) const
 
EnTransfCScopy () const
 

Public Attributes

double particle_mass = 0.
 Particle mass [MeV].
 
long particle_charge = 0
 Charge in units of electron charge (used square, sign does not matter).
 
double gamma_1 = 0.
 Lorentz factor - 1 (the best dimensionless measurement of speed).
 
double max_etransf = 0.
 Max. energy transfer [MeV].
 
bool s_simple_form = true
 
bool s_primary_electron = false
 Flag indicating whether the primary particle is an electron.
 
HeedMatterDefhmd = nullptr
 
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 = 0.
 Integrated (ionization) cross-section.
 
double meanC = 0.
 
double meanC1 = 0.
 
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
 Number of collisions / cm, for each atom and shell.
 
std::vector< std::vector< double > > mean
 First moment, for each atom and shell.
 
std::vector< double > length_y0
 

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 17 of file EnTransfCS.h.

Constructor & Destructor Documentation

◆ EnTransfCS() [1/2]

Heed::EnTransfCS::EnTransfCS ( )
default

Default constructor.

Referenced by copy().

◆ EnTransfCS() [2/2]

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

Constructor.

Definition at line 112 of file EnTransfCS.cpp.

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}
#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
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
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
EnergyMesh * energy_mesh
Definition: HeedMatterDef.h:39
static constexpr int s_use_mixture_thresholds
Definition: HeedMatterDef.h:90
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
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()

EnTransfCS * Heed::EnTransfCS::copy ( ) const
inline

Definition at line 26 of file EnTransfCS.h.

26{ return new EnTransfCS(*this); }
EnTransfCS()=default
Default constructor.

◆ print()

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

Definition at line 477 of file EnTransfCS.cpp.

477 {
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}
void print(std::ostream &file, int l) const
indentation indn
Definition: prstream.cpp:15
#define Ifile
Definition: prstream.h:195
#define Iprintn(file, name)
Definition: prstream.h:204

Member Data Documentation

◆ adda

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

Sum.

Definition at line 86 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 58 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 82 of file EnTransfCS.h.

Referenced by EnTransfCS(), and print().

◆ chereC

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

Cherenkov's radiation.

Definition at line 53 of file EnTransfCS.h.

Referenced by EnTransfCS(), and print().

◆ chereCangle

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

angle of Cherenkov's radiation

Definition at line 54 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 88 of file EnTransfCS.h.

Referenced by EnTransfCS(), and print().

◆ fruth

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

Rutherford term.

Definition at line 84 of file EnTransfCS.h.

Referenced by EnTransfCS(), and print().

◆ gamma_1

double Heed::EnTransfCS::gamma_1 = 0.

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

Definition at line 34 of file EnTransfCS.h.

Referenced by EnTransfCS(), and print().

◆ hmd

HeedMatterDef* Heed::EnTransfCS::hmd = nullptr

Definition at line 47 of file EnTransfCS.h.

Referenced by EnTransfCS(), and print().

◆ length_y0

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

Definition at line 109 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 51 of file EnTransfCS.h.

Referenced by EnTransfCS(), and print().

◆ log2C

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

common second log without cs

Definition at line 52 of file EnTransfCS.h.

Referenced by EnTransfCS(), and print().

◆ max_etransf

double Heed::EnTransfCS::max_etransf = 0.

Max. energy transfer [MeV].

Definition at line 37 of file EnTransfCS.h.

Referenced by EnTransfCS(), and print().

◆ mean

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

First moment, for each atom and shell.

Definition at line 101 of file EnTransfCS.h.

Referenced by EnTransfCS(), and print().

◆ meanC

double Heed::EnTransfCS::meanC = 0.

Definition at line 70 of file EnTransfCS.h.

Referenced by EnTransfCS(), and print().

◆ meanC1

double Heed::EnTransfCS::meanC1 = 0.

Definition at line 73 of file EnTransfCS.h.

Referenced by EnTransfCS(), and print().

◆ particle_charge

long Heed::EnTransfCS::particle_charge = 0

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

Definition at line 31 of file EnTransfCS.h.

Referenced by EnTransfCS(), and print().

◆ particle_mass

double Heed::EnTransfCS::particle_mass = 0.

Particle mass [MeV].

Definition at line 29 of file EnTransfCS.h.

Referenced by EnTransfCS(), and print().

◆ quan

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

Number of collisions / cm, for each atom and shell.

Definition at line 99 of file EnTransfCS.h.

Referenced by EnTransfCS(), and print().

◆ quanC

double Heed::EnTransfCS::quanC = 0.

Integrated (ionization) cross-section.

Definition at line 60 of file EnTransfCS.h.

Referenced by EnTransfCS(), and print().

◆ Rruth

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

term called R in my paper

Definition at line 55 of file EnTransfCS.h.

Referenced by EnTransfCS(), and print().

◆ s_primary_electron

bool Heed::EnTransfCS::s_primary_electron = false

Flag indicating whether the primary particle is an electron.

Definition at line 45 of file EnTransfCS.h.

Referenced by EnTransfCS(), and print().

◆ s_simple_form

bool Heed::EnTransfCS::s_simple_form = true

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 43 of file EnTransfCS.h.

Referenced by EnTransfCS().


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