handle bash args properly using arrays
[u/mrichter/AliRoot.git] / PWGPP / analysisQA / processProduceFastQA.C
CommitLineData
948b38b2 1/************************************************************
2 -- provided by Gamma Conversion Group, PWG4,
3 -- Kathrin Koch, kkoch@physi.uni-heidelberg.de
4 -- Friederike Bock, friederike.bock@cern.ch
5
6 ************************************************************
7
8 == This macro can be used to display the Photon
9 Characteristics of the conversion method in ALICE,
10 it can be operated *****
11
12 == on the output of the GammaConversionTask. It can take
13 2 input files, the second one should be MC, if this
14 is not *****
15
16 == the case all histograms including MC need to be
17 commented out otherwise the running will crash. *****
18 *************************************************************/
19
20/*----------------------------------------------
21A small Modificaiton is done by sjena to:
22 -- impliment the unique name of each object
23 -- output files for comparision purpose
24 ----------------------------------------------*/
25
26
27
28#include <Riostream.h>
29#include <fstream>
30#include "TMath.h"
31#include <stdlib.h>
32#include <fstream>
33#include <math.h>
34#include <TROOT.h>
35#include <TApplication.h>
36#include <TPaveLabel.h>
37#include <TSystem.h>
38#include <TFrame.h>
39#include <TStyle.h>
40#include <TString.h>
41#include "TGaxis.h"
42#include "TFile.h"
43#include "TH1F.h"
44#include "TH1D.h"
45#include "TH2F.h"
46#include "TH3F.h"
47#include "TF1.h"
48#include "TVirtualFitter.h"
49#include "TObject.h"
50#include "TCanvas.h"
51#include "TMultiGraph.h"
52#include "TLegend.h"
53#include "TDatabasePDG.h"
54#include "TMinuit.h"
55#include "TLatex.h"
56#include "TASImage.h"
57#include "TPostScript.h"
58#include "TGraphErrors.h"
59#include "TArrow.h"
60#include "TMarker.h"
61#include "TGraphAsymmErrors.h"
62
63TString textGenerator;
64TString collisionSystem;
65TString textPeriod;
66TString textDate;
67
68void SetStyleTLatex( TLatex* text, Size_t textSize, Width_t lineWidth, Color_t textColor = 1, Bool_t kNDC = kTRUE){
69 if (kNDC) {text->SetNDC();}
70 text->SetTextColor(textColor);
71 text->SetTextSize(textSize);
72 text->SetLineWidth(lineWidth);
73}
74
75
76/* DrawAutoGammaHisto is function used for styling a histograma of the gamma conversion group with standart settings
77* histo1 - first histogram (Data)
78* Title - histogram title
79* XTitle - X-axis title
80* YTitle - Y-axis title
81* YRangeMax = kTRUE will scale by Maximum and Minimum Range in Y
82*YMaxFactor - will MaximumY by this factor if YRangeMay = kTRUE
83*YMinimum - this will be used if YRangeMax is set
84*YRange = kTRUE will Cut y-axis by YMin and YMax
85- will be set to kFAlSE if YRangeMax is set
86*YMin - minimum Y
87*YMax - maximum Y
88*XRange = kTRUE will Cut x-axis by XMin and XMax
89*XMin - minimum Y
90*XMax - maximum Y
91*/
92void DrawAutoGammaHisto( TH1* histo1,
93 TString Title, TString XTitle, TString YTitle,
94 Bool_t YRangeMax, Float_t YMaxFactor, Float_t YMinimum,
95 Bool_t YRange, Float_t YMin ,Float_t YMax,
96 Bool_t XRange, Float_t XMin, Float_t XMax) {
97 if (YRangeMax && !XRange){
98 YRange = kFALSE;
99 Double_t maxRangeR = histo1->GetMaximum();
100 Double_t minRangeR = histo1->GetMinimum();
101 if(YMinimum > minRangeR){minRangeR = YMinimum;}
102 histo1->GetYaxis()->SetRangeUser(minRangeR, maxRangeR*YMaxFactor);
103 }
104 if (YRangeMax && XRange){
105 YRange = kFALSE;
106 Double_t maxRangeR = histo1->GetMaximum();
107 Double_t minRangeR = histo1->GetMinimum();
108 if(YMinimum > minRangeR){minRangeR = YMinimum;}
109 histo1->GetYaxis()->SetRangeUser(minRangeR, maxRangeR*YMaxFactor);
110 histo1->GetXaxis()->SetRangeUser(XMin, XMax);
111 }
112 if (YRange && XRange){
113 histo1->GetYaxis()->SetRangeUser(YMin, YMax);
114 histo1->GetXaxis()->SetRangeUser(XMin, XMax);
115 }
116 if (!YRangeMax && !YRange && XRange){
117 histo1->GetXaxis()->SetRangeUser(XMin, XMax);
118 }
119
120 if (YRange && !XRange){
121 histo1->GetYaxis()->SetRangeUser(YMin, YMax);
122 }
123
124 histo1->SetTitle(Title.Data());
125
126 if(XTitle.CompareTo("") != 0){
127 histo1->SetXTitle(XTitle.Data());
128 }
129 if(YTitle.CompareTo("") != 0){
130 histo1->SetYTitle(YTitle.Data());
131 }
132 histo1->GetYaxis()->SetLabelSize(0.03);
133 histo1->GetYaxis()->SetTitleSize(0.035);
134 histo1->GetYaxis()->SetDecimals();
135 histo1->GetYaxis()->SetTitleOffset(1.8);
136 histo1->GetXaxis()->SetTitleSize(0.035);
137 histo1->GetXaxis()->SetLabelSize(0.03);
138 histo1->SetLineColor(kBlue+2);
139 histo1->SetMarkerColor(kBlue+2);
140 histo1->SetMarkerStyle(kFullCircle);
141 histo1->SetMarkerSize(1.5);
142 histo1->DrawCopy("e,p");
143}
144
145
146void DrawLabelsEvents(Float_t startX, Float_t startY, Float_t textHeight, Float_t decrease, TString collisionSystemDummy, TString textGeneratorDummy, TString textPeriodDummy){
147
148 Float_t aliceStartY = startY - textHeight * 1.15;
149 TLatex *pp7 = NULL;
150 if( collisionSystemDummy.CompareTo("PbPb @ #sqrt{s_{NN}} = 2.76 TeV") == 0){
151 pp7 = new TLatex((startX-2*decrease),(aliceStartY),collisionSystemDummy.Data()); // Bo: this was modified
152 } else {
153 pp7 = new TLatex((startX+2*decrease),(aliceStartY),collisionSystemDummy.Data()); // Bo: this was modified
154 }
155 pp7->SetNDC();
156 pp7->SetTextColor(1);
157 pp7->SetTextFont(62);
158 pp7->SetTextSize(textHeight);
159 pp7->SetLineWidth(2);
160 pp7->Draw("same");
161 if (textGeneratorDummy.CompareTo("")!=0 && textPeriodDummy.CompareTo("")!=0){
162 TLatex *generator = new TLatex((startX+decrease),(aliceStartY-1*textHeight*1.15),Form("%s %s",textGeneratorDummy.Data(),textPeriodDummy.Data())); // Bo: this was modified
163 generator->SetNDC();
164 generator->SetTextColor(1);
165 generator->SetTextFont(62);
166 generator->SetTextSize(textHeight);
167 generator->SetLineWidth(2);
168 generator->Draw("same");
169 } else if (textGeneratorDummy.CompareTo("")!=0) {
170 TLatex *generator = new TLatex((startX+decrease),(aliceStartY-1*textHeight*1.15),Form("%s",textGeneratorDummy.Data())); // Bo: this was modified
171 generator->SetNDC();
172 generator->SetTextColor(1);
173 generator->SetTextFont(62);
174 generator->SetTextSize(textHeight);
175 generator->SetLineWidth(2);
176 generator->Draw("same");
177 }
178}
179
180/*DrawAutoGammaHisto2D is a function for drawing a 2D-histogram of the gamma conversion group
181* histo - histogramm which need to be drawn
182* Title - histogram title
183* XTitle - X- axis-title
184* YTitle - Y-axis-title
185* Input - Legend
186* YRange - if kTRUE will scale by YMin and YMay
187* YMin - Y minimum
188* YMax - Y maximum
189* XRange - if kTRUE will scale by XMin and XMax
190* XMin - X minimum
191* XMax - X maximum
192*/
193void DrawAutoGammaHisto2D( TH2 *histo,
194 TString Title, TString XTitle, TString YTitle, TString Input,
195 Bool_t YRange, Float_t YMin ,Float_t YMax,
196 Bool_t XRange, Float_t XMin, Float_t XMax,Float_t titleOffsetX=1.4, Float_t titleOffsetY=1.2) {
197
198
199 if (YRange && XRange){
200 histo->GetYaxis()->SetRangeUser(YMin, YMax);
201 histo->GetXaxis()->SetRangeUser(XMin, XMax);
202 }
203 if ( !YRange && XRange){
204 histo->GetXaxis()->SetRangeUser(XMin, XMax);
205 }
206
207 if (YRange && !XRange){
208 histo->GetYaxis()->SetRangeUser(YMin, YMax);
209 }
210
211// if(Title.CompareTo("") != 0){
212 histo->SetTitle(Title.Data());
213// }
214 if(XTitle.CompareTo("") != 0){
215 histo->SetXTitle(XTitle.Data());
216 }
217 if(YTitle.CompareTo("") != 0){
218 histo->SetYTitle(YTitle.Data());
219 }
220 histo->GetYaxis()->SetTitleSize(0.043);
221 histo->GetYaxis()->SetLabelSize(0.035);
222 histo->GetXaxis()->SetLabelSize(0.035);
223 histo->GetYaxis()->SetDecimals();
224 histo->GetYaxis()->SetTitleOffset(titleOffsetY);
225 histo->GetXaxis()->SetTitleOffset(titleOffsetX);
226 histo->GetXaxis()->SetTitleSize(0.043);
227 histo->DrawCopy("colz");
228 if(Input.CompareTo("") != 0){
229 TLegend* leg2 = new TLegend(0.6,0.82,0.83,0.9);
230 leg2->SetTextSize(0.04);
231 leg2->SetFillColor(0);
232 leg2->AddEntry(histo,(Input.Data()));
233 leg2->Draw("same");
234 }
235}
236
237void PlotStandard2D( TH2* histo2D, TString nameOutput, TString title, TString xTitle, TString yTitle, Bool_t kRangeY, Double_t startY, Double_t endY, Bool_t kRangeX, Double_t startX, Double_t endX, Int_t logX, Int_t logY, Int_t logZ, Float_t* floatLogo, Int_t canvasSizeX = 500, Int_t canvasSizeY = 500, TString generator ="" , TString period =""){
238 TCanvas * canvasStandard = new TCanvas("canvasStandard","",10,10,canvasSizeX,canvasSizeY); // gives the page size
239 canvasStandard->SetLogx(logX);
240 canvasStandard->SetLogy(logY);
241 canvasStandard->SetLogz(logZ);
242 canvasStandard->SetRightMargin(0.12);
243 canvasStandard->SetLeftMargin(0.12);
244 canvasStandard->SetBottomMargin(0.1);
245 canvasStandard->SetTopMargin(0.04);
246 canvasStandard->cd();
247 histo2D->SetTitle("");
248 DrawAutoGammaHisto2D( histo2D,
249 title.Data(), xTitle.Data(), yTitle.Data(),"",kRangeY, startY, endY, kRangeX, startX, endX);
250 histo2D->GetXaxis()->SetTitleOffset(1.05);
251// cout << histo2D->GetYaxis()->GetTitleOffset() << endl;
252 histo2D->GetYaxis()->SetTitleOffset(1.35);
253 if (logX==1){
254// cout << histo2D->GetXaxis()->GetLabelOffset() << endl;
255 histo2D->GetXaxis()->SetLabelOffset(0.);
256 }
257
258 histo2D->Draw("colz");
259 DrawLabelsEvents(floatLogo[0],floatLogo[1],floatLogo[2], 0.00, collisionSystem, generator, period);
260
261 canvasStandard->Update();
262 canvasStandard->SaveAs(nameOutput.Data());
263 delete canvasStandard;
264}
265
266TString GetCentralityString(TString cutNumber){
267 TString centralityCutNumberStart = cutNumber(1,1);
268 TString centralityCutNumberEnd = cutNumber(2,1);
269 TString ppCutNumber = cutNumber(0,1);
270 if (ppCutNumber.CompareTo("0") ==0){
271 return "pp";
272 } else if ( ppCutNumber.CompareTo("1") ==0 || ppCutNumber.CompareTo("2") ==0 || ppCutNumber.CompareTo("5") ==0 || ppCutNumber.CompareTo("8") ==0 || ppCutNumber.CompareTo("9") ==0){
273 if (centralityCutNumberStart.CompareTo("0") == 0 && centralityCutNumberEnd.CompareTo("0") == 0 ){
274 return "0-100%";
275 } else {
276 return Form("%i-%i%s", centralityCutNumberStart.Atoi()*10,centralityCutNumberEnd.Atoi()*10,"%");
277 }
278 } else if (ppCutNumber.CompareTo("3") ==0 || ppCutNumber.CompareTo("6") ==0){
279 if (centralityCutNumberStart.CompareTo("0") == 0 && centralityCutNumberEnd.CompareTo("0") == 0 ){
280 return "0-45%";
281 } else {
282 return Form("%i-%i%s", centralityCutNumberStart.Atoi()*5,centralityCutNumberEnd.Atoi()*5,"%");
283 }
284 } else if (ppCutNumber.CompareTo("4") ==0 || ppCutNumber.CompareTo("7") ==0){
285 if (centralityCutNumberStart.CompareTo("0") == 0 && centralityCutNumberEnd.CompareTo("0") == 0 ){
286 return "45-95%";
287 } else {
288 return Form("%i-%i%s",45+centralityCutNumberStart.Atoi()*5,45+centralityCutNumberEnd.Atoi()*5,"%");
289 }
290 } else return "";
291}
292
293TString ReturnFullCollisionsSystem(TString fEnergyFlagOpt){
294 if(fEnergyFlagOpt.CompareTo("7TeV") == 0){
295 return "pp, #sqrt{s} = 7 TeV";
296 } else if( fEnergyFlagOpt.CompareTo("900GeV") == 0) {
297 return "pp, #sqrt{s} = 900 GeV";
298 } else if( fEnergyFlagOpt.CompareTo("2.76TeV") == 0) {
299 return "pp, #sqrt{s} = 2.76 TeV";
300 } else if( (fEnergyFlagOpt.CompareTo("PbPb_2.76TeV") == 0) || (fEnergyFlagOpt.CompareTo("HI") == 0) ) {
301 return "Pb-Pb, #sqrt{s_{NN}} = 2.76 TeV";
302 } else if( fEnergyFlagOpt.CompareTo("pPb_5.023TeV") == 0) {
303 return "p-Pb, #sqrt{s_{NN}} = 5.023 TeV";
304 } else {
305 cout << "No correct collision system specification, has been given" << endl;
306 return "";
307 }
308}
309
310/* StyleSettingsThesis will make some standard settings for gStyle
311*/
312void StyleSettingsThesis(){
313 gStyle->SetOptDate(0); //show day and time
314 gStyle->SetOptStat(0); //show statistic
315 gStyle->SetPalette(1,0);
316 gStyle->SetFrameBorderMode(0);
317 gStyle->SetFrameFillColor(0);
318 gStyle->SetTitleFillColor(0);
319 gStyle->SetTextSize(0.5);
320 gStyle->SetLabelSize(0.03,"xyz");
321 gStyle->SetLabelOffset(0.002,"xyz");
322 gStyle->SetTitleFontSize(0.04);
323 gStyle->SetTitleOffset(1,"y");
324 gStyle->SetTitleOffset(0.7,"x");
325 gStyle->SetCanvasColor(0);
326 gStyle->SetPadTickX(1);
327 gStyle->SetPadTickY(1);
328 //gStyle->SetLineWidth(0.01);
329
330 gStyle->SetPadTopMargin(0.03);
331 gStyle->SetPadBottomMargin(0.09);
332 gStyle->SetPadRightMargin(0.03);
333 gStyle->SetPadLeftMargin(0.13);
334
335
336 TGaxis::SetMaxDigits(5);
337 gErrorIgnoreLevel=kError;
338}
339
340
341void SetPlotStyle() {
342 const Int_t nRGBs = 5;
343 const Int_t nCont = 255;
344
345 Double_t stops[nRGBs] = { 0.00, 0.34, 0.61, 0.84, 1.00 };
346 Double_t red[nRGBs] = { 0.00, 0.00, 0.87, 1.00, 0.51 };
347 Double_t green[nRGBs] = { 0.31, 0.81, 1.00, 0.20, 0.00 };
348 Double_t blue[nRGBs] = { 0.51, 1., 0.12, 0.00, 0.00};
349
350 TColor::CreateGradientColorTable(nRGBs, stops, red, green, blue, nCont);
351 gStyle->SetNumberContours(nCont);
352}
353
354
355void processProduceFastQA(TString fileNameInput = "myOutput",
356 TString cutSelection = "5080001022092970023220000000",
357 TString suffix = "eps",
358 TString optEnergy="",
359 TString optMCGenerator="",
360 TString optPeriod="",
361 const char* outfile="ProduceFastQA_output.root"){
362
363 gROOT->Reset();
364 gSystem->Load("libCore.so");
365 gSystem->Load("libTree.so");
366 gSystem->Load("libGeom.so");
367 gSystem->Load("libVMC.so");
368 gSystem->Load("libPhysics.so");
369 gSystem->Load("libSTEERBase");
370 gSystem->Load("libESD");
371 gSystem->Load("libAOD");
372 gSystem->Load("libANALYSIS");
373 gSystem->Load("libANALYSISalice");
374 gSystem->Load("libCORRFW.so");
375 gROOT->SetStyle("Plain");
376
377 StyleSettingsThesis();
378 SetPlotStyle();
379
380 collisionSystem = ReturnFullCollisionsSystem(optEnergy);
381 if (collisionSystem.CompareTo("") == 0){
382 cout << "No correct collision system specification, has been given" << endl;
383 return;
384 }
385 TString centralityCutNumber = cutSelection(0,3);
386 TString centralityString = GetCentralityString(centralityCutNumber);
387 cout<< centralityCutNumber.Data() << "\t" << centralityString.Data() << endl;
388 if (centralityString.CompareTo("pp") !=0){
389 collisionSystem = Form("%s %s", centralityString.Data(), collisionSystem.Data());
390 }
391
392 TString textGenerator;
393
394 if(optMCGenerator.CompareTo("") ==0){
395 textGenerator = "";
396 } else {
397 textGenerator = optMCGenerator;
398 }
399
400 TFile* fileInput = new TFile(fileNameInput.Data());
401fileInput->ls();
402
403 TDirectory* directoryQA = (TDirectory*)fileInput->Get(Form("GammaConvV1_QA_%s",cutSelection.Data()));
404directoryQA->ls();
405 TList* listQA = (TList*)directoryQA->Get(Form("GammaConv_V1QA_%s",cutSelection.Data()));
406listQA->ls();
407 TList* listQAESD = (TList*)listQA->FindObject("ESD QA");
408
409
410 // Added by sjena
411 TFile *fout = TFile::Open(outfile,"UPDATE");
412 fout->ls();
413
414 TDirectoryFile *cdd = NULL;
415 cdd = (TDirectoryFile*)fout->Get("GA");
416 if(!cdd) {
417 Printf("Warning: GA <dir> doesn't exist, creating a new one");
418 cdd = (TDirectoryFile*)fout->mkdir("GA");
419 }
420 cdd->cd();
421 cdd->ls();
422
423
424 TH1F* histoVertexZ = (TH1F*)listQAESD->FindObject("Vertex_Z");
425 histoVertexZ->Sumw2();
426 Double_t nEvt = histoVertexZ->GetEntries();
427 histoVertexZ->Scale(1./nEvt);
428 histoVertexZ->Write(Form("fig_ga_%s",histoVertexZ->GetName()));
429
430 TH1I* histoContrVertexZ = (TH1I*)listQAESD->FindObject("ContrVertex_Z");
431 TH1D* histoDContrVertexZ = new TH1D("ContrVertex_Z","ContrVertex_Z",3000,0,3000);
432 histoDContrVertexZ->Sumw2();
433 for (Int_t i = 1; i < histoContrVertexZ->GetNbinsX(); i++){
434 histoDContrVertexZ->SetBinContent(i, histoContrVertexZ->GetBinContent(i)/nEvt);
435 histoDContrVertexZ->SetBinError(i, histoContrVertexZ->GetBinError(i)/nEvt);
436 }
437 histoDContrVertexZ->Rebin(8);
438 histoDContrVertexZ->Write(Form("fig_ga_%s",histoDContrVertexZ->GetName()));
439
440 TH1I* histoGoodESDTracks = (TH1I*)listQAESD->FindObject("GoodESDTracks");
441 TH1D* histoDGoodESDTracks = new TH1D("GoodESDTracks","GoodESDTracks",3000,0,3000);
442 histoDGoodESDTracks->Sumw2();
443 for (Int_t i = 1; i < histoGoodESDTracks->GetNbinsX(); i++){
444 histoDGoodESDTracks->SetBinContent(i, histoGoodESDTracks->GetBinContent(i)/nEvt);
445 histoDGoodESDTracks->SetBinError(i, histoGoodESDTracks->GetBinError(i)/nEvt);
446 }
447 histoDGoodESDTracks->Rebin(8);
448 histoDGoodESDTracks->Write(Form("fig_ga_%s",histoDGoodESDTracks->GetName()));
449
450
451 TH1I* histoV0Mult = (TH1I*)listQAESD->FindObject("V0 Multiplicity");
452 TH1D* histoDV0Mult = new TH1D("V0Multiplicity","V0 Multiplicity",30000,0,30000);
453 histoDV0Mult->Sumw2();
454 for (Int_t i = 1; i < histoV0Mult->GetNbinsX(); i++){
455 histoDV0Mult->SetBinContent(i, histoV0Mult->GetBinContent(i)/nEvt);
456 histoDV0Mult->SetBinError(i, histoV0Mult->GetBinError(i)/nEvt);
457 }
458 histoDV0Mult->Rebin(10);
459 histoDV0Mult->Write(Form("fig_ga_%s",histoDV0Mult->GetName()));
460
461
462 TH2F* histoITSClusterPhi = (TH2F*)listQAESD->FindObject("ITSClusterPhi");
463 histoITSClusterPhi->Sumw2();
464 histoITSClusterPhi->Scale(1./nEvt);
465 histoITSClusterPhi->Write(Form("fig_ga_%s",histoITSClusterPhi->GetName()));
466
467
468 TH1F* histoGammaPt = (TH1F*)listQAESD->FindObject("Gamma_Pt");
469 histoGammaPt->Sumw2();
470 histoGammaPt->Scale(1./nEvt);
471 histoGammaPt->Write(Form("fig_ga_%s",histoGammaPt->GetName()));
472
473
474 TH1F* histoGammaPhi = (TH1F*)listQAESD->FindObject("Gamma_Phi");
475 histoGammaPhi->Sumw2();
476 histoGammaPhi->Scale(1./nEvt);
477 histoGammaPhi->Rebin(2);
478 histoGammaPhi->Write(Form("fig_ga_%s",histoGammaPhi->GetName()));
479
480
481 TH1F* histoGammaEta = (TH1F*)listQAESD->FindObject("Gamma_Eta");
482 histoGammaEta->Sumw2();
483 histoGammaEta->Scale(1./nEvt);
484 histoGammaEta->Rebin(2);
485 histoGammaEta->Write(Form("fig_ga_%s",histoGammaEta->GetName()));
486
487
488 TH1F* histoGammaChi2 = (TH1F*)listQAESD->FindObject("Gamma_Chi2perNDF");
489 histoGammaChi2->Sumw2();
490 histoGammaChi2->Scale(1./nEvt);
491 histoGammaChi2->Write(Form("fig_ga_%s",histoGammaChi2->GetName()));
492
493
494
495 TH1F* histoGammaPsiPair = (TH1F*)listQAESD->FindObject("Gamma_PsiPair");
496 histoGammaPsiPair->Sumw2();
497 histoGammaPsiPair->Scale(1./nEvt);
498 histoGammaPsiPair->Write(Form("fig_ga_%s",histoGammaPsiPair->GetName()));
499
500
501 TH1F* histoGammaCosPoint = (TH1F*)listQAESD->FindObject("Gamma_CosinePointingAngle");
502 histoGammaCosPoint->Sumw2();
503 histoGammaCosPoint->Scale(1./nEvt);
504 histoGammaCosPoint->Write(Form("fig_ga_%s",histoGammaCosPoint->GetName()));
505
506
507 TH1F* histoGammaInvMass = (TH1F*)listQAESD->FindObject("Gamma_InvMass");
508 histoGammaInvMass->Sumw2();
509 histoGammaInvMass->Scale(1./nEvt);
510 histoGammaInvMass->Write(Form("fig_ga_%s",histoGammaInvMass->GetName()));
511
512
513 TH2F* histoGammaArmenteros = (TH2F*)listQAESD->FindObject("Gamma_Armenteros");
514 histoGammaArmenteros->Sumw2();
515 histoGammaArmenteros->Scale(1./nEvt);
516 histoGammaArmenteros->Write(Form("fig_ga_%s",histoGammaArmenteros->GetName()));
517
518
519
520 TH2F* histoEPPt = (TH2F*)listQAESD->FindObject("Electron_Positron_Pt");
521 histoEPPt->Sumw2();
522 histoEPPt->Scale(1./nEvt);
523 histoEPPt->Write(Form("fig_ga_%s",histoEPPt->GetName()));
524
525
526 TH2F* histoEPEta = (TH2F*)listQAESD->FindObject("Electron_Positron_Eta");
527 histoEPEta->Sumw2();
528 histoEPEta->Scale(1./nEvt);
529 histoEPEta->Write(Form("fig_ga_%s",histoEPEta->GetName()));
530
531
532 TH2F* histoEPPhi = (TH2F*)listQAESD->FindObject("Electron_Positron_Phi");
533 histoEPPhi->Sumw2();
534 histoEPPhi->Scale(1./nEvt);
535 histoEPPhi->Write(Form("fig_ga_%s",histoEPPhi->GetName()));
536
537
538 TH1F* histoEFindableClusterTPC = (TH1F*)listQAESD->FindObject("Electron_findableClusterTPC");
539 histoEFindableClusterTPC->Sumw2();
540 histoEFindableClusterTPC->Scale(1./nEvt);
541 histoEFindableClusterTPC->Write(Form("fig_ga_%s",histoEFindableClusterTPC->GetName()));
542
543
544 TH1F* histoPFindableClusterTPC = (TH1F*)listQAESD->FindObject("Positron_findableClusterTPC");
545 histoPFindableClusterTPC->Sumw2();
546 histoPFindableClusterTPC->Scale(1./nEvt);
547 histoPFindableClusterTPC->Write(Form("fig_ga_%s",histoPFindableClusterTPC->GetName()));
548
549
550 TH2F* histoEdEdxPTPC = (TH2F*)listQAESD->FindObject("Electron_dEdx_P");
551 Double_t nElectronTPC = histoEdEdxPTPC->GetEntries();
552 histoEdEdxPTPC->Sumw2();
553 histoEdEdxPTPC->Scale(1./nEvt);
554 histoEdEdxPTPC->Write(Form("fig_ga_%s",histoEdEdxPTPC->GetName()));
555
556
557 TH2F* histoPdEdxPTPC = (TH2F*)listQAESD->FindObject("Positron_dEdx_P");
558 Double_t nPositronTPC = histoPdEdxPTPC->GetEntries();
559 histoPdEdxPTPC->Sumw2();
560 histoPdEdxPTPC->Scale(1./nEvt);
561 histoPdEdxPTPC->Write(Form("fig_ga_%s",histoPdEdxPTPC->GetName()));
562
563 TH2F* histoENSigmadEdxPTPC = (TH2F*)listQAESD->FindObject("Electron_NSigmadEdx_P");
564 histoENSigmadEdxPTPC->Sumw2();
565 histoENSigmadEdxPTPC->Scale(1./nEvt);
566 histoENSigmadEdxPTPC->Write(Form("fig_ga_%s",histoENSigmadEdxPTPC->GetName()));
567
568 TH2F* histoPNSigmadEdxPTPC = (TH2F*)listQAESD->FindObject("Positron_NSigmadEdx_P");
569 histoPNSigmadEdxPTPC->Sumw2();
570 histoPNSigmadEdxPTPC->Scale(1./nEvt);
571 histoPNSigmadEdxPTPC->Write(Form("fig_ga_%s",histoPNSigmadEdxPTPC->GetName()));
572
573 TH2F* histoENSigmaPiondEdxPTPC = (TH2F*)listQAESD->FindObject("Electron_NSigmaPiondEdx_P");
574 histoENSigmaPiondEdxPTPC->Sumw2();
575 histoENSigmaPiondEdxPTPC->Scale(1./nEvt);
576 histoENSigmaPiondEdxPTPC->Write(Form("fig_ga_%s",histoENSigmaPiondEdxPTPC->GetName()));
577
578
579 TH2F* histoPNSigmaPiondEdxPTPC = (TH2F*)listQAESD->FindObject("Positron_NSigmaPiondEdx_P");
580 histoPNSigmaPiondEdxPTPC->Sumw2();
581 histoPNSigmaPiondEdxPTPC->Scale(1./nEvt);
582 histoPNSigmaPiondEdxPTPC->Write(Form("fig_ga_%s",histoPNSigmaPiondEdxPTPC->GetName()));
583
584 TH2F* histoETOFP = (TH2F*)listQAESD->FindObject("Electron_TOF_P");
585 Double_t nElectronTOF = histoETOFP->GetEntries();
586 histoETOFP->Sumw2();
587 histoETOFP->Scale(1./nEvt);
588 histoETOFP->Write(Form("fig_ga_%s",histoETOFP->GetName()));
589
590
591 TH2F* histoPTOFP = (TH2F*)listQAESD->FindObject("Positron_TOF_P");
592 Double_t nPositronTOF = histoPTOFP->GetEntries();
593 histoPTOFP->Sumw2();
594 histoPTOFP->Scale(1./nEvt);
595 histoPTOFP->Write(Form("fig_ga_%s",histoPTOFP->GetName()));
596
597 TH2F* histoENSigmaTOFP = (TH2F*)listQAESD->FindObject("Electron_NSigmaTOF_P");
598 histoENSigmaTOFP->Sumw2();
599 histoENSigmaTOFP->Scale(1./nEvt);
600 histoENSigmaTOFP->Write(Form("fig_ga_%s",histoENSigmaTOFP->GetName()));
601
602 TH2F* histoPNSigmaTOFP = (TH2F*)listQAESD->FindObject("Positron_NSigmaTOF_P");
603 histoPNSigmaTOFP->Sumw2();
604 histoPNSigmaTOFP->Scale(1./nEvt);
605 histoPNSigmaTOFP->Write(Form("fig_ga_%s",histoPNSigmaTOFP->GetName()));
606
607 TH2F* histoEdEdxPITS = (TH2F*)listQAESD->FindObject("Electron_ITSdEdx_P");
608 Double_t nElectronITS = histoEdEdxPITS->GetEntries();
609 histoEdEdxPITS->Sumw2();
610 histoEdEdxPITS->Scale(1./nEvt);
611 histoEdEdxPITS->Write(Form("fig_ga_%s",histoEdEdxPITS->GetName()));
612
613 TH2F* histoPdEdxPITS = (TH2F*)listQAESD->FindObject("Positron_ITSdEdx_P");
614 Double_t nPositronITS = histoPdEdxPITS->GetEntries();
615 histoPdEdxPITS->Sumw2();
616 histoPdEdxPITS->Scale(1./nEvt);
617 histoPdEdxPITS->Write(Form("fig_ga_%s",histoPdEdxPITS->GetName()));
618
619 TH2F* histoENSigmadEdxPITS = (TH2F*)listQAESD->FindObject("Electron_NSigmaITS_P");
620 histoENSigmadEdxPITS->Sumw2();
621 histoENSigmadEdxPITS->Scale(1./nEvt);
622 histoENSigmadEdxPITS->Write(Form("fig_ga_%s",histoENSigmadEdxPITS->GetName()));
623
624 TH2F* histoPNSigmadEdxPITS = (TH2F*)listQAESD->FindObject("Positron_NSigmaITS_P");
625 histoPNSigmadEdxPITS->Sumw2();
626 histoPNSigmadEdxPITS->Scale(1./nEvt);
627 histoPNSigmadEdxPITS->Write(Form("fig_ga_%s",histoPNSigmadEdxPITS->GetName()));
628
629 //fout->Close();
630
631
632 TCanvas * canvasEventProp = new TCanvas("canvasEventProp","",0,0,1000,1000); // gives the page size
633 TPad* padEventProp = new TPad("padEventProp","",0.0,0.0,1,1,0); // gives the size of the histo areas
634 padEventProp->SetFillColor(0);
635 padEventProp->GetFrame()->SetFillColor(0);
636 padEventProp->SetBorderMode(0);
637
638 padEventProp->Divide(2,2);
639 padEventProp->Draw();
640 padEventProp->cd(1);
641
642 DrawAutoGammaHisto( histoVertexZ,
643 "", "Z_{vtx} (cm)","dZ/dN_{evt}",
644 kTRUE, 1.2, 0.,
645 kFALSE, -10,10,
646 kFALSE, -10,10);
647
648
649 TLatex *labelDataSet = NULL;
650 if (optPeriod.CompareTo("") ){
651 labelDataSet = new TLatex(0.18,0.9,Form("%s",optPeriod.Data()));
652 SetStyleTLatex( labelDataSet, 0.05,4);
653 labelDataSet->Draw();
654 }
655 padEventProp->cd(2);
656 padEventProp->cd(2)->SetLogy(1);
657
658 DrawAutoGammaHisto( histoDContrVertexZ,
659 "", "# Contr to prim Vtx","norm counts",
660 kTRUE, 2., 0.5/nEvt,
661 kFALSE, -10,10,
662 kFALSE, -10,10);
663
664 padEventProp->cd(3);
665 padEventProp->cd(3)->SetLogy(1);
666
667 DrawAutoGammaHisto( histoDGoodESDTracks,
668 "", "# Good ESD tracks","norm counts",
669 kTRUE, 2., 0.5/nEvt,
670 kFALSE, -10,10,
671 kFALSE, -10,10);
672
673 padEventProp->cd(4);
674 padEventProp->cd(4)->SetLogy(1);
675
676 DrawAutoGammaHisto( histoDV0Mult,
677 "", "V0 signal","norm counts",
678 kTRUE, 2., 0.5/nEvt,
679 kFALSE, -10,10,
680 kFALSE, -10,10);
681
682 canvasEventProp->Update();
683 canvasEventProp->SaveAs(Form("fig_ga_EventCharacteristics.%s",suffix.Data()));
684
685 TCanvas * canvasdEdxTPC = new TCanvas("canvasdEdxTPC","",0,0,1000,1500); // gives the page size
686 TPad* paddEdxTPC = new TPad("paddEdxTPC","",0.0,0.0,1,1,0); // gives the size of the histo areas
687 paddEdxTPC->SetFillColor(0);
688 paddEdxTPC->GetFrame()->SetFillColor(0);
689 paddEdxTPC->SetBorderMode(0);
690
691 paddEdxTPC->Divide(2,3);
692 paddEdxTPC->Draw();
693 paddEdxTPC->cd(1);
694 paddEdxTPC->cd(1)->SetLogx(1);
695 paddEdxTPC->cd(1)->SetLogz(1);
696 paddEdxTPC->cd(1)->SetTopMargin(0.01);
697 paddEdxTPC->cd(1)->SetRightMargin(0.12);
698 Double_t maximumEPTPC = 1.2*histoEdEdxPTPC->GetMaximum();
699 histoEdEdxPTPC->GetZaxis()->SetRangeUser(1/nEvt,maximumEPTPC);
700 histoEdEdxPTPC->GetXaxis()->SetLabelOffset(-0.009);
701 DrawAutoGammaHisto2D( histoEdEdxPTPC,
702 "", "#it{p}_{e^{-}} (GeV/c)", "dE_{e^{-}-cand} /dx", "",
703 kTRUE, 30., 180.,
704 kTRUE, 0.01, 20.,0.95);
705
706 TLatex *labelElectronTPC = new TLatex(0.5,0.9,"Electrons TPC");
707 SetStyleTLatex( labelElectronTPC, 0.05,4);
708 labelElectronTPC->Draw();
709
710 if (labelDataSet) labelDataSet->Draw();
711
712
713 paddEdxTPC->cd(2);
714 paddEdxTPC->cd(2)->SetLogx(1);
715 paddEdxTPC->cd(2)->SetLogz(1);
716 paddEdxTPC->cd(2)->SetTopMargin(0.01);
717 paddEdxTPC->cd(2)->SetRightMargin(0.12);
718 histoPdEdxPTPC->GetZaxis()->SetRangeUser(1/nEvt,maximumEPTPC);
719 histoPdEdxPTPC->GetXaxis()->SetLabelOffset(-0.009);
720 DrawAutoGammaHisto2D( histoPdEdxPTPC,
721 "", "#it{p}_{e^{+}} (GeV/c)", "dE_{e^{+}-cand} /dx", "",
722 kTRUE, 30., 180.,
723 kTRUE, 0.01, 20.,0.95);
724
725 TLatex *labelPositronTPC = new TLatex(0.5,0.9,"Positrons TPC");
726 SetStyleTLatex( labelPositronTPC, 0.05,4);
727 labelPositronTPC->Draw();
728
729 paddEdxTPC->cd(3);
730 paddEdxTPC->cd(3)->SetLogx(1);
731 paddEdxTPC->cd(3)->SetLogz(1);
732 paddEdxTPC->cd(3)->SetTopMargin(0.01);
733 paddEdxTPC->cd(3)->SetRightMargin(0.12);
734 histoENSigmadEdxPTPC->GetZaxis()->SetRangeUser(1/nEvt,maximumEPTPC);
735 histoENSigmadEdxPTPC->GetXaxis()->SetLabelOffset(-0.009);
736 DrawAutoGammaHisto2D( histoENSigmadEdxPTPC,
737 "", "#it{p}_{e^{-}} (GeV/c)", "n #sigma_{e^{-}} dE/dx", "",
738 kTRUE, -10., 10.,
739 kTRUE, 0.01, 20.,0.95);
740
741 paddEdxTPC->cd(4);
742 paddEdxTPC->cd(4)->SetLogx(1);
743 paddEdxTPC->cd(4)->SetLogz(1);
744 paddEdxTPC->cd(4)->SetTopMargin(0.01);
745 paddEdxTPC->cd(4)->SetRightMargin(0.12);
746 histoPNSigmadEdxPTPC->GetZaxis()->SetRangeUser(1/nEvt,maximumEPTPC);
747 histoPNSigmadEdxPTPC->GetXaxis()->SetLabelOffset(-0.009);
748 DrawAutoGammaHisto2D( histoPNSigmadEdxPTPC,
749 "", "#it{p}_{e^{+}} (GeV/c)", "n #sigma_{e^{+}} dE/dx", "",
750 kTRUE, -10., 10.,
751 kTRUE, 0.01, 20.,0.95);
752
753 paddEdxTPC->cd(5);
754 paddEdxTPC->cd(5)->SetLogx(1);
755 paddEdxTPC->cd(5)->SetLogz(1);
756 paddEdxTPC->cd(5)->SetTopMargin(0.01);
757 paddEdxTPC->cd(5)->SetRightMargin(0.12);
758 histoENSigmaPiondEdxPTPC->GetZaxis()->SetRangeUser(1/nEvt,maximumEPTPC);
759 histoENSigmaPiondEdxPTPC->GetXaxis()->SetLabelOffset(-0.009);
760 DrawAutoGammaHisto2D( histoENSigmaPiondEdxPTPC,
761 "", "#it{p}_{e^{-}} (GeV/c)", "n #sigma_{#pi^{-}} dE/dx", "",
762 kTRUE, -10., 10.,
763 kTRUE, 0.01, 20.,0.95);
764
765 paddEdxTPC->cd(6);
766 paddEdxTPC->cd(6)->SetLogx(1);
767 paddEdxTPC->cd(6)->SetLogz(1);
768 paddEdxTPC->cd(6)->SetTopMargin(0.01);
769 paddEdxTPC->cd(6)->SetRightMargin(0.12);
770 histoPNSigmaPiondEdxPTPC->GetZaxis()->SetRangeUser(1/nEvt,maximumEPTPC);
771 histoPNSigmaPiondEdxPTPC->GetXaxis()->SetLabelOffset(-0.009);
772 DrawAutoGammaHisto2D( histoPNSigmaPiondEdxPTPC,
773 "", "#it{p}_{e^{+}} (GeV/c)", "n #sigma_{#pi^{+}} dE/dx", "",
774 kTRUE, -10., 10.,
775 kTRUE, 0.01, 20.,0.95);
776
777 canvasdEdxTPC->Update();
778 canvasdEdxTPC->SaveAs(Form("fig_ga_Electrons_dEdx_TPC.%s",suffix.Data()));
779
780 TCanvas * canvasTOF = new TCanvas("canvasTOF","",0,0,1000,1000); // gives the page size
781 TPad* padTOF = new TPad("padTOF","",0.0,0.0,1,1,0); // gives the size of the histo areas
782 padTOF->SetFillColor(0);
783 padTOF->GetFrame()->SetFillColor(0);
784 padTOF->SetBorderMode(0);
785
786 padTOF->Divide(2,2);
787 padTOF->Draw();
788 padTOF->cd(1);
789 padTOF->cd(1)->SetLogx(1);
790 padTOF->cd(1)->SetLogz(1);
791 padTOF->cd(1)->SetTopMargin(0.01);
792 padTOF->cd(1)->SetRightMargin(0.12);
793 Double_t maximumEPTOF = 1.2*histoETOFP->GetMaximum();
794 histoETOFP->GetZaxis()->SetRangeUser(1/nEvt,maximumEPTOF);
795 histoETOFP->GetXaxis()->SetLabelOffset(-0.009);
796 DrawAutoGammaHisto2D( histoETOFP,
797 "", "#it{p}_{e^{-}} (GeV/c)", "t_{measured}-t_{expected} e^{-}", "",
798 kTRUE, -1000, 2000.,
799 kTRUE, 0.01, 20.,0.95);
800
801 TLatex *labelElectronTOF = new TLatex(0.5,0.9,"Electrons TOF");
802 SetStyleTLatex( labelElectronTOF, 0.05,4);
803 labelElectronTOF->Draw();
804 Double_t fracElecTOF = nElectronTOF/nElectronTPC*100;
805 TLatex *labelFracElectronTOF = new TLatex(0.5,0.845,Form("%4.2f %%",fracElecTOF ));
806 SetStyleTLatex( labelFracElectronTOF, 0.05,4);
807 labelFracElectronTOF->Draw();
808
809
810 if (labelDataSet) labelDataSet->Draw();
811
812
813 padTOF->cd(2);
814 padTOF->cd(2)->SetLogx(1);
815 padTOF->cd(2)->SetLogz(1);
816 padTOF->cd(2)->SetTopMargin(0.01);
817 padTOF->cd(2)->SetRightMargin(0.12);
818 histoPTOFP->GetZaxis()->SetRangeUser(1/nEvt,maximumEPTOF);
819 histoPTOFP->GetXaxis()->SetLabelOffset(-0.009);
820 DrawAutoGammaHisto2D( histoPTOFP,
821 "", "#it{p}_{e^{+}} (GeV/c)", "t_{measured}-t_{expected} e^{+}", "",
822 kTRUE, -1000, 2000.,
823 kTRUE, 0.01, 20.,0.95);
824
825 TLatex *labelPositronTOF = new TLatex(0.5,0.9,"Positrons TOF");
826 SetStyleTLatex( labelPositronTOF, 0.05,4);
827 labelPositronTOF->Draw();
828 Double_t fracPosiTOF = nPositronTOF/nPositronTPC*100;
829 TLatex *labelFracPositronTOF = new TLatex(0.5,0.845,Form("%4.2f %%",fracPosiTOF ));
830 SetStyleTLatex( labelFracPositronTOF, 0.05,4);
831 labelFracPositronTOF->Draw();
832
833 padTOF->cd(3);
834 padTOF->cd(3)->SetLogx(1);
835 padTOF->cd(3)->SetLogz(1);
836 padTOF->cd(3)->SetTopMargin(0.01);
837 padTOF->cd(3)->SetRightMargin(0.12);
838 histoENSigmaTOFP->GetZaxis()->SetRangeUser(1/nEvt,maximumEPTOF);
839 histoENSigmaTOFP->GetXaxis()->SetLabelOffset(-0.009);
840 DrawAutoGammaHisto2D( histoENSigmaTOFP,
841 "", "#it{p}_{e^{-}} (GeV/c)", "n #sigma_{e^{-}} TOF", "",
842 kTRUE, -10., 10.,
843 kTRUE, 0.01, 20.,0.95);
844
845 padTOF->cd(4);
846 padTOF->cd(4)->SetLogx(1);
847 padTOF->cd(4)->SetLogz(1);
848 padTOF->cd(4)->SetTopMargin(0.01);
849 padTOF->cd(4)->SetRightMargin(0.12);
850 histoPNSigmaTOFP->GetZaxis()->SetRangeUser(1/nEvt,maximumEPTOF);
851 histoPNSigmaTOFP->GetXaxis()->SetLabelOffset(-0.009);
852 DrawAutoGammaHisto2D( histoPNSigmaTOFP,
853 "", "#it{p}_{e^{+}} (GeV/c)", "n #sigma_{e^{+}} TOF", "",
854 kTRUE, -10., 10.,
855 kTRUE, 0.01, 20.,0.95);
856
857 canvasTOF->Update();
858 canvasTOF->SaveAs(Form("fig_ga_Electrons_TOF.%s",suffix.Data()));
859
860
861 TCanvas * canvasITS = new TCanvas("canvasITS","",0,0,1000,1000); // gives the page size
862 TPad* padITS = new TPad("padITS","",0.0,0.0,1,1,0); // gives the size of the histo areas
863 padITS->SetFillColor(0);
864 padITS->GetFrame()->SetFillColor(0);
865 padITS->SetBorderMode(0);
866
867 padITS->Divide(2,2);
868 padITS->Draw();
869 padITS->cd(1);
870 padITS->cd(1)->SetLogx(1);
871 padITS->cd(1)->SetLogz(1);
872 padITS->cd(1)->SetTopMargin(0.01);
873 padITS->cd(1)->SetRightMargin(0.12);
874 Double_t maximumEPITS = 1.2*histoEdEdxPITS->GetMaximum();
875 histoEdEdxPITS->GetZaxis()->SetRangeUser(1/nEvt,maximumEPITS);
876 histoEdEdxPITS->GetXaxis()->SetLabelOffset(-0.009);
877 DrawAutoGammaHisto2D( histoEdEdxPITS,
878 "", "#it{p}_{e^{-}} (GeV/c)", "dE_{e^{-}-cand} /dx ITS", "",
879 kTRUE, 0, 180.,
880 kTRUE, 0.01, 20.,0.95);
881
882 TLatex *labelElectronITS = new TLatex(0.5,0.9,"Electrons ITS");
883 SetStyleTLatex( labelElectronITS, 0.05,4);
884 labelElectronITS->Draw();
885 Double_t fracElecITS = nElectronITS/nElectronTPC*100;
886 TLatex *labelFracElectronITS = new TLatex(0.5,0.845,Form("%4.2f %%",fracElecITS ));
887 SetStyleTLatex( labelFracElectronITS, 0.05,4);
888 labelFracElectronITS->Draw();
889
890
891 if (labelDataSet) labelDataSet->Draw();
892
893
894 padITS->cd(2);
895 padITS->cd(2)->SetLogx(1);
896 padITS->cd(2)->SetLogz(1);
897 padITS->cd(2)->SetTopMargin(0.01);
898 padITS->cd(2)->SetRightMargin(0.12);
899
900 histoPdEdxPITS->GetZaxis()->SetRangeUser(1/nEvt,maximumEPITS);
901 histoPdEdxPITS->GetXaxis()->SetLabelOffset(-0.009);
902 DrawAutoGammaHisto2D( histoPdEdxPITS,
903 "", "#it{p}_{e^{+}} (GeV/c)","dE_{e^{+}-cand} /dx ITS", "",
904 kTRUE, 0, 180.,
905 kTRUE, 0.01, 20.,0.95);
906
907 TLatex *labelPositronITS = new TLatex(0.5,0.9,"Positrons ITS");
908 SetStyleTLatex( labelPositronITS, 0.05,4);
909 labelPositronITS->Draw();
910 Double_t fracPosiITS = nPositronITS/nPositronTPC*100;
911 TLatex *labelFracPositronITS = new TLatex(0.5,0.845,Form("%4.2f %%",fracPosiITS ));
912 SetStyleTLatex( labelFracPositronITS, 0.05,4);
913 labelFracPositronITS->Draw();
914
915 padITS->cd(3);
916 padITS->cd(3)->SetLogx(1);
917 padITS->cd(3)->SetLogz(1);
918 padITS->cd(3)->SetTopMargin(0.01);
919 padITS->cd(3)->SetRightMargin(0.12);
920 histoENSigmadEdxPITS->GetZaxis()->SetRangeUser(1/nEvt,maximumEPITS);
921 histoENSigmadEdxPITS->GetXaxis()->SetLabelOffset(-0.009);
922 DrawAutoGammaHisto2D( histoENSigmadEdxPITS,
923 "", "#it{p}_{e^{-}} (GeV/c)", "n #sigma_{e^{-}} ITS", "",
924 kTRUE, -10., 10.,
925 kTRUE, 0.01, 20.,0.95);
926
927 padITS->cd(4);
928 padITS->cd(4)->SetLogx(1);
929 padITS->cd(4)->SetLogz(1);
930 padITS->cd(4)->SetTopMargin(0.01);
931 padITS->cd(4)->SetRightMargin(0.12);
932 histoPNSigmadEdxPITS->GetZaxis()->SetRangeUser(1/nEvt,maximumEPITS);
933 histoPNSigmadEdxPITS->GetXaxis()->SetLabelOffset(-0.009);
934 DrawAutoGammaHisto2D( histoPNSigmadEdxPITS,
935 "", "#it{p}_{e^{+}} (GeV/c)", "n #sigma_{e^{+}} ITS", "",
936 kTRUE, -10., 10.,
937 kTRUE, 0.01, 20.,0.95);
938
939 canvasITS->Update();
940 canvasITS->SaveAs(Form("fig_ga_Electrons_ITS.%s",suffix.Data()));
941
942
943
944 TCanvas * canvasPhoton = new TCanvas("canvasPhoton","",0,0,1000,1000); // gives the page size
945 TPad* padPhoton = new TPad("padPhoton","",0.0,0.0,1,1,0); // gives the size of the histo areas
946 padPhoton->SetFillColor(0);
947 padPhoton->GetFrame()->SetFillColor(0);
948 padPhoton->SetBorderMode(0);
949
950 padPhoton->Divide(3,3);
951 padPhoton->Draw();
952 padPhoton->cd(1);
953 padPhoton->cd(1)->SetLogy(1);
954 padPhoton->cd(1)->SetLogx(1);
955 padPhoton->cd(1)->SetTopMargin(0.01);
956 DrawAutoGammaHisto( histoGammaPt,
957 "", "#it{p}_{#gamma,T} (GeV/c)","d#it{N}_{#gamma}/d#it{N}_{evt}",
958 kTRUE, 4., 0.5/nEvt,
959 kFALSE, -10,10,
960 kTRUE, 0.1,30);
961 histoGammaPt->SetMarkerSize(0.5);
962 histoGammaPt->Draw("ep1");
963
964 TLatex *labelPhotons = new TLatex(0.75,0.9,"Photon");
965 SetStyleTLatex( labelPhotons, 0.05,4);
966 labelPhotons->Draw();
967
968 if (labelDataSet) labelDataSet->Draw();
969
970 padPhoton->cd(2);
971 padPhoton->cd(2)->SetLogy(1);
972 padPhoton->cd(2)->SetTopMargin(0.01);
973
974 DrawAutoGammaHisto( histoGammaEta,
975 "", "#eta_{#gamma}","d#it{N}_{#gamma}/d#it{N}_{evt}",
976 kTRUE, 2., 0.5/nEvt,
977 kFALSE, -10,10,
978 kFALSE, 0.1,30);
979 histoGammaEta->SetMarkerSize(0.5);
980 histoGammaEta->Draw("ep1");
981
982 padPhoton->cd(3);
983 padPhoton->cd(3)->SetLogy(1);
984 padPhoton->cd(3)->SetTopMargin(0.01);
985
986 DrawAutoGammaHisto( histoGammaPhi,
987 "", "#phi_{#gamma}","d#it{N}_{#gamma}/d#it{N}_{evt}",
988 kTRUE, 2., 0.5/nEvt,
989 kFALSE, -10,10,
990 kFALSE, 0.1,30);
991 histoGammaPhi->SetMarkerSize(0.5);
992 histoGammaPhi->Draw("ep1");
993
994 padPhoton->cd(4);
995 padPhoton->cd(4)->SetLogy(1);
996 padPhoton->cd(4)->SetTopMargin(0.01);
997
998 DrawAutoGammaHisto( histoGammaInvMass,
999 "", "M_{#gamma#gamma} (GeV/c^{2})","d#it{N}_{#gamma}/d#it{N}_{evt}",
1000 kTRUE, 2., 0.5/nEvt,
1001 kFALSE, -10,10,
1002 kTRUE, 0.,0.1);
1003 histoGammaInvMass->SetMarkerSize(0.5);
1004 histoGammaInvMass->Draw("ep1");
1005
1006 padPhoton->cd(5);
1007 padPhoton->cd(5)->SetLogy(1);
1008 padPhoton->cd(5)->SetTopMargin(0.01);
1009
1010 DrawAutoGammaHisto( histoGammaChi2,
1011 "", "#chi^{2}/NDF","d#it{N}_{#gamma}/d#it{N}_{evt}",
1012 kTRUE, 2., 0.5/nEvt*1e1,
1013 kFALSE, -10,10,
1014 kFALSE, 0.,0.1);
1015 histoGammaChi2->SetMarkerSize(0.5);
1016 histoGammaChi2->Draw("ep1");
1017
1018 padPhoton->cd(6);
1019 padPhoton->cd(6)->SetLogy(1);
1020 padPhoton->cd(6)->SetTopMargin(0.01);
1021
1022 DrawAutoGammaHisto( histoGammaPsiPair,
1023 "", "#psi_{Pair}","d#it{N}_{#gamma}/d#it{N}_{evt}",
1024 kTRUE, 2., 0.5/nEvt*1e2,
1025 kFALSE, -10,10,
1026 kTRUE, 0.,0.5);
1027 histoGammaPsiPair->SetMarkerSize(0.5);
1028 histoGammaPsiPair->Draw("ep1");
1029
1030 padPhoton->cd(7);
1031 padPhoton->cd(7)->SetLogy(1);
1032 padPhoton->cd(7)->SetTopMargin(0.01);
1033
1034 DrawAutoGammaHisto( histoGammaCosPoint,
1035 "", "cos(#theta_{Point})","d#it{N}_{#gamma}/d#it{N}_{evt}",
1036 kTRUE, 2., 0.5/nEvt,
1037 kFALSE, -10,10,
1038 kFALSE, 0.,0.5);
1039 histoGammaCosPoint->SetMarkerSize(0.5);
1040 histoGammaCosPoint->Draw("ep1");
1041
1042 padPhoton->cd(8);
1043 padPhoton->cd(8)->SetLogz(1);
1044 padPhoton->cd(8)->SetTopMargin(0.01);
1045 padPhoton->cd(8)->SetRightMargin(0.12);
1046 Double_t maximumPhotons = 1.2*histoGammaArmenteros->GetMaximum();
1047 histoGammaArmenteros->GetZaxis()->SetRangeUser(1/nEvt,maximumPhotons);
1048 DrawAutoGammaHisto2D( histoGammaArmenteros,
1049 "", "#alpha = (p^{+}_{L}-p^{-}_{L})/(p^{+}_{L}+p^{-}_{L})", "q_{T} (GeV/c)", "",
1050 kFALSE, -10., 10.,
1051 kTRUE, -1., 1.,0.95);
1052
1053 canvasPhoton->Update();
1054 canvasPhoton->SaveAs(Form("fig_ga_Photons.%s",suffix.Data()));
1055
1056}
1057