Documentation / Developer's manual
Available modules
Calibration,  DataServer,  Launcher,  MetaModelOptim,  Modeler,  Optimizer,  ReLauncher,  Reliability,  ReOptimizer,  Sampler,  Sensitivity,  UncertModeler,  XmlProblem,  
Uranie / Calibration v4.9.0
|
Description of the class TCalibration. More...
#include <TCalibration.h>
Public Member Functions | |
Constructor and Destructor | |
TCalibration (URANIE::DataServer::TDataServer *tds, URANIE::Relauncher::TRun *run, int ns=1, Option_t *option="") | |
Default constructor with the runner argument: it contains the assessor to be used. | |
TCalibration (URANIE::DataServer::TDataServer *tds, void(*fcn)(Double_t *, Double_t *), const char *varexpinput, const char *varexpoutput, int ns=1, Option_t *option="") | |
Default Calibration constructor with the function argument: it contains the assessor to be used. | |
TCalibration (URANIE::DataServer::TDataServer *tds, const char *fcn, const char *varexpinput, const char *varexpoutput, int ns=1, Option_t *option="") | |
Default Calibration constructor with the function argument: it contains the assessor to be used. | |
TCalibration (URANIE::DataServer::TDataServer *tds, URANIE::Launcher::TCode *fcode, int ns=1, const char *option="") | |
Default Calibration constructor with the code argument: it contains the assessor to be used. | |
virtual | ~TCalibration () |
Default destructor. | |
Initialisation methods | |
virtual void | setDistanceAndReference (const char *funcName, URANIE::DataServer::TDataServer *tdsRef, const char *input, const char *reference, const char *weight="") |
Set the distance function and some needed informations. | |
virtual void | setDistanceAndReference (URANIE::Calibration::TDistanceFunction *distFunc, URANIE::DataServer::TDataServer *tdsRef, const char *input, const char *reference, const char *weight="") |
Set the distance function and some needed informations. | |
launching method | |
void | estimateParameters (Option_t *option="") |
void | estimateCustomResidues (string resName, int n_theta, double *theta) |
void | checkReference (URANIE::DataServer::TDataServer *tdsRef, const char *input, const char *output, const char *weight) |
Check the consistency of the formation provided. | |
drawing method | |
virtual void | drawParameters (TString sTitre, const char *variable="*", const char *select="1>0", Option_t *option="") |
void | drawResidues (TString sTitre, const char *variable="*", const char *select="1>0", Option_t *option="") |
Printing Log | |
void | setLog () |
void | unsetLog () |
void | changeLog () |
Bool_t | getLog () |
virtual void | printLog (Option_t *option="") |
Protected Member Functions | |
Internal methods | |
virtual void | computeParameters (Option_t *option="")=0 |
internal method in which the estimation is performed for all inheriting classes | |
virtual void | checktdsParContent ()=0 |
void | checkCanvasCreation (bool newcan) |
Create a canvas if needed. | |
void | initInputs () |
Initialise some common inputs. | |
void | initResults (vector< string > *ParsedLines) |
Initialise some common inputs. | |
void | computeAPosterioriForDistribution () |
Compute the a posteriori residual for many-solutions method. | |
Parse the option | |
virtual void | parseOption (Option_t *option="") |
Read the possible options. | |
attributes | |
enum | ELauncher { kCode , kFunction , kRun , kUnknown } |
URANIE::DataServer::TDataServer * | _tdsPar |
TDS containing parameters properties (parameters that should be calibrated) | |
URANIE::DataServer::TDataServer * | _tdsObs |
TDS containing observations used for calibration. | |
URANIE::DataServer::TDataServer * | _tdsEval |
TDS containing a priori / a posteriori evaluations. | |
ELauncher | _nLauncher |
The type of launcher. | |
TString | _sFunctionName |
The Name of the evaluatuor. | |
TString | _sEI |
The Name of input. | |
TString | _sEO |
The Name of output. | |
URANIE::Launcher::TCode * | _code |
The tcode. | |
URANIE::Relauncher::TRun * | _run |
Pointer to the runner to be used. | |
void(* | _pFunction )(double *, double *) |
Function pointer. | |
vector< URANIE::DataServer::TStochasticAttribute * > | _vatt |
internal vector of stochastic attribute for some methods | |
URANIE::Calibration::TDistanceFunction * | _dFunc |
Pointer to chosen distance function. | |
URANIE::DataServer::TDSNtupleD * | _evTuple |
Pointer to the eval ntuple. | |
TList * | _listOfParameters |
List of the parameters to be calibrated. | |
TCanvas * | _canvas |
Canvas object to deal with. | |
TObjArray * | _drawingGarbageCollector |
Garbage collector for prints. | |
int | _nSam |
The number of sample in a posteriori distributions. | |
int | _nObs |
The number of observations in the reference database. | |
int | _nIterMax |
The maximum number of iteration allowed (meaning total number of code estimation is _nIterMax * _nObs) | |
int | _nPar |
Dimension of the parameters. | |
int | _nVar |
Dimension of the output and references to be compared with. | |
int | _nSeed |
The seed of the random generator. | |
TString | _sMethodName |
The method name. | |
TString | _referenceName |
The reference name. | |
TString | _outputName |
The output name. | |
vector< string > | _vrefName |
The reference names. | |
vector< string > | _voutName |
The output names. | |
TString | _weightName |
The weight name. | |
TMatrixD | _mObsCovMat |
Observation Covariance matrix. | |
bool | _buseMatrix |
Use matrix instead of vectors in the Distance Function. | |
bool | _bsaveAll |
Whether all evaluations should be saved, not only a priori and a posteriori. | |
bool | _bdontKeepAgreement |
Remove the agreement attribute from the tdsPar object. | |
bool | _buseMode |
Use Mode instead of Mean. | |
Bool_t | _blog |
Boolean for edit the log. | |
Setting and Getting attributs | |
Int_t | getID () |
void | setSeed (UInt_t nval) |
Set the seed of the random generator if one is used. | |
UInt_t | getSeed () |
Get the seed of the random generator if one is used. | |
const char * | getMethodName () |
Get the method name. | |
void | setObservationCovarianceMatrix (TMatrixD &mat) |
Set the observatiton covariance matrix. | |
URANIE::Calibration::TDistanceFunction * | getDistanceFunction () |
Return the distance function. | |
Int_t | getNPar () |
Get the number of parameters to be calibrated. | |
URANIE::DataServer::TDataServer * | getEvaluationTDS () |
Get the tds in which evaluation will be performed. | |
void | setMethodName (const char *str) |
Set the Method name. | |
Detailed Description
Description of the class TCalibration.
Member Enumeration Documentation
◆ ELauncher
Constructor & Destructor Documentation
◆ TCalibration() [1/4]
URANIE::Calibration::TCalibration::TCalibration | ( | URANIE::DataServer::TDataServer * | tds, |
URANIE::Relauncher::TRun * | run, | ||
int | ns = 1 , |
||
Option_t * | option = "" |
||
) |
Default constructor with the runner argument: it contains the assessor to be used.
- Parameters
-
tds : the dataserver that contains no data but only one attribute per parameter to be calibrated run : the runner that contains the assessor to be used on the reference data ns : number of sample to be generated (depending on the method) option : see parseOption below
Referenced by ClassImp().
◆ TCalibration() [2/4]
URANIE::Calibration::TCalibration::TCalibration | ( | URANIE::DataServer::TDataServer * | tds, |
void(*)(Double_t *, Double_t *) | fcn, | ||
const char * | varexpinput, | ||
const char * | varexpoutput, | ||
int | ns = 1 , |
||
Option_t * | option = "" |
||
) |
Default Calibration constructor with the function argument: it contains the assessor to be used.
- Parameters
-
tds : the dataserver that contains no data but only one attribute per parameter to be calibrated fcn : the pointer to a function ns : number of sample to be generated (depending on the method) varexpinput : the input variable for the function in the correct order (both input and parameters) varexpoutput : the output of the function in the correct order
◆ TCalibration() [3/4]
URANIE::Calibration::TCalibration::TCalibration | ( | URANIE::DataServer::TDataServer * | tds, |
const char * | fcn, | ||
const char * | varexpinput, | ||
const char * | varexpoutput, | ||
int | ns = 1 , |
||
Option_t * | option = "" |
||
) |
Default Calibration constructor with the function argument: it contains the assessor to be used.
- Parameters
-
tds : the dataserver that contains no data but only one attribute per parameter to be calibrated fcn : the name of the function ns : number of sample to be generated (depending on the method) varexpinput : the input variable for the function in the correct order (both input and parameters) varexpoutput : the output of the function in the correct order
◆ TCalibration() [4/4]
URANIE::Calibration::TCalibration::TCalibration | ( | URANIE::DataServer::TDataServer * | tds, |
URANIE::Launcher::TCode * | fcode, | ||
int | ns = 1 , |
||
const char * | option = "" |
||
) |
Default Calibration constructor with the code argument: it contains the assessor to be used.
- Parameters
-
tds : the dataserver that contains no data but only one attribute per parameter to be calibrated code : the code object that will be runned ns : number of sample to be generated (depending on the method)
◆ ~TCalibration()
|
virtual |
Default destructor.
Referenced by ClassImp().
Member Function Documentation
◆ changeLog()
|
inline |
References _blog.
◆ checkCanvasCreation()
|
protected |
Create a canvas if needed.
Referenced by ClassImp(), ClassImp(), and ClassImp().
◆ checkReference()
void URANIE::Calibration::TCalibration::checkReference | ( | URANIE::DataServer::TDataServer * | tdsRef, |
const char * | input, | ||
const char * | output, | ||
const char * | weight | ||
) |
Check the consistency of the formation provided.
Referenced by ClassImp().
◆ checktdsParContent()
|
protectedpure virtual |
◆ computeAPosterioriForDistribution()
|
protected |
Compute the a posteriori residual for many-solutions method.
Referenced by ClassImp(), ClassImp(), and URANIE::Calibration::TABC::posteriorToPar().
◆ computeParameters()
|
protectedpure virtual |
internal method in which the estimation is performed for all inheriting classes
Implemented in URANIE::Calibration::TLinearBayesian, URANIE::Calibration::TMetropHasting, URANIE::Calibration::TMinimisation, URANIE::Calibration::TPMCABC, and URANIE::Calibration::TRejectionABC.
Referenced by ClassImp().
◆ drawParameters()
|
virtual |
brief Draws the parameters (only skeleton, at this level it is empty)
- Parameters
-
sTitre title of the plots if specified variable list of variables that should be plotted select selection pattern, if this is requested and possible option possible option for this plot
Reimplemented in URANIE::Calibration::TLinearBayesian, and URANIE::Calibration::TMetropHasting.
Referenced by ClassImp().
◆ drawResidues()
void URANIE::Calibration::TCalibration::drawResidues | ( | TString | sTitre, |
const char * | variable = "*" , |
||
const char * | select = "1>0" , |
||
Option_t * | option = "" |
||
) |
brief Draws the residuals meaning the difference between the reference and the estimation a priori and a posteriori Depending whether the method use point-wise or distribution-wise the apriori and a posteriori estimatiton are :
- from a single point for TMinimisation: initialisaiton for a priori and result for a posteriori
- the mode and mean for TLinearBayesian as the hypothesis are gaussian prior and analytical posterior
- the mode from TMetropHasting for a prior and the mean_of the a posteriorie parameters distributions, or the MAP (mode a posteriori) estimated from an internal smoothing
- Parameters
-
sTitre title of the plots if specified variable list of variables that should be plotted select selection pattern, if this is requested (on the number of events from the reference for instance or with respect to input value for diagnostic) option possible option for this plot
- "nonewcanvas": don't create a new canvas, but use the one active
- "apriori": draw only a priori residuals (default is both)
- "aposteriori": draw only a posteriori residuals (default is both)
- "vertical" : if there are several parameters to be shown put them on top of another instead of side by side
Referenced by ClassImp().
◆ estimateCustomResidues()
void URANIE::Calibration::TCalibration::estimateCustomResidues | ( | string | resName, |
int | n_theta, | ||
double * | theta | ||
) |
Referenced by ClassImp().
◆ estimateParameters()
void URANIE::Calibration::TCalibration::estimateParameters | ( | Option_t * | option = "" | ) |
Referenced by ClassImp().
◆ getDistanceFunction()
|
inline |
Return the distance function.
References _dFunc.
◆ getEvaluationTDS()
|
inline |
Get the tds in which evaluation will be performed.
References _tdsEval.
◆ getID()
|
inline |
Referenced by ClassImp(), ClassImp(), and ClassImp().
◆ getLog()
|
inline |
References _blog.
◆ getMethodName()
|
inline |
Get the method name.
References _sMethodName.
◆ getNPar()
|
inline |
Get the number of parameters to be calibrated.
- Returns
- The number of parameters ( _nPar )
References _nPar.
◆ getSeed()
|
inline |
Get the seed of the random generator if one is used.
References _nSeed.
◆ initInputs()
|
protected |
Initialise some common inputs.
Referenced by ClassImp().
◆ initResults()
|
protected |
Initialise some common inputs.
Referenced by ClassImp().
◆ parseOption()
|
protectedvirtual |
Read the possible options.
Possible options are (common to all methods)
- "savealleval": keep all estimation in the _tdsEval (Extremely dangerous as it will keep _nIter branches with _nObs estimations. This option might slow down the process.
- "usematrix" : option use to specify that computation is done with matrices instead of vector<vector<double> >. Shoud be used only if one is using an home-made TDistanceFunction
Reimplemented in URANIE::Calibration::TMetropHasting, and URANIE::Calibration::TMinimisation.
Referenced by ClassImp(), ClassImp(), ClassImp(), URANIE::Calibration::TABC::TABC(), URANIE::Calibration::TABC::TABC(), and URANIE::Calibration::TABC::TABC().
◆ printLog()
|
virtual |
Reimplemented in URANIE::Calibration::TLinearBayesian, URANIE::Calibration::TMetropHasting, and URANIE::Calibration::TMinimisation.
Referenced by ClassImp().
◆ setDistanceAndReference() [1/2]
|
virtual |
Set the distance function and some needed informations.
- Parameters
-
funcName name of the distance function chosen among the already implemented ones: - "LS" for least square
- "weighterLS" for weighted least square
- "relativeLS" for relative least square
- "L1" for L1 norm
- "Mahalanobis" for Mahalanobis distance function
tdsRef : the dataserver that contains all needed information detailled below - input: the input attributes used of the assessors in run
- reference: the reference attributes that will be used to compared the newly done estimations for every iterations
- weight: a weight to reweight every event, one-by-one (an experimental uncertainty for instance)
Reimplemented in URANIE::Calibration::TLinearBayesian, and URANIE::Calibration::TMetropHasting.
Referenced by ClassImp(), ClassImp(), and ClassImp().
◆ setDistanceAndReference() [2/2]
|
virtual |
Set the distance function and some needed informations.
- Parameters
-
distFunc a pointer to a TDistanceFunction object (not usual, recommended only when dealing with a home-made distance unction compiled on the spot) tdsRef : the dataserver that contains all needed information detailled below - input: the input attributes used of the assessors in run
- reference: the reference attributes that will be used to compared the newly done estimations for every iterations
- weight: a weight to reweight every event, one-by-one (an experimental uncertainty for instance)
Reimplemented in URANIE::Calibration::TLinearBayesian, and URANIE::Calibration::TMetropHasting.
◆ setLog()
|
inline |
References _blog.
◆ setMethodName()
|
inlineprotected |
Set the Method name.
References _sMethodName.
Referenced by URANIE::Calibration::TABC::checktdsParContent(), ClassImp(), ClassImp(), ClassImp(), and URANIE::Calibration::TABC::initABC().
◆ setObservationCovarianceMatrix()
void URANIE::Calibration::TCalibration::setObservationCovarianceMatrix | ( | TMatrixD & | mat | ) |
Set the observatiton covariance matrix.
- Parameters
-
mat : a _nObs * _nObs covariance matrix
Referenced by ClassImp().
◆ setSeed()
|
inline |
Set the seed of the random generator if one is used.
References _nSeed.
◆ unsetLog()
|
inline |
References _blog.
Member Data Documentation
◆ _bdontKeepAgreement
|
protected |
Remove the agreement attribute from the tdsPar object.
Referenced by ClassImp().
◆ _blog
|
protected |
Boolean for edit the log.
Referenced by changeLog(), URANIE::Calibration::TABC::checktdsParContent(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), URANIE::Calibration::TABC::computeABC(), URANIE::Calibration::TRejectionABC::computeParameters(), getLog(), setLog(), URANIE::Calibration::TABC::TABC(), unsetLog(), URANIE::Calibration::TABC::~TABC(), and URANIE::Calibration::TRejectionABC::~TRejectionABC().
◆ _bsaveAll
|
protected |
Whether all evaluations should be saved, not only a priori and a posteriori.
Referenced by ClassImp().
◆ _buseMatrix
|
protected |
Use matrix instead of vectors in the Distance Function.
Referenced by ClassImp().
◆ _buseMode
|
protected |
Use Mode instead of Mean.
Referenced by ClassImp().
◆ _canvas
|
protected |
Canvas object to deal with.
Referenced by ClassImp(), ClassImp(), and ClassImp().
◆ _code
URANIE::Launcher::TCode* URANIE::Calibration::TCalibration::_code |
The tcode.
Referenced by ClassImp().
◆ _dFunc
|
protected |
Pointer to chosen distance function.
Referenced by ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), URANIE::Calibration::TABC::computeABC(), getDistanceFunction(), and URANIE::Calibration::TABC::setGaussianNoise().
◆ _drawingGarbageCollector
|
protected |
Garbage collector for prints.
Referenced by ClassImp(), and ClassImp().
◆ _evTuple
|
protected |
Pointer to the eval ntuple.
Referenced by ClassImp().
◆ _listOfParameters
|
protected |
List of the parameters to be calibrated.
Referenced by URANIE::Calibration::TABC::checktdsParContent(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), URANIE::Calibration::TABC::computeABCscore(), and URANIE::Calibration::TABC::posteriorToPar().
◆ _mObsCovMat
|
protected |
Observation Covariance matrix.
Referenced by ClassImp(), and ClassImp().
◆ _nIterMax
|
protected |
The maximum number of iteration allowed (meaning total number of code estimation is _nIterMax * _nObs)
Referenced by ClassImp(), ClassImp(), and URANIE::Calibration::TRejectionABC::computeParameters().
◆ _nLauncher
ELauncher URANIE::Calibration::TCalibration::_nLauncher |
The type of launcher.
Referenced by ClassImp().
◆ _nObs
|
protected |
The number of observations in the reference database.
Referenced by ClassImp(), and ClassImp().
◆ _nPar
|
protected |
Dimension of the parameters.
Referenced by URANIE::Calibration::TABC::checktdsParContent(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), URANIE::Calibration::TABC::computeABC(), URANIE::Calibration::TABC::computeABCscore(), getNPar(), URANIE::Calibration::TABC::posteriorToPar(), and URANIE::Calibration::TABC::setUpABC().
◆ _nSam
|
protected |
The number of sample in a posteriori distributions.
Referenced by ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), and URANIE::Calibration::TRejectionABC::computeParameters().
◆ _nSeed
|
protected |
The seed of the random generator.
Referenced by ClassImp(), ClassImp(), ClassImp(), ClassImp(), getSeed(), setSeed(), and URANIE::Calibration::TABC::setUpABC().
◆ _nVar
|
protected |
Dimension of the output and references to be compared with.
Referenced by ClassImp().
◆ _outputName
|
protected |
The output name.
Referenced by ClassImp().
◆ _pFunction
void(* URANIE::Calibration::TCalibration::_pFunction) (double *, double *) |
Function pointer.
Referenced by ClassImp().
◆ _referenceName
|
protected |
The reference name.
Referenced by ClassImp().
◆ _run
URANIE::Relauncher::TRun* URANIE::Calibration::TCalibration::_run |
Pointer to the runner to be used.
Referenced by ClassImp().
◆ _sEI
TString URANIE::Calibration::TCalibration::_sEI |
The Name of input.
Referenced by ClassImp().
◆ _sEO
TString URANIE::Calibration::TCalibration::_sEO |
The Name of output.
Referenced by ClassImp().
◆ _sFunctionName
TString URANIE::Calibration::TCalibration::_sFunctionName |
The Name of the evaluatuor.
Referenced by ClassImp().
◆ _sMethodName
|
protected |
The method name.
Referenced by ClassImp(), ClassImp(), ClassImp(), getMethodName(), and setMethodName().
◆ _tdsEval
URANIE::DataServer::TDataServer* URANIE::Calibration::TCalibration::_tdsEval |
TDS containing a priori / a posteriori evaluations.
Referenced by ClassImp(), ClassImp(), ClassImp(), and getEvaluationTDS().
◆ _tdsObs
URANIE::DataServer::TDataServer* URANIE::Calibration::TCalibration::_tdsObs |
TDS containing observations used for calibration.
Referenced by ClassImp(), ClassImp(), and ClassImp().
◆ _tdsPar
URANIE::DataServer::TDataServer* URANIE::Calibration::TCalibration::_tdsPar |
TDS containing parameters properties (parameters that should be calibrated)
Referenced by URANIE::Calibration::TABC::checktdsParContent(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), ClassImp(), URANIE::Calibration::TABC::computeABC(), URANIE::Calibration::TABC::computeABCscore(), URANIE::Calibration::TRejectionABC::computeParameters(), URANIE::Calibration::TMetropHasting::getDefaultCut(), URANIE::Calibration::TABC::posteriorToPar(), and URANIE::Calibration::TABC::setUpABC().
◆ _vatt
vector<URANIE::DataServer::TStochasticAttribute*> URANIE::Calibration::TCalibration::_vatt |
internal vector of stochastic attribute for some methods
Referenced by URANIE::Calibration::TABC::checktdsParContent(), ClassImp(), ClassImp(), ClassImp(), and URANIE::Calibration::TABC::computeABC().
◆ _voutName
|
protected |
The output names.
Referenced by ClassImp(), ClassImp(), and ClassImp().
◆ _vrefName
|
protected |
The reference names.
Referenced by ClassImp(), ClassImp(), and ClassImp().
◆ _weightName
|
protected |
The weight name.
Referenced by ClassImp().