28 if( fPriorNuisanceNull && (!fNullModel->GetNuisanceParameters() || fNullModel->GetNuisanceParameters()->getSize() == 0) ) {
29 oocoutE((
TObject*)0,
InputArguments) <<
"HybridCalculator - Nuisance PDF has been specified, but is unaware of which parameters are the nuisance parameters. Must set nuisance parameters in the Null ModelConfig." << endl;
32 if( fPriorNuisanceAlt && (!fAltModel->GetNuisanceParameters() || fAltModel->GetNuisanceParameters()->getSize() == 0) ) {
33 oocoutE((
TObject*)0,
InputArguments) <<
"HybridCalculator - Nuisance PDF has been specified, but is unaware of which parameters are the nuisance parameters. Must set nuisance parameters in the Alt ModelConfig" << endl;
41 int HybridCalculator::PreNullHook(
RooArgSet* ,
double obsTestStat)
const {
46 if(fPriorNuisanceNull) {
48 fTestStatSampler->SetPriorNuisance(fPriorNuisanceNull);
50 fNullModel->GetNuisanceParameters() ==
NULL ||
51 fNullModel->GetNuisanceParameters()->getSize() == 0
54 <<
"HybridCalculator - No nuisance parameters specified for Null model and no prior forced. "
55 <<
"Case is reduced to simple hypothesis testing with no uncertainty." << endl;
69 if(fNToysNull >= 0) toymcs->
SetNToys(fNToysNull);
74 if(GetTestStatSampler()->GetTestStatistic()->PValueIsRightTail()) {
83 GetNullModel()->LoadSnapshot();
90 int HybridCalculator::PreAltHook(
RooArgSet* ,
double obsTestStat)
const {
94 if(fPriorNuisanceAlt){
96 fTestStatSampler->SetPriorNuisance(fPriorNuisanceAlt);
98 fAltModel->GetNuisanceParameters()==
NULL ||
99 fAltModel->GetNuisanceParameters()->getSize()==0
102 <<
"HybridCalculator - No nuisance parameters specified for Alt model and no prior forced. "
103 <<
"Case is reduced to simple hypothesis testing with no uncertainty." << endl;
117 if(fNToysAlt >= 0) toymcs->
SetNToys(fNToysAlt);
122 if(GetTestStatSampler()->GetTestStatistic()->PValueIsRightTail()) {
void SetToysLeftTail(Double_t toys, Double_t threshold)
void SetToysRightTail(Double_t toys, Double_t threshold)
ClassImp(RooStats::HybridCalculator) using namespace RooStats
Same purpose as HybridCalculatorOriginal, but different implementation.
void SetToysBothTails(Double_t toys, Double_t low_threshold, Double_t high_threshold)
virtual void SetNToys(const Int_t ntoy)
ToyMCSampler is an implementation of the TestStatSampler interface.
This class implements the Hypothesis test calculation using an hybrid (frequentist/bayesian) procedur...
Namespace for the RooStats classes.
Mother of all ROOT objects.