BayesianAnalysisToolkit
0.9.3
|
A class for fitting histograms with functions. More...
#include <BCEfficiencyFitter.h>
Classes | |
class | ToyDataInterface |
Public Member Functions | |
Constructors and destructors | |
BCEfficiencyFitter () | |
BCEfficiencyFitter (const char *name) | |
BCEfficiencyFitter (TH1D *hist1, TH1D *hist2, TF1 *func) | |
BCEfficiencyFitter (const char *name, TH1D *hist1, TH1D *hist2, TF1 *func) | |
~BCEfficiencyFitter () | |
Member functions (get) | |
TH1D * | GetHistogram1 () |
TH1D * | GetHistogram2 () |
TGraphAsymmErrors * | GetHistogramRatio () |
TF1 * | GetFitFunction () |
TGraph * | GetErrorBand () |
TGraph * | GetGraphFitFunction () |
int | GetUncertainties (int n, int k, double p, double &xexp, double &xmin, double &xmax) |
Member functions (set) | |
int | SetHistograms (TH1D *hist1, TH1D *hist2) |
int | SetFitFunction (TF1 *func) |
void | SetFlagIntegration (bool flag) |
void | SetDataPointType (int type) |
Member functions (miscellaneous methods) | |
virtual double | LogLikelihood (const std::vector< double > ¶meters) |
double | FitFunction (const std::vector< double > &x, const std::vector< double > ¶meters) |
int | Fit () |
int | Fit (TH1D *hist1, TH1D *hist2, TF1 *func) |
void | DrawFit (const char *options="", bool flaglegend=false) |
int | CalculatePValueFast (const std::vector< double > &par, BCEfficiencyFitter::ToyDataInterface *callback, double &pvalue, double &pvalueCorrected, unsigned nIterations=100000) |
int | CalculatePValueFast (const std::vector< double > &par, double &pvalue, double &pvalueCorrected, unsigned nIterations=100000) |
![]() | |
BCFitter () | |
BCFitter (const char *name) | |
~BCFitter () | |
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 |
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) |
int | ReadErrorBandFromFile (const char *file) |
void | MCMCIterationInterface () |
void | MarginalizePreprocess () |
void | MarginalizePostprocess () |
void | FillErrorBand () |
![]() | |
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) |
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) |
![]() | |
BCIntegrate () | |
BCIntegrate (const BCIntegrate &bcintegrate) | |
virtual | ~BCIntegrate () |
BCIntegrate & | operator= (const BCIntegrate &bcintegrate) |
int | ReadMarginalizedFromFile (const char *file) |
BCH1D * | GetMarginalized (const BCParameter *parameter) |
BCH1D * | GetMarginalized (const char *name) |
BCH1D * | GetMarginalized (unsigned index) |
BCH2D * | GetMarginalized (const BCParameter *parameter1, const BCParameter *parameter2) |
BCH2D * | GetMarginalized (const char *name1, const char *name2) |
BCH2D * | GetMarginalized (unsigned index1, unsigned index2) |
int | PrintAllMarginalized1D (const char *filebase) |
int | PrintAllMarginalized2D (const char *filebase) |
int | PrintAllMarginalized (const char *file, std::string options1d="BTsiB3CS1D0pdf0Lmeanmode", std::string options2d="BTfB3CS1meangmode", unsigned int hdiv=1, unsigned int ndiv=1) |
double | GetIntegral () const |
BCIntegrate::BCOptimizationMethod | GetOptimizationMethod () const |
BCIntegrate::BCIntegrationMethod | GetIntegrationMethod () const |
BCIntegrate::BCMarginalizationMethod | GetMarginalizationMethod () const |
BCIntegrate::BCSASchedule | GetSASchedule () const |
void | GetRandomVectorUnitHypercube (std::vector< double > &x) const |
void | GetRandomVectorInParameterSpace (std::vector< double > &x) const |
double | GetRandomPoint (std::vector< double > &x) |
int | GetNIterationsMin () const |
int | GetNIterationsMax () const |
int | GetNIterationsPrecisionCheck () const |
int | GetNIterationsOutput () const |
int | GetNIterations () const |
double | GetRelativePrecision () const |
double | GetAbsolutePrecision () const |
BCCubaMethod | GetCubaIntegrationMethod () const |
const BCCubaOptions::Vegas & | GetCubaVegasOptions () const |
const BCCubaOptions::Suave & | GetCubaSuaveOptions () const |
const BCCubaOptions::Divonne & | GetCubaDivonneOptions () const |
const BCCubaOptions::Cuhre & | GetCubaCuhreOptions () const |
BCH1D * | GetSlice (const BCParameter *parameter, const std::vector< double > parameters=std::vector< double >(0), int bins=0, bool flag_norm=true) |
BCH1D * | GetSlice (const char *name, const std::vector< double > parameters=std::vector< double >(0), int nbins=0, bool flag_norm=true) |
BCH2D * | GetSlice (const BCParameter *parameter1, const BCParameter *parameter2, const std::vector< double > parameters=std::vector< double >(0), int bins=0, bool flag_norm=true) |
BCH2D * | GetSlice (const char *name1, const char *name2, const std::vector< double > parameters=std::vector< double >(0), int nbins=0, bool flag_norm=true) |
BCH2D * | GetSlice (unsigned index1, unsigned index2, const std::vector< double > parameters=std::vector< double >(0), int nbins=0, bool flag_norm=true) |
double | GetError () const |
TMinuit * | GetMinuit () |
int | GetMinuitErrorFlag () const |
double | GetSAT0 () const |
double | GetSATmin () const |
double | GetBestFitParameter (unsigned index) const |
double | GetBestFitParameterError (unsigned index) const |
double | GetLogMaximum () |
const std::vector< double > & | GetBestFitParameters () const |
const std::vector< double > & | GetBestFitParameterErrors () const |
void | SetMinuitArlist (double *arglist) |
void | SetFlagIgnorePrevOptimization (bool flag) |
void | SetOptimizationMethod (BCIntegrate::BCOptimizationMethod method) |
void | SetIntegrationMethod (BCIntegrate::BCIntegrationMethod method) |
void | SetMarginalizationMethod (BCIntegrate::BCMarginalizationMethod method) |
void | SetSASchedule (BCIntegrate::BCSASchedule schedule) |
void | SetNIterationsMin (int niterations) |
void | SetNIterationsMax (int niterations) |
void | SetNIterationsPrecisionCheck (int niterations) |
void | SetNIterationsOutput (int niterations) |
void | SetRelativePrecision (double relprecision) |
void | SetAbsolutePrecision (double absprecision) |
void | SetCubaIntegrationMethod (BCCubaMethod type) |
void | SetCubaOptions (const BCCubaOptions::Vegas &options) |
void | SetCubaOptions (const BCCubaOptions::Suave &options) |
void | SetCubaOptions (const BCCubaOptions::Divonne &options) |
void | SetCubaOptions (const BCCubaOptions::Cuhre &options) |
void | SetSAT0 (double T0) |
void | SetSATmin (double Tmin) |
void | SetFlagWriteSAToFile (bool flag) |
TTree * | GetSATree () |
void | InitializeSATree () |
double | Normalize () |
double | Integrate (BCIntegrationMethod intmethod) |
double | Integrate () |
double | Integrate (BCIntegrationMethod type, tRandomizer randomizer, tEvaluator evaluator, tIntegralUpdater updater, std::vector< double > &sums) |
double | EvaluatorMC (std::vector< double > &sums, const std::vector< double > &point, bool &accepted) |
int | MarginalizeAll () |
int | MarginalizeAll (BCMarginalizationMethod margmethod) |
void | SAInitialize () |
std::vector< double > | FindMode (std::vector< double > start=std::vector< double >()) |
std::vector< double > | FindMode (BCIntegrate::BCOptimizationMethod optmethod, std::vector< double > start=std::vector< double >()) |
double | SATemperature (double t) |
double | SATemperatureBoltzmann (double t) |
double | SATemperatureCauchy (double t) |
virtual double | SATemperatureCustom (double t) |
std::vector< double > | GetProposalPointSA (const std::vector< double > &x, int t) |
std::vector< double > | GetProposalPointSABoltzmann (const std::vector< double > &x, int t) |
std::vector< double > | GetProposalPointSACauchy (const std::vector< double > &x, int t) |
virtual std::vector< double > | GetProposalPointSACustom (const std::vector< double > &x, int t) |
std::vector< double > | SAHelperGetRandomPointOnHypersphere () |
double | SAHelperGetRadialCauchy () |
double | SAHelperSinusToNIntegral (int dim, double theta) |
virtual void | ResetResults () |
std::string | DumpIntegrationMethod (BCIntegrationMethod type) |
std::string | DumpCurrentIntegrationMethod () |
std::string | DumpUsedIntegrationMethod () |
std::string | DumpMarginalizationMethod (BCMarginalizationMethod type) |
std::string | DumpCurrentMarginalizationMethod () |
std::string | DumpUsedMarginalizationMethod () |
std::string | DumpOptimizationMethod (BCOptimizationMethod type) |
std::string | DumpCurrentOptimizationMethod () |
std::string | DumpUsedOptimizationMethod () |
std::string | DumpCubaIntegrationMethod (BCCubaMethod type) |
std::string | DumpCubaIntegrationMethod () |
void | SetBestFitParameters (const std::vector< double > &x) |
void | SetBestFitParameters (const std::vector< double > &x, const double &new_value, double &old_value) |
unsigned | GetNIntegrationVariables () |
double | CalculateIntegrationVolume () |
bool | CheckMarginalizationAvailability (BCMarginalizationMethod type) |
bool | CheckMarginalizationIndices (TH1 *hist, const std::vector< unsigned > &index) |
![]() | |
void | WriteMarkovChain (bool flag) |
BCEngineMCMC () | |
BCEngineMCMC (const BCEngineMCMC &enginemcmc) | |
virtual | ~BCEngineMCMC () |
BCEngineMCMC & | operator= (const BCEngineMCMC &engineMCMC) |
unsigned | MCMCGetNChains () const |
unsigned | MCMCGetNLag () const |
const std::vector< unsigned > & | MCMCGetNIterations () const |
unsigned | MCMCGetCurrentIteration () const |
unsigned | MCMCGetCurrentChain () const |
unsigned | MCMCGetNIterationsConvergenceGlobal () const |
bool | MCMCGetFlagConvergenceGlobal () const |
unsigned | MCMCGetNIterationsMax () const |
unsigned | MCMCGetNIterationsRun () const |
unsigned | MCMCGetNIterationsPreRunMin () const |
unsigned | MCMCGetNIterationsUpdate () const |
unsigned | MCMCGetNIterationsUpdateMax () const |
std::vector< int > | MCMCGetNTrialsTrue () const |
int | MCMCGetNTrials () const |
const std::vector< double > & | MCMCGetprobMean () const |
const std::vector< double > & | MCMCGetVariance () const |
const std::vector< double > & | MCMCGetTrialFunctionScaleFactor () const |
std::vector< double > | MCMCGetTrialFunctionScaleFactor (unsigned ichain) const |
double | MCMCGetTrialFunctionScaleFactor (unsigned ichain, unsigned ipar) |
const std::vector< double > & | MCMCGetx () const |
std::vector< double > | MCMCGetx (unsigned ichain) |
double | MCMCGetx (unsigned ichain, unsigned ipar) const |
const std::vector< double > & | MCMCGetLogProbx () const |
double | MCMCGetLogProbx (unsigned ichain) |
int | MCMCGetPhase () const |
const std::vector< double > & | MCMCGetMaximumPoints () const |
std::vector< double > | MCMCGetMaximumPoint (unsigned i) const |
const std::vector< double > & | MCMCGetMaximumLogProb () const |
int | MCMCGetFlagInitialPosition () const |
double | MCMCGetRValueCriterion () const |
double | MCMCGetRValueParametersCriterion () const |
double | MCMCGetRValue () const |
double | MCMCGetRValueParameters (unsigned i) |
bool | MCMCGetRValueStrict () const |
bool | MCMCGetFlagRun () const |
TTree * | MCMCGetMarkovChainTree (unsigned i) |
BCH1D * | MCMCGetH1Marginalized (unsigned i) |
BCH2D * | MCMCGetH2Marginalized (unsigned i, unsigned j) |
BCParameter * | GetParameter (int index) const |
BCParameter * | GetParameter (const char *name) const |
unsigned int | GetNParameters () const |
unsigned int | GetNFixedParameters () |
unsigned int | GetNFreeParameters () |
const std::vector< double > & | GetBestFitParametersMarginalized () const |
void | MCMCSetTrialFunctionScaleFactor (std::vector< double > scale) |
void | MCMCSetNChains (unsigned n) |
void | MCMCSetNLag (unsigned n) |
void | MCMCSetNIterationsMax (unsigned n) |
void | MCMCSetNIterationsRun (unsigned n) |
void | MCMCSetNIterationsPreRunMin (unsigned n) |
void | MCMCSetNIterationsUpdate (unsigned n) |
void | MCMCSetNIterationsUpdateMax (unsigned n) |
void | MCMCSetMinimumEfficiency (double efficiency) |
void | MCMCSetMaximumEfficiency (double efficiency) |
void | MCMCSetRandomSeed (unsigned seed) |
void | MCMCSetWriteChainToFile (bool flag) |
void | MCMCSetWritePreRunToFile (bool flag) |
void | MCMCSetInitialPositions (const std::vector< double > &x0s) |
void | MCMCSetInitialPositions (std::vector< std::vector< double > > x0s) |
void | MCMCSetFlagInitialPosition (int flag) |
void | MCMCSetFlagOrderParameters (bool flag) |
void | MCMCSetFlagFillHistograms (bool flag) |
void | MCMCSetFlagPreRun (bool flag) |
void | MCMCSetRValueCriterion (double r) |
void | MCMCSetRValueParametersCriterion (double r) |
void | MCMCSetRValueStrict (bool strict=true) |
void | MCMCSetMarkovChainTrees (const std::vector< TTree * > &trees) |
void | MCMCInitializeMarkovChainTrees () |
int | SetMarginalized (unsigned index, TH1D *h) |
int | SetMarginalized (unsigned index1, unsigned index2, TH2D *h) |
void | MCMCSetValuesDefault () |
void | MCMCSetValuesQuick () |
void | MCMCSetValuesDetail () |
void | MCMCSetPrecision (BCEngineMCMC::Precision precision) |
void | SetNbins (unsigned int nbins) |
void | Copy (const BCEngineMCMC &enginemcmc) |
virtual int | AddParameter (const char *name, double min, double max, const char *latexname="") |
virtual void | MCMCTrialFunction (unsigned ichain, std::vector< double > &x) |
virtual double | MCMCTrialFunctionSingle (unsigned ichain, unsigned ipar) |
bool | MCMCGetProposalPointMetropolis (unsigned chain, std::vector< double > &x) |
bool | MCMCGetProposalPointMetropolis (unsigned chain, unsigned parameter, std::vector< double > &x) |
bool | MCMCGetNewPointMetropolis (unsigned chain=0) |
bool | MCMCGetNewPointMetropolis (unsigned chain, unsigned parameter) |
void | MCMCInChainCheckMaximum () |
void | MCMCInChainUpdateStatistics () |
void | MCMCInChainFillHistograms () |
void | MCMCInChainTestConvergenceAllChains () |
void | MCMCInChainWriteChains () |
int | MCMCMetropolis () |
int | MCMCMetropolisPreRun () |
void | MCMCResetRunStatistics () |
void | MCMCInitializeMarkovChains () |
int | MCMCInitialize () |
void | ClearParameters (bool hard=false) |
virtual void | MCMCUserIterationInterface () |
virtual void | MCMCCurrentPointInterface (std::vector< double > &, int, bool) |
Private Attributes | |
TH1D * | fHistogram1 |
TH1D * | fHistogram2 |
TGraphAsymmErrors * | fHistogramRatio |
TF1 * | fFitFunction |
bool | fFlagIntegration |
TGraph * | fErrorBand |
TGraph * | fGraphFitFunction |
TH1D * | fHistogramBinomial |
unsigned int | fDataPointType |
Additional Inherited Members | |
![]() | |
enum | BCOptimizationMethod { kOptEmpty, kOptSimAnn, kOptMetropolis, kOptMinuit, kOptDefault, NOptMethods } |
enum | BCIntegrationMethod { kIntEmpty, kIntMonteCarlo, kIntCuba, kIntGrid, kIntDefault, NIntMethods } |
enum | BCMarginalizationMethod { kMargEmpty, kMargMetropolis, kMargMonteCarlo, kMargGrid, kMargDefault, NMargMethods } |
enum | BCSASchedule { kSACauchy, kSABoltzmann, kSACustom, NSAMethods } |
enum | BCCubaMethod { kCubaVegas, kCubaSuave, kCubaDivonne, kCubaCuhre, NCubaMethods } |
typedef void(BCIntegrate::* | tRandomizer )(std::vector< double > &) const |
typedef double(BCIntegrate::* | tEvaluator )(std::vector< double > &, const std::vector< double > &, bool &) |
typedef void(* | tIntegralUpdater )(const std::vector< double > &, const int &, double &, double &) |
![]() | |
static void | IntegralUpdaterMC (const std::vector< double > &sums, const int &nIterations, double &integral, double &absprecision) |
static int | CubaIntegrand (const int *ndim, const double xx[], const int *ncomp, double ff[], void *userdata) |
static void | FCNLikelihood (int &npar, double *grad, double &fval, double *par, int flag) |
![]() | |
unsigned | IntegrationOutputFrequency () const |
void | LogOutputAtStartOfIntegration (BCIntegrationMethod type, BCCubaMethod cubatype) |
void | LogOutputAtIntegrationStatusUpdate (BCIntegrationMethod type, double integral, double absprecision, int nIterations) |
void | LogOutputAtEndOfIntegration (double integral, double absprecision, double relprecision, int nIterations) |
void | Copy (const BCIntegrate &bcintegrate) |
![]() | |
TH2D * | fErrorBandXY |
A class for fitting histograms with functions.
Definition at line 39 of file BCEfficiencyFitter.h.
BCEfficiencyFitter::BCEfficiencyFitter | ( | ) |
BCEfficiencyFitter::BCEfficiencyFitter | ( | const char * | name) |
BCEfficiencyFitter::BCEfficiencyFitter | ( | TH1D * | hist1, |
TH1D * | hist2, | ||
TF1 * | func | ||
) |
A constructor.
hist1 | The histogram with the larger numbers |
hist2 | The histogram with the smaller numbers |
func | The fit function. |
Definition at line 66 of file BCEfficiencyFitter.cxx.
BCEfficiencyFitter::BCEfficiencyFitter | ( | const char * | name, |
TH1D * | hist1, | ||
TH1D * | hist2, | ||
TF1 * | func | ||
) |
Constructor.
name | name fo the model |
hist1 | The histogram with the larger numbers |
hist2 | The histogram with the smaller numbers |
func | The fit function. |
Definition at line 85 of file BCEfficiencyFitter.cxx.
BCEfficiencyFitter::~BCEfficiencyFitter | ( | ) |
The default destructor.
Definition at line 211 of file BCEfficiencyFitter.cxx.
int BCEfficiencyFitter::CalculatePValueFast | ( | const std::vector< double > & | par, |
BCEfficiencyFitter::ToyDataInterface * | callback, | ||
double & | pvalue, | ||
double & | pvalueCorrected, | ||
unsigned | nIterations = 100000 |
||
) |
Calculate the p-value using fast-MCMC. In every iteration, a new toy data set is created. By providing a suitable implementation of ToyDataInterface, the user can calculate the distribution of an arbitrary statistic. Each toy data set as well as the expected values for the parameter values are passed on to the interface.
par | A set of parameter values |
pvalue | The p-value for the default likelihood statistic |
pvalueCorrected | The p-value for the default likelihood statistic with corrections for DoF to reduce fitting bias, in all nonpathological cases the correction lowers the p-value. |
callback | requires class with operator(...) defined. |
nIterations | number of toy data sets generated by the Markov chain |
Definition at line 451 of file BCEfficiencyFitter.cxx.
int BCEfficiencyFitter::CalculatePValueFast | ( | const std::vector< double > & | par, |
double & | pvalue, | ||
double & | pvalueCorrected, | ||
unsigned | nIterations = 100000 |
||
) |
Calculate the p-value using fast-MCMC.
par | A set of parameter values |
pvalue | The pvalue |
pvalueCorrected | The p-value for the default likelihood statistic with corrections for DoF to reduce fitting bias |
nIterations | number of pseudo experiments generated by the Markov chain |
Definition at line 443 of file BCEfficiencyFitter.cxx.
|
virtual |
Draw the fit in the current pad.
Implements BCFitter.
Definition at line 349 of file BCEfficiencyFitter.cxx.
|
virtual |
Performs the fit.
Implements BCFitter.
Definition at line 309 of file BCEfficiencyFitter.cxx.
int BCEfficiencyFitter::Fit | ( | TH1D * | hist1, |
TH1D * | hist2, | ||
TF1 * | func | ||
) |
Performs the fit.
hist1 | The histogram with the larger number. |
hist2 | The histogram with the smaller number. |
func | The fit function. |
Definition at line 286 of file BCEfficiencyFitter.cxx.
|
virtual |
Returns the y-value of the 1-dimensional fit function at an x and for a set of parameters.
x | A vector with the x-value. |
parameters | A set of parameters. |
Reimplemented from BCFitter.
Definition at line 276 of file BCEfficiencyFitter.cxx.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
int BCEfficiencyFitter::GetUncertainties | ( | int | n, |
int | k, | ||
double | p, | ||
double & | xexp, | ||
double & | xmin, | ||
double & | xmax | ||
) |
Calculates the central value and the lower and upper limits for a given probability.
n | n for the binomial. |
k | k for the binomial. |
p | The central probability defining the limits. |
xmin | The central value. |
xmin | The lower limit. |
xmax | The upper limit. |
Definition at line 576 of file BCEfficiencyFitter.cxx.
|
virtual |
The log of the prior probability. Overloaded from BCModel.
parameters | A vector of doubles containing the parameter values. The log of the conditional probability. Overloaded from BCModel. |
parameters | A vector of doubles containing the parameter values. |
Implements BCModel.
Definition at line 230 of file BCEfficiencyFitter.cxx.
void BCEfficiencyFitter::SetDataPointType | ( | int | type) |
Set type of point to be used to plot the efficiency data 0 - mean + rms 1 - mode + smallest 68% 2 - median + central 68%
Definition at line 220 of file BCEfficiencyFitter.cxx.
int BCEfficiencyFitter::SetFitFunction | ( | TF1 * | func) |
func | The fit function |
Definition at line 171 of file BCEfficiencyFitter.cxx.
|
inline |
Sets the flag for integration.
true: use ROOT's TH1D::Integrate()
false: use linear interpolation
Definition at line 158 of file BCEfficiencyFitter.h.
int BCEfficiencyFitter::SetHistograms | ( | TH1D * | hist1, |
TH1D * | hist2 | ||
) |
hist | The histogram 1 |
hist | The histogram 2 |
Definition at line 105 of file BCEfficiencyFitter.cxx.
|
private |
Type of point to plot for efficiency data 0 - mean + rms 1 - mode + smallest 68% 2 - median + central 68%
Definition at line 274 of file BCEfficiencyFitter.h.
|
private |
Pointer to the error band (for legend)
Definition at line 260 of file BCEfficiencyFitter.h.
|
private |
The fit function
Definition at line 251 of file BCEfficiencyFitter.h.
|
private |
Flag for using the ROOT TH1D::Integral method (true), or linear interpolation (false)
Definition at line 256 of file BCEfficiencyFitter.h.
|
private |
Pointer to a graph for displaying the fit function
Definition at line 264 of file BCEfficiencyFitter.h.
|
private |
The histogram containing the larger numbers.
Definition at line 239 of file BCEfficiencyFitter.h.
|
private |
The histogram containing the smaller numbers.
Definition at line 243 of file BCEfficiencyFitter.h.
|
private |
Temporary histogram for calculating the binomial qunatiles
Definition at line 268 of file BCEfficiencyFitter.h.
|
private |
The efficiency histogram.
Definition at line 247 of file BCEfficiencyFitter.h.