Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::Math::GoFTest Class Reference

Definition at line 39 of file GoFTest.h.

Public Types

enum  EDistribution {
  kUndefined , kUserDefined , kGaussian , kLogNormal ,
  kExponential
}
 
enum  ETestType { kAD , kAD2s , kKS , kKS2s }
 
enum  EUserDistribution { kCDF , kPDF }
 

Public Member Functions

 GoFTest (UInt_t sample1Size, const Double_t *sample1, UInt_t sample2Size, const Double_t *sample2)
 
 GoFTest (UInt_t sampleSize, const Double_t *sample, const IGenFunction &dist, EUserDistribution userDist=kPDF, Double_t xmin=1, Double_t xmax=0)
 
template<class Dist >
 GoFTest (UInt_t sampleSize, const Double_t *sample, Dist &dist, EUserDistribution userDist=kPDF, Double_t xmin=1, Double_t xmax=0)
 
 GoFTest (UInt_t sampleSize, const Double_t *sample, EDistribution dist=kUndefined, const std::vector< double > &distParams={})
 
virtual ~GoFTest ()
 
Double_t AndersonDarling2SamplesTest (const Char_t *option="p") const
 
void AndersonDarling2SamplesTest (Double_t &pvalue, Double_t &testStat) const
 
Double_t AndersonDarlingTest (const Char_t *option="p") const
 
void AndersonDarlingTest (Double_t &pvalue, Double_t &testStat) const
 
Double_t KolmogorovSmirnov2SamplesTest (const Char_t *option="p") const
 
void KolmogorovSmirnov2SamplesTest (Double_t &pvalue, Double_t &testStat) const
 
Double_t KolmogorovSmirnovTest (const Char_t *option="p") const
 
void KolmogorovSmirnovTest (Double_t &pvalue, Double_t &testStat) const
 
void operator() (ETestType test, Double_t &pvalue, Double_t &testStat) const
 
Double_t operator() (ETestType test=kAD, const Char_t *option="p") const
 
void SetDistribution (EDistribution dist, const std::vector< double > &distParams={})
 
void SetUserCDF (const IGenFunction &cdf, Double_t xmin=1, Double_t xmax=0)
 
template<class Dist >
void SetUserCDF (Dist &cdf, Double_t xmin=1, Double_t xmax=0)
 
void SetUserDistribution (const IGenFunction &dist, GoFTest::EUserDistribution userDist=kPDF, Double_t xmin=1, Double_t xmax=0)
 
template<class Dist >
void SetUserDistribution (Dist &dist, EUserDistribution userDist=kPDF, Double_t xmin=1, Double_t xmax=0)
 
void SetUserPDF (const IGenFunction &pdf, Double_t xmin=1, Double_t xmax=0)
 
template<class Dist >
void SetUserPDF (Dist &pdf, Double_t xmin=1, Double_t xmax=0)
 

Static Public Member Functions

static void AndersonDarling2SamplesTest (const ROOT::Fit::BinData &data1, const ROOT::Fit::BinData &data2, Double_t &pvalue, Double_t &testStat)
 
static Double_t PValueADKSamples (UInt_t nsamples, Double_t A2)
 

Private Member Functions

 GoFTest ()
 
 GoFTest (GoFTest &gof)
 
Double_t ExponentialCDF (Double_t x) const
 
Double_t GaussianCDF (Double_t x) const
 
void Instantiate (const Double_t *sample, UInt_t sampleSize)
 
Double_t LogNormalCDF (Double_t x) const
 
void LogSample ()
 
GoFTest operator= (GoFTest &gof)
 
Double_t PValueAD1Sample (Double_t A2) const
 
void SetCDF ()
 
void SetDistributionFunction (const IGenFunction &cdf, Bool_t isPDF, Double_t xmin, Double_t xmax)
 
void SetParameters (const std::vector< double > &params)
 
void SetSamples (std::vector< const Double_t * > samples, const std::vector< UInt_t > samplesSizes)
 

Static Private Member Functions

static Double_t GetSigmaN (const std::vector< UInt_t > &ns, UInt_t N)
 
static Double_t InterpolatePValues (int nsamples, Double_t A2)
 

Private Attributes

std::unique_ptr< IGenFunctionfCDF
 
std::vector< Double_tfCombinedSamples
 The distribution parameters (e.g. fParams[0] = mean, fParams[1] = sigma for a Gaussian)
 
EDistribution fDist
 
std::vector< Double_tfParams
 Type of distribution.
 
std::vector< std::vector< Double_t > > fSamples
 
Bool_t fTestSampleFromH0
 

#include <Math/GoFTest.h>

Member Enumeration Documentation

◆ EDistribution

Enumerator
kUndefined 
kUserDefined 
kGaussian 
kLogNormal 
kExponential 

Definition at line 42 of file GoFTest.h.

◆ ETestType

Enumerator
kAD 
kAD2s 
kKS 
kKS2s 

Definition at line 55 of file GoFTest.h.

◆ EUserDistribution

Enumerator
kCDF 
kPDF 

Definition at line 50 of file GoFTest.h.

Constructor & Destructor Documentation

◆ GoFTest() [1/6]

ROOT::Math::GoFTest::GoFTest ( UInt_t  sample1Size,
const Double_t sample1,
UInt_t  sample2Size,
const Double_t sample2 
)

Definition at line 133 of file GoFTest.cxx.

◆ GoFTest() [2/6]

ROOT::Math::GoFTest::GoFTest ( UInt_t  sampleSize,
const Double_t sample,
EDistribution  dist = kUndefined,
const std::vector< double > &  distParams = {} 
)

Definition at line 160 of file GoFTest.cxx.

◆ GoFTest() [3/6]

template<class Dist >
ROOT::Math::GoFTest::GoFTest ( UInt_t  sampleSize,
const Double_t sample,
Dist &  dist,
EUserDistribution  userDist = kPDF,
Double_t  xmin = 1,
Double_t  xmax = 0 
)
inline

Definition at line 70 of file GoFTest.h.

◆ GoFTest() [4/6]

ROOT::Math::GoFTest::GoFTest ( UInt_t  sampleSize,
const Double_t sample,
const IGenFunction dist,
EUserDistribution  userDist = kPDF,
Double_t  xmin = 1,
Double_t  xmax = 0 
)
inline

Definition at line 78 of file GoFTest.h.

◆ ~GoFTest()

ROOT::Math::GoFTest::~GoFTest ( )
virtual

Definition at line 178 of file GoFTest.cxx.

◆ GoFTest() [5/6]

ROOT::Math::GoFTest::GoFTest ( )
private

◆ GoFTest() [6/6]

ROOT::Math::GoFTest::GoFTest ( GoFTest gof)
private

Member Function Documentation

◆ AndersonDarling2SamplesTest() [1/3]

Double_t ROOT::Math::GoFTest::AndersonDarling2SamplesTest ( const Char_t option = "p") const

Definition at line 853 of file GoFTest.cxx.

◆ AndersonDarling2SamplesTest() [2/3]

void ROOT::Math::GoFTest::AndersonDarling2SamplesTest ( const ROOT::Fit::BinData data1,
const ROOT::Fit::BinData data2,
Double_t pvalue,
Double_t testStat 
)
static

Definition at line 749 of file GoFTest.cxx.

◆ AndersonDarling2SamplesTest() [3/3]

void ROOT::Math::GoFTest::AndersonDarling2SamplesTest ( Double_t pvalue,
Double_t testStat 
) const

Definition at line 645 of file GoFTest.cxx.

◆ AndersonDarlingTest() [1/2]

Double_t ROOT::Math::GoFTest::AndersonDarlingTest ( const Char_t option = "p") const

Definition at line 889 of file GoFTest.cxx.

◆ AndersonDarlingTest() [2/2]

void ROOT::Math::GoFTest::AndersonDarlingTest ( Double_t pvalue,
Double_t testStat 
) const

Definition at line 861 of file GoFTest.cxx.

◆ ExponentialCDF()

Double_t ROOT::Math::GoFTest::ExponentialCDF ( Double_t  x) const
private

Definition at line 298 of file GoFTest.cxx.

◆ GaussianCDF()

Double_t ROOT::Math::GoFTest::GaussianCDF ( Double_t  x) const
private

Definition at line 294 of file GoFTest.cxx.

◆ GetSigmaN()

Double_t ROOT::Math::GoFTest::GetSigmaN ( const std::vector< UInt_t > &  ns,
UInt_t  N 
)
staticprivate

Definition at line 310 of file GoFTest.cxx.

◆ Instantiate()

void ROOT::Math::GoFTest::Instantiate ( const Double_t sample,
UInt_t  sampleSize 
)
private

Definition at line 278 of file GoFTest.cxx.

◆ InterpolatePValues()

static Double_t ROOT::Math::GoFTest::InterpolatePValues ( int  nsamples,
Double_t  A2 
)
staticprivate

◆ KolmogorovSmirnov2SamplesTest() [1/2]

Double_t ROOT::Math::GoFTest::KolmogorovSmirnov2SamplesTest ( const Char_t option = "p") const

Definition at line 912 of file GoFTest.cxx.

◆ KolmogorovSmirnov2SamplesTest() [2/2]

void ROOT::Math::GoFTest::KolmogorovSmirnov2SamplesTest ( Double_t pvalue,
Double_t testStat 
) const

Definition at line 895 of file GoFTest.cxx.

◆ KolmogorovSmirnovTest() [1/2]

Double_t ROOT::Math::GoFTest::KolmogorovSmirnovTest ( const Char_t option = "p") const

Definition at line 944 of file GoFTest.cxx.

◆ KolmogorovSmirnovTest() [2/2]

void ROOT::Math::GoFTest::KolmogorovSmirnovTest ( Double_t pvalue,
Double_t testStat 
) const

Definition at line 920 of file GoFTest.cxx.

◆ LogNormalCDF()

Double_t ROOT::Math::GoFTest::LogNormalCDF ( Double_t  x) const
private

◆ LogSample()

void ROOT::Math::GoFTest::LogSample ( )
private

Definition at line 302 of file GoFTest.cxx.

◆ operator()() [1/2]

void ROOT::Math::GoFTest::operator() ( ETestType  test,
Double_t pvalue,
Double_t testStat 
) const

Definition at line 207 of file GoFTest.cxx.

◆ operator()() [2/2]

Double_t ROOT::Math::GoFTest::operator() ( ETestType  test = kAD,
const Char_t option = "p" 
) const

Definition at line 224 of file GoFTest.cxx.

◆ operator=()

GoFTest ROOT::Math::GoFTest::operator= ( GoFTest gof)
private

◆ PValueAD1Sample()

Double_t ROOT::Math::GoFTest::PValueAD1Sample ( Double_t  A2) const
private

Definition at line 482 of file GoFTest.cxx.

◆ PValueADKSamples()

Double_t ROOT::Math::GoFTest::PValueADKSamples ( UInt_t  nsamples,
Double_t  A2 
)
static

Definition at line 352 of file GoFTest.cxx.

◆ SetCDF()

void ROOT::Math::GoFTest::SetCDF ( )
private

Definition at line 243 of file GoFTest.cxx.

◆ SetDistribution()

void ROOT::Math::GoFTest::SetDistribution ( EDistribution  dist,
const std::vector< double > &  distParams = {} 
)

Definition at line 123 of file GoFTest.cxx.

◆ SetDistributionFunction()

void ROOT::Math::GoFTest::SetDistributionFunction ( const IGenFunction cdf,
Bool_t  isPDF,
Double_t  xmin,
Double_t  xmax 
)
private

Definition at line 266 of file GoFTest.cxx.

◆ SetParameters()

void ROOT::Math::GoFTest::SetParameters ( const std::vector< double > &  params)
private

Definition at line 203 of file GoFTest.cxx.

◆ SetSamples()

void ROOT::Math::GoFTest::SetSamples ( std::vector< const Double_t * >  samples,
const std::vector< UInt_t samplesSizes 
)
private

Definition at line 180 of file GoFTest.cxx.

◆ SetUserCDF() [1/2]

void ROOT::Math::GoFTest::SetUserCDF ( const IGenFunction cdf,
Double_t  xmin = 1,
Double_t  xmax = 0 
)
inline

Definition at line 117 of file GoFTest.h.

◆ SetUserCDF() [2/2]

template<class Dist >
void ROOT::Math::GoFTest::SetUserCDF ( Dist &  cdf,
Double_t  xmin = 1,
Double_t  xmax = 0 
)
inline

Definition at line 112 of file GoFTest.h.

◆ SetUserDistribution() [1/2]

void ROOT::Math::GoFTest::SetUserDistribution ( const IGenFunction dist,
GoFTest::EUserDistribution  userDist = kPDF,
Double_t  xmin = 1,
Double_t  xmax = 0 
)
inline

Definition at line 93 of file GoFTest.h.

◆ SetUserDistribution() [2/2]

template<class Dist >
void ROOT::Math::GoFTest::SetUserDistribution ( Dist &  dist,
EUserDistribution  userDist = kPDF,
Double_t  xmin = 1,
Double_t  xmax = 0 
)
inline

Definition at line 87 of file GoFTest.h.

◆ SetUserPDF() [1/2]

void ROOT::Math::GoFTest::SetUserPDF ( const IGenFunction pdf,
Double_t  xmin = 1,
Double_t  xmax = 0 
)
inline

Definition at line 104 of file GoFTest.h.

◆ SetUserPDF() [2/2]

template<class Dist >
void ROOT::Math::GoFTest::SetUserPDF ( Dist &  pdf,
Double_t  xmin = 1,
Double_t  xmax = 0 
)
inline

Definition at line 99 of file GoFTest.h.

Member Data Documentation

◆ fCDF

std::unique_ptr<IGenFunction> ROOT::Math::GoFTest::fCDF
private

Definition at line 182 of file GoFTest.h.

◆ fCombinedSamples

std::vector<Double_t> ROOT::Math::GoFTest::fCombinedSamples
private

The distribution parameters (e.g. fParams[0] = mean, fParams[1] = sigma for a Gaussian)

Definition at line 188 of file GoFTest.h.

◆ fDist

EDistribution ROOT::Math::GoFTest::fDist
private

Definition at line 185 of file GoFTest.h.

◆ fParams

std::vector<Double_t> ROOT::Math::GoFTest::fParams
private

Type of distribution.

Definition at line 186 of file GoFTest.h.

◆ fSamples

std::vector<std::vector<Double_t> > ROOT::Math::GoFTest::fSamples
private

Definition at line 190 of file GoFTest.h.

◆ fTestSampleFromH0

Bool_t ROOT::Math::GoFTest::fTestSampleFromH0
private

Definition at line 192 of file GoFTest.h.

Libraries for ROOT::Math::GoFTest:

The documentation for this class was generated from the following files: