JG ROOT Tools libraries
version 5.0 - august 2014
|
#include <RFitBase2D.hh>
Public Member Functions | |
RFitBase2D () | |
RFitBase2D (TH2 *hptr, TH2 *herr=NULL) | |
RFitBase2D (TH2 *hptr, const RFitData2D &fit_data) | |
RFitBase2D (TH2 *hptr, TH2 *herr, const RFitData2D &fit_data) | |
RFitBase2D (const RFitBase2D &original) | |
virtual | ~RFitBase2D () |
virtual void | SetAngles3D (const Double_t theta, const Double_t phi) |
virtual void | Reset () |
virtual void | InitMode () |
virtual void | SetOptions (const UInt_t opts) |
virtual void | SetOption (const UInt_t opt, const bool b=true) |
virtual void | SetFitMode (const Int_t mode) |
virtual void | SetFitLimits (const Double_t x1, const Double_t x2, const Double_t y1, const Double_t y2) |
virtual void | SetParValue (const Int_t p, const Double_t val) |
virtual string | GetParName (const Int_t p) const |
virtual void | FixParameter (const Int_t p, const bool b=true) |
TF2 * | GetFitFunction () |
virtual void | SetCalcAll ()=0 |
virtual void | SetCalcNone ()=0 |
virtual void | SetFunction ()=0 |
virtual void | ScaleFunction (const Double_t s)=0 |
virtual void | NormaliseFunction (const Double_t nor=1.) |
virtual void | DrawHisto (const char *opts="", const Double_t zinf=0., const Double_t zsup=0.) |
virtual void | DrawFunction (const char *opts="") |
virtual void | DrawFctResult (TVirtualPad *pad, const ROptionString &opts="") |
virtual void | DrawDifResult (TVirtualPad *pad, const ROptionString &opts="") |
virtual void | DrawFitResult (TVirtualPad *pad, const ROptionString &opts="") |
virtual void | FillFunctionHisto (TH2 *hptr) |
virtual TH2 * | GetFunctionHisto (const char *name) |
virtual TH2 * | GetDifferenceHisto (const char *name) |
virtual TH2 * | GetSqrtHisto (const char *name) |
virtual TH2 * | GetSqrtPosHisto (const char *name) |
virtual TH2 * | GetSqrtNegHisto (const char *name) |
virtual Double_t | Eval (const Double_t x, const Double_t y) |
virtual void | GetRandom (Double_t &x, Double_t &y) |
virtual TH2 * | GetRandomHisto (const char *name, const Int_t n) |
virtual void | FillRandomHisto (TH2 *hptr, const Int_t n) |
virtual void | Preset () |
virtual Double_t | Fit (const char *opts="") |
virtual string | GetFitText () const =0 |
virtual bool | PrintFit (const string &fname) const |
virtual bool | PrintFit (FILE *fptr=stdout) const |
virtual bool | WriteParam (const string &fname) const |
virtual bool | WriteParam (FILE *fptr=stdout) const |
virtual bool | WriteOutput (const string &fname) const |
virtual bool | WriteOutput (FILE *fptr=stdout) const |
virtual RFitData2D * | CreateFitData ()=0 |
virtual RFitData2D * | GetFitData () |
virtual void | SetFitData (const RFitData2D *fit_data) |
ClassDef (RFitBase2D, 0) | |
![]() | |
RFitData2D () | |
RFitData2D (const RFitData2D &original) | |
RFitData2D & | operator= (const RFitData2D &original) |
virtual | ~RFitData2D () |
virtual void | GetFitLimits (Double_t &x1, Double_t &x2, Double_t &y1, Double_t &y2) const |
virtual Double_t | GetFitYmin () const |
virtual Double_t | GetFitYmax () const |
virtual void | SetPlotLimits (const Double_t x1, const Double_t x2, const Double_t y1, const Double_t y2) |
virtual void | GetPlotLimits (Double_t &x1, Double_t &x2, Double_t &y1, Double_t &y2) const |
virtual Double_t | GetPlotYmin () const |
virtual Double_t | GetPlotYmax () const |
virtual Bool_t | IsLogZ () const |
ClassDef (RFitData2D, 0) | |
![]() | |
RFitData1D () | |
RFitData1D (const RFitData1D &original) | |
RFitData1D & | operator= (const RFitData1D &original) |
virtual | ~RFitData1D () |
virtual void | SetFitLimits (Double_t x1, Double_t x2) |
virtual void | GetFitLimits (Double_t &x1, Double_t &x2) const |
virtual Double_t | GetFitXmin () const |
virtual Double_t | GetFitXmax () const |
virtual void | SetPlotLimits (Double_t x1, Double_t x2) |
virtual void | GetPlotLimits (Double_t &x1, Double_t &x2) const |
virtual Double_t | GetPlotXmin () const |
virtual Double_t | GetPlotXmax () const |
virtual Bool_t | IsLogX () const |
virtual Bool_t | IsLogY () const |
ClassDef (RFitData1D, 0) | |
![]() | |
RFitDataBase () | |
RFitDataBase (const RFitDataBase &original) | |
RFitDataBase & | operator= (const RFitDataBase &original) |
virtual | ~RFitDataBase () |
virtual UInt_t | GetFitOptions () const |
virtual Int_t | GetFitMode () const |
virtual Int_t | GetParNumber () const |
virtual Int_t | GetFixNumber () const |
virtual Double_t | GetParValue (const Int_t p) const |
virtual Double_t | GetParError (const Int_t p) const |
virtual Double_t | GetCovariance (const Int_t p, const Int_t q) const |
virtual bool | IsFixParameter (const Int_t p) const |
virtual Int_t | GetFitResult () const |
virtual Double_t | GetFitChi2 () const |
virtual Int_t | GetFitNDF () const |
virtual Double_t | GetFitFCN () const |
virtual Double_t | GetFitEDM () const |
virtual Double_t | GetFitErrDef () const |
virtual Int_t | SaveFitData (const string &fname) const =0 |
virtual Int_t | LoadFitData (const string &fname)=0 |
ClassDef (RFitDataBase, 0) | |
Static Public Member Functions | |
static bool | Zero (const Double_t val) |
static UInt_t | GetStaticOptions () |
static bool | GetStaticOption (const UInt_t opt) |
static Int_t | GetStaticParNumber () |
static void | SetFctLineAtt (const TAttLine att) |
static void | SetFctLineAtt (const Color_t c, const Style_t s, const Width_t w) |
Protected Member Functions | |
void | ClassInit () |
virtual bool | SetHisto (TH2 *hptr, TH2 *herr=NULL) |
![]() | |
virtual Int_t | WriteData (FILE *fp) const |
virtual RFitData2D * | ReadFitData (const string &fname)=0 |
Protected Attributes | |
TH2 * | histo_ptr |
Pointeur sur l'histogramme à fitter. | |
TH2 * | herr1_ptr |
Pointeur sur l'histogramme d'erreur négatif. | |
TH2 * | herr2_ptr |
Pointeur sur l'histogramme d'erreur positif. | |
bool | histo_err |
Indique si l'histo est fitté avec une erreur. | |
string | par_name [50] |
tableau des noms de paramètres | |
Int_t | ix_min |
Borne inférieure du fit en canaux de l'histogramme. | |
Int_t | ix_max |
Borne supérieure du fit en canaux de l'histogramme. | |
Int_t | nx_bin |
Nombre de bins de la zone de fit. | |
Int_t | iy_min |
Borne inférieure du fit en canaux de l'histogramme. | |
Int_t | iy_max |
Borne supérieure du fit en canaux de l'histogramme. | |
Int_t | ny_bin |
Nombre de bins de la zone de fit. | |
TF2 * | fct_ptr |
Pointeur sur la fonction de fit. | |
![]() | |
Double_t | fit_ymin |
Fit limit. | |
Double_t | fit_ymax |
Fit limit. | |
Double_t | plot_ymin |
Plot limit. | |
Double_t | plot_ymax |
Plot limit. | |
Bool_t | plot_logz |
Log scale for plot. | |
![]() | |
Double_t | fit_xmin |
Fit limit. | |
Double_t | fit_xmax |
Fit limit. | |
Double_t | plot_xmin |
Plot limit. | |
Double_t | plot_xmax |
Plot limit. | |
Bool_t | plot_logx |
Log scale for plot. | |
Bool_t | plot_logy |
Log scale for plot. | |
![]() | |
UInt_t | fit_options |
Fit options. | |
Int_t | fit_mode |
Fit mode (Chi2 or Log-likelyhood) | |
Int_t | fit_result |
Fit result. | |
Double_t | fit_chi2 |
Chi2. | |
Int_t | fit_ndf |
Number of degrees of freedom. | |
Double_t | fit_fcn |
Minimized function value (FCN) | |
Double_t | fit_edm |
Estimated distance to minimum. | |
Double_t | fit_err_def |
Error matrix status. | |
Int_t | par_number |
Number of fit parameters (total) | |
Double_t | par_val [50] |
Parameters values. | |
Double_t | par_err [50] |
Uncertainties values. | |
bool | par_fix [50] |
Fix parameters. | |
Double_t | par_cov [50][50] |
Covariance matrix. | |
Static Protected Attributes | |
static Double_t | epsilon = 1.e-12 |
Test du zéro | |
static UInt_t | fit_options = 0 |
Options pour le fit (statique pour être vue dans la fonction de fit) | |
static Int_t | fit_mode = RFitModes::fitChi2 |
Mode de fit (Chi2 ou Log-likelyhood) | |
static Int_t | par_number = 0 |
Nombre de paramètres pour le fit. | |
static Double_t | histo_bin_x = 1. |
Largeur de bin de l'histogramme (pour calcul avec la surface comme paramètre) | |
static Double_t | histo_bin_y = 1. |
Largeur de bin de l'histogramme (pour calcul avec la surface comme paramètre) | |
static TAttLine | latt_histo = TAttLine ( 1, 1, 1 ) |
Attributs de lignes pour tracé de l'histogramme. | |
static TAttLine | latt_error = TAttLine ( 17, 1, 0 ) |
Attributs de lignes pour tracé de l'erreur. | |
static TAttFill | fatt_error = TAttFill ( 17, 1000 ) |
Attributs de remplissage pour tracé de l'erreur. | |
static TAttLine | latt_fct = TAttLine ( 2, 1, 1 ) |
Attributs de lignes pour tracé de la fonction globale. | |
static Double_t | pad_theta = 30. |
Angle de vue pour les tracés 3D (en degrés) | |
static Double_t | pad_phi = 30. |
Angle de vue pour les tracés 3D (en degrés) | |
Private Member Functions | |
GObjectV (RFitBase2D) | |
Additional Inherited Members | |
![]() | |
static Int_t | ReadData (FILE *fp, RFitData2D &fdata) |
![]() | |
static Int_t | ReadData (FILE *fp, RFitData1D &fdata) |
![]() | |
static Int_t | ReadData (FILE *fp, RFitDataBase &fdata) |
Base class for 2D fit classes.
RFitBase2D::RFitBase2D | ( | ) |
Default constructor, used for virtual multiple inheritance.
References ClassInit(), RFitData1D::fit_xmax, RFitData1D::fit_xmin, RFitData2D::fit_ymax, RFitData2D::fit_ymin, histo_bin_x, histo_bin_y, ix_max, ix_min, iy_max, iy_min, nx_bin, and ny_bin.
RFitBase2D::RFitBase2D | ( | TH2 * | hptr, |
TH2 * | herr = NULL |
||
) |
Constructeur.
hptr | pointer to fitted histogram |
herr | pointer to error histogram (default is NULL) |
References ClassInit(), histo_ptr, InitMode(), SetFitLimits(), and SetHisto().
RFitBase2D::RFitBase2D | ( | TH2 * | hptr, |
const RFitData2D & | fit_data | ||
) |
Constructeur avec initialisation du fit.
hptr | pointer to fitted histogram |
fit_data | initialization data |
References ClassInit(), histo_ptr, SetFitData(), and SetHisto().
RFitBase2D::RFitBase2D | ( | TH2 * | hptr, |
TH2 * | herr, | ||
const RFitData2D & | fit_data | ||
) |
Constructeur avec erreurs et initialisation du fit.
hptr | pointer to fitted histogram |
herr | pointer to error histogram |
fit_data | initialization data |
References ClassInit(), histo_ptr, SetFitData(), and SetHisto().
RFitBase2D::RFitBase2D | ( | const RFitBase2D & | original | ) |
|
virtual |
|
private |
Macro from GCpp library that defines the following functions:
|
protected |
Initialization function, called by constructors.
References fct_ptr, herr1_ptr, herr2_ptr, histo_err, histo_ptr, par_name, and RFIT_MAX_PAR.
Referenced by RFitBase2D().
|
inlinestatic |
Test for zero approximation (see static class variable epsilon).
val | tested value |
References epsilon.
Referenced by RGFitGaus2D::PointsToParamComponent(), RGFitGaus2D::PointsToWidgetComponent(), RFitGaus2D::PresetBg(), RGFitGaus2D::RedrawPoints(), RFitGaus2D::SetAbsAmplitude(), RFitGaus2D::SetAbsFactor(), RFitGaus2D::SetAbsSigma1(), and RFitGaus2D::SetAbsSigma2().
|
inlinevirtual |
|
protectedvirtual |
Set the histogram to be fitted, and optionnaly the histogram containing the uncertainty (if not set, the first histogram error is considered by default). The error histogram must have the same binning that the fitted histogram.
hptr | pointer to histogram to fit |
herr | pointer to uncertainty histogram |
References fatt_error, fit_mode, RFitModes::fitLikelyhood, herr1_ptr, herr2_ptr, histo_err, histo_ptr, latt_error, and latt_histo.
Referenced by RFitBase2D(), and RFitGaus2D::RFitGaus2D().
|
virtual |
Reset fit results: parameters, errors and result.
Reimplemented from RFitDataBase.
References par_name, RFitDataBase::Reset(), and RFIT_MAX_PAR.
Referenced by InitMode(), RFitGaus2D::InitMode(), and SetFitData().
|
virtual |
Initialize the fitter data, static or not, when fit options are modified.
Reimplemented in RFitGaus2D.
References RFitDataBase::fit_mode, fit_mode, RFitDataBase::fit_options, fit_options, histo_bin_x, histo_bin_y, histo_ptr, par_number, RFitDataBase::par_number, and Reset().
Referenced by RGFitBase2D::GuiReset(), RFitBase2D(), SetFitData(), and SetOption().
|
inlinevirtual |
Set all options (option bit pattern).
opts | options bit pattern |
Reimplemented in RGFitGaus2D.
References fit_options, and SetOption().
Referenced by SetFitData(), and RGFitGaus2D::SetOptions().
|
virtual |
Set an option status
opt | option (binary mask) |
b | status |
Reimplemented in RGFitGaus2D.
References fit_options, and InitMode().
Referenced by RGFitGaus2D::CommonCorrelToggled(), RGFitGaus2D::CommonSigmaToggled(), RGFitGaus2D::OptCountsToggled(), RGFitGaus2D::OptErrToggled(), RGFitGaus2D::OptModeThetaToggled(), RGFitGaus2D::SetOption(), and SetOptions().
|
inlinestatic |
|
inlinestatic |
Get status of selected options
opt | selected options mask |
References fit_options.
Referenced by RFitGaus2D::DrawEllipse(), Fit(), RFitGaus2D::GetAmplitude(), RFitGaus2D::GetAmplitudeError(), RFitGaus2D::GetCounts(), RFitGaus2D::GetCountsError(), RFitGaus2D::GetEllipse(), RFitGaus2D::GetFitText(), RGFitGaus2D::GetOption(), RFitGaus2D::GetTheta(), RFitGaus2D::InitMode(), RFitGaus2DFunction(), RFitGaus2D::SetAbsAmplitude(), RFitGaus2D::SetAmplitude(), and RFitGaus2D::SetRelativeSigma().
|
inlinestatic |
Get the number of fit parameters.
References par_number.
Referenced by FixParameter(), GetParName(), and SetParValue().
|
inlinevirtual |
Set the fit mode: chi2 minimisation or maximum likelyhood, see namespace RFitModes).
mode | selected mode |
Reimplemented in RGFitBase2D.
References fit_mode, RFitModes::fitChi2, and RFitModes::fitLikelyhood.
Referenced by SetFitData(), and RGFitBase2D::SetFitMode().
|
virtual |
Set the fit limits. They are adjusted to fit with histogram binning. Lower and upper bins are calculated.
x1 | lower X limit |
x2 | upper X limit |
y1 | lower Y limit |
y2 | upper Y limit |
Reimplemented from RFitData2D.
Reimplemented in RGFitBase2D, RGFitGaus2D, and RFitGaus2D.
References RFitData1D::fit_xmax, RFitData1D::fit_xmin, RFitData2D::fit_ymax, RFitData2D::fit_ymin, histo_bin_x, histo_bin_y, histo_ptr, ix_max, ix_min, iy_max, iy_min, nx_bin, and ny_bin.
Referenced by RGFitBase2D::FitXInfLimitTextChanged(), RGFitBase2D::FitXSupLimitTextChanged(), RGFitBase2D::FitYInfLimitTextChanged(), RGFitBase2D::FitYSupLimitTextChanged(), RFitBase2D(), SetFitData(), RFitGaus2D::SetFitLimits(), and RGFitBase2D::SetFitLimits().
|
inlinevirtual |
Initialize a fit parameter.
p | parameter number |
val | parameter vaue |
References GetStaticParNumber(), and RFitDataBase::par_val.
|
inlinevirtual |
Get fit parameter name.
p | parameter number |
References GetStaticParNumber(), and par_name.
Referenced by RFitGaus2D::GetFitText().
|
virtual |
Fix (or release) a fit parameter.
p | parameter number |
b | fix (true) or release (false) |
References GetStaticParNumber(), and RFitDataBase::par_fix.
Referenced by RGFitGaus2D::BgPreset(), RGFitGaus2D::CommonCorrelToggled(), RGFitGaus2D::CommonSigmaToggled(), RGFitGaus2D::ComponentPreset(), RGFitGaus2D::FixCorrelClicked(), RGFitGaus2D::FixParamClicked(), RGFitGaus2D::FixSigma1Clicked(), RGFitGaus2D::FixSigma2Clicked(), RGFitGaus2D::WidgetsToParamBg(), and RGFitGaus2D::WidgetsToParamComponent().
|
inline |
Return the pointer to the ROOT function used for fitting. Warning: the function should not be modified outside the fitter object !
References fct_ptr.
|
inlinestatic |
|
inlinestatic |
|
pure virtual |
Indicate that all components of the fit function must be included.
Implemented in RFitGaus2D.
Referenced by Fit(), GetDifferenceHisto(), GetFunctionHisto(), GetSqrtNegHisto(), and GetSqrtPosHisto().
|
pure virtual |
Indicate that none of the components of the fit function must be included.
Implemented in RFitGaus2D.
|
pure virtual |
Defines the fit function and the parameters.
Initialization of the function and parameters. The function should be overloaded according to the type of fit.
Implemented in RFitGaus2D.
References fct_ptr, RFitDataBase::par_fix, par_name, par_number, and RFitDataBase::par_val.
Referenced by Eval(), FillRandomHisto(), Fit(), GetDifferenceHisto(), GetFunctionHisto(), GetSqrtNegHisto(), and GetSqrtPosHisto().
|
pure virtual |
Scale the function, and adjust parameters according to the scale.
s | scaling factor |
Implemented in RFitGaus2D.
Referenced by NormaliseFunction().
|
virtual |
Function that modifies normalises the function integral. In derived classes for specific type of fits, the parameters should be adjusted.
nor | normalization value |
References fct_ptr, RFitData1D::fit_xmax, RFitData1D::fit_xmin, RFitData2D::fit_ymax, RFitData2D::fit_ymin, and ScaleFunction().
|
virtual |
Plot the histogram, including uncertainty if it is defined.
opts | ROOT plotting options |
zinf | lower plotting Z value |
zsup | upper plotting Z value |
References histo_ptr.
Referenced by DrawFctResult(), and RFitGaus2D::DrawFctResult().
|
virtual |
Plot fit functions, with all components.
opts | ROOT plot options (see ROOT class TF1) |
References GetFunctionHisto(), and histo_ptr.
Referenced by DrawFctResult(), and RFitGaus2D::DrawFctResult().
|
virtual |
Plot the histogram, the fit function and its components in an existing pad.
pad | pad pointer |
opts | results plot options |
Reimplemented in RFitGaus2D.
References DrawFunction(), DrawHisto(), RFitData1D::fit_xmax, RFitData1D::fit_xmin, RFitData2D::fit_ymax, RFitData2D::fit_ymin, histo_bin_x, histo_bin_y, histo_ptr, pad_phi, and pad_theta.
Referenced by RGFitDisplayer2D::DrawFitResult(), and DrawFitResult().
|
virtual |
Plot the difference between histogram and fit function in an existing pad.
pad | pad pointer |
opts | results plot options |
References RFitData1D::fit_xmax, RFitData1D::fit_xmin, RFitData2D::fit_ymax, RFitData2D::fit_ymin, GetDifferenceHisto(), histo_bin_x, histo_bin_y, pad_phi, pad_theta, and RSetPaletteZero().
Referenced by DrawFitResult().
|
virtual |
Plot the histogram, the fit function and its components in an existing pad, and the difference between histogram and fit result.
The options are:
pad | pad pointer |
opts | results plot options |
References DrawDifResult(), and DrawFctResult().
Referenced by RGFitDisplayer2D::DrawFitResult().
|
virtual |
Fill an existing histogram with fit function values.
hptr | histogram pointer |
References fct_ptr.
Referenced by RFitGaus2D::GetBgHisto(), RFitGaus2D::GetComponentHisto(), and GetFunctionHisto().
|
virtual |
Allocate a new histogram filled with fit function values. The returned histogram must be deleted by calling program.
name | histogram name |
References FillFunctionHisto(), RFitData1D::fit_xmax, RFitData1D::fit_xmin, RFitData2D::fit_ymax, RFitData2D::fit_ymin, latt_fct, nx_bin, ny_bin, SetCalcAll(), and SetFunction().
Referenced by RGFitGaus2D::CalcFunctions(), RGFitBase2D::CalcFunctions(), DrawFunction(), and FillRandomHisto().
|
virtual |
Fonction qui renvoit un histogramme avec la différence entre l'histogramme et la fonction de fit. (erreur statistique).
name | nom de l'histogramme |
References fct_ptr, RFitData1D::fit_xmax, RFitData1D::fit_xmin, RFitData2D::fit_ymax, RFitData2D::fit_ymin, histo_bin_x, histo_bin_y, histo_ptr, ix_min, iy_min, nx_bin, ny_bin, SetCalcAll(), and SetFunction().
Referenced by RGFitGaus2D::CalcFunctions(), RGFitBase2D::CalcFunctions(), and DrawDifResult().
|
inlinevirtual |
Get a pointer to an histogram filled with the square root of the fit function (statistical uncertainty). The function is supposed to be positive: if this is not the case, the bin values are set to 0.
name | histogram name |
References GetSqrtPosHisto().
|
virtual |
Fonction qui renvoit un histogramme avec la racine carrée de la fonction (erreur statistique). La fonction est supposée être positive ! Si ce n'est pas le cas, les canaux sont mis à 0.
name | nom de l'histogramme |
References fct_ptr, RFitData1D::fit_xmax, RFitData1D::fit_xmin, RFitData2D::fit_ymax, RFitData2D::fit_ymin, histo_bin_x, histo_bin_y, latt_fct, nx_bin, ny_bin, SetCalcAll(), and SetFunction().
Referenced by RGFitGaus2D::CalcFunctions(), RGFitBase2D::CalcFunctions(), and GetSqrtHisto().
|
virtual |
Fonction qui renvoit un histogramme avec le négatif de la racine carrée de la fonction (erreur statistique). La fonction est supposée être positive ! Si ce n'est pas le cas, les canaux sont mis à 0.
name | nom de l'histogramme |
References fct_ptr, RFitData1D::fit_xmax, RFitData1D::fit_xmin, RFitData2D::fit_ymax, RFitData2D::fit_ymin, histo_bin_x, histo_bin_y, latt_fct, nx_bin, ny_bin, SetCalcAll(), and SetFunction().
Referenced by RGFitGaus2D::CalcFunctions(), and RGFitBase2D::CalcFunctions().
|
virtual |
Evalue la valeur de la fonction, avec les paramètres en cours.
x | coordonnée X du point pour lequel la fonction doit être calculée |
y | coordonnée Y du point pour lequel la fonction doit être calculée |
References fct_ptr, and SetFunction().
|
virtual |
Tirage aléatoire d'une valeur selon la fonction.
x | coordonnée X du point aléatoire |
y | coordonnée Y du point aléatoire |
References fct_ptr, RFitData1D::fit_xmax, RFitData1D::fit_xmin, RFitData2D::fit_ymax, and RFitData2D::fit_ymin.
|
virtual |
Création d'un histogramme à partir d'un tirage aléatoire sur la fonction de fit.
name | nom de l'histogramme |
n | nombre d'entrées de l'histogramme |
References FillRandomHisto(), RFitData1D::fit_xmax, RFitData1D::fit_xmin, RFitData2D::fit_ymax, RFitData2D::fit_ymin, nx_bin, and ny_bin.
|
virtual |
Remplissage d'un histogramme à partir d'un tirage aléatoire sur la fonction de fit. Pour éviter de recalculer la normalisation à chaque fois (ce qui peut être très long pour un nombre de tiages important), la fonction est passée dans un histogramme, qui sert pour le remplissage. Pour tirer des valeur aléatoires directement de la fonction de fit, voir la fonction GetRandom.
hptr | pointeur de l'histogramme |
n | nombre d'entrées de l'histogramme |
References GetFunctionHisto(), and SetFunction().
Referenced by GetRandomHisto().
|
inlinevirtual |
Parameters preset function before fit: in the base class, nothing is done (it may be overloaded in derived classes).
Referenced by RGFitBase2D::GuiPreset().
|
virtual |
Fonction qui réalise le fit de l'histogramme, et retourne le chi2 normalisé obtenu. En cas de normalisation des erreurs par le chi2, la valeur retournée est la valeur du chi2 avant la normalisation (ben, oui, après, il vaut 1, ça n'a pas tellement d'intérêt...).
opts | options de fit (elles sont prioritaires sur les options internes, en particulier le mode de fit) |
References fct_ptr, RFitDataBase::fit_chi2, RFitDataBase::fit_edm, RFitDataBase::fit_err_def, RFitDataBase::fit_fcn, RFitDataBase::fit_mode, fit_mode, RFitDataBase::fit_ndf, RFitDataBase::fit_options, fit_options, RFitDataBase::fit_result, RFitData1D::fit_xmax, RFitData1D::fit_xmin, RFitModes::fitLikelyhood, GetStaticOption(), histo_ptr, RFitOptions::modeErrNorm, RFitDataBase::par_cov, RFitDataBase::par_err, RFitDataBase::par_fix, par_number, RFitDataBase::par_number, RFitDataBase::par_val, SetCalcAll(), and SetFunction().
Referenced by RGFitBase2D::GuiFit().
|
pure virtual |
Fonction qui écrit le résultat de fit dans une chaine de caractères.
Implemented in RFitGaus2D.
Referenced by RGFitBase2D::GuiTextView(), and PrintFit().
|
virtual |
Fonction qui écrit le résultat de fit dans un fichier texte.
fname | nom du fichier |
|
virtual |
Fonction qui écrit le résultat de fit dans un fichier texte.
fptr | pointeur de fichier (type C) |
References GetFitText().
|
virtual |
Fonction qui écrit les paramètres du fit, les erreurs et la matrice de covariance dans un fichier texte.
fname | nom du fichier |
Referenced by RGFitBase2D::GuiWriteParam().
|
virtual |
Fonction qui écrit les paramètres du fit, les erreurs et la matrice de covariance dans un fichier texte.
fptr | pointeur de fichier (type C) |
References RFitDataBase::fit_chi2, RFitDataBase::par_err, par_name, par_number, and RFitDataBase::par_val.
|
virtual |
Fonction qui écrit l'ensemble des résultats de fit (options et paramètres) dans un fichier texte.
fname | nom du fichier |
|
virtual |
Fonction qui écrit l'ensemble des résultats de fit (options et paramètres) dans un fichier texte.
fptr | pointeur de fichier (type C) |
|
pure virtual |
Creation d'une structure de données relatives au fit (voir classes dérivées).
Implemented in RFitGaus2D, RGFitBase2D, and RGFitGaus2D.
|
virtual |
Fonction qui renvoit le pointeur sur les données de fit de la classe.
Reimplemented in RFitGaus2D, RGFitBase2D, and RGFitGaus2D.
References RFitDataBase::fit_mode, RFitDataBase::fit_options, and RFitDataBase::par_number.
|
virtual |
Fonction qui initialise les données du fit à partir de données récupérées d'un fit précédent.
fit_data | données pour initialisation |
Reimplemented in RFitGaus2D, RGFitBase2D, and RGFitGaus2D.
References RFitDataBase::fit_result, RFitDataBase::GetFitMode(), RFitDataBase::GetFitOptions(), RFitData1D::GetFitXmax(), RFitData1D::GetFitXmin(), RFitData2D::GetFitYmax(), RFitData2D::GetFitYmin(), RFitDataBase::GetParNumber(), RFitDataBase::GetParValue(), InitMode(), RFitDataBase::IsFixParameter(), RFitDataBase::par_fix, RFitDataBase::par_val, Reset(), SetFitLimits(), SetFitMode(), and SetOptions().
Referenced by RFitBase2D(), RGFitBase2D::SetFitData(), and RFitGaus2D::SetFitData().
RFitBase2D::ClassDef | ( | RFitBase2D | , |
0 | |||
) |
For ROOT dictionary.