AliPhysics  aaf9c62 (aaf9c62)
DrawPtHardBins.C
Go to the documentation of this file.
1 
31 //---------------------------------------------------------
32 // Set includes and declare methods for compilation
33 
34 #if !defined(__CINT__) || defined(__MAKECINT__)
35 
36 #include "TString.h"
37 #include "TH1F.h"
38 #include "TH2F.h"
39 #include "TFile.h"
40 #include "TCanvas.h"
41 #include "TPad.h"
42 #include "TStyle.h"
43 #include "TLine.h"
44 #include "TLegend.h"
45 #include "TMath.h"
46 #include "TGaxis.h"
47 #include "TLine.h"
48 
49 #endif
50 
61 //_______________________________________________________________________
62 void DrawPtHardBins
63 (
64  Int_t minE = 1,
65  Int_t maxE = 70,
66  const Int_t nBin = 20,
67  Int_t firstBin = 1,
68  Bool_t scaleHisto = kFALSE
69  )
70 {
71  TH1F * hNEvents;
72  TH1F * hXsec;
73  TH1F * hTrials;
74 
75  TH1F * hPtHard[nBin][2];
76  TH1F * hPtHardSum[2];
77 
78  TH1F * hCent[nBin][2];
79  TH1F * hCentSum[2];
80 
81  TH1F * hClusterE[nBin][2];
82  TH1F * hClusterESum[2];
83 
84  TH1F * hClusterD[nBin][2];
85  TH1F * hClusterDSum[2];
86 
87  TH1F * hTrackPt[nBin][2][3];
88  TH1F * hTrackPtSum[2][3];
89 
90  TH1F * hPi0[nBin][2];
91  TH1F * hPi0Sum[2];
92 
93  TH1F * hPi0E[nBin][2];
94  TH1F * hPi0ESum[2];
95 
96  TH1F * hPi0D[nBin][2];
97  TH1F * hPi0DSum[2];
98 
99  TH1F * hGam[nBin][2];
100  TH1F * hGamSum[2];
101 
102  TH1F * hGamE[nBin][2];
103  TH1F * hGamESum[2];
104 
105  TH1F * hGamD[nBin][2];
106  TH1F * hGamDSum[2];
107 
108  TH2F * hEtaPhi [nBin][2];
109  TH2F * hCellEtaPhi [nBin][2];
110  TH2F * hTrackEtaPhi[nBin][2];
111 
112  const Int_t nCent = 10;
113  TString cenLegend[] = {"0-10%","10-20%","20-30%","30-40%","40-50%","50-60%","60-70%","70-80%","80-90%","90-100%"};
114  TH2F * hIMEMCal[nBin][2][nCent];
115  TH2F * hIMDCal [nBin][2][nCent];
116 
117  TH2F * hEtaPhiSum [2];
118  TH2F * hCellEtaPhiSum [2];
119  TH2F * hTrackEtaPhiSum[2];
120 
121  TH2F * hIMEMCalSum[2][nCent];
122  TH2F * hIMDCalSum [2][nCent];
123 
124  TH2F* hTrackPhiGlobal[nBin][2];
125  TH2F* hTrackPhiNoSPD [nBin][2];
126 
127  TH2F* hTrackPhiGlobalSum[2];
128  TH2F* hTrackPhiNoSPDSum [2];
129 
130  TFile * f[nBin][2];
131  TFile * fTot [2];
132 
133  Int_t color[] =
134  { kRed -3, kRed, kRed +3, kBlue -3, kBlue, kBlue +3, kGreen -3, kGreen , kGreen +3,
135  kViolet-3, kViolet, kViolet+3, kOrange-3, kOrange, kOrange+3, kYellow-3, kYellow, kYellow+3,
136  kMagenta-3, kMagenta,kMagenta+3};
137 
138  Double_t scale[nBin];
139 
140  for(Int_t k = 0; k < 2; k++)
141  {
142  if ( k==1 ) fTot[k] = TFile::Open("Scaled.root" ,"read");
143  else fTot[k] = TFile::Open("NotScaled.root","read");
144 
145  for(Int_t i = 0; i < nBin; i++)
146  {
147  if ( k==1 ) f[i][k] = TFile::Open(Form("%d/ScaledMerged.root" ,i+firstBin),"read");
148  else f[i][k] = TFile::Open(Form("%d/NotScaledMerged.root",i+firstBin),"read");
149 
150  if(!f[i][k]) continue;
151 
152  //printf("i %d, k %d, f %p\n",i,k,f[i][k]);
153 
154  hPtHard[i][k] = (TH1F*) f[i][k]->Get("hPtHard");
155  if(hPtHard[i][k])
156  {
157  hPtHard[i][k]->SetLineColor(color[i]);
158  hPtHard[i][k]->SetLineWidth(2);
159  //hPtHard[i][k]->SetAxisRange(minE, maxE,"X");
160  }
161 
162  hCent[i][k] = (TH1F*) f[i][k]->Get("hCentrality");
163  if(hCent[i][k])
164  {
165  hCent[i][k]->SetLineColor(color[i]);
166  hCent[i][k]->SetLineWidth(2);
167  //hCent[i][k]->SetAxisRange(minE, maxE,"X");
168  }
169 
170  // Recover scaling parameters
171  if ( k==0 )
172  {
173  hNEvents = (TH1F*) f[i][k]->Get("hNEvents");
174  hXsec = (TH1F*) f[i][k]->Get("hXsec");
175  hTrials = (TH1F*) f[i][k]->Get("hTrials");
176 
177  if(hXsec)
178  {
179  scale[i] = (hXsec->GetBinContent(1)/hXsec->GetEntries()) /
180  (hTrials->GetBinContent(1)/ hNEvents->GetBinContent(1)) / hNEvents->GetBinContent(1);
181  // hXsec->GetBinContent(1)/hTrials->GetBinContent(1);
182  // 1. / hNEvents->GetBinContent(1);
183  // 1./ hPtHard[i][k]->GetEntries();
184  // hXsec->GetBinContent(1)/hTrials->GetBinContent(1)/hPtHard[i][k]->GetEntries();
185 
186  printf("bin i %d, events %2.3e, pT hard entries %2.3e (fraction of pT hard %2.4f),"
187  "chunks %2.0f, xsec %2.3e, trails %2.0f, xsec/chunks %2.3e, trials/nevents %2.3e, scale %2.3e \n",
188  i, hNEvents->GetBinContent(1),hPtHard[i][k]->GetEntries(), hPtHard[i][k]->GetEntries()/hNEvents->GetBinContent(1),
189  hXsec->GetEntries(), hXsec->GetBinContent(1), hTrials->GetBinContent(1),
190  hXsec->GetBinContent(1)/hXsec->GetEntries(),hTrials->GetBinContent(1)/ hNEvents->GetBinContent(1), scale[i] );
191  }
192  else
193  {
194  scale[i] = 1./ hNEvents->GetBinContent(1);
195  }
196  }
197 
198 
199  hClusterE[i][k] = (TH1F*) f[i][k]->Get("AnaPhoton_Calo0_hEPhoton");
200  hClusterE[i][k]->SetLineColor(color[i]);
201  hClusterE[i][k]->SetLineWidth(2);
202  hClusterE[i][k]->SetAxisRange(minE, maxE,"X");
203 
204  hClusterD[i][k] = (TH1F*) f[i][k]->Get("AnaPhoton_Calo1_hEPhoton");
205  if(hClusterD[i][k])
206  {
207  hClusterD[i][k]->SetLineColor(color[i]);
208  hClusterD[i][k]->SetLineWidth(2);
209  hClusterD[i][k]->SetAxisRange(minE, maxE,"X");
210  }
211 
212  for(Int_t j=0; j<3; j++)
213  {
214  if(!hTrackPt[i][k][j]) continue;
215  if(j==0) hTrackPt[i][k][j] = (TH1F*) f[i][k]->Get("AnaHadrons_hPt");
216  if(j==1) hTrackPt[i][k][j] = (TH1F*) f[i][k]->Get("AnaHadrons_hPtSPDRefit");
217  if(j==2) hTrackPt[i][k][j] = (TH1F*) f[i][k]->Get("AnaHadrons_hPtNoSPDRefit");
218  hTrackPt[i][k][j]->SetLineColor(color[i]);
219  hTrackPt[i][k][j]->SetLineWidth(2);
220  hTrackPt[i][k][j]->SetLineStyle(j);
221  hTrackPt[i][k][j]->SetAxisRange(minE, maxE,"X");
222  }
223 
224  hPi0[i][k] = (TH1F*) f[i][k]->Get("AnaPi0_Calo0_hPrimPi0Pt");
225  if(hPi0[i][k])
226  {
227  hPi0[i][k]->SetLineColor(color[i]);
228  hPi0[i][k]->SetLineWidth(2);
229  hPi0[i][k]->SetAxisRange(minE, maxE,"X");
230  }
231 
232  hPi0E[i][k] = (TH1F*) f[i][k]->Get("AnaPi0_Calo0_hPrimPi0PtInCalo");
233  if(hPi0E[i][k])
234  {
235  hPi0E[i][k]->SetLineColor(color[i]);
236  hPi0E[i][k]->SetLineWidth(2);
237  hPi0E[i][k]->SetAxisRange(minE, maxE,"X");
238  }
239 
240  hPi0D[i][k] = (TH1F*) f[i][k]->Get("AnaPi0_Calo1_hPrimPi0PtInCalo");
241  if(hPi0D[i][k])
242  {
243  hPi0D[i][k]->SetLineColor(color[i]);
244  hPi0D[i][k]->SetLineWidth(2);
245  hPi0D[i][k]->SetAxisRange(minE, maxE,"X");
246  }
247 
248  hGam[i][k] = (TH1F*) f[i][k]->Get("AnaPhoton_Calo0_hPtPrim_MCPhoton");
249  if(hGam[i][k])
250  {
251  hGam[i][k]->SetLineColor(color[i]);
252  hGam[i][k]->SetLineWidth(2);
253  hGam[i][k]->SetAxisRange(minE, maxE,"X");
254  }
255 
256  hGamE[i][k] = (TH1F*) f[i][k]->Get("AnaPhoton_Calo0_hPtPrimAcc_MCPhoton");
257  if(hGamE[i][k])
258  {
259  hGamE[i][k]->SetLineColor(color[i]);
260  hGamE[i][k]->SetLineWidth(2);
261  hGamE[i][k]->SetAxisRange(minE, maxE,"X");
262  }
263 
264  hGamD[i][k] = (TH1F*) f[i][k]->Get("AnaPhoton_Calo1_hPtPrimAcc_MCPhoton");
265  if(hGamD[i][k])
266  {
267  hGamD[i][k]->SetLineColor(color[i]);
268  hGamD[i][k]->SetLineWidth(2);
269  hGamD[i][k]->SetAxisRange(minE, maxE,"X");
270  }
271 
272  for(Int_t icent = 0; icent < nCent; icent++)
273  {
274  hIMEMCal[i][k][icent] = (TH2F*) f[i][k]->Get(Form("AnaPi0_Calo0_hRe_cen%d_pidbit0_asy0_dist1",icent));
275  hIMDCal [i][k][icent] = (TH2F*) f[i][k]->Get(Form("AnaPi0_Calo1_hRe_cen%d_pidbit0_asy0_dist1",icent));
276  }
277 
278  hTrackPhiGlobal[i][k] = (TH2F*) f[i][k]->Get("AnaHadrons_hEtaPhiSPDRefitPt02");
279  hTrackPhiNoSPD [i][k] = (TH2F*) f[i][k]->Get("AnaHadrons_hEtaPhiNoSPDRefitPt02");
280 
281  hEtaPhi [i][k] = (TH2F*) f[i][k]->Get("hEMCALReaderEtaPhi");
282  hCellEtaPhi [i][k] = (TH2F*) f[i][k]->Get("QA_Cell_hGridCells");
283  hTrackEtaPhi[i][k] = (TH2F*) f[i][k]->Get("AnaHadrons_hEtaPhiNegative");
284  hTrackEtaPhi[i][k]->Add((TH2F*) f[i][k]->Get("AnaHadrons_hEtaPhiPositive"));
285 
286  if(k==0)
287  {
288  if(hPtHard [i][k]) hPtHard [i][k]->Sumw2();
289  if(hCent [i][k]) hCent [i][k]->Sumw2();
290  hClusterE[i][k]->Sumw2();
291  if(hClusterD[i][k]) hClusterD[i][k]->Sumw2();
292 
293  if(hPi0 [i][k]) hPi0 [i][k]->Sumw2();
294  if(hPi0E[i][k]) hPi0E[i][k]->Sumw2();
295  if(hPi0D[i][k]) hPi0D[i][k]->Sumw2();
296  if(hGam [i][k]) hGam [i][k]->Sumw2();
297  if(hGamE[i][k]) hGamE[i][k]->Sumw2();
298  if(hGamD[i][k]) hGamD[i][k]->Sumw2();
299 
300  for(Int_t j = 0; j < 3; j++)
301  {
302  if(hTrackPt[i][k][j])hTrackPt[i][k][j]->Sumw2();
303  }
304 
305  //hEtaPhi [i][k]->Sumw2();
306  //hCellEtaPhi [i][k]->Sumw2();
307  //hTrackEtaPhi[i][k]->Sumw2();
308 
309  for(Int_t icent = 0; icent < nCent; icent++)
310  {
311  if(hIMEMCal[i][k][icent]) hIMEMCal[i][k][icent]->Sumw2();
312  if(hIMDCal [i][k][icent]) hIMDCal [i][k][icent]->Sumw2();
313  }
314 
315  hTrackPhiNoSPD [i][k]->Sumw2();
316  hTrackPhiGlobal[i][k]->Sumw2();
317  }
318 
319  // Recover the summed histograms, or scale sum
320  if ( k==1 || (k==0 && !scaleHisto))
321  {
322  hPtHardSum[k] = (TH1F*) fTot[k]->Get("hPtHard");
323  if(hPtHardSum[k])
324  {
325  hPtHardSum[k]->SetLineColor(1);
326  hPtHardSum[k]->SetLineWidth(2);
327  //hPtHardSum[k]->SetAxisRange(minE, maxE,"X");
328  }
329 
330  hCentSum[k] = (TH1F*) fTot[k]->Get("hCentrality");
331  if(hCentSum[k])
332  {
333  hCentSum[k]->SetLineColor(1);
334  hCentSum[k]->SetLineWidth(2);
335  //hCentSum[k]->SetAxisRange(minE, maxE,"X");
336  }
337 
338  hClusterESum[k] = (TH1F*) fTot[k]->Get("AnaPhoton_Calo0_hEPhoton");
339  hClusterESum[k]->SetLineColor(1);
340  hClusterESum[k]->SetLineWidth(2);
341  hClusterESum[k]->SetAxisRange(minE, maxE,"X");
342 
343  hClusterDSum[k] = (TH1F*) fTot[k]->Get("AnaPhoton_Calo1_hEPhoton");
344  if(hClusterDSum[k])
345  {
346  hClusterDSum[k]->SetLineColor(1);
347  hClusterDSum[k]->SetLineWidth(2);
348  hClusterDSum[k]->SetAxisRange(minE, maxE,"X");
349  }
350 
351  for(Int_t j = 0; j < 3; j++)
352  {
353  if(j==0) hTrackPtSum[k][j] = (TH1F*) fTot[k]->Get("AnaHadrons_hPt");
354  if(j==1) hTrackPtSum[k][j] = (TH1F*) fTot[k]->Get("AnaHadrons_hPtSPDRefit");
355  if(j==2) hTrackPtSum[k][j] = (TH1F*) fTot[k]->Get("AnaHadrons_hPtNoSPDRefit");
356 
357  if(!hTrackPtSum[k][j]) continue;
358 
359  hTrackPtSum[k][j]->SetLineColor(1);
360  hTrackPtSum[k][j]->SetLineWidth(2);
361  hTrackPtSum[k][j]->SetLineStyle(j);
362  hTrackPtSum[k][j]->SetAxisRange(minE, maxE,"X");
363  }
364 
365  hPi0Sum[k] = (TH1F*) fTot[k]->Get("AnaPi0_Calo0_hPrimPi0Pt");
366  if(hPi0Sum[k])
367  {
368  hPi0Sum[k]->SetLineColor(1);
369  hPi0Sum[k]->SetLineWidth(2);
370  hPi0Sum[k]->SetAxisRange(minE, maxE,"X");
371  }
372 
373  hPi0ESum[k] = (TH1F*) fTot[k]->Get("AnaPi0_Calo0_hPrimPi0PtInCalo");
374  if(hPi0ESum[k])
375  {
376  hPi0ESum[k]->SetLineColor(1);
377  hPi0ESum[k]->SetLineWidth(2);
378  hPi0ESum[k]->SetAxisRange(minE, maxE,"X");
379  }
380 
381  hPi0DSum[k] = (TH1F*) fTot[k]->Get("AnaPi0_Calo1_hPrimPi0PtInCalo");
382  if(hPi0DSum[k])
383  {
384  hPi0DSum[k]->SetLineColor(1);
385  hPi0DSum[k]->SetLineWidth(2);
386  hPi0DSum[k]->SetAxisRange(minE, maxE,"X");
387  }
388 
389  hGamSum[k] = (TH1F*) fTot[k]->Get("AnaPhoton_Calo0_hPtPrim_MCPhoton");
390  if(hGamSum[k])
391  {
392  hGamSum[k]->SetLineColor(1);
393  hGamSum[k]->SetLineWidth(2);
394  hGamSum[k]->SetAxisRange(minE, maxE,"X");
395  }
396 
397  hGamESum[k] = (TH1F*) fTot[k]->Get("AnaPhoton_Calo0_hPtPrimAcc_MCPhoton");
398  if(hGamESum[k])
399  {
400  hGamESum[k]->SetLineColor(1);
401  hGamESum[k]->SetLineWidth(2);
402  hGamESum[k]->SetAxisRange(minE, maxE,"X");
403  }
404 
405  hGamDSum[k] = (TH1F*) fTot[k]->Get("AnaPhoton_Calo1_hPtPrimAcc_MCPhoton");
406  if(hGamDSum[k])
407  {
408  hGamDSum[k]->SetLineColor(1);
409  hGamDSum[k]->SetLineWidth(2);
410  hGamDSum[k]->SetAxisRange(minE, maxE,"X");
411  }
412 
413  for(Int_t icent = 0; icent < nCent; icent++)
414  {
415  hIMEMCalSum[k][icent] = (TH2F*) fTot[k]->Get(Form("AnaPi0_Calo0_hRe_cen%d_pidbit0_asy0_dist1",icent));
416  hIMDCalSum [k][icent] = (TH2F*) fTot[k]->Get(Form("AnaPi0_Calo1_hRe_cen%d_pidbit0_asy0_dist1",icent));
417  }
418 
419  hTrackPhiGlobalSum[k] = (TH2F*) fTot[k]->Get("AnaHadrons_hEtaPhiSPDRefitPt02");
420  hTrackPhiNoSPDSum [k] = (TH2F*) fTot[k]->Get("AnaHadrons_hEtaPhiNoSPDRefitPt02");
421 
422  hEtaPhiSum [k] = (TH2F*) fTot[k]->Get("hEMCALReaderEtaPhi");
423  hCellEtaPhiSum [k] = (TH2F*) fTot[k]->Get("QA_Cell_hGridCells");
424  hTrackEtaPhiSum[k] = (TH2F*) fTot[k]->Get("AnaHadrons_hEtaPhiNegative");
425  hTrackEtaPhiSum[k]->Add((TH2F*) fTot[k]->Get("AnaHadrons_hEtaPhiPositive"));
426 
427 // if(k==0)
428 // {
429 // hPtHardSum [k]->Sumw2();
430 // hClusterESum[k]->Sumw2();
431 // hClusterDSum[k]->Sumw2();
432 // hPi0Sum [k]->Sumw2();
433 // hPi0ESum [k]->Sumw2();
434 // if(hPi0DSum[k])hPi0DSum[k]->Sumw2();
435 // hGamSum [k]->Sumw2();
436 // hGamESum [k]->Sumw2();
437 // if(hGamDSum[k])hGamDSum[k]->Sumw2();
438 // for(Int_t j = 0; j < 3; j++) hTrackPtSum[k][j]->Sumw2();
439 // //hEtaPhiSum [k]->Sumw2();
440 // //hCellEtaPhiSum [k]->Sumw2();
441 // //hTrackEtaPhiSum[k]->Sumw2();
442 // hIMEMCalSum [k]->Sumw2();
443 // if(hIMDCalSum[k])hIMDCalSum[k]->Sumw2();
444 // hTrackPhiNoSPDSum [k]->Sumw2();
445 // hTrackPhiGlobalSum[k]->Sumw2();
446 // }
447 
448  }
449  // Scaler and merge
450  else if ( scaleHisto && k == 0 )
451  {
452  if(hPtHard [i][k])hPtHard[i][k]->Scale(scale[i]);
453  if(hCent [i][k])hCent [i][k]->Scale(scale[i]);
454  hClusterE[i][k]->Scale(scale[i]);
455  if(hClusterD[i][k])hClusterD[i][k]->Scale(scale[i]);
456 
457  if(hPi0 [i][k])hPi0 [i][k]->Scale(scale[i]);
458  if(hPi0E[i][k])hPi0E[i][k]->Scale(scale[i]);
459  if(hPi0D[i][k])hPi0D[i][k]->Scale(scale[i]);
460  if(hGam [i][k])hGam [i][k]->Scale(scale[i]);
461  if(hGamE[i][k])hGamE[i][k]->Scale(scale[i]);
462  if(hGamD[i][k])hGamD[i][k]->Scale(scale[i]);
463 
464  for(Int_t j = 0; j < 3; j++) hTrackPt[i][k][j]->Scale(scale[i]);
465 
466  hEtaPhi [i][k]->Scale(scale[i]);
467  hCellEtaPhi [i][k]->Scale(scale[i]);
468  hTrackEtaPhi[i][k]->Scale(scale[i]);
469 
470  for(Int_t icent = 0; icent < nCent; icent++)
471  {
472  if(hIMEMCal[i][k][icent]) hIMEMCal[i][k][icent]->Scale(scale[i]);
473  if(hIMDCal [i][k][icent]) hIMDCal [i][k][icent]->Scale(scale[i]);
474  }
475 
476  hTrackPhiNoSPD [i][k]->Scale(scale[i]);
477  hTrackPhiGlobal[i][k]->Scale(scale[i]);
478 
479  if ( i == 0 )
480  {
481  if(hPtHardSum[k])
482  {
483  hPtHardSum[k] = (TH1F*) hPtHard[i][k]->Clone("hPtHardSum");
484  hPtHardSum[k]->SetLineColor(1);
485  }
486 
487  if(hCentSum[k])
488  {
489  hCentSum[k] = (TH1F*) hPtHard[i][k]->Clone("hCentSum");
490  hCentSum[k]->SetLineColor(1);
491  }
492 
493  hClusterESum[k] = (TH1F*) hClusterE[i][k]->Clone("hClusterESum");
494  hClusterESum[k]->SetLineColor(1);
495 
496  hClusterDSum[k] = (TH1F*) hClusterD[i][k]->Clone("hClusterDSum");
497  if(hClusterDSum[k])hClusterDSum[k]->SetLineColor(1);
498 
499  hPi0Sum [k] = (TH1F*) hPi0 [i][k]->Clone("hPi0Sum");
500  if(hPi0Sum[k])hPi0Sum [k]->SetLineColor(1);
501 
502  hPi0ESum[k] = (TH1F*) hPi0E[i][k]->Clone("hPi0ESum");
503  if(hPi0ESum[k])hPi0ESum[k]->SetLineColor(1);
504 
505  hPi0DSum[k] = (TH1F*) hPi0D[i][k]->Clone("hPi0DSum");
506  if(hPi0DSum[k])hPi0DSum[k]->SetLineColor(1);
507 
508  hGamSum [k] = (TH1F*) hPi0 [i][k]->Clone("hGamSum");
509  if(hGamSum[k])hGamSum [k]->SetLineColor(1);
510 
511  hGamESum[k] = (TH1F*) hPi0E[i][k]->Clone("hGamESum");
512  if(hGamESum[k])hGamESum[k]->SetLineColor(1);
513 
514  hGamDSum[k] = (TH1F*) hPi0D[i][k]->Clone("hGamDSum");
515  if(hGamDSum[k])hGamDSum[k]->SetLineColor(1);
516 
517  for(Int_t j = 0; j < 3; j++)
518  {
519  if(!hTrackPtSum[k][j]) continue;
520  hTrackPtSum[k][j] = (TH1F*) hTrackPt[i][k][j]->Clone(Form("%sSum",hTrackPt[i][k][j]->GetName()));
521  hTrackPtSum[k][j]->SetLineColor(1);
522  }
523 
524  hEtaPhiSum [k] = (TH2F*) hEtaPhi [i][k]->Clone("hEtaPhiSum");
525  hCellEtaPhiSum [k] = (TH2F*) hEtaPhi [i][k]->Clone("hCellEtaPhiSum");
526  hTrackEtaPhiSum[k] = (TH2F*) hTrackEtaPhi [i][k]->Clone("hTrackEtaPhiSum");
527 
528  for(Int_t icent = 0; icent < nCent; icent++)
529  {
530  if(hIMEMCal[i][k][icent]) hIMEMCalSum[k][icent] = (TH2F*) hIMEMCal[i][k][icent]->Clone(Form("hIMEMCalSum_Cent%d",icent));
531  else hIMEMCalSum[k][icent] = 0;
532  if(hIMDCal [i][k][icent]) hIMDCalSum [k][icent] = (TH2F*) hIMDCal [i][k][icent]->Clone(Form("hIMDCalSum_Cent%d" ,icent));
533  else hIMDCalSum [k][icent] = 0;
534  }
535 
536  hTrackPhiGlobalSum[k] = (TH2F*) hTrackPhiGlobal[i][k]->Clone("hTrackPhiGlobalSum");
537  hTrackPhiNoSPDSum [k] = (TH2F*) hTrackPhiNoSPD [i][k]->Clone("hTrackPhiNoSPDSum");
538  }
539  else
540  {
541  if(hPtHardSum[k])hPtHardSum[k]->Add(hPtHard[i][k]);
542  if(hCentSum [k])hCentSum [k]->Add(hCent [i][k]);
543 
544  hClusterESum[k]->Add(hClusterE[i][k]);
545  if(hClusterD[i][k])hClusterDSum[k]->Add(hClusterD[i][k]);
546 
547  if(hPi0 [i][k])hPi0Sum [k]->Add(hPi0 [i][k]);
548  if(hPi0E[i][k])hPi0ESum[k]->Add(hPi0E[i][k]);
549  if(hPi0D[i][k])hPi0DSum[k]->Add(hPi0D[i][k]);
550 
551  if(hGam [i][k])hGamSum [k]->Add(hGam [i][k]);
552  if(hGamD[i][k])hGamESum[k]->Add(hGamE[i][k]);
553  if(hGamD[i][k])hGamDSum[k]->Add(hGamD[i][k]);
554 
555  for(Int_t j = 0; j < 3; j++)
556  {
557  if(!hTrackPtSum[k][j]) continue;
558  hTrackPtSum[k][j]->Add(hTrackPt[i][k][j]);
559  }
560 
561  hEtaPhiSum [k]->Add(hEtaPhi [i][k]);
562  hCellEtaPhiSum [k]->Add(hCellEtaPhi [i][k]);
563  hTrackEtaPhiSum[k]->Add(hTrackEtaPhi[i][k]);
564 
565  for(Int_t icent = 0; icent < nCent; icent++)
566  {
567  if(hIMEMCal[i][k][icent]) hIMEMCalSum[k][icent]->Add(hIMEMCal[i][k][icent]);
568  if(hIMDCal [i][k][icent]) hIMDCalSum [k][icent]->Add(hIMDCal [i][k][icent]);
569  }
570 
571  hTrackPhiNoSPDSum [k]->Add(hTrackPhiNoSPD [i][k]);
572  hTrackPhiGlobalSum[k]->Add(hTrackPhiGlobal[i][k]);
573  }
574  }
575 
576  } // pT hard loop
577 
578  } // loop scaled/non scaled
579 
580 
581 
582  TString scaleCase [] = {"NotScaled" ,"Scaled"};
583  TString scaleTitle[] = {"Not scaled","Scaled"};
584  TString trackType [] = {"All","Global","noSPD"};
585  TString trackTitle[] = {"All hybrid","Global","No SPD"};
586 
587  for(Int_t k = 0; k < 2; k++)
588  {
589  gStyle->SetPadTopMargin(0.10);
590  gStyle->SetPadRightMargin(0.02);
591 
592  gStyle->SetPadBottomMargin(0.12);
593  gStyle->SetPadLeftMargin(0.14);
594 
595  gStyle->SetOptTitle(1);
596  gStyle->SetTitleOffset(1.6,"Y");
597  gStyle->SetOptStat(0);
598  gStyle->SetOptFit(000000);
599 
600  TLegend l(0.8,0.3, 0.95, 0.95);
601  l.SetBorderSize(0);
602  l.SetFillColor(0);
603  l.SetTextSize(0.04);
604  l.SetHeader(scaleTitle[k]);
605 
606  //
607  // CLUSTER spectrum
608  //
609  // EMCal
610  TCanvas * cE = new TCanvas(Form("cClusterE%d",k),Form("cluster EMCal %s", scaleCase[k].Data()), 200,200);
611 
612  gPad->SetLogy();
613  //gPad->SetLogx();
614  hClusterESum[k]->SetTitle(Form("EMCal cluster, %s",scaleTitle[k].Data()));
615  hClusterESum[k]->Draw("H");
616  //hClusterESum[k]->SetMinimum(1);
617  l.AddEntry(hClusterESum[k],"Sum","L");
618 
619  for(Int_t i = 0; i < nBin; i++)
620  {
621  if(!f[i][k]) continue;
622 
623  if(!hClusterE[i][k]) continue;
624  hClusterE[i][k]->Draw("H same");
625  l.AddEntry(hClusterE[i][k],Form("Bin %d",i+firstBin),"L");
626  }
627 
628  hClusterESum[k]->Draw("H same");
629 
630  l.Draw();
631 
632  cE->Print(Form("Cluster_Energy_EMCal_%s.eps",scaleCase[k].Data()));
633 
634  // DCal
635  if(hClusterDSum[k])
636  {
637  TCanvas * cD = new TCanvas(Form("cClusterD%d",k),Form("cluster DCal %s", scaleCase[k].Data()), 200,200);
638 
639  gPad->SetLogy();
640  //gPad->SetLogx();
641 
642  hClusterDSum[k]->SetTitle(Form("DCal cluster, %s",scaleTitle[k].Data()));
643  hClusterDSum[k]->Draw("H");
644  //hClusterDSum[k]->SetMinimum(1);
645 
646  for(Int_t i = 0; i < nBin; i++)
647  {
648  if(!f[i][k]) continue;
649 
650  hClusterD[i][k]->Draw("H same");
651  }
652 
653  hClusterDSum[k]->Draw("H same");
654 
655  l.Draw();
656 
657  cD->Print(Form("Cluster_Energy_DCal_%s.eps",scaleCase[k].Data()));
658  }
659 
660  //
661  // Parton PT hard spectrum
662  //
663  if(hPtHardSum[k])
664  {
665  TCanvas * cHard = new TCanvas(Form("cPtHard%d",k),Form("pT Hard %s", scaleCase[k].Data()), 200,200);
666 
667  gPad->SetLogy();
668  //gPad->SetLogx();
669 
670  hPtHardSum[k]->SetTitle(Form("Generated parton hard-pT, %s",scaleTitle[k].Data()));
671  hPtHardSum[k]->Draw("H");
672  //hPtHardSum[k]->SetMinimum(1);
673 
674  for(Int_t i = 0; i < nBin; i++)
675  {
676  if(!f[i][k]) continue;
677 
678  if(!hPtHard[i][k]) continue;
679  hPtHard[i][k]->Draw("H same");
680  }
681 
682  hPtHardSum[k]->Draw("H same");
683 
684  l.Draw();
685 
686  cHard->Print(Form("PtHard_%s.eps",scaleCase[k].Data()));
687  }
688 
689  //
690  // Centrality
691  //
692  if(hCentSum[k])
693  {
694  TCanvas * cCent = new TCanvas(Form("cCent%d",k),Form("Centrality %s", scaleCase[k].Data()), 200,200);
695 
696  gPad->SetLogy();
697  //gPad->SetLogx();
698 
699  hCentSum[k]->SetTitle(Form("Centrality, %s",scaleTitle[k].Data()));
700  hCentSum[k]->Draw("H");
701  //hCentSum[k]->SetMinimum(1);
702 
703  for(Int_t i = 0; i < nBin; i++)
704  {
705  if(!f[i][k]) continue;
706 
707  if(!hCent[i][k]) continue;
708  hCent[i][k]->Draw("H same");
709  }
710 
711  hCentSum[k]->Draw("H same");
712 
713  l.Draw();
714 
715  cCent->Print(Form("Centrality_%s.eps",scaleCase[k].Data()));
716  }
717 
718  //
719  // TRACK spectra
720  //
721  for(Int_t j=0; j<3; j++)
722  {
723  if(!hTrackPtSum[k][j]) continue;
724 
725  TCanvas * cTr = new TCanvas(Form("cTrackPt%d_Type%d",k,j),
726  Form("Track Pt Type %s, %s",trackTitle[j].Data(),scaleTitle[k].Data()),
727  200,200);
728  gPad->SetLogy();
729  //gPad->SetLogx();
730 
731  hTrackPtSum[k][j]->SetTitle(Form("%s tracks, %s",trackTitle[j].Data(),scaleTitle[k].Data()));
732  hTrackPtSum[k][j]->Draw("H");
733  //hTrackPtSum[k][j]->SetMinimum(1);
734  for(Int_t i = 0; i < nBin; i++)
735  {
736  if(!f[i][k]) continue;
737 
738  if(!hTrackPt[i][k][j]) continue;
739  hTrackPt[i][k][j]->Draw("H same");
740  }
741 
742  l.Draw();
743 
744  cTr->Print(Form("TrackPt_%s_%s.eps",scaleCase[k].Data(),trackType[j].Data()));
745  }
746 
747  //
748  // Generated Pi0 spectrum
749  //
750  // No acceptance selection
751  if(hPi0Sum[k])
752  {
753  TCanvas * cPi0 = new TCanvas(Form("cPi0%d",k),Form("Generated Pi0 %s", scaleCase[k].Data()), 200,200);
754 
755  gPad->SetLogy();
756  //gPad->SetLogx();
757 
758  hPi0Sum[k]->SetTitle(Form("Generated #pi^{0}, %s",scaleTitle[k].Data()));
759  hPi0Sum[k]->Draw("H");
760  //hPi0Sum[k]->SetMinimum(1);
761 
762  for(Int_t i = 0; i < nBin; i++)
763  {
764  if(!f[i][k]) continue;
765 
766  if(!hPi0[i][k]) continue;
767  hPi0[i][k]->Draw("H same");
768  }
769 
770  l.Draw();
771 
772  cPi0->Print(Form("GeneratedPi0_Pt_%s.eps",scaleCase[k].Data()));
773  }
774 
775  // EMCal
776  if(hPi0ESum[k])
777  {
778  TCanvas * cPi0E = new TCanvas(Form("cPi0E%d",k),Form("Generated Pi0 in EMCal acceptance %s", scaleCase[k].Data()), 200,200);
779 
780  gPad->SetLogy();
781  //gPad->SetLogx();
782 
783  hPi0ESum[k]->SetTitle(Form("Generated #pi^{0} in EMCal, %s",scaleTitle[k].Data()));
784  hPi0ESum[k]->Draw("H");
785  //hPi0ESum[k]->SetMinimum(1);
786 
787  for(Int_t i = 0; i < nBin; i++)
788  {
789  if(!f[i][k]) continue;
790 
791  if(!hPi0E[i][k]) continue;
792  hPi0E[i][k]->Draw("H same");
793  }
794 
795  l.Draw();
796 
797  cPi0E->Print(Form("GeneratedPi0_EMCal_Pt_%s.eps",scaleCase[k].Data()));
798  }
799 
800  // DCal
801  if(hPi0DSum[k])
802  {
803  TCanvas * cPi0D = new TCanvas(Form("cPi0D%d",k),Form("Generated Pi0 in DCal acceptance %s", scaleCase[k].Data()), 200,200);
804 
805  gPad->SetLogy();
806  //gPad->SetLogx();
807 
808  hPi0DSum[k]->SetTitle(Form("Generated #pi^{0} in DCal, %s",scaleTitle[k].Data()));
809  hPi0DSum[k]->Draw("H");
810  //hPi0DSum[k]->SetMinimum(1);
811 
812  for(Int_t i = 0; i < nBin; i++)
813  {
814  if(!f[i][k]) continue;
815 
816  if(!hPi0D[i][k]) continue;
817  hPi0D[i][k]->Draw("H same");
818  }
819 
820  l.Draw();
821 
822  cPi0D->Print(Form("GeneratedPi0_DCal_Pt_%s.eps",scaleCase[k].Data()));
823  }
824 
825  //
826  // Generated Gamma spectrum
827  //
828  // No acceptance selection
829  if(hGamSum[k])
830  {
831  TCanvas * cGam = new TCanvas(Form("cGamma%d",k),Form("Generated Gamma %s", scaleCase[k].Data()), 200,200);
832 
833  gPad->SetLogy();
834  //gPad->SetLogx();
835 
836  hGamSum[k]->SetTitle(Form("Generated #gamma, %s",scaleTitle[k].Data()));
837  hGamSum[k]->Draw("H");
838  //hGamSum[k]->SetMinimum(1);
839 
840  for(Int_t i = 0; i < nBin; i++)
841  {
842  if(!f[i][k]) continue;
843 
844  if(!hGam[i][k]) continue;
845  hGam[i][k]->Draw("H same");
846  }
847 
848  l.Draw();
849 
850  cGam->Print(Form("GeneratedGam_Pt_%s.eps",scaleCase[k].Data()));
851  }
852 
853  if(hGamESum[k])
854  {
855  // EMCal
856  TCanvas * cGamE = new TCanvas(Form("cGammaE%d",k),Form("Generated Gamma in EMCal acceptance %s", scaleCase[k].Data()), 200,200);
857 
858  gPad->SetLogy();
859  //gPad->SetLogx();
860 
861  hGamESum[k]->SetTitle(Form("Generated #gamma in EMCal acceptance, %s",scaleTitle[k].Data()));
862  hGamESum[k]->Draw("H");
863  //hGamESum[k]->SetMinimum(1);
864 
865  for(Int_t i = 0; i < nBin; i++)
866  {
867  if(!f[i][k]) continue;
868 
869  if(!hGamE[i][k]) continue;
870  hGamE[i][k]->Draw("H same");
871  }
872 
873  l.Draw();
874 
875  cGamE->Print(Form("GeneratedGamma_EMCal_Pt_%s.eps",scaleCase[k].Data()));
876  }
877 
878  // DCal
879  if(hGamDSum[k])
880  {
881  TCanvas * cGamD = new TCanvas(Form("cGammaD%d",k),Form("Generated Gamma in DCal acceptance %s", scaleCase[k].Data()), 200,200);
882 
883  gPad->SetLogy();
884  //gPad->SetLogx();
885 
886  hGamDSum[k]->SetTitle(Form("Generated #gamma in DCal acceptance, %s",scaleTitle[k].Data()));
887  hGamDSum[k]->Draw("H");
888  //hGamDSum[k]->SetMinimum(1);
889 
890  for(Int_t i = 0; i < nBin; i++)
891  {
892  if(!f[i][k]) continue;
893 
894  if(!hGamD[i][k]) continue;
895  hGamD[i][k]->Draw("H same");
896  }
897 
898  l.Draw();
899 
900  cGamD->Print(Form("GeneratedGamma_DCal_Pt_%s.eps",scaleCase[k].Data()));
901  }
902 
904  // Inv. Mass. Projections //
906  TLine pi0Mass(0.135,0,0.135,1e6);
907  pi0Mass.SetLineColor(2);
908  pi0Mass.SetLineStyle(2);
909 
910  Bool_t allCent = kFALSE;
911  for(Int_t icent = 1; icent < nCent; icent++) { if ( hIMEMCalSum[k][icent] ) allCent = kTRUE; }
912  if ( !allCent ) cenLegend[0] = "";
913 
914  for(Int_t icent = 0; icent < nCent; icent++)
915  {
916  if ( !hIMEMCalSum[k][icent] ) continue;
917 
918  if ( icent > 0 && !allCent ) continue;
919 
920  Int_t binmin = hIMEMCalSum[k][icent]->GetXaxis()->FindBin(5);
921  Int_t binmax = hIMEMCalSum[k][icent]->GetXaxis()->FindBin(10);
922  //printf("Bins Min %d, Max %d\n",binmin,binmax);
923 
924  TH1F * hInvMassEMC = (TH1F*) hIMEMCalSum[k][icent]->ProjectionY(Form("hEMCInvMass%d_Cent%d",k,icent),binmin,binmax);
925  hInvMassEMC->SetLineColor(1);
926 
927  TH1F * hInvMassDMC = 0;
928  if(hIMDCalSum[k])
929  {
930  hInvMassDMC = (TH1F*) hIMDCalSum[k][icent] ->ProjectionY(Form("hDMCInvMass%d_Cent%d",k,icent),binmin,binmax);
931  hInvMassDMC->SetLineColor(4);
932  }
933 
934  TCanvas * cIMProj = new TCanvas(Form("cIMProj%d_Cent%d",k,icent),
935  Form("DCal/EMCa; Inv. Mass; %s %s",scaleCase[k].Data(),cenLegend[icent].Data()),
936  200,200);
937 
938  //gPad->SetLogz();
939  gPad->SetGridx();
940 
941  hInvMassEMC->SetAxisRange(0.05, 0.3);
942  hInvMassEMC->SetMinimum(1);
943 
944  hInvMassEMC->SetTitle(Form("Cluster pair M in #pi^{0} region, %s %s",scaleTitle[k].Data(),cenLegend[icent].Data()));
945 
946  Double_t intE = hInvMassEMC->Integral();
947  if(intE > 0) hInvMassEMC->Scale(1./intE);
948  Double_t maxE = hInvMassEMC->GetMaximum();
949  hInvMassEMC->SetYTitle("1/N dN / dM ");
950  hInvMassEMC->Draw("H");
951 
952  TLegend lim(0.68,0.6,0.98,0.8);
953  lim.SetHeader("5 < E < 10 GeV");
954  lim.AddEntry(hInvMassEMC,"EMCal","L");
955 
956  if(hInvMassDMC)
957  {
958  Double_t intD = hInvMassDMC->Integral();
959  if(intD > 0) hInvMassDMC->Scale(1./intD);
960 
961  Double_t maxD = hInvMassDMC->GetMaximum();
962  if(maxD > maxE) hInvMassEMC->SetMaximum(hInvMassEMC->GetMaximum()*1.1);
963 
964  hInvMassDMC->Draw("H same");
965  lim.AddEntry(hInvMassDMC,"DCal","L");
966  }
967  pi0Mass.Draw();
968  lim.Draw();
969 
970  cIMProj->Print(Form("InvMassDCalEMCal_5_10GeV_%s_Cen%d.eps",scaleCase[k].Data(),icent));
971 
972  // Projection 2
973  binmin = hIMEMCalSum[k][icent]->GetXaxis()->FindBin(2);
974  binmax = hIMEMCalSum[k][icent]->GetXaxis()->FindBin(4);
975  //printf("Bins Min %d, Max %d\n",binmin,binmax);
976 
977  hInvMassEMC = (TH1F*) hIMEMCalSum[k][icent]->ProjectionY(Form("hEMCInvMass2_%d_Cen%d",k,icent),binmin,binmax);
978  hInvMassEMC->SetLineColor(1);
979 
980  hInvMassDMC = 0;
981  if(hIMDCalSum[k])
982  {
983  hInvMassDMC = (TH1F*) hIMDCalSum[k][icent] ->ProjectionY(Form("hDMCInvMass2_%d_Cen%d",k,icent),binmin,binmax);
984  hInvMassDMC->SetLineColor(4);
985  }
986 
987  TCanvas * cIMProj2 = new TCanvas(Form("cIMProj2_%d",k),
988  Form("DCal/EMCa; Inv. Mass; %s %s",scaleCase[k].Data(),cenLegend[icent].Data()),
989  200,200);
990 
991  //gPad->SetLogy();
992  gPad->SetGridx();
993 
994  hInvMassEMC->SetAxisRange(0.05, 0.3);
995  hInvMassEMC->SetMinimum(1);
996 
997  hInvMassEMC->SetTitle(Form("Cluster pair M in #pi^{0} region, %s %s",scaleTitle[k].Data(),cenLegend[icent].Data()));
998 
999  intE = hInvMassEMC->Integral();
1000  if(intE > 0) hInvMassEMC->Scale(1./intE);
1001  maxE = hInvMassEMC->GetMaximum();
1002  hInvMassEMC->SetYTitle("1/N dN / dM ");
1003  hInvMassEMC->Draw("H");
1004 
1005  TLegend lim2(0.68,0.6,0.98,0.8);
1006  lim2.SetHeader("2 < E < 4 GeV");
1007  lim2.AddEntry(hInvMassEMC,"EMCal","L");
1008 
1009  if(hInvMassDMC)
1010  {
1011  Double_t intD = hInvMassDMC->Integral();
1012  if(intD > 0) hInvMassDMC->Scale(1./intD);
1013 
1014  Double_t maxD = hInvMassDMC->GetMaximum();
1015  if(maxD > maxE) hInvMassEMC->SetMaximum(hInvMassEMC->GetMaximum()*1.1);
1016 
1017  Double_t minD = hInvMassDMC->GetMinimum();
1018  if(minD < hInvMassEMC->GetMinimum()) hInvMassEMC->SetMinimum(hInvMassDMC->GetMinimum());
1019 
1020  hInvMassDMC->Draw("H same");
1021  lim2.AddEntry(hInvMassDMC,"DCal","L");
1022  }
1023 
1024  pi0Mass.Draw();
1025  lim2.Draw();
1026 
1027  cIMProj2->Print(Form("InvMassDCalEMCal_2_4GeV_%s_Cen%d.eps",scaleCase[k].Data(),icent));
1028  }
1029 
1031  // Track Phi Projections //
1033 
1034  TCanvas * cPhiProj = new TCanvas(Form("cPhiProj%d",k),Form("Track phi; %s",scaleCase[k].Data()), 200,200);
1035 
1036  TH1F* hPhiSPD = (TH1F*)hTrackPhiGlobalSum[k]->ProjectionY(Form("%s_hTrackPhiSPD" ,scaleCase[k].Data()),0,1000);
1037  TH1F* hPhiNoSPD = (TH1F*)hTrackPhiNoSPDSum [k]->ProjectionY(Form("%s_hTrackPhiNoSPD",scaleCase[k].Data()),0,1000);
1038  TH1F* hPhi = (TH1F*)hPhiSPD->Clone(Form("%s_hTrackPhi",scaleCase[k].Data()));
1039  hPhi->Add(hPhiNoSPD);
1040 
1041  Float_t normFactor = 1./hPhi->Integral();
1042  hPhi ->Scale(normFactor);
1043  hPhiSPD ->Scale(normFactor);
1044  hPhiNoSPD->Scale(normFactor);
1045 
1046  hPhi ->SetTitle(Form("Hybrid track type #varphi, 0.2<#it{p}_{T}<2 GeV/#it{c}, %s",scaleTitle[k].Data()));
1047  hPhi ->SetLineColor(1);
1048  hPhiSPD ->SetLineColor(2);
1049  hPhiNoSPD->SetLineColor(4);
1050 
1051  hPhi ->SetMinimum(0);
1052  hPhi ->SetMaximum(hPhi->GetMaximum()*1.3);
1053  hPhi ->SetTitleOffset(1.5,"Y");
1054  hPhi ->SetYTitle("Entries");
1055 
1056  TGaxis::SetMaxDigits(3);
1057 
1058  hPhi ->Draw("H");
1059  hPhiSPD ->Draw("Hsame");
1060  hPhiNoSPD->Draw("Hsame");
1061 
1062  TLegend lphi(0.2,0.75,0.4,0.89);
1063  lphi.SetTextSize(0.04);
1064  lphi.AddEntry(hPhi,"Sum","L");
1065  lphi.AddEntry(hPhiSPD ,"SPD+Refit","L");
1066  lphi.AddEntry(hPhiNoSPD,"No SPD+Refit","L");
1067  lphi.SetBorderSize(0);
1068  lphi.SetFillColor(0);
1069  lphi.Draw();
1070 
1071  cPhiProj->Print(Form("TrackPhi_%s.eps",scaleCase[k].Data()));
1072 
1074  // Acceptance
1076 
1077  gStyle->SetPadRightMargin(0.12);
1078 
1079 
1080  TCanvas * cEtaPhi = new TCanvas(Form("cEtaPhi%d",k),Form("cluster Eta/phi, %s",scaleCase[k].Data()), 200,200);
1081 
1082  gPad->SetLogz();
1083  //gPad->SetLogx();
1084 
1085  hEtaPhiSum[k]->SetAxisRange(-1,1,"X");
1086  hEtaPhiSum[k]->SetAxisRange( 1,6,"Y");
1087 
1088  hEtaPhiSum[k]->SetTitle(Form("EMCal/DCal Cluster acceptance, %s",scaleTitle[k].Data()));
1089 
1090  hEtaPhiSum[k]->Draw("colz");
1091 
1092  cEtaPhi->Print(Form("EtaPhi_Cluster_%s.eps",scaleCase[k].Data()));
1093 
1094  TCanvas * cCellEtaPhi = new TCanvas(Form("cCellEtaPhi%d",k),Form("cell Eta/phi, %s",scaleCase[k].Data()), 200,200);
1095 
1096  gPad->SetLogz();
1097  //gPad->SetLogx();
1098 
1099  hCellEtaPhiSum[k]->SetTitle(Form("EMCal/DCal cell acceptance, %s",scaleTitle[k].Data()));
1100 
1101  hCellEtaPhiSum[k]->Draw("colz");
1102 
1103  cCellEtaPhi->Print(Form("EtaPhi_Cell_%s.eps",scaleCase[k].Data()));
1104 
1105  TCanvas * cTrackEtaPhi = new TCanvas(Form("cTrackEtaPhi%d",k),Form("track Eta/phi, %s",scaleCase[k].Data()), 200,200);
1106 
1107  gPad->SetLogz();
1108  //gPad->SetLogx();
1109 
1110  hTrackEtaPhiSum[k]->SetTitle(Form("Hybrid track acceptance, %s",scaleTitle[k].Data()));
1111 
1112  hTrackEtaPhiSum[k]->Draw("colz");
1113 
1114  cTrackEtaPhi->Print(Form("EtaPhi_Track_%s.eps",scaleCase[k].Data()));
1115 
1116  for(Int_t icent = 0; icent < nCent; icent++)
1117  {
1118  if ( !hIMEMCalSum[k][icent] ) continue;
1119 
1120  if ( icent > 0 && !allCent ) continue;
1122  // EMCal Invariant mass
1124  TCanvas * cIM = new TCanvas(Form("cIM%d_Cen%d",k,icent),
1125  Form("EMCal Inv. Mass, %s %s",scaleCase[k].Data(),cenLegend[icent].Data()),
1126  200,200);
1127 
1128  gPad->SetLogz();
1129  //gPad->SetLogx();
1130 
1131  hIMEMCalSum[k][icent]->SetAxisRange(4,20,"X");
1132 
1133  hIMEMCalSum[k][icent]->SetTitle(Form("EMCal cluster invariant mass, %s %s",
1134  scaleTitle[k].Data(),cenLegend[icent].Data()));
1135 
1136  hIMEMCalSum[k][icent]->Draw("colz");
1137 
1138  cIM->Print(Form("InvMassEMCal_%s_Cen%d.eps",scaleCase[k].Data(),icent));
1139 
1141  // DCal Invariant mass
1143  if(hIMDCalSum[k])
1144  {
1145  TCanvas * cIMD = new TCanvas(Form("cIMD%d_Cen%d",k,icent),
1146  Form("DCal Inv. Mass, %s %s",scaleCase[k].Data(),cenLegend[icent].Data()),
1147  200,200);
1148 
1149  gPad->SetLogz();
1150  //gPad->SetLogx();
1151 
1152  hIMDCalSum[k][icent]->SetAxisRange(4,20,"X");
1153 
1154  hIMDCalSum[k][icent]->SetTitle(Form("DCal cluster invariant mass, %s %s",
1155  scaleTitle[k].Data(),cenLegend[icent].Data()));
1156 
1157  hIMDCalSum[k][icent]->Draw("colz");
1158 
1159  cIMD->Print(Form("InvMassDCal_%s_Cen%d.eps",scaleCase[k].Data(),icent));
1160  }
1161  } // centrality
1162 
1163  }
1164 }
1165 
1166 
Int_t color[]
print message on plot with ok/not ok
double Double_t
Definition: External.C:58
Definition: External.C:236
int Int_t
Definition: External.C:63
float Float_t
Definition: External.C:68
Bool_t Data(TH1F *h, Double_t *rangefit, Bool_t writefit, Double_t &sgn, Double_t &errsgn, Double_t &bkg, Double_t &errbkg, Double_t &sgnf, Double_t &errsgnf, Double_t &sigmafit, Int_t &status)
void DrawPtHardBins(Int_t minE=1, Int_t maxE=70, const Int_t nBin=20, Int_t firstBin=1, Bool_t scaleHisto=kFALSE)
TH2 * Scale(TH2 *h, TH1 *g)
bool Bool_t
Definition: External.C:53