1 #ifndef __BCMODELHISTOGRAMFITTER__H
2 #define __BCMODELHISTOGRAMFITTER__H
76 {
return fHistogram; };
81 {
return fHistogramExpected; };
87 {
return fFitFunction; };
92 {
return fErrorBand; };
97 {
return fGraphFitFunction; };
127 { fFlagIntegration = flag; };
141 virtual double LogLikelihood(
const std::vector<double> & parameters);
158 double FitFunction(
const std::vector<double> & x,
const std::vector<double> & parameters);
170 int Fit(TH1D * hist, TF1 * func);
174 void DrawFit(
const char * options =
"HIST",
bool flaglegend =
false);
218 double CDF(
const std::vector<double>& parameters,
int index,
bool lower=
false);
236 bool fFlagIntegration;
244 TGraph * fGraphFitFunction;
249 TH1D * fHistogramExpected;
virtual double LogLikelihood(const std::vector< double > ¶meters)
int SetFitFunction(TF1 *func)
TGraph * GetGraphFitFunction()
int CalculatePValueLeastSquares(const std::vector< double > &par, bool weightExpect=true)
int SetHistogramExpected(const std::vector< double > ¶meters)
void SetFlagIntegration(bool flag)
A class for fitting histograms with functions.
double FitFunction(const std::vector< double > &x, const std::vector< double > ¶meters)
int CalculatePValueKolmogorov(const std::vector< double > &par)
int SetHistogram(TH1D *hist)
TH1D * GetHistogramExpected()
double CDF(const std::vector< double > ¶meters, int index, bool lower=false)
void DrawFit(const char *options="HIST", bool flaglegend=false)
int CalculatePValueFast(const std::vector< double > &par, unsigned nIterations=100000)
A base class for all fitting classes.
int CalculatePValueLikelihood(const std::vector< double > &par)