AliPhysics  d497afb (d497afb)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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  FILE * pFile;
57  TString file = "";
58  if (trigger=="default") file = "/scratch/alicehp2/germain/QA/"+period+"/"+ pass + "/runlistMB.txt" ;
59  else file = "/scratch/alicehp2/germain/QA/"+period+"/"+ pass + "/runlistEMC.txt" ;
60 
61  pFile = fopen(file.Data(), "r"); //open the text file where include the run list and correct run index
62 
63  cout << " fcalo: " << fCalorimeter << "; period: " << period << "; pass: " << pass << " trigger "<<trigger<< endl;
64 
65  Int_t p;
66  Int_t q;
67  Int_t ncols;
68  Int_t nlines = 0 ;
69  Int_t RunId[500] ;
70 
71  Double_t x[500] ;
72  Double_t xrun[500] ;
73 
74  while (1){
75  ncols = fscanf(pFile,"%d %d ",&p,&q);
76  if (ncols< 0) break;
77  x[nlines]=p;
78  RunId[nlines]=q;
79  xrun[nlines]=1.*q;
80  nlines++;
81  }
82  fclose(pFile);
83 
84  const Int_t nRun = nlines ;
85  TString base ;
86  for(Int_t i = 0 ; i < nRun ; i++) {
87  base = "/scratch/alicehp2/germain/QA/";
88  base += period ;
89  base += "/";
90  base += pass ;
91  base += "/";
92  base += RunId[i] ;
93  TString infile ;
94  infile = base + ".root" ;
95  TFile *f = TFile::Open(infile);
96  DrawOccupancy(RunId[i],period,pass,trigger,f);
97  DrawRun(RunId[i],period,pass,trigger,f);
98  f->Close();
99  }
100 }
101 
102 void QAplots(Int_t run, TString period ="LHC11h", TString pass="pass1_HLT", TString trigger= "default")
103 {
104  TString base ;
105  base = "/scratch/alicehp2/germain/QA/";
106  base += period ;
107  base += "/";
108  base += pass ;
109  base += "/";
110  base += run ;
111  TString infile ;
112  infile = base + ".root" ;
113  TFile *f = TFile::Open(infile);
114  DrawOccupancy(run,period,pass,trigger,f);
115  DrawRun(run,period,pass,trigger,f);
116  f->Close();
117 }
118 
119 void DrawOccupancy(Int_t run , TString period ="LHC11h", TString pass="pass1_HLT",
120  TString trigger= "default", TFile *f =0x0)
121 {
122  TH2D *hEnergyMap = new TH2D("hEnergyMap","",96,-48,48,120,-0,120);
123  TH2D *hOccupancyMap = new TH2D("hOccupancyMap","",96,-48,48,120,-0,120);
124  TH2D *hEnergyMapReal = new TH2D("hEnergyMapReal","",96,-48,48,120,-0,120);
125  TH2D *hOccupancyMapReal = new TH2D("hOccupancyMapReal","",96,-48,48,120,-0,120);
126  hEnergyMapReal->SetXTitle("eta (bin)");
127  hEnergyMapReal->SetYTitle("phi (bin)");
128  hEnergyMapReal->SetZTitle("E(GeV)/event");
129  hEnergyMapReal->GetZaxis()->SetLabelSize(0.02);
130  hOccupancyMapReal->SetXTitle("eta (bin)");
131  hOccupancyMapReal->SetZTitle("entries/evt");
132  hOccupancyMapReal->GetZaxis()->SetLabelSize(0.02);
133  hOccupancyMapReal->SetXTitle("eta (bin)");
134  hEnergyMap->SetXTitle("eta (bin)");
135  hEnergyMap->SetYTitle("phi (bin)");
136  hOccupancyMap->SetXTitle("eta (bin)");
137  hOccupancyMap->SetYTitle("phi (bin)");
138 
139  gStyle->SetPalette(1);
140  gStyle->SetOptStat(0);
141 
142  AliEMCALGeometry *geom = new AliEMCALGeometry("EMCAL_COMPLETEv1","EMCAL");
143  Int_t nSupMod, nModule, nIphi, nIeta, nModulo, iRCU;
144  Int_t iphi, ieta,jj,kk;
145  Int_t icol, irow;
146  Int_t bineta, binphi;
147  Int_t realbineta, realbinphi;
148  TVector3 vg, gg;
149  Double_t eta, phi, glob[3];
150 
151 
152  //LHC11d
153  //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};
154 
155 
156  //LHC11e
157  //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};
158 
159  //LHC11f
160  // 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};
161 
162  //NO MASK
163  Int_t mask[1] = {2222222};
164 
165  TH2F *hCellAmplitude;
166  TH1F *hNEvents;
167  Int_t Events;
168  Int_t n=0;
169  TString base = "/scratch/alicehp2/germain/QA/";
170  base += period ;
171  base += "/";
172  base += pass ;
173  base += "/";
174  base += run ;
175  base += "/";
176  base += trigger;
177  // TString infile ;
178  //infile = base + ".root" ;
179  //*f = TFile::Open(infile);
180  TString direct = "CaloQA_";
181  direct += trigger;
182  TDirectoryFile *dir = (TDirectoryFile *)f->Get(direct);
183  TList *outputList = (TList*)dir->Get(direct);
184 
185  hNEvents =(TH1F *)outputList->FindObject("hNEvents");
186  Events = hNEvents->GetEntries();
187  hCellAmplitude =(TH2F *)outputList->FindObject("EMCAL_hAmpId");
188  //hCellAmplitude->Draw();
189  //TH2 *hCellAmplitude = (TH2*) gFile->Get("hCellAmplitude");
190  Double_t numb =0 ;
191  Double_t Eth=0;
192  Eth = 5.;
193  if ( trigger=="EMC7") Eth=20.;
194 
195 
196  for(Int_t i = 0; i < 11520 ; i++)
197  {
198  Double_t Esum = 0;
199  Double_t Nsum = 0;
200  Double_t EsumH = 0;
201  Double_t NsumH = 0;
202  Double_t Ratio = 0;
203 
204  for (Int_t j = 1; j <= hCellAmplitude->GetNbinsX(); j++)
205  {
206  Double_t E = hCellAmplitude->GetXaxis()->GetBinCenter(j);
207  Double_t N = hCellAmplitude->GetBinContent(j, i+1);
208 
209  if (E < 0.07) continue;
210  // if (E > 0.07) continue;
211 
212  if (E <= Eth) {
213  Esum += E*N;
214  Nsum += N;
215  }
216  else {
217  EsumH += E*N;
218  NsumH += N;
219  }
220  }
221 
222  if(NsumH > 100) Ratio = Nsum/NsumH ;
223  // if(Nsum > 20000 && Nsum < 22000 ) cout<<" "<<i ;
224 
225  Int_t absId = i;
226  if(n!=0) {if(mask[n]<=mask[n-1]) cout<<"not sorted list !!"<<endl;}
227  if(i==mask[n]){n++ ; continue; }
228  // if(Esum/(Double_t) Events > 0.5) cout<<"BAD : "<<i<<endl;
229 
230  // hBadCellMap->Fill(1)
231 
232 
233  geom->GetCellIndex(absId, nSupMod, nModule, nIphi, nIeta);
234  geom->GetCellPhiEtaIndexInSModule(nSupMod,nModule,nIphi,nIeta, iphi,ieta);
235 
236  realbinphi = 120-(nSupMod/2)*24 -iphi -1;
237 
238 
239  if (nSupMod%2==0) realbineta= 48-ieta -1;
240  if (nSupMod%2==1) realbineta= -ieta -1;
241 
242  // to do as usual (Gustavo) SM0 high left SM9 low right
243 
244  binphi = 96 - (nSupMod/2)*24 +iphi;
245  if (nSupMod%2==1) bineta=ieta;
246  /*
247  Int_t compt; if(i==0) compt = 1;
248  if(ieta==0){ cout<<compt <<endl ; compt ++;}
249  */
250  if (nSupMod%2==0) bineta=ieta-48;
251 
252  hEnergyMapReal->Fill(realbineta,realbinphi,Esum/(Double_t)Events);
253  hOccupancyMapReal->Fill(realbineta,realbinphi,Nsum/(Double_t)Events);
254  // }
255  }
256 
257  cout<<"N events : "<<Events<<endl;
258 
259  TString Energy ; Energy = base + "MapEnergy.pdf";
260  TString Entries ; Entries = base + "MapEntries.pdf";
261  TCanvas *c1 = new TCanvas("c1","energymap",800,800);
262  c1->SetFillColor(0);
263  c1->SetGrid();
264  c1->cd();
265  c1->SetRightMargin(0.14);
266  TString title = "run ";
267  title += run ;
268  title += " Summed energy map";
269  if(trigger=="EMC7") title += " EMC ";
270  hEnergyMapReal->SetTitle(title);
271  if(trigger== "EMC7"){
272  hEnergyMapReal->SetMinimum(0.001); //FOR Esum EMC triggers
273  hEnergyMapReal->SetMaximum(0.05); //FOR Esum
274  }else{
275  hEnergyMapReal->SetMinimum(0.005); //FOR Esum MB
276  hEnergyMapReal->SetMaximum(0.02); //FOR Esum
277  }
278  hEnergyMapReal->Draw("colz");
279 
280  c1->cd();
281  c1->SaveAs(Energy);
282 
283  TCanvas *c2 = new TCanvas("c2","occupancy",800,800);
284  //c2->SetLogz();
285  c2->SetFillColor(0);
286  c2->SetGrid();
287  c2->cd();
288  c2->SetRightMargin(0.14);
289  TString title2 = "run ";
290  title2 += run ;
291  title2 += " Occupancy map";
292  if(trigger=="EMC7") title2 += " EMC ";
293 
294  hOccupancyMapReal->SetTitle(title2);
295  //SCALE USE FOR LHC11h modify fotr pp
296  if(trigger== "EMC7"){
297  hOccupancyMapReal->SetMinimum(0.01); //FOR Nsum
298  hOccupancyMapReal->SetMaximum(0.5);} //FOR Nsum}
299  else{
300  hOccupancyMapReal->SetMinimum(0.01); //FOR Nsum
301  hOccupancyMapReal->SetMaximum(0.1); //FOR Nsum
302  }
303  hOccupancyMapReal->Draw("colz");
304  c2->cd();
305  c2->SaveAs(Entries);
306  c2->SaveAs(Entries2);
307 }
308 
309 void DrawRun(const Int_t run = 167713, TString period ="LHC11h",
310  TString pass="pass1_HLT", TString trigger= "default", TFile *f =0x0)
311 {
312  gStyle->SetPalette(1);
313  TString base = "/scratch/alicehp2/germain/QA/";
314  base += period ;
315  base += "/";
316  base += pass ;
317  base += "/";
318  TString outfilename ;
319  TString outfilename2 ;
320  base += run ;
321  base += "/" ;
322  base += trigger ;
323  char legend [100] ;
324  char legend2 [100] ;
325  TString direct = "CaloQA_";
326  direct += trigger;
327 
328 
329  TDirectoryFile *dir = (TDirectoryFile *)f->Get(direct);
330  TList *outputList = (TList*)dir->Get(direct);
331 
332 
333  if (trigger =="EMC7"){ sprintf(legend,"Run %i EMC ",run);}
334  else sprintf(legend,"Run %i ",run);
335 
336 
337 
338  hClusterTimeEnergy =(TH2F *)outputList->FindObject("EMCAL_hClusterTimeEnergy");
339 
340  TString title3 =" Time Vs Energy";
341  title3 += legend ;
342  hClusterTimeEnergy->SetStats(kFALSE);
343  hClusterTimeEnergy->SetTitle(title3);
344 
345  hClusterVsTrack =(TH2F *)outputList->FindObject("EMCAL_hCaloTrackMNClusters");
346  hClusterVsTrack->SetStats(kFALSE);
347  TString title3 =" N cluster Vs N track";
348  title3 += legend ;
349  hClusterVsTrack->SetTitle(title3);
350 
351 
352  hClusterEVsTrack =(TH2F *)outputList->FindObject("EMCAL_hCaloTrackMEClusters");
353  hClusterEVsTrack->SetStats(kFALSE);
354  hClusterEVsTrack->SetTitle(legend);
355  TString title3 =" Sum E cluster Vs N track";
356  title3 += legend ;
357  hClusterEVsTrack->SetTitle(title3);
358 
359 
360  hClusterEVsV0S =(TH2F *)outputList->FindObject("EMCAL_hCaloV0SEClusters");
361  hClusterEVsV0S->SetStats(kFALSE);
362  TString title3 =" Sum E cluster Vs V0 signal";
363  title3 += legend ;
364  hClusterEVsV0S->SetTitle(title3);
365 
366 
367  hNCellsPerClusterMod0 =(TH2F *)outputList->FindObject("EMCAL_hNCellsPerCluster_Mod0");
368  hNCellsPerClusterMod0->SetStats(kFALSE);
369 
370  if(trigger=="EMC7"){sprintf(legend2,"Run %i EMC Mod 0",run);}
371  else {sprintf(legend2,"Run %i Mod 0",run);}
372 
373 
374  hNCellsPerClusterMod0->SetTitle(legend2);
375 
376  hNCellsPerClusterMod1 =(TH2F *)outputList->FindObject("EMCAL_hNCellsPerCluster_Mod1");
377  hNCellsPerClusterMod1->SetStats(kFALSE);
378  if(trigger=="EMC7"){sprintf(legend2,"Run %i EMC Mod 1",run);}
379  else {sprintf(legend2,"Run %i Mod 1",run);}
380 
381 
382  hNCellsPerClusterMod1->SetTitle(legend2);
383 
384  hNCellsPerClusterMod2 =(TH2F *)outputList->FindObject("EMCAL_hNCellsPerCluster_Mod2");
385  hNCellsPerClusterMod2->SetStats(kFALSE);
386  if(trigger=="EMC7"){sprintf(legend2,"Run %i EMC Mod 2",run);}
387  else {sprintf(legend2,"Run %i Mod 2",run);}
388 
389  hNCellsPerClusterMod2->SetTitle(legend2);
390 
391  hNCellsPerClusterMod3 =(TH2F *)outputList->FindObject("EMCAL_hNCellsPerCluster_Mod3");
392  hNCellsPerClusterMod3->SetStats(kFALSE);
393  if(trigger=="EMC7"){sprintf(legend2,"Run %i EMC Mod 3",run);}
394  else {sprintf(legend2,"Run %i Mod 3",run);}
395 
396  hNCellsPerClusterMod3->SetTitle(legend2);
397 
398 
399  hNCellsPerClusterMod4 =(TH2F *)outputList->FindObject("EMCAL_hNCellsPerCluster_Mod4");
400  hNCellsPerClusterMod4->SetStats(kFALSE);
401  if(trigger=="EMC7"){sprintf(legend2,"Run %i EMC Mod 4",run);}
402  else {sprintf(legend2,"Run %i Mod 4",run);}
403 
404  hNCellsPerClusterMod4->SetTitle(legend2);
405 
406  hNCellsPerClusterMod5 =(TH2F *)outputList->FindObject("EMCAL_hNCellsPerCluster_Mod5");
407  hNCellsPerClusterMod5->SetStats(kFALSE);
408  if(trigger=="EMC7"){sprintf(legend2,"Run %i EMC Mod 5",run);}
409  else {sprintf(legend2,"Run %i Mod 5",run);}
410  hNCellsPerClusterMod5->SetTitle(legend2);
411 
412  hNCellsPerClusterMod6 =(TH2F *)outputList->FindObject("EMCAL_hNCellsPerCluster_Mod6");
413  hNCellsPerClusterMod6->SetStats(kFALSE);
414  if(trigger=="EMC7"){sprintf(legend2,"Run %i EMC Mod 6",run);}
415  else {sprintf(legend2,"Run %i Mod 6",run);}
416  hNCellsPerClusterMod6->SetTitle(legend2);
417 
418  hNCellsPerClusterMod7 =(TH2F *)outputList->FindObject("EMCAL_hNCellsPerCluster_Mod7");
419  hNCellsPerClusterMod7->SetStats(kFALSE);
420  if(trigger=="EMC7"){sprintf(legend2,"Run %i EMC Mod 7",run);}
421  else {sprintf(legend2,"Run %i Mod 7",run);}
422  hNCellsPerClusterMod7->SetTitle(legend2);
423 
424  hNCellsPerClusterMod8 =(TH2F *)outputList->FindObject("EMCAL_hNCellsPerCluster_Mod8");
425  hNCellsPerClusterMod8->SetStats(kFALSE);
426  if(trigger=="EMC7"){sprintf(legend2,"Run %i EMC Mod 8",run);}
427  else {sprintf(legend2,"Run %i Mod 8",run);}
428  hNCellsPerClusterMod8->SetTitle(legend2);
429 
430  hNCellsPerClusterMod9 =(TH2F *)outputList->FindObject("EMCAL_hNCellsPerCluster_Mod9");
431  hNCellsPerClusterMod9->SetStats(kFALSE);
432  if(trigger=="EMC7"){sprintf(legend2,"Run %i EMC Mod 9",run);}
433  else {sprintf(legend2,"Run %i Mod 9",run);}
434  hNCellsPerClusterMod9->SetTitle(legend2);
435 
436  TCanvas * c31 = new TCanvas("Time Vs E ", "Time Vs E", 600, 600);
437  c31->SetLogz();
438  c31->SetFillColor(0);
439  c31->SetBorderSize(0);
440  c31->SetFrameBorderMode(0);
441  // c31->SetOptStat(0);
442  hClusterTimeEnergy->SetYTitle("EMCAL ToF(ns)");
443  hClusterTimeEnergy->GetYaxis()->SetTitleOffset(1.2);
444  hClusterTimeEnergy->GetYaxis()->SetLabelSize(0.03);
445 
446  hClusterTimeEnergy->GetZaxis()->SetLabelSize(0.02);
447  hClusterTimeEnergy->GetZaxis()->SetTitleSize(0.03);
448  hClusterTimeEnergy->GetZaxis()->SetTitleOffset(0.03);
449  hClusterTimeEnergy->SetAxisRange(0.,50.);
450  hClusterTimeEnergy->Draw("colz");
451  c31->cd();
452 
453  outfilename = base + "TimeRun.pdf" ;
454  outfilename2 = base + "TimeRun.gif" ;
455 
456  c31->SaveAs(outfilename);
457  c31->SaveAs(outfilename2);
458 
459 
460  TCanvas * c32 = new TCanvas(" Cluster Vs Track ","Cluster vs Track", 600, 600);
461  c32->SetLogz();
462  c32->SetFillColor(0);
463  c32->SetBorderSize(0);
464  c32->SetFrameBorderMode(0);
465  // c31->SetOptStat(0);
466 
467 
468  hClusterVsTrack->GetYaxis()->SetTitleOffset(1.2);
469  hClusterVsTrack->GetYaxis()->SetLabelSize(0.03);
470 
471  hClusterVsTrack->GetZaxis()->SetLabelSize(0.02);
472  hClusterVsTrack->GetZaxis()->SetTitleSize(0.03);
473  hClusterVsTrack->GetZaxis()->SetTitleOffset(0.03);
474  hClusterVsTrack->SetAxisRange(0.,1200.);
475  hClusterVsTrack->Draw("colz");
476  c32->cd();
477 
478  outfilename = base + "CaloTrackMult.pdf";
479 
480  outfilename2 = base + "CaloTrackMult.gif";
481 
482  c32->SaveAs(outfilename);
483 
484  c32->SaveAs(outfilename2);
485 
486 
487  TCanvas * c33 = new TCanvas(" Cluster E Vs Track ","Cluster E vs Track", 600, 600);
488  c33->SetLogz();
489  c33->SetFillColor(0);
490  c33->SetBorderSize(0);
491  c33->SetFrameBorderMode(0);
492  // c31->SetOptStat(0);
493 
494  hClusterEVsTrack->GetYaxis()->SetTitleOffset(1.2);
495  hClusterEVsTrack->GetYaxis()->SetLabelSize(0.03);
496 
497  hClusterEVsTrack->GetZaxis()->SetLabelSize(0.02);
498  hClusterEVsTrack->GetZaxis()->SetTitleSize(0.03);
499  hClusterEVsTrack->GetZaxis()->SetTitleOffset(0.03);
500  hClusterEVsTrack->SetAxisRange(0.,1200.);
501  hClusterEVsTrack->Draw("colz");
502  c33->cd();
503 
504  outfilename = base + "CaloETrackMult.pdf";
505  outfilename2 = base + "CaloETrackMult.gif";
506 
507  c33->SaveAs(outfilename);
508 
509  c33->SaveAs(outfilename2);
510 
511  TCanvas * c34 = new TCanvas(" Cluster E Vs V0 ","Cluster E vs V0", 600, 600);
512  c34->SetLogz();
513  c34->SetFillColor(0);
514  c34->SetBorderSize(0);
515  c34->SetFrameBorderMode(0);
516  // c31->SetOptStat(0);
517 
518 
519  hClusterEVsV0S->GetYaxis()->SetTitleOffset(1.2);
520  hClusterEVsV0S->GetYaxis()->SetLabelSize(0.03);
521 
522  hClusterEVsV0S->GetZaxis()->SetLabelSize(0.02);
523  hClusterEVsV0S->GetZaxis()->SetTitleSize(0.03);
524  hClusterEVsV0S->GetZaxis()->SetTitleOffset(0.03);
525  hClusterEVsV0S->GetYaxis()->SetRangeUser(0.,50.);
526  hClusterEVsV0S->Draw("colz");
527  c34->cd();
528 
529 
530  outfilename = base + "CaloEVsV0s.pdf";
531  outfilename2 = base + "CaloEVsV0s.gif";
532 
533  c34->SaveAs(outfilename);
534  c34->SaveAs(outfilename2);
535 
536 
537 
538 
539 
540  TCanvas * c35 = new TCanvas(" Cells per Cluster 0 ","Cells per Cluster 0", 1000, 1200);
541  c35->SetLogz();
542  c35->SetFillColor(0);
543  c35->SetBorderSize(0);
544  c35->SetFrameBorderMode(0);
545  // c31->SetOptStat(0);
546  c35->Divide(3,4);
547 
548  c35->cd(1);
549  gPad->SetLogz();
550  hNCellsPerClusterMod0->GetYaxis()->SetTitleOffset(1.2);
551  hNCellsPerClusterMod0->GetYaxis()->SetLabelSize(0.03);
552 
553  hNCellsPerClusterMod0->GetZaxis()->SetLabelSize(0.05);
554  hNCellsPerClusterMod0->GetZaxis()->SetTitleSize(0.4);
555  hNCellsPerClusterMod0->GetZaxis()->SetTitleOffset(0.03);
556  hNCellsPerClusterMod0->GetYaxis()->SetRangeUser(0.,30.);
557  hNCellsPerClusterMod0->GetXaxis()->SetRangeUser(0.,20.);
558  hNCellsPerClusterMod0->Draw("colz");
559  c35->cd(2);
560 
561  gPad->SetLogz();
562  hNCellsPerClusterMod1->GetYaxis()->SetTitleOffset(1.2);
563  hNCellsPerClusterMod1->GetYaxis()->SetLabelSize(0.03);
564 
565  hNCellsPerClusterMod1->GetZaxis()->SetLabelSize(0.05);
566  hNCellsPerClusterMod1->GetZaxis()->SetTitleSize(0.2);
567  hNCellsPerClusterMod1->GetZaxis()->SetTitleOffset(0.03);
568  hNCellsPerClusterMod1->GetYaxis()->SetRangeUser(0.,30.);
569  hNCellsPerClusterMod1->GetXaxis()->SetRangeUser(0.,20.);
570  hNCellsPerClusterMod1->Draw("colz");
571  c35->cd(3);
572  gPad->SetLogz();
573 
574 
575  hNCellsPerClusterMod2->GetYaxis()->SetTitleOffset(1.2);
576  hNCellsPerClusterMod2->GetYaxis()->SetLabelSize(0.03);
577 
578  hNCellsPerClusterMod2->GetZaxis()->SetLabelSize(0.05);
579  hNCellsPerClusterMod2->GetZaxis()->SetTitleSize(0.04);
580  hNCellsPerClusterMod2->GetZaxis()->SetTitleOffset(0.03);
581  hNCellsPerClusterMod2->GetYaxis()->SetRangeUser(0.,30.);
582  hNCellsPerClusterMod2->GetXaxis()->SetRangeUser(0.,20.);
583  hNCellsPerClusterMod2->Draw("colz");
584  c35->cd(4);
585 
586  gPad->SetLogz();
587  hNCellsPerClusterMod3->GetYaxis()->SetTitleOffset(1.2);
588  hNCellsPerClusterMod3->GetYaxis()->SetLabelSize(0.03);
589  hNCellsPerClusterMod3->GetZaxis()->SetLabelSize(0.05);
590  hNCellsPerClusterMod3->GetZaxis()->SetTitleSize(0.04);
591  hNCellsPerClusterMod3->GetZaxis()->SetTitleOffset(0.03);
592  hNCellsPerClusterMod3->GetYaxis()->SetRangeUser(0.,30.);
593  hNCellsPerClusterMod3->GetXaxis()->SetRangeUser(0.,20.);
594  hNCellsPerClusterMod3->Draw("colz");
595 
596  c35->cd(5);
597  gPad->SetLogz();
598 
599  hNCellsPerClusterMod4->GetYaxis()->SetTitleOffset(1.2);
600  hNCellsPerClusterMod4->GetYaxis()->SetLabelSize(0.03);
601  hNCellsPerClusterMod4->GetZaxis()->SetLabelSize(0.05);
602  hNCellsPerClusterMod4->GetZaxis()->SetTitleSize(0.04);
603  hNCellsPerClusterMod4->GetZaxis()->SetTitleOffset(0.03);
604  hNCellsPerClusterMod4->GetYaxis()->SetRangeUser(0.,30.);
605  hNCellsPerClusterMod4->GetXaxis()->SetRangeUser(0.,20.);
606  hNCellsPerClusterMod4->Draw("colz");
607 
608 
609 
610  c35->cd(6);
611  gPad->SetLogz();
612 
613  hNCellsPerClusterMod5->GetYaxis()->SetTitleOffset(1.2);
614  hNCellsPerClusterMod5->GetYaxis()->SetLabelSize(0.03);
615  hNCellsPerClusterMod5->GetZaxis()->SetLabelSize(0.05);
616  hNCellsPerClusterMod5->GetZaxis()->SetTitleSize(0.04);
617  hNCellsPerClusterMod5->GetZaxis()->SetTitleOffset(0.03);
618  hNCellsPerClusterMod5->GetYaxis()->SetRangeUser(0.,30.);
619  hNCellsPerClusterMod5->GetXaxis()->SetRangeUser(0.,20.);
620  hNCellsPerClusterMod5->Draw("colz");
621 
622 
623  c35->cd(7);
624  gPad->SetLogz();
625 
626  hNCellsPerClusterMod6->GetYaxis()->SetTitleOffset(1.2);
627  hNCellsPerClusterMod6->GetYaxis()->SetLabelSize(0.03);
628  hNCellsPerClusterMod6->GetZaxis()->SetLabelSize(0.05);
629  hNCellsPerClusterMod6->GetZaxis()->SetTitleSize(0.04);
630  hNCellsPerClusterMod6->GetZaxis()->SetTitleOffset(0.03);
631  hNCellsPerClusterMod6->GetYaxis()->SetRangeUser(0.,30.);
632  hNCellsPerClusterMod6->GetXaxis()->SetRangeUser(0.,20.);
633  hNCellsPerClusterMod6->Draw("colz");
634 
635  c35->cd(8);
636  gPad->SetLogz();
637 
638  hNCellsPerClusterMod7->GetYaxis()->SetTitleOffset(1.2);
639  hNCellsPerClusterMod7->GetYaxis()->SetLabelSize(0.03);
640  hNCellsPerClusterMod7->GetZaxis()->SetLabelSize(0.05);
641  hNCellsPerClusterMod7->GetZaxis()->SetTitleSize(0.04);
642  hNCellsPerClusterMod7->GetZaxis()->SetTitleOffset(0.03);
643  hNCellsPerClusterMod7->GetYaxis()->SetRangeUser(0.,30.);
644  hNCellsPerClusterMod7->GetXaxis()->SetRangeUser(0.,20.);
645  hNCellsPerClusterMod7->Draw("colz");
646 
647 
648  c35->cd(9);
649 
650  gPad->SetLogz();
651  hNCellsPerClusterMod8->GetYaxis()->SetTitleOffset(1.2);
652  hNCellsPerClusterMod8->GetYaxis()->SetLabelSize(0.03);
653  hNCellsPerClusterMod8->GetZaxis()->SetLabelSize(0.05);
654  hNCellsPerClusterMod8->GetZaxis()->SetTitleSize(0.04);
655  hNCellsPerClusterMod8->GetZaxis()->SetTitleOffset(0.03);
656  hNCellsPerClusterMod8->GetYaxis()->SetRangeUser(0.,30.);
657  hNCellsPerClusterMod8->GetXaxis()->SetRangeUser(0.,20.);
658  hNCellsPerClusterMod8->Draw("colz");
659 
660  c35->cd(10);
661  gPad->SetLogz();
662 
663  hNCellsPerClusterMod9->GetYaxis()->SetTitleOffset(1.2);
664  hNCellsPerClusterMod9->GetYaxis()->SetLabelSize(0.03);
665  hNCellsPerClusterMod9->GetZaxis()->SetLabelSize(0.05);
666  hNCellsPerClusterMod9->GetZaxis()->SetTitleSize(0.04);
667  hNCellsPerClusterMod9->GetZaxis()->SetTitleOffset(0.03);
668  hNCellsPerClusterMod9->GetYaxis()->SetRangeUser(0.,30.);
669  hNCellsPerClusterMod9->GetXaxis()->SetRangeUser(0.,20.);
670  hNCellsPerClusterMod9->Draw("colz");
671 
672  outfilename = base + "CellsperCluster.pdf";
673  outfilename2 = base + "CellsperCluster.gif";
674 
675 
676  c35->SaveAs(outfilename);
677  c35->SaveAs(outfilename2);
678 }
void QAplots(TString fCalorimeter="EMCAL", TString period="LHC11h", TString pass="pass1_HLT", TString trigger="default")
Definition: QAplots.C:54
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:119
void DrawRun(const Int_t run=167713, TString period="LHC11h", TString pass="pass1_HLT", TString trigger="default", TFile *f=0x0)
Definition: QAplots.C:309
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