TkN 2.4
Toolkit for Nuclei
Loading...
Searching...
No Matches
tkdecay.h
1/********************************************************************************
2 * Copyright (c) : Université de Lyon 1, CNRS/IN2P3, UMR5822, *
3 * IP2I, F-69622 Villeurbanne Cedex, France *
4 * Normandie Université, ENSICAEN, UNICAEN, CNRS/IN2P3, *
5 * LPC Caen, F-14000 Caen, France *
6 * Contibutor(s) : *
7 * Jérémie Dudouet jeremie.dudouet@cnrs.fr [2020] *
8 * Diego Gruyer diego.gruyer@cnrs.fr [2020] *
9 * *
10 * Licensed under the MIT License <http://opensource.org/licenses/MIT>. *
11 * SPDX-License-Identifier: MIT *
12 ********************************************************************************/
13
14#ifndef tkdecay_H
15#define tkdecay_H
16
17#include "tkn_config.h"
18
19#ifdef HAS_ROOT
20#include "TClass.h"
21#endif
22
23#include <array>
24
25#include "tkdb_table.h"
26#include "tkproperty_list.h"
27#include "tkmeasure.h"
28
29namespace tkn {
30
31class tklevel;
32
33class tkdecay: public tkproperty_list {
34 friend class tkdataset;
35 friend class tklevel_scheme;
36
37public:
38
40 static array<tkstring,6> decay_type_str;
41
42protected:
43
44 int fdecay_id;
45 int fdecay_level_from_id;
46 int fdecay_level_to_id;
47
48 decay_type fdecay_type = kundef;
49
50 tkstring funcertain_decay{};
51
52 tkstring fcomment;
53 bool fhas_comment=false;
54
55 shared_ptr<tklevel> flevelfrom = nullptr;
56 shared_ptr<tklevel> flevelto = nullptr;
57
58public:
59 tkdecay(int _id, int _from_id, int _to_id, const tkdb_table::measure_data_struct &_struc, decay_type _type);
60 virtual ~tkdecay() override = default;
61
63 shared_ptr<tkmeasure> get_energy_meas() const {return get("energy");}
66
68 decay_type get_decay_type() {return fdecay_type;}
69
71 bool has_comment() const {return fhas_comment;}
73 const tkstring &get_comment() const {return fcomment;}
75 bool is_uncertain() const {return !funcertain_decay.is_empty();}
76
78 shared_ptr<tklevel> get_level_from() {return flevelfrom;}
80 shared_ptr<tklevel> get_level_to() {return flevelto;}
81
83 void print(const tkstring &_option="") const;
84
85protected:
86
88 int get_id() const {return fdecay_id;}
90 int get_level_from_id() {return fdecay_level_from_id;}
92 int get_level_to_id() {return fdecay_level_to_id;}
93
95 void set_levels(shared_ptr<tklevel> _lvlfrom, shared_ptr<tklevel> _lvlto) {flevelfrom=_lvlfrom; flevelto=_lvlto;}
96
98 void set_comment(const tkstring &_comment) {fcomment = _comment; fhas_comment=true;}
100 void set_uncertain_decay(const tkstring &_uncertain) {funcertain_decay = _uncertain;}
101
102#ifdef HAS_ROOT
104 ClassDefOverride(tkdecay,0);
105#endif
106};
107
108class tkgammadecay: public tkdecay {
109
110 friend class tkdataset;
111 friend class tklevel_scheme;
112
113public:
114 tkgammadecay(int _id, int _from_id, int _to_id, const tkdb_table::measure_data_struct &_struc) : tkdecay(_id,_from_id,_to_id,_struc, kgamma) {;}
115 virtual ~tkgammadecay() override = default;
116
118 shared_ptr<tkmeasure> get_relative_intensity_measure() {return get("RI");}
120 double get_relative_intensity();
121
123 shared_ptr<tkmeasure> get_mixing_ratio_measure() {return get("mix ratio");}
125 double get_mixing_ratio();
126
128 shared_ptr<tkmeasure> get_conv_coeff_measure() {return get("conv");}
130 double get_conv_coeff();
131
133 shared_ptr<tkmeasure> get_trans_prob_measure(bool _elec, int _L, bool _WU);
135 double get_trans_prob(bool _elec, int _L, bool _WU);
136
139
142 void set_relative_intensity(double _val, double _unc);
143
146
148 void set_multipolarity(const tkstring &_mul);
149
152
155
156#ifdef HAS_ROOT
158 ClassDefOverride(tkgammadecay,0);
159#endif
160};
161
162}
163
164#endif
shared_ptr< tklevel > get_level_from()
get the parent level
Definition tkdecay.h:78
bool is_uncertain() const
check if the decay is uncertain
Definition tkdecay.h:75
shared_ptr< tklevel > get_level_to()
get the daughter level
Definition tkdecay.h:80
const tkstring & get_comment() const
get the level comment string
Definition tkdecay.h:73
void print(const tkstring &_option="") const
print the decay properties
Definition tkdecay.cpp:173
static array< tkstring, 6 > decay_type_str
Definition tkdecay.h:40
bool has_comment() const
check if a comment exists
Definition tkdecay.h:71
friend class tkdataset
Definition tkdecay.h:34
virtual ~tkdecay() override=default
double get_energy(const tkunit_manager::units_keys _unit=tkunit_manager::units_keys::keV)
returns the energy in keV by default
Definition tkdecay.cpp:160
shared_ptr< tkmeasure > get_energy_meas() const
returns the energy tkmeasure object
Definition tkdecay.h:63
decay_type get_decay_type()
get the decay type
Definition tkdecay.h:68
friend class tklevel_scheme
Definition tkdecay.h:35
tkdecay(int _id, int _from_id, int _to_id, const tkdb_table::measure_data_struct &_struc, decay_type _type)
Definition tkdecay.cpp:139
Stores information on a gamma-ray decay.
Definition tkdecay.h:108
void set_relative_intensity(tkdb_table::measure_data_struct &_struc)
set the relative intensity info
Definition tkdecay.cpp:217
tkstring get_multipolarity()
get the transition multipolarity
Definition tkdecay.h:138
tkgammadecay(int _id, int _from_id, int _to_id, const tkdb_table::measure_data_struct &_struc)
Definition tkdecay.h:114
shared_ptr< tkmeasure > get_conv_coeff_measure()
returns the gamma conversion coefficient tkmeasure object
Definition tkdecay.h:128
double get_trans_prob(bool _elec, int _L, bool _WU)
returns the gamma gamma transition probability value (ex: BE2 in Weiksopf units, get_trans_prob(1,...
Definition tkdecay.cpp:343
void set_mixing_ratio(tkdb_table::measure_data_struct &_struc)
set the mixing ratio info
Definition tkdecay.cpp:250
double get_conv_coeff()
returns the gamma conversion coefficient value
Definition tkdecay.cpp:319
double get_mixing_ratio()
returns the gamma mixing ratio value
Definition tkdecay.cpp:306
double get_relative_intensity()
returns the gamma relative intensity (100% correspond the the more intence gamma-ray)
Definition tkdecay.cpp:293
void set_multipolarity(const tkstring &_mul)
set the relative intensity info
Definition tkdecay.cpp:245
friend class tkdataset
Definition tkdecay.h:110
void set_transition_probability(tkdb_table::measure_data_struct &_struc)
set the transition probability
Definition tkdecay.cpp:273
shared_ptr< tkmeasure > get_relative_intensity_measure()
returns the gamma relative intensity tkmeasure object (100% correspond the the more intence gamma-ray...
Definition tkdecay.h:118
virtual ~tkgammadecay() override=default
shared_ptr< tkmeasure > get_mixing_ratio_measure()
returns the gamma mixing ratio tkmeasure object
Definition tkdecay.h:123
friend class tklevel_scheme
Definition tkdecay.h:111
shared_ptr< tkmeasure > get_trans_prob_measure(bool _elec, int _L, bool _WU)
returns the gamma transition probability tkmeasure object (ex: BE2 in Weiksopf units,...
Definition tkdecay.cpp:325
void set_conv_coeff(tkdb_table::measure_data_struct &_struc)
set the conversion coeff
Definition tkdecay.cpp:262
Stores information on a nuclear level.
Definition tklevel.h:31
shared_ptr< tkmeasure > get(const tkstring &_property) const
get the property as tkmeasure
tkproperty_list(tkstring _name)
tkstring get_property(const tkstring &_property) const
get the property value as a string
std::string with usefull tricks from TString (ROOT) and KVString (KaliVeda) and more....
Definition tkstring.h:31
units_keys
units identifiers
Definition tkunit.h:46
Definition tklog.cpp:16
data structure used to fill a tkmeasure object from the sqlite database
Definition tkdb_table.h:49