Hello,
I’ve written a code to compare data and background using “HStack”,
[code]void BG_Macro() {
TFile* fgg = new TFile(“file:background_gg2zz_13TeV_.root”);
TFile* fzz = new TFile(“file:background_qqbar2zz_13TeV_.root”);
TFile* fdata1 = new TFile(“file:data_500GeV_13TeV_.root”);
TH1D h_gg = (TH1D)fgg->Get(“myHisto1”);
TH1D h_zz = (TH1D)fzz->Get(“myHisto1”);
TH1D h_data1 = (TH1D)fdata1->Get(“myHisto1”);
TCanvas *c1 = new TCanvas(“c1”, “c1”, 0, 0, 700, 500);
c1->cd();
gPad->SetLogy();
THStack *hs = new THStack(“hs”, NULL);
hs->Add(h_gg);
hs->Add(h_zz);
hs->Draw();
h_data1->Draw(“same”);
}
[/code]
but I can’t change the Y axis range, and I don’t know what is the problem