/usr/include/root/RooStats/HypoTestCalculatorGeneric.h is in libroot-roofit-dev 5.34.30-0ubuntu8.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | // @(#)root/roostats:$Id$
// Author: Kyle Cranmer, Sven Kreiss 23/05/10
/*************************************************************************
* Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. *
* All rights reserved. *
* *
* For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/
#ifndef ROOSTATS_HypoTestCalculatorGeneric
#define ROOSTATS_HypoTestCalculatorGeneric
#ifndef ROOT_Rtypes
#include "Rtypes.h" // necessary for TNamed
#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:
/// inherited methods from HypoTestCalculator interface
virtual HypoTestResult* GetHypoTest() const;
// set the model for the null hypothesis (only B)
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; }
// set the model for the alternate hypothesis (S+B)
virtual void SetAlternateModel(const ModelConfig &altModel) { fAltModel = &altModel; }
const ModelConfig* GetAlternateModel(void) const { return fAltModel; }
// Set the DataSet
virtual void SetData(RooAbsData &data) { fData = &data; }
// Returns instance of TestStatSampler. Use to change properties of
// TestStatSampler, e.g. GetTestStatSampler.SetTestSize(Double_t size);
TestStatSampler* GetTestStatSampler(void) const { return fTestStatSampler; }
// set this for re-using always the same toys for alternate hypothesis in
// case of calls at dofferent null parameter points
// This is useful to get more stable bands when running the HypoTest inversion
void UseSameAltToys();
protected:
// should return zero (to be used later for conditional flow)
virtual int CheckHook(void) const { return 0; }
virtual int PreNullHook(RooArgSet* /*parameterPoint*/, double /*obsTestStat*/) const { return 0; }
virtual int PreAltHook(RooArgSet* /*parameterPoint*/, double /*obsTestStat*/) 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; // to have same toys for alternate
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
|