14 TString dataDir(
"./");
17 dataFile[0] =
"gflash00.root";
18 dataFile[1] =
"gflash01.root";
24 UInt_t
col[] = { kRed, kGreen, kBlue, kViolet };
26 UInt_t mark[] = { 20, 21, 32, 22};
28 THStack *hs =
new THStack(
"hs",
"");
30 for (UInt_t i = 0; i < 2; i++) {
31 TString
tmp = dataDir + dataFile[i];
32 f[i] = TFile::Open(tmp);
34 p[i] = (TProfile *) (f[i])->Get(
"p0");
37 p[i]->SetFillColor(col[i]);
38 p[i]->SetLineStyle(i+2);
39 p[i]->SetLineColor(col[i]);
40 p[i]->SetLineWidth(2);
41 p[i]->SetMarkerStyle(mark[i]);
42 p[i]->SetMarkerColor(col[i]);
43 p[i]->SetMarkerSize(1.5);
46 TCanvas *cst =
new TCanvas(
"cst",
"stacked hists",10,10,800,700);
48 hs->Draw(
"p,nostack");
49 hs->SetTitle(
"Longitudinal Profile");
50 hs->GetXaxis()->SetTitle(
"Depth (RadLen)");
51 hs->GetYaxis()->SetTitle(
"E/E_{tot} (%/RadLen)");
56 TLegend*
legend =
new TLegend(0.79,0.84,0.94,0.94);
57 legend->AddEntry(p[0],
"full ",
"p");
58 legend->AddEntry(p[1],
"gflash",
"p");