
|
RestFrames
v1.0.1
RestFrames HEP Event Analysis Software Library
|
Definition at line 44 of file HistPlot.hh.

Public Member Functions | |
| HistPlot (const std::string &sname, const std::string &stitle) | |
| Standard constructor. More... | |
| virtual void | Clear () |
| Clears HistPlot from all connections to other objects. | |
| HistPlotVar const & | GetNewVar (const std::string &name, const std::string &title, double minval, double maxval, const std::string &unit="") |
| Defines new variable for plotting. More... | |
| HistPlotCategory const & | GetNewCategory (const std::string &name, const std::string &title) |
| Defines new category for plotting. More... | |
| void | AddPlot (const HistPlotVar &var, RestFrames::RFList< const HistPlotCategory > cats=RestFrames::RFList< const RestFrames::HistPlotCategory >(), bool invert_colors=false) |
| Defines new 1D plot. More... | |
| void | AddPlot (const HistPlotVar &varX, const HistPlotVar &varY, RestFrames::RFList< const HistPlotCategory > cats=RestFrames::RFList< const RestFrames::HistPlotCategory >(), bool invert_colors=false) |
| Defines new 2D plot. More... | |
| void | Fill (double weight=1.) |
| Fills an entry for every variable according to each's current value. More... | |
| void | Fill (const HistPlotCategory &cat, double weight=1.) |
| Fills an entry for every variable corresponding to a category according to each's current value. More... | |
| void | Draw (bool invert_colors=false) |
| Draws every histogram. | |
| void | SetPlotLabel (const std::string &label) |
| Changes the text at the top of the plot. More... | |
| void | SetPlotTitle (const std::string &title) |
| Sets plot's title. More... | |
| void | SetScaleLabel (const std::string &label) |
| Sets the label of the normalization of plot. More... | |
| void | SetScale (double scale=-1) |
| Sets the normalization of plot. More... | |
| void | SetRebin (int rebin=4) |
| Reduces the number of bins by a factor. More... | |
| void | WriteHist (const std::string &filename) |
| Stores all histograms in root file. More... | |
Public Member Functions inherited from RestFrames::RFPlot | |
| RFPlot (const std::string &sname, const std::string &stitle) | |
| Standard constructor. More... | |
| void | WriteOutput (const std::string &filename) |
| Stores all plots in root file. More... | |
Public Member Functions inherited from RestFrames::RFBase | |
| RFBase (const std::string &sname, const std::string &stitle, int key) | |
| Standard constructor. More... | |
| RFBase () | |
| Empty constructor. | |
| bool | IsEmpty () const |
| Checks whether this is default (empty) instance of class. | |
| bool | operator! () const |
| Tests whether key is the same as this. | |
| void | Print (LogType type) const |
| Print information associated with object. | |
| virtual std::string | PrintString (LogType type) const |
| String of information associated with object. | |
| RFKey | GetKey () const |
| gets object identification key | |
| std::string | GetName () const |
| Returns object name. | |
| std::string | GetTitle () const |
| Returns object title. | |
| bool | IsSame (const RFKey &key) const |
| Tests whether key is the same as this. | |
| bool | IsSame (const RFBase &obj) const |
| Tests whether obj is the same as this. | |
| bool | operator== (const RFKey &key) const |
| Tests whether key is the same as this. | |
| bool | operator== (const RFBase &obj) const |
| Tests whether obj is the same as this. | |
| bool | operator!= (const RFKey &key) const |
| Tests whether key is the same as this. | |
| bool | operator!= (const RFBase &obj) const |
| Tests whether obj is the same as this. | |
Additional Inherited Members | |
Static Public Member Functions inherited from RestFrames::RFBase | |
| static RFBase & | Empty () |
| Returns empty RFBase. More... | |
Static Public Attributes inherited from RestFrames::RFPlot | |
| static const TColor | rf_blue0 |
| static const TColor | rf_blue1 |
| static const TColor | rf_blue2 |
| static const TColor | rf_blue3 |
| static const TColor | rf_blue4 |
| static const TColor | rf_green0 |
| static const TColor | rf_green1 |
| static const TColor | rf_green2 |
| static const TColor | rf_green3 |
| static const TColor | rf_green4 |
| static const TColor | rf_red0 |
| static const TColor | rf_red1 |
| static const TColor | rf_red2 |
| static const TColor | rf_red3 |
| static const TColor | rf_red4 |
| static const TColor | rf_yellow0 |
| static const TColor | rf_yellow1 |
| static const TColor | rf_yellow2 |
| static const TColor | rf_yellow3 |
| static const TColor | rf_yellow4 |
| static const TColor | rf_cyan0 |
| static const TColor | rf_cyan1 |
| static const TColor | rf_cyan2 |
| static const TColor | rf_cyan3 |
| static const TColor | rf_cyan4 |
| static const TColor | rf_lime0 |
| static const TColor | rf_lime1 |
| static const TColor | rf_lime2 |
| static const TColor | rf_lime3 |
| static const TColor | rf_lime4 |
| static const TColor | rf_purple0 |
| static const TColor | rf_purple1 |
| static const TColor | rf_purple2 |
| static const TColor | rf_purple3 |
| static const TColor | rf_purple4 |
| static const TColor | rf_orange0 |
| static const TColor | rf_orange1 |
| static const TColor | rf_orange2 |
| static const TColor | rf_orange3 |
| static const TColor | rf_orange4 |
Protected Member Functions inherited from RestFrames::RFPlot | |
| void | AddCanvas (TCanvas *can) |
| void | AddTObject (TObject *obj) |
| int | GetNCanvases () |
| std::string | GetUniqueName (const std::string &name) |
Protected Member Functions inherited from RestFrames::RFBase | |
| bool | SetBody (bool body) const |
| bool | SetMind (bool mind) const |
| bool | SetSpirit (bool spirit) const |
| virtual bool | IsSoundBody () const |
| virtual bool | IsSoundMind () const |
| virtual bool | IsSoundSpirit () const |
| void | UnSoundBody (const std::string &function) const |
| void | UnSoundMind (const std::string &function) const |
| void | UnSoundSpirit (const std::string &function) const |
| void | AddDependent (RFBase *dep) |
| pointer to RFBase object owned by this one | |
Protected Attributes inherited from RestFrames::RFPlot | |
| TCanvas * | m_CanvasPtr |
Protected Attributes inherited from RestFrames::RFBase | |
| RFLog | m_Log |
| RFBase * | m_This |
Static Protected Attributes inherited from RestFrames::RFBase | |
| static const TVector3 | m_Empty3Vector |
| static const TLorentzVector | m_Empty4Vector |
| RestFrames::HistPlot::HistPlot | ( | const std::string & | sname, |
| const std::string & | stitle | ||
| ) |
Standard constructor.
| sname | Class instance name used for log statements |
| stitle | Class instance title used in figures |
Definition at line 40 of file HistPlot.cc.
| void RestFrames::HistPlot::AddPlot | ( | const HistPlotVar & | var, |
| RestFrames::RFList< const HistPlotCategory > | cats = RestFrames::RFList<const RestFrames::HistPlotCategory>(), |
||
| bool | invert_colors = false |
||
| ) |
Defines new 1D plot.
| var | Variable to plot |
| cats | List of categories to plot |
| invert_colors | If true colors will invert, lighter colors will become darker and viceversa |
Method will make a 1D plot. If there are different categories in cats it will create a 1D plot for each category
Definition at line 102 of file HistPlot.cc.
| void RestFrames::HistPlot::AddPlot | ( | const HistPlotVar & | varX, |
| const HistPlotVar & | varY, | ||
| RestFrames::RFList< const HistPlotCategory > | cats = RestFrames::RFList<const RestFrames::HistPlotCategory>(), |
||
| bool | invert_colors = false |
||
| ) |
Defines new 2D plot.
| varX | Variable to plot |
| varY | Variable to plot |
| cats | List of categories to plot |
| invert_colors | If true colors will invert, lighter colors will become darker and viceversa |
Method will make a 2D plot. If there are different categories in cats it will create a 2D plot for each category
Definition at line 165 of file HistPlot.cc.
| void RestFrames::HistPlot::Fill | ( | const HistPlotCategory & | cat, |
| double | weight = 1. |
||
| ) |
Fills an entry for every variable corresponding to a category according to each's current value.
| cat | Category |
| weight | Weight of the event |
Definition at line 255 of file HistPlot.cc.
| void RestFrames::HistPlot::Fill | ( | double | weight = 1. | ) |
Fills an entry for every variable according to each's current value.
| weight | Weight of the event |
Definition at line 242 of file HistPlot.cc.
| HistPlotCategory const & RestFrames::HistPlot::GetNewCategory | ( | const std::string & | name, |
| const std::string & | title | ||
| ) |
Defines new category for plotting.
| name | Name of the category |
| title | Histogram label |
Method defines a new category for plotting histograms. Categories are used to separate different group of events.
Definition at line 95 of file HistPlot.cc.
| HistPlotVar const & RestFrames::HistPlot::GetNewVar | ( | const std::string & | name, |
| const std::string & | title, | ||
| double | minval, | ||
| double | maxval, | ||
| const std::string & | unit = "" |
||
| ) |
Defines new variable for plotting.
| name | Name of the variable |
| title | x-axis label |
| minval | Minimum value to plot |
| maxval | Maximum value to plot |
| unit | Unit of variable |
Method is used to define variables to plot on a histogram.
Definition at line 86 of file HistPlot.cc.
| void RestFrames::HistPlot::SetPlotLabel | ( | const std::string & | label | ) |
Changes the text at the top of the plot.
| label | Label to be set |
Definition at line 568 of file HistPlot.cc.
| void RestFrames::HistPlot::SetPlotTitle | ( | const std::string & | title | ) |
| void RestFrames::HistPlot::SetRebin | ( | int | rebin = 4 | ) |
Reduces the number of bins by a factor.
| rebin | Factor to reduce bins by |
Definition at line 576 of file HistPlot.cc.
| void RestFrames::HistPlot::SetScale | ( | double | scale = -1 | ) |
Sets the normalization of plot.
| scale | Number to scale by |
Definition at line 553 of file HistPlot.cc.
| void RestFrames::HistPlot::SetScaleLabel | ( | const std::string & | label | ) |
Sets the label of the normalization of plot.
\label Label to be set in the y or z axis
Definition at line 564 of file HistPlot.cc.
| void RestFrames::HistPlot::WriteHist | ( | const std::string & | filename | ) |
Stores all histograms in root file.
| filename | Output root file |
Definition at line 581 of file HistPlot.cc.

1.8.17