3 #include <TGraphAsymmErrors.h>
4 #include <TGraphErrors.h>
12 #include "SaveCanvas.C"
13 #include "sPhenixStyle.C"
24 TCanvas *c1 =
new TCanvas(
"DataRate",
"DataRate", 1700, 960);
29 p = (TPad *) c1->cd(idx++);
31 p->SetRightMargin(.15);
34 TH1 *hDataSize = (TH1 *)
_file0->GetObjectChecked(
"hDataSize",
"TH1");
37 TH1 *
h = (TH1 *) hDataSize->DrawClone();
39 h->Scale(1. / hNormalization->GetBinContent(1));
40 h->SetTitle(
";TPC Event Size [Byte];Probability / bin");
45 h->GetXaxis()->SetRangeUser(0, 20e6);
47 h->GetYaxis()->SetRangeUser(0, .05);
49 TLegend *
leg =
new TLegend(.2, .7, .8, .92);
50 leg->AddEntry(
"",
"#it{#bf{sPHENIX}} Simulation",
"");
52 leg->AddEntry(
"", Form(
"<Event size> = %.1f MB (before compression)", hDataSize->GetMean() / 1e6),
"");
53 leg->AddEntry(
"", Form(
"Data rate = %.0f Gbps (15 kHz trig., LZO compression)", hDataSize->GetMean() * 8 * .6 * 15e3 / 1e9),
"");
63 TH1 *hCDF = (TH1 *) h->Clone(TString(
"CDF") + h->GetName());
64 hCDF->SetDirectory(NULL);
68 for (
int bin = h->GetNbinsX() + 1; bin >= 0; --bin)
70 integral += h->GetBinContent(bin);
71 hCDF->SetBinContent(bin, integral);
74 for (
int bin = h->GetNbinsX() + 1; bin >= 0; --bin)
76 hCDF->SetBinContent(bin, hCDF->GetBinContent(bin) /
integral);
77 hCDF->SetBinError(bin, 0);
89 TH2 *hFEEDataSize = (TH2 *)
_file0->GetObjectChecked(
"hFEEDataSize",
"TH2");
92 Color_t linecolors[] = {kBlack, kRed + 2, kBlue + 2, kGreen + 2, kBlack};
95 TCanvas *
c =
new TCanvas(
"FEEDataSize_raw",
"FEEDataSize_raw", 1900, 760);
99 for (
int module = 1; module <= 3; module++)
101 p = (TPad *) c->cd(idx++);
103 p->SetRightMargin(.15);
105 TString
name = Form(
"hFEEDataSize_module%d", module);
107 (TH1 *) hFEEDataSize->ProjectionX(name, module, module)->DrawClone(
"");
112 TCanvas *c1 =
new TCanvas(
"FEEDataSize",
"FEEDataSize", 1900, 760);
116 p = (TPad *) c1->cd(idx++);
118 p->SetRightMargin(.15);
119 TH1 *frame = p->DrawFrame(0, 0, 50e3, .8e6);
120 frame->SetTitle(
";TPC FELIX Per-Drift Data Size [Byte];Count");
121 frame->GetXaxis()->SetNdivisions(15, 5, 1,
true);
123 TLegend *
leg =
new TLegend(.2, .6, .85, .92);
125 leg->AddEntry(
"",
"#it{#bf{sPHENIX}} Simulation",
"");
128 p = (TPad *) c1->cd(idx++);
130 p->SetRightMargin(.15);
131 frame = p->DrawFrame(0, 1
e-5, 50e3, 1);
132 frame->SetTitle(
";TPC FELIX Per-Drift Data Size [Byte];CCDF");
133 frame->GetXaxis()->SetNdivisions(15, 5, 1,
true);
136 for (
int module = 1; module <= 3; module++)
138 p = (TPad *) c1->cd(1);
141 TString
name = Form(
"hFEEDataSize_module%d", module);
143 TH1 *h_FEE_raw = (TH1 *) hFEEDataSize->ProjectionX(name, module, module);
144 TH1 *h_FEE = (TH1 *) h_FEE_raw->DrawClone(
"same");
148 h_FEE->SetLineColor(linecolors[module]);
149 h_FEE->SetMarkerColor(linecolors[module]);
151 leg->AddEntry(h_FEE, Form(
"Module%d: <Data/Drift/FEE> = %.1f kB", module, h_FEE->GetMean() / 1e3),
"lp");
153 p = (TPad *) c1->cd(2);
157 h_FEE->SetLineColor(linecolors[module]);
159 h_FEE->GetXaxis()->SetRangeUser(0, 1e6);
162 p = (TPad *) c1->cd(1);
174 TH1 *hSectorDataSize = (TH1 *)
_file0->GetObjectChecked(
"hSectorDataSize",
"TH1");
178 TCanvas *
c =
new TCanvas(
"SectorDataSize_raw",
"SectorDataSize_raw", 1000, 760);
179 TH1 *
h = (TH1 *) hSectorDataSize->DrawClone();
183 TCanvas *c1 =
new TCanvas(
"SectorDataSize",
"SectorDataSize", 2000, 760);
188 p = (TPad *) c1->cd(idx++);
190 p->SetRightMargin(.15);
193 h = (TH1 *) hSectorDataSize->DrawClone();
196 h->SetTitle(
";TPC FELIX Per-DriftWindow Data Size [Byte];Count");
201 h->GetXaxis()->SetRangeUser(0, 2e6);
205 TLegend *
leg =
new TLegend(.35, .7, .85, .92);
206 leg->AddEntry(
"",
"#it{#bf{sPHENIX}} Simulation",
"");
208 leg->AddEntry(
"", Form(
"<Data/Drift Window/FELIX> = %.2f MB", hSectorDataSize->GetMean() / 1e6),
"");
211 p = (TPad *) c1->cd(idx++);
213 p->SetRightMargin(.15);
218 h->SetTitle(
";TPC FELIX Per-Drift Data Size [Byte];CCDF");
220 h->GetXaxis()->SetRangeUser(0, 1e6);
240 TCanvas *c1 =
new TCanvas(
"dNdeta",
"dNdeta", 1800, 960);
245 p = (TPad *) c1->cd(idx++);
249 TH1 *hNChEta = (TH1 *)
_file0->GetObjectChecked(
"hNChEta",
"TH1");
252 TH1 *
h = (TH1 *) hNChEta->DrawClone();
255 h->Scale(1. / hNormalization->GetBinContent(2));
256 h->Scale(1. / h->GetXaxis()->GetBinWidth(1));
257 h->SetTitle(
";#eta;dN_{Ch}/d#eta");
259 TLegend *
leg =
new TLegend(.3, .25, .8, .45);
260 leg->AddEntry(
"",
"#it{#bf{sPHENIX}} Simulation",
"");
262 leg->AddEntry(
"",
"dN_{Ch}/d#eta, sHIJING to Geant4 input",
"");
272 TCanvas *c1 =
new TCanvas(
"ChargeCheck",
"ChargeCheck", 1800, 960);
277 p = (TPad *) c1->cd(idx++);
279 p->SetRightMargin(.2);
281 TH2 *hLayerZBinADC = (TH2 *)
_file0->GetObjectChecked(
"hLayerZBinADC",
"TH2");
284 hLayerZBinADC->Draw(
"colz");
293 TCanvas *c1 =
new TCanvas(
"WaveletCheck",
"WaveletCheck", 1800, 960);
298 p = (TPad *) c1->cd(idx++);
301 p->SetRightMargin(.15);
303 TH2 *hLayerWaveletSize = (TH2 *)
_file0->GetObjectChecked(
"hLayerWaveletSize",
"TH2");
304 assert(hLayerWaveletSize);
306 hLayerWaveletSize->GetYaxis()->SetRangeUser(0, 260);
307 hLayerWaveletSize->Draw(
"colz");
309 p = (TPad *) c1->cd(idx++);
313 hLayerWaveletSize->ProjectionY()->Draw();
315 TLegend *
leg =
new TLegend(.2, .7, .8, .92);
316 leg->AddEntry(
"",
"#it{#bf{sPHENIX}} Simulation",
"");
326 TCanvas *c1 =
new TCanvas(
"Check1",
"Check1", 1800, 960);
331 p = (TPad *) c1->cd(idx++);
338 hNormalization->Draw();
340 p = (TPad *) c1->cd(idx++);
343 p->SetRightMargin(.1);
345 TH1 *hDataSize = (TH1 *)
_file0->GetObjectChecked(
"hDataSize",
"TH1");
348 TH1 *
h = (TH1 *) hDataSize->DrawClone();
351 p = (TPad *) c1->cd(idx++);
355 TH1 *hWavelet = (TH1 *)
_file0->GetObjectChecked(
"hWavelet",
"TH1");
358 h = (TH1 *) hWavelet->DrawClone();
361 p = (TPad *) c1->cd(idx++);
364 p->SetRightMargin(.15);
366 TH2 *hLayerWaveletSize = (TH2 *)
_file0->GetObjectChecked(
"hLayerWaveletSize",
"TH2");
367 assert(hLayerWaveletSize);
369 hLayerWaveletSize->Draw(
"colz");
371 p = (TPad *) c1->cd(idx++);
375 TH1 *hNChEta = (TH1 *)
_file0->GetObjectChecked(
"hNChEta",
"TH1");
378 hNChEta->DrawClone();
380 p = (TPad *) c1->cd(idx++);
384 hNChEta = (TH1 *)
_file0->GetObjectChecked(
"hNChEta",
"TH1");
387 h = (TH1 *) hNChEta->DrawClone();
390 h->Scale(1. / hNormalization->GetBinContent(1));
399 TCanvas *c1 =
new TCanvas(
"Occupancy",
"Occupancy", 1800, 960);
404 p = (TPad *) c1->cd(idx++);
407 p->SetRightMargin(.15);
409 TH2 *hLayerHit = (TH2 *)
_file0->GetObjectChecked(
"hLayerHit",
"TH2");
412 hLayerHit->GetYaxis()->SetRangeUser(0, 260);
413 hLayerHit->Draw(
"colz");
415 hLayerHit->ProfileY()->Draw(
"same");
424 TCanvas *c1 =
new TCanvas(
"Check2",
"Check2", 1800, 960);
429 p = (TPad *) c1->cd(idx++);
432 p->SetRightMargin(.15);
434 TH2 *hLayerHit = (TH2 *)
_file0->GetObjectChecked(
"hLayerHit",
"TH2");
437 hLayerHit->GetYaxis()->SetRangeUser(0, 260);
438 hLayerHit->Draw(
"colz");
440 p = (TPad *) c1->cd(idx++);
443 p->SetRightMargin(.15);
445 TH2 *hLayerDataSize = (TH2 *)
_file0->GetObjectChecked(
"hLayerDataSize",
"TH2");
448 hLayerDataSize->Draw(
"colz");
450 p = (TPad *) c1->cd(idx++);
452 p->SetRightMargin(.15);
455 TH2 *hLayerSumHit = (TH2 *)
_file0->GetObjectChecked(
"hLayerSumHit",
"TH2");
458 hLayerSumHit->Draw(
"colz");
460 p = (TPad *) c1->cd(idx++);
462 p->SetRightMargin(.15);
465 TH2 *hLayerSumDataSize = (TH2 *)
_file0->GetObjectChecked(
"hLayerSumDataSize",
"TH2");
466 assert(hLayerSumDataSize);
468 hLayerSumDataSize->Draw(
"colz");
470 p = (TPad *) c1->cd(idx++);
472 p->SetRightMargin(.15);
475 TH2 *hLayerZBinHit = (TH2 *)
_file0->GetObjectChecked(
"hLayerZBinHit",
"TH2");
478 hLayerZBinHit->Draw(
"colz");
480 p = (TPad *) c1->cd(idx++);
482 p->SetRightMargin(.15);
485 TH2 *hLayerZBinADC = (TH2 *)
_file0->GetObjectChecked(
"hLayerZBinADC",
"TH2");
488 hLayerZBinADC->Draw(
"colz");
505 const TString
infile =
"/sphenix/user/jinhuang/TPC/TPCMLDataInterface/AuAu200_170kHz_MB_Iter2/AuAu200_170kHz_MB_Iter2_SUM.xml_TPCMLDataInterface.root",
506 const TString disc =
"Au+Au 170 kHz collision + M.B. in 13#mus"
514 gStyle->SetOptStat(0);
515 gStyle->SetOptFit(1111);
516 TVirtualFitter::SetDefaultFitter(
"Minuit2");