#include "Header.h"
#include "HistogramAttr.h"
Go to the source code of this file.
|
| HistogramAttr1D (TH1 *h, char *title_x, char *title_y, Double_t binlowx, Double_t binhighx, Double_t binlowy, Double_t binhighy, Color_t lcolor) |
|
void | HistogramAttr2D (TH2 *h, char *titlx_x, char *titlx_y, char *titlx_z, Double_t binlowx, Double_t binhighx, Double_t binlowy, Double_t binhighy) |
|
void | Ratiohist (TH1 *h1, TH1 *h2, TH1 *hratio, Color_t color, Style_t mstyle, TString labelx, TString labely, Double_t lowy, Double_t highy) |
|
void | Ratiofit (TF1 *f1, TF1 *f2, TH1 *hratio, TString plane, TString cell, Color_t color, Style_t mstyle, TString labelx, TString labely, Double_t lowy, Double_t highy) |
|
HistogramAttr1D |
( |
TH1 * |
h, |
|
|
char * |
title_x, |
|
|
char * |
title_y, |
|
|
Double_t |
binlowx, |
|
|
Double_t |
binhighx, |
|
|
Double_t |
binlowy, |
|
|
Double_t |
binhighy, |
|
|
Color_t |
lcolor |
|
) |
| |
void HistogramAttr2D |
( |
TH2 * |
h, |
|
|
char * |
titlx_x, |
|
|
char * |
titlx_y, |
|
|
char * |
titlx_z, |
|
|
Double_t |
binlowx, |
|
|
Double_t |
binhighx, |
|
|
Double_t |
binlowy, |
|
|
Double_t |
binhighy |
|
) |
| |
Definition at line 24 of file HistogramAttr.cxx.
Referenced by calibrationconstants().
25 h->GetXaxis()->SetTitle(titlx_x);
26 h->GetXaxis()->CenterTitle();
27 h->GetXaxis()->SetTitleSize(.05);
28 h->GetXaxis()->SetLabelSize(.04);
29 h->GetXaxis()->SetTitleOffset(0.85);
30 h->GetXaxis()->SetRangeUser(binlowx, binhighx);
32 h->GetYaxis()->SetTitle(titlx_y);
33 h->GetYaxis()->CenterTitle();
34 h->GetYaxis()->SetTitleOffset(0.90);
35 h->GetYaxis()->SetTitleSize(.05);
36 h->GetYaxis()->SetLabelSize(.04);
37 h->GetYaxis()->SetRangeUser(binlowy, binhighy);
39 h->GetZaxis()->SetTitle(titlx_z);
40 h->GetZaxis()->CenterTitle();
41 h->GetZaxis()->SetLabelSize(.045);
42 h->GetZaxis()->SetLabelOffset(-0.008);
void Ratiofit |
( |
TF1 * |
f1, |
|
|
TF1 * |
f2, |
|
|
TH1 * |
hratio, |
|
|
TString |
plane, |
|
|
TString |
cell, |
|
|
Color_t |
color, |
|
|
Style_t |
mstyle, |
|
|
TString |
labelx, |
|
|
TString |
labely, |
|
|
Double_t |
lowy, |
|
|
Double_t |
highy |
|
) |
| |
Definition at line 65 of file HistogramAttr.cxx.
References bin, HistogramAttr1D(), and w.
Referenced by corrected_PE().
72 for(Int_t
bin = 1;
bin < hratio->GetXaxis()->GetNbins();
bin++){
73 w = hratio->GetXaxis()->GetBinCenter(
bin);
76 hratio->Fill(hratio->GetBinCenter(
bin), fitratio);
81 if(value1==0) fitratio = 0.0;
82 else fitratio= value2/value1;
83 hratio->Fill(hratio->GetBinCenter(
bin), fitratio);
85 hratio->SetMarkerStyle(mstyle);
86 hratio->SetMarkerColor(
color);
87 hratio->SetMarkerSize(1.0);
88 hratio->SetLineColor(
color);
89 HistogramAttr1D(hratio, labelx.Data(), labely.Data(),
f1->GetXaxis()->GetBinCenter(1),
f1->GetXaxis()->GetBinCenter(
f1->GetXaxis()->GetNbins()), lowy, highy,
color);
90 hratio->Draw(
"P same");
HistogramAttr1D(TH1 *h, char *title_x, char *title_y, Double_t binlowx, Double_t binhighx, Double_t binlowy, Double_t binhighy, Color_t lcolor)
void Ratiohist |
( |
TH1 * |
h1, |
|
|
TH1 * |
h2, |
|
|
TH1 * |
hratio, |
|
|
Color_t |
color, |
|
|
Style_t |
mstyle, |
|
|
TString |
labelx, |
|
|
TString |
labely, |
|
|
Double_t |
lowy, |
|
|
Double_t |
highy |
|
) |
| |
Definition at line 45 of file HistogramAttr.cxx.
References HistogramAttr1D().
Referenced by corrected_PE(), thresholdshadowing(), and uncorrected_PE().
48 Double_t content_ratio;
49 for(Int_t nbin = 1; nbin <=
h1->GetXaxis()->GetNbins(); nbin++){
50 Double_t bincontent1 =
h1->GetBinContent(nbin);
51 Double_t bincontent2 =
h2->GetBinContent(nbin);
52 if(bincontent1==0) content_ratio = 0.0;
53 else content_ratio = (bincontent2)/(bincontent1);
54 hratio->Fill(
h1->GetBinCenter(nbin), content_ratio);
57 hratio->SetMarkerStyle(mstyle);
58 hratio->SetMarkerSize(1.0);
59 hratio->SetLineColor(
color);
60 hratio->SetMarkerColor(
color);
61 HistogramAttr1D(hratio, labelx.Data(), labely.Data(),
h2->GetXaxis()->GetBinCenter(1),
h2->GetXaxis()->GetBinCenter(
h2->GetXaxis()->GetNbins()), lowy, highy,
color);
62 hratio->Draw(
"P same");
HistogramAttr1D(TH1 *h, char *title_x, char *title_y, Double_t binlowx, Double_t binhighx, Double_t binlowy, Double_t binhighy, Color_t lcolor)