37using std::string, std::map;
75 oocoutE(
nullptr,InputArguments) <<
"no parameters of interest" << std::endl;
79 if(poi_set->
size()!=1){
80 oocoutE(
nullptr,InputArguments) <<
"only one parameter of interest is supported currently" << std::endl;
87 oocoutE(
nullptr,InputArguments) <<
"no nuisance parameters" << std::endl;
92 oocoutE(
nullptr,InputArguments) <<
"pdf not set" << std::endl;
96 std::unique_ptr<RooAbsReal> nll{pdf->
createNLL(data)};
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++){
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());
ROOT::RRangeCast< T, true, Range_t > dynamic_range_cast(Range_t &&coll)
int Int_t
Signed integer 4 bytes (int).
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'.
< A class that holds configuration information for a model using a workspace as a store
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)
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.
const char * GetName() const override
Returns name of object.
Namespace for the RooStats classes.