]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/SPECTRA/Nuclei/B2/macros/DrawBA.C
Defects fixed
[u/mrichter/AliRoot.git] / PWGLF / SPECTRA / Nuclei / B2 / macros / DrawBA.C
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  *                                                                        *
4  * Author: The ALICE Off-line Project.                                    *
5  * Contributors are mentioned in the code where appropriate.              *
6  *                                                                        *
7  * Permission to use, copy, modify and distribute this software and its   *
8  * documentation strictly for non-commercial purposes is hereby granted   *
9  * without fee, provided that the above copyright notice appears in all   *
10  * copies and that both the copyright notice and this permission notice   *
11  * appear in the supporting documentation. The authors make no claims     *
12  * about the suitability of this software for any purpose. It is          *
13  * provided "as is" without express or implied warranty.                  *
14  **************************************************************************/
15
16 // Draw BA
17 // author: Eulogio Serradilla <eulogio.serradilla@cern.ch>
18
19 #if !defined(__CINT__) || defined(__MAKECINT__)
20 #include <TStyle.h>
21 #include <TFile.h>
22 #include <TString.h>
23 #include <TCanvas.h>
24 #include <TGraphErrors.h>
25 #endif
26
27 #include "B2.h"
28
29 void DrawBA(const TString& inputFile="b2.root", const TString& tag="test", const TString& nucleus="Deuteron")
30 {
31 //
32 // Draw B2, B3
33 //
34         gStyle->SetPadTickX(1);
35         gStyle->SetPadTickY(1);
36         gStyle->SetPadGridX(1);
37         gStyle->SetPadGridY(1);
38         
39         TFile* finput = new TFile(inputFile.Data());
40         if (finput->IsZombie()) exit(1);
41         
42         Int_t A = (nucleus.Contains("Deuteron")) ? 2 : 3;
43         
44         TCanvas* c0 = new TCanvas(Form("%s.B%d", nucleus.Data(),A), Form("Coalescence parameter for %s", nucleus.Data()));
45         
46         if(A==2) c0->Divide(2,1);
47         
48         // BA
49         
50         TGraphErrors* grBAPt = FindObj<TGraphErrors>(finput, tag, nucleus + Form("_B%d_Pt",A));
51         
52         if(A==2) c0->cd(1);
53         gPad->SetLogy(1);
54         
55         grBAPt->GetXaxis()->SetTitle("#it{p}_{T}/A (GeV/#it{c})");
56         grBAPt->GetYaxis()->SetTitle("#it{B}_{2} (GeV^{2}/#it{c}^{3})");
57         if(A==3) grBAPt->GetYaxis()->SetTitle("#it{B}_{3} (GeV^{4}/#it{c}^{6})");
58         grBAPt->SetLineColor(kRed);
59         grBAPt->SetMarkerStyle(kFullCircle);
60         grBAPt->SetMarkerColor(kRed);
61         grBAPt->Draw("zAP");
62         
63         // homogeneity volume
64         if(A==2)
65         {
66                 TGraphErrors* grR3Pt = FindObj<TGraphErrors>(finput, tag, nucleus + "_R3_Pt");
67                 
68                 c0->cd(2);
69                 
70                 grR3Pt->GetXaxis()->SetTitle("#it{p}_{T}/A (GeV/#it{c})");
71                 grR3Pt->GetYaxis()->SetTitle("#it{R}_{side}^{2} #it{R}_{long} (fm^{3})");
72                 grR3Pt->GetYaxis()->SetTitleOffset(1.3);
73                 grR3Pt->SetLineColor(kRed);
74                 grR3Pt->SetMarkerStyle(kFullCircle);
75                 grR3Pt->SetMarkerColor(kRed);
76                 grR3Pt->Draw("zAP");
77         }
78 }