MpdFemtoEvent.h 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915
  1. /**
  2. * \class MpdFemtoEvent
  3. * \brief MpdFemtoEvent holds the event information specific and particle collections
  4. *
  5. * MpdFemtoEvent is the "transient DST". Objects of this class are
  6. * generated from the input data by an MpdFemtoEventReader, and then
  7. * presented to the cuts of the various active Analyses.
  8. *
  9. * \author Grigory Nigmatkulov (NRNU MEPhI)
  10. * \date May 18, 2019
  11. * \email nigmatkulov@gmail.com
  12. */
  13. #ifndef MpdFemtoEvent_h
  14. #define MpdFemtoEvent_h
  15. // C++ headers
  16. #include <vector>
  17. #include <limits>
  18. // ROOT headers
  19. #include "TVector3.h"
  20. #include "TLorentzVector.h"
  21. // MpdFemtoMaker headers
  22. #include "MpdFemtoTypes.h"
  23. #include "MpdFemtoTrackCollection.h"
  24. #include "MpdFemtoV0Collection.h"
  25. #include "MpdFemtoXiCollection.h"
  26. #include "MpdFemtoKinkCollection.h"
  27. // Forward declarations
  28. class MpdFemtoBaseTrackCut;
  29. class MpdFemtoBaseV0Cut;
  30. class MpdFemtoBaseXiCut;
  31. class MpdFemtoBaseKinkCut;
  32. //_________________
  33. class MpdFemtoEvent {
  34. public:
  35. /// Constructor
  36. MpdFemtoEvent();
  37. /// Copy constructor
  38. MpdFemtoEvent(const MpdFemtoEvent& ev, MpdFemtoBaseTrackCut* track = nullptr,
  39. MpdFemtoBaseV0Cut* v0 = nullptr, MpdFemtoBaseXiCut* xi = nullptr,
  40. MpdFemtoBaseKinkCut* kink = nullptr);
  41. /// Assignment operator
  42. MpdFemtoEvent& operator=(const MpdFemtoEvent& event);
  43. /// Destructor
  44. virtual ~MpdFemtoEvent();
  45. /// Rotate event
  46. void rotateZ(const double& angle);
  47. /// Rotate event
  48. void RotateZ(const double& angle) {
  49. rotateZ(angle);
  50. }
  51. //
  52. // Getters
  53. //
  54. /// Event ID
  55. unsigned int eventId() const {
  56. return mEventNumber;
  57. }
  58. /// Event ID
  59. unsigned int EventId() const {
  60. return eventId();
  61. }
  62. /// Run ID
  63. unsigned int runId() const {
  64. return runNumber();
  65. }
  66. /// Run ID
  67. unsigned int RunId() const {
  68. return runNumber();
  69. }
  70. /// Run number
  71. unsigned int runNumber() const {
  72. return mRunNumber;
  73. }
  74. /// Run number
  75. unsigned int RunNumber() const {
  76. return runNumber();
  77. }
  78. /// Magnetic field strength
  79. float magneticField() const {
  80. return bField();
  81. }
  82. /// Magnetic field strength
  83. float MagneticField() const {
  84. return bField();
  85. }
  86. /// Magnetic field strength
  87. float bField() const {
  88. return mMagneticField;
  89. }
  90. /// Magnetic field strength
  91. float BField() const {
  92. return bField();
  93. }
  94. /// Reference multiplicity
  95. unsigned short refMult() const {
  96. return mRefMult;
  97. }
  98. /// Reference multiplicity
  99. unsigned short RefMult() const {
  100. return refMult();
  101. }
  102. /// Reference multiplicity of positive tracks
  103. unsigned short refMultPositive() const {
  104. return mRefMultPos;
  105. }
  106. /// Reference multiplicity of positive tracks
  107. unsigned short RefMultPositive() const {
  108. return refMultPositive();
  109. }
  110. /// Reference multiplicity of negative tracks
  111. unsigned short refMultNegative() const {
  112. return (mRefMult - mRefMultPos);
  113. }
  114. /// Reference multiplicity of negative tracks
  115. unsigned short RefMultNegative() const {
  116. return refMultNegative();
  117. }
  118. /// Reference multiplicity (2)
  119. unsigned short refMult2() const {
  120. return mRefMult2;
  121. }
  122. /// Reference multiplicity (2)
  123. unsigned short RefMult2() const {
  124. return refMult2();
  125. }
  126. /// Reference multiplicity (2) of positive tracks
  127. unsigned short refMult2Positive() const {
  128. return mRefMult2Pos;
  129. }
  130. /// Reference multiplicity (2) of positive tracks
  131. unsigned short RefMult2Positive() const {
  132. return refMult2Positive();
  133. }
  134. /// Reference multiplicity (2) of negative tracks
  135. unsigned short refMult2Negative() const {
  136. return (mRefMult2 - mRefMult2Pos);
  137. }
  138. /// Reference multiplicity (2) of negative tracks
  139. unsigned short RefMult2Negative() const {
  140. return refMult2Negative();
  141. }
  142. /// Corrected reference multiplicity
  143. unsigned short refMultCorr() const {
  144. return mRefMultCorr;
  145. }
  146. /// Corrected reference multiplicity
  147. unsigned short RefMultCorr() const {
  148. return refMultCorr();
  149. }
  150. /// Weight of corrected reference multiplicity
  151. unsigned short refMultCorrWeight() const {
  152. return mRefMultCorrWeight;
  153. }
  154. /// Weight of corrected reference multiplicity
  155. unsigned short RefMultCorrWeight() const {
  156. return refMultCorrWeight();
  157. }
  158. /// Reference multiplicity of global tracks
  159. unsigned short grefMult() const {
  160. return mGRefMult;
  161. }
  162. /// Reference multiplicity of global tracks
  163. unsigned short GRefMult() const {
  164. return grefMult();
  165. }
  166. /// Reference multiplicity of positive global tracks
  167. unsigned short grefMultPositive() const {
  168. return mGRefMultPos;
  169. }
  170. /// Reference multiplicity of positive global tracks
  171. unsigned short GRefMultPositive() const {
  172. return grefMultPositive();
  173. }
  174. /// Reference multiplicity of negative global tracks
  175. unsigned short grefMultNegative() const {
  176. return (mGRefMult - mGRefMultPos);
  177. }
  178. /// Reference multiplicity of negative global tracks
  179. unsigned short GRefMultNegative() const {
  180. return grefMultNegative();
  181. }
  182. /// Multiplicity of TOF tray hits
  183. unsigned short btofTrayMultiplicity() const {
  184. return mBTofTrayMultiplicity;
  185. }
  186. /// Multiplicity of TOF tray hits
  187. unsigned short BTofTrayMultiplicity() const {
  188. return btofTrayMultiplicity();
  189. }
  190. /// Number of TOF-matched tracks
  191. unsigned short numberOfBTofMatched() const {
  192. return mNBTOFMatch;
  193. }
  194. /// Number of TOF-matched tracks
  195. unsigned short NumberOfBTofMatched() const {
  196. return numberOfBTofMatched();
  197. }
  198. /// Number of BEMC-matched tracks
  199. unsigned short numberOfBEMCMatched() const {
  200. return mNBEMCMatch;
  201. }
  202. /// Number of BEMC-matched tracks
  203. unsigned short NumberOfBEMCMatched() const {
  204. return numberOfBEMCMatched();
  205. }
  206. /// Number of primary tracks
  207. unsigned short numberOfPrimaryTracks() const {
  208. return mNumberOfPrimaryTracks;
  209. }
  210. /// Number of primary tracks
  211. unsigned short NumberOfPrimaryTracks() const {
  212. return numberOfPrimaryTracks();
  213. }
  214. /// Number of global tracks
  215. unsigned short numberOfGlobalTracks() const {
  216. return mNumberOfGlobalTracks;
  217. }
  218. /// Number of global tracks
  219. unsigned short NumberOfGlobalTracks() const {
  220. return numberOfGlobalTracks();
  221. }
  222. /// Sum of ADC from east ZDC
  223. unsigned short zdcSumAdcEast() const {
  224. return mZdcSumAdcEast;
  225. }
  226. /// Sum of ADC from east ZDC
  227. unsigned short ZdcSumAdcEast() const {
  228. return zdcSumAdcEast();
  229. }
  230. /// Sum of ADC from west ZDC
  231. unsigned short zdcSumAdcWest() const {
  232. return mZdcSumAdcWest;
  233. }
  234. /// Sum of ADC from west ZDC
  235. unsigned short ZdcSumAdcWest() const {
  236. return zdcSumAdcWest();
  237. }
  238. /// ZDC coincidence rate
  239. float zdcCoincidenceRate() const {
  240. return mZdcCoincidenceRate;
  241. }
  242. /// ZDC coincidence rate
  243. float ZdcCoincidenceRate() const {
  244. return zdcCoincidenceRate();
  245. }
  246. /// BBC coincidence rate
  247. float bbcCoincidenceRate() const {
  248. return mBbcCoincidenceRate;
  249. }
  250. /// BBC coincidence rate
  251. float BbcCoincidenceRate() const {
  252. return bbcCoincidenceRate();
  253. }
  254. /// Sphericity (transverse) estimated in |eta|<0.5
  255. float sphericity() const {
  256. return (mSphericity < 0) ? -1. : (float) mSphericity * 0.01;
  257. }
  258. /// Sphericity (transverse) estimated in |eta|<0.5
  259. float Sphericity() const {
  260. return sphericity();
  261. }
  262. /// Sphericity (transverse) estimated in |eta|<1
  263. float sphericity2() const {
  264. return (mSphericity2 < 0) ? -1. : (float) mSphericity2 * 0.01;
  265. }
  266. /// Sphericity (transverse) estimated in |eta|<1
  267. float Sphericity2() const {
  268. return sphericity2();
  269. }
  270. /// Event plane angle
  271. float eventPlaneAngle() const {
  272. return mEventPlaneAngle;
  273. }
  274. /// Event plane angle
  275. float EventPlaneAngle() const {
  276. return eventPlaneAngle();
  277. }
  278. /// Event plane resolution
  279. float eventPlaneResolution() const {
  280. return mEventPlaneResolution;
  281. }
  282. /// Event plane resolution
  283. float EventPlaneResolution() const {
  284. return eventPlaneResolution();
  285. }
  286. /// Return centrality for 16 bins:
  287. /// 15 = 0-5%
  288. /// 14 = 5-10%
  289. /// 13 = 10-15%
  290. /// 12 = 15-20%
  291. /// 11 = 20-25%
  292. /// 10 = 25-30%
  293. /// 9 = 30-35%
  294. /// 8 = 35-40%
  295. /// 7 = 40-45%
  296. /// 6 = 45-50%
  297. /// 5 = 50-55%
  298. /// 4 = 55-60%
  299. /// 3 = 60-65%
  300. /// 2 = 65-70%
  301. /// 1 = 70-75%
  302. /// 0 = 75-80%
  303. short cent16() const {
  304. return mCent16;
  305. }
  306. /// Return centrality for 16 bins:
  307. /// 15 = 0-5%
  308. /// 14 = 5-10%
  309. /// 13 = 10-15%
  310. /// 12 = 15-20%
  311. /// 11 = 20-25%
  312. /// 10 = 25-30%
  313. /// 9 = 30-35%
  314. /// 8 = 35-40%
  315. /// 7 = 40-45%
  316. /// 6 = 45-50%
  317. /// 5 = 50-55%
  318. /// 4 = 55-60%
  319. /// 3 = 60-65%
  320. /// 2 = 65-70%
  321. /// 1 = 70-75%
  322. /// 0 = 75-80%
  323. short Cent16() const {
  324. return cent16();
  325. }
  326. /// Return centrality for 9 bins:
  327. /// 8 = 0-5%
  328. /// 7 = 5-10%
  329. /// 6 = 10-20%
  330. /// 5 = 20-30%
  331. /// 4 = 30-40%
  332. /// 3 = 40-50%
  333. /// 2 = 50-60%
  334. /// 1 = 60-70%
  335. /// 0 = 70-80%
  336. short cent9() const;
  337. /// Return centrality for 9 bins:
  338. /// 8 = 0-5%
  339. /// 7 = 5-10%
  340. /// 6 = 10-20%
  341. /// 5 = 20-30%
  342. /// 4 = 30-40%
  343. /// 3 = 40-50%
  344. /// 2 = 50-60%
  345. /// 1 = 60-70%
  346. /// 0 = 70-80%
  347. short Cent9() const {
  348. return cent9();
  349. }
  350. /// Return impact parameter (form simulation studies only)
  351. float impactParameter() const {
  352. return mImpactPar;
  353. }
  354. /// Return impact parameter (form simulation studies only)
  355. float ImpactParameter() const {
  356. return impactParameter();
  357. }
  358. /// Primary vertex position
  359. TVector3 primaryVertex() const {
  360. return TVector3(mPrimaryVertexPositionX, mPrimaryVertexPositionY, mPrimaryVertexPositionZ);
  361. }
  362. /// Primary vertex position
  363. TVector3 PrimaryVertex() const {
  364. return primaryVertex();
  365. }
  366. /// z-position estimated by VPD
  367. float vpdVz() const {
  368. return mVpdVz;
  369. }
  370. /// z-position estimated by VPD
  371. float VpdVz() const {
  372. return vpdVz();
  373. }
  374. /// Return Vz_{TPC}-Vz_{VPD} difference
  375. float vpdVzDiff() const {
  376. return ( primaryVertex().Z() - vpdVz());
  377. }
  378. /// Return Vz_{TPC}-Vz_{VPD} difference
  379. float VpdVzDiff() const {
  380. return vpdVzDiff();
  381. }
  382. /// Return primary vertex ranking. FemtoDst encoding:
  383. /// -10 = x < -10e9
  384. /// -9 = -10e9 <= x < -10e6
  385. /// -8 = -10e6 <= x < -10e3;
  386. /// -7 = -10e3 <= x < -10e2
  387. /// -6 = -10e2 <= x < -10
  388. /// -5 = -10 <= x < -5
  389. /// -4 = -5 <= x < -4
  390. /// -3 = -4 <= x < -3
  391. /// -2 = -3 <= x < -2
  392. /// -1 = -2 <= x < -1
  393. /// 0 = -1 <= x < 1
  394. /// 1 = 1 <= x < 2
  395. /// 2 = 2 <= x < 3
  396. /// 3 = 3 <= x < 4
  397. /// 4 = 4 <= x < 5
  398. /// 5 = 5 <= x < 10
  399. /// 6 = 10 <= x < 10e2
  400. /// 7 = 10e2 <= x < 10e3
  401. /// 8 = 10e3 <= x < 10e6
  402. /// 9 = 10e6 <= x < 10e9
  403. /// 10 = 10e9 <= x
  404. float ranking() const {
  405. return mRanking;
  406. }
  407. float Ranking() const {
  408. return ranking();
  409. }
  410. /// Return list of trigger IDs
  411. std::vector<unsigned int> triggerIds() const {
  412. return mTriggerIds;
  413. }
  414. /// Return list of trigger IDs
  415. std::vector<unsigned int> TriggerIds() const {
  416. return triggerIds();
  417. }
  418. /// Return if trigger ID is in the list
  419. bool isTrigger(const unsigned int& word) const;
  420. /// Return if trigger ID is in the list
  421. bool IsTrigger(const unsigned int& word) const {
  422. return isTrigger(word);
  423. }
  424. /// Return track collection associated with the current event
  425. MpdFemtoTrackCollection *trackCollection() const {
  426. return mTrackCollection;
  427. }
  428. /// Return track collection associated with the current event
  429. MpdFemtoTrackCollection *TrackCollection() const {
  430. return trackCollection();
  431. }
  432. /// Return v0 collection associated with the current event
  433. MpdFemtoV0Collection *v0Collection() const {
  434. return mV0Collection;
  435. }
  436. /// Return v0 collection associated with the current event
  437. MpdFemtoV0Collection *V0Collection() const {
  438. return v0Collection();
  439. }
  440. /// Return xi collection associated with the current event
  441. MpdFemtoXiCollection *xiCollection() const {
  442. return mXiCollection;
  443. }
  444. /// Return xi collection associated with the current event
  445. MpdFemtoXiCollection *XiCollection() const {
  446. return xiCollection();
  447. }
  448. /// Return kink collection associated with the current event
  449. MpdFemtoKinkCollection *kinkCollection() const {
  450. return mKinkCollection;
  451. }
  452. /// Return kink collection associated with the current event
  453. MpdFemtoKinkCollection *KinkCollection() const {
  454. return kinkCollection();
  455. }
  456. //
  457. // Setters
  458. //
  459. /// Set event number
  460. void setEventNumber(const unsigned int& id) {
  461. mEventNumber = id;
  462. }
  463. /// Set event number
  464. void SetEventNumber(const unsigned int& id) {
  465. setEventNumber(id);
  466. }
  467. /// Set event number
  468. void setEventId(const unsigned int& id) {
  469. mEventNumber = id;
  470. }
  471. /// Set event number
  472. void SetEventId(const unsigned int& id) {
  473. setEventId(id);
  474. }
  475. /// Set run number
  476. void setRunNumber(const unsigned int& n) {
  477. mRunNumber = n;
  478. }
  479. /// Set run number
  480. void SetRunNumber(const unsigned int& n) {
  481. setRunNumber(n);
  482. }
  483. /// Set magnetic field magnitude
  484. void setMagneticField(const float& bField) {
  485. mMagneticField = bField;
  486. }
  487. /// Set magnetic field magnitude
  488. void SetMagneticField(const float& bField) {
  489. setMagneticField(bField);
  490. }
  491. /// Set magnetic field magnitude
  492. void setBField(const float& bField) {
  493. mMagneticField = bField;
  494. }
  495. /// Set magnetic field magnitude
  496. void SetBField(const float& bField) {
  497. setBField(bField);
  498. }
  499. /// Set reference multiplicity
  500. void setRefMult(const int& mult) {
  501. mRefMult = ((mult > 0) ? ((mult > std::numeric_limits<unsigned short>::max()) ?
  502. std::numeric_limits<unsigned short>::max() :
  503. (unsigned short) mult) : 0);
  504. }
  505. /// Set reference multiplicity
  506. void SetRefMult(const int& mult) {
  507. setRefMult(mult);
  508. }
  509. /// Set reference multiplicity of positive tracks
  510. void setRefMultPos(const int& mult) {
  511. mRefMultPos = ((mult > 0) ? ((mult > std::numeric_limits<unsigned short>::max()) ?
  512. std::numeric_limits<unsigned short>::max() :
  513. (unsigned short) mult) : 0);
  514. }
  515. /// Set reference multiplicity of positive tracks
  516. void SetRefMultPos(const int& mult) {
  517. setRefMultPos(mult);
  518. }
  519. /// Set reference (2) multiplicity
  520. void setRefMult2(const int& mult) {
  521. mRefMult2 = ((mult > 0) ? ((mult > std::numeric_limits<unsigned short>::max()) ?
  522. std::numeric_limits<unsigned short>::max() :
  523. (unsigned short) mult) : 0);
  524. }
  525. /// Set reference (2) multiplicity
  526. void SetRefMult2(const int& mult) {
  527. setRefMult2(mult);
  528. }
  529. /// Set reference (2) multiplicity of positive tracks
  530. void setRefMult2Pos(const int& mult) {
  531. mRefMult2Pos = ((mult > 0) ? ((mult > std::numeric_limits<unsigned short>::max()) ?
  532. std::numeric_limits<unsigned short>::max() :
  533. (unsigned short) mult) : 0);
  534. }
  535. /// Set reference (2) multiplicity of positive tracks
  536. void SetRefMult2Pos(const int& mult) {
  537. setRefMult2Pos(mult);
  538. }
  539. /// Set corrected reference multiplicity
  540. void setRefMultCorr(const float& mult) {
  541. mRefMultCorr = ((mult > 0) ? ((mult > std::numeric_limits<unsigned short>::max()) ?
  542. std::numeric_limits<unsigned short>::max() :
  543. (unsigned short) mult) : 0);
  544. }
  545. /// Set corrected reference multiplicity
  546. void SetRefMultCorr(const float& mult) {
  547. setRefMultCorr(mult);
  548. }
  549. /// Set weight of the corrected reference multiplicity
  550. void setRefMultCorrWeight(const float& wgt) {
  551. mRefMultCorrWeight = wgt;
  552. }
  553. /// Set weight of the corrected reference multiplicity
  554. void SetRefMultCorrWeight(const float& wgt) {
  555. setRefMultCorrWeight(wgt);
  556. }
  557. /// Set reference multiplicity of global tracks
  558. void setGRefMult(const int& mult) {
  559. mGRefMult = ((mult > 0) ? ((mult > std::numeric_limits<unsigned short>::max()) ?
  560. std::numeric_limits<unsigned short>::max() :
  561. (unsigned short) mult) : 0);
  562. }
  563. /// Set reference multiplicity of global tracks
  564. void SetGRefMult(const int& mult) {
  565. setGRefMult(mult);
  566. }
  567. /// Set reference multiplicity of positive global tracks
  568. void setGRefMultPos(const int& mult) {
  569. mGRefMultPos = ((mult > 0) ? ((mult > std::numeric_limits<unsigned short>::max()) ?
  570. std::numeric_limits<unsigned short>::max() :
  571. (unsigned short) mult) : 0);
  572. }
  573. /// Set reference multiplicity of positive global tracks
  574. void SetGRefMultPos(const int& mult) {
  575. setGRefMultPos(mult);
  576. }
  577. /// Set multiplicity of hits in BTof trays
  578. void setBTofTrayMult(const int& mult) {
  579. mBTofTrayMultiplicity = ((mult > 0) ? ((mult > std::numeric_limits<unsigned short>::max()) ?
  580. std::numeric_limits<unsigned short>::max() :
  581. (unsigned short) mult) : 0);
  582. }
  583. /// Set multiplicity of hits in BTof trays
  584. void SetBTofTrayMult(const int& mult) {
  585. setBTofTrayMult(mult);
  586. }
  587. /// Set number TOF-matched tracks
  588. void setNumberOfBTofMatched(const int& mult) {
  589. mNBTOFMatch = ((mult > 0) ? ((mult > std::numeric_limits<unsigned short>::max()) ?
  590. std::numeric_limits<unsigned short>::max() :
  591. (unsigned short) mult) : 0);
  592. }
  593. /// Set number TOF-matched tracks
  594. void SetNumberOfBTofMatched(const int& mult) {
  595. setNumberOfBTofMatched(mult);
  596. }
  597. /// Set number of BEMC-matched tracks
  598. void setNumberOfBEMCMatched(const int& mult) {
  599. mNBEMCMatch = ((mult > 0) ? ((mult > std::numeric_limits<unsigned short>::max()) ?
  600. std::numeric_limits<unsigned short>::max() :
  601. (unsigned short) mult) : 0);
  602. }
  603. /// Set number of BEMC-matched tracks
  604. void SetNumberOfBEMCMatched(const int& mult) {
  605. setNumberOfBEMCMatched(mult);
  606. }
  607. /// Set number of primary tracks
  608. void setNumberOfPrimaryTracks(const int& mult) {
  609. mNumberOfPrimaryTracks = ((mult > 0) ? ((mult > std::numeric_limits<unsigned short>::max()) ?
  610. std::numeric_limits<unsigned short>::max() :
  611. (unsigned short) mult) : 0);
  612. }
  613. /// Set number of primary tracks
  614. void SetNumberOfPrimaryTracks(const int& mult) {
  615. setNumberOfPrimaryTracks(mult);
  616. }
  617. /// Set number of global tracks
  618. void setNumberOfGlobalTracks(const int& mult) {
  619. mNumberOfGlobalTracks = ((mult > 0) ? ((mult > std::numeric_limits<unsigned short>::max()) ?
  620. std::numeric_limits<unsigned short>::max() :
  621. (unsigned short) mult) : 0);
  622. }
  623. /// Set number of global tracks
  624. void SetNumberOfGlobalTracks(const int& mult) {
  625. setNumberOfGlobalTracks(mult);
  626. }
  627. /// Set ADC of east ZDC
  628. void setZdcAdcEast(const float& adc) {
  629. mZdcSumAdcEast = ((adc > 0) ? ((adc > std::numeric_limits<unsigned short>::max()) ?
  630. std::numeric_limits<unsigned short>::max() :
  631. (unsigned short) adc) : 0);
  632. }
  633. /// Set ADC of east ZDC
  634. void SetZdcAdcEast(const float& adc) {
  635. setZdcAdcEast(adc);
  636. }
  637. /// Set ADC of east ZDC
  638. void setZdcAdcEast(const int& adc) {
  639. mZdcSumAdcEast = ((adc > 0) ? ((adc > std::numeric_limits<unsigned short>::max()) ?
  640. std::numeric_limits<unsigned short>::max() :
  641. (unsigned short) adc) : 0);
  642. }
  643. /// Set ADC of east ZDC
  644. void SetZdcAdcEast(const int& adc) {
  645. setZdcAdcEast(adc);
  646. }
  647. /// Set ADC of west ZDC
  648. void setZdcAdcWest(const float& adc) {
  649. mZdcSumAdcWest = ((adc > 0) ? ((adc > std::numeric_limits<unsigned short>::max()) ?
  650. std::numeric_limits<unsigned short>::max() :
  651. (unsigned short) adc) : 0);
  652. }
  653. /// Set ADC of west ZDC
  654. void SetZdcAdcWest(const float& adc) {
  655. setZdcAdcWest(adc);
  656. }
  657. /// Set ADC of west ZDC
  658. void setZdcAdcWest(const int& adc) {
  659. mZdcSumAdcWest = ((adc > 0) ? ((adc > std::numeric_limits<unsigned short>::max()) ?
  660. std::numeric_limits<unsigned short>::max() :
  661. (unsigned short) adc) : 0);
  662. }
  663. /// Set ADC of west ZDC
  664. void SetZdcAdcWest(const int& adc) {
  665. setZdcAdcWest(adc);
  666. }
  667. /// Set ZDC coincidence rate
  668. void setZdcCoincidenceRate(const float& rt) {
  669. mZdcCoincidenceRate = rt;
  670. }
  671. /// Set ZDC coincidence rate
  672. void SetZdcCoincidenceRate(const float& rt) {
  673. setZdcCoincidenceRate(rt);
  674. }
  675. /// Set BBC coincidence rate
  676. void setBbcCoincidenceRate(const float& rt) {
  677. mBbcCoincidenceRate = rt;
  678. }
  679. /// Set BBC coincidence rate
  680. void SetBbcCoincidenceRate(const float& rt) {
  681. setBbcCoincidenceRate(rt);
  682. }
  683. /// Set (transverse) sphericity in |eta|<0.5, pT>0.15, DCA<3 and nHits>10
  684. void setSphericity(const float& sph);
  685. /// Set (transverse) sphericity in |eta|<0.5, pT>0.15, DCA<3 and nHits>10
  686. void SetSphericity(const float& sph) {
  687. setSphericity(sph);
  688. }
  689. /// Set (transverse) sphericity in |eta|<1, pT>0.15, DCA<3 and nHits>10
  690. void setSphericity2(const float& sph);
  691. /// Set (transverse) sphericity in |eta|<1, pT>0.15, DCA<3 and nHits>10
  692. void SetSphericity2(const float& sph) {
  693. setSphericity2(sph);
  694. }
  695. /// Set event plane anagle
  696. void setEventPlaneAngle(const float& angle) {
  697. mEventPlaneAngle = angle;
  698. }
  699. /// Set event plane anagle
  700. void SetEventPlaneAngle(const float& angle) {
  701. setEventPlaneAngle(angle);
  702. }
  703. /// Set event plane ange resolution
  704. void setEventPlaneResolution(const float& res) {
  705. mEventPlaneResolution = res;
  706. }
  707. /// Set event plane ange resolution
  708. void SetEventPlaneResolution(const float& res) {
  709. setEventPlaneResolution(res);
  710. }
  711. /// Set centrality bin
  712. void setCent16(const int& cent) {
  713. mCent16 = cent;
  714. }
  715. /// Set centrality bin
  716. void SetCent16(const int& cent) {
  717. setCent16(cent);
  718. }
  719. /// Set primary vertex position using (x,y,z)
  720. void setPrimaryVertex(const float& x, const float& y, const float& z) {
  721. mPrimaryVertexPositionX = x;
  722. mPrimaryVertexPositionY = y;
  723. mPrimaryVertexPositionZ = z;
  724. }
  725. /// Set primary vertex (x,y,z)
  726. void SetPrimaryVertex(const float& x, const float& y, const float& z) {
  727. setPrimaryVertex(x, y, z);
  728. }
  729. /// Set primary vertex position using TVector3
  730. void setPrimaryVertex(const TVector3& pvtx) {
  731. mPrimaryVertexPositionX = pvtx.X();
  732. mPrimaryVertexPositionY = pvtx.Y();
  733. mPrimaryVertexPositionZ = pvtx.Z();
  734. }
  735. /// Set x-position of primary vertex
  736. void setPrimaryVertexX(const float& x) {
  737. mPrimaryVertexPositionX = x;
  738. }
  739. /// Set x-position of primary vertex
  740. void SetPrimaryVertexX(const float& x) {
  741. setPrimaryVertexX(x);
  742. }
  743. /// Set y-position of primary vertex
  744. void setPrimaryVertexY(const float& y) {
  745. mPrimaryVertexPositionX = y;
  746. }
  747. /// Set y-position of primary vertex
  748. void SetPrimaryVertexY(const float& y) {
  749. setPrimaryVertexY(y);
  750. }
  751. /// Set z-position of primary vertex
  752. void setPrimaryVertexZ(const float& z) {
  753. mPrimaryVertexPositionX = z;
  754. }
  755. /// Set z-position of primary vertex
  756. void SetPrimaryVertexZ(const float& z) {
  757. setPrimaryVertexZ(z);
  758. }
  759. /// Set z-position estimated by EPD
  760. void setVpdVz(const float& vpdVz) {
  761. mVpdVz = vpdVz;
  762. }
  763. /// Set z-position estimated by EPD
  764. void SetVpdVz(const float& vpdVz) {
  765. setVpdVz(vpdVz);
  766. }
  767. /// Set primary vertex ranking
  768. void setRanking(const float& ranking) {
  769. mRanking = ranking;
  770. }
  771. /// Set primary vertex ranking
  772. void SetRanking(const float& ranking) {
  773. setRanking(ranking);
  774. }
  775. /// Set impact parameter (for simulation studies only)
  776. void setImpactParameter(const float& val) {
  777. mImpactPar = val;
  778. }
  779. /// Set impact parameter (for simulation studies only)
  780. void SetImpactParameter(const float& val) {
  781. setImpactParameter(val);
  782. }
  783. /// Set trigger IDs using STL vector
  784. void setTriggerIds(const std::vector<unsigned int>& ids) {
  785. mTriggerIds = ids;
  786. }
  787. /// Set trigger IDs using STL vector
  788. void SetTriggerIds(const std::vector<unsigned int>& ids) {
  789. setTriggerIds(ids);
  790. }
  791. /// Trigger ID to the list of triggers
  792. void addTriggerId(const unsigned int& id);
  793. /// Add trigger ID to the list of triggers
  794. void AddTriggerId(const unsigned int& id) {
  795. addTriggerId(id);
  796. }
  797. private:
  798. /// Event number (ID)
  799. unsigned int mEventNumber;
  800. /// Run number (ID)
  801. unsigned int mRunNumber;
  802. /// Magnetic field strength
  803. float mMagneticField;
  804. /// Reference multiplicity (|eta|<0.5)
  805. unsigned short mRefMult;
  806. /// Reference multiplicity of positive tracks (|eta|<0.5)
  807. unsigned short mRefMultPos;
  808. /// Corrected reference multiplicity (from StRefMultCorr)
  809. unsigned short mRefMultCorr;
  810. /// Weight of corrected reference multiplicity (from StRefMultCorr)
  811. unsigned short mRefMultCorrWeight;
  812. /// Reference multiplicity (|eta|<1)
  813. unsigned short mRefMult2;
  814. /// Reference multiplicity of positive tracks (|eta|<1)
  815. unsigned short mRefMult2Pos;
  816. /// Reference multiplicity (|eta|<0.5) of global tracks
  817. unsigned short mGRefMult;
  818. /// Reference multiplicity (|eta|<0.5) of positive global tracks
  819. unsigned short mGRefMultPos;
  820. /// Number of hits int TOF trays
  821. unsigned short mBTofTrayMultiplicity;
  822. /// Number of TOF-matched tracks
  823. unsigned short mNBTOFMatch;
  824. /// Number of BEMC-matched tracks
  825. unsigned short mNBEMCMatch;
  826. /// Number of primary tracks
  827. unsigned short mNumberOfPrimaryTracks;
  828. /// Number of global tracks
  829. unsigned short mNumberOfGlobalTracks;
  830. /// Sum of ADC for east ZDC
  831. unsigned short mZdcSumAdcEast;
  832. /// Sum of ADC for west ZDC
  833. unsigned short mZdcSumAdcWest;
  834. /// ZDC coincidence rate
  835. float mZdcCoincidenceRate;
  836. /// BBC coincidence rate
  837. float mBbcCoincidenceRate;
  838. /// (Transverse) sphericity by tracks in |eta|<0.5
  839. float mSphericity;
  840. /// (Transverse) sphericity by tracks in |eta|<1
  841. float mSphericity2;
  842. /// Event plane angle
  843. float mEventPlaneAngle;
  844. /// Event plane resolution
  845. float mEventPlaneResolution;
  846. /// 16 centrality bins:
  847. /// 15 = 0-5%
  848. /// 14 = 5-10%
  849. /// 13 = 10-15%
  850. /// 12 = 15-20%
  851. /// 11 = 20-25%
  852. /// 10 = 25-30%
  853. /// 9 = 30-35%
  854. /// 8 = 35-40%
  855. /// 7 = 40-45%
  856. /// 6 = 45-50%
  857. /// 5 = 50-55%
  858. /// 4 = 55-60%
  859. /// 3 = 60-65%
  860. /// 2 = 65-70%
  861. /// 1 = 70-75%
  862. /// 0 = 75-80%
  863. char mCent16; //
  864. /// X position of the primary vertex
  865. float mPrimaryVertexPositionX;
  866. /// Y position of the primary vertex
  867. float mPrimaryVertexPositionY;
  868. /// Z position of the primary vertex
  869. float mPrimaryVertexPositionZ;
  870. /// Z position of primary vertex estimated by VPD
  871. float mVpdVz;
  872. /// Primary vertex ranking
  873. float mRanking;
  874. /// Float impact parameter (for simulation studies only)
  875. float mImpactPar;
  876. /// List of trigger IDs (STL vector)
  877. std::vector<unsigned int> mTriggerIds;
  878. /// Pointer to the track collection
  879. MpdFemtoTrackCollection *mTrackCollection;
  880. /// Pointer to the v0 collection
  881. MpdFemtoV0Collection *mV0Collection;
  882. /// Pointer to the xi collection
  883. MpdFemtoXiCollection *mXiCollection;
  884. /// Pointer to the kink collection
  885. MpdFemtoKinkCollection *mKinkCollection;
  886. ClassDef(MpdFemtoEvent, 1)
  887. };
  888. #endif // MpdFemtoEvent_h