Particles and Nuclei Sub-Library: Version 0.910
nuclear_mass.h
00001 /*
00002   -------------------------------------------------------------------
00003   
00004   Copyright (C) 2006-2012, Andrew W. Steiner
00005   
00006   This file is part of O2scl.
00007   
00008   O2scl is free software; you can redistribute it and/or modify
00009   it under the terms of the GNU General Public License as published by
00010   the Free Software Foundation; either version 3 of the License, or
00011   (at your option) any later version.
00012   
00013   O2scl is distributed in the hope that it will be useful,
00014   but WITHOUT ANY WARRANTY; without even the implied warranty of
00015   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016   GNU General Public License for more details.
00017   
00018   You should have received a copy of the GNU General Public License
00019   along with O2scl. If not, see <http://www.gnu.org/licenses/>.
00020 
00021   -------------------------------------------------------------------
00022 */
00023 #ifndef O2SCL_NUCLEAR_MASS_H
00024 #define O2SCL_NUCLEAR_MASS_H
00025 
00026 #include <cmath>
00027 #include <string>
00028 #include <map>
00029 #include <o2scl/nucleus.h>
00030 #include <o2scl/constants.h>
00031 #include <o2scl/table.h>
00032 
00033 #ifndef DOXYGENP
00034 namespace o2scl {
00035 #endif
00036 
00037   /// Nuclear mass info
00038   class nuclear_mass_info {
00039   public:
00040     
00041     nuclear_mass_info();
00042     
00043     /** \brief Parse a string representing an element
00044 
00045         Accepts strings of one of the following forms:
00046         - <tt>Pb208</tt>
00047         - <tt>pb208</tt>
00048         - <tt>Pb 208</tt>
00049         - <tt>Pb-208</tt>
00050         - <tt>pb 208</tt>
00051         - <tt>pb-208</tt>
00052         or one of the special strings <tt>n</tt>, <tt>p</tt>, <tt>d</tt>
00053         or <tt>t</tt> for the neutron, proton, deuteron, and triton, 
00054         respectively. This function also allows the value of A
00055         to precede the element symbol.
00056 
00057         \note At present, this allows nuclei which don't make sense
00058         because A<Z, such as Carbon-5.
00059 
00060         \future Warn about malformed combinations like Carbon-5
00061         \future Right now, <tt>n4</tt> is interpreted incorrectly
00062         as Nitrogen-4, rather than the tetraneutron.
00063         
00064     */
00065     int parse_elstring(std::string ela, int &Z, int &N, int &A);    
00066 
00067     /** \brief Return Z given the element name
00068        
00069         If the string parameter \c el is invalid, the error handler is
00070         called and the value -1 is returned.
00071     */
00072     int eltoZ(std::string el);
00073     
00074     /** \brief Return the element name given Z
00075        
00076         \note This function returns \c "n" indicating the neutron for
00077         Z=0, and if the argument \c Z is greater than 118, an empty
00078         string is returned after calling the error handler.
00079     */
00080     std::string Ztoel(size_t Z);
00081 
00082     /** \brief Return a string of the form "Pb208" for a given Z and N
00083 
00084         Note that if \c Z is zero, then and \c 'n' is 
00085         used to indicate the a nucleus composed entirely of neutrons 
00086         and if the argument \c Z is greater than 118, an
00087         empty string is returned (independ.
00088     */
00089     std::string tostring(size_t Z, size_t N);
00090 
00091 #ifndef DOXYGEN_INTERNAL
00092 
00093   protected:
00094 
00095     /// The number of elements (proton number)
00096     static const int nelements=119;
00097     
00098     /// A map containing the proton numbers organized by element name
00099     std::map<std::string,int,string_comp> element_table;
00100     
00101     /// A convenient typedef for an iterator for element_table
00102     typedef std::map<std::string,int,string_comp>::iterator table_it;
00103     
00104     /// The list of elements organized by proton number
00105     std::string element_list[nelements];
00106 
00107 #endif
00108     
00109     
00110   };
00111   
00112   /** \brief Nuclear mass formula base [abstract base]
00113 
00114       This base class provides some default functionality for
00115       the nuclear mass formulas. For typical usage, use
00116       \ref ame_mass, \ref mnmsk_mass, \ref mnmsk_mass_exp,
00117       or \ref semi_empirical_mass.
00118 
00119       Elements 113, 115, 117 and 118 are named "Uut", "Uup", "Uus",
00120       and "Uuo", respectively.
00121 
00122       Binding energies are determined from mass excesses by
00123       \f[
00124       \mathrm{binding~energy} = A u - Z \left(m_p + m_e\right) - N m_n +
00125       \mathrm{mass~excess}
00126       \f]
00127       where \f$ u \f$, \f$ m_n \f$, \f$ m_p \f$ and \f$ m_e \f$
00128       are all in \ref o2scl_fm . "Total masses" are the mass 
00129       of the nuclide (without the electron mass contribution)
00130       \f[
00131       \mathrm{total~mass} = \mathrm{mass~excess} + A u - Z m_e
00132       \f]
00133       Note that \o2 generally ignores contributions from 
00134       electron binding energies.
00135       
00136       Some mass formulas are undefined for sufficiently exotic nuclei.
00137       You can use the function is_included() to find if a particular
00138       \nucleus is included or not in a particular mass formula. 
00139 
00140       Generally, descendants of this class only need to provide an
00141       implementation of \ref mass_excess() and \ref mass_excess_d()
00142       and possibly a new version of \ref is_included().
00143 
00144       Some common reaction Q-values and separation energies: \n
00145       \f$\mathrm{Q}(\beta^{-})=\mathrm{M(A,Z)}-\mathrm{M(A,Z+1)}\f$: 
00146       Beta-decay energy \n
00147       \f$\mathrm{Q}(2\beta^{-})=\mathrm{M(A,Z)}-\mathrm{M(A,Z+2)}\f$: 
00148       Double beta-decay energy \n
00149       \f$\mathrm{Q}(4\beta^{-})=\mathrm{M(A,Z)}-\mathrm{M(A,Z+4)}\f$: 
00150       Four beta-decay energy \n
00151       \f$\mathrm{Q}(\alpha)=\mathrm{M(A,Z)}-\mathrm{M(A-4,Z-2)}-
00152       \mathrm{M(He^{4})}\f$: 
00153       Alpha-decay energy \n
00154       \f$\mathrm{Q}(\beta-n)=\mathrm{M(A,Z)}-\mathrm{M(A-1,Z+1)}
00155       -\mathrm{M(n)}\f$: 
00156       Beta-delayed neutron emission decay energy \n
00157       \f$\mathrm{Q}(d,\alpha)=\mathrm{M(A,Z)}-\mathrm{M(A-2,Z-1)}
00158       -\mathrm{M(He^{4})}-\mathrm{M(H^{2})}\f$: 
00159       \f$(d,\alpha)\f$ reaction energy \n
00160       \f$\mathrm{Q}(\mathrm{EC})=\mathrm{M(A,Z)}-\mathrm{M(A,Z-1)}\f$: 
00161       Electron capture decay energy \n
00162       \f$\mathrm{Q}(\mathrm{ECp})=\mathrm{M(A,Z)}-\mathrm{M(A-1,Z-2)}\f$: 
00163       Electron capture with delayed proton emission decay energy \n
00164       \f$\mathrm{Q}(n,\alpha)=\mathrm{M(A,Z)}-\mathrm{M(A-3,Z-2)}
00165       -\mathrm{M(He^{4})}+\mathrm{M(n)}\f$: 
00166       \f$(n,\alpha)\f$ reaction energy \n
00167       \f$\mathrm{Q}(p,\alpha)=\mathrm{M(A,Z)}-\mathrm{M(A-3,Z-1)}
00168       -\mathrm{M(He^{4})}+\mathrm{M(p)}\f$: 
00169       \f$(p,\alpha)\f$ reaction energy \n
00170       \f$\mathrm{S}(n) = \mathrm{-M(A,Z)}+\mathrm{M(A-1,Z)}+
00171       \mathrm{M(n)}\f$: Neutron separation energy \n
00172       \f$\mathrm{S}(p) = \mathrm{-M(A,Z)}+\mathrm{M(A-1,Z-1)}+
00173       \mathrm{H^{1}}\f$: Proton separation energy \n
00174       \f$\mathrm{S}(2n) = \mathrm{-M(A,Z)}+\mathrm{M(A-2,Z)}+
00175       \mathrm{2M(n)}\f$: Two neutron separation energy \n
00176       \f$\mathrm{S}(2p) = \mathrm{-M(A,Z)}+\mathrm{M(A-2,Z-2)}+
00177       \mathrm{2 M(H^{1)}}\f$: Two proton separation energy \n
00178 
00179       \future Find a way to include the electron binding energy
00180       contribution, possibly with the help of a theoretical model.
00181 
00182       \comment
00183       \future It might be useful to consider a fudge factor 
00184       to ensure no problems with finite precision arithmetic
00185       when converting \c double to \c int. 
00186       11/22/09 - I waffle back and forth on this. I think
00187       maybe its best to let the user deal with this their own
00188       way.
00189       \endcomment
00190 
00191   */
00192   class nuclear_mass : public nuclear_mass_info {
00193   public:
00194 
00195     /** \brief Neutron mass in \f$ \mathrm{MeV} \f$ 
00196         (defaults to o2scl_fm::mass_neutron times o2scl_const::hc_mev_fm)
00197     */
00198     double m_neut;
00199     
00200     /** \brief Proton mass in \f$ \mathrm{MeV} \f$ 
00201         (defaults to o2scl_fm::mass_proton times o2scl_const::hc_mev_fm)
00202     */
00203     double m_prot;
00204     
00205     /** \brief Electron mass in \f$ \mathrm{MeV} \f$ 
00206         (defaults to o2scl_fm::mass_elec times o2scl_const::hc_mev_fm)
00207     */
00208     double m_elec;
00209 
00210     /** \brief Atomic mass unit in \f$ \mathrm{MeV} \f$ 
00211         (defaults to o2scl_fm::mass_amu times o2scl_const::hc_mev_fm)
00212     */
00213     double m_amu;
00214     
00215     nuclear_mass();
00216     
00217     virtual ~nuclear_mass() {};
00218 
00219     /// Return the type, \c "nuclear_mass".
00220     virtual const char *type() { return "nuclear_mass"; }
00221 
00222     /** \brief Return false if the mass formula does not include 
00223         specified nucleus
00224     */
00225     virtual bool is_included(int Z, int N) {
00226       return true;
00227     }
00228     
00229     /** \brief Fill \c n with the information from nucleus with the given
00230         neutron and proton number
00231         
00232         All masses are given in \f$\mathrm{fm}^{-1}\f$. The total mass
00233         (withouth the electrons) is put in part::m and part::ms, the
00234         binding energy is placed in nucleus::be, the mass excess in
00235         nucleus::mex and the degeneracy (part::g) is arbitrarily set
00236         to 1 for even A nuclei and 2 for odd A nuclei.
00237     */
00238     virtual int get_nucleus(int Z, int N, nucleus &n);
00239     
00240     /// Given \c Z and \c N, return the mass excess in MeV
00241     virtual double mass_excess(int Z, int N)=0;
00242 
00243     /// Given \c Z and \c N, return the mass excess in MeV
00244     virtual double mass_excess_d(double Z, double N)=0;
00245 
00246     /// Return the approximate electron binding energy in MeV
00247     virtual double electron_binding(double Z) {
00248       return (14.4381*pow(Z,2.39)+1.55468e-6*pow(Z,5.35))*1.0e-6;
00249     }
00250     
00251     /** \brief Return the binding energy in MeV
00252         
00253         The binding energy is defined to be negative for bound 
00254         nuclei, thus the binding energy per baryon of Pb-208
00255         is about -8*208 = -1664 MeV.
00256     */
00257     virtual double binding_energy(int Z, int N) {
00258       return (mass_excess(Z,N)+((Z+N)*m_amu-Z*m_elec-N*m_neut-Z*m_prot));
00259     }
00260 
00261     /** \brief Return the binding energy in MeV
00262         
00263         The binding energy is defined to be negative for bound 
00264         nuclei, thus the binding energy per baryon of Pb-208
00265         is about -8*208 = -1664 MeV.
00266     */
00267     virtual double binding_energy_d(double Z, double N) {
00268       return (mass_excess_d(Z,N)+((Z+N)*m_amu-Z*m_elec-N*m_neut-Z*m_prot));
00269     }
00270     
00271     /** \brief Return the total mass of the nucleus (without the electrons) 
00272         in MeV
00273     */
00274     virtual double total_mass(int Z, int N) {
00275       return (mass_excess(Z,N)+((Z+N)*m_amu-Z*m_elec));
00276     }
00277     
00278     /** \brief Return the total mass of the nucleus (without the electrons) 
00279         in MeV
00280     */
00281     virtual double total_mass_d(double Z, double N) {
00282       return (mass_excess_d(Z,N)+((Z+N)*m_amu-Z*m_elec));
00283     }
00284 
00285     /** \brief Return the atomic mass of the nucleus in MeV
00286         (includes electrons and their binding energy)
00287     */
00288     virtual double atomic_mass(int Z, int N) {
00289       return total_mass(Z,N)+Z*m_elec-electron_binding(Z);
00290     }
00291     
00292     /** \brief Return the atomic mass of the nucleus in MeV
00293         (includes electrons and their binding energy)
00294     */
00295     virtual double atomic_mass_d(double Z, double N) {
00296       return total_mass_d(Z,N)+Z*m_elec-electron_binding(Z);
00297     }
00298 
00299   };
00300 
00301   /** \brief Discrete nuclear mass formula [abstract base]
00302 
00303       This uses simple linear interpolation to obtain masses of 
00304       nuclei with non-integer Z and N which may be particularly
00305       sensitive to the form of the pairing.
00306 
00307       Generally, descendants of this class only need to provide an
00308       implementation of \ref mass_excess() and possibly a version
00309       of \ref nuclear_mass::is_included()
00310 
00311    */
00312   class nuclear_mass_disc : public nuclear_mass {
00313 
00314   public:
00315     
00316     /// Given \c Z and \c N, return the mass excess in MeV
00317     virtual double mass_excess(int Z, int N)=0;
00318 
00319     /// Given \c Z and \c N, return the mass excess in MeV
00320     virtual double mass_excess_d(double Z, double N);
00321 
00322   };
00323 
00324   /** \brief Continuous nuclear mass formula [abstract base]
00325       
00326       Generally, descendants of this class only need to provide an
00327       implementation of \ref mass_excess_d() and possibly a version
00328       of \ref nuclear_mass::is_included()
00329   */
00330   class nuclear_mass_cont : public nuclear_mass {
00331 
00332   public:
00333     
00334     /// Given \c Z and \c N, return the mass excess in MeV
00335     virtual double mass_excess(int Z, int N) {
00336       return mass_excess_d(Z,N);
00337     }
00338     
00339     /// Given \c Z and \c N, return the mass excess in MeV
00340     virtual double mass_excess_d(double Z, double N)=0;
00341     
00342   };
00343 
00344   /** \brief Fittable mass formula
00345 
00346       Nuclear mass formulas which are descendants of this class
00347       can be fit to experiment using \ref mass_fit.
00348 
00349       Within \o2p, this class has only two children,
00350       \ref frdm_mass and \ref semi_empirical_mass. There
00351       is also a child \ref ldrop_mass in \o2e.
00352 
00353       \future This shouldn't be a child of nuclear_mass_cont?
00354   */
00355   class nuclear_mass_fit : public nuclear_mass_cont {
00356     
00357   public:
00358     
00359     /// Return the type, \c "nuclear_mass_fit".
00360     virtual const char *type() { return "nuclear_mass_fit"; }
00361 
00362     /// Number of fitting parameters
00363     size_t nfit;
00364 
00365     /// Fix parameters from an array for fitting
00366     virtual int fit_fun(size_t nv, const ovector_base &x)=0;
00367     
00368     /// Fill array with guess from present values for fitting
00369     virtual int guess_fun(size_t nv, ovector_base &x)=0;
00370 
00371   };
00372 
00373   /** \brief Semi-empirical mass formula
00374 
00375       A simple semi-empirical mass formula of the form
00376       \f[
00377       E/A = B + S_s \frac{1}{A^{1/3}}+E_c \frac{Z^2}{A^{4/3}}
00378       + S_v \left(1-\frac{2Z}{A}\right)^2+E_{\mathrm{pair}}(Z,N)
00379       \f]
00380       where the pairing energy is given by
00381       \f[
00382       E_{\mathrm{pair}}(Z,N) = - \frac{E_{\mathrm{pair}}}{2 A^{3/2}}
00383       \left[ \cos \left( \pi Z \right)+\cos \left( \pi N \right) \right]
00384       \f]
00385       which is equivalent to the traditional prescription
00386       \f[
00387       E_{\mathrm{pair}}(Z,N) = \frac{E_{\mathrm{pair}}}{A^{3/2}}
00388       \times
00389       \left\{ 
00390       \begin{array}{rl}
00391       -1 & \mathrm{N~and~Z~even} \\
00392       +1 & \mathrm{N~and~Z~odd} \\
00393       0 & \mathrm{otherwise} 
00394       \end{array}
00395       \right.
00396       \f]
00397       when \f$ Z \f$ and \f$ N \f$ and integers.
00398 
00399       \note The default parameters are arbitrary, and are not
00400       determined from a fit.
00401 
00402       There is an example of the usage of this class given in 
00403       \ref ex_mass_fit_sect.
00404   */
00405   class semi_empirical_mass : public nuclear_mass_fit {
00406 
00407   public:
00408 
00409     /// Binding energy (negative and in MeV, default -16)
00410     double B;
00411 
00412     /// Symmetry energy (in MeV, default 23.7)
00413     double Sv;
00414 
00415     /// Surface energy (in MeV, default 18)
00416     double Ss;
00417 
00418     /// Coulomb energy (in MeV, default 0.7)
00419     double Ec;
00420 
00421     /// Pairing energy (MeV, default 13.0)
00422     double Epair;
00423     
00424     /// Return the type, \c "semi_empirical_mass".
00425     virtual const char *type() { return "semi_empirical_mass"; }
00426 
00427     semi_empirical_mass();
00428 
00429     /// Given \c Z and \c N, return the mass excess in MeV
00430     virtual double mass_excess_d(double Z, double N);
00431     
00432     /// Fix parameters from an array for fitting
00433     virtual int fit_fun(size_t nv, const ovector_base &x);
00434 
00435     /// Fill array with guess from present values for fitting
00436     virtual int guess_fun(size_t nv, ovector_base &x);
00437     
00438   };
00439   
00440   /** \brief Atomic mass entry structure
00441 
00442       Atomic mass entry data object for \ref ame_mass.
00443 
00444       In cases where the decimal point in the original table was
00445       replaced with a <tt>#</tt>, the associated accuracy field is set
00446       to \ref estimated.  In cases where the original table contained
00447       a asterisk to indicate a value was not calculable, the accuracy
00448       field is set to \ref not_calculable and the value is zero. If
00449       \o2 internally computed the value instead of reading it from the
00450       original table, the accuracy field is set to \ref intl_computed.
00451       In cases where either \ref orig or \ref bdmode in the original
00452       table was blank, the string is set to <tt>"blank"</tt>.
00453 
00454       Binding energies are defined with a positive sign, so that 
00455       lead has a binding energy of +8 MeV. 
00456   */
00457   class ame_entry {
00458 
00459     public:
00460 
00461     /// \name Accuracy modes
00462     //@{
00463     /// Measured value from source data
00464     static const int measured=0;
00465     /// Value estimated in source data
00466     static const int estimated=1;
00467     /// Value listed in data as not calculable
00468     static const int not_calculable=2;
00469     /// Value computed by \o2
00470     static const int intl_computed=3;
00471     //@}
00472     
00473     /// N-Z
00474     int NMZ;
00475     
00476     /// Neutron number
00477     int N;
00478     
00479     /// Proton number
00480     int Z;
00481     
00482     /// Atomic number
00483     int A;
00484     
00485     /// Element name
00486     char el[4];
00487     
00488     /// Data origin
00489     char orig[5];
00490     
00491     /// Mass excess (in keV)
00492     double mass;
00493     
00494     /// Mass excess uncertainty (in keV)
00495     double dmass;
00496 
00497     /// Mass accuracy flag 
00498     int mass_acc;
00499     
00500     /// Binding energy (in keV, given in the '95 data)
00501     double be;
00502     
00503     /// Binding energy uncertainty (in keV, given in the '95 data)
00504     double dbe;
00505 
00506     /// Binding energy accuracy flag
00507     int be_acc;
00508     
00509     /// Binding energy / A (in keV, given in the '03 data)
00510     double beoa;
00511     
00512     /// Binding energy / A uncertainty (in keV, given in the '03 data)
00513     double dbeoa;
00514     
00515     /// Binding energy / A accuracy flag
00516     int beoa_acc;
00517 
00518     /// Beta decay mode
00519     char bdmode[3];
00520     
00521     /// Beta-decay energy (in keV)
00522     double bde;
00523 
00524     /// Beta-decay energy uncertainty (in keV)
00525     double dbde;
00526     
00527     /// Beta-decay energy accuracy flag
00528     int bde_acc;
00529 
00530     /// ?
00531     int A2;
00532     
00533     /// Atomic mass (in keV)
00534     double amass;
00535     
00536     /// Atomic mass uncertainty (in keV)
00537     double damass;
00538     
00539     /// Atomic mass accuracy flag
00540     int amass_acc;
00541 
00542   };
00543   
00544   /** \brief Mass formula from the Atomic Mass Evaluation (2005 and 1993)
00545       
00546       \note This class requires data stored in an HDF file and
00547       thus requires HDF support for normal usage.
00548 
00549       This class provides an interface to the atomic mass table using
00550       data from \ref Audi95 and \ref Audi03. 
00551       
00552       There are four data sets, selected by the specification of the
00553       \c version string in the constructor.
00554       - "95rmd" - "Recommended" data from \ref Audi95 (ame95rmd.o2)
00555       - "95exp" - "Experimental" data from \ref Audi95 (ame95exp.o2)
00556       - "03round" - "Rounded" data from \ref Audi03 (ame03round.o2)
00557       - "03" - Data from \ref Audi03 (default) (ame03.o2)
00558       
00559       If any string other than these four is used, the default
00560       data is loaded. If the constructor cannot find the data file
00561       (e.g. because of a broken installation), then ame::is_loaded()
00562       returns false.
00563       
00564       The 1995 data provided the binding energy stored in
00565       ame_entry::be and ame_entry::dbe, while the 2003 data provided
00566       the binding energy divided by the atomic number stored in
00567       ame_entry::beoa and ame_entry::dbeoa. When the 1995 data is used
00568       ame_entry::beoa and ame_entry::dbeoa are calculated automatically,
00569       and when the 2003 data is used ame_entry::be and ame_entry::dbe
00570       are calculated automatically. To indicate that \o2 has 
00571       automatically calculated a value in this way, the associated
00572       accuracy field is set to \ref ame_entry::intl_computed. 
00573       
00574       Note that all uncertainties are 1 sigma uncertainties.
00575 
00576       The functions \ref mass_excess() and \ref
00577       nuclear_mass::mass_excess_d() directly return the value from the
00578       Audi et al. data. For consistency, the functions \ref
00579       nuclear_mass::binding_energy(), \ref
00580       nuclear_mass::binding_energy_d(), \ref
00581       nuclear_mass::total_mass(), and \ref
00582       nuclear_mass::total_mass_d() return values which are
00583       automatically computed with the \o2 values for the neutron and
00584       proton mass in \ref o2scl_fm (which are obtained from
00585       CODATA). In order to obtain the value of the binding energy as
00586       reported in the original Audi et al. data instead of the value
00587       computed from the mass excess, you can use the function
00588       \ref get_ZN(), and access the corresponding entry from
00589       the Audi et al. data directly. 
00590 
00591       See also the documentation for the class structure for
00592       each table entry in \ref ame_entry. 
00593 
00594       \future There are definitions of the atomic mass unit
00595       and other constants that are defined by the 1995 and 2003
00596       atomic mass evaluations which are not used at present. These
00597       could be implemented by making a separate copy of the 
00598       neutron and proton masses inside this class.
00599       
00600       \future Create a caching and more intelligent search system for
00601       the table. The table is sorted by A and then N, so we could
00602       probably just copy the search routine from mnmsk_mass, which is
00603       sorted by Z and then N.
00604 
00605       \future Allow the user to select only massses which are not
00606       estimated.
00607       
00608   */
00609   class ame_mass : public nuclear_mass_disc {
00610   public:
00611 
00612     /// Create a collection specified by \c version
00613     ame_mass();
00614 
00615     ~ame_mass();
00616     
00617     /// Return the type, \c "ame_mass".
00618     virtual const char *type() { return "ame_mass"; }
00619 
00620     /** \brief Return false if the mass formula does not include 
00621         specified nucleus
00622     */
00623     virtual bool is_included(int Z, int N);
00624 
00625     /// Given \c Z and \c N, return the mass excess in MeV
00626     virtual double mass_excess(int Z, int N);
00627     
00628     /// Get element with Z=l_Z and N=l_N (e.g. 82,126).
00629     ame_entry get_ZN(int l_Z, int l_N);
00630     
00631     /// Get element with Z=l_Z and A=l_A (e.g. 82,208).
00632     ame_entry get_ZA(int l_Z, int l_A);
00633     
00634     /// Get element with name l_el and A=l_A (e.g. "Pb",208).
00635     ame_entry get_elA(std::string l_el, int l_A);
00636     
00637     /// Get element with string (e.g. "Pb208")
00638     ame_entry get(std::string nucleus);
00639     
00640     /// Returns true if data has been loaded
00641     bool is_loaded() { return (n>0); }
00642 
00643     /** \brief Set data
00644 
00645         This function is used by the HDF I/O routines.
00646      */
00647     int set_data(int n_mass, ame_entry *m, std::string ref);
00648 
00649     /// Return number of entries
00650     int get_nentries() { return n; }
00651     
00652 #ifndef DOXYGEN_INTERNAL
00653 
00654   protected:
00655 
00656     /// The number of entries (about 3000).
00657     int n;
00658     
00659     /// The reference for the original data
00660     std::string reference;
00661     
00662     /// The array containing the mass data of length ame::n
00663     ame_entry *mass;
00664     
00665 #endif
00666 
00667   };
00668   
00669   /** \brief The experimental values from Moller, Nix, Myers and Swiatecki
00670       
00671       \note This class requires data stored in an HDF file and
00672       thus requires HDF support for normal usage.
00673   */
00674   class ame_mass_exp : public ame_mass {
00675 
00676   public:
00677 
00678     /** \brief Return false if the mass formula does not include 
00679         specified nucleus
00680     */
00681     virtual bool is_included(int Z, int N);
00682 
00683   };
00684 
00685   /** \brief Mass formula entry structure for Moller, et al.
00686   */
00687   typedef struct {
00688     
00689     /// Neutron number
00690     int N;
00691     
00692     /// Proton number
00693     int Z;
00694     
00695     /// Atomic number
00696     int A;
00697     
00698     /** \name Ground state deformations (perturbed-spheroid parameterization)
00699      */
00700     //@{
00701     /// Quadrupole
00702     double eps2;
00703     /// Octupole
00704     double eps3;
00705     /// Hexadecapole
00706     double eps4;
00707     /// Hexacontatetrapole
00708     double eps6;
00709     /// Hexacontatetrapole without mass asymmetry
00710     double eps6sym;
00711     //@}
00712     
00713     /** \name Ground state deformations in the spherical-harmonics expansion
00714      */
00715     //@{
00716     /// Quadrupole
00717     double beta2;
00718     /// Octupole
00719     double beta3;
00720     /// Hexadecapole
00721     double beta4;
00722     /// Hexacontatetrapole
00723     double beta6;
00724     //@}
00725     
00726     /// The ground-state microscopic energy
00727     double Emic;
00728     
00729     /// The theoretical mass excess (in MeV)
00730     double Mth;
00731     
00732     /// The experimental mass excess (in MeV)
00733     double Mexp;
00734     
00735     /// Experimental mass excess error
00736     double sigmaexp;
00737     
00738     /// The ground-state microscopic energy in the FRLDM
00739     double EmicFL;
00740     
00741     /// The theoretical mass excess in the FRLDM
00742     double MthFL;
00743     
00744     /// Spin and pairity of odd proton 
00745     char spinp[6];
00746     
00747     /// Spin and pairity of odd neutron
00748     char spinn[6];
00749 
00750     /// Lipkin-Nogami proton gap
00751     double gapp;
00752     
00753     /// Lipkin-Nogami neutron gap
00754     double gapn;
00755 
00756     /// Total binding energy
00757     double be;
00758 
00759     /// One neutron separation energy
00760     double S1n;
00761     
00762     /// Two neutron separation energy
00763     double S2n;
00764 
00765     /** \brief Percentage of daughters generated in beta decay after
00766         beta-delayed neutron emission
00767     */
00768     double PA;
00769 
00770     /// Desc
00771     double PAm1;
00772 
00773     /// Desc
00774     double PAm2;
00775 
00776     /// Energy released in beta-decay
00777     double Qbeta;
00778 
00779     /// Half-life w.r.t. GT beta-decay
00780     double Tbeta;
00781 
00782     /// One proton separation energy
00783     double S1p;
00784 
00785     /// Two proton separation energy
00786     double S2p;
00787 
00788     /// Energy released in alpha-decay
00789     double Qalpha;
00790 
00791     /// Half-life w.r.t. alpha-decay
00792     double Talpha;
00793     
00794   } mnmsk_mass_entry;
00795   
00796   /** \brief Mass formula from Moller, Nix, Myers, Swiatecki and Kratz
00797 
00798       This is based on the tables given in \ref Moller95 and 
00799       \ref Moller97.
00800 
00801       \note This class requires data stored in an HDF file and
00802       thus requires HDF support for normal usage.
00803       
00804       The data containing an object of type moller_mass_entry for 8979
00805       nuclei is automatically loaded by the constructor. If the file
00806       (nucmass/mnmsk.o2) is not found, then is_loaded() will return
00807       <tt>false</tt> and all calls to get_ZN() will return an object
00808       with \c N=Z=0.
00809 
00810       There are several entries in the original table which are
00811       blank because they are in some way not known, measured, or
00812       computable. To distinguish these values from zero, blank entries 
00813       have been replaced by the number \c 1.0e99. For convenience,
00814       this value is returned by \ref blank().
00815   */
00816   class mnmsk_mass : public nuclear_mass_disc {
00817   public:
00818     
00819     mnmsk_mass();
00820 
00821     virtual ~mnmsk_mass();
00822 
00823     /** \brief Return false if the mass formula does not include 
00824         specified nucleus
00825     */
00826     virtual bool is_included(int Z, int N);
00827     
00828     /// Given \c Z and \c N, return the mass excess in MeV
00829     virtual double mass_excess(int Z, int N);
00830     
00831     /** \brief Get the entry for the specified proton and neutron number
00832         
00833         This method searches the table using a cached binary search
00834         algorithm. It is assumed that the table is sorted first by
00835         proton number and then by neutron number.
00836     */
00837     mnmsk_mass_entry get_ZN(int l_Z, int l_N);
00838     
00839     /// The value which corresponds to a blank entry
00840     double blank() { return 1.0e99; };
00841 
00842     /// Neither beta+ or beta- is possible
00843     double neither() { return 1.0e98; };
00844 
00845     /// The value which corresponds to a blank entry
00846     double beta_stable() { return 1.0e97; };
00847     
00848     /// Both beta+ and beta- are possible
00849     double beta_plus_and_minus() { return 1.0e96; };
00850     
00851     /// The value is greater than 100
00852     double greater_100() { return 1.0e95; };
00853 
00854     /// The value is greater than \f$ 10^{20} \f$
00855     double very_large() { return 1.0e94; };
00856 
00857     /// Return the type, \c "mnmsk_mass".
00858     virtual const char *type() { return "mnmsk_mass"; }
00859     
00860     /** \brief Set data
00861 
00862         This function is used by the HDF I/O routines.
00863      */
00864     int set_data(int n_mass, mnmsk_mass_entry *m, std::string ref);
00865 
00866 #ifndef DOXYGEN_INTERNAL
00867 
00868   protected:
00869     
00870     /// The number of entries (about 3000).
00871     int n;
00872     
00873     /// The reference for the original data
00874     std::string reference;
00875     
00876     /// The array containing the mass data of length ame::n
00877     mnmsk_mass_entry *mass;
00878     
00879     /// The last table index for caching
00880     int last;
00881     
00882 #endif
00883     
00884   };
00885 
00886   /** \brief The experimental values from Moller, Nix, Myers and Swiatecki
00887       
00888       \note This class requires data stored in an HDF file and
00889       thus requires HDF support for normal usage.
00890   */
00891   class mnmsk_mass_exp : public mnmsk_mass {
00892 
00893   public:
00894 
00895     /** \brief Return false if the mass formula does not include 
00896         specified nucleus
00897     */
00898     virtual bool is_included(int Z, int N);
00899 
00900     /// Given \c Z and \c N, return the mass excess in MeV
00901     virtual double mass_excess(int Z, int N);
00902 
00903   };
00904 
00905   /** \brief Mass formula entry structure for HFB mass formula
00906   */
00907   typedef struct {
00908     
00909     /// Neutron number
00910     int N;
00911     
00912     /// Proton number
00913     int Z;
00914     
00915     /// Atomic number
00916     int A;
00917     
00918     /// Beta 2 deformation
00919     double bet2;
00920 
00921     /// Beta 4 deformation
00922     double bet4;
00923 
00924     /// RMS charge radius
00925     double Rch;
00926 
00927     /// Deformation and Wigner energies
00928     double def_wig;
00929 
00930     /// Neutron separation energy
00931     double Sn;
00932 
00933     /// Proton separation energy
00934     double Sp;
00935 
00936     /// Beta-decay energy
00937     double Qbet;
00938 
00939     /// Calculated mass excess
00940     double Mcal;
00941 
00942     /// Error between experimental and calculated mass excess
00943     double Err;
00944     
00945   } hfb_mass_entry;
00946 
00947   /** \brief Version of \ref hfb_mass_entry with spin and parity
00948 
00949       \note This cannot be a child of hfb_mass_entry in order
00950       for the HDF I/O preprocessor macros, like HOFFSET, to work
00951    */
00952   typedef struct {
00953     
00954     /// Neutron number
00955     int N;
00956     
00957     /// Proton number
00958     int Z;
00959     
00960     /// Atomic number
00961     int A;
00962     
00963     /// Beta 2 deformation
00964     double bet2;
00965 
00966     /// Beta 4 deformation
00967     double bet4;
00968 
00969     /// RMS charge radius
00970     double Rch;
00971 
00972     /// Deformation and Wigner energies
00973     double def_wig;
00974 
00975     /// Neutron separation energy
00976     double Sn;
00977 
00978     /// Proton separation energy
00979     double Sp;
00980 
00981     /// Beta-decay energy
00982     double Qbet;
00983 
00984     /// Calculated mass excess
00985     double Mcal;
00986 
00987     /// Error between experimental and calculated mass excess
00988     double Err;
00989 
00990     /// Experimental spin
00991     double Jexp;
00992     
00993     /// Theoretical spin
00994     double Jth;
00995     
00996     /// Experimental parity
00997     int Pexp;
00998 
00999     /// Theoretical parity
01000     int Pth;
01001 
01002   } hfb_sp_mass_entry;
01003   
01004   /** \brief HFB Mass formula 
01005   */
01006   class hfb_mass : public nuclear_mass_disc {
01007     
01008   public:
01009     
01010     /** \brief Create a new mass formula object 
01011     */
01012     hfb_mass();
01013 
01014     virtual ~hfb_mass();
01015 
01016     /** \brief Return false if the mass formula does not include 
01017         specified nucleus
01018     */
01019     virtual bool is_included(int Z, int N);
01020     
01021     /// Given \c Z and \c N, return the mass excess in MeV
01022     virtual double mass_excess(int Z, int N);
01023     
01024     /** \brief Get the entry for the specified proton and neutron number
01025         
01026         This method searches the table using a cached binary search
01027         algorithm. It is assumed that the table is sorted first by
01028         proton number and then by neutron number.
01029     */
01030     hfb_mass_entry get_ZN(int l_Z, int l_N);
01031     
01032     /// Verify that the constructor properly loaded the table
01033     bool is_loaded() { return (n>0); }
01034     
01035     /// The value which corresponds to a blank entry
01036     double blank() { return 1.0e99; };
01037 
01038     /// Return the type, \c "hfb_mass".
01039     virtual const char *type() { return "hfb_mass"; }
01040 
01041     /** \brief Set data
01042         
01043         This function is used by the HDF I/O routines.
01044     */
01045     int set_data(int n_mass, hfb_mass_entry *m, std::string ref);
01046 
01047     /// Return number of entries
01048     int get_nentries() { return n; }
01049     
01050 #ifndef DOXYGEN_INTERNAL
01051 
01052   protected:
01053     
01054     /// The number of entries (about 3000).
01055     int n;
01056     
01057     /// The reference for the original data
01058     std::string reference;
01059     
01060     /// The array containing the mass data of length ame::n
01061     hfb_mass_entry *mass;
01062     
01063     /// The last table index for caching
01064     int last;
01065     
01066 #endif
01067     
01068   };
01069 
01070   /** \brief HFB Mass formula with spin and parity information
01071   */
01072   class hfb_sp_mass : public nuclear_mass_disc {
01073     
01074   public:
01075     
01076     /** \brief Create a new mass formula object
01077      */
01078     hfb_sp_mass();
01079 
01080     virtual ~hfb_sp_mass();
01081 
01082     /** \brief Return false if the mass formula does not include 
01083         specified nucleus
01084     */
01085     virtual bool is_included(int Z, int N);
01086 
01087     /// Given \c Z and \c N, return the mass excess in MeV
01088     virtual double mass_excess(int Z, int N);
01089 
01090     /** \brief Get the entry for the specified proton and neutron number
01091         
01092         This method searches the table using a cached binary search
01093         algorithm. It is assumed that the table is sorted first by
01094         proton number and then by neutron number.
01095     */
01096     hfb_sp_mass_entry get_ZN(int l_Z, int l_N);
01097     
01098     /// Return the type, \c "hfb_mass".
01099     virtual const char *type() { return "hfb_sp_mass"; }
01100 
01101     /** \brief Set data
01102         
01103         This function is used by the HDF I/O routines.
01104     */
01105     int set_data(int n_mass, hfb_sp_mass_entry *m, std::string ref);
01106 
01107 #ifndef DOXYGEN_INTERNAL
01108 
01109   protected:
01110     
01111     /// The array containing the mass data of length ame::n
01112     hfb_sp_mass_entry *mass;
01113 
01114     /// The number of entries (about 3000).
01115     int n;
01116     
01117     /// The reference for the original data
01118     std::string reference;
01119     
01120     /// The last table index for caching
01121     int last;
01122     
01123 #endif
01124     
01125   };
01126   
01127   /** \brief Duflo-Zuker mass formula
01128    */
01129   class dz_mass : public nuclear_mass_disc {
01130     
01131   public:
01132     
01133     /** \brief Create a new mass formula object
01134     */
01135     dz_mass(std::string model="96", bool external=false);
01136 
01137     virtual ~dz_mass();
01138 
01139     /** \brief Return false if the mass formula does not include 
01140         specified nucleus
01141     */
01142     virtual bool is_included(int Z, int N);
01143     
01144     /// Given \c Z and \c N, return the mass excess in MeV
01145     virtual double mass_excess(int Z, int N);
01146     
01147     /// Verify that the constructor properly loaded the table
01148     bool is_loaded() { return (n>0); }
01149     
01150     /// Return the type, \c "dz_mass".
01151     virtual const char *type() { return "dz_mass"; }
01152 
01153     /// Return number of entries
01154     int get_nentries() { return n; }
01155     
01156 #ifndef DOXYGEN_INTERNAL
01157 
01158   protected:
01159     
01160     /// The reference for the original data
01161     std::string reference;
01162     
01163     /// Table containing the data
01164     table data;
01165 
01166     /// The last table index for caching
01167     int last;
01168 
01169     /// The total number of entries
01170     int n;
01171     
01172 #endif
01173     
01174   };
01175 
01176   /** \brief Mass formula entry structure for KTUY mass formula
01177   */
01178   typedef struct {
01179     
01180     /// Neutron number
01181     int N;
01182     
01183     /// Proton number
01184     int Z;
01185     
01186     /// Atomic number
01187     int A;
01188     
01189     /// Calculated mass excess
01190     double Mcal;
01191 
01192     /// Shell energy
01193     double Esh;
01194 
01195     /// Alpha 2 deformation
01196     double alpha2;
01197 
01198     /// Alpha 4 deformation
01199     double alpha4;
01200 
01201     /// Alpha 6 deformation
01202     double alpha6;
01203 
01204   } ktuy_mass_entry;
01205 
01206   /** \brief KTUY Mass formula 
01207   */
01208   class ktuy_mass : public nuclear_mass_disc {
01209     
01210   public:
01211     
01212     /** \brief Create a new mass formula object using the specified model
01213         number
01214     */
01215     ktuy_mass(std::string model="05", bool external=false);
01216 
01217     virtual ~ktuy_mass();
01218 
01219     /** \brief Return false if the mass formula does not include 
01220         specified nucleus
01221     */
01222     virtual bool is_included(int Z, int N);
01223     
01224     /// Given \c Z and \c N, return the mass excess in MeV
01225     virtual double mass_excess(int Z, int N);
01226     
01227     /** \brief Get the entry for the specified proton and neutron number
01228         
01229         This method searches the table using a cached binary search
01230         algorithm. It is assumed that the table is sorted first by
01231         proton number and then by neutron number.
01232     */
01233     ktuy_mass_entry get_ZN(int l_Z, int l_N);
01234     
01235     /// Verify that the constructor properly loaded the table
01236     bool is_loaded() { return (n>0); }
01237     
01238     /// Return the type, \c "ktuy_mass".
01239     virtual const char *type() { return "ktuy_mass"; }
01240 
01241     /// Return number of entries
01242     int get_nentries() { return n; }
01243     
01244 #ifndef DOXYGEN_INTERNAL
01245 
01246   protected:
01247     
01248     /// The number of entries (about 3000).
01249     int n;
01250     
01251     /// The reference for the original data
01252     std::string reference;
01253     
01254     /// The array containing the mass data of length ame::n
01255     ktuy_mass_entry *mass;
01256     
01257     /// The last table index for caching
01258     int last;
01259     
01260 #endif
01261     
01262   };
01263   
01264   
01265 #ifndef DOXYGENP
01266 }
01267 #endif
01268 
01269 #endif
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Friends

Documentation generated with Doxygen. Provided under the GNU Free Documentation License (see License Information).

Get Object-oriented Scientific Computing
Lib at SourceForge.net. Fast, secure and Free Open Source software
downloads.