93 coutE(InputArguments) <<
"RooDLLSignificanceMCSModule::initializeInstance:: ERROR: No parameter named " <<
_parName <<
" in RooMCStudy!" << std::endl ;
98 std::string nll0hName =
"nll_nullhypo_" +
_parName;
99 std::string nll0hTitle =
"-log(L) with null hypothesis for param " +
_parName;
100 _nll0h = std::make_unique<RooRealVar>(nll0hName.c_str(),nll0hTitle.c_str(),0) ;
103 std::string dll0hName =
"dll_nullhypo_" +
_parName;
104 std::string dll0hTitle =
"-log(L) difference w.r.t null hypo for param " +
_parName;
105 _dll0h = std::make_unique<RooRealVar>(dll0hName.c_str(),dll0hTitle.c_str(),0) ;
108 std::string sig0hName =
"significance_nullhypo_" +
_parName;
109 std::string sig0hTitle =
"Gaussian signficiance of Delta(-log(L)) w.r.t null hypo for param " +
_parName;
110 _sig0h = std::make_unique<RooRealVar>(sig0hName.c_str(),sig0hTitle.c_str(),-10,100) ;
156 std::unique_ptr<RooFitResult> frnull{
refit()};
159 _nll0h->setVal(frnull->minNll()) ;
161 double deltaLL = (frnull->minNll() -
nllVar()->getVal()) ;
162 double signif = deltaLL>0 ? sqrt(2*deltaLL) : -sqrt(-2*deltaLL) ;
int Int_t
Signed integer 4 bytes (int).
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
RooAbsArg * find(const char *name) const
Find object with given name in list.
RooRealVar * nllVar()
Return pointer to RooRealVar holding minimized -log(L) value.
RooFit::OwningPtr< RooFitResult > refit(RooAbsData *inGenSample=nullptr)
Refit model using original or specified data sample.
RooAbsMCStudyModule(const char *name, const char *title)
Constructor.
RooArgSet * fitParams()
Return current value of parameters of fit model.
void setConstant(bool value=true)
RooArgSet is a container object that can hold multiple RooAbsArg objects.
std::unique_ptr< RooRealVar > _nll0h
Container variable for NLL result on null hypothesis.
std::unique_ptr< RooRealVar > _sig0h
Container variable for NLL result with signal.
double _nullValue
Numeric value of Nsignal parameter representing the null hypothesis.
~RooDLLSignificanceMCSModule() override
bool initializeRun(Int_t numSamples) override
Initialize module at beginning of RooCMStudy run.
RooDLLSignificanceMCSModule(const RooRealVar ¶m, double nullHypoValue=0.0)
Constructor of module with parameter to be interpreted as nSignal and the value of the null hypothesi...
std::unique_ptr< RooRealVar > _dll0h
Container variable for delta NLL.
RooDataSet * finalizeRun() override
Return auxiliary dataset with results of delta(-log(L)) calculations of this module so that it is mer...
std::string _parName
Name of Nsignal parameter.
bool processAfterFit(bool fitOk) override
Save likelihood from nominal fit, fix chosen parameter to its null hypothesis value and rerun fit Sav...
bool initializeInstance() override
Initialize module after attachment to RooMCStudy object.
std::unique_ptr< RooDataSet > _data
Summary dataset to store results.
Container class to hold unbinned data.
Variable that can be changed from the outside.
void setVal(double value) override
Set value of variable to 'value'.
const char * GetName() const override
Returns name of object.