MpdFemtoXi.h 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391
  1. /**
  2. * \class MpdFemtoXi
  3. * \brief Main class holding xi information
  4. *
  5. * MpdFemtoXi holds all the necessary information about a Xi
  6. *
  7. * \author Grigory Nigmatkulov (NRNU MEPhI)
  8. * \date May 18, 2019
  9. * \email nigmatkulov@gmail.com
  10. */
  11. #ifndef MpdFemtoXi_h
  12. #define MpdFemtoXi_h
  13. // MpdFemtoMaker headers
  14. #include "MpdFemtoTrack.h"
  15. #include "MpdFemtoV0.h"
  16. #include "phys_constants.h"
  17. // ROOT headers
  18. #include "TVector3.h"
  19. #include "TMath.h"
  20. //_________________
  21. class MpdFemtoXi : public MpdFemtoV0 {
  22. public:
  23. /// Default constructor
  24. MpdFemtoXi();
  25. /// Copy constructor
  26. MpdFemtoXi(const MpdFemtoXi& copy);
  27. /// Copy constructor
  28. MpdFemtoXi& operator=(const MpdFemtoXi& copy);
  29. /// Default destructor
  30. virtual ~MpdFemtoXi();
  31. //
  32. // Getters
  33. //
  34. /// Charge of Xi
  35. short chargeXi() const {
  36. return (mCharge) ? 1 : -1;
  37. }
  38. /// Vector from the primary vertex to the decay point of Xi
  39. TVector3 decayVectorXi() const {
  40. return (mBachelor) ? (decayVertexXi() - primaryVertex()) : TVector3(0., 0., 0.);
  41. }
  42. float decayLengthXi() const {
  43. return decayVectorXi().Mag();
  44. }
  45. // Xi decay vertex position //
  46. TVector3 decayPointXi() const {
  47. return decayVertexXi();
  48. }
  49. TVector3 decayVertexXi() const {
  50. return TVector3(mDecayVertexXiX, mDecayVertexXiY, mDecayVertexXiZ);
  51. }
  52. float decayVertexXiX() const {
  53. return decayVertexXi().X();
  54. }
  55. float decayVertexXiY() const {
  56. return decayVertexXi().Y();
  57. }
  58. float decayVertexXiZ() const {
  59. return decayVertexXi().Z();
  60. }
  61. /// DCA of Xi daughters at decay vertex
  62. float dcaXiDaughters() const {
  63. return mDcaXiDaughters;
  64. }
  65. /// DCA of xi to primary vertex
  66. float dcaXiToPrimVertex() const {
  67. return mDcaXiToPrimVertex;
  68. }
  69. /// Reconstructed Xi momentum
  70. TVector3 momXi() const {
  71. return TVector3(mMomXiX, mMomXiY, mMomXiZ);
  72. }
  73. float momXiX() const {
  74. return momXi().X();
  75. }
  76. float momXiY() const {
  77. return momXi().Y();
  78. }
  79. float momXiZ() const {
  80. return momXi().Z();
  81. }
  82. /// Transverse momentum of Xi
  83. float ptXi() const {
  84. return momXi().Perp();
  85. }
  86. /// Total momentum of Xi
  87. float ptotXi() const {
  88. return momXi().Mag();
  89. }
  90. float ptot2Xi() const {
  91. return momXi().Mag2();
  92. }
  93. float etaXi() const {
  94. return momXi().PseudoRapidity();
  95. }
  96. float pseudoRapXi() const {
  97. return etaXi();
  98. }
  99. float phiXi() const {
  100. return momXi().Phi();
  101. }
  102. /// Rapidity assuming (anti) Xi
  103. float rapXi() const {
  104. return 0.5 * TMath::Log((eXi() + momXiZ()) / (eXi() - momXiZ()));
  105. }
  106. /// Rapidity assuming (anti) Omega
  107. float rapOmega() const {
  108. return 0.5 * TMath::Log((eOmega() + momXiZ()) / (eOmega() - momXiZ()));
  109. }
  110. /// Armenteros-Podolanski parameters
  111. float alphaXi() const {
  112. return alphaArmXi();
  113. }
  114. float alphaArmXi() const;
  115. float ptArmXi() const;
  116. /// Energy assuming Xi hypothesis
  117. float eXi() const {
  118. return TMath::Sqrt(momXi().Mag2() + M_XI_MINUS * M_XI_MINUS);
  119. }
  120. /// Energy assuming Omega hypothesis
  121. float eOmega() const {
  122. return TMath::Sqrt(momXi().Mag2() + M_OMEGA_MINUS * M_OMEGA_MINUS);
  123. }
  124. /// Mass assuming (anti) Xi hypothesis
  125. float massXi() const {
  126. return TMath::Sqrt(TMath::Power((eBacPion() + eLambda()), 2) + ptot2Xi());
  127. }
  128. /// Mass assuming (anti) Omega hypothesis
  129. float massOmega() const {
  130. return TMath::Sqrt(TMath::Power((eBacKaon() + eLambda()), 2) + ptot2Xi());
  131. }
  132. /// Lifetime (ctau) const assuming (anti) Xi
  133. float cTauXi() const {
  134. return M_XI_MINUS * decayLengthXi() / ptotXi();
  135. }
  136. /// Lifetime (ctau) const assuming (anti) Omega
  137. float cTauOmega() const {
  138. return M_OMEGA_MINUS * decayLengthXi() / ptotXi();
  139. }
  140. float chi2Xi() const {
  141. return (float) mChi2Xi / 10;
  142. }
  143. float clXi() const {
  144. return mClXi;
  145. }
  146. // Bachelor information //
  147. MpdFemtoTrack *bachelor() const {
  148. return (mBachelor) ? mBachelor : nullptr;
  149. }
  150. TVector3 primaryVertex() const {
  151. return (mBachelor) ? mBachelor->primaryVertex() : TVector3(0, 0, 0);
  152. }
  153. TVector3 momBac() const {
  154. return ( (mBachelor) ?
  155. TVector3(mMomBacAtDca2DecayPointX, mMomBacAtDca2DecayPointY, mMomBacAtDca2DecayPointX) :
  156. TVector3(0, 0, 0));
  157. }
  158. float momBacX() const {
  159. return momBac().X();
  160. }
  161. float momBacY() const {
  162. return momBac().Y();
  163. }
  164. float momBacZ() const {
  165. return momBac().Z();
  166. }
  167. float momBacPt() const {
  168. return momBac().Perp();
  169. }
  170. float ptBac() const {
  171. return momBac().Perp();
  172. }
  173. float momBacPtot() const {
  174. return momBac().Mag();
  175. }
  176. float ptotBac() const {
  177. return momBac().Mag();
  178. }
  179. float ptot2Bac() const {
  180. return momBac().Mag2();
  181. }
  182. unsigned long trackTopologyMapBac() {
  183. return (mBachelor) ? mBachelor->topologyMap() : 0;
  184. }
  185. unsigned short nHitsBac() const {
  186. return (mBachelor) ? mBachelor->nHits() : 0;
  187. }
  188. unsigned short tpcHitsBac() const {
  189. return nHitsBac();
  190. }
  191. short chargeBac() const {
  192. return (mBachelor) ? mBachelor->charge() : 0;
  193. }
  194. double dEdxBac() const {
  195. return (mBachelor) ? mBachelor->dEdx() : -1.e-9;
  196. }
  197. unsigned short idBac() const {
  198. return (mBachelor) ? mBachelor->id() : 0;
  199. }
  200. unsigned short keyBac() const {
  201. return idBac();
  202. }
  203. float dcaBacToPrimVertex() const {
  204. return (mBachelor) ? mBachelor->gDCA().Mag() : 999.f;
  205. }
  206. float eBacKaon() const {
  207. return (mBachelor) ? TMath::Sqrt(ptot2Bac() + M_KAON_PLUS * M_KAON_PLUS) : 0;
  208. }
  209. float eBacPion() const {
  210. return (mBachelor) ? TMath::Sqrt(ptot2Bac() + M_PION_PLUS * M_PION_PLUS) : 0;
  211. }
  212. void updateXi();
  213. //
  214. // Setters
  215. //
  216. void setChargeXi(const int& charge) {
  217. mCharge = (charge > 0) ? true : false;
  218. }
  219. void setDecayVertexXi(const float& x, const float& y, const float& z) {
  220. mDecayVertexXiX = x;
  221. mDecayVertexXiY = y;
  222. mDecayVertexXiZ = z;
  223. }
  224. void setDecayVertexXiX(const float& x) {
  225. mDecayVertexXiX = x;
  226. }
  227. void setDecayVertexXiY(const float& y) {
  228. mDecayVertexXiX = y;
  229. }
  230. void setDecayVertexXiZ(const float& z) {
  231. mDecayVertexXiX = z;
  232. }
  233. void setDecayVertexXi(const TVector3& vec) {
  234. mDecayVertexXiX = vec.X();
  235. mDecayVertexXiY = vec.Y();
  236. mDecayVertexXiZ = vec.Z();
  237. }
  238. void setChi2Xi(const float& chi2);
  239. void setConfidenceLeveXi(const float& cl) {
  240. mClXi = cl;
  241. }
  242. void setDcaXiDaughters(const float& dca) {
  243. mDcaXiDaughters = dca;
  244. }
  245. void setDcaXiToPrimVertex(const float& dca) {
  246. mDcaXiToPrimVertex = dca;
  247. }
  248. void setMomXiX(const float& px) {
  249. mMomXiX = px;
  250. }
  251. void setMomXiY(const float& py) {
  252. mMomXiY = py;
  253. }
  254. void setMomXiZ(const float& pz) {
  255. mMomXiZ = pz;
  256. }
  257. void setMomXi(const float& px, const float& py, const float& pz) {
  258. mMomXiX = px;
  259. mMomXiY = py;
  260. mMomXiZ = pz;
  261. }
  262. void setMomXi(const TVector3& p) {
  263. mMomXiX = p.X();
  264. mMomXiY = p.Y();
  265. mMomXiZ = p.Z();
  266. }
  267. void setBachelor(MpdFemtoTrack* bachelor) {
  268. mBachelor = (bachelor) ? bachelor : nullptr;
  269. }
  270. void setMomAtDecayPointBac(const float& px, const float& py, const float& pz) {
  271. mMomBacAtDca2DecayPointX = px;
  272. mMomBacAtDca2DecayPointY = py;
  273. mMomBacAtDca2DecayPointZ = pz;
  274. }
  275. void setMomAtDecayPointBac(const TVector3& p) {
  276. mMomBacAtDca2DecayPointX = p.X();
  277. mMomBacAtDca2DecayPointY = p.Y();
  278. mMomBacAtDca2DecayPointZ = p.Z();
  279. }
  280. void setMomAtDecayPointBacX(const float& px) {
  281. mMomBacAtDca2DecayPointX = px;
  282. }
  283. void setMomAtDecayPointBacY(const float& py) {
  284. mMomBacAtDca2DecayPointY = py;
  285. }
  286. void setMomAtDecayPointBacZ(const float& pz) {
  287. mMomBacAtDca2DecayPointZ = pz;
  288. }
  289. protected:
  290. // Xi information
  291. /// Charge: true - positive, false - negative
  292. bool mCharge;
  293. /// Xi decay point
  294. float mDecayVertexXiX;
  295. float mDecayVertexXiY;
  296. float mDecayVertexXiZ;
  297. /// DCA between V0 and bachelor
  298. float mDcaXiDaughters;
  299. /// DCA of Xi to the primary vertex
  300. float mDcaXiToPrimVertex;
  301. /// The following variables are not in the persistent version
  302. /// and can be calculated via updateXi();
  303. float mMomXiX;
  304. float mMomXiY;
  305. float mMomXiZ;
  306. /// Fit quality for Xi ( compression = *10)
  307. unsigned char mChi2Xi;
  308. /// Confidence level for Xi
  309. float mClXi;
  310. // Bachelor information
  311. MpdFemtoTrack *mBachelor;
  312. float mMomBacAtDca2DecayPointX;
  313. float mMomBacAtDca2DecayPointY;
  314. float mMomBacAtDca2DecayPointZ;
  315. ClassDef(MpdFemtoXi, 1)
  316. };
  317. #endif // #define MpdFemtoXi_h