English Français

Documentation / Manuel développeur

Modules disponibles

Calibration,  DataServer,  Launcher,  MetaModelOptim,  Modeler,  Optimizer,  ReLauncher,  Reliability,  ReOptimizer,  Sampler,  Sensitivity,  UncertModeler,  XmlProblem,   Uranie / Sensitivity: TSobol.h Source File
Uranie / Sensitivity v4.9.0
/* @license-end */
TSobol.h
Go to the documentation of this file.
1
2// Copyright (C) 2013-2024 CEA/DES
3//
4// This program is free software: you can redistribute it and/or modify
5// it under the terms of the GNU Lesser General Public License as published
6// by the Free Software Foundation, either version 3 of the License, or any
7// later version.
8//
9// This program is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12// GNU Lesser General Public License for more details.
13//
14// You should have received a copy of the GNU Lesser General Public License
15// along with this program. If not, see <http://www.gnu.org/licenses/>.
18// $Id$
19// $Author$
20// $Date$
21// $Revision$
22// $State$
24
41#ifndef TSobol_H
42#define TSobol_H
43#include "TString.h"
44#ifndef ROOT_TMethodCall
45#include "TMethodCall.h"
46#endif
47#ifndef ROOT_TNtupleD
48#include "TNtupleD.h"
49#endif
50
51// Uranie
52#include "TStochAttribut.h"
53#include "TSensitivity.h"
54#include "TSampling.h"
55#include "TQMC.h"
56
57using std::cout;
58using std::endl;
59
60namespace URANIE {
61namespace Sensitivity {
62class TSobol: public TSensitivity {
63
65public:
88
89 // Operations
90private:
91
92protected:
93 //---------------------------------------------
97 void initSample(Int_t ns, Option_t * option = "");
99
100 //---------------------------------------------
104
113 virtual void parseOption(Option_t *option = "");
115
116 //---------------------------------------------
120
123
124public:
125 //---------------------------------------------
129
132 /*
133 \param tds (URANIE::DataServer::TDataServer *) the dataserver
134 \param fcn (void *) The function to analyze
135 \param ns (Int_t) The size (total) of the sampling
136 \param varexpinput(const char*)[""] The list of input attributes to pass to the function separated by the caracter ":"
137 \param varexpoutput (const char *)[""] The list of output attributes separated by the caracter ":"
138 \param
139 */
140#ifdef ROOT5
141 TSobol(URANIE::DataServer::TDataServer *tds, void *fcn, Int_t ns,
142 const char *varexpinput = "", const char *varexpoutput = "",
143 Option_t * option = "");
144#else
145 TSobol(URANIE::DataServer::TDataServer *tds, void (*fcn)(Double_t*,Double_t*),
146 const char *varexpinput, const char *varexpoutput,
147 Int_t ns, Option_t * option = "");
148#endif
150 /*
151 \param tds (URANIE::DataServer::TDataServer *) the dataserver
152 \param fcn (const char*) The function to analyze
153 \param ns (Int_t) The size (total) of the sampling
154 \param varexpinput(const char*)[""] The list of input attributes to pass to the function separated by the caracter ":"
155 \param varexpoutput (const char *)[""] The list of output attributes separated by the caracter ":"
156 \param
157 */
158 TSobol(URANIE::DataServer::TDataServer *tds, const char *fcn,
159 Int_t ns, const char *varexpinput, const char *varexpoutput,
160 Option_t* option="");
162 TSobol(URANIE::DataServer::TDataServer *tds, const char *varexpinput,
163 const char *varexpoutput, Option_t * option = "");
164
166 TSobol(URANIE::DataServer::TDataServer *tds, URANIE::Launcher::TCode *fcode,
167 Int_t ns, Option_t * option = "");
169 TSobol(URANIE::DataServer::TDataServer *tds, URANIE::Relauncher::TRun *run,
170 Int_t ns, Option_t * option = "");
172 virtual ~TSobol();
174
175 //---------------------------------------------
179 void initForRun(Option_t *option);
181
182
183 //---------------------------------------------
187 void createTuple(Option_t *option = "");
189
190 //---------------------------------------------
194
195 /*
196 \li from a TDS empty of data . Run the method \ref initSample
197 \li from a TDS with data. First Half of the data is M and the other is N
198
199 After mix the data to create the \f$ M_{i}\f$ and \f$ N_{i}\f$ matrix
200 */
201 virtual void generateSample(Option_t * option = "");
202
203 void loadOtherSobolFile(const char *filename);
205
206 //---------------------------------------------
208
209 /*
210 The TDS must contain an attribute Name + "n__iter__sobol" with values
211 \li -1 : for the M matrix
212 \li 0 : for the N matrix
213 \li ix+1 : for the matrix Mi
214 \li 100*_nX+ ix+1 : for the matrix Ni
215 */
216 void evaluateIndexes(Option_t * option = "");
218
219 //---------------------------------------------
223 virtual void printLog();
225
226 ClassDef(URANIE::Sensitivity::TSobol, ID_SENSITIVITY)
227
228 //---------------------------------------------
233 Bool_t _bSM;
235 Bool_t _bWithData;
236
239
242
243 //---------------------------------------------
250 TMatrixD _matM;
251 TMatrixD _matN;
252
253 TEventList *_telm, *_teln;
254 TMatrixD _valN, _valM;
255 TMatrixD _valSi, _valSti;
258 URANIE::DataServer::TDSNtupleD *_withdatantp;
259 URANIE::DataServer::TDSNtupleD *_preloadedntp;
262
263};
264
265} // End Of namespace Sensitivity
266} // End Of namespace URANIE
267#endif
Interface of class URANIE::Sensitivity::TSensitivity.
Description of the class TSensitivity.
Definition TSensitivity.h:112
Description of the class TSobol.
Definition TSobol.h:62
URANIE::DataServer::TDSNtupleD * _withdatantp
Definition TSobol.h:258
URANIE::DataServer::TDSNtupleD * _preloadedntp
Definition TSobol.h:259
ESiAlgorithm
Definition TSobol.h:75
@ kSiOnlyNi
Definition TSobol.h:76
@ kSiAll
Definition TSobol.h:76
@ kSiJansen99
Definition TSobol.h:76
@ kSiSumo10
Definition TSobol.h:76
@ kSiMartinez11
Definition TSobol.h:76
@ kSiSaltelli02
Definition TSobol.h:76
@ kSiSobol93
Definition TSobol.h:76
TMatrixD _valMeanMN
Definition TSobol.h:256
ESiAlgorithm _nSiAlgorithm
The algorithm to use to compute the first order algorithm.
Definition TSobol.h:240
Int_t _nMethodComputed
number of method used
Definition TSobol.h:249
ESamplerMethod
list Of Enum
Definition TSobol.h:67
@ kSRS
Definition TSobol.h:68
@ kqMCHalton
Definition TSobol.h:68
@ kqMCSobol
Definition TSobol.h:68
@ kLHS
Definition TSobol.h:68
TEventList * _telm
Definition TSobol.h:253
void initForRun(Option_t *option)
void initSample(Int_t ns, Option_t *option="")
EStiAlgorithm _nStiAlgorithm
The algorithm to use to compute the total order algorithm.
Definition TSobol.h:241
TMatrixD _valN
Definition TSobol.h:254
TSobol(URANIE::DataServer::TDataServer *tds, const char *fcn, Int_t ns, const char *varexpinput, const char *varexpoutput, Option_t *option="")
Default constructor with the TDataServer.
TMatrixD _matM
The matrix M.
Definition TSobol.h:250
TMatrixD _valM
values of output for M and N matrix
Definition TSobol.h:254
TSobol(URANIE::DataServer::TDataServer *tds, const char *varexpinput, const char *varexpoutput, Option_t *option="")
Default constructor with a TDataServer filling.
TSobol(URANIE::DataServer::TDataServer *tds, URANIE::Relauncher::TRun *run, Int_t ns, Option_t *option="")
Default constructor with a trun.
Int_t _nSimPerIndex
The size of the two matrix M et N.
Definition TSobol.h:248
TMatrixD _valSti
values of the first and total sobol indexes
Definition TSobol.h:255
EStiAlgorithm
Definition TSobol.h:79
@ kStiOnlyNi
Definition TSobol.h:85
@ kStiMartinez11
Definition TSobol.h:84
@ kStiHomma96
Definition TSobol.h:80
@ kStiSumo10
Definition TSobol.h:83
@ kStiSobol07
Definition TSobol.h:81
@ kStiJansen99
Definition TSobol.h:82
@ kStiAll
Definition TSobol.h:86
virtual void parseOption(Option_t *option="")
Read option specific to TSobol.
vector< double > _valMeanYN
Definition TSobol.h:257
void evaluateIndexes(Option_t *option="")
Evaluates the index from a Specific TDataServer.
TMatrixD _valSigmaMN
complexe matrices to store the mean and variance of used M/N/Mi/Ni matrices
Definition TSobol.h:256
virtual void generateSample(Option_t *option="")
Generates all the matrix of sample.
vector< double > _valMeanYM
Definition TSobol.h:257
TMatrixD _matN
The matrix M.
Definition TSobol.h:251
TSobol(URANIE::DataServer::TDataServer *tds, void(*fcn)(Double_t *, Double_t *), const char *varexpinput, const char *varexpoutput, Int_t ns, Option_t *option="")
Default constructor with the TDataServer.
ESamplerMethod _nSamplerMethod
The sampler method to generate the M and N matrix.
Definition TSobol.h:237
int * _useless
Definition TSobol.h:260
EMatrixMiNi _nMatrixMiNi
The method to generate the Min and/or Ni matrix (Sobol, Saltelli)
Definition TSobol.h:238
vector< double > _valVarYN
Definition TSobol.h:257
void createTuple(Option_t *option="")
vector< double > _valVarYM
Definition TSobol.h:257
TEventList * _teln
m and n lit of event in the ntuple
Definition TSobol.h:253
EMatrixMiNi
Definition TSobol.h:71
@ kMiNiSobol
Definition TSobol.h:72
@ kMiNiSaltelli
Definition TSobol.h:72
void preTreatment()
Resize matrices and fill many vector/matrice to avroid recompute stat too oftently.
Bool_t _bWithData
true if data are provided and used as full sample of 2 times ns samples
Definition TSobol.h:235
TMatrixD _valSi
Definition TSobol.h:255
TSobol()
Default constructor.
void loadOtherSobolFile(const char *filename)
virtual ~TSobol()
Default destructor.
TSobol(URANIE::DataServer::TDataServer *tds, URANIE::Launcher::TCode *fcode, Int_t ns, Option_t *option="")
Default constructor with a tcode.
Bool_t _bWithSample
true if data are provided and used as full sample of 2 times ns samples
Definition TSobol.h:234
ROOT.
Definition TCMN.h:45