From a05f531cf8fcde8a2cf9bf7d97929052cec5d8d5 Mon Sep 17 00:00:00 2001 From: Vratislav Chudoba Date: Fri, 5 Oct 2018 00:55:44 +0300 Subject: [PATCH] Macros for IZV RAS figures added. --- macros/izvRAN/figIZVBestFits.cxx | 574 ++++++++++++++++++++++++++++ macros/izvRAN/figIZVCorrGS.cxx | 108 ++++++ macros/izvRAN/figIZVCorrLeftES.cxx | 124 ++++++ macros/izvRAN/figIZVCorrRightGS.cxx | 125 ++++++ macros/izvRAN/figSpectraIZV.cxx | 20 +- 5 files changed, 941 insertions(+), 10 deletions(-) create mode 100755 macros/izvRAN/figIZVBestFits.cxx create mode 100755 macros/izvRAN/figIZVCorrGS.cxx create mode 100755 macros/izvRAN/figIZVCorrLeftES.cxx create mode 100755 macros/izvRAN/figIZVCorrRightGS.cxx diff --git a/macros/izvRAN/figIZVBestFits.cxx b/macros/izvRAN/figIZVBestFits.cxx new file mode 100755 index 0000000..50c4273 --- /dev/null +++ b/macros/izvRAN/figIZVBestFits.cxx @@ -0,0 +1,574 @@ +//Figure 5 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 figIZVBestFits(Bool_t saveFigs = 0) +{ + +// const Int_t canMap[6] = {1,4,3,6,2,5}; + + + TH1F *hCurr = 0; + TString hName; + + TFile *fr2 = new TFile("figures/PRCthetaA.root"); + + TH1F *hAlphaExp7590[6]; + TH1F *hAlphaSim7590[6]; + + for (Int_t i = 0; i < 6; i++) { + hName.Form("hethetaAT3_%d_7590", i); + hCurr = (TH1F*)fr2->Get(hName.Data()); + hAlphaExp7590[i] = new TH1F(*hCurr); + + hName.Form("hsthetaAT3_%d_7590", i); + hCurr = (TH1F*)fr2->Get(hName.Data()); + hAlphaSim7590[i] = new TH1F(*hCurr); + } + + TH1F *hAlphaExp90120[6]; + TH1F *hAlphaSim90120[6]; + + for (Int_t i = 0; i < 6; 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); + } + + TFile *fr4560 = new TFile("figures/BestFit4560.root"); + + TH1F *hAlphaExp4560[6]; + TH1F *hAlphaSim4560[6]; + TH1F *hAlphaExp4560low[6]; + TH1F *hAlphaSim4560low[6]; + TH1F *hAlphaExp4560lowest[6]; + TH1F *hAlphaSim4560lowest[6]; + + for (Int_t i = 0; i < 6; i++) { + hName.Form("hethetaAT3_%d_4560", i); + hCurr = (TH1F*)fr4560->Get(hName.Data()); + hAlphaExp4560[i] = new TH1F(*hCurr); + + hName.Form("hsthetaAT3_%d_4560", i); + hCurr = (TH1F*)fr4560->Get(hName.Data()); + hAlphaSim4560[i] = new TH1F(*hCurr); + + hName.Form("hethetaAT2_%d_4560", i); + hCurr = (TH1F*)fr4560->Get(hName.Data()); + hAlphaExp4560low[i] = new TH1F(*hCurr); + + hName.Form("hsthetaAT2_%d_4560", i); + hCurr = (TH1F*)fr4560->Get(hName.Data()); + hAlphaSim4560low[i] = new TH1F(*hCurr); + + hName.Form("hethetaAT1_%d_4560", i); + hCurr = (TH1F*)fr4560->Get(hName.Data()); + hAlphaExp4560lowest[i] = new TH1F(*hCurr); + + hName.Form("hsthetaAT1_%d_4560", i); + hCurr = (TH1F*)fr4560->Get(hName.Data()); + hAlphaSim4560lowest[i] = new TH1F(*hCurr); + } + + TFile *fr90120 = new TFile("figures/BestFit90120.root"); + + TH1F *hAlphaExp90120low[6]; + TH1F *hAlphaSim90120low[6]; + TH1F *hAlphaExp90120lowest[6]; + TH1F *hAlphaSim90120lowest[6]; + + for (Int_t i = 0; i < 6; i++) { + hName.Form("hethetaAT2_%d_90120", i); + hCurr = (TH1F*)fr90120->Get(hName.Data()); + hAlphaExp90120low[i] = new TH1F(*hCurr); + + hName.Form("hsthetaAT2_%d_90120", i); + hCurr = (TH1F*)fr90120->Get(hName.Data()); + hAlphaSim90120low[i] = new TH1F(*hCurr); + + hName.Form("hethetaAT1_%d_90120", i); + hCurr = (TH1F*)fr90120->Get(hName.Data()); + hAlphaExp90120lowest[i] = new TH1F(*hCurr); + + hName.Form("hsthetaAT1_%d_90120", i); + hCurr = (TH1F*)fr90120->Get(hName.Data()); + hAlphaSim90120lowest[i] = new TH1F(*hCurr); + } + + TFile *fr7590 = new TFile("figures/BestFit7590.root"); + + TH1F *hAlphaExp7590low[6]; + TH1F *hAlphaSim7590low[6]; + TH1F *hAlphaExp7590lowest[6]; + TH1F *hAlphaSim7590lowest[6]; + + for (Int_t i = 0; i < 6; i++) { + hName.Form("hethetaAT2_%d_7590", i); + hCurr = (TH1F*)fr7590->Get(hName.Data()); + hAlphaExp7590low[i] = new TH1F(*hCurr); + + hName.Form("hsthetaAT2_%d_7590", i); + hCurr = (TH1F*)fr7590->Get(hName.Data()); + hAlphaSim7590low[i] = new TH1F(*hCurr); + + hName.Form("hethetaAT1_%d_7590", i); + hCurr = (TH1F*)fr7590->Get(hName.Data()); + hAlphaExp7590lowest[i] = new TH1F(*hCurr); + + hName.Form("hsthetaAT1_%d_7590", i); + hCurr = (TH1F*)fr7590->Get(hName.Data()); + hAlphaSim7590lowest[i] = new TH1F(*hCurr); + } + + + TFile *fr6075 = new TFile("figures/BestFit6075.root"); + + TH1F *hAlphaExp6075[6]; + TH1F *hAlphaSim6075[6]; + TH1F *hAlphaExp6075low[6]; + TH1F *hAlphaSim6075low[6]; + TH1F *hAlphaExp6075lowest[6]; + TH1F *hAlphaSim6075lowest[6]; + + for (Int_t i = 0; i < 6; i++) { + hName.Form("hethetaAT3_%d_6075", i); + hCurr = (TH1F*)fr6075->Get(hName.Data()); + hAlphaExp6075[i] = new TH1F(*hCurr); + + hName.Form("hsthetaAT3_%d_6075", i); + hCurr = (TH1F*)fr6075->Get(hName.Data()); + hAlphaSim6075[i] = new TH1F(*hCurr); + + hName.Form("hethetaAT2_%d_6075", i); + hCurr = (TH1F*)fr6075->Get(hName.Data()); + hAlphaExp6075low[i] = new TH1F(*hCurr); + + hName.Form("hsthetaAT2_%d_6075", i); + hCurr = (TH1F*)fr6075->Get(hName.Data()); + hAlphaSim6075low[i] = new TH1F(*hCurr); + + hName.Form("hethetaAT1_%d_6075", i); + hCurr = (TH1F*)fr6075->Get(hName.Data()); + hAlphaExp6075lowest[i] = new TH1F(*hCurr); + + hName.Form("hsthetaAT1_%d_6075", i); + hCurr = (TH1F*)fr6075->Get(hName.Data()); + hAlphaSim6075lowest[i] = new TH1F(*hCurr); + } + + + + TCanvas *c1 = new TCanvas("c1", "Fig. 5, IZV RAS", 1200, 900); + c1->ToggleEditor(); + c1->Divide(4, 3, .001, .001); + + cout << "new Figure" << endl; + +//////////////////////// +// 2.5 - 3.1 MeV +//////////////////////// + + + c1->cd(9); + TH1F *hAlphaComb4560 = new TH1F(*hAlphaSim4560[3]); + // hAlphaComb7590->Add(hAlphaSim[5], 1); + hAlphaComb4560->Add(hAlphaSim4560[2], 0.1); + hAlphaComb4560->Scale(0.9); +// for (Int_t nBin; nBin <= hAlphaComb4560->GetNbinsX(); nBin++) { +// hAlphaComb4560->SetBinError(nBin, 0); +// } + + hAlphaComb4560->SetTitle(""); + hAlphaComb4560->GetYaxis()->SetRangeUser(0., 480.); + hAlphaComb4560->GetYaxis()->SetTitle(""); + hAlphaComb4560->GetYaxis()->SetNdivisions(30505); + hAlphaComb4560->GetXaxis()->SetNdivisions(506); + hAlphaComb4560->GetXaxis()->SetLabelSize(0.07); + hAlphaComb4560->GetXaxis()->SetLabelOffset(0.002); + hAlphaComb4560->GetXaxis()->SetTitleSize(0.07); + hAlphaComb4560->GetXaxis()->SetTitleOffset(0.74); + hAlphaComb4560->GetXaxis()->SetTitle("#it{#theta}_{#alpha}, rad"); + +// hAlphaComb4560->SetFillColor(kGray+1); + hAlphaComb4560->SetLineColor(kGray+1); + + hAlphaComb4560->GetXaxis()->CenterTitle(0); + + hAlphaComb4560->Draw("hist"); + hAlphaExp4560[4]->Draw("E same"); + +// hAlphaExp4560[4]->Chi2Test(hAlphaComb4560, "P"); + + c1->cd(10); + TH1F *hAlphaComb6075 = new TH1F(*hAlphaSim6075[3]); +// hAlphaComb7590->Add(hAlphaSim[5], 1); + hAlphaComb6075->Add(hAlphaSim6075[2], 0.3); + hAlphaComb6075->Scale(0.8); +// for (Int_t nBin; nBin <= hAlphaComb6075->GetNbinsX(); nBin++) { +// hAlphaComb6075->SetBinError(nBin, 0); +// } + + hAlphaComb6075->SetTitle(""); + hAlphaComb6075->GetYaxis()->SetRangeUser(0., 650.); + hAlphaComb6075->GetYaxis()->SetTitle(""); + hAlphaComb6075->GetYaxis()->SetNdivisions(30505); + hAlphaComb6075->GetXaxis()->SetNdivisions(506); + hAlphaComb6075->GetXaxis()->SetLabelSize(0.07); + hAlphaComb6075->GetXaxis()->SetLabelOffset(0.002); + hAlphaComb6075->GetXaxis()->SetTitleSize(0.07); + hAlphaComb6075->GetXaxis()->SetTitleOffset(0.74); + hAlphaComb6075->GetXaxis()->SetTitle("#it{#theta}_{#alpha}, rad"); + +// hAlphaComb6075->SetFillColor(kGray+1); + hAlphaComb6075->SetLineColor(kGray+1); + + hAlphaComb6075->GetXaxis()->CenterTitle(0); + + hAlphaComb6075->Draw("hist"); + hAlphaExp6075[4]->Draw("E same"); + +// hAlphaExp6075[4]->Chi2Test(hAlphaComb6075, "P"); + c1->Update(); + + c1->cd(11); + + TH1F *hAlphaComb7590 = new TH1F(*hAlphaSim7590[3]); +// hAlphaComb7590->Add(hAlphaSim[5], 1); + hAlphaComb7590->Add(hAlphaSim7590[2], 0.2); + hAlphaComb7590->Scale(0.9); +// for (Int_t nBin; nBin <= hAlphaComb7590->GetNbinsX(); nBin++) { +// hAlphaComb7590->SetBinError(nBin, 0); +// } + + hAlphaComb7590->SetTitle(""); + hAlphaComb7590->GetYaxis()->SetRangeUser(0., 499.); + hAlphaComb7590->GetYaxis()->SetTitle(""); + hAlphaComb7590->GetYaxis()->SetNdivisions(30505); + hAlphaComb7590->GetXaxis()->SetNdivisions(506); + hAlphaComb7590->GetXaxis()->SetLabelSize(0.07); + hAlphaComb7590->GetXaxis()->SetLabelOffset(0.002); + hAlphaComb7590->GetXaxis()->SetTitleSize(0.07); + hAlphaComb7590->GetXaxis()->SetTitleOffset(0.74); + hAlphaComb7590->GetXaxis()->SetTitle("#it{#theta}_{#alpha}, rad"); + +// hAlphaComb7590->SetFillColor(kGray+1); + hAlphaComb7590->SetLineColor(kGray+1); + + hAlphaComb7590->GetXaxis()->CenterTitle(0); + + hAlphaComb7590->Draw("hist"); + hAlphaExp7590[4]->Draw("E same"); + + hAlphaExp7590[4]->Chi2Test(hAlphaComb7590, "P"); + + c1->cd(12); + + TH1F *hAlphaComb90120 = new TH1F(*hAlphaSim90120[5]); +// hAlphaComb7590->Add(hAlphaSim[5], 1); + hAlphaComb90120->Add(hAlphaSim90120[3], 1); + hAlphaComb90120->Scale(0.5); +// for (Int_t nBin; nBin <= hAlphaComb90120->GetNbinsX(); nBin++) { +// hAlphaComb90120->SetBinError(nBin, 0); +// } + + hAlphaComb90120->SetTitle(""); + hAlphaComb90120->GetYaxis()->SetRangeUser(0., 399.); + hAlphaComb90120->GetYaxis()->SetTitle(""); + hAlphaComb90120->GetYaxis()->SetNdivisions(30505); + hAlphaComb90120->GetXaxis()->SetNdivisions(506); + hAlphaComb90120->GetXaxis()->SetLabelSize(0.07); + hAlphaComb90120->GetXaxis()->SetLabelOffset(0.002); + hAlphaComb90120->GetXaxis()->SetTitleSize(0.07); + hAlphaComb90120->GetXaxis()->SetTitleOffset(0.74); + hAlphaComb90120->GetXaxis()->SetTitle("#it{#theta}_{#alpha}, rad"); + +// hAlphaComb90120->SetFillColor(kGray+1); + hAlphaComb90120->SetLineColor(kGray+1); + + hAlphaComb90120->GetXaxis()->CenterTitle(0); + + hAlphaComb90120->Draw("hist"); + hAlphaExp90120[4]->Draw("E same"); + + hAlphaExp90120[4]->Chi2Test(hAlphaComb90120, "P"); + +// return; + +//////////////////////// +// 1.9 - 2.5 MeV +//////////////////////// + +// TCanvas *c2 = new TCanvas("c2", "Combined fits 1.9 - 2.5 MeV", 1000, 1000); +// c2->ToggleEditor(); +// c2->Divide(2, 2, .001, .001); + + cout << endl << endl << endl << "new Figure for lower energy interval" << endl; + + c1->cd(5); + TH1F *hAlphaComb4560low = new TH1F(*hAlphaSim4560low[5]); + // hAlphaComb7590->Add(hAlphaSim[5], 1); + hAlphaComb4560low->Add(hAlphaSim4560low[4], 0.1); + hAlphaComb4560low->Add(hAlphaSim4560low[2], 0.1); + hAlphaComb4560low->Add(hAlphaSim4560low[3], 1); + hAlphaComb4560low->Scale(0.5); + + hAlphaComb4560low->SetTitle(""); + hAlphaComb4560low->GetYaxis()->SetRangeUser(0., 300.); + hAlphaComb4560low->GetYaxis()->SetTitle(""); + hAlphaComb4560low->GetYaxis()->SetNdivisions(30505); + hAlphaComb4560low->GetXaxis()->SetNdivisions(506); + hAlphaComb4560low->GetXaxis()->SetLabelSize(0.07); + hAlphaComb4560low->GetXaxis()->SetLabelOffset(0.002); + hAlphaComb4560low->GetXaxis()->SetTitleSize(0.07); + hAlphaComb4560low->GetXaxis()->SetTitleOffset(0.74); + hAlphaComb4560low->GetXaxis()->SetTitle("#it{#theta}_{#alpha}, rad"); + + hAlphaComb4560low->SetLineColor(kGray+1); +// hAlphaComb4560low->SetLineColor(kRed+1); +// hAlphaComb4560low->SetFillColor(kGray+1); + hAlphaComb4560low->GetXaxis()->CenterTitle(0); + + hAlphaComb4560low->Draw("hist"); + hAlphaExp4560low[4]->Draw("E same"); + + hAlphaExp4560low[4]->Chi2Test(hAlphaComb4560low, "P"); + + + c1->cd(6); + TH1F *hAlphaComb6075low = new TH1F(*hAlphaSim6075low[3]); + // hAlphaComb7590->Add(hAlphaSim[5], 1); + hAlphaComb6075low->Add(hAlphaSim6075low[2], 0.1); + hAlphaComb6075low->Scale(0.9); + + hAlphaComb6075low->SetTitle(""); + hAlphaComb6075low->GetYaxis()->SetRangeUser(0., 400.); + hAlphaComb6075low->GetYaxis()->SetTitle(""); + hAlphaComb6075low->GetYaxis()->SetNdivisions(30505); + hAlphaComb6075low->GetXaxis()->SetNdivisions(506); + hAlphaComb6075low->GetXaxis()->SetLabelSize(0.07); + hAlphaComb6075low->GetXaxis()->SetLabelOffset(0.002); + hAlphaComb6075low->GetXaxis()->SetTitleSize(0.07); + hAlphaComb6075low->GetXaxis()->SetTitleOffset(0.74); + hAlphaComb6075low->GetXaxis()->SetTitle("#it{#theta}_{#alpha}, rad"); + + hAlphaComb6075low->SetLineColor(kGray+1); +// hAlphaComb6075low->SetFillColor(kGray+1); + hAlphaComb6075low->GetXaxis()->CenterTitle(0); + + hAlphaComb6075low->Draw("hist"); + hAlphaExp6075low[4]->Draw("E same"); + + hAlphaExp6075low[4]->Chi2Test(hAlphaComb6075low, "P"); + + c1->cd(7); + TH1F *hAlphaComb7590low = new TH1F(*hAlphaSim7590low[3]); +// hAlphaComb7590low->Add(hAlphaSim7590low[2], 0.2); +// hAlphaComb7590low->Scale(0.8); +// for (Int_t nBin; nBin <= hAlphaComb4560->GetNbinsX(); nBin++) { +// hAlphaComb4560->SetBinError(nBin, 0); +// } + + hAlphaComb7590low->SetTitle(""); + hAlphaComb7590low->GetYaxis()->SetRangeUser(0., 300.); + hAlphaComb7590low->GetYaxis()->SetTitle(""); + hAlphaComb7590low->GetYaxis()->SetNdivisions(30505); + hAlphaComb7590low->GetXaxis()->SetNdivisions(506); + hAlphaComb7590low->GetXaxis()->SetLabelSize(0.07); + hAlphaComb7590low->GetXaxis()->SetLabelOffset(0.002); + hAlphaComb7590low->GetXaxis()->SetTitleSize(0.07); + hAlphaComb7590low->GetXaxis()->SetTitleOffset(0.74); + hAlphaComb7590low->GetXaxis()->SetTitle("#it{#theta}_{#alpha}, rad"); + + hAlphaComb7590low->SetLineColor(kGray+1); +// hAlphaComb7590low->SetFillColor(kGray+1); + hAlphaComb7590low->GetXaxis()->CenterTitle(0); + + hAlphaComb7590low->Draw("hist"); + hAlphaExp7590low[4]->Draw("E same"); + + hAlphaExp7590low[4]->Chi2Test(hAlphaComb7590low, "P"); + + c1->cd(8); + TH1F *hAlphaComb90120low = new TH1F(*hAlphaSim90120low[5]); + hAlphaComb90120low->Add(hAlphaSim90120low[4], 0.1); + hAlphaComb90120low->Scale(0.8); + for (Int_t nBin; nBin <= hAlphaComb90120low->GetNbinsX(); nBin++) { + hAlphaComb90120low->SetBinError(nBin, 0); + } + + hAlphaComb90120low->SetTitle(""); + hAlphaComb90120low->GetYaxis()->SetRangeUser(0., 300.); + hAlphaComb90120low->GetYaxis()->SetTitle(""); + hAlphaComb90120low->GetYaxis()->SetNdivisions(30505); + hAlphaComb90120low->GetXaxis()->SetNdivisions(506); + hAlphaComb90120low->GetXaxis()->SetLabelSize(0.07); + hAlphaComb90120low->GetXaxis()->SetLabelOffset(0.002); + hAlphaComb90120low->GetXaxis()->SetTitleSize(0.07); + hAlphaComb90120low->GetXaxis()->SetTitleOffset(0.74); + hAlphaComb90120low->GetXaxis()->SetTitle("#it{#theta}_{#alpha}, rad"); + + hAlphaComb90120low->GetXaxis()->CenterTitle(0); + + hAlphaComb90120low->SetLineColor(kGray+1); +// hAlphaComb90120low->SetFillColor(kGray+1); + + hAlphaComb90120low->Draw("hist"); + hAlphaExp90120low[4]->Draw("E same"); + + hAlphaExp90120low[4]->Chi2Test(hAlphaComb90120low, "P"); + + c1->Update(); + +//////////////////////// +// 1.4 - 1.9 MeV +//////////////////////// + + c1->cd(1); + TH1F *hAlphaComb4560lowest = new TH1F(*hAlphaSim4560lowest[2]); + // hAlphaComb7590->Add(hAlphaSim[5], 1); + hAlphaComb4560lowest->Add(hAlphaSim4560lowest[4], 1.); + // hAlphaComb4560lowest->Add(hAlphaSim4560low[2], 0.1); + // hAlphaComb4560lowest->Add(hAlphaSim4560low[3], 1); + hAlphaComb4560lowest->Scale(0.5); + + hAlphaComb4560lowest->SetTitle(""); + hAlphaComb4560lowest->GetYaxis()->SetRangeUser(0., 300.); + hAlphaComb4560lowest->GetYaxis()->SetTitle(""); + hAlphaComb4560lowest->GetYaxis()->SetNdivisions(30505); + hAlphaComb4560lowest->GetXaxis()->SetNdivisions(506); + hAlphaComb4560lowest->GetXaxis()->SetLabelSize(0.07); + hAlphaComb4560lowest->GetXaxis()->SetLabelOffset(0.002); + hAlphaComb4560lowest->GetXaxis()->SetTitleSize(0.07); + hAlphaComb4560lowest->GetXaxis()->SetTitleOffset(0.74); + hAlphaComb4560lowest->GetXaxis()->SetTitle("#it{#theta}_{#alpha}, rad"); + + // hAlphaComb4560low->GetYaxis()->SetRangeUser(0., 650.); + // hAlphaComb4560low->GetYaxis()->SetTitle(""); + + hAlphaComb4560lowest->SetLineColor(kGray+1); + + hAlphaComb4560lowest->GetXaxis()->CenterTitle(0); + + hAlphaComb4560lowest->Draw("hist"); + + // hAlphaComb4560lowest->Draw("same"); + hAlphaExp4560lowest[4]->Draw("E same"); + + hAlphaExp4560lowest[4]->Chi2Test(hAlphaComb4560lowest, "P"); + + + c1->cd(2); + TH1F *hAlphaComb6075lowest = new TH1F(*hAlphaSim6075lowest[2]); + // hAlphaComb7590->Add(hAlphaSim[5], 1); + hAlphaComb6075lowest->Add(hAlphaSim6075lowest[3], 0.5); + hAlphaComb6075lowest->Scale(0.7); + + hAlphaComb6075lowest->SetTitle(""); + hAlphaComb6075lowest->GetYaxis()->SetRangeUser(0., 500.); + hAlphaComb6075lowest->GetYaxis()->SetTitle(""); + hAlphaComb6075lowest->GetYaxis()->SetNdivisions(30505); + hAlphaComb6075lowest->GetXaxis()->SetNdivisions(506); + hAlphaComb6075lowest->GetXaxis()->SetLabelSize(0.07); + hAlphaComb6075lowest->GetXaxis()->SetLabelOffset(0.002); + hAlphaComb6075lowest->GetXaxis()->SetTitleSize(0.07); + hAlphaComb6075lowest->GetXaxis()->SetTitleOffset(0.74); + hAlphaComb6075lowest->GetXaxis()->SetTitle("#it{#theta}_{#alpha}, rad"); + + hAlphaComb6075lowest->SetLineColor(kGray+1); + + hAlphaComb6075lowest->GetXaxis()->CenterTitle(0); + + hAlphaComb6075lowest->Draw("hist"); + hAlphaExp6075lowest[4]->Draw("E same"); + + hAlphaExp6075lowest[4]->Chi2Test(hAlphaComb6075lowest, "P"); + + c1->cd(3); + TH1F *hAlphaComb7590lowest = new TH1F(*hAlphaSim7590lowest[2]); + // hAlphaComb7590lowest->Add(hAlphaSim7590low[2], 0.2); + // hAlphaComb7590lowest->Scale(0.8); + + hAlphaComb7590lowest->SetTitle(""); + hAlphaComb7590lowest->GetYaxis()->SetRangeUser(0., 300.); + hAlphaComb7590lowest->GetYaxis()->SetTitle(""); + hAlphaComb7590lowest->GetYaxis()->SetNdivisions(30505); + hAlphaComb7590lowest->GetXaxis()->SetNdivisions(506); + hAlphaComb7590lowest->GetXaxis()->SetLabelSize(0.07); + hAlphaComb7590lowest->GetXaxis()->SetLabelOffset(0.002); + hAlphaComb7590lowest->GetXaxis()->SetTitleSize(0.07); + hAlphaComb7590lowest->GetXaxis()->SetTitleOffset(0.74); + hAlphaComb7590lowest->GetXaxis()->SetTitle("#it{#theta}_{#alpha}, rad"); + + hAlphaComb7590lowest->SetLineColor(kGray+1); + + hAlphaComb7590lowest->GetXaxis()->CenterTitle(0); + + hAlphaComb7590lowest->Draw("same"); + hAlphaExp7590lowest[4]->Draw("E same"); + + hAlphaExp7590lowest[4]->Chi2Test(hAlphaComb7590lowest, "P"); + + c1->cd(4); + TH1F *hAlphaComb90120lowest = new TH1F(*hAlphaSim90120lowest[2]); + hAlphaComb90120lowest->Add(hAlphaSim90120lowest[3], 0.2); + hAlphaComb90120lowest->Scale(0.8); + + hAlphaComb90120lowest->SetTitle(""); + hAlphaComb90120lowest->GetYaxis()->SetRangeUser(0., 300.); + hAlphaComb90120lowest->GetYaxis()->SetTitle(""); + hAlphaComb90120lowest->GetYaxis()->SetNdivisions(30505); + hAlphaComb90120lowest->GetXaxis()->SetNdivisions(506); + hAlphaComb90120lowest->GetXaxis()->SetLabelSize(0.07); + hAlphaComb90120lowest->GetXaxis()->SetLabelOffset(0.002); + hAlphaComb90120lowest->GetXaxis()->SetTitleSize(0.07); + hAlphaComb90120lowest->GetXaxis()->SetTitleOffset(0.74); + hAlphaComb90120lowest->GetXaxis()->SetTitle("#it{#theta}_{#alpha}, rad"); + + hAlphaComb90120lowest->SetLineColor(kGray+1); + + hAlphaComb90120lowest->GetXaxis()->CenterTitle(0); + + hAlphaComb90120lowest->Draw("hist"); + hAlphaExp90120lowest[4]->Draw("E same"); + + hAlphaExp90120lowest[4]->Chi2Test(hAlphaComb90120lowest, "P"); + + c1->Update(); + + TText *t1[12]; + TString panel[12] = {"a)", "b)", "c)", "d)", + "e)", "f)", "g)", "h)", + "i)", "j)", "k)", "l)"}; + + for (Int_t i = 0; i < 12; i++) { + c1->cd(i+1); + 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(); + } + + + if (saveFigs) { + c1->SaveAs("figures/Fig5izvBestFits.png"); + c1->SaveAs("figures/Fig5izvBestFits.eps"); + } + +} diff --git a/macros/izvRAN/figIZVCorrGS.cxx b/macros/izvRAN/figIZVCorrGS.cxx new file mode 100755 index 0000000..8e18690 --- /dev/null +++ b/macros/izvRAN/figIZVCorrGS.cxx @@ -0,0 +1,108 @@ +//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]->SetNDC(); + t1[i]->SetTextFont(132); + t1[i]->SetTextSize(0.07); + t1[i]->Draw(); + } + c1->Update(); + + + if (saveFigs) { +// c2->SaveAs("figures/PresGSepsilonTright7590.png"); + + c1->SaveAs("figures/Fig2izvIntCorrsEvolution.png"); + c1->SaveAs("figures/Fig2izvIntCorrsEvolution.eps"); + } + + return; + +} diff --git a/macros/izvRAN/figIZVCorrLeftES.cxx b/macros/izvRAN/figIZVCorrLeftES.cxx new file mode 100755 index 0000000..1a8abd4 --- /dev/null +++ b/macros/izvRAN/figIZVCorrLeftES.cxx @@ -0,0 +1,124 @@ +//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"); + } + +} diff --git a/macros/izvRAN/figIZVCorrRightGS.cxx b/macros/izvRAN/figIZVCorrRightGS.cxx new file mode 100755 index 0000000..fc2c998 --- /dev/null +++ b/macros/izvRAN/figIZVCorrRightGS.cxx @@ -0,0 +1,125 @@ +//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)", "b)", "c)", "d)", "e)", "f)"}; + + 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.95,panel[i].Data()); + t1[i]->SetNDC(); + t1[i]->SetTextFont(132); + 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"); + } +} diff --git a/macros/izvRAN/figSpectraIZV.cxx b/macros/izvRAN/figSpectraIZV.cxx index 9a34a30..ff8a5d3 100755 --- a/macros/izvRAN/figSpectraIZV.cxx +++ b/macros/izvRAN/figSpectraIZV.cxx @@ -1,3 +1,5 @@ +//Figure 1 IZV RAS + #if !defined(__CLING__) #include "TFile.h" @@ -7,7 +9,7 @@ #endif -void figSpectraIZV() +void figSpectraIZV(const Bool_t saveFigs = 0) { // TFile *fr = new TFile("figures/spectra.root", "READ"); @@ -45,7 +47,7 @@ void figSpectraIZV() - TCanvas *c1 = new TCanvas(); + TCanvas *c1 = new TCanvas("c1", "Fig. 1, IZV RAS"); c1->ToggleEditor(); // c1->SetWindowSize(800, 1200); // c1->SetWindowSize(800, 800); @@ -74,21 +76,19 @@ void figSpectraIZV() if (i==0) hSim[i]->GetYaxis()->SetRangeUser(0,13000); -// t1[i] = new TText(0.61,10829.39,"d)"); t1[i] = new TText(0.18,0.87,panel[i].Data()); t1[i]->SetNDC(); t1[i]->SetTextFont(132); t1[i]->SetTextSize(0.07); t1[i]->Draw(); -// t1[i]->DrawTextNDC(.5, .5, "ajdas"); } -// TText *t1 = new TText(0.61,10829.39,"d)"); -//// t1->SetTextColor(kRed); -// t1->SetTextFont(132); -// t1->SetTextSize(0.07); -// t1->Draw(); + if (saveFigs) { +// c2->SaveAs("figures/PresGSepsilonTright7590.png"); -// c1->SaveAs("figures/spectra.eps"); + c1->SaveAs("figures/Fig1izvSpectra.png"); + c1->SaveAs("figures/Fig1izvSpectra.eps"); + } + return; } -- 2.18.1