]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGLF/QATasks/post/PostProcessQAMultistrange.C
Improved QA task for Multistrange
[u/mrichter/AliRoot.git] / PWGLF / QATasks / post / PostProcessQAMultistrange.C
CommitLineData
21cfe1dd 1//////////////////////////////////////////////////
2//
3// This macro was written by Domenico Colella (domenico.colella@cern.ch).
4// 12 November 2013
5//
6// ------ Arguments
7// -- icasType = 0) Xi- 1) Xi+ 2) Omega- 3) Omega+
baec638f 8// -- collidingsystem = 0) PbPb 1) pp 2) pPb
21cfe1dd 9// -- fileDir = "Input file directory"
10// -- filein = "Input file name"
11//
12// ------ QATask output content
13// The output produced by the QATask is a CFContainer with 4 steps and 21 variables.
14// The meaning of each variable within the container are listed here:
baec638f 15// -- 0 = Max DCA Cascade Daughters pp: 2.0 PbPb: 0.3 pPb: 2.0
16// -- 1 = Min DCA Bach To PV pp: 0.01 PbPb: 0.03 pPb: 0.03
17// -- 2 = Min Cascade Cosine Of PA pp: 0.98 PbPb: 0.999 pPb: 0.95
18// -- 3 = Min Cascade Radius Fid. Vol. pp: 0.2 PbPb: 0.9 pPb: 0.4
19// -- 4 = Window Invariant Mass Lambda pp: 0.008 PbPb: 0.0008 pPb: 0.010
20// -- 5 = Max DCA V0 Daughters pp: 1.5 PbPb: 1.0 pPb: 2.0
21// -- 6 = Min V0 Cosine Of PA To PV pp: pT dep. PbPb: 0.98 pPb: 0.95
22// -- 7 = Min V0 Radius Fid. Vol. pp: 0.2 PbPb: 0.9 pPb: 1.0
23// -- 8 = Min DCA V0 To PV pp: 0.01 PbPb: 0.05 pPb: 0.05
24// -- 9 = Min DCA Pos To PV pp: 0.05 PbPb: 0.1 pPb: 0.02
25// -- 10 = Min DCA Neg To PV pp: 0.05 PbPb: 0.1 pPb: 0.02
21cfe1dd 26// -- 11 = Invariant Mass distribution for Xi
27// -- 12 = Invariant Mass distribution for Omega
28// -- 13 = Transverse Momentum distribution
29// -- 14 = Rapidity distribution for Xi
30// -- 15 = Rapidity distribution for Omega
31// -- 16 = Proper length distribution for the cascade
32// -- 17 = Proper length distribution for the V0
33// -- 18 = Min V0 Cosine Of PA To Xi Vertex pp: pT dep. PbPb: pT dep.
34// -- 19 = Centrality
35// -- 20 = ESD track multiplicity
36// The last two variables are empty in the case proton-proton collisions.
37//
38// ------ Present Macro Check
39// With this macro are produced the plots of the distributions for the topological
40// variables used during the reconstruction of the cascades and defined in the two
41// classes AliCascadeVertexer.cxx and AliV0vertexer.cxx contained in /STEER/ESD/
42// folder in Aliroot.
43//
44// -- First Canvas: DCA cascade daughters, Bachelor IP to PV, Cascade cosine of PA
45// Cascade radius of fiducial volume, Invariant mass Lambda,
46// DCA V0 daughters.
47// -- Second Canvas: V0 cosine of PA to PV, Min V0 Radius Fid. Vol., Min DCA V0 To PV
48// Min DCA Pos To PV, Min DCA Neg To PV, V0 cosine of PA to XiV
49//
50// In this plots, in correspondence to the min/max cut value adopted in the reconstruction
51// a line is drawn, to check if there is same problem in the cuts definition.
52//
53// Also, other specific distribution for the selected cascades are ploted as: the
54// invariant mass distribution, the transverse momentum distribution, the rapidity
55// distribution, proper length distribution for the cascade and the v0.
56//
57// -- Third Canvas: InvMass, Transverse momentum, Cascade proper length, V0 proper length
58//
baec638f 59// -- Fourth Canvas: check on the invariant mass distribution
21cfe1dd 60//
baec638f 61// -- Fifth Canvas: Centrality, track multiplicity
62// (Only for PbPb collisions)
21cfe1dd 63//
64//////////////////////////////////////////////////////
65
66
67
68
69class AliCFContainer;
70
baec638f 71void PostProcessQAMultistrange(Int_t icasType = 2, // 0) Xi- 1) Xi+ 2) Omega- 3) Omega+
72 Int_t collidingsystem = 1, // 0) PbPb 1) pp 2) pPb
73 Char_t *fileDir = ".", // Input file directory
74 Char_t *filein = "AnalysisResults.root" // Input file name
21cfe1dd 75 ) {
76
77
baec638f 78 //___________________
79 //DEFINE DRAW OPTIONS
80 gStyle->SetOptStat(1110);
81 gStyle->SetOptStat(kFALSE);
82 gStyle->SetOptTitle(kFALSE);
83 gStyle->SetFrameLineWidth(2.5);
84 gStyle->SetCanvasColor(0);
85 gStyle->SetPadColor(0);
86 gStyle->SetHistLineWidth(2.5);
87 gStyle->SetLabelSize(0.05, "x");
88 gStyle->SetLabelSize(0.05, "y");
89 gStyle->SetTitleSize(0.05, "x");
90 gStyle->SetTitleSize(0.05, "y");
91 gStyle->SetTitleOffset(1.1, "x");
92 gStyle->SetPadBottomMargin(0.14);
21cfe1dd 93
baec638f 94 //_______________________
95 //SOURCE USEFUL LIBRARIES
96 gSystem->Load("libANALYSIS.so");
97 gSystem->Load("libANALYSISalice.so");
98 gSystem->Load("libCORRFW.so");
21cfe1dd 99
baec638f 100 //_________________________________
101 //SOURCE THE FILE AND THE CONTAINER
21cfe1dd 102 TFile *f1 = new TFile(Form("%s/%s",fileDir,filein));
103 AliCFContainer *cf = (AliCFContainer*) (f1->Get("PWGLFStrangeness.outputCheckCascade/fCFContCascadeCuts"));
104
baec638f 105 //____________
21cfe1dd 106 //DEEFINE TEXT
107 TLatex* t1 = new TLatex(0.6,0.55,"#color[3]{OK!!}");
108 t1->SetTextSize(0.1);
109 t1->SetNDC();
110 TLatex* t2 = new TLatex(0.6,0.55,"#color[2]{NOT OK!!}");
111 t2->SetTextSize(0.1);
112 t2->SetNDC();
113 t2->SetTextColor(2);
114 TLatex* tcasc;
115 if (icasType == 0) tcasc = new TLatex(0.8,0.7,"#color[1]{#Xi^{-}}");
116 else if (icasType == 1) tcasc = new TLatex(0.8,0.7,"#color[1]{#Xi^{+}}");
117 else if (icasType == 2) tcasc = new TLatex(0.8,0.7,"#color[1]{#Omega^{-}}");
118 else if (icasType == 3) tcasc = new TLatex(0.8,0.7,"#color[1]{#Omega^{+}}");
119 tcasc->SetTextSize(0.2);
120 tcasc->SetNDC();
121 tcasc->SetTextColor(2);
122 TLatex* tpdgmass;
123 if (icasType == 0) tpdgmass = new TLatex(0.55,0.7,"#color[1]{PDG mass: 1.321 GeV/c^{2}}");
124 else if (icasType == 1) tpdgmass = new TLatex(0.55,0.7,"#color[1]{PDG mass: 1.321 GeV/c^{2}}");
125 else if (icasType == 2) tpdgmass = new TLatex(0.55,0.7,"#color[1]{PDG mass: 1.672 GeV/c^{2}}");
126 else if (icasType == 3) tpdgmass = new TLatex(0.55,0.7,"#color[1]{PDG mass: 1.672 GeV/c^{2}}");
127 tpdgmass->SetTextSize(0.07);
128 tpdgmass->SetNDC();
129 tpdgmass->SetTextColor(2);
baec638f 130
131 //________________________________
21cfe1dd 132 //DEFINE 1st CANVAS AND DRAW PLOTS
133 TCanvas *c1 = new TCanvas("c1","",1200,800);
134 c1->Divide(2,3);
135 //Pad 1: DCA cascade daughters
136 c1->cd(1);
137 gPad->SetLogy();
138 TH1D *hvar0 = cf->ShowProjection(0,icasType);
139 hvar0->Draw("histo");
140 Double_t x0;
141 if (collidingsystem == 0) x0 = 0.3;
142 else if (collidingsystem == 1) x0 = 2.0;
baec638f 143 else if (collidingsystem == 2) x0 = 2.0;
21cfe1dd 144 TLine *line0 = new TLine(x0,0.,x0,hvar0->GetBinContent(hvar0->GetMaximumBin()));
145 line0->SetLineColor(kRed);
146 line0->SetLineStyle(9);
147 line0->SetLineWidth(2.0);
148 line0->Draw("same");
149 Bool_t check_0 = checkOverTheLimit(hvar0, x0);
150 if (check_0) { cout<<"The cut is OK!!"<<endl; t1->Draw(); }
151 else { cout<<"The cut is NOT OK!!"<<endl; t2->Draw(); }
152 tcasc->Draw();
153 //Pad 2: Bachelor IP to PV
154 c1->cd(2);
155 gPad->SetLogy();
156 TH1D *hvar1 = cf->ShowProjection(1,icasType);
157 hvar1->GetXaxis()->SetRangeUser(0.,0.24);
158 hvar1->Draw("histo");
159 Double_t x1;
160 if (collidingsystem == 0) x1 = 0.03;
161 else if (collidingsystem == 1) x1 = 0.01;
baec638f 162 else if (collidingsystem == 2) x1 = 0.03;
21cfe1dd 163 TLine *line1 = new TLine(x1,0.,x1,hvar1->GetBinContent(hvar1->GetMaximumBin()));
164 line1->SetLineColor(kRed);
165 line1->SetLineStyle(9);
166 line1->SetLineWidth(2.0);
167 line1->Draw("same");
168 Bool_t check_1 = checkUnderTheLimit(hvar1, x1);
169 if (check_1) { cout<<"The cut is OK!!"<<endl; t1->Draw(); }
170 else { cout<<"The cut is NOT OK!!"<<endl; t2->Draw(); }
171 //Pad 3: Cascade cosine of Pointing Angle
172 c1->cd(3);
173 gPad->SetLogy();
174 TH1D *hvar2 = cf->ShowProjection(2,icasType);
175 Double_t max2 = hvar2->GetBinContent(hvar2->GetMaximumBin());
176 hvar2->GetYaxis()->SetRangeUser(0.01,max2*1.5);
177 hvar2->Draw("histo");
178 Double_t x2;
179 if (collidingsystem == 0) x2 = 0.999;
180 else if (collidingsystem == 1) x2 = 0.98;
baec638f 181 else if (collidingsystem == 2) x2 = 0.95;
21cfe1dd 182 TLine *line2 = new TLine(x2,0.,x2,hvar2->GetBinContent(hvar2->GetMaximumBin()));
183 line2->SetLineColor(kRed);
184 line2->SetLineStyle(9);
185 line2->SetLineWidth(2.0);
186 line2->Draw("same");
187 line1->Draw("same");
188 Bool_t check_2 = checkUnderTheLimit(hvar2, x2);
189 if (check_2) { cout<<"The cut is OK!!"<<endl; t1->Draw(); }
190 else { cout<<"The cut is NOT OK!!"<<endl; t2->Draw(); }
191 //Pad 4: Cascade radius of fiducial volume
192 c1->cd(4);
193 gPad->SetLogy();
194 TH1D *hvar3 = cf->ShowProjection(3,icasType);
195 hvar3->GetXaxis()->SetRangeUser(0.,3.8);
196 hvar3->Draw("histo");
197 Double_t x3;
198 if (collidingsystem == 0) x3 = 0.9;
199 else if (collidingsystem == 1) x3 = 0.2;
baec638f 200 else if (collidingsystem == 2) x3 = 0.4;
21cfe1dd 201 TLine *line3 = new TLine(x3,0.,x3,hvar3->GetBinContent(hvar3->GetMaximumBin()));
202 line3->SetLineColor(kRed);
203 line3->SetLineStyle(9);
204 line3->SetLineWidth(2.0);
205 line3->Draw("same");
206 Bool_t check_3 = checkUnderTheLimit(hvar3, x3);
207 if (check_3) { cout<<"The cut is OK!!"<<endl; t1->Draw(); }
208 else { cout<<"The cut is NOT OK!!"<<endl; t2->Draw(); }
209 //Pad 5: Invariant mass Lambda
210 c1->cd(5);
211 TH1D *hvar4 = cf->ShowProjection(4,icasType);
212 hvar4->Draw("histo");
213 Double_t x41 = 1.116 + 0.008;
214 TLine *line41 = new TLine(x41,0.,x41,hvar4->GetBinContent(hvar4->GetMaximumBin()));
215 line41->SetLineColor(kRed);
216 line41->SetLineStyle(9);
217 line41->SetLineWidth(2.0);
218 line41->Draw("same");
baec638f 219 Double_t x42;
220 if (collidingsystem < 2) x42 = 1.115 - 0.008;
221 else if (collidingsystem == 2) x42 = 1.115 - 0.010;
21cfe1dd 222 TLine *line42 = new TLine(x42,0.,x42,hvar4->GetBinContent(hvar4->GetMaximumBin()));
223 line42->SetLineColor(kRed);
224 line42->SetLineStyle(9);
225 line42->SetLineWidth(2.0);
226 line42->Draw("same");
227 Bool_t check_4_1 = checkUnderTheLimit(hvar3, x3);
228 Bool_t check_4_2 = checkOverTheLimit(hvar0, x0);
229 if (check_4_1 && check_4_2) { cout<<"The cut is OK!!"<<endl; t1->Draw(); }
230 else { cout<<"The cut is NOT OK!!"<<endl; t2->Draw(); }
231 //Pad 6: DCA V0 daughters
232 c1->cd(6);
233 gPad->SetLogy();
234 TH1D *hvar5 = cf->ShowProjection(5,icasType);
235 hvar5->Draw("histo");
236 Double_t x5;
237 if (collidingsystem == 0) x5 = 1.0;
238 else if (collidingsystem == 1) x5 = 1.5;
baec638f 239 else if (collidingsystem == 2) x5 = 2.0;
21cfe1dd 240 TLine *line5 = new TLine(x5,0.,x5,hvar5->GetBinContent(hvar5->GetMaximumBin()));
241 line5->SetLineColor(kRed);
242 line5->SetLineStyle(9);
243 line5->SetLineWidth(2.0);
244 line5->Draw("same");
245 Bool_t check_5 = checkOverTheLimit(hvar5, x5);
246 if (check_5) { cout<<"The cut is OK!!"<<endl; t1->Draw(); }
247 else { cout<<"The cut is NOT OK!!"<<endl; t2->Draw(); }
248 c1->SaveAs("fig_lf_Multistrange.pdf(");
249
baec638f 250 //________________________________
251 //DEFINE 2nd CANVAS AND DRAW PLOTS
21cfe1dd 252 TCanvas *c2 = new TCanvas("c2","",1200,800);
253 c2->Divide(2,3);
254 //Pad 1: V0 cosine of Pointing Angle to PV
255 c2->cd(1);
256 gPad->SetLogy();
257 TH1D *hvar6 = cf->ShowProjection(6,icasType);
258 Double_t max6 = hvar6->GetBinContent(hvar6->GetMaximumBin());
259 hvar6->GetYaxis()->SetRangeUser(0.01,max6*1.5);
260 hvar6->Draw("histo");
261 //Pad 2: Min V0 Radius Fid. Vol.
262 c2->cd(2);
263 gPad->SetLogy();
264 TH1D *hvar7 = cf->ShowProjection(7,icasType);
265 hvar7->GetXaxis()->SetRangeUser(0.,3.0);
266 hvar7->Draw("histo");
267 Double_t x7;
268 if (collidingsystem == 0) x7 = 0.9;
269 else if (collidingsystem == 1) x7 = 0.2;
baec638f 270 else if (collidingsystem == 2) x7 = 0.4;
21cfe1dd 271 TLine *line7 = new TLine(x7,0.,x7,hvar7->GetBinContent(hvar7->GetMaximumBin()));
272 line7->SetLineColor(kRed);
273 line7->SetLineStyle(9);
274 line7->SetLineWidth(2.0);
275 line7->Draw("same");
276 Bool_t check_7 = checkUnderTheLimit(hvar7, x7);
277 if (check_7) { cout<<"The cut is OK!!"<<endl; t1->Draw(); }
278 else { cout<<"The cut is NOT OK!!"<<endl; t2->Draw(); }
279 //Pad3: Min DCA V0 To PV
280 c2->cd(3);
281 gPad->SetLogy();
282 TH1D *hvar8 = cf->ShowProjection(8,icasType);
283 hvar8->GetXaxis()->SetRangeUser(0.,0.3);
284 hvar8->Draw("histo");
285 Double_t x8;
286 if (collidingsystem == 0) x8 = 0.05;
287 else if (collidingsystem == 1) x8 = 0.01;
baec638f 288 else if (collidingsystem == 2) x8 = 0.05;
21cfe1dd 289 TLine *line8 = new TLine(x8,0.,x8,hvar8->GetBinContent(hvar8->GetMaximumBin()));
290 line8->SetLineColor(kRed);
291 line8->SetLineStyle(9);
292 line8->SetLineWidth(2.0);
293 line8->Draw("same");
294 Bool_t check_8 = checkUnderTheLimit(hvar8, x8);
295 if (check_8) { cout<<"The cut is OK!!"<<endl; t1->Draw(); }
296 else { cout<<"The cut is NOT OK!!"<<endl; t2->Draw(); }
297 //Pad 4: Min DCA Pos To PV
298 c2->cd(4);
299 gPad->SetLogy();
300 TH1D *hvar9 = cf->ShowProjection(9,icasType);
301 hvar9->GetXaxis()->SetRangeUser(0.,0.2);
302 hvar9->Draw("histo");
303 Double_t x9;
304 if (collidingsystem == 0) x9 = 0.1;
305 else if (collidingsystem == 1) x9 = 0.05;
baec638f 306 else if (collidingsystem == 2) x9 = 0.02;
21cfe1dd 307 TLine *line9 = new TLine(x9,0.,x9,hvar9->GetBinContent(hvar9->GetMaximumBin()));
308 line9->SetLineColor(kRed);
309 line9->SetLineStyle(9);
310 line9->SetLineWidth(2.0);
311 line9->Draw("same");
312 Bool_t check_9 = checkUnderTheLimit(hvar9, x9);
313 if (check_9) { cout<<"The cut is OK!!"<<endl; t1->Draw(); }
314 else { cout<<"The cut is NOT OK!!"<<endl; t2->Draw(); }
315 //Pad 5: Min DCA Neg To PV
316 c2->cd(5);
317 gPad->SetLogy();
318 TH1D *hvar10 = cf->ShowProjection(10,icasType);
319 hvar10->GetXaxis()->SetRangeUser(0.,0.2);
320 hvar10->Draw("histo");
321 Double_t x10;
322 if (collidingsystem == 0) x10 = 0.1;
323 else if (collidingsystem == 1) x10 = 0.05;
baec638f 324 else if (collidingsystem == 2) x10 = 0.02;
21cfe1dd 325 TLine *line10 = new TLine(x10,0.,x10,hvar10->GetBinContent(hvar10->GetMaximumBin()));
326 line10->SetLineColor(kRed);
327 line10->SetLineStyle(9);
328 line10->SetLineWidth(2.0);
329 line10->Draw("same");
330 Bool_t check_10 = checkUnderTheLimit(hvar10, x10);
331 if (check_10) { cout<<"The cut is OK!!"<<endl; t1->Draw(); }
332 else { cout<<"The cut is NOT OK!!"<<endl; t2->Draw(); }
baec638f 333 //Pad 6: V0 cosine of Pointing Angle to Xi vtx
21cfe1dd 334 c2->cd(6);
335 gPad->SetLogy();
336 TH1D *hvar20 = cf->ShowProjection(18,icasType);
337 Double_t max20 = hvar20->GetBinContent(hvar20->GetMaximumBin());
338 hvar20->GetYaxis()->SetRangeUser(0.01,max20*1.5);
339 hvar20->Draw("histo");
340 c2->SaveAs("fig_lf_Multistrange.pdf");
341
baec638f 342 //________________________________
343 //DEFINE 3rd CANVAS AND DRAW PLOTS
21cfe1dd 344 TCanvas *c3 = new TCanvas("c3","",1200,800);
345 c3->Divide(2,3);
346 //Pad 1: InvMass
347 c3->cd(1);
348 TH1D *hvar12 = cf->ShowProjection(11+icasType/2,icasType);
349 hvar12->Draw("histo");
350 tpdgmass->Draw();
351 TLine *linemass;
352 if (icasType == 0) linemass = new TLine(1.32171,0.,1.32171,0.5*hvar12->GetBinContent(hvar12->GetMaximumBin()));
353 else if (icasType == 1) linemass = new TLine(1.32171,0.,1.32171,0.5*hvar12->GetBinContent(hvar12->GetMaximumBin()));
354 else if (icasType == 2) linemass = new TLine(1.67245,0.,1.67245,0.5*hvar12->GetBinContent(hvar12->GetMaximumBin()));
355 else if (icasType == 3) linemass = new TLine(1.67245,0.,1.67245,0.5*hvar12->GetBinContent(hvar12->GetMaximumBin()));
356 linemass->SetLineColor(kRed);
357 linemass->SetLineStyle(1);
358 linemass->SetLineWidth(2.0);
359 linemass->Draw("same");
360 //Pad 2: Transverse momentum
361 c3->cd(2);
362 TH1D *hvar13 = cf->ShowProjection(13,icasType);
363 hvar13->Draw("histo");
364 //Pad 3: Y
365 c3->cd(3);
366 TH1D *hvar14 = cf->ShowProjection(14+icasType/2,icasType);
367 hvar14->Draw("histo");
368 //Pad 4: Cascade proper length
369 c3->cd(4);
370 TH1D *hvar18;
371 hvar18 = cf->ShowProjection(16,icasType);
372 hvar18->GetXaxis()->SetRangeUser(0.,90.);
373 hvar18->Draw("histo");
374 //Pad 5: V0 proper length
375 c3->cd(5);
376 TH1D *hvar19;
377 hvar19 = cf->ShowProjection(17,icasType);
378 hvar19->GetXaxis()->SetRangeUser(0.,90.);
379 hvar19->Draw("histo");
baec638f 380 //Pad 6
381 // empty
fe5e47cc 382 c3->SaveAs("fig_lf_Multistrange.pdf");
21cfe1dd 383
baec638f 384 //________________________________
385 //DEFINE 4th CANVAS AND DRAW PLOTS
386 TCanvas *c4 = new TCanvas("c4","",600,400);
387 c4->Divide(2,1);
388 //Pad1: invariant mass fit
389 c4->cd(1);
390 TH1D *hvar18 = cf->ShowProjection(11+icasType/2,icasType);
391 hvar18->Draw("histo");
392 // - SOME PARAMETER VALUE
393 Bool_t kfitgauss = kFALSE;
394 Bool_t kfitleft = kFALSE;
395 Bool_t kfitright = kFALSE;
396 Int_t ptbinNarrowY = 0;
397 if (icasType < 2) ptbinNarrowY = 10; // 6;
398 else ptbinNarrowY = 3; // 2;
399 // - SOME DEFINITIONS
400 Float_t lowlimmass;
401 Float_t uplimmass;
402 Float_t lowgausslim;
403 Float_t upgausslim;
404 if (icasType==0||icasType==1) {
405 lowlimmass=1.30;
406 uplimmass=1.34;
407 lowgausslim=1.312;
408 upgausslim=1.332;
409 } else {
410 lowlimmass=1.645;
411 uplimmass=1.70;
412 lowgausslim=1.668;
413 upgausslim=1.678;
414 }
415 TF1* fitinvmass = new TF1("fitinvmass","gaus(0)+pol2(3)",lowlimmass,uplimmass);
416 fitinvmass->SetParName(0, "cnstntG");
417 fitinvmass->SetParName(1, "meanG");
418 fitinvmass->SetParName(2, "sigmaG");
419 fitinvmass->SetParLimits(0,0.,500000.);
420 if (icasType==0||icasType==1) {
421 fitinvmass->SetParameter(1, 1.32171);
422 fitinvmass->SetParLimits(1, 1.31,1.33);
423 fitinvmass->SetParLimits(2,0.001,0.005);
424 } else {
425 fitinvmass->SetParameter(1, 1.67245);
426 fitinvmass->SetParLimits(1, 1.664,1.68);
427 fitinvmass->SetParLimits(2,0.0008,0.006);
428 }
429 hvar18->Fit("fitinvmass","rimeN");
430 fitinvmass->SetLineColor(kRed);
431 fitinvmass->Draw("same");
432 Float_t meanGauss = fitinvmass->GetParameter(1);
433 Float_t sigmaGauss = fitinvmass->GetParameter(2);
21cfe1dd 434 cout<<"Mean: "<<meanGauss<<endl;
435 cout<<"Sigma: "<<sigmaGauss<<endl;
baec638f 436 //Pad2: Text
437 c4->cd(2);
21cfe1dd 438 Float_t refwidth = 0.002;
baec638f 439 if (icasType > 1) refwidth = 0.0025;
440 TPaveText *pave1 = new TPaveText(0.05,0.3,0.95,0.5);
441 pave1->SetFillColor(0);
442 pave1->SetTextSize(0.04);
443 pave1->SetTextAlign(12);
444 if (icasType < 2) pave1->AddText("PDG mass: 1.32171 GeV/c^{2}");
445 else pave1->AddText("PDG mass: 1.67245 GeV/c^{2}");
446 pave1->AddText(Form("#color[1]{Mass form Fit: %.5f #pm %.5f GeV/c^{2}}",meanGauss,sigmaGauss));
447 if (sigmaGauss > refwidth - 0.0003 && sigmaGauss < refwidth + 0.0003) pave1->AddText("#color[3]{OK!! The width is compatible with standard.}");
448 else pave1->AddText("#color[2]{NOT OK!! Problem.}");
449 pave1->Draw();
450 cout<<" "<<refwidth - 0.0003<<"<"<<sigmaGauss<<"<"<<refwidth + 0.0003<<endl;
451 c4->SaveAs("fig_lf_Multistrange.pdf");
452
453 //________________________________
454 //DEFINE 5th CANVAS AND DRAW PLOTS
21cfe1dd 455 if (collidingsystem == 0) {
456 TCanvas *c5 = new TCanvas("c5","",1200,270);
457 c5->Divide(2,1);
baec638f 458 //Pad 1: centrality
459 c5->cd(1);
460 TH1D *hvar16 = cf->ShowProjection(19,icasType);
461 hvar16->Draw("histo");
462 //Pad 2: track multiplicity
463 c5->cd(2);
464 TH1D *hvar17 = cf->ShowProjection(20,icasType);
465 hvar17->Draw("histo");
21cfe1dd 466 c5->SaveAs("fig_lf_Multistrange.pdf)");
467 }
468
469
470}
471
472
473
baec638f 474//______________________
21cfe1dd 475Bool_t checkUnderTheLimit(TH1D *lHist, Double_t limit) {
476
477 Int_t binlimit = lHist->FindBin(limit);
478 Bool_t checkOk = kTRUE;
479 for (Int_t i = 1; i < binlimit; i++) {
480 Int_t content = 0;
481 content = lHist->GetBinContent(i);
482 if (content != 0) checkOk = kFALSE;
483 //cout<<"Content bin "<<i<<": "<<content<<endl;
484 }
485 return checkOk;
486
487}
488
baec638f 489//______________________
21cfe1dd 490Bool_t checkOverTheLimit(TH1D *lHist, Double_t limit) {
491
492 Int_t binlimit = lHist->FindBin(limit);
493 Int_t lastbin = lHist->GetNbinsX();
494 Bool_t checkOk = kTRUE;
495 for (Int_t i = binlimit; i < lastbin+1; i++) {
496 Int_t content = 0;
497 content = lHist->GetBinContent(i);
498 if (content != 0) checkOk = kFALSE;
499 //cout<<"Content bin "<<i<<": "<<content<<endl;
500 }
501 return checkOk;
502
503}
504
505
506