//Figure 4 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 figIZVCorrLeftES(const Bool_t saveFigs = 0) { // gStyle->SetLabelFont(); TFile *fr = new TFile("figures/PRCepsilonT.root", "READ"); const Int_t canMap[6] = {1,4,3,6,2,5}; TH1F *hCurr = 0; TString hName; TFile *fr2 = new TFile("figures/PRCthetaA.root"); TCanvas *c4 = new TCanvas("c4", "Fig. 4, IZV RAS"); c4->ToggleEditor(); // c4->SetWindowSize(800, 1227); // c4->Divide(2, 3, .001, .001); c4->SetWindowSize(1500, 1000); c4->Divide(3, 2, .001, .001); // TFile *fr2 = new TFile("figures/PRCthetaA.root"); TH1F *hAlphaExp90120[6]; TH1F *hAlphaSim90120[6]; TH1F *hAlphaInput90120[6]; TH1F *hAlphaInput90120Corr[6]; cout << "Fig. 4" << endl; TText *t1[6]; TString panel[6] = {"a)", "b)", "c)", "d)", "e)", "f)"}; for (Int_t i = 0; i < 6; i++) { c4->cd(canMap[i]); hName.Form("hethetaAT3_%d_90120", i); hCurr = (TH1F*)fr2->Get(hName.Data()); hAlphaExp90120[i] = new TH1F(*hCurr); hName.Form("hsthetaAT3_%d_90120", i); hCurr = (TH1F*)fr2->Get(hName.Data()); hAlphaSim90120[i] = new TH1F(*hCurr); hName.Form("hithetaAT3_%d_90120", i); hCurr = (TH1F*)fr2->Get(hName.Data()); hAlphaInput90120[i] = new TH1F(*hCurr); hAlphaInput90120Corr[i] = new TH1F(*hAlphaInput90120[i]); Double_t binContent = 0; for (Int_t binN = 1; binN <= 15; binN++) { // binContent = hAlphaInput90120Corr[i]->GetBinContent(binN); binContent = hAlphaInput90120[i]->GetBinContent(binN); hAlphaInput90120Corr[i]->SetBinContent(binN, binContent + hAlphaInput90120Corr[i]->GetBinContent(31-binN)); hAlphaInput90120Corr[i]->SetBinContent(31-binN, hAlphaInput90120Corr[i]->GetBinContent(binN)); // hAlphaInput90120Corr[i]->SetBinError(binN, 0.); // hAlphaInput90120Corr[i]->SetBinError(31-binN, 0.); } hAlphaInput90120[i]->SetLineWidth(2); hAlphaSim90120[i]->SetTitle(""); hAlphaSim90120[i]->GetXaxis()->SetNdivisions(506); hAlphaSim90120[i]->GetXaxis()->SetLabelSize(0.07); hAlphaSim90120[i]->GetXaxis()->SetLabelOffset(0.002); hAlphaSim90120[i]->GetXaxis()->SetTitleSize(0.08); hAlphaSim90120[i]->GetXaxis()->SetTitleOffset(0.74); hAlphaSim90120[i]->GetYaxis()->SetRangeUser(0., 650.); hAlphaSim90120[i]->GetYaxis()->SetTitle(""); hAlphaSim90120[i]->SetLineColor(kGray+1); // hAlphaSim90120[i]->SetFillColor(kGray+1); hAlphaSim90120[i]->GetXaxis()->CenterTitle(0); hAlphaSim90120[i]->Draw("hist"); hAlphaSim90120[i]->GetXaxis()->SetTitle("#it{#theta}_{#alpha}, rad"); // hAlphaInput90120Corr[i]->Draw("same"); hAlphaExp90120[i]->Draw("E same"); // hAlphaInput90120[i]->Draw("same"); hAlphaInput90120Corr[i]->SetLineColor(kBlack); hAlphaInput90120Corr[i]->SetLineStyle(2); hAlphaInput90120Corr[i]->Scale(0.5); hAlphaInput90120Corr[i]->Smooth(); hAlphaInput90120Corr[i]->Draw("hist same"); // hAlphaInput90120[i]->Draw("same"); // hAlphaInput90120Corr[i]-> hAlphaExp90120[i]->Chi2Test(hAlphaSim90120[i], "P"); t1[i] = new TText(0.18,0.87,panel[i].Data()); // t1[i] = new TText(0.5,0.95,panel[i].Data()); t1[i]->SetNDC(); t1[i]->SetTextFont(132); t1[i]->SetTextSize(0.07); t1[i]->Draw(); } c4->Update(); if (saveFigs) { c4->SaveAs("figures/Fig4izvExtCorrs.png"); c4->SaveAs("figures/Fig4izvExtCorrs.eps"); } }