RestFrames
v1.0.1
RestFrames HEP Event Analysis Software Library
|
Go to the documentation of this file.
39 namespace RestFrames {
42 class HistPlotCategory;
52 HistPlot(
const std::string& sname,
const std::string& stitle);
74 double minval,
double maxval,
75 const std::string& unit =
"");
100 bool invert_colors =
false);
116 bool invert_colors =
false);
121 void Fill(
double weight = 1.);
130 void Draw(
bool invert_colors =
false);
163 void WriteHist(
const std::string& filename);
166 std::string m_PlotLabel;
167 std::string m_PlotTitle;
168 std::string m_ScaleLabel;
173 std::vector<TH1D*> m_1DHists;
174 std::vector<TH2D*> m_2DHists;
179 std::map<const HistPlotCategory*,std::vector<TH1D*> > m_CatToHist1D;
180 std::map<const HistPlotCategory*,std::vector<TH2D*> > m_CatToHist2D;
182 std::vector<const HistPlotVar*> m_Plot1D_Var;
183 std::vector<HistPlotCatList> m_Plot1D_Cats;
184 std::vector<bool> m_Plot1D_Color;
187 std::vector<const HistPlotCategory*> m_Plot2D_Cat;
188 std::vector<bool> m_Plot2D_Color;
190 std::map<TH1D*,const HistPlotVar*> m_HistToVar;
196 bool invert_colors =
false);
200 bool invert_colors =
false);
void WriteHist(const std::string &filename)
Stores all histograms in root file.
void SetRebin(int rebin=4)
Reduces the number of bins by a factor.
void SetPlotTitle(const std::string &title)
Sets plot's title.
HistPlotVar const & GetNewVar(const std::string &name, const std::string &title, double minval, double maxval, const std::string &unit="")
Defines new variable for plotting.
void Fill(double weight=1.)
Fills an entry for every variable according to each's current value.
void SetPlotLabel(const std::string &label)
Changes the text at the top of the plot.
HistPlot(const std::string &sname, const std::string &stitle)
Standard constructor.
HistPlotCategory const & GetNewCategory(const std::string &name, const std::string &title)
Defines new category for plotting.
Abstract base class for all plotting objects.
void AddPlot(const HistPlotVar &var, RestFrames::RFList< const HistPlotCategory > cats=RestFrames::RFList< const RestFrames::HistPlotCategory >(), bool invert_colors=false)
Defines new 1D plot.
virtual void Clear()
Clears HistPlot from all connections to other objects.
void Draw(bool invert_colors=false)
Draws every histogram.
void SetScaleLabel(const std::string &label)
Sets the label of the normalization of plot.
void SetScale(double scale=-1)
Sets the normalization of plot.