AliPhysics  c6e65cb (c6e65cb)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
helperMacrosOADBBC.C
Go to the documentation of this file.
1 
20 
21 
22 // --- ROOT system ---
23 #include <Riostream.h>
24 #include <TH2D.h>
25 #include <TFile.h>
26 #include <TCanvas.h>
27 #include <TLatex.h>
28 #include <TLegend.h>
29 #include <TStyle.h>
30 
31 // --- ANALYSIS system ---
32 #include "AliEMCALGeometry.h" //include when compile
33 #include "AliCalorimeterUtils.h" //include when compile
34 #include "AliAODEvent.h" //include when compile
35 #include "AliOADBContainer.h" //include when compile
36 
37 void SetHisto(TH1 *Histo,TString Xtitel,TString Ytitel);
38 void CanvasPartition(TCanvas *C,const Int_t Nx = 2,const Int_t Ny = 2, Float_t lMargin = 0.15, Float_t rMargin = 0.05, Float_t bMargin = 0.15, Float_t tMargin = 0.05);
39 
44 void Sort_RunNumbers(TString period="LHC15n",Int_t trainNo=603,TString runList="")
45 {
46  //......................................................
47  //..open the text file and save the run IDs into the RunId[] array
48  cout<<"o o o Open .txt file with run indices. Name = " << runList << endl;
49  TString RunPath1 = Form("./AnalysisInput/%s/Train_%i/%s",period.Data(),trainNo,runList.Data());
50  cout<<"o o o Open .txt file with run indices = " << RunPath1 << endl;
51  FILE *pFile1 = fopen(RunPath1.Data(), "r");
52  if(!pFile1)
53  {
54  cout<<"couldn't open file "<<RunPath1<<"!"<<endl;
55  return;
56  }
57  Int_t q1;
58  Int_t ncols1;
59  Int_t nlines1 = 0 ;
60  std::vector<Int_t> RunIdVec1;
61  while (1)
62  {
63  ncols1 = fscanf(pFile1," %d ",&q1);
64  if (ncols1< 0) break;
65  RunIdVec1.push_back(q1);
66  nlines1++;
67  }
68  fclose(pFile1);
69  std::sort (RunIdVec1.begin(), RunIdVec1.end());
70  //.......................................................
71  cout<<"Runs in Order: "<<endl;
72  for(Int_t iRun = 0; iRun < (Int_t)RunIdVec1.size(); iRun++)
73  {
74  cout<<RunIdVec1.at(iRun)<<", "<<flush;
75  }
76  cout<<endl;
77 }
84 void Test_OADB(TString period="LHC15n",Int_t trainNo=603,TString version="INT7Emc",TString runList="")
85 {
86  gStyle->SetOptStat(0); //..Do not plot stat boxes
87  //......................................................
88  // Test if the file committed to OADB is correct
89  //......................................................
90  Int_t nSM = 20;
91  TH1C *h[20];
92  Int_t cellColumnAbs,cellRowAbs,trash,cellID;
93  TString summaryPDF=Form("./AnalysisOutput/%s/Train_%i/OADB_Summary.pdf",period.Data(),trainNo);
94 
95  //......................................................
96  //..open the text file and save the run IDs into the RunId[] array
97  cout<<"o o o Open .txt file with run indices. Name = " << runList << endl;
98  TString RunPath = Form("./AnalysisInput/%s/Train_%i/%s",period.Data(),trainNo,runList.Data());
99  cout<<"o o o Open .txt file with run indices = " << RunPath << endl;
100  FILE *pFile = fopen(RunPath.Data(), "r");
101  if(!pFile)
102  {
103  cout<<"couldn't open file "<<RunPath<<"!"<<endl;
104  return;
105  }
106  Int_t q;
107  Int_t ncols;
108  Int_t nlines = 0 ;
109  Int_t RunId[500] ;
110  std::vector<Int_t> RunIdVec;
111  while (1)
112  {
113  ncols = fscanf(pFile," %d ",&q);
114  if (ncols< 0) break;
115  RunId[nlines]=q;
116  RunIdVec.push_back(q);
117  nlines++;
118  }
119  fclose(pFile);
120  //..sort the vector by size to be shure to use the right order
121  std::sort (RunIdVec.begin(), RunIdVec.end());
122  Int_t nRuns=RunIdVec.size();
123  //......................................................
124  //..Get the OADB information
125  //TString fBasePath="/Users/Eliane/Software/alice/sw/osx_x86-64/AliPhysics/latest-ali-master/OADB/EMCAL"; //..from AliPhysics
126  TString fBasePath="."; //..locally from OADB commit/e-mail to test quickly
127 
128  AliOADBContainer *cont=new AliOADBContainer("");
129  cont->InitFromFile(Form("%s/EMCALBadChannels.root",fBasePath.Data()),"AliEMCALBadChannels");
130  //......................................................
131  //..Get the .root file with the original histogram to compare if they coincide
132  //TString path = Form("/Users/Eliane/Software/BadChannelAnalysis/AnalysisOutput/%s/Train_%i/VersionINT7Glob",period.Data(),trainNo);
133  //TString path = Form("/Users/Eliane/Software/BadChannelAnalysis/AnalysisOutput/%s/Train_%i/Version4ManMasked",period.Data(),trainNo);
134  TString path = Form("./AnalysisOutput/%s/Train_%i/Version%s",period.Data(),trainNo,version.Data());
135  TString rootFileName= Form("%s_INT7_Histograms_V%s.root",period.Data(),version.Data());
136  TFile* outputRoot = TFile::Open(Form("%s/%s",path.Data(),rootFileName.Data()));
137 
138  if(!outputRoot)cout<<"File "<<outputRoot->GetName()<<" does not exist"<<endl;
139  TH2F* h2DChannelMap_FlagBad =(TH2F*)outputRoot->Get("2DChannelMap_Flag2");
140  TH2F* h2DChannelMap_FlagDead=(TH2F*)outputRoot->Get("2DChannelMap_Flag1");
141 
142  //......................................................
143  //..Initialize EMCal/DCal geometry
144  AliCalorimeterUtils* fCaloUtils = new AliCalorimeterUtils();
145  //..Create a dummy event for the CaloUtils
146  AliAODEvent* aod = new AliAODEvent();
147  fCaloUtils->SetRunNumber(RunIdVec.at(0));
148  fCaloUtils->AccessGeometry(aod);
149  AliEMCALGeometry * geom = fCaloUtils->GetEMCALGeometry();
150 
151  //.......................................................
152  //..build two dimensional histogram with values row vs. column
153  //..with info from OADB
154  Int_t fNMaxCols = 48; //eta direction
155  Int_t fNMaxRows = 24; //phi direction
156 
157  Int_t fNMaxColsAbs = 2*fNMaxCols;
158  Int_t fNMaxRowsAbs = Int_t (nSM/2)*fNMaxRows; //multiply by number of supermodules
159  TString histoName;
160  histoName = Form("2DChannelMap_Flag_Bad");
161  TH2F *plot2D_Bad_OADB = new TH2F(histoName,histoName,fNMaxColsAbs+1,-0.5,fNMaxColsAbs+0.5, fNMaxRowsAbs+1,-0.5,fNMaxRowsAbs+0.5);
162  //*OADB looks like Marcels figures*/ TH2F *plot2D_Bad_OADB = new TH2F(histoName,histoName,fNMaxColsAbs,0,fNMaxColsAbs, fNMaxRowsAbs,0,fNMaxRowsAbs);
163  plot2D_Bad_OADB->GetXaxis()->SetTitle("cell column (#eta direction)");
164  plot2D_Bad_OADB->GetYaxis()->SetTitle("cell row (#phi direction)");
165  histoName = Form("2DChannelMap_Flag_Dead");
166  TH2F *plot2D_Dead_OADB = new TH2F(histoName,histoName,fNMaxColsAbs+1,-0.5,fNMaxColsAbs+0.5, fNMaxRowsAbs+1,-0.5,fNMaxRowsAbs+0.5);
167  //*OADB looks like Marcels figures*/ TH2F *plot2D_Dead_OADB = new TH2F(histoName,histoName,fNMaxColsAbs,0,fNMaxColsAbs, fNMaxRowsAbs,0,fNMaxRowsAbs);
168  plot2D_Dead_OADB->GetXaxis()->SetTitle("cell column (#eta direction)");
169  plot2D_Dead_OADB->GetYaxis()->SetTitle("cell row (#phi direction)");
170 
171  //.......................................................
172  //.. Read the Bad Channel map from OADB
173  TCanvas* C2 = new TCanvas("CompareCanvas","Compare OADB to LocalFile",1400,800);
174  C2->Divide(4,2);
175  TLatex* textA = new TLatex(0.5,0.8,"If empty -> good!");
176  textA->SetTextSize(0.04);
177  textA->SetTextColor(1);
178  textA->SetNDC();
179 
180  cout<<"Checking "<<nRuns<<" runs: "<<endl;
181  std::vector<Int_t> RunsWithoutMap;
182  std::vector<Int_t> RunsWithMap;
183 
184  for(Int_t iRun = 0; iRun < nRuns; iRun++)
185  {
186  //cout<<"------ run "<<RunIdVec.at(iRun)<<endl;
187  if(iRun%5==0)cout<<"."<<flush;
188  if(iRun%20==0)cout<<"Run No."<<iRun<<endl;
189  TObjArray *recal=(TObjArray*)cont->GetObject(RunIdVec.at(iRun));
190  if(!recal)
191  {
192  cout<<"Error - No bad map for run Number "<<RunIdVec.at(iRun)<<" online!!"<<endl;
193  RunsWithoutMap.push_back(RunIdVec.at(iRun));
194  continue;
195  }
196  RunsWithMap.push_back(RunIdVec.at(iRun));
197 
198  plot2D_Bad_OADB ->Reset();
199  plot2D_Dead_OADB->Reset();
200  for(Int_t iSM = 0; iSM < nSM; iSM++)
201  {
202  //..Bad map fore each module
203  h[iSM]=(TH1C *)recal->FindObject(Form("EMCALBadChannelMap_Mod%d",iSM));
204  //..Loop though the SM to set which cells are bad
205  for(Int_t column=0;column<48;column++)
206  {
207  for(Int_t row=0;row<24;row++)
208  {
209  Int_t inRow=row;
210  Int_t inCol=column;
211  cellID=geom->GetAbsCellIdFromCellIndexes(iSM,inRow,inCol);
212  fCaloUtils->GetModuleNumberCellIndexesAbsCaloMap(cellID,0,inCol,inRow,trash,cellColumnAbs,cellRowAbs);
213  if(h[iSM]->GetBinContent(column,row)>1)//..bad and warm
214  {
215  plot2D_Bad_OADB->SetBinContent(cellColumnAbs,cellRowAbs,1);
216  }
217  if(h[iSM]->GetBinContent(column,row)==1)//..dead
218  {
219  plot2D_Dead_OADB->SetBinContent(cellColumnAbs,cellRowAbs,1);
220  }
221  }
222  }
223  }
224  //..................................................................
225  TLatex* text=new TLatex(0.15,0.85,Form("Run Number %i",RunIdVec.at(iRun)));
226  text->SetTextSize(0.05);
227  text->SetNDC();
228  text->SetTextColor(1);
229  text->SetTextAngle(0);
230 
231 
232  C2->cd(1);
233  plot2D_Dead_OADB->SetTitle("Dead Cells OADB");
234  plot2D_Dead_OADB->DrawCopy("colz");
235  text->Draw();
236  C2->cd(5);
237  plot2D_Bad_OADB->SetTitle("Bad Cells OADB");
238  plot2D_Bad_OADB->DrawCopy("colz");
239  C2->cd(2);
240  h2DChannelMap_FlagDead->SetTitle("Dead Cells LocalFile");
241  h2DChannelMap_FlagDead->DrawCopy("colz");
242  C2->cd(6);
243  h2DChannelMap_FlagBad->SetTitle("Bad Cells LocalFile");
244  h2DChannelMap_FlagBad->DrawCopy("colz");
245 
246  //..................................................................
247  C2->cd(4);
248  plot2D_Dead_OADB->SetTitle("OADB-Local File (Dead)");
249  plot2D_Dead_OADB->Add(h2DChannelMap_FlagDead,-1);
250  plot2D_Dead_OADB->DrawCopy("colz");
251  plot2D_Dead_OADB->Add(h2DChannelMap_FlagDead,+1);
252  textA->Draw();
253  C2->cd(8);
254  plot2D_Bad_OADB->SetTitle("OADB-Local File (Bad)");
255  plot2D_Bad_OADB->Add(h2DChannelMap_FlagBad,-1);
256  plot2D_Bad_OADB->DrawCopy("colz");
257  plot2D_Bad_OADB->Add(h2DChannelMap_FlagBad,+1);
258  textA->Draw();
259  C2->cd(3);
260  plot2D_Dead_OADB->SetTitle("OADB/Local File (Dead)");
261  plot2D_Dead_OADB->Divide(h2DChannelMap_FlagDead);
262  plot2D_Dead_OADB->DrawCopy("colz");
263  C2->cd(7);
264  plot2D_Bad_OADB->SetTitle("OADB/Local File (Bad)");
265  plot2D_Bad_OADB->Divide(h2DChannelMap_FlagBad);
266  plot2D_Bad_OADB->DrawCopy("colz");
267 
268  //..................................................................
269  //..Save to PDF
270  //..Add figures to the summary canvas
271  if(iRun==0) C2 ->Print(Form("%s(",summaryPDF.Data()));
272  else if (iRun==nRuns-1) C2 ->Print(Form("%s)",summaryPDF.Data()));
273  else C2 ->Print(Form("%s",summaryPDF.Data()));
274  }//end of run loop
275  cout<<"==Total Summary=="<<endl;
276  //..print runs without a correct map.
277  cout<<"Runs with a bad map ("<<RunsWithMap.size()<<"): "<<flush;
278  for(Int_t i=0;i<(Int_t)RunsWithMap.size();i++)
279  {
280  cout<<RunsWithMap.at(i)<<","<<flush;
281  }
282  cout<<endl;
283  cout<<"Runs without a bad map ("<<RunsWithoutMap.size()<<"): "<<flush;
284  for(Int_t i=0;i<(Int_t)RunsWithoutMap.size();i++)
285  {
286  cout<<RunsWithoutMap.at(i)<<","<<flush;
287  }
288  cout<<endl;
289 }
295 void Plot_CellList(TString period="LHC15n",Int_t trainNo=603,TString version="5",TString cellList="")
296 {
297  gStyle->SetPadTopMargin(0.05);//0.05
298  gStyle->SetPadBottomMargin(0.18);//0.15
299  gStyle->SetPadRightMargin(0.05);
300  gStyle->SetPadLeftMargin(0.17);
301  gStyle->SetFrameFillColor(10);
302  //......................................................
303  //..open the text file and save the run IDs into the RunId[] array
304  cout<<"o o o Open .txt suggested cell IDs. Name = " << cellList << endl;
305  FILE *pFile = fopen(cellList.Data(), "r");
306  if(!pFile)
307  {
308  cout<<"couldn't open file "<<cellList<<"!"<<endl;
309  return;
310  }
311  Int_t q;
312  Int_t ncols;
313  Int_t nlines = 0 ;
314  Int_t cellId[500] ;
315  std::vector<Int_t> cellIdVec;
316  while (1)
317  {
318  ncols = fscanf(pFile," %d ",&q);
319  if (ncols< 0) break;
320  cellId[nlines]=q;
321  cellIdVec.push_back(q);
322  nlines++;
323  }
324  fclose(pFile);
325  //..sort the vector by size to be shure to use the right order
326  std::sort (cellIdVec.begin(), cellIdVec.end());
327  Int_t nCells=cellIdVec.size();
328 
329  //......................................................
330  //..Get the .root file with the original histogram to compare if they coincide
331  TString path = Form("./AnalysisOutput/%s/Train_%i",period.Data(),trainNo);
332  //TString rootFileName= Form("Version%s/%s_INT7_Histograms_V%s.root",period.Data(),version.Data());
333  TString rootFileName1= Form("Version1ManMasked/%s_INT7_Histograms_V1.root",period.Data());
334  TString rootFileName2= Form("Version2ManMasked/%s_INT7_Histograms_V2.root",period.Data());
335  TString rootFileName3= Form("Version3ManMasked/%s_INT7_Histograms_V3.root",period.Data());
336  TString rootFileName4= Form("Version4ManMasked/%s_INT7_Histograms_V4.root",period.Data());
337  TFile* outputRoot1 = TFile::Open(Form("%s/%s",path.Data(),rootFileName1.Data()));
338  if(!outputRoot1)cout<<"File "<<outputRoot1->GetName()<<" does not exist"<<endl;
339  TH2F* h2DAmp1 =(TH2F*)outputRoot1->Get("hCellAmplitude");
340  TH2F* h2DRatio1 =(TH2F*)outputRoot1->Get("ratio2DAmp");
341  TFile* outputRoot2 = TFile::Open(Form("%s/%s",path.Data(),rootFileName2.Data()));
342  if(!outputRoot2)cout<<"File "<<outputRoot2->GetName()<<" does not exist"<<endl;
343  TH2F* h2DAmp2 =(TH2F*)outputRoot2->Get("hCellAmplitude");
344  TH2F* h2DRatio2 =(TH2F*)outputRoot2->Get("ratio2DAmp");
345  TFile* outputRoot3 = TFile::Open(Form("%s/%s",path.Data(),rootFileName3.Data()));
346  if(!outputRoot3)cout<<"File "<<outputRoot3->GetName()<<" does not exist"<<endl;
347  TH2F* h2DAmp3 =(TH2F*)outputRoot3->Get("hCellAmplitude");
348  TH2F* h2DRatio3 =(TH2F*)outputRoot3->Get("ratio2DAmp");
349  TFile* outputRoot4 = TFile::Open(Form("%s/%s",path.Data(),rootFileName4.Data()));
350  if(!outputRoot3)cout<<"File "<<outputRoot4->GetName()<<" does not exist"<<endl;
351  TH2F* h2DAmp4 =(TH2F*)outputRoot4->Get("hCellAmplitude");
352  TH2F* h2DRatio4 =(TH2F*)outputRoot4->Get("ratio2DAmp");
353 
354  TCanvas *c1 = new TCanvas(1);
355  c1->Divide(2);
356  c1->cd(1);
357  SetHisto(h2DAmp1,"","");
358  h2DAmp1->Draw("colz");
359  c1->cd(2);
360  SetHisto(h2DRatio1,"","");
361  h2DRatio1->Draw("colz");
362 
363  //.. be aware of the special sturcture of the canvas
364  //.. canvas has totalperCv*2 pads
365 // Int_t totalperCv = 4;
366  Int_t totalperCv = 8;
367  Int_t nPad = TMath::Sqrt(totalperCv);
368  Int_t nCv = nCells/totalperCv+1;
369  if(nCv<1)nCv=1;
370 
371  cout<<" o create: "<<nCv<<" Canvases with "<<nPad*nPad<<" pads"<<endl;
372  //..to compare specific cells over the runs
373  TCanvas **cCompAll = new TCanvas*[nCv];
374  for(Int_t i=0;i<nCv;i++)
375  {
376  cCompAll[i] = new TCanvas(TString::Format("CompareGoodAll%d", i), TString::Format("V) Both (%d/%d)", i+1, nCv), 1000,750);
377  CanvasPartition(cCompAll[i],4,totalperCv/2,0.15,0.02,0.13,0.05);
378  }
379  TLegend *leg2 = new TLegend(0.60,0.60,0.9,0.85);
380  cout<<" o Fill Canvases with bad cells histograms"<<endl;
381 
382  Int_t zoomRange=20;
383  Double_t range=10;
384  Int_t shift=0;
385  cout<<"cell number: "<<endl;
386  for(Int_t icell = 0; icell < nCells; icell++)
387  {
388  Int_t cellID=cellIdVec.at(icell);
389  cout<<cellID<<", "<<flush;
390 
391  TH1D *htmpCellAllRuns1 =h2DAmp1->ProjectionX(TString::Format("hIDProj1_cell%d", cellID), cellID+1, cellID+1);
392  SetHisto(htmpCellAllRuns1,Form("Energy [cell %i]",cellID),"Number of Hits/Events");
393 
394  TH1D *htmpCellRatioAllRuns1=h2DRatio1->ProjectionX(TString::Format("hIDRProj1_cell%d", cellID), cellID+1, cellID+1);
395  SetHisto(htmpCellRatioAllRuns1,Form("Energy [cell %i]",cellID),"No. Hits/av. No. Hits");
396 
397  TH1D *htmpCellAllRuns2 =h2DAmp2->ProjectionX(TString::Format("hIDProj2_cell%d", cellID), cellID+1, cellID+1);
398  TH1D *htmpCellRatioAllRuns2=h2DRatio2->ProjectionX(TString::Format("hIDRProj2_cell%d", cellID), cellID+1, cellID+1);
399  TH1D *htmpCellAllRuns3 =h2DAmp3->ProjectionX(TString::Format("hIDProj3_cell%d", cellID), cellID+1, cellID+1);
400  TH1D *htmpCellRatioAllRuns3=h2DRatio3->ProjectionX(TString::Format("hIDRProj3_cell%d", cellID), cellID+1, cellID+1);
401  TH1D *htmpCellAllRuns4 =h2DAmp4->ProjectionX(TString::Format("hIDProj4_cell%d", cellID), cellID+1, cellID+1);
402  TH1D *htmpCellRatioAllRuns4=h2DRatio4->ProjectionX(TString::Format("hIDRProj4_cell%d", cellID), cellID+1, cellID+1);
403 
404  if(((icell)%8)<4) shift=0;
405  else shift=8;
406  cCompAll[(icell)/totalperCv]->cd(((icell)%4)+1+shift)->SetLogy();
407  htmpCellAllRuns1->GetXaxis()->SetRangeUser(0,range);
408  htmpCellAllRuns1->Draw("hist");
409  htmpCellAllRuns2->SetLineColor(kBlue-7);
410  htmpCellAllRuns2->DrawCopy("same hist");
411  htmpCellAllRuns3->SetLineColor(kGreen-2);
412  htmpCellAllRuns3->DrawCopy("same hist");
413  htmpCellAllRuns4->SetLineColor(kViolet-1);
414  htmpCellAllRuns4->DrawCopy("same hist");
415 
416  if(icell==0)
417  {
418  leg2->AddEntry(htmpCellAllRuns1,"Block1","l");
419  leg2->AddEntry(htmpCellAllRuns2,"Block2","l");
420  leg2->AddEntry(htmpCellAllRuns3,"Block3","l");
421  leg2->AddEntry(htmpCellAllRuns4,"Block4","l");
422  leg2->SetTextSize(0.07);
423  leg2->SetBorderSize(0);
424  leg2->SetFillColorAlpha(10, 0);
425  leg2->Draw("same");
426  }
427  else if((icell)%4==0)
428  {
429  leg2->Draw("same");
430  }
431 
432  cCompAll[(icell)/totalperCv]->cd(((icell)%4)+5+shift)->SetLogy();
433  htmpCellRatioAllRuns1->GetXaxis()->SetRangeUser(0,range);
434  //htmpCellRatioAllRuns1->GetYaxis()->SetRangeUser(0,5);
435  htmpCellRatioAllRuns1->Draw("hist");
436  htmpCellRatioAllRuns2->SetLineColor(kBlue-7);
437  htmpCellRatioAllRuns2->Draw("same hist");
438  htmpCellRatioAllRuns3->SetLineColor(kGreen-2);
439  htmpCellRatioAllRuns3->Draw("same hist");
440  htmpCellRatioAllRuns4->SetLineColor(kViolet-1);
441  htmpCellRatioAllRuns4->Draw("same hist");
442 
443  }
444  cout<<endl;
445  TString pdfName= Form("%s_MoreBadCellsCandidates.pdf",period.Data());
446  //..plot the canvases of cells into a .pdf file
447  for(Int_t can=0;can<nCv;can++)
448  {
449  //TString internal_pdfName1=pdfName+"Low.pdf";
450  if(can==0)
451  {
452  //..first pad
453  cCompAll[can] ->Print(Form("%s(",pdfName.Data()));
454  }
455  else if(can==(nCv-1))//..last canvas
456  {
457  //..last pad
458  cCompAll[can] ->Print(Form("%s)",pdfName.Data()));
459  }
460  else
461  {
462  //..all pads in between
463  cCompAll[can] ->Print(Form("%s",pdfName.Data()));
464  }
465  }
466 }
470 //________________________________________________________________________
471 void SetHisto(TH1 *Histo,TString Xtitel,TString Ytitel)
472 {
473  Histo->SetStats(0);
474  Histo->SetTitle("");
475 
476  Histo->GetYaxis()->SetTitleOffset(1.1);
477  Histo->GetXaxis()->SetTitleOffset(1.1);
478  Histo->GetXaxis()->SetLabelSize(0.05);
479  Histo->GetYaxis()->SetLabelSize(0.05);
480  Histo->GetXaxis()->SetTitleSize(0.06);
481  Histo->GetYaxis()->SetTitleSize(0.06);
482  Histo->GetXaxis()->SetNdivisions(505);
483  Histo->GetYaxis()->SetNdivisions(505);
484 
485  Histo->GetXaxis()->SetLabelFont(42);
486  Histo->GetYaxis()->SetLabelFont(42);
487  Histo->GetXaxis()->SetTitleFont(42);
488  Histo->GetYaxis()->SetTitleFont(42);
489  if(Xtitel!="")Histo->GetXaxis()->SetTitle(Xtitel);
490  if(Ytitel!="")Histo->GetYaxis()->SetTitle(Ytitel);
491 
492  Histo->SetLineColor(1);
493  Histo->SetMarkerColor(1);
494  Histo->SetMarkerStyle(20);
495  Histo->SetMarkerSize(0.5);
496 }
500 //___________________________________________
501 void CanvasPartition(TCanvas *C,const Int_t Nx,const Int_t Ny,
502  Float_t lMargin, Float_t rMargin,
503  Float_t bMargin, Float_t tMargin)
504 {
505  if (!C) return;
506 
507  C->Divide(Nx,Ny,0.000,0.000);
508  //..Top row
509  for (Int_t i=0;i<Nx;i++)
510  {
511  C->cd(i+1)->SetLogy();
512  gPad->SetLeftMargin(lMargin);
513  gPad->SetRightMargin(rMargin);
514  gPad->SetBottomMargin(0);
515  gPad->SetTopMargin(tMargin);
516  //pad->Draw();??
517  }
518  //..Bottom row
519  for (Int_t i=0;i<Nx;i++)
520  {
521  C->cd(i+1+Nx);
522  gPad->SetLeftMargin(lMargin);
523  gPad->SetRightMargin(rMargin);
524  gPad->SetBottomMargin(bMargin);
525  gPad->SetTopMargin(0);
526  }
527  //..Top row
528  for (Int_t i=0;i<Nx;i++)
529  {
530  C->cd(i+1+2*Nx)->SetLogy();
531  gPad->SetLeftMargin(lMargin);
532  gPad->SetRightMargin(rMargin);
533  gPad->SetBottomMargin(0);
534  gPad->SetTopMargin(tMargin);
535  }
536  //..Bottom row
537  for (Int_t i=0;i<Nx;i++)
538  {
539  C->cd(i+1+3*Nx);
540  gPad->SetLeftMargin(lMargin);
541  gPad->SetRightMargin(rMargin);
542  gPad->SetBottomMargin(bMargin);
543  gPad->SetTopMargin(0);
544  }
545 }
double Double_t
Definition: External.C:58
void SetRunNumber(Int_t run)
Definition: External.C:236
TLatex * text[5]
option to what and if export to output file
void CanvasPartition(TCanvas *C, const Int_t Nx=2, const Int_t Ny=2, Float_t lMargin=0.15, Float_t rMargin=0.05, Float_t bMargin=0.15, Float_t tMargin=0.05)
void Test_OADB(TString period="LHC15n", Int_t trainNo=603, TString version="INT7Emc", TString runList="")
AliEMCALGeometry * GetEMCALGeometry() const
void SetHisto(TH1 *Histo, TString Xtitel, TString Ytitel)
int Int_t
Definition: External.C:63
void Sort_RunNumbers(TString period="LHC15n", Int_t trainNo=603, TString runList="")
float Float_t
Definition: External.C:68
Definition: External.C:212
const char * pdfName
Definition: DrawAnaELoss.C:30
Class with utils specific to calorimeter clusters/cells.
void AccessGeometry(AliVEvent *inputEvent)
Definition: External.C:196
void Plot_CellList(TString period="LHC15n", Int_t trainNo=603, TString version="5", TString cellList="")
Int_t GetModuleNumberCellIndexesAbsCaloMap(Int_t absId, Int_t calo, Int_t &icol, Int_t &irow, Int_t &iRCU, Int_t &icolAbs, Int_t &irowAbs) const