1 #ifndef __BCEFFICIENCYFITTER__H
2 #define __BCEFFICIENCYFITTER__H
35 class TGraphAsymmErrors;
57 virtual void operator()(
const std::vector<double>& expectation,
const std::vector<unsigned>& toyData) = 0;
101 {
return fHistogram1; };
106 {
return fHistogram2; };
111 {
return fHistogramRatio; };
116 {
return fFitFunction; };
121 {
return fErrorBand; };
126 {
return fGraphFitFunction; };
137 int GetUncertainties(
int n,
int k,
double p,
double &xexp,
double &xmin,
double &xmax);
159 { fFlagIntegration = flag; };
179 virtual double LogLikelihood(
const std::vector<double> & parameters);
186 double FitFunction(
const std::vector<double> & x,
const std::vector<double> & parameters);
199 int Fit(TH1D * hist1, TH1D * hist2, TF1 * func);
203 void DrawFit(
const char * options =
"",
bool flaglegend =
false);
220 double & pvalueCorrected,
unsigned nIterations = 100000);
231 double & pvalueCorrected,
unsigned nIterations = 100000);
247 TGraphAsymmErrors * fHistogramRatio;
256 bool fFlagIntegration;
264 TGraph * fGraphFitFunction;
268 TH1D * fHistogramBinomial;
274 unsigned int fDataPointType;
TGraph * GetGraphFitFunction()
double FitFunction(const std::vector< double > &x, const std::vector< double > ¶meters)
int GetUncertainties(int n, int k, double p, double &xexp, double &xmin, double &xmax)
virtual ~ToyDataInterface()
A class for fitting histograms with functions.
void DrawFit(const char *options="", bool flaglegend=false)
void SetFlagIntegration(bool flag)
TGraphAsymmErrors * GetHistogramRatio()
int CalculatePValueFast(const std::vector< double > &par, BCEfficiencyFitter::ToyDataInterface *callback, double &pvalue, double &pvalueCorrected, unsigned nIterations=100000)
int SetFitFunction(TF1 *func)
void SetDataPointType(int type)
int SetHistograms(TH1D *hist1, TH1D *hist2)
A base class for all fitting classes.
virtual double LogLikelihood(const std::vector< double > ¶meters)
virtual void operator()(const std::vector< double > &expectation, const std::vector< unsigned > &toyData)=0