27 std::vector<double> binLim(nbins + 1);
29 const double expMax = std::log(
max /
min);
30 const double binWidth = expMax / nbins;
35 for (Int_t
i = 1;
i < nbins; ++
i) {
36 binLim[
i] =
min * std::exp(
i * binWidth);
48 histo.SetMaximum(300);
49 histo.SetLineColor(
color);
50 histo.SetLineWidth(1);
51 histo.SetMarkerColor(
color);
52 histo.SetMarkerSize(0.05);
53 histo.SetMarkerStyle(1);
62 histo.GetXaxis()->SetTitle(titleXaxis.Data());
63 histo.GetYaxis()->SetTitle(titleYaxis.Data());
64 histo.GetXaxis()->SetTitleOffset(1.4);
65 histo.GetYaxis()->SetTitleOffset(1.2);
73 histo.SetMinimum(-15.);
74 histo.SetMaximum(15.);
75 histo.GetXaxis()->SetTitleOffset(1.4);
76 histo.GetYaxis()->SetTitleOffset(1.2);
84 histo.GetYaxis()->SetRangeUser(-600, 600);
85 histo.GetXaxis()->SetTitleOffset(1.2);
86 histo.GetYaxis()->SetTitleOffset(1.2);
92 TCanvas* c1 =
new TCanvas();
107 TCanvas* c1 =
new TCanvas();
112 TString direction =
"";
113 TString histoName1 = h1.GetName();
114 TString histoName2 = h2.GetName();
115 if (histoName1.Contains(
"Xy")) {
118 if (histoName1.Contains(
"Z")) {
121 if ((histoName1.Contains(
"Xy")) && (histoName2.Contains(
"Z"))) {
126 TLegend* leg =
new TLegend(0.6, 0.3, 0.8, 0.5);
127 leg->SetBorderSize(0);
128 leg->SetFillStyle(0);
129 leg->AddEntry(&h1, nameHisto1.Data(),
"lp");
130 leg->AddEntry(&h2, nameHisto2.Data(),
"lp");
140 TCanvas* c1 =
new TCanvas();
145 TLegend* leg =
new TLegend(0.2, 0.3, 0.5, 0.5);
146 leg->SetBorderSize(0);
147 leg->SetFillStyle(0);
148 leg->AddEntry(&h1, nameHisto1.Data(),
"lp");
149 leg->AddEntry(&h2, nameHisto2.Data(),
"lp");
163 TCanvas* c1 =
new TCanvas();
167 TLegend* leg =
new TLegend(0.2, 0.15, 0.5, 0.35);
168 leg->SetBorderSize(0);
169 leg->SetFillStyle(0);
170 leg->AddEntry(&h1, nameHisto1.Data(),
"lp");
171 leg->AddEntry(&h2, nameHisto2.Data(),
"lp");
181 TCanvas* c1 =
new TCanvas();
186 TGraphAsymmErrors* gSigma;
188 gSigma->SetLineColor(kRed);
189 gSigma->SetFillStyle(0);
190 gSigma->Draw(
"E2same");
197 pave->SetFillStyle(0);
198 pave->SetBorderSize(0);
199 pave->SetFillColor(0);
200 pave->SetTextFont(53);
201 pave->SetTextSize(12);
202 pave->AddText(
"ALICE");
203 pave->AddText(
"Run3 ITS Performaces");
204 pave->AddText(Form(
"Interaction Rate = %s", intRate.Data()));
210 const Int_t nbinsxx = hMean.GetNbinsX() + 1;
211 Double_t
x[nbinsxx],
y[nbinsxx], ex1[nbinsxx],
ex2[nbinsxx], ey1[nbinsxx], ey2[nbinsxx];
213 for (
int i = 0;
i < nbinsxx;
i++) {
214 x[
i] = hMean.GetBinCenter(
i);
215 y[
i] = hMean.GetBinContent(
i);
216 ex1[
i] = hMean.GetBinCenter(
i) - hMean.GetBinLowEdge(
i);
218 ey1[
i] = hSigma.GetBinContent(
i);
219 ey2[
i] = hSigma.GetBinContent(
i);
222 gr =
new TGraphAsymmErrors(nbinsxx,
x,
y, ex1,
ex2, ey1, ey2);
std::vector< double > makeLogBinning(const int nbins, const double min, const double max)
get a vector containing binning info for constant sized bins on a log axis
void paveTextITS(TPaveText *pave, TString intRate)
prepare TPaveText with labels
TCanvas * prepareSimpleCanvas2Histograms(TH1F &h1, int color1, TH1F &h2, int color2)
prepare canvas with two TH1F plots
TCanvas * prepareSimpleCanvas2DcaMeanValues(TH1F &h1, int color1, TString nameHisto1, TH1F &h2, int color2, TString nameHisto2)
void setStyleHistogram1DMeanValues(TH1F &histo, int color)
TCanvas * plot2DwithMeanAndSigma(TH2F &h2D, TH1F &hMean, TH1F &hSigma, int color)
plot canvas with TH2D + TH1D(Mean and Sigma) from slice
void setStyleHistogram2D(TH2F &histo)
void ConvertTH1ToTGraphAsymmError(TH1F &hMean, TH1F &hSigma, TGraphAsymmErrors *&gr)
Convert TH1F in TGraphAsymmetricError.
void setStyleHistogram1D(TH1F &histo, int color)
Set nice style for single 1D histograms.