PresentResults.C 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925
  1. #include <TFile.h>
  2. #include <TStyle.h>
  3. #include <TSystem.h>
  4. #include <TROOT.h>
  5. #include <TCanvas.h>
  6. #include <TGraphErrors.h>
  7. #include <TMultiGraph.h>
  8. #include <TH1.h>
  9. #include <TH3.h>
  10. #include <TString.h>
  11. #include <TMath.h>
  12. #include <TLatex.h>
  13. #include <TPaveText.h>
  14. #include <TLegend.h>
  15. #include <TImage.h>
  16. void SetGlobalStyle();
  17. void SetStarStyle(TGraphErrors* grErr, int energy, int cent);
  18. void SetTGraphStyle(TGraphErrors* grErr, int pid, int cent);
  19. //void SetOldTGraphStyle(TGraphErrors* grErr, int pid, int cent);
  20. //_________________
  21. void PresentResults() {
  22. SetGlobalStyle();
  23. double mLamRange[2] = {0.1, 0.9};
  24. double mRadiiRange[2] = {0.6, 7.1};
  25. double mMtRange[2] = {0.15, 1.35};
  26. int mCanvSize[2] = {600,800};
  27. int nEnergies = 1;
  28. const int nPionKtBins = 7;
  29. int PionFitKtArray[7][2] = {{2,2}, {3,3}, {4,4}, {5,5}, {6,6}, {7,7}, {8,10}};
  30. const int nKaonKtBins = 5;
  31. int KaonFitKtArray[5][2] = {{0,3}, {4,5}, {6,7}, {7,8}, {9,10}};
  32. int nStarMtBins = 4;
  33. int nStar200CentBins = 5;
  34. //200 GeV
  35. double nStarRout200[5][4] = { {5.88623, 5.36104, 4.68839, 4.13888},
  36. {5.62342, 5.12386, 4.50129, 3.99388},
  37. {5.19246, 4.7173, 4.21355, 3.7131},
  38. {4.70398, 4.29394, 3.84329, 3.43377},
  39. {4.21394, 3.88334, 3.50813, 3.1131} };
  40. double nStarRoutErr200[5][4] = { {0.0235863, 0.0156105, 0.0166256, 0.019129},
  41. {0.0225075, 0.0146684, 0.0168094, 0.0188995},
  42. {0.0162752, 0.0108589, 0.0126066, 0.014325},
  43. {0.0184947, 0.012548, 0.0142582, 0.0158074},
  44. {0.0204706, 0.0137939, 0.0165987, 0.018784} };
  45. double nStarRside200[5][4] = { {5.20713, 4.9248, 4.532, 4.15774},
  46. {4.93469, 4.66952, 4.34595, 3.97151},
  47. {4.60779, 4.30443, 4.03165, 3.72077},
  48. {4.12645, 3.90416, 3.68447, 3.41898},
  49. {3.71263, 3.51214, 3.30994, 3.0682} };
  50. double nStarRsideErr200[5][4] = { {0.018666, 0.013728, 0.0152585, 0.0155588},
  51. {0.0185243, 0.0124062, 0.0145618, 0.0165696},
  52. {0.0125847, 0.00925802, 0.0110111, 0.0130999},
  53. {0.0142614, 0.0111244, 0.0129176, 0.0143846},
  54. {0.0154815, 0.011951, 0.0150637, 0.0168027} };
  55. double nStarRlong200[5][4] = { {6.64397, 5.80251, 4.96302, 4.34703},
  56. {6.30332, 5.48477, 4.72166, 4.06245},
  57. {5.84876, 5.04122, 4.36922, 3.74956},
  58. {5.33634, 4.57213, 3.95305, 3.38169},
  59. {4.82185, 4.1227, 3.58624, 3.05169} };
  60. double nStarRlongErr200[5][4] = { {0.0267233, 0.0160585, 0.0181593, 0.0178103},
  61. {0.0261458, 0.015864, 0.0172435, 0.0183965},
  62. {0.0177964, 0.0117965, 0.0129835, 0.0145198},
  63. {0.0195327,0.0140871, 0.0150233, 0.0157312},
  64. {0.0224088, 0.0151745, 0.0177424, 0.018657} };
  65. double nStarMt200[5][4] = { {0.262197, 0.328421, 0.417164, 0.524964},
  66. {0.261902, 0.328167, 0.417082, 0.525045},
  67. {0.261589, 0.327888, 0.41699, 0.525108},
  68. {0.261225, 0.327544,0.416849,0.525124},
  69. {0.260913, 0.327235, 0.416687, 0.52502} };
  70. double nStarMtErr200[5][4] = { {0.01, 0.01, 0.01, 0.01},
  71. {0.01, 0.01, 0.01, 0.01},
  72. {0.01, 0.01, 0.01, 0.01},
  73. {0.01, 0.01, 0.01, 0.01},
  74. {0.01, 0.01, 0.01, 0.01} };
  75. //19 GeV
  76. int nStar19CentBins = 2;
  77. double nStarRout19[2][4] = { {5.84087, 5.37106, 4.79477, 4.31619},
  78. {4.56516, 4.26748, 3.87451, 3.45468} };
  79. double nStarRoutErr19[2][4] = { {0.0195966,0.0148756,0.0186787,0.0226372},
  80. {0.0188045,0.0136939,0.0175341,0.0207569} };
  81. double nStarRside19[2][4] = { {4.83625,4.5331,4.23409,3.87759},
  82. {3.81836,3.59575,3.36289,3.13035} };
  83. double nStarRsideErr19[2][4] = { {0.0150974,0.0125819,0.0151165,0.018952},
  84. {0.0135812,0.0116497,0.0145794,0.0176817} };
  85. double nStarRlong19[2][4] = { {5.7974,4.97864,4.23506,3.57462},
  86. {4.6873,4.02044,3.38523,2.85863} };
  87. double nStarRlongErr19[2][4] = { {0.0196311,0.0153343,0.0167063,0.0197918},
  88. {0.0196429,0.0146235,0.0165197,0.018152} };
  89. double nStarMt19[2][4] = { {0.259659,0.326347,0.416095,0.523699},
  90. {0.259161,0.325885,0.415924,0.523838} };
  91. double nStarMtErr19[2][4] = { {0.01, 0.01, 0.01, 0.01},
  92. {0.01, 0.01, 0.01, 0.01} };
  93. TGraphErrors *StarRoutMt200GrErr[5];
  94. TGraphErrors *StarRsideMt200GrErr[5];
  95. TGraphErrors *StarRlongMt200GrErr[5];
  96. //200 GeV
  97. for(int iCent=0; iCent<nStar200CentBins; iCent++) {
  98. float tmpRout[4],tmpRside[4],tmpRlong[4];
  99. float tmpRoutErr[4],tmpRsideErr[4],tmpRlongErr[4];
  100. float tmpMt[4], tmpMtErr[4];
  101. for(int iMt=0; iMt<4; iMt++) {
  102. tmpRout[iMt] = nStarRout200[iCent][iMt];
  103. tmpRoutErr[iMt] = nStarRoutErr200[iCent][iMt];
  104. tmpRside[iMt] = nStarRside200[iCent][iMt];
  105. tmpRsideErr[iMt] = nStarRsideErr200[iCent][iMt];
  106. tmpRlong[iMt] = nStarRlong200[iCent][iMt];
  107. tmpRlongErr[iMt] = nStarRlongErr200[iCent][iMt];
  108. tmpMt[iMt] = nStarMt200[iCent][iMt];
  109. tmpMtErr[iMt] = nStarMtErr200[iCent][iMt];
  110. }
  111. //Out
  112. StarRoutMt200GrErr[iCent] = new TGraphErrors(nStarMtBins,tmpMt,tmpRout,
  113. tmpMtErr,tmpRoutErr);
  114. StarRoutMt200GrErr[iCent]->SetName(Form("StarRoutMt200GrErr_%d",iCent));
  115. SetStarStyle(StarRoutMt200GrErr[iCent],200,iCent);
  116. //Side
  117. StarRsideMt200GrErr[iCent] = new TGraphErrors(nStarMtBins,tmpMt,tmpRside,
  118. tmpMtErr,tmpRsideErr);
  119. StarRsideMt200GrErr[iCent]->SetName(Form("StarRsideMt200GrErr_%d",iCent));
  120. SetStarStyle(StarRsideMt200GrErr[iCent],200,iCent);
  121. //Long
  122. StarRlongMt200GrErr[iCent] = new TGraphErrors(nStarMtBins,tmpMt,tmpRlong,
  123. tmpMtErr,tmpRlongErr);
  124. StarRlongMt200GrErr[iCent]->SetName(Form("StarRlongMt200GrErr_%d",iCent));
  125. SetStarStyle(StarRlongMt200GrErr[iCent],200,iCent);
  126. }
  127. TGraphErrors *StarRoutMt19GrErr[2];
  128. TGraphErrors *StarRsideMt19GrErr[2];
  129. TGraphErrors *StarRlongMt19GrErr[2];
  130. //19 GeV
  131. for(int iCent=0; iCent<nStar19CentBins; iCent++) {
  132. float tmpRout[4],tmpRside[4],tmpRlong[4];
  133. float tmpRoutErr[4],tmpRsideErr[4],tmpRlongErr[4];
  134. float tmpMt[4], tmpMtErr[4];
  135. for(int iMt=0; iMt<4; iMt++) {
  136. tmpRout[iMt] = nStarRout19[iCent][iMt];
  137. tmpRoutErr[iMt] = nStarRoutErr19[iCent][iMt];
  138. tmpRside[iMt] = nStarRside19[iCent][iMt];
  139. tmpRsideErr[iMt] = nStarRsideErr19[iCent][iMt];
  140. tmpRlong[iMt] = nStarRlong19[iCent][iMt];
  141. tmpRlongErr[iMt] = nStarRlongErr19[iCent][iMt];
  142. tmpMt[iMt] = nStarMt19[iCent][iMt];
  143. tmpMtErr[iMt] = nStarMtErr19[iCent][iMt];
  144. }
  145. //Out
  146. StarRoutMt19GrErr[iCent] = new TGraphErrors(nStarMtBins,tmpMt,tmpRout,
  147. tmpMtErr,tmpRoutErr);
  148. StarRoutMt19GrErr[iCent]->SetName(Form("StarRoutMt19GrErr_%d",iCent));
  149. SetStarStyle(StarRoutMt19GrErr[iCent],19,iCent);
  150. //Side
  151. StarRsideMt19GrErr[iCent] = new TGraphErrors(nStarMtBins,tmpMt,tmpRside,
  152. tmpMtErr,tmpRsideErr);
  153. StarRsideMt19GrErr[iCent]->SetName(Form("StarRsideMt19GrErr_%d",iCent));
  154. SetStarStyle(StarRsideMt19GrErr[iCent],19,iCent);
  155. //Long
  156. StarRlongMt19GrErr[iCent] = new TGraphErrors(nStarMtBins,tmpMt,tmpRlong,
  157. tmpMtErr,tmpRlongErr);
  158. StarRlongMt19GrErr[iCent]->SetName(Form("StarRlongMt19GrErr_%d",iCent));
  159. SetStarStyle(StarRlongMt19GrErr[iCent],19,iCent);
  160. }
  161. double KtShift = 0.1;
  162. double KtStep = 0.1;
  163. double KtVal;
  164. double MtVal;
  165. TFile* kaonFile[2][5];
  166. TFile* pionFile[2][5];
  167. TString mKaonFileName[2][5];
  168. TString mPionFileName[2][5];
  169. for(int iEne=0; iEne<nEnergies; iEne++) {
  170. for(int iCent=0; iCent<nStar200CentBins; iCent++) {
  171. int energy;
  172. int centrality;
  173. switch(iEne) {
  174. case 0:
  175. energy = 200;
  176. break;
  177. case 1:
  178. energy = 19;
  179. break;
  180. default:
  181. energy = 200;
  182. };
  183. switch(iCent) {
  184. case 0:
  185. centrality = 8;
  186. break;
  187. case 1:
  188. centrality = 7;
  189. break;
  190. case 2:
  191. centrality = 6;
  192. break;
  193. case 3:
  194. centrality = 5;
  195. break;
  196. case 4:
  197. centrality = 4;
  198. break;
  199. default:
  200. centrality = 8;
  201. }
  202. //Kaons
  203. mKaonFileName[iEne][iCent] = "oAuAu";
  204. mKaonFileName[iEne][iCent] += energy;
  205. mKaonFileName[iEne][iCent] += "_kaons_3d_cent";
  206. mKaonFileName[iEne][iCent] += centrality;
  207. mKaonFileName[iEne][iCent] += ".root";
  208. //Pions
  209. mPionFileName[iEne][iCent] = "oAuAu";
  210. mPionFileName[iEne][iCent] += energy;
  211. mPionFileName[iEne][iCent] += "_pions_3d_cent";
  212. mPionFileName[iEne][iCent] += centrality;
  213. mPionFileName[iEne][iCent] += ".root";
  214. kaonFile[iEne][iCent] = TFile::Open(mKaonFileName[iEne][iCent].Data());
  215. pionFile[iEne][iCent] = TFile::Open(mPionFileName[iEne][iCent].Data());
  216. }
  217. }
  218. //Kaon projections
  219. TH1F* hKaonOutProj[2][5][nKaonKtBins]; //Energy, Centrality, kT
  220. TH1F* hKaonFitOutProj[2][5][nKaonKtBins];
  221. TH1F* hKaonSideProj[2][5][nKaonKtBins];
  222. TH1F* hKaonFitSideProj[2][5][nKaonKtBins];
  223. TH1F* hKaonLongProj[2][5][nKaonKtBins];
  224. TH1F* hKaonFitLongProj[2][5][nKaonKtBins];
  225. //Pion projections
  226. TH1F* hPionOutProj[2][5][nPionKtBins]; //Energy, Centrality, kT
  227. TH1F* hPionFitOutProj[2][5][nPionKtBins];
  228. TH1F* hPionSideProj[2][5][nPionKtBins];
  229. TH1F* hPionFitSideProj[2][5][nPionKtBins];
  230. TH1F* hPionLongProj[2][5][nPionKtBins];
  231. TH1F* hPionFitLongProj[2][5][nPionKtBins];
  232. //Kaon TGraphErrors
  233. TGraphErrors *mKaonLamKtGr[2][5][3]; //Energy, Centrality, kT
  234. TGraphErrors *mKaonRoutKtGr[2][5][3];
  235. TGraphErrors *mKaonRsideKtGr[2][5][3];
  236. TGraphErrors *mKaonRlongKtGr[2][5][3];
  237. TGraphErrors *mKaonLamMtGr[2][5][3]; //Energy, Centrality, kT
  238. TGraphErrors *mKaonRoutMtGr[2][5][3];
  239. TGraphErrors *mKaonRsideMtGr[2][5][3];
  240. TGraphErrors *mKaonRlongMtGr[2][5][3];
  241. //Pion TGraphErrors
  242. TGraphErrors *mPionLamKtGr[2][5][3]; //Energy, Centrality, kT
  243. TGraphErrors *mPionRoutKtGr[2][5][3];
  244. TGraphErrors *mPionRsideKtGr[2][5][3];
  245. TGraphErrors *mPionRlongKtGr[2][5][3];
  246. TGraphErrors *mPionLamMtGr[2][5][3]; //Energy, Centrality, kT
  247. TGraphErrors *mPionRoutMtGr[2][5][3];
  248. TGraphErrors *mPionRsideMtGr[2][5][3];
  249. TGraphErrors *mPionRlongMtGr[2][5][3];
  250. //Read TGraphErrors
  251. for(int iEne=0; iEne<nEnergies; iEne++) {
  252. for(int iCent=0; iCent<nStar200CentBins; iCent++) {
  253. for(int iCharge=0; iCharge<3; iCharge++) {
  254. //Kaons
  255. mKaonLamKtGr[iEne][iCent][iCharge] = (TGraphErrors*)kaonFile[iEne][iCent]->Get(Form("LamKtGrErr_%d",iCharge));
  256. mKaonLamKtGr[iEne][iCent][iCharge]->SetName(Form("mKaonLamKtGr_%d_%d_%d",iEne,iCent,iCharge));
  257. mKaonRoutKtGr[iEne][iCent][iCharge] = (TGraphErrors*)kaonFile[iEne][iCent]->Get(Form("RoutKtGrErr_%d",iCharge));
  258. mKaonRoutKtGr[iEne][iCent][iCharge]->SetName(Form("mKaonRoutKtGr_%d_%d_%d",iEne,iCent,iCharge));
  259. mKaonRsideKtGr[iEne][iCent][iCharge] = (TGraphErrors*)kaonFile[iEne][iCent]->Get(Form("RsideKtGrErr_%d",iCharge));
  260. mKaonRsideKtGr[iEne][iCent][iCharge]->SetName(Form("mKaonRsideKtGr_%d_%d_%d",iEne,iCent,iCharge));
  261. mKaonRlongKtGr[iEne][iCent][iCharge] = (TGraphErrors*)kaonFile[iEne][iCent]->Get(Form("RlongKtGrErr_%d",iCharge));
  262. mKaonRlongKtGr[iEne][iCent][iCharge]->SetName(Form("mKaonRlongKtGr_%d_%d_%d",iEne,iCent,iCharge));
  263. mKaonLamMtGr[iEne][iCent][iCharge] = (TGraphErrors*)kaonFile[iEne][iCent]->Get(Form("LamMtGrErr_%d",iCharge));
  264. mKaonLamMtGr[iEne][iCent][iCharge]->SetName(Form("mKaonLamMtGr_%d_%d_%d",iEne,iCent,iCharge));
  265. mKaonRoutMtGr[iEne][iCent][iCharge] = (TGraphErrors*)kaonFile[iEne][iCent]->Get(Form("RoutMtGrErr_%d",iCharge));
  266. mKaonRoutMtGr[iEne][iCent][iCharge]->SetName(Form("mKaonRoutMtGr_%d_%d_%d",iEne,iCent,iCharge));
  267. mKaonRsideMtGr[iEne][iCent][iCharge] = (TGraphErrors*)kaonFile[iEne][iCent]->Get(Form("RsideMtGrErr_%d",iCharge));
  268. mKaonRsideMtGr[iEne][iCent][iCharge]->SetName(Form("mKaonRsideMtGr_%d_%d_%d",iEne,iCent,iCharge));
  269. mKaonRlongMtGr[iEne][iCent][iCharge] = (TGraphErrors*)kaonFile[iEne][iCent]->Get(Form("RlongMtGrErr_%d",iCharge));
  270. mKaonRlongMtGr[iEne][iCent][iCharge]->SetName(Form("mKaonRlongMtGr_%d_%d_%d",iEne,iCent,iCharge));
  271. //Pions
  272. mPionLamKtGr[iEne][iCent][iCharge] = (TGraphErrors*)pionFile[iEne][iCent]->Get(Form("LamKtGrErr_%d",iCharge));
  273. mPionLamKtGr[iEne][iCent][iCharge]->SetName(Form("mPionLamKtGr_%d_%d_%d",iEne,iCent,iCharge));
  274. mPionRoutKtGr[iEne][iCent][iCharge] = (TGraphErrors*)pionFile[iEne][iCent]->Get(Form("RoutKtGrErr_%d",iCharge));
  275. mPionRoutKtGr[iEne][iCent][iCharge]->SetName(Form("mPionRoutKtGr_%d_%d_%d",iEne,iCent,iCharge));
  276. mPionRsideKtGr[iEne][iCent][iCharge] = (TGraphErrors*)pionFile[iEne][iCent]->Get(Form("RsideKtGrErr_%d",iCharge));
  277. mPionRsideKtGr[iEne][iCent][iCharge]->SetName(Form("mPionRsideKtGr_%d_%d_%d",iEne,iCent,iCharge));
  278. mPionRlongKtGr[iEne][iCent][iCharge] = (TGraphErrors*)pionFile[iEne][iCent]->Get(Form("RlongKtGrErr_%d",iCharge));
  279. mPionRlongKtGr[iEne][iCent][iCharge]->SetName(Form("mPionRlongKtGr_%d_%d_%d",iEne,iCent,iCharge));
  280. mPionLamMtGr[iEne][iCent][iCharge] = (TGraphErrors*)pionFile[iEne][iCent]->Get(Form("LamMtGrErr_%d",iCharge));
  281. mPionLamMtGr[iEne][iCent][iCharge]->SetName(Form("mPionLamMtGr_%d_%d_%d",iEne,iCent,iCharge));
  282. mPionRoutMtGr[iEne][iCent][iCharge] = (TGraphErrors*)pionFile[iEne][iCent]->Get(Form("RoutMtGrErr_%d",iCharge));
  283. mPionRoutMtGr[iEne][iCent][iCharge]->SetName(Form("mPionRoutMtGr_%d_%d_%d",iEne,iCent,iCharge));
  284. mPionRsideMtGr[iEne][iCent][iCharge] = (TGraphErrors*)pionFile[iEne][iCent]->Get(Form("RsideMtGrErr_%d",iCharge));
  285. mPionRsideMtGr[iEne][iCent][iCharge]->SetName(Form("mPionRsideMtGr_%d_%d_%d",iEne,iCent,iCharge));
  286. mPionRlongMtGr[iEne][iCent][iCharge] = (TGraphErrors*)pionFile[iEne][iCent]->Get(Form("RlongMtGrErr_%d",iCharge));
  287. mPionRlongMtGr[iEne][iCent][iCharge]->SetName(Form("mPionRlongMtGr_%d_%d_%d",iEne,iCent,iCharge));
  288. }
  289. }
  290. }
  291. //Read kaon projections
  292. for(int iEne=0; iEne<nEnergies; iEne++) {
  293. for(int iCent=0; iCent<nStar200CentBins; iCent++) {
  294. for(int iKt=0; iKt<nKaonKtBins; iKt++) {
  295. //Out
  296. hKaonOutProj[iEne][iCent][iKt] = (TH1F*)kaonFile[iEne][iCent]->Get(Form("hOutProj_2_%d",iKt));
  297. hKaonOutProj[iEne][iCent][iKt]->SetName(Form("hKaonOutProj_%d_%d_%d",iEne,iCent,iKt));
  298. hKaonFitOutProj[iEne][iCent][iKt] = (TH1F*)kaonFile[iEne][iCent]->Get(Form("hFitOutProj_2_%d",iKt));
  299. hKaonFitOutProj[iEne][iCent][iKt]->SetName(Form("hKaonFitOutProj_%d_%d_%d",iEne,iCent,iKt));
  300. //Side
  301. hKaonSideProj[iEne][iCent][iKt] = (TH1F*)kaonFile[iEne][iCent]->Get(Form("hSideProj_2_%d",iKt));
  302. hKaonSideProj[iEne][iCent][iKt]->SetName(Form("hKaonSideProj_%d_%d_%d",iEne,iCent,iKt));
  303. hKaonFitSideProj[iEne][iCent][iKt] = (TH1F*)kaonFile[iEne][iCent]->Get(Form("hFitSideProj_2_%d",iKt));
  304. hKaonFitSideProj[iEne][iCent][iKt]->SetName(Form("hKaonFitSideProj_%d_%d_%d",iEne,iCent,iKt));
  305. //Long
  306. hKaonLongProj[iEne][iCent][iKt] = (TH1F*)kaonFile[iEne][iCent]->Get(Form("hLongProj_2_%d",iKt));
  307. hKaonLongProj[iEne][iCent][iKt]->SetName(Form("hKaonLongProj_%d_%d_%d",iEne,iCent,iKt));
  308. hKaonFitLongProj[iEne][iCent][iKt] = (TH1F*)kaonFile[iEne][iCent]->Get(Form("hFitLongProj_2_%d",iKt));
  309. hKaonFitLongProj[iEne][iCent][iKt]->SetName(Form("hKaonFitLongProj_%d_%d_%d",iEne,iCent,iKt));
  310. }
  311. }
  312. }
  313. //Read pion projections
  314. for(int iEne=0; iEne<nEnergies; iEne++) {
  315. for(int iCent=0; iCent<nStar200CentBins; iCent++) {
  316. for(int iKt=0; iKt<nPionKtBins; iKt++) {
  317. //Out
  318. hPionOutProj[iEne][iCent][iKt] = (TH1F*)pionFile[iEne][iCent]->Get(Form("hOutProj_2_%d",iKt));
  319. hPionOutProj[iEne][iCent][iKt]->SetName(Form("hPionOutProj_%d_%d_%d",iEne,iCent,iKt));
  320. hPionFitOutProj[iEne][iCent][iKt] = (TH1F*)pionFile[iEne][iCent]->Get(Form("hFitOutProj_2_%d",iKt));
  321. hPionFitOutProj[iEne][iCent][iKt]->SetName(Form("hPionFitOutProj_%d_%d_%d",iEne,iCent,iKt));
  322. //Side
  323. hPionSideProj[iEne][iCent][iKt] = (TH1F*)pionFile[iEne][iCent]->Get(Form("hSideProj_2_%d",iKt));
  324. hPionSideProj[iEne][iCent][iKt]->SetName(Form("hPionSideProj_%d_%d_%d",iEne,iCent,iKt));
  325. hPionFitSideProj[iEne][iCent][iKt] = (TH1F*)pionFile[iEne][iCent]->Get(Form("hFitSideProj_2_%d",iKt));
  326. hPionFitSideProj[iEne][iCent][iKt]->SetName(Form("hPionFitSideProj_%d_%d_%d",iEne,iCent,iKt));
  327. //Long
  328. hPionLongProj[iEne][iCent][iKt] = (TH1F*)pionFile[iEne][iCent]->Get(Form("hLongProj_2_%d",iKt));
  329. hPionLongProj[iEne][iCent][iKt]->SetName(Form("hPionLongProj_%d_%d_%d",iEne,iCent,iKt));
  330. hPionFitLongProj[iEne][iCent][iKt] = (TH1F*)pionFile[iEne][iCent]->Get(Form("hFitLongProj_2_%d",iKt));
  331. hPionFitLongProj[iEne][iCent][iKt]->SetName(Form("hPionFitLongProj_%d_%d_%d",iEne,iCent,iKt));
  332. }
  333. }
  334. }
  335. double margin = 0.;
  336. //Plot pion projections and fits
  337. TCanvas *PionProjCanvas[2][5];
  338. for(int iEne=0; iEne<nEnergies; iEne++) {
  339. for(int iCent=0; iCent<nStar200CentBins; iCent++) {
  340. PionProjCanvas[iEne][iCent] = new TCanvas(Form("PionProjCanvas_%d_%d",iEne,iCent),
  341. Form("PionProjCanvas_%d_%d",iEne,iCent),
  342. 1200,800);
  343. PionProjCanvas[iEne][iCent]->Divide(nPionKtBins, 3, margin, margin);
  344. }
  345. }
  346. TLatex latex;
  347. latex.SetTextSize(0.05);
  348. for(int iEne=0; iEne<nEnergies; iEne++) {
  349. for(int iCent=0; iCent<nStar200CentBins; iCent++) {
  350. for(int iProj=0; iProj<3; iProj++) {
  351. for(int iKt=0; iKt<nPionKtBins; iKt++) {
  352. int iPad = iProj*nPionKtBins + iKt + 1;
  353. PionProjCanvas[iEne][iCent]->cd(iPad);
  354. double KtLo=KtShift + PionFitKtArray[iKt][0]*KtStep;
  355. double KtHi=KtShift + PionFitKtArray[iKt][1]*KtStep+KtStep;
  356. if(iProj==0) { //Out
  357. hPionOutProj[iEne][iCent][iKt]->Draw();
  358. hPionFitOutProj[iEne][iCent][iKt]->Draw("sameC");
  359. latex.DrawLatex(0.02, 0.94, "STAR preliminary");
  360. latex.DrawLatex(0.02, 1.4, Form("%3.2f#leqk_{T}#leq%3.2f",KtLo,KtHi) );
  361. latex.DrawLatex(0.1, 1.2, Form("Out Projection") );
  362. }
  363. else if(iProj==1) { //Side
  364. hPionSideProj[iEne][iCent][iKt]->Draw();
  365. hPionFitSideProj[iEne][iCent][iKt]->Draw("sameC");
  366. latex.DrawLatex(0.02,0.94,"STAR preliminary");
  367. latex.DrawLatex(0.1, 1.2, Form("Side Projection") );
  368. }
  369. else if(iProj==2) { //Long
  370. hPionLongProj[iEne][iCent][iKt]->Draw();
  371. hPionFitLongProj[iEne][iCent][iKt]->Draw("sameC");
  372. latex.DrawLatex(0.02,0.94,"STAR preliminary");
  373. latex.DrawLatex(0.1, 1.2, Form("Long Projection") );
  374. }
  375. }
  376. }
  377. }
  378. }
  379. //Plot kaon projections and fits
  380. TCanvas *KaonProjCanvas[2][5];
  381. for(int iEne=0; iEne<nEnergies; iEne++) {
  382. for(int iCent=0; iCent<nStar200CentBins; iCent++) {
  383. KaonProjCanvas[iEne][iCent] = new TCanvas(Form("KaonProjCanvas_%d_%d",iEne,iCent),
  384. Form("KaonProjCanvas_%d_%d",iEne,iCent),
  385. 1200,800);
  386. KaonProjCanvas[iEne][iCent]->Divide(nKaonKtBins, 3, margin, margin);
  387. }
  388. }
  389. for(int iEne=0; iEne<nEnergies; iEne++) {
  390. for(int iCent=0; iCent<nStar200CentBins; iCent++) {
  391. for(int iProj=0; iProj<3; iProj++) {
  392. for(int iKt=0; iKt<nKaonKtBins; iKt++) {
  393. int iPad = iProj*nKaonKtBins + iKt + 1;
  394. KaonProjCanvas[iEne][iCent]->cd(iPad);
  395. double KtLo=KtShift + KaonFitKtArray[iKt][0]*KtStep;
  396. double KtHi=KtShift + KaonFitKtArray[iKt][1]*KtStep+KtStep;
  397. if(iProj==0) { //Out
  398. hKaonOutProj[iEne][iCent][iKt]->Draw();
  399. hKaonFitOutProj[iEne][iCent][iKt]->Draw("sameC");
  400. latex.DrawLatex(0.02, 0.94, "STAR preliminary");
  401. latex.DrawLatex(0.02, 1.4, Form("%3.2f#leqk_{T}#leq%3.2f",KtLo,KtHi) );
  402. latex.DrawLatex(0.1, 1.3, Form("Out Projection") );
  403. }
  404. else if(iProj==1) { //Side
  405. hKaonSideProj[iEne][iCent][iKt]->Draw();
  406. hKaonFitSideProj[iEne][iCent][iKt]->Draw("sameC");
  407. latex.DrawLatex(0.02,0.94,"STAR preliminary");
  408. latex.DrawLatex(0.1, 1.3, Form("Side Projection") );
  409. }
  410. else if(iProj==2) { //Long
  411. hKaonLongProj[iEne][iCent][iKt]->Draw();
  412. hKaonFitLongProj[iEne][iCent][iKt]->Draw("sameC");
  413. latex.DrawLatex(0.02,0.94,"STAR preliminary");
  414. latex.DrawLatex(0.1, 1.3, Form("Long Projection") );
  415. }
  416. }
  417. }
  418. }
  419. }
  420. /////////////////////////////////////////////
  421. // kT dependence //
  422. /////////////////////////////////////////////
  423. TMultiGraph* mRoutKtMGr[2][5]; //iEnergy,Centrality
  424. TMultiGraph* mRsideKtMGr[2][5]; //iEnergy,Centrality
  425. TMultiGraph* mRlongKtMGr[2][5]; //iEnergy,Centrality
  426. TMultiGraph* mLamKtMGr[2][5]; //iEnergy,Centrality
  427. for(int iEne=0; iEne<nEnergies; iEne++) {
  428. for(int iCent=0; iCent<nStar200CentBins; iCent++) {
  429. mRoutKtMGr[iEne][iCent] = new TMultiGraph();
  430. mRsideKtMGr[iEne][iCent] = new TMultiGraph();
  431. mRlongKtMGr[iEne][iCent] = new TMultiGraph();
  432. mLamKtMGr[iEne][iCent] = new TMultiGraph();
  433. //for(int iCent=0; iCent<nStar200CentBins; iCent++) {
  434. //Out
  435. SetTGraphStyle(mKaonRoutKtGr[iEne][iCent][2],4,iCent);
  436. mRoutKtMGr[iEne][iCent]->Add(mKaonRoutKtGr[iEne][iCent][2]);
  437. SetTGraphStyle(mPionRoutKtGr[iEne][iCent][2],3,iCent);
  438. mRoutKtMGr[iEne][iCent]->Add(mPionRoutKtGr[iEne][iCent][2]);
  439. //Side
  440. SetTGraphStyle(mKaonRsideKtGr[iEne][iCent][2],4,iCent);
  441. mRsideKtMGr[iEne][iCent]->Add(mKaonRsideKtGr[iEne][iCent][2]);
  442. SetTGraphStyle(mPionRsideKtGr[iEne][iCent][2],3,iCent);
  443. mRsideKtMGr[iEne][iCent]->Add(mPionRsideKtGr[iEne][iCent][2]);
  444. //Long
  445. SetTGraphStyle(mKaonRlongKtGr[iEne][iCent][2],4,iCent);
  446. mRlongKtMGr[iEne][iCent]->Add(mKaonRlongKtGr[iEne][iCent][2]);
  447. SetTGraphStyle(mPionRlongKtGr[iEne][iCent][2],3,iCent);
  448. mRlongKtMGr[iEne][iCent]->Add(mPionRlongKtGr[iEne][iCent][2]);
  449. //Lambda
  450. SetTGraphStyle(mKaonLamKtGr[iEne][iCent][2],4,iCent);
  451. mLamKtMGr[iEne][iCent]->Add(mKaonLamKtGr[iEne][iCent][2]);
  452. SetTGraphStyle(mPionLamKtGr[iEne][iCent][2],3,iCent);
  453. mLamKtMGr[iEne][iCent]->Add(mPionLamKtGr[iEne][iCent][2]);
  454. //}
  455. }
  456. }
  457. TCanvas *KtDepCanv[2];
  458. for(int iEne=0; iEne<nEnergies; iEne++) {
  459. KtDepCanv[iEne]= new TCanvas(Form("KtDepCanv_%d",iEne),
  460. Form("KtDepCanv_%d",iEne),
  461. mCanvSize[0],mCanvSize[1]);
  462. KtDepCanv[iEne]->Divide(4, nStar200CentBins, 0.0, 0.0);
  463. }
  464. for(int iEne=0; iEne<nEnergies; iEne++) {
  465. for(int iCent=0; iCent<nStar200CentBins; iCent++) {
  466. KtDepCanv[iEne]->cd(iCent*4+1);
  467. gPad->SetBorderSize(2);
  468. mLamKtMGr[iEne][iCent]->Draw("AP");
  469. mLamKtMGr[iEne][iCent]->GetYaxis()->SetRangeUser(mLamRange[0],mLamRange[1]);
  470. mLamKtMGr[iEne][iCent]->GetYaxis()->SetTitle("#lambda");
  471. mLamKtMGr[iEne][iCent]->GetXaxis()->SetTitle("k_{T} (GeV/c)");
  472. mLamKtMGr[iEne][iCent]->GetXaxis()->SetNdivisions(505);
  473. mLamKtMGr[iEne][iCent]->GetYaxis()->SetNdivisions(505);
  474. //latex.DrawLatex(0.4,0.3, "Red symbols : 0-5% centrality");
  475. //latex.DrawLatex(0.4,0.1, "Blue symbols: 20-30% centrality");
  476. KtDepCanv[iEne]->cd(iCent*4+2);
  477. gPad->SetBorderSize(2);
  478. mRoutKtMGr[iEne][iCent]->Draw("AP");
  479. mRoutKtMGr[iEne][iCent]->GetYaxis()->SetRangeUser(mRadiiRange[0],mRadiiRange[1]);
  480. mRoutKtMGr[iEne][iCent]->GetYaxis()->SetTitle("R_{out} (fm)");
  481. mRoutKtMGr[iEne][iCent]->GetXaxis()->SetTitle("k_{T} (GeV/c)");
  482. mRoutKtMGr[iEne][iCent]->GetXaxis()->SetNdivisions(505);
  483. mRoutKtMGr[iEne][iCent]->GetYaxis()->SetNdivisions(505);
  484. latex.DrawLatex(0.4,1.5,"STAR preliminary");
  485. TLegend *leg1 = new TLegend(0.65,0.65, 0.85, 0.85);
  486. leg1->AddEntry(mKaonRoutKtGr[iEne][0][2],"KK","p");
  487. leg1->AddEntry(mPionRoutKtGr[iEne][0][2],Form("#pi#pi"),"p");
  488. leg1->SetLineColor(0);
  489. leg1->Draw("same");
  490. KtDepCanv[iEne]->cd(iCent*4+3);
  491. gPad->SetBorderSize(2);
  492. mRsideKtMGr[iEne][iCent]->Draw("AP");
  493. mRsideKtMGr[iEne][iCent]->GetYaxis()->SetRangeUser(mRadiiRange[0],mRadiiRange[1]);
  494. mRsideKtMGr[iEne][iCent]->GetYaxis()->SetTitle("R_{side} (fm)");
  495. mRsideKtMGr[iEne][iCent]->GetXaxis()->SetTitle("k_{T} (GeV/c)");
  496. mRsideKtMGr[iEne][iCent]->GetXaxis()->SetNdivisions(505);
  497. mRsideKtMGr[iEne][iCent]->GetYaxis()->SetNdivisions(505);
  498. latex.DrawLatex(0.4, 1.5,"STAR preliminary");
  499. if(iEne==0) {
  500. latex.DrawLatex(0.4, 6., "Au+Au #sqrt{S_{NN}}=200 GeV");
  501. }
  502. else if(iEne==1) {
  503. latex.DrawLatex(0.4, 6., "Au+Au #sqrt{S_{NN}}=19.6 GeV");
  504. }
  505. KtDepCanv[iEne]->cd(iCent*4+4);
  506. gPad->SetBorderSize(2);
  507. mRlongKtMGr[iEne][iCent]->Draw("AP");
  508. mRlongKtMGr[iEne][iCent]->GetYaxis()->SetRangeUser(mRadiiRange[0],mRadiiRange[1]);
  509. mRlongKtMGr[iEne][iCent]->GetYaxis()->SetTitle("R_{long} (fm)");
  510. mRlongKtMGr[iEne][iCent]->GetXaxis()->SetTitle("k_{T} (GeV/c)");
  511. mRlongKtMGr[iEne][iCent]->GetXaxis()->SetNdivisions(505);
  512. mRlongKtMGr[iEne][iCent]->GetYaxis()->SetNdivisions(505);
  513. latex.DrawLatex(0.4,1.5,"STAR preliminary");
  514. }
  515. }
  516. /////////////////////////////////////////////
  517. // mT dependence //
  518. /////////////////////////////////////////////
  519. TMultiGraph* mRoutMtMGr[2][5]; //iEnergy,Centrality
  520. TMultiGraph* mRsideMtMGr[2][5]; //iEnergy,Centrality
  521. TMultiGraph* mRlongMtMGr[2][5]; //iEnergy,Centrality
  522. TMultiGraph* mLamMtMGr[2][5]; //iEnergy,Centrality
  523. for(int iEne=0; iEne<nEnergies; iEne++) {
  524. for(int iCent=0; iCent<nStar200CentBins; iCent++) {
  525. mRoutMtMGr[iEne][iCent] = new TMultiGraph();
  526. mRsideMtMGr[iEne][iCent] = new TMultiGraph();
  527. mRlongMtMGr[iEne][iCent] = new TMultiGraph();
  528. mLamMtMGr[iEne][iCent] = new TMultiGraph();
  529. //for(int iCent=0; iCent<nStar200CentBins; iCent++) {
  530. //Out
  531. SetTGraphStyle(mKaonRoutMtGr[iEne][iCent][2],4,iCent);
  532. mRoutMtMGr[iEne][iCent]->Add(mKaonRoutMtGr[iEne][iCent][2]);
  533. SetTGraphStyle(mPionRoutMtGr[iEne][iCent][2],3,iCent);
  534. mRoutMtMGr[iEne][iCent]->Add(mPionRoutMtGr[iEne][iCent][2]);
  535. if(iEne == 0) {
  536. mRoutMtMGr[iEne][iCent]->Add(StarRoutMt200GrErr[iCent]);
  537. }
  538. else {
  539. mRoutMtMGr[iEne][iCent]->Add(StarRoutMt19GrErr[iCent]);
  540. }
  541. //Side
  542. SetTGraphStyle(mKaonRsideMtGr[iEne][iCent][2],4,iCent);
  543. mRsideMtMGr[iEne][iCent]->Add(mKaonRsideMtGr[iEne][iCent][2]);
  544. SetTGraphStyle(mPionRsideMtGr[iEne][iCent][2],3,iCent);
  545. mRsideMtMGr[iEne][iCent]->Add(mPionRsideMtGr[iEne][iCent][2]);
  546. if(iEne == 0) {
  547. mRsideMtMGr[iEne][iCent]->Add(StarRsideMt200GrErr[iCent]);
  548. }
  549. else {
  550. mRsideMtMGr[iEne][iCent]->Add(StarRsideMt19GrErr[iCent]);
  551. }
  552. //Long
  553. SetTGraphStyle(mKaonRlongMtGr[iEne][iCent][2],4,iCent);
  554. mRlongMtMGr[iEne][iCent]->Add(mKaonRlongMtGr[iEne][iCent][2]);
  555. SetTGraphStyle(mPionRlongMtGr[iEne][iCent][2],3,iCent);
  556. mRlongMtMGr[iEne][iCent]->Add(mPionRlongMtGr[iEne][iCent][2]);
  557. if(iEne == 0) {
  558. mRlongMtMGr[iEne][iCent]->Add(StarRlongMt200GrErr[iCent]);
  559. }
  560. else {
  561. mRlongMtMGr[iEne][iCent]->Add(StarRlongMt19GrErr[iCent]);
  562. }
  563. //Lambda
  564. SetTGraphStyle(mKaonLamMtGr[iEne][iCent][2],4,iCent);
  565. mLamMtMGr[iEne][iCent]->Add(mKaonLamMtGr[iEne][iCent][2]);
  566. SetTGraphStyle(mPionLamMtGr[iEne][iCent][2],3,iCent);
  567. mLamMtMGr[iEne][iCent]->Add(mPionLamMtGr[iEne][iCent][2]);
  568. }
  569. }
  570. TCanvas *MtDepCanv[2];
  571. for(int iEne=0; iEne<nEnergies; iEne++) {
  572. MtDepCanv[iEne]= new TCanvas(Form("MtDepCanv_%d",iEne),
  573. Form("MtDepCanv_%d",iEne),
  574. mCanvSize[0],mCanvSize[1]);
  575. MtDepCanv[iEne]->Divide(4,nStar200CentBins,0.,0.);
  576. }
  577. MtDepCanv[0]->Update();
  578. TString str;
  579. latex.SetTextSize(0.1);
  580. char mIndex = 'a';
  581. for(int iEne=0; iEne<nEnergies; iEne++) {
  582. for(int iCent=0; iCent<nStar200CentBins; iCent++) {
  583. MtDepCanv[iEne]->cd(iCent*4+1);
  584. gPad->SetTicks(1,1);
  585. mLamMtMGr[iEne][iCent]->Draw("AP");
  586. mLamMtMGr[iEne][iCent]->GetYaxis()->SetRangeUser(mLamRange[0],mLamRange[1]);
  587. mLamMtMGr[iEne][iCent]->GetXaxis()->SetLimits(mMtRange[0],mMtRange[1]);
  588. mLamMtMGr[iEne][iCent]->GetYaxis()->SetNdivisions(505);
  589. mLamMtMGr[iEne][iCent]->GetXaxis()->SetNdivisions(505);
  590. switch(iCent) {
  591. case 0:
  592. str = "0-5%";
  593. break;
  594. case 1:
  595. str = "5-10%";
  596. break;
  597. case 2:
  598. str = "10-20%";
  599. break;
  600. case 3:
  601. str = "20-30%";
  602. break;
  603. case 4:
  604. str = "30-40%";
  605. break;
  606. default:
  607. str = "unknown";
  608. break;
  609. }
  610. latex.SetTextSize(0.1);
  611. latex.DrawLatex(0.4,0.8, str.Data());
  612. latex.SetTextSize(0.1);
  613. switch(iCent) {
  614. case 0:
  615. str = "(a)";
  616. break;
  617. case 1:
  618. str = "(e)";
  619. break;
  620. case 2:
  621. str = "(i)";
  622. break;
  623. case 3:
  624. str = "(m)";
  625. break;
  626. case 4:
  627. str = "(q)";
  628. break;
  629. define:
  630. str = "(?)";
  631. };
  632. latex.DrawLatex(1.1,0.2,str.Data());
  633. if(iCent == 2) {
  634. TLegend *leg2 = new TLegend(0.3,0.3,0.73, 0.4);
  635. leg2->SetTextSize(0.08);
  636. leg2->AddEntry(StarRsideMt200GrErr[iCent],Form("#pi#pi (STAR)"),"p");
  637. leg2->SetLineColor(0);
  638. leg2->Draw("same");
  639. }
  640. if(iCent == 0) {
  641. TLegend *leg1 = new TLegend(0.35,0.08,0.7, 0.4);
  642. leg1->SetTextSize(0.15);
  643. leg1->AddEntry(mKaonRoutMtGr[iEne][0][2],"KK","p");
  644. leg1->AddEntry(mPionRoutMtGr[iEne][0][2],Form("#pi#pi"),"p");
  645. //leg1->AddEntry(StarRoutMt200GrErr[0],Form("#pi#pi: STAR PRC92(2015)014904"),"p");
  646. leg1->SetLineColor(0);
  647. leg1->Draw("same");
  648. }
  649. else if(iCent == 2) {
  650. latex.SetTextAngle(90);
  651. latex.SetTextSize(0.2);
  652. latex.DrawLatex(-0.1,0.3,"#lambda");
  653. latex.SetTextSize(0.15);
  654. latex.SetTextAngle(0);
  655. }
  656. MtDepCanv[iEne]->cd(iCent*4+2);
  657. gPad->SetTicks(1,1);
  658. //gPad->SetTicky(1,1);
  659. mRoutMtMGr[iEne][iCent]->Draw("AP");
  660. mRoutMtMGr[iEne][iCent]->GetYaxis()->SetRangeUser(mRadiiRange[0],mRadiiRange[1]);
  661. mRoutMtMGr[iEne][iCent]->GetXaxis()->SetLimits(mMtRange[0],mMtRange[1]);
  662. mRoutMtMGr[iEne][iCent]->GetXaxis()->SetNdivisions(505);
  663. mRoutMtMGr[iEne][iCent]->GetYaxis()->SetNdivisions(505);
  664. mRoutMtMGr[iEne][iCent]->GetYaxis()->SetLabelOffset(999);
  665. if(iCent==0) {
  666. latex.DrawLatex(0.9,5.8,"#mu=out");
  667. }
  668. if(iCent == 1) {
  669. if(iEne==0) {
  670. latex.SetTextSize(0.09);
  671. latex.DrawLatex(0.4, 6.0, "Au+Au #sqrt{s_{NN}}=200 GeV");
  672. latex.SetTextSize(0.1);
  673. }
  674. else if(iEne==1) {
  675. latex.DrawLatex(0.3, 5.5, "Au+Au #sqrt{S_{NN}}=19.6 GeV");
  676. }
  677. }
  678. switch(iCent) {
  679. case 0:
  680. str = "(b)";
  681. break;
  682. case 1:
  683. str = "(f)";
  684. break;
  685. case 2:
  686. str = "(j)";
  687. break;
  688. case 3:
  689. str = "(n)";
  690. break;
  691. case 4:
  692. str = "(r)";
  693. break;
  694. default:
  695. str = "(?)";
  696. };
  697. latex.DrawLatex(1.1,0.8,str.Data());
  698. MtDepCanv[iEne]->cd(iCent*4+3);
  699. gPad->SetTicks(1,1);
  700. //gPad->SetTicky(2);
  701. mRsideMtMGr[iEne][iCent]->Draw("AP");
  702. mRsideMtMGr[iEne][iCent]->GetYaxis()->SetRangeUser(mRadiiRange[0],mRadiiRange[1]);
  703. mRsideMtMGr[iEne][iCent]->GetXaxis()->SetLimits(mMtRange[0],mMtRange[1]);
  704. mRsideMtMGr[iEne][iCent]->GetXaxis()->SetNdivisions(505);
  705. mRsideMtMGr[iEne][iCent]->GetYaxis()->SetNdivisions(505);
  706. mRsideMtMGr[iEne][iCent]->GetYaxis()->SetLabelOffset(999);
  707. if(iCent==0) {
  708. latex.DrawLatex(0.9,5.8,"#mu=side");
  709. }
  710. if(iCent == 1) {
  711. latex.DrawLatex(0.3, 1.5,"STAR preliminary");
  712. }
  713. switch(iCent) {
  714. case 0:
  715. str = "(c)";
  716. break;
  717. case 1:
  718. str = "(g)";
  719. break;
  720. case 2:
  721. str = "(k)";
  722. break;
  723. case 3:
  724. str = "(o)";
  725. break;
  726. case 4:
  727. str = "(s)";
  728. break;
  729. default:
  730. str = "(?)";
  731. };
  732. latex.DrawLatex(1.1,0.8,str.Data());
  733. MtDepCanv[iEne]->cd(iCent*4+4);
  734. //gPad->SetTicky(2);
  735. mRlongMtMGr[iEne][iCent]->Draw("APY+");
  736. gPad->SetTicks(1,1);
  737. mRlongMtMGr[iEne][iCent]->GetYaxis()->SetRangeUser(mRadiiRange[0],mRadiiRange[1]);
  738. mRlongMtMGr[iEne][iCent]->GetXaxis()->SetLimits(mMtRange[0],mMtRange[1]);
  739. mRlongMtMGr[iEne][iCent]->GetXaxis()->SetNdivisions(505);
  740. mRlongMtMGr[iEne][iCent]->GetYaxis()->SetNdivisions(505);
  741. if(iCent==0) {
  742. latex.DrawLatex(0.9,5.8,"#mu=long");
  743. }
  744. switch(iCent) {
  745. case 0:
  746. str = "(d)";
  747. break;
  748. case 1:
  749. str = "(h)";
  750. break;
  751. case 2:
  752. str = "(l)";
  753. break;
  754. case 3:
  755. str = "(p)";
  756. break;
  757. case 4:
  758. str = "(t)";
  759. break;
  760. default:
  761. str = "(?)";
  762. };
  763. latex.DrawLatex(1.1,0.8,str.Data());
  764. }
  765. }
  766. //MtDepCanv[0]->Modified();
  767. MtDepCanv[0]->Print("Try.png");
  768. //TFile* oFile = new TFile(Form("oResults_auau200_cent%d",cent),"recreate");
  769. //PionProjCanvas->Write();
  770. //KaonProjCanvas->Write();
  771. }
  772. //_________________
  773. void SetStarStyle(TGraphErrors* grErr, int energy, int cent) {
  774. int mLineColor = 1;
  775. int mMarkerColor = 3;
  776. double mMarkerSize = 1.6;
  777. int mLineWidth = 2;
  778. int mMarkerStyle = 29;
  779. mLineColor = mMarkerColor;
  780. grErr->SetLineWidth(mLineWidth);
  781. grErr->SetLineColor(mLineColor);
  782. grErr->SetMarkerStyle(mMarkerStyle);
  783. grErr->SetMarkerSize(mMarkerSize);
  784. grErr->SetMarkerColor(mMarkerColor);
  785. }
  786. //_________________
  787. void SetTGraphStyle(TGraphErrors* grErr, int pid, int cent) {
  788. int mLineColor = 1;
  789. int mMarkerColor;
  790. double mMarkerSize = 1.2;
  791. int mLineWidth = 2.;
  792. int mMarkerStyle;
  793. if(pid==3) {
  794. mMarkerColor = 2;
  795. mMarkerStyle = 20;
  796. }
  797. else if(pid==4) {
  798. mMarkerColor = 4;
  799. mMarkerStyle = 22;
  800. }
  801. mLineColor = mMarkerColor;
  802. grErr->SetLineWidth(mLineWidth);
  803. grErr->SetLineColor(mLineColor);
  804. grErr->SetMarkerSize(mMarkerSize);
  805. grErr->SetMarkerColor(mMarkerColor);
  806. grErr->SetMarkerStyle(mMarkerStyle);
  807. }
  808. //_________________
  809. void SetGlobalStyle() {
  810. //gROOT->SetStyle("Plain");
  811. gStyle->SetOptStat(0);
  812. gStyle->SetOptTitle(0);
  813. gStyle->SetLineWidth(2);
  814. gStyle->SetPadBorderSize(2);
  815. gStyle->SetPadTopMargin(0.3);
  816. gStyle->SetPadLeftMargin(0.3);
  817. gStyle->SetPadRightMargin(0.3);
  818. gStyle->SetPadBottomMargin(0.3);
  819. gStyle->SetLabelSize(0.08,"X");
  820. gStyle->SetLabelSize(0.08,"Y");
  821. gStyle->SetLabelOffset(0.05,"X");
  822. gStyle->SetLabelOffset(0.05,"Y");
  823. //gStyle->SetPadTickX(1);
  824. //gStyle->SetPadTickY(1);
  825. gStyle->SetFrameLineWidth(2);
  826. }