Hi,
I am doing a simple hypothesis test using the frequentistCalculator.
I am throwing toys and I am interested in the information of each toy. So I am making use of the EnabledDetailedOutput on my test statistic.
This is basically what I have done:
FrequentistCalculator * fc = new FrequentistCalculator(*data, *sbModel, *bModel);
fc->SetToys(5000,5000);
// create the test statistics
ProfileLikelihoodTestStat profll(*sbModel->GetPdf());
profll.EnableDetailedOutput();
// use one-sided profile likelihood
profll.SetOneSidedDiscovery(true);
// configure ToyMCSampler and set the test statistics
ToyMCSampler *toymcs = (ToyMCSampler*)fc->GetTestStatSampler();
toymcs->SetTestStatistic(&profll);
if (!sbModel->GetPdf()->canBeExtended())
toymcs->SetNEventsPerToy(1);
HypoTestResult * r = fc->GetHypoTest();
RooDataSet * altData = r->GetAltDetailedOutput();
altData->Print();
RooDataSet *fitInfo = r->GetFitInfo();
if(!fitInfo)
std::cout<<"FIT INFO returned null....."<<std::endl;
else
fitInfo->Print();
For some reason the RooDataSet from the r->GetFitInfo() is just a null pointer. The GetAltDetailedOutput is fine and I get results from that with no problem. Is there a particular order I should be calling this function? Any suggestions would be much appreciated!
Thanks!
Rob