|
BAT
0.9.4
The Bayesian analysis toolkit
|
A base class for all fitting classes. More...
#include <BCFitter.h>


Public Member Functions | |
Constructors and destructors | |
| BCFitter () | |
| BCFitter (const char *name) | |
| ~BCFitter () | |
Member functions (get) | |
| TGraph * | GetErrorBand () |
| TH2D * | GetErrorBandXY () const |
| TH2D * | GetErrorBandXY_yellow (double level=.68, int nsmooth=0) const |
| std::vector< double > | GetErrorBand (double level) const |
| TGraph * | GetErrorBandGraph (double level1, double level2) const |
| TGraph * | GetFitFunctionGraph (const std::vector< double > ¶meters) |
| TGraph * | GetFitFunctionGraph () |
| TGraph * | GetFitFunctionGraph (const std::vector< double > ¶meters, double xmin, double xmax, int n=1000) |
| void | FixDataAxis (unsigned int index, bool fixed) |
| bool | GetFixedDataAxis (unsigned int index) const |
Member functions (set) | |
| void | SetFillErrorBand (bool flag=true) |
| void | SetErrorBandHisto (TH2D *h) |
| void | UnsetFillErrorBand () |
| void | SetFitFunctionIndexX (int index) |
| void | SetFitFunctionIndexY (int index) |
| void | SetFitFunctionIndices (int indexx, int indexy) |
| void | SetErrorBandContinuous (bool flag) |
| virtual double | FitFunction (const std::vector< double > &, const std::vector< double > &) |
Member functions (miscellaneous methods) | |
| int | ReadErrorBandFromFile (const char *file) |
| virtual int | Fit ()=0 |
| virtual void | DrawFit (const char *options, bool flaglegend=false)=0 |
| void | MCMCIterationInterface () |
| void | MarginalizePreprocess () |
| void | MarginalizePostprocess () |
| void | FillErrorBand () |
Public Member Functions inherited from BCModel | |
| BCModel (const char *name="model") | |
| BCModel (const BCModel &bcmodel) | |
| virtual | ~BCModel () |
| BCModel & | operator= (const BCModel &bcmodel) |
| const std::string & | GetName () const |
| double | GetModelAPrioriProbability () const |
| double | GetModelAPosterioriProbability () const |
| BCDataSet * | GetDataSet () const |
| BCDataPoint * | GetDataPointLowerBoundaries () const |
| BCDataPoint * | GetDataPointUpperBoundaries () const |
| double | GetDataPointLowerBoundary (unsigned int index) const |
| double | GetDataPointUpperBoundary (unsigned int index) const |
| bool | GetFlagBoundaries () const |
| unsigned | GetNDataPoints () const |
| BCDataPoint * | GetDataPoint (unsigned int index) const |
| void | SetName (const char *name) |
| void | SetModelAPrioriProbability (double probability) |
| void | SetModelAPosterioriProbability (double probability) |
| virtual int | AddParameter (BCParameter *parameter) |
| void | SetDataSet (BCDataSet *dataset) |
| void | SetSingleDataPoint (BCDataPoint *datapoint) |
| void | SetSingleDataPoint (BCDataSet *dataset, unsigned int index) |
| void | SetDataBoundaries (unsigned int index, double lowerboundary, double upperboundary, bool fixed=false) |
| void | SetDataPointLowerBoundaries (BCDataPoint *datasetlowerboundaries) |
| void | SetDataPointUpperBoundaries (BCDataPoint *datasetupperboundaries) |
| void | SetDataPointLowerBoundary (int index, double lowerboundary) |
| void | SetDataPointUpperBoundary (int index, double upperboundary) |
| int | SetPrior (int index, TF1 *f) |
| int | SetPrior (const char *name, TF1 *f) |
| int | SetPriorDelta (int index, double value) |
| int | SetPriorDelta (const char *name, double value) |
| int | SetPriorGauss (int index, double mean, double sigma) |
| int | SetPriorGauss (const char *name, double mean, double sigma) |
| int | SetPriorGauss (int index, double mean, double sigmadown, double sigmaup) |
| int | SetPriorGauss (const char *name, double mean, double sigmadown, double sigmaup) |
| int | SetPrior (int index, TH1 *h, bool flag=false) |
| int | SetPrior (const char *name, TH1 *h, bool flag=false) |
| int | SetPriorConstant (int index) |
| int | SetPriorConstant (const char *name) |
| int | SetPriorConstantAll () |
| void | Copy (const BCModel &bcmodel) |
| double | APrioriProbability (const std::vector< double > ¶meters) |
| virtual double | LogAPrioriProbability (const std::vector< double > ¶meters) |
| virtual double | Likelihood (const std::vector< double > ¶ms) |
| virtual double | LogLikelihood (const std::vector< double > ¶ms)=0 |
| double | ProbabilityNN (const std::vector< double > ¶ms) |
| double | LogProbabilityNN (const std::vector< double > ¶meters) |
| double | Probability (const std::vector< double > ¶meter) |
| double | LogProbability (const std::vector< double > ¶meter) |
| virtual double | SamplingFunction (const std::vector< double > ¶meters) |
| double | Eval (const std::vector< double > ¶meters) |
| virtual double | LogEval (const std::vector< double > ¶meters) |
| virtual void | CorrelateDataPointValues (std::vector< double > &x) |
| double | GetPvalueFromChi2 (const std::vector< double > &par, int sigma_index) |
| double | GetPvalueFromKolmogorov (const std::vector< double > &par, int index) |
| double | GetPvalueFromChi2NDoF (std::vector< double > par, int sigma_index) |
| BCH1D * | CalculatePValue (std::vector< double > par, bool flag_histogram=false) |
| double | GetPValue () |
| double | GetPValueNDoF () |
| double | GetChi2NDoF () |
| std::vector< double > | GetChi2Runs (int dataIndex, int sigmaIndex) |
| void | SetGoFNIterationsMax (int n) |
| void | SetGoFNIterationsRun (int n) |
| void | SetGoFNChains (int n) |
| double | HessianMatrixElement (const BCParameter *parameter1, const BCParameter *parameter2, std::vector< double > point) |
| void | PrintSummary () |
| void | PrintResults (const char *file) |
| void | PrintShortFitSummary (int chi2flag=0) |
| void | PrintHessianMatrix (std::vector< double > parameters) |
| virtual double | CDF (const std::vector< double > &, int, bool) |
Protected Attributes | |
| TH2D * | fErrorBandXY |
Protected Attributes inherited from BCModel | |
| std::string | fName |
| double | fModelAPriori |
| double | fModelAPosteriori |
| BCDataSet * | fDataSet |
| BCDataPoint * | fDataPointLowerBoundaries |
| BCDataPoint * | fDataPointUpperBoundaries |
| std::vector< bool > | fDataFixedValues |
| double | fPValue |
| double | fChi2NDoF |
| double | fPValueNDoF |
| bool | flag_discrete |
| int | fGoFNIterationsMax |
| int | fGoFNIterationsRun |
| int | fGoFNChains |
| std::vector< TNamed * > | fPriorContainer |
| bool | fPriorConstantAll |
| std::vector< bool > | fPriorContainerConstant |
| std::vector< bool > | fPriorContainerInterpolate |
A base class for all fitting classes.
Definition at line 27 of file BCFitter.h.
| BCFitter::BCFitter | ( | ) |
The default constructor.
Definition at line 25 of file BCFitter.cxx.
| BCFitter::BCFitter | ( | const char * | name | ) |
| BCFitter::~BCFitter | ( | ) |
The default destructor.
Definition at line 53 of file BCFitter.cxx.
|
pure virtual |
Draw the fit in the current pad.
Implemented in BCEfficiencyFitter, BCHistogramFitter, and BCGraphFitter.
| void BCFitter::FillErrorBand | ( | ) |
Fill error band histogram for curreent iteration. This method is called from MCMCIterationInterface()
Definition at line 102 of file BCFitter.cxx.
|
pure virtual |
Performs the fit.
Implemented in BCEfficiencyFitter, BCHistogramFitter, and BCGraphFitter.
|
inlinevirtual |
Defines a fit function.
| parameters | A set of parameter values |
| x | A vector of x-values |
Reimplemented in BCEfficiencyFitter, BCHistogramFitter, and BCGraphFitter.
Definition at line 135 of file BCFitter.h.
|
inline |
Definition at line 54 of file BCFitter.h.
| std::vector< double > BCFitter::GetErrorBand | ( | double | level | ) | const |
Returns a vector of y-values at a certain probability level.
| level | The level of probability |
Definition at line 159 of file BCFitter.cxx.
|
inline |
const BCParameter * GetParameter(const char * name);
Definition at line 60 of file BCFitter.h.
|
inline |
Overloaded from BCIntegrate.
Definition at line 165 of file BCFitter.h.
| void BCFitter::MarginalizePreprocess | ( | ) |
Overloaded from BCIntegrate.
Definition at line 69 of file BCFitter.cxx.
| void BCFitter::MCMCIterationInterface | ( | ) |
Overloaded from BCEngineMCMC
Definition at line 58 of file BCFitter.cxx.
| int BCFitter::ReadErrorBandFromFile | ( | const char * | file | ) |
Read
Definition at line 297 of file BCFitter.cxx.
| void BCFitter::SetErrorBandContinuous | ( | bool | flag | ) |
Sets the error band flag to continuous function
Definition at line 352 of file BCFitter.cxx.
|
inline |
Sets errorband histogram
Definition at line 97 of file BCFitter.h.
|
inline |
Turn on or off the filling of the error band during the MCMC run.
| flag | set to true for turning on the filling |
Definition at line 92 of file BCFitter.h.
|
inline |
Sets index of the x values in function fits.
| index | Index of the x values |
Definition at line 109 of file BCFitter.h.
|
inline |
Sets index of the y values in function fits.
| index | Index of the y values |
Definition at line 115 of file BCFitter.h.
|
inline |
Sets indices of the x and y values in function fits.
| indexx | Index of the x values |
| indexy | Index of the y values |
Definition at line 122 of file BCFitter.h.
|
inline |
Turn off filling of the error band during the MCMC run. This method is equivalent to SetFillErrorBand(false)
Definition at line 103 of file BCFitter.h.
|
protected |
The error band histogram
Definition at line 206 of file BCFitter.h.