plot.C 35 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096
  1. ///////////////////////////////////////////////////////////////////////////////
  2. //
  3. // $Id: plot.C,v 1.70 2011/07/25 15:54:53 posk Exp $
  4. //
  5. // Author: Art Poskanzer, LBNL, Aug 1999
  6. // FTPC added by Markus Oldenburg, MPI, Dec 2000
  7. // Description: Macro to plot histograms made by StFlowAnalysisMaker,
  8. // StFlowLeeYangZerosMaker, and StFlowScalarProdMaker.
  9. // If selN = 0 plot all selections and harmonics.
  10. // First time type .x plot.C() to see the menu.
  11. // Run Number appended to "ana" is entered in the bottom, left box.
  12. // Hist file is anaXX.root where XX is the number.
  13. // Default hist file is flow.hist.root .
  14. // After the first execution, just type plot(N) .
  15. // A negative N plots all pages starting with page N.
  16. // Place a symbolic link to this file in StRoot/macros/analysis .
  17. //
  18. ///////////////////////////////////////////////////////////////////////////////
  19. #include <math.h>
  20. #include "TMath.h"
  21. #include <iostream.h>
  22. #include <iomanip.h>
  23. const Int_t nHars = 4; // 4
  24. const Int_t nSels = 2;
  25. const Int_t nSubs = 2;
  26. Int_t runNumber = 0;
  27. char runName[6];
  28. char fileNumber[4] = "x";
  29. char fileName[30];
  30. TFile* histFile;
  31. char tmp[10];
  32. char runNo[10];
  33. TCanvas* can;
  34. TCanvas* plot(Int_t pageNumber=0, Int_t selN=0, Int_t harN=0){
  35. gInterpreter->ProcessLine(".O0");
  36. Bool_t includeFtpc = kTRUE;
  37. Bool_t reCent = kFALSE;
  38. bool multiGraph = kFALSE; // set flags
  39. bool singleGraph = kFALSE;
  40. if (selN == 0) multiGraph = kTRUE;
  41. TCanvas* cOld = (TCanvas*)gROOT->GetListOfCanvases(); // delete old canvas
  42. if (cOld) cOld->Delete();
  43. //gROOT->SetStyle("Pub"); // set style
  44. gROOT->SetStyle("Bold"); // set style
  45. gROOT->ForceStyle();
  46. gStyle->SetOptStat(10);
  47. gStyle->SetPalette(1);
  48. // names of histograms made by StFlowAnalysisMaker
  49. // also projections of some of these histograms
  50. const char* baseName1[] = { // with FTPCs
  51. "Flow_Res_Sel",
  52. "Flow_Trigger",
  53. "Flow_VertexZ",
  54. "Flow_VertexXY2D",
  55. "Flow_EtaSymVerZ2D_Tpc",
  56. "Flow_EtaSym_Tpc",
  57. "Flow_EtaSymVerZ2D_Ftpc",
  58. "Flow_EtaSym_Ftpc",
  59. "Flow_CTBvsZDC2D",
  60. "Flow_Cent",
  61. "Flow_Mult",
  62. "Flow_OrigMult",
  63. "Flow_MultOverOrig",
  64. "Flow_MultEta",
  65. "Flow_MultPart",
  66. "Flow_Charge_Ftpc",
  67. "Flow_DcaGlobal_Tpc",
  68. "Flow_DcaGlobal_Ftpc",
  69. "Flow_Dca_Tpc",
  70. "Flow_Dca_Ftpc",
  71. "Flow_Chi2_Tpc",
  72. "Flow_Chi2_Ftpc",
  73. "Flow_FitPts_Tpc",
  74. "Flow_MaxPts_Tpc",
  75. "Flow_FitOverMax_Tpc",
  76. "Flow_FitPts_Ftpc",
  77. "Flow_MaxPts_Ftpc",
  78. "Flow_FitOverMax_Ftpc",
  79. //"Flow_EtaPtPhi3D",
  80. "Flow_EtaPtPhi2D.PhiEta",
  81. "Flow_EtaPtPhi2D.PhiPt",
  82. "Flow_YieldAll2D",
  83. "Flow_YieldAll.Eta",
  84. "Flow_YieldAll.Pt",
  85. "Flow_YieldPart2D",
  86. "Flow_YieldPart.Eta",
  87. "Flow_YieldPart.Pt",
  88. //"Flow_Bin_Eta",
  89. //"Flow_Bin_Pt",
  90. "Flow_MeanDedxPos2D",
  91. "Flow_MeanDedxNeg2D",
  92. // "Flow_PidPiPlusPart",
  93. // "Flow_PidPiMinusPart",
  94. // "Flow_PidProtonPart",
  95. // "Flow_PidAntiProtonPart",
  96. // "Flow_PidKplusPart",
  97. // "Flow_PidKminusPart",
  98. // "Flow_PidDeuteronPart",
  99. // "Flow_PidAntiDeuteronPart",
  100. // "Flow_PidElectronPart",
  101. // "Flow_PidPositronPart",
  102. "Flow_PidMult",
  103. "Flow_Phi_FarEast_Sel", // first multi graph hist
  104. "Flow_Phi_Flat_FarEast_Sel",
  105. "Flow_Phi_East_Sel",
  106. "Flow_Phi_Flat_East_Sel",
  107. "Flow_Phi_West_Sel",
  108. "Flow_Phi_Flat_West_Sel",
  109. "Flow_Phi_FarWest_Sel",
  110. "Flow_Phi_Flat_FarWest_Sel",
  111. "Flow_Phi_FtpcFarEast_Sel",
  112. "Flow_Phi_Flat_FtpcFarEast_Sel",
  113. "Flow_Phi_FtpcEast_Sel",
  114. "Flow_Phi_Flat_FtpcEast_Sel",
  115. "Flow_Phi_FtpcWest_Sel",
  116. "Flow_Phi_Flat_FtpcWest_Sel",
  117. "Flow_Phi_FtpcFarWest_Sel",
  118. "Flow_Phi_Flat_FtpcFarWest_Sel",
  119. "Flow_Mul_Sel",
  120. "Flow_Yield2D_Sel",
  121. "Flow_Yield.Eta_Sel",
  122. "Flow_Yield.Pt_Sel",
  123. "Flow_Psi_Subs",
  124. "Flow_Psi_Sel",
  125. "Flow_PhiLab_Sel",
  126. "Flow_Psi_Diff_Sel",
  127. "Flow_Psi_Sub_Corr_Sel",
  128. "Flow_Psi_Sub_Corr_Diff_Sel",
  129. "Flow_Phi_Corr_Sel",
  130. "Flow_vObs2D_Sel",
  131. "Flow_vObsEta_Sel",
  132. "Flow_vObsPt_Sel",
  133. "Flow_v2D_Sel",
  134. "Flow_vEta_Sel",
  135. "Flow_vPt_Sel",
  136. "Flow_q_Sel",
  137. "FlowLYZ_vEta_Sel",
  138. "FlowLYZ_vPt_Sel",
  139. "Flow_vObs2D_ScalarProd_Sel",
  140. "Flow_v2D_ScalarProd_Sel",
  141. "Flow_vEta_ScalarProd_Sel",
  142. "Flow_vPt_ScalarProd_Sel"
  143. };
  144. const char* baseName2[] = { // without FTPCs
  145. "Flow_Res_Sel",
  146. "Flow_Trigger",
  147. "Flow_VertexZ",
  148. "Flow_VertexXY2D",
  149. "Flow_EtaSymVerZ2D_Tpc",
  150. "Flow_EtaSym_Tpc",
  151. "Flow_CTBvsZDC2D",
  152. "Flow_Cent",
  153. "Flow_Mult",
  154. "Flow_OrigMult",
  155. "Flow_MultOverOrig",
  156. "Flow_MultEta",
  157. "Flow_MultPart",
  158. "Flow_Dca_Tpc",
  159. "Flow_DcaGlobal_Tpc",
  160. "Flow_Chi2_Tpc",
  161. "Flow_FitPts_Tpc",
  162. "Flow_MaxPts_Tpc",
  163. "Flow_FitOverMax_Tpc",
  164. //"Flow_EtaPtPhi3D",
  165. "Flow_EtaPtPhi2D.PhiEta",
  166. "Flow_EtaPtPhi2D.PhiPt",
  167. "Flow_YieldAll2D",
  168. "Flow_YieldAll.Eta",
  169. "Flow_YieldAll.Pt",
  170. "Flow_YieldPart2D",
  171. "Flow_YieldPart.Eta",
  172. "Flow_YieldPart.Pt",
  173. //"Flow_Bin_Eta",
  174. //"Flow_Bin_Pt",
  175. // "Flow_MeanDedxPos2D",
  176. // "Flow_MeanDedxNeg2D",
  177. // "Flow_PidPiPlusPart",
  178. // "Flow_PidPiMinusPart",
  179. // "Flow_PidProtonPart",
  180. // "Flow_PidAntiProtonPart",
  181. // "Flow_PidKplusPart",
  182. // "Flow_PidKminusPart",
  183. // "Flow_PidDeuteronPart",
  184. // "Flow_PidAntiDeuteronPart",
  185. // "Flow_PidElectronPart",
  186. // "Flow_PidPositronPart",
  187. "Flow_PidMult",
  188. "Flow_Phi_FarEast_Sel", // first multi graph hist
  189. "Flow_Phi_Flat_FarEast_Sel",
  190. "Flow_Phi_East_Sel",
  191. "Flow_Phi_Flat_East_Sel",
  192. "Flow_Phi_West_Sel",
  193. "Flow_Phi_Flat_West_Sel",
  194. "Flow_Phi_FarWest_Sel",
  195. "Flow_Phi_Flat_FarWest_Sel",
  196. "Flow_Mul_Sel",
  197. "Flow_Yield2D_Sel",
  198. "Flow_Yield.Eta_Sel",
  199. "Flow_Yield.Pt_Sel",
  200. "Flow_Psi_Subs",
  201. "Flow_Psi_Sel",
  202. "Flow_PhiLab_Sel",
  203. "Flow_Psi_Diff_Sel",
  204. "Flow_Psi_Sub_Corr_Sel",
  205. "Flow_Psi_Sub_Corr_Diff_Sel",
  206. "Flow_Phi_Corr_Sel",
  207. "Flow_vObs2D_Sel",
  208. "Flow_vObsEta_Sel",
  209. "Flow_vObsPt_Sel",
  210. "Flow_v2D_Sel",
  211. "Flow_vEta_Sel",
  212. "Flow_vPt_Sel",
  213. "Flow_q_Sel",
  214. "FlowLYZ_vEta_Sel",
  215. "FlowLYZ_vPt_Sel",
  216. "Flow_vObs2D_ScalarProd_Sel",
  217. "Flow_v2D_ScalarProd_Sel",
  218. "Flow_vEta_ScalarProd_Sel",
  219. "Flow_vPt_ScalarProd_Sel"
  220. };
  221. const char* baseName3[] = { // for reCent
  222. "Flow_Res_Sel",
  223. "Flow_Trigger",
  224. "Flow_VertexZ",
  225. "Flow_VertexXY2D",
  226. "Flow_EtaSymVerZ2D_Tpc",
  227. "Flow_EtaSym_Tpc",
  228. "Flow_EtaSymVerZ2D_Ftpc",
  229. "Flow_EtaSym_Ftpc",
  230. "Flow_CTBvsZDC2D",
  231. "Flow_Cent",
  232. "Flow_Mult",
  233. "Flow_OrigMult",
  234. "Flow_MultOverOrig",
  235. "Flow_MultEta",
  236. "Flow_MultPart",
  237. "Flow_Charge_Ftpc",
  238. "Flow_DcaGlobal_Tpc",
  239. "Flow_DcaGlobal_Ftpc",
  240. "Flow_Dca_Tpc",
  241. "Flow_Dca_Ftpc",
  242. "Flow_Chi2_Tpc",
  243. "Flow_Chi2_Ftpc",
  244. "Flow_FitPts_Tpc",
  245. "Flow_MaxPts_Tpc",
  246. "Flow_FitOverMax_Tpc",
  247. "Flow_FitPts_Ftpc",
  248. "Flow_MaxPts_Ftpc",
  249. "Flow_FitOverMax_Ftpc",
  250. //"Flow_EtaPtPhi3D",
  251. "Flow_EtaPtPhi2D.PhiEta",
  252. "Flow_EtaPtPhi2D.PhiPt",
  253. "Flow_YieldAll2D",
  254. "Flow_YieldAll.Eta",
  255. "Flow_YieldAll.Pt",
  256. "Flow_YieldPart2D",
  257. "Flow_YieldPart.Eta",
  258. "Flow_YieldPart.Pt",
  259. //"Flow_Bin_Eta",
  260. //"Flow_Bin_Pt",
  261. "Flow_MeanDedxPos2D",
  262. "Flow_MeanDedxNeg2D",
  263. // "Flow_PidPiPlusPart",
  264. // "Flow_PidPiMinusPart",
  265. // "Flow_PidProtonPart",
  266. // "Flow_PidAntiProtonPart",
  267. // "Flow_PidKplusPart",
  268. // "Flow_PidKminusPart",
  269. // "Flow_PidDeuteronPart",
  270. // "Flow_PidAntiDeuteronPart",
  271. // "Flow_PidElectronPart",
  272. // "Flow_PidPositronPart",
  273. "Flow_PidMult",
  274. "Flow_Mul_Sel", // first multi graph hist
  275. "Flow_Yield2D_Sel",
  276. "Flow_Yield.Eta_Sel",
  277. "Flow_Yield.Pt_Sel",
  278. "Flow_Psi_Subs",
  279. "Flow_Psi_Sel",
  280. "Flow_PhiLab_Sel",
  281. "Flow_Psi_Diff_Sel",
  282. "Flow_Psi_Sub_Corr_Sel",
  283. "Flow_Psi_Sub_Corr_Diff_Sel",
  284. "Flow_Phi_Corr_Sel",
  285. "Flow_QXY2D_Sel",
  286. "Flow_QFTPCSubXY2D_Sel",
  287. "Flow_QTPCSubXY2D_Sel",
  288. "Flow_vObs2D_Sel",
  289. "Flow_vObsEta_Sel",
  290. "Flow_vObsPt_Sel",
  291. "Flow_v2D_Sel",
  292. "Flow_vEta_Sel",
  293. "Flow_vPt_Sel",
  294. "Flow_q_Sel",
  295. "FlowLYZ_vEta_Sel",
  296. "FlowLYZ_vPt_Sel",
  297. "Flow_vObs2D_ScalarProd_Sel",
  298. "Flow_v2D_ScalarProd_Sel",
  299. "Flow_vEta_ScalarProd_Sel",
  300. "Flow_vPt_ScalarProd_Sel"
  301. };
  302. const Int_t firstMultFtpc = 38; // these must be set by hand
  303. const Int_t firstMultTpc = 27;
  304. Int_t nSingles;
  305. Int_t nName;
  306. if (reCent) {
  307. nName = sizeof(baseName3) / sizeof(char*);
  308. nSingles = firstMultFtpc + 1;
  309. } else if (includeFtpc) {
  310. nName = sizeof(baseName1) / sizeof(char*);
  311. nSingles = firstMultFtpc + 1;
  312. } else {
  313. nName = sizeof(baseName2) / sizeof(char*);
  314. nSingles = firstMultTpc + 1;
  315. }
  316. const Int_t nNames = nName;
  317. // construct arrays of base and short names
  318. char* baseName[nNames];
  319. char* shortName[nNames];
  320. for (int n = 0; n < nNames; n++) {
  321. baseName[n] = new char[35];
  322. shortName[n] = new char[35];
  323. float etaMax;
  324. if (reCent) {
  325. strcpy(baseName[n], baseName3[n]);
  326. etaMax = 4.5;
  327. } else if (includeFtpc) {
  328. strcpy(baseName[n], baseName1[n]);
  329. etaMax = 4.5;
  330. } else {
  331. strcpy(baseName[n], baseName2[n]);
  332. etaMax = 1.5;
  333. }
  334. strcpy(shortName[n], baseName[n]);
  335. char* cp = strstr(shortName[n],"_Sel");
  336. if (cp) *cp = '\0'; // truncate
  337. }
  338. // input the run number
  339. if (runNumber == 0) {
  340. cout << " run number? ";
  341. fgets(runNo, sizeof(runNo), stdin);
  342. runNumber = atoi(runNo);
  343. sprintf(runName, "ana%2d", runNumber); // add ana prefix
  344. cout << " run name = " << runName << endl;
  345. }
  346. // input the file number (0 opens flow.hist.root)
  347. if (strstr(fileNumber, "x")!=0) {
  348. cout << " anaXX.root file number? [0= flow.hist.root] ";
  349. fgets(fileNumber, sizeof(fileNumber), stdin);
  350. fileNumber[strlen(fileNumber)-1] = '\0';
  351. if (strlen(fileNumber) == 1 && strstr(fileNumber,"0")) {
  352. sprintf(fileName, "flow.hist.root");
  353. } else {
  354. sprintf(fileName, "ana%s.root", fileNumber); // insert
  355. }
  356. cout << " file name = " << fileName << endl;
  357. histFile = new TFile(fileName);
  358. }
  359. // input the page number
  360. while (pageNumber <= 1 || pageNumber > nNames) {
  361. if (pageNumber < 0) { // plot all
  362. plotAll(nNames, selN, harN, -pageNumber);
  363. return can;
  364. }
  365. if (pageNumber == 1) { // plot resolution
  366. can = plotResolution();
  367. return can;
  368. }
  369. cout << "-1: \t All" << endl; // print menu
  370. for (int i = 0; i < nNames; i++) {
  371. cout << i+1 << ":\t " << shortName[i] << endl;
  372. }
  373. cout << " page number? ";
  374. fgets(tmp, sizeof(tmp), stdin);
  375. pageNumber = atoi(tmp);
  376. }
  377. if (pageNumber > 0 && pageNumber <= nSingles) { // plot singles
  378. singleGraph = kTRUE;
  379. multiGraph = kFALSE;
  380. }
  381. pageNumber--;
  382. cout << pageNumber+1 << ": graph name= " << shortName[pageNumber] << endl;
  383. // set constants
  384. float twopi = 2. * TMath::Pi();
  385. float phiMax = twopi;
  386. float Ycm = 0.0;
  387. TString* histProjName = NULL;
  388. // set row and column numbers
  389. char* cp = strstr(shortName[pageNumber],"Subs");
  390. int columns = (cp) ? nSubs * nSels : nSels;
  391. int rows;
  392. rows = (strstr(shortName[pageNumber],"Phi_") ||
  393. strstr(shortName[pageNumber],"Psi_Diff") ? 2 : nHars);
  394. //rows = (strstr(shortName[pageNumber],"Phi_") ? 2 : nHars);
  395. if (strcmp(shortName[pageNumber],"Flow_Phi_Corr")==0) rows = nHars;
  396. if (strcmp(shortName[pageNumber],"Flow_Psi_Sub_Corr_Diff")==0) rows = 3;
  397. int pads = rows*columns;
  398. cout << "pads = " << pads << endl;
  399. // make the graph page
  400. if (multiGraph) {
  401. int canvasWidth = 600, canvasHeight = 780; // portrait
  402. } else {
  403. int canvasWidth = 780, canvasHeight = 600; // landscape
  404. }
  405. TString* canName = new TString(shortName[pageNumber]);
  406. if (runNumber) {
  407. *canName += runNumber;
  408. }
  409. cout << canName->Data() << endl;
  410. can = new TCanvas(canName->Data(), canName->Data(), canvasWidth, canvasHeight);
  411. can->ToggleEventStatus();
  412. if (multiGraph) {
  413. TPaveLabel* title = new TPaveLabel(0.1,0.96,0.9,0.99,shortName[pageNumber]);
  414. title->Draw();
  415. }
  416. TPaveLabel* run = new TPaveLabel(0.1,0.01,0.2,0.03,runName);
  417. run->Draw();
  418. TDatime now;
  419. TPaveLabel* date = new TPaveLabel(0.7,0.01,0.9,0.03,now.AsString());
  420. date->Draw();
  421. TPad* graphPad = new TPad("Graphs","Graphs",0.01,0.05,0.97,0.95);
  422. graphPad->Draw();
  423. graphPad->cd();
  424. if (multiGraph) { // many graphs on one page
  425. graphPad->Divide(columns,rows);
  426. int firstK = 0, firstJ = 0, lastK = columns, lastJ = rows;
  427. } else if (singleGraph) { // single graph on a page
  428. int firstK = 0, firstJ = 0, lastK = 1, lastJ = 1;
  429. } else { // one graph from a multi graph page
  430. int firstK = selN -1, firstJ = harN -1, lastK = selN, lastJ = harN;
  431. }
  432. TLine* lineZeroY = new TLine(-etaMax, 0., etaMax, 0.);
  433. TLine* lineYcm = new TLine(Ycm, -10., Ycm, 10.);
  434. TLine* lineOnePhi = new TLine(0., 1., phiMax, 1.);
  435. for (int j = firstJ; j < lastJ; j++) {
  436. float order = (float)(j+1);
  437. for (int k = firstK ; k < lastK; k++) {
  438. int padN = j*columns + k + 1; // pad number
  439. // construct histName and histProjName
  440. char* temp = new char[35];
  441. strcpy(temp,shortName[pageNumber]);
  442. char* cproj = strstr(temp,".");
  443. if (cproj) { // a projection
  444. *cproj = '\0'; // remove from "." on
  445. if (singleGraph) {
  446. cproj = strstr(temp,"2");
  447. if (cproj) { // a 2D projection
  448. *cproj = '\0'; // remove from "2D" on
  449. strcat(temp,"3D");
  450. } else {
  451. strcat(temp,"2D");
  452. }
  453. } else {
  454. strcat(temp,"2D_Sel");
  455. }
  456. TString* histName = new TString(temp);
  457. histProjName = new TString(baseName[pageNumber]);
  458. if (!singleGraph) {
  459. *histProjName += k+1;
  460. histProjName->Append("_Har");
  461. *histProjName += j+1;
  462. }
  463. } else { // not projection
  464. TString* histName = new TString(baseName[pageNumber]);
  465. }
  466. if (!singleGraph) {
  467. *histName += k+1;
  468. histName->Append("_Har");
  469. *histName += j+1;
  470. }
  471. cout << " col= " << k+1 << " row= " << order << " pad= " << padN << "\t"
  472. << histName->Data() << endl;
  473. // get the histogram
  474. bool twoD = kFALSE;
  475. bool threeD = kFALSE;
  476. if (histProjName) {
  477. if (strstr(temp,"3D")) { // 2D projection
  478. twoD = kTRUE;
  479. TH3* hist3D = dynamic_cast<TH3*>(histFile->Get(histName->Data()));
  480. if (!hist3D) {
  481. cout << "### Can't find histogram " << histName->Data() << endl;
  482. return can;
  483. }
  484. } else { // 1D projection
  485. TH2* hist2D = dynamic_cast<TH2*>(histFile->Get(histName->Data()));
  486. if (!hist2D) {
  487. cout << "### Can't find histogram " << histName->Data() << endl;
  488. return can;
  489. }
  490. }
  491. } else {
  492. if (strstr(shortName[pageNumber],"3D")!=0) { // 3D
  493. threeD = kTRUE;
  494. TH3* hist3D = dynamic_cast<TH3*>(histFile->Get(histName->Data()));
  495. if (!hist3D) {
  496. cout << "### Can't find histogram " << histName->Data() << endl;
  497. return can;
  498. }
  499. } else if (strstr(shortName[pageNumber],"2D")!=0) { // 2D
  500. twoD = kTRUE;
  501. TH2* hist2D = dynamic_cast<TH2*>(histFile->Get(histName->Data()));
  502. if (!hist2D) {
  503. cout << "### Can't find histogram " << histName->Data() << endl;
  504. return can;
  505. }
  506. } else { // 1D
  507. TH1* hist = dynamic_cast<TH1*>(histFile->Get(histName->Data()));
  508. if (!hist) {
  509. cout << "### Can't find histogram " << histName->Data() << endl;
  510. return can;
  511. }
  512. float max = hist->GetXaxis()->GetXmax();
  513. }
  514. }
  515. // make the plots
  516. if (multiGraph) graphPad->cd(padN);
  517. if (threeD) { // 3D
  518. gStyle->SetOptStat(10);
  519. hist3D->Draw("BOX");
  520. } else if (twoD) { // 2D
  521. if (strstr(shortName[pageNumber],".PhiEta")!=0) { // 3D Phi Eta proj.
  522. TH2D* projZX = hist3D->Project3D("zx");
  523. projZX->SetName(histProjName->Data());
  524. projZX->SetYTitle("azimuthal angle (rad)");
  525. projZX->SetXTitle("rapidity");
  526. gStyle->SetOptStat(0);
  527. if (projZX) projZX->Draw("COLZ");
  528. } else if (strstr(shortName[pageNumber],".PhiPt")!=0) { // 3D Phi Pt proj.
  529. TH2D* projZY = hist3D->Project3D("zy");
  530. projZY->SetName(histProjName->Data());
  531. projZY->SetYTitle("azimuthal angle (rad");
  532. projZY->SetXTitle("Pt (GeV/c)");
  533. gStyle->SetOptStat(0);
  534. if (projZY) projZY->Draw("COLZ");
  535. } else if ((strstr(shortName[pageNumber],"QXY")!=0)) { // Q XY
  536. TLine* lineZeroX = new TLine(-0.5, 0., 0.5, 0.);
  537. TLine* lineZeroY = new TLine(0., -0.5, 0., 0.5);
  538. gStyle->SetOptStat(100110);
  539. hist2D->Draw("COLZ");
  540. //hist2D->Draw("CONT");
  541. lineZeroX->Draw();
  542. lineZeroY->Draw();
  543. } else if ((strstr(shortName[pageNumber],"TPCSubXY")!=0)) { // QSub XY
  544. TLine* lineZeroX = new TLine(-1., 0., 1., 0.);
  545. TLine* lineZeroY = new TLine(0., -1., 0., 1.);
  546. gStyle->SetOptStat(100110);
  547. hist2D->Draw("COLZ");
  548. //hist2D->Draw("CONT");
  549. lineZeroX->Draw();
  550. lineZeroY->Draw();
  551. } else if (strstr(shortName[pageNumber],"XY")!=0) { // Vertex XY
  552. TLine* lineZeroX = new TLine(-1., 0., 1., 0.);
  553. TLine* lineZeroY = new TLine(0., -1., 0., 1.);
  554. gStyle->SetOptStat(10);
  555. hist2D->Draw("COLZ");
  556. lineZeroX->Draw();
  557. lineZeroY->Draw();
  558. } else if (strstr(shortName[pageNumber],"Dedx")!=0) { // dE/dx
  559. TVirtualPad::Pad()->SetLogz();
  560. gStyle->SetOptStat(10);
  561. hist2D->Draw("COLZ");
  562. } else if (strstr(shortName[pageNumber],"_v")!=0) { // v
  563. hist2D->SetMaximum(20.);
  564. hist2D->SetMinimum(-20.);
  565. gStyle->SetOptStat(0);
  566. hist2D->Draw("COLZ");
  567. } else { // other 2D
  568. gStyle->SetOptStat(10);
  569. hist2D->Draw("COLZ");
  570. }
  571. } else if (strstr(shortName[pageNumber],".Eta")!=0) { // 2D Eta projection
  572. if (singleGraph) {
  573. TH1D* projX = hist2D->ProjectionX(histName->Data());
  574. } else {
  575. //TH1D* projX = hist2D->ProjectionX(histName->Data(), -1, 9999, "E");
  576. TH1D* projX = hist2D->ProjectionX(histName->Data());
  577. }
  578. projX->SetName(histProjName->Data());
  579. char* xTitle = hist2D->GetXaxis()->GetTitle();
  580. projX->SetXTitle(xTitle);
  581. projX->SetYTitle("Counts");
  582. gStyle->SetOptStat(0);
  583. if (projX) projX->Draw("H");
  584. if (!singleGraph) lineZeroY->Draw();
  585. } else if (strstr(shortName[pageNumber],".Pt")!=0) { // 2D Pt projection
  586. if (singleGraph) {
  587. TH1D* projY = hist2D->ProjectionY(histName->Data());
  588. } else {
  589. TH1D* projY = hist2D->ProjectionY(histName->Data(), -1, 9999, "E");
  590. }
  591. projY->SetName(histProjName->Data());
  592. projY->SetXTitle("Pt (GeV/c)");
  593. projY->SetYTitle("Counts");
  594. TVirtualPad::Pad()->SetLogy();
  595. gStyle->SetOptStat(0);
  596. if (projY) projY->Draw("H");
  597. } else if (strstr(shortName[pageNumber],".Phi")!=0) { // 2D Phi projection
  598. if (singleGraph) {
  599. TH1D* projY = hist2D->ProjectionY(histName->Data());
  600. } else {
  601. TH1D* projY = hist2D->ProjectionY(histName->Data(), -1, 9999, "E");
  602. }
  603. projY->SetName(histProjName->Data());
  604. projY->SetXTitle("azimuthal angle (rad");
  605. projY->SetYTitle("Counts");
  606. gStyle->SetOptStat(0);
  607. if (projY) projY->Draw("H");
  608. } else if (strstr(shortName[pageNumber],"Corr")!=0) { // azimuthal corr.
  609. float norm = (hist->Integral()) ? ((float)(hist->GetNbinsX()) / hist->Integral()) : 1.;
  610. cout << " Normalized by: " << norm << endl;
  611. hist->Scale(norm); // normalize height to one
  612. if (strstr(shortName[pageNumber],"Diff")!=0) {
  613. TF1* funcCos1 = new TF1("funcCos1",
  614. "1+[0]*2/100*cos([1]*x)", 0., twopi);
  615. funcCos1->SetParNames("k=1", "har");
  616. funcCos1->SetParameters(0, order+1); // initial values
  617. funcCos1->SetParLimits(1, 1, 1); // har is fixed
  618. //hist->Fit("funcCos1");
  619. delete funcCos1;
  620. } else if (strstr(shortName[pageNumber],"Sub")!=0) {
  621. TF1* funcSubCorr = new TF1("SubCorr", SubCorr, 0., twopi/order, 2);
  622. funcSubCorr->SetParNames("chi", "har");
  623. funcSubCorr->SetParameters(1., order); // initial value
  624. funcSubCorr->SetParLimits(1, 1, 1); // har is fixed
  625. hist->Fit("SubCorr");
  626. delete funcSubCorr;
  627. } else {
  628. TF1* funcCos3 = new TF1("funcCos3",
  629. "1+[0]*2/100*cos([3]*x)+[1]*2/100*cos(([3]+1)*x)+[2]*2/100*cos(([3]+2)*x)",
  630. 0., twopi/order);
  631. funcCos3->SetParNames("n=har", "n=har+1", "n=har+2", "har");
  632. funcCos3->SetParameters(0, 0, 0, order); // initial values
  633. funcCos3->SetParLimits(3, 1, 1); // har is fixed
  634. //hist->Fit("funcCos3");
  635. delete funcCos3;
  636. }
  637. if (strstr(shortName[pageNumber],"Phi")!=0)
  638. hist->SetMinimum(0.9*(hist->GetMinimum()));
  639. gStyle->SetOptStat(10);
  640. gStyle->SetOptFit(111);
  641. hist->Draw("E1");
  642. } else if (strstr(shortName[pageNumber],"_q")!=0) { // q distibution
  643. gStyle->SetOptStat(110);
  644. gStyle->SetOptFit(111);
  645. hist->Draw("E1");
  646. float n_qBins = (float)hist->GetNbinsX();
  647. double area = hist->Integral() * max / n_qBins;
  648. TString* histName = new TString("Flow_Mul_Sel");
  649. *histName += k+1;
  650. histName->Append("_Har");
  651. *histName += j+1;
  652. TH1* histMult = dynamic_cast<TH1*>(histFile->Get(histName->Data()));
  653. if (!histMult) {
  654. cout << "### Can't find histogram " << histName->Data() << endl;
  655. return can;
  656. }
  657. delete histName;
  658. float mult = histMult->GetMean();
  659. TF1* fit_q = new TF1("qDist", qDist, 0., max, 4);
  660. fit_q->SetParNames("v", "mult", "area", "g");
  661. float qMean = hist->GetMean();
  662. float vGuess = (qMean > 1.) ? sqrt(2.*(qMean - 1.) / mult) : 0.03;
  663. // the 0.03 is a wild guess
  664. vGuess *= 100.;
  665. cout << "vGuess = " << vGuess << endl;
  666. fit_q->SetParameters(vGuess, mult, area, 0.3); // initial values
  667. fit_q->SetParLimits(1, 1, 1); // mult is fixed
  668. fit_q->SetParLimits(2, 1, 1); // area is fixed
  669. hist->Fit("qDist", "Q");
  670. //hist->Fit("qDist");
  671. fit_q->Draw();
  672. fit_q->FixParameter(3, 0.); // g is fixed
  673. fit_q->SetLineStyle(kDotted);
  674. hist->Fit("qDist", "Q+");
  675. fit_q->Draw("same");
  676. fit_q->ReleaseParameter(3); // g is unfixed
  677. fit_q->SetParameter(3, 0.5); // initial value
  678. fit_q->FixParameter(0, 0.); // v is fixed
  679. fit_q->SetLineStyle(kDashed);
  680. hist->Fit("qDist", "Q+");
  681. fit_q->Draw("same");
  682. fit_q->ReleaseParameter(0); // v is unfixed
  683. } else if (strstr(shortName[pageNumber],"PhiLab")!=0) { // Phi lab distibution
  684. hist->Draw("E1");
  685. float norm = (hist->Integral()) ? ((float)(hist->GetNbinsX()) / hist->Integral()) : 1.;
  686. cout << " Normalized by: " << norm << endl;
  687. hist->Scale(norm); // normalize height to one
  688. hist->SetMinimum(0.);
  689. hist->SetMaximum(1.3);
  690. TF1* funcCosSin = new TF1("funcCosSin",
  691. "1.+[0]*2./100.*cos([2]*x)+[1]*2./100.*sin([2]*x)", 0., twopi);
  692. funcCosSin->SetParNames("100*cos", "100*sin", "har");
  693. funcCosSin->SetParameters(0, 0, order); // initial values
  694. funcCosSin->SetParLimits(2, 1, 1); // har is fixed
  695. hist->Fit("funcCosSin");
  696. delete funcCosSin;
  697. gStyle->SetOptFit(111);
  698. } else if (strstr(shortName[pageNumber],"Phi")!=0) { // other Phi distibutions
  699. //hist->SetMinimum(0.9*(hist->GetMinimum()));
  700. hist->SetMinimum(0.);
  701. gStyle->SetOptStat(10);
  702. hist->Draw();
  703. } else if (strstr(shortName[pageNumber],"Psi_Diff")!=0) { // Psi_Diff distibutions
  704. hist->Draw("E1");
  705. } else if (strstr(shortName[pageNumber],"Psi")!=0) { // Psi distibutions
  706. float norm = (hist->Integral()) ? ((float)(hist->GetNbinsX()) / hist->Integral()) : 1.;
  707. cout << " Normalized by: " << norm << endl;
  708. hist->Scale(norm); // normalize height to one
  709. hist->SetMinimum(0.);
  710. TF1* funcCosSin = new TF1("funcCosSin",
  711. "1.+[0]*2./100.*cos([2]*x)+[1]*2./100.*sin([2]*x)", 0., twopi/order);
  712. funcCosSin->SetParNames("100*cos", "100*sin", "har");
  713. funcCosSin->SetParameters(0, 0, order); // initial values
  714. funcCosSin->SetParLimits(2, 1, 1); // har is fixed
  715. hist->Fit("funcCosSin");
  716. delete funcCosSin;
  717. gStyle->SetOptFit(111);
  718. hist->Draw("E1");
  719. } else if (strstr(shortName[pageNumber],"Eta")!=0) { // Eta distibutions
  720. gStyle->SetOptStat(100110);
  721. if (strstr(shortName[pageNumber],"_v")!=0 ) {
  722. hist->SetMaximum(10.);
  723. hist->SetMinimum(-10.);
  724. hist->Draw();
  725. lineYcm->Draw();
  726. } else {
  727. hist->Draw();
  728. }
  729. lineZeroY->Draw();
  730. } else if (strstr(shortName[pageNumber],"Pt")!=0) { // Pt distibutions
  731. if (strstr(shortName[pageNumber],"_v")!=0 ) {
  732. hist->SetMaximum(25.);
  733. hist->SetMinimum(-5.);
  734. }
  735. gStyle->SetOptStat(100110);
  736. hist->Draw();
  737. if (strstr(shortName[pageNumber],"v")!=0) {
  738. TLine* lineZeroPt = new TLine(0., 0., max, 0.);
  739. lineZeroPt->Draw();
  740. }
  741. } else if (strstr(shortName[pageNumber],"Bin")!=0) { // Bin hists
  742. if (strstr(shortName[pageNumber],"Pt")!=0) {
  743. TLine* lineDiagonal = new TLine(0., 0., max, max);
  744. } else {
  745. TLine* lineDiagonal = new TLine(-max, -max, max, max);
  746. }
  747. gStyle->SetOptStat(0);
  748. hist->SetMarkerStyle(21);
  749. hist->SetMarkerColor(2);
  750. hist->Draw();
  751. lineDiagonal->Draw();
  752. } else if (strstr(shortName[pageNumber],"PidMult")!=0) { // PID Mult
  753. TVirtualPad::Pad()->SetLogy();
  754. gStyle->SetOptStat(0);
  755. hist->Draw();
  756. } else { // all other 1D
  757. gStyle->SetOptStat(100110);
  758. hist->Draw();
  759. }
  760. delete [] temp;
  761. delete histName;
  762. if (histProjName) delete histProjName;
  763. }
  764. }
  765. delete [] shortName;
  766. return can;
  767. }
  768. // macro for the resolution plot
  769. TCanvas* plotResolution() {
  770. char* resName[] = {
  771. "Flow_Cos_Sel",
  772. "Flow_Res_Sel",
  773. "Flow_v_Sel"
  774. // "Flow_v_ScalarProd_Sel",
  775. // "Flow_Cumul_v_Order2_Sel",
  776. // "Flow_Cumul_v_Order4_Sel"
  777. };
  778. int columns = nSels;
  779. int rows = sizeof(resName) / sizeof(char*);
  780. int pads = rows*columns;
  781. // make the graph page
  782. can = new TCanvas(resName[1], resName[1], 600, 780);
  783. can->ToggleEventStatus();
  784. TPaveLabel* run = new TPaveLabel(0.1,0.01,0.2,0.03,runName);
  785. run->Draw();
  786. TDatime now;
  787. TPaveLabel* date = new TPaveLabel(0.7,0.01,0.9,0.03,now.AsString());
  788. date->Draw();
  789. TLine* lineZeroHar = new TLine(0.5, 0., nHars+0.5, 0.);
  790. TPad* graphPad = new TPad("Graphs","Graphs",0.01,0.05,0.97,0.99);
  791. graphPad->Draw();
  792. graphPad->cd();
  793. graphPad->Divide(columns,rows);
  794. // make the plots
  795. float v;
  796. float err;
  797. for (int j = 0; j < rows; j++) {
  798. int resNumber = j;
  799. cout << "resolution name= " << resName[resNumber] << endl;
  800. for (int k = 0; k < columns; k++) {
  801. int padN = j*columns + k +1;
  802. TString* histName = new TString(resName[resNumber]);
  803. *histName += k+1;
  804. cout << "row= " << j << " col= " << k << " pad= " << padN << "\t"
  805. << histName->Data() << endl;
  806. TH1* hist = dynamic_cast<TH1*>(histFile->Get(histName->Data()));
  807. if (!hist) {
  808. cout << "### Can't find histogram " << histName->Data() << endl;
  809. return can;
  810. }
  811. graphPad->cd(padN);
  812. gStyle->SetOptStat(0);
  813. if (strstr(resName[resNumber],"_v")!=0) {
  814. hist->SetMaximum(10.);
  815. hist->SetMinimum(-5.);
  816. } else {
  817. hist->SetMaximum(1.1);
  818. hist->SetMinimum(0.);
  819. }
  820. for (int n=1; n < nHars+1; n++) {
  821. v = hist->GetBinContent(n); // output v values
  822. err = hist->GetBinError(n);
  823. cout << " " << n << ": " << setprecision(3) << v << " +/- " << err << endl;
  824. if (TMath::IsNaN(v)) {
  825. hist->SetBinContent(n, 0.);
  826. hist->SetBinError(n, 0.);
  827. }
  828. }
  829. hist->Draw();
  830. lineZeroHar->Draw();
  831. delete histName;
  832. }
  833. }
  834. return can;
  835. }
  836. void plotAll(Int_t nNames, Int_t selN, Int_t harN, Int_t first = 1) {
  837. for (int i = first; i < nNames + 1; i++) {
  838. can = plot(i, selN, harN);
  839. can->Update();
  840. cout << "save? y/[n], quit? q" << endl;
  841. fgets(tmp, sizeof(tmp), stdin);
  842. if (strstr(tmp,"y")!=0) can->Print(".pdf");
  843. else if (strstr(tmp,"q")!=0) return;
  844. else if (strstr(tmp," ")!=0) continue;
  845. }
  846. cout << " plotAll Done" << endl;
  847. }
  848. //-----------------------------------------------------------------------
  849. static Double_t qDist(double* q, double* par) {
  850. // Calculates the q distribution given the parameters v, mult, area, g
  851. double sig2 = 0.5 * (1. + par[3]);
  852. double expo = (par[1]*par[0]*par[0]/10000. + q[0]*q[0]) / (2*sig2);
  853. Double_t dNdq = par[2] * (q[0]*exp(-expo)/sig2) *
  854. TMath::BesselI0(q[0]*par[0]/100.*sqrt(par[1])/sig2);
  855. return dNdq;
  856. }
  857. //-----------------------------------------------------------------------
  858. static Double_t SubCorr(double* x, double* par) {
  859. // Calculates the n(Psi_a - Psi_b) distribution by fitting chi
  860. // From J.-Y. Ollitrault, Nucl. Phys. A590, 561c (1995), Eq. 6. with correc.
  861. double chi2 = par[0] * par[0] / 2; // divide by two for SV chi
  862. double z = chi2 * cos(par[1]*x[0]);
  863. double TwoOverPi = 2./TMath::Pi();
  864. Double_t dNdPsi = exp(-chi2)/TwoOverPi * (TwoOverPi*(1.+chi2)
  865. + z*(TMath::BesselI0(z) + TMath::StruveL0(z))
  866. + chi2*(TMath::BesselI1(z) + TMath::StruveL1(z)));
  867. return dNdPsi;
  868. }
  869. ///////////////////////////////////////////////////////////////////////////////
  870. //
  871. // $Log: plot.C,v $
  872. // Revision 1.70 2011/07/25 15:54:53 posk
  873. // Added correction for non-flatness of event plane.
  874. //
  875. // Revision 1.69 2011/03/10 18:56:39 posk
  876. // Added histogram for laboratory azimuthal distribution of particles.
  877. //
  878. // Revision 1.68 2010/09/30 19:28:23 posk
  879. // Instead of reversing the weight for negative pseudrapidity for odd harmonics,
  880. // it is now done only for the first harmonic.
  881. // Recentering is now done for all harmonics.
  882. //
  883. // Revision 1.67 2010/03/05 17:04:38 posk
  884. // ROOT 5.22 compatable.
  885. // Moved doFlowEvents.C here from StRoot/macros/analysis/
  886. //
  887. // Revision 1.66 2009/11/24 19:29:19 posk
  888. // Added reCenter to remove acceptance correlations as an option instead of phiWgt.
  889. //
  890. // Revision 1.65 2006/02/22 19:35:18 posk
  891. // Added graphs for the StFlowLeeYangZerosMaker
  892. //
  893. // Revision 1.64 2005/08/26 19:00:25 posk
  894. // plot style back to bold
  895. //
  896. // Revision 1.63 2005/08/05 20:13:43 posk
  897. // Improved first guess for qDist fit.
  898. //
  899. // Revision 1.62 2004/12/09 23:47:11 posk
  900. // Minor changes in code formatting.
  901. // Added hist for TPC primary dca to AnalysisMaker.
  902. //
  903. // Revision 1.61 2004/12/07 23:10:23 posk
  904. // Only odd and even phiWgt hists. If the old phiWgt file contains more than
  905. // two harmonics, only the first two are read. Now writes only the first two.
  906. //
  907. // Revision 1.60 2004/12/02 16:10:55 posk
  908. // Added gInterpreter->ProcessLine(".O0");
  909. //
  910. // Revision 1.59 2004/11/19 16:54:40 posk
  911. // Replaced gPad with (TVirtualPad::Pad()). Reverted to TMath::Struve functions.
  912. //
  913. // Revision 1.58 2004/11/11 18:25:43 posk
  914. // Minor updates.
  915. //
  916. // Revision 1.57 2004/03/11 18:00:05 posk
  917. // Added Random Subs analysis method.
  918. //
  919. // Revision 1.56 2004/03/01 22:43:43 posk
  920. // Changed some "->" to ".".
  921. //
  922. // Revision 1.55 2003/08/26 21:10:13 posk
  923. // Calculates v8 if nHars=8.
  924. //
  925. // Revision 1.54 2003/07/30 22:03:26 oldi
  926. // Fit("pol4") taken out (which was in accidentally).
  927. //
  928. // Revision 1.53 2003/07/07 21:58:21 posk
  929. // Made units of momentum GeV/c instead of GeV.
  930. //
  931. // Revision 1.52 2003/06/27 21:25:44 posk
  932. // v4 and v6 are with repect to the 2nd harmonic event plane.
  933. //
  934. // Revision 1.51 2003/05/06 21:33:07 posk
  935. // Removed some histograms.
  936. //
  937. // Revision 1.50 2003/05/02 21:11:13 posk
  938. // Reduced the number of harmonics from 3 to 2.
  939. //
  940. // Revision 1.49 2003/03/18 17:58:36 posk
  941. // Kirill Fillimonov's improved fit to the angle between subevent planes.
  942. //
  943. // Revision 1.48 2003/03/17 20:46:55 posk
  944. // Improved fit to q dist.
  945. //
  946. // Revision 1.47 2003/03/11 23:04:30 posk
  947. // Includes scalar product hists.
  948. //
  949. // Revision 1.46 2003/02/25 19:25:32 posk
  950. // Improved plotting.
  951. //
  952. // Revision 1.45 2003/02/05 18:52:50 posk
  953. // Added Bool_t includeFtpc
  954. //
  955. // Revision 1.44 2003/01/16 16:02:30 posk
  956. // Some plotting changes.
  957. //
  958. // Revision 1.43 2003/01/10 16:40:53 oldi
  959. // Several changes to comply with FTPC tracks:
  960. // - Switch to include/exclude FTPC tracks introduced.
  961. // The same switch changes the range of the eta histograms.
  962. // - Eta symmetry plots for FTPC tracks added and separated from TPC plots.
  963. // - PhiWgts and related histograms for FTPC tracks split in FarEast, East,
  964. // West, FarWest (depending on vertex.z()).
  965. // - Psi_Diff plots for 2 different selections and the first 2 harmonics added.
  966. // - Cut to exclude mu-events with no primary vertex introduced.
  967. // (This is possible for UPC events and FTPC tracks.)
  968. // - Global DCA cut for FTPC tracks added.
  969. // - Global DCA cuts for event plane selection separated for TPC and FTPC tracks.
  970. // - Charge cut for FTPC tracks added.
  971. //
  972. // Revision 1.42 2002/11/26 22:11:54 posk
  973. // First use of doxygen.
  974. //
  975. // Revision 1.41 2002/06/11 21:54:16 posk
  976. // Kirill's further correction to minBias.C for bins with one count.
  977. //
  978. // Revision 1.40 2002/05/21 18:42:18 posk
  979. // Kirill's correction to minBias.C for bins with one count.
  980. //
  981. // Revision 1.39 2002/02/13 22:31:50 posk
  982. // Pt Weight now also weights Phi Weight. Added Eta Weught, default=FALSE.
  983. //
  984. // Revision 1.38 2002/01/14 23:42:57 posk
  985. // Renamed ScalerProd histograms. Moved print commands to FlowMaker::Finish().
  986. //
  987. // Revision 1.37 2001/12/18 19:27:37 posk
  988. // "proton" and "antiproton" replaced by "pr+" and "pr-".
  989. //
  990. // Revision 1.36 2001/12/11 22:04:13 posk
  991. // Four sets of phiWgt histograms.
  992. // StFlowMaker StFlowEvent::PhiWeight() changes.
  993. // Cumulant histogram names changed.
  994. //
  995. // Revision 1.35 2001/11/13 22:47:35 posk
  996. // Documentation updated. Fit to q function moved to macro.
  997. //
  998. // Revision 1.34 2001/11/09 21:15:04 posk
  999. // Switched from CERNLIB to TMath. Using global dca instead of dca.
  1000. //
  1001. // Revision 1.33 2001/05/22 20:11:20 posk
  1002. // Changed dEdx graphs.
  1003. //
  1004. // Revision 1.32 2000/12/12 15:01:11 posk
  1005. // Put log comments at end of file.
  1006. //
  1007. // Revision 1.31 2000/12/08 17:04:09 oldi
  1008. // Phi weights for both FTPCs included.
  1009. //
  1010. // Revision 1.27 2000/09/26 20:54:12 posk
  1011. // Updated documentation.
  1012. //
  1013. // Revision 1.26 2000/09/15 22:52:56 posk
  1014. // Added Pt weighting for event plane calculation.
  1015. //
  1016. // Revision 1.25 2000/08/31 18:50:32 posk
  1017. // Added plotCen.C to plot from a series of files with different centralities.
  1018. //
  1019. // Revision 1.24 2000/08/12 20:20:15 posk
  1020. // More centrality bins.
  1021. //
  1022. // Revision 1.23 2000/08/01 21:51:20 posk
  1023. // Added doubly integrated v.
  1024. //
  1025. // Revision 1.22 2000/07/12 17:49:39 posk
  1026. // Changed EtaSym plots.
  1027. //
  1028. // Revision 1.21 2000/06/30 14:51:20 posk
  1029. // Using MessageMgr. Added graph for Eta Symmetry vs. Vertex Z.
  1030. //
  1031. // Revision 1.20 2000/05/26 21:25:23 posk
  1032. // Use TProfile2D class and profile projection methods.
  1033. // Correction needed for >2 subevents.
  1034. //
  1035. // Revision 1.18 2000/04/13 22:34:16 posk
  1036. // Resolution correction is now made.
  1037. //
  1038. // Revision 1.17 2000/04/10 18:49:10 posk
  1039. // Asks for the histogram file number.
  1040. //
  1041. // Revision 1.16 2000/03/28 23:25:37 posk
  1042. // Allow multiple instances.
  1043. //
  1044. // Revision 1.15 2000/03/21 00:24:45 posk
  1045. // Added GetCVS and changed some plot names.
  1046. //
  1047. // Revision 1.12 2000/02/18 23:44:54 posk
  1048. // Added PID and centrality.
  1049. //
  1050. // Revision 1.11 2000/02/04 16:26:43 posk
  1051. // Added correct calculation of event plane resolution for large flow.
  1052. //
  1053. // Revision 1.2 1999/10/05 16:54:14 posk
  1054. // Added getPhiWeight method for making the event plane isotropic.
  1055. //
  1056. ///////////////////////////////////////////////////////////////////////////////