94 coutE(InputArguments) <<
"RooDLLSignificanceMCSModule::initializeInstance:: ERROR: No parameter named " <<
_parName <<
" in RooMCStudy!" << endl ;
99 std::string nll0hName =
"nll_nullhypo_" +
_parName;
100 std::string nll0hTitle =
"-log(L) with null hypothesis for param " +
_parName;
101 _nll0h = std::make_unique<RooRealVar>(nll0hName.c_str(),nll0hTitle.c_str(),0) ;
104 std::string dll0hName =
"dll_nullhypo_" +
_parName;
105 std::string dll0hTitle =
"-log(L) difference w.r.t null hypo for param " +
_parName;
106 _dll0h = std::make_unique<RooRealVar>(dll0hName.c_str(),dll0hTitle.c_str(),0) ;
109 std::string sig0hName =
"significance_nullhypo_" +
_parName;
110 std::string sig0hTitle =
"Gaussian signficiance of Delta(-log(L)) w.r.t null hypo for param " +
_parName;
111 _sig0h = std::make_unique<RooRealVar>(sig0hName.c_str(),sig0hTitle.c_str(),-10,100) ;
154 std::unique_ptr<RooFitResult> frnull{
refit()};
157 _nll0h->setVal(frnull->minNll()) ;
159 double deltaLL = (frnull->minNll() -
nllVar()->getVal()) ;
160 double signif = deltaLL>0 ? sqrt(2*deltaLL) : -sqrt(-2*deltaLL) ;
true
Register systematic variations for multiple existing columns using auto-generated tags.
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.
Add-on module to RooMCStudy that calculates the significance of a signal by comparing the likelihood ...
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
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 initializeInstance() override
Initialize module after attachment to RooMCStudy object.
bool initializeRun(Int_t) override
Initialize module at beginning of RooCMStudy run.
std::unique_ptr< RooDataSet > _data
Summary dataset to store results.
bool processAfterFit(Int_t) override
Save likelihood from nominal fit, fix chosen parameter to its null hypothesis value and rerun fit Sav...
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.