English Français

Documentation / Developer's manual

Available modules

Calibration,  DataServer,  Launcher,  MetaModelOptim,  Modeler,  Optimizer,  ReLauncher,  Reliability,  ReOptimizer,  Sampler,  Sensitivity,  UncertModeler,  XmlProblem,   Uranie / Uncertainty Modeler: TCirce.h Source File
Uranie / Uncertainty Modeler  v4.10.0
/* @license-end */
TCirce.h
Go to the documentation of this file.
1 // 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 
34 #ifndef TCIRCE_H
35 #define TCIRCE_H
36 
37 #include "TUncertModeler.h"
38 
39 #include <iostream>
40 #include <fstream>
41 
42 using std::cout;
43 using std::endl;
44 
45 // ROOT
46 #include "Rtypes.h"
47 #include "TVectorD.h"
48 #include "TSystem.h"
49 
50 // Uranie
51 #include "UncertModeler.h"
52 #define CIRCE_DIFF_ATTRIBUTE "__circe__diff__"
53 #define CIRCE_RESIDU_ATTRIBUTE "__circe__residual__"
54 #define CIRCE_BLOC_NAME "__circe__bloc__"
55 
56 namespace URANIE
57 {
58 namespace UncertModeler
59 {
60 class TCirce: public TUncertModeler
61 {
62 
63  // Attributes
64 public:
66  {
68  };
69 protected:
70  Int_t _nSeed;
71  Double_t _dTol;
72  Double_t _dLikelihood;
73  TVectorD _vecBiais;
74  TMatrixD _matC;
75  TMatrixD _matCorrelation;
76  Int_t _nPatterns;
77  Int_t _nParameters;
78  TString _sCirceInputFile;
80 
81  Int_t _nInitCAlea;
82 
83  TList * _listOfTDS;
85  TList * _listOfBloc;
87 
88  TVectorD _vecDiff;
89  TVectorD _vecYStarVariance;
90  TMatrixD _matSensibility;
91  TMatrixD _matInitialC;
92  TVectorD _vecInitialB;
93 
94  TMatrixD _matVarianceMu;
95  TMatrixD _matVarianceSigma;
96 
97 
98  // Methods
99 public:
100  //---------------------------------------------
104  TCirce(URANIE::DataServer::TDataServer *tds, const char *systar,
106  const char *syhat, const char *ssensi, const char *sexpuncert = "",
107  Option_t * option = "");
109  virtual ~TCirce();
111 
112  //---------------------------------------------
117  void setTolerance(Double_t dtol);
120  Double_t getTolerance()
121  {
122  return _dTol;
123  }
125  void setNCMatrix(Int_t n)
126  {
127  _nInitCAlea = n;
128  }
130  Int_t getNCMatrix()
131  {
132  return _nInitCAlea;
133  }
135  Int_t getNTDS();
137  Double_t getLikelihood()
138  {
139  return _dLikelihood;
140  }
142  Int_t getNPatterns()
143  {
144  return _nPatterns;
145  }
148  {
149  return _nParameters;
150  }
153  {
154  return _matVarianceMu;
155  }
158  {
159  return _matVarianceSigma;
160  }
162 
163  //---------------------------------------------
167  void setCMatrixInitial(TMatrixD mat);
170  TMatrixD getCMatrixInitial()
171  {
172  return _matInitialC;
173  }
175  TMatrixD getCMatrix()
176  {
177  return _matC;
178  }
180  void setBVectorInitial(TVectorD vec);
182  TVectorD getBVectorInitial()
183  {
184  return _vecInitialB;
185  }
187  TVectorD getBVector()
188  {
189  return _vecBiais;
190  }
192 
193  //---------------------------------------------
197  void init(Option_t * option = "");
200  void estimate(Option_t * option = "");
202  void terminate(Option_t * option = "");
204  void printResults(Option_t * option = "");
206  void addData(URANIE::DataServer::TDataServer *tds, const char *systar,
207  const char *syhat, const char *ssensi, const char *sexpuncert = "");
209 
210  //---------------------------------------------
214  void setInputFile(const char * sfile);
217  const char * getInputFile()
218  {
219  return _sCirceInputFile.Data();
220  }
222  void readInputFile(const char * sfile = "", ECirceMethod nCirceMethod =
223  kBiaisBloc);
225 
226  //---------------------------------------------
230  void addBloc(URANIE::DataServer::TDataServer *tds, const char *sbloc,
232  const char* sname = "");
234  TMatrixD initCMatrix(Int_t nrows, Double_t dMulti);
236 
237  //---------------------------------------------
241 
247  void setSeed(Int_t ind = 0);
249  Int_t getSeed()
250  {
251  return _nSeed;
252  }
254 
255  //---------------------------------------------
259  virtual void printLog(Option_t *option = "");
262 
263  ClassDef(URANIE::UncertModeler::TCirce, ID_UNCERTMODELER)
264  //The description
265 };
266 
267 } // End Of namespace UncertModeler
268 } // End Of namespace URANIE
269 
270 #endif
271 // End Of File TCirce.h
Definition: TCirce.cxx:57
TMatrixD getCMatrixInitial()
Get the initial Matrix C.
Definition: TCirce.h:170
TMatrixD _matInitialC
The initial matrix of C.
Definition: TCirce.h:91
TVectorD _vecInitialB
The initial vector B.
Definition: TCirce.h:92
TVectorD _vecYStarVariance
The vector of experimental variance.
Definition: TCirce.h:89
TMatrixD _matCorrelation
The final matrix of correlation.
Definition: TCirce.h:75
void addData(URANIE::DataServer::TDataServer *tds, const char *systar, const char *syhat, const char *ssensi, const char *sexpuncert="")
Add data from a new TDS.
Definition: TCirce.cxx:129
Double_t getTolerance()
Get the Tolerance parameter.
Definition: TCirce.h:120
TMatrixD _matVarianceMu
The matrix of variance of mu computed Confidence Interval by the Fisher Matrix.
Definition: TCirce.h:94
TMatrixD getCMatrix()
Get the final matrix C of coriance (Circe)
Definition: TCirce.h:175
Int_t getSeed()
Returns the seed value.
Definition: TCirce.h:249
const char * getInputFile()
Get the Circe Input File.
Definition: TCirce.h:217
void readInputFile(const char *sfile="", ECirceMethod nCirceMethod=kBiaisBloc)
Set and Read the Circe Input File.
Definition: TCirce.cxx:333
TString _sCirceInputFile
The input file of Circe.
Definition: TCirce.h:78
Int_t _nSeed
the Seed of the random generator
Definition: TCirce.h:70
TList * _listOfBloc
The list of bloc (default NULL : when only one is as blias.f)
Definition: TCirce.h:85
TList * _listOfTDS
The list of TDS which contain data.
Definition: TCirce.h:83
TVectorD _vecDiff
The vector Y = Texp - Ycode.
Definition: TCirce.h:88
ECirceMethod _nCirceMethod
the Circe method from (kBiais, kBiaisBloc, kBiaisBlocCInitAlea, kBiaisBlocBootstrap) ...
Definition: TCirce.h:79
void addBloc(URANIE::DataServer::TDataServer *tds, const char *sbloc, const char *sname="")
The addBloc method.
Definition: TCirce.cxx:635
TMatrixD initCMatrix(Int_t nrows, Double_t dMulti)
Generate a ramdom finite positive matrix C.
Definition: TCirce.cxx:389
TCirce(URANIE::DataServer::TDataServer *tds, const char *systar, const char *syhat, const char *ssensi, const char *sexpuncert="", Option_t *option="")
Default constructor.
Definition: TCirce.cxx:65
TVectorD getBVectorInitial()
Get the initial vector B.
Definition: TCirce.h:182
TList * _listOfSensitivity
The list of sensitivity parameter.
Definition: TCirce.h:86
TVectorD getBVector()
Get the final vector of biais (Circe)
Definition: TCirce.h:187
Int_t getNCMatrix()
Get the number of random matrix C to generate.
Definition: TCirce.h:130
void estimate(Option_t *option="")
the estimate procedure
Definition: TCirce.cxx:733
TMatrixD _matSensibility
The matrix of sensibility.
Definition: TCirce.h:90
Definition: TCirce.h:60
Int_t getNParameters()
Get the number of parameters.
Definition: TCirce.h:147
Int_t getNTDS()
Get the number of TDS.
Definition: TCirce.cxx:270
void printResults(Option_t *option="")
Print the results.
Definition: TCirce.cxx:1140
Int_t _nParameters
The number of parameters.
Definition: TCirce.h:77
Definition: TUncertModeler.h:47
Double_t getLikelihood()
Get the Likelihood for the optimal parameters.
Definition: TCirce.h:137
virtual ~TCirce()
Default destructor.
Definition: TCirce.cxx:100
TMatrixD getMatrixVarianceMu()
Get the matrix of variance of mu.
Definition: TCirce.h:152
Double_t _dTol
The tolerance to test the convergence (default 1e-5)
Definition: TCirce.h:71
void setNCMatrix(Int_t n)
Set the number of random matrix C to generate.
Definition: TCirce.h:125
void setBVectorInitial(TVectorD vec)
Set the initial vector B.
Definition: TCirce.cxx:371
Double_t _dLikelihood
The Likelihood for the optimal parameter.
Definition: TCirce.h:72
ECirceMethod
Definition: TCirce.h:65
void setCMatrixInitial(TMatrixD mat)
Set The initial Matrix C.
Definition: TCirce.cxx:354
void setTolerance(Double_t dtol)
Set the tolerance parameter.
Definition: TCirce.cxx:282
virtual void printLog(Option_t *option="")
Print the log of the class.
Definition: TCirce.cxx:1214
void init(Option_t *option="")
The init method.
Definition: TCirce.cxx:419
TMatrixD getMatrixVarianceSigma()
Get the matrix of variance of sigma.
Definition: TCirce.h:157
TList * _listOfInformations
The list of information for Circe.
Definition: TCirce.h:84
TVectorD _vecBiais
The final vector of biais.
Definition: TCirce.h:73
void terminate(Option_t *option="")
the terminate method
Definition: TCirce.cxx:1064
Int_t _nInitCAlea
the number of Matrix C alea (default 1)
Definition: TCirce.h:81
TMatrixD _matVarianceSigma
The matrix of variance of sigma computed Confidence Interval by the Fisher Matrix.
Definition: TCirce.h:95
void setSeed(Int_t ind=0)
Init the seed.
Definition: TCirce.cxx:1121
TMatrixD _matC
The final matrix of Covariance.
Definition: TCirce.h:74
Interface with statistical test.
Int_t _nPatterns
The number of patterns.
Definition: TCirce.h:76
Int_t getNPatterns()
Get the number of patterns.
Definition: TCirce.h:142
void setInputFile(const char *sfile)
Set the Circe Input File.
Definition: TCirce.cxx:307