Skip to content

Commit fab2d51

Browse files
committed
[RF][RS] Deprecate RooStats::HybridPlot
The `RooStats::HybridPlot` class is a helper class for plotting of fit results, but we are moving towards removing these helpers out of RooFit because plotting code is better written by the user directly, for better customizability of the plots. This is similar to the deprecation and removal of HistFactory plotting features (see 59da6b1 and 88b2fa1).
1 parent 9d4603c commit fab2d51

6 files changed

Lines changed: 9 additions & 5 deletions

File tree

README/ReleaseNotes/v640/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ The following people have contributed to this new version:
5151
* The overloads of `RooAbsReal::createChi2()` and `RooAbsReal::chi2FitTo()` that take unbinned **RooDataSet** data objects are deprecated and will be removed in ROOT 6.42.
5252
These methods implemented a specialized chi-square fit for x-y-data with errors in y and optional errors in x, which is conceptually different from the standard histogram-based chi-square in the **RooDataHist** case and can lead to ambiguous results.
5353
To fit 2D data with errors in and `x` and `y`, use specialized tools like `TGraphErrors::Fit()`, or build an explicit likelihood model if you want to stay with RooFit.
54+
* The **RooStats::HybridPlot** class and the related **HybridResult::GetPlot** method are deprecated and will be removed in ROOT 6.42.
55+
We kindly ask users to write their own ROOT-based plotting code, possibly based on the source code of the deprecated **HybridPlot** class, as pre-existing plot helpers are usually failing to be flexible enough for large-scale adoption.
5456

5557
## Removals
5658

roofit/roostats/inc/RooStats/HybridPlot.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,11 @@ namespace RooStats {
119119
bool fVerbose; ///< verbosity flag
120120

121121
ClassDefOverride(HybridPlot,0) // Provides the plots for an HybridResult
122-
};
122+
}
123+
#ifndef ROOFIT_BUILDS_ITSELF
124+
R__DEPRECATED(6, 42, "Please write your own ROOT-based plotting code, possibly based on the source code of the deprecated HybridPlot class.")
125+
#endif
126+
;
123127
}
124128

125129
#endif

roofit/roostats/inc/RooStats/HybridResult.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ namespace RooStats {
4545

4646
void Add(HybridResult* other);
4747

48-
HybridPlot* GetPlot(const char* name,const char* title, int n_bins);
48+
HybridPlot* GetPlot(const char* name,const char* title, int n_bins)
49+
R__DEPRECATED(6, 42, "Please write your own ROOT-based plotting code, possibly based on the source code of the deprecated HybridPlot class.");
4950

5051
void PrintMore(const char* options);
5152

roofit/roostats/src/HypoTestInverter.cxx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ call HypoTestInverter::UseCLs().
4444
#include "RooStats/ToyMCSampler.h"
4545
#include "RooStats/HypoTestPlot.h"
4646
#include "RooStats/HypoTestInverterPlot.h"
47-
#include "RooStats/HybridResult.h"
4847

4948
#include "RooAbsData.h"
5049
#include "RooRealVar.h"

roofit/roostats/src/HypoTestInverterPlot.cxx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ hypotheses.
2323
#include "RooStats/HypoTestInverterPlot.h"
2424

2525
// include other header files
26-
#include "RooStats/HybridResult.h"
2726
#include "RooStats/HypoTestInverterResult.h"
2827
#include "RooStats/HypoTestPlot.h"
2928
#include "RooStats/SamplingDistribution.h"

roofit/roostats/src/HypoTestInverterResult.cxx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ Some contributions to this class have been written by Matthias Wolf (error estim
2222
// include header file of this class
2323
#include "RooStats/HypoTestInverterResult.h"
2424

25-
#include "RooStats/HybridResult.h"
2625
#include "RooStats/SamplingDistribution.h"
2726
#include "RooStats/AsymptoticCalculator.h"
2827
#include "RooMsgService.h"

0 commit comments

Comments
 (0)