18 plotDirectCumulants_v2pt() {
20 TCanvas* cOld = (TCanvas*)gROOT->GetListOfCanvases();
21 if (cOld) cOld->Delete();
23 bool ptGraphs = kTRUE;
25 gROOT->SetStyle(
"Bold");
26 gStyle->SetOptStat(0);
32 TFile graphFile(
"flow.dirCumulant.graphs.root",
"READ");
35 TGraphErrors* charged_v2_2[CENTBINS+1];
36 TGraphErrors* charged_v2_4[CENTBINS+1];
37 TCanvas* can[CENTBINS+1];
38 int canvasWidth = 780, canvasHeight = 600;
39 for (
int cent=0; cent<CENTBINS+1; cent++) {
41 TString* canName =
new TString(
"centrality_");
43 cout <<
"plot " << canName->Data() << endl;
44 can[cent] =
new TCanvas(canName->Data(), canName->Data(), canvasWidth, canvasHeight);
45 TLegend *legend =
new TLegend(.17,.67,.5,.87,NULL,
"brNDC");
46 legend->SetFillColor(kWhite);
50 TString graphName(
"v22_");
52 charged_v2_2[cent] =
dynamic_cast<TGraphErrors*
>(graphFile.Get(graphName.Data()));
53 if (!charged_v2_2[cent]) {
54 cout <<
"### Can't find graph " << graphName.Data() << endl;
57 charged_v2_2[cent]->SetMarkerStyle(20);
58 charged_v2_2[cent]->SetMarkerColor(2);
59 charged_v2_2[cent]->SetLineColor(2);
60 charged_v2_2[cent]->SetMinimum(0.);
61 charged_v2_2[cent]->SetMaximum(v2max);
62 charged_v2_2[cent]->GetXaxis()->SetTitle(
"P_{t} (GeV/c)");
63 charged_v2_2[cent]->GetYaxis()->SetTitle(
"v_{2}");
66 TString graphName(
"v24_");
68 charged_v2_4[cent] =
dynamic_cast<TGraphErrors*
>(graphFile.Get(graphName.Data()));
69 if (!charged_v2_4[cent]) {
70 cout <<
"### Can't find graph " << graphName.Data() << endl;
73 charged_v2_4[cent]->SetMarkerStyle(20);
74 charged_v2_4[cent]->SetMarkerColor(4);
75 charged_v2_4[cent]->SetLineColor(4);
76 charged_v2_4[cent]->SetMinimum(0.);
77 charged_v2_4[cent]->SetMaximum(v2max);
78 charged_v2_4[cent]->GetXaxis()->SetTitle(
"P_{t} (GeV/c)");
79 charged_v2_4[cent]->GetYaxis()->SetTitle(
"v_{2}{4}");
82 charged_v2_2[cent]->Draw(
"AP");
83 legend->AddEntry(charged_v2_2[cent],
"charged hadron v_{2}{2}",
"p");
84 charged_v2_4[cent]->Draw(
"P");
85 legend->AddEntry(charged_v2_4[cent],
"charged hadron v_{2}{4}",
"p");
95 int canvasWidth = 600, canvasHeight = 780;
96 TString* canName =
new TString(
"v2_pt");
97 cout <<
"plot " << canName->Data() << endl;
98 TCanvas* canMulti =
new TCanvas(canName->Data(), canName->Data(), canvasWidth, canvasHeight);
99 canMulti->ToggleEventStatus();
100 TPaveLabel* canTitle =
new TPaveLabel(0.1,0.96,0.9,0.99,canName->Data());
102 TLegend *legendMulti =
new TLegend(.17,.67,.5,.87,NULL,
"brNDC");
103 legendMulti->SetFillColor(kWhite);
104 gStyle->SetLabelSize(0.1,
"x");
105 TPad* graphPad =
new TPad(
"Graphs",
"Graphs",0.01,0.05,0.97,0.95);
109 int rows = (CENTBINS+1)/2;
110 graphPad->Divide(columns,rows);
112 for (
int cent=0; cent<CENTBINS+1; cent++) {
113 TString graphName(
"cent_");
115 graphPad->cd(cent+1);
116 charged_v2_2[cent]->SetTitle(graphName);
117 charged_v2_2[cent]->Draw(
"AP");
118 charged_v2_4[cent]->Draw(
"P");
120 legendMulti->AddEntry(charged_v2_2[cent],
"charged hadron v_{2}{2}",
"p");
121 legendMulti->AddEntry(charged_v2_4[cent],
"charged hadron v_{2}{4}",
"p");
122 legendMulti->Draw(
"same");