|
@@ -1,12 +1,15 @@
|
|
|
#include "DrawTGraph.C"
|
|
|
|
|
|
-void Draw_EpSp_Comparison(TString FlowFileName)
|
|
|
+void Draw_EpSp_Comparison(TString FlowFileName = "/home/peter/Documents/Dataset/mpd_data/7.7gev/good_acceptance/flow.root")
|
|
|
{
|
|
|
gROOT->SetStyle("Pub");
|
|
|
gStyle->SetErrorX(0);
|
|
|
gStyle->SetPalette(kDarkRainBow);
|
|
|
|
|
|
- const int npid = 8; // h+, pi+, K+, p, h-, pi-, K-, anti-p
|
|
|
+ const std::vector<double> pt_binning = {0.2,0.4,0.6,0.8,1.,1.3,1.6,2.,2.5};
|
|
|
+ int N_pt_bins = pt_binning.size()-1;
|
|
|
+
|
|
|
+ const int npid = 9; // h+, pi+, K+, p, h-, pi-, K-, anti-p, h+-
|
|
|
const int ngap = 3;
|
|
|
TProfile2D *pFlow2D_Pt_Ep[ngap][npid], *pFlow2D_Pt_Sp[ngap][npid];
|
|
|
|
|
@@ -14,7 +17,7 @@ void Draw_EpSp_Comparison(TString FlowFileName)
|
|
|
fi->cd();
|
|
|
for (int i = 0; i < ngap; i++)
|
|
|
{
|
|
|
- for (int j = 0; j < npid; j++)
|
|
|
+ for (int j = 0; j < npid-1; j++)
|
|
|
{
|
|
|
pFlow2D_Pt_Ep[i][j] = (TProfile2D *)fi->Get(Form("TpcEp/pv2PtTpc_gap%i_pid%i", i, j));
|
|
|
pFlow2D_Pt_Sp[i][j] = (TProfile2D *)fi->Get(Form("TpcSp/pv2PtSpTpc_gap%i_pid%i", i, j));
|
|
@@ -22,6 +25,15 @@ void Draw_EpSp_Comparison(TString FlowFileName)
|
|
|
}
|
|
|
// fi->Close();
|
|
|
|
|
|
+ // Making flow for h+-
|
|
|
+ for (int i = 0; i < ngap; i++)
|
|
|
+ {
|
|
|
+ pFlow2D_Pt_Ep[i][8] = (TProfile2D *)pFlow2D_Pt_Ep[i][0]->Clone(Form("pv2PtTpc_gap%i_pid%i",i,8));
|
|
|
+ pFlow2D_Pt_Ep[i][8]->Add(pFlow2D_Pt_Ep[i][4]);
|
|
|
+ pFlow2D_Pt_Sp[i][8] = (TProfile2D *)pFlow2D_Pt_Sp[i][0]->Clone(Form("pv2PtSpTpc_gap%i_pid%i",i,8));
|
|
|
+ pFlow2D_Pt_Sp[i][8]->Add(pFlow2D_Pt_Sp[i][4]);
|
|
|
+ }
|
|
|
+
|
|
|
const int ncent = 3; // 0-10%, 10-40%, 40-80%
|
|
|
const std::pair<int, int> centBins[ncent] = {{1, 1}, {2, 4}, {5, 8}};
|
|
|
|
|
@@ -36,27 +48,28 @@ void Draw_EpSp_Comparison(TString FlowFileName)
|
|
|
{
|
|
|
// std::cout << icent << " " << igap << " " << ipid << std::endl;
|
|
|
pFlow_Pt_Ep[icent][igap][ipid] = (TProfile *)pFlow2D_Pt_Ep[igap][ipid]->ProfileX(Form("cent%i_EP_%s", icent, pFlow2D_Pt_Ep[igap][ipid]->GetName()), centBins[icent].first, centBins[icent].second);
|
|
|
- pFlow_Pt_Ep[icent][igap][ipid]->Rebin(15);
|
|
|
+ pFlow_Pt_Ep[icent][igap][ipid] = (TProfile*)pFlow_Pt_Ep[icent][igap][ipid]->Rebin(N_pt_bins,Form("rebin_%s",pFlow_Pt_Ep[icent][igap][ipid]->GetName()),&pt_binning[0]);
|
|
|
pFlow_Pt_Sp[icent][igap][ipid] = (TProfile *)pFlow2D_Pt_Sp[igap][ipid]->ProfileX(Form("cent%i_SP_%s", icent, pFlow2D_Pt_Sp[igap][ipid]->GetName()), centBins[icent].first, centBins[icent].second);
|
|
|
- pFlow_Pt_Sp[icent][igap][ipid]->Rebin(15);
|
|
|
+ pFlow_Pt_Sp[icent][igap][ipid] = (TProfile*)pFlow_Pt_Sp[icent][igap][ipid]->Rebin(N_pt_bins,Form("rebin_%s",pFlow_Pt_Sp[icent][igap][ipid]->GetName()),&pt_binning[0]);
|
|
|
+ // pFlow_Pt_Sp[icent][igap][ipid]->Rebin(20);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- gSystem->Exec("mkdir -p ./EPvsSP");
|
|
|
+ gSystem->Exec("mkdir -p /home/peter/Documents/EPvsSP");
|
|
|
|
|
|
TCanvas *canv;
|
|
|
std::vector<TGraphErrors *> vgraph;
|
|
|
const TString centName[] = {"0-10%", "10-40%", "40-80%"};
|
|
|
- const TString pidName[] = {"h^{+}", "#pi^{+}", "K^{+}", "p", "h^{-}", "#pi^{-}", "K^{-}", "#bar{p}"};
|
|
|
+ const TString pidName[] = {"h^{+}", "#pi^{+}", "K^{+}", "p", "h^{-}", "#pi^{-}", "K^{-}", "#bar{p}", "h#pm"};
|
|
|
const double gapSize[] = {0.1, 0.2, 0.5};
|
|
|
- const double x_pt_min[2][ncent][npid] = {{{0.2, 0.2, 0.2, 0.4, 0.2, 0.2, 0.2, 0.4}, {0.2, 0.2, 0.2, 0.4, 0.2, 0.2, 0.2, 0.4}, {0.2, 0.2, 0.2, 0.4, 0.2, 0.2, 0.2, 0.4}},
|
|
|
- {{0.2, 0.2, 0.2, 0.4, 0.2, 0.2, 0.2, 0.4}, {0.2, 0.2, 0.2, 0.4, 0.2, 0.2, 0.2, 0.4}, {0.2, 0.2, 0.2, 0.4, 0.2, 0.2, 0.2, 0.4}}};
|
|
|
- const double x_pt_max = 2.;
|
|
|
- const double y_pt_min[2][ncent][npid] = {{{-0.029, -0.029, -0.029, 0.006, -0.029, -0.029, -0.029, 0.006}, {-0.045, -0.045, -0.029, 0.006, -0.045, -0.045, -0.029, 0.006}, {-0.065, -0.065, -0.075, -0.021, -0.065, -0.065, -0.075, -0.021}},
|
|
|
- {{0., 0., 0., 0., 0., 0., 0., 0.}, {0., 0., 0., 0., 0., 0., 0., 0.}, {0., 0., 0., 0., 0., 0., 0., 0.}}};
|
|
|
- const double y_pt_max[2][ncent][npid] = {{{0.019, 0.019, 0.039, 0.044, 0.019, 0.019, 0.039, 0.044}, {0., 0., 0.049, 0.044, 0., 0., 0.049, 0.044}, {0.0029, 0.0029, 0.049, 0.029, 0.0029, 0.0029, 0.049, 0.029}},
|
|
|
- {{0.079, 0.079, 0.079, 0.059, 0.079, 0.079, 0.079, 0.059}, {0.075, 0.075, 0.095, 0.085, 0.075, 0.075, 0.095, 0.085}, {0.139, 0.139, 0.159, 0.099, 0.139, 0.139, 0.159, 0.099}}};
|
|
|
+ const double x_pt_min[2][ncent][npid] = {{{0.2, 0.2, 0.2, 0.4, 0.2, 0.2, 0.2, 0.4, 0.2}, {0.2, 0.2, 0.2, 0.4, 0.2, 0.2, 0.2, 0.4, 0.2}, {0.2, 0.2, 0.2, 0.4, 0.2, 0.2, 0.2, 0.4, 0.2}},
|
|
|
+ {{0.2, 0.2, 0.2, 0.4, 0.2, 0.2, 0.2, 0.4, 0.2}, {0.2, 0.2, 0.2, 0.4, 0.2, 0.2, 0.2, 0.4, 0.2}, {0.2, 0.2, 0.2, 0.4, 0.2, 0.2, 0.2, 0.4, 0.2}}};
|
|
|
+ const double x_pt_max = 2.5;
|
|
|
+ const double y_pt_min[2][ncent][npid] = {{{-0.029, -0.029, -0.029, 0.006, -0.029, -0.029, -0.029, 0.006, -0.029}, {-0.045, -0.045, -0.029, 0.006, -0.045, -0.045, -0.029, 0.006, -0.045}, {-0.065, -0.065, -0.075, -0.021, -0.065, -0.065, -0.075, -0.021, -0.065}},
|
|
|
+ {{-0.003, -0.003, -0.003, -0.003, -0.003, -0.003, -0.003, -0.003, -0.003}, {-0.003, -0.003, -0.003, -0.003, -0.003, -0.003, -0.003, -0.003, -0.003}, {-0.003, -0.003, -0.003, -0.003, -0.003, -0.003, -0.003, -0.003, -0.003}}};
|
|
|
+ const double y_pt_max[2][ncent][npid] = {{{0.019, 0.019, 0.039, 0.044, 0.019, 0.019, 0.039, 0.044, 0.019}, {0., 0., 0.049, 0.044, 0., 0., 0.049, 0.044, 0.}, {0.0029, 0.0029, 0.049, 0.029, 0.0029, 0.0029, 0.049, 0.029, 0.0029}},
|
|
|
+ {{0.079, 0.079, 0.079, 0.059, 0.079, 0.079, 0.079, 0.059, 0.079}, {0.085, 0.085, 0.085, 0.085, 0.075, 0.075, 0.095, 0.085, 0.095}, {0.139, 0.139, 0.159, 0.099, 0.139, 0.139, 0.159, 0.099, 0.139}}};
|
|
|
for (int icent = 0; icent < ncent; icent++)
|
|
|
{
|
|
|
for (int igap = 0; igap < ngap; igap++)
|
|
@@ -65,22 +78,22 @@ void Draw_EpSp_Comparison(TString FlowFileName)
|
|
|
{
|
|
|
vgraph.clear();
|
|
|
|
|
|
- pFlow_Pt_Ep[icent][igap][ipid]->SetTitle("EP");
|
|
|
- pFlow_Pt_Ep[icent][igap][ipid]->SetMarkerStyle(20);
|
|
|
+ pFlow_Pt_Ep[icent][igap][ipid]->SetTitle("v_{2}{#Psi_{2,TPC}}");
|
|
|
+ pFlow_Pt_Ep[icent][igap][ipid]->SetMarkerStyle(25);
|
|
|
pFlow_Pt_Ep[icent][igap][ipid]->SetMarkerSize(1.6);
|
|
|
pFlow_Pt_Ep[icent][igap][ipid]->SetMarkerColor(kBlack);
|
|
|
pFlow_Pt_Ep[icent][igap][ipid]->SetLineColor(kBlack);
|
|
|
- pFlow_Pt_Ep[icent][igap][ipid]->GetXaxis()->SetTitle("p_{T}, GeV/c");
|
|
|
+ pFlow_Pt_Ep[icent][igap][ipid]->GetXaxis()->SetTitle("p_{T} (GeV/c)");
|
|
|
pFlow_Pt_Ep[icent][igap][ipid]->GetYaxis()->SetTitle("v_{2}");
|
|
|
pFlow_Pt_Ep[icent][igap][ipid]->GetXaxis()->SetRangeUser(x_pt_min[1][icent][ipid], x_pt_max);
|
|
|
pFlow_Pt_Ep[icent][igap][ipid]->GetYaxis()->SetRangeUser(y_pt_min[1][icent][ipid], y_pt_max[1][icent][ipid]);
|
|
|
|
|
|
- pFlow_Pt_Sp[icent][igap][ipid]->SetTitle("SP");
|
|
|
- pFlow_Pt_Sp[icent][igap][ipid]->SetMarkerStyle(25);
|
|
|
+ pFlow_Pt_Sp[icent][igap][ipid]->SetTitle("v_{2}{SP}");
|
|
|
+ pFlow_Pt_Sp[icent][igap][ipid]->SetMarkerStyle(20);
|
|
|
pFlow_Pt_Sp[icent][igap][ipid]->SetMarkerSize(1.6);
|
|
|
pFlow_Pt_Sp[icent][igap][ipid]->SetMarkerColor(kRed);
|
|
|
pFlow_Pt_Sp[icent][igap][ipid]->SetLineColor(kRed);
|
|
|
- pFlow_Pt_Sp[icent][igap][ipid]->GetXaxis()->SetTitle("p_{T}, GeV/c");
|
|
|
+ pFlow_Pt_Sp[icent][igap][ipid]->GetXaxis()->SetTitle("p_{T} (GeV/c)");
|
|
|
pFlow_Pt_Sp[icent][igap][ipid]->GetYaxis()->SetTitle("v_{2}");
|
|
|
pFlow_Pt_Sp[icent][igap][ipid]->GetXaxis()->SetRangeUser(x_pt_min[1][icent][ipid], x_pt_max);
|
|
|
pFlow_Pt_Sp[icent][igap][ipid]->GetYaxis()->SetRangeUser(y_pt_min[1][icent][ipid], y_pt_max[1][icent][ipid]);
|
|
@@ -88,8 +101,8 @@ void Draw_EpSp_Comparison(TString FlowFileName)
|
|
|
vgraph.push_back(ConvertProfile(pFlow_Pt_Ep[icent][igap][ipid]));
|
|
|
vgraph.push_back(ConvertProfile(pFlow_Pt_Sp[icent][igap][ipid]));
|
|
|
|
|
|
- canv = DrawTGraph(vgraph, Form("%s, %s", centName[icent].Data(), pidName[ipid].Data()), 0.79, 1.21, x_pt_min[1][icent][ipid], x_pt_max, y_pt_min[1][icent][ipid], 1.3 * y_pt_max[1][icent][ipid], 0.18, 0.72, 0.45, 0.89);
|
|
|
- canv->SaveAs(Form("./EPvsSP/v2_Pt_EPvsSP_cent%i_gap%i_pid%i.png", icent, igap, ipid));
|
|
|
+ canv = DrawTGraph(vgraph, Form("Au+Au at #sqrt{s_{NN}}=11.5 GeV, UrQMD, %s, %s", centName[icent].Data(), pidName[ipid].Data()), 0.89, 1.11, 0.*x_pt_min[1][icent][ipid], x_pt_max, y_pt_min[1][icent][ipid], 1.3 * y_pt_max[1][icent][ipid], 0.18, 0.57, 0.82, 0.89);
|
|
|
+ canv->SaveAs(Form("/home/peter/Documents/EPvsSP/v2_Pt_EPvsSP_cent%i_gap%i_pid%i.png", icent, igap, ipid));
|
|
|
delete canv;
|
|
|
}
|
|
|
}
|