8 void addJobs(
const char* outFile,
const char** inFile,
int numFiles) {
22 int nZBins, nzBin[20], ozBin[20], nTotZBins = 0;
25 int nParents, nParentBins;
26 for (
int jf=0;jf<numFiles;jf++) {
27 cout <<
"Input file " << inFile[jf] << endl;
28 TFile *in =
new TFile(inFile[jf]);
31 TString name(
"NEventsSib_zBuf_"); name += nZBins;
32 while (gDirectory->Get(name.Data())) {
33 name =
"NEventsSib_zBuf_"; name += nZBins;
38 name =
"meanPtP_parentBin"; name += nParents; name +=
"_zBuf_0";
39 while (gDirectory->Get(name.Data())) {
40 name =
"meanPtP_parentBin"; name += nParents; name +=
"_zBuf_0";
49 name =
"SibppDEtaDPhiArr_cutBin_"; name += nCuts; name +=
"_zBuf_0";
50 while (gDirectory->Get(name.Data())) {
51 name =
"SibppDEtaDPhiArr_cutBin_"; name += nCuts; name +=
"_zBuf_0";
57 name =
"SibppTPCAvgTSep_cutBin_"; name += nDens; name +=
"_zBuf_0";
58 while (gDirectory->Get(name.Data())) {
59 name =
"SibppTPCAvgTSep_cutBin_"; name += nDens; name +=
"_zBuf_0";
65 ozBin[jf] = nTotZBins;
68 nParentBins = nParents;
72 if (nParents != nParentBins) {
73 cout<<
"Error in ParentBins. First file had "<< nParentBins <<
" while file " << jf <<
" has " << nParents << endl;
76 if (nCuts != nCutBins) {
77 cout<<
"Error in CutBins. First file had "<< nCutBins <<
" while file " << jf <<
" has " << nCuts << endl;
80 if (nDens != nDenBins) {
81 cout<<
"Error in DensityBins. First file had "<< nDenBins <<
" while file " << jf <<
" has " << nDens << endl;
94 TH2D *mHMixedDistance = 0;
95 TH2D *mHMixedMults = 0;
100 if (nTotZBins > 100) {
101 cout <<
"Oops... I declared total number of Z bins as less than 100. You have " << nTotZBins << endl;
104 TH1D *mHNEventsSib[100];
105 TH1D *mHNEventsMix[100];
106 TH1D *mHNEventsPosSib[100];
107 TH1D *mHNEventsPosMix[100];
108 TH1D *mHNEventsNegSib[100];
109 TH1D *mHNEventsNegMix[100];
111 if (nParentBins > 20) {
112 cout <<
"Oops... I declared number of Parent bins as less than 20. You have " << nParentBins << endl;
115 TH1D *mHMeanPtP[20][100];
116 TH1D *mHMeanPtM[20][100];
117 TH1D *mHEtaP[20][100];
118 TH1D *mHEtaM[20][100];
121 cout <<
"Oops... I declared number of Cut bins as less than 40. You have " << nCutBins << endl;
124 TH2D *mHYtYt[40][100][8];
125 TH2D *mHNYtYt[40][100][8];
126 TH2D *mHPtPt[40][100][8];
128 TH2D *mHPhiPhi[40][100][8];
129 TH2D *mHNPhiPhi[40][100][8];
130 TH2D *mHEtaEta[40][100][8];
131 TH2D *mHPrPhiPhi[40][100][8];
132 TH2D *mHPrEtaEta[40][100][8];
133 TH2D *mHPaPhiPhi[40][100][8];
134 TH2D *mHPaEtaEta[40][100][8];
135 TH2D *mHPbPhiPhi[40][100][8];
136 TH2D *mHPbEtaEta[40][100][8];
138 TH2D *mHAtSYtDYt[40][100][8];
139 TH2D *mHAtNSYtDYt[40][100][8];
140 TH2D *mHJtDEtaDPhi[40][100][8];
141 TH2D *mHJtNDEtaDPhi[40][100][8];
142 TH2D *mHPrJtDEtaDPhi[40][100][8];
143 TH2D *mHPaJtDEtaDPhi[40][100][8];
144 TH2D *mHPbJtDEtaDPhi[40][100][8];
146 TH2D *mHJtSEtaDPhi[40][100][8];
147 TH2D *mHJtNSEtaDPhi[40][100][8];
148 TH2D *mHPrJtSEtaDPhi[40][100][8];
149 TH2D *mHPaJtSEtaDPhi[40][100][8];
150 TH2D *mHPbJtSEtaDPhi[40][100][8];
152 TH1D *mHQinv[40][100][8];
153 TH1D *mHNQinv[40][100][8];
157 cout <<
"Oops... I declared number of Density bins as less than 40. You have " << nDenBins << endl;
160 TH1D *mHTPCAvgTSep[40][100][8];
161 TH1D *mHTPCAvgZSep[40][100][8];
162 TH1D *mHTPCEntTSep[40][100][8];
163 TH1D *mHTPCEntZSep[40][100][8];
164 TH1D *mHTPCMidTSep[40][100][8];
165 TH1D *mHTPCMidZSep[40][100][8];
166 TH1D *mHTPCExitTSep[40][100][8];
167 TH1D *mHTPCExitZSep[40][100][8];
169 TH1D *mHTPCMidTdptP[40][100][8];
170 TH1D *mHTPCMidTdptN[40][100][8];
171 TH1D *mHTPCMidZdptP[40][100][8];
172 TH1D *mHTPCMidZdptN[40][100][8];
174 TH2D *mHTPCAvgTZ[40][100][8];
175 TH2D *mHTPCEntTZ[40][100][8];
176 TH2D *mHTPCMidTZ[40][100][8];
177 TH2D *mHTPCMidTZC[40][100][8];
178 TH2D *mHTPCMidTZNC[40][100][8];
179 TH2D *mHTPCExitTZ[40][100][8];
180 TH2D *mHTPCEntTdpt[40][100][8];
181 TH2D *mHTPCMidTdpt[40][100][8];
182 TH2D *mHTPCExitTdpt[40][100][8];
184 TFile *out =
new TFile(outFile,
"RECREATE");
187 for (
int jf=0;jf<numFiles;jf++) {
188 cout <<
"Opening input file " << jf << endl;
189 TFile *in =
new TFile(inFile[jf]);
193 in->GetObject(
"EventMixing",tmp);
199 mHmix = (TH1D *) tmp->Clone();
202 in->GetObject(
"hcb",tmp);
208 mHcb = (TH1D *) tmp->Clone();
211 in->GetObject(
"ptAll",tmp);
217 mHptAll = (TH1D *) tmp->Clone();
220 in->GetObject(
"MixedDistance",tmp2);
222 if (mHMixedDistance) {
223 mHMixedDistance->Add(tmp2);
226 mHMixedDistance = (TH2D *) tmp2->Clone();
229 in->GetObject(
"MixedMults",tmp2);
232 mHMixedMults->Add(tmp2);
235 mHMixedMults = (TH2D *) tmp2->Clone();
241 TString histName, outName;
242 for (
int iz=0;iz<nzBin[jf];iz++) {
243 histName =
"NEventsSib_zBuf_"; histName += iz;
244 in->GetObject(histName.Data(),tmp);
246 mHNEventsSib[iz+ozBin[jf]] = (TH1D *) tmp->Clone();
247 outName =
"NEventsSib_zBuf_"; outName += iz+ozBin[jf];
248 mHNEventsSib[iz+ozBin[jf]]->SetName(outName.Data());
250 histName =
"NEventsMix_zBuf_"; histName += iz;
251 in->GetObject(histName.Data(),tmp);
253 mHNEventsMix[iz+ozBin[jf]] = (TH1D *) tmp->Clone();
254 outName =
"NEventsMix_zBuf_"; outName += iz+ozBin[jf];
255 mHNEventsMix[iz+ozBin[jf]]->SetName(outName.Data());
257 histName =
"NEventsPosSib_zBuf_"; histName += iz;
258 in->GetObject(histName.Data(),tmp);
260 mHNEventsPosSib[iz+ozBin[jf]] = (TH1D *) tmp->Clone();
261 outName =
"NEventsPosSib_zBuf_"; outName += iz+ozBin[jf];
262 mHNEventsPosSib[iz+ozBin[jf]]->SetName(outName.Data());
264 histName =
"NEventsPosMix_zBuf_"; histName += iz;
265 in->GetObject(histName.Data(),tmp);
267 mHNEventsPosMix[iz+ozBin[jf]] = (TH1D *) tmp->Clone();
268 outName =
"NEventsPosMix_zBuf_"; outName += iz+ozBin[jf];
269 mHNEventsPosMix[iz+ozBin[jf]]->SetName(outName.Data());
271 histName =
"NEventsNegSib_zBuf_"; histName += iz;
272 in->GetObject(histName.Data(),tmp);
274 mHNEventsNegSib[iz+ozBin[jf]] = (TH1D *) tmp->Clone();
275 outName =
"NEventsNegSib_zBuf_"; outName += iz+ozBin[jf];
276 mHNEventsNegSib[iz+ozBin[jf]]->SetName(outName.Data());
278 histName =
"NEventsNegMix_zBuf_"; histName += iz;
279 in->GetObject(histName.Data(),tmp);
281 mHNEventsNegMix[iz+ozBin[jf]] = (TH1D *) tmp->Clone();
282 outName =
"NEventsNegMix_zBuf_"; outName += iz+ozBin[jf];
283 mHNEventsNegMix[iz+ozBin[jf]]->SetName(outName.Data());
287 for (
int iz=0;iz<nzBin[jf];iz++) {
288 for (
int ip=0;ip<nParentBins;ip++) {
289 histName =
"meanPtP_parentBin"; histName += ip; histName +=
"_zBuf_"; histName += iz;
290 in->GetObject(histName.Data(),tmp);
292 mHMeanPtP[ip][iz+ozBin[jf]] = (TH1D *) tmp->Clone();
293 outName =
"meanPtP_parentBin"; outName += ip; outName +=
"_zBuf_"; outName += iz+ozBin[jf];
294 mHMeanPtP[ip][iz+ozBin[jf]]->SetName(outName.Data());
296 histName =
"meanPtM_parentBin"; histName += ip; histName +=
"_zBuf_"; histName += iz;
297 in->GetObject(histName.Data(),tmp);
299 mHMeanPtM[ip][iz+ozBin[jf]] = (TH1D *) tmp->Clone();
300 outName =
"meanPtM_parentBin"; outName += ip; outName +=
"_zBuf_"; outName += iz+ozBin[jf];
301 mHMeanPtM[ip][iz+ozBin[jf]]->SetName(outName.Data());
303 histName =
"etaP_parentBin"; histName += ip; histName +=
"_zBuf_"; histName += iz;
304 in->GetObject(histName.Data(),tmp);
306 mHEtaP[ip][iz+ozBin[jf]] = (TH1D *) tmp->Clone();
307 outName =
"etaP_parentBin"; outName += ip; outName +=
"_zBuf_"; outName += iz+ozBin[jf];
308 mHEtaP[ip][iz+ozBin[jf]]->SetName(outName.Data());
310 histName =
"etaM_parentBin"; histName += ip; histName +=
"_zBuf_"; histName += iz;
311 in->GetObject(histName.Data(),tmp);
313 mHEtaM[ip][iz+ozBin[jf]] = (TH1D *) tmp->Clone();
314 outName =
"etaM_parentBin"; outName += ip; outName +=
"_zBuf_"; outName += iz+ozBin[jf];
315 mHEtaM[ip][iz+ozBin[jf]]->SetName(outName.Data());
322 char *type[] = {
"Sibpp",
"Sibpm",
"Sibmp",
"Sibmm",
"Mixpp",
"Mixpm",
"Mixmp",
"Mixmm"};
323 for (
int iz=0;iz<nzBin[jf];iz++) {
324 cout <<
"Loop over main histograms: zBin = " << iz << endl;
325 for (
int ic=0;ic<nCutBins;ic++) {
326 for (
int it=0;it<8;it++) {
327 histName = type[it]; histName +=
"YtYt_cutBin_"; histName += ic; histName +=
"_zBuf_"; histName += iz;
328 in->GetObject(histName.Data(),tmp2);
331 mHYtYt[ic][iz+ozBin[jf]][it] = (TH2D *) tmp2->Clone();
332 outName = type[it]; outName +=
"YtYt_cutBin_"; outName += ic; outName +=
"_zBuf_"; outName += iz+ozBin[jf];
333 mHYtYt[ic][iz+ozBin[jf]][it]->SetName(outName.Data());
335 mHYtYt[ic][iz+ozBin[jf]][it] = 0;
338 histName = type[it]; histName +=
"NYtYt_cutBin_"; histName += ic; histName +=
"_zBuf_"; histName += iz;
339 in->GetObject(histName.Data(),tmp2);
342 mHNYtYt[ic][iz+ozBin[jf]][it] = (TH2D *) tmp2->Clone();
343 outName = type[it]; outName +=
"NYtYt_cutBin_"; outName += ic; outName +=
"_zBuf_"; outName += iz+ozBin[jf];
344 mHNYtYt[ic][iz+ozBin[jf]][it]->SetName(outName.Data());
346 mHNYtYt[ic][iz+ozBin[jf]][it] = 0;
348 histName = type[it]; histName +=
"PtPt_cutBin_"; histName += ic; histName +=
"_zBuf_"; histName += iz;
349 in->GetObject(histName.Data(),tmp2);
352 mHPtPt[ic][iz+ozBin[jf]][it] = (TH2D *) tmp2->Clone();
353 outName = type[it]; outName +=
"PtPt_cutBin_"; outName += ic; outName +=
"_zBuf_"; outName += iz+ozBin[jf];
354 mHPtPt[ic][iz+ozBin[jf]][it]->SetName(outName.Data());
356 mHPtPt[ic][iz+ozBin[jf]][it] = 0;
360 histName = type[it]; histName +=
"PhiPhi_cutBin_"; histName += ic; histName +=
"_zBuf_"; histName += iz;
361 in->GetObject(histName.Data(),tmp2);
364 mHPhiPhi[ic][iz+ozBin[jf]][it] = (TH2D *) tmp2->Clone();
365 outName = type[it]; outName +=
"PhiPhi_cutBin_"; outName += ic; outName +=
"_zBuf_"; outName += iz+ozBin[jf];
366 mHPhiPhi[ic][iz+ozBin[jf]][it]->SetName(outName.Data());
368 mHPhiPhi[ic][iz+ozBin[jf]][it] = 0;
371 histName = type[it]; histName +=
"NPhiPhi_cutBin_"; histName += ic; histName +=
"_zBuf_"; histName += iz;
372 in->GetObject(histName.Data(),tmp2);
375 mHNPhiPhi[ic][iz+ozBin[jf]][it] = (TH2D *) tmp2->Clone();
376 outName = type[it]; outName +=
"NPhiPhi_cutBin_"; outName += ic; outName +=
"_zBuf_"; outName += iz+ozBin[jf];
377 mHNPhiPhi[ic][iz+ozBin[jf]][it]->SetName(outName.Data());
379 mHNPhiPhi[ic][iz+ozBin[jf]][it] = 0;
382 histName = type[it]; histName +=
"EtaEta_cutBin_"; histName += ic; histName +=
"_zBuf_"; histName += iz;
383 in->GetObject(histName.Data(),tmp2);
386 mHEtaEta[ic][iz+ozBin[jf]][it] = (TH2D *) tmp2->Clone();
387 outName = type[it]; outName +=
"EtaEta_cutBin_"; outName += ic; outName +=
"_zBuf_"; outName += iz+ozBin[jf];
388 mHEtaEta[ic][iz+ozBin[jf]][it]->SetName(outName.Data());
390 mHEtaEta[ic][iz+ozBin[jf]][it] = 0;
393 histName = type[it]; histName +=
"PrPhiPhi_cutBin_"; histName += ic; histName +=
"_zBuf_"; histName += iz;
394 in->GetObject(histName.Data(),tmp2);
397 mHPrPhiPhi[ic][iz+ozBin[jf]][it] = (TH2D *) tmp2->Clone();
398 outName = type[it]; outName +=
"PrPhiPhi_cutBin_"; outName += ic; outName +=
"_zBuf_"; outName += iz+ozBin[jf];
399 mHPrPhiPhi[ic][iz+ozBin[jf]][it]->SetName(outName.Data());
401 mHPrPhiPhi[ic][iz+ozBin[jf]][it] = 0;
404 histName = type[it]; histName +=
"PrEtaEta_cutBin_"; histName += ic; histName +=
"_zBuf_"; histName += iz;
405 in->GetObject(histName.Data(),tmp2);
408 mHPrEtaEta[ic][iz+ozBin[jf]][it] = (TH2D *) tmp2->Clone();
409 outName = type[it]; outName +=
"PrEtaEta_cutBin_"; outName += ic; outName +=
"_zBuf_"; outName += iz+ozBin[jf];
410 mHPrEtaEta[ic][iz+ozBin[jf]][it]->SetName(outName.Data());
412 mHPrEtaEta[ic][iz+ozBin[jf]][it] = 0;
415 histName = type[it]; histName +=
"PaPhiPhi_cutBin_"; histName += ic; histName +=
"_zBuf_"; histName += iz;
416 in->GetObject(histName.Data(),tmp2);
419 mHPaPhiPhi[ic][iz+ozBin[jf]][it] = (TH2D *) tmp2->Clone();
420 outName = type[it]; outName +=
"PaPhiPhi_cutBin_"; outName += ic; outName +=
"_zBuf_"; outName += iz+ozBin[jf];
421 mHPaPhiPhi[ic][iz+ozBin[jf]][it]->SetName(outName.Data());
423 mHPaPhiPhi[ic][iz+ozBin[jf]][it] = 0;
426 histName = type[it]; histName +=
"PaEtaEta_cutBin_"; histName += ic; histName +=
"_zBuf_"; histName += iz;
427 in->GetObject(histName.Data(),tmp2);
430 mHPaEtaEta[ic][iz+ozBin[jf]][it] = (TH2D *) tmp2->Clone();
431 outName = type[it]; outName +=
"PaEtaEta_cutBin_"; outName += ic; outName +=
"_zBuf_"; outName += iz+ozBin[jf];
432 mHPaEtaEta[ic][iz+ozBin[jf]][it]->SetName(outName.Data());
434 mHPaEtaEta[ic][iz+ozBin[jf]][it] = 0;
437 histName = type[it]; histName +=
"PbPhiPhi_cutBin_"; histName += ic; histName +=
"_zBuf_"; histName += iz;
438 in->GetObject(histName.Data(),tmp2);
441 mHPbPhiPhi[ic][iz+ozBin[jf]][it] = (TH2D *) tmp2->Clone();
442 outName = type[it]; outName +=
"PbPhiPhi_cutBin_"; outName += ic; outName +=
"_zBuf_"; outName += iz+ozBin[jf];
443 mHPbPhiPhi[ic][iz+ozBin[jf]][it]->SetName(outName.Data());
445 mHPbPhiPhi[ic][iz+ozBin[jf]][it] = 0;
448 histName = type[it]; histName +=
"PbEtaEta_cutBin_"; histName += ic; histName +=
"_zBuf_"; histName += iz;
449 in->GetObject(histName.Data(),tmp2);
452 mHPbEtaEta[ic][iz+ozBin[jf]][it] = (TH2D *) tmp2->Clone();
453 outName = type[it]; outName +=
"PbEtaEta_cutBin_"; outName += ic; outName +=
"_zBuf_"; outName += iz+ozBin[jf];
454 mHPbEtaEta[ic][iz+ozBin[jf]][it]->SetName(outName.Data());
456 mHPbEtaEta[ic][iz+ozBin[jf]][it] = 0;
460 histName = type[it]; histName +=
"SYtDYt_cutBin_"; histName += ic; histName +=
"_zBuf_"; histName += iz;
461 in->GetObject(histName.Data(),tmp2);
464 mHAtSYtDYt[ic][iz+ozBin[jf]][it] = (TH2D *) tmp2->Clone();
465 outName = type[it]; outName +=
"SYtDYt_cutBin_"; outName += ic; outName +=
"_zBuf_"; outName += iz+ozBin[jf];
466 mHAtSYtDYt[ic][iz+ozBin[jf]][it]->SetName(outName.Data());
468 mHAtSYtDYt[ic][iz+ozBin[jf]][it] = 0;
471 histName = type[it]; histName +=
"NSYtDYt_cutBin_"; histName += ic; histName +=
"_zBuf_"; histName += iz;
472 in->GetObject(histName.Data(),tmp2);
475 mHAtNSYtDYt[ic][iz+ozBin[jf]][it] = (TH2D *) tmp2->Clone();
476 outName = type[it]; outName +=
"NSYtDYt_cutBin_"; outName += ic; outName +=
"_zBuf_"; outName += iz+ozBin[jf];
477 mHAtNSYtDYt[ic][iz+ozBin[jf]][it]->SetName(outName.Data());
479 mHAtNSYtDYt[ic][iz+ozBin[jf]][it] = 0;
482 histName = type[it]; histName +=
"DEtaDPhiArr_cutBin_"; histName += ic; histName +=
"_zBuf_"; histName += iz;
483 in->GetObject(histName.Data(),tmp2);
486 mHJtDEtaDPhi[ic][iz+ozBin[jf]][it] = (TH2D *) tmp2->Clone();
487 outName = type[it]; outName +=
"DEtaDPhiArr_cutBin_"; outName += ic; outName +=
"_zBuf_"; outName += iz+ozBin[jf];
488 mHJtDEtaDPhi[ic][iz+ozBin[jf]][it]->SetName(outName.Data());
490 mHJtDEtaDPhi[ic][iz+ozBin[jf]][it] = 0;
493 histName = type[it]; histName +=
"NDEtaDPhiArr_cutBin_"; histName += ic; histName +=
"_zBuf_"; histName += iz;
494 in->GetObject(histName.Data(),tmp2);
497 mHJtNDEtaDPhi[ic][iz+ozBin[jf]][it] = (TH2D *) tmp2->Clone();
498 outName = type[it]; outName +=
"NDEtaDPhiArr_cutBin_"; outName += ic; outName +=
"_zBuf_"; outName += iz+ozBin[jf];
499 mHJtNDEtaDPhi[ic][iz+ozBin[jf]][it]->SetName(outName.Data());
501 mHJtNDEtaDPhi[ic][iz+ozBin[jf]][it] = 0;
504 histName = type[it]; histName +=
"PrDEtaDPhiArr_cutBin_"; histName += ic; histName +=
"_zBuf_"; histName += iz;
505 in->GetObject(histName.Data(),tmp2);
508 mHPrJtDEtaDPhi[ic][iz+ozBin[jf]][it] = (TH2D *) tmp2->Clone();
509 outName = type[it]; outName +=
"PrDEtaDPhiArr_cutBin_"; outName += ic; outName +=
"_zBuf_"; outName += iz+ozBin[jf];
510 mHPrJtDEtaDPhi[ic][iz+ozBin[jf]][it]->SetName(outName.Data());
512 mHPrJtDEtaDPhi[ic][iz+ozBin[jf]][it] = 0;
515 histName = type[it]; histName +=
"PaDEtaDPhiArr_cutBin_"; histName += ic; histName +=
"_zBuf_"; histName += iz;
516 in->GetObject(histName.Data(),tmp2);
519 mHPaJtDEtaDPhi[ic][iz+ozBin[jf]][it] = (TH2D *) tmp2->Clone();
520 outName = type[it]; outName +=
"PaDEtaDPhiArr_cutBin_"; outName += ic; outName +=
"_zBuf_"; outName += iz+ozBin[jf];
521 mHPaJtDEtaDPhi[ic][iz+ozBin[jf]][it]->SetName(outName.Data());
523 mHPaJtDEtaDPhi[ic][iz+ozBin[jf]][it] = 0;
526 histName = type[it]; histName +=
"PbDEtaDPhiArr_cutBin_"; histName += ic; histName +=
"_zBuf_"; histName += iz;
527 in->GetObject(histName.Data(),tmp2);
530 mHPbJtDEtaDPhi[ic][iz+ozBin[jf]][it] = (TH2D *) tmp2->Clone();
531 outName = type[it]; outName +=
"PbDEtaDPhiArr_cutBin_"; outName += ic; outName +=
"_zBuf_"; outName += iz+ozBin[jf];
532 mHPbJtDEtaDPhi[ic][iz+ozBin[jf]][it]->SetName(outName.Data());
534 mHPbJtDEtaDPhi[ic][iz+ozBin[jf]][it] = 0;
538 histName = type[it]; histName +=
"SEtaDPhiArr_cutBin_"; histName += ic; histName +=
"_zBuf_"; histName += iz;
539 in->GetObject(histName.Data(),tmp2);
542 mHJtSEtaDPhi[ic][iz+ozBin[jf]][it] = (TH2D *) tmp2->Clone();
543 outName = type[it]; outName +=
"SEtaDPhiArr_cutBin_"; outName += ic; outName +=
"_zBuf_"; outName += iz+ozBin[jf];
544 mHJtSEtaDPhi[ic][iz+ozBin[jf]][it]->SetName(outName.Data());
546 mHJtSEtaDPhi[ic][iz+ozBin[jf]][it] = 0;
549 histName = type[it]; histName +=
"NSEtaDPhiArr_cutBin_"; histName += ic; histName +=
"_zBuf_"; histName += iz;
550 in->GetObject(histName.Data(),tmp2);
553 mHJtNSEtaDPhi[ic][iz+ozBin[jf]][it] = (TH2D *) tmp2->Clone();
554 outName = type[it]; outName +=
"NSEtaDPhiArr_cutBin_"; outName += ic; outName +=
"_zBuf_"; outName += iz+ozBin[jf];
555 mHJtNSEtaDPhi[ic][iz+ozBin[jf]][it]->SetName(outName.Data());
557 mHJtNSEtaDPhi[ic][iz+ozBin[jf]][it] = 0;
560 histName = type[it]; histName +=
"PrSEtaDPhiArr_cutBin_"; histName += ic; histName +=
"_zBuf_"; histName += iz;
561 in->GetObject(histName.Data(),tmp2);
564 mHPrJtSEtaDPhi[ic][iz+ozBin[jf]][it] = (TH2D *) tmp2->Clone();
565 outName = type[it]; outName +=
"PrSEtaDPhiArr_cutBin_"; outName += ic; outName +=
"_zBuf_"; outName += iz+ozBin[jf];
566 mHPrJtSEtaDPhi[ic][iz+ozBin[jf]][it]->SetName(outName.Data());
568 mHPrJtSEtaDPhi[ic][iz+ozBin[jf]][it] = 0;
571 histName = type[it]; histName +=
"PaSEtaDPhiArr_cutBin_"; histName += ic; histName +=
"_zBuf_"; histName += iz;
572 in->GetObject(histName.Data(),tmp2);
575 mHPaJtSEtaDPhi[ic][iz+ozBin[jf]][it] = (TH2D *) tmp2->Clone();
576 outName = type[it]; outName +=
"PaSEtaDPhiArr_cutBin_"; outName += ic; outName +=
"_zBuf_"; outName += iz+ozBin[jf];
577 mHPaJtSEtaDPhi[ic][iz+ozBin[jf]][it]->SetName(outName.Data());
579 mHPaJtSEtaDPhi[ic][iz+ozBin[jf]][it] = 0;
582 histName = type[it]; histName +=
"PbSEtaDPhiArr_cutBin_"; histName += ic; histName +=
"_zBuf_"; histName += iz;
583 in->GetObject(histName.Data(),tmp2);
586 mHPbJtSEtaDPhi[ic][iz+ozBin[jf]][it] = (TH2D *) tmp2->Clone();
587 outName = type[it]; outName +=
"PbSEtaDPhiArr_cutBin_"; outName += ic; outName +=
"_zBuf_"; outName += iz+ozBin[jf];
588 mHPbJtSEtaDPhi[ic][iz+ozBin[jf]][it]->SetName(outName.Data());
590 mHPbJtSEtaDPhi[ic][iz+ozBin[jf]][it] = 0;
594 histName = type[it]; histName +=
"Qinv_cutBin_"; histName += ic; histName +=
"_zBuf_"; histName += iz;
595 in->GetObject(histName.Data(),tmp);
598 mHQinv[ic][iz+ozBin[jf]][it] = (TH1D *) tmp->Clone();
599 outName = type[it]; outName +=
"Qinv_cutBin_"; outName += ic; outName +=
"_zBuf_"; outName += iz+ozBin[jf];
600 mHQinv[ic][iz+ozBin[jf]][it]->SetName(outName.Data());
602 mHQinv[ic][iz+ozBin[jf]][it] = 0;
605 histName = type[it]; histName +=
"NQinv_cutBin_"; histName += ic; histName +=
"_zBuf_"; histName += iz;
606 in->GetObject(histName.Data(),tmp);
609 mHNQinv[ic][iz+ozBin[jf]][it] = (TH1D *) tmp->Clone();
610 outName = type[it]; outName +=
"NQinv_cutBin_"; outName += ic; outName +=
"_zBuf_"; outName += iz+ozBin[jf];
611 mHNQinv[ic][iz+ozBin[jf]][it]->SetName(outName.Data());
613 mHNQinv[ic][iz+ozBin[jf]][it] = 0;
620 char *type[] = {
"Sibpp",
"Sibpm",
"Sibmp",
"Sibmm",
"Mixpp",
"Mixpm",
"Mixmp",
"Mixmm"};
623 for (
int iz=0;iz<nzBin[jf];iz++) {
624 cout <<
"Loop over density histograms: zBin = " << iz << endl;
625 for (
int ic=0;ic<nDenBins;ic++) {
626 for (
int it=0;it<8;it++) {
627 histName = type[it]; histName +=
"TPCAvgTSep_cutBin_"; histName += ic; histName +=
"_zBuf_"; histName += iz;
628 in->GetObject(histName.Data(),tmp2);
630 mHTPCAvgTSep[ic][iz+ozBin[jf]][it] = (TH1D *) tmp2->Clone();
631 outName = type[it]; outName +=
"TPCAvgTSep_cutBin_"; outName += ic; outName +=
"_zBuf_"; outName += iz+ozBin[jf];
632 mHTPCAvgTSep[ic][iz+ozBin[jf]][it]->SetName(outName.Data());
634 histName = type[it]; histName +=
"TPCAvgZSep_cutBin_"; histName += ic; histName +=
"_zBuf_"; histName += iz;
635 in->GetObject(histName.Data(),tmp2);
637 mHTPCAvgZSep[ic][iz+ozBin[jf]][it] = (TH1D *) tmp2->Clone();
638 outName = type[it]; outName +=
"TPCAvgZSep_cutBin_"; outName += ic; outName +=
"_zBuf_"; outName += iz+ozBin[jf];
639 mHTPCAvgZSep[ic][iz+ozBin[jf]][it]->SetName(outName.Data());
641 histName = type[it]; histName +=
"TPCEntTSep_cutBin_"; histName += ic; histName +=
"_zBuf_"; histName += iz;
642 in->GetObject(histName.Data(),tmp2);
644 mHTPCEntTSep[ic][iz+ozBin[jf]][it] = (TH1D *) tmp2->Clone();
645 outName = type[it]; outName +=
"TPCEntTSep_cutBin_"; outName += ic; outName +=
"_zBuf_"; outName += iz+ozBin[jf];
646 mHTPCEntTSep[ic][iz+ozBin[jf]][it]->SetName(outName.Data());
648 histName = type[it]; histName +=
"TPCEntZSep_cutBin_"; histName += ic; histName +=
"_zBuf_"; histName += iz;
649 in->GetObject(histName.Data(),tmp2);
651 mHTPCEntZSep[ic][iz+ozBin[jf]][it] = (TH1D *) tmp2->Clone();
652 outName = type[it]; outName +=
"TPCEntZSep_cutBin_"; outName += ic; outName +=
"_zBuf_"; outName += iz+ozBin[jf];
653 mHTPCEntZSep[ic][iz+ozBin[jf]][it]->SetName(outName.Data());
655 histName = type[it]; histName +=
"TPCMidTSep_cutBin_"; histName += ic; histName +=
"_zBuf_"; histName += iz;
656 in->GetObject(histName.Data(),tmp2);
658 mHTPCMidTSep[ic][iz+ozBin[jf]][it] = (TH1D *) tmp2->Clone();
659 outName = type[it]; outName +=
"TPCMidTSep_cutBin_"; outName += ic; outName +=
"_zBuf_"; outName += iz+ozBin[jf];
660 mHTPCMidTSep[ic][iz+ozBin[jf]][it]->SetName(outName.Data());
662 histName = type[it]; histName +=
"TPCMidZSep_cutBin_"; histName += ic; histName +=
"_zBuf_"; histName += iz;
663 in->GetObject(histName.Data(),tmp2);
665 mHTPCMidZSep[ic][iz+ozBin[jf]][it] = (TH1D *) tmp2->Clone();
666 outName = type[it]; outName +=
"TPCMidZSep_cutBin_"; outName += ic; outName +=
"_zBuf_"; outName += iz+ozBin[jf];
667 mHTPCMidZSep[ic][iz+ozBin[jf]][it]->SetName(outName.Data());
669 histName = type[it]; histName +=
"TPCExitTSep_cutBin_"; histName += ic; histName +=
"_zBuf_"; histName += iz;
670 in->GetObject(histName.Data(),tmp2);
672 mHTPCExitTSep[ic][iz+ozBin[jf]][it] = (TH1D *) tmp2->Clone();
673 outName = type[it]; outName +=
"TPCExitTSep_cutBin_"; outName += ic; outName +=
"_zBuf_"; outName += iz+ozBin[jf];
674 mHTPCExitTSep[ic][iz+ozBin[jf]][it]->SetName(outName.Data());
676 histName = type[it]; histName +=
"TPCExitZSep_cutBin_"; histName += ic; histName +=
"_zBuf_"; histName += iz;
677 in->GetObject(histName.Data(),tmp2);
679 mHTPCExitZSep[ic][iz+ozBin[jf]][it] = (TH1D *) tmp2->Clone();
680 outName = type[it]; outName +=
"TPCExitZSep_cutBin_"; outName += ic; outName +=
"_zBuf_"; outName += iz+ozBin[jf];
681 mHTPCExitZSep[ic][iz+ozBin[jf]][it]->SetName(outName.Data());
684 histName = type[it]; histName +=
"TPCMidTdptP_cutBin_"; histName += ic; histName +=
"_zBuf_"; histName += iz;
685 in->GetObject(histName.Data(),tmp2);
687 mHTPCMidTdptP[ic][iz+ozBin[jf]][it] = (TH1D *) tmp2->Clone();
688 outName = type[it]; outName +=
"TPCMidTdptP_cutBin_"; outName += ic; outName +=
"_zBuf_"; outName += iz+ozBin[jf];
689 mHTPCMidTdptP[ic][iz+ozBin[jf]][it]->SetName(outName.Data());
691 histName = type[it]; histName +=
"TPCMidTdptN_cutBin_"; histName += ic; histName +=
"_zBuf_"; histName += iz;
692 in->GetObject(histName.Data(),tmp2);
694 mHTPCMidTdptN[ic][iz+ozBin[jf]][it] = (TH1D *) tmp2->Clone();
695 outName = type[it]; outName +=
"TPCMidTdptN_cutBin_"; outName += ic; outName +=
"_zBuf_"; outName += iz+ozBin[jf];
696 mHTPCMidTdptN[ic][iz+ozBin[jf]][it]->SetName(outName.Data());
698 histName = type[it]; histName +=
"TPCMidZdptP_cutBin_"; histName += ic; histName +=
"_zBuf_"; histName += iz;
699 in->GetObject(histName.Data(),tmp2);
701 mHTPCMidZdptP[ic][iz+ozBin[jf]][it] = (TH1D *) tmp2->Clone();
702 outName = type[it]; outName +=
"TPCMidZdptP_cutBin_"; outName += ic; outName +=
"_zBuf_"; outName += iz+ozBin[jf];
703 mHTPCMidZdptP[ic][iz+ozBin[jf]][it]->SetName(outName.Data());
705 histName = type[it]; histName +=
"TPCMidZdptN_cutBin_"; histName += ic; histName +=
"_zBuf_"; histName += iz;
706 in->GetObject(histName.Data(),tmp2);
708 mHTPCMidZdptN[ic][iz+ozBin[jf]][it] = (TH1D *) tmp2->Clone();
709 outName = type[it]; outName +=
"TPCMidZdptN_cutBin_"; outName += ic; outName +=
"_zBuf_"; outName += iz+ozBin[jf];
710 mHTPCMidZdptN[ic][iz+ozBin[jf]][it]->SetName(outName.Data());
712 histName = type[it]; histName +=
"TPCAvgTZ_cutBin_"; histName += ic; histName +=
"_zBuf_"; histName += iz;
713 in->GetObject(histName.Data(),tmp2);
715 mHTPCAvgTZ[ic][iz+ozBin[jf]][it] = (TH2D *) tmp2->Clone();
716 outName = type[it]; outName +=
"TPCAvgTZ_cutBin_"; outName += ic; outName +=
"_zBuf_"; outName += iz+ozBin[jf];
717 mHTPCAvgTZ[ic][iz+ozBin[jf]][it]->SetName(outName.Data());
719 histName = type[it]; histName +=
"TPCEntTZ_cutBin_"; histName += ic; histName +=
"_zBuf_"; histName += iz;
720 in->GetObject(histName.Data(),tmp2);
722 mHTPCEntTZ[ic][iz+ozBin[jf]][it] = (TH2D *) tmp2->Clone();
723 outName = type[it]; outName +=
"TPCEntTZ_cutBin_"; outName += ic; outName +=
"_zBuf_"; outName += iz+ozBin[jf];
724 mHTPCEntTZ[ic][iz+ozBin[jf]][it]->SetName(outName.Data());
726 histName = type[it]; histName +=
"TPCMidTZ_cutBin_"; histName += ic; histName +=
"_zBuf_"; histName += iz;
727 in->GetObject(histName.Data(),tmp2);
729 mHTPCMidTZ[ic][iz+ozBin[jf]][it] = (TH2D *) tmp2->Clone();
730 outName = type[it]; outName +=
"TPCMidTZ_cutBin_"; outName += ic; outName +=
"_zBuf_"; outName += iz+ozBin[jf];
731 mHTPCMidTZ[ic][iz+ozBin[jf]][it]->SetName(outName.Data());
733 histName = type[it]; histName +=
"TPCMidTZC_cutBin_"; histName += ic; histName +=
"_zBuf_"; histName += iz;
734 in->GetObject(histName.Data(),tmp2);
736 mHTPCMidTZC[ic][iz+ozBin[jf]][it] = (TH2D *) tmp2->Clone();
737 outName = type[it]; outName +=
"TPCMidTZC_cutBin_"; outName += ic; outName +=
"_zBuf_"; outName += iz+ozBin[jf];
738 mHTPCMidTZC[ic][iz+ozBin[jf]][it]->SetName(outName.Data());
740 histName = type[it]; histName +=
"TPCMidTZNC_cutBin_"; histName += ic; histName +=
"_zBuf_"; histName += iz;
741 in->GetObject(histName.Data(),tmp2);
743 mHTPCMidTZNC[ic][iz+ozBin[jf]][it] = (TH2D *) tmp2->Clone();
744 outName = type[it]; outName +=
"TPCMidTZNC_cutBin_"; outName += ic; outName +=
"_zBuf_"; outName += iz+ozBin[jf];
745 mHTPCMidTZNC[ic][iz+ozBin[jf]][it]->SetName(outName.Data());
747 histName = type[it]; histName +=
"TPCExitTZ_cutBin_"; histName += ic; histName +=
"_zBuf_"; histName += iz;
748 in->GetObject(histName.Data(),tmp2);
750 mHTPCExitTZ[ic][iz+ozBin[jf]][it] = (TH2D *) tmp2->Clone();
751 outName = type[it]; outName +=
"TPCExitTZ_cutBin_"; outName += ic; outName +=
"_zBuf_"; outName += iz+ozBin[jf];
752 mHTPCExitTZ[ic][iz+ozBin[jf]][it]->SetName(outName.Data());
754 histName = type[it]; histName +=
"TPCEntTdpt_cutBin_"; histName += ic; histName +=
"_zBuf_"; histName += iz;
755 in->GetObject(histName.Data(),tmp2);
757 mHTPCEntTdpt[ic][iz+ozBin[jf]][it] = (TH2D *) tmp2->Clone();
758 outName = type[it]; outName +=
"TPCEntTdpt_cutBin_"; outName += ic; outName +=
"_zBuf_"; outName += iz+ozBin[jf];
759 mHTPCEntTdpt[ic][iz+ozBin[jf]][it]->SetName(outName.Data());
761 histName = type[it]; histName +=
"TPCMidTdpt_cutBin_"; histName += ic; histName +=
"_zBuf_"; histName += iz;
762 in->GetObject(histName.Data(),tmp2);
764 mHTPCMidTdpt[ic][iz+ozBin[jf]][it] = (TH2D *) tmp2->Clone();
765 outName = type[it]; outName +=
"TPCMidTdpt_cutBin_"; outName += ic; outName +=
"_zBuf_"; outName += iz+ozBin[jf];
766 mHTPCMidTdpt[ic][iz+ozBin[jf]][it]->SetName(outName.Data());
768 histName = type[it]; histName +=
"TPCExitTdpt_cutBin_"; histName += ic; histName +=
"_zBuf_"; histName += iz;
769 in->GetObject(histName.Data(),tmp2);
771 mHTPCExitTdpt[ic][iz+ozBin[jf]][it] = (TH2D *) tmp2->Clone();
772 outName = type[it]; outName +=
"TPCExitTdpt_cutBin_"; outName += ic; outName +=
"_zBuf_"; outName += iz+ozBin[jf];
773 mHTPCExitTdpt[ic][iz+ozBin[jf]][it]->SetName(outName.Data());
777 cout <<
"Closing input file " << jf << endl;
795 if (mHMixedDistance) {
796 mHMixedDistance->Write();
799 mHMixedMults->Write();
802 for (
int iz=0;iz<nTotZBins;iz++) {
803 mHNEventsSib[iz]->Write();
804 mHNEventsMix[iz]->Write();
805 mHNEventsPosSib[iz]->Write();
806 mHNEventsPosMix[iz]->Write();
807 mHNEventsNegSib[iz]->Write();
808 mHNEventsNegMix[iz]->Write();
810 for (
int ip=0;ip<nParentBins;ip++) {
811 mHMeanPtP[ip][iz]->Write();
812 mHMeanPtM[ip][iz]->Write();
813 mHEtaP[ip][iz]->Write();
814 mHEtaM[ip][iz]->Write();
817 for (
int ic=0;ic<nCutBins;ic++) {
818 for (
int it=0;it<8;it++) {
819 if (mHYtYt[ic][iz][it]) mHYtYt[ic][iz][it]->Write();
820 if (mHNYtYt[ic][iz][it]) mHNYtYt[ic][iz][it]->Write();
821 if (mHPtPt[ic][iz][it]) mHPtPt[ic][iz][it]->Write();
823 if (mHPhiPhi[ic][iz][it]) mHPhiPhi[ic][iz][it]->Write();
824 if (mHNPhiPhi[ic][iz][it]) mHNPhiPhi[ic][iz][it]->Write();
825 if (mHEtaEta[ic][iz][it]) mHEtaEta[ic][iz][it]->Write();
826 if (mHPrPhiPhi[ic][iz][it]) mHPrPhiPhi[ic][iz][it]->Write();
827 if (mHPrEtaEta[ic][iz][it]) mHPrEtaEta[ic][iz][it]->Write();
828 if (mHPaPhiPhi[ic][iz][it]) mHPaPhiPhi[ic][iz][it]->Write();
829 if (mHPaEtaEta[ic][iz][it]) mHPaEtaEta[ic][iz][it]->Write();
830 if (mHPbPhiPhi[ic][iz][it]) mHPbPhiPhi[ic][iz][it]->Write();
831 if (mHPbEtaEta[ic][iz][it]) mHPbEtaEta[ic][iz][it]->Write();
833 if (mHAtSYtDYt[ic][iz][it]) mHAtSYtDYt[ic][iz][it]->Write();
834 if (mHAtNSYtDYt[ic][iz][it]) mHAtNSYtDYt[ic][iz][it]->Write();
835 if (mHJtDEtaDPhi[ic][iz][it]) mHJtDEtaDPhi[ic][iz][it]->Write();
836 if (mHJtNDEtaDPhi[ic][iz][it]) mHJtNDEtaDPhi[ic][iz][it]->Write();
837 if (mHPrJtDEtaDPhi[ic][iz][it]) mHPrJtDEtaDPhi[ic][iz][it]->Write();
838 if (mHPaJtDEtaDPhi[ic][iz][it]) mHPaJtDEtaDPhi[ic][iz][it]->Write();
839 if (mHPbJtDEtaDPhi[ic][iz][it]) mHPbJtDEtaDPhi[ic][iz][it]->Write();
841 if (mHJtSEtaDPhi[ic][iz][it]) mHJtSEtaDPhi[ic][iz][it]->Write();
842 if (mHJtNSEtaDPhi[ic][iz][it]) mHJtNSEtaDPhi[ic][iz][it]->Write();
843 if (mHPrJtSEtaDPhi[ic][iz][it]) mHPrJtSEtaDPhi[ic][iz][it]->Write();
844 if (mHPaJtSEtaDPhi[ic][iz][it]) mHPaJtSEtaDPhi[ic][iz][it]->Write();
845 if (mHPbJtSEtaDPhi[ic][iz][it]) mHPbJtSEtaDPhi[ic][iz][it]->Write();
847 if (mHQinv[ic][iz][it]) mHQinv[ic][iz][it]->Write();
848 if (mHNQinv[ic][iz][it]) mHNQinv[ic][iz][it]->Write();
852 for (
int ic=0;ic<nDenBins;ic++) {
853 for (
int it=0;it<8;it++) {
854 mHTPCAvgTSep[ic][iz][it]->Write();
855 mHTPCAvgZSep[ic][iz][it]->Write();
856 mHTPCEntTSep[ic][iz][it]->Write();
857 mHTPCEntZSep[ic][iz][it]->Write();
858 mHTPCMidTSep[ic][iz][it]->Write();
859 mHTPCMidZSep[ic][iz][it]->Write();
860 mHTPCExitTSep[ic][iz][it]->Write();
861 mHTPCExitZSep[ic][iz][it]->Write();
863 mHTPCMidTdptP[ic][iz][it]->Write();
864 mHTPCMidTdptN[ic][iz][it]->Write();
865 mHTPCMidZdptP[ic][iz][it]->Write();
866 mHTPCMidZdptN[ic][iz][it]->Write();
868 mHTPCAvgTZ[ic][iz][it]->Write();
869 mHTPCEntTZ[ic][iz][it]->Write();
870 mHTPCMidTZ[ic][iz][it]->Write();
871 mHTPCMidTZC[ic][iz][it]->Write();
872 mHTPCMidTZNC[ic][iz][it]->Write();
873 mHTPCExitTZ[ic][iz][it]->Write();
874 mHTPCEntTdpt[ic][iz][it]->Write();
875 mHTPCMidTdpt[ic][iz][it]->Write();
876 mHTPCExitTdpt[ic][iz][it]->Write();