@@ -83,7 +83,8 @@ class xRooNLLVar : public std::shared_ptr<RooAbsReal> {
8383
8484 void reinitialize ();
8585
86- void AddOption (const RooCmdArg &opt);
86+ void SetOption (const RooCmdArg &opt);
87+ [[deprecated(" Use SetOption()" )]] void AddOption (const RooCmdArg &opt) { SetOption (opt); }
8788
8889 std::pair<std::shared_ptr<RooAbsData>, std::shared_ptr<const RooAbsCollection>>
8990 getData () const ; // returns pointer to data and snapshot of globs
@@ -240,11 +241,32 @@ class xRooNLLVar : public std::shared_ptr<RooAbsReal> {
240241 double fNullVal ();
241242 double fAltVal ();
242243
244+ void setNullVal (double val);
245+ void setAltVal (double val);
246+ void setObsTS (double val, double err)
247+ {
248+ obs_ts = val;
249+ obs_ts_err = err;
250+ fPllType = xRooFit::Asymptotics::Unknown;
251+ }
252+ void addNullToy (double value, double weight = 1 ., int seed = 0 )
253+ {
254+ fPllType = xRooFit::Asymptotics::Unknown;
255+ nullToys.emplace_back (std::make_tuple (seed, value, weight));
256+ }
257+ void addAltToy (double value, double weight = 1 ., int seed = 0 )
258+ {
259+ fPllType = xRooFit::Asymptotics::Unknown;
260+ altToys.emplace_back (std::make_tuple (seed, value, weight));
261+ }
262+
243263 std::shared_ptr<const RooAbsCollection> coords; // pars of the nll that will be held const alongside POI
244264
245265 std::shared_ptr<const RooFitResult> fUfit , fNull_cfit , fAlt_cfit , fLbound_cfit ;
246266 std::shared_ptr<const RooFitResult> fGenFit ; // if the data was generated, this is the fit is was generated from
247267 bool isExpected = false ; // if genFit, flag says is asimov or not
268+ double obs_ts = std::numeric_limits<double >::quiet_NaN(); // only specified for unknown pll types
269+ double obs_ts_err = std::numeric_limits<double >::quiet_NaN();
248270
249271 std::shared_ptr<xRooHypoPoint>
250272 fAsimov ; // same as this point but pllType is twosided and data is expected post alt-fit
@@ -289,7 +311,8 @@ class xRooNLLVar : public std::shared_ptr<RooAbsReal> {
289311
290312 bool AddModel (const xRooNode &pdf, const char *validity = " " );
291313
292- void LoadFits (const char *apath);
314+ // the directory where fits are cached from scans
315+ TDirectory *fitCache () const { return fFitDb .get (); }
293316
294317 // A points over given parameter, number of points between low and high
295318 int AddPoints (const char *parName, size_t nPoints, double low, double high);
@@ -368,22 +391,25 @@ class xRooNLLVar : public std::shared_ptr<RooAbsReal> {
368391
369392 std::set<std::pair<std::shared_ptr<RooArgList>, std::shared_ptr<xRooNode>>> fPdfs ;
370393
371- std::shared_ptr<TFile > fFitDb ;
394+ std::shared_ptr<TDirectory > fFitDb ;
372395 };
373396
374397 xRooHypoSpace hypoSpace (const char *parName, int nPoints, double low, double high,
375398 double alt_value = std::numeric_limits<double >::quiet_NaN(),
376- const xRooFit::Asymptotics::PLLType &pllType = xRooFit::Asymptotics::Unknown);
399+ const xRooFit::Asymptotics::PLLType &pllType = xRooFit::Asymptotics::Unknown,
400+ int tsType = 0);
377401 xRooHypoSpace hypoSpace (const char *parName = " " ,
378402 const xRooFit::Asymptotics::PLLType &pllType = xRooFit::Asymptotics::Unknown,
379403 double alt_value = std::numeric_limits<double >::quiet_NaN());
380404 xRooHypoSpace hypoSpace (int nPoints, double low, double high,
381405 double alt_value = std::numeric_limits<double >::quiet_NaN(),
382406 const xRooFit::Asymptotics::PLLType &pllType = xRooFit::Asymptotics::Unknown);
383- xRooHypoSpace hypoSpace (const char *parName, xRooFit::TestStatistic::Type tsType, int nPoints = 0 )
407+ xRooHypoSpace hypoSpace (const char *parName, xRooFit::TestStatistic::Type tsType, int nPoints = 0 ,
408+ double low = -std::numeric_limits<double >::infinity(),
409+ double high = std::numeric_limits<double>::infinity(),
410+ double alt_value = std::numeric_limits<double>::quiet_NaN())
384411 {
385- return hypoSpace (parName, int (tsType), nPoints, -std::numeric_limits<double >::infinity (),
386- std::numeric_limits<double >::infinity ());
412+ return hypoSpace (parName, nPoints, low, high, alt_value, xRooFit::Asymptotics::Unknown, tsType);
387413 }
388414
389415 std::shared_ptr<RooArgSet> pars (bool stripGlobalObs = true ) const ;
0 commit comments