CLASS  5.1
Fuel Cycle Simulator
XSM_MLP Class Reference

Defines a XSModel getting mean cross sections from neural network execution. More...

#include <XSM_MLP.hxx>

Inheritance diagram for XSM_MLP:
XSModel CLASSObject XSM_SFR

Public Member Functions

void BookTMVAReader ()
 
EvolutionData GetCrossSections (IsotopicVector IV, double t=0)
 Return calculated cross section by the MLP regression. More...
 
Constructor/Desctructor
 XSM_MLP (string TMVA_Weight_Directory, string InformationFile="/Data_Base_Info.nfo")
 Normal Constructor. More...
 
 XSM_MLP (CLASSLogger *Log, string TMVA_Weight_Directory, string InformationFile="/Data_Base_Info.nfo")
 CLASSLogger Constructor. More...
 
 ~XSM_MLP ()
 
Reading NFO related Method
void LoadKeyword ()
 LoadKeyword() : make the correspondance between keyword and reading method. More...
 
void ReadTimeSteps (const string &line)
 ReadTimeSteps : read the time step of the model. More...
 
void ReadZAIName (const string &line)
 ReadZAIName : read the zai name in the TMWA MLP model. More...
 
void ReadLine (string line)
 ReadLine : read a line. More...
 
- Public Member Functions inherited from XSModel
void ReadNFO ()
 
void ReadZAIlimits (const string &line)
 
void ReadType (const string &line)
 
void ReadRParam (const string &line)
 
void SetZAIThreshold (int Z_Threshold)
 Set the Z threshold : ZAI with Z < fZAIThreshold are not manage by CLASS. More...
 
int GetZAIThreshold ()
 Get the Z threshold. More...
 
 XSModel ()
 Default constructor. More...
 
 XSModel (CLASSLogger *log)
 Logger constructor. More...
 
virtual ~XSModel ()
 Destructor. More...
 
virtual bool isIVInDomain (IsotopicVector IV)
 Check either the IsotopicVector IV is in the validity domain of the models. More...
 
- Public Member Functions inherited from CLASSObject
 CLASSObject ()
 Normal Constructor. More...
 
 CLASSObject (CLASSLogger *log)
 Log Constructor. More...
 
virtual CLASSObjectClone ()
 Correct way to copy a CLASSObject in case of derivation. More...
 
void SetLog (CLASSLogger *log)
 Set the CLASSLogger. More...
 
CLASSLoggerGetLog ()
 Return the Pointer to the Log. More...
 

Protected Member Functions

void GetMLPWeightFiles ()
 Find all .xml file in TMVA_Weight_Directory. More...
 
void ReadWeightFile (string Filename, int &Z, int &A, int &I, int &Reaction)
 Select the reaction according to the weight file name. More...
 
double ExecuteTMVA (string WeightFile, TTree *InputTree)
 Execute the MLP according to the input tree created. More...
 
vector< float > CreateTMVAInput (IsotopicVector isotopicvector, int t)
 Create input tmva tree to be read by ExecuteTMVA. More...
 

Protected Attributes

vector< CLASSReader * > fReader
 
vector< double > fMLP_Time
 Time vector of the data base. More...
 
vector< string > fWeightFiles
 All the weight file contains in fTMVAWeightFolder. More...
 
string fTMVAWeightFolder
 folder containing all the weight file More...
 
bool fIsStepTime
 true if one TMVA weihgt per step time is requiered otherwise it assumes time is part of the MLP inputs More...
 
map< ZAI, string > fMapOfTMVAVariableNames
 List of TMVA input variable names (read from fMLPInformationFile ) , name depends on the training step. More...
 
map< string, XS_MLP_DMthPtrfDKeyword
 
- Protected Attributes inherited from XSModel
bool freaded
 
string fInformationFile
 file containing Reactor Type, Fuel type, HM mass, Power, time vector, and TMVA input variables names (looks the manual for format details) More...
 
double fDBPower
 Power of the data base (read from fMLPInformationFile ) More...
 
double fDBHMMass
 Heavy metal mass of the data base (read from fMLPInformationFile ) More...
 
string fDBFType
 Fuel Type (e.g MOX, UOX, ThU, ThPu ...) More...
 
string fDBRType
 Reactor Type (e.g PWR, FBR-Na, ADS..) More...
 
map< ZAI, pair< double, double > > fZAILimits
 Fresh fuel range : map<ZAI<min edge ,max edge >> More...
 
map< string, XSM_MthPtrfKeyword
 
int fZAIThreshold
 Z threshold for handling nuclei mean cross section (take only ZAI reaction of Z>= fZAIThresold) More...
 
- Protected Attributes inherited from CLASSObject
CLASSLoggerfLog
 Pointer to the Log. More...
 

Detailed Description

Defines a XSModel getting mean cross sections from neural network execution.

Define a XSM_MLP. This is the class to predict cross sections with a set of Multi Layer Perceptrons (MLP)

Authors
BLG
Version
1.0

Constructor & Destructor Documentation

◆ XSM_MLP() [1/2]

XSM_MLP::XSM_MLP ( string  TMVA_Weight_Directory,
string  InformationFile = "/Data_Base_Info.nfo" 
)

Normal Constructor.

Parameters
TMVA_Weight_Directory: The directory where all the TMVA weight are located
InformationFile: Name of the information file located in TMVA_Weight_Directory (default : Data_Base_Info.nfo)

◆ XSM_MLP() [2/2]

XSM_MLP::XSM_MLP ( CLASSLogger Log,
string  TMVA_Weight_Directory,
string  InformationFile = "/Data_Base_Info.nfo" 
)

CLASSLogger Constructor.

Parameters
log: The CLASSLogger
TMVA_Weight_Directory: The directory where all the TMVA weight are located
InformationFile: Name of the information file located in TMVA_Weight_Directory (default : Data_Base_Info.nfo)

◆ ~XSM_MLP()

XSM_MLP::~XSM_MLP ( )

Member Function Documentation

◆ BookTMVAReader()

void XSM_MLP::BookTMVAReader ( )

◆ CreateTMVAInput()

vector< float > XSM_MLP::CreateTMVAInput ( IsotopicVector  isotopicvector,
int  t 
)
protected

Create input tmva tree to be read by ExecuteTMVA.

◆ ExecuteTMVA()

double XSM_MLP::ExecuteTMVA ( string  WeightFile,
TTree *  InputTree 
)
protected

Execute the MLP according to the input tree created.

◆ GetCrossSections()

EvolutionData XSM_MLP::GetCrossSections ( IsotopicVector  IV,
double  t = 0 
)
virtual

Return calculated cross section by the MLP regression.

Implements XSModel.

◆ GetMLPWeightFiles()

void XSM_MLP::GetMLPWeightFiles ( )
protected

Find all .xml file in TMVA_Weight_Directory.

Save file names of TMVA weights

◆ LoadKeyword()

void XSM_MLP::LoadKeyword ( )
virtual

LoadKeyword() : make the correspondance between keyword and reading method.

Reimplemented from XSModel.

Reimplemented in XSM_SFR.

◆ ReadLine()

void XSM_MLP::ReadLine ( string  line)
virtual

ReadLine : read a line.

Parameters
line: line to read

Reimplemented from XSModel.

Reimplemented in XSM_SFR.

◆ ReadTimeSteps()

void XSM_MLP::ReadTimeSteps ( const string &  line)

ReadTimeSteps : read the time step of the model.

Parameters
line: line suppossed to contain the time step information starts with "k_timestep" keyword

◆ ReadWeightFile()

void XSM_MLP::ReadWeightFile ( string  Filename,
int &  Z,
int &  A,
int &  I,
int &  Reaction 
)
protected

Select the reaction according to the weight file name.

◆ ReadZAIName()

void XSM_MLP::ReadZAIName ( const string &  line)

ReadZAIName : read the zai name in the TMWA MLP model.

Parameters
line: line suppossed to contain the ZAI name starts with "k_zainame" keyword

Member Data Documentation

◆ fDKeyword

map<string, XS_MLP_DMthPtr> XSM_MLP::fDKeyword
protected

◆ fIsStepTime

bool XSM_MLP::fIsStepTime
protected

true if one TMVA weihgt per step time is requiered otherwise it assumes time is part of the MLP inputs

◆ fMapOfTMVAVariableNames

map<ZAI,string> XSM_MLP::fMapOfTMVAVariableNames
protected

List of TMVA input variable names (read from fMLPInformationFile ) , name depends on the training step.

◆ fMLP_Time

vector<double> XSM_MLP::fMLP_Time
protected

Time vector of the data base.

◆ fReader

vector<CLASSReader*> XSM_MLP::fReader
protected

◆ fTMVAWeightFolder

string XSM_MLP::fTMVAWeightFolder
protected

folder containing all the weight file

◆ fWeightFiles

vector<string> XSM_MLP::fWeightFiles
protected

All the weight file contains in fTMVAWeightFolder.


The documentation for this class was generated from the following files: