21 int main(
int argc,
char **argv){
22 printf(
"Starting the program, numargs = %d\n",argc);
23 for(Int_t
i=0;
i<argc;
i++)
printf(
"arg #%d = %s\n",
i,argv[
i]);
24 TROOT amdv_dens(
"amdv_dens",
"amdv_dens");
25 TApplication theApp(
"App", &argc, argv);
27 const bool run_eID=
true;
57 rYs[0]=9755.0/13680.0;
58 rYs[1]=2540.0/13680.0;
59 rYs[2]=1400.0/13680.0;
62 input_file[0] =
"/sphenix/u/weihuma/RunOutput/G4sPHENIX_upsilon_1s_2000_POSCOR_g4svtx_eval.root";
66 input_file[1] =
"/sphenix/u/weihuma/RunOutput/G4sPHENIX_pi-_1000_0_POSCOR_g4svtx_eval.root";
67 input_file[2] =
"/sphenix/u/weihuma/RunOutput/G4sPHENIX_pi-_1000_1_POSCOR_g4svtx_eval.root";
68 input_file[3] =
"/sphenix/u/weihuma/RunOutput/G4sPHENIX_pi-_1000_2_POSCOR_g4svtx_eval.root";
69 input_file[4] =
"/sphenix/u/weihuma/RunOutput/G4sPHENIX_pi-_1000_3_POSCOR_g4svtx_eval.root";
70 input_file[5] =
"/sphenix/u/weihuma/RunOutput/G4sPHENIX_K-_1000_0_POSCOR_g4svtx_eval.root";
71 input_file[6] =
"/sphenix/u/weihuma/RunOutput/G4sPHENIX_K-_1000_1_POSCOR_g4svtx_eval.root";
72 input_file[7] =
"/sphenix/u/weihuma/RunOutput/G4sPHENIX_K-_1000_2_POSCOR_g4svtx_eval.root";
73 input_file[8] =
"/sphenix/u/weihuma/RunOutput/G4sPHENIX_K-_1000_3_POSCOR_g4svtx_eval.root";
74 input_file[9] =
"/sphenix/u/weihuma/RunOutput/G4sPHENIX_antiproton_0_1000_POSCOR_g4svtx_eval.root";
75 input_file[10] =
"/sphenix/u/weihuma/RunOutput/G4sPHENIX_antiproton_1000_1_POSCOR_g4svtx_eval.root";
76 input_file[11] =
"/sphenix/u/weihuma/RunOutput/G4sPHENIX_antiproton_1000_2_POSCOR_g4svtx_eval.root";
77 input_file[12] =
"/sphenix/u/weihuma/RunOutput/G4sPHENIX_antiproton_1000_3_POSCOR_g4svtx_eval.root";
82 output_eID =
"/sphenix/u/weihuma/analysis/TrackPid/anaplots/output/upsilon/eID_embed_upsilon.root";
83 output_plot_eID =
"/sphenix/u/weihuma/analysis/TrackPid/anaplots/output/upsilon/eID_plot_e+e-_embed_upsilon";
84 output_plot_eID_eta =
"/sphenix/u/weihuma/analysis/TrackPid/anaplots/output/upsilon/efficiency_eta_e+e-_embed_upsilon";
85 output_plot_eID_pt =
"/sphenix/u/weihuma/analysis/TrackPid/anaplots/output/upsilon/efficiency_pt_e+e-_embed_upsilon";
86 output_plot_eID_HOM =
"/sphenix/u/weihuma/analysis/TrackPid/anaplots/output/upsilon/efficiency_HOM_e+e-_embed_upsilon";
87 output_plot_eID_HOP =
"/sphenix/u/weihuma/analysis/TrackPid/anaplots/output/upsilon/efficiency_HOP_e+e-_embed_upsilon";
88 output_plot_eID_EOP =
"/sphenix/u/weihuma/analysis/TrackPid/anaplots/output/upsilon/efficiency_EOP_e+e-_embed_upsilon";
95 output_eID =
"/sphenix/u/weihuma/analysis/TrackPid/anaplots/output/embed/eID_embed.root";
96 output_plot_eID =
"/sphenix/u/weihuma/analysis/TrackPid/anaplots/output/embed/eID_plot_e+e-_embed";
97 output_plot_eID_eta =
"/sphenix/u/weihuma/analysis/TrackPid/anaplots/output/embed/efficiency_eta_e+e-_embed";
98 output_plot_eID_pt =
"/sphenix/u/weihuma/analysis/TrackPid/anaplots/output/embed/efficiency_pt_e+e-_embed";
99 output_plot_eID_HOM =
"/sphenix/u/weihuma/analysis/TrackPid/anaplots/output/embed/efficiency_HOM_e+e-_embed";
100 output_plot_eID_HOP =
"/sphenix/u/weihuma/analysis/TrackPid/anaplots/output/embed/efficiency_HOP_e+e-_embed";
101 output_plot_eID_EOP =
"/sphenix/u/weihuma/analysis/TrackPid/anaplots/output/embed/efficiency_EOP_e+e-_embed";
109 input_file[0] =
"/sphenix/u/weihuma/RunOutput/G4sPHENIX_e-_1000_0_POSCOR_g4svtx_eval.root";
110 input_file[1] =
"/sphenix/u/weihuma/RunOutput/G4sPHENIX_e-_1000_1_POSCOR_g4svtx_eval.root";
111 input_file[2] =
"/sphenix/u/weihuma/RunOutput/G4sPHENIX_e-_1000_2_POSCOR_g4svtx_eval.root";
112 input_file[3] =
"/sphenix/u/weihuma/RunOutput/G4sPHENIX_e-_1000_3_POSCOR_g4svtx_eval.root";
113 input_file[4] =
"/sphenix/u/weihuma/RunOutput/G4sPHENIX_pi-_1000_0_POSCOR_g4svtx_eval.root";
114 input_file[5] =
"/sphenix/u/weihuma/RunOutput/G4sPHENIX_pi-_1000_1_POSCOR_g4svtx_eval.root";
115 input_file[6] =
"/sphenix/u/weihuma/RunOutput/G4sPHENIX_pi-_1000_2_POSCOR_g4svtx_eval.root";
116 input_file[7] =
"/sphenix/u/weihuma/RunOutput/G4sPHENIX_pi-_1000_3_POSCOR_g4svtx_eval.root";
117 input_file[8] =
"/sphenix/u/weihuma/RunOutput/G4sPHENIX_K-_1000_0_POSCOR_g4svtx_eval.root";
118 input_file[9] =
"/sphenix/u/weihuma/RunOutput/G4sPHENIX_K-_1000_1_POSCOR_g4svtx_eval.root";
119 input_file[10] =
"/sphenix/u/weihuma/RunOutput/G4sPHENIX_K-_1000_2_POSCOR_g4svtx_eval.root";
120 input_file[11] =
"/sphenix/u/weihuma/RunOutput/G4sPHENIX_K-_1000_3_POSCOR_g4svtx_eval.root";
121 input_file[12] =
"/sphenix/u/weihuma/RunOutput/G4sPHENIX_antiproton_0_1000_POSCOR_g4svtx_eval.root";
122 input_file[13] =
"/sphenix/u/weihuma/RunOutput/G4sPHENIX_antiproton_1000_1_POSCOR_g4svtx_eval.root";
123 input_file[14] =
"/sphenix/u/weihuma/RunOutput/G4sPHENIX_antiproton_1000_2_POSCOR_g4svtx_eval.root";
124 input_file[15] =
"/sphenix/u/weihuma/RunOutput/G4sPHENIX_antiproton_1000_3_POSCOR_g4svtx_eval.root";
126 output_eID =
"/sphenix/u/weihuma/analysis/TrackPid/anaplots/output/single/eID_single.root";
127 output_plot_eID =
"/sphenix/u/weihuma/analysis/TrackPid/anaplots/output/single/eID_plot_single_antiproton";
128 output_plot_eID_eta =
"/sphenix/u/weihuma/analysis/TrackPid/anaplots/output/single/efficiency_eta_single";
129 output_plot_eID_pt =
"/sphenix/u/weihuma/analysis/TrackPid/anaplots/output/single/efficiency_pt_single";
130 output_plot_eID_HOM =
"/sphenix/u/weihuma/analysis/TrackPid/anaplots/output/single/efficiency_HOM_single";
131 output_plot_eID_HOP =
"/sphenix/u/weihuma/analysis/TrackPid/anaplots/output/single/efficiency_HOP_single";
132 output_plot_eID_EOP =
"/sphenix/u/weihuma/analysis/TrackPid/anaplots/output/single/efficiency_EOP_single";
138 h1pt_e=
new TH1F(
"h1pt_e",
"pt",200,0,20);
139 h1EOP=
new TH1F(
"h1EOP",
"cemce3x3/p",200,0,10);
140 h1EOP_e=
new TH1F(
"h1EOP_e",
"cemce3x3/p",200,0,10);
141 h1HOM=
new TH1F(
"h1HOM",
"hcalin3x3/cemce3x3",200,0,10);
142 h1HOP=
new TH1F(
"h1HOP",
"hcalin3x3+hcalout3x3/cemce3x3",200,0,10);
144 h1dR=
new TH1F(
"h1dR",
"dR",400,0,0.2);
145 h1gflavor=
new TH1F(
"h1gflavor",
"Eop>0.8&Eop<1.2&hcaline3x3<0.2",2000,-1000,1000);
151 fHistogramFile_eID =
new TFile(output_eID,
"RECREATE");
152 fHistogramFile_eID->cd();
155 for(
int i=0;
i<50;
i++){
157 NEID_electron_eta[
i]=0;
158 NEID_electron_pt[
i]=0;
159 NEID_electron_HOM[
i]=0;
160 NEID_electron_EOP[
i]=0;
161 NEID_electron_HOP[
i]=0;
176 N_antiproton_eta[
i]=0;
180 N_antiproton_pt[
i]=0;
184 N_antiproton_HOM[
i]=0;
188 N_antiproton_HOP[
i]=0;
192 N_antiproton_EOP[
i]=0;
196 NEID_antiproton_eta[
i]=0;
200 NEID_antiproton_pt[
i]=0;
209 for(
int ifile=0;ifile<Nfile;ifile++){
210 TNtuple *ntp_vertex=0;
212 TNtuple *ntp_track=0;
218 file3->GetObject(
"ntp_vertex",ntp_vertex);
219 file3->GetObject(
"ntp_gtrack",ntp_gtrack);
220 file3->GetObject(
"ntp_track",ntp_track);
224 if(ifile<60) temifile=ifile+40;
225 if(ifile>=60 && ifile<120) temifile=ifile+40-60;
226 if(ifile>=120 && ifile<180) temifile=ifile+40-120;
227 if(ifile<60)sprintf(input_file_embed,
"/sphenix/sim/sim01/sphnxpro/MDC1/embedpion/embedelectronsDST_sHijing_0_20fm_50kHz_bkg_0_20fm-0000000001-031%d_g4svtx_eval.root",temifile);
228 if(ifile>=60 && ifile<120)sprintf(input_file_embed,
"/sphenix/sim/sim01/sphnxpro/MDC1/embedpion/embedpionsDST_sHijing_0_20fm_50kHz_bkg_0_20fm-0000000001-043%d_g4svtx_eval.root",temifile);
229 if(ifile>=120 && ifile<180){
230 sprintf(input_file_embed,
"/sphenix/sim/sim01/sphnxpro/MDC1/embedpion/data/embedantiprotonsDST_sHijing_0_20fm_50kHz_bkg_0_20fm-0000000001-021%d_g4svtx_eval.root",temifile);
231 if(ifile==153)sprintf(input_file_embed,
"/sphenix/sim/sim01/sphnxpro/MDC1/embedpion/data/embedantiprotonsDST_sHijing_0_20fm_50kHz_bkg_0_20fm-0000000001-02139_g4svtx_eval.root",temifile);
233 if(gSystem->AccessPathName(input_file_embed)) {
234 printf(
"no data existing for %s\n",input_file_embed);
237 TFile
file2(input_file_embed);
239 file2.GetObject(
"ntp_vertex",ntp_vertex);
240 file2.GetObject(
"ntp_gtrack",ntp_gtrack);
241 file2.GetObject(
"ntp_track",ntp_track);
242 printf(
"inputfile: %s\n",input_file_embed);
247 cout<<
"ntp_track->GetEntries= "<<ntp_track->GetEntries()<<endl;
250 for(
int ientry=0;ientry<ntp_track->GetEntries();ientry++) {
251 ntp_track->GetEntry(ientry);
252 float *content2=ntp_track->GetArgs();
253 int event2=0,trackID2=0;
254 float px2=0.0,py2=0.0,pz2=0.0,pt2=0.0,gpt2=0.0,eta2=0.0,phi2=0.0,charge2=0.0,quality2=0.0,nhits2=0.0,nmaps2=0.0,nintt2=0.0,ntpc2=0.0;
255 float cemcdphi2=0.0,cemcdeta2=0.0,cemce3x32=0.0,cemce2=0.0,hcalindphi2=0.0,hcalindeta2=0.0,hcaline3x32=0.0,hcaline2=0.0,hcaloutdphi2=0.0,hcaloutdeta2=0.0,hcaloute3x32=0.0,hcaloute2=0.0;
259 trackID2=content2[2];
266 charge2=content2[12];
267 quality2=content2[13];
272 cemcdphi2=content2[43];
273 cemcdeta2=content2[44];
274 cemce3x32=content2[45];
276 hcalindphi2=content2[47];
277 hcalindeta2=content2[48];
278 hcaline3x32=content2[49];
279 hcaline2=content2[50];
280 hcaloutdphi2=content2[51];
281 hcaloutdeta2=content2[52];
282 hcaloute3x32=content2[53];
283 hcaloute2=content2[54];
284 gflavor2=content2[56];
288 float p2=TMath::Sqrt(px2*px2+py2*py2+pz2*pz2);
289 float E2=TMath::Sqrt(me*me+p2*p2);
290 float EOP=cemce3x32/p2;
291 float HOP=(hcaline3x32+hcaloute3x32)/p2;
292 float HOM=hcaline3x32/cemce3x32;
293 float dR=TMath::Sqrt(cemcdphi2*cemcdphi2+cemcdeta2*cemcdeta2);
294 float pt=TMath::Sqrt(px2*px2+py2*py2);
297 if(nmaps2>0 && nintt2>0 && ntpc2>20 && quality2<10){
299 if(TMath::Abs(gflavor2)==11 && (TMath::Abs(eta2)>0.0 && TMath::Abs(eta2)<1.1) && (gpt2>0.0 && gpt2<20.0) && quality2<20) NEID_electron=NEID_electron+1;
300 if(TMath::Abs(gflavor2)==211 && (TMath::Abs(eta2)>0.0 && TMath::Abs(eta2)<1.1) && (gpt2>0.0 && gpt2<20.0) && quality2<20) NEID_pion=NEID_pion+1;
301 if(TMath::Abs(gflavor2)==321 && (TMath::Abs(eta2)>0.0 && TMath::Abs(eta2)<1.1) && (gpt2>0.0 && gpt2<20.0) && quality2<20) NEID_K=NEID_K+1;
302 if(TMath::Abs(gflavor2)==2212 && (TMath::Abs(eta2)>0.0 && TMath::Abs(eta2)<1.1) && (gpt2>0.0 && gpt2<20.0) && quality2<20) NEID_antiproton=NEID_antiproton+1;
303 cout<<
"NEID_electron= "<<NEID_electron<<
"NEID_pion= "<<NEID_pion<<
"NEID_electron= "<<NEID_K<<
"NEID_electron= "<<NEID_antiproton<<endl;
305 if((TMath::Abs(eta2)>0.0 && TMath::Abs(eta2)<1.1) && (gpt2>0.0 && gpt2<20.0)){
306 if(TMath::Abs(gflavor2)==11)h1pt_e->Fill(pt2);
309 if(TMath::Abs(gflavor2)==11)h1EOP_e->Fill(EOP);
312 h1gflavor->Fill(gflavor2);
315 for(
int i=0;
i<11;
i++){
316 eta_point[
i]=
i*1.0/10+0.05;
317 if((TMath::Abs(eta2)>(eta_point[
i]-0.05)) && (TMath::Abs(eta2)<(eta_point[
i]+0.05)) && (gpt2>0.0 & gpt2<20.0)){
318 if(TMath::Abs(gflavor2)==11) N_electron_eta[
i]=N_electron_eta[
i]+1;
319 if(TMath::Abs(gflavor2)==211) N_pion_eta[
i]=N_pion_eta[
i]+1;
320 if(TMath::Abs(gflavor2)==321) N_K_eta[
i]=N_K_eta[
i]+1;
321 if(TMath::Abs(gflavor2)==2212) N_antiproton_eta[
i]=N_antiproton_eta[
i]+1;
323 if(EOP>0.7 && EOP<1.5 && HOM<0.2 && pt>2.0 ){
324 if(TMath::Abs(gflavor2)==11) NEID_electron_eta[
i]=NEID_electron_eta[
i]+1;
325 if(TMath::Abs(gflavor2)==211) NEID_pion_eta[
i]=NEID_pion_eta[
i]+1;
326 if(TMath::Abs(gflavor2)==321) NEID_K_eta[
i]=NEID_K_eta[
i]+1;
327 if(TMath::Abs(gflavor2)==2212) NEID_antiproton_eta[
i]=NEID_antiproton_eta[
i]+1;
328 cout<<
"NEID_pion_eta= "<<NEID_pion_eta[
i]<<endl;
333 for(
int i=0;
i<16;
i++){
334 pt_point[
i]=
i*10.0/10+0.5;
335 if(pt>(pt_point[
i]-0.5) && pt<(pt_point[
i]+0.5) && (TMath::Abs(eta2)>0.0 && TMath::Abs(eta2)<1.1) && (gpt2>0.0 && gpt2<20.0)){
336 if(TMath::Abs(gflavor2)==11) N_electron_pt[
i]=N_electron_pt[
i]+1;
337 if(TMath::Abs(gflavor2)==211) N_pion_pt[
i]=N_pion_pt[
i]+1;
338 if(TMath::Abs(gflavor2)==321) N_K_pt[
i]=N_K_pt[
i]+1;
339 if(TMath::Abs(gflavor2)==2212) N_antiproton_pt[
i]=N_antiproton_pt[
i]+1;
341 if(EOP>0.7 && EOP<1.5 && HOM<0.2){
342 if(TMath::Abs(gflavor2)==11) NEID_electron_pt[
i]=NEID_electron_pt[
i]+1;
343 if(TMath::Abs(gflavor2)==211) NEID_pion_pt[
i]=NEID_pion_pt[
i]+1;
344 if(TMath::Abs(gflavor2)==321) NEID_K_pt[
i]=NEID_K_pt[
i]+1;
345 if(TMath::Abs(gflavor2)==2212) NEID_antiproton_pt[
i]=NEID_antiproton_pt[
i]+1;
346 cout<<
"NEID_pion_pt= "<<NEID_pion_pt[
i]<<endl;
351 for(
int i=0;
i<20;
i++){
352 HOM_point[
i]=
i*0.5/10+0.05;
353 if(HOM<HOM_point[
i] && (TMath::Abs(eta2)>0.0 && TMath::Abs(eta2)<1.1) && (gpt2>0.0 && gpt2<20.0)){
354 if(TMath::Abs(gflavor2)==11) N_electron_HOM[
i]=N_electron_HOM[
i]+1;
355 if(TMath::Abs(gflavor2)==211) N_pion_HOM[
i]=N_pion_HOM[
i]+1;
356 if(TMath::Abs(gflavor2)==321) N_K_HOM[
i]=N_K_HOM[
i]+1;
357 if(TMath::Abs(gflavor2)==2212) N_antiproton_HOM[
i]=N_antiproton_HOM[
i]+1;
361 for(
int i=0;
i<20;
i++){
362 HOP_point[
i]=
i*0.5/10+0.05;
363 if(HOP>HOP_point[
i] && (TMath::Abs(eta2)>0.0 && TMath::Abs(eta2)<1.1) && (gpt2>0.0 && gpt2<20.0)){
364 if(TMath::Abs(gflavor2)==11) N_electron_HOP[
i]=N_electron_HOP[
i]+1;
365 if(TMath::Abs(gflavor2)==211) N_pion_HOP[
i]=N_pion_HOP[
i]+1;
366 if(TMath::Abs(gflavor2)==321) N_K_HOP[
i]=N_K_HOP[
i]+1;
367 if(TMath::Abs(gflavor2)==2212) N_antiproton_HOP[
i]=N_antiproton_HOP[
i]+1;
371 for(
int i=0;
i<9;
i++){
372 EOP_point[
i]=1.0-
i*1.0/10;
373 if(EOP>EOP_point[
i] && EOP<1.5 && (TMath::Abs(eta2)>0.0 && TMath::Abs(eta2)<1.1) && (gpt2>0.0 && gpt2<20.0)){
374 if(TMath::Abs(gflavor2)==11) N_electron_EOP[
i]=N_electron_EOP[
i]+1;
375 if(TMath::Abs(gflavor2)==211) N_pion_EOP[
i]=N_pion_EOP[
i]+1;
376 if(TMath::Abs(gflavor2)==321) N_K_EOP[
i]=N_K_EOP[
i]+1;
377 if(TMath::Abs(gflavor2)==2212) N_antiproton_EOP[
i]=N_antiproton_EOP[
i]+1;
387 fHistogramFile_eID->Write();
388 fHistogramFile_eID->Close();
393 float aa_eta[20],cc_eta[20],ee_eta[20],ff_eta[20],hh_eta[20];
394 float aa_pt[20],cc_pt[20],ee_pt[20],ff_pt[20],hh_pt[20];
395 float aa_HOM[20],cc_HOM[20],ee_HOM[20],ff_HOM[20],hh_HOM[20];
396 float aa_HOP[20],cc_HOP[20],ee_HOP[20],ff_HOP[20],hh_HOP[20];
397 float aa_EOP[20],cc_EOP[20],ee_EOP[20],ff_EOP[20],hh_EOP[20];
398 float ree_eta[20],rff_eta[20],rhh_eta[20],ree_pt[20],rff_pt[20],rhh_pt[20];
399 float ree_EOP[20],rff_EOP[20],rhh_EOP[20],ree_HOM[20],rff_HOM[20],rhh_HOM[20],ree_HOP[20],rff_HOP[20],rhh_HOP[20];
401 float err_aa_eta[20],err_cc_eta[20],err_aa_pt[20],err_cc_pt[20],err_aa_HOM[20],err_cc_HOM[20],err_aa_HOP[20],err_cc_HOP[20],err_aa_EOP[20],err_cc_EOP[20];
402 float err_ee_eta[20],err_ff_eta[20],err_hh_eta[20],err_ee_pt[20],err_ff_pt[20],err_hh_pt[20];
403 float err_ee_HOM[20],err_ff_HOM[20],err_hh_HOM[20],err_ee_HOP[20],err_ff_HOP[20],err_hh_HOP[20],err_ee_EOP[20],err_ff_EOP[20],err_hh_EOP[20];
404 float err_ree_eta[20],err_rff_eta[20],err_rhh_eta[20],err_ree_pt[20],err_rff_pt[20],err_rhh_pt[20];
405 float err_ree_HOM[20],err_rff_HOM[20],err_rhh_HOM[20],err_ree_HOP[20],err_rff_HOP[20],err_rhh_HOP[20],err_ree_EOP[20],err_rff_EOP[20],err_rhh_EOP[20];
407 for(
int i=0;
i<20;
i++){
506 fname1 = Form(
"%s.dat",output_plot_eID_eta);
507 outfile1 =fopen(fname1.Data(),
"w");
508 int Nplot_electron_eta=0,Nplot_pion_eta=0,Nplot_K_eta=0,Nplot_antiproton_eta=0;
509 for(
int i=0;
i<11;
i++){
513 aa_eta[
i]=eta_point[
i];
515 if(N_electron_eta[
i]>0 && NEID_electron_eta[
i]>0){
516 cc_eta[
i]=1.0*NEID_electron_eta[
i]/N_electron_eta[
i];
517 err_cc_eta[
i]=1.0*TMath::Sqrt((1.0/NEID_electron_eta[
i]+1.0/N_electron_eta[
i]))*cc_eta[
i];
518 Nplot_electron_eta=Nplot_electron_eta+1;
520 if(N_pion_eta[
i]>0 && NEID_pion_eta[
i]>0){
521 ee_eta[
i]=1.0*NEID_pion_eta[
i]/N_pion_eta[
i];
522 err_ee_eta[
i]=1.0*TMath::Sqrt((1.0/NEID_pion_eta[
i]+1.0/N_pion_eta[
i]))*ee_eta[
i];
523 Nplot_pion_eta=Nplot_pion_eta+1;
525 if(N_K_eta[
i]>0 && NEID_K_eta[
i]>0){
526 ff_eta[
i]=1.0*NEID_K_eta[
i]/N_K_eta[
i];
527 err_ff_eta[
i]=1.0*TMath::Sqrt((1.0/NEID_K_eta[
i]+1.0/N_K_eta[
i]))*ff_eta[
i];
528 Nplot_K_eta=Nplot_K_eta+1;
530 if(N_antiproton_eta[
i]>0 && NEID_antiproton_eta[
i]>0){
531 hh_eta[
i]=1.0*NEID_antiproton_eta[
i]/N_antiproton_eta[
i];
532 err_hh_eta[
i]=1.0*TMath::Sqrt((1.0/NEID_antiproton_eta[
i]+1.0/N_antiproton_eta[
i]))*hh_eta[
i];
533 Nplot_antiproton_eta=Nplot_antiproton_eta+1;
536 float aa,cc,ee,
ff,hh;
537 float err_aa,err_cc,err_ee,err_ff,err_hh;
545 ree_eta[
i]=1.0/ee_eta[
i];
546 err_ree_eta[
i]=ree_eta[
i]*ree_eta[
i]*err_ee_eta[
i];
550 rff_eta[
i]=1.0/ff_eta[
i];
551 err_rff_eta[
i]=rff_eta[
i]*rff_eta[
i]*err_ff_eta[
i];
554 rhh_eta[
i]=1.0/hh_eta[
i];
555 err_rhh_eta[
i]=rhh_eta[
i]*rhh_eta[
i]*err_hh_eta[
i];
558 fprintf(outfile1,
"eta: %f %f %f %f %f\n",aa,cc,ee,ff,hh);
565 fname2 = Form(
"%s.dat",output_plot_eID_pt);
566 outfile2 =fopen(fname2.Data(),
"w");
567 int Nplot_electron_pt=0,Nplot_pion_pt=0,Nplot_K_pt=0,Nplot_antiproton_pt=0;
568 for(
int i=0;
i<16;
i++){
572 aa_pt[
i]=pt_point[
i];
574 if(N_electron_pt[
i]>0 && NEID_electron_pt[
i]>0){
575 cc_pt[
i]=1.0*NEID_electron_pt[
i]/N_electron_pt[
i];
576 err_cc_pt[
i]=1.0*TMath::Sqrt((1.0/NEID_electron_pt[
i]+1.0/N_electron_pt[
i]))*cc_pt[
i];
577 Nplot_electron_pt=Nplot_electron_pt+1;
580 if(N_pion_pt[
i]>0 && NEID_pion_pt[
i]>0){
581 ee_pt[
i]=1.0*NEID_pion_pt[
i]/N_pion_pt[
i];
582 err_ee_pt[
i]=1.0*TMath::Sqrt((1.0/NEID_pion_pt[
i]+1.0/N_pion_pt[
i]))*ee_pt[
i];
583 Nplot_pion_pt=Nplot_pion_pt+1;
586 if(N_K_pt[
i]>0 && NEID_K_pt[
i]>0){
587 ff_pt[
i]=1.0*NEID_K_pt[
i]/N_K_pt[
i];
588 err_ff_pt[
i]=1.0*TMath::Sqrt((1.0/NEID_K_pt[
i]+1.0/N_K_pt[
i]))*ff_pt[
i];
589 Nplot_K_pt=Nplot_K_pt+1;
591 if(N_antiproton_pt[
i]>0 && NEID_antiproton_pt[
i]>0){
592 hh_pt[
i]=1.0*NEID_antiproton_pt[
i]/N_antiproton_pt[
i];
593 err_hh_pt[
i]=1.0*TMath::Sqrt((1.0/NEID_antiproton_pt[
i]+1.0/N_antiproton_pt[
i]))*hh_pt[
i];
594 Nplot_antiproton_pt=Nplot_antiproton_pt+1;
597 float aa,cc,ee,
ff,hh;
598 float err_aa,err_cc,err_ee,err_ff,err_hh;
606 ree_pt[
i]=1.0/ee_pt[
i];
607 err_ree_pt[
i]=ree_pt[
i]*ree_pt[
i]*err_ee_pt[
i];
610 cout<<cc_pt[
i]<<
"; "<<ree_pt[
i]<<
"; "<<err_ree_pt[
i]<<endl;
612 rff_pt[
i]=1.0/ff_pt[
i];
613 err_rff_pt[
i]=rff_pt[
i]*rff_pt[
i]*err_ff_pt[
i];
616 rhh_pt[
i]=1.0/hh_pt[
i];
617 err_rhh_pt[
i]=rhh_pt[
i]*rhh_pt[
i]*err_hh_pt[
i];
619 cout<<cc_pt[
i]<<
"; "<<rhh_pt[
i]<<
"; "<<err_rhh_pt[
i]<<endl;
620 fprintf(outfile2,
"pt: %f %f %f %f %f\n",aa,cc,ee,ff,hh);
627 fname3 = Form(
"%s.dat",output_plot_eID_HOM);
628 outfile3 =fopen(fname3.Data(),
"w");
629 int Nplot_electron_HOM=0,Nplot_pion_HOM=0,Nplot_K_HOM=0,Nplot_antiproton_HOM=0;
630 for(
int i=0;
i<20;
i++){
634 aa_HOM[
i]=HOM_point[
i];
636 if(NEID_electron>0 & N_electron_HOM[
i]>0){
637 cc_HOM[
i]=1.0*N_electron_HOM[
i]/NEID_electron;
638 err_cc_HOM[
i]=1.0*TMath::Sqrt((1.0/N_electron_HOM[
i]+1.0/NEID_electron))*cc_HOM[
i];
639 Nplot_electron_HOM=Nplot_electron_HOM+1;
641 if(NEID_pion>0 & N_pion_HOM[
i]>0){
642 ee_HOM[
i]=1.0*N_pion_HOM[
i]/NEID_pion;
643 err_ee_HOM[
i]=1.0*TMath::Sqrt((1.0/N_pion_HOM[
i]+1.0/NEID_pion))*ee_HOM[
i];
644 Nplot_pion_HOM=Nplot_pion_HOM+1;
646 if(NEID_K>0 & N_K_HOM[
i]>0){
647 ff_HOM[
i]=1.0*N_K_HOM[
i]/NEID_K;
648 err_ff_HOM[
i]=1.0*TMath::Sqrt((1.0/N_K_HOM[
i]+1.0/NEID_K))*ff_HOM[
i];
649 Nplot_K_HOM=Nplot_K_HOM+1;
651 if(NEID_antiproton>0 & N_antiproton_HOM[
i]>0){
652 hh_HOM[
i]=1.0*N_antiproton_HOM[
i]/NEID_antiproton;
653 err_hh_HOM[
i]=1.0*TMath::Sqrt((1.0/N_antiproton_HOM[
i]+1.0/NEID_antiproton))*hh_HOM[
i];
654 Nplot_antiproton_HOM=Nplot_antiproton_HOM+1;
657 float aa,cc,ee,
ff,hh;
658 float err_aa,err_cc,err_ee,err_ff,err_hh;
666 ree_HOM[
i]=1.0/ee_HOM[
i];
667 err_ree_HOM[
i]=ree_HOM[
i]*ree_HOM[
i]*err_ee_HOM[
i];
670 rff_HOM[
i]=1.0/ff_HOM[
i];
671 err_rff_HOM[
i]=rff_HOM[
i]*rff_HOM[
i]*err_ff_HOM[
i];
674 rhh_HOM[
i]=1.0/hh_HOM[
i];
675 err_rhh_HOM[
i]=rhh_HOM[
i]*rhh_HOM[
i]*err_hh_HOM[
i];
679 err_aa=err_aa_HOM[
i];
680 err_cc=err_cc_HOM[
i];
681 err_ee=err_ee_HOM[
i];
682 err_ff=err_ff_HOM[
i];
683 err_hh=err_hh_HOM[
i];
685 fprintf(outfile3,
" %f %f %f %f %f %f %f %f %f %f\n",aa,err_aa,cc,err_cc,ee,err_ee,ff,err_ff,hh,err_hh);
691 fname4 = Form(
"%s.dat",output_plot_eID_EOP);
692 outfile4 =fopen(fname4.Data(),
"w");
693 int Nplot_electron_EOP=0,Nplot_pion_EOP=0,Nplot_K_EOP=0,Nplot_antiproton_EOP=0;
694 for(
int i=0;
i<9;
i++){
698 aa_EOP[
i]=EOP_point[
i];
700 if(NEID_electron>0 & N_electron_EOP[
i]>0){
701 cc_EOP[
i]=1.0*N_electron_EOP[
i]/NEID_electron;
702 err_cc_EOP[
i]=1.0*TMath::Sqrt((1.0/N_electron_EOP[
i]+1.0/NEID_electron))*cc_EOP[
i];
703 Nplot_electron_EOP=Nplot_electron_EOP+1;
706 if(NEID_pion>0 & N_pion_EOP[
i]>0){
707 ee_EOP[
i]=1.0*N_pion_EOP[
i]/NEID_pion;
708 err_ee_EOP[
i]=1.0*TMath::Sqrt((1.0/N_pion_EOP[
i]+1.0/NEID_pion))*ee_EOP[
i];
709 Nplot_pion_EOP=Nplot_pion_EOP+1;
711 if(NEID_K>0 & N_K_EOP[
i]>0){
712 ff_EOP[
i]=1.0*N_K_EOP[
i]/NEID_K;
713 err_ff_EOP[
i]=1.0*TMath::Sqrt((1.0/N_K_EOP[
i]+1.0/NEID_K))*ff_EOP[
i];
714 Nplot_K_EOP=Nplot_K_EOP+1;
716 if(NEID_antiproton>0 & N_antiproton_EOP[
i]>0){
717 hh_EOP[
i]=1.0*N_antiproton_EOP[
i]/NEID_antiproton;
718 err_hh_EOP[
i]=1.0*TMath::Sqrt((1.0/N_antiproton_EOP[
i]+1.0/NEID_antiproton))*hh_EOP[
i];
719 Nplot_antiproton_EOP=Nplot_antiproton_EOP+1;
722 float aa,cc,ee,
ff,hh;
723 float err_aa,err_cc,err_ee,err_ff,err_hh;
731 ree_EOP[
i]=1.0/ee_EOP[
i];
732 err_ree_EOP[
i]=ree_EOP[
i]*ree_EOP[
i]*err_ee_EOP[
i];
736 rff_EOP[
i]=1.0/ff_EOP[
i];
737 err_rff_EOP[
i]=rff_EOP[
i]*rff_EOP[
i]*err_ff_EOP[
i];
740 rhh_EOP[
i]=1.0/hh_EOP[
i];
741 err_rhh_EOP[
i]=rhh_EOP[
i]*rhh_EOP[
i]*err_hh_EOP[
i];
744 err_aa=err_aa_EOP[
i];
745 err_cc=err_cc_EOP[
i];
746 err_ee=err_ee_EOP[
i];
747 err_ff=err_ff_EOP[
i];
748 err_hh=err_hh_EOP[
i];
750 fprintf(outfile4,
" %f %f %f %f %f %f %f %f %f %f\n",aa,err_aa,cc,err_cc,ee,err_ee,ff,err_ff,hh,err_hh);
756 fname5 = Form(
"%s.dat",output_plot_eID_HOP);
757 outfile5 =fopen(fname5.Data(),
"w");
758 int Nplot_electron_HOP=0,Nplot_pion_HOP=0,Nplot_K_HOP=0,Nplot_antiproton_HOP=0;
759 for(
int i=0;
i<20;
i++){
763 aa_HOP[
i]=HOP_point[
i];
765 if(NEID_electron>0 & N_electron_HOP[
i]>0){
766 cc_HOP[
i]=1.0*N_electron_HOP[
i]/NEID_electron;
767 err_cc_HOP[
i]=1.0*TMath::Sqrt((1.0/N_electron_HOP[
i]+1.0/NEID_electron))*cc_HOP[
i];
768 Nplot_electron_HOP=Nplot_electron_HOP+1;
770 if(NEID_pion>0 & N_pion_HOP[
i]>0){
771 ee_HOP[
i]=1.0*N_pion_HOP[
i]/NEID_pion;
772 err_ee_HOP[
i]=1.0*TMath::Sqrt((1.0/N_pion_HOP[
i]+1.0/NEID_pion))*ee_HOP[
i];
773 Nplot_pion_HOP=Nplot_pion_HOP+1;
775 if(NEID_K>0 & N_K_HOP[
i]>0){
776 ff_HOP[
i]=1.0*N_K_HOP[
i]/NEID_K;
777 err_ff_HOP[
i]=1.0*TMath::Sqrt((1.0/N_K_HOP[
i]+1.0/NEID_K))*ff_HOP[
i];
778 Nplot_K_HOP=Nplot_K_HOP+1;
780 if(NEID_antiproton>0 & N_antiproton_HOP[
i]>0){
781 hh_HOP[
i]=1.0*N_antiproton_HOP[
i]/NEID_antiproton;
782 err_hh_HOP[
i]=1.0*TMath::Sqrt((1.0/N_antiproton_HOP[
i]+1.0/NEID_antiproton))*hh_HOP[
i];
783 Nplot_antiproton_HOP=Nplot_antiproton_HOP+1;
786 float aa,cc,ee,
ff,hh;
787 float err_aa,err_cc,err_ee,err_ff,err_hh;
795 ree_HOP[
i]=1.0/ee_HOP[
i];
796 err_ree_HOP[
i]=ree_HOP[
i]*ree_HOP[
i]*err_ee_HOP[
i];
799 rff_HOP[
i]=1.0/ff_HOP[
i];
800 err_rff_HOP[
i]=rff_HOP[
i]*rff_HOP[
i]*err_ff_HOP[
i];
803 rhh_HOP[
i]=1.0/hh_HOP[
i];
804 err_rhh_HOP[
i]=rhh_HOP[
i]*rhh_HOP[
i]*err_hh_HOP[
i];
807 err_aa=err_aa_HOP[
i];
808 err_cc=err_cc_HOP[
i];
809 err_ee=err_ee_HOP[
i];
810 err_ff=err_ff_HOP[
i];
811 err_hh=err_hh_HOP[
i];
813 fprintf(outfile5,
" %f %f %f %f %f %f %f %f %f %f\n",aa,err_aa,cc,err_cc,ee,err_ee,ff,err_ff,hh,err_hh);
818 gROOT->LoadMacro(
"sPhenixStyle.C");
820 TCanvas *canv=
new TCanvas(
"canv",
"Cali Canvas",1800,4750);
825 TPad *pad1 =
new TPad(
"pad1",
"pad1",0,0,0.99,0.99);
834 if(tag==1 or 3)Ymax=2.0;
841 hframe0=gPad->DrawFrame(Xmin,Ymin,Xmax,Ymax);
842 hframe0->GetXaxis()->SetTitle(
"|#eta|");
844 hframe0->GetYaxis()->SetTitle(
"Survival probability (%)");
847 TGraphErrors *g1,*g11,*g12,*g13;
848 g1=
new TGraphErrors(11,aa_eta,cc_eta,err_aa_eta,err_cc_eta);
849 g1->SetMarkerStyle(26);
850 g1->SetMarkerColor(1);
853 g1->SetLineWidth(1.2);
854 g1->SetMarkerSize(3.0);
856 g11=
new TGraphErrors(11,aa_eta,ee_eta,err_aa_eta,err_ee_eta);
857 g11->SetMarkerStyle(26);
858 g11->SetMarkerColor(2);
859 g11->SetLineColor(2);
860 g11->SetLineStyle(1);
861 g11->SetLineWidth(1.2);
862 g11->SetMarkerSize(3.0);
864 g12=
new TGraphErrors(11,aa_eta,ff_eta,err_aa_eta,err_ff_eta);
865 g12->SetMarkerStyle(26);
866 g12->SetMarkerColor(3);
867 g12->SetLineColor(3);
868 g12->SetLineStyle(1);
869 g12->SetLineWidth(1.2);
870 g12->SetMarkerSize(3.0);
871 if(tag==1 or 3) g12->Draw(
"p");
872 g13=
new TGraphErrors(11,aa_eta,hh_eta,err_aa_eta,err_hh_eta);
873 g13->SetMarkerStyle(26);
874 g13->SetMarkerColor(4);
875 g13->SetLineColor(4);
876 g13->SetLineStyle(1);
877 g13->SetLineWidth(1.2);
878 g13->SetMarkerSize(3.0);
881 TLegend *legtitle1 =
new TLegend(0.20,0.85,0.35,0.92,
"#it{#bf{sPHENIX}} Simulation Internal");
882 legtitle1->SetTextSize(0.035);
886 if(tag==2)legtitle11 =
new TLegend(0.20,0.82,0.35,0.85,
"Embed");
887 if(tag==1 or 3)legtitle11 =
new TLegend(0.20,0.82,0.35,0.85,
"Single particle");
888 legtitle11->SetTextSize(0.030);
891 TLegend *legtitle12 =
new TLegend(0.20,0.78,0.35,0.80,
"@:0.7<E_{EMCal}/p<1.5 & E_{iHCal}/E_{EMCal}<0.2");
892 legtitle12->SetTextSize(0.028);
895 TLegend *legtitle13 =
new TLegend(0.20,0.72,0.35,0.76,
"@:p_{t}>2GeV");
896 legtitle13->SetTextSize(0.028);
899 TLegend *leg1 =
new TLegend(0.65,0.63,0.90,0.92);
900 leg1->AddEntry(g1,
" e^{+} & e^{-}",
"lep");
901 leg1->AddEntry(g11,
" #pi^{+} & #pi^{-}",
"lep");
902 if(tag==1 or 3)leg1->AddEntry(g12,
" K^{+} & K^{-}",
"lep");
903 leg1->AddEntry(g13,
" p & #bar{p}",
"lep");
908 TPad *pad2 =
new TPad(
"pad2",
"pad2",0,0,0.99,0.99);
916 if(tag==1 or 3)Ymax=2.0;
921 hframe0=gPad->DrawFrame(Xmin,Ymin,Xmax,Ymax);
922 hframe0->GetXaxis()->SetTitle(
"p_{t} (GeV)");
924 hframe0->GetYaxis()->SetTitle(
"Survival probability (%)");
928 TGraphErrors *g2,*g21,*g22,*g23;
929 g2=
new TGraphErrors(16,aa_pt,cc_pt,err_aa_pt,err_cc_pt);
930 g2->SetMarkerStyle(26);
931 g2->SetMarkerColor(1);
934 g2->SetLineWidth(1.2);
935 g2->SetMarkerSize(3.0);
937 g21=
new TGraphErrors(16,aa_pt,ee_pt,err_aa_pt,err_ee_pt);
938 g21->SetMarkerStyle(26);
939 g21->SetMarkerColor(2);
940 g21->SetLineColor(2);
941 g21->SetLineStyle(1);
942 g21->SetLineWidth(1.2);
943 g21->SetMarkerSize(3.0);
945 g22=
new TGraphErrors(16,aa_pt,ff_pt,err_aa_pt,err_ff_pt);
946 g22->SetMarkerStyle(26);
947 g22->SetMarkerColor(3);
948 g22->SetLineColor(3);
949 g22->SetLineStyle(1);
950 g22->SetLineWidth(1.2);
951 g22->SetMarkerSize(3.0);
952 if(tag==1 or 3) g22->Draw(
"p");
953 g23=
new TGraphErrors(16,aa_pt,hh_pt,err_aa_pt,err_hh_pt);
954 g23->SetMarkerStyle(26);
955 g23->SetMarkerColor(4);
956 g23->SetLineColor(4);
957 g23->SetLineStyle(1);
958 g23->SetLineWidth(1.2);
959 g23->SetMarkerSize(3.0);
962 TLegend *legtitle2 =
new TLegend(0.20,0.85,0.35,0.92,
"#it{#bf{sPHENIX}} Simulation Internal");
963 legtitle2->SetTextSize(0.035);
967 if(tag==2)legtitle21 =
new TLegend(0.20,0.82,0.35,0.85,
"Embed");
968 if(tag==1 or 3)legtitle21 =
new TLegend(0.20,0.82,0.35,0.85,
"Single particle");
969 legtitle21->SetTextSize(0.030);
972 TLegend *legtitle22 =
new TLegend(0.20,0.78,0.35,0.80,
"@:0.7<E_{EMCal}/p<1.5 & E_{iHCal}/E_{EMCal}<0.2");
973 legtitle22->SetTextSize(0.025);
976 TLegend *leg2 =
new TLegend(0.65,0.63,0.90,0.92);
977 leg2->AddEntry(g2,
" e^{+} & e^{-}",
"lep");
978 leg2->AddEntry(g21,
" #pi^{+} & #pi^{-}",
"lep");
979 if(tag==1 or 3) leg2->AddEntry(g22,
" K^{+} & K^{-}",
"lep");
980 leg2->AddEntry(g23,
" p & #bar{p}",
"lep");
985 TPad *pad3 =
new TPad(
"pad3",
"pad3",0,0,0.99,0.99);
994 hframe0=gPad->DrawFrame(Xmin,Ymin,Xmax,Ymax);
995 hframe0->GetXaxis()->SetTitle(
"E_{iHCal}/E_{EMCal}<x_{cut}");
997 hframe0->GetYaxis()->SetTitle(
"Survival probability (%)");
1001 TGraphErrors *g3,*g31,*g32,*g33;
1002 g3=
new TGraphErrors(20,aa_HOM,cc_HOM,err_aa_HOM,err_cc_HOM);
1003 g3->SetMarkerStyle(26);
1004 g3->SetMarkerColor(1);
1005 g3->SetLineColor(1);
1006 g3->SetLineStyle(1);
1007 g3->SetLineWidth(1.2);
1008 g3->SetMarkerSize(3.0);
1010 g31=
new TGraphErrors(20,aa_HOM,ee_HOM,err_aa_HOM,err_ee_HOM);
1011 g31->SetMarkerStyle(26);
1012 g31->SetMarkerColor(2);
1013 g31->SetLineColor(2);
1014 g31->SetLineStyle(1);
1015 g31->SetLineWidth(1.2);
1016 g31->SetMarkerSize(3.0);
1018 g32=
new TGraphErrors(20,aa_HOM,ff_HOM,err_aa_HOM,err_ff_HOM);
1019 g32->SetMarkerStyle(26);
1020 g32->SetMarkerColor(3);
1021 g32->SetLineColor(3);
1022 g32->SetLineStyle(1);
1023 g32->SetLineWidth(1.2);
1024 g32->SetMarkerSize(3.0);
1025 if(tag==1 or 3) g32->Draw(
"pc");
1026 g33=
new TGraphErrors(20,aa_HOM,hh_HOM,err_aa_HOM,err_hh_HOM);
1027 g33->SetMarkerStyle(26);
1028 g33->SetMarkerColor(4);
1029 g33->SetLineColor(4);
1030 g33->SetLineStyle(1);
1031 g33->SetLineWidth(1.2);
1032 g33->SetMarkerSize(3.0);
1035 TLegend *legtitle3 =
new TLegend(0.20,0.85,0.35,0.92,
"#it{#bf{sPHENIX}} Simulation Internal");
1036 legtitle3->SetTextSize(0.035);
1039 TLegend *legtitle31;
1040 if(tag==2)legtitle31 =
new TLegend(0.20,0.82,0.35,0.85,
"Embed");
1041 if(tag==1 or 3)legtitle31 =
new TLegend(0.20,0.82,0.35,0.85,
"Single particle");
1042 legtitle31->SetTextSize(0.030);
1047 if(tag==3 or 2) leg3 =
new TLegend(0.70,0.28,0.78,0.58);
1048 leg3->AddEntry(g3,
" e^{+} & e^{-}",
"ep");
1049 leg3->AddEntry(g31,
" #pi^{+} & #pi^{-}",
"ep");
1050 if(tag==1 or 3) leg3->AddEntry(g32,
" K^{+} & K^{-}",
"ep");
1051 leg3->AddEntry(g33,
" p & #bar{p}",
"ep");
1056 TPad *pad4 =
new TPad(
"pad4",
"pad4",0,0,0.99,0.99);
1065 hframe0=gPad->DrawFrame(Xmin,Ymin,Xmax,Ymax);
1066 hframe0->GetXaxis()->SetTitle(
"x_{cut}<E_{EMCal}/p<1.5");
1068 hframe0->GetYaxis()->SetTitle(
"Survival probability (%)");
1071 TGraphErrors *
g4,*g41,*g42,*g43;
1072 g4=
new TGraphErrors(9,aa_EOP,cc_EOP,err_aa_EOP,err_cc_EOP);
1073 g4->SetMarkerStyle(26);
1074 g4->SetMarkerColor(1);
1075 g4->SetLineColor(1);
1076 g4->SetLineStyle(1);
1077 g4->SetLineWidth(1.2);
1078 g4->SetMarkerSize(3.0);
1080 g41=
new TGraphErrors(9,aa_EOP,ee_EOP,err_aa_EOP,err_ee_EOP);
1081 g41->SetMarkerStyle(26);
1082 g41->SetMarkerColor(2);
1083 g41->SetLineColor(2);
1084 g41->SetLineStyle(1);
1085 g41->SetLineWidth(1.2);
1086 g41->SetMarkerSize(3.0);
1088 g42=
new TGraphErrors(9,aa_EOP,ff_EOP,err_aa_EOP,err_ff_EOP);
1089 g42->SetMarkerStyle(26);
1090 g42->SetMarkerColor(3);
1091 g42->SetLineColor(3);
1092 g42->SetLineStyle(1);
1093 g42->SetLineWidth(1.2);
1094 g42->SetMarkerSize(3.0);
1095 if(tag==1 or 3) g42->Draw(
"pc");
1096 g43=
new TGraphErrors(9,aa_EOP,hh_EOP,err_aa_EOP,err_hh_EOP);
1097 g43->SetMarkerStyle(26);
1098 g43->SetMarkerColor(4);
1099 g43->SetLineColor(4);
1100 g43->SetLineStyle(1);
1101 g43->SetLineWidth(1.2);
1102 g43->SetMarkerSize(3.0);
1105 TLegend *legtitle4 =
new TLegend(0.20,0.85,0.35,0.92,
"#it{#bf{sPHENIX}} Simulation Internal");
1106 legtitle4->SetTextSize(0.035);
1109 TLegend *legtitle41;
1110 if(tag==2)legtitle41 =
new TLegend(0.20,0.82,0.35,0.85,
"Embed");
1111 if(tag==1 or 3)legtitle41 =
new TLegend(0.20,0.82,0.35,0.85,
"Single particle");
1112 legtitle41->SetTextSize(0.030);
1115 TLegend *leg4 =
new TLegend(0.65,0.60,0.90,0.90);
1116 leg4->AddEntry(g4,
" e^{+} & e^{-}",
"ep");
1117 leg4->AddEntry(g41,
" #pi^{+} & #pi^{-}",
"ep");
1118 if(tag==1 or 3) leg4->AddEntry(g42,
" K^{+} & K^{-}",
"ep");
1119 leg4->AddEntry(g43,
" p & #bar{p}",
"ep");
1124 TPad *pad5 =
new TPad(
"pad5",
"pad5",0,0,0.99,0.99);
1135 hframe0=gPad->DrawFrame(Xmin,Ymin,Xmax,Ymax);
1136 hframe0->GetXaxis()->SetTitle(
"(E_{iHCal}+E_{oHCal})/E_{EMCal}>x_{cut}");
1138 hframe0->GetYaxis()->SetTitle(
"Survival probability (%)");
1141 TGraphErrors *g5,*g51,*g52,*g53;
1142 g5=
new TGraphErrors(20,aa_HOP,cc_HOP,err_aa_HOP,err_cc_HOP);
1143 g5->SetMarkerStyle(26);
1144 g5->SetMarkerColor(1);
1145 g5->SetLineColor(1);
1146 g5->SetLineStyle(1);
1147 g5->SetLineWidth(1.2);
1148 g5->SetMarkerSize(3.0);
1150 g51=
new TGraphErrors(20,aa_HOP,ee_HOP,err_aa_HOP,err_ee_HOP);
1151 g51->SetMarkerStyle(26);
1152 g51->SetMarkerColor(2);
1153 g51->SetLineColor(2);
1154 g51->SetLineStyle(1);
1155 g51->SetLineWidth(1.2);
1156 g51->SetMarkerSize(3.0);
1158 g52=
new TGraphErrors(20,aa_HOP,ff_HOP,err_aa_HOP,err_ff_HOP);
1159 g52->SetMarkerStyle(26);
1160 g52->SetMarkerColor(3);
1161 g52->SetLineColor(3);
1162 g52->SetLineStyle(1);
1163 g52->SetLineWidth(1.2);
1164 g52->SetMarkerSize(3.0);
1165 if(tag==1 or 3) g52->Draw(
"pc");
1166 g53=
new TGraphErrors(20,aa_HOP,hh_HOP,err_aa_HOP,err_hh_HOP);
1167 g53->SetMarkerStyle(26);
1168 g53->SetMarkerColor(4);
1169 g53->SetLineColor(4);
1170 g53->SetLineStyle(1);
1171 g53->SetLineWidth(1.2);
1172 g53->SetMarkerSize(3.0);
1175 TLegend *legtitle5 =
new TLegend(0.20,0.85,0.35,0.92,
"#it{#bf{sPHENIX}} Simulation Internal");
1176 legtitle5->SetTextSize(0.035);
1179 TLegend *legtitle51;
1180 if(tag==2)legtitle51 =
new TLegend(0.20,0.82,0.35,0.85,
"Embed");
1181 if(tag==1 or 3)legtitle51 =
new TLegend(0.20,0.82,0.35,0.85,
"Single particle");
1182 legtitle51->SetTextSize(0.030);
1185 TLegend *leg5 =
new TLegend(0.65,0.60,0.90,0.90);
1186 leg5->AddEntry(g5,
" e^{+} & e^{-}",
"ep");
1187 leg5->AddEntry(g51,
" #pi^{+} & #pi^{-}",
"ep");
1188 if(tag==1 or 3) leg5->AddEntry(g52,
" K^{+} & K^{-}",
"ep");
1189 leg5->AddEntry(g53,
" p & #bar{p}",
"ep");
1194 TPad *pad6 =
new TPad(
"pad6",
"pad6",0,0,0.99,0.99);
1212 hframe0=gPad->DrawFrame(Xmin,Ymin,Xmax,Ymax);
1213 hframe0->GetXaxis()->SetTitle(
"eID-Eff.-E_{EMCal}/p(%)");
1215 hframe0->GetYaxis()->SetTitle(
"Rejection");
1219 TGraphErrors *g61,*g62,*g63;
1220 g61=
new TGraphErrors(9,cc_EOP,ree_EOP,err_cc_EOP,err_ree_EOP);
1221 g61->SetMarkerStyle(26);
1222 g61->SetMarkerColor(2);
1223 g61->SetLineColor(2);
1224 g61->SetLineStyle(1);
1225 g61->SetLineWidth(1.2);
1226 g61->SetMarkerSize(3.0);
1228 g62=
new TGraphErrors(9,cc_EOP,rff_EOP,err_cc_EOP,err_rff_EOP);
1229 g62->SetMarkerStyle(26);
1230 g62->SetMarkerColor(3);
1231 g62->SetLineColor(3);
1232 g62->SetLineStyle(1);
1233 g62->SetLineWidth(1.2);
1234 g62->SetMarkerSize(3.0);
1235 if(tag==1 or 3) g62->Draw(
"pl");
1236 g63=
new TGraphErrors(9,cc_EOP,rhh_EOP,err_cc_EOP,err_rhh_EOP);
1237 g63->SetMarkerStyle(26);
1238 g63->SetMarkerColor(4);
1239 g63->SetLineColor(4);
1240 g63->SetLineStyle(1);
1241 g63->SetLineWidth(1.2);
1242 g63->SetMarkerSize(3.0);
1245 TLegend *legtitle6 =
new TLegend(0.20,0.85,0.35,0.92,
"#it{#bf{sPHENIX}} Simulation Internal");
1246 legtitle6->SetTextSize(0.035);
1249 TLegend *legtitle61;
1250 if(tag==2)legtitle61 =
new TLegend(0.20,0.82,0.35,0.85,
"Embed");
1251 if(tag==1 or 3)legtitle61 =
new TLegend(0.20,0.82,0.35,0.85,
"Single particle");
1252 legtitle61->SetTextSize(0.030);
1255 TLegend *leg6 =
new TLegend(0.65,0.65,0.90,0.90);
1256 leg6->AddEntry(g61,
" #pi^{+} & #pi^{-}",
"lep");
1257 if(tag==1 or 3) leg6->AddEntry(g62,
" K^{+} & K^{-}",
"lep");
1258 leg6->AddEntry(g63,
" p & #bar{p}",
"lep");
1263 TPad *pad7 =
new TPad(
"pad7",
"pad7",0,0,0.99,0.99);
1286 hframe0=gPad->DrawFrame(Xmin,Ymin,Xmax,Ymax);
1287 hframe0->GetXaxis()->SetTitle(
"eID-Eff.-E_{iHCal}/E_{EMCal}(%)");
1289 hframe0->GetYaxis()->SetTitle(
"Rejection");
1293 TGraphErrors *g71,*g72,*g73;
1294 g71=
new TGraphErrors(20,cc_HOM,ree_HOM,err_cc_HOM,err_ree_HOM);
1295 g71->SetMarkerStyle(26);
1296 g71->SetMarkerColor(2);
1297 g71->SetLineColor(2);
1298 g71->SetLineStyle(1);
1299 g71->SetLineWidth(1.2);
1300 g71->SetMarkerSize(3.0);
1302 g72=
new TGraphErrors(20,cc_HOM,rff_HOM,err_cc_HOM,err_rff_HOM);
1303 g72->SetMarkerStyle(26);
1304 g72->SetMarkerColor(3);
1305 g72->SetLineColor(3);
1306 g72->SetLineStyle(1);
1307 g72->SetLineWidth(1.2);
1308 g72->SetMarkerSize(3.0);
1309 if(tag==1 or 3) g72->Draw(
"pl");
1310 g73=
new TGraphErrors(20,cc_HOM,rhh_HOM,err_cc_HOM,err_rhh_HOM);
1311 g73->SetMarkerStyle(26);
1312 g73->SetMarkerColor(4);
1313 g73->SetLineColor(4);
1314 g73->SetLineStyle(1);
1315 g73->SetLineWidth(1.2);
1316 g73->SetMarkerSize(3.0);
1319 TLegend *legtitle7 =
new TLegend(0.20,0.85,0.35,0.92,
"#it{#bf{sPHENIX}} Simulation Internal");
1320 legtitle7->SetTextSize(0.035);
1323 TLegend *legtitle71;
1324 if(tag==2)legtitle71 =
new TLegend(0.20,0.82,0.35,0.85,
"Embed");
1325 if(tag==1 or 3)legtitle71 =
new TLegend(0.20,0.82,0.35,0.85,
"Single particle");
1326 legtitle71->SetTextSize(0.030);
1329 TLegend *leg7 =
new TLegend(0.65,0.65,0.90,0.90);
1330 leg7->SetBorderSize(0);
1331 leg7->AddEntry(g71,
" #pi^{+} & #pi^{-}",
"lep");
1332 if(tag==1 or 3) leg7->AddEntry(g72,
" K^{+} & K^{-}",
"lep");
1333 leg7->AddEntry(g73,
" p & #bar{p}",
"lep");
1338 TPad *pad8 =
new TPad(
"pad8",
"pad8",0,0,0.99,0.99);
1355 hframe0=gPad->DrawFrame(Xmin,Ymin,Xmax,Ymax);
1356 hframe0->GetXaxis()->SetTitle(
"eID-Eff.-(E_{iHCal}+E_{oHCal})/E_{EMCal}(%)");
1358 hframe0->GetYaxis()->SetTitle(
"Rejection");
1362 TGraphErrors *g81,*g82,*g83;
1363 g81=
new TGraphErrors(20,cc_HOP,ree_HOP,err_cc_HOP,err_ree_HOP);
1364 g81->SetMarkerStyle(26);
1365 g81->SetMarkerColor(2);
1366 g81->SetLineColor(2);
1367 g81->SetLineStyle(1);
1368 g81->SetLineWidth(1.2);
1369 g81->SetMarkerSize(3.0);
1371 g82=
new TGraphErrors(20,cc_HOP,rff_HOP,err_cc_HOP,err_rff_HOP);
1372 g82->SetMarkerStyle(26);
1373 g82->SetMarkerColor(3);
1374 g82->SetLineColor(3);
1375 g82->SetLineStyle(1);
1376 g82->SetLineWidth(1.2);
1377 g82->SetMarkerSize(3.0);
1378 if(tag==1 or 3) g82->Draw(
"pl");
1379 g83=
new TGraphErrors(20,cc_HOP,rhh_HOP,err_cc_HOP,err_rhh_HOP);
1380 g83->SetMarkerStyle(26);
1381 g83->SetMarkerColor(4);
1382 g83->SetLineColor(4);
1383 g83->SetLineStyle(1);
1384 g83->SetLineWidth(1.2);
1385 g83->SetMarkerSize(3.0);
1388 TLegend *legtitle8 =
new TLegend(0.20,0.85,0.35,0.92,
"#it{#bf{sPHENIX}} Simulation Internal");
1389 legtitle8->SetTextSize(0.035);
1392 TLegend *legtitle81;
1393 if(tag==2)legtitle81 =
new TLegend(0.20,0.82,0.35,0.85,
"Embed");
1394 if(tag==1 or 3)legtitle81 =
new TLegend(0.20,0.82,0.35,0.85,
"Single particle");
1395 legtitle81->SetTextSize(0.030);
1398 TLegend *leg8 =
new TLegend(0.65,0.65,0.90,0.90);
1399 leg8->AddEntry(g81,
" #pi^{+} & #pi^{-}",
"lep");
1400 if(tag==1 or 3) leg8->AddEntry(g82,
" K^{+} & K^{-}",
"lep");
1401 leg8->AddEntry(g83,
" p & #bar{p}",
"lep");
1406 TPad *pad9 =
new TPad(
"pad9",
"pad9",0,0,0.99,0.99);
1423 hframe0=gPad->DrawFrame(Xmin,Ymin,Xmax,Ymax);
1424 hframe0->GetXaxis()->SetTitle(
"eID-Eff.(%)");
1426 hframe0->GetYaxis()->SetTitle(
"Rejection");
1430 TGraphErrors *g91,*g92,*g93;
1431 if(tag==1 or 3)g91=
new TGraphErrors(11,cc_eta,ree_eta,err_cc_eta,err_ree_eta);
1432 if(tag==2)g91=
new TGraphErrors(10,cc_eta,ree_eta,err_cc_eta,err_ree_eta);
1433 g91->SetMarkerStyle(26);
1434 g91->SetMarkerColor(2);
1435 g91->SetLineColor(2);
1436 g91->SetLineStyle(1);
1437 g91->SetLineWidth(1.2);
1438 g91->SetMarkerSize(3.0);
1440 g92=
new TGraphErrors(11,cc_eta,rff_eta,err_cc_eta,err_rff_eta);
1441 g92->SetMarkerStyle(26);
1442 g92->SetMarkerColor(3);
1443 g92->SetLineColor(3);
1444 g92->SetLineStyle(1);
1445 g92->SetLineWidth(1.2);
1446 g92->SetMarkerSize(3.0);
1447 if(tag==1 or 3) g92->Draw(
"p");
1448 if(tag==1 or 3)g93=
new TGraphErrors(11,cc_eta,rhh_eta,err_cc_eta,err_rhh_eta);
1449 if(tag==2)g93=
new TGraphErrors(10,cc_eta,rhh_eta,err_cc_eta,err_rhh_eta);
1450 g93->SetMarkerStyle(26);
1451 g93->SetMarkerColor(4);
1452 g93->SetLineColor(4);
1453 g93->SetLineStyle(1);
1454 g93->SetLineWidth(1.2);
1455 g93->SetMarkerSize(3.0);
1458 TLegend *legtitle9 =
new TLegend(0.20,0.85,0.35,0.92,
"#it{#bf{sPHENIX}} Simulation Internal");
1459 legtitle9->SetTextSize(0.035);
1462 TLegend *legtitle91;
1463 if(tag==2)legtitle91 =
new TLegend(0.20,0.82,0.35,0.85,
"Embed");
1464 if(tag==1 or 3)legtitle91 =
new TLegend(0.20,0.82,0.35,0.85,
"Single particle");
1465 legtitle91->SetTextSize(0.030);
1468 TLegend *legtitle92 =
new TLegend(0.20,0.78,0.35,0.80,
"@:0.7<E_{EMCal}/p<1.5 & E_{iHCal}/E_{EMCal}<0.2");
1469 legtitle92->SetTextSize(0.028);
1472 TLegend *legtitle93 =
new TLegend(0.20,0.72,0.35,0.76,
"@:p_{t}>2GeV");
1473 legtitle93->SetTextSize(0.028);
1476 TLegend *leg9 =
new TLegend(0.65,0.65,0.90,0.90);
1477 leg9->AddEntry(g91,
" #pi^{+} & #pi^{-}",
"lep");
1478 if(tag==1 or 3) leg9->AddEntry(g92,
" K^{+} & K^{-}",
"lep");
1479 leg9->AddEntry(g93,
" p & #bar{p}",
"lep");
1484 TPad *pad10 =
new TPad(
"pad10",
"pad10",0,0,0.99,0.99);
1501 hframe0=gPad->DrawFrame(Xmin,Ymin,Xmax,Ymax);
1502 hframe0->GetXaxis()->SetTitle(
"eID-Eff.-p_{t}(%)");
1504 hframe0->GetYaxis()->SetTitle(
"Rejection");
1508 TGraphErrors *g101,*g102,*g103;
1509 if(tag==1 or 3)g101=
new TGraphErrors(16,cc_pt,ree_pt,err_cc_pt,err_ree_pt);
1510 if(tag==2)g101=
new TGraphErrors(14,cc_pt,ree_pt,err_cc_pt,err_ree_pt);
1511 g101->SetMarkerStyle(26);
1512 g101->SetMarkerColor(2);
1513 g101->SetLineColor(2);
1514 g101->SetLineStyle(1);
1515 g101->SetLineWidth(1.2);
1516 g101->SetMarkerSize(3.0);
1518 g102=
new TGraphErrors(16,cc_pt,rff_pt,err_cc_pt,err_rff_pt);
1519 g102->SetMarkerStyle(26);
1520 g102->SetMarkerColor(3);
1521 g102->SetLineColor(3);
1522 g102->SetLineStyle(1);
1523 g102->SetLineWidth(1.2);
1524 g102->SetMarkerSize(3.0);
1525 if(tag==1 or 3) g102->Draw(
"p");
1526 if(tag==1 or 3)g103=
new TGraphErrors(16,cc_pt,rhh_pt,err_cc_pt,err_rhh_pt);
1527 if(tag==2)g103=
new TGraphErrors(14,cc_pt,rhh_pt,err_cc_pt,err_rhh_pt);
1528 g103->SetMarkerStyle(26);
1529 g103->SetMarkerColor(4);
1530 g103->SetLineColor(4);
1531 g103->SetLineStyle(1);
1532 g103->SetLineWidth(1.2);
1533 g103->SetMarkerSize(3.0);
1536 TLegend *legtitle10 =
new TLegend(0.20,0.85,0.35,0.92,
"#it{#bf{sPHENIX}} Simulation Internal");
1537 legtitle10->SetTextSize(0.035);
1540 TLegend *legtitle101;
1541 if(tag==2)legtitle101 =
new TLegend(0.20,0.82,0.35,0.85,
"Embed");
1542 if(tag==1 or 3)legtitle101 =
new TLegend(0.20,0.82,0.35,0.85,
"Single particle");
1543 legtitle101->SetTextSize(0.030);
1544 legtitle101->Draw();
1546 TLegend *legtitle102 =
new TLegend(0.20,0.78,0.35,0.80,
"@:0.7<E_{EMCal}/p<1.5 & E_{iHCal}/E_{EMCal}<0.2");
1547 legtitle102->SetTextSize(0.028);
1548 legtitle102->Draw();
1550 TLegend *leg10 =
new TLegend(0.65,0.65,0.90,0.90);
1551 leg10->AddEntry(g101,
" #pi^{+} & #pi^{-}",
"lep");
1552 if(tag==1 or 3) leg10->AddEntry(g102,
" K^{+} & K^{-}",
"lep");
1553 leg10->AddEntry(g103,
" p & #bar{p}",
"lep");
1559 psname1=Form(
"%s.pdf",output_plot_eID);
1560 canv->Print(psname1);
1564 TCanvas *cv_EOP=
new TCanvas(
"cv_EOP",
"cv_EOP Canvas",800,800);
1566 TPad *pad =
new TPad(
"pad",
"pad",0,0,0.99,0.99);
1575 hframe0=gPad->DrawFrame(Xmin,Ymin,Xmax,Ymax);
1576 hframe0->GetXaxis()->SetTitle(
"x_{cut}<E_{EMCal}/p<1.5");
1577 hframe0->GetYaxis()->SetTitle(
"Survival probability (%)");
1581 if(tag==1 or 3)g42->Draw(
"pc");
1588 cv_EOP->RedrawAxis();
1589 TString psname2,psname3;
1590 psname2=Form(
"%s_EOP.pdf",output_plot_eID);
1591 psname3=Form(
"%s_EOP.png",output_plot_eID);
1592 cv_EOP->Print(psname2);
1593 cv_EOP->Print(psname3);