Class nucmass_fit (o2scl)

O2scl : Class List

class nucmass_fit

Fit a nuclear mass formula.

There is an example of the usage of this class given in the Nuclear mass fit example.

Idea for Future:

Convert to a real fit with errors and covariance, etc.

Fitting method

int fit_method

Current fitting method.

bool even_even

If true, then only fit doubly-even nuclei (default false)

int minZ

Minimum proton number to fit (default 8)

int minN

Minimum neutron number to fit (default 8)

mmin_simp2 def_mmin

The default minimizer.

The value of def_mmin::ntrial is automatically multiplied by 10 in the constructor because the minimization frequently requires more trials than the default.

std::vector<nucleus> dist

Select the experimental nuclei to fit.

static const int rms_mass_excess = 0

RMS deviation in mass excess.

static const int rms_binding_energy = 1

RMS deviation in binding_energy.

static const int chi_squared_me = 2

Chi-squared for mass excess using specified uncertainties.

static const int chi_squared_be = 3

Chi-squared for binding energy using specified uncertainties.

ubvector uncs

Uncertainties.

mmin_base *mm

The pointer to the minimizer.

nucmass_fit_base *nmf

The nuclear mass formula to fit to.

This pointer is set by fit() and eval().

virtual void fit(nucmass_fit_base &n, double &res)

Fit the nuclear mass formula.

virtual void eval(nucmass &n, double &res)

Evaluate quality without fitting.

void fit_covar(nucmass_fit_base &n, double &chi2, ubmatrix &covar)

Fit a nuclear mass formula using least squares and report the associated \( \chi^2 \) and covariance matrix.

Note

This function only works for fit_method equal to chi_squared_me or chi_squared_be .

double fit_covar_fun(size_t np, const ubvector &p, double x, const std::vector<size_t> &Zlist, const std::vector<size_t> &Nlist)

The form of the fitting function which is set for a fitting object of type o2scl::fit_nonlin.

inline void set_mmin(mmin_base<> &umm)

Change the minimizer for use in the fit.

template<class vec_t>
inline void set_uncerts(vec_t &u)

Set the fit uncertainties (in MeV)

template<class vec_t>
inline void set_uncerts(size_t nv, vec_t &u)

Set the fit uncertainties (in MeV) from the first nv elements of u.

void eval_isospin_beta(nucmass &n, ubvector_int &n_qual, ubvector &qual, int max_iso = 20)

Evaluate isospin dependence of fit quality.

Todo

  • In nucmass_fit::eval_isospin_beta(): More documentation and compute uncertainty.

void eval_isospin(nucmass &n, ubvector_int &n_qual, ubvector &qual, int min_iso = -8, int max_iso = 60)

Evaluate isospin dependence of fit quality.

virtual double min_fun(size_t nv, const ubvector &x)

The function to minimize.

Public Types

typedef boost::numeric::ublas::vector<double> ubvector
typedef boost::numeric::ublas::matrix<double> ubmatrix
typedef boost::numeric::ublas::vector<int> ubvector_int
typedef boost::numeric::ublas::vector<size_t> ubvector_size_t

Public Functions

nucmass_fit()
inline virtual ~nucmass_fit()