//Figure 3 IZV RAS #if !defined(__CLING__) #include "TFile.h" #include "TCanvas.h" #include "TH1F.h" #include "TText.h" #include #endif using std::cout; using std::endl; void figIZVCorrRightGS(const Bool_t saveFigs = 0) { const Int_t canMap[6] = {1,4,3,6,2,5}; 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("heeT1_2_4560"); hExp[0] = new TH1F(*hCurr); hCurr = (TH1F*)fr1->Get("heeT1_2_6075"); hExp[1] = new TH1F(*hCurr); hCurr = (TH1F*)fr1->Get("heeT1_2_7590"); hExp[2] = new TH1F(*hCurr); hCurr = (TH1F*)fr1->Get("heeT1_2_90120"); hExp[3] = new TH1F(*hCurr); hCurr = (TH1F*)fr1->Get("hseT1_2_4560"); hSim[0] = new TH1F(*hCurr); hCurr = (TH1F*)fr1->Get("hseT1_2_6075"); hSim[1] = new TH1F(*hCurr); hCurr = (TH1F*)fr1->Get("hseT1_2_7590"); hSim[2] = new TH1F(*hCurr); hCurr = (TH1F*)fr1->Get("hseT1_2_90120"); hSim[3] = new TH1F(*hCurr); hCurr = (TH1F*)fr1->Get("hieT1_2_4560"); hInput[0] = new TH1F(*hCurr); hCurr = (TH1F*)fr1->Get("hieT1_2_6075"); hInput[1] = new TH1F(*hCurr); hCurr = (TH1F*)fr1->Get("hieT1_2_7590"); hInput[2] = new TH1F(*hCurr); hCurr = (TH1F*)fr1->Get("hieT1_2_90120"); hInput[3] = new TH1F(*hCurr); TCanvas *c2 = new TCanvas("c2", "Fig. 3, IZV RAS"); c2->ToggleEditor(); c2->SetWindowSize(1500, 1000); c2->Divide(3, 2, .001, .001); TH1F *hCorrExp[6]; TH1F *hCorrSim[6]; TH1F *hCorrInput[6]; TString hName; cout << "Fig. 3" << endl; TText *t1[6]; TString panel[6] = {"a", "d", "c", "f", "b", "e"}; for (Int_t i = 0; i < 6; i++) { c2->cd(canMap[i]); hName.Form("heeT1_%d_7590", i); hCurr = (TH1F*)fr1->Get(hName.Data()); hCorrExp[i] = new TH1F(*hCurr); hName.Form("hseT1_%d_7590", i); hCurr = (TH1F*)fr1->Get(hName.Data()); hCorrSim[i] = new TH1F(*hCurr); hName.Form("hieT1_%d_7590", i); hCurr = (TH1F*)fr1->Get(hName.Data()); hCorrInput[i] = new TH1F(*hCurr); hCorrInput[i]->SetLineColor(kBlack); hCorrInput[i]->SetLineStyle(2); hCorrInput[i]->Smooth(); hCorrSim[i]->SetTitle(""); hCorrSim[i]->GetXaxis()->SetNdivisions(505); hCorrSim[i]->GetYaxis()->SetRangeUser(0., 850.); hCorrSim[i]->GetYaxis()->SetNdivisions(505); hCorrSim[i]->GetYaxis()->SetTitle(""); hCorrSim[i]->SetLineColor(kGray+1); // hCorrSim[i]->SetFillColor(kGray+1); hCorrSim[i]->GetXaxis()->CenterTitle(0); hCorrSim[i]->Draw("hist"); hCorrExp[i]->Draw("E same"); hCorrInput[i]->Draw("hist same"); hCorrExp[i]->Chi2Test(hCorrSim[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(); } c2->Update(); if (saveFigs) { // c2->SaveAs("figures/PresGSepsilonTright7590.png"); c2->SaveAs("figures/Fig3izvIntCorrs.png"); c2->SaveAs("figures/Fig3izvIntCorrs.eps"); } }