]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWGLF/QATasks/post/multistrangeQA.C
Fix for end-of-line style
[u/mrichter/AliRoot.git] / PWGLF / QATasks / post / multistrangeQA.C
index 00aa49d03a9d0187d851cd9285e1a6efe54c5e8f..3ea398ccb1d1d8aa85fde01fcfba1fc565460383 100644 (file)
-//////////////////////////////////////////////////\r
-//\r
-//  This macro was written by Domenico Colella (domenico.colella@cern.ch).\r
-//  12 November 2013\r
-//\r
-//   ------ Arguments\r
-//   --  icasType          =  0) Xi- 1) Xi+ 2) Omega- 3) Omega+\r
-//   --  collidingsystem   =  0) PbPb  1) pp\r
-//   --  fileDir           =  "Input file directory"\r
-//   --  filein            =  "Input file name"\r
-//\r
-//   ------ QATask output content\r
-//   The output produced by the QATask is a CFContainer with 4 steps and 21 variables.\r
-//   The meaning of each variable within the container are listed here:\r
-//   --  0   = Max DCA Cascade Daughters                 pp: 2.0     PbPb: 0.3\r
-//   --  1   = Min DCA Bach To PV                        pp: 0.01    PbPb: 0.03\r
-//   --  2   = Min Cascade Cosine Of PA                  pp: 0.98    PbPb: 0.999\r
-//   --  3   = Min Cascade Radius Fid. Vol.              pp: 0.2     PbPb: 0.9\r
-//   --  4   = Window Invariant Mass Lambda              pp: 0.008   PbPb: 0.0008\r
-//   --  5   = Max DCA V0 Daughters                      pp: 1.5     PbPb: 1.0\r
-//   --  6   = Min V0 Cosine Of PA To PV                 pp: pT dep. PbPb: 0.98\r
-//   --  7   = Min V0 Radius Fid. Vol.                   pp: 0.2     PbPb: 0.9\r
-//   --  8   = Min DCA V0 To PV                          pp: 0.01    PbPb: 0.05\r
-//   --  9   = Min DCA Pos To PV                         pp: 0.05    PbPb: 0.1\r
-//   --  10  = Min DCA Neg To PV                         pp: 0.05    PbPb: 0.1\r
-//   --  11  = Invariant Mass distribution for Xi\r
-//   --  12  = Invariant Mass distribution for Omega\r
-//   --  13  = Transverse Momentum distribution\r
-//   --  14  = Rapidity distribution for Xi\r
-//   --  15  = Rapidity distribution for Omega\r
-//   --  16  = Proper length distribution for the cascade\r
-//   --  17  = Proper length distribution for the V0\r
-//   --  18  = Min V0 Cosine Of PA To Xi Vertex         pp: pT dep. PbPb: pT dep.\r
-//   --  19  = Centrality\r
-//   --  20  = ESD track multiplicity\r
-//   The last two variables are empty in the case proton-proton collisions.\r
-//\r
-//   ------ Present Macro Check\r
-//   With this macro are produced the plots of the distributions for the topological\r
-//   variables used during the reconstruction of the cascades and defined in the two\r
-//   classes AliCascadeVertexer.cxx and AliV0vertexer.cxx contained in /STEER/ESD/ \r
-//   folder in Aliroot.\r
-//\r
-//   -- First Canvas: DCA cascade daughters, Bachelor IP to PV, Cascade cosine of PA\r
-//                    Cascade radius of fiducial volume, Invariant mass Lambda,\r
-//                    DCA V0 daughters.\r
-//   -- Second Canvas: V0 cosine of PA to PV, Min V0 Radius Fid. Vol., Min DCA V0 To PV\r
-//                     Min DCA Pos To PV, Min DCA Neg To PV, V0 cosine of PA to XiV\r
-//\r
-//   In this plots, in correspondence to the min/max cut value adopted in the reconstruction\r
-//   a line is drawn, to check if there is same problem in the cuts definition.\r
-//\r
-//   Also, other specific distribution for the selected cascades are ploted as: the\r
-//   invariant mass distribution, the transverse momentum distribution, the rapidity\r
-//   distribution, proper length distribution for the cascade and the v0.\r
-//\r
-//   -- Third Canvas: InvMass, Transverse momentum, Cascade proper length, V0 proper length\r
-//\r
-//   In the end, only for thr PbPb collision the centrality distribution and the\r
-//   track multiplicity distribution are sored.\r
-//\r
-//   -- Fourth Canvas: Centrality, track multiplicity\r
-//\r
-//\r
-//////////////////////////////////////////////////////\r
-\r
-\r
-\r
-\r
-class AliCFContainer;\r
-\r
-void multistrangeQA(Int_t   icasType        = 0,                             // 0) Xi- 1) Xi+ 2) Omega- 3) Omega+\r
-                    Int_t   collidingsystem = 0,                             // 0) PbPb  1) pp\r
-                    Char_t *fileDir         = "./",                          // Input file directory\r
-                    Char_t *filein          = "AnalysisResults_AOD.root"     // Input file name\r
-                   ) {\r
-\r
-\r
-      /////////////\r
-      gStyle->SetOptStat(1110);\r
-      gStyle->SetOptStat(kFALSE);\r
-      gStyle->SetOptTitle(kFALSE);\r
-      gStyle->SetFrameLineWidth(2.5);\r
-      gStyle->SetCanvasColor(0);\r
-      gStyle->SetPadColor(0);\r
-      gStyle->SetHistLineWidth(2.5);\r
-      gStyle->SetLabelSize(0.05, "x");\r
-      gStyle->SetLabelSize(0.05, "y");\r
-      gStyle->SetTitleSize(0.05, "x");\r
-      gStyle->SetTitleSize(0.05, "y");\r
-      gStyle->SetTitleOffset(1.1, "x");\r
-      gStyle->SetPadBottomMargin(0.14);\r
-      gSystem->Load("libANALYSIS.so");\r
-      gSystem->Load("libANALYSISalice.so");\r
-      gSystem->Load("libCORRFW.so");\r
-\r
\r
-\r
-     TFile *f1 = new TFile(Form("%s/%s",fileDir,filein));\r
-     AliCFContainer *cf = (AliCFContainer*) (f1->Get("PWGLFStrangeness.outputCheckCascade/fCFContCascadeCuts"));\r
-   \r
-\r
-     //DEEFINE TEXT\r
-     TLatex* t1 = new TLatex(0.6,0.55,"#color[3]{OK!!}");\r
-     t1->SetTextSize(0.1);\r
-     t1->SetNDC();\r
-     TLatex* t2 = new TLatex(0.6,0.55,"#color[2]{NOT OK!!}");\r
-     t2->SetTextSize(0.1);\r
-     t2->SetNDC();\r
-     t2->SetTextColor(2);\r
-     TLatex* tcasc;\r
-     if      (icasType == 0) tcasc = new TLatex(0.8,0.7,"#color[1]{#Xi^{-}}");\r
-     else if (icasType == 1) tcasc = new TLatex(0.8,0.7,"#color[1]{#Xi^{+}}");\r
-     else if (icasType == 2) tcasc = new TLatex(0.8,0.7,"#color[1]{#Omega^{-}}");\r
-     else if (icasType == 3) tcasc = new TLatex(0.8,0.7,"#color[1]{#Omega^{+}}");\r
-     tcasc->SetTextSize(0.2);\r
-     tcasc->SetNDC();\r
-     tcasc->SetTextColor(2);\r
-     TLatex* tpdgmass;\r
-     if      (icasType == 0) tpdgmass = new TLatex(0.55,0.7,"#color[1]{PDG mass: 1.321 GeV/c^{2}}");\r
-     else if (icasType == 1) tpdgmass = new TLatex(0.55,0.7,"#color[1]{PDG mass: 1.321 GeV/c^{2}}");\r
-     else if (icasType == 2) tpdgmass = new TLatex(0.55,0.7,"#color[1]{PDG mass: 1.672 GeV/c^{2}}");\r
-     else if (icasType == 3) tpdgmass = new TLatex(0.55,0.7,"#color[1]{PDG mass: 1.672 GeV/c^{2}}");\r
-     tpdgmass->SetTextSize(0.07);\r
-     tpdgmass->SetNDC();\r
-     tpdgmass->SetTextColor(2);\r
\r
-     //DEFINE 1st CANVAS AND DRAW PLOTS\r
-     TCanvas *c1 = new TCanvas("c1","",1200,800);\r
-     c1->Divide(2,3); \r
-       //Pad 1: DCA cascade daughters\r
-       c1->cd(1);\r
-       gPad->SetLogy();\r
-       TH1D *hvar0 = cf->ShowProjection(0,icasType);\r
-       hvar0->Draw("histo");\r
-       Double_t x0;\r
-       if      (collidingsystem == 0) x0 = 0.3;\r
-       else if (collidingsystem == 1) x0 = 2.0;\r
-       TLine *line0 = new TLine(x0,0.,x0,hvar0->GetBinContent(hvar0->GetMaximumBin()));\r
-       line0->SetLineColor(kRed);\r
-       line0->SetLineStyle(9);\r
-       line0->SetLineWidth(2.0);\r
-       line0->Draw("same");\r
-          Bool_t check_0 = checkOverTheLimit(hvar0, x0);\r
-          if (check_0) { cout<<"The cut is OK!!"<<endl; t1->Draw(); }\r
-          else         { cout<<"The cut is NOT OK!!"<<endl; t2->Draw(); }\r
-       tcasc->Draw();\r
-       //Pad 2: Bachelor IP to PV\r
-       c1->cd(2);\r
-       gPad->SetLogy();\r
-       TH1D *hvar1 = cf->ShowProjection(1,icasType);\r
-       hvar1->GetXaxis()->SetRangeUser(0.,0.24);\r
-       hvar1->Draw("histo");\r
-       Double_t x1;\r
-       if      (collidingsystem == 0) x1 = 0.03;\r
-       else if (collidingsystem == 1) x1 = 0.01;\r
-       TLine *line1 = new TLine(x1,0.,x1,hvar1->GetBinContent(hvar1->GetMaximumBin()));\r
-       line1->SetLineColor(kRed);\r
-       line1->SetLineStyle(9);\r
-       line1->SetLineWidth(2.0);\r
-       line1->Draw("same");\r
-          Bool_t check_1 = checkUnderTheLimit(hvar1, x1);\r
-          if (check_1) { cout<<"The cut is OK!!"<<endl; t1->Draw(); }\r
-          else         { cout<<"The cut is NOT OK!!"<<endl; t2->Draw(); }\r
-       //Pad 3: Cascade cosine of Pointing Angle\r
-       c1->cd(3);\r
-       gPad->SetLogy();\r
-       TH1D *hvar2 = cf->ShowProjection(2,icasType);\r
-       Double_t max2 = hvar2->GetBinContent(hvar2->GetMaximumBin());\r
-       hvar2->GetYaxis()->SetRangeUser(0.01,max2*1.5);\r
-       hvar2->Draw("histo");\r
-       Double_t x2;\r
-       if      (collidingsystem == 0) x2 = 0.999;\r
-       else if (collidingsystem == 1) x2 = 0.98;\r
-       TLine *line2 = new TLine(x2,0.,x2,hvar2->GetBinContent(hvar2->GetMaximumBin()));\r
-       line2->SetLineColor(kRed);\r
-       line2->SetLineStyle(9);\r
-       line2->SetLineWidth(2.0);\r
-       line2->Draw("same");\r
-       line1->Draw("same");\r
-          Bool_t check_2 = checkUnderTheLimit(hvar2, x2);\r
-          if (check_2) { cout<<"The cut is OK!!"<<endl; t1->Draw(); }\r
-          else         { cout<<"The cut is NOT OK!!"<<endl; t2->Draw(); }\r
-       //Pad 4: Cascade radius of fiducial volume\r
-       c1->cd(4);\r
-       gPad->SetLogy();\r
-       TH1D *hvar3 = cf->ShowProjection(3,icasType);\r
-       hvar3->GetXaxis()->SetRangeUser(0.,3.8);\r
-       hvar3->Draw("histo");\r
-       Double_t x3;\r
-       if      (collidingsystem == 0) x3 = 0.9;\r
-       else if (collidingsystem == 1) x3 = 0.2;\r
-       TLine *line3 = new TLine(x3,0.,x3,hvar3->GetBinContent(hvar3->GetMaximumBin()));\r
-       line3->SetLineColor(kRed);\r
-       line3->SetLineStyle(9);\r
-       line3->SetLineWidth(2.0);\r
-       line3->Draw("same");\r
-          Bool_t check_3 = checkUnderTheLimit(hvar3, x3);\r
-          if (check_3) { cout<<"The cut is OK!!"<<endl; t1->Draw(); }\r
-          else         { cout<<"The cut is NOT OK!!"<<endl; t2->Draw(); }\r
-       //Pad 5: Invariant mass Lambda\r
-       c1->cd(5);\r
-       TH1D *hvar4 = cf->ShowProjection(4,icasType);\r
-       hvar4->Draw("histo");\r
-       Double_t x41 = 1.116 + 0.008;\r
-       TLine *line41 = new TLine(x41,0.,x41,hvar4->GetBinContent(hvar4->GetMaximumBin()));\r
-       line41->SetLineColor(kRed);\r
-       line41->SetLineStyle(9);\r
-       line41->SetLineWidth(2.0);\r
-       line41->Draw("same");\r
-       Double_t x42 = 1.115 - 0.008;\r
-       TLine *line42 = new TLine(x42,0.,x42,hvar4->GetBinContent(hvar4->GetMaximumBin()));\r
-       line42->SetLineColor(kRed);\r
-       line42->SetLineStyle(9);\r
-       line42->SetLineWidth(2.0);\r
-       line42->Draw("same");\r
-          Bool_t check_4_1 = checkUnderTheLimit(hvar3, x3);\r
-          Bool_t check_4_2 = checkOverTheLimit(hvar0, x0);\r
-          if (check_4_1 && check_4_2) { cout<<"The cut is OK!!"<<endl; t1->Draw(); }\r
-          else                        { cout<<"The cut is NOT OK!!"<<endl; t2->Draw(); }\r
-       //Pad 6: DCA V0 daughters\r
-       c1->cd(6);\r
-       gPad->SetLogy();\r
-       TH1D *hvar5 = cf->ShowProjection(5,icasType);\r
-       hvar5->Draw("histo");\r
-       Double_t x5;\r
-       if      (collidingsystem == 0) x5 = 1.0;\r
-       else if (collidingsystem == 1) x5 = 1.5;\r
-       TLine *line5 = new TLine(x5,0.,x5,hvar5->GetBinContent(hvar5->GetMaximumBin()));\r
-       line5->SetLineColor(kRed);\r
-       line5->SetLineStyle(9);\r
-       line5->SetLineWidth(2.0);\r
-       line5->Draw("same");\r
-          Bool_t check_5 = checkOverTheLimit(hvar5, x5);\r
-          if (check_5) { cout<<"The cut is OK!!"<<endl; t1->Draw(); }\r
-          else         { cout<<"The cut is NOT OK!!"<<endl; t2->Draw(); }\r
-     c1->SaveAs("MultistrangeQA.pdf(");\r
-    \r
-\r
-     //DEFINE 2st CANVAS AND DRAW PLOTS\r
-     TCanvas *c2 = new TCanvas("c2","",1200,800);\r
-     c2->Divide(2,3);\r
-       //Pad 1: V0 cosine of Pointing Angle to PV\r
-       c2->cd(1);\r
-       gPad->SetLogy();\r
-       TH1D *hvar6 = cf->ShowProjection(6,icasType);\r
-       Double_t max6 = hvar6->GetBinContent(hvar6->GetMaximumBin());\r
-       hvar6->GetYaxis()->SetRangeUser(0.01,max6*1.5);\r
-       hvar6->Draw("histo");\r
-       //Pad 2: Min V0 Radius Fid. Vol.  \r
-       c2->cd(2);\r
-       gPad->SetLogy();\r
-       TH1D *hvar7 = cf->ShowProjection(7,icasType);\r
-       hvar7->GetXaxis()->SetRangeUser(0.,3.0);\r
-       hvar7->Draw("histo");\r
-       Double_t x7;\r
-       if      (collidingsystem == 0) x7 = 0.9;\r
-       else if (collidingsystem == 1) x7 = 0.2;\r
-       TLine *line7 = new TLine(x7,0.,x7,hvar7->GetBinContent(hvar7->GetMaximumBin()));\r
-       line7->SetLineColor(kRed);\r
-       line7->SetLineStyle(9);\r
-       line7->SetLineWidth(2.0);\r
-       line7->Draw("same");\r
-          Bool_t check_7 = checkUnderTheLimit(hvar7, x7);\r
-          if (check_7) { cout<<"The cut is OK!!"<<endl; t1->Draw(); }\r
-          else         { cout<<"The cut is NOT OK!!"<<endl; t2->Draw(); }\r
-       //Pad3: Min DCA V0 To PV\r
-       c2->cd(3);\r
-       gPad->SetLogy();\r
-       TH1D *hvar8 = cf->ShowProjection(8,icasType);\r
-       hvar8->GetXaxis()->SetRangeUser(0.,0.3);\r
-       hvar8->Draw("histo");\r
-       Double_t x8;\r
-       if      (collidingsystem == 0) x8 = 0.05;\r
-       else if (collidingsystem == 1) x8 = 0.01;\r
-       TLine *line8 = new TLine(x8,0.,x8,hvar8->GetBinContent(hvar8->GetMaximumBin()));\r
-       line8->SetLineColor(kRed);\r
-       line8->SetLineStyle(9);\r
-       line8->SetLineWidth(2.0);\r
-       line8->Draw("same");\r
-          Bool_t check_8 = checkUnderTheLimit(hvar8, x8);\r
-          if (check_8) { cout<<"The cut is OK!!"<<endl; t1->Draw(); }\r
-          else         { cout<<"The cut is NOT OK!!"<<endl; t2->Draw(); }\r
-       //Pad 4: Min DCA Pos To PV\r
-       c2->cd(4);\r
-       gPad->SetLogy();\r
-       TH1D *hvar9 = cf->ShowProjection(9,icasType);\r
-       hvar9->GetXaxis()->SetRangeUser(0.,0.2);\r
-       hvar9->Draw("histo");\r
-       Double_t x9;\r
-       if      (collidingsystem == 0) x9 = 0.1;\r
-       else if (collidingsystem == 1) x9 = 0.05;\r
-       TLine *line9 = new TLine(x9,0.,x9,hvar9->GetBinContent(hvar9->GetMaximumBin()));\r
-       line9->SetLineColor(kRed);\r
-       line9->SetLineStyle(9);\r
-       line9->SetLineWidth(2.0);\r
-       line9->Draw("same");\r
-          Bool_t check_9 = checkUnderTheLimit(hvar9, x9);\r
-          if (check_9) { cout<<"The cut is OK!!"<<endl; t1->Draw(); }\r
-          else         { cout<<"The cut is NOT OK!!"<<endl; t2->Draw(); }\r
-       //Pad 5: Min DCA Neg To PV\r
-       c2->cd(5);\r
-       gPad->SetLogy();\r
-       TH1D *hvar10 = cf->ShowProjection(10,icasType);\r
-       hvar10->GetXaxis()->SetRangeUser(0.,0.2);\r
-       hvar10->Draw("histo");\r
-       Double_t x10;\r
-       if      (collidingsystem == 0) x10 = 0.1;\r
-       else if (collidingsystem == 1) x10 = 0.05;\r
-       TLine *line10 = new TLine(x10,0.,x10,hvar10->GetBinContent(hvar10->GetMaximumBin()));\r
-       line10->SetLineColor(kRed);\r
-       line10->SetLineStyle(9);\r
-       line10->SetLineWidth(2.0);\r
-       line10->Draw("same");\r
-          Bool_t check_10 = checkUnderTheLimit(hvar10, x10);\r
-          if (check_10) { cout<<"The cut is OK!!"<<endl; t1->Draw(); }\r
-          else         { cout<<"The cut is NOT OK!!"<<endl; t2->Draw(); }\r
-       //Pad 6: V0 cosine of Pointing Angle to XiV\r
-       c2->cd(6);\r
-       gPad->SetLogy();\r
-       TH1D *hvar20 = cf->ShowProjection(18,icasType);\r
-       Double_t max20 = hvar20->GetBinContent(hvar20->GetMaximumBin());\r
-       hvar20->GetYaxis()->SetRangeUser(0.01,max20*1.5);\r
-       hvar20->Draw("histo");\r
-     c2->SaveAs("MultistrangeQA.pdf");\r
-\r
-     //DEFINE 3st CANVAS AND DRAW PLOTS\r
-     TCanvas *c3 = new TCanvas("c3","",1200,800);\r
-     c3->Divide(2,3);\r
-       //Pad 1: InvMass\r
-       c3->cd(1);\r
-       TH1D *hvar12 = cf->ShowProjection(11+icasType/2,icasType);\r
-       hvar12->Draw("histo");\r
-       tpdgmass->Draw(); \r
-       TLine *linemass;\r
-       if      (icasType == 0) linemass = new TLine(1.32171,0.,1.32171,0.5*hvar12->GetBinContent(hvar12->GetMaximumBin()));\r
-       else if (icasType == 1) linemass = new TLine(1.32171,0.,1.32171,0.5*hvar12->GetBinContent(hvar12->GetMaximumBin()));\r
-       else if (icasType == 2) linemass = new TLine(1.67245,0.,1.67245,0.5*hvar12->GetBinContent(hvar12->GetMaximumBin()));\r
-       else if (icasType == 3) linemass = new TLine(1.67245,0.,1.67245,0.5*hvar12->GetBinContent(hvar12->GetMaximumBin()));\r
-       linemass->SetLineColor(kRed);\r
-       linemass->SetLineStyle(1);\r
-       linemass->SetLineWidth(2.0);\r
-       linemass->Draw("same");\r
-       //Pad 2: Transverse momentum\r
-       c3->cd(2);\r
-       TH1D *hvar13 = cf->ShowProjection(13,icasType);\r
-       hvar13->Draw("histo");\r
-       //Pad 3: Y\r
-       c3->cd(3);\r
-       TH1D *hvar14 = cf->ShowProjection(14+icasType/2,icasType);\r
-       hvar14->Draw("histo");\r
-       //Pad 4: Cascade proper length\r
-       c3->cd(4);\r
-       TH1D *hvar18;\r
-       hvar18 = cf->ShowProjection(16,icasType);\r
-       hvar18->GetXaxis()->SetRangeUser(0.,90.);\r
-       hvar18->Draw("histo");\r
-       //Pad 5: V0 proper length \r
-       c3->cd(5);\r
-       TH1D *hvar19;\r
-       hvar19 = cf->ShowProjection(17,icasType);\r
-       hvar19->GetXaxis()->SetRangeUser(0.,90.);\r
-       hvar19->Draw("histo");\r
-      //Pad 6\r
-      // empty \r
-     if      (collidingsystem == 1) c3->SaveAs("MultistrangeQA.pdf)");\r
-     else if (collidingsystem == 0) c3->SaveAs("MultistrangeQA.pdf");\r
-\r
-    \r
-     //DEFINE 4st CANVAS AND DRAW PLOTS\r
-    TCanvas *c4 = new TCanvas("c4","",600,400);\r
-    c4->Divide(2,1);\r
-      //Pad1: invariant mass fit\r
-      c4->cd(1);\r
-      TH1D *hvar18 = cf->ShowProjection(11+icasType/2,icasType);\r
-      hvar18->Draw("histo");\r
-       // - SOME PARAMETER VALUE\r
-       Bool_t kfitgauss = kFALSE;\r
-       Bool_t kfitleft  = kFALSE;\r
-       Bool_t kfitright = kFALSE;\r
-       Int_t  ptbinNarrowY = 0;\r
-       if (icasType < 2) ptbinNarrowY = 10;   // 6;\r
-       else              ptbinNarrowY =  3;   // 2;\r
-       // - SOME DEFINITIONS\r
-       Float_t lowlimmass;\r
-       Float_t uplimmass;\r
-       Float_t lowgausslim;\r
-       Float_t upgausslim;\r
-       if (icasType==0||icasType==1) {\r
-           lowlimmass=1.30;\r
-           uplimmass=1.34;\r
-           lowgausslim=1.312;\r
-           upgausslim=1.332;\r
-       } else {\r
-           lowlimmass=1.645;\r
-           uplimmass=1.70;\r
-           lowgausslim=1.668;\r
-           upgausslim=1.678;\r
-       }\r
-       TF1*  fitinvmass = new TF1("fitinvmass","gaus(0)+pol2(3)",lowlimmass,uplimmass);\r
-       fitinvmass->SetParName(0, "cnstntG");\r
-       fitinvmass->SetParName(1, "meanG");\r
-       fitinvmass->SetParName(2, "sigmaG");\r
-       fitinvmass->SetParLimits(0,0.,500000.);\r
-       if (icasType==0||icasType==1) {\r
-           fitinvmass->SetParameter(1, 1.32171);\r
-           fitinvmass->SetParLimits(1, 1.31,1.33);\r
-           fitinvmass->SetParLimits(2,0.001,0.005);\r
-       } else {\r
-           fitinvmass->SetParameter(1, 1.67245);\r
-           fitinvmass->SetParLimits(1, 1.664,1.68);\r
-           fitinvmass->SetParLimits(2,0.0008,0.006);\r
-       }\r
-       hvar18->Fit("fitinvmass","rimeN");\r
-       fitinvmass->SetLineColor(kRed);\r
-       fitinvmass->Draw("same");\r
-       Float_t meanGauss   = fitinvmass->GetParameter(1);\r
-       Float_t sigmaGauss  = fitinvmass->GetParameter(2);\r
-       cout<<"Mean: "<<meanGauss<<endl;\r
-       cout<<"Sigma: "<<sigmaGauss<<endl;\r
-     //Pad2: Text\r
-      c4->cd(2);\r
-       Float_t refwidth = 0.002;\r
-      TPaveText *pave1 = new TPaveText(0.05,0.3,0.95,0.5);\r
-      pave1->SetFillColor(0);\r
-      pave1->SetTextSize(0.04);\r
-      pave1->SetTextAlign(12);\r
-      if (icasType < 2) pave1->AddText("PDG mass: 1.32171 GeV/c^{2}");\r
-      else              pave1->AddText("PDG mass: 1.67245 GeV/c^{2}");\r
-      pave1->AddText(Form("#color[1]{Mass form Fit: %.5f #pm %.5f GeV/c^{2}}",meanGauss,sigmaGauss));\r
-      if (sigmaGauss > refwidth - 0.0003 && sigmaGauss < refwidth + 0.0003) pave1->AddText("#color[3]{OK!! The width is compatible with standard.}");\r
-      else                                                                  pave1->AddText("#color[2]{NOT OK!! Problem.}");\r
-      pave1->Draw();\r
-      cout<<"   "<<refwidth - 0.0003<<"<"<<sigmaGauss<<"<"<<refwidth + 0.0003<<endl;\r
-    \r
-     //DEFINE 5st CANVAS AND DRAW PLOTS\r
-     if (collidingsystem == 0) {\r
-         TCanvas *c5 = new TCanvas("c5","",1200,270);\r
-         c5->Divide(2,1);\r
-            //Pad 1: centrality\r
-            c5->cd(1);\r
-            TH1D *hvar16 = cf->ShowProjection(19,icasType);\r
-            hvar16->Draw("histo");\r
-            //Pad 2: track multiplicity\r
-            c5->cd(2);\r
-            TH1D *hvar17 = cf->ShowProjection(20,icasType);\r
-            hvar17->Draw("histo");\r
-         c5->SaveAs("MultistrangeQA.pdf)");\r
-     }\r
-    \r
-\r
-}\r
-\r
-\r
-\r
-\r
-Bool_t checkUnderTheLimit(TH1D *lHist, Double_t limit) {\r
-\r
-      Int_t binlimit = lHist->FindBin(limit);\r
-      Bool_t checkOk = kTRUE;\r
-      for (Int_t i = 1; i < binlimit; i++) {\r
-           Int_t content = 0;\r
-           content = lHist->GetBinContent(i);\r
-           if (content != 0) checkOk = kFALSE;\r
-           //cout<<"Content bin "<<i<<": "<<content<<endl;\r
-      }\r
-      return checkOk;\r
-\r
-}\r
-\r
-\r
-Bool_t checkOverTheLimit(TH1D *lHist, Double_t limit) {\r
-\r
-      Int_t binlimit = lHist->FindBin(limit);\r
-      Int_t lastbin  = lHist->GetNbinsX();\r
-      Bool_t checkOk = kTRUE;\r
-      for (Int_t i = binlimit; i < lastbin+1; i++) {\r
-           Int_t content = 0;\r
-           content = lHist->GetBinContent(i);\r
-           if (content != 0) checkOk = kFALSE;\r
-           //cout<<"Content bin "<<i<<": "<<content<<endl;\r
-      }\r
-      return checkOk;\r
-\r
-}\r
-\r
-\r
+//////////////////////////////////////////////////
+//
+//  This macro was written by Domenico Colella (domenico.colella@cern.ch).
+//  12 November 2013
+//
+//   ------ Arguments
+//   --  icasType          =  0) Xi- 1) Xi+ 2) Omega- 3) Omega+
+//   --  collidingsystem   =  0) PbPb  1) pp
+//   --  fileDir           =  "Input file directory"
+//   --  filein            =  "Input file name"
+//
+//   ------ QATask output content
+//   The output produced by the QATask is a CFContainer with 4 steps and 21 variables.
+//   The meaning of each variable within the container are listed here:
+//   --  0   = Max DCA Cascade Daughters                 pp: 2.0     PbPb: 0.3
+//   --  1   = Min DCA Bach To PV                        pp: 0.01    PbPb: 0.03
+//   --  2   = Min Cascade Cosine Of PA                  pp: 0.98    PbPb: 0.999
+//   --  3   = Min Cascade Radius Fid. Vol.              pp: 0.2     PbPb: 0.9
+//   --  4   = Window Invariant Mass Lambda              pp: 0.008   PbPb: 0.0008
+//   --  5   = Max DCA V0 Daughters                      pp: 1.5     PbPb: 1.0
+//   --  6   = Min V0 Cosine Of PA To PV                 pp: pT dep. PbPb: 0.98
+//   --  7   = Min V0 Radius Fid. Vol.                   pp: 0.2     PbPb: 0.9
+//   --  8   = Min DCA V0 To PV                          pp: 0.01    PbPb: 0.05
+//   --  9   = Min DCA Pos To PV                         pp: 0.05    PbPb: 0.1
+//   --  10  = Min DCA Neg To PV                         pp: 0.05    PbPb: 0.1
+//   --  11  = Invariant Mass distribution for Xi
+//   --  12  = Invariant Mass distribution for Omega
+//   --  13  = Transverse Momentum distribution
+//   --  14  = Rapidity distribution for Xi
+//   --  15  = Rapidity distribution for Omega
+//   --  16  = Proper length distribution for the cascade
+//   --  17  = Proper length distribution for the V0
+//   --  18  = Min V0 Cosine Of PA To Xi Vertex         pp: pT dep. PbPb: pT dep.
+//   --  19  = Centrality
+//   --  20  = ESD track multiplicity
+//   The last two variables are empty in the case proton-proton collisions.
+//
+//   ------ Present Macro Check
+//   With this macro are produced the plots of the distributions for the topological
+//   variables used during the reconstruction of the cascades and defined in the two
+//   classes AliCascadeVertexer.cxx and AliV0vertexer.cxx contained in /STEER/ESD/ 
+//   folder in Aliroot.
+//
+//   -- First Canvas: DCA cascade daughters, Bachelor IP to PV, Cascade cosine of PA
+//                    Cascade radius of fiducial volume, Invariant mass Lambda,
+//                    DCA V0 daughters.
+//   -- Second Canvas: V0 cosine of PA to PV, Min V0 Radius Fid. Vol., Min DCA V0 To PV
+//                     Min DCA Pos To PV, Min DCA Neg To PV, V0 cosine of PA to XiV
+//
+//   In this plots, in correspondence to the min/max cut value adopted in the reconstruction
+//   a line is drawn, to check if there is same problem in the cuts definition.
+//
+//   Also, other specific distribution for the selected cascades are ploted as: the
+//   invariant mass distribution, the transverse momentum distribution, the rapidity
+//   distribution, proper length distribution for the cascade and the v0.
+//
+//   -- Third Canvas: InvMass, Transverse momentum, Cascade proper length, V0 proper length
+//
+//   In the end, only for thr PbPb collision the centrality distribution and the
+//   track multiplicity distribution are sored.
+//
+//   -- Fourth Canvas: Centrality, track multiplicity
+//
+//
+//////////////////////////////////////////////////////
+
+
+
+
+class AliCFContainer;
+
+void multistrangeQA(Int_t   icasType        = 0,                             // 0) Xi- 1) Xi+ 2) Omega- 3) Omega+
+                    Int_t   collidingsystem = 0,                             // 0) PbPb  1) pp
+                    Char_t *fileDir         = "./",                          // Input file directory
+                    Char_t *filein          = "AnalysisResults_AOD.root"     // Input file name
+                   ) {
+
+
+      /////////////
+      gStyle->SetOptStat(1110);
+      gStyle->SetOptStat(kFALSE);
+      gStyle->SetOptTitle(kFALSE);
+      gStyle->SetFrameLineWidth(2.5);
+      gStyle->SetCanvasColor(0);
+      gStyle->SetPadColor(0);
+      gStyle->SetHistLineWidth(2.5);
+      gStyle->SetLabelSize(0.05, "x");
+      gStyle->SetLabelSize(0.05, "y");
+      gStyle->SetTitleSize(0.05, "x");
+      gStyle->SetTitleSize(0.05, "y");
+      gStyle->SetTitleOffset(1.1, "x");
+      gStyle->SetPadBottomMargin(0.14);
+      gSystem->Load("libANALYSIS.so");
+      gSystem->Load("libANALYSISalice.so");
+      gSystem->Load("libCORRFW.so");
+
+
+     TFile *f1 = new TFile(Form("%s/%s",fileDir,filein));
+     AliCFContainer *cf = (AliCFContainer*) (f1->Get("PWGLFStrangeness.outputCheckCascade/fCFContCascadeCuts"));
+   
+
+     //DEEFINE TEXT
+     TLatex* t1 = new TLatex(0.6,0.55,"#color[3]{OK!!}");
+     t1->SetTextSize(0.1);
+     t1->SetNDC();
+     TLatex* t2 = new TLatex(0.6,0.55,"#color[2]{NOT OK!!}");
+     t2->SetTextSize(0.1);
+     t2->SetNDC();
+     t2->SetTextColor(2);
+     TLatex* tcasc;
+     if      (icasType == 0) tcasc = new TLatex(0.8,0.7,"#color[1]{#Xi^{-}}");
+     else if (icasType == 1) tcasc = new TLatex(0.8,0.7,"#color[1]{#Xi^{+}}");
+     else if (icasType == 2) tcasc = new TLatex(0.8,0.7,"#color[1]{#Omega^{-}}");
+     else if (icasType == 3) tcasc = new TLatex(0.8,0.7,"#color[1]{#Omega^{+}}");
+     tcasc->SetTextSize(0.2);
+     tcasc->SetNDC();
+     tcasc->SetTextColor(2);
+     TLatex* tpdgmass;
+     if      (icasType == 0) tpdgmass = new TLatex(0.55,0.7,"#color[1]{PDG mass: 1.321 GeV/c^{2}}");
+     else if (icasType == 1) tpdgmass = new TLatex(0.55,0.7,"#color[1]{PDG mass: 1.321 GeV/c^{2}}");
+     else if (icasType == 2) tpdgmass = new TLatex(0.55,0.7,"#color[1]{PDG mass: 1.672 GeV/c^{2}}");
+     else if (icasType == 3) tpdgmass = new TLatex(0.55,0.7,"#color[1]{PDG mass: 1.672 GeV/c^{2}}");
+     tpdgmass->SetTextSize(0.07);
+     tpdgmass->SetNDC();
+     tpdgmass->SetTextColor(2);
+     //DEFINE 1st CANVAS AND DRAW PLOTS
+     TCanvas *c1 = new TCanvas("c1","",1200,800);
+     c1->Divide(2,3); 
+       //Pad 1: DCA cascade daughters
+       c1->cd(1);
+       gPad->SetLogy();
+       TH1D *hvar0 = cf->ShowProjection(0,icasType);
+       hvar0->Draw("histo");
+       Double_t x0;
+       if      (collidingsystem == 0) x0 = 0.3;
+       else if (collidingsystem == 1) x0 = 2.0;
+       TLine *line0 = new TLine(x0,0.,x0,hvar0->GetBinContent(hvar0->GetMaximumBin()));
+       line0->SetLineColor(kRed);
+       line0->SetLineStyle(9);
+       line0->SetLineWidth(2.0);
+       line0->Draw("same");
+          Bool_t check_0 = checkOverTheLimit(hvar0, x0);
+          if (check_0) { cout<<"The cut is OK!!"<<endl; t1->Draw(); }
+          else         { cout<<"The cut is NOT OK!!"<<endl; t2->Draw(); }
+       tcasc->Draw();
+       //Pad 2: Bachelor IP to PV
+       c1->cd(2);
+       gPad->SetLogy();
+       TH1D *hvar1 = cf->ShowProjection(1,icasType);
+       hvar1->GetXaxis()->SetRangeUser(0.,0.24);
+       hvar1->Draw("histo");
+       Double_t x1;
+       if      (collidingsystem == 0) x1 = 0.03;
+       else if (collidingsystem == 1) x1 = 0.01;
+       TLine *line1 = new TLine(x1,0.,x1,hvar1->GetBinContent(hvar1->GetMaximumBin()));
+       line1->SetLineColor(kRed);
+       line1->SetLineStyle(9);
+       line1->SetLineWidth(2.0);
+       line1->Draw("same");
+          Bool_t check_1 = checkUnderTheLimit(hvar1, x1);
+          if (check_1) { cout<<"The cut is OK!!"<<endl; t1->Draw(); }
+          else         { cout<<"The cut is NOT OK!!"<<endl; t2->Draw(); }
+       //Pad 3: Cascade cosine of Pointing Angle
+       c1->cd(3);
+       gPad->SetLogy();
+       TH1D *hvar2 = cf->ShowProjection(2,icasType);
+       Double_t max2 = hvar2->GetBinContent(hvar2->GetMaximumBin());
+       hvar2->GetYaxis()->SetRangeUser(0.01,max2*1.5);
+       hvar2->Draw("histo");
+       Double_t x2;
+       if      (collidingsystem == 0) x2 = 0.999;
+       else if (collidingsystem == 1) x2 = 0.98;
+       TLine *line2 = new TLine(x2,0.,x2,hvar2->GetBinContent(hvar2->GetMaximumBin()));
+       line2->SetLineColor(kRed);
+       line2->SetLineStyle(9);
+       line2->SetLineWidth(2.0);
+       line2->Draw("same");
+       line1->Draw("same");
+          Bool_t check_2 = checkUnderTheLimit(hvar2, x2);
+          if (check_2) { cout<<"The cut is OK!!"<<endl; t1->Draw(); }
+          else         { cout<<"The cut is NOT OK!!"<<endl; t2->Draw(); }
+       //Pad 4: Cascade radius of fiducial volume
+       c1->cd(4);
+       gPad->SetLogy();
+       TH1D *hvar3 = cf->ShowProjection(3,icasType);
+       hvar3->GetXaxis()->SetRangeUser(0.,3.8);
+       hvar3->Draw("histo");
+       Double_t x3;
+       if      (collidingsystem == 0) x3 = 0.9;
+       else if (collidingsystem == 1) x3 = 0.2;
+       TLine *line3 = new TLine(x3,0.,x3,hvar3->GetBinContent(hvar3->GetMaximumBin()));
+       line3->SetLineColor(kRed);
+       line3->SetLineStyle(9);
+       line3->SetLineWidth(2.0);
+       line3->Draw("same");
+          Bool_t check_3 = checkUnderTheLimit(hvar3, x3);
+          if (check_3) { cout<<"The cut is OK!!"<<endl; t1->Draw(); }
+          else         { cout<<"The cut is NOT OK!!"<<endl; t2->Draw(); }
+       //Pad 5: Invariant mass Lambda
+       c1->cd(5);
+       TH1D *hvar4 = cf->ShowProjection(4,icasType);
+       hvar4->Draw("histo");
+       Double_t x41 = 1.116 + 0.008;
+       TLine *line41 = new TLine(x41,0.,x41,hvar4->GetBinContent(hvar4->GetMaximumBin()));
+       line41->SetLineColor(kRed);
+       line41->SetLineStyle(9);
+       line41->SetLineWidth(2.0);
+       line41->Draw("same");
+       Double_t x42 = 1.115 - 0.008;
+       TLine *line42 = new TLine(x42,0.,x42,hvar4->GetBinContent(hvar4->GetMaximumBin()));
+       line42->SetLineColor(kRed);
+       line42->SetLineStyle(9);
+       line42->SetLineWidth(2.0);
+       line42->Draw("same");
+          Bool_t check_4_1 = checkUnderTheLimit(hvar3, x3);
+          Bool_t check_4_2 = checkOverTheLimit(hvar0, x0);
+          if (check_4_1 && check_4_2) { cout<<"The cut is OK!!"<<endl; t1->Draw(); }
+          else                        { cout<<"The cut is NOT OK!!"<<endl; t2->Draw(); }
+       //Pad 6: DCA V0 daughters
+       c1->cd(6);
+       gPad->SetLogy();
+       TH1D *hvar5 = cf->ShowProjection(5,icasType);
+       hvar5->Draw("histo");
+       Double_t x5;
+       if      (collidingsystem == 0) x5 = 1.0;
+       else if (collidingsystem == 1) x5 = 1.5;
+       TLine *line5 = new TLine(x5,0.,x5,hvar5->GetBinContent(hvar5->GetMaximumBin()));
+       line5->SetLineColor(kRed);
+       line5->SetLineStyle(9);
+       line5->SetLineWidth(2.0);
+       line5->Draw("same");
+          Bool_t check_5 = checkOverTheLimit(hvar5, x5);
+          if (check_5) { cout<<"The cut is OK!!"<<endl; t1->Draw(); }
+          else         { cout<<"The cut is NOT OK!!"<<endl; t2->Draw(); }
+     c1->SaveAs("MultistrangeQA.pdf(");
+    
+
+     //DEFINE 2st CANVAS AND DRAW PLOTS
+     TCanvas *c2 = new TCanvas("c2","",1200,800);
+     c2->Divide(2,3);
+       //Pad 1: V0 cosine of Pointing Angle to PV
+       c2->cd(1);
+       gPad->SetLogy();
+       TH1D *hvar6 = cf->ShowProjection(6,icasType);
+       Double_t max6 = hvar6->GetBinContent(hvar6->GetMaximumBin());
+       hvar6->GetYaxis()->SetRangeUser(0.01,max6*1.5);
+       hvar6->Draw("histo");
+       //Pad 2: Min V0 Radius Fid. Vol.  
+       c2->cd(2);
+       gPad->SetLogy();
+       TH1D *hvar7 = cf->ShowProjection(7,icasType);
+       hvar7->GetXaxis()->SetRangeUser(0.,3.0);
+       hvar7->Draw("histo");
+       Double_t x7;
+       if      (collidingsystem == 0) x7 = 0.9;
+       else if (collidingsystem == 1) x7 = 0.2;
+       TLine *line7 = new TLine(x7,0.,x7,hvar7->GetBinContent(hvar7->GetMaximumBin()));
+       line7->SetLineColor(kRed);
+       line7->SetLineStyle(9);
+       line7->SetLineWidth(2.0);
+       line7->Draw("same");
+          Bool_t check_7 = checkUnderTheLimit(hvar7, x7);
+          if (check_7) { cout<<"The cut is OK!!"<<endl; t1->Draw(); }
+          else         { cout<<"The cut is NOT OK!!"<<endl; t2->Draw(); }
+       //Pad3: Min DCA V0 To PV
+       c2->cd(3);
+       gPad->SetLogy();
+       TH1D *hvar8 = cf->ShowProjection(8,icasType);
+       hvar8->GetXaxis()->SetRangeUser(0.,0.3);
+       hvar8->Draw("histo");
+       Double_t x8;
+       if      (collidingsystem == 0) x8 = 0.05;
+       else if (collidingsystem == 1) x8 = 0.01;
+       TLine *line8 = new TLine(x8,0.,x8,hvar8->GetBinContent(hvar8->GetMaximumBin()));
+       line8->SetLineColor(kRed);
+       line8->SetLineStyle(9);
+       line8->SetLineWidth(2.0);
+       line8->Draw("same");
+          Bool_t check_8 = checkUnderTheLimit(hvar8, x8);
+          if (check_8) { cout<<"The cut is OK!!"<<endl; t1->Draw(); }
+          else         { cout<<"The cut is NOT OK!!"<<endl; t2->Draw(); }
+       //Pad 4: Min DCA Pos To PV
+       c2->cd(4);
+       gPad->SetLogy();
+       TH1D *hvar9 = cf->ShowProjection(9,icasType);
+       hvar9->GetXaxis()->SetRangeUser(0.,0.2);
+       hvar9->Draw("histo");
+       Double_t x9;
+       if      (collidingsystem == 0) x9 = 0.1;
+       else if (collidingsystem == 1) x9 = 0.05;
+       TLine *line9 = new TLine(x9,0.,x9,hvar9->GetBinContent(hvar9->GetMaximumBin()));
+       line9->SetLineColor(kRed);
+       line9->SetLineStyle(9);
+       line9->SetLineWidth(2.0);
+       line9->Draw("same");
+          Bool_t check_9 = checkUnderTheLimit(hvar9, x9);
+          if (check_9) { cout<<"The cut is OK!!"<<endl; t1->Draw(); }
+          else         { cout<<"The cut is NOT OK!!"<<endl; t2->Draw(); }
+       //Pad 5: Min DCA Neg To PV
+       c2->cd(5);
+       gPad->SetLogy();
+       TH1D *hvar10 = cf->ShowProjection(10,icasType);
+       hvar10->GetXaxis()->SetRangeUser(0.,0.2);
+       hvar10->Draw("histo");
+       Double_t x10;
+       if      (collidingsystem == 0) x10 = 0.1;
+       else if (collidingsystem == 1) x10 = 0.05;
+       TLine *line10 = new TLine(x10,0.,x10,hvar10->GetBinContent(hvar10->GetMaximumBin()));
+       line10->SetLineColor(kRed);
+       line10->SetLineStyle(9);
+       line10->SetLineWidth(2.0);
+       line10->Draw("same");
+          Bool_t check_10 = checkUnderTheLimit(hvar10, x10);
+          if (check_10) { cout<<"The cut is OK!!"<<endl; t1->Draw(); }
+          else         { cout<<"The cut is NOT OK!!"<<endl; t2->Draw(); }
+       //Pad 6: V0 cosine of Pointing Angle to XiV
+       c2->cd(6);
+       gPad->SetLogy();
+       TH1D *hvar20 = cf->ShowProjection(18,icasType);
+       Double_t max20 = hvar20->GetBinContent(hvar20->GetMaximumBin());
+       hvar20->GetYaxis()->SetRangeUser(0.01,max20*1.5);
+       hvar20->Draw("histo");
+     c2->SaveAs("MultistrangeQA.pdf");
+
+     //DEFINE 3st CANVAS AND DRAW PLOTS
+     TCanvas *c3 = new TCanvas("c3","",1200,800);
+     c3->Divide(2,3);
+       //Pad 1: InvMass
+       c3->cd(1);
+       TH1D *hvar12 = cf->ShowProjection(11+icasType/2,icasType);
+       hvar12->Draw("histo");
+       tpdgmass->Draw(); 
+       TLine *linemass;
+       if      (icasType == 0) linemass = new TLine(1.32171,0.,1.32171,0.5*hvar12->GetBinContent(hvar12->GetMaximumBin()));
+       else if (icasType == 1) linemass = new TLine(1.32171,0.,1.32171,0.5*hvar12->GetBinContent(hvar12->GetMaximumBin()));
+       else if (icasType == 2) linemass = new TLine(1.67245,0.,1.67245,0.5*hvar12->GetBinContent(hvar12->GetMaximumBin()));
+       else if (icasType == 3) linemass = new TLine(1.67245,0.,1.67245,0.5*hvar12->GetBinContent(hvar12->GetMaximumBin()));
+       linemass->SetLineColor(kRed);
+       linemass->SetLineStyle(1);
+       linemass->SetLineWidth(2.0);
+       linemass->Draw("same");
+       //Pad 2: Transverse momentum
+       c3->cd(2);
+       TH1D *hvar13 = cf->ShowProjection(13,icasType);
+       hvar13->Draw("histo");
+       //Pad 3: Y
+       c3->cd(3);
+       TH1D *hvar14 = cf->ShowProjection(14+icasType/2,icasType);
+       hvar14->Draw("histo");
+       //Pad 4: Cascade proper length
+       c3->cd(4);
+       TH1D *hvar18;
+       hvar18 = cf->ShowProjection(16,icasType);
+       hvar18->GetXaxis()->SetRangeUser(0.,90.);
+       hvar18->Draw("histo");
+       //Pad 5: V0 proper length 
+       c3->cd(5);
+       TH1D *hvar19;
+       hvar19 = cf->ShowProjection(17,icasType);
+       hvar19->GetXaxis()->SetRangeUser(0.,90.);
+       hvar19->Draw("histo");
+      //Pad 6
+      // empty 
+     if      (collidingsystem == 1) c3->SaveAs("MultistrangeQA.pdf)");
+     else if (collidingsystem == 0) c3->SaveAs("MultistrangeQA.pdf");
+
+    
+     //DEFINE 4st CANVAS AND DRAW PLOTS
+    TCanvas *c4 = new TCanvas("c4","",600,400);
+    c4->Divide(2,1);
+      //Pad1: invariant mass fit
+      c4->cd(1);
+      TH1D *hvar18 = cf->ShowProjection(11+icasType/2,icasType);
+      hvar18->Draw("histo");
+       // - SOME PARAMETER VALUE
+       Bool_t kfitgauss = kFALSE;
+       Bool_t kfitleft  = kFALSE;
+       Bool_t kfitright = kFALSE;
+       Int_t  ptbinNarrowY = 0;
+       if (icasType < 2) ptbinNarrowY = 10;   // 6;
+       else              ptbinNarrowY =  3;   // 2;
+       // - SOME DEFINITIONS
+       Float_t lowlimmass;
+       Float_t uplimmass;
+       Float_t lowgausslim;
+       Float_t upgausslim;
+       if (icasType==0||icasType==1) {
+           lowlimmass=1.30;
+           uplimmass=1.34;
+           lowgausslim=1.312;
+           upgausslim=1.332;
+       } else {
+           lowlimmass=1.645;
+           uplimmass=1.70;
+           lowgausslim=1.668;
+           upgausslim=1.678;
+       }
+       TF1*  fitinvmass = new TF1("fitinvmass","gaus(0)+pol2(3)",lowlimmass,uplimmass);
+       fitinvmass->SetParName(0, "cnstntG");
+       fitinvmass->SetParName(1, "meanG");
+       fitinvmass->SetParName(2, "sigmaG");
+       fitinvmass->SetParLimits(0,0.,500000.);
+       if (icasType==0||icasType==1) {
+           fitinvmass->SetParameter(1, 1.32171);
+           fitinvmass->SetParLimits(1, 1.31,1.33);
+           fitinvmass->SetParLimits(2,0.001,0.005);
+       } else {
+           fitinvmass->SetParameter(1, 1.67245);
+           fitinvmass->SetParLimits(1, 1.664,1.68);
+           fitinvmass->SetParLimits(2,0.0008,0.006);
+       }
+       hvar18->Fit("fitinvmass","rimeN");
+       fitinvmass->SetLineColor(kRed);
+       fitinvmass->Draw("same");
+       Float_t meanGauss   = fitinvmass->GetParameter(1);
+       Float_t sigmaGauss  = fitinvmass->GetParameter(2);
+       cout<<"Mean: "<<meanGauss<<endl;
+       cout<<"Sigma: "<<sigmaGauss<<endl;
+     //Pad2: Text
+      c4->cd(2);
+       Float_t refwidth = 0.002;
+      TPaveText *pave1 = new TPaveText(0.05,0.3,0.95,0.5);
+      pave1->SetFillColor(0);
+      pave1->SetTextSize(0.04);
+      pave1->SetTextAlign(12);
+      if (icasType < 2) pave1->AddText("PDG mass: 1.32171 GeV/c^{2}");
+      else              pave1->AddText("PDG mass: 1.67245 GeV/c^{2}");
+      pave1->AddText(Form("#color[1]{Mass form Fit: %.5f #pm %.5f GeV/c^{2}}",meanGauss,sigmaGauss));
+      if (sigmaGauss > refwidth - 0.0003 && sigmaGauss < refwidth + 0.0003) pave1->AddText("#color[3]{OK!! The width is compatible with standard.}");
+      else                                                                  pave1->AddText("#color[2]{NOT OK!! Problem.}");
+      pave1->Draw();
+      cout<<"   "<<refwidth - 0.0003<<"<"<<sigmaGauss<<"<"<<refwidth + 0.0003<<endl;
+    
+     //DEFINE 5st CANVAS AND DRAW PLOTS
+     if (collidingsystem == 0) {
+         TCanvas *c5 = new TCanvas("c5","",1200,270);
+         c5->Divide(2,1);
+            //Pad 1: centrality
+            c5->cd(1);
+            TH1D *hvar16 = cf->ShowProjection(19,icasType);
+            hvar16->Draw("histo");
+            //Pad 2: track multiplicity
+            c5->cd(2);
+            TH1D *hvar17 = cf->ShowProjection(20,icasType);
+            hvar17->Draw("histo");
+         c5->SaveAs("MultistrangeQA.pdf)");
+     }
+    
+
+}
+
+
+
+
+Bool_t checkUnderTheLimit(TH1D *lHist, Double_t limit) {
+
+      Int_t binlimit = lHist->FindBin(limit);
+      Bool_t checkOk = kTRUE;
+      for (Int_t i = 1; i < binlimit; i++) {
+           Int_t content = 0;
+           content = lHist->GetBinContent(i);
+           if (content != 0) checkOk = kFALSE;
+           //cout<<"Content bin "<<i<<": "<<content<<endl;
+      }
+      return checkOk;
+
+}
+
+
+Bool_t checkOverTheLimit(TH1D *lHist, Double_t limit) {
+
+      Int_t binlimit = lHist->FindBin(limit);
+      Int_t lastbin  = lHist->GetNbinsX();
+      Bool_t checkOk = kTRUE;
+      for (Int_t i = binlimit; i < lastbin+1; i++) {
+           Int_t content = 0;
+           content = lHist->GetBinContent(i);
+           if (content != 0) checkOk = kFALSE;
+           //cout<<"Content bin "<<i<<": "<<content<<endl;
+      }
+      return checkOk;
+
+}
+
+