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

Atomic photo-absorption with excitation. More...

#include <PhotoAbsCS.h>

+ Inheritance diagram for Heed::ExAtomPhotoAbsCS:

Public Member Functions

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 energy2) 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
 
void replace_shells_by_average (double fwidth, double fstep, long fmax_q_step)
 
virtual void print (std::ostream &file, int l) const
 
virtual ExAtomPhotoAbsCScopy () const
 
 ExAtomPhotoAbsCS ()
 Default constructor.
 
 ExAtomPhotoAbsCS (int fZ, const std::string &fthreshold_file_name, const std::string &fsimple_table_file_name, const std::string &fname="none", double fminimal_threshold=0.0)
 
 ExAtomPhotoAbsCS (int fZ, const std::string &fname, const std::string &fBT_file_name, int id, double fminimal_threshold=0.0)
 
 ExAtomPhotoAbsCS (int fZ, const std::string &fname, const std::string &fFitBT_file_name, int id, int s_no_scale, double fminimal_threshold=0.0)
 
 ExAtomPhotoAbsCS (int fZ, const std::string &fname, const std::string &fFitBT_file_name, const std::string &fsimple_table_file_name, double emax_repl, int id, double fminimal_threshold=0.0)
 
virtual ~ExAtomPhotoAbsCS ()
 Destructor.
 
- 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 threshold_file_name
 
std::string simple_table_file_name
 
std::string BT_file_name
 
std::vector< ActivePtr< PhotoAbsCS > > acs
 
double integ_abs_before_corr
 
double integ_abs_after_corr
 
double integ_ioniz_after_corr
 
double height_of_excitation
 Excitation cross-section (assumed in the lowest shell).
 
double exener [2]
 Boundaries of excitation.
 
double minimal_threshold
 
- 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.
 

Static Protected Attributes

static const int s_add_excitations_to_normalize = 1
 
static const int s_scale_to_normalize_if_more = 1
 

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

Atomic photo-absorption with excitation.

Definition at line 429 of file PhotoAbsCS.h.

Constructor & Destructor Documentation

◆ ExAtomPhotoAbsCS() [1/5]

Heed::ExAtomPhotoAbsCS::ExAtomPhotoAbsCS ( )
inline

Default constructor.

Definition at line 454 of file PhotoAbsCS.h.

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

Referenced by copy(), and ExAtomPhotoAbsCS().

◆ ExAtomPhotoAbsCS() [2/5]

Heed::ExAtomPhotoAbsCS::ExAtomPhotoAbsCS ( int  fZ,
const std::string &  fthreshold_file_name,
const std::string &  fsimple_table_file_name,
const std::string &  fname = "none",
double  fminimal_threshold = 0.0 
)

Constructor,

Parameters
fZatomic number
fthreshold_file_namefile from which to read name and shell energies
fsimple_table_file_namefile from which to read the cross-sections
fnamename of the atom, if "none" it is taken from fthreshold_file_name
fminimal_thresholdthreshold

Definition at line 1028 of file PhotoAbsCS.cpp.

1033 : threshold_file_name(fthreshold_file_name),
1034 simple_table_file_name(fsimple_table_file_name),
1035 BT_file_name("none"),
1036 minimal_threshold(fminimal_threshold) {
1037 mfunnamep("ExAtomPhotoAbsCS::ExAtomPhotoAbsCS(...) const");
1038 check_econd11(fZ, < 1, mcerr);
1039 std::ifstream threshold_file(threshold_file_name.c_str());
1040 if (!threshold_file) {
1041 funnw.ehdr(mcerr);
1042 mcerr << "cannot open file " << threshold_file_name << std::endl;
1043 spexit(mcerr);
1044 }
1045 std::vector<double> thr;
1046 std::vector<int> Zshell;
1047 std::vector<double> fl;
1048 std::vector<std::string> shell_name;
1049 bool foundZ = false;
1050 while (findmark(threshold_file, "#") == 1) {
1051 threshold_file >> Z;
1052 if (Z != fZ) continue;
1053 threshold_file >> qshell;
1054 check_econd21(qshell, < 1 ||, > 10000, mcerr);
1055 s_ignore_shell.resize(qshell, false);
1056 // Iprintn(mcout, qshell);
1057 thr.resize(qshell, 0.0);
1058 Zshell.resize(qshell, 0);
1059 fl.resize(qshell, 0.0);
1060 shell_name.resize(qshell);
1061 acs.resize(qshell);
1062 asp.resize(qshell);
1063 std::string temp_name;
1064 threshold_file >> temp_name;
1065 name = fname == "none" ? temp_name : fname;
1066 int sZshell = 0;
1067 for (int nshell = 0; nshell < qshell; nshell++) {
1068 threshold_file >> thr[nshell];
1069 check_econd11(thr[nshell], <= 0.0, mcerr);
1070 thr[nshell] *= 1.0e-6;
1071 threshold_file >> Zshell[nshell];
1072 check_econd11(Zshell[nshell], <= 0, mcerr);
1073 sZshell += Zshell[nshell];
1074 threshold_file >> fl[nshell];
1075 findmark(threshold_file, "!");
1076 threshold_file >> shell_name[nshell];
1077 }
1078 check_econd12(sZshell, !=, Z, mcerr);
1079 // currently the minimal shell is the last,
1080 // but to avoid this assumption, we check all.
1081 int n_min = 0;
1082 double st = DBL_MAX;
1083 for (int nshell = 0; nshell < qshell; nshell++) {
1084 if (thr[nshell] < st) {
1085 n_min = nshell;
1086 st = thr[nshell];
1087 }
1088 }
1089 for (int nshell = 0; nshell < qshell; nshell++) {
1090 if (fl[nshell] <= 0) continue;
1091 check_econd12(nshell, ==, n_min, mcerr);
1092 std::vector<double> felectron_energy;
1093 std::vector<double> fphoton_energy;
1094 fphoton_energy.push_back(thr[nshell] - thr[n_min]);
1095 asp[nshell].add_channel(fl[nshell], felectron_energy, fphoton_energy);
1096 }
1097 foundZ = true;
1098 break;
1099 }
1100 if (!foundZ) {
1101 funnw.ehdr(mcerr);
1102 mcerr << "there is no element Z=" << fZ << " in file "
1103 << threshold_file_name << std::endl;
1104 spexit(mcerr);
1105 }
1106 // Here it reads the PACS as an one shell curve:
1107 SimpleTablePhotoAbsCS stpacs(name, Z, 0.0, fsimple_table_file_name);
1108 const std::vector<double>& ener = stpacs.get_arr_ener();
1109 const std::vector<double>& CS = stpacs.get_arr_CS();
1110 std::vector<double> left_CS = CS; // used in sequencial algorithm
1111 const long qe = ener.size();
1112 // here cs is saved
1113 std::vector<std::vector<double> > SCS(qshell, std::vector<double>(qe, 0.));
1114 int nct = qshell - 1; // "current" threshold index
1115 unsigned long nce = 0; // "current" energy index
1116 // We ignore values below the lowest threshold.
1117 // It is not clear whether it is right, perhaps this is one of possible ways
1118 if (ener[0] < thr[qshell - 1]) {
1119 for (long ne = 0; ne < qe && (ener[ne] < thr[qshell - 1] ||
1120 (ener[ne] >= thr[qshell - 1] && ne > 1 &&
1121 CS[ne - 1] <= CS[ne - 2]));
1122 ne++) {
1123 if (ne > 0) left_CS[ne - 1] = 0.0;
1124 nce = ne;
1125 }
1126 }
1127 int s_more;
1128 int nt2 = 0; // < nt1
1129 int s_spes = 0;
1130 // Actually this is a loop by the group of thresholds
1131 do {
1132 // Find all thresholds which are less then the current energy
1133 int nt;
1134 // sign that there are thresholds more than the current energy
1135 s_more = 0;
1136 for (nt = nct; nt >= 0; nt--) {
1137 if (s_spes == 0) {
1138 if (thr[nt] > ener[nce]) {
1139 s_more = 1;
1140 break;
1141 }
1142 } else {
1143 if (thr[nt] > ener[nce + 1]) {
1144 s_more = 1;
1145 break;
1146 }
1147 }
1148 }
1149 // nt is now index of the next threshold or -1, if the thresholds are
1150 // made up.
1151 int nt1 = nct;
1152 int nce_next = ener.size();
1153 nt2 = nt + 1;
1154 // mcout<<"nt="<<nt<<" nt1="<<nt1<<" nt2="<<nt2<<" s_more="<<s_more<<'\n';
1155 if (s_more == 1) {
1156 // if(nt >= 0) // so if there are other larger thresholds,
1157 //{ // we should check how far we can pass at this step
1158 unsigned long ne;
1159 // finding energy larger than the next threshold
1160 for (ne = nce; ne < ener.size(); ne++) {
1161 if (thr[nt] <= ener[ne]) {
1162 nce_next = ne;
1163 s_spes = 0;
1164 break;
1165 }
1166 // At the following condition energy could be less than threshold,
1167 // but this point will anyway be associated with the next shell
1168 // corresponding to this threshold.
1169 // This is related to not precise measurement of cross section
1170 // and not precise knowledge of shell energies.
1171 // Occurence of this condition is marked by s_spes = 1.
1172 // At the next passing of this loop the thresholds are compared with
1173 // the next energy.
1174 if (ne > 1 && ne < ener.size() - 1 && ne > nce + 2 &&
1175 thr[nt] <= ener[ne + 1] &&
1176 (thr[nt] - ener[ne]) / (ener[ne + 1] - ener[ne]) < 0.1 &&
1177 CS[ne] > CS[ne - 1]) {
1178 // mcout<<"special condition is satisf.\n";
1179 nce_next = ne;
1180 s_spes = 1;
1181 break;
1182 }
1183 }
1184 if (ne == ener.size()) // threshold is larger then energy mesh
1185 s_more = 0; // to finish the loop
1186 }
1187 // Iprintn(mcout, nce_next);
1188 // Iprintn(mcout, ener[nce_next-1]);
1189 int qt = nt1 - nt2 + 1; // quantity of the new thresholds
1190 // Iprintn(mcout, qt);
1191
1192 // Calculate sum of Z.
1193 int s = 0;
1194 for (nt = 0; nt < qt; nt++) {
1195 const int nshell = nct - nt;
1196 s += Zshell[nshell];
1197 }
1198 // Weights according to charges
1199 std::vector<double> w(qt);
1200 for (nt = 0; nt < qt; nt++) {
1201 const int nshell = nct - nt;
1202 w[nt] = double(Zshell[nshell]) / s;
1203 }
1204 double save_left_CS = left_CS[nce_next - 1];
1205 for (long ne = 0; ne < nce_next; ne++) {
1206 for (nt = 0; nt < qt; nt++) {
1207 int nshell = nct - nt;
1208 SCS[nshell][ne] = left_CS[ne] * w[nt];
1209 }
1210 left_CS[ne] = 0.0;
1211 }
1212 for (unsigned long ne = nce_next; ne < ener.size(); ne++) {
1213 double extrap_CS =
1214 save_left_CS * pow(ener[nce_next - 1], 2.75) / pow(ener[ne], 2.75);
1215 if (extrap_CS > left_CS[ne]) extrap_CS = left_CS[ne];
1216 for (nt = 0; nt < qt; nt++) {
1217 int nshell = nct - nt;
1218 SCS[nshell][ne] = extrap_CS * w[nt];
1219 }
1220 left_CS[ne] -= extrap_CS;
1221 }
1222 nce = nce_next;
1223 nct = nt2 - 1;
1224 } while (s_more != 0);
1225 // now nt2 will be index of last filled shell
1226 // Now to fill the shells which are absent in the input table.
1227 // They will be initialized phenomenologically, based on the sum rule.
1228 for (int ns = 0; ns < nt2; ns++) {
1229 acs[ns].pass(new PhenoPhotoAbsCS(shell_name[ns], Zshell[ns], thr[ns]));
1230 }
1231 // Initialization of input shells.
1232 for (int ns = nt2; ns < qshell; ns++) {
1233 SimpleTablePhotoAbsCS* adr = new SimpleTablePhotoAbsCS(
1234 shell_name[ns], Zshell[ns], thr[ns], ener, SCS[ns]);
1235 adr->remove_leading_zeros();
1236 acs[ns].pass(adr);
1237 }
1239 exener[0] = exener[1] = 0.0;
1240 double integ = get_integral_ACS(0.0, DBL_MAX);
1241 // Iprintn(mcout, integ);
1242 integ_abs_before_corr = integ;
1243 double pred_integ = Thomas_sum_rule_const_Mb * Z;
1244 // Iprintn(mcout, pred_integ);
1245 if (pred_integ > integ) {
1247 const double threshold = acs[qshell - 1]->get_threshold();
1248 // add excitation
1249 exener[0] = low_boundary_of_excitations * threshold;
1250 exener[1] = threshold;
1251 height_of_excitation = (pred_integ - integ) / (exener[1] - exener[0]);
1252 if (minimal_threshold > 0.0) {
1253 if (minimal_threshold > threshold) {
1254 // currently the minimal shell is the last one
1255 exener[0] += minimal_threshold - threshold;
1256 exener[1] += minimal_threshold - threshold;
1257 }
1258 }
1259 }
1260 } else if (pred_integ < integ) {
1262 const double fact = pred_integ / integ;
1263 for (int nshell = 0; nshell < qshell; ++nshell) {
1264 acs[nshell]->scale(fact);
1265 }
1266 }
1267 }
1268 integ_abs_after_corr = get_integral_ACS(0.0, DBL_MAX);
1270}
#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::vector< ActivePtr< PhotoAbsCS > > acs
Definition: PhotoAbsCS.h:545
std::string BT_file_name
Definition: PhotoAbsCS.h:542
double height_of_excitation
Excitation cross-section (assumed in the lowest shell).
Definition: PhotoAbsCS.h:552
static const int s_add_excitations_to_normalize
Definition: PhotoAbsCS.h:568
double exener[2]
Boundaries of excitation.
Definition: PhotoAbsCS.h:554
virtual double get_integral_ACS(double energy1, double energy2) const
Integrated photo-absorption cross-section overa given interval.
static const int s_scale_to_normalize_if_more
Definition: PhotoAbsCS.h:569
std::string threshold_file_name
Definition: PhotoAbsCS.h:540
std::string simple_table_file_name
Definition: PhotoAbsCS.h:541
virtual double get_integral_ICS(double energy1, double energy2) const
Integrated photo-ionization cross-section over a given interval.
const double low_boundary_of_excitations
Definition: PhotoAbsCS.h:426
DoubleAc pow(const DoubleAc &f, double p)
Definition: DoubleAc.cpp:337
const double Thomas_sum_rule_const_Mb
TRK sum rule [Mb * MeV].
Definition: PhotoAbsCS.h:19
int findmark(std::istream &file, const char *s)
Definition: findmark.cpp:19
#define mcerr
Definition: prstream.h:128

◆ ExAtomPhotoAbsCS() [3/5]

Heed::ExAtomPhotoAbsCS::ExAtomPhotoAbsCS ( int  fZ,
const std::string &  fname,
const std::string &  fBT_file_name,
int  id,
double  fminimal_threshold = 0.0 
)

Constructor, shells from Band and Thragzkovskaya.

Parameters
fZatomic number
fnamename of the atom
fBT_file_namefile with shell names and energies
id1 - old files without fluorescence rate 2 - new files with fluorescence rate other values - error
fminimal_thresholdthreshold

Definition at line 1272 of file PhotoAbsCS.cpp.

1275 : threshold_file_name("none"),
1276 simple_table_file_name("none"),
1277 BT_file_name(fBT_file_name),
1278 minimal_threshold(fminimal_threshold) {
1279 mfunnamep(
1280 "ExAtomPhotoAbsCS::ExAtomPhotoAbsCS(int fZ, const std::string& fname, "
1281 "const std::string& fBT_file_name, int id, double fminimal_threshold)");
1282 check_econd11(fZ, < 1, mcerr);
1283 check_econd21(id, < 1 ||, > 2, mcerr);
1284
1285 name = fname;
1286 std::ifstream BT_file(BT_file_name.c_str());
1287 if (!BT_file) {
1288 funnw.ehdr(mcerr);
1289 mcerr << "cannot open file " << BT_file_name << std::endl;
1290 spexit(mcerr);
1291 }
1292 std::vector<double> thresh;
1293 std::vector<double> fl;
1294 Z = fZ;
1295 int i = findmark(BT_file, "NUCLEAR CHARGE =");
1296 check_econd11a(i, != 1, "wrong file format", mcerr);
1297 int Z_from_file;
1298 BT_file >> Z_from_file;
1299 check_econd12(Z_from_file, !=, Z, mcerr);
1300 qshell = 0;
1301 while ((i = findmark(BT_file, "Z =")) == 1) {
1302 BT_file >> i;
1303 check_econd11(i, != Z, mcerr);
1304 std::string shellname;
1305 BT_file >> shellname;
1306 // Iprintn(mcout, shellname);
1307 i = findmark(BT_file, "$");
1308 check_econd11(i, != 1, mcerr);
1309 long qen;
1310 BT_file >> qen;
1311 check_econd11(qen, <= 0, mcerr);
1312 std::vector<double> fener(qen, 0.0);
1313 std::vector<double> fcs(qen, 0.0);
1314 double thr = 0.0;
1315 BT_file >> thr;
1316 check_econd11(thr, <= 0, mcerr);
1317 thr *= 1.0e-3; // pass from keV to MeV
1318 if (id == 2) {
1319 thresh.push_back(thr);
1320 fl.resize(fl.size() + 1);
1321 BT_file >> fl[qshell];
1322 check_econd21(fl[qshell], < 0.0 ||, > 1.0, mcerr);
1323 // Iprintn(mcout, fl[qshell]);
1324 }
1325 long nen;
1326 for (nen = 0; nen < qen; nen++) {
1327 BT_file >> fener[nen] >> fcs[nen];
1328 check_econd11(fener[nen], <= 0.0, mcerr);
1329 check_econd11(fcs[nen], < 0.0, mcerr);
1330 fener[nen] *= 1.0e-3; // pass from keV to MeV
1331 }
1332 qshell++;
1333 acs.resize(qshell);
1334 acs[qshell - 1]
1335 .pass(new SimpleTablePhotoAbsCS(shellname, 0, // unknown here
1336 thr, fener, fcs));
1337 }
1338 if (id == 2) {
1339 // a copy of similar thing from subroutine above
1340 int n_min = 0;
1341 double st = DBL_MAX;
1342 for (int nshell = 0; nshell < qshell; ++nshell) {
1343 // currently the minimal shell is the last,
1344 // but to avoid this assumption we check all
1345 if (thresh[nshell] < st) {
1346 n_min = nshell;
1347 st = thresh[nshell];
1348 }
1349 }
1350 asp.resize(qshell);
1351 for (int nshell = 0; nshell < qshell; ++nshell) {
1352 if (fl[nshell] > 0) {
1353 check_econd12(nshell, ==, n_min, mcerr);
1354 std::vector<double> felectron_energy;
1355 std::vector<double> fphoton_energy;
1356 fphoton_energy.push_back(thresh[nshell] - thresh[n_min]);
1357 asp[nshell].add_channel(fl[nshell], felectron_energy, fphoton_energy);
1358 }
1359 }
1360 }
1361
1362 check_econd11(qshell, <= 0, mcerr);
1363 s_ignore_shell.resize(qshell, false);
1365 exener[0] = exener[1] = 0.0;
1366 double integ = get_integral_ACS(0.0, DBL_MAX);
1367 // Iprintn(mcout, integ);
1368 integ_abs_before_corr = integ;
1369 double pred_integ = Thomas_sum_rule_const_Mb * Z;
1370 // Iprintn(mcout, pred_integ);
1371 if (pred_integ > integ) {
1373 const double thr = acs[qshell - 1]->get_threshold();
1374 // add excitation
1376 exener[1] = thr;
1377 height_of_excitation = (pred_integ - integ) / (exener[1] - exener[0]);
1378 if (minimal_threshold > 0.0) {
1379 if (minimal_threshold > thr) {
1380 // currently the minimal shell is the last one
1381 exener[0] += minimal_threshold - thr;
1382 exener[1] += minimal_threshold - thr;
1383 }
1384 }
1385 }
1386 } else {
1388 const double fact = pred_integ / integ;
1389 for (int nshell = 0; nshell < qshell; ++nshell) {
1390 acs[nshell]->scale(fact);
1391 }
1392 }
1393 }
1394 integ_abs_after_corr = get_integral_ACS(0.0, DBL_MAX);
1396}
#define check_econd11a(a, signb, add, stream)
Definition: FunNameStack.h:172

◆ ExAtomPhotoAbsCS() [4/5]

Heed::ExAtomPhotoAbsCS::ExAtomPhotoAbsCS ( int  fZ,
const std::string &  fname,
const std::string &  fFitBT_file_name,
int  id,
int  s_no_scale,
double  fminimal_threshold = 0.0 
)

Constructor, shells and fit parameters from Band and Thragzkovskaya.

Parameters
fZatomic number
fnamename of the atom
fFitBT_file_namefile with shell names, energies, and fit parameters
id1 - old files without fluorescence rate 2 - new files with fluorescence rate other values - error
s_no_scalescaling is not done, needs for next (?)
fminimal_thresholdthreshold

Definition at line 1400 of file PhotoAbsCS.cpp.

1404 : threshold_file_name("none"),
1405 simple_table_file_name("none"),
1406 BT_file_name(fFitBT_file_name),
1407 minimal_threshold(fminimal_threshold) {
1408 mfunnamep(
1409 "ExAtomPhotoAbsCS::ExAtomPhotoAbsCS(int fZ, const std::string& fname, "
1410 "const "
1411 "std::string& fFitBT_file_name, int id, int id1, double "
1412 "fminimal_threshold)");
1413 check_econd11(fZ, < 1, mcerr);
1414 check_econd21(id, < 1 ||, > 2, mcerr);
1415 Z = fZ;
1416 name = fname;
1417 std::ifstream BT_file(fFitBT_file_name.c_str());
1418 if (!BT_file) {
1419 funnw.ehdr(mcerr);
1420 mcerr << "cannot open file " << BT_file_name << std::endl;
1421 spexit(mcerr);
1422 }
1423 std::vector<double> thresh;
1424 std::vector<double> fl;
1425 int i = 0;
1426 while ((i = findmark(BT_file, "$")) == 1) {
1427 long iZ;
1428 BT_file >> iZ;
1429 if (iZ != Z) continue;
1430 BT_file >> qshell;
1431 // Iprintn(mcout, qshell);
1432 check_econd11(qshell, <= 0, mcerr);
1433 check_econd11(qshell, > 1000, mcerr);
1434 acs.resize(qshell);
1435 if (id == 2) {
1436 thresh.resize(qshell);
1437 fl.resize(qshell);
1438 }
1439 for (int nshell = 0; nshell < qshell; ++nshell) {
1440#ifdef READ_FILE_WITH_PRINCIPAL_NUMBERS
1441 int n_princ = 0;
1442#endif
1443 int l;
1444 double threshold;
1445 double E0;
1446 double yw;
1447 double ya;
1448 double P;
1449 double sigma;
1450 if (BT_file.eof()) {
1451 mcerr << "unexpected end of file " << BT_file_name << '\n';
1452 spexit(mcerr);
1453 }
1454 if (!BT_file.good()) {
1455 mcerr << "bad format of file " << BT_file_name << '\n';
1456 spexit(mcerr);
1457 }
1458#ifdef READ_FILE_WITH_PRINCIPAL_NUMBERS
1459 BT_file >> n_princ;
1460 if (!BT_file.good()) {
1461 mcerr << "bad format of file " << BT_file_name << '\n';
1462 spexit(mcerr);
1463 }
1464 check_econd21(n_princ, < 0 ||, > 10, mcerr);
1465#endif
1466 BT_file >> l >> threshold >> E0 >> sigma >> ya >> P >> yw;
1467 check_econd11(l, < 0, mcerr);
1468 check_econd11(l, > 20, mcerr);
1469 threshold *= 1.0e-6;
1470 E0 *= 1.0e-6;
1471
1472 check_econd11a(threshold, <= 2.0e-6,
1473 "n_princ=" << n_princ << " l=" << l << '\n', mcerr);
1474 check_econd11(E0, <= 0, mcerr);
1475 double flu = 0.0;
1476 if (id == 2) {
1477 if (BT_file.eof()) {
1478 mcerr << "unexpected end of file " << BT_file_name << '\n';
1479 spexit(mcerr);
1480 }
1481 if (!BT_file.good()) {
1482 mcerr << "bad format of file " << BT_file_name << '\n';
1483 spexit(mcerr);
1484 }
1485 BT_file >> flu;
1486 check_econd11(flu, < 0.0, mcerr);
1487 check_econd11(flu, > 1.0, mcerr);
1488 thresh[nshell] = threshold;
1489 fl[nshell] = flu;
1490 }
1491#ifdef READ_FILE_WITH_PRINCIPAL_NUMBERS
1492 // necessary for generation escape products
1493 std::string shellname(long_to_String(n_princ) + " shell number " +
1494 long_to_String(nshell));
1495#else
1496 std::string shellname("shell number " + long_to_String(nshell));
1497#endif
1498 acs[nshell]
1499 .pass(new SimpleTablePhotoAbsCS(shellname, 0, // unknown here
1500 threshold, l, E0, yw, ya, P, sigma));
1501 // Iprintn(mcout, nshell);
1502 // Iprint3n(mcout, l, threshold, E0);
1503 // Iprint4n(mcout, yw, ya, P, sigma);
1504 // acs[nshell]->print(mcout, 5);
1505 }
1506 goto mark1;
1507 }
1508 funnw.ehdr(mcerr);
1509 mcerr << "there is no element Z=" << fZ << " in file " << fFitBT_file_name
1510 << std::endl;
1511 spexit(mcerr);
1512mark1:
1513 if (id == 2) {
1514 // a copy of similar thing from subroutine above
1515 int n_min = 0;
1516 double st = DBL_MAX;
1517 for (int nshell = 0; nshell < qshell; ++nshell) {
1518 // currently the minimal shell is the last,
1519 // but to avoid this assumption we check all
1520 if (thresh[nshell] < st) {
1521 n_min = nshell;
1522 st = thresh[nshell];
1523 }
1524 }
1525 asp.resize(qshell);
1526 for (int nshell = 0; nshell < qshell; ++nshell) {
1527 if (fl[nshell] > 0) {
1528 check_econd12(nshell, ==, n_min, mcerr);
1529 std::vector<double> felectron_energy;
1530 std::vector<double> fphoton_energy;
1531 fphoton_energy.push_back(thresh[nshell] - thresh[n_min]);
1532 asp[nshell].add_channel(fl[nshell], felectron_energy, fphoton_energy);
1533 }
1534 }
1535 }
1536
1537 check_econd11(qshell, <= 0, mcerr);
1538 s_ignore_shell.resize(qshell, false);
1540 exener[0] = exener[1] = 0.0;
1541 double integ = get_integral_ACS(0.0, DBL_MAX);
1542 // Iprintn(mcout, integ);
1543 integ_abs_before_corr = integ;
1544 double pred_integ = Thomas_sum_rule_const_Mb * Z;
1545 // Iprintn(mcout, pred_integ);
1546 if (pred_integ > integ) {
1548 const double thr = acs[qshell - 1]->get_threshold();
1549 // add excitation
1551 exener[1] = thr;
1552 height_of_excitation = (pred_integ - integ) / (exener[1] - exener[0]);
1553 if (minimal_threshold > 0.0) {
1554 if (minimal_threshold > thr) {
1555 // currently the minimal shell is the last one
1556 exener[0] += minimal_threshold - thr;
1557 exener[1] += minimal_threshold - thr;
1558 }
1559 }
1560 }
1561 } else {
1562 if (s_scale_to_normalize_if_more == 1 && s_no_scale == 0) {
1563 const double fact = pred_integ / integ;
1564 for (int nshell = 0; nshell < qshell; ++nshell) {
1565 acs[nshell]->scale(fact);
1566 }
1567 }
1568 }
1569 integ_abs_after_corr = get_integral_ACS(0.0, DBL_MAX);
1571}
String long_to_String(const long n)
Definition: String.h:71

◆ ExAtomPhotoAbsCS() [5/5]

Heed::ExAtomPhotoAbsCS::ExAtomPhotoAbsCS ( int  fZ,
const std::string &  fname,
const std::string &  fFitBT_file_name,
const std::string &  fsimple_table_file_name,
double  emax_repl,
int  id,
double  fminimal_threshold = 0.0 
)

Constructor, combination of Band and Thragzkovskaya fit and Henke tables. Initialize BT fit and replaces the part of the first shell from threshold taken from BT- fit to emax_repl by values from the table.

Parameters
fZatomic number
fnamename of the atom
fFitBT_file_namefile with shell names, energies, and fit parameters
fsimple_table_file_namefile with cross-section table
emax_replenergy up to which to use the cross-section table
id1 - old files without fluorescence rate 2 - new files with fluorescence rate other values - error
fminimal_thresholdthreshold

Definition at line 1573 of file PhotoAbsCS.cpp.

1577 {
1578 mfunname("ExAtomPhotoAbsCS::ExAtomPhotoAbsCS(...)");
1579 Z = fZ;
1580 name = fname;
1581 int s_no_scale = 1;
1582 *this = ExAtomPhotoAbsCS(fZ, fname, fFitBT_file_name, id, s_no_scale,
1583 fminimal_threshold);
1584
1586 exener[0] = exener[1] = 0.0;
1587
1588 double thrmin = DBL_MAX;
1589 long nsmin = -1;
1590 // Look for minimal shell (usually the last).
1591 for (long ns = 0; ns < qshell; ++ns) {
1592 if (thrmin > acs[ns]->get_threshold()) {
1593 nsmin = ns;
1594 thrmin = acs[ns]->get_threshold();
1595 }
1596 }
1597 // Iprint3n(mcout, nsmin, acs[nsmin]->get_threshold(), thrmin);
1598 check_econd11(nsmin, < 0, mcerr);
1599 check_econd11(nsmin, != qshell - 1, mcerr); // now it has to be by this way
1600 ActivePtr<PhotoAbsCS> facs = acs[nsmin]; // copying the valence shell
1601 PhotoAbsCS* apacs = facs.get();
1602 SimpleTablePhotoAbsCS* first_shell =
1603 dynamic_cast<SimpleTablePhotoAbsCS*>(apacs);
1604 check_econd11(first_shell, == NULL, mcerr);
1605
1606 SimpleTablePhotoAbsCS stpacs(name, Z, 0.0, fsimple_table_file_name);
1607 stpacs.remove_leading_tiny(1.0e-10);
1608
1609 // Merging shells:
1610 acs[nsmin].pass(new SimpleTablePhotoAbsCS(*first_shell, stpacs, emax_repl));
1611
1612 s_ignore_shell.resize(qshell, false);
1614 exener[0] = exener[1] = 0.0;
1615 double integ = get_integral_ACS(0.0, DBL_MAX);
1616 integ_abs_before_corr = integ;
1617 double pred_integ = Thomas_sum_rule_const_Mb * Z;
1618 if (pred_integ > integ) {
1620 const double thr = acs[qshell - 1]->get_threshold();
1621 // add excitation
1623 exener[1] = thr;
1624 height_of_excitation = (pred_integ - integ) / (exener[1] - exener[0]);
1625 if (minimal_threshold > 0.0) {
1626 if (minimal_threshold > thr) {
1627 // currently the minimal shell is the last one
1628 exener[0] += minimal_threshold - thr;
1629 exener[1] += minimal_threshold - thr;
1630 }
1631 }
1632 }
1633 } else {
1635 const double fact = pred_integ / integ;
1636 for (int nshell = 0; nshell < qshell; ++nshell) {
1637 acs[nshell]->scale(fact);
1638 }
1639 }
1640 }
1641 integ_abs_after_corr = get_integral_ACS(0.0, DBL_MAX);
1643}
#define mfunname(string)
Definition: FunNameStack.h:45
virtual double get_threshold(int nshell) const
Get the ionization threshold for a given shell.
ExAtomPhotoAbsCS()
Default constructor.
Definition: PhotoAbsCS.h:454

◆ ~ExAtomPhotoAbsCS()

virtual Heed::ExAtomPhotoAbsCS::~ExAtomPhotoAbsCS ( )
inlinevirtual

Destructor.

Definition at line 537 of file PhotoAbsCS.h.

537{}

Member Function Documentation

◆ copy()

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

Implements Heed::AtomPhotoAbsCS.

Definition at line 451 of file PhotoAbsCS.h.

451{ return new ExAtomPhotoAbsCS(*this); }

◆ get_ACS() [1/2]

double Heed::ExAtomPhotoAbsCS::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 1711 of file PhotoAbsCS.cpp.

1711 {
1712 mfunname("double ExAtomPhotoAbsCS::get_ACS(double energy) const");
1713 double s = 0.0;
1714 for (int n = 0; n < qshell; ++n) {
1715 if (s_ignore_shell[n]) continue;
1716 double shift = 0.0;
1717 const double t = acs[n]->get_threshold();
1718 if (minimal_threshold > 0.0) {
1719 if (t < minimal_threshold) shift = minimal_threshold - t;
1720 }
1721 s += acs[n]->get_CS(energy - shift);
1722 }
1723 if (energy >= exener[0] && energy <= exener[1]) s += height_of_excitation;
1724 return s;
1725}

◆ get_ACS() [2/2]

double Heed::ExAtomPhotoAbsCS::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 1745 of file PhotoAbsCS.cpp.

1745 {
1746 mfunname("double ExAtomPhotoAbsCS::get_ACS(int nshell, double energy)");
1747 check_econd21(nshell, < 0 ||, > qshell, mcerr);
1748 if (s_ignore_shell[nshell]) return 0.;
1749 double shift = 0.0;
1750 const double t = acs[nshell]->get_threshold();
1751 if (minimal_threshold > 0.0) {
1752 if (t < minimal_threshold) shift = minimal_threshold - t;
1753 }
1754 double s = acs[nshell]->get_CS(energy - shift);
1755 if (nshell == qshell - 1 && energy >= exener[0] && energy <= exener[1]) {
1757 }
1758 return s;
1759}

◆ get_ICS() [1/2]

double Heed::ExAtomPhotoAbsCS::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 1655 of file PhotoAbsCS.cpp.

1655 {
1656 mfunname("double ExAtomPhotoAbsCS::get_ACS(double energy) const");
1657 double s = 0.0;
1658 for (int n = 0; n < qshell; ++n) {
1659 if (s_ignore_shell[n]) continue;
1660 double shift = 0.0;
1661 const double t = acs[n]->get_threshold();
1662 if (minimal_threshold > 0.0) {
1663 if (t < minimal_threshold) shift = minimal_threshold - t;
1664 }
1665 s += acs[n]->get_CS(energy - shift);
1666 }
1667 return s;
1668}

◆ get_ICS() [2/2]

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

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

Implements Heed::AtomPhotoAbsCS.

Definition at line 1686 of file PhotoAbsCS.cpp.

1686 {
1687 mfunname("double ExAtomPhotoAbsCS::get_ICS(int nshell, double energy) const");
1688 check_econd21(nshell, < 0 ||, > qshell, mcerr);
1689 if (s_ignore_shell[nshell]) return 0.;
1690 double shift = 0.0;
1691 const double t = acs[nshell]->get_threshold();
1692 if (minimal_threshold > 0.0) {
1693 if (t < minimal_threshold) shift = minimal_threshold - t;
1694 }
1695 return acs[nshell]->get_CS(energy - shift);
1696}

◆ get_integral_ACS() [1/2]

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

Integrated photo-absorption cross-section overa given interval.

Implements Heed::AtomPhotoAbsCS.

Definition at line 1727 of file PhotoAbsCS.cpp.

1728 {
1729 mfunname("double ExAtomPhotoAbsCS::get_integral_ACS(...) const");
1730 double s = 0.0;
1731 for (int n = 0; n < qshell; ++n) {
1732 if (s_ignore_shell[n]) continue;
1733 double shift = 0.0;
1734 const double t = acs[n]->get_threshold();
1735 if (minimal_threshold > 0.0) {
1736 if (t < minimal_threshold) shift = minimal_threshold - t;
1737 }
1738 s += acs[n]->get_integral_CS(energy1 - shift, energy2 - shift);
1739 }
1740 double b[2] = {std::max(exener[0], energy1), std::min(exener[1], energy2)};
1741 if (b[1] >= b[0]) s += height_of_excitation * (b[1] - b[0]);
1742 return s;
1743}

Referenced by ExAtomPhotoAbsCS(), and print().

◆ get_integral_ACS() [2/2]

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

Integrated sub-shell photo-absorption cross-section.

Implements Heed::AtomPhotoAbsCS.

Definition at line 1761 of file PhotoAbsCS.cpp.

1762 {
1763 mfunname("double ExAtomPhotoAbsCS::get_integral_ACS(int nshell, ...) const");
1764 check_econd21(nshell, < 0 ||, > qshell, mcerr);
1765 if (s_ignore_shell[nshell]) return 0.;
1766 double shift = 0.0;
1767 const double t = acs[nshell]->get_threshold();
1768 if (minimal_threshold > 0.0) {
1769 if (t < minimal_threshold) shift = minimal_threshold - t;
1770 }
1771 double s = acs[nshell]->get_integral_CS(energy1 - shift, energy2 - shift);
1772 if (nshell == qshell - 1) {
1773 double b[2] = {std::max(exener[0], energy1), std::min(exener[1], energy2)};
1774 if (b[1] >= b[0]) s += height_of_excitation * (b[1] - b[0]);
1775 }
1776 return s;
1777}

◆ get_integral_ICS() [1/2]

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

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

Implements Heed::AtomPhotoAbsCS.

Definition at line 1670 of file PhotoAbsCS.cpp.

1671 {
1672 mfunname("double ExAtomPhotoAbsCS::get_integral_ICS(double energy) const");
1673 double s = 0.0;
1674 for (int n = 0; n < qshell; ++n) {
1675 if (s_ignore_shell[n]) continue;
1676 double shift = 0.0;
1677 const double t = acs[n]->get_threshold();
1678 if (minimal_threshold > 0.0) {
1679 if (t < minimal_threshold) shift = minimal_threshold - t;
1680 }
1681 s += acs[n]->get_integral_CS(energy1 - shift, energy2 - shift);
1682 }
1683 return s;
1684}

Referenced by ExAtomPhotoAbsCS(), and print().

◆ get_integral_ICS() [2/2]

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

Integrated sub-shell photo-ionization cross-section.

Implements Heed::AtomPhotoAbsCS.

Definition at line 1698 of file PhotoAbsCS.cpp.

1699 {
1700 mfunname("double ExAtomPhotoAbsCS::get_integral_ICS(int nshell, ...) const");
1701 check_econd21(nshell, < 0 ||, > qshell, mcerr);
1702 if (s_ignore_shell[nshell]) return 0.;
1703 double shift = 0.0;
1704 const double t = acs[nshell]->get_threshold();
1705 if (minimal_threshold > 0.0) {
1706 if (t < minimal_threshold) shift = minimal_threshold - t;
1707 }
1708 return acs[nshell]->get_integral_CS(energy1 - shift, energy2 - shift);
1709}

◆ get_main_shell_number()

virtual int Heed::ExAtomPhotoAbsCS::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 444 of file PhotoAbsCS.h.

444 {
445 return acs[nshell]->get_number();
446 }

◆ get_threshold()

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

Get the ionization threshold for a given shell.

Implements Heed::AtomPhotoAbsCS.

Definition at line 1645 of file PhotoAbsCS.cpp.

1645 {
1646 mfunname("double ExAtomPhotoAbsCS::get_threshold(int nshell) const");
1647 check_econd21(nshell, < 0 ||, > qshell, mcerr);
1648 double r = acs[nshell]->get_threshold();
1649 if (minimal_threshold > 0.0) {
1651 }
1652 return r;
1653}

Referenced by ExAtomPhotoAbsCS().

◆ print()

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

Reimplemented from Heed::AtomPhotoAbsCS.

Definition at line 1779 of file PhotoAbsCS.cpp.

1779 {
1780 if (l <= 0) return;
1781 Ifile << "ExAtomPhotoAbsCS(l=" << l << "): name=" << name << " Z = " << Z
1782 << " qshell = " << qshell << std::endl;
1783 indn.n += 2;
1784 Ifile << "threshold_file_name=" << threshold_file_name << '\n';
1785 Ifile << "simple_table_file_name=" << simple_table_file_name << '\n';
1786 Ifile << "BT_file_name=" << BT_file_name << std::endl;
1787 Ifile << "Thomas_sum_rule_const_Mb * Z = " << Thomas_sum_rule_const_Mb* Z
1788 << '\n';
1789 Ifile << "integ_abs_before_corr = " << integ_abs_before_corr << '\n';
1790 Ifile << "integ_abs_after_corr = " << integ_abs_after_corr << '\n';
1791 Ifile << "integ_ioniz_after_corr = " << integ_ioniz_after_corr << '\n';
1792 Ifile << "height_of_excitation=" << height_of_excitation
1793 << " exener=" << exener[0] << ' ' << exener[1] << '\n';
1795 Ifile << "integrals by shells:\n";
1796 Ifile << "nshell, int(acs), int(ics)\n";
1797 for (long n = 0; n < qshell; n++) {
1798 double ainteg = get_integral_ACS(n, 0.0, DBL_MAX);
1799 double iinteg = get_integral_ICS(n, 0.0, DBL_MAX);
1800 Ifile << n << " " << ainteg << " " << iinteg << '\n';
1801 }
1802
1803 if (l > 1) {
1804 l--;
1805 indn.n += 2;
1806 for (long n = 0; n < qshell; ++n) {
1807 Ifile << "nshell=" << n << std::endl;
1808 acs[n].print(file, l);
1809 }
1810 AtomPhotoAbsCS::print(file, l);
1811 indn.n -= 2;
1812 }
1813 indn.n -= 2;
1814}
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
#define Iprintn(file, name)
Definition: prstream.h:205

◆ replace_shells_by_average()

void Heed::ExAtomPhotoAbsCS::replace_shells_by_average ( double  fwidth,
double  fstep,
long  fmax_q_step 
)

Definition at line 1816 of file PhotoAbsCS.cpp.

1817 {
1818 mfunname("void ExAtomPhotoAbsCS::replace_shells_by_average(...)");
1819 for (long n = 0; n < qshell; n++) {
1820 PhotoAbsCS* a =
1821 new AveragePhotoAbsCS(acs[n].getver(), fwidth, fstep, fmax_q_step);
1822 acs[n].pass(a);
1823 }
1824}

Member Data Documentation

◆ acs

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

Ionization cross-section (the name acs is misleading). Excitations are added separately as height_of_excitation.

Definition at line 545 of file PhotoAbsCS.h.

Referenced by ExAtomPhotoAbsCS(), get_ACS(), get_ICS(), get_integral_ACS(), get_integral_ICS(), get_main_shell_number(), get_threshold(), print(), and replace_shells_by_average().

◆ BT_file_name

std::string Heed::ExAtomPhotoAbsCS::BT_file_name
protected

Definition at line 542 of file PhotoAbsCS.h.

Referenced by ExAtomPhotoAbsCS(), and print().

◆ exener

double Heed::ExAtomPhotoAbsCS::exener[2]
protected

Boundaries of excitation.

Definition at line 554 of file PhotoAbsCS.h.

Referenced by ExAtomPhotoAbsCS(), get_ACS(), get_integral_ACS(), and print().

◆ height_of_excitation

double Heed::ExAtomPhotoAbsCS::height_of_excitation
protected

Excitation cross-section (assumed in the lowest shell).

Definition at line 552 of file PhotoAbsCS.h.

Referenced by ExAtomPhotoAbsCS(), get_ACS(), get_integral_ACS(), and print().

◆ integ_abs_after_corr

double Heed::ExAtomPhotoAbsCS::integ_abs_after_corr
protected

Definition at line 549 of file PhotoAbsCS.h.

Referenced by ExAtomPhotoAbsCS(), and print().

◆ integ_abs_before_corr

double Heed::ExAtomPhotoAbsCS::integ_abs_before_corr
protected

Definition at line 548 of file PhotoAbsCS.h.

Referenced by ExAtomPhotoAbsCS(), and print().

◆ integ_ioniz_after_corr

double Heed::ExAtomPhotoAbsCS::integ_ioniz_after_corr
protected

Definition at line 550 of file PhotoAbsCS.h.

Referenced by ExAtomPhotoAbsCS(), and print().

◆ minimal_threshold

double Heed::ExAtomPhotoAbsCS::minimal_threshold
protected

◆ s_add_excitations_to_normalize

const int Heed::ExAtomPhotoAbsCS::s_add_excitations_to_normalize = 1
staticprotected

Flag whether to add excitations. If 0 excitations will not be added (useful for debugging and for checking the effect produced by adding excitations). For real work, this variable should always be set to 1.

Definition at line 568 of file PhotoAbsCS.h.

Referenced by ExAtomPhotoAbsCS().

◆ s_scale_to_normalize_if_more

const int Heed::ExAtomPhotoAbsCS::s_scale_to_normalize_if_more = 1
staticprotected

Definition at line 569 of file PhotoAbsCS.h.

Referenced by ExAtomPhotoAbsCS().

◆ simple_table_file_name

std::string Heed::ExAtomPhotoAbsCS::simple_table_file_name
protected

Definition at line 541 of file PhotoAbsCS.h.

Referenced by print().

◆ threshold_file_name

std::string Heed::ExAtomPhotoAbsCS::threshold_file_name
protected

Definition at line 540 of file PhotoAbsCS.h.

Referenced by ExAtomPhotoAbsCS(), and print().


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