nucmass_ktuy.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 O2SCL_KTUY_MASS_H
24 #define O2SCL_KTUY_MASS_H
25 
26 /** \file nucmass_ktuy.h
27  \brief File defining \ref o2scl::nucmass_ktuy
28 */
29 
30 #include <o2scl/nucmass.h>
31 
32 #ifndef DOXYGEN_NO_O2NS
33 namespace o2scl {
34 #endif
35 
36  /** \brief KTUY Mass formula
37  */
38  class nucmass_ktuy : public nucmass_table {
39 
40  public:
41 
42  /** \brief Create a new mass formula object using the specified model
43  number
44  */
45  nucmass_ktuy(std::string model="05", bool external=false);
46 
47  virtual ~nucmass_ktuy();
48 
49  /** \brief Mass formula entry structure for KTUY mass formula
50 
51  Nuclear masses from \ref Koura00 and \ref Koura05
52  as originally specified in the files <tt>KTUY04_m246.dat</tt>
53  and <tt>KTUY05_m246.dat</tt> obtained from
54  http://wwwndc.jaea.go.jp/nucldata/mass/KTUY04_E.html
55  */
56  struct entry {
57 
58  /// Neutron number
59  int N;
60 
61  /// Proton number
62  int Z;
63 
64  /// Atomic number
65  int A;
66 
67  /// Calculated mass excess
68  double Mcal;
69 
70  /// Shell energy
71  double Esh;
72 
73  /// Alpha 2 deformation
74  double alpha2;
75 
76  /// Alpha 4 deformation
77  double alpha4;
78 
79  /// Alpha 6 deformation
80  double alpha6;
81 
82  };
83 
84  /** \brief Return false if the mass formula does not include
85  specified nucleus
86  */
87  virtual bool is_included(int Z, int N);
88 
89  /// Given \c Z and \c N, return the mass excess in MeV
90  virtual double mass_excess(int Z, int N);
91 
92  /** \brief Get the entry for the specified proton and neutron number
93 
94  This method searches the table using a cached binary search
95  algorithm. It is assumed that the table is sorted first by
96  proton number and then by neutron number.
97  */
98  nucmass_ktuy::entry get_ZN(int l_Z, int l_N);
99 
100  /// Verify that the constructor properly loaded the table
101  bool is_loaded() { return (n>0); }
102 
103  /// Return the type, \c "nucmass_ktuy".
104  virtual const char *type() { return "nucmass_ktuy"; }
105 
106  /// Return number of entries
107  int get_nentries() { return n; }
108 
109 #ifndef DOXYGEN_INTERNAL
110 
111  protected:
112 
113  /// The number of entries (about 3000).
114  int n;
115 
116  /// The reference for the original data
117  std::string reference;
118 
119  /// The array containing the mass data of length ame::n
121 
122  /// The last table index for caching
123  int last;
124 
125 #endif
126 
127  };
128 
129 #ifndef DOXYGEN_NO_O2NS
130 }
131 #endif
132 
133 #endif
int last
The last table index for caching.
Definition: nucmass_ktuy.h:123
int N
Neutron number.
Definition: nucmass_ktuy.h:59
double alpha4
Alpha 4 deformation.
Definition: nucmass_ktuy.h:77
nucmass_ktuy::entry get_ZN(int l_Z, int l_N)
Get the entry for the specified proton and neutron number.
virtual bool is_included(int Z, int N)
Return false if the mass formula does not include specified nucleus.
virtual const char * type()
Return the type, "nucmass_ktuy".
Definition: nucmass_ktuy.h:104
Mass formula entry structure for KTUY mass formula.
Definition: nucmass_ktuy.h:56
std::string reference
The reference for the original data.
Definition: nucmass_ktuy.h:117
double Esh
Shell energy.
Definition: nucmass_ktuy.h:71
int get_nentries()
Return number of entries.
Definition: nucmass_ktuy.h:107
entry * mass
The array containing the mass data of length ame::n.
Definition: nucmass_ktuy.h:120
double alpha6
Alpha 6 deformation.
Definition: nucmass_ktuy.h:80
Tabulated nuclear masses [abstract base].
Definition: nucmass.h:325
KTUY Mass formula.
Definition: nucmass_ktuy.h:38
int n
The number of entries (about 3000).
Definition: nucmass_ktuy.h:114
int Z
Proton number.
Definition: nucmass_ktuy.h:62
int A
Atomic number.
Definition: nucmass_ktuy.h:65
double Mcal
Calculated mass excess.
Definition: nucmass_ktuy.h:68
nucmass_ktuy(std::string model="05", bool external=false)
Create a new mass formula object using the specified model number.
virtual double mass_excess(int Z, int N)
Given Z and N, return the mass excess in MeV.
bool is_loaded()
Verify that the constructor properly loaded the table.
Definition: nucmass_ktuy.h:101
double alpha2
Alpha 2 deformation.
Definition: nucmass_ktuy.h:74

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