Garfield++ v1r0
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

#include <PhotoAbsCS.h>

+ Inheritance diagram for Heed::ExAtomPhotoAbsCS:

Public Member Functions

virtual double get_threshold (int nshell) const
 
virtual double get_ACS (double energy) const
 
virtual double get_integral_ACS (double energy1, double energy2) const
 
virtual double get_ACS (int nshell, double energy) const
 
virtual double get_integral_ACS (int nshell, double energy1, double energy2) const
 
virtual double get_ICS (double energy) const
 
virtual double get_integral_ICS (double energy1, double energy2) const
 
virtual double get_ICS (int nshell, double energy) const
 
virtual double get_integral_ICS (int nshell, double energy1, double energy2) const
 
virtual int get_main_shell_number (int nshell) const
 
void replace_shells_by_overage (double fwidth, double fstep, long fmax_q_step)
 
virtual void print (std::ostream &file, int l) const
 
 macro_copy_total (ExAtomPhotoAbsCS)
 
 ExAtomPhotoAbsCS (void)
 
 ExAtomPhotoAbsCS (int fZ, const String &fthreshold_file_name, const String &fsimple_table_file_name, const String &fname="none", double fminimal_threshold=0.0)
 
 ExAtomPhotoAbsCS (int fZ, const String &fname, const String &fBT_file_name, int id, double fminimal_threshold=0.0)
 
 ExAtomPhotoAbsCS (int fZ, const String &fname, const String &fFitBT_file_name, int id, int s_no_scale, double fminimal_threshold=0.0)
 
 ExAtomPhotoAbsCS (int fZ, const String &fname, const String &fFitBT_file_name, const String &fsimple_table_file_name, double emax_repl, int id, double fminimal_threshold=0.0)
 
virtual ~ExAtomPhotoAbsCS ()
 
- Public Member Functions inherited from Heed::AtomPhotoAbsCS
int get_Z () const
 
int get_qshell () const
 
virtual double get_threshold (int nshell) const =0
 
virtual double get_I_min (void) const
 
virtual double get_ACS (double energy) const =0
 
virtual double get_integral_ACS (double energy1, double energy2) const =0
 
virtual double get_ACS (int nshell, double energy) const =0
 
virtual double get_integral_ACS (int nshell, double energy1, double energy2) const =0
 
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
 
virtual double get_integral_TICS (double energy1, double energy2, double factual_minimal_threshold) const
 
virtual double get_ICS (int nshell, double energy) const =0
 
virtual double get_TICS (int nshell, double energy, double factual_minimal_threshold) const
 
virtual double get_integral_ICS (int nshell, double energy1, double energy2) const =0
 
virtual double get_integral_TICS (int nshell, double energy1, double energy2, double factual_minimal_threshold) const
 
virtual void get_escape_particles (int nshell, double energy, DynLinArr< double > &el_energy, DynLinArr< double > &ph_energy) const
 
virtual int get_main_shell_number (int nshell) const =0
 
virtual void remove_shell (int nshell)
 
virtual void restore_shell (int nshell)
 
virtual void print (std::ostream &file, int l) const
 
 macro_copy_total_zero (AtomPhotoAbsCS)
 
 AtomPhotoAbsCS (void)
 
AtomicSecondaryProductsget_asp (int nshell)
 

Protected Attributes

String threshold_file_name
 
String simple_table_file_name
 
String BT_file_name
 
DynLinArr< ActivePtr< PhotoAbsCS > > acs
 
double integ_abs_before_corr
 
double integ_abs_after_corr
 
double integ_ioniz_after_corr
 
double height_of_excitation
 
double exener [2]
 
double minimal_threshold
 
- Protected Attributes inherited from Heed::AtomPhotoAbsCS
String name
 
int Z
 
int qshell
 
DynLinArr< int > s_ignore_shell
 
DynLinArr< AtomicSecondaryProductsasp
 

Detailed Description

Definition at line 445 of file PhotoAbsCS.h.

Constructor & Destructor Documentation

◆ ExAtomPhotoAbsCS() [1/5]

Heed::ExAtomPhotoAbsCS::ExAtomPhotoAbsCS ( void  )
inline

Definition at line 466 of file PhotoAbsCS.h.

Referenced by ExAtomPhotoAbsCS().

◆ ExAtomPhotoAbsCS() [2/5]

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

Definition at line 1575 of file PhotoAbsCS.cpp.

1579 : threshold_file_name(fthreshold_file_name),
1580 simple_table_file_name(fsimple_table_file_name),
1581 BT_file_name("none"),
1582 minimal_threshold(fminimal_threshold) {
1583 mfunnamep("SimpleAtomPhotoAbsCS::SimpleAtomPhotoAbsCS(int fZ, const String& "
1584 "fname, , const String& fthreshold_file_name, const String& "
1585 "fsimple_table_file_name, double fminimal_threshold)");
1586 //Imcout<<"ExAtomPhotoAbsCS::ExAtomPhotoAbsCS is run for fZ="<<fZ<<std::endl;
1587 check_econd11(fZ, < 1, mcerr);
1588#ifdef USE_STLSTRING
1589 std::ifstream threshold_file(threshold_file_name.c_str());
1590#else
1591 std::ifstream threshold_file(threshold_file_name);
1592#endif
1593 if (!threshold_file) {
1594 funnw.ehdr(mcerr);
1595 mcerr << "cannot open file " << threshold_file_name << std::endl;
1596 spexit(mcerr);
1597 }
1598 DynLinArr<double> thr(0, 0.0);
1599 DynLinArr<int> Zshell(0, 0);
1600 DynLinArr<double> fl(0, 0.0);
1601 DynLinArr<String> shell_name(0);
1602 while (findmark(threshold_file, "#") == 1) {
1603 threshold_file >> Z;
1604 if (Z == fZ) {
1605 threshold_file >> qshell;
1606 check_econd21(qshell, < 1 ||, > 10000, mcerr);
1608 //Iprintn(mcout, qshell);
1609 thr = DynLinArr<double>(qshell, 0.0);
1610 Zshell = DynLinArr<int>(qshell, 0);
1611 fl = DynLinArr<double>(qshell, 0.0);
1612 shell_name = DynLinArr<String>(qshell);
1615 String temp_name;
1616 threshold_file >> temp_name;
1617 if (fname == "none")
1618 name = temp_name;
1619 else
1620 name = fname;
1621 int nshell;
1622 int sZshell = 0;
1623 for (nshell = 0; nshell < qshell; nshell++) {
1624 threshold_file >> thr[nshell];
1625 check_econd11(thr[nshell], <= 0.0, mcerr);
1626 thr[nshell] *= 1.0e-6;
1627 threshold_file >> Zshell[nshell];
1628 check_econd11(Zshell[nshell], <= 0, mcerr);
1629 sZshell += Zshell[nshell];
1630 threshold_file >> fl[nshell];
1631 findmark(threshold_file, "!");
1632 threshold_file >> shell_name[nshell];
1633 //PhotoAbsCS* ap = new PhenoPhotoAbsCS(shell_name, Zshell, thr);
1634 //acs[nshell].pass( ap );
1635 }
1636 check_econd12(sZshell, !=, Z, mcerr);
1637 int n_min = 0;
1638 double st = DBL_MAX;
1639 for (nshell = 0; nshell < qshell;
1640 nshell++) { // currently the minimal shell is the last,
1641 // but to avoid this assumption
1642 // we check all
1643 if (thr[nshell] < st) {
1644 n_min = nshell;
1645 st = thr[nshell];
1646 }
1647 }
1648 for (nshell = 0; nshell < qshell; nshell++) {
1649 if (fl[nshell] > 0) {
1650 check_econd12(nshell, ==, n_min, mcerr);
1651 DynLinArr<double> felectron_energy(0);
1652 DynLinArr<double> fphoton_energy(1);
1653 fphoton_energy[0] = thr[nshell] - thr[n_min];
1654 asp[nshell].add_channel(fl[nshell], felectron_energy, fphoton_energy);
1655 }
1656 }
1657 goto mark1;
1658 }
1659 }
1660 funnw.ehdr(mcerr);
1661 mcerr << "there is no element Z=" << fZ << " in file " << threshold_file_name
1662 << std::endl;
1663 spexit(mcerr);
1664mark1:
1665 // Here it reads the PACS as an one shell curve:
1666 SimpleTablePhotoAbsCS stpacs(name, Z, 0.0, fsimple_table_file_name);
1667 const DynLinArr<double>& ener = stpacs.get_arr_ener();
1668 const DynLinArr<double>& CS = stpacs.get_arr_CS();
1669 //Iprintn(mcout, ener.get_qel());
1670 DynLinArr<double> left_CS = CS; // used in sequencial algorithm
1671 DynLinArr<DynLinArr<double> > SCS(qshell); // here cs is saved
1672 int n;
1673 for (n = 0; n < qshell; n++)
1674 SCS[n] = DynLinArr<double>(ener.get_qel(), 0.0);
1675 /*
1676 if(ener[0] < thr[qshell-1])
1677 {
1678 funnw.ehdr(cerr);
1679 mcerr<<"ener[0] < thr[qshell-1]\n";
1680 mcerr<<"This possibility is not bad, but it is not implemented \n"
1681 <<"in the program yet, sorry\n";
1682 spexit(mcerr);
1683 }
1684 */
1685 int nct = qshell - 1; //"current" threshold index
1686 long nce = 0; // "current" energy index
1687 // Let uss ignore values below the lowest threshold
1688 // It is not clear whether it is right, perhaps this is one of possible ways
1689 if (ener[0] < thr[qshell - 1]) {
1690 long ne;
1691 for (ne = 0; ne < ener.get_qel() && (ener[ne] < thr[qshell - 1] ||
1692 (ener[ne] >= thr[qshell - 1] &&
1693 ne > 1 && CS[ne - 1] <= CS[ne - 2]));
1694 ne++) {
1695 if (ne > 0) left_CS[ne - 1] = 0.0;
1696 nce = ne;
1697 }
1698 }
1699 //Iprintn(mcout, nce);
1700 //mcout<<"ener[nce]="<<ener[nce]<<" CS[nce]="<<CS[nce]
1701 // <<" CS[nce+1]="<<CS[nce+1]<<std::endl;
1702 int s_more;
1703 int nt2 = 0; // < nt1
1704 int s_spes = 0;
1705 do // Actually this is a loop by the group of thresholds
1706 {
1707 //mcout<<"nct="<<nct<<" nce="<<nce<<std::endl;
1708 // Find all thresholds which are less then the current energy
1709 int nt;
1710 s_more = 0; // sign that there are thresholds more than
1711 // the current energy
1712 for (nt = nct; nt >= 0; nt--) {
1713 if (s_spes == 0) {
1714 if (thr[nt] > ener[nce]) {
1715 s_more = 1;
1716 break;
1717 }
1718 } else {
1719 if (thr[nt] > ener[nce + 1]) {
1720 s_more = 1;
1721 break;
1722 }
1723 }
1724 }
1725 // nt is now index of the next threshold or -1, if the thresholds are
1726 // made up.
1727 int nt1 = nct;
1728 int nce_next = ener.get_qel();
1729 nt2 = nt + 1;
1730 //mcout<<"nt="<<nt<<" nt1="<<nt1<<" nt2="<<nt2<<" s_more="<<s_more<<'\n';
1731 if (s_more == 1) {
1732 //if(nt >= 0) // so if there are other larger thresholds,
1733 //{ // we should check how far we can pass at this step
1734 long ne;
1735 for (ne = nce; ne < ener.get_qel();
1736 ne++) { // finding energy larger than the next threshold
1737 if (thr[nt] <= ener[ne]) {
1738 nce_next = ne;
1739 s_spes = 0;
1740 break;
1741 } else { // At the following condition energy could be less then
1742 // threshold,
1743 // but this point will anyway be assotiated with the next shell
1744 // corresponding to this threshold.
1745 // This is related to not precise measurement of cross section
1746 // and not precise knowledge of shell energies.
1747 // Occurence of this condition is marked by s_spes = 1.
1748 // At the next passing of this loop the thresholds are compared with
1749 // the next energy.
1750 if (ne > 1 && ne < ener.get_qel() - 1 && ne > nce + 2 &&
1751 thr[nt] <= ener[ne + 1] &&
1752 (thr[nt] - ener[ne]) / (ener[ne + 1] - ener[ne]) < 0.1 &&
1753 CS[ne] > CS[ne - 1]) {
1754 //mcout<<"special condition is satisf.\n";
1755 nce_next = ne;
1756 s_spes = 1;
1757 break;
1758 }
1759 }
1760 }
1761 if (ne == ener.get_qel()) // threshold is larger then energy mesh
1762 s_more = 0; // to finish the loop
1763 }
1764 //Iprintn(mcout, nce_next);
1765 //Iprintn(mcout, ener[nce_next-1]);
1766 int qt = nt1 - nt2 + 1; // quantity of the new thresholds
1767 //Iprintn(mcout, qt);
1768 DynLinArr<double> w(qt); // weights accouring to charges
1769 int s = 0; // sum of Z
1770 for (nt = 0; nt < qt; nt++) {
1771 int nshell = nct - nt;
1772 s += Zshell[nshell];
1773 }
1774 for (nt = 0; nt < qt; nt++) {
1775 int nshell = nct - nt;
1776 w[nt] = double(Zshell[nshell]) / s;
1777 }
1778 double save_left_CS = left_CS[nce_next - 1];
1779 long ne;
1780 for (ne = 0; ne < nce_next; ne++) {
1781 for (nt = 0; nt < qt; nt++) {
1782 int nshell = nct - nt;
1783 SCS[nshell][ne] = left_CS[ne] * w[nt];
1784 }
1785 left_CS[ne] = 0.0;
1786 }
1787 for (ne = nce_next; ne < ener.get_qel(); ne++) {
1788 double extrap_CS =
1789 save_left_CS * pow(ener[nce_next - 1], 2.75) / pow(ener[ne], 2.75);
1790 if (extrap_CS > left_CS[ne]) extrap_CS = left_CS[ne];
1791 for (nt = 0; nt < qt; nt++) {
1792 int nshell = nct - nt;
1793 SCS[nshell][ne] = extrap_CS * w[nt];
1794 }
1795 left_CS[ne] -= extrap_CS;
1796 }
1797 nce = nce_next;
1798 nct = nt2 - 1;
1799 } while (s_more != 0);
1800 // now nt2 will be index of last filled shell
1801 // Now to fill the shells which are absent in the input table.
1802 // They will be initialized phenomenologically, basing on the sum rule:
1803 int ns;
1804 //Iprintn(mcout, nt2);
1805 for (ns = 0; ns < nt2; ns++) {
1806 acs[ns].pass(new PhenoPhotoAbsCS(shell_name[ns], Zshell[ns], thr[ns]));
1807 }
1808 // Initialization of input shells:
1809 for (ns = nt2; ns < qshell; ns++) {
1810 //acs[ns].pass( new SimpleTablePhotoAbsCS(shell_name[ns], Zshell[ns],
1811 // thr[ns],
1812 // ener, SCS[ns]) );
1813 SimpleTablePhotoAbsCS* adr = new SimpleTablePhotoAbsCS(
1814 shell_name[ns], Zshell[ns], thr[ns], ener, SCS[ns]);
1815 adr->remove_leading_zeros();
1816 acs[ns].pass(adr);
1817 }
1819 exener[0] = exener[1] = 0.0;
1820 double integ = get_integral_ACS(0.0, DBL_MAX);
1821 //Iprintn(mcout, integ);
1822 integ_abs_before_corr = integ;
1823 double pred_integ = Thomas_sum_rule_const_Mb * Z;
1824 //Iprintn(mcout, pred_integ);
1825 if (pred_integ > integ) {
1827 // add excitation
1828 exener[0] =
1829 low_boundary_of_excitations * acs[qshell - 1]->get_threshold();
1830 exener[1] = 1.0 * acs[qshell - 1]->get_threshold();
1831 height_of_excitation = (pred_integ - integ) / (exener[1] - exener[0]);
1832 if (minimal_threshold > 0.0) {
1833 if (minimal_threshold > acs[qshell - 1]->get_threshold()) {
1834 // currently the minimal shell is the last one
1835 exener[0] += minimal_threshold - acs[qshell - 1]->get_threshold();
1836 exener[1] += minimal_threshold - acs[qshell - 1]->get_threshold();
1837 }
1838 }
1839 }
1840 /*
1841 else
1842 {
1843 height_of_excitation = 0.0;
1844 exener[0] = exener[1] = 0.0;
1845 }
1846 */
1847 } else if (pred_integ < integ) {
1849 const double fact = pred_integ / integ;
1850 for (int nshell = 0; nshell < qshell; ++nshell) {
1851 acs[nshell]->scale(fact);
1852 }
1853 }
1854 }
1855
1856 integ_abs_after_corr = get_integral_ACS(0.0, DBL_MAX);
1858}
DoubleAc pow(const DoubleAc &f, double p)
Definition: DoubleAc.cpp:336
#define check_econd21(a, sign1_b1_sign0, sign2_b2, stream)
Definition: FunNameStack.h:428
#define check_econd11(a, signb, stream)
Definition: FunNameStack.h:366
#define mfunnamep(string)
Definition: FunNameStack.h:77
#define spexit(stream)
Definition: FunNameStack.h:536
#define check_econd12(a, sign, b, stream)
Definition: FunNameStack.h:380
std::string String
Definition: String.h:75
long get_qel(void) const
Definition: AbsArr.h:420
void put_qel(long fqel)
Definition: AbsArr.h:774
void pass(long fqel, T *fel)
Definition: AbsArr.h:265
DynLinArr< int > s_ignore_shell
Definition: PhotoAbsCS.h:388
DynLinArr< AtomicSecondaryProducts > asp
Definition: PhotoAbsCS.h:394
virtual double get_threshold(int nshell) const
virtual double get_integral_ACS(double energy1, double energy2) const
DynLinArr< ActivePtr< PhotoAbsCS > > acs
Definition: PhotoAbsCS.h:517
virtual double get_integral_ICS(double energy1, double energy2) const
int findmark(std::istream &file, const char *s)
Definition: findmark.cpp:18
const int s_scale_to_normalize_if_more
Definition: PhotoAbsCS.h:440
const double low_boundary_of_excitations
Definition: PhotoAbsCS.h:442
const double Thomas_sum_rule_const_Mb
Definition: PhotoAbsCS.h:45
const int s_add_excitations_to_normalize
Definition: PhotoAbsCS.h:433
#define mcerr
Definition: prstream.h:135

◆ ExAtomPhotoAbsCS() [3/5]

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

Definition at line 1860 of file PhotoAbsCS.cpp.

1863 : threshold_file_name("none"),
1864 simple_table_file_name("none"),
1865 BT_file_name(fBT_file_name),
1866 minimal_threshold(fminimal_threshold) {
1867 mfunnamep("ExAtomPhotoAbsCS::ExAtomPhotoAbsCS(int fZ, const String& fname, "
1868 "const String& fBT_file_name, int id, double fminimal_threshold)");
1869 check_econd11(fZ, < 1, mcerr);
1870 check_econd21(id, < 1 ||, > 2, mcerr);
1871
1872 name = fname;
1873#ifdef USE_STLSTRING
1874 std::ifstream BT_file(BT_file_name.c_str());
1875#else
1876 std::ifstream BT_file(BT_file_name);
1877#endif
1878 if (!BT_file) {
1879 funnw.ehdr(mcerr);
1880 mcerr << "cannot open file " << BT_file_name << std::endl;
1881 spexit(mcerr);
1882 }
1883 DynLinArr<double> thresh(0, 0.0);
1884 DynLinArr<double> fl(0, 0.0);
1885 Z = fZ;
1886 int i = findmark(BT_file, "NUCLEAR CHARGE =");
1887 check_econd11a(i, != 1, "wrong file format", mcerr);
1888 int Z_from_file;
1889 BT_file >> Z_from_file;
1890 check_econd12(Z_from_file, !=, Z, mcerr);
1891 qshell = 0;
1892 while ((i = findmark(BT_file, "Z =")) == 1) {
1893 BT_file >> i;
1894 check_econd11(i, != Z, mcerr);
1895 String shellname;
1896 BT_file >> shellname;
1897 //Iprintn(mcout, shellname);
1898 i = findmark(BT_file, "$");
1899 check_econd11(i, != 1, mcerr);
1900 long qen;
1901 BT_file >> qen;
1902 check_econd11(qen, <= 0, mcerr);
1903 DynLinArr<double> fener(qen, 0.0);
1904 DynLinArr<double> fcs(qen, 0.0);
1905 double thr = 0.0;
1906 BT_file >> thr;
1907 check_econd11(thr, <= 0, mcerr);
1908 thr *= 1.0e-3; // pass from keV to MeV
1909 if (id == 2) {
1910 thresh.increment();
1911 fl.increment();
1912 thresh[qshell] = thr;
1913 BT_file >> fl[qshell];
1914 check_econd21(fl[qshell], < 0.0 ||, > 1.0, mcerr);
1915 //Iprintn(mcout, fl[qshell]);
1916 }
1917 long nen;
1918 for (nen = 0; nen < qen; nen++) {
1919 BT_file >> fener[nen] >> fcs[nen];
1920 check_econd11(fener[nen], <= 0.0, mcerr);
1921 check_econd11(fcs[nen], < 0.0, mcerr);
1922 fener[nen] *= 1.0e-3; // pass from keV to MeV
1923 }
1924 qshell++;
1926 acs[qshell - 1]
1927 .pass(new SimpleTablePhotoAbsCS(shellname, 0, // unknown here
1928 thr, fener, fcs));
1929 }
1930 if (id == 2) {
1931 // a copy of similar thing from subroutine above
1932 int n_min = 0;
1933 double st = DBL_MAX;
1934 for (int nshell = 0; nshell < qshell; ++nshell) {
1935 // currently the minimal shell is the last,
1936 // but to avoid this assumption we check all
1937 if (thresh[nshell] < st) {
1938 n_min = nshell;
1939 st = thresh[nshell];
1940 }
1941 }
1943 for (int nshell = 0; nshell < qshell; ++nshell) {
1944 if (fl[nshell] > 0) {
1945 check_econd12(nshell, ==, n_min, mcerr);
1946 DynLinArr<double> felectron_energy(0);
1947 DynLinArr<double> fphoton_energy(1);
1948 fphoton_energy[0] = thresh[nshell] - thresh[n_min];
1949 asp[nshell].add_channel(fl[nshell], felectron_energy, fphoton_energy);
1950 }
1951 }
1952 }
1953
1954 check_econd11(qshell, <= 0, mcerr);
1957 exener[0] = exener[1] = 0.0;
1958 double integ = get_integral_ACS(0.0, DBL_MAX);
1959 //Iprintn(mcout, integ);
1960 integ_abs_before_corr = integ;
1961 double pred_integ = Thomas_sum_rule_const_Mb * Z;
1962 //Iprintn(mcout, pred_integ);
1963 if (pred_integ > integ) {
1965 // add excitation
1966 exener[0] =
1967 low_boundary_of_excitations * acs[qshell - 1]->get_threshold();
1968 exener[1] = 1.0 * acs[qshell - 1]->get_threshold();
1969 height_of_excitation = (pred_integ - integ) / (exener[1] - exener[0]);
1970 if (minimal_threshold > 0.0) {
1971 if (minimal_threshold > acs[qshell - 1]->get_threshold()) {
1972 // currently the minimal shell is the last one
1973 exener[0] += minimal_threshold - acs[qshell - 1]->get_threshold();
1974 exener[1] += minimal_threshold - acs[qshell - 1]->get_threshold();
1975 }
1976 }
1977 }
1978 } else {
1980 const double fact = pred_integ / integ;
1981 for (int nshell = 0; nshell < qshell; ++nshell) {
1982 acs[nshell]->scale(fact);
1983 }
1984 }
1985 }
1986 integ_abs_after_corr = get_integral_ACS(0.0, DBL_MAX);
1988}
#define check_econd11a(a, signb, add, stream)
Definition: FunNameStack.h:395

◆ ExAtomPhotoAbsCS() [4/5]

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

Definition at line 1992 of file PhotoAbsCS.cpp.

1997 : threshold_file_name("none"),
1998 simple_table_file_name("none"),
1999 BT_file_name(fFitBT_file_name),
2000 minimal_threshold(fminimal_threshold) {
2001 mfunnamep(
2002 "ExAtomPhotoAbsCS::ExAtomPhotoAbsCS(int fZ, const String& fname, const "
2003 "String& fFitBT_file_name, int id, int id1, double fminimal_threshold)");
2004 check_econd11(fZ, < 1, mcerr);
2005 check_econd21(id, < 1 ||, > 2, mcerr);
2006 Z = fZ;
2007 name = fname;
2008#ifdef USE_STLSTRING
2009 std::ifstream BT_file(fFitBT_file_name.c_str());
2010#else
2011 std::ifstream BT_file(fFitBT_file_name);
2012#endif
2013 if (!BT_file) {
2014 funnw.ehdr(mcerr);
2015 mcerr << "cannot open file " << BT_file_name << std::endl;
2016 spexit(mcerr);
2017 }
2018 DynLinArr<double> thresh(0, 0.0);
2019 DynLinArr<double> fl(0, 0.0);
2020
2021 int i = 0;
2022 while ((i = findmark(BT_file, "$")) == 1) {
2023 long iZ;
2024 BT_file >> iZ;
2025 //Iprintn(mcout, iZ);
2026 if (iZ == Z) {
2027 BT_file >> qshell;
2028 //Iprintn(mcout, qshell);
2029 check_econd11(qshell, <= 0, mcerr);
2030 check_econd11(qshell, > 1000, mcerr);
2032 if (id == 2) {
2033 thresh.put_qel(qshell);
2034 fl.put_qel(qshell);
2035 }
2036 for (int nshell = 0; nshell < qshell; ++nshell) {
2037#ifdef READ_FILE_WITH_PRINCIPAL_NUMBERS
2038 int n_princ = 0;
2039#endif
2040 int l;
2041 double threshold;
2042 double E0;
2043 double yw;
2044 double ya;
2045 double P;
2046 double sigma;
2047 if (BT_file.eof()) {
2048 mcerr << "unexpected end of file " << BT_file_name << '\n';
2049 spexit(mcerr);
2050 }
2051 if (!BT_file.good()) {
2052 mcerr << "bad format of file " << BT_file_name << '\n';
2053 spexit(mcerr);
2054 }
2055#ifdef READ_FILE_WITH_PRINCIPAL_NUMBERS
2056 BT_file >> n_princ;
2057 if (!BT_file.good()) {
2058 mcerr << "bad format of file " << BT_file_name << '\n';
2059 spexit(mcerr);
2060 }
2061 check_econd21(n_princ, < 0 ||, > 10, mcerr);
2062#endif
2063 BT_file >> l >> threshold >> E0 >> sigma >> ya >> P >> yw;
2064 check_econd11(l, < 0, mcerr);
2065 check_econd11(l, > 20, mcerr);
2066 threshold *= 1.0e-6;
2067 E0 *= 1.0e-6;
2068
2069 check_econd11a(threshold, <= 2.0e-6,
2070 "n_princ=" << n_princ << " l=" << l << '\n', mcerr);
2071 check_econd11(E0, <= 0, mcerr);
2072 double flu = 0.0;
2073 if (id == 2) {
2074 if (BT_file.eof()) {
2075 mcerr << "unexpected end of file " << BT_file_name << '\n';
2076 spexit(mcerr);
2077 }
2078 if (!BT_file.good()) {
2079 mcerr << "bad format of file " << BT_file_name << '\n';
2080 spexit(mcerr);
2081 }
2082 BT_file >> flu;
2083 check_econd11(flu, < 0.0, mcerr);
2084 check_econd11(flu, > 1.0, mcerr);
2085 thresh[nshell] = threshold;
2086 fl[nshell] = flu;
2087 }
2088#ifdef READ_FILE_WITH_PRINCIPAL_NUMBERS
2089 String shellname(long_to_String(n_princ) + // necessary
2090 // for generation escape products
2091 String(" shell number ") + long_to_String(nshell));
2092#else
2093 String shellname(String("shell number ") + long_to_String(nshell));
2094#endif
2095 acs[nshell].pass(
2096 new SimpleTablePhotoAbsCS(shellname, 0, // unknown here
2097 threshold, l, E0, yw, ya, P, sigma));
2098 //Iprintn(mcout, nshell);
2099 //Iprint3n(mcout, l, threshold, E0);
2100 //Iprint4n(mcout, yw, ya, P, sigma);
2101 //acs[nshell]->print(mcout, 5);
2102 }
2103 goto mark1;
2104 }
2105 }
2106 funnw.ehdr(mcerr);
2107 mcerr << "there is no element Z=" << fZ << " in file " << fFitBT_file_name
2108 << std::endl;
2109 spexit(mcerr);
2110mark1:
2111 if (id == 2) {
2112 // a copy of similar thing from subroutine above
2113 int n_min = 0;
2114 double st = DBL_MAX;
2115 for (int nshell = 0; nshell < qshell; ++nshell) {
2116 // currently the minimal shell is the last,
2117 // but to avoid this assumption we check all
2118 if (thresh[nshell] < st) {
2119 n_min = nshell;
2120 st = thresh[nshell];
2121 }
2122 }
2124 for (int nshell = 0; nshell < qshell; ++nshell) {
2125 if (fl[nshell] > 0) {
2126 check_econd12(nshell, ==, n_min, mcerr);
2127 DynLinArr<double> felectron_energy(0);
2128 DynLinArr<double> fphoton_energy(1);
2129 fphoton_energy[0] = thresh[nshell] - thresh[n_min];
2130 asp[nshell].add_channel(fl[nshell], felectron_energy, fphoton_energy);
2131 }
2132 }
2133 }
2134
2135 check_econd11(qshell, <= 0, mcerr);
2138 exener[0] = exener[1] = 0.0;
2139 double integ = get_integral_ACS(0.0, DBL_MAX);
2140 //Iprintn(mcout, integ);
2141 integ_abs_before_corr = integ;
2142 double pred_integ = Thomas_sum_rule_const_Mb * Z;
2143 //Iprintn(mcout, pred_integ);
2144 if (pred_integ > integ) {
2146 // add excitation
2147 exener[0] =
2148 low_boundary_of_excitations * acs[qshell - 1]->get_threshold();
2149 exener[1] = 1.0 * acs[qshell - 1]->get_threshold();
2150 height_of_excitation = (pred_integ - integ) / (exener[1] - exener[0]);
2151 if (minimal_threshold > 0.0) {
2152 if (minimal_threshold > acs[qshell - 1]->get_threshold()) {
2153 // currently the minimal shell is the last one
2154 exener[0] += minimal_threshold - acs[qshell - 1]->get_threshold();
2155 exener[1] += minimal_threshold - acs[qshell - 1]->get_threshold();
2156 }
2157 }
2158 }
2159 } else {
2160 if (s_scale_to_normalize_if_more == 1 && s_no_scale == 0) {
2161 const double fact = pred_integ / integ;
2162 for (int nshell = 0; nshell < qshell; ++nshell) {
2163 acs[nshell]->scale(fact);
2164 }
2165 }
2166 }
2167 integ_abs_after_corr = get_integral_ACS(0.0, DBL_MAX);
2169}
String long_to_String(long n)
Definition: String.h:102

◆ ExAtomPhotoAbsCS() [5/5]

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

Definition at line 2171 of file PhotoAbsCS.cpp.

2178 {
2179 mfunname("ExAtomPhotoAbsCS::ExAtomPhotoAbsCS(...)");
2180 Z = fZ;
2181 name = fname;
2182 int s_no_scale = 1;
2183 *this =
2184 ExAtomPhotoAbsCS(fZ, fname, // just name of this atom
2185 fFitBT_file_name, id, s_no_scale, fminimal_threshold);
2186
2188 exener[0] = exener[1] = 0.0;
2189
2190 double thrmin = DBL_MAX;
2191 long nsmin = -1;
2192 // look for minimal shell (usually the last)
2193 for (long ns = 0; ns < qshell; ++ns) {
2194 //Iprint2n(mcout, ns, acs[ns]->get_threshold());
2195 if (thrmin > acs[ns]->get_threshold()) {
2196 nsmin = ns;
2197 thrmin = acs[ns]->get_threshold();
2198 }
2199 }
2200 //Iprint3n(mcout, nsmin, acs[nsmin]->get_threshold(), thrmin);
2201 check_econd11(nsmin, < 0, mcerr);
2202 check_econd11(nsmin, != qshell - 1, mcerr); // now it has to be by this way
2203 ActivePtr<PhotoAbsCS> facs = acs[nsmin]; // copying the valence shell
2204 PhotoAbsCS* apacs = facs.get();
2205 //PhotoAbsCS* apacs = acs[nsmin]->getver();
2206 SimpleTablePhotoAbsCS* first_shell =
2207 dynamic_cast<SimpleTablePhotoAbsCS*>(apacs);
2208 //mcout<<"first_shell:\n";
2209 //first_shell->print(mcout, 2);
2210 // Strange why the following does not work (because of something being not
2211 // implemented in commpiler)? - may be due to an error before, which is now
2212 // corrected.
2213 // assumes the first is the last
2214 // SimpleTablePhotoAbsCS* first_shell =
2215 // dynamic_cast<SimpleTablePhotoAbsCS*>(&(acs[nsmin]->getver()));
2216
2217 check_econd11(first_shell, == NULL, mcerr);
2218 /*
2219#ifdef USE_STLSTRING
2220 std::ifstream threshold_file(threshold_file_name.c_str());
2221#else
2222 std::ifstream threshold_file(threshold_file_name);
2223#endif
2224 if( !threshold_file )
2225 {
2226 funnw.ehdr(mcerr);
2227 mcerr<<"cannot open file "<<threshold_file_name<<std::endl;
2228 spexit(mcerr);
2229 }
2230 DynLinArr< double > thr(0, 0.0);
2231 DynLinArr< int > Zshell(0, 0);
2232 DynLinArr< double > fl(0, 0.0);
2233 DynLinArr< String > shell_name(0);
2234 int n_min=0;
2235 double thr_min = DBL_MAX;
2236 while (findmark(threshold_file, "#") == 1) {
2237 threshold_file >> Z;
2238 if (Z == fZ) {
2239 threshold_file >> qshell;
2240 check_econd21( qshell , < 1 || , > 10000 , mcerr);
2241 s_ignore_shell.put_qel(qshell, 0);
2242 //Iprintn(mcout, qshell);
2243 thr = DynLinArr< double >(qshell, 0.0);
2244 Zshell = DynLinArr< int >(qshell, 0);
2245 fl = DynLinArr< double >(qshell, 0.0);
2246 shell_name = DynLinArr< String >(qshell);
2247 String temp_name;
2248 threshold_file >> temp_name;
2249 if(fname == "none") name = temp_name;
2250 else name = fname;
2251 int sZshell = 0;
2252 for (int nshell = 0; nshell < qshell; nshell++) {
2253 threshold_file >> thr[nshell];
2254 check_econd11(thr[nshell] , <= 0.0, mcerr);
2255 thr[nshell] *= 1.0e-6;
2256 threshold_file >> Zshell[nshell];
2257 check_econd11(Zshell[nshell] , <= 0, mcerr);
2258 sZshell += Zshell[nshell];
2259 threshold_file >> fl[nshell];
2260 findmark(threshold_file, "!");
2261 threshold_file >> shell_name[nshell];
2262 //PhotoAbsCS* ap = new PhenoPhotoAbsCS(shell_name, Zshell, thr);
2263 //acs[nshell].pass( ap );
2264 }
2265 check_econd12( sZshell , != , Z , mcerr);
2266 for(nshell=0; nshell<qshell; nshell++) {
2267 // currently the minimal shell is the last,
2268 // but to avoid this assumption we check all
2269 if (thr[nshell] < thr_min) {
2270 n_min = nshell;
2271 thr_min = thr[nshell];
2272 }
2273 }
2274 goto mark1;
2275 }
2276 }
2277 funnw.ehdr(mcerr);
2278 mcerr<<"there is no element Z="<<fZ<<" in file
2279"<<threshold_file_name<<std::endl;
2280 spexit(mcerr);
2281 mark1:
2282 */
2283
2284 SimpleTablePhotoAbsCS stpacs(name, Z, 0.0, fsimple_table_file_name);
2285 stpacs.remove_leading_tiny(1.0e-10);
2286
2287 // Merging shells:
2288 acs[nsmin].pass(new SimpleTablePhotoAbsCS(*first_shell, stpacs, emax_repl));
2289
2292 exener[0] = exener[1] = 0.0;
2293 double integ = get_integral_ACS(0.0, DBL_MAX);
2294 //Iprintn(mcout, integ);
2295 integ_abs_before_corr = integ;
2296 double pred_integ = Thomas_sum_rule_const_Mb * Z;
2297 //Iprintn(mcout, pred_integ);
2298 if (pred_integ > integ) {
2300 // add excitation
2301 exener[0] =
2302 low_boundary_of_excitations * acs[qshell - 1]->get_threshold();
2303 exener[1] = 1.0 * acs[qshell - 1]->get_threshold();
2304 height_of_excitation = (pred_integ - integ) / (exener[1] - exener[0]);
2305 if (minimal_threshold > 0.0) {
2306 if (minimal_threshold > acs[qshell - 1]->get_threshold()) {
2307 // currently the minimal shell is the last one
2308 exener[0] += minimal_threshold - acs[qshell - 1]->get_threshold();
2309 exener[1] += minimal_threshold - acs[qshell - 1]->get_threshold();
2310 }
2311 }
2312 }
2313 } else {
2315 const double fact = pred_integ / integ;
2316 for (int nshell = 0; nshell < qshell; ++nshell) {
2317 acs[nshell]->scale(fact);
2318 }
2319 }
2320 }
2321 integ_abs_after_corr = get_integral_ACS(0.0, DBL_MAX);
2323}
#define mfunname(string)
Definition: FunNameStack.h:67

◆ ~ExAtomPhotoAbsCS()

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

Definition at line 511 of file PhotoAbsCS.h.

511{}

Member Function Documentation

◆ get_ACS() [1/2]

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

Implements Heed::AtomPhotoAbsCS.

Definition at line 2400 of file PhotoAbsCS.cpp.

2400 {
2401 mfunname("double ExAtomPhotoAbsCS::get_ACS(double energy) const");
2402 double s = 0.0;
2403 for (int n = 0; n < qshell; ++n) {
2404 if (s_ignore_shell[n] == 0) {
2405 double shift = 0.0;
2406 const double t = acs[n]->get_threshold();
2407 if (minimal_threshold > 0.0) {
2408 if (t < minimal_threshold) shift = minimal_threshold - t;
2409 }
2410 s += acs[n]->get_CS(energy - shift);
2411 }
2412 }
2413 if (energy >= exener[0] && energy <= exener[1]) {
2415 }
2416 return s;
2417}

◆ get_ACS() [2/2]

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

Implements Heed::AtomPhotoAbsCS.

Definition at line 2448 of file PhotoAbsCS.cpp.

2448 {
2449 mfunname("double ExAtomPhotoAbsCS::get_ACS(int nshell, double energy)");
2450 check_econd21(nshell, < 0 ||, > qshell, mcerr);
2451 if (s_ignore_shell[nshell] == 0) {
2452 double shift = 0.0;
2453 const double t = acs[nshell]->get_threshold();
2454 if (minimal_threshold > 0.0) {
2455 if (t < minimal_threshold) shift = minimal_threshold - t;
2456 }
2457 double s = acs[nshell]->get_CS(energy - shift);
2458 if (nshell == qshell - 1 && energy >= exener[0] && energy <= exener[1]) {
2460 }
2461 return s;
2462 }
2463 return 0.0;
2464}

◆ get_ICS() [1/2]

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

Implements Heed::AtomPhotoAbsCS.

Definition at line 2335 of file PhotoAbsCS.cpp.

2335 {
2336 mfunname("double ExAtomPhotoAbsCS::get_ACS(double energy) const");
2337 double s = 0.0;
2338 for (int n = 0; n < qshell; ++n) {
2339 if (s_ignore_shell[n] == 0) {
2340 double shift = 0.0;
2341 const double t = acs[n]->get_threshold();
2342 if (minimal_threshold > 0.0) {
2343 if (t < minimal_threshold) shift = minimal_threshold - t;
2344 }
2345 //Iprint3n(mcout, n, t, shift);
2346 s += acs[n]->get_CS(energy - shift);
2347 //Iprintn(mcout, s);
2348 }
2349 }
2350 return s;
2351}

◆ get_ICS() [2/2]

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

Implements Heed::AtomPhotoAbsCS.

Definition at line 2370 of file PhotoAbsCS.cpp.

2370 {
2371 mfunname("double ExAtomPhotoAbsCS::get_ICS(int nshell, double energy)");
2372 check_econd21(nshell, < 0 ||, > qshell, mcerr);
2373 if (s_ignore_shell[nshell] == 0) {
2374 double shift = 0.0;
2375 const double t = acs[nshell]->get_threshold();
2376 if (minimal_threshold > 0.0) {
2377 if (t < minimal_threshold) shift = minimal_threshold - t;
2378 }
2379 return acs[nshell]->get_CS(energy - shift);
2380 }
2381 return 0.0;
2382}

◆ get_integral_ACS() [1/2]

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

Implements Heed::AtomPhotoAbsCS.

Definition at line 2419 of file PhotoAbsCS.cpp.

2420 {
2421 mfunname("double ExAtomPhotoAbsCS::get_integral_ACS(double energy1, double "
2422 "energy2) const");
2423 double s = 0.0;
2424 for (int n = 0; n < qshell; ++n) {
2425 if (s_ignore_shell[n] == 0) {
2426 double shift = 0.0;
2427 const double t = acs[n]->get_threshold();
2428 if (minimal_threshold > 0.0) {
2429 if (t < minimal_threshold) shift = minimal_threshold - t;
2430 }
2431 s += acs[n]->get_integral_CS(energy1 - shift, energy2 - shift);
2432 }
2433 }
2434 //Imcout<<"energy1="<<setw(13)<<energy1
2435 // <<"energy2="<<setw(13)<<energy2
2436 // <<" s="<<s<<'\n';
2437 double b[2];
2438 b[0] = find_max(exener[0], energy1);
2439 b[1] = find_min(exener[1], energy2);
2440 //Iprint3n(mcout, b[0], b[1], height_of_excitation);
2441 if (b[1] >= b[0]) {
2442 s += height_of_excitation * (b[1] - b[0]);
2443 }
2444 //Iprintn(mcout, s);
2445 return s;
2446}
DoubleAc find_min(const DoubleAc &a, const DoubleAc &b)
Definition: DoubleAc.h:627
DoubleAc find_max(const DoubleAc &a, const DoubleAc &b)
Definition: DoubleAc.h:655

Referenced by ExAtomPhotoAbsCS(), and print().

◆ get_integral_ACS() [2/2]

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

Implements Heed::AtomPhotoAbsCS.

Definition at line 2466 of file PhotoAbsCS.cpp.

2467 {
2468 mfunname("double ExAtomPhotoAbsCS::get_integral_ACS(int nshell, double "
2469 "energy1, double energy2)");
2470 check_econd21(nshell, < 0 ||, > qshell, mcerr);
2471 if (s_ignore_shell[nshell] == 0) {
2472 double shift = 0.0;
2473 const double t = acs[nshell]->get_threshold();
2474 if (minimal_threshold > 0.0) {
2475 if (t < minimal_threshold) shift = minimal_threshold - t;
2476 }
2477 double s = acs[nshell]->get_integral_CS(energy1 - shift, energy2 - shift);
2478 //Imcout<<"energy1="<<setw(13)<<energy1<<" s="<<s<<'\n';
2479 if (nshell == qshell - 1) {
2480 double b[2];
2481 b[0] = find_max(exener[0], energy1);
2482 b[1] = find_min(exener[1], energy2);
2483 if (b[1] >= b[0]) {
2484 s += height_of_excitation * (b[1] - b[0]);
2485 }
2486 }
2487 return s;
2488 }
2489 return 0.0;
2490}

◆ get_integral_ICS() [1/2]

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

Implements Heed::AtomPhotoAbsCS.

Definition at line 2353 of file PhotoAbsCS.cpp.

2354 {
2355 mfunname("double ExAtomPhotoAbsCS::get_integral_ICS(double energy)const");
2356 double s = 0.0;
2357 for (int n = 0; n < qshell; ++n) {
2358 if (s_ignore_shell[n] == 0) {
2359 double shift = 0.0;
2360 const double t = acs[n]->get_threshold();
2361 if (minimal_threshold > 0.0) {
2362 if (t < minimal_threshold) shift = minimal_threshold - t;
2363 }
2364 s += acs[n]->get_integral_CS(energy1 - shift, energy2 - shift);
2365 }
2366 }
2367 return s;
2368}

Referenced by ExAtomPhotoAbsCS(), and print().

◆ get_integral_ICS() [2/2]

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

Implements Heed::AtomPhotoAbsCS.

Definition at line 2384 of file PhotoAbsCS.cpp.

2385 {
2386 mfunname("double ExAtomPhotoAbsCS::get_integral_ICS(int nshell, double "
2387 "energy1, double energy2)");
2388 check_econd21(nshell, < 0 ||, > qshell, mcerr);
2389 if (s_ignore_shell[nshell] == 0) {
2390 double shift = 0.0;
2391 const double t = acs[nshell]->get_threshold();
2392 if (minimal_threshold > 0.0) {
2393 if (t < minimal_threshold) shift = minimal_threshold - t;
2394 }
2395 return acs[nshell]->get_integral_CS(energy1 - shift, energy2 - shift);
2396 }
2397 return 0.0;
2398}

◆ get_main_shell_number()

int Heed::ExAtomPhotoAbsCS::get_main_shell_number ( int  nshell) const
virtual

Implements Heed::AtomPhotoAbsCS.

Definition at line 2531 of file PhotoAbsCS.cpp.

2531 {
2532 mfunname("int ExAtomPhotoAbsCS::get_main_shell_number(int nshell) const");
2533 String shell_name = acs[nshell]->get_name();
2534#ifdef STRSTREAM_AVAILABLE
2535#ifdef USE_STLSTRING
2536 istrstream sfile(shell_name.c_str());
2537#else
2538 istrstream sfile(shell_name);
2539#endif
2540#else
2541 std::istringstream sfile(shell_name.c_str());
2542#endif
2543 int i = -1;
2544 sfile >> i;
2545 //Iprintn(mcout, i);
2546 //check_econd(i < 1 || i > 50 , "i="<<i<<" shell_name="<<shell_name<<'\n' ,
2547 // mcerr);
2548 if (i < 1 || i > 50) {
2549 i = -1;
2550 }
2551 return i;
2552}

◆ get_threshold()

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

Implements Heed::AtomPhotoAbsCS.

Definition at line 2325 of file PhotoAbsCS.cpp.

2325 {
2326 mfunname("double ExAtomPhotoAbsCS::get_threshold(int nshell) const");
2327 check_econd21(nshell, < 0 ||, > qshell, mcerr);
2328 double r = acs[nshell]->get_threshold();
2329 if (minimal_threshold > 0.0) {
2331 }
2332 return r;
2333}

Referenced by ExAtomPhotoAbsCS().

◆ macro_copy_total()

Heed::ExAtomPhotoAbsCS::macro_copy_total ( ExAtomPhotoAbsCS  )

◆ print()

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

Reimplemented from Heed::AtomPhotoAbsCS.

Definition at line 2492 of file PhotoAbsCS.cpp.

2492 {
2493 if (l > 0) {
2494 Ifile << "ExAtomPhotoAbsCS(l=" << l << "): name=" << name << " Z = " << Z
2495 << " qshell = " << qshell << std::endl;
2496 indn.n += 2;
2497 Ifile << "threshold_file_name=" << threshold_file_name << '\n';
2498 Ifile << "simple_table_file_name=" << simple_table_file_name << '\n';
2499 Ifile << "BT_file_name=" << BT_file_name << std::endl;
2500 Ifile << "Thomas_sum_rule_const_Mb * Z = " << Thomas_sum_rule_const_Mb* Z
2501 << '\n';
2502 Ifile << "integ_abs_before_corr = " << integ_abs_before_corr << '\n';
2503 Ifile << "integ_abs_after_corr = " << integ_abs_after_corr << '\n';
2504 Ifile << "integ_ioniz_after_corr = " << integ_ioniz_after_corr
2505 << '\n';
2506 Ifile << "height_of_excitation=" << height_of_excitation
2507 << " exener=" << exener[0] << ' ' << exener[1] << '\n';
2509 Ifile << "integrals by shells:\n";
2510 Ifile << "nshell, int(acs), int(ics)\n";
2511 for (long n = 0; n < qshell; n++) {
2512 double ainteg = get_integral_ACS(n, 0.0, DBL_MAX);
2513 double iinteg = get_integral_ICS(n, 0.0, DBL_MAX);
2514 Ifile << n << " " << ainteg << " " << iinteg << '\n';
2515 }
2516
2517 if (l > 1) {
2518 l--;
2519 indn.n += 2;
2520 for (long n = 0; n < qshell; ++n) {
2521 Ifile << "nshell=" << n << std::endl;
2522 acs[n].print(file, l);
2523 }
2524 AtomPhotoAbsCS::print(file, l);
2525 indn.n -= 2;
2526 }
2527 indn.n -= 2;
2528 }
2529}
virtual void print(std::ostream &file, int l) const
indentation indn
Definition: prstream.cpp:13
#define Ifile
Definition: prstream.h:207
#define Iprintn(file, name)
Definition: prstream.h:216

◆ replace_shells_by_overage()

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

Definition at line 2554 of file PhotoAbsCS.cpp.

2556 {
2557 mfunname("void ExAtomPhotoAbsCS::replace_shells_by_overage(...)");
2558 for (long n = 0; n < qshell; n++) {
2559 //Iprintn(mcout, n);
2560 //mcout<<"----------------before replacement:\n";
2561 //acs[n]->print(mcout, 10);
2562 PhotoAbsCS* a =
2563 new OveragePhotoAbsCS(acs[n].getver(), fwidth, fstep, fmax_q_step);
2564 //mcout<<"----------------after replacement:\n";
2565 //acs[n]->print(mcout, 10);
2566 acs[n].pass(a);
2567 }
2568}

Member Data Documentation

◆ acs

DynLinArr<ActivePtr<PhotoAbsCS> > Heed::ExAtomPhotoAbsCS::acs
protected

◆ BT_file_name

String Heed::ExAtomPhotoAbsCS::BT_file_name
protected

Definition at line 516 of file PhotoAbsCS.h.

Referenced by ExAtomPhotoAbsCS(), and print().

◆ exener

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

Definition at line 529 of file PhotoAbsCS.h.

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

◆ height_of_excitation

double Heed::ExAtomPhotoAbsCS::height_of_excitation
protected

Definition at line 528 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 526 of file PhotoAbsCS.h.

Referenced by ExAtomPhotoAbsCS(), and print().

◆ integ_abs_before_corr

double Heed::ExAtomPhotoAbsCS::integ_abs_before_corr
protected

Definition at line 525 of file PhotoAbsCS.h.

Referenced by ExAtomPhotoAbsCS(), and print().

◆ integ_ioniz_after_corr

double Heed::ExAtomPhotoAbsCS::integ_ioniz_after_corr
protected

Definition at line 527 of file PhotoAbsCS.h.

Referenced by ExAtomPhotoAbsCS(), and print().

◆ minimal_threshold

double Heed::ExAtomPhotoAbsCS::minimal_threshold
protected

◆ simple_table_file_name

String Heed::ExAtomPhotoAbsCS::simple_table_file_name
protected

Definition at line 515 of file PhotoAbsCS.h.

Referenced by print().

◆ threshold_file_name

String Heed::ExAtomPhotoAbsCS::threshold_file_name
protected

Definition at line 514 of file PhotoAbsCS.h.

Referenced by ExAtomPhotoAbsCS(), and print().


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