2 #ifndef MAKENICEHISTO_H
3 #define MAKENICEHISTO_H
22 #ifndef ROOT_TVirtualPad
23 #include "TVirtualPad.h"
37 #ifndef ROOT_TGraphErrors
38 #include "TGraphErrors.h"
43 #ifndef ROOT_TClonesArray
44 #include "TClonesArray.h"
54 TH1F*
HistLog(
const char* name,
const char* title, Int_t nBins, Double_t xMin, Double_t xMax);
55 TH2F*
HistLogLog(
const char* name,
const char* title, Int_t nBinsX, Double_t xMinX, Double_t xMaxX, Int_t nBinsY, Double_t xMinY, Double_t xMaxY);
56 TH2F*
HistLogLin(
const char* name,
const char* title, Int_t nBinsX, Double_t xMinX, Double_t xMaxX, Int_t nBinsY, Double_t xMinY, Double_t xMaxY);
57 TH2F*
HistLinLog(
const char* name,
const char* title, Int_t nBinsX, Double_t xMinX, Double_t xMaxX, Int_t nBinsY, Double_t xMinY, Double_t xMaxY);
59 const Double_t *
MakeLogBinning(Int_t nbins, Double_t xmin, Double_t xmax);
60 TH1F*
MakeNiceGraph(TGraph* hist, TVirtualPad* c1 = 0,
const char* opt =
"*");
61 TVirtualPad*
MakeNiceHisto(TH1* hist, TVirtualPad* c1 = 0,
const char* opt =
"", Bool_t copy = 1);
62 void MakeNice1dHisto(TH1* hist, TVirtualPad* c1 = 0,
const char* opt =
"", Bool_t copy = 1);
63 void MakeNice2dHisto(TH2* hist, TVirtualPad* c1 = 0,
const char* opt =
"", Bool_t copy = 1);
64 void MakeNiceHistoPad(TH1* hist, TVirtualPad* c1 = 0, Double_t scaleX = 1, Double_t scaleY = 1,
const char* opt =
"", Bool_t copy = 1);
65 void MakeNiceHistoPad(TH1* hist, TVirtualPad* c, Int_t i, Int_t j, Double_t scaleX = 1, Double_t scaleY = 1,
const char* opt =
"", Bool_t copy = 1);
66 void MakeNice1dHistoPad(TH1* hist, TVirtualPad* c1 = 0, Double_t scaleX = 1, Double_t scaleY = 1,
const char* opt =
"", Bool_t copy = 1);
67 void MakeNice2dHistoPad(TH2* hist, TVirtualPad* c1 = 0, Double_t scaleX = 1, Double_t scaleY = 1,
const char* opt =
"", Bool_t copy = 1);
69 Int_t xwidth = 700, Int_t ywidth = 500);
71 void IntegralWithError(TF1* func, Double_t &integral, Double_t &error,
72 Double_t xlow, Double_t xhigh,
73 Double_t stepsize = 0.000001);
74 void FunctionWithError(TF1* func, Double_t x, Double_t &value,
78 Double_t stepsize, Int_t parameter,
81 Int_t parameter, Double_t epsilon);
85 TClonesArray*
CanvasPartition(TVirtualPad *C,
const Int_t Nx = 2,
const Int_t Ny = 1,
86 Float_t lMargin = 0.15, Float_t rMargin = 0.03,
87 Float_t bMargin = 0.15, Float_t tMargin = 0.03);
96 TGraphErrors*
ScaleGraph(TGraph* g, Double_t scale);
97 TGraphErrors*
DistGraph(TGraph* g1, TGraph* g2);
100 TGraphErrors*
AddGraph(TGraph* g1, TGraph* g2, Double_t val = 1);
void NormaliseBins(TH1 *h)
TGraph * GetGraphFromHistogram(TH1 *hist)
void MakeNice1dHisto(TH1 *hist, TVirtualPad *c1=0, const char *opt="", Bool_t copy=1)
TGraphErrors * DistGraph(TGraph *g1, TGraph *g2)
TGraphErrors * AddGraph(TGraph *g1, TGraph *g2, Double_t val=1)
TH1F * GetHistogramFromGraph(TGraphErrors *graph, const char *histName)
TH2F * HistLogLin(const char *name, const char *title, Int_t nBinsX, Double_t xMinX, Double_t xMaxX, Int_t nBinsY, Double_t xMinY, Double_t xMaxY)
TGraphErrors * DivideGraph(TGraph *g1, TGraph *g2)
void MakeNice1dHistoPad(TH1 *hist, TVirtualPad *c1=0, Double_t scaleX=1, Double_t scaleY=1, const char *opt="", Bool_t copy=1)
void MakeNice2dHisto(TH2 *hist, TVirtualPad *c1=0, const char *opt="", Bool_t copy=1)
void SetHistMaximum(TH1 *hist, Float_t factor)
TVirtualPad * MakeNiceHisto(TH1 *hist, TVirtualPad *c1=0, const char *opt="", Bool_t copy=1)
TGraphErrors * ExtrapolateGraph(TGraph *g1, TGraph *g2)
TH1F * ForceRatio(TH1F *h1, TH1F *h2)
const Double_t * MakeLogBinning(Int_t nbins, Double_t xmin, Double_t xmax)
void ForceScale(TH1 *h, Double_t scale)
Double_t IntegralDerivative(TF1 *func, Double_t xlow, Double_t xhigh, Double_t stepsize, Int_t parameter, Double_t epsilon)
void MakeNice2dHistoPad(TH2 *hist, TVirtualPad *c1=0, Double_t scaleX=1, Double_t scaleY=1, const char *opt="", Bool_t copy=1)
TGraphErrors * ScaleGraph(TGraph *g, Double_t scale)
TH2F * HistLogLog(const char *name, const char *title, Int_t nBinsX, Double_t xMinX, Double_t xMaxX, Int_t nBinsY, Double_t xMinY, Double_t xMaxY)
TH1F * HistInvert(TH1 *hist)
TH1F * HistLog(const char *name, const char *title, Int_t nBins, Double_t xMin, Double_t xMax)
TCanvas * FindCanvas(const char *canvasName, Int_t xwidth=700, Int_t ywidth=500)
TH2F * HistLinLog(const char *name, const char *title, Int_t nBinsX, Double_t xMinX, Double_t xMaxX, Int_t nBinsY, Double_t xMinY, Double_t xMaxY)
Double_t FunctionDerivative(TF1 *func, Double_t x, Int_t parameter, Double_t epsilon)
TH1F * MakeNiceGraph(TGraph *hist, TVirtualPad *c1=0, const char *opt="*")
void MakeNiceHistoPad(TH1 *hist, TVirtualPad *c1=0, Double_t scaleX=1, Double_t scaleY=1, const char *opt="", Bool_t copy=1)
void SetHistStyle(TH1 *hist)
TClonesArray * CanvasPartition(TVirtualPad *C, const Int_t Nx=2, const Int_t Ny=1, Float_t lMargin=0.15, Float_t rMargin=0.03, Float_t bMargin=0.15, Float_t tMargin=0.03)