11 #include "KVNucleus.h"
14 #include "tkmanager.h"
25 std::mutex _kvnucleus_mutex;
57 auto Mpfx = _opt!=
"EL";
61 if(GetTkNucleus().is_known())
64 fSymbolName = GetTkNucleus().get_symbol().c_str();
66 fSymbolName = GetTkNucleus().get_element_symbol().c_str();
68 else if(!gmanager->get_element_symbol(GetZ()).empty())
70 auto symbol = gmanager->get_element_symbol(GetZ());
72 symbol.prepend(tkn::tkstring::form(
"%d", GetA()));
73 fSymbolName = symbol.c_str();
120 auto with_charge = _opt==
"ALL";
121 auto just_symbol = _opt==
"EL";
123 TString symbol = GetSymbol(
"el");
127 fSymbolName.Form(
"{}^{%d}_{%d}%s",
a, z, symbol.
Data());
128 else if (!just_symbol)
129 fSymbolName.Form(
"^{%d}%s",
a, symbol.
Data());
165 if (sscanf(tmp.
Data(),
"%d%s", &A,
name) == 2) {
171 Int_t z = GetZFromSymbol(tmp);
196 if (sscanf(tmp.
Data(),
"%d%s", &A,
name) == 2) {
198 if (SetZFromSymbol(
name) > -1) SetA(A);
201 else if (sscanf(tmp.
Data(),
"%s",
name) == 1) {
203 if (SetZFromSymbol(
name) == -1) MakeZombie();
218 auto tknuc = tkn::tknucleus(
sym);
220 return tknuc.get_z();
259 fMassFormula = kBetaMass;
327 if (z != 0 &&
a == 0) {
403 KVNucleus::~KVNucleus()
766 cout <<
"Z=" <<
GetZ() <<
" A=" <<
GetA() <<
" ";
817 return ((
Int_t) fA + 255);
844 ((
KVNucleus&) obj).SetMassFormula(fMassFormula);
887 static bool first_call =
true;
890 glog.set_warnings(
false);
893 return tkn::tknucleus(*z,*
a);
927 if(nuc.has_property(
"mass_excess"))
928 val = nuc.get_mass_excess()/1000.;
1002 if(nuc.has_property(
"spin_parity"))
1003 return nuc.get_spin_parity().get_spin().get_value();
1024 if(nuc.has_property(
"spin_parity"))
1025 return nuc.get_spin_parity().get_parity().get_value();
1062 if(nuc.has_property(
"lifetime"))
1065 return nuc.get_lifetime()/std::log(2);
1067 return nuc.get_lifetime();
1094 if(nuc.has_property(
"radius"))
1095 return nuc.get_radius();
1186 if(nuc.has_property(
"abundance"))
1187 return nuc.get_abundance();
1201 std::optional<int> amost;
1202 if (z == -1) z =
GetZ();
1209 if (abund && *abund > abmax) {
1298 if (*
a == 0)
return 0;
1348 if (!zz) zz =
GetZ();
1356 while (!nla.
End()) {
1372 if (!zz) zz =
GetZ();
1380 while (!nla.
End()) {
1410 for (
Int_t zz = zmin; zz <= zmax; zz += 1) {
1413 while (!nla.
End()) {
1435 while (!nla.
End()) {
1516 if (zres < 0 || ares < 0 || eres < 0) {
1518 "Cannot subtract nuclei, resulting Z=%d A=%d E=%lf", zres, ares, eres);
1589 Double_t AUX = 1. + (9. * XJJ / 4. / QQ / X13);
1590 Double_t EE3 = XJJ * A * SI * SI / AUX;
1592 AVOL * A + ASUR *
TMath::Power(A, 2. / 3.) + AC * X13 + AZER;
1593 Double_t TOTA = EE1 + EE2 + EE3 + EE4;
1594 return (939.55 * XNEU + 938.77 *
Z - TOTA);
1720 if (ChargeState == 0) ChargeState =
GetZ();
1722 Double_t X = Brho * C_mparns * ChargeState;
1740 if (!nuc)
return 0.;
1772 Ztot += nuc->
GetZ();
1773 Atot += nuc->
GetA();
1854 vrel =
sqrt(2 * TKE / mu) *
C();
1869 return 0.755 * z1 * z2 / (
pow(a1, 1 / 3.) +
pow(a2, 1 / 3.)) + 7.3;
1881 return 0.1189 * za + 7.3;
1893 return 0.1071 * za + 22.2;
1912 return 0.104 * za + 24.3;
1926 return 39.43 + .085 *
pow(zp + zt, 2) /
pow(ap + at, 1. / 3.);
1970 return nuc.has_property(
"lifetime")
1971 && nuc.get_lifetime_measure()->get_unit_key() <= tkn::tkunit_manager::units_keys::TeV;
1987 return GetTkNucleus(z,
a).get_lifetime(tkn::tkunit_manager::units_keys::MeV);
2006 while (!isotopes.
End()) {
2008 int A = isotopes.
Next();
2011 Aeff += A * (*abundance);
2016 if (wtot > 0) Aeff /= wtot;
2050 Double_t vel = GetVelocity().Mag();
2069 return 0.04 *
GetZ();
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t target
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
static void InitEnvironment()
Description of properties and kinematics of atomic nuclei.
Double_t ShimaChargeStatePrecision() const
std::optional< double > GetAbundance(std::optional< int > z={}, std::optional< int > a={}) const
static Double_t hbar
hbar*c in MeV.fm
Double_t GetBindingEnergyPerNucleon(std::optional< int > z={}, std::optional< int > a={}) const
Returns binding energy in MeV/A for this nucleus.
const Char_t * GetSymbol(Option_t *opt="") const
void Copy(TObject &) const override
Copy this KVNucleus into the KVNucleus object referenced by "obj".
void SetExcitEnergy(Double_t e)
Double_t GetExtraMassExcess(std::optional< int > z={}, std::optional< int > a={}) const
static Double_t LiquidDrop_BrackGuet(UInt_t A, UInt_t Z)
void Clear(Option_t *opt="") override
Double_t GetMassExcess(std::optional< int > z={}, std::optional< int > a={}) const
void CheckZAndA(std::optional< Int_t > &z, std::optional< Int_t > &a) const
std::optional< int > GetMostAbundantA(std::optional< int > z={}) const
Double_t GetBindingEnergy(std::optional< int > z={}, std::optional< int > a={}) const
static Double_t TKE_Viola1985(Double_t z, Double_t a)
from: V. E. Viola, K. Kwiatkowski, and M. Walker, Physical Review C 31, 1550 (1985).
static Int_t GetNFromZ(Double_t, Char_t mt)
Calculate neutron number from the element's atomic number Z.
void Print(Option_t *t="") const override
Display nucleus parameters.
static Double_t GetRealAFromZ(Double_t, Char_t mt)
Double_t GetExcitEnergy() const
std::optional< double > GetLifeTime(std::optional< int > z={}, std::optional< int > a={}) const
Double_t GetFissionTKE(const KVNucleus *nuc=0, Int_t formula=kDefaultFormula) const
Int_t GetAWithMaxBindingEnergy(std::optional< int > z={})
static Double_t GetRealNFromZ(Double_t, Char_t mt)
KVNucleus operator+(const KVNucleus &rhs)
void SetZandN(Int_t z, Int_t n)
Set atomic number and mass number.
static Int_t IsMassGiven(const Char_t *)
KVNucleus & operator=(const KVNucleus &rhs)
KVNucleus assignment operator.
Double_t GetMassGS() const
static Double_t kMe
electron mass in MeV/c2
void SetZ(Int_t z, Char_t mt=-1)
Double_t LiquidDrop_Weizsacker()
Double_t GetExtraChargeRadius(std::optional< int > a={}, Int_t rct=2) const
KVNucleus & operator+=(const KVNucleus &rhs)
KVNucleus addition and assignment operator.
Double_t GetLiquidDropBindingEnergy(std::optional< int > z={}, std::optional< int > a={}) const
Double_t GetFissionVelocity(KVNucleus *nuc=0, Int_t formula=kDefaultFormula)
static Double_t TKE_Itkis1998(Double_t z, Double_t a)
std::optional< double > GetSpin(std::optional< int > z={}, std::optional< int > a={}) const
Double_t GetAtomicMass(std::optional< int > z={}, std::optional< int > a={}) const
static Double_t e2
e^2/(4.pi.epsilon_0) in MeV.fm
Bool_t IsKnown(std::optional< int > z={}, std::optional< int > a={}) const
Returns kTRUE if this nucleus or (z,a) is known.
tkn::tknucleus GetTkNucleus(std::optional< int > z={}, std::optional< int > a={}) const
Double_t GetRelativeVelocity(KVNucleus *nuc)
Return the reltive velocity between nuc and this in cm/ns.
Int_t GetN() const
Return the number of neutron.
Double_t GetNaturalA(std::optional< int > z={}) const
KVNucleus & operator-=(const KVNucleus &rhs)
KVNucleus subtraction and assignment operator.
Int_t Compare(const TObject *obj) const override
KVNumberList GetMeasuredARange(std::optional< int > z={}) const
returns range of a measured mass for a given element
Double_t DeduceEincFromBrho(Double_t Brho, Int_t ChargeState=0)
TH2F* GetKnownNucleiChart(KVString method="GetBindingEnergyPerNucleon");.
Double_t ShimaChargeState(Int_t) const
static Double_t kAMU
atomic mass unit in MeV
int SetZFromSymbol(const Char_t *)
void SetZandA(Int_t z, Int_t a)
Set atomic number and mass number.
const Char_t * GetLatexSymbol(Option_t *opt="") const
Int_t GetNpairs(Int_t type=kNN) const
const Char_t * GetIsotopesList(Int_t zmin, Int_t zmax, std::optional< double > tmin={}) const
void SetZAandE(Int_t z, Int_t a, Double_t ekin)
Set atomic number, mass number, and kinetic energy in MeV.
Double_t GetQFasymTKE(KVNucleus *target)
static Double_t TKE_Hinde1987(Double_t z1, Double_t a1, Double_t z2, Double_t a2)
Double_t GetChargeRadius(std::optional< int > z={}, std::optional< int > a={}) const
KVNumberList GetKnownARange(std::optional< int > z={}, std::optional< double > tmin={}) const
static Int_t GetZFromSymbol(const Char_t *)
Double_t GetEnergyPerNucleon() const
std::optional< int > GetParity(std::optional< int > z={}, std::optional< int > a={}) const
static Int_t GetAFromZ(Double_t, Char_t mt)
Bool_t IsStable(Double_t min_lifetime=1.0e+15) const
Int_t GetZ() const
Return the number of proton / atomic number.
Bool_t IsResonance(std::optional< int > z={}, std::optional< int > a={}) const
static Double_t TKE_Viola1966(Double_t z, Double_t a)
from: V. E. Viola, Jr., Nuclear Data Sheets. Section A 1, 391 (1965).
std::optional< double > GetWidth(std::optional< int > z={}, std::optional< int > a={}) const
static Double_t TKE_Kozulin2014(Double_t zp, Double_t zt, Double_t ap, Double_t at)
Strings used to represent a set of ranges of values.
void SetMinMax(Int_t min, Int_t max, Int_t pas=1)
Set list with all values from 'min' to 'max'.
void Add(Int_t)
Add value 'n' to the list.
Base class for relativistic kinematics of massive particles.
virtual void SetMass(Double_t m)
TVector3 GetMomentum() const
void SetMomentum(const TVector3 &v)
Double_t GetEnergy() const
void SetKE(Double_t ecin)
void Copy(TObject &) const override
void Set4Mom(const TLorentzVector &p)
void Clear(Option_t *opt="") override
Reset particle properties i.e. before creating/reading a new event.
void Print(Option_t *t="") const override
print out characteristics of particle
TVector3 GetVelocity() const
returns velocity vector in cm/ns units
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
virtual Version_t ReadVersion(UInt_t *start=nullptr, UInt_t *bcnt=nullptr, const TClass *cl=nullptr)=0
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=nullptr)=0
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
TLorentzVector operator-() const
void Streamer(TBuffer &) override
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
R__ALWAYS_INLINE Bool_t IsZombie() const
const char * Data() const
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
TString & Remove(EStripType s, char c)
Expr< UnaryOp< Sqrt< T >, SMatrix< T, D, D2, R >, T >, T, D, D2, R > sqrt(const SMatrix< T, D, D2, R > &rhs)
RVec< PromoteTypes< T0, T1 > > pow(const T0 &x, const RVec< T1 > &v)
RVec< PromoteType< T > > exp(const RVec< T > &v)
void Error(UserClass p, const char *location, const char *va_(fmt),...)
void Warning(UserClass p, const char *location, const char *va_(fmt),...)
TMatrixT< Double_t > as(SEXP)
constexpr Double_t Ccgs()
constexpr Double_t Hbarcgs()
Double_t Power(Double_t x, Double_t y)
Double_t Sqrt(Double_t x)
Double_t Max(Double_t a, Double_t b)
#define sym(otri1, otri2)