//Figure 2 IZV RAS #if !defined(__CLING__) #include "TFile.h" #include "TCanvas.h" #include "TH1F.h" #include "TText.h" #endif void figIZVCorrGS(const Bool_t saveFigs = 0) { TFile *fr1 = new TFile("figures/PRCepsilonT.root", "READ"); // TFile *fr2 = new TFile("figures/PRCepsilonT.root", "READ"); TH1F *hExp[4]; TH1F *hSim[4]; TH1F *hInput[4]; TH1F *hCurr = 0; hCurr = (TH1F*)fr1->Get("heeT0_0_4560"); hExp[0] = new TH1F(*hCurr); hCurr = (TH1F*)fr1->Get("heeT0_5_6075"); hExp[1] = new TH1F(*hCurr); hCurr = (TH1F*)fr1->Get("heeT0_5_7590"); hExp[2] = new TH1F(*hCurr); hCurr = (TH1F*)fr1->Get("heeT0_0_90120"); hExp[3] = new TH1F(*hCurr); hCurr = (TH1F*)fr1->Get("hseT0_0_4560"); hSim[0] = new TH1F(*hCurr); hCurr = (TH1F*)fr1->Get("hseT0_5_6075"); hSim[1] = new TH1F(*hCurr); hCurr = (TH1F*)fr1->Get("hseT0_5_7590"); hSim[2] = new TH1F(*hCurr); hCurr = (TH1F*)fr1->Get("hseT0_0_90120"); hSim[3] = new TH1F(*hCurr); hCurr = (TH1F*)fr1->Get("hieT0_0_4560"); hInput[0] = new TH1F(*hCurr); hCurr = (TH1F*)fr1->Get("hieT0_5_6075"); hInput[1] = new TH1F(*hCurr); hCurr = (TH1F*)fr1->Get("hieT0_5_7590"); hInput[2] = new TH1F(*hCurr); hCurr = (TH1F*)fr1->Get("hieT0_0_90120"); hInput[3] = new TH1F(*hCurr); TCanvas *c1 = new TCanvas("c1", "Fig. 2, IZV RAS"); c1->ToggleEditor(); // c1->SetWindowSize(800, 1200); c1->SetWindowSize(1800, 450); c1->Divide(4, 1, .001, .001); TText *t1[4]; TString panel[4] = {"a", "b", "c", "d"}; for (Int_t i = 0; i < 4; i++) { c1->cd(i+1); // cout << i << endl; hSim[i]->SetTitle(""); hSim[i]->SetLineColor(kGray); // hSim[i]->SetFillColor(kGray+1); hSim[i]->GetXaxis()->SetNdivisions(405); hSim[i]->GetYaxis()->SetTitle(""); if (i == 0 || i == 1) { hSim[i]->GetYaxis()->SetNdivisions(1005); } // hInput[i]->SetLineWidth(2); hInput[i]->SetLineColor(kBlack); hInput[i]->SetLineStyle(2); // hSim[i]->Smooth(); hSim[i]->GetXaxis()->CenterTitle(0); hSim[i]->Draw(""); hExp[i]->Draw("E same"); hInput[i]->Draw("same"); hInput[i]->Smooth(); hExp[i]->Chi2Test(hSim[i], "P"); // t1[i] = new TText(0.18,0.87,panel[i].Data()); t1[i] = new TText(0.5,0.92,panel[i].Data()); t1[i]->SetNDC(); t1[i]->SetTextFont(12); t1[i]->SetTextSize(0.07); t1[i]->Draw(); } c1->Update(); cout << saveFigs << endl; if (saveFigs) { // c2->SaveAs("figures/PresGSepsilonTright7590.png"); c1->SaveAs("figures/Fig2izvIntCorrsEvolution.png"); c1->SaveAs("figures/Fig2izvIntCorrsEvolution.eps"); } return; }