4 #ifndef ROOT_TFractionFitter 5 #define ROOT_TFractionFitter 7 #ifndef ROOT_TVirtualFitter 11 #ifndef ROOT_TObjArray 75 void FindPrediction(
int bin,
double& t_i,
int& k_0,
double& A_ki)
const;
121 #endif // ROOT_TFractionFitter Double_t EvaluateFCN(const Double_t *par)
virtual ~TFractionFitter()
TFractionFitter default destructor.
void Constrain(Int_t parm, Double_t low, Double_t high)
Constrain the values of parameter number <parm> (the parameter numbering follows that of the input te...
void ReleaseRangeX()
Release restrictions on the X range of the histogram to be used in the fit.
Namespace for new ROOT classes and functions.
Double_t GetChisquare() const
Return the likelihood ratio Chi-squared (chi2) for the fit.
std::vector< Int_t > fExcludedBins
void TFractionFitFCN(Int_t &npar, Double_t *gin, Double_t &f, Double_t *par, Int_t flag)
void GetRanges(Int_t &minX, Int_t &maxX, Int_t &minY, Int_t &maxY, Int_t &minZ, Int_t &maxZ) const
Used internally to obtain the bin ranges according to the dimensionality of the histogram and the lim...
void ReleaseRangeY()
Release restrictions on the Y range of the histogram to be used in the fit.
void SetRangeZ(Int_t low, Int_t high)
Set the Z range of the histogram to be used in the fit (3D histograms only).
#define ClassDef(name, id)
void CheckConsistency()
Function used internally to check the consistency between the various histograms. ...
ROOT::Fit::Fitter * fFractionFitter
bool IsExcluded(Int_t bin) const
Function for internal use, checking whether the given bin is excluded from the fit or not...
void UnConstrain(Int_t parm)
Remove the constraints on the possible values of parameter <parm>.
void SetData(TH1 *data)
Change the histogram to be fitted to.
void SetMC(Int_t parm, TH1 *MC)
Change the histogram for template number <parm>.
Int_t GetNDF() const
return the number of degrees of freedom in the fit the fNDF parameter has been previously computed du...
void CheckParNo(Int_t parm) const
Function for internal use, checking parameter validity An invalid parameter results in an error...
TH1 * GetMCPrediction(Int_t parm) const
Return the adjusted MC template (Aji) for template (parm).
Fitter class, entry point for performing all type of fits.
void GetResult(Int_t parm, Double_t &value, Double_t &error) const
Obtain the fit result for parameter <parm> (the parameter numbering follows that of the input templat...
Provides an indirection to the TFitResult class and with a semantics identical to a TFitResult pointe...
void SetRangeX(Int_t low, Int_t high)
Set the X range of the histogram to be used in the fit.
TFractionFitter()
TFractionFitter default constructor.
void ComputeFCN(Double_t &f, const Double_t *par, Int_t flag)
Used internally to compute the likelihood value.
TH1 * GetPlot()
Return the "template prediction" corresponding to the fit result (this is not the same as the weighte...
void ComputeChisquareLambda()
Method used internally to compute the likelihood ratio chi2 See the function GetChisquare() for detai...
TFitResultPtr Fit(FitObject *h1, TF1 *f1, Foption_t &option, const ROOT::Math::MinimizerOptions &moption, const char *goption, ROOT::Fit::DataRange &range)
void SetRangeY(Int_t low, Int_t high)
Set the Y range of the histogram to be used in the fit (2D or 3D histograms only).
Double_t GetProb() const
return the fit probability
void ErrorAnalysis(Double_t UP)
Set UP to the given value (see class TMinuit), and perform a MINOS minimisation.
Mother of all ROOT objects.
Fits MC fractions to data histogram.
TFitResultPtr Fit()
Perform the fit with the default UP value.
void FindPrediction(int bin, double &t_i, int &k_0, double &A_ki) const
Function used internally to obtain the template prediction in the individual bins 'bin' <=> 'i' (pape...
void ExcludeBin(Int_t bin)
Exclude the given bin from the fit.
void IncludeBin(Int_t bin)
Include the given bin in the fit, if it was excluded before using ExcludeBin().
void SetWeight(Int_t parm, TH1 *weight)
Set bin by bin weights for template number <parm> (the parameter numbering follows that of the input ...
ROOT::Fit::Fitter * GetFitter() const
Give direct access to the underlying fitter class.
void ReleaseRangeZ()
Release restrictions on the Z range of the histogram to be used in the fit.