108{
109
110 int min = (
int)tuple->GetMinimum(
"nt0");
111 int max = (
int)tuple->GetMaximum(
"nt0");
112 float bsize = ceil(((
float)(
max -
min) / 50));
114
115 TH1F *hits1 =
new TH1F(Form(
"%s_hits1", tuple->GetName()),
"test1", 50,
min,
hmax);
116 TH1F *hits2 =
new TH1F(Form(
"%s_hits2", tuple->GetName()),
"test2", 50,
min,
hmax);
117 TH1F *hits3 =
new TH1F(Form(
"%s_hits3", tuple->GetName()),
"test3", 50,
min,
hmax);
118
119
120 tuple->Draw(Form("nt0>>%s_hits1", tuple->GetName()), Form("nt0<=%i", mint0));
121 tuple->Draw(Form("nt0>>%s_hits2", tuple->GetName()), Form("nt0>%i && nt0<=%i", mint0, minrt));
122 tuple->Draw(Form("nt0>>%s_hits3", tuple->GetName()), Form("nt0>%i", minrt));
123 hits1->SetFillColor(46);
124 hits2->SetFillColor(8);
125 hits3->SetFillColor(38);
126
127
128
129 this->Add(hits1);
130 this->Add(hits2);
131 this->Add(hits3);
132
133 if (doleg)
134 {
135 leg->AddEntry(hits1,
"no calibration");
136 leg->AddEntry(hits2,
"enough for T0 calib");
137 leg->AddEntry(hits3,
"enough for T0+RT calib");
138 leg->SetTextSize(0.04);
139 }
140}
TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)