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

#include <PhotoAbsCS.h>

+ Inheritance diagram for Heed::SimpleAtomPhotoAbsCS:

Public Member Functions

 SimpleAtomPhotoAbsCS ()
 Default constructor.
 
 SimpleAtomPhotoAbsCS (int fZ, const std::string &ffile_name)
 
 SimpleAtomPhotoAbsCS (int fZ, const PhotoAbsCS &fasc)
 
virtual ~SimpleAtomPhotoAbsCS ()
 Destructor.
 
virtual double get_threshold (int nshell) const
 Get the ionization threshold for a given shell.
 
virtual double get_ACS (double energy) const
 
virtual double get_integral_ACS (double energy1, double energy2) const
 Integrated photo-absorption cross-section overa given interval.
 
virtual double get_ACS (int nshell, double energy) const
 Sub-shell photo-absorption cross-section [Mbarn] at a given energy [MeV].
 
virtual double get_integral_ACS (int nshell, double energy1, double energy2y) const
 Integrated sub-shell photo-absorption cross-section.
 
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.
 
virtual double get_ICS (int nshell, double energy) const
 Sub-shell photo-ionization cross-section at a given energy.
 
virtual double get_integral_ICS (int nshell, double energy1, double energy2) const
 Integrated sub-shell photo-ionization cross-section.
 
virtual int get_main_shell_number (int nshell) const
 
virtual void print (std::ostream &file, int l) const
 
virtual SimpleAtomPhotoAbsCScopy () const
 
- Public Member Functions inherited from Heed::AtomPhotoAbsCS
 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)
 
- 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
 

Protected Attributes

std::string file_name
 Filename (saved for printing).
 
std::vector< ActivePtr< PhotoAbsCS > > acs
 
- Protected Attributes inherited from Heed::AtomPhotoAbsCS
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.
 

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

Simple atomic photoabsorption cross-section (no difference between absorption and ionization).

Definition at line 387 of file PhotoAbsCS.h.

Constructor & Destructor Documentation

◆ SimpleAtomPhotoAbsCS() [1/3]

Heed::SimpleAtomPhotoAbsCS::SimpleAtomPhotoAbsCS ( )

Default constructor.

Definition at line 859 of file PhotoAbsCS.cpp.

859: AtomPhotoAbsCS() {}
AtomPhotoAbsCS()
Default constructor.
Definition: PhotoAbsCS.cpp:580

Referenced by copy().

◆ SimpleAtomPhotoAbsCS() [2/3]

Heed::SimpleAtomPhotoAbsCS::SimpleAtomPhotoAbsCS ( int  fZ,
const std::string &  ffile_name 
)

Constructor for reading name and shell energies from file. Generates the CS by PhenoPhotoAbsCS.

Definition at line 861 of file PhotoAbsCS.cpp.

863 : file_name(ffile_name) {
864 mfunnamep("SimpleAtomPhotoAbsCS::SimpleAtomPhotoAbsCS(...)");
865 check_econd11(fZ, < 1, mcerr);
866 std::ifstream file(file_name.c_str());
867 if (!file) {
868 funnw.ehdr(mcerr);
869 mcerr << "cannot open file " << file_name << std::endl;
870 spexit(mcerr);
871 }
872 while (findmark(file, "#") == 1) {
873 file >> Z;
874 if (Z != fZ) continue;
875 file >> qshell;
876 check_econd21(qshell, < 1 ||, > 10000, mcerr);
877 s_ignore_shell.resize(qshell, false);
878 file >> name;
879 acs.resize(qshell);
880 asp.resize(qshell);
881 std::vector<double> fl(qshell);
882 int sZshell = 0;
883 for (int nshell = 0; nshell < qshell; ++nshell) {
884 double thr = 0.0;
885 int Zshell = 0;
886 std::string shell_name;
887 file >> thr;
888 check_econd11(thr, <= 0.0, mcerr);
889 file >> Zshell;
890 check_econd11(Zshell, <= 0, mcerr);
891 sZshell += Zshell;
892 file >> fl[nshell];
893 findmark(file, "!");
894 file >> shell_name;
895 acs[nshell].pass(new PhenoPhotoAbsCS(shell_name, Zshell, thr * 1.0e-6));
896 }
897 check_econd12(sZshell, !=, Z, mcerr);
898
899 int n_min = 0;
900 double st = DBL_MAX;
901 for (int nshell = 0; nshell < qshell; ++nshell) {
902 // currently the minimal shell is the last,
903 // but to avoid this assumption we check all
904 if (get_threshold(nshell) < st) n_min = nshell;
905 }
906 for (int nshell = 0; nshell < qshell; ++nshell) {
907 if (fl[nshell] <= 0) continue;
908 check_econd12(nshell, ==, n_min, mcerr);
909 std::vector<double> felectron_energy;
910 std::vector<double> fphoton_energy;
911 fphoton_energy.push_back(get_threshold(nshell) - get_threshold(n_min));
912 asp[nshell].add_channel(fl[nshell], felectron_energy, fphoton_energy);
913 }
914 return;
915 }
916 funnw.ehdr(mcerr);
917 mcerr << "there is no element Z=" << fZ << " in file " << file_name << '\n';
918 spexit(mcerr);
919}
#define check_econd21(a, sign1_b1_sign0, sign2_b2, stream)
Definition: FunNameStack.h:191
#define check_econd11(a, signb, stream)
Definition: FunNameStack.h:155
#define mfunnamep(string)
Definition: FunNameStack.h:49
#define spexit(stream)
Definition: FunNameStack.h:256
#define check_econd12(a, sign, b, stream)
Definition: FunNameStack.h:163
std::vector< bool > s_ignore_shell
Definition: PhotoAbsCS.h:378
int Z
Atomic number.
Definition: PhotoAbsCS.h:370
std::string name
Name of the atom.
Definition: PhotoAbsCS.h:368
int qshell
Number of shells.
Definition: PhotoAbsCS.h:372
std::vector< AtomicSecondaryProducts > asp
Sampling of relaxation products for each shell.
Definition: PhotoAbsCS.h:380
std::string file_name
Filename (saved for printing).
Definition: PhotoAbsCS.h:422
virtual double get_threshold(int nshell) const
Get the ionization threshold for a given shell.
Definition: PhotoAbsCS.cpp:933
std::vector< ActivePtr< PhotoAbsCS > > acs
Definition: PhotoAbsCS.h:423
int findmark(std::istream &file, const char *s)
Definition: findmark.cpp:19
#define mcerr
Definition: prstream.h:128

◆ SimpleAtomPhotoAbsCS() [3/3]

Heed::SimpleAtomPhotoAbsCS::SimpleAtomPhotoAbsCS ( int  fZ,
const PhotoAbsCS fasc 
)

Constructor with one prepared preliminary shell with Z electrons. Convenient for hydrogen.

Definition at line 921 of file PhotoAbsCS.cpp.

921 {
922 mfunname("SimpleAtomPhotoAbsCS::SimpleAtomPhotoAbsCS(...)");
923 check_econd11(fZ, <= 0, mcerr);
924 check_econd12(fZ, !=, facs.get_Z(), mcerr);
925 Z = fZ;
926 qshell = 1;
927 s_ignore_shell.resize(qshell, false);
928 name = facs.get_name();
929 acs.resize(1);
930 acs[0].put(&facs);
931}
#define mfunname(string)
Definition: FunNameStack.h:45

◆ ~SimpleAtomPhotoAbsCS()

virtual Heed::SimpleAtomPhotoAbsCS::~SimpleAtomPhotoAbsCS ( )
inlinevirtual

Destructor.

Definition at line 398 of file PhotoAbsCS.h.

398{}

Member Function Documentation

◆ copy()

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

Implements Heed::AtomPhotoAbsCS.

Definition at line 416 of file PhotoAbsCS.h.

416 {
417 return new SimpleAtomPhotoAbsCS(*this);
418 }
SimpleAtomPhotoAbsCS()
Default constructor.
Definition: PhotoAbsCS.cpp:859

◆ get_ACS() [1/2]

double Heed::SimpleAtomPhotoAbsCS::get_ACS ( double  energy) const
virtual

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

Implements Heed::AtomPhotoAbsCS.

Definition at line 939 of file PhotoAbsCS.cpp.

939 {
940 mfunname("double SimpleAtomPhotoAbsCS::get_ACS(double energy) const");
941 double s = 0.0;
942 for (int n = 0; n < qshell; ++n) {
943 if (!s_ignore_shell[n]) s += acs[n]->get_CS(energy);
944 }
945 return s;
946}

◆ get_ACS() [2/2]

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

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

Implements Heed::AtomPhotoAbsCS.

Definition at line 966 of file PhotoAbsCS.cpp.

966 {
967 mfunname("double SimpleAtomPhotoAbsCS::get_ACS(int nshell, double energy)");
968 check_econd21(nshell, < 0 ||, > qshell, mcerr);
969 return s_ignore_shell[nshell] ? 0. : acs[nshell]->get_CS(energy);
970}

◆ get_ICS() [1/2]

double Heed::SimpleAtomPhotoAbsCS::get_ICS ( double  energy) const
virtual

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

Implements Heed::AtomPhotoAbsCS.

Definition at line 979 of file PhotoAbsCS.cpp.

979 {
980 mfunname("double SimpleAtomPhotoAbsCS::get_ICS(double energy) const");
981 double s = 0.0;
982 for (int n = 0; n < qshell; ++n) {
983 if (!s_ignore_shell[n]) s += acs[n]->get_CS(energy);
984 }
985 return s;
986}

◆ get_ICS() [2/2]

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

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

Implements Heed::AtomPhotoAbsCS.

Definition at line 998 of file PhotoAbsCS.cpp.

998 {
999 mfunname("double SimpleAtomPhotoAbsCS::get_ICS(int nshell, double energy)");
1000 check_econd21(nshell, < 0 ||, > qshell, mcerr);
1001 return s_ignore_shell[nshell] ? 0. : acs[nshell]->get_CS(energy);
1002}

◆ get_integral_ACS() [1/2]

double Heed::SimpleAtomPhotoAbsCS::get_integral_ACS ( double  energy1,
double  energy2 
) const
virtual

Integrated photo-absorption cross-section overa given interval.

Implements Heed::AtomPhotoAbsCS.

Definition at line 947 of file PhotoAbsCS.cpp.

948 {
949 mfunnamep("double SimpleAtomPhotoAbsCS::get_integral_ACS(...) const");
950 double s = 0.0;
951 for (int n = 0; n < qshell; ++n) {
952 if (s_ignore_shell[n]) continue;
953 const double t = acs[n]->get_integral_CS(energy1, energy2);
954 if (t < 0) {
955 funnw.ehdr(mcout);
956 mcout << "t < 0\n";
957 Iprintn(mcout, t);
958 print(mcout, 4);
959 spexit(mcout);
960 }
961 s += t;
962 }
963 return s;
964}
virtual void print(std::ostream &file, int l) const
#define mcout
Definition: prstream.h:126
#define Iprintn(file, name)
Definition: prstream.h:205

◆ get_integral_ACS() [2/2]

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

Integrated sub-shell photo-absorption cross-section.

Implements Heed::AtomPhotoAbsCS.

Definition at line 972 of file PhotoAbsCS.cpp.

973 {
974 mfunname("double SimpleAtomPhotoAbsCS::get_integral_ACS(...) const");
975 check_econd21(nshell, < 0 ||, > qshell, mcerr);
976 return s_ignore_shell[nshell] ? 0. : acs[nshell]->get_integral_CS(en1, en2);
977}

◆ get_integral_ICS() [1/2]

double Heed::SimpleAtomPhotoAbsCS::get_integral_ICS ( double  energy1,
double  energy2 
) const
virtual

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

Implements Heed::AtomPhotoAbsCS.

Definition at line 988 of file PhotoAbsCS.cpp.

989 {
990 mfunname("double SimpleAtomPhotoAbsCS::get_integral_ICS(...) const");
991 double s = 0.0;
992 for (int n = 0; n < qshell; ++n) {
993 if (!s_ignore_shell[n]) s += acs[n]->get_integral_CS(energy1, energy2);
994 }
995 return s;
996}

◆ get_integral_ICS() [2/2]

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

Integrated sub-shell photo-ionization cross-section.

Implements Heed::AtomPhotoAbsCS.

Definition at line 1004 of file PhotoAbsCS.cpp.

1005 {
1006 mfunname("double SimpleAtomPhotoAbsCS::get_integral_ICS(...) const");
1007 check_econd21(nshell, < 0 ||, > qshell, mcerr);
1008 return s_ignore_shell[nshell] ? 0. : acs[nshell]->get_integral_CS(en1, en2);
1009}

◆ get_main_shell_number()

virtual int Heed::SimpleAtomPhotoAbsCS::get_main_shell_number ( int  nshell) const
inlinevirtual

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.

Implements Heed::AtomPhotoAbsCS.

Definition at line 412 of file PhotoAbsCS.h.

412 {
413 return acs[nshell]->get_number();
414 }

◆ get_threshold()

double Heed::SimpleAtomPhotoAbsCS::get_threshold ( int  nshell) const
virtual

Get the ionization threshold for a given shell.

Implements Heed::AtomPhotoAbsCS.

Definition at line 933 of file PhotoAbsCS.cpp.

933 {
934 mfunname("double SimpleAtomPhotoAbsCS::get_threshold(int nshell) const");
935 check_econd21(nshell, < 0 ||, > qshell, mcerr);
936 return acs[nshell]->get_threshold();
937}

Referenced by SimpleAtomPhotoAbsCS().

◆ print()

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

Reimplemented from Heed::AtomPhotoAbsCS.

Definition at line 1011 of file PhotoAbsCS.cpp.

1011 {
1012 if (l <= 0) return;
1013 Ifile << "SimpleAtomPhotoAbsCS(l=" << l << "): name=" << name << " Z = " << Z
1014 << " qshell = " << qshell << " file_name=" << file_name << std::endl;
1015 l--;
1016 if (l <= 0) return;
1017 indn.n += 2;
1018 for (int n = 0; n < qshell; ++n) {
1019 Ifile << "nshell=" << n << std::endl;
1020 acs[n].print(file, l);
1021 }
1022 AtomPhotoAbsCS::print(file, l);
1023 indn.n -= 2;
1024}
virtual void print(std::ostream &file, int l) const
Definition: PhotoAbsCS.cpp:635
indentation indn
Definition: prstream.cpp:15
#define Ifile
Definition: prstream.h:196

Referenced by get_integral_ACS().

Member Data Documentation

◆ acs

std::vector<ActivePtr<PhotoAbsCS> > Heed::SimpleAtomPhotoAbsCS::acs
protected

◆ file_name

std::string Heed::SimpleAtomPhotoAbsCS::file_name
protected

Filename (saved for printing).

Definition at line 422 of file PhotoAbsCS.h.

Referenced by print(), and SimpleAtomPhotoAbsCS().


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