File indexing completed on 2025-08-05 08:12:41
0001
0002
0003
0004
0005
0006 void plot_acceptance()
0007 {
0008
0009
0010 const int NMODES = 3;
0011 const char* mode_dir[NMODES] = { "PROD1", "PROD2", "PROD4" };
0012 TFile *tfile[NMODES];
0013 TString name;
0014
0015 TH1 *h_rap[NMODES];
0016 TH1 *h_rap_sphenix[NMODES];
0017 TH1 *h_rap_total;
0018 TH1 *h_rap_sphenix_total;
0019
0020
0021 for (int imode=0; imode<NMODES; imode++)
0022 {
0023
0024 name = mode_dir[imode]; name += "/upc_starlight.root";
0025 tfile[imode] = new TFile(name,"READ");
0026
0027
0028 h_rap[imode] = (TH1*)tfile[imode]->Get("h_rap");
0029 h_rap_sphenix[imode] = (TH1*)tfile[imode]->Get("h_rap_sphenix");
0030 }
0031
0032
0033 h_rap_total = (TH1*)h_rap[0]->Clone("h_rap_total");
0034 h_rap_total->Add( h_rap[1] );
0035 h_rap_total->Add( h_rap[2] );
0036
0037 h_rap_sphenix_total = (TH1*)h_rap[0]->Clone("h_rap_sphenix_total");
0038 h_rap_sphenix_total->Add( h_rap_sphenix[1] );
0039 h_rap_sphenix_total->Add( h_rap_sphenix[2] );
0040
0041
0042 TCanvas *c_rap = new TCanvas("c_rap","Rapidity",550,425);
0043 h_rap_total->Draw("ehist");
0044 h_rap_sphenix_total->SetLineColor(kBlue);
0045 h_rap_sphenix_total->SetMarkerColor(kBlue);
0046 h_rap_sphenix_total->Draw("ehistsame");
0047 }
0048