a simple example of plotting the eccentricities from the ntuple
authorsnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 11 Nov 2009 20:58:38 +0000 (20:58 +0000)
committersnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 11 Nov 2009 20:58:38 +0000 (20:58 +0000)
PWG2/FLOW/Tools/glauberMC/plotGlauberMCexample.C [new file with mode: 0644]

diff --git a/PWG2/FLOW/Tools/glauberMC/plotGlauberMCexample.C b/PWG2/FLOW/Tools/glauberMC/plotGlauberMCexample.C
new file mode 100644 (file)
index 0000000..71ed360
--- /dev/null
@@ -0,0 +1,29 @@
+{
+  // open file
+  TFile* f = new TFile("GlauberMC_PbPb_ntuple.root");
+  TTree* t = (TTree*)gDirectory->Get("nt_Pb_Pb"); // get the tree
+
+  gStyle->SetCanvasColor(0);
+  gStyle->SetFrameBorderMode(0);
+  gStyle->SetStatBorderSize(1);
+  gStyle->SetFrameFillColor(0);
+  gStyle->SetTitleFillColor(0);
+  gStyle->SetPalette(1);
+
+  TCanvas* c = new TCanvas("GlauberMC","GlauberMC");
+  c->Divide(2,2);
+  c->cd(1);
+  // plot number of collisions
+  t->Draw("Ncoll:B","","prof");
+  c->cd(2);
+  // plot number of wounded nucleons
+  t->Draw("Npart:B","","prof");
+  c->cd(3);
+  // plot "standard" eccentricity
+  t->Draw("(VarY-VarX)/(VarY+VarX):Npart","","prof");
+  c->cd(4);
+  // plot participant eccentricity
+  t->Draw("sqrt((VarY-VarX)*(VarY-VarX)+4*VarXY*VarXY)/(VarY+VarX):Npart","","prof");
+
+  c->Update();
+}