124 Set(numerator,denominator);
208 Error(
"Fit",
"function %s has illegal number of parameters = %d",
215 Error(
"Fit",
"No numerator or denominator histograms set");
219 Error(
"Fit",
"function %s dimension, %d, does not match histogram dimension, %d",
227 Error(
"Fit",
"numerator and denominator histograms do not have identical numbers of bins");
239 parameters.reserve(npar);
240 for (i = 0; i < npar; i++) {
245 if (we == 0) we = 0.01;
251 if (plow*pup != 0 && plow >= pup) {
252 parameters.back().Fix();
254 else if (plow < pup ) {
255 parameters.back().SetLimits(plow,pup);
261 fFitter->
SetFCN(static_cast<ROOT::Math::IMultiGenFunction&>(fcnFunction));
282 if ( !status && !quiet)
283 Warning(
"Fit",
"Abnormal termination of minimization.");
325 int ylowbin = 0, yhighbin = 0, zlowbin = 0, zhighbin = 0;
347 }
else if (nDim == 2) {
353 }
else if (nDim == 3) {
371 for (
int xbin = xlowbin; xbin <= xhighbin; ++xbin) {
377 for (
int ybin = ylowbin; ybin <= yhighbin; ++ybin) {
383 for (
int zbin = zlowbin; zbin <= zhighbin; ++zbin) {
395 if (nDen> nmax) nmax = nDen;
396 if (nDen <= 0.)
continue;
416 / ((xup-xlow)*(yup-ylow)) :
425 / ((xup-xlow)*(yup-ylow)*(zup-zlow)) :
439 if (nDen - nNum != 0.) {
441 f -= (nDen - nNum) *
TMath::Log((1. - mu)*nDen/(nDen-nNum));
Double_t EvaluateFCN(const Double_t *par)
virtual const char * GetName() const
Returns name of object.
virtual void SetParameters(const Double_t *params)
void SetPrintLevel(int level)
set print level
virtual Double_t GetBinCenter(Int_t bin) const
Return bin center for 1D histogram.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
Int_t GetFirst() const
Return first bin on the axis i.e.
virtual Double_t GetBinLowEdge(Int_t bin) const
Return low edge of bin.
const std::vector< double > & Errors() const
parameter errors (return st::vector)
Documentation for class Functor class.
Binomial fitter for the division of two histograms.
virtual ~TBinomialEfficiencyFitter()
destructor
Class, describing value, limits and step size of the parameters Provides functionality also to set/re...
virtual void SetName(const char *name)
Set the name of the TNamed.
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
bool FitFCN(unsigned int npar, Function &fcn, const double *params=0, unsigned int dataSize=0, bool chi2fit=false)
Fit using the a generic FCN function as a C++ callable object implementing double () (const double *)...
void ToUpper()
Change string to upper case.
virtual Int_t GetNbinsZ() const
unsigned int Ndf() const
Number of degree of freedom.
virtual void SetNumberFitPoints(Int_t npfits)
void ComputeFCN(Double_t &f, const Double_t *par)
Compute the likelihood.
virtual Double_t GetParError(Int_t ipar) const
Return value of parameter number ipar.
double MinFcnValue() const
Return value of the objective function (chi2 or likelihood) used in the fit.
virtual Double_t Integral(Double_t a, Double_t b, Double_t epsrel=1.e-12)
IntegralOneDim or analytical integral.
ROOT::Math::MinimizerOptions & MinimizerOptions()
access to the minimizer control parameter (non const method)
void SetErrorDef(double err)
set error def
const FitResult & Result() const
get fit result
virtual Int_t GetDimension() const
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString...
void Set(const TH1 *numerator, const TH1 *denominator)
Initialize with a new set of inputs.
Extends the ROOT::Fit::Result class with a TNamed inheritance providing easy possibility for I/O...
virtual Double_t GetBinCenter(Int_t bin) const
Return center of bin.
TBinomialEfficiencyFitter()
default constructor
virtual Int_t GetNdim() const
const FitConfig & Config() const
access to the fit configuration (const method)
ROOT::Fit::Fitter * fFitter
virtual const char * GetParName(Int_t ipar) const
void SetPrecision(Double_t epsilon)
Set the required integration precision, see TF1::Integral()
virtual void SetChisquare(Double_t chi2)
unsigned int NFreeParameters() const
get total number of free parameters
Int_t GetLast() const
Return last bin on the axis i.e.
virtual Int_t GetNumberFitPoints() const
A 3-Dim function with parameters.
Fitter class, entry point for performing all type of fits.
Provides an indirection to the TFitResult class and with a semantics identical to a TFitResult pointe...
const std::vector< ROOT::Fit::ParameterSettings > & ParamsSettings() const
get the vector of parameter settings (const method)
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
int Status() const
minimizer status code
A 2-Dim function with parameters.
virtual Int_t GetBin(Int_t binx, Int_t biny=0, Int_t binz=0) const
Return Global bin number corresponding to binx,y,z.
virtual Int_t FindBin(Double_t x)
Find bin number corresponding to abscissa x.
virtual Double_t Eval(Double_t x, Double_t y=0, Double_t z=0, Double_t t=0) const
Evaluate this function.
class containg the result of the fit and all the related information (fitted parameter values...
const std::vector< double > & Parameters() const
parameter values (return std::vector)
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
bool IsEmpty() const
True if a fit result does not exist (even invalid) with parameter values.
bool SetFCN(unsigned int npar, Function &fcn, const double *params=0, unsigned int dataSize=0, bool chi2fit=false)
Set a generic FCN function as a C++ callable object implementing double () (const double *) Note that...
virtual Int_t GetNpar() const
virtual void GetParLimits(Int_t ipar, Double_t &parmin, Double_t &parmax) const
Return limits for parameter ipar.
TFitResultPtr Fit(TF1 *f1, Option_t *option="")
Carry out the fit of the given function to the given histograms.
virtual void SetParErrors(const Double_t *errors)
Set errors for all active parameters when calling this function, the array errors must have at least ...
virtual Double_t GetParameter(Int_t ipar) const
virtual void GetRange(Double_t *xmin, Double_t *xmax) const
Return range of a generic N-D function.
double ErrorDef() const
error definition
virtual void SetNDF(Int_t ndf)
Set the number of degrees of freedom ndf should be the number of points used in a fit - the number of...
ROOT::Fit::Fitter * GetFitter()
Provide access to the underlying fitter object.
virtual Int_t GetNbinsX() const
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
TAxis * GetXaxis()
Get the behaviour adopted by the object about the statoverflows. See EStatOverflows for more informat...
virtual Int_t GetNbinsY() const
const Double_t kDefaultEpsilon