MURE
Loading...
Searching...
No Matches
NucleiTree.hxx
Go to the documentation of this file.
1/*
2 This file is part of MURE,
3 Copyright (C) 2007-2021 MURE developers.
4
5 MURE is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9
10 MURE is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public License
16 along with MURE. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19#ifndef _NucleiTree_
20#define _NucleiTree_
21
27#include <iostream>
28#include <fstream>
29#include <vector>
30#include <map>
31#include <string>
32
33#include "StringLine.hxx"
34#include "FPDistribution.hxx"
35
36class FPDistribution;
37class ZAI;
38
39using namespace std;
40
42
66{
67 public:
69
75 NucleiTree(bool WithReactions = true, bool WithSpontaneousFis = true);
76 ~NucleiTree();
77
79
88 void ExtractZAI(ZAI *&zai, double MinHalfLife = 0, int MaxRecursionDepth = 10000, bool FromDecay = true);
89 void ExtractWantedZAI(ZAI *zai, bool FromDecay = true);
90 bool IsZAIInTree(ZAI *zai);
91 bool IsZAIInTree(int Z, int A, int I);
92 ZAI *GetZAIInTree(ZAI *zai);
93 ZAI *GetZAIInTree(int Z, int A, int I);
94 ZAI *ProvideZAI(int Z, int A, int I);
95 void ClearUnUsed();
96 string LongestTree();
97 void DumpTree();
98 void WriteAsciiTree(string FileName = "asciitree.dat");
99 string PrintTreeStats();
100 int TreeLength(ZAI *zai, int &nb);
101 void CheckConsistency(ZAI *&zai);
102 void BuildTrees();
103 void SetZAIMass(ZAI *zai);
105 {
106 return fTreesBuilt;
107 }
108 void FissionProductSelection(ZAI *zai, double yield = 0);
110 {
111 return fIsWantedNuclei;
112 }
113
114 private:
115 void FindReactions();
116 void FindDecay();
117 void SetZAIFissionEnergy(ZAI *zai);
118 void FillZAI(string line, ZAI *zai);
119 void AddFissionProductsToZAI(FPDistribution *FP, ZAI *zai, double E, bool replace = false);
120
122
126 void RenormalizeBRS(ZAI *zai, double ought_to_be);
128
134 string GetDecay(string DecayModes, double &BR, int &Iso, int &StartPos);
135
137 vector<ZAI *> fZaiVector;
138 bool fDelete;
139 map<int, map<int, map<int, ZAI *> > > fChart;
144 bool fWithSF;
145
146 map<int, map<int, bool> > fWantedNuclei;
148
149};
150
151#endif
Header file for FPRecord and FPDistribution classes.
Header file for StingLine class.
A distributio of Fission Products.
Definition FPDistribution.hxx:105
A NucleiTree defines the whole tree of nuclei in case of evolution for a single ZAI.
Definition NucleiTree.hxx:66
void BuildTrees()
Build Decay & Reaction trees for evolution.
Definition NucleiTree.cxx:305
void AddFissionProductsToZAI(FPDistribution *FP, ZAI *zai, double E, bool replace=false)
Definition NucleiTree.cxx:1400
bool IsTreesBuilt()
Definition NucleiTree.hxx:104
int TreeLength(ZAI *zai, int &nb)
returns the chain length of a ZAI
Definition NucleiTree.cxx:1050
void ExtractWantedZAI(ZAI *zai, bool FromDecay=true)
Definition NucleiTree.cxx:838
map< int, map< int, map< int, ZAI * > > > fChart
The whole Nuclei Chart from the fDecayDataFile.
Definition NucleiTree.hxx:139
void RenormalizeBRS(ZAI *zai, double ought_to_be)
Renormalizes the branching ratios of the given ZAI.
Definition NucleiTree.cxx:1136
ZAI * ProvideZAI(int Z, int A, int I)
return an existing ZAI* from the tree (or build it if not existing)ยจ
Definition NucleiTree.cxx:1793
string PrintTreeStats()
Write out the tree information.
Definition NucleiTree.cxx:1446
void DumpTree()
Make a nuclear chart of the tree & write it to disk.
Definition NucleiTree.cxx:1148
bool fTreesBuilt
whether or not Trees are built
Definition NucleiTree.hxx:142
int fDecayRecursionDepth
A measure of how far into the tree in decay recursive calls.
Definition NucleiTree.hxx:140
string GetDecay(string DecayModes, double &BR, int &Iso, int &StartPos)
Returns a particular decay mode.
Definition NucleiTree.cxx:1000
void FillZAI(string line, ZAI *zai)
uses values of line to fill zai
Definition NucleiTree.cxx:950
void CheckConsistency(ZAI *&zai)
Checks for self-consistency in the tree and complains if problems exist.
Definition NucleiTree.cxx:901
void WriteAsciiTree(string FileName="asciitree.dat")
Write out the tree info in ascii format.
Definition NucleiTree.cxx:1528
bool IsWantedNuclei()
Definition NucleiTree.hxx:109
void SetZAIFissionEnergy(ZAI *zai)
Set the fission energy released for fissile isotopes.
Definition NucleiTree.cxx:1067
bool fWithReactions
whether or not reactions links should be included (default yes)
Definition NucleiTree.hxx:143
void FissionProductSelection(ZAI *zai, double yield=0)
Use for selected FP.
Definition NucleiTree.cxx:1632
bool IsZAIInTree(ZAI *zai)
Definition NucleiTree.cxx:1739
void SetZAIMass(ZAI *zai)
Set the Mass for zai (not evolving case)
Definition NucleiTree.cxx:260
map< int, map< int, bool > > fWantedNuclei
The wanted Nuclei defined in MURE::SetListOfWantedNucleiFN.
Definition NucleiTree.hxx:146
string LongestTree()
find the longest chain
Definition NucleiTree.cxx:1028
int fReactionRecursionDepth
A measure of how far into the tree in reaction recursive calls.
Definition NucleiTree.hxx:141
bool fDelete
flag to know that a ZAI has been deleted from the chart
Definition NucleiTree.hxx:138
bool fWithSF
whether or not the Spontaneous Fission is included (default yes)
Definition NucleiTree.hxx:144
string fDecayDataFile
File name of the chart of nuclide file.
Definition NucleiTree.hxx:136
void FindReactions()
find the possible nuclear reactions using ReactionList
Definition NucleiTree.cxx:1202
bool fIsWantedNuclei
True when wanted nuclei file is given.
Definition NucleiTree.hxx:147
void FindDecay()
find the possible decays using fDecayDataFile file
Definition NucleiTree.cxx:365
ZAI * GetZAIInTree(ZAI *zai)
Definition NucleiTree.cxx:1769
~NucleiTree()
Destructor.
Definition NucleiTree.cxx:244
vector< ZAI * > fZaiVector
a vector of the whole chart (simplify fChart access)
Definition NucleiTree.hxx:137
void ExtractZAI(ZAI *&zai, double MinHalfLife=0, int MaxRecursionDepth=10000, bool FromDecay=true)
Extract all decay & reaction tree for a ZAI.
Definition NucleiTree.cxx:715
void ClearUnUsed()
free memory when finished
Definition NucleiTree.cxx:336
A ZAI defined a (Z, A, Isomere) for a Nucleus.
Definition ZAI.hxx:118
the namespace of the Standard C++

MURE Project, documentation generated by Doxygen 1.9.7 - Fri Jan 19 2024