Garfield++ 3.0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
PhotoAbsCS.h
Go to the documentation of this file.
1#ifndef PHOTOABSCS_H
2#define PHOTOABSCS_H
3
4#include <vector>
5#include <fstream>
6#include <cmath>
7#include <cfloat>
8#include <climits>
9#include <memory>
12
13namespace Heed {
14
15/// TRK sum rule [1/MeV], constant per one electron.
16constexpr double Thomas_sum_rule_const =
17 2 * CLHEP::pi2 * CLHEP::fine_structure_const / CLHEP::electron_mass_c2;
18/// TRK sum rule [Mb * MeV].
19constexpr double Thomas_sum_rule_const_Mb =
21
22/// Photoabsorption cross-section base class.
23///
24/// The literature data on photoabsorption cross section are fragmentar and
25/// not always consistent. This class hierarchy is designed to
26/// gather them in a consistent library.
27/// The principle is ordinary: definition of an abstract class
28/// which defines the interface available for the rest of program,
29/// and definition of derived classes with this or that realization.
30/// To the contrary with wcpplib/matter, there is no any global "database"
31/// and no formal ban to duplicate these definitions.
32/// So these are simple classes determining photoabsorption
33/// cross sections for atomic shells, for atoms, and for molecules.
34/// Also the atomic relaxation cascades are defined.
35/// The system requires some memory for keeping data, and some disk files
36/// with input information. It takes some time for initializations, so
37/// it is not intended to be used in a loop.
38/// In the fortran version of HEED, the equivalent data structure
39/// kept in a common block was depending on energy mesh.
40/// But in this C++ version it was found possible to avoid this dependence.
41/// The data are kept and handled as is, without unnecessary conversions.
42/// This improves precision of handling energies near ionization thresholds.
43///
44/// 2004, I. Smirnov
45
47 public:
48 /// Default constructor.
49 PhotoAbsCS();
50 /// Constructor
51 PhotoAbsCS(const std::string& fname, int fZ, double fthreshold);
52 /// Destructor
53 virtual ~PhotoAbsCS() {}
54
55 /// Name of this shell or atom.
56 const std::string& get_name() const { return name; }
57 /// Number of this shell.
58 int get_number() const { return number; }
59 /// Charge or number of electrons at this shell or in this atom
60 /// (in principle the integral of CS should
61 /// satisfy the Thomas-Reiche-Kuhn sum rule).
62 int get_Z() const { return Z; }
63 /// Return the threshold energy.
64 double get_threshold() const { return threshold; }
65 /// Retrieve cross-section [Mb] at a given energy [MeV].
66 virtual double get_CS(double energy) const = 0;
67 /// Retrieve integral cross-section [Mb * MeV] in a given interval [MeV].
68 virtual double get_integral_CS(double energy1, double energy2) const = 0;
69 /// Multiply by some factor. Can be useful for debugging and other purposes.
70 virtual void scale(double fact) = 0;
71
72 virtual void print(std::ostream& file, int l) const;
73 virtual PhotoAbsCS* copy() const = 0;
74
75 protected:
76 std::string name;
77 int number = 0;
78 int Z;
79 double threshold; // in MeV
80};
81
82/// Smoothed/smeared photoabsorption cross-section
84 std::shared_ptr<PhotoAbsCS> real_pacs;
85 double width;
86 /// Max. number of integration steps (in get_integral_CS).
87 /// If real q is more, the function calls PhotoAbsCs::get_integral_CS.
88 long max_q_step;
89 /// Integration step, for example, 1/20 of the width.
90 double step;
91
92 public:
93 /// Default constructor.
95 /** Constructor.
96 * \param apacs
97 photoabsorption cross-section
98 * \param fwidth
99 width [MeV] for smoothing
100 * \param fstep
101 step size [MeV] for numerical integration
102 * \param fmax_q_step
103 max number of integration steps
104 */
105 AveragePhotoAbsCS(PhotoAbsCS* apacs, double fwidth, double fstep,
106 long fmax_q_step);
107 /// Destructor
109 double get_CS(double energy) const override;
110 double get_integral_CS(double energy1, double energy2) const override;
111
112 void scale(double fact) override;
113
114 void print(std::ostream& file, int l) const override;
115 AveragePhotoAbsCS* copy() const override {
116 return new AveragePhotoAbsCS(*this);
117 }
118};
119
120/// Hydrogen: empirical fit of Kosarev & Podoliak.
121/// Original formula for molecular hydrogen.
122/// Since this class for separated shell, we divide the molecular CS by two.
124 public:
125 /// Constructor
127 /// Destructor
129 double get_CS(double energy) const override;
130 double get_integral_CS(double energy1, double energy2) const override;
131 void scale(double fact) override;
132
133 void print(std::ostream& file, int l) const override;
134 HydrogenPhotoAbsCS* copy() const override {
135 return new HydrogenPhotoAbsCS(*this);
136 }
137
138 private:
139 double prefactor = 1.;
140};
141
142/// Typically this is for reading Experimental CS, for example of argon,
143/// as if there is one shell.
144/// File is two-column table, the first row is energy in eV,
145/// the second one is CS in Mbarn.
146/// The points are understood as local points.
147/// The interpolation between them are either straight or by power
148/// function.
149/// the choice is determined by function sign_nonlinear_interpolation
150/// (see above).
151/// If the first point is not zero cross section,
152/// and the threshold is to the left,
153/// the straight extrapolation is performed from the two edge points.
154/// The extrapolation to the right is performed to the end of
155/// the energy mesh by power function with power -2.75.
156/// The minimal number of points is 2, as in PointCoorMesh from tline.h
157/// The zero number of points is allowed as well.
158/// Then the cross section is assumed to be zero.
159
161 public:
162 /// Default constructor.
164 /// Constructor for reading table from file.
165 SimpleTablePhotoAbsCS(const std::string& fname, int fZ, double fthreshold,
166 const std::string& ffile_name);
167 /// Constructor from given energy and cross-section tables.
168 SimpleTablePhotoAbsCS(const std::string& fname, int fZ, double fthreshold,
169 const std::vector<double>& fener,
170 const std::vector<double>& fcs);
171 /// Constructor from fit parameters.
172 /// Fit formula from Band-Band-Trzaskovskaya et al.
173 /// It is difficult to integrate those formulas analytically,
174 /// so I create numerical array and treat it as input data.
175 SimpleTablePhotoAbsCS(const std::string& fname, int fZ, double fthreshold,
176 int l, double E0, double yw, double ya, double P,
177 double sigma);
178 /// Replace part of the cross-section table.
180 const SimpleTablePhotoAbsCS& part, double emax_repl);
181 /// Destructor
183 /// Remove points with zero cross-section from the table.
185 /// Remove points with cross section below a given level from the table.
186 /// The function is designed for Henke tables, which are prepared for database
187 /// with leading values like 1.0e-15 .
188 /// Both functions allow to use the straight interpolation to threshold
189 void remove_leading_tiny(double level);
190
191 double get_CS(double energy) const override;
192 double get_integral_CS(double energy1, double energy2) const override;
193 const std::vector<double>& get_arr_ener() const { return ener; }
194 const std::vector<double>& get_arr_CS() const { return cs; }
195 void scale(double fact) override;
196 void print(std::ostream& file, int l) const override;
197 SimpleTablePhotoAbsCS* copy() const override {
198 return new SimpleTablePhotoAbsCS(*this);
199 }
200
201 private:
202 /// Filename (saved for printing).
203 std::string file_name;
204 /// Table of energies [MeV].
205 std::vector<double> ener;
206 /// Cross-section values at these energies.
207 std::vector<double> cs;
208};
209
210/// Simple phenomenological CS for any shell (analytic formula).
212 public:
213 /// Default constructor.
215 /** Constructor
216 * \param fname name of the shell or atom
217 * \param fZ number of electrons
218 * \param fthreshold threshold level
219 * \param fpower positive number \f$x\f$ in \f$1/E^{-x}\f$
220 */
221 PhenoPhotoAbsCS(const std::string& fname, int fZ, double fthreshold,
222 double fpower = 2.75);
223 /// Destructor.
224 virtual ~PhenoPhotoAbsCS() {}
225
226 double get_CS(double energy) const override;
227 double get_integral_CS(double energy1, double energy2) const override;
228 void scale(double fact) override;
229 void print(std::ostream& file, int l) const override;
230 PhenoPhotoAbsCS* copy() const override { return new PhenoPhotoAbsCS(*this); }
231
232 private:
233 double power;
234 double factor;
235};
236
237/// Sampling of secondary particles.
238/// The initial photo-electron is not included.
239/// The photo-electron is completely independent on the secondary channel
240/// and it always has an energy equal to transferred energy minus shell energy.
241/// This class proposes particles which can be emitted at filling this shell.
242/// This class can be interpreted as an additional channels for
243/// the default one.
244/// The sum of channel_prob_dens may be less than unity.
245/// The concrete channel for the particular event is sampled by get_channel().
246/// If the random sampling does not point to one of the channels registering
247/// in this class, get_channel returns 0, which must be interpreted as
248/// the use of standard channel.
249
251 public:
252 /// Constructor
255 /// Destructor
257 /// Sample a channel (photon and electron energies in MeV).
258 /// Return 1 if the channel is generated and 0 if not.
259 int get_channel(std::vector<double>& felectron_energy,
260 std::vector<double>& fphoton_energy) const;
261
262 /** Add new decay channel. Should be used at initialization.
263 * \param fchannel_prob_dens probability for this channel.
264 * \param felectron_energy electron energies [MeV]
265 * \param fphoton_energy photon energies [MeV]
266 * \param s_all_rest if 1, the probability of this channel is assigned
267 to that what is left to 1.
268 fchannel_prob_dens is then ignored, it can be just 0.
269 */
270 void add_channel(double fchannel_prob_dens,
271 const std::vector<double>& felectron_energy,
272 const std::vector<double>& fphoton_energy,
273 int s_all_rest = 0);
274
275 void print(std::ostream& file, int l) const;
276
277 protected:
278 // Probability of specific channel.
279 std::vector<double> channel_prob_dens;
280 // Arrays of decay products for each channel.
281 std::vector<std::vector<double> > electron_energy;
282 std::vector<std::vector<double> > photon_energy;
283};
284
285/// Atomic photoabsorption cross-section abstract base class.
287 public:
288 /// Default constructor.
290
291 /// Get the atomic number.
292 int get_Z() const { return Z; }
293 /// Get the number of shells.
294 inline unsigned int get_qshell() const { return qshell; }
295 /// Get the ionization threshold for a given shell.
296 virtual double get_threshold(int nshell) const = 0;
297 /// Get the lowest ionization threshold among all shells.
298 virtual double get_I_min() const;
299 /// Photo-absorption cross-section [Mbarn] at a given energy [MeV].
300 /// The photo-absorption cross-section can include excitation.
301 virtual double get_ACS(double energy) const = 0;
302 /// Integrated photo-absorption cross-section overa given interval.
303 virtual double get_integral_ACS(double energy1, double energy2) const = 0;
304 /// Sub-shell photo-absorption cross-section [Mbarn] at a given energy [MeV].
305 virtual double get_ACS(int nshell, double energy) const = 0;
306 /// Integrated sub-shell photo-absorption cross-section.
307 virtual double get_integral_ACS(int nshell, double energy1,
308 double energy2) const = 0;
309
310 /// Photo-ionization cross-section [Mbarn] at a given energy [MeV].
311 /// The photo-ionization cross-section does not include excitation.
312 virtual double get_ICS(double energy) const = 0;
313 /// Photo-ionization cross-section assuming a redefined ionization threshold.
314 /// This function can be useful for redefining the ionization threshold in
315 /// atomic mixtures, where on atom can transfer excitations to another one
316 /// with lower ionization threshold (Penning/Jesse effect).
317 virtual double get_TICS(double energy,
318 double factual_minimal_threshold) const;
319 /// Integrated photo-ionization cross-section over a given interval.
320 virtual double get_integral_ICS(double energy1, double energy2) const = 0;
321 /// Integral photo-ionization cross-section with redefined threshold.
322 virtual double get_integral_TICS(double energy1, double energy2,
323 double factual_minimal_threshold) const;
324 /// Sub-shell photo-ionization cross-section at a given energy.
325 virtual double get_ICS(int nshell, double energy) const = 0;
326 /// Sub-shell photo-ionization cross-section with redefined threshold.
327 virtual double get_TICS(int nshell, double energy,
328 double factual_minimal_threshold) const;
329 /// Integrated sub-shell photo-ionization cross-section.
330 virtual double get_integral_ICS(int nshell, double energy1,
331 double energy2) const = 0;
332 /// Integrated sub-shell photo-ionization cross-section (redefined threshold).
333 virtual double get_integral_TICS(int nshell, double energy1, double energy2,
334 double factual_minimal_threshold) const;
335
336 /** Sample the electrons and photons emitted following
337 * ionisation of a given shell.
338 * \param nshell
339 shell index
340 * \param energy
341 can be a little bit below threshold
342 * \param el_energy
343 electron energies. The photo-electron is the first one.
344 Later (in HeedPhoton) the photo-electron is emitted in the
345 forward direction. The other are sampled isotropically.
346 * \param ph_energy
347 photon energies
348 */
349 virtual void get_escape_particles(const int nshell, double energy,
350 std::vector<double>& el_energy,
351 std::vector<double>& ph_energy) const;
352
353 /// Return the shell number (1, 2, ...) for a given index.
354 /// The number is taken from the shell name.
355 /// If the shell number cannot be determined, the function returns -1.
356 virtual int get_main_shell_number(int nshell) const = 0;
357
358 /// Deactivate a sub-shell. Set s_ignore_shell flag to true.
359 virtual void remove_shell(int nshell);
360 /// Activate a sub-shell. Set s_ignore_shell flag to false.
361 virtual void restore_shell(int nshell);
362 virtual void print(std::ostream& file, int l) const;
363 virtual AtomPhotoAbsCS* copy() const = 0;
364
365 AtomicSecondaryProducts* get_asp(int nshell);
366
367 protected:
368 /// Name of the atom.
369 std::string name;
370 /// Atomic number.
371 int Z;
372 /// Number of shells.
374 /// Array of flags whether to use a shell (false) or ignore it (true).
375 /// It does not affect threshold and escape sequences.
376 /// By default all elements are set to false.
377 // Assumed manipulate with larger shells, to investigate their
378 // influence at the final characteristics.
379 std::vector<bool> s_ignore_shell;
380 /// Sampling of relaxation products for each shell.
381 std::vector<AtomicSecondaryProducts> asp;
382};
383std::ostream& operator<<(std::ostream& file, const AtomPhotoAbsCS& f);
384
385/// Simple atomic photoabsorption cross-section
386/// (no difference between absorption and ionization).
387
389 public:
390 /// Default constructor.
392 /// Constructor for reading name and shell energies from file.
393 /// Generates the CS by PhenoPhotoAbsCS.
394 SimpleAtomPhotoAbsCS(int fZ, const std::string& ffile_name);
395 /// Constructor with one prepared preliminary shell with Z electrons.
396 /// Convenient for hydrogen.
397 SimpleAtomPhotoAbsCS(int fZ, std::shared_ptr<PhotoAbsCS> fasc);
398 /// Destructor
400
401 virtual double get_threshold(int nshell) const;
402 virtual double get_ACS(double energy) const;
403 virtual double get_integral_ACS(double energy1, double energy2) const;
404 virtual double get_ACS(int nshell, double energy) const;
405 virtual double get_integral_ACS(int nshell, double energy1,
406 double energy2y) const;
407 virtual double get_ICS(double energy) const;
408 virtual double get_integral_ICS(double energy1, double energy2) const;
409 virtual double get_ICS(int nshell, double energy) const;
410 virtual double get_integral_ICS(int nshell, double energy1,
411 double energy2) const;
412
413 virtual int get_main_shell_number(int nshell) const {
414 return m_acs[nshell]->get_number();
415 }
416 virtual void print(std::ostream& file, int l) const;
417 virtual SimpleAtomPhotoAbsCS* copy() const {
418 return new SimpleAtomPhotoAbsCS(*this);
419 }
420
421 protected:
422 /// Filename (saved for printing).
423 std::string file_name;
424 std::vector<std::shared_ptr<PhotoAbsCS> > m_acs;
425};
426
427constexpr double low_boundary_of_excitations = 0.7; // from ionization threshold
428
429/// Atomic photo-absorption with excitation.
431 public:
432 virtual double get_threshold(int nshell) const;
433 virtual double get_ACS(double energy) const;
434 virtual double get_integral_ACS(double energy1, double energy2) const;
435 virtual double get_ACS(int nshell, double energy) const;
436 virtual double get_integral_ACS(int nshell, double energy1,
437 double energy2) const;
438
439 virtual double get_ICS(double energy) const;
440 virtual double get_integral_ICS(double energy1, double energy2) const;
441 virtual double get_ICS(int nshell, double energy) const;
442 virtual double get_integral_ICS(int nshell, double energy1,
443 double energy2) const;
444
445 virtual int get_main_shell_number(int nshell) const {
446 return m_acs[nshell]->get_number();
447 }
448
449 // Width [MeV]
450 void replace_shells_by_average(double fwidth, double fstep, long fmax_q_step);
451 virtual void print(std::ostream& file, int l) const;
452 virtual ExAtomPhotoAbsCS* copy() const { return new ExAtomPhotoAbsCS(*this); }
453
454 /// Default constructor.
456
457 /** Constructor,
458 * \param fZ
459 atomic number
460 * \param fthreshold_file_name
461 file from which to read name and shell energies
462 * \param fsimple_table_file_name
463 file from which to read the cross-sections
464 * \param fname
465 name of the atom, if "none" it is taken from fthreshold_file_name
466 * \param fminimal_threshold
467 threshold
468 */
469 ExAtomPhotoAbsCS(int fZ, const std::string& fthreshold_file_name,
470 const std::string& fsimple_table_file_name,
471 const std::string& fname = "none",
472 double fminimal_threshold = 0.0);
473
474 /** Constructor, shells from Band and Thragzkovskaya.
475 * \param fZ
476 atomic number
477 * \param fname
478 name of the atom
479 * \param fBT_file_name
480 file with shell names and energies
481 * \param id
482 1 - old files without fluorescence rate
483 2 - new files with fluorescence rate
484 other values - error
485 * \param fminimal_threshold
486 threshold
487 */
488 ExAtomPhotoAbsCS(int fZ, const std::string& fname,
489 const std::string& fBT_file_name, int id,
490 double fminimal_threshold = 0.0);
491
492 /** Constructor, shells and fit parameters from Band and Thragzkovskaya.
493 * \param fZ
494 atomic number
495 * \param fname
496 name of the atom
497 * \param fFitBT_file_name
498 file with shell names, energies, and fit parameters
499 * \param id
500 1 - old files without fluorescence rate
501 2 - new files with fluorescence rate
502 other values - error
503 * \param s_no_scale
504 scaling is not done, needs for next (?)
505 * \param fminimal_threshold
506 threshold
507 **/
508 ExAtomPhotoAbsCS(int fZ, const std::string& fname,
509 const std::string& fFitBT_file_name,
510 int id, int s_no_scale,
511 double fminimal_threshold = 0.0);
512
513 /** Constructor, combination of Band and Thragzkovskaya fit and Henke tables.
514 * Initialize BT fit and replaces the part of the first shell
515 * from threshold taken from BT- fit to emax_repl by values from the table.
516 * \param fZ
517 atomic number
518 * \param fname
519 name of the atom
520 * \param fFitBT_file_name
521 file with shell names, energies, and fit parameters
522 * \param fsimple_table_file_name
523 file with cross-section table
524 * \param emax_repl
525 energy up to which to use the cross-section table
526 * \param id
527 1 - old files without fluorescence rate
528 2 - new files with fluorescence rate
529 other values - error
530 * \param fminimal_threshold
531 threshold
532 **/
533 ExAtomPhotoAbsCS(int fZ, const std::string& fname,
534 const std::string& fFitBT_file_name,
535 const std::string& fsimple_table_file_name, double emax_repl,
536 int id, double fminimal_threshold = 0.0);
537 /// Destructor.
538 virtual ~ExAtomPhotoAbsCS() {}
539
540 protected:
543 std::string BT_file_name;
544 /// Ionization cross-section (the name acs is misleading).
545 /// Excitations are added separately as height_of_excitation.
546 std::vector<std::shared_ptr<PhotoAbsCS> > m_acs;
547
548 // 3 variables for printing listings
552 /// Excitation cross-section (assumed in the lowest shell).
554 /// Boundaries of excitation.
555 double exener[2];
556
557 double minimal_threshold; // make shifts if necessary
558 // The shells are corrected on the minimal_threshold "on the fly".
559 // It the threshold of the atomic shell is less then minimal_threshold,
560 // the difference is subtracted from the energy for which
561 // the cross section is requested.
562 // exener[2] is corrected at initialization in first main constructor.
563 // In the second one there is no implementation of minimal_threshold so far.
564
565 /// Flag whether to add excitations.
566 /// If 0 excitations will not be added (useful for debugging and for checking
567 /// the effect produced by adding excitations). For real work, this variable
568 /// should always be set to 1.
569 static const int s_add_excitations_to_normalize = 1;
570 static const int s_scale_to_normalize_if_more = 1;
571};
572
573//---------------------------------------------------------
574
575constexpr double standard_factor_Fano = 0.19;
576
577#define CALC_W_USING_CHARGES
578// the opposite is just averaging potentials
579// This way is averaging potentials with taking into account charges.
580// So the atom or molecule with larger charge will affect more -
581// this looks much more reasonable.
582// The opposite case is preserved for debug and research purposes.
583// F is calculated by the same way as W
584
585constexpr double coef_I_to_W = 2.0;
586
587/// Molecular photoabsorption cross-section.
588/// Molecules refer to atoms by passive pointers.
589/// If atom is changed, its image for molecule is also changed.
590
592 public:
593 /// Total number of atoms of all sorts in the molecule.
594 int get_qatom() const { return qatom; }
595 /// Number of atoms of a particular sort in the molecule.
596 int get_qatom_ps(const int n) const { return qatom_ps[n]; }
597 const AtomPhotoAbsCS* get_atom(const int n) {
598 return atom[n];
599 }
600
601 /// Photo-absorption cross-section [Mbarn] at a given energy [MeV].
602 double get_ACS(double energy) const;
603 /// Integral photo-absorption cross-section.
604 double get_integral_ACS(double energy1, double energy2) const;
605 /// Photo-ionization cross-section [Mbarn] at a given energy [MeV].
606 double get_ICS(double energy) const;
607 /// Integral photo-ionization cross-section.
608 double get_integral_ICS(double energy1, double energy2) const;
609
610 /// Sum up the atomic numbers of all atoms in the molecule.
611 int get_total_Z() const;
612 /// Retrieve W value [MeV].
613 double get_W() const { return W; }
614 /// Retrieve Fano factor.
615 double get_F() const { return F; }
616
617 /// Default constructor.
618 MolecPhotoAbsCS() = default;
619 /// Constructor for one sort of atoms.
620 /// If fW == 0.0, the program assigns it as 2 * mean(I_min).
621 MolecPhotoAbsCS(const AtomPhotoAbsCS* fatom, int fqatom, double fW = 0.0,
622 double fF = standard_factor_Fano);
623 /// Constructor for two sorts of atoms.
624 /// If fW == 0.0, the program assigns it as 2 * mean(I_min).
625 MolecPhotoAbsCS(const AtomPhotoAbsCS* fatom1, int fqatom_ps1,
626 const AtomPhotoAbsCS* fatom2, int fqatom_ps2, double fW = 0.0,
627 double fF = standard_factor_Fano);
628 /// Constructor for three sorts of atoms.
629 /// If fW == 0.0, the program assigns it as 2 * mean(I_min).
630 MolecPhotoAbsCS(const AtomPhotoAbsCS* fatom1, int fqatom_ps1,
631 const AtomPhotoAbsCS* fatom2, int fqatom_ps2,
632 const AtomPhotoAbsCS* fatom3, int fqatom_ps3, double fW = 0.0,
633 double fF = standard_factor_Fano);
634 /// Destructor
636 void print(std::ostream& file, int l) const;
637
638 private:
639 /// Total number of atoms, NOT number of sorts, NOT qel in atom.
640 int qatom = 0;
641 std::vector<int> qatom_ps;
642 std::vector<const AtomPhotoAbsCS*> atom;
643 /// Mean work per pair production [MeV].
644 double W = 0.;
645 /// Fano factor.
646 double F = standard_factor_Fano;
647};
648std::ostream& operator<<(std::ostream& file, const MolecPhotoAbsCS& f);
649}
650
651#endif
Atomic photoabsorption cross-section abstract base class.
Definition: PhotoAbsCS.h:286
AtomPhotoAbsCS()
Default constructor.
Definition: PhotoAbsCS.cpp:580
std::vector< bool > s_ignore_shell
Definition: PhotoAbsCS.h:379
int Z
Atomic number.
Definition: PhotoAbsCS.h:371
virtual void remove_shell(int nshell)
Deactivate a sub-shell. Set s_ignore_shell flag to true.
Definition: PhotoAbsCS.cpp:623
std::string name
Name of the atom.
Definition: PhotoAbsCS.h:369
virtual double get_I_min() const
Get the lowest ionization threshold among all shells.
Definition: PhotoAbsCS.cpp:667
virtual double get_ACS(double energy) const =0
virtual double get_integral_ICS(double energy1, double energy2) const =0
Integrated photo-ionization cross-section over a given interval.
virtual int get_main_shell_number(int nshell) const =0
virtual double get_ICS(int nshell, double energy) const =0
Sub-shell photo-ionization cross-section at a given energy.
virtual void print(std::ostream &file, int l) const
Definition: PhotoAbsCS.cpp:635
virtual double get_TICS(double energy, double factual_minimal_threshold) const
Definition: PhotoAbsCS.cpp:582
int get_Z() const
Get the atomic number.
Definition: PhotoAbsCS.h:292
virtual double get_threshold(int nshell) const =0
Get the ionization threshold for a given shell.
virtual double get_ICS(double energy) const =0
virtual AtomPhotoAbsCS * copy() const =0
virtual double get_ACS(int nshell, double energy) const =0
Sub-shell photo-absorption cross-section [Mbarn] at a given energy [MeV].
virtual double get_integral_TICS(double energy1, double energy2, double factual_minimal_threshold) const
Integral photo-ionization cross-section with redefined threshold.
Definition: PhotoAbsCS.cpp:593
virtual void restore_shell(int nshell)
Activate a sub-shell. Set s_ignore_shell flag to false.
Definition: PhotoAbsCS.cpp:629
virtual double get_integral_ACS(int nshell, double energy1, double energy2) const =0
Integrated sub-shell photo-absorption cross-section.
virtual double get_integral_ICS(int nshell, double energy1, double energy2) const =0
Integrated sub-shell photo-ionization cross-section.
int qshell
Number of shells.
Definition: PhotoAbsCS.h:373
unsigned int get_qshell() const
Get the number of shells.
Definition: PhotoAbsCS.h:294
virtual void get_escape_particles(const int nshell, double energy, std::vector< double > &el_energy, std::vector< double > &ph_energy) const
Definition: PhotoAbsCS.cpp:675
std::vector< AtomicSecondaryProducts > asp
Sampling of relaxation products for each shell.
Definition: PhotoAbsCS.h:381
AtomicSecondaryProducts * get_asp(int nshell)
Definition: PhotoAbsCS.cpp:853
virtual double get_integral_ACS(double energy1, double energy2) const =0
Integrated photo-absorption cross-section overa given interval.
~AtomicSecondaryProducts()
Destructor.
Definition: PhotoAbsCS.h:256
int get_channel(std::vector< double > &felectron_energy, std::vector< double > &fphoton_energy) const
Definition: PhotoAbsCS.cpp:506
AtomicSecondaryProducts()
Constructor.
Definition: PhotoAbsCS.h:253
void print(std::ostream &file, int l) const
Definition: PhotoAbsCS.cpp:549
std::vector< std::vector< double > > electron_energy
Definition: PhotoAbsCS.h:281
std::vector< std::vector< double > > photon_energy
Definition: PhotoAbsCS.h:282
void add_channel(double fchannel_prob_dens, const std::vector< double > &felectron_energy, const std::vector< double > &fphoton_energy, int s_all_rest=0)
Definition: PhotoAbsCS.cpp:469
std::vector< double > channel_prob_dens
Definition: PhotoAbsCS.h:279
Smoothed/smeared photoabsorption cross-section.
Definition: PhotoAbsCS.h:83
void scale(double fact) override
Multiply by some factor. Can be useful for debugging and other purposes.
Definition: PhotoAbsCS.cpp:145
AveragePhotoAbsCS * copy() const override
Definition: PhotoAbsCS.h:115
double get_CS(double energy) const override
Retrieve cross-section [Mb] at a given energy [MeV].
Definition: PhotoAbsCS.cpp:117
AveragePhotoAbsCS()
Default constructor.
Definition: PhotoAbsCS.h:94
void print(std::ostream &file, int l) const override
Definition: PhotoAbsCS.cpp:150
double get_integral_CS(double energy1, double energy2) const override
Retrieve integral cross-section [Mb * MeV] in a given interval [MeV].
Definition: PhotoAbsCS.cpp:126
virtual ~AveragePhotoAbsCS()
Destructor.
Definition: PhotoAbsCS.h:108
Atomic photo-absorption with excitation.
Definition: PhotoAbsCS.h:430
void replace_shells_by_average(double fwidth, double fstep, long fmax_q_step)
virtual int get_main_shell_number(int nshell) const
Definition: PhotoAbsCS.h:445
std::string BT_file_name
Definition: PhotoAbsCS.h:543
double height_of_excitation
Excitation cross-section (assumed in the lowest shell).
Definition: PhotoAbsCS.h:553
virtual double get_threshold(int nshell) const
Get the ionization threshold for a given shell.
static const int s_add_excitations_to_normalize
Definition: PhotoAbsCS.h:569
virtual ExAtomPhotoAbsCS * copy() const
Definition: PhotoAbsCS.h:452
double exener[2]
Boundaries of excitation.
Definition: PhotoAbsCS.h:555
std::vector< std::shared_ptr< PhotoAbsCS > > m_acs
Definition: PhotoAbsCS.h:546
virtual double get_integral_ACS(double energy1, double energy2) const
Integrated photo-absorption cross-section overa given interval.
virtual double get_ACS(double energy) const
static const int s_scale_to_normalize_if_more
Definition: PhotoAbsCS.h:570
std::string threshold_file_name
Definition: PhotoAbsCS.h:541
virtual ~ExAtomPhotoAbsCS()
Destructor.
Definition: PhotoAbsCS.h:538
ExAtomPhotoAbsCS()
Default constructor.
Definition: PhotoAbsCS.h:455
std::string simple_table_file_name
Definition: PhotoAbsCS.h:542
virtual void print(std::ostream &file, int l) const
virtual double get_ICS(double energy) const
virtual double get_integral_ICS(double energy1, double energy2) const
Integrated photo-ionization cross-section over a given interval.
void scale(double fact) override
Multiply by some factor. Can be useful for debugging and other purposes.
Definition: PhotoAbsCS.cpp:184
HydrogenPhotoAbsCS()
Constructor.
Definition: PhotoAbsCS.cpp:161
virtual ~HydrogenPhotoAbsCS()
Destructor.
Definition: PhotoAbsCS.h:128
double get_integral_CS(double energy1, double energy2) const override
Retrieve integral cross-section [Mb * MeV] in a given interval [MeV].
Definition: PhotoAbsCS.cpp:172
double get_CS(double energy) const override
Retrieve cross-section [Mb] at a given energy [MeV].
Definition: PhotoAbsCS.cpp:166
void print(std::ostream &file, int l) const override
Definition: PhotoAbsCS.cpp:186
HydrogenPhotoAbsCS * copy() const override
Definition: PhotoAbsCS.h:134
double get_ACS(double energy) const
Photo-absorption cross-section [Mbarn] at a given energy [MeV].
double get_W() const
Retrieve W value [MeV].
Definition: PhotoAbsCS.h:613
int get_qatom_ps(const int n) const
Number of atoms of a particular sort in the molecule.
Definition: PhotoAbsCS.h:596
int get_total_Z() const
Sum up the atomic numbers of all atoms in the molecule.
double get_ICS(double energy) const
Photo-ionization cross-section [Mbarn] at a given energy [MeV].
const AtomPhotoAbsCS * get_atom(const int n)
Definition: PhotoAbsCS.h:597
double get_integral_ICS(double energy1, double energy2) const
Integral photo-ionization cross-section.
MolecPhotoAbsCS()=default
Default constructor.
double get_F() const
Retrieve Fano factor.
Definition: PhotoAbsCS.h:615
double get_integral_ACS(double energy1, double energy2) const
Integral photo-absorption cross-section.
void print(std::ostream &file, int l) const
int get_qatom() const
Total number of atoms of all sorts in the molecule.
Definition: PhotoAbsCS.h:594
~MolecPhotoAbsCS()
Destructor.
Definition: PhotoAbsCS.h:635
Simple phenomenological CS for any shell (analytic formula).
Definition: PhotoAbsCS.h:211
virtual ~PhenoPhotoAbsCS()
Destructor.
Definition: PhotoAbsCS.h:224
void print(std::ostream &file, int l) const override
Definition: PhotoAbsCS.cpp:460
void scale(double fact) override
Multiply by some factor. Can be useful for debugging and other purposes.
Definition: PhotoAbsCS.cpp:455
double get_integral_CS(double energy1, double energy2) const override
Retrieve integral cross-section [Mb * MeV] in a given interval [MeV].
Definition: PhotoAbsCS.cpp:442
double get_CS(double energy) const override
Retrieve cross-section [Mb] at a given energy [MeV].
Definition: PhotoAbsCS.cpp:437
PhenoPhotoAbsCS()
Default constructor.
Definition: PhotoAbsCS.cpp:425
PhenoPhotoAbsCS * copy() const override
Definition: PhotoAbsCS.h:230
PhotoAbsCS()
Default constructor.
Definition: PhotoAbsCS.cpp:79
double threshold
Definition: PhotoAbsCS.h:79
double get_threshold() const
Return the threshold energy.
Definition: PhotoAbsCS.h:64
virtual void print(std::ostream &file, int l) const
Definition: PhotoAbsCS.cpp:91
virtual double get_integral_CS(double energy1, double energy2) const =0
Retrieve integral cross-section [Mb * MeV] in a given interval [MeV].
virtual ~PhotoAbsCS()
Destructor.
Definition: PhotoAbsCS.h:53
std::string name
Definition: PhotoAbsCS.h:76
virtual double get_CS(double energy) const =0
Retrieve cross-section [Mb] at a given energy [MeV].
virtual PhotoAbsCS * copy() const =0
virtual void scale(double fact)=0
Multiply by some factor. Can be useful for debugging and other purposes.
const std::string & get_name() const
Name of this shell or atom.
Definition: PhotoAbsCS.h:56
int get_number() const
Number of this shell.
Definition: PhotoAbsCS.h:58
int get_Z() const
Definition: PhotoAbsCS.h:62
virtual SimpleAtomPhotoAbsCS * copy() const
Definition: PhotoAbsCS.h:417
SimpleAtomPhotoAbsCS()
Default constructor.
Definition: PhotoAbsCS.cpp:859
std::vector< std::shared_ptr< PhotoAbsCS > > m_acs
Definition: PhotoAbsCS.h:424
virtual double get_ACS(double energy) const
Definition: PhotoAbsCS.cpp:940
virtual int get_main_shell_number(int nshell) const
Definition: PhotoAbsCS.h:413
virtual void print(std::ostream &file, int l) const
std::string file_name
Filename (saved for printing).
Definition: PhotoAbsCS.h:423
virtual double get_integral_ACS(double energy1, double energy2) const
Integrated photo-absorption cross-section overa given interval.
Definition: PhotoAbsCS.cpp:948
virtual double get_integral_ICS(double energy1, double energy2) const
Integrated photo-ionization cross-section over a given interval.
Definition: PhotoAbsCS.cpp:989
virtual double get_threshold(int nshell) const
Get the ionization threshold for a given shell.
Definition: PhotoAbsCS.cpp:934
virtual double get_ICS(double energy) const
Definition: PhotoAbsCS.cpp:980
virtual ~SimpleAtomPhotoAbsCS()
Destructor.
Definition: PhotoAbsCS.h:399
void remove_leading_tiny(double level)
Definition: PhotoAbsCS.cpp:319
void print(std::ostream &file, int l) const override
Definition: PhotoAbsCS.cpp:409
double get_integral_CS(double energy1, double energy2) const override
Retrieve integral cross-section [Mb * MeV] in a given interval [MeV].
Definition: PhotoAbsCS.cpp:357
virtual ~SimpleTablePhotoAbsCS()
Destructor.
Definition: PhotoAbsCS.h:182
SimpleTablePhotoAbsCS()=default
Default constructor.
void scale(double fact) override
Multiply by some factor. Can be useful for debugging and other purposes.
Definition: PhotoAbsCS.cpp:403
SimpleTablePhotoAbsCS * copy() const override
Definition: PhotoAbsCS.h:197
double get_CS(double energy) const override
Retrieve cross-section [Mb] at a given energy [MeV].
Definition: PhotoAbsCS.cpp:337
const std::vector< double > & get_arr_CS() const
Definition: PhotoAbsCS.h:194
const std::vector< double > & get_arr_ener() const
Definition: PhotoAbsCS.h:193
void remove_leading_zeros()
Remove points with zero cross-section from the table.
Definition: PhotoAbsCS.cpp:302
Definition: BGMesh.cpp:6
constexpr double Thomas_sum_rule_const_Mb
TRK sum rule [Mb * MeV].
Definition: PhotoAbsCS.h:19
std::ostream & operator<<(std::ostream &file, const BGMesh &bgm)
Definition: BGMesh.cpp:37
constexpr double coef_I_to_W
Definition: PhotoAbsCS.h:585
constexpr double Thomas_sum_rule_const
TRK sum rule [1/MeV], constant per one electron.
Definition: PhotoAbsCS.h:16
constexpr double low_boundary_of_excitations
Definition: PhotoAbsCS.h:427
constexpr double C1_MEV2_BN
constexpr double standard_factor_Fano
Definition: PhotoAbsCS.h:575