Hi experts in ROOT family,
I want to draw a band for the error bar which contain 3 root file in the same pad. Particularly, I had 7 files root AKK08, Kretzer, BFGW, HKNS, DSS, DSS_05 and DSS_2 and ploted them seperately in the same Canvas (My picture attached below with above position, DSS is kGray).
Now, I’m dont know how to plot 3 file DSS, DSS_05 and DSS_2 nearly as the band continuously in the same pad.(Picture attached under and I’m trying to do as that).
My histogram is TH1D.
My code:
TFile *fa = new TFile("ggotest_lo_9AKK08.root");
TH1D *hza = new TH1D("hza", "Khoi Phuc Bin 9", bin_z, z_min, z_max);
...
TFile *fh = new TFile("ggotest_lo_9HKNS.root");
TH1D *hzh = new TH1D("hz", "Khoi Phuc", bin_z, z_min, z_max);
TFile *fk = new TFile("ggotest_lo_9Kretzer.root");
TH1D *hzk = new TH1D("hz","Khoi Phuc", bin_z, z_min, z_max);
TFile *fb = new TFile("ggotest_lo_9BFGW.root");
TH1D *hzb = new TH1D("hz", "Khoi Phuc", bin_z, z_min, z_max);
TFile *fd05 = new TFile("ggotest_lo_9DSS_05.root");
TH1D *hzd05 = new TH1D("hz","Khoi Phuc",bin_z, z_min, z_max);
hzd05->SetMarkerStyle(21);
hzd05->SetMarkerColor(kGray);
hzd05->SetMarkerSize(1.3);
TFile *fd = new TFile("ggotest_lo_9DSS.root");
TH1D *hzd = new TH1D("hz","Khoi Phuc",bin_z, z_min, z_max);
hzd->SetMarkerStyle(21);
hzd->SetMarkerColor(kGray);
hzd->SetMarkerSize(1.3);
TFile *fd2 = new TFile("ggotest_lo_9DSS_2.root");
TH1D *hzd2 = new TH1D("hz","Khoi Phuc",bin_z, z_min, z_max);
hzd2->SetMarkerStyle(21);
hzd2->SetMarkerColor(kGray);
hzd2->SetMarkerSize(1.3);
TCanvas *c1 = new TCanvas("c1","Graph Draw Options",205,47,600,400);
c1->SetLogy();
c1->SetTickx();
c1->SetTicky();
hza->GetXaxis()->SetTitle("z_{3}");
hza->GetYaxis()->SetTitle("d#sigma/dz_{3}[pb]");
hza->Draw("E");
hzh->Draw("E same");
hzk->Draw("E same");
hzb->Draw("E same");
hzd05->Draw("E same");
hzd->Draw("E same");
hzd2->Draw("E same");
Honestly speaking, I have researched about 1 month but still not find the solution. So ideas or suggestions are highly appreciated.
Hopping admin accept my post!
Best regard,
Zane
_ROOT Version:_6.10/08
Platform: Fedora version 25
Compiler: gcc 5.3