nucmass_hfb.h
Go to the documentation of this file.
1 /*
2  -------------------------------------------------------------------
3 
4  Copyright (C) 2006-2020, 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  /// The value which corresponds to a blank entry
118  double blank() { return 1.0e99; };
119 
120  /// Return the type, \c "nucmass_hfb".
121  virtual const char *type() { return "nucmass_hfb"; }
122 
123  /** \brief Set data
124 
125  This function is used by the HDF I/O routines.
126  */
127  int set_data(int n_mass, nucmass_hfb::entry *m, std::string ref);
128 
129 #ifndef DOXYGEN_INTERNAL
130 
131  protected:
132 
133  /// The array containing the mass data of length ame::n
135 
136  /// The last table index for caching
137  int last;
138 
139 #endif
140 
141  };
142 
143  /** \brief HFB Mass formula with spin and parity information
144  */
145  class nucmass_hfb_sp : public nucmass_table {
146 
147  public:
148 
149  /** \brief Create a new mass formula object
150  */
151  nucmass_hfb_sp();
152 
153  virtual ~nucmass_hfb_sp();
154 
155  /** \brief Version of \ref nucmass_hfb::entry with spin and parity
156 
157  \note This cannot be a child of nucmass_hfb::entry in order
158  for the HDF I/O preprocessor macros, like HOFFSET, to work
159  */
160  struct entry {
161 
162  /// Neutron number
163  int N;
164 
165  /// Proton number
166  int Z;
167 
168  /// Atomic number
169  int A;
170 
171  /// Beta 2 deformation
172  double bet2;
173 
174  /// Beta 4 deformation
175  double bet4;
176 
177  /// RMS charge radius
178  double Rch;
179 
180  /// Deformation and Wigner energies
181  double def_wig;
182 
183  /// Neutron separation energy
184  double Sn;
185 
186  /// Proton separation energy
187  double Sp;
188 
189  /// Beta-decay energy
190  double Qbet;
191 
192  /// Calculated mass excess
193  double Mcal;
194 
195  /// Error between experimental and calculated mass excess
196  double Err;
197 
198  /// Experimental spin
199  double Jexp;
200 
201  /// Theoretical spin
202  double Jth;
203 
204  /// Experimental parity
205  int Pexp;
206 
207  /// Theoretical parity
208  int Pth;
209 
210  };
211 
212  /** \brief Return false if the mass formula does not include
213  specified nucleus
214  */
215  virtual bool is_included(int Z, int N);
216 
217  /// Given \c Z and \c N, return the mass excess in MeV
218  virtual double mass_excess(int Z, int N);
219 
220  /** \brief Get the entry for the specified proton and neutron number
221 
222  This method searches the table using a cached binary search
223  algorithm. It is assumed that the table is sorted first by
224  proton number and then by neutron number.
225  */
226  nucmass_hfb_sp::entry get_ZN(int l_Z, int l_N);
227 
228  /// Return the type, \c "nucmass_hfb".
229  virtual const char *type() { return "nucmass_hfb_sp"; }
230 
231  /** \brief Set data
232 
233  This function is used by the HDF I/O routines.
234  */
235  int set_data(int n_mass, nucmass_hfb_sp::entry *m, std::string ref);
236 
237 #ifndef DOXYGEN_INTERNAL
238 
239  protected:
240 
241  /// The array containing the mass data of length ame::n
243 
244  /// The last table index for caching
245  int last;
246 
247 #endif
248 
249  };
250 
251 #ifndef DOXYGEN_NO_O2NS
252 }
253 #endif
254 
255 #endif
o2scl::nucmass_hfb::entry::bet2
double bet2
Beta 2 deformation.
Definition: nucmass_hfb.h:67
o2scl::nucmass_hfb_sp::entry::Jth
double Jth
Theoretical spin.
Definition: nucmass_hfb.h:202
o2scl::nucmass_hfb::entry::bet4
double bet4
Beta 4 deformation.
Definition: nucmass_hfb.h:70
o2scl::nucmass_hfb::entry::Rch
double Rch
RMS charge radius.
Definition: nucmass_hfb.h:73
o2scl::nucmass_hfb_sp
HFB Mass formula with spin and parity information.
Definition: nucmass_hfb.h:145
o2scl::nucmass_hfb::nucmass_hfb
nucmass_hfb()
Create a new mass formula object.
o2scl::nucmass_hfb_sp::entry
Version of nucmass_hfb::entry with spin and parity.
Definition: nucmass_hfb.h:160
o2scl::nucmass_hfb_sp::entry::A
int A
Atomic number.
Definition: nucmass_hfb.h:169
o2scl::nucmass_hfb_sp::mass
nucmass_hfb_sp::entry * mass
The array containing the mass data of length ame::n.
Definition: nucmass_hfb.h:242
o2scl::nucmass_hfb_sp::entry::bet2
double bet2
Beta 2 deformation.
Definition: nucmass_hfb.h:172
o2scl::nucmass_hfb::entry::A
int A
Atomic number.
Definition: nucmass_hfb.h:64
o2scl::nucmass_hfb_sp::entry::bet4
double bet4
Beta 4 deformation.
Definition: nucmass_hfb.h:175
o2scl::nucmass_hfb_sp::entry::N
int N
Neutron number.
Definition: nucmass_hfb.h:163
o2scl::nucmass_hfb::entry::Sn
double Sn
Neutron separation energy.
Definition: nucmass_hfb.h:79
o2scl::nucmass_hfb
HFB Mass formula.
Definition: nucmass_hfb.h:49
o2scl::nucmass_hfb_sp::entry::def_wig
double def_wig
Deformation and Wigner energies.
Definition: nucmass_hfb.h:181
o2scl::nucmass_hfb::mass
nucmass_hfb::entry * mass
The array containing the mass data of length ame::n.
Definition: nucmass_hfb.h:134
o2scl::nucmass_hfb_sp::get_ZN
nucmass_hfb_sp::entry get_ZN(int l_Z, int l_N)
Get the entry for the specified proton and neutron number.
o2scl::nucmass_hfb::entry::def_wig
double def_wig
Deformation and Wigner energies.
Definition: nucmass_hfb.h:76
o2scl::nucmass_hfb::mass_excess
virtual double mass_excess(int Z, int N)
Given Z and N, return the mass excess in MeV.
o2scl::nucmass_hfb::blank
double blank()
The value which corresponds to a blank entry.
Definition: nucmass_hfb.h:118
o2scl::nucmass_hfb_sp::last
int last
The last table index for caching.
Definition: nucmass_hfb.h:245
o2scl::nucmass_hfb::entry
Entry structure for HFB mass formula.
Definition: nucmass_hfb.h:55
o2scl::nucmass_hfb::entry::Mcal
double Mcal
Calculated mass excess.
Definition: nucmass_hfb.h:88
o2scl::nucmass_hfb::set_data
int set_data(int n_mass, nucmass_hfb::entry *m, std::string ref)
Set data.
o2scl::nucmass_hfb_sp::nucmass_hfb_sp
nucmass_hfb_sp()
Create a new mass formula object.
o2scl::nucmass_hfb_sp::mass_excess
virtual double mass_excess(int Z, int N)
Given Z and N, return the mass excess in MeV.
o2scl::nucmass_hfb_sp::entry::Pth
int Pth
Theoretical parity.
Definition: nucmass_hfb.h:208
o2scl::nucmass_hfb::entry::Z
int Z
Proton number.
Definition: nucmass_hfb.h:61
o2scl::nucmass_hfb::type
virtual const char * type()
Return the type, "nucmass_hfb".
Definition: nucmass_hfb.h:121
o2scl::nucmass_hfb_sp::entry::Mcal
double Mcal
Calculated mass excess.
Definition: nucmass_hfb.h:193
o2scl::nucmass_hfb::entry::Qbet
double Qbet
Beta-decay energy.
Definition: nucmass_hfb.h:85
o2scl::nucmass_hfb_sp::entry::Jexp
double Jexp
Experimental spin.
Definition: nucmass_hfb.h:199
o2scl::nucmass_hfb::last
int last
The last table index for caching.
Definition: nucmass_hfb.h:137
o2scl::nucmass_hfb::is_included
virtual bool is_included(int Z, int N)
Return false if the mass formula does not include specified nucleus.
o2scl::nucmass_hfb_sp::entry::Z
int Z
Proton number.
Definition: nucmass_hfb.h:166
o2scl::nucmass_hfb_sp::entry::Qbet
double Qbet
Beta-decay energy.
Definition: nucmass_hfb.h:190
o2scl::nucmass_hfb_sp::entry::Sp
double Sp
Proton separation energy.
Definition: nucmass_hfb.h:187
o2scl::nucmass_hfb::get_ZN
nucmass_hfb::entry get_ZN(int l_Z, int l_N)
Get the entry for the specified proton and neutron number.
o2scl::nucmass_hfb_sp::entry::Rch
double Rch
RMS charge radius.
Definition: nucmass_hfb.h:178
o2scl::nucmass_hfb::entry::N
int N
Neutron number.
Definition: nucmass_hfb.h:58
o2scl::nucmass_table
Tabulated nuclear masses [abstract base].
Definition: nucmass.h:330
o2scl::nucmass_hfb::entry::Err
double Err
Error between experimental and calculated mass excess.
Definition: nucmass_hfb.h:91
o2scl::nucmass_hfb_sp::type
virtual const char * type()
Return the type, "nucmass_hfb".
Definition: nucmass_hfb.h:229
o2scl::nucmass_hfb_sp::is_included
virtual bool is_included(int Z, int N)
Return false if the mass formula does not include specified nucleus.
o2scl::nucmass_hfb_sp::entry::Err
double Err
Error between experimental and calculated mass excess.
Definition: nucmass_hfb.h:196
o2scl::nucmass_hfb_sp::entry::Sn
double Sn
Neutron separation energy.
Definition: nucmass_hfb.h:184
o2scl::nucmass_hfb_sp::entry::Pexp
int Pexp
Experimental parity.
Definition: nucmass_hfb.h:205
o2scl::nucmass_hfb::entry::Sp
double Sp
Proton separation energy.
Definition: nucmass_hfb.h:82
o2scl::nucmass_hfb_sp::set_data
int set_data(int n_mass, nucmass_hfb_sp::entry *m, std::string ref)
Set data.

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