00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef PHYSICS_NUCLEAR_H
00031 #define PHYSICS_NUCLEAR_H
00032
00033 #include <iosfwd>
00034 #include <string>
00035 #include <more/math/qtypes.h>
00036 #include <more/io/syncstream.h>
00037 #include <cstdlib>
00038
00039
00040 namespace more {
00041 namespace phys {
00042
00043 namespace nuclear_unit_constants {
00044 const double mp = 938.280;
00045 const double mn = 939.573;
00046 const double mN = 938.927;
00047 const double hbar = 197.329;
00048 const double f_2mN_hbar2 = 0.0482259;
00049 const double f_hbar2_2mN = 20.7358;
00050 }
00051
00052
00053
00054
00055 extern more::minus_half_tag mt_neut;
00056 extern more::half_tag mt_prot;
00057
00058 extern int nuclear_magic_number_array[];
00059 extern std::size_t nuclear_magic_number_count;
00060
00061 bool is_nuclear_magic_number(int);
00062
00063 std::string chemical_symbol(int Z);
00064 std::string chemical_name(int Z);
00065 int Z_of_chemical(std::string name_or_symbol);
00066 int Z_first_unnamed();
00067
00068 struct nucleus
00069 {
00070 nucleus() : n_p(0), n_n(0) {}
00071
00072 nucleus(int N, int Z);
00073
00074 nucleus(const nucleus& x)
00075 : n_p(x.n_p), n_n(x.n_n) {}
00076
00077 nucleus&
00078 operator=(nucleus const& x)
00079 {
00080 n_n = x.n_n; n_p = x.n_p;
00081 return *this;
00082 }
00083
00084 #if defined(MORE_BACKWARD) && MORE_BACKWARD < 20000612
00085 int N() const { return n_n; }
00086 int Z() const { return n_p; }
00087 int A() const { return n_n+n_p; }
00088 int n_particles(more::pm_half const& mt) const
00089 { return mt == more::half? n_p : n_n; }
00090 static int Z(std::string s) { return n_prot(s); }
00091 #endif
00092 int n_neut() const { return n_n; }
00093 int n_prot() const { return n_p; }
00094 int n_part() const { return n_n + n_p; }
00095 int n_part(more::pm_half const& mt) const
00096 { return mt == more::half? n_p : n_n; }
00097 int n_part(more::half_tag) const { return n_p; }
00098 int n_part(more::minus_half_tag) const { return n_n; }
00099
00100
00101 std::string chemical_name() const { return phys::chemical_symbol(n_p); }
00102
00103 std::string chemical_symbol() const
00104 { return phys::chemical_symbol(n_p); }
00105
00106 std::string chemical_full_name() const
00107 { return phys::chemical_name(n_p); }
00108
00109 std::string name() const;
00110
00111 void sync(more::io::syncstream&);
00112
00113
00114 static int n_prot(std::string s) { return Z_of_chemical(s); }
00115
00116 static std::string chemical_name(int Z_)
00117 { return phys::chemical_symbol(Z_); }
00118
00119 static int n_prot_unnamed() { return Z_first_unnamed(); }
00120
00121
00122
00123 private:
00124
00125 unsigned char n_p, n_n;
00126 };
00127
00128 inline bool operator==(nucleus const& X, nucleus const& Y)
00129 {
00130 return X.n_neut() == Y.n_neut()
00131 && Y.n_prot() == Y.n_prot();
00132 }
00133 inline bool operator!=(nucleus const& X, nucleus const& Y)
00134 {
00135 return !(X == Y);
00136 }
00137 inline bool operator<(nucleus const& X, nucleus const& Y)
00138 {
00139 int A0 = X.n_part();
00140 int A1 = Y.n_part();
00141 if (A0 < A1)
00142 return true;
00143 if (A0 > A1)
00144 return false;
00145 return X.n_prot() < Y.n_prot();
00146 }
00147 inline bool operator>(nucleus const& X, nucleus const& Y)
00148 {
00149 return Y < X;
00150 }
00151 inline bool operator<=(nucleus const& X, nucleus const& Y)
00152 {
00153 return !(Y < X);
00154 }
00155 inline bool operator>=(nucleus const& X, nucleus const& Y)
00156 {
00157 return !(X < Y);
00158 }
00159
00160 std::istream& operator>>(std::istream&, nucleus&);
00161 std::ostream& operator<<(std::ostream&, const nucleus&);
00162
00163 inline nucleus neighbor(nucleus const& nucl, int delta_N, int delta_Z) {
00164 return nucleus(nucl.n_neut() + delta_N, nucl.n_prot() + delta_Z);
00165 }
00166
00167
00168 double semiempirical_binding(nucleus const&);
00169
00170
00171 std::pair<double, double>
00172 semiempirical_separation_energies(nucleus const& nucl);
00173
00174
00175
00176 bool is_reasonably_bound(nucleus const&);
00177
00178 #if 0
00179
00180
00181 class nuclear_state : public nucleus {
00182
00183 more::halfint spin_;
00184 more::pm_one parity_;
00185 more::halfint isospin_;
00186 double energy;
00187
00188 public:
00189 more::pm_one parity() { return parity_; }
00190 more::halfint spin() { return spin_; }
00191 more::halfint isospin() { return isospin_; }
00192 more::halfint isospin_z() { return (n_prot() - n_neut())*more::half; }
00193 double excitation_energy() { return energy; }
00194
00195 nuclear_state(const nucleus& nuc, more::halfint J, more::pm_one pi,
00196 more::halfint T, double E=0.0)
00197 : nucleus(nuc), spin_(J), parity_(pi), isospin_(T), energy(E) {}
00198
00199 nuclear_state(const nucleus& nuc, more::halfint J,
00200 more::pm_one pi, double E = 0.0)
00201 : nucleus(nuc), spin_(J), parity_(pi),
00202 isospin_(isospin_z()), energy(E) {}
00203 };
00204 #endif
00205
00206
00207 }
00208 }
00209
00210 #endif