17 "../..//sPHENIX_work/production_analysis_cemc2x2/emcstudies/pidstudies/spacal2d/fieldmap/",
18 TString
pid =
"e-", TString kine_config =
"eta0_8GeV", TString ll_config =
19 "Edep_Distribution_ll_sample")
21 const TString inputFile = base_dir +
"/G4Hits_sPHENIX_" +
pid +
"_"
22 + kine_config +
"-ALL.root_Ana.root.lst";
25 TString s_outputFile = inputFile;
26 s_outputFile +=
"_EMCalLikelihood.root";
27 const char * outputFile = s_outputFile.Data();
29 gSystem->Load(
"libfun4all.so");
30 gSystem->Load(
"libg4vertex.so");
31 gSystem->Load(
"libemcal_ana.so");
40 double center_cemc_iphi = 1000;
41 double center_cemc_ieta = 1000;
42 double center_hcalin_iphi = 1000;
43 double center_hcalin_ieta = 1000;
46 double width_emcal_eta = 0;
50 if (
pid ==
"e+" ||
pid ==
"pi+" ||
pid ==
"kaon+" ||
pid ==
"proton")
52 else if (
pid ==
"e-" ||
pid ==
"pi-" ||
pid ==
"kaon-"
53 ||
pid ==
"anti_proton")
58 <<
"Fun4All_EMCalLikelihood - Fatal Error - invalid input particle type: "
63 if (base_dir.Contains(
"spacal") && kine_config.Contains(
"eta0_"))
68 center_cemc_iphi = 0.0952638;
69 center_cemc_ieta = 0.00397331;
70 center_hcalin_iphi = 0.354109;
71 center_hcalin_ieta = -0.000273002;
76 width_emcal_eta = 1.6;
78 else if (base_dir.Contains(
"spacal2d") && charge <0
79 && kine_config.Contains(
"eta0.90_2GeV"))
82 center_cemc_iphi = 0.249273;
83 center_cemc_ieta = 0.0146006;
85 center_hcalin_iphi = 0.447927;
86 center_hcalin_ieta = -0.101503;
89 width_emcal_eta = 1.6;
91 else if (base_dir.Contains(
"spacal2d") && charge <0
92 && kine_config.Contains(
"eta0.90_4GeV"))
94 center_cemc_iphi = 0.129035;
95 center_cemc_ieta = 0.0222246;
97 center_hcalin_iphi = 0.385379;
98 center_hcalin_ieta = -0.0596968;
101 width_emcal_eta = 1.6;
103 else if (base_dir.Contains(
"spacal2d") && charge <0
104 && kine_config.Contains(
"eta0.90_8GeV"))
106 center_cemc_iphi = 0.0829824;
107 center_cemc_ieta = 0.0275653;
109 center_hcalin_iphi = 0.348779;
110 center_hcalin_ieta = -0.0348952;
113 width_emcal_eta = 1.6;
115 else if (base_dir.Contains(
"spacal1d") && charge <0
116 && kine_config.Contains(
"eta0.90_2GeV"))
118 center_cemc_iphi = 0.53236;
119 center_cemc_ieta = 1.15917;
120 center_hcalin_iphi = 0.445272;
121 center_hcalin_ieta = -0.180098;
124 width_emcal_eta = 2.6;
126 else if (base_dir.Contains(
"spacal1d") && charge <0
127 && kine_config.Contains(
"eta0.90_4GeV"))
129 center_cemc_iphi = 0.251162;
130 center_cemc_ieta = 1.35067;
131 center_hcalin_iphi = 0.393433;
132 center_hcalin_ieta = -0.116632;
135 width_emcal_eta = 2.6;
137 else if (base_dir.Contains(
"spacal1d") && charge <0
138 && kine_config.Contains(
"eta0.90_8GeV"))
140 center_cemc_iphi = 0.122055;
141 center_cemc_ieta = 1.52588;
142 center_hcalin_iphi = 0.644177;
143 center_hcalin_ieta = -0.799621;
146 width_emcal_eta = 2.6;
148 else if (base_dir.Contains(
"spacal2d") && charge >0
149 && kine_config.Contains(
"eta0.90_2GeV"))
151 center_cemc_iphi = -0.16237;
152 center_cemc_ieta = 0.00993428;
153 center_hcalin_iphi = 0.338006;
154 center_hcalin_ieta = -0.0939571;
157 width_emcal_eta = 1.6;
159 else if (base_dir.Contains(
"spacal2d") && charge >0
160 && kine_config.Contains(
"eta0.90_4GeV"))
162 center_cemc_iphi = -0.0455698;
163 center_cemc_ieta = 0.0181539;
164 center_hcalin_iphi = 0.340425;
165 center_hcalin_ieta = -0.0670486;
169 width_emcal_eta = 1.6;
171 else if (base_dir.Contains(
"spacal2d") && charge >0
172 && kine_config.Contains(
"eta0.90_8GeV"))
174 center_cemc_iphi = 0.00278605;
175 center_cemc_ieta = 0.0237387;
176 center_hcalin_iphi = 0.336144;
177 center_hcalin_ieta = -0.0484305;
181 width_emcal_eta = 1.6;
183 else if (base_dir.Contains(
"spacal1d") && charge >0
184 && kine_config.Contains(
"eta0.90_2GeV"))
186 center_cemc_iphi = -0.530751;
187 center_cemc_ieta = 1.15259;
189 center_hcalin_iphi = 0.317738;
190 center_hcalin_ieta = -0.119789;
193 width_emcal_eta = 2.6;
195 else if (base_dir.Contains(
"spacal1d") && charge >0
196 && kine_config.Contains(
"eta0.90_4GeV"))
198 center_cemc_iphi = -0.252243;
199 center_cemc_ieta = 1.34503;
201 center_hcalin_iphi = 0.334954;
202 center_hcalin_ieta = -0.0992204;
205 width_emcal_eta = 2.6;
207 else if (base_dir.Contains(
"spacal1d") && charge >0
208 && kine_config.Contains(
"eta0.90_8GeV"))
210 center_cemc_iphi = -0.122248;
211 center_cemc_ieta = 1.52555;
213 center_hcalin_iphi = 0.33193;
214 center_hcalin_ieta = -0.0749197;
217 width_emcal_eta = 2.6;
221 cout <<
"Error !!!!!! Unknown configuraiton";
226 TH2F * h2_Edep_Distribution_e = NULL;
227 TH2F * h2_Edep_Distribution_pi = NULL;
234 base_dir +
"/G4Hits_sPHENIX_e-_" + kine_config
235 +
"-ALL.root_Ana.root.lst_EMCalLikelihood.root_DrawEcal_Likelihood_"
236 + ll_config +
".root");
241 h2_Edep_Distribution_e = (TH2F *) f->GetObjectChecked(
242 "h2_Edep_Distribution",
"TH2F");
252 base_dir +
"/G4Hits_sPHENIX_anti_proton_" + kine_config
253 +
"-ALL.root_Ana.root.lst_EMCalLikelihood.root_DrawEcal_Likelihood_"
254 + ll_config +
".root");
259 h2_Edep_Distribution_pi = (TH2F *) f->GetObjectChecked(
260 "h2_Edep_Distribution",
"TH2F");
270 base_dir +
"/G4Hits_sPHENIX_e+_" + kine_config
271 +
"-ALL.root_Ana.root.lst_EMCalLikelihood.root_DrawEcal_Likelihood_"
272 + ll_config +
".root");
277 h2_Edep_Distribution_e = (TH2F *) f->GetObjectChecked(
278 "h2_Edep_Distribution",
"TH2F");
288 base_dir +
"/G4Hits_sPHENIX_pi+_" + kine_config
289 +
"-ALL.root_Ana.root.lst_EMCalLikelihood.root_DrawEcal_Likelihood_"
290 + ll_config +
".root");
295 h2_Edep_Distribution_pi = (TH2F *) f->GetObjectChecked(
296 "h2_Edep_Distribution",
"TH2F");
303 string(inputFile.Data()) +
string(
"_hist.root"));
346 if (h2_Edep_Distribution_e)
348 if (h2_Edep_Distribution_pi)
369 out->
AddNode(
"GlobalVertexMap");
372 gSystem->ListLibraries();
382 gSystem->Exec(
"ps -o sid,ppid,pid,user,comm,vsize,rssize,time");
386 std::cout <<
"All done" << std::endl;