MpdFemtoBasicEventCut.cxx 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659
  1. //
  2. // The basic cut for events
  3. //
  4. // C++ headers
  5. #include <limits>
  6. #include <iostream>
  7. // MpdFemtoMakerUser headers
  8. #include "MpdFemtoBasicEventCut.h"
  9. // ROOT headers
  10. #include "TObjString.h"
  11. #include "TMath.h"
  12. #include "TString.h"
  13. ClassImp(MpdFemtoBasicEventCut)
  14. //_________________
  15. MpdFemtoBasicEventCut::MpdFemtoBasicEventCut() :
  16. MpdFemtoBaseEventCut(),
  17. mCheckBadRun(true),
  18. mRefMult(),
  19. mVertZPos(),
  20. mVpdVzDiff(),
  21. mVertXShift(0),
  22. mVertYShift(0),
  23. mVertRPos(),
  24. mSphericity(),
  25. mBTofTrayMult(),
  26. mBTofMatch(),
  27. mCent9(),
  28. mPsiEP(),
  29. mNEventsPassed(0),
  30. mNEventsFailed(0),
  31. mVerbose(false) {
  32. // Default constructor
  33. mRefMult[0] = -2000;
  34. mRefMult[1] = 30000;
  35. mVertZPos[0] = -20000.;
  36. mVertZPos[1] = 20000.;
  37. mVpdVzDiff[0] = -20000.;
  38. mVpdVzDiff[1] = 20000.;
  39. mVertRPos[0] = -1000.;
  40. mVertRPos[1] = 20000.;
  41. mSphericity[0] = -1000.;
  42. mSphericity[1] = 1000.;
  43. mBTofTrayMult[0] = -30000;
  44. mBTofTrayMult[1] = 30000;
  45. mBTofMatch[0] = -30000;
  46. mBTofMatch[1] = 30000;
  47. mCent9[0] = -2000;
  48. mCent9[1] = 2000;
  49. mPsiEP[0] = -300000.;
  50. mPsiEP[1] = 300000.;
  51. mImpactPar[0] = -0.1;
  52. mImpactPar[1] = 30.;
  53. if (!mTriggersToSelect.empty()) {
  54. mTriggersToSelect.clear();
  55. }
  56. }
  57. //_________________
  58. MpdFemtoBasicEventCut::MpdFemtoBasicEventCut(const MpdFemtoBasicEventCut& c) :
  59. MpdFemtoBaseEventCut(c),
  60. mNEventsPassed(0),
  61. mNEventsFailed(0) {
  62. // Copy constructor
  63. mCheckBadRun = c.mCheckBadRun;
  64. mRefMult[0] = c.mRefMult[0];
  65. mRefMult[1] = c.mRefMult[1];
  66. mVertZPos[0] = c.mVertZPos[0];
  67. mVertZPos[1] = c.mVertZPos[1];
  68. mVpdVzDiff[0] = c.mVpdVzDiff[0];
  69. mVpdVzDiff[1] = c.mVpdVzDiff[1];
  70. mVertXShift = c.mVertXShift;
  71. mVertYShift = c.mVertYShift;
  72. mVertRPos[0] = c.mVertRPos[0];
  73. mVertRPos[1] = c.mVertRPos[1];
  74. mSphericity[0] = c.mSphericity[0];
  75. mSphericity[1] = c.mSphericity[1];
  76. mBTofTrayMult[0] = c.mBTofTrayMult[0];
  77. mBTofTrayMult[1] = c.mBTofTrayMult[1];
  78. mBTofMatch[0] = c.mBTofMatch[0];
  79. mBTofMatch[1] = c.mBTofMatch[1];
  80. mCent9[0] = c.mCent9[0];
  81. mCent9[1] = c.mCent9[1];
  82. mPsiEP[0] = c.mPsiEP[0];
  83. mPsiEP[1] = c.mPsiEP[1];
  84. mImpactPar[0] = c.mImpactPar[0];
  85. mImpactPar[1] = c.mImpactPar[1];
  86. mVerbose = c.mVerbose;
  87. if (mTriggersToSelect.empty()) {
  88. for (unsigned int iIter = 0; iIter < c.mTriggersToSelect.size(); iIter++) {
  89. mTriggersToSelect.push_back(c.mTriggersToSelect.at(iIter));
  90. }
  91. }// if( mTriggersToSelect.empty() )
  92. else {
  93. bool notInList = false;
  94. for (unsigned int iIter1 = 0; iIter1 < c.mTriggersToSelect.size(); iIter1++) {
  95. for (unsigned int iIter2 = 0; iIter2 < mTriggersToSelect.size(); iIter2++) {
  96. if (mTriggersToSelect.at(iIter2) == c.mTriggersToSelect.at(iIter1)) {
  97. continue;
  98. } else {
  99. notInList = true;
  100. break;
  101. }
  102. } // for( unsigned int iIter2=0; iIter2<mTriggersToSelect.size(); iIter2+ )
  103. /// Add trigger that is not in the list
  104. if (notInList) {
  105. mTriggersToSelect.push_back(c.mTriggersToSelect.at(iIter1));
  106. }
  107. } // for( unsigned int iIter1=0; iIter1<c.mTriggersToSelect.size(); iIter1++)
  108. } // else
  109. }
  110. //_________________
  111. MpdFemtoBasicEventCut& MpdFemtoBasicEventCut::operator=(const MpdFemtoBasicEventCut& c) {
  112. // Assignment operator
  113. if (this != &c) {
  114. MpdFemtoBaseEventCut::operator=(c);
  115. mCheckBadRun = c.mCheckBadRun;
  116. mRefMult[0] = c.mRefMult[0];
  117. mRefMult[1] = c.mRefMult[1];
  118. mVertZPos[0] = c.mVertZPos[0];
  119. mVertZPos[1] = c.mVertZPos[1];
  120. mVpdVzDiff[0] = c.mVpdVzDiff[0];
  121. mVpdVzDiff[1] = c.mVpdVzDiff[1];
  122. mVertXShift = c.mVertXShift;
  123. mVertYShift = c.mVertYShift;
  124. mVertRPos[0] = c.mVertRPos[0];
  125. mVertRPos[1] = c.mVertRPos[1];
  126. mSphericity[0] = c.mSphericity[0];
  127. mSphericity[1] = c.mSphericity[1];
  128. mBTofTrayMult[0] = c.mBTofTrayMult[0];
  129. mBTofTrayMult[1] = c.mBTofTrayMult[1];
  130. mBTofMatch[0] = c.mBTofMatch[0];
  131. mBTofMatch[1] = c.mBTofMatch[1];
  132. mCent9[0] = c.mCent9[0];
  133. mCent9[1] = c.mCent9[1];
  134. mPsiEP[0] = c.mPsiEP[0];
  135. mPsiEP[1] = c.mPsiEP[1];
  136. mImpactPar[0] = c.mImpactPar[0];
  137. mImpactPar[1] = c.mImpactPar[1];
  138. mVerbose = c.mVerbose;
  139. if (mTriggersToSelect.empty()) {
  140. for (unsigned int iIter = 0; iIter < c.mTriggersToSelect.size(); iIter++) {
  141. mTriggersToSelect.push_back(c.mTriggersToSelect.at(iIter));
  142. }
  143. }// if( mTriggersToSelect.empty() )
  144. else {
  145. bool notInList = false;
  146. for (unsigned int iIter1 = 0; iIter1 < c.mTriggersToSelect.size(); iIter1++) {
  147. for (unsigned int iIter2 = 0; iIter2 < mTriggersToSelect.size(); iIter2++) {
  148. if (mTriggersToSelect.at(iIter2) == c.mTriggersToSelect.at(iIter1)) {
  149. continue;
  150. } else {
  151. notInList = true;
  152. break;
  153. }
  154. } // for( unsigned int iIter2=0; iIter2<mTriggersToSelect.size(); iIter2+ )
  155. /// Add trigger that is not in the list
  156. if (notInList) {
  157. mTriggersToSelect.push_back(c.mTriggersToSelect.at(iIter1));
  158. }
  159. } // for( unsigned int iIter1=0; iIter1<c.mTriggersToSelect.size(); iIter1++)
  160. } // else
  161. } // if ( this != &c )
  162. return *this;
  163. }
  164. //_________________
  165. MpdFemtoBasicEventCut::~MpdFemtoBasicEventCut() {
  166. // Default destructor
  167. }
  168. //_________________
  169. bool MpdFemtoBasicEventCut::pass(const MpdFemtoEvent* ev) {
  170. // Pass events if they fall within the various multiplicities and z-vertex
  171. // position range. Fail otherwise
  172. if (mVerbose) {
  173. std::cout << "\n--MpdFemtoBasicEventCut-- \n";
  174. }
  175. // Reestimate radial vertex position shifting the center
  176. float vtxR = TMath::Sqrt((ev->primaryVertex().X() - mVertXShift) *
  177. (ev->primaryVertex().X() - mVertXShift) +
  178. (ev->primaryVertex().Y() - mVertYShift) *
  179. (ev->primaryVertex().Y() - mVertYShift));
  180. const bool passes_refMult = ((ev->refMult() >= mRefMult[0]) &&
  181. (ev->refMult() <= mRefMult[1]));
  182. if (mVerbose) {
  183. std::cout << Form("RefMult : %d <= %d <= %d \t %s \n",
  184. mRefMult[0], ev->refMult(), mRefMult[1],
  185. (ev->refMult() >= mRefMult[0] &&
  186. ev->refMult() <= mRefMult[1]) ? "true" : "false");
  187. }
  188. const bool passes_impact = ((ev->impactParameter() >= mImpactPar[0]) &&
  189. (ev->impactParameter() <= mImpactPar[1]));
  190. if (mVerbose) {
  191. std::cout << Form("Impact parameter: %4.2f <= %4.2f <= %4.2f %s\n",
  192. mImpactPar[0], ev->impactParameter(), mImpactPar[1],
  193. (ev->impactParameter() >= mImpactPar[0] &&
  194. ev->impactParameter() <= mImpactPar[1]) ? "true" : "false");
  195. }
  196. const bool passes_z = ((ev->primaryVertex().Z() >= mVertZPos[0]) &&
  197. (ev->primaryVertex().Z() <= mVertZPos[1]));
  198. if (mVerbose) {
  199. std::cout << Form("Vert Z : %5.2f <= %5.2f <= %5.2f \t %s \n",
  200. mVertZPos[0], ev->primaryVertex().Z(), mVertZPos[1],
  201. (ev->primaryVertex().Z() >= mVertZPos[0] &&
  202. ev->primaryVertex().Z() <= mVertZPos[1]) ? "true" : "false");
  203. }
  204. const bool passes_vpd = ((ev->vpdVzDiff() >= mVpdVzDiff[0]) &&
  205. (ev->vpdVzDiff() <= mVpdVzDiff[1]));
  206. if (mVerbose) {
  207. std::cout << Form("Vert Z : %5.2f <= %5.2f <= %5.2f \t %s \n",
  208. mVertZPos[0], ev->primaryVertex().Z(), mVertZPos[1],
  209. (ev->primaryVertex().Z() >= mVertZPos[0] &&
  210. ev->primaryVertex().Z() <= mVertZPos[1]) ? "true" : "false");
  211. }
  212. const bool passes_r = ((vtxR >= mVertRPos[0]) &&
  213. (vtxR <= mVertRPos[1]));
  214. if (mVerbose) {
  215. std::cout << Form("Vert R : %3.2f <= %3.2f <= %3.2f \t %s \n",
  216. mVertRPos[0], vtxR, mVertRPos[1],
  217. (vtxR >= mVertRPos[0] && vtxR <= mVertRPos[1]) ? "true" : "false");
  218. }
  219. const bool passes_sph = ((ev->sphericity() >= mSphericity[0]) &&
  220. (ev->sphericity() <= mSphericity[1]));
  221. if (mVerbose) {
  222. std::cout << Form("Sphericity : %3.2f <= %3.2f <= %3.2f \t %s \n",
  223. mSphericity[0], ev->sphericity(), mSphericity[1],
  224. (ev->sphericity() >= mSphericity[0] &&
  225. ev->sphericity() <= mSphericity[1]) ? "true" : "false");
  226. }
  227. const bool passes_btofmult = ((ev->btofTrayMultiplicity() >= mBTofTrayMult[0]) &&
  228. (ev->btofTrayMultiplicity() <= mBTofTrayMult[1]));
  229. if (mVerbose) {
  230. std::cout << Form("bTofMult : %d <= %d <= %d \t %s \n",
  231. mBTofTrayMult[0], ev->btofTrayMultiplicity(), mBTofTrayMult[1],
  232. (ev->btofTrayMultiplicity() >= mBTofTrayMult[0] &&
  233. ev->btofTrayMultiplicity() <= mBTofTrayMult[1]) ? "true" : "false");
  234. }
  235. const bool passes_btofmatch = ((ev->numberOfBTofMatched() >= mBTofMatch[0]) &&
  236. (ev->numberOfBTofMatched() <= mBTofMatch[1]));
  237. if (mVerbose) {
  238. std::cout << Form("bTofMatched : %d <= %d <= %d \t %s \n",
  239. mBTofMatch[0], ev->numberOfBTofMatched(), mBTofMatch[1],
  240. (ev->numberOfBTofMatched() >= mBTofMatch[0] &&
  241. ev->numberOfBTofMatched() <= mBTofMatch[1]) ? "true" : "false");
  242. }
  243. const bool passes_cent = ((ev->cent9() >= mCent9[0]) &&
  244. (ev->cent9() <= mCent9[1]));
  245. if (mVerbose) {
  246. std::cout << Form("cent9 : %d <= %d <= %d \t %s \n",
  247. mCent9[0], ev->cent9(), mCent9[1],
  248. (ev->cent9() >= mCent9[0] && ev->cent9() <= mCent9[1]) ? "true" : "false");
  249. }
  250. const bool passes_ep = ((ev->eventPlaneAngle() >= mPsiEP[0]) &&
  251. (ev->eventPlaneAngle() <= mPsiEP[1]));
  252. if (mVerbose) {
  253. std::cout << Form("psi : %6.3f <= %6.3f <= %6.3f \t %s \n",
  254. mPsiEP[0], ev->eventPlaneAngle(), mPsiEP[1],
  255. (ev->eventPlaneAngle() >= mPsiEP[0] &&
  256. ev->eventPlaneAngle() <= mPsiEP[1]) ? "true" : "false");
  257. }
  258. const bool passes_run = !mCheckBadRun ? true : !(isInBadRunList(ev->runNumber()));
  259. if (mVerbose) {
  260. std::cout << Form("isGoodRun : %s \n", (passes_run) ? "true" : "false");
  261. }
  262. bool passes_trigger = false;
  263. if (mTriggersToSelect.empty()) {
  264. passes_trigger = true;
  265. }// if ( mTriggersToSelect.empty() )
  266. else {
  267. for (unsigned int iIter = 0; iIter < mTriggersToSelect.size(); iIter++) {
  268. if (ev->isTrigger(mTriggersToSelect.at(iIter))) {
  269. passes_trigger = true;
  270. break;
  271. } // if( ev->isTrigger( mTriggersToSelect.at( iIter ) ) )
  272. } // for ( unsigned int iIter=0; iIter<mTriggersToSelect.size(); iIter++ )
  273. } // else
  274. if (mVerbose) {
  275. std::cout << Form("isGoodTrigger : %s \n", (passes_trigger) ? "true" : "false");
  276. }
  277. const bool goodEvent = (passes_refMult &&
  278. passes_impact &&
  279. passes_z &&
  280. passes_vpd &&
  281. passes_r &&
  282. passes_sph &&
  283. passes_btofmult &&
  284. passes_btofmatch &&
  285. passes_cent &&
  286. passes_ep &&
  287. passes_run &&
  288. passes_trigger);
  289. if (mVerbose) {
  290. std::cout << Form("isGoodEvent : %s \n", (goodEvent) ? "true" : "false");
  291. }
  292. goodEvent ? mNEventsPassed++ : mNEventsFailed++;
  293. return goodEvent;
  294. }
  295. //_________________
  296. TList* MpdFemtoBasicEventCut::appendSettings(TList *settings, const TString &prefix) const {
  297. settings->AddVector(
  298. new TObjString(prefix + TString::Format("MpdFemtoBasicEventCut.refMult.min=%d", mRefMult[0])),
  299. new TObjString(prefix + TString::Format("MpdFemtoBasicEventCut.refMult.max=%d", mRefMult[1])),
  300. new TObjString(prefix + TString::Format("MpdFemtoBasicEventCut.impactPar.min=%4.2f", mImpactPar[0])),
  301. new TObjString(prefix + TString::Format("MpdFemtoBasicEventCut.impactPar.max=%4.2f", mImpactPar[1])),
  302. new TObjString(prefix + TString::Format("MpdFemtoBasicEventCut.vtxZ.min=%f", mVertZPos[0])),
  303. new TObjString(prefix + TString::Format("MpdFemtoBasicEventCut.vtxZ.max=%f", mVertZPos[1])),
  304. new TObjString(prefix + TString::Format("MpdFemtoBasicEventCut.vpdVzDiff.min=%f", mVpdVzDiff[0])),
  305. new TObjString(prefix + TString::Format("MpdFemtoBasicEventCut.vpdVzDiff.max=%f", mVpdVzDiff[1])),
  306. new TObjString(prefix + TString::Format("MpdFemtoBasicEventCut.vtxR.min=%f", mVertRPos[0])),
  307. new TObjString(prefix + TString::Format("MpdFemtoBasicEventCut.vtxR.max=%f", mVertRPos[1])),
  308. new TObjString(prefix + TString::Format("MpdFemtoBasicEventCut.spher.min=%f", mSphericity[0])),
  309. new TObjString(prefix + TString::Format("MpdFemtoBasicEventCut.spher.max=%f", mSphericity[1])),
  310. new TObjString(prefix + TString::Format("MpdFemtoBasicEventCut.btofTrayMult.min=%d", mBTofTrayMult[0])),
  311. new TObjString(prefix + TString::Format("MpdFemtoBasicEventCut.btofTrayMult.max=%d", mBTofTrayMult[1])),
  312. new TObjString(prefix + TString::Format("MpdFemtoBasicEventCut.btofMatch.min=%d", mBTofMatch[0])),
  313. new TObjString(prefix + TString::Format("MpdFemtoBasicEventCut.btofMatch.max=%d", mBTofMatch[1])),
  314. new TObjString(prefix + TString::Format("MpdFemtoBasicEventCut.cent9.min=%d", mCent9[0])),
  315. new TObjString(prefix + TString::Format("MpdFemtoBasicEventCut.cent9.max=%d", mCent9[1])),
  316. new TObjString(prefix + TString::Format("MpdFemtoBasicEventCut.psiep.min=%f", mPsiEP[0])),
  317. new TObjString(prefix + TString::Format("MpdFemtoBasicEventCut.psiep.max=%f", mPsiEP[1])),
  318. NULL);
  319. return settings;
  320. }
  321. //_________________
  322. MpdFemtoString MpdFemtoBasicEventCut::report() {
  323. // Prepare report
  324. TString report = TString::Format("refMult :\t %d - %d\n", mRefMult[0], mRefMult[1]);
  325. report += TString::Format("Impact parameter :\t %f - %f\n", mImpactPar[0], mImpactPar[1]);
  326. report += TString::Format("Vertex Z-position :\t %f - %f\n", mVertZPos[0], mVertZPos[1]);
  327. report += TString::Format("VpdVz - Vz :\t %f - %f\n", mVpdVzDiff[0], mVpdVzDiff[1]);
  328. report += TString::Format("Vertex X and Y shifts:\t %f, %f\n", mVertXShift, mVertYShift);
  329. report += TString::Format("Vertex R :\t %f - %f\n", mVertRPos[0], mVertRPos[1]);
  330. report += TString::Format("Sphericity :\t %f - %f\n", mSphericity[0], mSphericity[1]);
  331. report += TString::Format("BTOF tray mult :\t %d - %d\n", mBTofTrayMult[0], mBTofTrayMult[1]);
  332. report += TString::Format("BTOF matched :\t %d - %d\n", mBTofMatch[0], mBTofMatch[1]);
  333. report += TString::Format("Centrality (9 bins) :\t %d - %d\n", mCent9[0], mCent9[1]);
  334. report += TString::Format("Event plane angle :\t %f - %f\n", mPsiEP[0], mPsiEP[1]);
  335. report += TString::Format("List of triggers:\n");
  336. for (unsigned int iIter = 0; iIter < mTriggersToSelect.size(); iIter++) {
  337. report += TString::Format(" %u ", mTriggersToSelect.at(iIter));
  338. }
  339. report += TString::Format("Number of events which passed:\t%u Number which failed:\t%u\n",
  340. mNEventsPassed, mNEventsFailed);
  341. return MpdFemtoString((const char *) report);
  342. }
  343. //_________________
  344. bool MpdFemtoBasicEventCut::isInBadRunList(int runNumber) {
  345. // Compare current run number with the bad run list
  346. bool isIn_7gev = (std::find(bad_run_list_7gev.begin(), bad_run_list_7gev.end(), runNumber) != bad_run_list_7gev.end());
  347. bool isIn_11gev = (std::find(bad_run_list_11gev.begin(), bad_run_list_11gev.end(), runNumber) != bad_run_list_11gev.end());
  348. bool isIn_14gev = (std::find(bad_run_list_14gev.begin(), bad_run_list_14gev.end(), runNumber) != bad_run_list_14gev.end());
  349. bool isIn_19gev = (std::find(bad_run_list_19gev.begin(), bad_run_list_19gev.end(), runNumber) != bad_run_list_19gev.end());
  350. bool isIn_27gev = (std::find(bad_run_list_27gev.begin(), bad_run_list_27gev.end(), runNumber) != bad_run_list_27gev.end());
  351. bool isIn_39gev = (std::find(bad_run_list_39gev.begin(), bad_run_list_39gev.end(), runNumber) != bad_run_list_39gev.end());
  352. bool isIn_62gev = (std::find(bad_run_list_62gev.begin(), bad_run_list_62gev.end(), runNumber) != bad_run_list_62gev.end());
  353. bool isIn_200gev = (std::find(bad_run_list_200gev.begin(), bad_run_list_200gev.end(), runNumber) != bad_run_list_200gev.end());
  354. bool isIn_dau200_r16 = (std::find(bad_run_list_dau200_2016.begin(), bad_run_list_dau200_2016.end(), runNumber) != bad_run_list_dau200_2016.end());
  355. bool isIn_he3au_r14 = (std::find(bad_run_list_he3au200_2014.begin(), bad_run_list_he3au200_2014.end(), runNumber) != bad_run_list_he3au200_2014.end());
  356. return ( isIn_7gev || isIn_11gev || isIn_14gev || isIn_19gev || isIn_27gev ||
  357. isIn_39gev || isIn_62gev || isIn_200gev || isIn_dau200_r16 || isIn_he3au_r14);
  358. }
  359. //_________________
  360. void MpdFemtoBasicEventCut::addTriggerId(const unsigned int& id) {
  361. // If trigger list is not empty then loop over it
  362. // and check if the new trigger already in.
  363. if (!mTriggersToSelect.empty()) {
  364. // Assume that the new trigger is not in the list
  365. Bool_t isUsed = false;
  366. // Loop over the trigger list
  367. for (UInt_t iIter = 0; iIter < mTriggersToSelect.size(); iIter++) {
  368. // Compare triggers
  369. if (mTriggersToSelect.at(iIter) == id) {
  370. isUsed = true;
  371. }
  372. } //(unsigned int iIter=0; iIter<mTriggerIds.size(); iIter++)
  373. // If the trigger not in the list then add it
  374. if (!isUsed) {
  375. mTriggersToSelect.push_back(id);
  376. }
  377. }//if( !mTriggerIds.empty() )
  378. else {
  379. mTriggersToSelect.push_back(id);
  380. }
  381. }
  382. //_________________
  383. const std::vector<unsigned int> MpdFemtoBasicEventCut::bad_run_list_7gev = {
  384. 11114084, 11114085, 11114086, 11114088, 11114089, 11114094, 11114095, 11114100,
  385. 11114109, 11115005, 11115007, 11115013, 11115019, 11115025, 11115027, 11115028,
  386. 11115030, 11115032, 11115051, 11115062, 11115064, 11115069, 11115072, 11115078,
  387. 11115079, 11115080, 11115086, 11115088, 11115094, 11116001, 11116002, 11116005,
  388. 11116006, 11116010, 11116014, 11116020, 11116023, 11116028, 11116060, 11116061,
  389. 11116062, 11116064, 11116068, 11116070, 11116072, 11116073, 11116075, 11117002,
  390. 11117006, 11117031, 11117033, 11117034, 11117036, 11117039, 11117044, 11117045,
  391. 11117046, 11117052, 11117055, 11117063, 11117064, 11117071, 11117075, 11117085,
  392. 11117088, 11117089, 11117090, 11117093, 11117094, 11117095, 11117098, 11117100,
  393. 11117103, 11117104, 11117107, 11118007, 11118008, 11118016, 11118024, 11118025,
  394. 11118026, 11118039, 11118044, 11119001, 11119003, 11119006, 11119007, 11119009,
  395. 11119012, 11119013, 11119015, 11119016, 11119017, 11119022, 11119024, 11119026,
  396. 11119029, 11119030, 11119056, 11119057, 11119060, 11119062, 11119067, 11119069,
  397. 11119070, 11119071, 11119074, 11119075, 11119077, 11119079, 11119081, 11119090,
  398. 11119091, 11119100, 11119101, 11120003, 11120006, 11120008, 11120011, 11120014,
  399. 11120019, 11120023, 11120030, 11120034, 11120037, 11120039, 11120040, 11120045,
  400. 11120052, 11120057, 11120062, 11120063, 11120069, 11120070, 11120071, 11120074,
  401. 11120077, 11120078, 11120084, 11120092, 11121006, 11121014, 11121015, 11121019,
  402. 11121029, 11121030, 11121034, 11121035, 11121043, 11121044, 11121054, 11121058,
  403. 11121066, 11121067, 11121070, 11121075, 11121082, 11122001, 11122007, 11122008,
  404. 11122010, 11122017, 11122024, 11122037, 11122038, 11122047, 11122048, 11122049,
  405. 11122050, 11122053, 11122058, 11122062, 11122069, 11122073, 11122078, 11122085,
  406. 11122097, 11123003, 11123004, 11123015, 11123026, 11123028, 11123040, 11123044,
  407. 11123055, 11123057, 11123058, 11123059, 11123067, 11123075, 11123076, 11123077,
  408. 11123079, 11123081, 11123084, 11123086, 11123088, 11123089, 11123093, 11123094,
  409. 11123095, 11123100, 11123101, 11123102, 11123104, 11124001, 11124005, 11124007,
  410. 11124008, 11124015, 11124016, 11124018, 11124041, 11124046, 11124050, 11124051,
  411. 11124052, 11124053, 11124058, 11124060, 11124061, 11124062, 11124063, 11124064,
  412. 11124065, 11124066, 11124069, 11125002, 11125003, 11125004, 11125005, 11125006,
  413. 11125008, 11125012, 11125013, 11125014, 11125015, 11125016, 11125017, 11125020,
  414. 11125021, 11125022, 11125023, 11125073, 11125081, 11125089, 11125090, 11125096,
  415. 11125097, 11126005, 11126006, 11126007, 11126016, 11126018, 11126022, 11126023,
  416. 11127001, 11127002, 11127043, 11128005, 11128012, 11128018, 11128050, 11128056,
  417. 11128072, 11129018, 11129022, 11129028, 11129051, 11130027, 11130034, 11130057,
  418. 11131038, 11131062, 11132013, 11132070, 11133006, 11133019, 11134053, 11134060,
  419. 11134067, 11134076, 11135068, 11136003, 11136005, 11136006, 11136007, 11136008,
  420. 11136012, 11136013, 11136014, 11136061, 11136076, 11136101, 11136130, 11136160,
  421. 11136163, 11137019, 11138027, 11138049, 11138086, 11138124, 11139014, 11140076,
  422. 11140086, 11141063, 11142117, 11143026, 11143028, 11144001, 11144009, 11144031,
  423. 11144033, 11144040, 11144043, 11144052, 11145008, 11145028, 11145035, 11146061,
  424. 11146076, 11146079, 11147004, 11147006, 11147014, 11147017, 11147021, 11147023
  425. };
  426. //_________________
  427. const std::vector<unsigned int> MpdFemtoBasicEventCut::bad_run_list_11gev = {
  428. 11148039, 11148045, 11149001, 11149008, 11149010, 11149011, 11149015, 11149047,
  429. 11150016, 11150025, 11150028, 11151036, 11151040, 11151050, 11152016, 11152036,
  430. 11152078, 11153032, 11153042, 11155001, 11155009, 11156003, 11156009, 11157012,
  431. 11158006, 11158022, 11158024
  432. };
  433. //_________________
  434. const std::vector<unsigned int> MpdFemtoBasicEventCut::bad_run_list_14gev = {
  435. 999
  436. };
  437. //_________________
  438. const std::vector<unsigned int> MpdFemtoBasicEventCut::bad_run_list_19gev = {
  439. 12113091, 12114007, 12114035, 12114078, 12114092, 12114116, 12115009, 12115014,
  440. 12115015, 12115016, 12115018, 12115019, 12115020, 12115022, 12115023, 12115062,
  441. 12115073, 12115093, 12115094, 12116012, 12116054, 12117010, 12117016, 12117020,
  442. 12117065, 12119040, 12119042, 12120017, 12120026, 12121017, 12121022, 12121034,
  443. 12121050, 12121067, 12122019
  444. };
  445. //_________________
  446. const std::vector<unsigned int> MpdFemtoBasicEventCut::bad_run_list_27gev = {
  447. 12172050, 12172051, 12172055, 12173030, 12173031, 12173032, 12173033, 12173034,
  448. 12174067, 12174085, 12175062, 12175087, 12175113, 12175114, 12175115, 12176001,
  449. 12176044, 12176054, 12176071, 12177015, 12177061, 12177092, 12177099, 12177101,
  450. 12177106, 12177107, 12177108, 12178003, 12178004, 12178005, 12178006, 12178013,
  451. 12178099, 12178120
  452. };
  453. //_________________
  454. const std::vector<unsigned int> MpdFemtoBasicEventCut::bad_run_list_39gev = {
  455. 11199124, 11100002, 11100045, 11101046, 11102012, 11102051, 11102052, 11102053,
  456. 11102054, 11102055, 11102058, 11103035, 11103056, 11103058, 11103092, 11103093,
  457. 11105052, 11105053, 11105054, 11105055, 11107007, 11107042, 11107057, 11107061,
  458. 11107065, 11107074, 11108101, 11109013, 11109077, 11109088, 11109090, 11109127,
  459. 11110013, 11110034, 11110073, 11110076, 11111084, 11111085
  460. };
  461. //_________________
  462. const std::vector<unsigned int> MpdFemtoBasicEventCut::bad_run_list_62gev = {
  463. 11080072, 11081023, 11081025, 11082012, 11082013, 11082046, 11082056, 11082057,
  464. 11084009, 11084011, 11084012, 11084013, 11084020, 11084021, 11084035, 11084044,
  465. 11084064, 11085015, 11085025, 11085030, 11085046, 11085055, 11085056, 11085057,
  466. 11086005, 11086007, 11087001, 11087002, 11087003, 11087004, 11088013, 11089026,
  467. 11089028, 11089029, 11089055, 11089068, 11089072, 11091007, 11091015, 11091021,
  468. 11091078, 11092010, 11092011, 11092012, 11092032, 11092033, 11092034, 11092067,
  469. 11092096, 11093001, 11094016, 11094017, 11094018, 11094019, 11094020, 11094021,
  470. 11094022, 11094023, 11094024, 11094027, 11094028, 11094042, 11094044, 11094045,
  471. 11094046, 11094047, 11094048, 11094050, 11094051, 11094052, 11094053, 11094054,
  472. 11094055, 11094074, 11094075, 11094077, 11095001, 11095002, 11095003, 11095004,
  473. 11095005, 11095006, 11095009, 11095010, 11095011, 11095012, 11095013, 11095014,
  474. 11095015, 11095022, 11095040, 11095048, 11095050, 11095051, 11095061, 11095062,
  475. 11095063, 11095064, 11095082, 11095087, 11096024, 11096039, 11096043, 11096044,
  476. 11097093
  477. };
  478. //_________________
  479. const std::vector<unsigned int> MpdFemtoBasicEventCut::bad_run_list_200gev = {
  480. 11002120, 11002121, 11002126, 11002127, 11002129, 11003010, 11003011, 11003101,
  481. 11003102, 11004007, 11004008, 11004009, 11004010, 11004011, 11004012, 11004013,
  482. 11004014, 11004015, 11004016, 11004018, 11004020, 11004021, 11004023, 11004024,
  483. 11004025, 11004026, 11004028, 11004029, 11004030, 11004032, 11004033, 11004034,
  484. 11004035, 11004037, 11004038, 11005042, 11006004, 11006005, 11006008, 11007015,
  485. 11010031, 11011019, 11011053, 11015069, 11015071, 11016024, 11017006, 11018003,
  486. 11018007, 11018008, 11018036, 11019001, 11019080, 11019081, 11021027, 11021028,
  487. 11021031, 11023048, 11025034, 11025038, 11025054, 11025067, 11025069, 11026005,
  488. 11026008, 11026021, 11026022, 11026023, 11026025, 11026067, 11026068, 11028004,
  489. 11028005, 11028006, 11028007, 11028008, 11028009, 11028010, 11028011, 11028012,
  490. 11028013, 11028018, 11028019, 11028020, 11028021, 11028022, 11028023, 11028024,
  491. 11028025, 11028026, 11028027, 11030041, 11030080, 11031061, 11031064, 11035008,
  492. 11035009, 11035072, 11036026, 11037035, 11037037, 11037060, 11037066, 11037067,
  493. 11038048, 11038049, 11038050, 11039047, 11039067, 11040078, 11040083, 11041022,
  494. 11041023, 11041040, 11041041, 11042001, 11042002, 11042003, 11042004, 11042005,
  495. 11042006, 11042007, 11042008, 11042011, 11042012, 11042018, 11042019, 11042020,
  496. 11042021, 11042022, 11042023, 11042024, 11042025, 11042026, 11042027, 11042042,
  497. 11042043, 11042044, 11042045, 11042046, 11042047, 11042048, 11042049, 11044029,
  498. 11047059, 11047065, 11047066, 11047067, 11048037, 11049001, 11049002, 11049005,
  499. 11049023, 11051038, 11051049, 11051051, 11051055, 11051063, 11051064, 11051068,
  500. 11052011, 11053057, 11054021, 11054022, 11054024, 11054059, 11054062, 11054066,
  501. 11057012, 11057035, 11057036, 11058005, 11058050, 11058083, 11059043, 11059055,
  502. 11059060, 11059075, 11059076, 11059077, 11060008, 11060049, 11060059, 11060069,
  503. 11060076, 11061008, 11061009, 11061021, 11061034, 11061037, 11061038, 11061095,
  504. 11063006, 11063007, 11063008, 11063011, 11063013, 11063014, 11063015, 11063016,
  505. 11063017, 11063036, 11063083, 11064003, 11064023, 11065038, 11066024, 11066045,
  506. 11071056, 11072032, 11072044, 11072045, 11073001, 11073002, 11073003, 11073049,
  507. 11075039, 11075045, 11075048
  508. };
  509. //_________________
  510. const std::vector<unsigned int> MpdFemtoBasicEventCut::bad_run_list_he3au200_2014 = {
  511. 15171017
  512. };
  513. //_________________
  514. const std::vector<unsigned int> MpdFemtoBasicEventCut::bad_run_list_dau200_2016 = {
  515. 17138024, 17139038, 17140040, 17136049, 17137012, 17140045, 17139039, 17135012, 17138023,
  516. 17139013, 17139015, 17140015, 17140003, 17140045, 17137015
  517. };
  518. //_________________
  519. void MpdFemtoBasicEventCut::setEventMult(const int& lo, const int& hi) {
  520. if (lo > hi) {
  521. std::cout << "[WARNING] MpdFemtoBasicEventCut::setEventMult -- lo>hi \n Resetting...\n";
  522. mRefMult[0] = -1;
  523. mRefMult[1] = 10000;
  524. return;
  525. }
  526. mRefMult[0] = ((lo < std::numeric_limits<short>::min()) ?
  527. std::numeric_limits<short>::min() :
  528. (short) lo);
  529. mRefMult[1] = ((hi > std::numeric_limits<short>::max()) ?
  530. std::numeric_limits<short>::max() :
  531. (short) hi);
  532. }
  533. //_________________
  534. void MpdFemtoBasicEventCut::setBTofTrayMult(const int& lo, const int& hi) {
  535. if (lo > hi) {
  536. std::cout << "[WARNING] MpdFemtoBasicEventCut::setBTofTrayMult -- lo>hi \n Resetting...\n";
  537. mBTofTrayMult[0] = -1;
  538. mBTofTrayMult[1] = 10000;
  539. return;
  540. }
  541. mBTofTrayMult[0] = ((lo < std::numeric_limits<short>::min()) ?
  542. std::numeric_limits<short>::min() :
  543. (short) lo);
  544. mBTofTrayMult[1] = ((hi > std::numeric_limits<short>::max()) ?
  545. std::numeric_limits<short>::max() :
  546. (short) hi);
  547. }
  548. //_________________
  549. void MpdFemtoBasicEventCut::setBTofMatchMult(const int& lo, const int& hi) {
  550. if (lo > hi) {
  551. std::cout << "[WARNING] MpdFemtoBasicEventCut::setBTofMatchMult -- lo>hi \n Resetting...\n";
  552. mBTofMatch[0] = -1;
  553. mBTofMatch[1] = 10000;
  554. return;
  555. }
  556. mBTofMatch[0] = ((lo < std::numeric_limits<short>::min()) ?
  557. std::numeric_limits<short>::min() :
  558. (short) lo);
  559. mBTofMatch[1] = ((hi > std::numeric_limits<short>::max()) ?
  560. std::numeric_limits<short>::max() :
  561. (short) hi);
  562. }
  563. //_________________
  564. void MpdFemtoBasicEventCut::setCent9(const int& lo, const int& hi) {
  565. if (lo > hi) {
  566. std::cout << "[WARNING] MpdFemtoBasicEventCut::setCent9 -- lo>hi \n Resetting...\n";
  567. mCent9[0] = 0;
  568. mCent9[1] = 8;
  569. return;
  570. }
  571. if (lo < 0 || lo > 8) {
  572. std::cout << "[WARNING] MpdFemtoBasicEventCut::setCent9 -- Bad lo value \n Resetting...\n";
  573. mCent9[0] = -1;
  574. } else {
  575. mCent9[0] = (short) lo;
  576. }
  577. if (hi < 0 || hi > 8) {
  578. std::cout << "[WARNING] MpdFemtoBasicEventCut::setCent9 -- Bad hi value \n Resetting...\n";
  579. mCent9[1] = 8;
  580. } else {
  581. mCent9[1] = (short) hi;
  582. }
  583. }