#ifndef ROOSTATS_HypoTestCalculatorGeneric
#define ROOSTATS_HypoTestCalculatorGeneric
#ifndef ROOT_Rtypes
#include "Rtypes.h"
#endif
#ifndef ROOSTATS_HypoTestCalculator
#include "RooStats/HypoTestCalculator.h"
#endif
#ifndef ROOSTATS_ModelConfig
#include "RooStats/ModelConfig.h"
#endif
#ifndef ROOSTATS_TestStatistic
#include "RooStats/TestStatistic.h"
#endif
#ifndef ROOSTATS_TestStatSampler
#include "RooStats/TestStatSampler.h"
#endif
#ifndef ROOSTATS_SamplingDistribution
#include "RooStats/SamplingDistribution.h"
#endif
#ifndef ROOSTATS_HypoTestResult
#include "RooStats/HypoTestResult.h"
#endif
namespace RooStats {
class HypoTestCalculatorGeneric : public HypoTestCalculator {
public:
HypoTestCalculatorGeneric(
const RooAbsData &data,
const ModelConfig &altModel,
const ModelConfig &nullModel,
TestStatSampler* sampler=0
);
~HypoTestCalculatorGeneric();
public:
virtual HypoTestResult* GetHypoTest() const;
virtual void SetNullModel(const ModelConfig &nullModel) { fNullModel = &nullModel; }
const RooAbsData * GetData(void) const { return fData; }
const ModelConfig* GetNullModel(void) const { return fNullModel; }
virtual const RooArgSet* GetFitInfo() const { return NULL; }
virtual void SetAlternateModel(const ModelConfig &altModel) { fAltModel = &altModel; }
const ModelConfig* GetAlternateModel(void) const { return fAltModel; }
virtual void SetData(RooAbsData &data) { fData = &data; }
TestStatSampler* GetTestStatSampler(void) const { return fTestStatSampler; }
void UseSameAltToys();
protected:
virtual int CheckHook(void) const { return 0; }
virtual int PreNullHook(RooArgSet* , double ) const { return 0; }
virtual int PreAltHook(RooArgSet* , double ) const { return 0; }
virtual void PreHook() const { }
virtual void PostHook() const { }
protected:
const ModelConfig *fAltModel;
const ModelConfig *fNullModel;
const RooAbsData *fData;
TestStatSampler *fTestStatSampler;
TestStatSampler *fDefaultSampler;
TestStatistic *fDefaultTestStat;
unsigned int fAltToysSeed;
private:
void SetupSampler(const ModelConfig& model) const;
void SetAdaptiveLimits(Double_t obsTestStat, Bool_t forNull) const;
SamplingDistribution* GenerateSamplingDistribution(
ModelConfig *thisModel,
double obsTestStat,
RooAbsPdf *impDens=NULL,
const RooArgSet *impSnapshot=NULL
) const;
protected:
ClassDef(HypoTestCalculatorGeneric,2)
};
}
#endif
HypoTestCalculatorGeneric.h:1 HypoTestCalculatorGeneric.h:2 HypoTestCalculatorGeneric.h:3 HypoTestCalculatorGeneric.h:4 HypoTestCalculatorGeneric.h:5 HypoTestCalculatorGeneric.h:6 HypoTestCalculatorGeneric.h:7 HypoTestCalculatorGeneric.h:8 HypoTestCalculatorGeneric.h:9 HypoTestCalculatorGeneric.h:10 HypoTestCalculatorGeneric.h:11 HypoTestCalculatorGeneric.h:12 HypoTestCalculatorGeneric.h:13 HypoTestCalculatorGeneric.h:14 HypoTestCalculatorGeneric.h:15 HypoTestCalculatorGeneric.h:16 HypoTestCalculatorGeneric.h:17 HypoTestCalculatorGeneric.h:18 HypoTestCalculatorGeneric.h:19 HypoTestCalculatorGeneric.h:20 HypoTestCalculatorGeneric.h:21 HypoTestCalculatorGeneric.h:22 HypoTestCalculatorGeneric.h:23 HypoTestCalculatorGeneric.h:24 HypoTestCalculatorGeneric.h:25 HypoTestCalculatorGeneric.h:26 HypoTestCalculatorGeneric.h:27 HypoTestCalculatorGeneric.h:28 HypoTestCalculatorGeneric.h:29 HypoTestCalculatorGeneric.h:30 HypoTestCalculatorGeneric.h:31 HypoTestCalculatorGeneric.h:32 HypoTestCalculatorGeneric.h:33 HypoTestCalculatorGeneric.h:34 HypoTestCalculatorGeneric.h:35 HypoTestCalculatorGeneric.h:36 HypoTestCalculatorGeneric.h:37 HypoTestCalculatorGeneric.h:38 HypoTestCalculatorGeneric.h:39 HypoTestCalculatorGeneric.h:40 HypoTestCalculatorGeneric.h:41 HypoTestCalculatorGeneric.h:42 HypoTestCalculatorGeneric.h:43 HypoTestCalculatorGeneric.h:44 HypoTestCalculatorGeneric.h:45 HypoTestCalculatorGeneric.h:46 HypoTestCalculatorGeneric.h:47 HypoTestCalculatorGeneric.h:48 HypoTestCalculatorGeneric.h:49 HypoTestCalculatorGeneric.h:50 HypoTestCalculatorGeneric.h:51 HypoTestCalculatorGeneric.h:52 HypoTestCalculatorGeneric.h:53 HypoTestCalculatorGeneric.h:54 HypoTestCalculatorGeneric.h:55 HypoTestCalculatorGeneric.h:56 HypoTestCalculatorGeneric.h:57 HypoTestCalculatorGeneric.h:58 HypoTestCalculatorGeneric.h:59 HypoTestCalculatorGeneric.h:60 HypoTestCalculatorGeneric.h:61 HypoTestCalculatorGeneric.h:62 HypoTestCalculatorGeneric.h:63 HypoTestCalculatorGeneric.h:64 HypoTestCalculatorGeneric.h:65 HypoTestCalculatorGeneric.h:66 HypoTestCalculatorGeneric.h:67 HypoTestCalculatorGeneric.h:68 HypoTestCalculatorGeneric.h:69 HypoTestCalculatorGeneric.h:70 HypoTestCalculatorGeneric.h:71 HypoTestCalculatorGeneric.h:72 HypoTestCalculatorGeneric.h:73 HypoTestCalculatorGeneric.h:74 HypoTestCalculatorGeneric.h:75 HypoTestCalculatorGeneric.h:76 HypoTestCalculatorGeneric.h:77 HypoTestCalculatorGeneric.h:78 HypoTestCalculatorGeneric.h:79 HypoTestCalculatorGeneric.h:80 HypoTestCalculatorGeneric.h:81 HypoTestCalculatorGeneric.h:82 HypoTestCalculatorGeneric.h:83 HypoTestCalculatorGeneric.h:84 HypoTestCalculatorGeneric.h:85 HypoTestCalculatorGeneric.h:86 HypoTestCalculatorGeneric.h:87 HypoTestCalculatorGeneric.h:88 HypoTestCalculatorGeneric.h:89 HypoTestCalculatorGeneric.h:90 HypoTestCalculatorGeneric.h:91 HypoTestCalculatorGeneric.h:92 HypoTestCalculatorGeneric.h:93 HypoTestCalculatorGeneric.h:94 HypoTestCalculatorGeneric.h:95 HypoTestCalculatorGeneric.h:96 HypoTestCalculatorGeneric.h:97 HypoTestCalculatorGeneric.h:98 HypoTestCalculatorGeneric.h:99 HypoTestCalculatorGeneric.h:100 HypoTestCalculatorGeneric.h:101 HypoTestCalculatorGeneric.h:102 HypoTestCalculatorGeneric.h:103 HypoTestCalculatorGeneric.h:104 HypoTestCalculatorGeneric.h:105 HypoTestCalculatorGeneric.h:106 HypoTestCalculatorGeneric.h:107 HypoTestCalculatorGeneric.h:108 HypoTestCalculatorGeneric.h:109 HypoTestCalculatorGeneric.h:110 HypoTestCalculatorGeneric.h:111 HypoTestCalculatorGeneric.h:112 HypoTestCalculatorGeneric.h:113 HypoTestCalculatorGeneric.h:114 HypoTestCalculatorGeneric.h:115 HypoTestCalculatorGeneric.h:116 HypoTestCalculatorGeneric.h:117 HypoTestCalculatorGeneric.h:118 HypoTestCalculatorGeneric.h:119