MURE
Loading...
Searching...
No Matches
ReactionList.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 _ReactionList_
20#define _ReactionList_
21
27#include <cmath>
28#include <map>
29#include <string>
30#include <fstream>
31#include <vector>
32
33#include "ReadXSFile.hxx"
34
35using namespace std;
36
51 };
52
53class ZAI;
54
56
69{
70 public:
72
75 ReactionList(ZAI *zai = nullptr);
76 ReactionList(const ReactionList &r);
77 //~ReactionList(); //!< Normal destructor
78
85
89 void FindReactions();
90 void SetReactionListDir(string str = "ReactionList");
91 void SetReactionThreshold(double sigma = 1e-2)
92 {
93 fReactionThreshold = sigma;
94 }
95 void InitAll(bool state);
96 void InitSimple();
97 void InitFissionTest();
98 void InitU5Only();
99 void InitAuto();
100
102
109
114 void N_fission(bool state = true)
115 {
116 fList[k_Fission] = state;
117 }
118 void N_gamma(bool state = true)
119 {
120 fList[kN_gamma] = state;
121 }
122 void N_2N(bool state = true)
123 {
124 fList[kN_2N] = state;
125 }
126 void N_3N(bool state = true)
127 {
128 fList[kN_3N] = state;
129 }
130 void N_4N(bool state = true)
131 {
132 fList[kN_4N] = state;
133 }
134 void N_p(bool state = true)
135 {
136 fList[kN_p] = state;
137 }
138 void N_d(bool state = true)
139 {
140 fList[kN_d] = state;
141 }
142 void N_t(bool state = true)
143 {
144 fList[kN_t] = state;
145 }
146 void N_He3(bool state = true)
147 {
148 fList[kN_He3] = state;
149 }
150 void N_alpha(bool state = true)
151 {
152 fList[kN_alpha] = state;
153 }
154 void N_Np(bool state = true)
155 {
156 fList[kN_Np] = state;
157 }
158 void N_Nd(bool state = true)
159 {
160 fList[kN_Nd] = state;
161 }
162 void N_Nt(bool state = true)
163 {
164 fList[kN_Nt] = state;
165 }
166 void N_NHe3(bool state = true)
167 {
168 fList[kN_NHe3] = state;
169 }
170 void N_Nalpha(bool state = true)
171 {
172 fList[kN_Nalpha] = state;
173 }
174 void N_2Np(bool state = true)
175 {
176 fList[kN_2Np] = state;
177 }
178 void N_3Np(bool state = true)
179 {
180 fList[kN_3Np] = state;
181 }
182 void N_2Nd(bool state = true)
183 {
184 fList[kN_2Nd] = state;
185 }
186 void N_2Nalpha(bool state = true)
187 {
188 fList[kN_2Nalpha] = state;
189 }
190 void N_3Nalpha(bool state = true)
191 {
192 fList[kN_3Nalpha] = state;
193 }
194 void N_2p(bool state = true)
195 {
196 fList[kN_2p] = state;
197 }
198 void N_2alpha(bool state = true)
199 {
200 fList[kN_2alpha] = state;
201 }
202 void N_3alpha(bool state = true)
203 {
204 fList[kN_3alpha] = state;
205 }
206 void N_N2p(bool state = true)
207 {
208 fList[kN_N2p] = state;
209 }
210 void N_N2alpha(bool state = true)
211 {
212 fList[kN_N2alpha] = state;
213 }
214 void N_N3alpha(bool state = true)
215 {
216 fList[kN_N3alpha] = state;
217 }
218 void N_pd(bool state = true)
219 {
220 fList[kN_pd] = state;
221 }
222 void N_pt(bool state = true)
223 {
224 fList[kN_pt] = state;
225 }
226 void N_palpha(bool state = true)
227 {
228 fList[kN_palpha] = state;
229 }
230 void N_dalpha(bool state = true)
231 {
232 fList[kN_dalpha] = state;
233 }
234 void N_d2alpha(bool state = true)
235 {
236 fList[kN_d2alpha] = state;
237 }
238 void N_t2alpha(bool state = true)
239 {
240 fList[kN_t2alpha] = state;
241 }
242 void N_Npalpha(bool state = true)
243 {
244 fList[kN_Npalpha] = state;
245 }
246 void N_2N2alpha(bool state = true)
247 {
248 fList[kN_2N2alpha] = state;
249 }
250 void N_Nd2alpha(bool state = true)
251 {
252 fList[kN_Nd2alpha] = state;
253 }
254 void N_Nt2alpha(bool state = true)
255 {
256 fList[kN_Nt2alpha] = state;
257 }
258
259 void SetNumberOfReactions(int reaction_number)
260 {
261 fN = reaction_number;
262 }
264 {
265 return fN;
266 }
268
272 bool IsReactionAllowed(int reaction_code);
274 {
275 return fReactionArray[i];
276 }
278 {
279 return fN;
280 }
282
287 void WriteReactionList(int other_isomer);
288 void InitReactionArray(bool extended = false);
289 string Print();
290 string PrintReaction(int reaction_code);
291 int *Return_DaughterConstituents(ZAI *, int);
293
294 protected:
295
297 map < int, bool > fList;
300 static vector <int> fReactionArray;
301 static vector <string> fReactionName;
302 static int fN;
303
304 //static int *fReactionArray;//!< ENDF code for reaction (used as index of fList)
305 //static string *fReactionName; //!< Reaction Name (e.g., N_2N)
306 //ifstream fXsdir; //!< XSDIR file
307 //string fXsdirName; //!< XSDIR file name
308
309 private:
310
311 // int ORIGEN_MTs[8] = {2, 4, 16, 17, 18, 102, 103, 107}; // inel, n2n, n3n, nf, ng, np,na
313};
314#endif
DecayId
Definition ReactionList.hxx:49
@ kAlpha
Definition ReactionList.hxx:50
@ kProton
Definition ReactionList.hxx:50
@ kBeta_minus
Definition ReactionList.hxx:49
@ kGamma
Definition ReactionList.hxx:49
@ kNeutron
Definition ReactionList.hxx:50
@ kUnknown
Definition ReactionList.hxx:50
@ kIsomericTransition
Definition ReactionList.hxx:49
@ kSpontaneousFission
Definition ReactionList.hxx:50
@ kBeta_plus
Definition ReactionList.hxx:49
Header file for ReadXSFile class.
@ kN_N2p
Definition ReadXSFile.hxx:59
@ kN_d2alpha
Definition ReadXSFile.hxx:67
@ kN_pt
Definition ReadXSFile.hxx:67
@ kN_Nt
Definition ReadXSFile.hxx:55
@ kN_2Nalpha
Definition ReadXSFile.hxx:51
@ kN_Nd
Definition ReadXSFile.hxx:54
@ kN_2Np
Definition ReadXSFile.hxx:58
@ kN_alpha
Definition ReadXSFile.hxx:65
@ kN_2N
Definition ReadXSFile.hxx:49
@ kN_2Nd
Definition ReadXSFile.hxx:48
@ kN_N3alpha
Definition ReadXSFile.hxx:51
@ kN_Np
Definition ReadXSFile.hxx:52
@ kN_gamma
Definition ReadXSFile.hxx:63
@ kN_3alpha
Definition ReadXSFile.hxx:65
@ kN_N2alpha
Definition ReadXSFile.hxx:53
@ kN_pd
Definition ReadXSFile.hxx:67
@ kN_NHe3
Definition ReadXSFile.hxx:55
@ kN_Nt2alpha
Definition ReadXSFile.hxx:55
@ kN_3Np
Definition ReadXSFile.hxx:58
@ kN_p
Definition ReadXSFile.hxx:64
@ kN_t
Definition ReadXSFile.hxx:64
@ kN_3N
Definition ReadXSFile.hxx:49
@ kN_Npalpha
Definition ReadXSFile.hxx:59
@ kN_3Nalpha
Definition ReadXSFile.hxx:51
@ kN_2N2alpha
Definition ReadXSFile.hxx:53
@ kN_t2alpha
Definition ReadXSFile.hxx:66
@ kN_palpha
Definition ReadXSFile.hxx:66
@ kN_d
Definition ReadXSFile.hxx:64
@ kN_Nd2alpha
Definition ReadXSFile.hxx:55
@ kN_Nalpha
Definition ReadXSFile.hxx:51
@ kN_2p
Definition ReadXSFile.hxx:66
@ kN_dalpha
Definition ReadXSFile.hxx:67
@ kN_He3
Definition ReadXSFile.hxx:64
@ kN_4N
Definition ReadXSFile.hxx:56
@ kN_2alpha
Definition ReadXSFile.hxx:65
@ k_Fission
Definition ReadXSFile.hxx:50
Reactions to take into account for evolution of a given nucleus.
Definition ReactionList.hxx:69
double fReactionThreshold
Threshold for the ratio .
Definition ReactionList.hxx:298
string fReactionListDir
binary ReactionList dir name
Definition ReactionList.hxx:299
void WriteReactionList(int other_isomer)
write reaction list in binary to speed up detection
Definition ReactionList.cxx:796
void N_3N(bool state=true)
Definition ReactionList.hxx:126
void N_t(bool state=true)
Definition ReactionList.hxx:142
void SetReactionListDir(string str="ReactionList")
Set the directory where binary reaction list files are store.
Definition ReactionList.cxx:486
void N_t2alpha(bool state=true)
Definition ReactionList.hxx:238
int GetReactionArray(int i)
Definition ReactionList.hxx:273
void N_4N(bool state=true)
Definition ReactionList.hxx:130
void N_He3(bool state=true)
Definition ReactionList.hxx:146
void N_fission(bool state=true)
Definition ReactionList.hxx:114
void N_p(bool state=true)
Definition ReactionList.hxx:134
void SetNumberOfReactions(int reaction_number)
Definition ReactionList.hxx:259
void N_2N(bool state=true)
Definition ReactionList.hxx:122
void N_Nalpha(bool state=true)
Definition ReactionList.hxx:170
int GetReactionArraySize()
Definition ReactionList.hxx:277
void N_palpha(bool state=true)
Definition ReactionList.hxx:226
void N_Nd(bool state=true)
Definition ReactionList.hxx:158
static vector< string > fReactionName
Reaction Name (e.g., N_2N)
Definition ReactionList.hxx:301
void N_2Nalpha(bool state=true)
Definition ReactionList.hxx:186
void N_N3alpha(bool state=true)
Definition ReactionList.hxx:214
ZAI * fZAI
the ZAI
Definition ReactionList.hxx:296
static int iElasticPosition
Definition ReactionList.hxx:312
void InitAuto()
Initialization of the reactions according to autodetection.
Definition ReactionList.cxx:581
static vector< int > fReactionArray
ENDF code for reaction (used as index of fList)
Definition ReactionList.hxx:300
void InitAll(bool state)
Set all reactions to state.
Definition ReactionList.cxx:573
void SetReactionThreshold(double sigma=1e-2)
Definition ReactionList.hxx:91
void N_2Np(bool state=true)
Definition ReactionList.hxx:174
void N_Np(bool state=true)
Definition ReactionList.hxx:154
void N_d2alpha(bool state=true)
Definition ReactionList.hxx:234
void InitReactionArray(bool extended=false)
Init static arrays (fReactionArray & fReactionName)
Definition ReactionList.cxx:93
void N_d(bool state=true)
Definition ReactionList.hxx:138
void N_Nt(bool state=true)
Definition ReactionList.hxx:162
void N_dalpha(bool state=true)
Definition ReactionList.hxx:230
void InitSimple()
Simple Initialization of te reactions (debug only)
Definition ReactionList.cxx:587
void N_gamma(bool state=true)
Definition ReactionList.hxx:118
string PrintReaction(int reaction_code)
Print reaction name (from the reaction_code)
Definition ReactionList.cxx:825
void FindReactions()
Find the reaction list.
Definition ReactionList.cxx:498
void InitU5Only()
Only n, gamma on U5 (debug only)
Definition ReactionList.cxx:618
void N_Nd2alpha(bool state=true)
Definition ReactionList.hxx:250
void N_Npalpha(bool state=true)
Definition ReactionList.hxx:242
void N_Nt2alpha(bool state=true)
Definition ReactionList.hxx:254
void N_2N2alpha(bool state=true)
Definition ReactionList.hxx:246
void N_2p(bool state=true)
Definition ReactionList.hxx:194
string Print()
Print all allowed reactions.
Definition ReactionList.cxx:838
static int fN
size of fReactionArray &fReactionName
Definition ReactionList.hxx:302
int GetNumberOfReactions()
Definition ReactionList.hxx:263
void N_2Nd(bool state=true)
Definition ReactionList.hxx:182
bool IsReactionAllowed(int reaction_code)
Returns true if a reaction is used.
Definition ReactionList.cxx:817
void N_2alpha(bool state=true)
Definition ReactionList.hxx:198
void N_3alpha(bool state=true)
Definition ReactionList.hxx:202
void N_NHe3(bool state=true)
Definition ReactionList.hxx:166
void InitFissionTest()
Simple Initialization of te reactions (debug only)
Definition ReactionList.cxx:606
void N_3Nalpha(bool state=true)
Definition ReactionList.hxx:190
void N_N2alpha(bool state=true)
Definition ReactionList.hxx:210
void N_3Np(bool state=true)
Definition ReactionList.hxx:178
map< int, bool > fList
allow/disable Reaction list.
Definition ReactionList.hxx:297
void N_alpha(bool state=true)
Definition ReactionList.hxx:150
void N_pt(bool state=true)
Definition ReactionList.hxx:222
void N_N2p(bool state=true)
Definition ReactionList.hxx:206
int * Return_DaughterConstituents(ZAI *, int)
Definition ReactionList.cxx:851
void N_pd(bool state=true)
Definition ReactionList.hxx:218
void ReactionAutoDetection()
Auto detection of reactions that will be used in evolution using ENDF file.
Definition ReactionList.cxx:688
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