MpdFemtoV0.h 49 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726
  1. /**
  2. * \class MpdFemtoV0
  3. * \brief A special type of particle dealing with the V0
  4. *
  5. * This class stores the information both about the V0 itself and about its
  6. * daughters. This easily enables cuts on daughter characteristics.
  7. *
  8. * \author Grigory Nigmatkulov (NRNU MEPhI)
  9. * \date May 18, 2019
  10. * \email nigmatkulov@gmail.com
  11. */
  12. #ifndef MpdFemtoV0_h
  13. #define MpdFemtoV0_h
  14. // C++ headers
  15. #include <limits>
  16. // MpdFemtoMaker headers
  17. #include "MpdFemtoTypes.h"
  18. #include "MpdFemtoPhysicalHelix.h"
  19. #include "MpdFemtoHiddenInfo.h"
  20. #include "phys_constants.h"
  21. // ROOT headers
  22. #include "TVector3.h"
  23. #include "TMath.h"
  24. //_________________
  25. class MpdFemtoV0 {
  26. public:
  27. /// Constructor
  28. MpdFemtoV0();
  29. /// Copy constructor
  30. MpdFemtoV0(const MpdFemtoV0& copy);
  31. /// Assignment operator
  32. MpdFemtoV0& operator=(const MpdFemtoV0& copy);
  33. /// Destructor
  34. virtual ~MpdFemtoV0();
  35. // V0 parameters //
  36. /// Decay point
  37. TVector3 decayPoint() const {
  38. return TVector3(mV0DecayPointX, mV0DecayPointY, mV0DecayPointZ);
  39. }
  40. /// Decay point
  41. TVector3 DecayPoint() const {
  42. return decayPoint();
  43. }
  44. /// Decay point
  45. TVector3 decayVertex() const {
  46. return decayPoint();
  47. }
  48. /// Primary vertex position
  49. TVector3 primaryVertex() const {
  50. return TVector3(mPrimaryVertexX, mPrimaryVertexY, mPrimaryVertexZ);
  51. }
  52. /// Primary vertex position
  53. TVector3 PrimaryVertex() const {
  54. return primaryVertex();
  55. }
  56. /// Magnetic field strength
  57. float bField() const {
  58. return mBField;
  59. }
  60. /// Magnetic field strength
  61. float BField() const {
  62. return bField();
  63. }
  64. /// Magnetic field strength
  65. float magneticField() const {
  66. return bField();
  67. }
  68. /// Magnetic field strength
  69. float MagneticField() const {
  70. return bField();
  71. }
  72. /// Vector from primary vertex position to the decay point
  73. TVector3 v0DecayVector() const {
  74. return ( decayPoint() - primaryVertex());
  75. }
  76. /// Vector from primary vertex position to the decay point
  77. TVector3 V0DecayVector() const {
  78. return v0DecayVector();
  79. }
  80. /// V0 decay length
  81. float v0DecayLength() const {
  82. return v0DecayVector().Mag();
  83. }
  84. /// V0 decay length
  85. float V0DecayLength() const {
  86. return v0DecayLength();
  87. }
  88. /// V0 decay length
  89. float decayLength() const {
  90. return v0DecayLength();
  91. }
  92. /// V0 decay length
  93. float DecayLength() const {
  94. return v0DecayLength();
  95. }
  96. /// Angle between momentum and decay vector
  97. float v0AndgleBetweenMomentumAndDecayVector() const {
  98. return TMath::Cos(momV0().Angle(v0DecayVector()));
  99. }
  100. /// Angle between momentum and decay vector
  101. float V0AndgleBetweenMomentumAndDecayVector() const {
  102. return v0AndgleBetweenMomentumAndDecayVector();
  103. }
  104. /// V0 momentum
  105. TVector3 momV0() const {
  106. return TVector3(mV0MomX, mV0MomY, mV0MomZ);
  107. }
  108. /// V0 momentum
  109. TVector3 MomV0() const {
  110. return momV0();
  111. }
  112. /// Px of V0
  113. float momV0X() const {
  114. return momV0().X();
  115. }
  116. /// Px of V0
  117. float MomV0X() const {
  118. return momV0X();
  119. }
  120. /// Py of V0
  121. float momV0Y() const {
  122. return momV0().Y();
  123. }
  124. /// Py of V0
  125. float MomV0Y() const {
  126. return momV0Y();
  127. }
  128. /// Pz of V0
  129. float momV0Z() const {
  130. return momV0().Z();
  131. }
  132. /// Pz of V0
  133. float MomV0Z() const {
  134. return momV0Z();
  135. }
  136. /// Transverse momentum of V0
  137. float ptV0() const {
  138. return momV0().Perp();
  139. }
  140. /// Transverse momentum of V0
  141. float PtV0() const {
  142. return ptV0();
  143. }
  144. /// Transverse momentum squared of V0
  145. float pt2V0() const {
  146. return momV0().Perp2();
  147. }
  148. /// Transverse momentum squared of V0
  149. float Pt2V0() const {
  150. return pt2V0();
  151. }
  152. /// Magnitude of the V0 momentum
  153. float ptotV0() const {
  154. return momV0().Mag();
  155. }
  156. /// Magnitude of the V0 momentum
  157. float PtotV0() const {
  158. return ptotV0();
  159. }
  160. /// Magnitude of the V0 momentum squared
  161. float ptot2V0() const {
  162. return momV0().Mag2();
  163. }
  164. /// Magnitude of the V0 momentum squared
  165. float Ptot2V0() const {
  166. return ptot2V0();
  167. }
  168. /// Pseudorapidity of V0
  169. float etaV0() const {
  170. return momV0().PseudoRapidity();
  171. }
  172. /// Pseudorapidity of V0
  173. float EtaV0() const {
  174. return etaV0();
  175. }
  176. /// Pseudorapidity of V0
  177. float pseudoRapV0() const {
  178. return etaV0();
  179. }
  180. /// Pseudorapidity of V0
  181. float PseudoRapV0() const {
  182. return etaV0();
  183. }
  184. /// Azimuthal angle of V0
  185. float phiV0() const {
  186. return momV0().Phi();
  187. }
  188. /// Azimuthal angle of V0
  189. float PhiV0() const {
  190. return phiV0();
  191. }
  192. /// Momentum of the V0 positive daughter
  193. float v0PtotPos() const {
  194. return mV0PtotPos;
  195. }
  196. /// Momentum of the V0 positive daughter
  197. float V0PtotPos() const {
  198. return v0PtotPos();
  199. }
  200. /// Momentum of the V0 negative daughter
  201. float v0PtotNeg() const {
  202. return mV0PtotNeg;
  203. }
  204. /// Alpha of the Podolyanski-Armenteros distribution
  205. float alphaArmV0() const {
  206. return mAlphaV0;
  207. }
  208. /// Alpha of the Podolyanski-Armenteros distribution
  209. float AlphaArmV0() const {
  210. return alphaArmV0();
  211. }
  212. /// pT of the Podolyanski-Armenteros distribution
  213. float ptArmV0() const {
  214. return mPtArmV0;
  215. }
  216. /// pT of the Podolyanski-Armenteros distribution
  217. float PtArmV0() const {
  218. return ptArmV0();
  219. }
  220. /// Energy of the V0 assuming Lambda -> p + pi^- decay
  221. float eLambda() const {
  222. return TMath::Sqrt(ptot2V0() + M_LAMBDA * M_LAMBDA);
  223. }
  224. /// Energy of the V0 assuming Lambda -> p + pi^- decay
  225. float ELambda() const {
  226. return eLambda();
  227. }
  228. /// Energy of the V0 assuming AntiLambda -> anti(p) + pi^+ decay
  229. float eAntiLambda() const {
  230. return TMath::Sqrt(ptot2V0() + M_LAMBDA * M_LAMBDA);
  231. }
  232. /// Energy of the V0 assuming AntiLambda -> anti(p) + pi^+ decay
  233. float EAntiLambda() const {
  234. return eAntiLambda();
  235. }
  236. /// Energy of the V0 assuming K_s^0 -> pi^+ + pi^- decay
  237. float eK0Short() const {
  238. return TMath::Sqrt(ptot2V0() + M_KAON_0_SHORT * M_KAON_0_SHORT);
  239. }
  240. /// Energy of the V0 assuming K_s^0 -> pi^+ + pi^- decay
  241. float EK0Short() const {
  242. return eK0Short();
  243. }
  244. /// Energy of the V0 assuming phi^0 -> K^+ + K^- decay
  245. float ePhi() const {
  246. return TMath::Sqrt(ptot2V0() + M_PHI * M_PHI);
  247. }
  248. /// Energy of the V0 assuming phi^0 -> K^+ + K^- decay
  249. float EPhi() const {
  250. return ePhi();
  251. }
  252. /// Mass of V0 assuming Lambda -> p + pi^- decay
  253. float massLambda() const {
  254. return TMath::Sqrt((eNegPion() + ePosProton()) * (eNegPion() + ePosProton()) + ptot2V0());
  255. }
  256. /// Mass of V0 assuming Lambda -> p + pi^- decay
  257. float MassLambda() const {
  258. return massLambda();
  259. }
  260. /// Mass of V0 assuming AntiLambda -> anti(p) + pi^+ decay
  261. float massAntiLambda() const {
  262. return TMath::Sqrt((ePosPion() + eNegProton()) * (ePosPion() + eNegProton()) + ptot2V0());
  263. }
  264. /// Mass of V0 assuming AntiLambda -> anti(p) + pi^+ decay
  265. float MassAntiLambda() const {
  266. return massAntiLambda();
  267. }
  268. /// Mass of the V0 assuming K_s^0 -> pi^+ + pi^- decay
  269. float massK0Short() const {
  270. return TMath::Sqrt((ePosPion() + eNegPion()) * (ePosPion() + ePosPion()) + ptot2V0());
  271. }
  272. /// Mass of the V0 assuming K_s^0 -> pi^+ + pi^- decay
  273. float MassK0Short() const {
  274. return massK0Short();
  275. }
  276. /// Mass of the V0 assuming phi^0 -> K^+ + K^- decay
  277. float massPhi() const {
  278. return TMath::Sqrt((ePosKaon() + eNegKaon()) * (ePosKaon() + eNegKaon()) + ptot2V0());
  279. }
  280. /// Mass of the V0 assuming phi^0 -> K^+ + K^- decay
  281. float MassPhi() const {
  282. return massPhi();
  283. }
  284. /// Mass difference between measured and PDG values
  285. float dMLambda() const {
  286. return (massLambda() - M_LAMBDA);
  287. }
  288. /// Mass difference between measured and PDG values
  289. float dMAntiLambda() const {
  290. return (massAntiLambda() - M_LAMBDA);
  291. }
  292. /// Mass difference between measured and PDG values
  293. float dMK0Short() const {
  294. return (massK0Short() - M_KAON_0_SHORT);
  295. }
  296. /// Mass difference between measured and PDG values
  297. float dMPhi() const {
  298. return (massPhi() - M_PHI);
  299. }
  300. /// Rapidity of V0 assuming Lambda
  301. float rapidityLambda() const;
  302. /// Rapidity of V0 assuming Lambda
  303. float RapidityLambda() const {
  304. return rapidityLambda();
  305. }
  306. /// Rapidity of V0 assuming K_s^0
  307. float rapidityK0Short() const;
  308. /// Rapidity of V0 assuming K_s^0
  309. float RapidityK0Short() const {
  310. return rapidityK0Short();
  311. }
  312. /// Rapidity of V0 assuming phi^0
  313. float rapidityPhi() const;
  314. /// Rapidity of V0 assuming phi^0
  315. float RapidityPhi() const {
  316. return rapidityPhi();
  317. }
  318. /// Rapidity of V0 assuming Lambda
  319. float rapLambda() const {
  320. return rapidityLambda();
  321. }
  322. /// Rapidity of V0 assuming K_s^0
  323. float rapK0Short() const {
  324. return rapidityK0Short();
  325. }
  326. /// Rapidity of V0 assuming phi^0
  327. float rapPhi() const {
  328. return rapidityPhi();
  329. }
  330. /// ctau for V0 assuming Lambda
  331. float cTauLambda() const {
  332. return ( M_LAMBDA * v0DecayLength() / ptotV0());
  333. }
  334. /// ctau for V0 assuming Lambda
  335. float CTauLambda() const {
  336. return cTauLambda();
  337. }
  338. /// ctau for V0 assuming K_s^0
  339. float cTauK0Short() const {
  340. return ( M_KAON_0_SHORT * v0DecayLength() / ptotV0());
  341. }
  342. /// ctau for V0 assuming K_s^0
  343. float CTauK0Short() const {
  344. return cTauK0Short();
  345. }
  346. /// ctau for V0 assuming phi^0
  347. float cTauPhi() const {
  348. return ( M_PHI * v0DecayLength() / ptotV0());
  349. }
  350. /// ctau for V0 assuming phi^0
  351. float CTauPhi() const {
  352. return cTauPhi();
  353. }
  354. /// Energy of positive track assuming proton
  355. float ePosProton() const {
  356. return TMath::Sqrt(M_PROTON * M_PROTON + mV0PtotPos * mV0PtotPos);
  357. }
  358. /// Energy of positive track assuming proton
  359. float EPosProton() const {
  360. return ePosProton();
  361. }
  362. /// Energy of positive track assuming pion
  363. float ePosPion() const {
  364. return TMath::Sqrt(M_PION_PLUS * M_PION_PLUS + mV0PtotPos * mV0PtotPos);
  365. }
  366. /// Energy of positive track assuming pion
  367. float EPosPion() const {
  368. return ePosPion();
  369. }
  370. /// Energy of positive track assuming kaon
  371. float ePosKaon() const {
  372. return TMath::Sqrt(M_KAON_PLUS * M_KAON_PLUS + mV0PtotPos * mV0PtotPos);
  373. }
  374. /// Energy of positive track assuming kaon
  375. float EPosKaon() const {
  376. return ePosKaon();
  377. }
  378. /// Energy of positive track assuming antiproton
  379. float eNegProton() const {
  380. return TMath::Sqrt(M_ANTIPROTON * M_ANTIPROTON + mV0PtotNeg * mV0PtotNeg);
  381. }
  382. /// Energy of positive track assuming antiproton
  383. float ENegProton() const {
  384. return eNegProton();
  385. }
  386. /// Energy of positive track assuming pion
  387. float eNegPion() const {
  388. return TMath::Sqrt(M_PION_MINUS * M_PION_MINUS + mV0PtotNeg * mV0PtotNeg);
  389. }
  390. /// Energy of positive track assuming pion
  391. float ENegPion() const {
  392. return eNegPion();
  393. }
  394. /// Energy of positive track assuming kaon
  395. float eNegKaon() const {
  396. return TMath::Sqrt(M_KAON_MINUS * M_KAON_MINUS + mV0PtotNeg * mV0PtotNeg);
  397. }
  398. /// Energy of positive track assuming kaon
  399. float ENegKaon() const {
  400. return eNegKaon();
  401. }
  402. /// chi2 of the V0 reconstruction
  403. float chi2V0() const {
  404. return (float) mChi2V0 / 10.;
  405. }
  406. /// chi2 of the V0 reconstruction
  407. float Chi2V0() const {
  408. return chi2V0();
  409. }
  410. /// Confidence level of V0 reconstruction
  411. float clV0() const {
  412. return mClV0;
  413. }
  414. /// Confidence level of V0 reconstruction
  415. float ClV0() const {
  416. return clV0();
  417. }
  418. /// Set primary vertex position (x,y,z)
  419. void setPrimaryVertex(const float& x, const float& y, const float& z) {
  420. mPrimaryVertexX = x;
  421. mPrimaryVertexY = y;
  422. mPrimaryVertexZ = z;
  423. }
  424. /// Set primary vertex position (x,y,z)
  425. void SetPrimaryVertex(const float& x, const float& y, const float& z) {
  426. setPrimaryVertex(x, y, z);
  427. }
  428. /// Set primary vertex position (TVector3)
  429. void setPrimaryVertex(const TVector3& vtx) {
  430. setPrimaryVertex(vtx.X(), vtx.Y(), vtx.Z());
  431. }
  432. /// Set primary vertex position (TVector3)
  433. void SetPrimaryVertex(const TVector3& vtx) {
  434. setPrimaryVertex(vtx.X(), vtx.Y(), vtx.Z());
  435. }
  436. /// Set decay point (x,y,z)
  437. void setDecayPoint(const float& x, const float& y, const float& z) {
  438. mV0DecayPointX = x;
  439. mV0DecayPointY = y;
  440. mV0DecayPointZ = z;
  441. }
  442. /// Set decay point (x,y,z)
  443. void SetDecayPoint(const float& x, const float& y, const float& z) {
  444. setDecayPoint(x, y, z);
  445. }
  446. /// Set decay point (TVector3)
  447. void setDecayPoint(const TVector3& point) {
  448. setDecayPoint(point.X(), point.Y(), point.Z());
  449. }
  450. /// Set decay point (TVector3)
  451. void SetDecayPoint(const TVector3& point) {
  452. setDecayPoint(point.X(), point.Y(), point.Z());
  453. }
  454. /// Set magnetic field strength
  455. void setBField(const float& field) {
  456. mBField = field;
  457. }
  458. /// Set magnetic field strength
  459. void SetBField(const float& field) {
  460. setBField(field);
  461. }
  462. /// Set magnetic field strength
  463. void setMagneticField(const float& field) {
  464. setBField(field);
  465. }
  466. /// Set magnetic field strength
  467. void SetMagneticField(const float& field) {
  468. setBField(field);
  469. }
  470. /// Set V0 momentum (x,y,z)
  471. void setV0Mom(const float& px, const float& py, const float& pz) {
  472. mV0MomX = px;
  473. mV0MomY = py;
  474. mV0MomZ = pz;
  475. }
  476. /// Set V0 momentum (x,y,z)
  477. void SetV0Mom(const float& px, const float& py, const float& pz) {
  478. setV0Mom(px, py, pz);
  479. }
  480. /// Set V0 momentum (TVector3)
  481. void setV0Mom(const TVector3& mom) {
  482. setV0Mom(mom.X(), mom.Y(), mom.Z());
  483. }
  484. /// Set V0 momentum (TVector3)
  485. void SetV0Mom(const TVector3& mom) {
  486. setV0Mom(mom.X(), mom.Y(), mom.Z());
  487. }
  488. /// Set V0 momentum (TVector3)
  489. void setMomV0(const TVector3& mom) {
  490. setV0Mom(mom);
  491. }
  492. /// Set V0 momentum (TVector3)
  493. void SetMomV0(const TVector3& mom) {
  494. setV0Mom(mom);
  495. }
  496. /// Set momentum of positive V0 daughter
  497. void setV0PtotPos(const float& ptot) {
  498. mV0PtotPos = ptot;
  499. }
  500. /// Set momentum of positive V0 daughter
  501. void SetV0PtotPos(const float& ptot) {
  502. setV0PtotPos(ptot);
  503. }
  504. /// Set momentum of negative V0 daughter
  505. void setV0PtotNeg(const float& ptot) {
  506. mV0PtotNeg = ptot;
  507. }
  508. /// Set momentum of negative V0 daughter
  509. void SetV0PtotNeg(const float& ptot) {
  510. setV0PtotNeg(ptot);
  511. }
  512. /// Set DCA between daughters
  513. void setV0DcaDaughters(const float& dca) {
  514. mV0DcaDaughters = dca;
  515. }
  516. /// Set DCA between daughters
  517. void SetV0DcaDaughters(const float& dca) {
  518. setV0DcaDaughters(dca);
  519. }
  520. /// Set DCA of V0 to primary vertex
  521. void setV0Dca2PrimaryVertex(const float& dca) {
  522. mV0DcaToPrimVertex = dca;
  523. }
  524. /// Set DCA of V0 to primary vertex
  525. void SetV0Dca2PrimaryVertex(const float& dca) {
  526. setV0Dca2PrimaryVertex(dca);
  527. }
  528. /// Set DCA of V0 to primary vertex
  529. void setV0DcaToPrimaryVertex(const float& dca) {
  530. mV0DcaToPrimVertex = dca;
  531. }
  532. /// Set chi2 of V0 reconstruction
  533. void setChi2V0(const float& chi2);
  534. /// Set chi2 of V0 reconstruction
  535. void SetChi2V0(const float& chi2) {
  536. setChi2V0(chi2);
  537. }
  538. /// Set confidence level of V0 reconstruction
  539. void setClV0(const float& cl) {
  540. mClV0 = cl;
  541. }
  542. /// Set confidence level of V0 reconstruction
  543. void SetClV0(const float& cl) {
  544. setClV0(cl);
  545. }
  546. /// Set alpha of Podolyanski-Armenteros
  547. void setArmAlphaV0(const float& alpha) {
  548. mAlphaV0 = alpha;
  549. }
  550. /// Set alpha of Podolyanski-Armenteros
  551. void SetArmAlphaV0(const float& alpha) {
  552. setArmAlphaV0(alpha);
  553. }
  554. /// Set pT of Podolyanski-Armenteros
  555. void setArmPtV0(const float& pt) {
  556. mPtArmV0 = pt;
  557. }
  558. /// Set pT of Podolyanski-Armenteros
  559. void SetArmPtV0(const float& pt) {
  560. setArmPtV0(pt);
  561. }
  562. /// Recalculate most of V0 parameters using daughter tracks
  563. /// and primary vertex information
  564. void updateV0();
  565. /// Recalculate most of V0 parameters using daughter tracks
  566. /// and primary vertex information
  567. void UpdateV0() {
  568. updateV0();
  569. }
  570. // Positive daughter //
  571. /// Unique ID of the positive daughter
  572. unsigned short idPos() const {
  573. return mPosId;
  574. }
  575. /// Unique ID of the positive daughter
  576. unsigned short IdPos() const {
  577. return idPos();
  578. }
  579. /// Unique ID of the positive daughter
  580. unsigned short keyPos() const {
  581. return mPosId;
  582. }
  583. /// Unique ID of the positive daughter
  584. unsigned short KeyPos() const {
  585. return keyPos();
  586. }
  587. /// Momentum of the positive daughter
  588. TVector3 momPos() const {
  589. return TVector3(mPosMomX, mPosMomY, mPosMomZ);
  590. }
  591. /// Momentum of the positive daughter
  592. TVector3 MomPos() const {
  593. return momPos();
  594. }
  595. /// Px of the positive daughter
  596. float momXPos() const {
  597. return momPos().X();
  598. }
  599. /// Px of the positive daughter
  600. float MomXPos() const {
  601. return momXPos();
  602. }
  603. /// Py of the positive daughter
  604. float momYPos() const {
  605. return momPos().Y();
  606. }
  607. /// Py of the positive daughter
  608. float MomYPos() const {
  609. return momYPos();
  610. }
  611. /// Pz of the positive daughter
  612. float momZPos() const {
  613. return momPos().Z();
  614. }
  615. /// Pz of the positive daughter
  616. float MomZPos() const {
  617. return momZPos();
  618. }
  619. /// Transverse momentum of positive daughter
  620. float ptPos() const {
  621. return momPos().Perp();
  622. }
  623. /// Transverse momentum of positive daughter
  624. float PtPos() const {
  625. return ptPos();
  626. }
  627. /// Momentum magnitude of the positive daughter
  628. float ptotPos() const {
  629. return momPos().Mag();
  630. }
  631. /// Momentum magnitude of the positive daughter
  632. float PtotPos() const {
  633. return ptotPos();
  634. }
  635. /// Momentum squared of the positive daughter
  636. float ptot2Pos() const {
  637. return momPos().Mag2();
  638. }
  639. /// Momentum squared of the positive daughter
  640. float Ptot2Pos() const {
  641. return ptot2Pos();
  642. }
  643. /// Pseudorapidity of the positive daughter
  644. float etaPos() const {
  645. return momPos().PseudoRapidity();
  646. }
  647. /// Pseudorapidity of the positive daughter
  648. float EtaPos() const {
  649. return etaPos();
  650. }
  651. /// Pseudorapidity of the positive daughter
  652. float pseudoRapPos() const {
  653. return etaPos();
  654. }
  655. /// Pseudorapidity of the positive daughter
  656. float PseudoRapPos() const {
  657. return etaPos();
  658. }
  659. /// Azimuthal angel of the positive daughter
  660. float phiPos() const {
  661. return momPos().Phi();
  662. }
  663. /// Azimuthal angel of the positive daughter
  664. float PhiPos() const {
  665. return phiPos();
  666. }
  667. /// DCA of the positive daughter to primary vertex
  668. TVector3 dcaPosToPrimVertex() const {
  669. return TVector3(mPosDca2PrimVertexX, mPosDca2PrimVertexY, mPosDca2PrimVertexZ);
  670. }
  671. /// DCA of the positive daughter to primary vertex
  672. TVector3 DcaPosToPrimVertex() const {
  673. return dcaPosToPrimVertex();
  674. }
  675. /// Origin of the positive daughter (point of DCA to primary vertex)
  676. TVector3 originPos() const {
  677. return ( primaryVertex() + dcaPosToPrimVertex());
  678. }
  679. /// Origin of the positive daughter (point of DCA to primary vertex)
  680. TVector3 OriginPos() const {
  681. return originPos();
  682. }
  683. /// Number of hits of positive daughter
  684. unsigned short tpcHitsPos() const {
  685. return nHitsPos();
  686. }
  687. /// Number of hits of positive daughter
  688. unsigned short nHitsPos() const {
  689. return (unsigned short) mPosNHits;
  690. }
  691. /// Number of hits of positive daughter
  692. unsigned short NHitsPos() const {
  693. return nHitsPos();
  694. }
  695. /// Number of fitted points of positive daughter
  696. unsigned short nHitsFitPos() const {
  697. return (unsigned short) mPosNHits;
  698. }
  699. /// Number of fitted points of positive daughter
  700. unsigned short NHitsFitPos() const {
  701. return nHitsFitPos();
  702. }
  703. /// Possible number of hits of positive track
  704. unsigned short nHitsPossiblePos() const {
  705. return (unsigned short) mPosNHitsPoss;
  706. }
  707. /// Possible number of hits of positive track
  708. unsigned short NHitsPossiblePos() const {
  709. return nHitsPossiblePos();
  710. }
  711. /// nHitsFit/nHitsPossible of positive track
  712. float nHitsFitOPossRatioPos() const {
  713. return (float) nHitsFitPos() / nHitsPossiblePos();
  714. }
  715. /// nHitsFit/nHitsPossible of positive track
  716. float NHitsFitOPossRatioPos() const {
  717. return nHitsFitOPossRatioPos();
  718. }
  719. /// Number of hits used for dE/dx of positive daughter
  720. unsigned short nHitsDedxPos() const {
  721. return (unsigned short) mPosNHitsDedx;
  722. }
  723. /// Number of hits used for dE/dx of positive daughter
  724. unsigned short NHitsDedxPos() const {
  725. return nHitsDedxPos();
  726. }
  727. /// Number of hits used for dE/dx of positive daughter
  728. unsigned short numdedxPos() const {
  729. return nHitsDedxPos();
  730. }
  731. /// Chi2 of resonstruction of the positive daughter
  732. float chi2Pos() const {
  733. return (float) mPosChi2 / 10.f;
  734. }
  735. /// Chi2 of resonstruction of the positive daughter
  736. float Chi2Pos() const {
  737. return chi2Pos();
  738. }
  739. /// dE/dx of the positive daughter (in GeV/cm)
  740. float dedxPos() const {
  741. return dEdxPos();
  742. }
  743. /// dE/dx of the positive daughter (in GeV/cm)
  744. float dEdxPos() const {
  745. return (float) mPosDedx * 1e-9;
  746. }
  747. /// nSigma(e) of positive daughter
  748. float nSigmaElectronPos() const {
  749. return (float) mPosNSigmaElectron / 1000.f;
  750. }
  751. /// nSigma(e) of positive daughter
  752. float NSigmaElectronPos() const {
  753. return nSigmaElectronPos();
  754. }
  755. /// nSigma(pi) of positive daughter
  756. float nSigmaPionPos() const {
  757. return (float) mPosNSigmaPion / 1000.f;
  758. }
  759. /// nSigma(pi) of positive daughter
  760. float NSigmaPionPos() const {
  761. return nSigmaPionPos();
  762. }
  763. /// nSigma(K) of positive daughter
  764. float nSigmaKaonPos() const {
  765. return (float) mPosNSigmaKaon / 1000.f;
  766. }
  767. /// nSigma(K) of positive daughter
  768. float NSigmaKaonPos() const {
  769. return nSigmaKaonPos();
  770. }
  771. /// nSigma(p) of positive daughter
  772. float nSigmaProtonPos() const {
  773. return (float) mPosNSigmaProton / 1000.f;
  774. }
  775. /// nSigma(p) of positive daughter
  776. float NSigmaProtonPos() const {
  777. return nSigmaProtonPos();
  778. }
  779. /// If positive daughter has signal in TOF
  780. bool isTofTrackPos() const {
  781. return (mPosTofBeta > 0) ? true : false;
  782. }
  783. /// If positive daughter has signal in TOF
  784. bool IsTofTrackPos() const {
  785. return isTofTrackPos();
  786. }
  787. /// Velocity of the positive daughter (by TOF)
  788. float betaPos() const {
  789. return ( isTofTrackPos()) ? (float) mPosTofBeta / 20000.f : -999.f;
  790. }
  791. /// Velocity of the positive daughter (by TOF)
  792. float BetaPos() const {
  793. return betaPos();
  794. }
  795. /// Inversed beta of the positive daughter
  796. float inverseBetaPos() const {
  797. return ( isTofTrackPos()) ? 1. / betaPos() : -999.f;
  798. }
  799. /// Inversed beta of the positive daughter
  800. float InverseBetaPos() const {
  801. return inverseBetaPos();
  802. }
  803. /// Square of inversed beta of the positive daughter
  804. float inverseBeta2Pos() const {
  805. return ( isTofTrackPos()) ? 1. / (betaPos() * betaPos()) : -999.f;
  806. }
  807. /// Square of inversed beta of the positive daughter
  808. float InverseBeta2Pos() const {
  809. return inverseBeta2Pos();
  810. }
  811. /// Squared mass of the positive daughter (by TOF)
  812. float massSqrPos() const {
  813. return ( isTofTrackPos()) ? (ptot2Pos() * (inverseBeta2Pos() - 1.)) : -999.f;
  814. }
  815. /// Squared mass of the positive daughter (by TOF)
  816. float MassSqrPos() const {
  817. return massSqrPos();
  818. }
  819. /// Topology map of the positive daughter
  820. unsigned int topologyMapPos(unsigned int& word) const {
  821. return mPosTopologyMap[word];
  822. }
  823. /// Topology map of the positive daughter
  824. unsigned int TopologyMapPos(unsigned int& word) const {
  825. return topologyMapPos(word);
  826. }
  827. /// Topology map of the positive daughter
  828. unsigned int trackTopologyMapPos(unsigned int& word) const {
  829. return topologyMapPos(word);
  830. }
  831. /// Helix of the positive daughter
  832. MpdFemtoPhysicalHelix helixPos() const;
  833. /// Set unique ID of the positive daughter
  834. void setIdPos(const int& id) {
  835. mPosId = (id > 0) ? id : 0;
  836. }
  837. /// Set unique ID of the positive daughter
  838. void SetIdPos(const int& id) {
  839. setIdPos(id);
  840. }
  841. /// Set unique ID of the positive daughter
  842. void setIdPos(const short& id) {
  843. mPosId = (id > 0) ? id : 0;
  844. }
  845. /// Set unique ID of the positive daughter
  846. void setKeyPos(const int& id) {
  847. mPosId = (id > 0) ? id : 0;
  848. }
  849. /// Set unique ID of the positive daughter
  850. void SetKeyPos(const int& id) {
  851. setKeyPos(id);
  852. }
  853. /// Set unique ID of the positive daughter
  854. void setKeyPos(const short& id) {
  855. mPosId = (id > 0) ? id : 0;
  856. }
  857. /// Set momentum of the positive daughter (x,y,z)
  858. void setMomPos(const float& px, const float& py, const float& pz) {
  859. mPosMomX = px;
  860. mPosMomY = py;
  861. mPosMomZ = pz;
  862. }
  863. /// Set momentum of the positive daughter (x,y,z)
  864. void SetMomPos(const float& px, const float& py, const float& pz) {
  865. setMomPos(px, py, pz);
  866. }
  867. /// Set momentum of the positive daughter (TVector3)
  868. void setMomPos(const TVector3& mom) {
  869. setMomPos(mom.X(), mom.Y(), mom.Z());
  870. }
  871. /// Set momentum of the positive daughter (TVector3)
  872. void SetMomPos(const TVector3& mom) {
  873. setMomPos(mom);
  874. }
  875. /// Set px of the positive daughter
  876. void setMomXPos(const float& px) {
  877. mPosMomX = px;
  878. }
  879. /// Set px of the positive daughter
  880. void SetMomXPos(const float& px) {
  881. setMomXPos(px);
  882. }
  883. /// Set py of the positive daughter
  884. void setMomYPos(const float& py) {
  885. mPosMomY = py;
  886. }
  887. /// Set py of the positive daughter
  888. void SetMomYPos(const float& py) {
  889. setMomYPos(py);
  890. }
  891. /// Set pz of the positive daughter
  892. void setMomZPos(const float& pz) {
  893. mPosMomZ = pz;
  894. }
  895. /// Set pz of the positive daughter
  896. void SetMomZPos(const float& pz) {
  897. setMomZPos(pz);
  898. }
  899. /// Set DCA of the positive daughter to primary vertex (x,y,z)
  900. void setDcaGlobalPos(const float& x, const float& y, const float& z) {
  901. mPosDca2PrimVertexX = x;
  902. mPosDca2PrimVertexY = y;
  903. mPosDca2PrimVertexZ = z;
  904. }
  905. /// Set DCA of the positive daughter to primary vertex (x,y,z)
  906. void SetDcaGlobalPos(const float& x, const float& y, const float& z) {
  907. setDcaGlobalPos(x, y, z);
  908. }
  909. /// Set DCA of the positive daughter to primary vertex (TVector3)
  910. void setDcaGlobalPos(const TVector3& dca) {
  911. setDcaGlobalPos(dca.X(), dca.Y(), dca.Z());
  912. }
  913. /// Set DCA of the positive daughter to primary vertex (TVector3)
  914. void SetDcaGlobalPos(const TVector3& dca) {
  915. setDcaGlobalPos(dca.X(), dca.Y(), dca.Z());
  916. }
  917. /// Set DCAx of the positive daughter to primary vertex
  918. void setDcaGlobalXPos(const float& x) {
  919. mPosDca2PrimVertexX = x;
  920. }
  921. /// Set DCAx of the positive daughter to primary vertex
  922. void SetDcaGlobalXPos(const float& x) {
  923. setDcaGlobalXPos(x);
  924. }
  925. /// Set DCAy of the positive daughter to primary vertex
  926. void setDcaGlobalYPos(const float& y) {
  927. mPosDca2PrimVertexY = y;
  928. }
  929. /// Set DCAy of the positive daughter to primary vertex
  930. void SetDcaGlobalYPos(const float& y) {
  931. setDcaGlobalYPos(y);
  932. }
  933. /// Set DCAz of the positive daughter to primary vertex
  934. void setDcaGlobalZPos(const float& z) {
  935. mPosDca2PrimVertexZ = z;
  936. }
  937. /// Set DCAz of the positive daughter to primary vertex
  938. void SetDcaGlobalZPos(const float& z) {
  939. setDcaGlobalZPos(z);
  940. }
  941. /// Set number of hits of the positive daughter
  942. void setNHitsPos(const int& nhits) {
  943. mPosNHits = (nhits > 0) ? nhits : 0;
  944. }
  945. /// Set number of hits of the positive daughter
  946. void SetNHitsPos(const int& nhits) {
  947. setNHitsPos(nhits);
  948. }
  949. /// Set positive number of hits of the positive daughter
  950. void setNHitsPossiblePos(const int& nhits) {
  951. mPosNHitsPoss = (nhits > 0) ? nhits : 0;
  952. }
  953. /// Set positive number of hits of the positive daughter
  954. void SetNHitsPossiblePos(const int& nhits) {
  955. setNHitsPossiblePos(nhits);
  956. }
  957. /// Set number of hits used for dE/dx estimation of the positive daughter
  958. void setNHitsDedxPos(const int& nhits) {
  959. mPosNHitsDedx = (nhits > 0) ? nhits : 0;
  960. }
  961. /// Set number of hits used for dE/dx estimation of the positive daughter
  962. void SetNHitsDedxPos(const int& nhits) {
  963. setNHitsDedxPos(nhits);
  964. }
  965. /// Set topology map of the positive daughter
  966. void setTopologyMapPos(const int& word, const int& val) {
  967. mPosTopologyMap[word] = val;
  968. }
  969. /// Set topology map of the positive daughter
  970. void SetTopologyMapPos(const int& word, const int& val) {
  971. setTopologyMapPos(word, val);
  972. }
  973. /// Set chi2 of reconstruction of the positive daughter
  974. void setChi2Pos(const float& chi2) {
  975. mPosChi2 = ((chi2 * 10) > std::numeric_limits<unsigned char>::max() ?
  976. std::numeric_limits<unsigned char>::max() :
  977. (unsigned char) TMath::Nint(chi2 * 10.f));
  978. }
  979. /// Set chi2 of reconstruction of the positive daughter
  980. void SetChi2Pos(const float& chi2) {
  981. setChi2Pos(chi2);
  982. }
  983. /// Set dE/dx of the positive daughter (from GeV/cm)
  984. void setDedxPos(const double& dEdx) {
  985. if (dEdx <= 0) {
  986. mPosDedx = 0;
  987. } else {
  988. mPosDedx = ((dEdx * 1e9) > std::numeric_limits<unsigned short>::max() ?
  989. std::numeric_limits<unsigned short>::max() :
  990. (unsigned short) (dEdx * 1e9));
  991. }
  992. }
  993. /// Set dE/dx of the positive daughter (from GeV/cm)
  994. void SetDedxPos(const double& dEdx) {
  995. setDedxPos(dEdx);
  996. }
  997. /// Set dE/dx of the positive daughter (from keV/cm)
  998. void setDedxPosInKeV(const double& dEdx) {
  999. if (dEdx <= 0) {
  1000. mPosDedx = 0;
  1001. } else {
  1002. mPosDedx = ((dEdx * 1e3) > std::numeric_limits<unsigned short>::max() ?
  1003. std::numeric_limits<unsigned short>::max() :
  1004. (unsigned short) (dEdx * 1e3));
  1005. }
  1006. }
  1007. /// Set dE/dx of the positive daughter (from GeV/cm)
  1008. void SetDedxPosInKeV(const double& dEdx) {
  1009. setDedxPosInKeV(dEdx);
  1010. }
  1011. /// Set nSigma(e) of the positive daughter
  1012. void setNSigmaElectronPos(const float& nsigma);
  1013. /// Set nSigma(e) of the positive daughter
  1014. void SetNSigmaElectronPos(const float& nsigma) {
  1015. setNSigmaElectronPos(nsigma);
  1016. }
  1017. /// Set nSigma(pi) of the positive daughter
  1018. void setNSigmaPionPos(const float& nsigma);
  1019. /// Set nSigma(pi) of the positive daughter
  1020. void SetNSigmaPionPos(const float& nsigma) {
  1021. setNSigmaPionPos(nsigma);
  1022. }
  1023. /// Set nSigma(K) of the positive daughter
  1024. void setNSigmaKaonPos(const float& nsigma);
  1025. /// Set nSigma(K) of the positive daughter
  1026. void SetNSigmaKaonPos(const float& nsigma) {
  1027. setNSigmaKaonPos(nsigma);
  1028. }
  1029. /// Set nSigma(p) of the positive daughter
  1030. void setNSigmaProtonPos(const float& nsigma);
  1031. /// Set nSigma(p) of the positive daughter
  1032. void SetNSigmaProtonPos(const float& nsigma) {
  1033. setNSigmaProtonPos(nsigma);
  1034. }
  1035. /// Set velocity of the positive daughter (from TOF)
  1036. void setTofBetaPos(const float& beta);
  1037. /// Set velocity of the positive daughter (from TOF)
  1038. void SetTofBetaPos(const float& beta) {
  1039. setTofBetaPos(beta);
  1040. }
  1041. // Negative daughter //
  1042. /// Unique ID of the negative daughter
  1043. unsigned short idNeg() const {
  1044. return mNegId;
  1045. }
  1046. /// Unique ID of the negative daughter
  1047. unsigned short IdNeg() const {
  1048. return idNeg();
  1049. }
  1050. /// Unique ID of the negative daughter
  1051. unsigned short keyNeg() const {
  1052. return mNegId;
  1053. }
  1054. /// Unique ID of the negative daughter
  1055. unsigned short KeyNeg() const {
  1056. return keyNeg();
  1057. }
  1058. /// Momentum of the negative daughter
  1059. TVector3 momNeg() const {
  1060. return TVector3(mNegMomX, mNegMomY, mNegMomZ);
  1061. }
  1062. /// Momentum of the negative daughter
  1063. TVector3 MomNeg() const {
  1064. return momNeg();
  1065. }
  1066. /// Px of the negative daughter
  1067. float momXNeg() const {
  1068. return momNeg().X();
  1069. }
  1070. /// Px of the negative daughter
  1071. float MomXNeg() const {
  1072. return momXNeg();
  1073. }
  1074. /// Py of the negative daughter
  1075. float momYNeg() const {
  1076. return momNeg().Y();
  1077. }
  1078. /// Py of the negative daughter
  1079. float MomYNeg() const {
  1080. return momYNeg();
  1081. }
  1082. /// Pz of the negative daughter
  1083. float momZNeg() const {
  1084. return momNeg().Z();
  1085. }
  1086. /// Pz of the negative daughter
  1087. float MomZNeg() const {
  1088. return momZNeg();
  1089. }
  1090. /// Transverse momentum of negative daughter
  1091. float ptNeg() const {
  1092. return momNeg().Perp();
  1093. }
  1094. /// Transverse momentum of negative daughter
  1095. float PtNeg() const {
  1096. return ptNeg();
  1097. }
  1098. /// Momentum magnitude of the negative daughter
  1099. float ptotNeg() const {
  1100. return momNeg().Mag();
  1101. }
  1102. /// Momentum magnitude of the negative daughter
  1103. float PtotNeg() const {
  1104. return ptotNeg();
  1105. }
  1106. /// Momentum squared of the negative daughter
  1107. float ptot2Neg() const {
  1108. return momNeg().Mag2();
  1109. }
  1110. /// Momentum squared of the negative daughter
  1111. float Ptot2Neg() const {
  1112. return ptot2Neg();
  1113. }
  1114. /// Pseudorapidity of the negative daughter
  1115. float etaNeg() const {
  1116. return momNeg().PseudoRapidity();
  1117. }
  1118. /// Pseudorapidity of the negative daughter
  1119. float EtaNeg() const {
  1120. return etaNeg();
  1121. }
  1122. /// Pseudorapidity of the negative daughter
  1123. float pseudoRapNeg() const {
  1124. return etaNeg();
  1125. }
  1126. /// Pseudorapidity of the negative daughter
  1127. float PseudoRapNeg() const {
  1128. return etaNeg();
  1129. }
  1130. /// Azimuthal angel of the negative daughter
  1131. float phiNeg() const {
  1132. return momNeg().Phi();
  1133. }
  1134. /// Azimuthal angel of the negative daughter
  1135. float PhiNeg() const {
  1136. return phiNeg();
  1137. }
  1138. /// DCA of the negative daughter to primary vertex
  1139. TVector3 dcaNegToPrimVertex() const {
  1140. return TVector3(mNegDca2PrimVertexX, mNegDca2PrimVertexY, mNegDca2PrimVertexZ);
  1141. }
  1142. /// DCA of the negative daughter to primary vertex
  1143. TVector3 DcaNegToPrimVertex() const {
  1144. return dcaNegToPrimVertex();
  1145. }
  1146. /// Origin of the negative daughter (point of DCA to primary vertex)
  1147. TVector3 originNeg() const {
  1148. return ( primaryVertex() + dcaNegToPrimVertex());
  1149. }
  1150. /// Origin of the negative daughter (point of DCA to primary vertex)
  1151. TVector3 OriginNeg() const {
  1152. return originNeg();
  1153. }
  1154. /// Number of hits of negative daughter
  1155. unsigned short tpcHitsNeg() const {
  1156. return nHitsNeg();
  1157. }
  1158. /// Number of hits of negative daughter
  1159. unsigned short nHitsNeg() const {
  1160. return (unsigned short) mNegNHits;
  1161. }
  1162. /// Number of hits of negative daughter
  1163. unsigned short NHitsNeg() const {
  1164. return nHitsNeg();
  1165. }
  1166. /// Number of fitted points of negative daughter
  1167. unsigned short nHitsFitNeg() const {
  1168. return (unsigned short) mNegNHits;
  1169. }
  1170. /// Number of fitted points of negative daughter
  1171. unsigned short NHitsFitNeg() const {
  1172. return nHitsFitNeg();
  1173. }
  1174. /// Negsible number of hits of negative track
  1175. unsigned short nHitsPossibleNeg() const {
  1176. return (unsigned short) mNegNHitsPoss;
  1177. }
  1178. /// Possible number of hits of negative track
  1179. unsigned short NHitsPossibleNeg() const {
  1180. return nHitsPossibleNeg();
  1181. }
  1182. /// nHitsFit/nHitsPossible of negative track
  1183. float nHitsFitOPossRatioNeg() const {
  1184. return (float) nHitsFitNeg() / nHitsPossibleNeg();
  1185. }
  1186. /// nHitsFit/nHitsPossible of negative track
  1187. float NHitsFitOPossRatioNeg() const {
  1188. return nHitsFitOPossRatioNeg();
  1189. }
  1190. /// Number of hits used for dE/dx of negative daughter
  1191. unsigned short nHitsDedxNeg() const {
  1192. return (unsigned short) mNegNHitsDedx;
  1193. }
  1194. /// Number of hits used for dE/dx of negative daughter
  1195. unsigned short NHitsDedxNeg() const {
  1196. return nHitsDedxNeg();
  1197. }
  1198. /// Number of hits used for dE/dx of negative daughter
  1199. unsigned short numdedxNeg() const {
  1200. return nHitsDedxNeg();
  1201. }
  1202. /// Chi2 of resonstruction of the negative daughter
  1203. float chi2Neg() const {
  1204. return (float) mNegChi2 / 10.f;
  1205. }
  1206. /// Chi2 of resonstruction of the negative daughter
  1207. float Chi2Neg() const {
  1208. return chi2Neg();
  1209. }
  1210. /// dE/dx of the negative daughter (in GeV/cm)
  1211. float dedxNeg() const {
  1212. return dEdxNeg();
  1213. }
  1214. /// dE/dx of the negative daughter (in GeV/cm)
  1215. float dEdxNeg() const {
  1216. return (float) mNegDedx * 1e-9;
  1217. }
  1218. /// nSigma(e) of negative daughter
  1219. float nSigmaElectronNeg() const {
  1220. return (float) mNegNSigmaElectron / 1000.f;
  1221. }
  1222. /// nSigma(e) of negative daughter
  1223. float NSigmaElectronNeg() const {
  1224. return nSigmaElectronNeg();
  1225. }
  1226. /// nSigma(pi) of negative daughter
  1227. float nSigmaPionNeg() const {
  1228. return (float) mNegNSigmaPion / 1000.f;
  1229. }
  1230. /// nSigma(pi) of negative daughter
  1231. float NSigmaPionNeg() const {
  1232. return nSigmaPionNeg();
  1233. }
  1234. /// nSigma(K) of negative daughter
  1235. float nSigmaKaonNeg() const {
  1236. return (float) mNegNSigmaKaon / 1000.f;
  1237. }
  1238. /// nSigma(K) of negative daughter
  1239. float NSigmaKaonNeg() const {
  1240. return nSigmaKaonNeg();
  1241. }
  1242. /// nSigma(p) of negative daughter
  1243. float nSigmaProtonNeg() const {
  1244. return (float) mNegNSigmaProton / 1000.f;
  1245. }
  1246. /// nSigma(p) of negative daughter
  1247. float NSigmaProtonNeg() const {
  1248. return nSigmaProtonNeg();
  1249. }
  1250. /// If negative daughter has signal in TOF
  1251. bool isTofTrackNeg() const {
  1252. return (mNegTofBeta > 0) ? true : false;
  1253. }
  1254. /// If negative daughter has signal in TOF
  1255. bool IsTofTrackNeg() const {
  1256. return isTofTrackNeg();
  1257. }
  1258. /// Velocity of the negative daughter (by TOF)
  1259. float betaNeg() const {
  1260. return ( isTofTrackNeg()) ? (float) mNegTofBeta / 20000.f : -999.f;
  1261. }
  1262. /// Velocity of the negative daughter (by TOF)
  1263. float BetaNeg() const {
  1264. return betaNeg();
  1265. }
  1266. /// Inversed beta of the negative daughter
  1267. float inverseBetaNeg() const {
  1268. return ( isTofTrackNeg()) ? 1. / betaNeg() : -999.f;
  1269. }
  1270. /// Inversed beta of the negative daughter
  1271. float InverseBetaNeg() const {
  1272. return inverseBetaNeg();
  1273. }
  1274. /// Square of inversed beta of the negative daughter
  1275. float inverseBeta2Neg() const {
  1276. return ( isTofTrackNeg()) ? 1. / (betaNeg() * betaNeg()) : -999.f;
  1277. }
  1278. /// Square of inversed beta of the negative daughter
  1279. float InverseBeta2Neg() const {
  1280. return inverseBeta2Neg();
  1281. }
  1282. /// Squared mass of the negative daughter (by TOF)
  1283. float massSqrNeg() const {
  1284. return ( isTofTrackNeg()) ? (ptot2Neg() * (inverseBeta2Neg() - 1.)) : -999.f;
  1285. }
  1286. /// Squared mass of the negative daughter (by TOF)
  1287. float MassSqrNeg() const {
  1288. return massSqrNeg();
  1289. }
  1290. /// Topology map of the negative daughter
  1291. unsigned int topologyMapNeg(unsigned int& word) const {
  1292. return mNegTopologyMap[word];
  1293. }
  1294. /// Topology map of the negative daughter
  1295. unsigned int TopologyMapNeg(unsigned int& word) const {
  1296. return topologyMapNeg(word);
  1297. }
  1298. /// Topology map of the negative daughter
  1299. unsigned int trackTopologyMapNeg(unsigned int& word) const {
  1300. return topologyMapNeg(word);
  1301. }
  1302. /// Helix of the negative daughter
  1303. MpdFemtoPhysicalHelix helixNeg() const;
  1304. /// Set unique ID of the negative daughter
  1305. void setIdNeg(const int& id) {
  1306. mNegId = (id > 0) ? id : 0;
  1307. }
  1308. /// Set unique ID of the negative daughter
  1309. void SetIdNeg(const int& id) {
  1310. setIdNeg(id);
  1311. }
  1312. /// Set unique ID of the negative daughter
  1313. void setIdNeg(const short& id) {
  1314. mNegId = (id > 0) ? id : 0;
  1315. }
  1316. /// Set unique ID of the negative daughter
  1317. void setKeyNeg(const int& id) {
  1318. mNegId = (id > 0) ? id : 0;
  1319. }
  1320. /// Set unique ID of the negative daughter
  1321. void SetKeyNeg(const int& id) {
  1322. setKeyNeg(id);
  1323. }
  1324. /// Set unique ID of the negative daughter
  1325. void setKeyNeg(const short& id) {
  1326. mNegId = (id > 0) ? id : 0;
  1327. }
  1328. /// Set momentum of the negative daughter (x,y,z)
  1329. void setMomNeg(const float& px, const float& py, const float& pz) {
  1330. mNegMomX = px;
  1331. mNegMomY = py;
  1332. mNegMomZ = pz;
  1333. }
  1334. /// Set momentum of the negative daughter (x,y,z)
  1335. void SetMomNeg(const float& px, const float& py, const float& pz) {
  1336. setMomNeg(px, py, pz);
  1337. }
  1338. /// Set momentum of the negative daughter (TVector3)
  1339. void setMomNeg(const TVector3& mom) {
  1340. setMomNeg(mom.X(), mom.Y(), mom.Z());
  1341. }
  1342. /// Set momentum of the negative daughter (TVector3)
  1343. void SetMomNeg(const TVector3& mom) {
  1344. setMomNeg(mom);
  1345. }
  1346. /// Set px of the negative daughter
  1347. void setMomXNeg(const float& px) {
  1348. mNegMomX = px;
  1349. }
  1350. /// Set px of the negative daughter
  1351. void SetMomXNeg(const float& px) {
  1352. setMomXNeg(px);
  1353. }
  1354. /// Set py of the negative daughter
  1355. void setMomYNeg(const float& py) {
  1356. mNegMomY = py;
  1357. }
  1358. /// Set py of the negative daughter
  1359. void SetMomYNeg(const float& py) {
  1360. setMomYNeg(py);
  1361. }
  1362. /// Set pz of the negative daughter
  1363. void setMomZNeg(const float& pz) {
  1364. mNegMomZ = pz;
  1365. }
  1366. /// Set pz of the negative daughter
  1367. void SetMomZNeg(const float& pz) {
  1368. setMomZNeg(pz);
  1369. }
  1370. /// Set DCA of the negative daughter to primary vertex (x,y,z)
  1371. void setDcaGlobalNeg(const float& x, const float& y, const float& z) {
  1372. mNegDca2PrimVertexX = x;
  1373. mNegDca2PrimVertexY = y;
  1374. mNegDca2PrimVertexZ = z;
  1375. }
  1376. /// Set DCA of the negative daughter to primary vertex (x,y,z)
  1377. void SetDcaGlobalNeg(const float& x, const float& y, const float& z) {
  1378. setDcaGlobalNeg(x, y, z);
  1379. }
  1380. /// Set DCA of the negative daughter to primary vertex (TVector3)
  1381. void setDcaGlobalNeg(const TVector3& dca) {
  1382. setDcaGlobalNeg(dca.X(), dca.Y(), dca.Z());
  1383. }
  1384. /// Set DCA of the negative daughter to primary vertex (TVector3)
  1385. void SetDcaGlobalNeg(const TVector3& dca) {
  1386. setDcaGlobalNeg(dca.X(), dca.Y(), dca.Z());
  1387. }
  1388. /// Set DCAx of the negative daughter to primary vertex
  1389. void setDcaGlobalXNeg(const float& x) {
  1390. mNegDca2PrimVertexX = x;
  1391. }
  1392. /// Set DCAx of the negative daughter to primary vertex
  1393. void SetDcaGlobalXNeg(const float& x) {
  1394. setDcaGlobalXNeg(x);
  1395. }
  1396. /// Set DCAy of the negative daughter to primary vertex
  1397. void setDcaGlobalYNeg(const float& y) {
  1398. mNegDca2PrimVertexY = y;
  1399. }
  1400. /// Set DCAy of the negative daughter to primary vertex
  1401. void SetDcaGlobalYNeg(const float& y) {
  1402. setDcaGlobalYNeg(y);
  1403. }
  1404. /// Set DCAz of the negative daughter to primary vertex
  1405. void setDcaGlobalZNeg(const float& z) {
  1406. mNegDca2PrimVertexZ = z;
  1407. }
  1408. /// Set DCAz of the negative daughter to primary vertex
  1409. void SetDcaGlobalZNeg(const float& z) {
  1410. setDcaGlobalZNeg(z);
  1411. }
  1412. /// Set number of hits of the negative daughter
  1413. void setNHitsNeg(const int& nhits) {
  1414. mNegNHits = (nhits > 0) ? nhits : 0;
  1415. }
  1416. /// Set number of hits of the negative daughter
  1417. void SetNHitsNeg(const int& nhits) {
  1418. setNHitsNeg(nhits);
  1419. }
  1420. /// Set possible number of hits of the negative daughter
  1421. void setNHitsPossibleNeg(const int& nhits) {
  1422. mNegNHitsPoss = (nhits > 0) ? nhits : 0;
  1423. }
  1424. /// Set possible number of hits of the negative daughter
  1425. void SetNHitsPossibleNeg(const int& nhits) {
  1426. setNHitsPossibleNeg(nhits);
  1427. }
  1428. /// Set number of hits used for dE/dx estimation of the negative daughter
  1429. void setNHitsDedxNeg(const int& nhits) {
  1430. mNegNHitsDedx = (nhits > 0) ? nhits : 0;
  1431. }
  1432. /// Set number of hits used for dE/dx estimation of the negative daughter
  1433. void SetNHitsDedxNeg(const int& nhits) {
  1434. setNHitsDedxNeg(nhits);
  1435. }
  1436. /// Set topology map of the negative daughter
  1437. void setTopologyMapNeg(const int& word, const int& val) {
  1438. mNegTopologyMap[word] = val;
  1439. }
  1440. /// Set topology map of the negative daughter
  1441. void SetTopologyMapNeg(const int& word, const int& val) {
  1442. setTopologyMapNeg(word, val);
  1443. }
  1444. /// Set chi2 of reconstruction of the negative daughter
  1445. void setChi2Neg(const float& chi2) {
  1446. mNegChi2 = ((chi2 * 10) > std::numeric_limits<unsigned char>::max() ?
  1447. std::numeric_limits<unsigned char>::max() :
  1448. (unsigned char) TMath::Nint(chi2 * 10.f));
  1449. }
  1450. /// Set chi2 of reconstruction of the negative daughter
  1451. void SetChi2Neg(const float& chi2) {
  1452. setChi2Neg(chi2);
  1453. }
  1454. /// Set dE/dx of the negative daughter (from GeV/cm)
  1455. void setDedxNeg(const double& dEdx) {
  1456. if (dEdx <= 0) {
  1457. mNegDedx = 0;
  1458. } else {
  1459. mNegDedx = ((dEdx * 1e9) > std::numeric_limits<unsigned short>::max() ?
  1460. std::numeric_limits<unsigned short>::max() :
  1461. (unsigned short) (dEdx * 1e9));
  1462. }
  1463. }
  1464. /// Set dE/dx of the negative daughter (from GeV/cm)
  1465. void SetDedxNeg(const double& dEdx) {
  1466. setDedxNeg(dEdx);
  1467. }
  1468. /// Set dE/dx of the negative daughter (from keV/cm)
  1469. void setDedxNegInKeV(const double& dEdx) {
  1470. if (dEdx <= 0) {
  1471. mNegDedx = 0;
  1472. } else {
  1473. mNegDedx = ((dEdx * 1e3) > std::numeric_limits<unsigned short>::max() ?
  1474. std::numeric_limits<unsigned short>::max() :
  1475. (unsigned short) (dEdx * 1e3));
  1476. }
  1477. }
  1478. /// Set dE/dx of the negative daughter (from GeV/cm)
  1479. void SetDedxNegInKeV(const double& dEdx) {
  1480. setDedxNegInKeV(dEdx);
  1481. }
  1482. /// Set nSigma(e) of the negative daughter
  1483. void setNSigmaElectronNeg(const float& nsigma);
  1484. /// Set nSigma(e) of the negative daughter
  1485. void SetNSigmaElectronNeg(const float& nsigma) {
  1486. setNSigmaElectronNeg(nsigma);
  1487. }
  1488. /// Set nSigma(pi) of the negative daughter
  1489. void setNSigmaPionNeg(const float& nsigma);
  1490. /// Set nSigma(pi) of the negative daughter
  1491. void SetNSigmaPionNeg(const float& nsigma) {
  1492. setNSigmaPionNeg(nsigma);
  1493. }
  1494. /// Set nSigma(K) of the negative daughter
  1495. void setNSigmaKaonNeg(const float& nsigma);
  1496. /// Set nSigma(K) of the negative daughter
  1497. void SetNSigmaKaonNeg(const float& nsigma) {
  1498. setNSigmaKaonNeg(nsigma);
  1499. }
  1500. /// Set nSigma(p) of the negative daughter
  1501. void setNSigmaProtonNeg(const float& nsigma);
  1502. /// Set nSigma(p) of the negative daughter
  1503. void SetNSigmaProtonNeg(const float& nsigma) {
  1504. setNSigmaProtonNeg(nsigma);
  1505. }
  1506. /// Set velocity of the negative daughter (from TOF)
  1507. void setTofBetaNeg(const float& beta);
  1508. /// Set velocity of the negative daughter (from TOF)
  1509. void SetTofBetaNeg(const float& beta) {
  1510. setTofBetaNeg(beta);
  1511. }
  1512. // Th. stuff //
  1513. /// Set hidden information
  1514. void setHiddenInfo(MpdFemtoHiddenInfo* aHiddenInfo) {
  1515. mHiddenInfo = aHiddenInfo;
  1516. }
  1517. /// Set hidden information
  1518. void SetHiddenInfo(MpdFemtoHiddenInfo* aHiddenInfo) {
  1519. setHiddenInfo(aHiddenInfo);
  1520. }
  1521. /// Check if hidden information is valid
  1522. bool isValidHiddenInfo() const {
  1523. return (mHiddenInfo) ? true : false;
  1524. }
  1525. /// Check if hidden information is valid
  1526. bool IsValidHiddenInfo() const {
  1527. return isValidHiddenInfo();
  1528. }
  1529. /// Check if hidden information is valid
  1530. bool validHiddenInfo() const {
  1531. return isValidHiddenInfo();
  1532. }
  1533. /// Retrieve hidden information
  1534. MpdFemtoHiddenInfo* getHiddenInfo() const {
  1535. return mHiddenInfo;
  1536. }
  1537. /// Retrieve hidden information
  1538. MpdFemtoHiddenInfo* GetHiddenInfo() const {
  1539. return getHiddenInfo();
  1540. }
  1541. protected:
  1542. /// Primary vertex position x
  1543. float mPrimaryVertexX;
  1544. /// Primary vertex position y
  1545. float mPrimaryVertexY;
  1546. /// Primary vertex position z
  1547. float mPrimaryVertexZ;
  1548. /// Magnetic field strength
  1549. float mBField;
  1550. // V0 parameters //
  1551. /// Decay point x of V0
  1552. float mV0DecayPointX;
  1553. /// Decay point y of V0
  1554. float mV0DecayPointY;
  1555. /// Decay point z of V0
  1556. float mV0DecayPointZ;
  1557. /// Px of V0
  1558. float mV0MomX;
  1559. /// Py of V0
  1560. float mV0MomY;
  1561. /// Pz of V0
  1562. float mV0MomZ;
  1563. /// Total momentum of positive daughter at decay point
  1564. float mV0PtotPos;
  1565. /// Total momentum of negative daughter at decay point
  1566. float mV0PtotNeg;
  1567. /// Distance between daughters at DCA
  1568. float mV0DcaDaughters;
  1569. /// DCA of V0 to primary vertex
  1570. float mV0DcaToPrimVertex;
  1571. /// Chi2 of the V0 reconstruction (compression *= 10)
  1572. unsigned char mChi2V0;
  1573. /// Confidence level of V0 reconstruction
  1574. float mClV0;
  1575. /// Alpha of V0 Podolyanski-Armenteros
  1576. float mAlphaV0;
  1577. /// pT of V0 Podolyanski-Armenteros
  1578. float mPtArmV0;
  1579. //
  1580. // Important: For daughters we store DCA to primary vertex,
  1581. // momentum of the global track at DCA and the other parameters.
  1582. // this is important, because it provides the ability to recalculate
  1583. // V0 parameters at any time.
  1584. //
  1585. // Positive daughter //
  1586. /// Unique ID of positive daughter
  1587. unsigned short mPosId;
  1588. /// Px of positive daughter at DCA to primary vertex
  1589. float mPosMomX;
  1590. /// Py of positive daughter at DCA to primary vertex
  1591. float mPosMomY;
  1592. /// Pz of positive daughter at DCA to primary vertex
  1593. float mPosMomZ;
  1594. /// DCAx of positive daughter to primary vertex
  1595. float mPosDca2PrimVertexX;
  1596. /// DCAy of positive daughter to primary vertex
  1597. float mPosDca2PrimVertexY;
  1598. /// DCAz of positive daughter to primary vertex
  1599. float mPosDca2PrimVertexZ;
  1600. /// Number of hits of positive daughter
  1601. unsigned char mPosNHits;
  1602. /// Possible number of hits of positive daughter
  1603. unsigned char mPosNHitsPoss;
  1604. /// Number of hits used for dE/dx esitmation of positive daughter
  1605. unsigned char mPosNHitsDedx;
  1606. /// Topology map of positive daughter
  1607. unsigned int mPosTopologyMap[2];
  1608. /// chi2 of the track reconstruction (compression factor *= 10)
  1609. unsigned char mPosChi2;
  1610. /// dEdx of the track (in eV/cm) (compression factor = *10^9)
  1611. unsigned short mPosDedx;
  1612. /// Number of sigma for electron hypothesis estimated via dE/dx
  1613. /// in TPC (compression factor = *1000)
  1614. short mPosNSigmaElectron;
  1615. /// Number of sigma for pion hypothesis estimated via dE/dx
  1616. /// in TPC (compression factor = *1000)
  1617. short mPosNSigmaPion;
  1618. /// Number of sigma for kaon hypothesis estimated via dE/dx
  1619. /// in TPC (compression factor = *1000)
  1620. short mPosNSigmaKaon;
  1621. /// Number of sigma for proton hypothesis estimated via dE/dx
  1622. /// in TPC (compression factor = *1000)
  1623. short mPosNSigmaProton;
  1624. /// Time-of-Flight information. 0 correseponds
  1625. /// to the absence of the signal (compression = *20000)
  1626. unsigned short mPosTofBeta;
  1627. // Negative daughter //
  1628. /// Unique ID of negative daughter
  1629. unsigned short mNegId;
  1630. /// Px of negative daughter at DCA to primary vertex
  1631. float mNegMomX;
  1632. /// Py of negative daughter at DCA to primary vertex
  1633. float mNegMomY;
  1634. /// Pz of negative daughter at DCA to primary vertex
  1635. float mNegMomZ;
  1636. /// DCAx of negative daughter to primary vertex
  1637. float mNegDca2PrimVertexX;
  1638. /// DCAy of negative daughter to primary vertex
  1639. float mNegDca2PrimVertexY;
  1640. /// DCAz of negative daughter to primary vertex
  1641. float mNegDca2PrimVertexZ;
  1642. /// Number of hits of negative daughter
  1643. unsigned char mNegNHits;
  1644. /// Negsible number of hits of negative daughter
  1645. unsigned char mNegNHitsPoss;
  1646. /// Number of hits used for dE/dx esitmation of negative daughter
  1647. unsigned char mNegNHitsDedx;
  1648. /// Topology map of negative daughter
  1649. unsigned int mNegTopologyMap[2];
  1650. /// chi2 of the track reconstruction (compression factor *= 10)
  1651. unsigned char mNegChi2;
  1652. /// dEdx of the track (in eV/cm) (compression factor = *10^9)
  1653. unsigned short mNegDedx;
  1654. /// Number of sigma for electron hypothesis estimated via dE/dx
  1655. /// in TPC (compression factor = *1000)
  1656. short mNegNSigmaElectron;
  1657. /// Number of sigma for pion hypothesis estimated via dE/dx
  1658. /// in TPC (compression factor = *1000)
  1659. short mNegNSigmaPion;
  1660. /// Number of sigma for kaon hypothesis estimated via dE/dx
  1661. /// in TPC (compression factor = *1000)
  1662. short mNegNSigmaKaon;
  1663. /// Number of sigma for proton hypothesis estimated via dE/dx
  1664. /// in TPC (compression factor = *1000)
  1665. short mNegNSigmaProton;
  1666. /// Time-of-Flight information. 0 correseponds
  1667. /// to the absence of the signal (compression = *20000)
  1668. unsigned short mNegTofBeta;
  1669. /// Theoretical information
  1670. mutable MpdFemtoHiddenInfo* mHiddenInfo; //!
  1671. ClassDef(MpdFemtoV0, 1)
  1672. };
  1673. #endif // #define MpdFemtoV0_h