GamR
0.0.0
GammaROOT
Loading...
Searching...
No Matches
State.hh
Go to the documentation of this file.
1
#ifndef GAMR_NUCLEUS_STATE_HH
2
#define GAMR_NUCLEUS_STATE_HH
3
4
/* ROOT */
5
#include <Rtypes.h>
6
#include <TNamed.h>
7
8
namespace
GamR
{
9
namespace
Nucleus
{
10
11
class
State
:
public
TNamed {
12
private
:
13
Float_t fEnergy;
14
Float_t fMeanlife;
15
Char_t fSpin2;
16
Bool_t fParity;
17
18
public
:
19
// Constructors
20
State
(Float_t E = 0, Char_t J2 = 0, Bool_t P = 0, Float_t T = 0)
21
: fEnergy(E), fMeanlife(T), fSpin2(J2), fParity(P){};
22
23
// Setters
24
void
SetEnergy
(Float_t E) { fEnergy = E; };
25
void
SetSpin
(Float_t J) { fSpin2 =
static_cast<
Char_t
>
(2 * J); };
26
void
SetSpin
(Char_t J) { fSpin2 = 2 * J; }
27
void
SetPositive
() { fParity = kFALSE; };
28
void
SetNegative
() { fParity = kTRUE; };
29
30
// Getters
31
Float_t
GetEnergy
() {
return
fEnergy; }
32
Char_t
Get2J
() {
return
fSpin2; };
33
Double_t
GetMeanlife
() {
return
fMeanlife; };
34
35
// Functions
36
Bool_t
IsNegative
() {
return
fParity; };
37
Bool_t
IsPositive
() {
return
!fParity; };
38
39
// Operators
40
Bool_t
operator==
(
const
State
&o)
const
41
{
42
return
(fEnergy == o.fEnergy) && (fSpin2 == o.fSpin2) && (fParity == o.fParity);
43
};
44
Bool_t
operator!=
(
const
State
&other)
const
{
return
!(*
this
== other); };
45
Bool_t
operator<
(
const
State
&other)
const
{
return
fEnergy < other.fEnergy; };
46
Bool_t
operator>
(
const
State
&other)
const
{
return
!(*
this
< other); };
47
48
ClassDef
(
State
, 1);
49
};
50
51
}
// namespace Nucleus
52
}
// namespace GamR
53
54
#endif
GamR::Nucleus::State::SetSpin
void SetSpin(Float_t J)
Definition
State.hh:25
GamR::Nucleus::State::State
State(Float_t E=0, Char_t J2=0, Bool_t P=0, Float_t T=0)
Definition
State.hh:20
GamR::Nucleus::State::GetMeanlife
Double_t GetMeanlife()
Definition
State.hh:33
GamR::Nucleus::State::operator<
Bool_t operator<(const State &other) const
Definition
State.hh:45
GamR::Nucleus::State::SetPositive
void SetPositive()
Definition
State.hh:27
GamR::Nucleus::State::Get2J
Char_t Get2J()
Definition
State.hh:32
GamR::Nucleus::State::IsPositive
Bool_t IsPositive()
Definition
State.hh:37
GamR::Nucleus::State::operator>
Bool_t operator>(const State &other) const
Definition
State.hh:46
GamR::Nucleus::State::SetEnergy
void SetEnergy(Float_t E)
Definition
State.hh:24
GamR::Nucleus::State::operator!=
Bool_t operator!=(const State &other) const
Definition
State.hh:44
GamR::Nucleus::State::GetEnergy
Float_t GetEnergy()
Definition
State.hh:31
GamR::Nucleus::State::operator==
Bool_t operator==(const State &o) const
Definition
State.hh:40
GamR::Nucleus::State::SetSpin
void SetSpin(Char_t J)
Definition
State.hh:26
GamR::Nucleus::State::IsNegative
Bool_t IsNegative()
Definition
State.hh:36
GamR::Nucleus::State::SetNegative
void SetNegative()
Definition
State.hh:28
GamR::Nucleus::State::ClassDef
ClassDef(State, 1)
GamR::Nucleus
Definition
LevelSchemeDraw.cc:25
GamR
Definition
Gain.cc:19
src
lib
nucleus
State.hh
Generated on Tue Feb 10 2026 23:03:42 for GamR by
1.13.2