main.cpp 67 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268
  1. #include <iostream>
  2. #include <vector>
  3. #include <TString.h>
  4. #include <TH1D.h>
  5. #include <TH1I.h>
  6. #include <TH2D.h>
  7. #include <TProfile.h>
  8. #include <TProfile2D.h>
  9. // #include <TProfile3D.h>
  10. #include <TFile.h>
  11. #include <TStopwatch.h>
  12. #include <qaParticle.h>
  13. #include <qaParticleLight.h>
  14. #include <qaEvent.h>
  15. #include <qaReader_manager.h>
  16. #include <qaReader_smash_root.h>
  17. #include <qaReader_mcpico.h>
  18. #include <Utility.h>
  19. #ifdef _MCINI_
  20. #include <qaReader_mcini.h>
  21. #endif
  22. #ifdef _PHQMD_
  23. #include <qaReader_phqmd.h>
  24. #endif
  25. #ifdef _HSD_ROOT_
  26. #include <qaReader_hsd_root.h>
  27. #endif
  28. int main(int argc, char **argv)
  29. {
  30. TString iFileName, oFileName, configFileName = "";
  31. if (argc < 7)
  32. {
  33. std::cerr << "./qaProcess -i input.list -o qa_output.root -format [FORMAT] [OPTIONAL: -config qa.cfg]" << std::endl;
  34. std::cerr << "Available formats:" << std::endl;
  35. std::cerr << "\tmcpico - simple custom ROOT format to store model data" << std::endl;
  36. std::cerr << "\tparticle - ROOT format that is used by the SMASH model" << std::endl;
  37. #ifdef _MCINI_
  38. std::cerr << "\tmcini - custom ROOT format to store both initial state and final state (UniGen data format) model data" << std::endl;
  39. #endif
  40. #ifdef _PHQMD_
  41. std::cerr << "\tphqmd - custom ROOT format to store PHQMD (with MST) model data" << std::endl;
  42. #endif
  43. #ifdef _HSD_ROOT_
  44. std::cerr << "\thsd - custom ROOT format to store HSD model data" << std::endl;
  45. #endif
  46. return 1;
  47. }
  48. for (int i = 1; i < argc; i++)
  49. {
  50. if (std::string(argv[i]) != "-i" &&
  51. std::string(argv[i]) != "-o" &&
  52. std::string(argv[i]) != "-format" &&
  53. std::string(argv[i]) != "-config")
  54. {
  55. std::cerr << "\n[ERROR]: Unknown parameter " << i << ": " << argv[i] << std::endl;
  56. return 2;
  57. }
  58. else
  59. {
  60. if (std::string(argv[i]) == "-i" && i != argc - 1)
  61. {
  62. iFileName = argv[++i];
  63. continue;
  64. }
  65. if (std::string(argv[i]) == "-i" && i == argc - 1)
  66. {
  67. std::cerr << "\n[ERROR]: Input file name was not specified " << std::endl;
  68. return 1;
  69. }
  70. if (std::string(argv[i]) == "-o" && i != argc - 1)
  71. {
  72. oFileName = argv[++i];
  73. continue;
  74. }
  75. if (std::string(argv[i]) == "-o" && i == argc - 1)
  76. {
  77. std::cerr << "\n[ERROR]: Output file name was not specified " << std::endl;
  78. return 1;
  79. }
  80. if (std::string(argv[i]) == "-format" && i != argc - 1)
  81. {
  82. qaUtility::GetInstance()->format = argv[++i];
  83. continue;
  84. }
  85. if (std::string(argv[i]) == "-format" && i == argc - 1)
  86. {
  87. std::cerr << "\n[ERROR]: Output file name was not specified " << std::endl;
  88. return 1;
  89. }
  90. if (std::string(argv[i]) == "-config" && i != argc - 1)
  91. {
  92. configFileName = argv[++i];
  93. continue;
  94. }
  95. if (std::string(argv[i]) == "-config" && i == argc - 1)
  96. {
  97. std::cerr << "\n[ERROR]: Output file name was not specified " << std::endl;
  98. return 1;
  99. }
  100. }
  101. }
  102. TStopwatch timer;
  103. timer.Start();
  104. Bool_t IsRead = true;
  105. if (configFileName.Length() > 0)
  106. {
  107. IsRead = qaUtility::GetInstance()->ReadConfig(configFileName);
  108. }
  109. if (!IsRead)
  110. {
  111. std::cerr << "Error while reading config file. Exiting..." << std::endl;
  112. return 2;
  113. }
  114. if (qaUtility::GetInstance()->debug)
  115. {
  116. std::cout << "Format = " << qaUtility::GetInstance()->format << std::endl;
  117. std::cout << "Configuration:" << std::endl;
  118. std::cout << "debug = " << qaUtility::GetInstance()->debug << std::endl;
  119. std::cout << "Nevents = " << qaUtility::GetInstance()->Nevents << std::endl;
  120. if (qaUtility::GetInstance()->Is_minbias)
  121. {
  122. std::cout << "Is_minbias = " << qaUtility::GetInstance()->Is_minbias << std::endl;
  123. std::cout << "Cut_minbias_Event_bmin = " << qaUtility::GetInstance()->Cut_minbias_Event_bmin << std::endl;
  124. std::cout << "Cut_minbias_Event_bmax = " << qaUtility::GetInstance()->Cut_minbias_Event_bmax << std::endl;
  125. std::cout << "Cut_minbias_Particle_ptmin = " << qaUtility::GetInstance()->Cut_minbias_Particle_ptmin << std::endl;
  126. std::cout << "Cut_minbias_Particle_ptmax = " << qaUtility::GetInstance()->Cut_minbias_Particle_ptmax << std::endl;
  127. std::cout << "Cut_minbias_Particle_etamin = " << qaUtility::GetInstance()->Cut_minbias_Particle_etamin << std::endl;
  128. std::cout << "Cut_minbias_Particle_etamax = " << qaUtility::GetInstance()->Cut_minbias_Particle_etamax << std::endl;
  129. std::cout << "Cut_minbias_Particle_ymin = " << qaUtility::GetInstance()->Cut_minbias_Particle_ymin << std::endl;
  130. std::cout << "Cut_minbias_Particle_ymax = " << qaUtility::GetInstance()->Cut_minbias_Particle_ymax << std::endl;
  131. }
  132. if (qaUtility::GetInstance()->Is_refmult)
  133. {
  134. std::cout << "Is_refmult = " << qaUtility::GetInstance()->Is_refmult << std::endl;
  135. std::cout << "Cut_refmult_Event_bmin = " << qaUtility::GetInstance()->Cut_refmult_Event_bmin << std::endl;
  136. std::cout << "Cut_refmult_Event_bmax = " << qaUtility::GetInstance()->Cut_refmult_Event_bmax << std::endl;
  137. std::cout << "Cut_refmult_Particle_ptmin = " << qaUtility::GetInstance()->Cut_refmult_Particle_ptmin << std::endl;
  138. std::cout << "Cut_refmult_Particle_ptmax = " << qaUtility::GetInstance()->Cut_refmult_Particle_ptmax << std::endl;
  139. std::cout << "Cut_refmult_Particle_etamin = " << qaUtility::GetInstance()->Cut_refmult_Particle_etamin << std::endl;
  140. std::cout << "Cut_refmult_Particle_etamax = " << qaUtility::GetInstance()->Cut_refmult_Particle_etamax << std::endl;
  141. std::cout << "Cut_refmult_Particle_isCharged = " << qaUtility::GetInstance()->Cut_refmult_Particle_isCharged << std::endl;
  142. }
  143. if (qaUtility::GetInstance()->Is_v1)
  144. {
  145. std::cout << "Is_v1 = " << qaUtility::GetInstance()->Is_v1 << std::endl;
  146. std::cout << "Cut_v1_Event_bmin = " << qaUtility::GetInstance()->Cut_v1_Event_bmin << std::endl;
  147. std::cout << "Cut_v1_Event_bmax = " << qaUtility::GetInstance()->Cut_v1_Event_bmax << std::endl;
  148. std::cout << "Cut_v1_Event_bCent[" << qaUtility::GetInstance()->Cut_v1_Event_bCent.size() << "] = {";
  149. for (int i = 0; i < (int)qaUtility::GetInstance()->Cut_v1_Event_bCent.size(); i++)
  150. {
  151. std::cout << qaUtility::GetInstance()->Cut_v1_Event_bCent.at(i);
  152. if (i != (int)qaUtility::GetInstance()->Cut_v1_Event_bCent.size() - 1)
  153. std::cout << ", ";
  154. else
  155. std::cout << "};" << std::endl;
  156. }
  157. std::cout << "Cut_v1_Event_mCent[" << qaUtility::GetInstance()->Cut_v1_Event_mCent.size() << "] = {";
  158. for (int i = 0; i < (int)qaUtility::GetInstance()->Cut_v1_Event_mCent.size(); i++)
  159. {
  160. std::cout << (int)qaUtility::GetInstance()->Cut_v1_Event_mCent.at(i);
  161. if (i != (int)qaUtility::GetInstance()->Cut_v1_Event_mCent.size() - 1)
  162. std::cout << ", ";
  163. else
  164. std::cout << "};" << std::endl;
  165. }
  166. std::cout << "Cut_v1_Particle_ptmin = " << qaUtility::GetInstance()->Cut_v1_Particle_ptmin << std::endl;
  167. std::cout << "Cut_v1_Particle_ptmax = " << qaUtility::GetInstance()->Cut_v1_Particle_ptmax << std::endl;
  168. std::cout << "Cut_v1_Particle_etamin = " << qaUtility::GetInstance()->Cut_v1_Particle_etamin << std::endl;
  169. std::cout << "Cut_v1_Particle_etamax = " << qaUtility::GetInstance()->Cut_v1_Particle_etamax << std::endl;
  170. std::cout << "Cut_v1_Particle_ymin = " << qaUtility::GetInstance()->Cut_v1_Particle_ymin << std::endl;
  171. std::cout << "Cut_v1_Particle_ymax = " << qaUtility::GetInstance()->Cut_v1_Particle_ymax << std::endl;
  172. std::cout << "Cut_v1_Particle_ptmin_pi = " << qaUtility::GetInstance()->Cut_v1_Particle_ptmin_pi << std::endl;
  173. std::cout << "Cut_v1_Particle_ptmax_pi = " << qaUtility::GetInstance()->Cut_v1_Particle_ptmax_pi << std::endl;
  174. std::cout << "Cut_v1_Particle_ymin_pi = " << qaUtility::GetInstance()->Cut_v1_Particle_ymin_pi << std::endl;
  175. std::cout << "Cut_v1_Particle_ymax_pi = " << qaUtility::GetInstance()->Cut_v1_Particle_ymax_pi << std::endl;
  176. std::cout << "Cut_v1_Particle_ptmin_ka = " << qaUtility::GetInstance()->Cut_v1_Particle_ptmin_ka << std::endl;
  177. std::cout << "Cut_v1_Particle_ptmax_ka = " << qaUtility::GetInstance()->Cut_v1_Particle_ptmax_ka << std::endl;
  178. std::cout << "Cut_v1_Particle_ymin_ka = " << qaUtility::GetInstance()->Cut_v1_Particle_ymin_ka << std::endl;
  179. std::cout << "Cut_v1_Particle_ymax_ka = " << qaUtility::GetInstance()->Cut_v1_Particle_ymax_ka << std::endl;
  180. std::cout << "Cut_v1_Particle_ptmin_pr = " << qaUtility::GetInstance()->Cut_v1_Particle_ptmin_pr << std::endl;
  181. std::cout << "Cut_v1_Particle_ptmax_pr = " << qaUtility::GetInstance()->Cut_v1_Particle_ptmax_pr << std::endl;
  182. std::cout << "Cut_v1_Particle_ymin_pr = " << qaUtility::GetInstance()->Cut_v1_Particle_ymin_pr << std::endl;
  183. std::cout << "Cut_v1_Particle_ymax_pr = " << qaUtility::GetInstance()->Cut_v1_Particle_ymax_pr << std::endl;
  184. std::cout << "Cut_v1_Particle_ptmin_ne = " << qaUtility::GetInstance()->Cut_v1_Particle_ptmin_ne << std::endl;
  185. std::cout << "Cut_v1_Particle_ptmax_ne = " << qaUtility::GetInstance()->Cut_v1_Particle_ptmax_ne << std::endl;
  186. std::cout << "Cut_v1_Particle_ymin_ne = " << qaUtility::GetInstance()->Cut_v1_Particle_ymin_ne << std::endl;
  187. std::cout << "Cut_v1_Particle_ymax_ne = " << qaUtility::GetInstance()->Cut_v1_Particle_ymax_ne << std::endl;
  188. }
  189. if (qaUtility::GetInstance()->Is_v2)
  190. {
  191. std::cout << "Is_v2 = " << qaUtility::GetInstance()->Is_v2 << std::endl;
  192. std::cout << "Cut_v2_Event_bmin = " << qaUtility::GetInstance()->Cut_v2_Event_bmin << std::endl;
  193. std::cout << "Cut_v2_Event_bmax = " << qaUtility::GetInstance()->Cut_v2_Event_bmax << std::endl;
  194. std::cout << "Cut_v2_Event_bCent[" << qaUtility::GetInstance()->Cut_v2_Event_bCent.size() << "] = {";
  195. for (int i = 0; i < (int)qaUtility::GetInstance()->Cut_v2_Event_bCent.size(); i++)
  196. {
  197. std::cout << qaUtility::GetInstance()->Cut_v2_Event_bCent.at(i);
  198. if (i != (int)qaUtility::GetInstance()->Cut_v2_Event_bCent.size() - 1)
  199. std::cout << ", ";
  200. else
  201. std::cout << "};" << std::endl;
  202. }
  203. std::cout << "Cut_v2_Event_mCent[" << qaUtility::GetInstance()->Cut_v2_Event_mCent.size() << "] = {";
  204. for (int i = 0; i < (int)qaUtility::GetInstance()->Cut_v2_Event_mCent.size(); i++)
  205. {
  206. std::cout << (int)qaUtility::GetInstance()->Cut_v2_Event_mCent.at(i);
  207. if (i != (int)qaUtility::GetInstance()->Cut_v2_Event_mCent.size() - 1)
  208. std::cout << ", ";
  209. else
  210. std::cout << "};" << std::endl;
  211. }
  212. std::cout << "Cut_v2_Particle_ptmin = " << qaUtility::GetInstance()->Cut_v2_Particle_ptmin << std::endl;
  213. std::cout << "Cut_v2_Particle_ptmax = " << qaUtility::GetInstance()->Cut_v2_Particle_ptmax << std::endl;
  214. std::cout << "Cut_v2_Particle_etamin = " << qaUtility::GetInstance()->Cut_v2_Particle_etamin << std::endl;
  215. std::cout << "Cut_v2_Particle_etamax = " << qaUtility::GetInstance()->Cut_v2_Particle_etamax << std::endl;
  216. std::cout << "Cut_v2_Particle_ymin = " << qaUtility::GetInstance()->Cut_v2_Particle_ymin << std::endl;
  217. std::cout << "Cut_v2_Particle_ymax = " << qaUtility::GetInstance()->Cut_v2_Particle_ymax << std::endl;
  218. std::cout << "Cut_v2_Particle_ptmin_pi = " << qaUtility::GetInstance()->Cut_v2_Particle_ptmin_pi << std::endl;
  219. std::cout << "Cut_v2_Particle_ptmax_pi = " << qaUtility::GetInstance()->Cut_v2_Particle_ptmax_pi << std::endl;
  220. std::cout << "Cut_v2_Particle_ymin_pi = " << qaUtility::GetInstance()->Cut_v2_Particle_ymin_pi << std::endl;
  221. std::cout << "Cut_v2_Particle_ymax_pi = " << qaUtility::GetInstance()->Cut_v2_Particle_ymax_pi << std::endl;
  222. std::cout << "Cut_v2_Particle_ptmin_ka = " << qaUtility::GetInstance()->Cut_v2_Particle_ptmin_ka << std::endl;
  223. std::cout << "Cut_v2_Particle_ptmax_ka = " << qaUtility::GetInstance()->Cut_v2_Particle_ptmax_ka << std::endl;
  224. std::cout << "Cut_v2_Particle_ymin_ka = " << qaUtility::GetInstance()->Cut_v2_Particle_ymin_ka << std::endl;
  225. std::cout << "Cut_v2_Particle_ymax_ka = " << qaUtility::GetInstance()->Cut_v2_Particle_ymax_ka << std::endl;
  226. std::cout << "Cut_v2_Particle_ptmin_pr = " << qaUtility::GetInstance()->Cut_v2_Particle_ptmin_pr << std::endl;
  227. std::cout << "Cut_v2_Particle_ptmax_pr = " << qaUtility::GetInstance()->Cut_v2_Particle_ptmax_pr << std::endl;
  228. std::cout << "Cut_v2_Particle_ymin_pr = " << qaUtility::GetInstance()->Cut_v2_Particle_ymin_pr << std::endl;
  229. std::cout << "Cut_v2_Particle_ymax_pr = " << qaUtility::GetInstance()->Cut_v2_Particle_ymax_pr << std::endl;
  230. std::cout << "Cut_v2_Particle_ptmin_ne = " << qaUtility::GetInstance()->Cut_v2_Particle_ptmin_ne << std::endl;
  231. std::cout << "Cut_v2_Particle_ptmax_ne = " << qaUtility::GetInstance()->Cut_v2_Particle_ptmax_ne << std::endl;
  232. std::cout << "Cut_v2_Particle_ymin_ne = " << qaUtility::GetInstance()->Cut_v2_Particle_ymin_ne << std::endl;
  233. std::cout << "Cut_v2_Particle_ymax_ne = " << qaUtility::GetInstance()->Cut_v2_Particle_ymax_ne << std::endl;
  234. }
  235. if (qaUtility::GetInstance()->Is_v3)
  236. {
  237. std::cout << "Is_v3 = " << qaUtility::GetInstance()->Is_v3 << std::endl;
  238. std::cout << "Cut_v3_Event_bmin = " << qaUtility::GetInstance()->Cut_v3_Event_bmin << std::endl;
  239. std::cout << "Cut_v3_Event_bmax = " << qaUtility::GetInstance()->Cut_v3_Event_bmax << std::endl;
  240. std::cout << "Cut_v3_Event_bCent[" << qaUtility::GetInstance()->Cut_v3_Event_bCent.size() << "] = {";
  241. for (int i = 0; i < (int)qaUtility::GetInstance()->Cut_v3_Event_bCent.size(); i++)
  242. {
  243. std::cout << qaUtility::GetInstance()->Cut_v3_Event_bCent.at(i);
  244. if (i != (int)qaUtility::GetInstance()->Cut_v3_Event_bCent.size() - 1)
  245. std::cout << ", ";
  246. else
  247. std::cout << "};" << std::endl;
  248. }
  249. std::cout << "Cut_v3_Event_mCent[" << qaUtility::GetInstance()->Cut_v3_Event_mCent.size() << "] = {";
  250. for (int i = 0; i < (int)qaUtility::GetInstance()->Cut_v3_Event_mCent.size(); i++)
  251. {
  252. std::cout << (int)qaUtility::GetInstance()->Cut_v3_Event_mCent.at(i);
  253. if (i != (int)qaUtility::GetInstance()->Cut_v3_Event_mCent.size() - 1)
  254. std::cout << ", ";
  255. else
  256. std::cout << "};" << std::endl;
  257. }
  258. std::cout << "Cut_v3_Particle_ptmin = " << qaUtility::GetInstance()->Cut_v3_Particle_ptmin << std::endl;
  259. std::cout << "Cut_v3_Particle_ptmax = " << qaUtility::GetInstance()->Cut_v3_Particle_ptmax << std::endl;
  260. std::cout << "Cut_v3_Particle_etamin = " << qaUtility::GetInstance()->Cut_v3_Particle_etamin << std::endl;
  261. std::cout << "Cut_v3_Particle_etamax = " << qaUtility::GetInstance()->Cut_v3_Particle_etamax << std::endl;
  262. std::cout << "Cut_v3_Particle_ymin = " << qaUtility::GetInstance()->Cut_v3_Particle_ymin << std::endl;
  263. std::cout << "Cut_v3_Particle_ymax = " << qaUtility::GetInstance()->Cut_v3_Particle_ymax << std::endl;
  264. std::cout << "Cut_v3_Particle_ptmin_pi = " << qaUtility::GetInstance()->Cut_v3_Particle_ptmin_pi << std::endl;
  265. std::cout << "Cut_v3_Particle_ptmax_pi = " << qaUtility::GetInstance()->Cut_v3_Particle_ptmax_pi << std::endl;
  266. std::cout << "Cut_v3_Particle_ymin_pi = " << qaUtility::GetInstance()->Cut_v3_Particle_ymin_pi << std::endl;
  267. std::cout << "Cut_v3_Particle_ymax_pi = " << qaUtility::GetInstance()->Cut_v3_Particle_ymax_pi << std::endl;
  268. std::cout << "Cut_v3_Particle_ptmin_ka = " << qaUtility::GetInstance()->Cut_v3_Particle_ptmin_ka << std::endl;
  269. std::cout << "Cut_v3_Particle_ptmax_ka = " << qaUtility::GetInstance()->Cut_v3_Particle_ptmax_ka << std::endl;
  270. std::cout << "Cut_v3_Particle_ymin_ka = " << qaUtility::GetInstance()->Cut_v3_Particle_ymin_ka << std::endl;
  271. std::cout << "Cut_v3_Particle_ymax_ka = " << qaUtility::GetInstance()->Cut_v3_Particle_ymax_ka << std::endl;
  272. std::cout << "Cut_v3_Particle_ptmin_pr = " << qaUtility::GetInstance()->Cut_v3_Particle_ptmin_pr << std::endl;
  273. std::cout << "Cut_v3_Particle_ptmax_pr = " << qaUtility::GetInstance()->Cut_v3_Particle_ptmax_pr << std::endl;
  274. std::cout << "Cut_v3_Particle_ymin_pr = " << qaUtility::GetInstance()->Cut_v3_Particle_ymin_pr << std::endl;
  275. std::cout << "Cut_v3_Particle_ymax_pr = " << qaUtility::GetInstance()->Cut_v3_Particle_ymax_pr << std::endl;
  276. std::cout << "Cut_v3_Particle_ptmin_ne = " << qaUtility::GetInstance()->Cut_v3_Particle_ptmin_ne << std::endl;
  277. std::cout << "Cut_v3_Particle_ptmax_ne = " << qaUtility::GetInstance()->Cut_v3_Particle_ptmax_ne << std::endl;
  278. std::cout << "Cut_v3_Particle_ymin_ne = " << qaUtility::GetInstance()->Cut_v3_Particle_ymin_ne << std::endl;
  279. std::cout << "Cut_v3_Particle_ymax_ne = " << qaUtility::GetInstance()->Cut_v3_Particle_ymax_ne << std::endl;
  280. }
  281. if (qaUtility::GetInstance()->Is_v4)
  282. {
  283. std::cout << "Is_v4 = " << qaUtility::GetInstance()->Is_v4 << std::endl;
  284. std::cout << "Cut_v4_Event_bmin = " << qaUtility::GetInstance()->Cut_v4_Event_bmin << std::endl;
  285. std::cout << "Cut_v4_Event_bmax = " << qaUtility::GetInstance()->Cut_v4_Event_bmax << std::endl;
  286. std::cout << "Cut_v4_Event_bCent[" << qaUtility::GetInstance()->Cut_v4_Event_bCent.size() << "] = {";
  287. for (int i = 0; i < (int)qaUtility::GetInstance()->Cut_v4_Event_bCent.size(); i++)
  288. {
  289. std::cout << qaUtility::GetInstance()->Cut_v4_Event_bCent.at(i);
  290. if (i != (int)qaUtility::GetInstance()->Cut_v4_Event_bCent.size() - 1)
  291. std::cout << ", ";
  292. else
  293. std::cout << "};" << std::endl;
  294. }
  295. std::cout << "Cut_v4_Event_mCent[" << qaUtility::GetInstance()->Cut_v4_Event_mCent.size() << "] = {";
  296. for (int i = 0; i < (int)qaUtility::GetInstance()->Cut_v4_Event_mCent.size(); i++)
  297. {
  298. std::cout << (int)qaUtility::GetInstance()->Cut_v4_Event_mCent.at(i);
  299. if (i != (int)qaUtility::GetInstance()->Cut_v4_Event_mCent.size() - 1)
  300. std::cout << ", ";
  301. else
  302. std::cout << "};" << std::endl;
  303. }
  304. std::cout << "Cut_v4_Particle_ptmin = " << qaUtility::GetInstance()->Cut_v4_Particle_ptmin << std::endl;
  305. std::cout << "Cut_v4_Particle_ptmax = " << qaUtility::GetInstance()->Cut_v4_Particle_ptmax << std::endl;
  306. std::cout << "Cut_v4_Particle_etamin = " << qaUtility::GetInstance()->Cut_v4_Particle_etamin << std::endl;
  307. std::cout << "Cut_v4_Particle_etamax = " << qaUtility::GetInstance()->Cut_v4_Particle_etamax << std::endl;
  308. std::cout << "Cut_v4_Particle_ymin = " << qaUtility::GetInstance()->Cut_v4_Particle_ymin << std::endl;
  309. std::cout << "Cut_v4_Particle_ymax = " << qaUtility::GetInstance()->Cut_v4_Particle_ymax << std::endl;
  310. std::cout << "Cut_v4_Particle_ptmin_pi = " << qaUtility::GetInstance()->Cut_v4_Particle_ptmin_pi << std::endl;
  311. std::cout << "Cut_v4_Particle_ptmax_pi = " << qaUtility::GetInstance()->Cut_v4_Particle_ptmax_pi << std::endl;
  312. std::cout << "Cut_v4_Particle_ymin_pi = " << qaUtility::GetInstance()->Cut_v4_Particle_ymin_pi << std::endl;
  313. std::cout << "Cut_v4_Particle_ymax_pi = " << qaUtility::GetInstance()->Cut_v4_Particle_ymax_pi << std::endl;
  314. std::cout << "Cut_v4_Particle_ptmin_ka = " << qaUtility::GetInstance()->Cut_v4_Particle_ptmin_ka << std::endl;
  315. std::cout << "Cut_v4_Particle_ptmax_ka = " << qaUtility::GetInstance()->Cut_v4_Particle_ptmax_ka << std::endl;
  316. std::cout << "Cut_v4_Particle_ymin_ka = " << qaUtility::GetInstance()->Cut_v4_Particle_ymin_ka << std::endl;
  317. std::cout << "Cut_v4_Particle_ymax_ka = " << qaUtility::GetInstance()->Cut_v4_Particle_ymax_ka << std::endl;
  318. std::cout << "Cut_v4_Particle_ptmin_pr = " << qaUtility::GetInstance()->Cut_v4_Particle_ptmin_pr << std::endl;
  319. std::cout << "Cut_v4_Particle_ptmax_pr = " << qaUtility::GetInstance()->Cut_v4_Particle_ptmax_pr << std::endl;
  320. std::cout << "Cut_v4_Particle_ymin_pr = " << qaUtility::GetInstance()->Cut_v4_Particle_ymin_pr << std::endl;
  321. std::cout << "Cut_v4_Particle_ymax_pr = " << qaUtility::GetInstance()->Cut_v4_Particle_ymax_pr << std::endl;
  322. std::cout << "Cut_v4_Particle_ptmin_ne = " << qaUtility::GetInstance()->Cut_v4_Particle_ptmin_ne << std::endl;
  323. std::cout << "Cut_v4_Particle_ptmax_ne = " << qaUtility::GetInstance()->Cut_v4_Particle_ptmax_ne << std::endl;
  324. std::cout << "Cut_v4_Particle_ymin_ne = " << qaUtility::GetInstance()->Cut_v4_Particle_ymin_ne << std::endl;
  325. std::cout << "Cut_v4_Particle_ymax_ne = " << qaUtility::GetInstance()->Cut_v4_Particle_ymax_ne << std::endl;
  326. }
  327. std::cout << std::endl;
  328. }
  329. if (qaUtility::GetInstance()->Is_minbias != 1 &&
  330. qaUtility::GetInstance()->Is_refmult != 1 &&
  331. qaUtility::GetInstance()->Is_v1 != 1 &&
  332. qaUtility::GetInstance()->Is_v2 != 1 &&
  333. qaUtility::GetInstance()->Is_v3 != 1 &&
  334. qaUtility::GetInstance()->Is_v4 != 1)
  335. {
  336. std::cerr << "No options were chosen (minbias, refmult, v1, v2, v3, v4). Exiting..." << std::endl;
  337. return 100;
  338. }
  339. TFile *fo = new TFile(oFileName, "recreate");
  340. TH1D *h_minbias_Event_b = new TH1D("h_minbias_Event_b", "dN/db minbias;b, fm; dN/db", 200, 0., 20.);
  341. TH1I *h_minbias_Event_Mult = new TH1I("h_minbias_Event_Mult", "dN/dN_{particles} minbias;N_{particles}; dN/dN_{particles}", 2500, 0, 2500);
  342. TH2D *h2_minbias_Event_b_Mult = new TH2D("h2_minbias_Event_b_Mult", "b vs N_{particles} minbias;N_{particles};b, fm;", 2500, 0., 2500., 200, 0., 20.);
  343. TH1D *h_minbias_Particle_pt = new TH1D("h_minbias_Particle_pt", "dN/dp_{T} minbias;p_{T}, GeV/c; dN/dp_{T}", 800, 0., 8.);
  344. TH1D *h_minbias_Particle_eta = new TH1D("h_minbias_Particle_eta", "dN/d#eta minbias;#eta; dN/d#eta", 2000, -10., 10.);
  345. TH2D *h2_minbias_Particle_pteta = new TH2D("h2_minbias_Particle_pteta", "dN/dp_{T}d#eta minbias;#eta;p_{T}, GeV/c;dN/dp_{T}d#eta", 2000, -10., 10., 800, 0., 8.);
  346. TH1D *h_minbias_Particle_E = new TH1D("h_minbias_Particle_E", "dN/dE minbias;E, GeV; dN/dE", 800, 0., 8.);
  347. TH1D *h_minbias_Particle_px = new TH1D("h_minbias_Particle_px", "dN/dp_{x} minbias;p_{x}, GeV/c; dN/dp_{x}", 800, -8., 8.);
  348. TH1D *h_minbias_Particle_py = new TH1D("h_minbias_Particle_py", "dN/dp_{y} minbias;p_{y}, GeV/c; dN/dp_{y}", 800, -8., 8.);
  349. TH1D *h_minbias_Particle_pz = new TH1D("h_minbias_Particle_pz", "dN/dp_{z} minbias;p_{z}, GeV/c; dN/dp_{z}", 800, -8., 8.);
  350. TH1D *h_minbias_Particle_t = new TH1D("h_minbias_Particle_t", "dN/dt minbias;t, fm/c; dN/dt", 800, 0., 800.);
  351. TH1D *h_minbias_Particle_x = new TH1D("h_minbias_Particle_x", "dN/dx minbias;x, fm; dN/dx", 800, -8., 8.);
  352. TH1D *h_minbias_Particle_y = new TH1D("h_minbias_Particle_y", "dN/dy minbias;y, fm; dN/dy", 800, -8., 8.);
  353. TH1D *h_minbias_Particle_z = new TH1D("h_minbias_Particle_z", "dN/dz minbias;z, fm; dN/dz", 800, -8., 8.);
  354. TH1I *h_minbias_Particle_pdg = new TH1I("h_minbias_Particle_pdg", "PDG minbias;PDG;N_{entries}", 7000, -3500, 3500);
  355. TH1D *h_minbias_Particle_PID_pt[qaUtility::GetInstance()->npid];
  356. TH1D *h_minbias_Particle_PID_eta[qaUtility::GetInstance()->npid];
  357. TH1D *h_minbias_Particle_PID_Y[qaUtility::GetInstance()->npid];
  358. TH1D *h_minbias_Particle_PID_E[qaUtility::GetInstance()->npid];
  359. TH1D *h_minbias_Particle_PID_px[qaUtility::GetInstance()->npid];
  360. TH1D *h_minbias_Particle_PID_py[qaUtility::GetInstance()->npid];
  361. TH1D *h_minbias_Particle_PID_pz[qaUtility::GetInstance()->npid];
  362. TH1D *h_minbias_Particle_PID_t[qaUtility::GetInstance()->npid];
  363. TH1D *h_minbias_Particle_PID_x[qaUtility::GetInstance()->npid];
  364. TH1D *h_minbias_Particle_PID_y[qaUtility::GetInstance()->npid];
  365. TH1D *h_minbias_Particle_PID_z[qaUtility::GetInstance()->npid];
  366. TH1D *h_refmult_Event_b = new TH1D("h_refmult_Event_b", "dN/db refmult;b, fm; dN/db", 200, 0., 20.);
  367. TH1I *h_refmult_Event_Mult = new TH1I("h_refmult_Event_Mult", "dN/dN_{particles} refmult;N_{particles}; dN/dN_{particles}", 2500, 0, 2500);
  368. TH2D *h2_refmult_Event_b_Mult = new TH2D("h2_refmult_Event_b_Mult", "b vs N_{particles} refmult;N_{particles};b, fm;", 2500, 0., 2500., 200, 0., 20.);
  369. TH1D *h_refmult_Particle_pt = new TH1D("h_refmult_Particle_pt", "dN/dp_{T} refmult;p_{T}, GeV/c; dN/dp_{T}", 800, 0., 8.);
  370. TH1D *h_refmult_Particle_eta = new TH1D("h_refmult_Particle_eta", "dN/d#eta refmult;#eta; dN/d#eta", 2000, -10., 10.);
  371. TH2D *h2_refmult_Particle_pteta = new TH2D("h2_refmult_Particle_pteta", "dN/dp_{T}d#eta refmult;#eta;p_{T}, GeV/c;dN/dp_{T}d#eta", 2000, -10., 10., 800, 0., 8.);
  372. TH1D *h_refmult_Particle_E = new TH1D("h_refmult_Particle_E", "dN/dE refmult;E, GeV; dN/dE", 800, 0., 8.);
  373. TH1D *h_refmult_Particle_px = new TH1D("h_refmult_Particle_px", "dN/dp_{x} refmult;p_{x}, GeV/c; dN/dp_{x}", 800, -8., 8.);
  374. TH1D *h_refmult_Particle_py = new TH1D("h_refmult_Particle_py", "dN/dp_{y} refmult;p_{y}, GeV/c; dN/dp_{y}", 800, -8., 8.);
  375. TH1D *h_refmult_Particle_pz = new TH1D("h_refmult_Particle_pz", "dN/dp_{z} refmult;p_{z}, GeV/c; dN/dp_{z}", 800, -8., 8.);
  376. TH1D *h_refmult_Particle_t = new TH1D("h_refmult_Particle_t", "dN/dt refmult;t, fm/c; dN/dt", 800, 0., 800.);
  377. TH1D *h_refmult_Particle_x = new TH1D("h_refmult_Particle_x", "dN/dx refmult;x, fm; dN/dx", 800, -8., 8.);
  378. TH1D *h_refmult_Particle_y = new TH1D("h_refmult_Particle_y", "dN/dy refmult;y, fm; dN/dy", 800, -8., 8.);
  379. TH1D *h_refmult_Particle_z = new TH1D("h_refmult_Particle_z", "dN/dz refmult;z, fm; dN/dz", 800, -8., 8.);
  380. TH1I *h_refmult_Particle_pdg = new TH1I("h_refmult_Particle_pdg", "PDG refmult;PDG;N_{entries}", 7000, -3500, 3500);
  381. TH1D *h_refmult_Particle_PID_pt[qaUtility::GetInstance()->npid];
  382. TH1D *h_refmult_Particle_PID_eta[qaUtility::GetInstance()->npid];
  383. TH1D *h_refmult_Particle_PID_Y[qaUtility::GetInstance()->npid];
  384. TH1D *h_refmult_Particle_PID_E[qaUtility::GetInstance()->npid];
  385. TH1D *h_refmult_Particle_PID_px[qaUtility::GetInstance()->npid];
  386. TH1D *h_refmult_Particle_PID_py[qaUtility::GetInstance()->npid];
  387. TH1D *h_refmult_Particle_PID_pz[qaUtility::GetInstance()->npid];
  388. TH1D *h_refmult_Particle_PID_t[qaUtility::GetInstance()->npid];
  389. TH1D *h_refmult_Particle_PID_x[qaUtility::GetInstance()->npid];
  390. TH1D *h_refmult_Particle_PID_y[qaUtility::GetInstance()->npid];
  391. TH1D *h_refmult_Particle_PID_z[qaUtility::GetInstance()->npid];
  392. TH2D *h2_v1_Particle_pteta = new TH2D("h2_v1_Particle_pteta", "dN/dp_{T}d#eta v1;#eta;p_{T}, GeV/c;dN/dp_{T}d#eta", 2000, -10., 10., 800, 0., 8.);
  393. TH2D *h2_v1_Event_bCent_b_Mult[qaUtility::GetInstance()->maxCentBins];
  394. TH2D *h2_v1_Event_mCent_b_Mult[qaUtility::GetInstance()->maxCentBins];
  395. // TProfile3D *p3_v1_PID_b_pt_y[qaUtility::GetInstance()->npid];
  396. TProfile2D *p2_v1_PID_b_pt[qaUtility::GetInstance()->npid];
  397. TProfile2D *p2_v1_PID_b_y[qaUtility::GetInstance()->npid];
  398. TProfile2D *p2_v1_PID_y_pt[qaUtility::GetInstance()->maxCentBins][qaUtility::GetInstance()->npid];
  399. TProfile2D *p2_v1_PID_M_pt[qaUtility::GetInstance()->npid];
  400. TProfile2D *p2_v1_PID_M_y[qaUtility::GetInstance()->npid];
  401. TProfile *p_v1_PID_bCent_pt[qaUtility::GetInstance()->maxCentBins][qaUtility::GetInstance()->npid];
  402. TProfile *p_v1_PID_bCent_y[qaUtility::GetInstance()->maxCentBins][qaUtility::GetInstance()->npid];
  403. TProfile *p_v1_PID_mCent_pt[qaUtility::GetInstance()->maxCentBins][qaUtility::GetInstance()->npid];
  404. TProfile *p_v1_PID_mCent_y[qaUtility::GetInstance()->maxCentBins][qaUtility::GetInstance()->npid];
  405. TH2D *h2_v2_Particle_pteta = new TH2D("h2_v2_Particle_pteta", "dN/dp_{T}d#eta v2;#eta;p_{T}, GeV/c;dN/dp_{T}d#eta", 2000, -10., 10., 800, 0., 8.);
  406. TH2D *h2_v2_Event_bCent_b_Mult[qaUtility::GetInstance()->maxCentBins];
  407. TH2D *h2_v2_Event_mCent_b_Mult[qaUtility::GetInstance()->maxCentBins];
  408. // TProfile3D *p3_v2_PID_b_pt_y[qaUtility::GetInstance()->npid];
  409. TProfile2D *p2_v2_PID_b_pt[qaUtility::GetInstance()->npid];
  410. TProfile2D *p2_v2_PID_b_y[qaUtility::GetInstance()->npid];
  411. TProfile2D *p2_v2_PID_y_pt[qaUtility::GetInstance()->maxCentBins][qaUtility::GetInstance()->npid];
  412. TProfile2D *p2_v2_PID_M_pt[qaUtility::GetInstance()->npid];
  413. TProfile2D *p2_v2_PID_M_y[qaUtility::GetInstance()->npid];
  414. TProfile *p_v2_PID_bCent_pt[qaUtility::GetInstance()->maxCentBins][qaUtility::GetInstance()->npid];
  415. TProfile *p_v2_PID_bCent_y[qaUtility::GetInstance()->maxCentBins][qaUtility::GetInstance()->npid];
  416. TProfile *p_v2_PID_mCent_pt[qaUtility::GetInstance()->maxCentBins][qaUtility::GetInstance()->npid];
  417. TProfile *p_v2_PID_mCent_y[qaUtility::GetInstance()->maxCentBins][qaUtility::GetInstance()->npid];
  418. TH2D *h2_v3_Particle_pteta = new TH2D("h2_v3_Particle_pteta", "dN/dp_{T}d#eta v3;#eta;p_{T}, GeV/c;dN/dp_{T}d#eta", 2000, -10., 10., 800, 0., 8.);
  419. TH2D *h2_v3_Event_bCent_b_Mult[qaUtility::GetInstance()->maxCentBins];
  420. TH2D *h2_v3_Event_mCent_b_Mult[qaUtility::GetInstance()->maxCentBins];
  421. // TProfile3D *p3_v3_PID_b_pt_y[qaUtility::GetInstance()->npid];
  422. TProfile2D *p2_v3_PID_b_pt[qaUtility::GetInstance()->npid];
  423. TProfile2D *p2_v3_PID_b_y[qaUtility::GetInstance()->npid];
  424. TProfile2D *p2_v3_PID_y_pt[qaUtility::GetInstance()->maxCentBins][qaUtility::GetInstance()->npid];
  425. TProfile2D *p2_v3_PID_M_pt[qaUtility::GetInstance()->npid];
  426. TProfile2D *p2_v3_PID_M_y[qaUtility::GetInstance()->npid];
  427. TProfile *p_v3_PID_bCent_pt[qaUtility::GetInstance()->maxCentBins][qaUtility::GetInstance()->npid];
  428. TProfile *p_v3_PID_bCent_y[qaUtility::GetInstance()->maxCentBins][qaUtility::GetInstance()->npid];
  429. TProfile *p_v3_PID_mCent_pt[qaUtility::GetInstance()->maxCentBins][qaUtility::GetInstance()->npid];
  430. TProfile *p_v3_PID_mCent_y[qaUtility::GetInstance()->maxCentBins][qaUtility::GetInstance()->npid];
  431. TH2D *h2_v4_Particle_pteta = new TH2D("h2_v4_Particle_pteta", "dN/dp_{T}d#eta v4;#eta;p_{T}, GeV/c;dN/dp_{T}d#eta", 2000, -10., 10., 800, 0., 8.);
  432. TH2D *h2_v4_Event_bCent_b_Mult[qaUtility::GetInstance()->maxCentBins];
  433. TH2D *h2_v4_Event_mCent_b_Mult[qaUtility::GetInstance()->maxCentBins];
  434. // TProfile3D *p3_v4_PID_b_pt_y[qaUtility::GetInstance()->npid];
  435. TProfile2D *p2_v4_PID_b_pt[qaUtility::GetInstance()->npid];
  436. TProfile2D *p2_v4_PID_b_y[qaUtility::GetInstance()->npid];
  437. TProfile2D *p2_v4_PID_y_pt[qaUtility::GetInstance()->maxCentBins][qaUtility::GetInstance()->npid];
  438. TProfile2D *p2_v4_PID_M_pt[qaUtility::GetInstance()->npid];
  439. TProfile2D *p2_v4_PID_M_y[qaUtility::GetInstance()->npid];
  440. TProfile *p_v4_PID_bCent_pt[qaUtility::GetInstance()->maxCentBins][qaUtility::GetInstance()->npid];
  441. TProfile *p_v4_PID_bCent_y[qaUtility::GetInstance()->maxCentBins][qaUtility::GetInstance()->npid];
  442. TProfile *p_v4_PID_mCent_pt[qaUtility::GetInstance()->maxCentBins][qaUtility::GetInstance()->npid];
  443. TProfile *p_v4_PID_mCent_y[qaUtility::GetInstance()->maxCentBins][qaUtility::GetInstance()->npid];
  444. for (int i = 0; i < qaUtility::GetInstance()->npid; i++)
  445. {
  446. h_minbias_Particle_PID_pt[i] = new TH1D(Form("h_minbias_Particle_PID_pt_%i", i), Form("h_minbias_Particle_PID_pt_%i;p_{T}, GeV/c; dN/dp_{T}", i), 800, 0., 8.);
  447. h_minbias_Particle_PID_eta[i] = new TH1D(Form("h_minbias_Particle_PID_eta_%i", i), Form("h_minbias_Particle_PID_eta_%i;#eta; dN/d#eta", i), 2000, -10., 10.);
  448. h_minbias_Particle_PID_Y[i] = new TH1D(Form("h_minbias_Particle_PID_Y_%i", i), Form("h_minbias_Particle_PID_Y_%i;y; dN/dy", i), 2000, -10., 10.);
  449. h_minbias_Particle_PID_E[i] = new TH1D(Form("h_minbias_Particle_PID_E_%i", i), Form("h_minbias_Particle_PID_E_%i;E, GeV; dN/dE", i), 800, 0., 8.);
  450. h_minbias_Particle_PID_px[i] = new TH1D(Form("h_minbias_Particle_PID_px_%i", i), Form("h_minbias_Particle_PID_px_%i;p_{x}, GeV/c; dN/dp_{x}", i), 800, -8., 8.);
  451. h_minbias_Particle_PID_py[i] = new TH1D(Form("h_minbias_Particle_PID_py_%i", i), Form("h_minbias_Particle_PID_py_%i;p_{y}, GeV/c; dN/dp_{y}", i), 800, -8., 8.);
  452. h_minbias_Particle_PID_pz[i] = new TH1D(Form("h_minbias_Particle_PID_pz_%i", i), Form("h_minbias_Particle_PID_pz_%i;p_{z}, GeV/c; dN/dp_{z}", i), 800, -8., 8.);
  453. h_minbias_Particle_PID_t[i] = new TH1D(Form("h_minbias_Particle_PID_t_%i", i), Form("h_minbias_Particle_PID_t_%i;t, fm/c; dN/dt", i), 800, 0., 8.);
  454. h_minbias_Particle_PID_x[i] = new TH1D(Form("h_minbias_Particle_PID_x_%i", i), Form("h_minbias_Particle_PID_x_%i;x, fm; dN/dx", i), 800, -8., 8.);
  455. h_minbias_Particle_PID_y[i] = new TH1D(Form("h_minbias_Particle_PID_y_%i", i), Form("h_minbias_Particle_PID_y_%i;y, fm; dN/dy", i), 800, -8., 8.);
  456. h_minbias_Particle_PID_z[i] = new TH1D(Form("h_minbias_Particle_PID_z_%i", i), Form("h_minbias_Particle_PID_z_%i;z, fm; dN/dz", i), 800, -8., 8.);
  457. h_refmult_Particle_PID_pt[i] = new TH1D(Form("h_refmult_Particle_PID_pt_%i", i), Form("h_refmult_Particle_PID_pt_%i;p_{T}, GeV/c; dN/dp_{T}", i), 800, 0., 8.);
  458. h_refmult_Particle_PID_eta[i] = new TH1D(Form("h_refmult_Particle_PID_eta_%i", i), Form("h_refmult_Particle_PID_eta_%i;#eta; dN/d#eta", i), 2000, -10., 10.);
  459. h_refmult_Particle_PID_Y[i] = new TH1D(Form("h_refmult_Particle_PID_Y_%i", i), Form("h_refmult_Particle_PID_Y_%i;y; dN/dy", i), 2000, -10., 10.);
  460. h_refmult_Particle_PID_E[i] = new TH1D(Form("h_refmult_Particle_PID_E_%i", i), Form("h_refmult_Particle_PID_E_%i;E, GeV; dN/dE", i), 800, 0., 8.);
  461. h_refmult_Particle_PID_px[i] = new TH1D(Form("h_refmult_Particle_PID_px_%i", i), Form("h_refmult_Particle_PID_px_%i;p_{x}, GeV/c; dN/dp_{x}", i), 800, -8., 8.);
  462. h_refmult_Particle_PID_py[i] = new TH1D(Form("h_refmult_Particle_PID_py_%i", i), Form("h_refmult_Particle_PID_py_%i;p_{y}, GeV/c; dN/dp_{y}", i), 800, -8., 8.);
  463. h_refmult_Particle_PID_pz[i] = new TH1D(Form("h_refmult_Particle_PID_pz_%i", i), Form("h_refmult_Particle_PID_pz_%i;p_{z}, GeV/c; dN/dp_{z}", i), 800, -8., 8.);
  464. h_refmult_Particle_PID_t[i] = new TH1D(Form("h_refmult_Particle_PID_t_%i", i), Form("h_refmult_Particle_PID_t_%i;t, fm/c; dN/dt", i), 800, 0., 8.);
  465. h_refmult_Particle_PID_x[i] = new TH1D(Form("h_refmult_Particle_PID_x_%i", i), Form("h_refmult_Particle_PID_x_%i;x, fm; dN/dx", i), 800, -8., 8.);
  466. h_refmult_Particle_PID_y[i] = new TH1D(Form("h_refmult_Particle_PID_y_%i", i), Form("h_refmult_Particle_PID_y_%i;y, fm; dN/dy", i), 800, -8., 8.);
  467. h_refmult_Particle_PID_z[i] = new TH1D(Form("h_refmult_Particle_PID_z_%i", i), Form("h_refmult_Particle_PID_z_%i;z, fm; dN/dz", i), 800, -8., 8.);
  468. // p3_v1_PID_b_pt_y[i] = new TProfile3D(Form("p3_v1_PID_b_pt_y_%i", i), Form("p3_v1_PID_b_pt_y_%i;p_{T}, GeV/c;y;b, fm;v_{1}", i), 100, 0., 5., 400, -10., 10., 200, 0., 20.);
  469. p2_v1_PID_b_pt[i] = new TProfile2D(Form("p2_v1_PID_b_pt_%i", i), Form("p2_v1_PID_b_pt_%i;p_{T}, GeV/c;b, fm;v_{1}", i), 100, 0., 5., 200, 0., 20.);
  470. p2_v1_PID_b_y[i] = new TProfile2D(Form("p2_v1_PID_b_y_%i", i), Form("p2_v1_PID_b_y_%i;y;b, fm;v_{1}", i), 400, -10., 10., 200, 0., 20.);
  471. p2_v1_PID_M_pt[i] = new TProfile2D(Form("p2_v1_PID_M_pt_%i", i), Form("p2_v1_PID_M_pt_%i;p_{T}, GeV/c;b, fm;v_{1}", i), 100, 0., 5., 2500, 0., 2500.);
  472. p2_v1_PID_M_y[i] = new TProfile2D(Form("p2_v1_PID_M_y_%i", i), Form("p2_v1_PID_M_y_%i;y;b, fm;v_{1}", i), 400, -10., 10., 2500, 0., 2500.);
  473. // p3_v2_PID_b_pt_y[i] = new TProfile3D(Form("p3_v2_PID_b_pt_y_%i", i), Form("p3_v2_PID_b_pt_y_%i;p_{T}, GeV/c;y;b, fm;v_{2}", i), 100, 0., 5., 400, -10., 10., 200, 0., 20.);
  474. p2_v2_PID_b_pt[i] = new TProfile2D(Form("p2_v2_PID_b_pt_%i", i), Form("p2_v2_PID_b_pt_%i;p_{T}, GeV/c;b, fm;v_{2}", i), 100, 0., 5., 200, 0., 20.);
  475. p2_v2_PID_b_y[i] = new TProfile2D(Form("p2_v2_PID_b_y_%i", i), Form("p2_v2_PID_b_y_%i;y;b, fm;v_{2}", i), 400, -10., 10., 200, 0., 20.);
  476. p2_v2_PID_M_pt[i] = new TProfile2D(Form("p2_v2_PID_M_pt_%i", i), Form("p2_v2_PID_M_pt_%i;p_{T}, GeV/c;b, fm;v_{2}", i), 100, 0., 5., 2500, 0., 2500.);
  477. p2_v2_PID_M_y[i] = new TProfile2D(Form("p2_v2_PID_M_y_%i", i), Form("p2_v2_PID_M_y_%i;y;b, fm;v_{2}", i), 400, -10., 10., 2500, 0., 2500.);
  478. // p3_v3_PID_b_pt_y[i] = new TProfile3D(Form("p3_v3_PID_b_pt_y_%i", i), Form("p3_v3_PID_b_pt_y_%i;p_{T}, GeV/c;y;b, fm;v_{3}", i), 100, 0., 5., 400, -10., 10., 200, 0., 20.);
  479. p2_v3_PID_b_pt[i] = new TProfile2D(Form("p2_v3_PID_b_pt_%i", i), Form("p2_v3_PID_b_pt_%i;p_{T}, GeV/c;b, fm;v_{2}", i), 100, 0., 5., 200, 0., 20.);
  480. p2_v3_PID_b_y[i] = new TProfile2D(Form("p2_v3_PID_b_y_%i", i), Form("p2_v3_PID_b_y_%i;y;b, fm;v_{2}", i), 400, -10., 10., 200, 0., 20.);
  481. p2_v3_PID_M_pt[i] = new TProfile2D(Form("p2_v3_PID_M_pt_%i", i), Form("p2_v3_PID_M_pt_%i;p_{T}, GeV/c;b, fm;v_{2}", i), 100, 0., 5., 2500, 0., 2500.);
  482. p2_v3_PID_M_y[i] = new TProfile2D(Form("p2_v3_PID_M_y_%i", i), Form("p2_v3_PID_M_y_%i;y;b, fm;v_{2}", i), 400, -10., 10., 2500, 0., 2500.);
  483. // p3_v4_PID_b_pt_y[i] = new TProfile3D(Form("p3_v4_PID_b_pt_y_%i", i), Form("p3_v4_PID_b_pt_y_%i;p_{T}, GeV/c;y;b, fm;v_{4}", i), 100, 0., 5., 400, -10., 10., 200, 0., 20.);
  484. p2_v4_PID_b_pt[i] = new TProfile2D(Form("p2_v4_PID_b_pt_%i", i), Form("p2_v4_PID_b_pt_%i;p_{T}, GeV/c;b, fm;v_{2}", i), 100, 0., 5., 200, 0., 20.);
  485. p2_v4_PID_b_y[i] = new TProfile2D(Form("p2_v4_PID_b_y_%i", i), Form("p2_v4_PID_b_y_%i;y;b, fm;v_{2}", i), 400, -10., 10., 200, 0., 20.);
  486. p2_v4_PID_M_pt[i] = new TProfile2D(Form("p2_v4_PID_M_pt_%i", i), Form("p2_v4_PID_M_pt_%i;p_{T}, GeV/c;b, fm;v_{2}", i), 100, 0., 5., 2500, 0., 2500.);
  487. p2_v4_PID_M_y[i] = new TProfile2D(Form("p2_v4_PID_M_y_%i", i), Form("p2_v4_PID_M_y_%i;y;b, fm;v_{2}", i), 400, -10., 10., 2500, 0., 2500.);
  488. }
  489. for (int i = 0; i < qaUtility::GetInstance()->maxCentBins; i++)
  490. {
  491. h2_v1_Event_bCent_b_Mult[i] = new TH2D(Form("h2_v1_Event_bCent_b_Mult_%i", i), Form("h2_v1_Event_bCent_b_Mult_%i;N_{particles};b, fm;", i), 2500, 0, 2500, 200, 0., 20.);
  492. h2_v1_Event_mCent_b_Mult[i] = new TH2D(Form("h2_v1_Event_mCent_b_Mult_%i", i), Form("h2_v1_Event_mCent_b_Mult_%i;N_{particles};b, fm;", i), 2500, 0, 2500, 200, 0., 20.);
  493. h2_v2_Event_bCent_b_Mult[i] = new TH2D(Form("h2_v2_Event_bCent_b_Mult_%i", i), Form("h2_v2_Event_bCent_b_Mult_%i;N_{particles};b, fm;", i), 2500, 0, 2500, 200, 0., 20.);
  494. h2_v2_Event_mCent_b_Mult[i] = new TH2D(Form("h2_v2_Event_mCent_b_Mult_%i", i), Form("h2_v2_Event_mCent_b_Mult_%i;N_{particles};b, fm;", i), 2500, 0, 2500, 200, 0., 20.);
  495. h2_v3_Event_bCent_b_Mult[i] = new TH2D(Form("h2_v3_Event_bCent_b_Mult_%i", i), Form("h2_v3_Event_bCent_b_Mult_%i;N_{particles};b, fm;", i), 2500, 0, 2500, 200, 0., 20.);
  496. h2_v3_Event_mCent_b_Mult[i] = new TH2D(Form("h2_v3_Event_mCent_b_Mult_%i", i), Form("h2_v3_Event_mCent_b_Mult_%i;N_{particles};b, fm;", i), 2500, 0, 2500, 200, 0., 20.);
  497. h2_v4_Event_bCent_b_Mult[i] = new TH2D(Form("h2_v4_Event_bCent_b_Mult_%i", i), Form("h2_v4_Event_bCent_b_Mult_%i;N_{particles};b, fm;", i), 2500, 0, 2500, 200, 0., 20.);
  498. h2_v4_Event_mCent_b_Mult[i] = new TH2D(Form("h2_v4_Event_mCent_b_Mult_%i", i), Form("h2_v4_Event_mCent_b_Mult_%i;N_{particles};b, fm;", i), 2500, 0, 2500, 200, 0., 20.);
  499. for (int j = 0; j < qaUtility::GetInstance()->npid; j++)
  500. {
  501. p2_v1_PID_y_pt[i][j] = new TProfile2D(Form("p2_v1_PID_y_pt_%i_%i", i, j), Form("p2_v1_PID_y_pt_%i_%i;p_{T}, GeV/c;y;v_{1}", i, j), 100, 0., 5., 800, -10., 10.);
  502. p_v1_PID_bCent_pt[i][j] = new TProfile(Form("p_v1_PID_bCent_pt_%i_%i", i, j), Form("p_v1_PID_bCent_pt_%i_%i;p_{T}, GeV/c;v_{1}", i, j), 100, 0., 5.);
  503. p_v1_PID_bCent_y[i][j] = new TProfile(Form("p_v1_PID_bCent_y_%i_%i", i, j), Form("p_v1_PID_bCent_y_%i_%i;y;v_{1}", i, j), 400, -10., 10.);
  504. p2_v2_PID_y_pt[i][j] = new TProfile2D(Form("p2_v2_PID_y_pt_%i_%i", i, j), Form("p2_v2_PID_y_pt_%i_%i;p_{T}, GeV/c;y;v_{2}", i, j), 100, 0., 5., 800, -10., 10.);
  505. p_v2_PID_bCent_pt[i][j] = new TProfile(Form("p_v2_PID_bCent_pt_%i_%i", i, j), Form("p_v2_PID_bCent_pt_%i_%i;p_{T}, GeV/c;v_{2}", i, j), 100, 0., 5.);
  506. p_v2_PID_bCent_y[i][j] = new TProfile(Form("p_v2_PID_bCent_y_%i_%i", i, j), Form("p_v2_PID_bCent_y_%i_%i;y;v_{2}", i, j), 400, -10., 10.);
  507. p2_v3_PID_y_pt[i][j] = new TProfile2D(Form("p2_v3_PID_y_pt_%i_%i", i, j), Form("p2_v3_PID_y_pt_%i_%i;p_{T}, GeV/c;y;v_{3}", i, j), 100, 0., 5., 800, -10., 10.);
  508. p_v3_PID_bCent_pt[i][j] = new TProfile(Form("p_v3_PID_bCent_pt_%i_%i", i, j), Form("p_v3_PID_bCent_pt_%i_%i;p_{T}, GeV/c;v_{2}", i, j), 100, 0., 5.);
  509. p_v3_PID_bCent_y[i][j] = new TProfile(Form("p_v3_PID_bCent_y_%i_%i", i, j), Form("p_v3_PID_bCent_y_%i_%i;y;v_{2}", i, j), 400, -10., 10.);
  510. p2_v4_PID_y_pt[i][j] = new TProfile2D(Form("p2_v4_PID_y_pt_%i_%i", i, j), Form("p2_v4_PID_y_pt_%i_%i;p_{T}, GeV/c;y;v_{4}", i, j), 100, 0., 5., 800, -10., 10.);
  511. p_v4_PID_bCent_pt[i][j] = new TProfile(Form("p_v4_PID_bCent_pt_%i_%i", i, j), Form("p_v4_PID_bCent_pt_%i_%i;p_{T}, GeV/c;v_{2}", i, j), 100, 0., 5.);
  512. p_v4_PID_bCent_y[i][j] = new TProfile(Form("p_v4_PID_bCent_y_%i_%i", i, j), Form("p_v4_PID_bCent_y_%i_%i;y;v_{2}", i, j), 400, -10., 10.);
  513. p_v1_PID_mCent_pt[i][j] = new TProfile(Form("p_v1_PID_mCent_pt_%i_%i", i, j), Form("p_v1_PID_mCent_pt_%i_%i;p_{T}, GeV/c;v_{1}", i, j), 100, 0., 5.);
  514. p_v1_PID_mCent_y[i][j] = new TProfile(Form("p_v1_PID_mCent_y_%i_%i", i, j), Form("p_v1_PID_mCent_y_%i_%i;y;v_{1}", i, j), 400, -10., 10.);
  515. p_v2_PID_mCent_pt[i][j] = new TProfile(Form("p_v2_PID_mCent_pt_%i_%i", i, j), Form("p_v2_PID_mCent_pt_%i_%i;p_{T}, GeV/c;v_{2}", i, j), 100, 0., 5.);
  516. p_v2_PID_mCent_y[i][j] = new TProfile(Form("p_v2_PID_mCent_y_%i_%i", i, j), Form("p_v2_PID_mCent_y_%i_%i;y;v_{2}", i, j), 400, -10., 10.);
  517. p_v3_PID_mCent_pt[i][j] = new TProfile(Form("p_v3_PID_mCent_pt_%i_%i", i, j), Form("p_v3_PID_mCent_pt_%i_%i;p_{T}, GeV/c;v_{2}", i, j), 100, 0., 5.);
  518. p_v3_PID_mCent_y[i][j] = new TProfile(Form("p_v3_PID_mCent_y_%i_%i", i, j), Form("p_v3_PID_mCent_y_%i_%i;y;v_{2}", i, j), 400, -10., 10.);
  519. p_v4_PID_mCent_pt[i][j] = new TProfile(Form("p_v4_PID_mCent_pt_%i_%i", i, j), Form("p_v4_PID_mCent_pt_%i_%i;p_{T}, GeV/c;v_{2}", i, j), 100, 0., 5.);
  520. p_v4_PID_mCent_y[i][j] = new TProfile(Form("p_v4_PID_mCent_y_%i_%i", i, j), Form("p_v4_PID_mCent_y_%i_%i;y;v_{2}", i, j), 400, -10., 10.);
  521. }
  522. }
  523. qaReader_manager *readerManager;
  524. if (qaUtility::GetInstance()->format == "mcpico")
  525. {
  526. readerManager = new qaReader_mcpico();
  527. }
  528. #ifdef _MCINI_
  529. if (qaUtility::GetInstance()->format == "mcini")
  530. {
  531. readerManager = new qaReader_mcini();
  532. }
  533. #endif
  534. #ifdef _PHQMD_
  535. if (qaUtility::GetInstance()->format == "phqmd")
  536. {
  537. readerManager = new qaReader_phqmd();
  538. }
  539. #endif
  540. #ifdef _HSD_ROOT_
  541. if (qaUtility::GetInstance()->format == "hsd")
  542. {
  543. readerManager = new qaReader_hsd_root();
  544. }
  545. #endif
  546. if (qaUtility::GetInstance()->format == "particles")
  547. {
  548. readerManager = new qaReader_smash_root();
  549. }
  550. if (!readerManager)
  551. {
  552. std::cerr << "This input format is not found!" << std::endl;
  553. return 20;
  554. }
  555. readerManager->SetChain(iFileName.Data());
  556. std::vector<Long64_t> vRejectedEvents;
  557. Long64_t Nentries_chain = readerManager->GetEntries();
  558. Long64_t Nentries = (qaUtility::GetInstance()->Nevents > Nentries_chain) ? Nentries_chain : qaUtility::GetInstance()->Nevents;
  559. if (qaUtility::GetInstance()->Nevents == -1)
  560. Nentries = Nentries_chain;
  561. Int_t Nparticles;
  562. Int_t Ncounter_minbias, Ncounter_refmult;
  563. qaEvent *event = nullptr;
  564. qaParticle *particle = nullptr;
  565. Long64_t Absolute_counter = 0;
  566. Long64_t Minbias_counter = 0;
  567. Int_t ipid;
  568. Double_t v1, v2, v3, v4, y;
  569. Int_t eta_w, centBinB, centBinM;
  570. std::vector<qaParticleLight> v_particles_v1;
  571. std::vector<qaParticleLight> v_particles_v2;
  572. std::vector<qaParticleLight> v_particles_v3;
  573. std::vector<qaParticleLight> v_particles_v4;
  574. qaParticleLight light_particle;
  575. while (Minbias_counter < Nentries)
  576. {
  577. if (Minbias_counter % 1000 == 0)
  578. std::cout << "Event [" << Minbias_counter << "/" << Nentries << "]" << std::endl;
  579. event = (qaEvent *)readerManager->ReadEvent(Absolute_counter);
  580. Absolute_counter++;
  581. if (Absolute_counter > Nentries_chain)
  582. break;
  583. if (!event)
  584. continue;
  585. Ncounter_minbias = 0;
  586. Ncounter_refmult = 0;
  587. v_particles_v1.clear();
  588. v_particles_v2.clear();
  589. v_particles_v3.clear();
  590. v_particles_v4.clear();
  591. Nparticles = event->GetNparticles();
  592. for (int iparticle = 0; iparticle < Nparticles; iparticle++)
  593. {
  594. particle = readerManager->ReadParticle(iparticle);
  595. if (!particle)
  596. continue;
  597. if (qaUtility::GetInstance()->Cut_Event_minbias(event) &&
  598. qaUtility::GetInstance()->Cut_Particle_minbias(particle) &&
  599. qaUtility::GetInstance()->Is_minbias == 1)
  600. {
  601. Ncounter_minbias++;
  602. y = 0.5 * TMath::Log((particle->GetEnergy() + particle->GetPz()) / (particle->GetEnergy() - particle->GetPz()));
  603. h_minbias_Particle_pt->Fill(particle->GetPt());
  604. h_minbias_Particle_eta->Fill(particle->GetEta());
  605. h2_minbias_Particle_pteta->Fill(particle->GetEta(), particle->GetPt());
  606. h_minbias_Particle_E->Fill(particle->GetEnergy());
  607. h_minbias_Particle_px->Fill(particle->GetPx());
  608. h_minbias_Particle_py->Fill(particle->GetPy());
  609. h_minbias_Particle_pz->Fill(particle->GetPz());
  610. h_minbias_Particle_t->Fill(particle->GetT());
  611. h_minbias_Particle_x->Fill(particle->GetX());
  612. h_minbias_Particle_y->Fill(particle->GetY());
  613. h_minbias_Particle_z->Fill(particle->GetZ());
  614. h_minbias_Particle_pdg->Fill(particle->GetPdg());
  615. if (particle->GetCharge() > 0)
  616. {
  617. ipid = 0;
  618. }
  619. if (particle->GetCharge() < 0)
  620. {
  621. ipid = 4;
  622. }
  623. if (ipid == 0 || ipid == 4)
  624. {
  625. h_minbias_Particle_PID_pt[ipid]->Fill(particle->GetPt());
  626. h_minbias_Particle_PID_eta[ipid]->Fill(particle->GetEta());
  627. h_minbias_Particle_PID_E[ipid]->Fill(particle->GetEnergy());
  628. h_minbias_Particle_PID_px[ipid]->Fill(particle->GetPx());
  629. h_minbias_Particle_PID_py[ipid]->Fill(particle->GetPy());
  630. h_minbias_Particle_PID_pz[ipid]->Fill(particle->GetPz());
  631. h_minbias_Particle_PID_t[ipid]->Fill(particle->GetT());
  632. h_minbias_Particle_PID_x[ipid]->Fill(particle->GetX());
  633. h_minbias_Particle_PID_y[ipid]->Fill(particle->GetY());
  634. h_minbias_Particle_PID_z[ipid]->Fill(particle->GetZ());
  635. }
  636. ipid = qaUtility::GetInstance()->GetPdgId(particle->GetPdg());
  637. if (ipid != -1 && ipid != 0 && ipid != 4)
  638. {
  639. h_minbias_Particle_PID_pt[ipid]->Fill(particle->GetPt());
  640. h_minbias_Particle_PID_eta[ipid]->Fill(particle->GetEta());
  641. h_minbias_Particle_PID_Y[ipid]->Fill(y);
  642. h_minbias_Particle_PID_E[ipid]->Fill(particle->GetEnergy());
  643. h_minbias_Particle_PID_px[ipid]->Fill(particle->GetPx());
  644. h_minbias_Particle_PID_py[ipid]->Fill(particle->GetPy());
  645. h_minbias_Particle_PID_pz[ipid]->Fill(particle->GetPz());
  646. h_minbias_Particle_PID_t[ipid]->Fill(particle->GetT());
  647. h_minbias_Particle_PID_x[ipid]->Fill(particle->GetX());
  648. h_minbias_Particle_PID_y[ipid]->Fill(particle->GetY());
  649. h_minbias_Particle_PID_z[ipid]->Fill(particle->GetZ());
  650. }
  651. }
  652. if (qaUtility::GetInstance()->Cut_Event_refmult(event) &&
  653. qaUtility::GetInstance()->Cut_Particle_refmult(particle) &&
  654. qaUtility::GetInstance()->Is_refmult == 1)
  655. {
  656. Ncounter_refmult++;
  657. y = 0.5 * TMath::Log((particle->GetEnergy() + particle->GetPz()) / (particle->GetEnergy() - particle->GetPz()));
  658. h_refmult_Particle_pt->Fill(particle->GetPt());
  659. h_refmult_Particle_eta->Fill(particle->GetEta());
  660. h2_refmult_Particle_pteta->Fill(particle->GetEta(), particle->GetPt());
  661. h_refmult_Particle_E->Fill(particle->GetEnergy());
  662. h_refmult_Particle_px->Fill(particle->GetPx());
  663. h_refmult_Particle_py->Fill(particle->GetPy());
  664. h_refmult_Particle_pz->Fill(particle->GetPz());
  665. h_refmult_Particle_t->Fill(particle->GetT());
  666. h_refmult_Particle_x->Fill(particle->GetX());
  667. h_refmult_Particle_y->Fill(particle->GetY());
  668. h_refmult_Particle_z->Fill(particle->GetZ());
  669. h_refmult_Particle_pdg->Fill(particle->GetPdg());
  670. if (particle->GetCharge() > 0)
  671. {
  672. ipid = 0;
  673. }
  674. if (particle->GetCharge() < 0)
  675. {
  676. ipid = 4;
  677. }
  678. if (ipid == 0 || ipid == 4)
  679. {
  680. h_refmult_Particle_PID_pt[ipid]->Fill(particle->GetPt());
  681. h_refmult_Particle_PID_eta[ipid]->Fill(particle->GetEta());
  682. h_refmult_Particle_PID_E[ipid]->Fill(particle->GetEnergy());
  683. h_refmult_Particle_PID_px[ipid]->Fill(particle->GetPx());
  684. h_refmult_Particle_PID_py[ipid]->Fill(particle->GetPy());
  685. h_refmult_Particle_PID_pz[ipid]->Fill(particle->GetPz());
  686. h_refmult_Particle_PID_t[ipid]->Fill(particle->GetT());
  687. h_refmult_Particle_PID_x[ipid]->Fill(particle->GetX());
  688. h_refmult_Particle_PID_y[ipid]->Fill(particle->GetY());
  689. h_refmult_Particle_PID_z[ipid]->Fill(particle->GetZ());
  690. }
  691. ipid = qaUtility::GetInstance()->GetPdgId(particle->GetPdg());
  692. if (ipid != -1 && ipid != 0 && ipid != 4)
  693. {
  694. h_refmult_Particle_PID_pt[ipid]->Fill(particle->GetPt());
  695. h_refmult_Particle_PID_eta[ipid]->Fill(particle->GetEta());
  696. h_refmult_Particle_PID_Y[ipid]->Fill(y);
  697. h_refmult_Particle_PID_E[ipid]->Fill(particle->GetEnergy());
  698. h_refmult_Particle_PID_px[ipid]->Fill(particle->GetPx());
  699. h_refmult_Particle_PID_py[ipid]->Fill(particle->GetPy());
  700. h_refmult_Particle_PID_pz[ipid]->Fill(particle->GetPz());
  701. h_refmult_Particle_PID_t[ipid]->Fill(particle->GetT());
  702. h_refmult_Particle_PID_x[ipid]->Fill(particle->GetX());
  703. h_refmult_Particle_PID_y[ipid]->Fill(particle->GetY());
  704. h_refmult_Particle_PID_z[ipid]->Fill(particle->GetZ());
  705. }
  706. }
  707. if (qaUtility::GetInstance()->Cut_Event_v1(event) &&
  708. qaUtility::GetInstance()->Cut_Particle_v1_acceptance(particle) &&
  709. qaUtility::GetInstance()->Is_v1 == 1)
  710. {
  711. h2_v1_Particle_pteta->Fill(particle->GetEta(), particle->GetPt());
  712. ipid = qaUtility::GetInstance()->GetPdgId(particle->GetPdg());
  713. if (ipid != -1)
  714. {
  715. light_particle.SetParticle(particle);
  716. v_particles_v1.push_back(light_particle);
  717. }
  718. }
  719. if (qaUtility::GetInstance()->Cut_Event_v2(event) &&
  720. qaUtility::GetInstance()->Cut_Particle_v2_acceptance(particle) &&
  721. qaUtility::GetInstance()->Is_v2 == 1)
  722. {
  723. h2_v2_Particle_pteta->Fill(particle->GetEta(), particle->GetPt());
  724. ipid = qaUtility::GetInstance()->GetPdgId(particle->GetPdg());
  725. if (ipid != -1)
  726. {
  727. light_particle.SetParticle(particle);
  728. v_particles_v2.push_back(light_particle);
  729. }
  730. }
  731. if (qaUtility::GetInstance()->Cut_Event_v3(event) &&
  732. qaUtility::GetInstance()->Cut_Particle_v3_acceptance(particle) &&
  733. qaUtility::GetInstance()->Is_v3 == 1)
  734. {
  735. h2_v3_Particle_pteta->Fill(particle->GetEta(), particle->GetPt());
  736. ipid = qaUtility::GetInstance()->GetPdgId(particle->GetPdg());
  737. if (ipid != -1)
  738. {
  739. light_particle.SetParticle(particle);
  740. v_particles_v3.push_back(light_particle);
  741. }
  742. }
  743. if (qaUtility::GetInstance()->Cut_Event_v4(event) &&
  744. qaUtility::GetInstance()->Cut_Particle_v4_acceptance(particle) &&
  745. qaUtility::GetInstance()->Is_v4 == 1)
  746. {
  747. h2_v4_Particle_pteta->Fill(particle->GetEta(), particle->GetPt());
  748. ipid = qaUtility::GetInstance()->GetPdgId(particle->GetPdg());
  749. if (ipid != -1)
  750. {
  751. light_particle.SetParticle(particle);
  752. v_particles_v4.push_back(light_particle);
  753. }
  754. }
  755. delete particle;
  756. }
  757. // Loop over v1-related particles
  758. centBinB = qaUtility::GetInstance()->GetCentralityBin(event->GetB(), qaUtility::GetInstance()->Cut_v1_Event_bCent);
  759. centBinM = qaUtility::GetInstance()->GetCentMultBin(Ncounter_refmult, qaUtility::GetInstance()->Cut_v1_Event_mCent);
  760. if (centBinB != -1) h2_v1_Event_bCent_b_Mult[centBinB]->Fill(Ncounter_refmult, event->GetB());
  761. if (centBinM != -1) h2_v1_Event_mCent_b_Mult[centBinM]->Fill(Ncounter_refmult, event->GetB());
  762. if (qaUtility::GetInstance()->Is_v1 == 1)
  763. {
  764. for (const auto &lparticle : v_particles_v1)
  765. {
  766. v1 = TMath::Cos(1. * (lparticle.GetPhi() - event->GetPhiRP()));
  767. eta_w = 1; //(particle->GetEta() >= 0.) ? 1 : -1;
  768. ipid = qaUtility::GetInstance()->GetPdgId(lparticle.GetPdg());
  769. // if (ipid != -1) p3_v1_PID_b_pt_y[ipid]->Fill(lparticle.GetPt(), lparticle.GetRapidity(), event->GetB(), v1);
  770. if (ipid != -1 && centBinB != -1) p2_v1_PID_y_pt[centBinB][ipid]->Fill(lparticle.GetPt(), lparticle.GetRapidity(), v1);
  771. if (qaUtility::GetInstance()->Cut_Particle_v1_PID_pt(lparticle, ipid))
  772. {
  773. p2_v1_PID_b_pt[ipid]->Fill(lparticle.GetPt(), event->GetB(), v1 * eta_w);
  774. p2_v1_PID_M_pt[ipid]->Fill(lparticle.GetPt(), Ncounter_refmult, v1 * eta_w);
  775. if (centBinB != -1)
  776. p_v1_PID_bCent_pt[centBinB][ipid]->Fill(lparticle.GetPt(), v1 * eta_w);
  777. if (centBinM != -1)
  778. p_v1_PID_mCent_pt[centBinM][ipid]->Fill(lparticle.GetPt(), v1 * eta_w);
  779. }
  780. if (qaUtility::GetInstance()->Cut_Particle_v1_PID_y(lparticle, ipid))
  781. {
  782. p2_v1_PID_b_y[ipid]->Fill(lparticle.GetRapidity(), event->GetB(), v1);
  783. p2_v1_PID_M_y[ipid]->Fill(lparticle.GetRapidity(), Ncounter_refmult, v1);
  784. if (centBinB != -1)
  785. p_v1_PID_bCent_y[centBinB][ipid]->Fill(lparticle.GetRapidity(), v1);
  786. if (centBinM != -1)
  787. p_v1_PID_mCent_y[centBinM][ipid]->Fill(lparticle.GetRapidity(), v1);
  788. }
  789. }
  790. }
  791. // Loop over v2-related particles
  792. centBinB = qaUtility::GetInstance()->GetCentralityBin(event->GetB(), qaUtility::GetInstance()->Cut_v2_Event_bCent);
  793. centBinM = qaUtility::GetInstance()->GetCentMultBin(Ncounter_refmult, qaUtility::GetInstance()->Cut_v2_Event_mCent);
  794. if (centBinB != -1) h2_v2_Event_bCent_b_Mult[centBinB]->Fill(Ncounter_refmult, event->GetB());
  795. if (centBinM != -1) h2_v2_Event_mCent_b_Mult[centBinM]->Fill(Ncounter_refmult, event->GetB());
  796. if (qaUtility::GetInstance()->Is_v2 == 1)
  797. {
  798. for (const auto &lparticle : v_particles_v2)
  799. {
  800. v2 = TMath::Cos(2. * (lparticle.GetPhi() - event->GetPhiRP()));
  801. ipid = qaUtility::GetInstance()->GetPdgId(lparticle.GetPdg());
  802. // if (ipid != -1) p3_v2_PID_b_pt_y[ipid]->Fill(lparticle.GetPt(), lparticle.GetRapidity(), event->GetB(), v2);
  803. if (ipid != -1 && centBinB != -1) p2_v2_PID_y_pt[centBinB][ipid]->Fill(lparticle.GetPt(), lparticle.GetRapidity(), v2);
  804. if (qaUtility::GetInstance()->Cut_Particle_v2_PID_pt(lparticle, ipid))
  805. {
  806. p2_v2_PID_b_pt[ipid]->Fill(lparticle.GetPt(), event->GetB(), v2);
  807. p2_v2_PID_M_pt[ipid]->Fill(lparticle.GetPt(), Ncounter_refmult, v2);
  808. if (centBinB != -1)
  809. p_v2_PID_bCent_pt[centBinB][ipid]->Fill(lparticle.GetPt(), v2);
  810. if (centBinM != -1)
  811. p_v2_PID_mCent_pt[centBinM][ipid]->Fill(lparticle.GetPt(), v2);
  812. }
  813. if (qaUtility::GetInstance()->Cut_Particle_v2_PID_y(lparticle, ipid))
  814. {
  815. p2_v2_PID_b_y[ipid]->Fill(lparticle.GetRapidity(), event->GetB(), v2);
  816. p2_v2_PID_M_y[ipid]->Fill(lparticle.GetRapidity(), Ncounter_refmult, v2);
  817. if (centBinB != -1)
  818. p_v2_PID_bCent_y[centBinB][ipid]->Fill(lparticle.GetRapidity(), v2);
  819. if (centBinM != -1)
  820. p_v2_PID_mCent_y[centBinM][ipid]->Fill(lparticle.GetRapidity(), v2);
  821. }
  822. }
  823. }
  824. // Loop over v3-related particles
  825. centBinB = qaUtility::GetInstance()->GetCentralityBin(event->GetB(), qaUtility::GetInstance()->Cut_v3_Event_bCent);
  826. centBinM = qaUtility::GetInstance()->GetCentMultBin(Ncounter_refmult, qaUtility::GetInstance()->Cut_v3_Event_mCent);
  827. if (centBinB != -1) h2_v3_Event_bCent_b_Mult[centBinB]->Fill(Ncounter_refmult, event->GetB());
  828. if (centBinM != -1) h2_v3_Event_mCent_b_Mult[centBinM]->Fill(Ncounter_refmult, event->GetB());
  829. if (qaUtility::GetInstance()->Is_v3 == 1)
  830. {
  831. for (const auto &lparticle : v_particles_v3)
  832. {
  833. v3 = TMath::Cos(3. * (lparticle.GetPhi() - event->GetPhiRP()));
  834. ipid = qaUtility::GetInstance()->GetPdgId(lparticle.GetPdg());
  835. // if (ipid != -1) p3_v3_PID_b_pt_y[ipid]->Fill(lparticle.GetPt(), lparticle.GetRapidity(), event->GetB(), v3);
  836. if (ipid != -1 && centBinB != -1) p2_v3_PID_y_pt[centBinB][ipid]->Fill(lparticle.GetPt(), lparticle.GetRapidity(), v3);
  837. if (qaUtility::GetInstance()->Cut_Particle_v3_PID_pt(lparticle, ipid))
  838. {
  839. p2_v3_PID_b_pt[ipid]->Fill(lparticle.GetPt(), event->GetB(), v3);
  840. p2_v3_PID_M_pt[ipid]->Fill(lparticle.GetPt(), Ncounter_refmult, v3);
  841. if (centBinB != -1)
  842. p_v3_PID_bCent_pt[centBinB][ipid]->Fill(lparticle.GetPt(), v3);
  843. if (centBinM != -1)
  844. p_v3_PID_mCent_pt[centBinM][ipid]->Fill(lparticle.GetPt(), v3);
  845. }
  846. if (qaUtility::GetInstance()->Cut_Particle_v3_PID_y(lparticle, ipid))
  847. {
  848. p2_v3_PID_b_y[ipid]->Fill(lparticle.GetRapidity(), event->GetB(), v3);
  849. p2_v3_PID_M_y[ipid]->Fill(lparticle.GetRapidity(), Ncounter_refmult, v3);
  850. if (centBinB != -1)
  851. p_v3_PID_bCent_y[centBinB][ipid]->Fill(lparticle.GetRapidity(), v3);
  852. if (centBinM != -1)
  853. p_v3_PID_mCent_y[centBinM][ipid]->Fill(lparticle.GetRapidity(), v3);
  854. }
  855. }
  856. }
  857. // Loop over v4-related particles
  858. centBinB = qaUtility::GetInstance()->GetCentralityBin(event->GetB(), qaUtility::GetInstance()->Cut_v4_Event_bCent);
  859. centBinM = qaUtility::GetInstance()->GetCentMultBin(Ncounter_refmult, qaUtility::GetInstance()->Cut_v4_Event_mCent);
  860. if (centBinB != -1) h2_v4_Event_bCent_b_Mult[centBinB]->Fill(Ncounter_refmult, event->GetB());
  861. if (centBinM != -1) h2_v4_Event_mCent_b_Mult[centBinM]->Fill(Ncounter_refmult, event->GetB());
  862. if (qaUtility::GetInstance()->Is_v4 == 1)
  863. {
  864. for (const auto &lparticle : v_particles_v4)
  865. {
  866. v4 = TMath::Cos(4. * (lparticle.GetPhi() - event->GetPhiRP()));
  867. ipid = qaUtility::GetInstance()->GetPdgId(lparticle.GetPdg());
  868. // if (ipid != -1) p3_v4_PID_b_pt_y[ipid]->Fill(lparticle.GetPt(), lparticle.GetRapidity(), event->GetB(), v4);
  869. if (ipid != -1 && centBinB != -1) p2_v4_PID_y_pt[centBinB][ipid]->Fill(lparticle.GetPt(), lparticle.GetRapidity(), v4);
  870. if (qaUtility::GetInstance()->Cut_Particle_v4_PID_pt(lparticle, ipid))
  871. {
  872. p2_v4_PID_b_pt[ipid]->Fill(lparticle.GetPt(), event->GetB(), v4);
  873. p2_v4_PID_M_pt[ipid]->Fill(lparticle.GetPt(), Ncounter_refmult, v4);
  874. if (centBinB != -1)
  875. p_v4_PID_bCent_pt[centBinB][ipid]->Fill(lparticle.GetPt(), v4);
  876. if (centBinM != -1)
  877. p_v4_PID_mCent_pt[centBinM][ipid]->Fill(lparticle.GetPt(), v4);
  878. }
  879. if (qaUtility::GetInstance()->Cut_Particle_v4_PID_y(lparticle, ipid))
  880. {
  881. p2_v4_PID_b_y[ipid]->Fill(lparticle.GetRapidity(), event->GetB(), v4);
  882. p2_v4_PID_M_y[ipid]->Fill(lparticle.GetRapidity(), Ncounter_refmult, v4);
  883. if (centBinB != -1)
  884. p_v4_PID_bCent_y[centBinB][ipid]->Fill(lparticle.GetRapidity(), v4);
  885. if (centBinM != -1)
  886. p_v4_PID_mCent_y[centBinM][ipid]->Fill(lparticle.GetRapidity(), v4);
  887. }
  888. }
  889. }
  890. if (qaUtility::GetInstance()->Cut_Event_minbias(event) && qaUtility::GetInstance()->Is_minbias == 1)
  891. {
  892. Minbias_counter++;
  893. h_minbias_Event_b->Fill(event->GetB());
  894. h_minbias_Event_Mult->Fill(Ncounter_minbias);
  895. h2_minbias_Event_b_Mult->Fill(Ncounter_minbias, event->GetB());
  896. }
  897. else
  898. {
  899. vRejectedEvents.push_back(Absolute_counter - 1);
  900. }
  901. if (qaUtility::GetInstance()->Cut_Event_refmult(event) && qaUtility::GetInstance()->Is_refmult == 1)
  902. {
  903. h_refmult_Event_b->Fill(event->GetB());
  904. h_refmult_Event_Mult->Fill(Ncounter_refmult);
  905. h2_refmult_Event_b_Mult->Fill(Ncounter_refmult, event->GetB());
  906. }
  907. delete event;
  908. }
  909. std::cout << "Loop is closed, " << Minbias_counter << " minbias events were counted (" << Absolute_counter << " events in total)." << std::endl;
  910. if (qaUtility::GetInstance()->debug)
  911. {
  912. if (vRejectedEvents.size() > 0)
  913. {
  914. std::cout << vRejectedEvents.size() << " rejected events:" << std::endl;
  915. for (Long64_t ire = 0; ire < (Long64_t)vRejectedEvents.size(); ire++)
  916. {
  917. std::cout << "Event " << vRejectedEvents.at(ire) << std::endl;
  918. }
  919. }
  920. else
  921. {
  922. std::cout << "No rejected events." << std::endl;
  923. }
  924. }
  925. if (qaUtility::GetInstance()->Is_minbias)
  926. {
  927. fo->mkdir("minbias");
  928. fo->cd("minbias");
  929. h_minbias_Event_b->Write();
  930. h_minbias_Event_Mult->Write();
  931. h2_minbias_Event_b_Mult->Write();
  932. h_minbias_Particle_pt->Write();
  933. h_minbias_Particle_eta->Write();
  934. h2_minbias_Particle_pteta->Write();
  935. h_minbias_Particle_E->Write();
  936. h_minbias_Particle_px->Write();
  937. h_minbias_Particle_py->Write();
  938. h_minbias_Particle_pz->Write();
  939. h_minbias_Particle_t->Write();
  940. h_minbias_Particle_x->Write();
  941. h_minbias_Particle_y->Write();
  942. h_minbias_Particle_z->Write();
  943. h_minbias_Particle_pdg->Write();
  944. for (int i = 0; i < qaUtility::GetInstance()->npid; i++)
  945. {
  946. h_minbias_Particle_PID_pt[i]->Write();
  947. h_minbias_Particle_PID_eta[i]->Write();
  948. h_minbias_Particle_PID_Y[i]->Write();
  949. h_minbias_Particle_PID_E[i]->Write();
  950. h_minbias_Particle_PID_px[i]->Write();
  951. h_minbias_Particle_PID_py[i]->Write();
  952. h_minbias_Particle_PID_pz[i]->Write();
  953. h_minbias_Particle_PID_t[i]->Write();
  954. h_minbias_Particle_PID_x[i]->Write();
  955. h_minbias_Particle_PID_y[i]->Write();
  956. h_minbias_Particle_PID_z[i]->Write();
  957. }
  958. }
  959. if (qaUtility::GetInstance()->Is_refmult)
  960. {
  961. fo->mkdir("refmult");
  962. fo->cd("refmult");
  963. h_refmult_Event_b->Write();
  964. h_refmult_Event_Mult->Write();
  965. h2_refmult_Event_b_Mult->Write();
  966. h_refmult_Particle_pt->Write();
  967. h_refmult_Particle_eta->Write();
  968. h2_refmult_Particle_pteta->Write();
  969. h_refmult_Particle_E->Write();
  970. h_refmult_Particle_px->Write();
  971. h_refmult_Particle_py->Write();
  972. h_refmult_Particle_pz->Write();
  973. h_refmult_Particle_t->Write();
  974. h_refmult_Particle_x->Write();
  975. h_refmult_Particle_y->Write();
  976. h_refmult_Particle_z->Write();
  977. h_refmult_Particle_pdg->Write();
  978. for (int i = 0; i < qaUtility::GetInstance()->npid; i++)
  979. {
  980. h_refmult_Particle_PID_pt[i]->Write();
  981. h_refmult_Particle_PID_eta[i]->Write();
  982. h_refmult_Particle_PID_E[i]->Write();
  983. h_refmult_Particle_PID_px[i]->Write();
  984. h_refmult_Particle_PID_py[i]->Write();
  985. h_refmult_Particle_PID_pz[i]->Write();
  986. h_refmult_Particle_PID_t[i]->Write();
  987. h_refmult_Particle_PID_x[i]->Write();
  988. h_refmult_Particle_PID_y[i]->Write();
  989. h_refmult_Particle_PID_z[i]->Write();
  990. }
  991. }
  992. if (qaUtility::GetInstance()->Is_v1)
  993. {
  994. fo->mkdir("v1");
  995. fo->cd("v1");
  996. h2_v1_Particle_pteta->Write();
  997. for (int i = 0; i < (int)qaUtility::GetInstance()->Cut_v1_Event_bCent.size() - 1; i++)
  998. {
  999. h2_v1_Event_bCent_b_Mult[i]->Write();
  1000. for (int j = 0; j < qaUtility::GetInstance()->npid; j++)
  1001. {
  1002. p_v1_PID_bCent_pt[i][j]->Write();
  1003. p_v1_PID_bCent_y[i][j]->Write();
  1004. }
  1005. }
  1006. for (int i = 0; i < (int)qaUtility::GetInstance()->Cut_v1_Event_mCent.size() - 1; i++)
  1007. {
  1008. h2_v1_Event_mCent_b_Mult[i]->Write();
  1009. for (int j = 0; j < qaUtility::GetInstance()->npid; j++)
  1010. {
  1011. p_v1_PID_mCent_pt[i][j]->Write();
  1012. p_v1_PID_mCent_y[i][j]->Write();
  1013. }
  1014. }
  1015. // for (int i = 0; i < qaUtility::GetInstance()->npid; i++)
  1016. // {
  1017. // p3_v1_PID_b_pt_y[i]->Write();
  1018. // }
  1019. for (int i = 0; i < (int)qaUtility::GetInstance()->Cut_v1_Event_bCent.size() - 1; i++)
  1020. {
  1021. for (int j = 0; j < qaUtility::GetInstance()->npid; j++)
  1022. {
  1023. p2_v1_PID_y_pt[i][j]->Write();
  1024. }
  1025. }
  1026. for (int i = 0; i < qaUtility::GetInstance()->npid; i++)
  1027. {
  1028. p2_v1_PID_b_pt[i]->Write();
  1029. p2_v1_PID_b_y[i]->Write();
  1030. }
  1031. for (int i = 0; i < qaUtility::GetInstance()->npid; i++)
  1032. {
  1033. p2_v1_PID_M_pt[i]->Write();
  1034. p2_v1_PID_M_y[i]->Write();
  1035. }
  1036. }
  1037. if (qaUtility::GetInstance()->Is_v2)
  1038. {
  1039. fo->mkdir("v2");
  1040. fo->cd("v2");
  1041. h2_v2_Particle_pteta->Write();
  1042. for (int i = 0; i < (int)qaUtility::GetInstance()->Cut_v2_Event_bCent.size() - 1; i++)
  1043. {
  1044. h2_v2_Event_bCent_b_Mult[i]->Write();
  1045. for (int j = 0; j < qaUtility::GetInstance()->npid; j++)
  1046. {
  1047. p_v2_PID_bCent_pt[i][j]->Write();
  1048. p_v2_PID_bCent_y[i][j]->Write();
  1049. }
  1050. }
  1051. for (int i = 0; i < (int)qaUtility::GetInstance()->Cut_v2_Event_mCent.size() - 1; i++)
  1052. {
  1053. h2_v2_Event_mCent_b_Mult[i]->Write();
  1054. for (int j = 0; j < qaUtility::GetInstance()->npid; j++)
  1055. {
  1056. p_v2_PID_mCent_pt[i][j]->Write();
  1057. p_v2_PID_mCent_y[i][j]->Write();
  1058. }
  1059. }
  1060. // for (int i = 0; i < qaUtility::GetInstance()->npid; i++)
  1061. // {
  1062. // p3_v2_PID_b_pt_y[i]->Write();
  1063. // }
  1064. for (int i = 0; i < (int)qaUtility::GetInstance()->Cut_v2_Event_bCent.size() - 1; i++)
  1065. {
  1066. for (int j = 0; j < qaUtility::GetInstance()->npid; j++)
  1067. {
  1068. p2_v2_PID_y_pt[i][j]->Write();
  1069. }
  1070. }
  1071. for (int i = 0; i < qaUtility::GetInstance()->npid; i++)
  1072. {
  1073. p2_v2_PID_b_pt[i]->Write();
  1074. p2_v2_PID_b_y[i]->Write();
  1075. }
  1076. for (int i = 0; i < qaUtility::GetInstance()->npid; i++)
  1077. {
  1078. p2_v2_PID_M_pt[i]->Write();
  1079. p2_v2_PID_M_y[i]->Write();
  1080. }
  1081. }
  1082. if (qaUtility::GetInstance()->Is_v3)
  1083. {
  1084. fo->mkdir("v3");
  1085. fo->cd("v3");
  1086. h2_v3_Particle_pteta->Write();
  1087. for (int i = 0; i < (int)qaUtility::GetInstance()->Cut_v3_Event_bCent.size() - 1; i++)
  1088. {
  1089. h2_v3_Event_bCent_b_Mult[i]->Write();
  1090. for (int j = 0; j < qaUtility::GetInstance()->npid; j++)
  1091. {
  1092. p_v3_PID_bCent_pt[i][j]->Write();
  1093. p_v3_PID_bCent_y[i][j]->Write();
  1094. }
  1095. }
  1096. for (int i = 0; i < (int)qaUtility::GetInstance()->Cut_v3_Event_mCent.size() - 1; i++)
  1097. {
  1098. h2_v3_Event_mCent_b_Mult[i]->Write();
  1099. for (int j = 0; j < qaUtility::GetInstance()->npid; j++)
  1100. {
  1101. p_v3_PID_mCent_pt[i][j]->Write();
  1102. p_v3_PID_mCent_y[i][j]->Write();
  1103. }
  1104. }
  1105. // for (int i = 0; i < qaUtility::GetInstance()->npid; i++)
  1106. // {
  1107. // p3_v3_PID_b_pt_y[i]->Write();
  1108. // }
  1109. for (int i = 0; i < (int)qaUtility::GetInstance()->Cut_v3_Event_bCent.size() - 1; i++)
  1110. {
  1111. for (int j = 0; j < qaUtility::GetInstance()->npid; j++)
  1112. {
  1113. p2_v3_PID_y_pt[i][j]->Write();
  1114. }
  1115. }
  1116. for (int i = 0; i < qaUtility::GetInstance()->npid; i++)
  1117. {
  1118. p2_v3_PID_b_pt[i]->Write();
  1119. p2_v3_PID_b_y[i]->Write();
  1120. }
  1121. for (int i = 0; i < qaUtility::GetInstance()->npid; i++)
  1122. {
  1123. p2_v3_PID_M_pt[i]->Write();
  1124. p2_v3_PID_M_y[i]->Write();
  1125. }
  1126. }
  1127. if (qaUtility::GetInstance()->Is_v4)
  1128. {
  1129. fo->mkdir("v4");
  1130. fo->cd("v4");
  1131. h2_v4_Particle_pteta->Write();
  1132. for (int i = 0; i < (int)qaUtility::GetInstance()->Cut_v4_Event_bCent.size() - 1; i++)
  1133. {
  1134. h2_v4_Event_bCent_b_Mult[i]->Write();
  1135. for (int j = 0; j < qaUtility::GetInstance()->npid; j++)
  1136. {
  1137. p_v4_PID_bCent_pt[i][j]->Write();
  1138. p_v4_PID_bCent_y[i][j]->Write();
  1139. }
  1140. }
  1141. for (int i = 0; i < (int)qaUtility::GetInstance()->Cut_v4_Event_mCent.size() - 1; i++)
  1142. {
  1143. h2_v4_Event_mCent_b_Mult[i]->Write();
  1144. for (int j = 0; j < qaUtility::GetInstance()->npid; j++)
  1145. {
  1146. p_v4_PID_mCent_pt[i][j]->Write();
  1147. p_v4_PID_mCent_y[i][j]->Write();
  1148. }
  1149. }
  1150. // for (int i = 0; i < qaUtility::GetInstance()->npid; i++)
  1151. // {
  1152. // p3_v4_PID_b_pt_y[i]->Write();
  1153. // }
  1154. for (int i = 0; i < (int)qaUtility::GetInstance()->Cut_v4_Event_bCent.size() - 1; i++)
  1155. {
  1156. for (int j = 0; j < qaUtility::GetInstance()->npid; j++)
  1157. {
  1158. p2_v4_PID_y_pt[i][j]->Write();
  1159. }
  1160. }
  1161. for (int i = 0; i < qaUtility::GetInstance()->npid; i++)
  1162. {
  1163. p2_v4_PID_b_pt[i]->Write();
  1164. p2_v4_PID_b_y[i]->Write();
  1165. }
  1166. for (int i = 0; i < qaUtility::GetInstance()->npid; i++)
  1167. {
  1168. p2_v4_PID_M_pt[i]->Write();
  1169. p2_v4_PID_M_y[i]->Write();
  1170. }
  1171. }
  1172. fo->Close();
  1173. timer.Stop();
  1174. timer.Print();
  1175. return 0;
  1176. }