12 gStyle->SetPalette(1,0);
13 gStyle->SetOptStat(kFALSE);
15 gStyle->SetPadRightMargin(0.15);
16 gStyle->SetPadLeftMargin(0.15);
17 gStyle->SetPadBottomMargin(0.15);
37 TH1F *hsummary_layer1 =
new TH1F(
"hsummary_layer1",
"Summary layer 1",npts,xmin,xmax);
38 TH1F *hsummary_layer2 =
new TH1F(
"hsummary_layer2",
"Summary layer 2",npts,xmin,xmax);
39 TH1F *hsummary_layer3 =
new TH1F(
"hsummary_layer3",
"Summary layer 3",npts,xmin,xmax);
40 TH1F *hsummary_layer4 =
new TH1F(
"hsummary_layer4",
"Summary layer 4",npts,xmin,xmax);
42 TH1F *hsummary2_layer1 =
new TH1F(
"hsummary2_layer1",
"Summary layer 1",npts,xmin,xmax);
43 TH1F *hsummary2_layer2 =
new TH1F(
"hsummary2_layer2",
"Summary layer 2",npts,xmin,xmax);
44 TH1F *hsummary2_layer3 =
new TH1F(
"hsummary2_layer3",
"Summary layer 3",npts,xmin,xmax);
45 TH1F *hsummary2_layer4 =
new TH1F(
"hsummary2_layer4",
"Summary layer 4",npts,xmin,xmax);
49 for (ndx=0; ndx < npts; ndx++) {
51 sprintf(
string,
"hd_rawdata_002179_%03d_.root",ndx);
92 in =
new TFile(
string,
"read");
94 printf (
"Histogram input filename=%s does not open\n",
string);
98 printf (
"Histogram input filename=%s OK\n",
string);
102 TDirectory *
dir = (TDirectory*)gDirectory->FindObjectAny(
"bcal_eff");
106 h1eff_eff = (TH1F*)gDirectory->FindObjectAny(
"h1eff_eff");
107 TH1F *
h1eff_cellideff = (TH1F*)gDirectory->FindObjectAny(
"h1eff_cellideff");
108 TH1F *
h1eff2_eff2 = (TH1F*)gDirectory->FindObjectAny(
"h1eff2_eff2");
111 if ( (h1eff_eff == NULL) || (h1eff_eff->GetEntries() <=0))
continue;
115 Int_t ndim = h1eff_eff->GetNbinsX();
116 Double_t xlo = h1eff_eff->GetBinLowEdge(1);
117 Double_t width = h1eff_eff->GetBinWidth(1);
118 Double_t xhi = xlo + width*ndim;
119 printf (
"\nbcal_hist_eff_summary: ndx=%d, ndim=%d, xlo=%f, width=%f, xhi=%d\n\n",ndx,ndim,xlo,width,xhi);
121 for(j=0;j<ndim;j++) {
122 Double_t xbin = xlo + j*width;
123 Double_t content = h1eff_eff->GetBinContent(j+1);
124 Double_t error = h1eff_eff->GetBinError(j+1);
125 printf (
"j=%d, xbin=%f, content=%f\n",j,xbin,content);
130 hsummary_layer1->SetBinContent(ndx+1,content);
131 hsummary_layer1->SetBinError(ndx+1,error);
134 hsummary_layer2->SetBinContent(ndx+1,content);
135 hsummary_layer2->SetBinError(ndx+1,error);
138 hsummary_layer3->SetBinContent(ndx+1,content);
139 hsummary_layer3->SetBinError(ndx+1,error);
142 hsummary_layer4->SetBinContent(ndx+1,content);
143 hsummary_layer4->SetBinError(ndx+1,error);
152 ndim = h1eff2_eff2->GetNbinsX();
153 xlo = h1eff2_eff2->GetBinLowEdge(1);
154 width = h1eff2_eff2->GetBinWidth(1);
155 xhi = xlo + width*ndim;
156 printf (
"\nbcal_hist_eff2_summary: ndx=%d, ndim=%d, xlo=%f, width=%f, xhi=%f\n\n",ndx,ndim,xlo,width,xhi);
158 for(j=0;j<ndim;j++) {
159 Double_t xbin = xlo + j*width;
160 Double_t content = h1eff2_eff2->GetBinContent(j+1);
161 Double_t error = h1eff2_eff2->GetBinError(j+1);
162 printf (
"j=%d, xbin=%f, content=%f\n",j,xbin,content);
167 hsummary2_layer1->SetBinContent(ndx+1,content);
168 hsummary2_layer1->SetBinError(ndx+1,error);
171 hsummary2_layer2->SetBinContent(ndx+1,content);
172 hsummary2_layer2->SetBinError(ndx+1,error);
175 hsummary2_layer3->SetBinContent(ndx+1,content);
176 hsummary2_layer3->SetBinError(ndx+1,error);
179 hsummary2_layer4->SetBinContent(ndx+1,content);
180 hsummary2_layer4->SetBinError(ndx+1,error);
190 TCanvas *
c1 =
new TCanvas(
"c1",
"c1 bcal_hist_eff_summary ",200,10,700,700);
191 c1->SetBorderMode(0);
196 c1->SetBorderMode(0);
199 TLegend *
leg =
new TLegend(0.6,0.8,0.85,0.95);
200 leg->AddEntry(hsummary_layer1,
"Layer 1",
"p");
201 leg->AddEntry(hsummary_layer2,
"Layer 2",
"p");
202 leg->AddEntry(hsummary_layer3,
"Layer 3",
"p");
203 leg->AddEntry(hsummary_layer4,
"Layer 4",
"p");
205 hsummary_layer1->SetTitle(
"");
207 hsummary_layer1->GetYaxis()->SetRangeUser(ymin,ymax);
208 hsummary_layer1->GetXaxis()->SetTitleSize(0.05);
209 hsummary_layer1->GetYaxis()->SetTitleSize(0.05);
210 hsummary_layer1->GetXaxis()->SetTitle(
"File Number");
211 hsummary_layer1->GetYaxis()->SetTitle(
"Efficiency Clusters");
212 hsummary_layer1->SetLineColor(2);
213 hsummary_layer1->SetMarkerColor(2);
214 hsummary_layer1->SetMarkerStyle(20);
215 hsummary_layer1->Draw(
"p");
217 hsummary_layer2->SetLineColor(4);
218 hsummary_layer2->SetMarkerColor(4);
219 hsummary_layer2->SetMarkerStyle(20);
220 hsummary_layer2->Draw(
"samep");
222 hsummary_layer3->SetLineColor(1);
223 hsummary_layer3->SetMarkerColor(1);
224 hsummary_layer3->SetMarkerStyle(20);
225 hsummary_layer3->Draw(
"samep");
227 hsummary_layer4->SetLineColor(3);
228 hsummary_layer4->SetMarkerColor(3);
229 hsummary_layer4->SetMarkerStyle(20);
230 hsummary_layer4->Draw(
"samep");
232 sprintf(
string,
"hd_rawdata_002179");
233 printf (
"Histogram input filename=%s\n",
string);
234 TLatex *
t1 =
new TLatex(0.15,0.92,
string);
236 t1->SetTextSize(0.03);
242 TCanvas *
c2 =
new TCanvas(
"c2",
"c2 bcal_hist_eff_summary ",200,10,700,700);
243 c2->SetBorderMode(0);
248 c2->SetBorderMode(0);
251 leg =
new TLegend(0.6,0.80,0.85,0.95);
252 leg->AddEntry(hsummary2_layer1,
"Layer 1",
"p");
253 leg->AddEntry(hsummary2_layer2,
"Layer 2",
"p");
254 leg->AddEntry(hsummary2_layer3,
"Layer 3",
"p");
255 leg->AddEntry(hsummary2_layer4,
"Layer 4",
"p");
257 hsummary2_layer1->SetTitle(
"");
259 hsummary2_layer1->GetYaxis()->SetRangeUser(ymin,ymax);
260 hsummary2_layer1->GetXaxis()->SetTitleSize(0.05);
261 hsummary2_layer1->GetYaxis()->SetTitleSize(0.05);
262 hsummary2_layer1->GetXaxis()->SetTitle(
"File Number");
263 hsummary2_layer1->GetYaxis()->SetTitle(
"Efficiency Enhanced Hits");
264 hsummary2_layer1->SetLineColor(2);
265 hsummary2_layer1->SetMarkerColor(2);
266 hsummary2_layer1->SetMarkerStyle(20);
267 hsummary2_layer1->Draw(
"p");
269 hsummary2_layer2->SetLineColor(4);
270 hsummary2_layer2->SetMarkerColor(4);
271 hsummary2_layer2->SetMarkerStyle(20);
272 hsummary2_layer2->Draw(
"samep");
274 hsummary2_layer3->SetLineColor(1);
275 hsummary2_layer3->SetMarkerColor(1);
276 hsummary2_layer3->SetMarkerStyle(20);
277 hsummary2_layer3->Draw(
"samep");
279 hsummary2_layer4->SetLineColor(3);
280 hsummary2_layer4->SetMarkerColor(3);
281 hsummary2_layer4->SetMarkerStyle(20);
282 hsummary2_layer4->Draw(
"samep");
284 sprintf(
string,
"hd_rawdata_002179");
285 printf (
"Histogram input filename=%s\n",
string);
286 t1 =
new TLatex(0.15,0.92,
string);
288 t1->SetTextSize(0.03);
295 sprintf(
string,
"bcal_hist_eff_summary_002179.pdf(");
298 sprintf(
string,
"bcal_hist_eff_summary_002179.pdf)");
sprintf(text,"Post KinFit Cut")
void bcal_hist_eff_summary(void)
printf("string=%s", string)