37using std::cout, std::endl, std::string, std::map;
75 cout <<
"no parameters of interest" << endl;
79 if(poi_set->
size()!=1){
80 cout <<
"only one parameter of interest is supported currently" << endl;
87 cout <<
"no nuisance parameters" << endl;
92 cout <<
"pdf not set" << endl;
97 std::unique_ptr<RooAbsReal> profile{nll->createProfile(*poi)};
101 double* curve_x=
nullptr;
108 double step = (max-min)/(curve_N-1);
109 curve_x=
new double[curve_N];
110 for(
int i=0; i<curve_N; ++i){
111 curve_x[i]=min+step*i;
115 map<string, std::vector<double> > name_val;
116 for(
int i=0; i<curve_N; i++){
120 for (
auto const *nuis_param : dynamic_range_cast<RooRealVar *> (*nuis_params)){
122 string name = nuis_param->GetName();
123 if(nuis_params->
empty())
continue;
124 if(nuis_param && (! nuis_param->isConstant())){
125 if(name_val.find(
name)==name_val.end()) name_val[
name]=std::vector<double>(curve_N);
126 name_val[
name][i]=nuis_param->getVal();
130 g->SetName((
name+
"_"+
string(poi->
GetName())+
"_profile").c_str());
131 g->GetXaxis()->SetTitle(poi->
GetName());
132 g->GetYaxis()->SetTitle(nuis_param->GetName());
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
Storage_t::size_type size() const
RooAbsArg * first() const
Abstract base class for binned and unbinned datasets.
Abstract interface for all probability density functions.
RooFit::OwningPtr< RooAbsReal > createNLL(RooAbsData &data, CmdArgs_t const &... cmdArgs)
Construct representation of -log(L) of PDF with given dataset.
Abstract base class for objects that represent a real value that may appear on the left hand side of ...
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Variable that can be changed from the outside.
void setVal(double value) override
Set value of variable to 'value'.
ModelConfig is a simple class that holds configuration information specifying how a model should be u...
const RooArgSet * GetParametersOfInterest() const
get RooArgSet containing the parameter of interest (return nullptr if not existing)
const RooArgSet * GetNuisanceParameters() const
get RooArgSet containing the nuisance parameters (return nullptr if not existing)
RooAbsPdf * GetPdf() const
get model PDF (return nullptr if pdf has not been specified or does not exist)
Utility class to plot conditional MLE of nuisance parameters vs.
TList * GetListOfProfilePlots(RooAbsData &data, RooStats::ModelConfig *config)
This tool makes a plot of the conditional maximum likelihood estimate of the nuisance parameter vs th...
virtual ~ProfileInspector()
ProfileInspector destructor.
A TGraph is an object made of two arrays X and Y with npoints each.
void Add(TObject *obj) override
const char * GetName() const override
Returns name of object.
Namespace for the RooStats classes.