CLASS  5.1
Fuel Cycle Simulator
XSM_MLP.hxx
Go to the documentation of this file.
1 #ifndef _XSM_MLP_HXX
2 #define _XSM_MLP_HXX
3 
13 #include "XSModel.hxx"
14 #include "CLASSReader.hxx"
15 #include "TTree.h"
16 #include <string>
17 #include <fstream>
18 #include <iostream>
19 #include <map>
20 #include <vector>
21 
22 
23 typedef long long int cSecond;
24 using namespace std;
25 
26 
27 class XSM_MLP;
28 #ifndef __ROOTCLING__
29 typedef void (XSM_MLP::*XS_MLP_DMthPtr)( const string & ) ;
30 #endif
31 //-----------------------------------------------------------------------------//
33 
42 //________________________________________________________________________
43 
44 
45 class XSM_MLP : public XSModel
46 {
47  public :
48 
53 
54  //{
56 
61  XSM_MLP(string TMVA_Weight_Directory,string InformationFile = "/Data_Base_Info.nfo");
62  //}
63 
64  //{
66 
72  XSM_MLP(CLASSLogger* Log,string TMVA_Weight_Directory,string InformationFile = "/Data_Base_Info.nfo");
73  //}
74 
75  ~XSM_MLP();
77 
82 
83  //{
85  void LoadKeyword();
86  //}
87 
88  //{
90 
93  void ReadTimeSteps(const string &line);
94  //}
95 
96  //{
98 
101  void ReadZAIName(const string &line);
102  //}
103  //{
105 
108  void ReadLine(string line);
109  //}
110 
112 
113 
114  void BookTMVAReader(); //Book TMVA method
115  EvolutionData GetCrossSections(IsotopicVector IV, double t=0);
116 
117 
118  protected :
119 
120  vector<CLASSReader*> fReader;
121 
122  void GetMLPWeightFiles();
123 
124  void ReadWeightFile(string Filename, int &Z, int &A, int &I, int &Reaction) ;
125 
126 
127 
128  double ExecuteTMVA(string WeightFile, TTree* InputTree);
129  vector<float> CreateTMVAInput(IsotopicVector isotopicvector, int t);
130 
131 
132  vector<double> fMLP_Time;
133  vector<string> fWeightFiles;
134 
136 
137 
138  bool fIsStepTime;
139 
140  map<ZAI,string> fMapOfTMVAVariableNames;
141 
142 #ifndef __ROOTCLING__
143  map<string, XS_MLP_DMthPtr> fDKeyword;
144 #endif
145 };
146 
147 #endif
148 
map< ZAI, string > fMapOfTMVAVariableNames
List of TMVA input variable names (read from fMLPInformationFile ) , name depends on the training ste...
Definition: XSM_MLP.hxx:140
void(XSM_MLP::* XS_MLP_DMthPtr)(const string &)
Definition: XSM_MLP.hxx:29
long long int cSecond
Definition: XSM_MLP.hxx:23
string fTMVAWeightFolder
folder containing all the weight file
Definition: XSM_MLP.hxx:135
vector< CLASSReader * > fReader
Definition: XSM_MLP.hxx:120
Allows to store & operate on radioactive sample.
Definition: IsotopicVector.hxx:37
Definition: CLASSBackEndDict.cxx:37
Header file for XSMODEL class.
Stores fuel inventory evolution , mean cross sections evolution, flux evolution, power ...
Definition: EvolutionData.hxx:54
map< string, XS_MLP_DMthPtr > fDKeyword
Definition: XSM_MLP.hxx:143
Defines a XSModel getting mean cross sections from neural network execution.
Definition: XSM_MLP.hxx:45
vector< string > fWeightFiles
All the weight file contains in fTMVAWeightFolder.
Definition: XSM_MLP.hxx:133
Object to handle output messages.
Definition: CLASSLogger.hxx:144
vector< double > fMLP_Time
Time vector of the data base.
Definition: XSM_MLP.hxx:132
Defines a mean cross section predictor.
Definition: XSModel.hxx:48
bool fIsStepTime
true if one TMVA weihgt per step time is requiered otherwise it assumes time is part of the MLP input...
Definition: XSM_MLP.hxx:138