40 _parName(poi->first()->GetName()),
41 _plc(nullptr),_ul(nullptr),_poi(nullptr), _data(nullptr),_cl(CL), _model(nullptr)
43 std::cout<<
"RooUpperLimitConstructor ParName:"<<
_parName<<std::endl;
44 std::cout<<
"RooUpperLimitConstructor CL:"<<
_cl<<std::endl;
56 _parName(other._poi->first()->GetName()),
57 _plc(nullptr),_ul(nullptr),_poi(other._poi), _data(nullptr), _cl(other._cl), _model(other._model)
91 coutE(InputArguments) <<
"UpperLimitMCSModule::initializeInstance:: ERROR: No parameter named " <<
_parName <<
" in RooMCStudy!" << std::endl ;
97 std::cout<<
"RooUpperLimit Initialize Instance: POI Set:"<<std::endl;
99 std::cout<<
"RooUpperLimit Initialize Instance: End:"<<std::endl;
103 std::string ulName =
"ul_" +
_parName;
104 std::string ulTitle =
"UL for parameter " +
_parName;
165 std::cout<<
"after generation Test"<<std::endl;
183 if (!pllint)
return false;
186 std::cout<<(static_cast<RooRealVar*>((
fitParams()->find(
_parName.c_str()))))->getVal()<<std::endl;
187 std::cout<<(static_cast<RooStats::LikelihoodInterval*>(pllint))->UpperLimit(
static_cast<RooRealVar&
>(*(
_poi->
first())))<<std::endl;
198 std::cout<<
"UL:"<<
_ul->
getVal()<<std::endl;
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
RooAbsArg * first() const
void Print(Option_t *options=nullptr) const override
This method must be overridden when a class wants to print itself.
virtual Int_t numEntries() const
Return number of entries in dataset, i.e., count unweighted entries.
Base class for add-on modules to RooMCStudy that can perform additional calculations on each generate...
RooAbsData * genSample()
Return generate sample.
RooAbsPdf * fitModel()
Return fit model.
RooArgSet * fitParams()
Return current value of parameters of fit model.
RooArgSet * fitInitParams()
Return initial value of parameters of fit model.
double getVal(const RooArgSet *normalisationSet=nullptr) const
Evaluate object.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Container class to hold unbinned data.
void add(const RooArgSet &row, double weight, double weightError)
Add one ore more rows of data.
Variable that can be changed from the outside.
void setVal(double value) override
Set value of variable to 'value'.
void SetTestSize(double size) override
set the size of the test (rate of Type I error) ( Eg. 0.05 for a 95% Confidence Interval)
ConfInterval is an interface class for a generic interval in the RooStats framework.
LikelihoodInterval is a concrete implementation of the RooStats::ConfInterval interface.
The ProfileLikelihoodCalculator is a concrete implementation of CombinedCalculator (the interface cla...
LikelihoodInterval * GetInterval() const override
Return a likelihood interval.
This class allow to compute in the ToyMcStudy framework the ProfileLikelihood upper limit for each to...
const RooArgSet * _poi
parameters of interest
UpperLimitMCSModule(const RooArgSet *poi, double CL=0.95)
RooDataSet * finalizeRun() override
Return auxiliary dataset with results of delta(-log(L)) calculations of this module so that it is mer...
~UpperLimitMCSModule() override
Destructor.
bool processBetweenGenAndFit(Int_t) override
Method called after generation of toy data sample and resetting of fit parameters to initial values a...
RooStats::ProfileLikelihoodCalculator * _plc
bool initializeRun(Int_t) override
Initialize module at beginning of RooCMStudy run.
std::string _parName
Name of Nsignal parameter.
RooDataSet * _data
Summary dataset to store results.
bool initializeInstance() override
Initialize module after attachment to RooMCStudy object.
Namespace for the RooStats classes.