|
RootUtils
|
Functions | |
| Double_t | getMeanY (TH1 *hist) |
| Get histogram mean value along Y axis. More... | |
| void | invertHist (TH1 *hist) |
| Invert histogram. More... | |
| TH1 * | cropHistogram (TH1 *hist, Double_t minX, Double_t maxX) |
| Crop histogram to a given range. More... | |
| TH1 * | cropHistogram (TH1 *hist, Int_t minBin, Int_t maxBin) |
| Crop histogram to a given bin range. More... | |
| TH2 * | makeHistStack (TList *histList, Double_t axisMin=0, Double_t axisMax=1, const char *name="") |
| Make 3D histogram stack. More... | |
Useful histogram operations.
| TH1 * HistUtils::cropHistogram | ( | TH1 * | hist, |
| Double_t | minX, | ||
| Double_t | maxX | ||
| ) |
Crop histogram to a given range.
Function finds corresponding bins and returns cropped histogram with bins including the given range.
| hist | histogram. |
| minX | minimum value along X axis of the new histogram. |
| maxX | maximum value along X axis of the new histogram. |
| TH1 * HistUtils::cropHistogram | ( | TH1 * | hist, |
| Int_t | minBin, | ||
| Int_t | maxBin | ||
| ) |
Crop histogram to a given bin range.
Function returns cropped histogram with bin numbers between minBin and maxBin.
| hist | histogram. |
| minBin | minimum bin number. |
| maxBin | maximum bin number. |
| Double_t HistUtils::getMeanY | ( | TH1 * | hist | ) |
Get histogram mean value along Y axis.
Function returns an average value of counts across all the bins.
| hist | histogram. |
| void HistUtils::invertHist | ( | TH1 * | hist | ) |
Invert histogram.
Function inverts histogram values in each bin.
| hist | histogram. |
| TH2 * HistUtils::makeHistStack | ( | TList * | histList, |
| Double_t | axisMin = 0, |
||
| Double_t | axisMax = 1, |
||
| const char * | name = "" |
||
| ) |
Make 3D histogram stack.
A list of TH1 histograms are aligned one after another in a 3D stack way
| histList | TList of histograms. |
| axisMin | minimum new axis number. |
| axisMax | maximum new axis number. |
| name | name of returned histogram |