nucmass_hfb.h
Go to the documentation of this file.
1 /*
2  -------------------------------------------------------------------
3 
4  Copyright (C) 2006-2017, Andrew W. Steiner
5 
6  This file is part of O2scl.
7 
8  O2scl is free software; you can redistribute it and/or modify
9  it under the terms of the GNU General Public License as published by
10  the Free Software Foundation; either version 3 of the License, or
11  (at your option) any later version.
12 
13  O2scl is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with O2scl. If not, see <http://www.gnu.org/licenses/>.
20 
21  -------------------------------------------------------------------
22 */
23 #ifndef HFB_MASS_H
24 #define HFB_MASS_H
25 
26 /** \file nucmass_hfb.h
27  \brief File defining \ref o2scl::nucmass_hfb
28 */
29 
30 #include <cmath>
31 
32 #include <o2scl/nucleus.h>
33 #include <o2scl/nucmass.h>
34 #include <o2scl/constants.h>
35 
36 #ifndef DOXYGEN_NO_O2NS
37 namespace o2scl {
38 #endif
39 
40  /** \brief HFB Mass formula
41 
42  \todo Mg40 is present in some tables but not others. Compare
43  hfb14-plain with hfb14-plain_v0. This may be related to the
44  fact that the mass excess of Mg40 differs significantly between
45  the 2003 and 2013 Audi et al. tables?
46 
47  \todo Update to include hfb17.
48  */
49  class nucmass_hfb : public nucmass_table {
50 
51  public:
52 
53  /** \brief Entry structure for HFB mass formula
54  */
55  struct entry {
56 
57  /// Neutron number
58  int N;
59 
60  /// Proton number
61  int Z;
62 
63  /// Atomic number
64  int A;
65 
66  /// Beta 2 deformation
67  double bet2;
68 
69  /// Beta 4 deformation
70  double bet4;
71 
72  /// RMS charge radius
73  double Rch;
74 
75  /// Deformation and Wigner energies
76  double def_wig;
77 
78  /// Neutron separation energy
79  double Sn;
80 
81  /// Proton separation energy
82  double Sp;
83 
84  /// Beta-decay energy
85  double Qbet;
86 
87  /// Calculated mass excess
88  double Mcal;
89 
90  /// Error between experimental and calculated mass excess
91  double Err;
92 
93  };
94 
95  /** \brief Create a new mass formula object
96  */
97  nucmass_hfb();
98 
99  virtual ~nucmass_hfb();
100 
101  /** \brief Return false if the mass formula does not include
102  specified nucleus
103  */
104  virtual bool is_included(int Z, int N);
105 
106  /// Given \c Z and \c N, return the mass excess in MeV
107  virtual double mass_excess(int Z, int N);
108 
109  /** \brief Get the entry for the specified proton and neutron number
110 
111  This method searches the table using a cached binary search
112  algorithm. It is assumed that the table is sorted first by
113  proton number and then by neutron number.
114  */
115  nucmass_hfb::entry get_ZN(int l_Z, int l_N);
116 
117  /// Verify that the constructor properly loaded the table
118  bool is_loaded() { return (n>0); }
119 
120  /// The value which corresponds to a blank entry
121  double blank() { return 1.0e99; };
122 
123  /// Return the type, \c "nucmass_hfb".
124  virtual const char *type() { return "nucmass_hfb"; }
125 
126  /** \brief Set data
127 
128  This function is used by the HDF I/O routines.
129  */
130  int set_data(int n_mass, nucmass_hfb::entry *m, std::string ref);
131 
132  /// Return number of entries
133  int get_nentries() { return n; }
134 
135 #ifndef DOXYGEN_INTERNAL
136 
137  protected:
138 
139  /// The number of entries (about 3000).
140  int n;
141 
142  /// The reference for the original data
143  std::string reference;
144 
145  /// The array containing the mass data of length ame::n
147 
148  /// The last table index for caching
149  int last;
150 
151 #endif
152 
153  };
154 
155  /** \brief HFB Mass formula with spin and parity information
156  */
157  class nucmass_hfb_sp : public nucmass_table {
158 
159  public:
160 
161  /** \brief Create a new mass formula object
162  */
163  nucmass_hfb_sp();
164 
165  virtual ~nucmass_hfb_sp();
166 
167  /** \brief Version of \ref nucmass_hfb::entry with spin and parity
168 
169  \note This cannot be a child of nucmass_hfb::entry in order
170  for the HDF I/O preprocessor macros, like HOFFSET, to work
171  */
172  struct entry {
173 
174  /// Neutron number
175  int N;
176 
177  /// Proton number
178  int Z;
179 
180  /// Atomic number
181  int A;
182 
183  /// Beta 2 deformation
184  double bet2;
185 
186  /// Beta 4 deformation
187  double bet4;
188 
189  /// RMS charge radius
190  double Rch;
191 
192  /// Deformation and Wigner energies
193  double def_wig;
194 
195  /// Neutron separation energy
196  double Sn;
197 
198  /// Proton separation energy
199  double Sp;
200 
201  /// Beta-decay energy
202  double Qbet;
203 
204  /// Calculated mass excess
205  double Mcal;
206 
207  /// Error between experimental and calculated mass excess
208  double Err;
209 
210  /// Experimental spin
211  double Jexp;
212 
213  /// Theoretical spin
214  double Jth;
215 
216  /// Experimental parity
217  int Pexp;
218 
219  /// Theoretical parity
220  int Pth;
221 
222  };
223 
224  /** \brief Return false if the mass formula does not include
225  specified nucleus
226  */
227  virtual bool is_included(int Z, int N);
228 
229  /// Given \c Z and \c N, return the mass excess in MeV
230  virtual double mass_excess(int Z, int N);
231 
232  /** \brief Get the entry for the specified proton and neutron number
233 
234  This method searches the table using a cached binary search
235  algorithm. It is assumed that the table is sorted first by
236  proton number and then by neutron number.
237  */
238  nucmass_hfb_sp::entry get_ZN(int l_Z, int l_N);
239 
240  /// Return the type, \c "nucmass_hfb".
241  virtual const char *type() { return "nucmass_hfb_sp"; }
242 
243  /** \brief Set data
244 
245  This function is used by the HDF I/O routines.
246  */
247  int set_data(int n_mass, nucmass_hfb_sp::entry *m, std::string ref);
248 
249 #ifndef DOXYGEN_INTERNAL
250 
251  protected:
252 
253  /// The array containing the mass data of length ame::n
255 
256  /// The number of entries (about 3000).
257  int n;
258 
259  /// The reference for the original data
260  std::string reference;
261 
262  /// The last table index for caching
263  int last;
264 
265 #endif
266 
267  };
268 
269 #ifndef DOXYGEN_NO_O2NS
270 }
271 #endif
272 
273 #endif
nucmass_hfb_sp::entry * mass
The array containing the mass data of length ame::n.
Definition: nucmass_hfb.h:254
double blank()
The value which corresponds to a blank entry.
Definition: nucmass_hfb.h:121
int n
The number of entries (about 3000).
Definition: nucmass_hfb.h:140
int last
The last table index for caching.
Definition: nucmass_hfb.h:149
Entry structure for HFB mass formula.
Definition: nucmass_hfb.h:55
bool is_loaded()
Verify that the constructor properly loaded the table.
Definition: nucmass_hfb.h:118
nucmass_hfb()
Create a new mass formula object.
virtual double mass_excess(int Z, int N)
Given Z and N, return the mass excess in MeV.
int N
Neutron number.
Definition: nucmass_hfb.h:175
double def_wig
Deformation and Wigner energies.
Definition: nucmass_hfb.h:76
std::string reference
The reference for the original data.
Definition: nucmass_hfb.h:143
double def_wig
Deformation and Wigner energies.
Definition: nucmass_hfb.h:193
double bet2
Beta 2 deformation.
Definition: nucmass_hfb.h:184
virtual bool is_included(int Z, int N)
Return false if the mass formula does not include specified nucleus.
double bet4
Beta 4 deformation.
Definition: nucmass_hfb.h:187
int A
Atomic number.
Definition: nucmass_hfb.h:181
int last
The last table index for caching.
Definition: nucmass_hfb.h:263
double bet4
Beta 4 deformation.
Definition: nucmass_hfb.h:70
double Sn
Neutron separation energy.
Definition: nucmass_hfb.h:79
Version of nucmass_hfb::entry with spin and parity.
Definition: nucmass_hfb.h:172
double bet2
Beta 2 deformation.
Definition: nucmass_hfb.h:67
int Z
Proton number.
Definition: nucmass_hfb.h:61
int N
Neutron number.
Definition: nucmass_hfb.h:58
int Pth
Theoretical parity.
Definition: nucmass_hfb.h:220
double Mcal
Calculated mass excess.
Definition: nucmass_hfb.h:88
Tabulated nuclear masses [abstract base].
Definition: nucmass.h:325
double Qbet
Beta-decay energy.
Definition: nucmass_hfb.h:202
double Mcal
Calculated mass excess.
Definition: nucmass_hfb.h:205
double Sp
Proton separation energy.
Definition: nucmass_hfb.h:199
int set_data(int n_mass, nucmass_hfb::entry *m, std::string ref)
Set data.
int n
The number of entries (about 3000).
Definition: nucmass_hfb.h:257
double Err
Error between experimental and calculated mass excess.
Definition: nucmass_hfb.h:91
double Qbet
Beta-decay energy.
Definition: nucmass_hfb.h:85
double Rch
RMS charge radius.
Definition: nucmass_hfb.h:190
int get_nentries()
Return number of entries.
Definition: nucmass_hfb.h:133
HFB Mass formula with spin and parity information.
Definition: nucmass_hfb.h:157
int Pexp
Experimental parity.
Definition: nucmass_hfb.h:217
double Rch
RMS charge radius.
Definition: nucmass_hfb.h:73
double Jexp
Experimental spin.
Definition: nucmass_hfb.h:211
double Sp
Proton separation energy.
Definition: nucmass_hfb.h:82
int Z
Proton number.
Definition: nucmass_hfb.h:178
nucmass_hfb::entry get_ZN(int l_Z, int l_N)
Get the entry for the specified proton and neutron number.
int A
Atomic number.
Definition: nucmass_hfb.h:64
nucmass_hfb::entry * mass
The array containing the mass data of length ame::n.
Definition: nucmass_hfb.h:146
double Sn
Neutron separation energy.
Definition: nucmass_hfb.h:196
std::string reference
The reference for the original data.
Definition: nucmass_hfb.h:260
HFB Mass formula.
Definition: nucmass_hfb.h:49
virtual const char * type()
Return the type, "nucmass_hfb".
Definition: nucmass_hfb.h:124
double Err
Error between experimental and calculated mass excess.
Definition: nucmass_hfb.h:208
virtual const char * type()
Return the type, "nucmass_hfb".
Definition: nucmass_hfb.h:241
double Jth
Theoretical spin.
Definition: nucmass_hfb.h:214

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