diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index 9400eed3..7e1cb513 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -2,6 +2,8 @@ ## New features since last release +- In expert mode, all `Histo` protected properties like `nbins_` now have getters, e.g. `Manager()->GetPlotManager()->GetHistos()[0]->Nbins()` ([#251](https://github.com/MadAnalysis/madanalysis5/pull/251)). + ## Improvements ## Bug fixes @@ -9,3 +11,5 @@ ## Contributors This release contains contributions from (in alphabetical order): + +[Bastien Voirin](https://github.com/bastienvoirin) diff --git a/tools/SampleAnalyzer/Process/Plot/Histo.h b/tools/SampleAnalyzer/Process/Plot/Histo.h index c4b1474d..0baa28b6 100644 --- a/tools/SampleAnalyzer/Process/Plot/Histo.h +++ b/tools/SampleAnalyzer/Process/Plot/Histo.h @@ -204,6 +204,32 @@ class Histo : public PlotBase } } + /// Histogram arrays + std::vector< std::pair > Histo() { return histo_; } + std::pair Underflow() { return underflow_; } + std::pair Overflow() { return overflow_; } + + /// Histogram description + MAuint32 Nbins() { return nbins_; } + MAfloat64 Xmin() { return xmin_; } + MAfloat64 Xmax() { return xmax_; } + MAfloat64 Step() { return step_; } + + /// Sum of event-weights over entries + std::pair SumW() { return sum_w_; } + + /// Sum of squared weights + std::pair SumWW() { return sum_ww_; } + + /// Sum of value * weight + std::pair SumXW() { return sum_xw_; } + + /// Sum of value * value * weight + std::pair SumXXW() { return sum_xxw_; } + + /// RegionSelections attached to the histo + std::vector Regions() { return regions_; } + /// Write the plot in a ROOT file virtual void Write_TextFormat(std::ostream* output);