English Français

Documentation / Developer's manual

Available modules

Calibration,  DataServer,  Launcher,  MetaModelOptim,  Modeler,  Optimizer,  ReLauncher,  Reliability,  ReOptimizer,  Sampler,  Sensitivity,  UncertModeler,  XmlProblem,   Uranie / Calibration: TPMCABC.h Source File
Uranie / Calibration v4.9.0
/* @license-end */
TPMCABC.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 by
6// 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 1.2 $
22// $State$
24
32#ifndef __PMC_ABC__
33#define __PMC_ABC__
34
35// Root
36#include "TTree.h"
37#include "TMatrixD.h"
38
39// Uranie
40#include "TABC.h"
41#include "TDataServer.h"
42
43namespace URANIE
44{
45namespace Calibration
46{
47
49{
50
51public :
52 URANIE::DataServer::TDataServer *_tdsParStep;
53 vector<double> _frequencies;
54 vector<double> _indices;
55 vector<double> _vEpsilon;
56 TMatrixD _Sigmat;
57 int _kStep;
58 int _nSteps;
59
60 //---------------------------------------------
64
71 TPMCABC(URANIE::DataServer::TDataServer *tds, URANIE::Relauncher::TRun *run, int ns = 1, Option_t *option = "");
72
79 TPMCABC(URANIE::DataServer::TDataServer *tds, void (*fcn)(Double_t*,Double_t*), const char *varexpinput, const char *varexpoutput, int ns = 100, Option_t *option = "");
80
81
88 TPMCABC(URANIE::DataServer::TDataServer *tds, const char *fcn, const char *varexpinput, const char *varexpoutput, int ns = 100, Option_t *option = "");
89
96 TPMCABC(URANIE::DataServer::TDataServer *tds, URANIE::Launcher::TCode *fcode, int ns = 1, Option_t *option = "");
97
98
100 virtual ~TPMCABC();
102
103 //---------------------------------------------
114 void computeParameters(Option_t *option = "");
116
119 double pdfGaussianMultivariate(TMatrixD X,TMatrixD MU,TMatrixD Sigma);
120
122 {
123 return _nSteps;
124 }
125
126
127 URANIE::DataServer::TDataServer *getTdsStep()
128 {
129 return _tdsParStep;
130 }
131
132 void setThresholds(vector<double> vectTh)
133 {
134 _vEpsilon = vectTh;
135 try
136 {
137 for(int i=0; i < (int)_vEpsilon.size(); i++)
138 {
139 if ((_vEpsilon[i]>1.0) or (_vEpsilon[i]<0.0))
140 {
141 throw URANIE::Exceptions::UErrorExceptions(__FILE__, __LINE__,
142 Form( "TABC::setThresholds: the percentile must be set between 0 and 1: however it is fix at %4.2f at step %d ! ",_vEpsilon[i],i));
143 }
144 }
145 }
146 catch (URANIE::Exceptions::UErrorExceptions& ue)
147 {
148 ue.printMessage();
149 throw ue;
150 }
151 _nSteps = (int)_vEpsilon.size();
152 }
153 void setNSteps(int steps)
154 {
155 try
156 {
157 if ((steps<1))
158 {
159 throw URANIE::Exceptions::UErrorExceptions(__FILE__, __LINE__,
160 Form( "TABC::setNSteps: the number of steps must be strictly upper than 0: however it is fix at %d ! ", steps));
161 }
162 }
163 catch (URANIE::Exceptions::UErrorExceptions& ue)
164 {
165 ue.printMessage();
166 throw ue;
167 }
168 _nSteps = steps;
169 }
170
171
172 ClassDef(URANIE::Calibration::TPMCABC, ID_CALIBRATION)
173
174};
175
176} // Fin du namespace ABC
177} // Fin du namespace URANIE
178#endif
Interface of class URANIE::ABC::TABC.
Definition TABC.h:54
Definition TPMCABC.h:49
int _nSteps
Number of steps.
Definition TPMCABC.h:58
URANIE::DataServer::TDataServer * _tdsParStep
Pointer of the intermediate TDS.
Definition TPMCABC.h:52
void setNSteps(int steps)
Definition TPMCABC.h:153
TPMCABC(URANIE::DataServer::TDataServer *tds, const char *fcn, const char *varexpinput, const char *varexpoutput, int ns=100, Option_t *option="")
int _kStep
Iterator of steps.
Definition TPMCABC.h:57
void computeParameters(Option_t *option="")
Generate the sample.
TPMCABC(URANIE::DataServer::TDataServer *tds, URANIE::Launcher::TCode *fcode, int ns=1, Option_t *option="")
TPMCABC(URANIE::DataServer::TDataServer *tds, void(*fcn)(Double_t *, Double_t *), const char *varexpinput, const char *varexpoutput, int ns=100, Option_t *option="")
void setThresholds(vector< double > vectTh)
Definition TPMCABC.h:132
vector< double > _vEpsilon
Vector of the thresholds.
Definition TPMCABC.h:55
virtual ~TPMCABC()
Default destructor.
TMatrixD _Sigmat
Sqrt covariance matrix.
Definition TPMCABC.h:56
int getNSteps()
Definition TPMCABC.h:121
URANIE::DataServer::TDataServer * getTdsStep()
Definition TPMCABC.h:127
TPMCABC(URANIE::DataServer::TDataServer *tds, URANIE::Relauncher::TRun *run, int ns=1, Option_t *option="")
vector< double > _indices
Vector of possible indices for sampling.
Definition TPMCABC.h:54
double pdfGaussianMultivariate(TMatrixD X, TMatrixD MU, TMatrixD Sigma)
vector< double > _frequencies
Vector of the frequencies for sampling.
Definition TPMCABC.h:53
Definition TABC.cxx:46