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::AtomPhotoAbsCS Class Referenceabstract

Atomic photoabsorption cross-section abstract base class. More...

#include <PhotoAbsCS.h>

+ Inheritance diagram for Heed::AtomPhotoAbsCS:

Public Member Functions

 AtomPhotoAbsCS ()
 Default constructor.
 
int get_Z () const
 Get the atomic number.
 
unsigned int get_qshell () const
 Get the number of shells.
 
virtual double get_threshold (int nshell) const =0
 Get the ionization threshold for a given shell.
 
virtual double get_I_min () const
 Get the lowest ionization threshold among all shells.
 
virtual double get_ACS (double energy) const =0
 
virtual double get_integral_ACS (double energy1, double energy2) const =0
 Integrated photo-absorption cross-section overa given interval.
 
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_ACS (int nshell, double energy1, double energy2) const =0
 Integrated sub-shell photo-absorption cross-section.
 
virtual double get_ICS (double energy) const =0
 
virtual double get_TICS (double energy, double factual_minimal_threshold) const
 
virtual double get_integral_ICS (double energy1, double energy2) const =0
 Integrated photo-ionization cross-section over a given interval.
 
virtual double get_integral_TICS (double energy1, double energy2, double factual_minimal_threshold) const
 Integral photo-ionization cross-section with redefined threshold.
 
virtual double get_ICS (int nshell, double energy) const =0
 Sub-shell photo-ionization cross-section at a given energy.
 
virtual double get_TICS (int nshell, double energy, double factual_minimal_threshold) const
 Sub-shell photo-ionization cross-section with redefined threshold.
 
virtual double get_integral_ICS (int nshell, double energy1, double energy2) const =0
 Integrated sub-shell photo-ionization cross-section.
 
virtual double get_integral_TICS (int nshell, double energy1, double energy2, double factual_minimal_threshold) const
 Integrated sub-shell photo-ionization cross-section (redefined threshold).
 
virtual void get_escape_particles (const int nshell, double energy, std::vector< double > &el_energy, std::vector< double > &ph_energy) const
 
virtual int get_main_shell_number (int nshell) const =0
 
virtual void remove_shell (int nshell)
 Deactivate a sub-shell. Set s_ignore_shell flag to true.
 
virtual void restore_shell (int nshell)
 Activate a sub-shell. Set s_ignore_shell flag to false.
 
virtual void print (std::ostream &file, int l) const
 
virtual AtomPhotoAbsCScopy () const =0
 
AtomicSecondaryProductsget_asp (int nshell)
 

Protected Attributes

std::string name
 Name of the atom.
 
int Z
 Atomic number.
 
int qshell
 Number of shells.
 
std::vector< bool > s_ignore_shell
 
std::vector< AtomicSecondaryProductsasp
 Sampling of relaxation products for each shell.
 

Detailed Description

Atomic photoabsorption cross-section abstract base class.

Definition at line 286 of file PhotoAbsCS.h.

Constructor & Destructor Documentation

◆ AtomPhotoAbsCS()

Heed::AtomPhotoAbsCS::AtomPhotoAbsCS ( )

Default constructor.

Definition at line 580 of file PhotoAbsCS.cpp.

580: name("none"), Z(0), qshell(0) {}
int Z
Atomic number.
Definition: PhotoAbsCS.h:371
std::string name
Name of the atom.
Definition: PhotoAbsCS.h:369
int qshell
Number of shells.
Definition: PhotoAbsCS.h:373

Member Function Documentation

◆ copy()

virtual AtomPhotoAbsCS * Heed::AtomPhotoAbsCS::copy ( ) const
pure virtual

◆ get_ACS() [1/2]

virtual double Heed::AtomPhotoAbsCS::get_ACS ( double  energy) const
pure virtual

Photo-absorption cross-section [Mbarn] at a given energy [MeV]. The photo-absorption cross-section can include excitation.

Implemented in Heed::SimpleAtomPhotoAbsCS, and Heed::ExAtomPhotoAbsCS.

Referenced by get_TICS().

◆ get_ACS() [2/2]

virtual double Heed::AtomPhotoAbsCS::get_ACS ( int  nshell,
double  energy 
) const
pure virtual

Sub-shell photo-absorption cross-section [Mbarn] at a given energy [MeV].

Implemented in Heed::SimpleAtomPhotoAbsCS, and Heed::ExAtomPhotoAbsCS.

◆ get_asp()

AtomicSecondaryProducts * Heed::AtomPhotoAbsCS::get_asp ( int  nshell)

Definition at line 851 of file PhotoAbsCS.cpp.

851 {
852 mfunnamep("AtomicSecondaryProducts* AtomPhotoAbsCS::get_asp(int nshell)");
853 check_econd21(nshell, < 0 ||, >= qshell, mcerr);
854 return &(asp[nshell]);
855}
#define check_econd21(a, sign1_b1_sign0, sign2_b2, stream)
Definition: FunNameStack.h:191
#define mfunnamep(string)
Definition: FunNameStack.h:49
std::vector< AtomicSecondaryProducts > asp
Sampling of relaxation products for each shell.
Definition: PhotoAbsCS.h:381
#define mcerr
Definition: prstream.h:128

◆ get_escape_particles()

void Heed::AtomPhotoAbsCS::get_escape_particles ( const int  nshell,
double  energy,
std::vector< double > &  el_energy,
std::vector< double > &  ph_energy 
) const
virtual

Sample the electrons and photons emitted following ionisation of a given shell.

Parameters
nshellshell index
energycan be a little bit below threshold
el_energyelectron energies. The photo-electron is the first one. Later (in HeedPhoton) the photo-electron is emitted in the forward direction. The other are sampled isotropically.
ph_energyphoton energies

Definition at line 675 of file PhotoAbsCS.cpp.

677 {
678 mfunname("void AtomPhotoAbsCS::get_escape_particles(...)");
679#ifdef DEBUG_PRINT_get_escape_particles
680 mcout << "AtomPhotoAbsCS::get_escape_particles is started\n";
681 Iprintn(mcout, nshell);
682 Iprintn(mcout, energy);
683#endif
684 // In principle, the energy is allowed to be slightly less than threshold
685 // due to unprecision of definition of point-wise cross sections.
686 // To keep correct norm it is better not to ignore such events.
687 // They usually can be treated quite well.
688 // The factor 0.5 is put there just as arbitrary check for full stupidity.
689 const double thrShell = get_threshold(nshell);
690 check_econd12(energy, <, 0.5 * thrShell, mcerr);
691
692 el_energy.clear();
693 ph_energy.clear();
694
695 // Find the shell with the lowest threshold (should be the last).
696 int n_min = 0;
697 double thrMin = DBL_MAX;
698 for (int n = 0; n < qshell; ++n) {
699 if (get_threshold(n) < thrMin) {
700 n_min = n;
701 thrMin = get_threshold(n);
702 }
703 }
704#ifdef DEBUG_PRINT_get_escape_particles
705 Iprintn(mcout, n_min);
706#endif
707 if (nshell == n_min) {
708 // Outermost (valence) shell. Only generate the delta electron.
709 const double en = std::max(energy - thrMin, 0.);
710 el_energy.push_back(en);
711 return;
712 }
713 // Energy of photo-electron
714 double en = energy - thrShell;
715 double hdist = 0.0; // used to preserve the balance of energy
716 // virtual gamma are generated by energy mesh
717 // and their energy could be little less than the shell energy.
718 // To avoid generation of electrons with negative energy
719 // their energy is corrected. The value of correction is hdist.
720 // To preserve energy this hdist is then distributed over
721 // the other secondary products if they exist.
722 if (en < 0.0) {
723 hdist = -en;
724 en = 0.0;
725 }
726 int is = 0;
727 std::vector<double> felectron_energy;
728 std::vector<double> fphoton_energy;
729#ifdef DEBUG_PRINT_get_escape_particles
730 Iprint2n(mcout, asp.size(), get_qshell());
731#endif
732#ifndef DEBUG_ignore_non_standard_channels
733 if (asp.size() == get_qshell()) {
734 // works only in this case?
735 is = asp[nshell].get_channel(felectron_energy, fphoton_energy);
736 // Here zero can be if the shell is not included in database
737 // or if not standard channel is not chosen by random way.
738 // In both cases the standard way should be invoked.
739 }
740#endif
741 int main_n = get_main_shell_number(nshell);
742#ifdef DEBUG_PRINT_get_escape_particles
743 Iprint2n(mcout, nshell, main_n);
744 Iprintn(mcout, is);
745#endif
746
747 if (is != 0) {
748 // Generate photo-electron and just copy all what is proposed by
749 // get_channel with corrections by hdist.
750 el_energy.resize(1 + felectron_energy.size());
751 el_energy[0] = en;
752 long q = felectron_energy.size();
753 for (long n = 0; n < q; ++n) {
754 check_econd21(felectron_energy[n], < 0 ||, > thrShell, mcerr);
755 el_energy[1 + n] = felectron_energy[n] - hdist;
756 if (el_energy[1 + n] < 0) {
757 hdist = -el_energy[1 + n];
758 el_energy[1 + n] = 0.0;
759 } else {
760 hdist = 0.0;
761 }
762 }
763 ph_energy.resize(fphoton_energy.size());
764 q = fphoton_energy.size();
765 for (long n = 0; n < q; ++n) {
766 check_econd21(fphoton_energy[n], < 0 ||, > thrShell, mcerr);
767 ph_energy[n] = fphoton_energy[n] - hdist;
768 if (ph_energy[n] < 0) {
769 hdist = -ph_energy[n];
770 ph_energy[n] = 0.0;
771 } else {
772 hdist = 0.0;
773 }
774 }
775 return;
776 }
777
778 // Generate default channel.
779 if (main_n <= 0) {
780 // Principal numbers are not available. Generate Auger to outmost shell.
781 const double en1 = thrShell - hdist - 2 * thrMin;
782 el_energy.push_back(en);
783 if (en1 >= 0.0) el_energy.push_back(en1);
784 return;
785 }
786 // First find the principal quantum number of the deepest shell.
787 int main_n_largest = 0;
788 for (int n = 0; n < qshell; ++n) {
789 main_n_largest = std::max(main_n_largest, get_main_shell_number(n));
790 }
791#ifdef DEBUG_PRINT_get_escape_particles
792 Iprintn(mcout, main_n_largest);
793#endif
794 if (main_n_largest - main_n < 2) {
795 // Generate Auger from the outermost shell.
796 double en1 = thrShell - hdist - 2 * thrMin;
797 el_energy.push_back(en);
798 if (en1 >= 0.0) el_energy.push_back(en1);
799 return;
800 }
801 // At least K, l, M shells exist.
802 // In this case we use more advanced scheme.
803 // Look for shell with larger main number and with less energy
804 int n_chosen = -1;
805 double thr = DBL_MAX; // this will be the least threshold
806 // among the shells with next principal number
807 for (int n = 0; n < qshell; ++n) {
808 // currently the minimal shell is the last,
809 // but to avoid this assumption we check all
810 int main_n_t = get_main_shell_number(n);
811 if (main_n_t > 0 && main_n_t == main_n + 1) {
812 if (thr > get_threshold(n)) {
813 n_chosen = n;
814 thr = get_threshold(n);
815 }
816 }
817 }
818#ifdef DEBUG_PRINT_get_escape_particles
819 Iprint2n(mcout, n_chosen, thr);
820#endif
821 check_econd11(n_chosen, < 0, mcerr);
822 double en1 = thrShell - hdist - 2 * get_threshold(n_chosen);
823 if (en1 > 0.) {
824 // Photo-electron
825 el_energy.push_back(en);
826 // First Auger from chosen shell
827 el_energy.push_back(en1);
828 // Then filling two vacancies at the next (chosen) shell
829 // from the outermost one
830 const double en2 = get_threshold(n_chosen) - 2 * thrMin;
831 if (en2 > 0.) {
832 el_energy.push_back(en2);
833 el_energy.push_back(en2);
834 check_econd11(el_energy[2], < 0.0, mcerr);
835 }
836 return;
837 }
838 en1 = thrShell - hdist - get_threshold(n_chosen) - thrMin;
839 if (en1 > 0.) {
840 // Photo-electron
841 el_energy.push_back(en);
842 el_energy.push_back(en1);
843 // Filling initially ionized level from chosen
844 // and emittance of Auger from outermost.
845 check_econd11(el_energy[1], < 0.0, mcerr);
846 const double en2 = get_threshold(n_chosen) - 2 * thrMin;
847 if (en2 > 0.) el_energy.push_back(en2);
848 }
849}
#define check_econd11(a, signb, stream)
Definition: FunNameStack.h:155
#define check_econd12(a, sign, b, stream)
Definition: FunNameStack.h:163
#define mfunname(string)
Definition: FunNameStack.h:45
virtual int get_main_shell_number(int nshell) const =0
virtual double get_threshold(int nshell) const =0
Get the ionization threshold for a given shell.
unsigned int get_qshell() const
Get the number of shells.
Definition: PhotoAbsCS.h:294
#define mcout
Definition: prstream.h:126
#define Iprintn(file, name)
Definition: prstream.h:204
#define Iprint2n(file, name1, name2)
Definition: prstream.h:219

◆ get_I_min()

double Heed::AtomPhotoAbsCS::get_I_min ( ) const
virtual

Get the lowest ionization threshold among all shells.

Definition at line 667 of file PhotoAbsCS.cpp.

667 {
668 mfunname("double AtomPhotoAbsCS::get_I_min() const");
669 double st = DBL_MAX;
670 // The minimal shell is normally the last, but to be safe we check all.
671 for (int n = 0; n < qshell; ++n) st = std::min(st, get_threshold(n));
672 return st;
673}

◆ get_ICS() [1/2]

virtual double Heed::AtomPhotoAbsCS::get_ICS ( double  energy) const
pure virtual

Photo-ionization cross-section [Mbarn] at a given energy [MeV]. The photo-ionization cross-section does not include excitation.

Implemented in Heed::SimpleAtomPhotoAbsCS, and Heed::ExAtomPhotoAbsCS.

◆ get_ICS() [2/2]

virtual double Heed::AtomPhotoAbsCS::get_ICS ( int  nshell,
double  energy 
) const
pure virtual

Sub-shell photo-ionization cross-section at a given energy.

Implemented in Heed::SimpleAtomPhotoAbsCS, and Heed::ExAtomPhotoAbsCS.

◆ get_integral_ACS() [1/2]

virtual double Heed::AtomPhotoAbsCS::get_integral_ACS ( double  energy1,
double  energy2 
) const
pure virtual

Integrated photo-absorption cross-section overa given interval.

Implemented in Heed::SimpleAtomPhotoAbsCS, and Heed::ExAtomPhotoAbsCS.

Referenced by get_integral_TICS(), and get_TICS().

◆ get_integral_ACS() [2/2]

virtual double Heed::AtomPhotoAbsCS::get_integral_ACS ( int  nshell,
double  energy1,
double  energy2 
) const
pure virtual

Integrated sub-shell photo-absorption cross-section.

Implemented in Heed::ExAtomPhotoAbsCS, and Heed::SimpleAtomPhotoAbsCS.

◆ get_integral_ICS() [1/2]

virtual double Heed::AtomPhotoAbsCS::get_integral_ICS ( double  energy1,
double  energy2 
) const
pure virtual

Integrated photo-ionization cross-section over a given interval.

Implemented in Heed::SimpleAtomPhotoAbsCS, and Heed::ExAtomPhotoAbsCS.

◆ get_integral_ICS() [2/2]

virtual double Heed::AtomPhotoAbsCS::get_integral_ICS ( int  nshell,
double  energy1,
double  energy2 
) const
pure virtual

Integrated sub-shell photo-ionization cross-section.

Implemented in Heed::SimpleAtomPhotoAbsCS, and Heed::ExAtomPhotoAbsCS.

◆ get_integral_TICS() [1/2]

double Heed::AtomPhotoAbsCS::get_integral_TICS ( double  energy1,
double  energy2,
double  factual_minimal_threshold 
) const
virtual

Integral photo-ionization cross-section with redefined threshold.

Definition at line 593 of file PhotoAbsCS.cpp.

594 {
595 mfunname("double AtomPhotoAbsCS::get_integral_TICS(...) const");
596 if (factual_minimal_threshold > energy2) return 0.;
597 energy1 = std::max(energy1, factual_minimal_threshold);
598 return get_integral_ACS(energy1, energy2);
599}
virtual double get_integral_ACS(double energy1, double energy2) const =0
Integrated photo-absorption cross-section overa given interval.

◆ get_integral_TICS() [2/2]

double Heed::AtomPhotoAbsCS::get_integral_TICS ( int  nshell,
double  energy1,
double  energy2,
double  factual_minimal_threshold 
) const
virtual

Integrated sub-shell photo-ionization cross-section (redefined threshold).

Definition at line 611 of file PhotoAbsCS.cpp.

613 {
614 mfunname("double AtomPhotoAbsCS::get_integral_TICS(...) const");
615 if (s_ignore_shell[nshell]) return 0.;
616 if (factual_minimal_threshold <= energy1) {
617 return get_integral_ACS(nshell, energy1, energy2);
618 }
619 if (factual_minimal_threshold >= energy2) return 0.0;
620 return get_integral_ACS(nshell, factual_minimal_threshold, energy2);
621}
std::vector< bool > s_ignore_shell
Definition: PhotoAbsCS.h:379

◆ get_main_shell_number()

virtual int Heed::AtomPhotoAbsCS::get_main_shell_number ( int  nshell) const
pure virtual

Return the shell number (1, 2, ...) for a given index. The number is taken from the shell name. If the shell number cannot be determined, the function returns -1.

Implemented in Heed::SimpleAtomPhotoAbsCS, and Heed::ExAtomPhotoAbsCS.

Referenced by get_escape_particles().

◆ get_qshell()

unsigned int Heed::AtomPhotoAbsCS::get_qshell ( ) const
inline

Get the number of shells.

Definition at line 294 of file PhotoAbsCS.h.

294{ return qshell; }

Referenced by get_escape_particles().

◆ get_threshold()

virtual double Heed::AtomPhotoAbsCS::get_threshold ( int  nshell) const
pure virtual

Get the ionization threshold for a given shell.

Implemented in Heed::SimpleAtomPhotoAbsCS, and Heed::ExAtomPhotoAbsCS.

Referenced by get_escape_particles(), and get_I_min().

◆ get_TICS() [1/2]

double Heed::AtomPhotoAbsCS::get_TICS ( double  energy,
double  factual_minimal_threshold 
) const
virtual

Photo-ionization cross-section assuming a redefined ionization threshold. This function can be useful for redefining the ionization threshold in atomic mixtures, where on atom can transfer excitations to another one with lower ionization threshold (Penning/Jesse effect).

Definition at line 582 of file PhotoAbsCS.cpp.

583 {
584 mfunname("double AtomPhotoAbsCS::get_TICS(...) const");
585 if (factual_minimal_threshold <= energy) {
586 // Above threshold, the ionization cross-section is assumed to be
587 // idential to the absorption cross-section.
588 return get_ACS(energy);
589 }
590 return 0.0;
591}
virtual double get_ACS(double energy) const =0

◆ get_TICS() [2/2]

double Heed::AtomPhotoAbsCS::get_TICS ( int  nshell,
double  energy,
double  factual_minimal_threshold 
) const
virtual

Sub-shell photo-ionization cross-section with redefined threshold.

Definition at line 601 of file PhotoAbsCS.cpp.

602 {
603 mfunname("double AtomPhotoAbsCS::get_TICS(...) const");
604 if (s_ignore_shell[nshell]) return 0.;
605 if (factual_minimal_threshold <= energy) {
606 return get_integral_ACS(nshell, energy);
607 }
608 return 0.;
609}

◆ get_Z()

int Heed::AtomPhotoAbsCS::get_Z ( ) const
inline

Get the atomic number.

Definition at line 292 of file PhotoAbsCS.h.

292{ return Z; }

◆ print()

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

Reimplemented in Heed::SimpleAtomPhotoAbsCS, and Heed::ExAtomPhotoAbsCS.

Definition at line 635 of file PhotoAbsCS.cpp.

635 {
636 mfunnamep("void AtomPhotoAbsCS::print(std::ostream& file, int l) const");
637 if (l <= 0) return;
638 Ifile << "AtomPhotoAbsCS(l=" << l << "): name=" << name << " Z = " << Z
639 << " qshell = " << qshell << std::endl;
640 Iprintn(mcout, asp.size());
641 long q = asp.size();
642 if (q == 0) {
643 q = s_ignore_shell.size();
644 indn.n += 2;
645 for (long n = 0; n < q; ++n) {
646 Ifile << "n=" << n << " s_ignore_shell[n] = " << s_ignore_shell[n]
647 << '\n';
648 }
649 indn.n -= 2;
650 } else {
651 check_econd12(asp.size(), !=, s_ignore_shell.size(), mcerr);
652 indn.n += 2;
653 for (long n = 0; n < q; ++n) {
654 Ifile << "n=" << n << " s_ignore_shell[n] = " << s_ignore_shell[n]
655 << '\n';
656 asp[n].print(mcout, l);
657 }
658 indn.n -= 2;
659 }
660}
indentation indn
Definition: prstream.cpp:15
#define Ifile
Definition: prstream.h:195

Referenced by Heed::operator<<(), Heed::SimpleAtomPhotoAbsCS::print(), and Heed::ExAtomPhotoAbsCS::print().

◆ remove_shell()

void Heed::AtomPhotoAbsCS::remove_shell ( int  nshell)
virtual

Deactivate a sub-shell. Set s_ignore_shell flag to true.

Definition at line 623 of file PhotoAbsCS.cpp.

623 {
624 mfunname("void AtomPhotoAbsCS::remove_shell(int nshell)");
625 check_econd21(nshell, < 0 ||, >= qshell, mcerr);
626 s_ignore_shell[nshell] = true;
627}

◆ restore_shell()

void Heed::AtomPhotoAbsCS::restore_shell ( int  nshell)
virtual

Activate a sub-shell. Set s_ignore_shell flag to false.

Definition at line 629 of file PhotoAbsCS.cpp.

629 {
630 mfunname("void AtomPhotoAbsCS::restore_shell(int nshell)");
631 check_econd21(nshell, < 0 ||, >= qshell, mcerr);
632 s_ignore_shell[nshell] = false;
633}

Member Data Documentation

◆ asp

std::vector<AtomicSecondaryProducts> Heed::AtomPhotoAbsCS::asp
protected

Sampling of relaxation products for each shell.

Definition at line 381 of file PhotoAbsCS.h.

Referenced by Heed::ExAtomPhotoAbsCS::ExAtomPhotoAbsCS(), get_asp(), get_escape_particles(), print(), and Heed::SimpleAtomPhotoAbsCS::SimpleAtomPhotoAbsCS().

◆ name

std::string Heed::AtomPhotoAbsCS::name
protected

◆ qshell

◆ s_ignore_shell

◆ Z


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