GamR  0.0.0
GammaROOT
Loading...
Searching...
No Matches
Transform.hh
Go to the documentation of this file.
1#ifndef GAMROOT_SPECT_TRANSFORM_HH
2#define GAMROOT_SPECT_TRANSFORM_HH
3
4/* STD */
5#include <string>
6#include <vector>
7
8/* ROOT */
9#include <TCutG.h>
10#include <TFormula.h>
11#include <TH1.h>
12#include <TH2.h>
13#include <TVirtualPad.h>
14
15namespace GamR {
20
23 namespace Spect {
24
25 TH1D Scale(const TH1 *h, TFormula f);
26 TH1D ScalePoly(const TH1 *h, std::vector<Double_t> pars);
27 void ScaleLabelsLinear(TH1 *h, Double_t m, Double_t c);
28 void Shift(TH1 &h, Int_t shift);
29 TH1D *Add(TH1 *hist1, TH1 *hist2, const char *name, double c1 = 1, double c2 = 1);
30 TH1D *Add(std::vector<TH1*> hists, const char *name);
31 TH1D *Add(std::vector<int> hists, const char *name);
32 TH1D *Add(int iStart, int iStop, const char *name);
33 TH2D *Add(TH2 *hist1, TH2 *hist2, const char *name, double c1 = 1, double c2 = 1);
34 TH2D *Add(std::vector<TH2*> hists, const char *name);
35 TH2D *Add2(std::vector<int> hists, const char *name);
36 TH2D *Add2(int iStart, int iStop, const char *name);
37 TH1 *Rebin(TH1 *hist, int rebin);
38 void Rebin(TVirtualPad *canvas, int rebin);
39 TH2 *RebinX(TH2 *hist, int rebin);
40 void RebinX(TVirtualPad *canvas, int rebin);
41 TH2 *RebinY(TH2 *hist, int rebin);
42 void RebinY(TVirtualPad *canvas, int rebin);
43 TH1D *Multiply(TH1 *hist1, const char *name, double c1 = 1);
44 void Reverse(TH1 *h);
45 TH2D *RotateTH2(TH2 *hist, float angle, const char *name, TCutG *bananaGate = 0);
46 void Norm(TH1 *hist, TH1* ref, double low, double high);
47 void NormBackSub(TH1 *hist, TH1* ref, double low, double high, double backlow, double backhigh);
48 } // namespace Spect
50} // namespace GamR
51
52#endif
void ScaleLabelsLinear(TH1 *h, Double_t m, Double_t c)
Scales the labels of a histogram. Preferable over GamR::Spect::Scale and GamR::Spect::ScalePoly as it...
Definition Transform.cc:64
void Shift(TH1 &h, Int_t shift)
Definition Transform.cc:80
TH2 * RebinY(TH2 *hist, int rebin)
Definition Transform.cc:316
TH1 * Rebin(TH1 *hist, int rebin)
Definition Transform.cc:306
TH2D * Add2(std::vector< int > hists, const char *name)
Definition Transform.cc:192
TH1D * Multiply(TH1 *hist1, const char *name, double c1)
Definition Transform.cc:220
TH1D Scale(const TH1 *h, TFormula f)
Scales a histogram along the X axis and dithers to avoid quantization errors.
Definition Transform.cc:21
void NormBackSub(TH1 *hist, TH1 *ref, double low, double high, double backlow, double backhigh)
Definition Transform.cc:387
void Reverse(TH1 *h)
Definition Transform.cc:236
TH2D * RotateTH2(TH2 *hist, float angle, const char *name, TCutG *bananaGate)
Definition Transform.cc:255
TH1D ScalePoly(const TH1 *h, std::vector< Double_t > pars)
Scales histogram by a polynomial.
Definition Transform.cc:45
TH2 * RebinX(TH2 *hist, int rebin)
Definition Transform.cc:311
TH1D * Add(TH1 *hist1, TH1 *hist2, const char *name, double c1, double c2)
Definition Transform.cc:121
void Norm(TH1 *hist, TH1 *ref, double low, double high)
Definition Transform.cc:382
Definition Gain.cc:19