GRUTinizer
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
include
TNucleus.h
Go to the documentation of this file.
1
#ifndef TNUCLEUS_H
2
#define TNUCLEUS_H
3
4
#include <iostream>
5
#include <math.h>
6
#include <string.h>
7
#include <iomanip>
8
#include <stdlib.h>
9
#include <fstream>
10
#include <string>
11
12
13
#include "
TTransition.h
"
14
15
#include "TObject.h"
16
#include "TNamed.h"
17
#include "TList.h"
18
19
class
TNucleus
:
public
TNamed{
20
21
private
:
22
static
const
char
*
grsipath
;
23
static
std::string
massfile
;
//The massfile to be used, which includes Z, N, atomic symbol, and mass excess
24
//static const char *massfile; //The massfile to be used, which includes Z, N, atomic symbol, and mass excess
25
//static std::string masspath;
26
27
public
:
28
TNucleus
() { };
// Should not be use, here so we can write things to a root file.
29
TNucleus
(
const
char
* symbol);
// Creates a nucleus based on symbol and sets all parameters from mass.dat
30
TNucleus
(
int
Z,
int
N,
double
mass,
const
char
* symbol);
// Creates a nucleus with Z, N, mass, and symbol
31
TNucleus
(
int
Z,
int
N,
const
char
* MassFile = 0);
// Creates a nucleus with Z, N using mass table (default MassFile = "mass.dat")
32
33
virtual
~TNucleus
();
34
35
//static void SetMassFile(const char *tmp = NULL);// {massfile = tmp;} //Sets the mass file to be used
36
37
static
const
char
*
SortName
(
const
char
*name);
38
//void SetName(const char *name) { fName = name; }
39
void
SetZ
(
int
);
// Sets the Z (# of protons) of the nucleus
40
void
SetN
(
int
);
// Sets the N (# of neutrons) of the nucleus
41
void
SetMassExcess
(
double
);
// Sets the mass excess of the nucleus (in MeV)
42
void
SetMass
(
double
);
// Sets the mass manually (in MeV)
43
void
SetMass
();
// Sets the mass based on the A and mass excess of nucleus (in MeV)
44
void
SetSymbol
(
const
char
*);
// Sets the atomic symbol for the nucleus
45
46
47
// void AddTransition(Double_t energy, Double_t intensity, Double_t energy_uncertainty = 0.0, Double_t intensity_uncertainty = 0.0);
48
// void AddTransition(TTransition *tran);
49
//Bool_t RemoveTransition(Int_t idx);
50
//TGRSITransition *GetTransition(Int_t idx);
51
52
//const char* GetName() { return fName.c_str(); }
53
int
GetZ
()
const
{
return
fZ
; }
// Gets the Z (# of protons) of the nucleus
54
int
GetN
()
const
{
return
fN
; }
// Gets the N (# of neutrons) of the nucleus
55
int
GetA
()
const
{
return
fN
+
fZ
; }
// Gets the A (Z + N) of the nucleus
56
double
GetMassExcess
()
const
{
return
fMassExcess
; }
// Gets the mass excess of the nucleus (in MeV)
57
double
GetMass
()
const
{
return
fMass
; }
// Gets the mass of the nucleus (in MeV)
58
const
char
*
GetSymbol
()
const
{
return
fSymbol
.c_str(); }
// Gets the atomic symbol of the nucleus
59
60
61
void
AddTransition
(Double_t energy, Double_t intensity, Double_t energy_uncertainty = 0.0, Double_t intensity_uncertainty = 0.0);
62
void
AddTransition
(
TTransition
*tran);
63
//Bool_t RemoveTransition(Int_t idx);
64
TTransition
*
GetTransition
(Int_t idx);
65
66
Int_t
NTransitions
()
const
{
return
TransitionList
.GetSize();};
67
double
GetRadius
()
const
;
68
int
GetZfromSymbol
(
char
*);
69
70
TList
TransitionList
;
71
//bool SetSourceData();
72
73
void
Print
(Option_t *opt =
""
)
const
;
74
void
WriteSourceFile
(std::string outfilename =
""
);
75
76
77
78
private
:
79
int
fA
;
// Number of nucleons (Z + N)
80
int
fN
;
// Number of neutrons (N)
81
int
fZ
;
// Number of protons (Z)
82
double
fMass
;
// Mass (in MeV)
83
double
fMassExcess
;
// Mass excess (in MeV)
84
std::string
fSymbol
;
// Atomic symbol (ex. Ba, C, O, N)
85
//std::string fName; // Name, whatever user inputs (ex. 9C, 9c);
86
87
//JAB
88
bool
LoadTransitionFile
();
89
90
ClassDef
(
TNucleus
,1);
// Creates a nucleus with corresponding nuclear information
91
};
92
93
94
95
#endif
96
Generated on Wed Nov 4 2015 17:27:53 for GRUTinizer by
1.8.1.2