AliPhysics  d565ceb (d565ceb)
QAplots.C
Go to the documentation of this file.
1 
26 
27 #if !defined(__CINT__) || defined(__MAKECINT__)
28 #include <TFile.h>
29 #include <TH1F.h>
30 #include <TH2F.h>
31 #include <TH3D.h>
32 #include <Riostream.h>
33 #include <TCanvas.h>
34 #include <TGraphErrors.h>
35 #include <TGrid.h>
36 #include <TFileMerger.h>
37 #include <TMultiGraph.h>
38 #include <TROOT.h>
39 #include <TString.h>
40 #include <TStyle.h>
41 #include <TLegend.h>
42 #include <TGridCollection.h>
43 #include <TROOT.h>
44 #include <TGridResult.h>
45 #include <TClonesArray.h>
46 #include <TObjString.h>
47 #include <stdio.h>
48 #include <fstream>
49 #include <iostream>
50 #include "AliEMCALGeometry.h"
51 #endif
52 using namespace std;
53 
54 void QAplots(TString fCalorimeter = "EMCAL", TString period = "LHC11h", TString pass = "pass1_HLT", TString trigger= "default");
55 
56 void QAplots(Int_t run, TString period ="LHC11h", TString pass="pass1_HLT", TString trigger= "default");
57 
58 void DrawOccupancy(Int_t run , TString period ="LHC11h", TString pass="pass1_HLT",
59  TString trigger= "default", TFile *f =0x0);
60 
61 void DrawRun(const Int_t run = 167713, TString period ="LHC11h",
62  TString pass="pass1_HLT", TString trigger= "default", TFile *f =0x0);
63 
64 void QAplots(TString fCalorimeter, TString period, TString pass, TString trigger)
65 {
66  FILE * pFile;
67  TString file = "";
68  if (trigger=="default") file = "/scratch/alicehp2/germain/QA/"+period+"/"+ pass + "/runlistMB.txt" ;
69  else file = "/scratch/alicehp2/germain/QA/"+period+"/"+ pass + "/runlistEMC.txt" ;
70 
71  pFile = fopen(file.Data(), "r"); //open the text file where include the run list and correct run index
72 
73  cout << " fcalo: " << fCalorimeter << "; period: " << period << "; pass: " << pass << " trigger "<<trigger<< endl;
74 
75  Int_t p;
76  Int_t q;
77  Int_t ncols;
78  Int_t nlines = 0 ;
79  Int_t RunId[500] ;
80 
81  Double_t x[500] ;
82  Double_t xrun[500] ;
83 
84  while (1){
85  ncols = fscanf(pFile,"%d %d ",&p,&q);
86  if (ncols< 0) break;
87  x[nlines]=p;
88  RunId[nlines]=q;
89  xrun[nlines]=1.*q;
90  nlines++;
91  }
92  fclose(pFile);
93 
94  const Int_t nRun = nlines ;
95  TString base ;
96  for(Int_t i = 0 ; i < nRun ; i++) {
97  base = "/scratch/alicehp2/germain/QA/";
98  base += period ;
99  base += "/";
100  base += pass ;
101  base += "/";
102  base += RunId[i] ;
103  TString infile ;
104  infile = base + ".root" ;
105  TFile *f = TFile::Open(infile);
106  DrawOccupancy(RunId[i],period,pass,trigger,f);
107  DrawRun(RunId[i],period,pass,trigger,f);
108  f->Close();
109  }
110 }
111 
112 void QAplots(Int_t run, TString period, TString pass, TString trigger)
113 {
114  TString base ;
115  base = "/scratch/alicehp2/germain/QA/";
116  base += period ;
117  base += "/";
118  base += pass ;
119  base += "/";
120  base += run ;
121  TString infile ;
122  infile = base + ".root" ;
123  TFile *f = TFile::Open(infile);
124  DrawOccupancy(run,period,pass,trigger,f);
125  DrawRun(run,period,pass,trigger,f);
126  f->Close();
127 }
128 
129 void DrawOccupancy(Int_t run , TString period, TString pass,
130  TString trigger, TFile *f)
131 {
132  TH2D *hEnergyMap = new TH2D("hEnergyMap","",96,-48,48,120,-0,120);
133  TH2D *hOccupancyMap = new TH2D("hOccupancyMap","",96,-48,48,120,-0,120);
134  TH2D *hEnergyMapReal = new TH2D("hEnergyMapReal","",96,-48,48,120,-0,120);
135  TH2D *hOccupancyMapReal = new TH2D("hOccupancyMapReal","",96,-48,48,120,-0,120);
136  hEnergyMapReal->SetXTitle("eta (bin)");
137  hEnergyMapReal->SetYTitle("phi (bin)");
138  hEnergyMapReal->SetZTitle("E(GeV)/event");
139  hEnergyMapReal->GetZaxis()->SetLabelSize(0.02);
140  hOccupancyMapReal->SetXTitle("eta (bin)");
141  hOccupancyMapReal->SetZTitle("entries/evt");
142  hOccupancyMapReal->GetZaxis()->SetLabelSize(0.02);
143  hOccupancyMapReal->SetXTitle("eta (bin)");
144  hEnergyMap->SetXTitle("eta (bin)");
145  hEnergyMap->SetYTitle("phi (bin)");
146  hOccupancyMap->SetXTitle("eta (bin)");
147  hOccupancyMap->SetYTitle("phi (bin)");
148 
149  gStyle->SetPalette(1);
150  gStyle->SetOptStat(0);
151 
152  AliEMCALGeometry *geom = new AliEMCALGeometry("EMCAL_COMPLETEv1","EMCAL");
153  Int_t nSupMod, nModule, nIphi, nIeta, nModulo, iRCU;
154  Int_t iphi, ieta,jj,kk;
155  Int_t icol, irow;
156  Int_t bineta, binphi;
157  Int_t realbineta = -1, realbinphi = -1;
158  TVector3 vg, gg;
159  Double_t eta, phi, glob[3];
160 
161 
162  //LHC11d
163  //Int_t mask[224] = {74, 147, 152, 189, 191, 198, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 324, 491, 759, 917, 949, 1376, 1386, 1429, 1487, 1490, 1519, 1967, 2014, 2015, 2112, 2114, 2115, 2116, 2118, 2119, 2120, 2123, 2124, 2125, 2158, 2159, 2326, 2332, 2333, 2350, 2351, 2436, 2448, 2506, 2518, 2534, 2540, 2590, 2640, 2793, 2805, 2815, 2828, 2830, 2869, 2878, 2880, 2881, 2891, 2926, 2985, 3022, 3024, 3070, 3135, 3169, 3263, 3503, 4366, 4560, 4623, 6093, 6331, 6481, 7089, 7113, 7190, 7246, 7425, 7495, 7874,8358, 8811, 9024, 9269, 9302, 9387, 9696, 9697, 9698, 9699, 9701, 9702, 9703, 9704, 9705, 9706, 9707, 9710, 9711, 9748, 9792, 9793, 9794, 9795, 9796, 9797, 9798, 9799, 9800, 9801, 9802, 9803, 9804, 9805, 9806, 9807, 9815, 9819, 9824, 9828, 9829, 9830, 9831, 9832, 9834, 9835, 9836, 9837, 9838, 9839, 9850, 9872, 9874, 9875, 9877, 9878, 9879, 9881, 9882, 9883, 9888, 9890, 9891, 9894, 9896, 9897, 9898, 9899, 9902, 9927, 9938, 9939, 9942, 9943, 9945, 9946, 9947, 9948, 9949, 9950, 9951, 10035, 10073, 10084, 10085, 10086, 10090, 10093, 10112, 10113, 10114, 10115, 10116, 10117, 10118, 10119, 10120, 10121, 10122, 10123, 10124, 10125, 10126, 10127, 10718, 10723, 10728, 10771, 10831, 11042, 11043, 11090, 11363, 22222222};
164 
165 
166  //LHC11e
167  //Int_t mask[174] = {74, 152, 167, 191, 759, 1059, 1175, 1204, 1288, 1376, 1382, 1386, 1519, 1967, 1968, 2026, 2047, 2112, 2114, 2115, 2116, 2118, 2119, 2120, 2123, 2124, 2125, 2210, 2339, 2350, 2391, 2506, 2540, 2793, 2828, 2869, 2891, 2985, 3135, 3503, 4377, 4817, 5600, 5601, 5602, 5603, 5612, 5613, 5614, 5615, 5648, 5649, 5650, 5651, 5660, 5661, 5662, 5663, 5836, 6104, 6331, 6481, 7089, 7371, 7375, 7425, 7572, 7874, 8358, 9269, 9302, 9389, 9696, 9697, 9698, 9699, 9700, 9701, 9702, 9703, 9705, 9706, 9707, 9708, 9709, 9710, 9711, 9750, 9758, 9792, 9793, 9794, 9795, 9798, 9800, 9801, 9803, 9804, 9815, 9819, 9824, 9825, 9828, 9829, 9830, 9831, 9832, 9833, 9834, 9835, 9836, 9838, 9872, 9874, 9875, 9878, 9882, 9883, 9889, 9890, 9891, 9892, 9893, 9894, 9896, 9897, 9898, 9899, 9900, 9901, 9902, 9903, 9927, 9936, 9937, 9938, 9939, 9940, 9941, 9942, 9943, 9945, 9947, 9948, 9949, 9950, 9951, 10086, 10112, 10113, 10114, 10115, 10116, 10118, 10119, 10120, 10121, 10122, 10123, 10124, 10125, 10126, 10127, 10134, 10135, 10138, 10143, 10718, 10723, 10771, 11042, 11091, 11363, 2222222};
168 
169  //LHC11f
170  // Int_t mask[134] = {74, 152, 167, 759, 1204, 1267, 1288, 1376, 1382, 1386, 1424, 1519, 1967, 2026, 2047, 2112, 2114, 2115, 2116, 2118, 2119, 2120, 2123, 2124, 2125, 2506, 2540, 2793, 2828, 2869, 2891, 2985, 3135, 3503, 3785, 4817, 6104, 6331, 6481, 7371, 7375, 7425, 7572, 7874, 8218, 8220, 8222, 9269, 9282, 9302, 9455, 9698, 9699, 9700, 9701, 9702, 9703, 9705, 9706, 9707, 9708, 9709, 9710, 9711, 9748, 9758, 9792, 9793, 9794, 9795, 9796, 9797, 9798, 9799, 9800, 9801, 9803, 9804, 9805,9815, 9828, 9829, 9830, 9831, 9832, 9833, 9834, 9835, 9836, 9838, 9850, 9875, 9891, 9898, 9900, 9927, 9936, 9937, 9938, 9939, 9940, 9941, 9942, 9943, 9944, 9945, 9947, 9948, 9949, 9950, 9951, 10112, 10113, 10114, 10115, 10116, 10118, 10119, 10120, 10121, 10122, 10123, 10124, 10125, 10126, 10127, 10138, 10143, 10363, 10718, 10723, 11091, 11363, 2222222};
171 
172  //NO MASK
173  Int_t mask[1] = {2222222};
174 
175  TH2F *hCellAmplitude;
176  TH1F *hNEvents;
177  Int_t Events;
178  Int_t n=0;
179  TString base = "/scratch/alicehp2/germain/QA/";
180  base += period ;
181  base += "/";
182  base += pass ;
183  base += "/";
184  base += run ;
185  base += "/";
186  base += trigger;
187  // TString infile ;
188  //infile = base + ".root" ;
189  //*f = TFile::Open(infile);
190  TString direct = "CaloQA_";
191  direct += trigger;
192  TDirectoryFile *dir = (TDirectoryFile *)f->Get(direct);
193  TList *outputList = (TList*)dir->Get(direct);
194 
195  hNEvents =(TH1F *)outputList->FindObject("hNEvents");
196  Events = hNEvents->GetEntries();
197  hCellAmplitude =(TH2F *)outputList->FindObject("EMCAL_hAmpId");
198  //hCellAmplitude->Draw();
199  //TH2 *hCellAmplitude = (TH2*) gFile->Get("hCellAmplitude");
200  Double_t numb =0 ;
201  Double_t Eth=0;
202  Eth = 5.;
203  if ( trigger=="EMC7") Eth=20.;
204 
205 
206  for(Int_t i = 0; i < 11520 ; i++)
207  {
208  Double_t Esum = 0;
209  Double_t Nsum = 0;
210  Double_t EsumH = 0;
211  Double_t NsumH = 0;
212  Double_t Ratio = 0;
213 
214  for (Int_t j = 1; j <= hCellAmplitude->GetNbinsX(); j++)
215  {
216  Double_t E = hCellAmplitude->GetXaxis()->GetBinCenter(j);
217  Double_t N = hCellAmplitude->GetBinContent(j, i+1);
218 
219  if (E < 0.07) continue;
220  // if (E > 0.07) continue;
221 
222  if (E <= Eth) {
223  Esum += E*N;
224  Nsum += N;
225  }
226  else {
227  EsumH += E*N;
228  NsumH += N;
229  }
230  }
231 
232  if(NsumH > 100) Ratio = Nsum/NsumH ;
233  // if(Nsum > 20000 && Nsum < 22000 ) cout<<" "<<i ;
234 
235  Int_t absId = i;
236  if(n!=0) {if(mask[n]<=mask[n-1]) cout<<"not sorted list !!"<<endl;}
237  if(i==mask[n]){n++ ; continue; }
238  // if(Esum/(Double_t) Events > 0.5) cout<<"BAD : "<<i<<endl;
239 
240  // hBadCellMap->Fill(1)
241 
242 
243  geom->GetCellIndex(absId, nSupMod, nModule, nIphi, nIeta);
244  geom->GetCellPhiEtaIndexInSModule(nSupMod,nModule,nIphi,nIeta, iphi,ieta);
245 
246  realbinphi = 120-(nSupMod/2)*24 -iphi -1;
247 
248 
249  if (nSupMod%2==0) realbineta= 48-ieta -1;
250  if (nSupMod%2==1) realbineta= -ieta -1;
251 
252  // to do as usual (Gustavo) SM0 high left SM9 low right
253 
254  binphi = 96 - (nSupMod/2)*24 +iphi;
255  if (nSupMod%2==1) bineta=ieta;
256  /*
257  Int_t compt; if(i==0) compt = 1;
258  if(ieta==0){ cout<<compt <<endl ; compt ++;}
259  */
260  if (nSupMod%2==0) bineta=ieta-48;
261 
262  hEnergyMapReal->Fill(realbineta,realbinphi,Esum/(Double_t)Events);
263  hOccupancyMapReal->Fill(realbineta,realbinphi,Nsum/(Double_t)Events);
264  // }
265  }
266 
267  cout<<"N events : "<<Events<<endl;
268 
269  TString Energy ; Energy = base + "MapEnergy.pdf";
270  TString Entries ; Entries = base + "MapEntries.pdf";
271  TCanvas *c1 = new TCanvas("c1","energymap",800,800);
272  c1->SetFillColor(0);
273  c1->SetGrid();
274  c1->cd();
275  c1->SetRightMargin(0.14);
276  TString title = "run ";
277  title += run ;
278  title += " Summed energy map";
279  if(trigger=="EMC7") title += " EMC ";
280  hEnergyMapReal->SetTitle(title);
281  if(trigger== "EMC7"){
282  hEnergyMapReal->SetMinimum(0.001); //FOR Esum EMC triggers
283  hEnergyMapReal->SetMaximum(0.05); //FOR Esum
284  }else{
285  hEnergyMapReal->SetMinimum(0.005); //FOR Esum MB
286  hEnergyMapReal->SetMaximum(0.02); //FOR Esum
287  }
288  hEnergyMapReal->Draw("colz");
289 
290  c1->cd();
291  c1->SaveAs(Energy);
292 
293  TCanvas *c2 = new TCanvas("c2","occupancy",800,800);
294  //c2->SetLogz();
295  c2->SetFillColor(0);
296  c2->SetGrid();
297  c2->cd();
298  c2->SetRightMargin(0.14);
299  TString title2 = "run ";
300  title2 += run ;
301  title2 += " Occupancy map";
302  if(trigger=="EMC7") title2 += " EMC ";
303 
304  hOccupancyMapReal->SetTitle(title2);
305  //SCALE USE FOR LHC11h modify fotr pp
306  if(trigger== "EMC7"){
307  hOccupancyMapReal->SetMinimum(0.01); //FOR Nsum
308  hOccupancyMapReal->SetMaximum(0.5);} //FOR Nsum}
309  else{
310  hOccupancyMapReal->SetMinimum(0.01); //FOR Nsum
311  hOccupancyMapReal->SetMaximum(0.1); //FOR Nsum
312  }
313  hOccupancyMapReal->Draw("colz");
314  c2->cd();
315  c2->SaveAs(Entries);
316 }
317 
318 void DrawRun(const Int_t run, TString period,
319  TString pass, TString trigger, TFile *f)
320 {
321  gStyle->SetPalette(1);
322  TString base = "/scratch/alicehp2/germain/QA/";
323  base += period ;
324  base += "/";
325  base += pass ;
326  base += "/";
327  TString outfilename ;
328  TString outfilename2 ;
329  base += run ;
330  base += "/" ;
331  base += trigger ;
332  char legend [100] ;
333  char legend2 [100] ;
334  TString direct = "CaloQA_";
335  direct += trigger;
336 
337 
338  TDirectoryFile *dir = (TDirectoryFile *)f->Get(direct);
339  TList *outputList = (TList*)dir->Get(direct);
340 
341 
342  if (trigger =="EMC7"){ sprintf(legend,"Run %i EMC ",run);}
343  else sprintf(legend,"Run %i ",run);
344 
345 
346 
347  TH2F * hClusterTimeEnergy =(TH2F *)outputList->FindObject("EMCAL_hClusterTimeEnergy");
348 
349  TString title3 =" Time Vs Energy";
350  title3 += legend ;
351  hClusterTimeEnergy->SetStats(kFALSE);
352  hClusterTimeEnergy->SetTitle(title3);
353 
354  TH2F * hClusterVsTrack =(TH2F *)outputList->FindObject("EMCAL_hCaloTrackMNClusters");
355  hClusterVsTrack->SetStats(kFALSE);
356  title3 =" N cluster Vs N track";
357  title3 += legend ;
358  hClusterVsTrack->SetTitle(title3);
359 
360 
361  TH2F * hClusterEVsTrack =(TH2F *)outputList->FindObject("EMCAL_hCaloTrackMEClusters");
362  hClusterEVsTrack->SetStats(kFALSE);
363  hClusterEVsTrack->SetTitle(legend);
364  title3 =" Sum E cluster Vs N track";
365  title3 += legend ;
366  hClusterEVsTrack->SetTitle(title3);
367 
368 
369  TH2F * hClusterEVsV0S =(TH2F *)outputList->FindObject("EMCAL_hCaloV0SEClusters");
370  hClusterEVsV0S->SetStats(kFALSE);
371  title3 =" Sum E cluster Vs V0 signal";
372  title3 += legend ;
373  hClusterEVsV0S->SetTitle(title3);
374 
375 
376  TH2F * hNCellsPerClusterMod0 =(TH2F *)outputList->FindObject("EMCAL_hNCellsPerCluster_Mod0");
377  hNCellsPerClusterMod0->SetStats(kFALSE);
378 
379  if(trigger=="EMC7"){sprintf(legend2,"Run %i EMC Mod 0",run);}
380  else {sprintf(legend2,"Run %i Mod 0",run);}
381 
382 
383  hNCellsPerClusterMod0->SetTitle(legend2);
384 
385  TH2F * hNCellsPerClusterMod1 =(TH2F *)outputList->FindObject("EMCAL_hNCellsPerCluster_Mod1");
386  hNCellsPerClusterMod1->SetStats(kFALSE);
387  if(trigger=="EMC7"){sprintf(legend2,"Run %i EMC Mod 1",run);}
388  else {sprintf(legend2,"Run %i Mod 1",run);}
389 
390 
391  hNCellsPerClusterMod1->SetTitle(legend2);
392 
393  TH2F * hNCellsPerClusterMod2 =(TH2F *)outputList->FindObject("EMCAL_hNCellsPerCluster_Mod2");
394  hNCellsPerClusterMod2->SetStats(kFALSE);
395  if(trigger=="EMC7"){sprintf(legend2,"Run %i EMC Mod 2",run);}
396  else {sprintf(legend2,"Run %i Mod 2",run);}
397 
398  hNCellsPerClusterMod2->SetTitle(legend2);
399 
400  TH2F * hNCellsPerClusterMod3 =(TH2F *)outputList->FindObject("EMCAL_hNCellsPerCluster_Mod3");
401  hNCellsPerClusterMod3->SetStats(kFALSE);
402  if(trigger=="EMC7"){sprintf(legend2,"Run %i EMC Mod 3",run);}
403  else {sprintf(legend2,"Run %i Mod 3",run);}
404 
405  hNCellsPerClusterMod3->SetTitle(legend2);
406 
407 
408  TH2F * hNCellsPerClusterMod4 =(TH2F *)outputList->FindObject("EMCAL_hNCellsPerCluster_Mod4");
409  hNCellsPerClusterMod4->SetStats(kFALSE);
410  if(trigger=="EMC7"){sprintf(legend2,"Run %i EMC Mod 4",run);}
411  else {sprintf(legend2,"Run %i Mod 4",run);}
412 
413  hNCellsPerClusterMod4->SetTitle(legend2);
414 
415  TH2F * hNCellsPerClusterMod5 =(TH2F *)outputList->FindObject("EMCAL_hNCellsPerCluster_Mod5");
416  hNCellsPerClusterMod5->SetStats(kFALSE);
417  if(trigger=="EMC7"){sprintf(legend2,"Run %i EMC Mod 5",run);}
418  else {sprintf(legend2,"Run %i Mod 5",run);}
419  hNCellsPerClusterMod5->SetTitle(legend2);
420 
421  TH2F * hNCellsPerClusterMod6 =(TH2F *)outputList->FindObject("EMCAL_hNCellsPerCluster_Mod6");
422  hNCellsPerClusterMod6->SetStats(kFALSE);
423  if(trigger=="EMC7"){sprintf(legend2,"Run %i EMC Mod 6",run);}
424  else {sprintf(legend2,"Run %i Mod 6",run);}
425  hNCellsPerClusterMod6->SetTitle(legend2);
426 
427  TH2F * hNCellsPerClusterMod7 =(TH2F *)outputList->FindObject("EMCAL_hNCellsPerCluster_Mod7");
428  hNCellsPerClusterMod7->SetStats(kFALSE);
429  if(trigger=="EMC7"){sprintf(legend2,"Run %i EMC Mod 7",run);}
430  else {sprintf(legend2,"Run %i Mod 7",run);}
431  hNCellsPerClusterMod7->SetTitle(legend2);
432 
433  TH2F * hNCellsPerClusterMod8 =(TH2F *)outputList->FindObject("EMCAL_hNCellsPerCluster_Mod8");
434  hNCellsPerClusterMod8->SetStats(kFALSE);
435  if(trigger=="EMC7"){sprintf(legend2,"Run %i EMC Mod 8",run);}
436  else {sprintf(legend2,"Run %i Mod 8",run);}
437  hNCellsPerClusterMod8->SetTitle(legend2);
438 
439  TH2F * hNCellsPerClusterMod9 =(TH2F *)outputList->FindObject("EMCAL_hNCellsPerCluster_Mod9");
440  hNCellsPerClusterMod9->SetStats(kFALSE);
441  if(trigger=="EMC7"){sprintf(legend2,"Run %i EMC Mod 9",run);}
442  else {sprintf(legend2,"Run %i Mod 9",run);}
443  hNCellsPerClusterMod9->SetTitle(legend2);
444 
445  TCanvas * c31 = new TCanvas("Time Vs E ", "Time Vs E", 600, 600);
446  c31->SetLogz();
447  c31->SetFillColor(0);
448  c31->SetBorderSize(0);
449  c31->SetFrameBorderMode(0);
450  // c31->SetOptStat(0);
451  hClusterTimeEnergy->SetYTitle("EMCAL ToF(ns)");
452  hClusterTimeEnergy->GetYaxis()->SetTitleOffset(1.2);
453  hClusterTimeEnergy->GetYaxis()->SetLabelSize(0.03);
454 
455  hClusterTimeEnergy->GetZaxis()->SetLabelSize(0.02);
456  hClusterTimeEnergy->GetZaxis()->SetTitleSize(0.03);
457  hClusterTimeEnergy->GetZaxis()->SetTitleOffset(0.03);
458  hClusterTimeEnergy->SetAxisRange(0.,50.);
459  hClusterTimeEnergy->Draw("colz");
460  c31->cd();
461 
462  outfilename = base + "TimeRun.pdf" ;
463  outfilename2 = base + "TimeRun.gif" ;
464 
465  c31->SaveAs(outfilename);
466  c31->SaveAs(outfilename2);
467 
468 
469  TCanvas * c32 = new TCanvas(" Cluster Vs Track ","Cluster vs Track", 600, 600);
470  c32->SetLogz();
471  c32->SetFillColor(0);
472  c32->SetBorderSize(0);
473  c32->SetFrameBorderMode(0);
474  // c31->SetOptStat(0);
475 
476 
477  hClusterVsTrack->GetYaxis()->SetTitleOffset(1.2);
478  hClusterVsTrack->GetYaxis()->SetLabelSize(0.03);
479 
480  hClusterVsTrack->GetZaxis()->SetLabelSize(0.02);
481  hClusterVsTrack->GetZaxis()->SetTitleSize(0.03);
482  hClusterVsTrack->GetZaxis()->SetTitleOffset(0.03);
483  hClusterVsTrack->SetAxisRange(0.,1200.);
484  hClusterVsTrack->Draw("colz");
485  c32->cd();
486 
487  outfilename = base + "CaloTrackMult.pdf";
488 
489  outfilename2 = base + "CaloTrackMult.gif";
490 
491  c32->SaveAs(outfilename);
492 
493  c32->SaveAs(outfilename2);
494 
495 
496  TCanvas * c33 = new TCanvas(" Cluster E Vs Track ","Cluster E vs Track", 600, 600);
497  c33->SetLogz();
498  c33->SetFillColor(0);
499  c33->SetBorderSize(0);
500  c33->SetFrameBorderMode(0);
501  // c31->SetOptStat(0);
502 
503  hClusterEVsTrack->GetYaxis()->SetTitleOffset(1.2);
504  hClusterEVsTrack->GetYaxis()->SetLabelSize(0.03);
505 
506  hClusterEVsTrack->GetZaxis()->SetLabelSize(0.02);
507  hClusterEVsTrack->GetZaxis()->SetTitleSize(0.03);
508  hClusterEVsTrack->GetZaxis()->SetTitleOffset(0.03);
509  hClusterEVsTrack->SetAxisRange(0.,1200.);
510  hClusterEVsTrack->Draw("colz");
511  c33->cd();
512 
513  outfilename = base + "CaloETrackMult.pdf";
514  outfilename2 = base + "CaloETrackMult.gif";
515 
516  c33->SaveAs(outfilename);
517 
518  c33->SaveAs(outfilename2);
519 
520  TCanvas * c34 = new TCanvas(" Cluster E Vs V0 ","Cluster E vs V0", 600, 600);
521  c34->SetLogz();
522  c34->SetFillColor(0);
523  c34->SetBorderSize(0);
524  c34->SetFrameBorderMode(0);
525  // c31->SetOptStat(0);
526 
527 
528  hClusterEVsV0S->GetYaxis()->SetTitleOffset(1.2);
529  hClusterEVsV0S->GetYaxis()->SetLabelSize(0.03);
530 
531  hClusterEVsV0S->GetZaxis()->SetLabelSize(0.02);
532  hClusterEVsV0S->GetZaxis()->SetTitleSize(0.03);
533  hClusterEVsV0S->GetZaxis()->SetTitleOffset(0.03);
534  hClusterEVsV0S->GetYaxis()->SetRangeUser(0.,50.);
535  hClusterEVsV0S->Draw("colz");
536  c34->cd();
537 
538 
539  outfilename = base + "CaloEVsV0s.pdf";
540  outfilename2 = base + "CaloEVsV0s.gif";
541 
542  c34->SaveAs(outfilename);
543  c34->SaveAs(outfilename2);
544 
545 
546 
547 
548 
549  TCanvas * c35 = new TCanvas(" Cells per Cluster 0 ","Cells per Cluster 0", 1000, 1200);
550  c35->SetLogz();
551  c35->SetFillColor(0);
552  c35->SetBorderSize(0);
553  c35->SetFrameBorderMode(0);
554  // c31->SetOptStat(0);
555  c35->Divide(3,4);
556 
557  c35->cd(1);
558  gPad->SetLogz();
559  hNCellsPerClusterMod0->GetYaxis()->SetTitleOffset(1.2);
560  hNCellsPerClusterMod0->GetYaxis()->SetLabelSize(0.03);
561 
562  hNCellsPerClusterMod0->GetZaxis()->SetLabelSize(0.05);
563  hNCellsPerClusterMod0->GetZaxis()->SetTitleSize(0.4);
564  hNCellsPerClusterMod0->GetZaxis()->SetTitleOffset(0.03);
565  hNCellsPerClusterMod0->GetYaxis()->SetRangeUser(0.,30.);
566  hNCellsPerClusterMod0->GetXaxis()->SetRangeUser(0.,20.);
567  hNCellsPerClusterMod0->Draw("colz");
568  c35->cd(2);
569 
570  gPad->SetLogz();
571  hNCellsPerClusterMod1->GetYaxis()->SetTitleOffset(1.2);
572  hNCellsPerClusterMod1->GetYaxis()->SetLabelSize(0.03);
573 
574  hNCellsPerClusterMod1->GetZaxis()->SetLabelSize(0.05);
575  hNCellsPerClusterMod1->GetZaxis()->SetTitleSize(0.2);
576  hNCellsPerClusterMod1->GetZaxis()->SetTitleOffset(0.03);
577  hNCellsPerClusterMod1->GetYaxis()->SetRangeUser(0.,30.);
578  hNCellsPerClusterMod1->GetXaxis()->SetRangeUser(0.,20.);
579  hNCellsPerClusterMod1->Draw("colz");
580  c35->cd(3);
581  gPad->SetLogz();
582 
583 
584  hNCellsPerClusterMod2->GetYaxis()->SetTitleOffset(1.2);
585  hNCellsPerClusterMod2->GetYaxis()->SetLabelSize(0.03);
586 
587  hNCellsPerClusterMod2->GetZaxis()->SetLabelSize(0.05);
588  hNCellsPerClusterMod2->GetZaxis()->SetTitleSize(0.04);
589  hNCellsPerClusterMod2->GetZaxis()->SetTitleOffset(0.03);
590  hNCellsPerClusterMod2->GetYaxis()->SetRangeUser(0.,30.);
591  hNCellsPerClusterMod2->GetXaxis()->SetRangeUser(0.,20.);
592  hNCellsPerClusterMod2->Draw("colz");
593  c35->cd(4);
594 
595  gPad->SetLogz();
596  hNCellsPerClusterMod3->GetYaxis()->SetTitleOffset(1.2);
597  hNCellsPerClusterMod3->GetYaxis()->SetLabelSize(0.03);
598  hNCellsPerClusterMod3->GetZaxis()->SetLabelSize(0.05);
599  hNCellsPerClusterMod3->GetZaxis()->SetTitleSize(0.04);
600  hNCellsPerClusterMod3->GetZaxis()->SetTitleOffset(0.03);
601  hNCellsPerClusterMod3->GetYaxis()->SetRangeUser(0.,30.);
602  hNCellsPerClusterMod3->GetXaxis()->SetRangeUser(0.,20.);
603  hNCellsPerClusterMod3->Draw("colz");
604 
605  c35->cd(5);
606  gPad->SetLogz();
607 
608  hNCellsPerClusterMod4->GetYaxis()->SetTitleOffset(1.2);
609  hNCellsPerClusterMod4->GetYaxis()->SetLabelSize(0.03);
610  hNCellsPerClusterMod4->GetZaxis()->SetLabelSize(0.05);
611  hNCellsPerClusterMod4->GetZaxis()->SetTitleSize(0.04);
612  hNCellsPerClusterMod4->GetZaxis()->SetTitleOffset(0.03);
613  hNCellsPerClusterMod4->GetYaxis()->SetRangeUser(0.,30.);
614  hNCellsPerClusterMod4->GetXaxis()->SetRangeUser(0.,20.);
615  hNCellsPerClusterMod4->Draw("colz");
616 
617 
618 
619  c35->cd(6);
620  gPad->SetLogz();
621 
622  hNCellsPerClusterMod5->GetYaxis()->SetTitleOffset(1.2);
623  hNCellsPerClusterMod5->GetYaxis()->SetLabelSize(0.03);
624  hNCellsPerClusterMod5->GetZaxis()->SetLabelSize(0.05);
625  hNCellsPerClusterMod5->GetZaxis()->SetTitleSize(0.04);
626  hNCellsPerClusterMod5->GetZaxis()->SetTitleOffset(0.03);
627  hNCellsPerClusterMod5->GetYaxis()->SetRangeUser(0.,30.);
628  hNCellsPerClusterMod5->GetXaxis()->SetRangeUser(0.,20.);
629  hNCellsPerClusterMod5->Draw("colz");
630 
631 
632  c35->cd(7);
633  gPad->SetLogz();
634 
635  hNCellsPerClusterMod6->GetYaxis()->SetTitleOffset(1.2);
636  hNCellsPerClusterMod6->GetYaxis()->SetLabelSize(0.03);
637  hNCellsPerClusterMod6->GetZaxis()->SetLabelSize(0.05);
638  hNCellsPerClusterMod6->GetZaxis()->SetTitleSize(0.04);
639  hNCellsPerClusterMod6->GetZaxis()->SetTitleOffset(0.03);
640  hNCellsPerClusterMod6->GetYaxis()->SetRangeUser(0.,30.);
641  hNCellsPerClusterMod6->GetXaxis()->SetRangeUser(0.,20.);
642  hNCellsPerClusterMod6->Draw("colz");
643 
644  c35->cd(8);
645  gPad->SetLogz();
646 
647  hNCellsPerClusterMod7->GetYaxis()->SetTitleOffset(1.2);
648  hNCellsPerClusterMod7->GetYaxis()->SetLabelSize(0.03);
649  hNCellsPerClusterMod7->GetZaxis()->SetLabelSize(0.05);
650  hNCellsPerClusterMod7->GetZaxis()->SetTitleSize(0.04);
651  hNCellsPerClusterMod7->GetZaxis()->SetTitleOffset(0.03);
652  hNCellsPerClusterMod7->GetYaxis()->SetRangeUser(0.,30.);
653  hNCellsPerClusterMod7->GetXaxis()->SetRangeUser(0.,20.);
654  hNCellsPerClusterMod7->Draw("colz");
655 
656 
657  c35->cd(9);
658 
659  gPad->SetLogz();
660  hNCellsPerClusterMod8->GetYaxis()->SetTitleOffset(1.2);
661  hNCellsPerClusterMod8->GetYaxis()->SetLabelSize(0.03);
662  hNCellsPerClusterMod8->GetZaxis()->SetLabelSize(0.05);
663  hNCellsPerClusterMod8->GetZaxis()->SetTitleSize(0.04);
664  hNCellsPerClusterMod8->GetZaxis()->SetTitleOffset(0.03);
665  hNCellsPerClusterMod8->GetYaxis()->SetRangeUser(0.,30.);
666  hNCellsPerClusterMod8->GetXaxis()->SetRangeUser(0.,20.);
667  hNCellsPerClusterMod8->Draw("colz");
668 
669  c35->cd(10);
670  gPad->SetLogz();
671 
672  hNCellsPerClusterMod9->GetYaxis()->SetTitleOffset(1.2);
673  hNCellsPerClusterMod9->GetYaxis()->SetLabelSize(0.03);
674  hNCellsPerClusterMod9->GetZaxis()->SetLabelSize(0.05);
675  hNCellsPerClusterMod9->GetZaxis()->SetTitleSize(0.04);
676  hNCellsPerClusterMod9->GetZaxis()->SetTitleOffset(0.03);
677  hNCellsPerClusterMod9->GetYaxis()->SetRangeUser(0.,30.);
678  hNCellsPerClusterMod9->GetXaxis()->SetRangeUser(0.,20.);
679  hNCellsPerClusterMod9->Draw("colz");
680 
681  outfilename = base + "CellsperCluster.pdf";
682  outfilename2 = base + "CellsperCluster.gif";
683 
684 
685  c35->SaveAs(outfilename);
686  c35->SaveAs(outfilename2);
687 }
void QAplots(TString fCalorimeter="EMCAL", TString period="LHC11h", TString pass="pass1_HLT", TString trigger="default")
Definition: QAplots.C:64
double Double_t
Definition: External.C:58
Definition: External.C:236
const char * title
Definition: MakeQAPdf.C:27
void DrawOccupancy(Int_t run, TString period="LHC11h", TString pass="pass1_HLT", TString trigger="default", TFile *f=0x0)
Definition: QAplots.C:129
void DrawRun(const Int_t run=167713, TString period="LHC11h", TString pass="pass1_HLT", TString trigger="default", TFile *f=0x0)
Definition: QAplots.C:318
int Int_t
Definition: External.C:63
Definition: External.C:228
TH1 * Ratio(const TH1 *h1, const TH1 *h2)
Definition: DrawMCResult.C:70
TFile * file
TList with histograms for a given trigger.
TDirectoryFile * dir