English Français

Documentation / Manuel développeur

Modules disponibles

Calibration,  DataServer,  Launcher,  MetaModelOptim,  Modeler,  Optimizer,  ReLauncher,  Reliability,  ReOptimizer,  Sampler,  Sensitivity,  UncertModeler,  XmlProblem,   Uranie / Calibration: URANIE::Calibration::TPMCABC Class Reference
Uranie / Calibration  v4.11.0
/* @license-end */
URANIE::Calibration::TPMCABC Class Reference

#include <TPMCABC.h>

Inheritance diagram for URANIE::Calibration::TPMCABC:
Collaboration diagram for URANIE::Calibration::TPMCABC:

Public Member Functions

void initPMCABC ()
 
void generateNewSample ()
 
double pdfGaussianMultivariate (TMatrixD X, TMatrixD MU, TMatrixD Sigma)
 
int getNSteps ()
 
URANIE::DataServer::TDataServer * getTdsStep ()
 
void setThresholds (vector< double > vectTh)
 
void setNSteps (int steps)
 
Constructor and Destructor
 TPMCABC (URANIE::DataServer::TDataServer *tds, URANIE::Relauncher::TRun *run, 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="")
 
 TPMCABC (URANIE::DataServer::TDataServer *tds, const char *fcn, const char *varexpinput, const char *varexpoutput, int ns=100, Option_t *option="")
 
 TPMCABC (URANIE::DataServer::TDataServer *tds, URANIE::Launcher::TCode *fcode, int ns=1, Option_t *option="")
 
virtual ~TPMCABC ()
 Default destructor. More...
 
PMC ABC function
virtual void setDistance (const char *distName, URANIE::DataServer::TDataServer *tdsRef, const char *input, const char *reference, const char *weight="")
 Set the distance function and some needed informations. More...
 
virtual void setDistance (URANIE::Calibration::TDistanceLikelihoodFunction *distFunc, URANIE::DataServer::TDataServer *tdsRef, const char *input, const char *reference, const char *weight="")
 Set the distance function and some needed informations. More...
 
void computeParameters (Option_t *option="")
 Generate the sample. More...
 
- Public Member Functions inherited from URANIE::Calibration::TABC
 TABC (URANIE::DataServer::TDataServer *tds, URANIE::Relauncher::TRun *run, int ns=100, Option_t *option="")
 Default ABC constructor with the runner argument: it contains the assessor to be used. More...
 
 TABC (URANIE::DataServer::TDataServer *tds, void(*fcn)(Double_t *, Double_t *), const char *varexpinput, const char *varexpoutput, int ns=100, Option_t *option="")
 Default ABC constructor with the function argument: it contains the assessor to be used
More...
 
 TABC (URANIE::DataServer::TDataServer *tds, const char *fcn, const char *varexpinput, const char *varexpoutput, int ns=100, Option_t *option="")
 Default ABC constructor with the function argument: it contains the assessor to be used. More...
 
 TABC (URANIE::DataServer::TDataServer *tds, URANIE::Launcher::TCode *fcode, int ns=1, Option_t *option="")
 Default ABC constructor with the code argument: it contains the assessor to be used. More...
 
virtual ~TABC ()
 Default destructor. More...
 
void initABC ()
 
void setUpABC ()
 
void computeABC (int nEval)
 
void computeABCscore (Double_t newEpsilon)
 
void posteriorToPar ()
 
void checktdsParContent ()
 
void setGaussianNoise (const char *stdname)
 
void setPercentile (Double_t eps)
 Set the percentile. More...
 
URANIE::DataServer::TDataServer * getTdsPosterior ()
 Get the posterior tds. More...
 
double getThreshold ()
 Get the posterior tds. More...
 
int getNEval ()
 
- Public Member Functions inherited from 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. More...
 
 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. More...
 
 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. More...
 
 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. More...
 
virtual ~TCalibration ()
 Default destructor. More...
 
virtual void setDistanceAndLikelihood (const char *Name, URANIE::DataServer::TDataServer *tdsRef, const char *input, const char *reference, const char *weight="")
 Set the distance or likelihood function and some needed informations. More...
 
virtual void setDistanceAndLikelihood (URANIE::Calibration::TDistanceLikelihoodFunction *Func, URANIE::DataServer::TDataServer *tdsRef, const char *input, const char *reference, const char *weight="")
 Set the distance of likelihood function and some needed informations. More...
 
void estimateParameters (Option_t *option="")
 
void estimateCustomResiduals (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. More...
 
virtual void drawParameters (TString sTitre, const char *variable="*", Option_t *option="")
 
void drawResiduals (TString sTitre, const char *variable="*", const char *select="1>0", Option_t *option="")
 
void setLog ()
 
void unsetLog ()
 
void changeLog ()
 
Bool_t getLog ()
 
virtual void printLog (Option_t *option="")
 
Int_t getID ()
 
void setSeed (UInt_t nval)
 Set the seed of the random generator if one is used. More...
 
UInt_t getSeed ()
 Get the seed of the random generator if one is used. More...
 
const char * getMethodName ()
 Get the method name. More...
 
void setObservationCovarianceMatrix (TMatrixD &mat)
 Set the observatiton covariance matrix. More...
 
URANIE::Calibration::TDistanceLikelihoodFunctiongetDistanceLikelihoodFunction ()
 Return the distance or likelihood function. More...
 
Int_t getNPar ()
 Get the number of parameters to be calibrated. More...
 
URANIE::DataServer::TDataServer * getEvaluationTDS ()
 Get the tds in which evaluation will be performed. More...
 

Public Attributes

URANIE::DataServer::TDataServer * _tdsParStep
 Pointer of the intermediate TDS. More...
 
vector< double > _frequencies
 Vector of the frequencies for sampling. More...
 
vector< double > _indices
 Vector of possible indices for sampling. More...
 
vector< double > _vEpsilon
 Vector of the thresholds. More...
 
TMatrixD _Sigmat
 Sqrt covariance matrix. More...
 
int _kStep
 Iterator of steps. More...
 
int _nSteps
 Number of steps. More...
 
- Public Attributes inherited from URANIE::Calibration::TABC
vector< double > _values
 
URANIE::DataServer::TDataServer * _tdsPosterior
 TDS containing posterior members for calibration. More...
 
- Public Attributes inherited from URANIE::Calibration::TCalibration
URANIE::DataServer::TDataServer * _tdsPar
 TDS containing parameters properties (parameters that should be calibrated) More...
 
URANIE::DataServer::TDataServer * _tdsObs
 TDS containing observations used for calibration. More...
 
URANIE::DataServer::TDataServer * _tdsEval
 TDS containing a priori / a posteriori evaluations. More...
 
ELauncher _nLauncher
 The type of launcher. More...
 
TString _sFunctionName
 The Name of the evaluatuor. More...
 
TString _sEI
 The Name of input. More...
 
TString _sEO
 The Name of output. More...
 
URANIE::Launcher::TCode * _code
 The tcode. More...
 
URANIE::Relauncher::TRun * _run
 Pointer to the runner to be used. More...
 
void(* _pFunction )(double *, double *)
 Function pointer. More...
 
vector< URANIE::DataServer::TStochasticAttribute * > _vatt
 internal vector of stochastic attribute for some methods More...
 

Additional Inherited Members

- Public Types inherited from URANIE::Calibration::TCalibration
enum  ELauncher { kCode, kFunction, kRun, kUnknown }
 
- Protected Member Functions inherited from URANIE::Calibration::TCalibration
void checkCanvasCreation (bool newcan)
 Create a canvas if needed. More...
 
void initInputs ()
 Initialise some common inputs. More...
 
void initResults (vector< string > *ParsedLines)
 Initialise some common inputs. More...
 
void computeAPosterioriForDistribution (URANIE::DataServer::TDataServer *tds_chain_i)
 Compute the a posteriori residual for many-solutions method. More...
 
virtual void parseOption (Option_t *option="")
 Read the possible options. More...
 
void setMethodName (const char *str)
 Set the Method name. More...
 
- Protected Attributes inherited from URANIE::Calibration::TABC
double _threshold
 
Int_t _kPosterior
 
Int_t _kEval
 
TRandom3 * _rand
 
Bool_t _boolEpsilon
 
Double_t _Epsilon
 
- Protected Attributes inherited from URANIE::Calibration::TCalibration
URANIE::Calibration::TDistanceLikelihoodFunction_dFunc
 Pointer to chosen distance or likelihood function. More...
 
URANIE::DataServer::TDSNtupleD * _evTuple
 Pointer to the eval ntuple. More...
 
TList * _listOfParameters
 List of the parameters to be calibrated. More...
 
TCanvas * _canvas
 Canvas object to deal with. More...
 
TObjArray * _drawingGarbageCollector
 Garbage collector for prints. More...
 
int _nSam
 The number of sample in a posteriori distributions. More...
 
int _nObs
 The number of observations in the reference database. More...
 
int _nIterMax
 The maximum number of iteration allowed (meaning total number of code estimation is _nIterMax * _nObs) More...
 
int _nPar
 Dimension of the parameters. More...
 
int _nVar
 Dimension of the output and references to be compared with. More...
 
int _nSeed = 0
 The seed of the random generator (initialized to 0 = random seed) More...
 
TString _sMethodName
 The method name. More...
 
TString _referenceName
 The reference name. More...
 
TString _outputName
 The output name. More...
 
vector< string > _vrefName
 The reference names. More...
 
vector< string > _voutName
 The output names. More...
 
TString _weightName
 The weight name. More...
 
TMatrixD _mObsCovMat
 Observation Covariance matrix. More...
 
bool _buseMatrix
 Use matrix instead of vectors in the TDistanceLikelihoodFunction. More...
 
bool _bsaveAll
 Whether all evaluations should be saved, not only a priori and a posteriori. More...
 
bool _bdontKeepAgreement
 Remove the agreement attribute from the tdsPar object. More...
 
bool _buseMode
 Use Mode instead of Mean. More...
 
Bool_t _blog
 Boolean for edit the log. More...
 

Constructor & Destructor Documentation

◆ TPMCABC() [1/4]

URANIE::Calibration::TPMCABC::TPMCABC ( URANIE::DataServer::TDataServer *  tds,
URANIE::Relauncher::TRun *  run,
int  ns = 1,
Option_t *  option = "" 
)

Constructor of PMC ABC where nABC is set to be the number of the produced a posteriori sample.

Parameters
tdsthe pointer of the TDataServer. It must contains attribuutes that inherit from TStochasticAttribute
runthe runner that would be used to produce evaluations
nABCsize of a posteriori sample [100 by default], by default also size of the sample evaluated at each bloc,

Referenced by ClassImp().

◆ TPMCABC() [2/4]

URANIE::Calibration::TPMCABC::TPMCABC ( URANIE::DataServer::TDataServer *  tds,
void(*)(Double_t *, Double_t *)  fcn,
const char *  varexpinput,
const char *  varexpoutput,
int  ns = 100,
Option_t *  option = "" 
)

Constructor of PMC ABC where nABC is set to be the number of the produced a posteriori sample.

Parameters
tdsthe pointer of the TDataServer. It must contains attribuutes that inherit from TStochasticAttribute
fcnthe function that would be used to produce evaluations
nABCsize of a posteriori sample [100 by default], by default also size of the sample evaluated at each bloc,

◆ TPMCABC() [3/4]

URANIE::Calibration::TPMCABC::TPMCABC ( URANIE::DataServer::TDataServer *  tds,
const char *  fcn,
const char *  varexpinput,
const char *  varexpoutput,
int  ns = 100,
Option_t *  option = "" 
)

Constructor of PMC ABC where nABC is set to be the number of the produced a posteriori sample.

Parameters
tdsthe pointer of the TDataServer. It must contains attribuutes that inherit from TStochasticAttribute
fcnthe function that would be used to produce evaluations
nABCsize of a posteriori sample [100 by default], by default also size of the sample evaluated at each bloc,

◆ TPMCABC() [4/4]

URANIE::Calibration::TPMCABC::TPMCABC ( URANIE::DataServer::TDataServer *  tds,
URANIE::Launcher::TCode *  fcode,
int  ns = 1,
Option_t *  option = "" 
)

Constructor of PMC ABC where nABC is set to be the number of the produced a posteriori sample.

Parameters
tdsthe pointer of the TDataServer. It must contains attribuutes that inherit from TStochasticAttribute
codethe code that would be used to produce evaluations
nABCsize of a posteriori sample [100 by default], by default also size of the sample evaluated at each bloc,

◆ ~TPMCABC()

virtual URANIE::Calibration::TPMCABC::~TPMCABC ( )
virtual

Default destructor.

Referenced by ClassImp().

Member Function Documentation

◆ computeParameters()

void URANIE::Calibration::TPMCABC::computeParameters ( Option_t *  option = "")
virtual

Generate the sample.

Parameters
optionpossble options are
  • "clean": remove internal branche from the tdsPar object at the end
  • "gd": another implementation of this algorithm

Implements URANIE::Calibration::TCalibration.

Referenced by ClassImp().

◆ generateNewSample()

void URANIE::Calibration::TPMCABC::generateNewSample ( )

Referenced by ClassImp().

◆ getNSteps()

int URANIE::Calibration::TPMCABC::getNSteps ( )
inline

References _nSteps.

◆ getTdsStep()

URANIE::DataServer::TDataServer* URANIE::Calibration::TPMCABC::getTdsStep ( )
inline

References _tdsParStep.

◆ initPMCABC()

void URANIE::Calibration::TPMCABC::initPMCABC ( )

Referenced by ClassImp().

◆ pdfGaussianMultivariate()

double URANIE::Calibration::TPMCABC::pdfGaussianMultivariate ( TMatrixD  X,
TMatrixD  MU,
TMatrixD  Sigma 
)

Referenced by ClassImp().

◆ setDistance() [1/2]

virtual void URANIE::Calibration::TPMCABC::setDistance ( const char *  distName,
URANIE::DataServer::TDataServer *  tdsRef,
const char *  input,
const char *  reference,
const char *  weight = "" 
)
virtual

Set the distance function and some needed informations.

Parameters
distNamename of the distance function chosen among the already implemented ones:
  • "LS" for least squares distance function
  • "weighterLS" for weighted least squares distance function
  • "relativeLS" for relative least squares distance function
  • "L1" for L1 distance function
  • "Mahalanobis" for Mahalanobis distance function
tdsRef: the dataserver that contains all needed information detailled below
inputthe input attributes used of the assessors in run
referencethe reference attributes that will be used to compared the newly done estimations for every iterations
weighta weight to reweight every event, one-by-one (an experimental uncertainty for instance)

Reimplemented from URANIE::Calibration::TABC.

Referenced by ClassImp().

◆ setDistance() [2/2]

virtual void URANIE::Calibration::TPMCABC::setDistance ( URANIE::Calibration::TDistanceLikelihoodFunction distFunc,
URANIE::DataServer::TDataServer *  tdsRef,
const char *  input,
const char *  reference,
const char *  weight = "" 
)
virtual

Set the distance function and some needed informations.

Parameters
distFunca pointer to a TDistanceLikelihoodFunction object (not usual, recommended only when dealing with a home-made distance or likelihood unction compiled on the spot)
tdsRef: the dataserver that contains all needed information detailled below
inputthe input attributes used of the assessors in run
referencethe reference attributes that will be used to compared the newly done estimations for every iterations
weighta weight to reweight every event, one-by-one (an experimental uncertainty for instance)

Reimplemented from URANIE::Calibration::TABC.

◆ setNSteps()

void URANIE::Calibration::TPMCABC::setNSteps ( int  steps)
inline

References _nSteps.

◆ setThresholds()

void URANIE::Calibration::TPMCABC::setThresholds ( vector< double >  vectTh)
inline

References _nSteps, and _vEpsilon.

Member Data Documentation

◆ _frequencies

vector<double> URANIE::Calibration::TPMCABC::_frequencies

Vector of the frequencies for sampling.

Referenced by ClassImp().

◆ _indices

vector<double> URANIE::Calibration::TPMCABC::_indices

Vector of possible indices for sampling.

Referenced by ClassImp().

◆ _kStep

int URANIE::Calibration::TPMCABC::_kStep

Iterator of steps.

Referenced by ClassImp().

◆ _nSteps

int URANIE::Calibration::TPMCABC::_nSteps

Number of steps.

Referenced by ClassImp(), getNSteps(), setNSteps(), and setThresholds().

◆ _Sigmat

TMatrixD URANIE::Calibration::TPMCABC::_Sigmat

Sqrt covariance matrix.

Referenced by ClassImp().

◆ _tdsParStep

URANIE::DataServer::TDataServer* URANIE::Calibration::TPMCABC::_tdsParStep

Pointer of the intermediate TDS.

Referenced by ClassImp(), and getTdsStep().

◆ _vEpsilon

vector<double> URANIE::Calibration::TPMCABC::_vEpsilon

Vector of the thresholds.

Referenced by ClassImp(), and setThresholds().