68 bool doProfile =
true;
73 oocoutI(
nullptr,InputArguments) <<
"Using given conditional MLEs for Null." << endl;
80 if( remain.
empty() ) doProfile =
false;
87 oocoutI(
nullptr,InputArguments) <<
"Profiling conditional MLEs for Null." << endl;
101 std::unique_ptr<RooAbsArg> profileOwner{nll->createProfile(allButNuisance)};
102 auto profile =
dynamic_cast<RooProfileLL*
>(profileOwner.get());
109 std::unique_ptr<RooFitResult>
result {profile->minimizer()->save()};
120 if (testStatSampler) testStatistic = testStatSampler->GetTestStatistic();
138 oocoutI(
nullptr,InputArguments) <<
"Using a ToyMCSampler. Now configuring for Null." << endl;
148 oocoutI(
nullptr,InputArguments) <<
"Adaptive Sampling" << endl;
174 bool doProfile =
true;
179 oocoutI(
nullptr,InputArguments) <<
"Using given conditional MLEs for Alt." << endl;
186 if( remain.
empty() ) doProfile =
false;
193 oocoutI(
nullptr,InputArguments) <<
"Profiling conditional MLEs for Alt." << endl;
208 std::unique_ptr<RooAbsReal> profileOwner{nll->createProfile(allButNuisance)};
209 auto profile =
dynamic_cast<RooProfileLL*
>(profileOwner.get());
216 std::unique_ptr<RooFitResult>
result {profile->minimizer()->save()};
227 if (testStatSampler) testStatistic = testStatSampler->GetTestStatistic();
244 oocoutI(
nullptr,InputArguments) <<
"Using a ToyMCSampler. Now configuring for Alt." << endl;
254 oocoutI(
nullptr,InputArguments) <<
"Adaptive Sampling" << endl;
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t result
static int DefaultPrintLevel()
RooFit::OwningPtr< RooArgSet > getParameters(const RooAbsData *data, bool stripDisconnected=true) const
Create a list of leaf nodes in the arg tree starting with ourself as top node that don't match any of...
virtual bool remove(const RooAbsArg &var, bool silent=false, bool matchByNameOnly=false)
Remove the specified argument from our list.
virtual bool add(const RooAbsArg &var, bool silent=false)
Add the specified argument to list.
virtual bool addOwned(RooAbsArg &var, bool silent=false)
Add an argument and transfer the ownership to the collection.
Abstract base class for binned and unbinned datasets.
RooFit::OwningPtr< RooAbsReal > createNLL(RooAbsData &data, CmdArgs_t const &... cmdArgs)
Construct representation of -log(L) of PDF with given dataset.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
void setPrintLevel(int newLevel)
Change the MINUIT internal printing level.
static RooMsgService & instance()
Return reference to singleton instance.
void setGlobalKillBelow(RooFit::MsgLevel level)
RooFit::MsgLevel globalKillBelow() const
Class RooProfileLL implements the profile likelihood estimator for a given likelihood and set of para...
RooMinimizer * minimizer()
static RooArgSet * GetAsArgSet(RooFitResult *result, TString prefix="", bool withErrorsAndPulls=false)
Translate the given fit result to a RooArgSet in a generic way.
Does a frequentist hypothesis test.
const RooArgSet * fConditionalMLEsNull
void PostHook() const override
int PreNullHook(RooArgSet *parameterPoint, double obsTestStat) const override
configure TestStatSampler for the Null run
void PreHook() const override
int PreAltHook(RooArgSet *parameterPoint, double obsTestStat) const override
configure TestStatSampler for the Alt run
const RooArgSet * fConditionalMLEsAlt
const ModelConfig * GetNullModel(void) const
const ModelConfig * fAltModel
TestStatSampler * GetTestStatSampler(void) const
Returns instance of TestStatSampler.
const ModelConfig * fNullModel
const RooArgSet * GetConditionalObservables() const
get RooArgSet for conditional observables (return nullptr if not existing)
const RooArgSet * GetGlobalObservables() const
get RooArgSet for global observables (return nullptr if not existing)
const RooArgSet * GetNuisanceParameters() const
get RooArgSet containing the nuisance parameters (return nullptr if not existing)
void LoadSnapshot() const
load the snapshot from ws if it exists
RooAbsPdf * GetPdf() const
get model PDF (return nullptr if pdf has not been specified or does not exist)
TestStatistic is an interface class to provide a facility for construction test statistics distributi...
virtual void SetConditionalObservables(const RooArgSet &)
interface to set conditional observables. If a test statistics needs them it will re-implement this f...
virtual void SetGlobalObservables(const RooArgSet &)
interface to set global observables. If a test statistics needs them it will re-implement this functi...
ToyMCSampler is an implementation of the TestStatSampler interface.
virtual void SetNToys(const Int_t ntoy)
void SetToysBothTails(double toys, double low_threshold, double high_threshold)
void SetToysRightTail(double toys, double threshold)
void SetToysLeftTail(double toys, double threshold)
void SetGlobalObservables(const RooArgSet &o) override
specify the conditional observables
RooCmdArg Offset(std::string const &mode)
RooCmdArg Constrain(const RooArgSet ¶ms)
RooCmdArg GlobalObservables(Args_t &&... argsOrArgSet)
RooCmdArg CloneData(bool flag)
RooCmdArg ConditionalObservables(Args_t &&... argsOrArgSet)
Create a RooCmdArg to declare conditional observables.
MsgLevel
Verbosity level for RooMsgService::StreamConfig in RooMsgService.
Namespace for the RooStats classes.
void RemoveConstantParameters(RooArgSet *set)
RooStatsConfig & GetGlobalRooStatsConfig()
Retrieve the config object which can be used to set flags for things like offsetting the likelihood o...