File indexing completed on 2026-07-16 08:11:21
0001 void systematicsPlots()
0002 {
0003 TFile* sysFile = TFile::Open("/sphenix/user/rosstom/analysis/LightFlavorRatios/systematics/cutVarianceSystematicUncertainties.root", "READ");
0004
0005 std::string sysPrefix = "cutVarianceSys";
0006
0007 TH1F* h_base_pT = (TH1F*)sysFile->Get("h_ratio_base_pT");
0008 TH1F* h_sys_pT = (TH1F*)sysFile->Get("h_syst_pT");
0009 TH1F* h_base_eta = (TH1F*)sysFile->Get("h_ratio_base_eta");
0010 TH1F* h_sys_eta = (TH1F*)sysFile->Get("h_syst_eta");
0011 TH1F* h_base_phi = (TH1F*)sysFile->Get("h_ratio_base_phi");
0012 TH1F* h_sys_phi = (TH1F*)sysFile->Get("h_syst_phi");
0013 TH1F* h_base_rap = (TH1F*)sysFile->Get("h_ratio_base_rap");
0014 TH1F* h_sys_rap = (TH1F*)sysFile->Get("h_syst_rap");
0015
0016 TH1F* h_percent_pT = (TH1F*)h_sys_pT->Clone("h_percent_pT");
0017 h_percent_pT->Divide(h_sys_pT,h_base_pT,100.,1.);
0018 h_percent_pT->GetYaxis()->SetTitle("Systematic Uncertainty (% of Base Ratio)");
0019 h_percent_pT->GetXaxis()->SetTitle("Mother p_{T} [GeV/c]");
0020 h_percent_pT->SetMaximum(10.0);
0021 h_percent_pT->SetMinimum(0.0);
0022
0023 TH1F* h_percent_eta = (TH1F*)h_sys_eta->Clone("h_percent_eta");
0024 h_percent_eta->Divide(h_sys_eta,h_base_eta,100.,1.);
0025 h_percent_eta->GetYaxis()->SetTitle("Systematic Uncertainty (% of Base Ratio)");
0026 h_percent_eta->GetXaxis()->SetTitle("Mother #eta");
0027 h_percent_eta->SetMaximum(100.0);
0028 h_percent_eta->SetMinimum(0.0);
0029
0030 TH1F* h_percent_phi = (TH1F*)h_sys_phi->Clone("h_percent_phi");
0031 h_percent_phi->Divide(h_sys_phi,h_base_phi,100.,1.);
0032 h_percent_phi->GetYaxis()->SetTitle("Systematic Uncertainty (% of Base Ratio)");
0033 h_percent_phi->GetXaxis()->SetTitle("Mother #phi [rad]");
0034 h_percent_phi->SetMaximum(100.0);
0035 h_percent_phi->SetMinimum(0.0);
0036
0037 TH1F* h_percent_rap = (TH1F*)h_sys_rap->Clone("h_percent_rap");
0038 h_percent_rap->Divide(h_sys_rap,h_base_rap,100.,1.);
0039 h_percent_rap->GetYaxis()->SetTitle("Systematic Uncertainty (% of Base Ratio)");
0040 h_percent_rap->GetXaxis()->SetTitle("Mother Rapidity (y)");
0041 h_percent_rap->SetMaximum(100.0);
0042 h_percent_rap->SetMinimum(0.0);
0043
0044 TCanvas* c1 = new TCanvas("c1","c1",800,800);
0045 h_percent_pT->Draw("HIST P");
0046 c1->SaveAs((sysPrefix + "_pT.png").c_str());
0047 h_percent_eta->Draw("HIST P");
0048 c1->SaveAs((sysPrefix + "_eta.png").c_str());
0049 h_percent_phi->Draw("HIST P");
0050 c1->SaveAs((sysPrefix + "_phi.png").c_str());
0051 h_percent_rap->Draw("HIST P");
0052 c1->SaveAs((sysPrefix + "_rap.png").c_str());
0053 c1->Close();
0054 }