#ifndef ROOSTATS_AsymptoticCalculator
#define ROOSTATS_AsymptoticCalculator
#ifndef ROOSTATS_HypoTestCalculatorGeneric
#include "RooStats/HypoTestCalculatorGeneric.h"
#endif
class RooArgSet;
class RooPoisson;
class RooProdPdf;
namespace RooStats {
class AsymptoticCalculator : public HypoTestCalculatorGeneric {
public:
AsymptoticCalculator(
RooAbsData &data,
const ModelConfig &altModel,
const ModelConfig &nullModel,
bool nominalAsimov = false
);
~AsymptoticCalculator() {
}
bool Initialize() const;
virtual HypoTestResult *GetHypoTest() const;
static RooAbsData * MakeAsimovData( RooAbsData & data, const ModelConfig & model, const RooArgSet & poiValues, RooArgSet & globObs, const RooArgSet * genPoiValues = 0);
static RooAbsData * MakeAsimovData( const ModelConfig & model, const RooArgSet & allParamValues, RooArgSet & globObs);
static RooAbsData * GenerateAsimovData(const RooAbsPdf & pdf, const RooArgSet & observables );
static double GetExpectedPValues(double pnull, double palt, double nsigma, bool usecls, bool oneSided = true );
void SetOneSided(bool on) { fOneSided = on; }
void SetTwoSided() { fOneSided = false; fOneSidedDiscovery = false;}
void SetOneSidedDiscovery(bool on) { fOneSidedDiscovery = on; }
virtual void SetNullModel(const ModelConfig &nullModel) {
HypoTestCalculatorGeneric::SetNullModel(nullModel);
fIsInitialized = false;
}
virtual void SetAlternateModel(const ModelConfig &altModel) {
HypoTestCalculatorGeneric::SetAlternateModel(altModel);
fIsInitialized = false;
}
virtual void SetData(RooAbsData &data) {
HypoTestCalculatorGeneric::SetData(data);
fIsInitialized = false;
}
bool IsTwoSided() const { return (!fOneSided && !fOneSidedDiscovery); }
bool IsOneSidedDiscovery() const { return fOneSidedDiscovery; }
void SetQTilde(bool on) { fUseQTilde = on; }
const RooArgSet & GetBestFitPoi() const { return fBestFitPoi; }
const RooRealVar * GetMuHat() const { return dynamic_cast<RooRealVar*>(fBestFitPoi.first()); }
const RooArgSet & GetBestFitParams() const { return fBestFitPoi; }
static void SetPrintLevel(int level);
protected:
static RooAbsData * GenerateAsimovDataSinglePdf(const RooAbsPdf & pdf, const RooArgSet & obs, const RooRealVar & weightVar,
RooCategory * channelCat = 0);
static RooAbsData * GenerateCountingAsimovData(RooAbsPdf & pdf, const RooArgSet & obs, const RooRealVar & weightVar,
RooCategory * channelCat = 0);
static void FillBins(const RooAbsPdf & pdf, const RooArgList &obs, RooAbsData & data, int &index, double
&binVolume, int &ibin);
static double EvaluateNLL(RooAbsPdf & pdf, RooAbsData& data, const RooArgSet * condObs, const RooArgSet *poiSet = 0 );
static bool SetObsToExpected(RooAbsPdf &pdf, const RooArgSet &obs);
static bool SetObsToExpected(RooProdPdf &prod, const RooArgSet &obs);
protected:
ClassDef(AsymptoticCalculator,2)
private:
bool fOneSided;
mutable bool fOneSidedDiscovery;
bool fNominalAsimov;
mutable bool fIsInitialized;
mutable int fUseQTilde;
static int fgPrintLevel;
mutable double fNLLObs;
mutable double fNLLAsimov;
mutable RooAbsData * fAsimovData;
mutable RooArgSet fAsimovGlobObs;
mutable RooArgSet fBestFitPoi;
mutable RooArgSet fBestFitParams;
};
}
#endif
AsymptoticCalculator.h:10 AsymptoticCalculator.h:11 AsymptoticCalculator.h:12 AsymptoticCalculator.h:13 AsymptoticCalculator.h:14 AsymptoticCalculator.h:15 AsymptoticCalculator.h:16 AsymptoticCalculator.h:17 AsymptoticCalculator.h:18 AsymptoticCalculator.h:19 AsymptoticCalculator.h:20 AsymptoticCalculator.h:21 AsymptoticCalculator.h:22 AsymptoticCalculator.h:23 AsymptoticCalculator.h:24 AsymptoticCalculator.h:25 AsymptoticCalculator.h:26 AsymptoticCalculator.h:27 AsymptoticCalculator.h:28 AsymptoticCalculator.h:29 AsymptoticCalculator.h:30 AsymptoticCalculator.h:31 AsymptoticCalculator.h:32 AsymptoticCalculator.h:33 AsymptoticCalculator.h:34 AsymptoticCalculator.h:35 AsymptoticCalculator.h:36 AsymptoticCalculator.h:37 AsymptoticCalculator.h:38 AsymptoticCalculator.h:39 AsymptoticCalculator.h:40 AsymptoticCalculator.h:41 AsymptoticCalculator.h:42 AsymptoticCalculator.h:43 AsymptoticCalculator.h:44 AsymptoticCalculator.h:45 AsymptoticCalculator.h:46 AsymptoticCalculator.h:47 AsymptoticCalculator.h:48 AsymptoticCalculator.h:49 AsymptoticCalculator.h:50 AsymptoticCalculator.h:51 AsymptoticCalculator.h:52 AsymptoticCalculator.h:53 AsymptoticCalculator.h:54 AsymptoticCalculator.h:55 AsymptoticCalculator.h:56 AsymptoticCalculator.h:57 AsymptoticCalculator.h:58 AsymptoticCalculator.h:59 AsymptoticCalculator.h:60 AsymptoticCalculator.h:61 AsymptoticCalculator.h:62 AsymptoticCalculator.h:63 AsymptoticCalculator.h:64 AsymptoticCalculator.h:65 AsymptoticCalculator.h:66 AsymptoticCalculator.h:67 AsymptoticCalculator.h:68 AsymptoticCalculator.h:69 AsymptoticCalculator.h:70 AsymptoticCalculator.h:71 AsymptoticCalculator.h:72 AsymptoticCalculator.h:73 AsymptoticCalculator.h:74 AsymptoticCalculator.h:75 AsymptoticCalculator.h:76 AsymptoticCalculator.h:77 AsymptoticCalculator.h:78 AsymptoticCalculator.h:79 AsymptoticCalculator.h:80 AsymptoticCalculator.h:81 AsymptoticCalculator.h:82 AsymptoticCalculator.h:83 AsymptoticCalculator.h:84 AsymptoticCalculator.h:85 AsymptoticCalculator.h:86 AsymptoticCalculator.h:87 AsymptoticCalculator.h:88 AsymptoticCalculator.h:89 AsymptoticCalculator.h:90 AsymptoticCalculator.h:91 AsymptoticCalculator.h:92 AsymptoticCalculator.h:93 AsymptoticCalculator.h:94 AsymptoticCalculator.h:95 AsymptoticCalculator.h:96 AsymptoticCalculator.h:97 AsymptoticCalculator.h:98 AsymptoticCalculator.h:99 AsymptoticCalculator.h:100 AsymptoticCalculator.h:101 AsymptoticCalculator.h:102 AsymptoticCalculator.h:103 AsymptoticCalculator.h:104 AsymptoticCalculator.h:105 AsymptoticCalculator.h:106 AsymptoticCalculator.h:107 AsymptoticCalculator.h:108 AsymptoticCalculator.h:109 AsymptoticCalculator.h:110 AsymptoticCalculator.h:111 AsymptoticCalculator.h:112 AsymptoticCalculator.h:113 AsymptoticCalculator.h:114 AsymptoticCalculator.h:115 AsymptoticCalculator.h:116 AsymptoticCalculator.h:117 AsymptoticCalculator.h:118 AsymptoticCalculator.h:119 AsymptoticCalculator.h:120 AsymptoticCalculator.h:121 AsymptoticCalculator.h:122 AsymptoticCalculator.h:123 AsymptoticCalculator.h:124 AsymptoticCalculator.h:125 AsymptoticCalculator.h:126 AsymptoticCalculator.h:127 AsymptoticCalculator.h:128 AsymptoticCalculator.h:129 AsymptoticCalculator.h:130 AsymptoticCalculator.h:131 AsymptoticCalculator.h:132 AsymptoticCalculator.h:133 AsymptoticCalculator.h:134 AsymptoticCalculator.h:135 AsymptoticCalculator.h:136 AsymptoticCalculator.h:137 AsymptoticCalculator.h:138 AsymptoticCalculator.h:139 AsymptoticCalculator.h:140 AsymptoticCalculator.h:141 AsymptoticCalculator.h:142 AsymptoticCalculator.h:143 AsymptoticCalculator.h:144 AsymptoticCalculator.h:145 AsymptoticCalculator.h:146 AsymptoticCalculator.h:147 AsymptoticCalculator.h:148 AsymptoticCalculator.h:149 AsymptoticCalculator.h:150 AsymptoticCalculator.h:151 AsymptoticCalculator.h:152 AsymptoticCalculator.h:153 AsymptoticCalculator.h:154 AsymptoticCalculator.h:155 AsymptoticCalculator.h:156 AsymptoticCalculator.h:157 AsymptoticCalculator.h:158 AsymptoticCalculator.h:159 AsymptoticCalculator.h:160 AsymptoticCalculator.h:161 AsymptoticCalculator.h:162 AsymptoticCalculator.h:163 AsymptoticCalculator.h:164