13 const char* mode_dir[NMODES] = {
"PROD1",
"PROD2",
"PROD4" };
18 TH1 *h_rapt_sphenix[NMODES];
20 TH1 *h_rapt_sphenix_total;
22 TH1 *h_InvMass[NMODES];
23 TH1 *h_InvMass_sphenix[NMODES];
25 TH1 *h_InvMass_sphenix_total;
27 TH1 *h_InvMass_smeared[NMODES];
28 TH1 *h_InvMass_smeared_sphenix[NMODES];
29 TH1 *h_InvMass_smeared_total;
30 TH1 *h_InvMass_smeared_sphenix_total;
33 TH1 *h_pt_sphenix[NMODES];
35 TH1 *h_pt_sphenix_total;
39 for (
int imode=0; imode<NMODES; imode++)
42 name = mode_dir[imode]; name +=
"/upc_starlight.root";
43 tfile[imode] =
new TFile(name,
"READ");
46 h_rapt[imode] = (TH1*)tfile[imode]->
Get(
"h_rapt");
47 h_rapt_sphenix[imode] = (TH1*)tfile[imode]->
Get(
"h_rapt_sphenix");
50 h_InvMass[imode] = (TH1*)tfile[imode]->
Get(
"h_InvMass");
51 h_InvMass_sphenix[imode] = (TH1*)tfile[imode]->
Get(
"h_InvMass_sphenix");
54 h_InvMass_smeared[imode] = (TH1*)tfile[imode]->
Get(
"h_InvMass_smeared");
55 h_InvMass_smeared_sphenix[imode] = (TH1*)tfile[imode]->
Get(
"h_InvMass_smeared_sphenix");
58 h_pt[imode] = (TH1*)tfile[imode]->
Get(
"h_pt");
59 h_pt_sphenix[imode] = (TH1*)tfile[imode]->
Get(
"h_pt_sphenix");
63 TFile *savefile =
new TFile(
"AcceptanceMRP.root",
"RECREATE");
66 h_rapt_total = (TH1*)h_rapt[1]->Clone(
"h_rapt_total");
67 h_rapt_total->Add( h_rapt[0] );
68 h_rapt_total->Add( h_rapt[2] );
70 h_rapt_sphenix_total = (TH1*)h_rapt_sphenix[0]->Clone(
"h_rapt_sphenix_total");
71 h_rapt_sphenix_total->Add( h_rapt_sphenix[1] );
72 h_rapt_sphenix_total->Add( h_rapt_sphenix[2] );
74 float markersize = 0.7;
77 TCanvas *c_rap =
new TCanvas(
"c_rap",
"Rapidity",550,425);
79 h_rapt_sphenix_total->SetLineColor(kBlack);
80 h_rapt_sphenix_total->SetMarkerColor(kBlack);
81 h_rapt_sphenix_total->SetMarkerSize( markersize );
82 h_rapt_sphenix_total->Draw(
"ehist");
83 h_rapt_sphenix[0]->SetLineColor(kBlue);
84 h_rapt_sphenix[0]->SetMarkerColor(kBlue);
85 h_rapt_sphenix[0]->SetMarkerSize( markersize );
86 h_rapt_sphenix[0]->Draw(
"ehistsame");
87 h_rapt_sphenix[1]->SetLineColor(kRed);
88 h_rapt_sphenix[1]->SetMarkerColor(kRed);
89 h_rapt_sphenix[1]->SetMarkerSize( markersize );
90 h_rapt_sphenix[1]->Draw(
"ehistsame");
91 h_rapt_sphenix[2]->SetLineColor(kGreen);
92 h_rapt_sphenix[2]->SetMarkerColor(kGreen);
93 h_rapt_sphenix[2]->SetMarkerSize( markersize );
94 h_rapt_sphenix[2]->Draw(
"ehistsame");
98 h_InvMass_total = (TH1*)h_InvMass[0]->Clone(
"h_InvMass_total");
99 h_InvMass_total->Add( h_InvMass[1] );
100 h_InvMass_total->Add( h_InvMass[2] );
102 h_InvMass_sphenix_total = (TH1*)h_InvMass[0]->Clone(
"h_InvMass_sphenix_total");
103 h_InvMass_sphenix_total->Add( h_InvMass_sphenix[1] );
104 h_InvMass_sphenix_total->Add( h_InvMass_sphenix[2] );
107 TCanvas *d_rap =
new TCanvas(
"d_InvMass",
"Invariant Mass",550,425);
108 h_InvMass_sphenix_total->SetLineColor(kBlack);
109 h_InvMass_sphenix_total->SetMarkerColor(kBlack);
110 h_InvMass_sphenix_total->SetMarkerSize( markersize );
111 h_InvMass_sphenix_total->Draw(
"ehist");
112 h_InvMass_sphenix[0]->SetLineColor(kBlue);
113 h_InvMass_sphenix[0]->SetMarkerColor(kBlue);
114 h_InvMass_sphenix[0]->SetMarkerSize( markersize );
115 h_InvMass_sphenix[0]->Draw(
"ehistsame");
116 h_InvMass_sphenix[1]->SetLineColor(kRed);
117 h_InvMass_sphenix[1]->SetMarkerColor(kRed);
118 h_InvMass_sphenix[1]->SetMarkerSize( markersize );
119 h_InvMass_sphenix[1]->Draw(
"ehistsame");
120 h_InvMass_sphenix[2]->SetLineColor(kGreen);
121 h_InvMass_sphenix[2]->SetMarkerColor(kGreen);
122 h_InvMass_sphenix[2]->SetMarkerSize( markersize );
123 h_InvMass_sphenix[2]->Draw(
"ehistsame");
127 h_InvMass_smeared_total = (TH1*)h_InvMass_smeared[0]->Clone(
"h_InvMass_smeared_total");
128 h_InvMass_smeared_total->Add( h_InvMass_smeared[1] );
129 h_InvMass_smeared_total->Add( h_InvMass_smeared[2] );
131 h_InvMass_smeared_sphenix_total = (TH1*)h_InvMass_smeared_sphenix[0]->Clone(
"h_InvMass_smeared_sphenix_total");
132 h_InvMass_smeared_sphenix_total->Add( h_InvMass_smeared_sphenix[1] );
133 h_InvMass_smeared_sphenix_total->Add( h_InvMass_smeared_sphenix[2] );
136 TCanvas *d_rap_smeared =
new TCanvas(
"d_InvMass_smeared",
"Invariant Mass",550,425);
137 h_InvMass_smeared_sphenix_total->SetLineColor(kBlack);
138 h_InvMass_smeared_sphenix_total->SetMarkerColor(kBlack);
139 h_InvMass_smeared_sphenix_total->SetMarkerSize( markersize );
140 h_InvMass_smeared_sphenix_total->Draw(
"ehist");
141 h_InvMass_smeared_sphenix[0]->SetLineColor(kBlue);
142 h_InvMass_smeared_sphenix[0]->SetMarkerColor(kBlue);
143 h_InvMass_smeared_sphenix[0]->SetMarkerSize( markersize );
144 h_InvMass_smeared_sphenix[0]->Draw(
"ehistsame");
145 h_InvMass_smeared_sphenix[1]->SetLineColor(kRed);
146 h_InvMass_smeared_sphenix[1]->SetMarkerColor(kRed);
147 h_InvMass_smeared_sphenix[1]->SetMarkerSize( markersize );
148 h_InvMass_smeared_sphenix[1]->Draw(
"ehistsame");
149 h_InvMass_smeared_sphenix[2]->SetLineColor(kGreen);
150 h_InvMass_smeared_sphenix[2]->SetMarkerColor(kGreen);
151 h_InvMass_smeared_sphenix[2]->SetMarkerSize( markersize );
152 h_InvMass_smeared_sphenix[2]->Draw(
"ehistsame");
155 double tot_qed = h_InvMass_smeared_sphenix[0]->Integral();
156 double tot_coh = h_InvMass_smeared_sphenix[1]->Integral();
157 double tot_incoh = h_InvMass_smeared_sphenix[2]->Integral();
158 cout <<
"Events in sPHENIX" << endl;
159 cout <<
"QED: " << tot_qed << endl;
160 cout <<
"Coh J/Psi: " << tot_coh << endl;
161 cout <<
"Incoh J/Psi: " << tot_incoh << endl;
164 h_pt_total = (TH1*)h_pt[0]->Clone(
"h_pt_total");
165 h_pt_total->Add( h_pt[1] );
166 h_pt_total->Add( h_pt[2] );
169 h_pt_sphenix_total = (TH1*)h_pt_sphenix[0]->Clone(
"h_pt_sphenix_total");
170 h_pt_sphenix_total->Add( h_pt_sphenix[1] );
171 h_pt_sphenix_total->Add( h_pt_sphenix[2] );
174 TCanvas *e_pt =
new TCanvas(
"e_pt",
"Transverse Momentum",550,425);
175 h_pt_sphenix_total->SetLineColor(kBlack);
176 h_pt_sphenix_total->SetMarkerColor(kBlack);
177 h_pt_sphenix_total->SetMarkerSize( markersize );
178 h_pt_sphenix_total->SetXTitle(
"p_{T} (GeV/c)" );
179 h_pt_sphenix_total->Draw(
"ehist");
180 h_pt_sphenix[0]->SetLineColor(kBlue);
181 h_pt_sphenix[0]->SetMarkerColor(kBlue);
182 h_pt_sphenix[0]->SetMarkerSize( markersize );
183 h_pt_sphenix[0]->Draw(
"ehistsame");
184 h_pt_sphenix[1]->SetLineColor(kRed);
185 h_pt_sphenix[1]->SetMarkerColor(kRed);
186 h_pt_sphenix[1]->SetMarkerSize( markersize );
187 h_pt_sphenix[1]->Draw(
"ehistsame");
188 h_pt_sphenix[2]->SetLineColor(kGreen);
189 h_pt_sphenix[2]->SetMarkerColor(kGreen);
190 h_pt_sphenix[2]->SetMarkerSize( markersize );
191 h_pt_sphenix[2]->Draw(
"ehistsame");