StO97Track.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. //
  2. // The version of the class should be changed every time
  3. // when any changes in the codes are done
  4. // Grigory Nigmatkulov: 2016/12/15
  5. //
  6. #ifndef STOSCAR97TRACK_H
  7. #define STOSCAR97TRACK_H
  8. #include <TObject.h>
  9. #include <limits>
  10. #include <iostream>
  11. #include <TMath.h>
  12. #include "TParticlePDG.h"
  13. #include "TDatabasePDG.h"
  14. //_________________
  15. class StO97Track : public TObject {
  16. public:
  17. //Constructor
  18. StO97Track();
  19. //Copy constructor
  20. StO97Track(const StO97Track &copy);
  21. //Assignmaent operator
  22. StO97Track &operator=(const StO97Track &orig);
  23. //Destructor
  24. virtual ~StO97Track();
  25. //Getters
  26. Int_t GetId() const { return (Int_t)mId; }
  27. Int_t GetPdgId() const { return mPdgId; }
  28. Int_t GetPdgId(const TDatabasePDG *pdgDb);
  29. Int_t GetCharge() const { return (mPdgId>0) ? 1 : -1; }
  30. Int_t GetCharge(const TDatabasePDG *pdgDb, bool isajet = false);
  31. Float_t GetPx() const { return mPx; }
  32. Float_t GetPy() const { return mPy; }
  33. Float_t GetPz() const { return mPz; }
  34. Float_t GetE();
  35. Float_t GetEnergy();
  36. Float_t GetPt();
  37. Float_t GetPtot();
  38. Float_t GetEta();
  39. Float_t GetPseudoRapidity();
  40. Float_t GetRapidity();
  41. Float_t GetY();
  42. Float_t GetMass() const { return mMass; }
  43. Float_t GetMassSqr() const { return mMass*mMass; }
  44. Float_t GetXfr() const { return mXfr; }
  45. Float_t GetYfr() const { return mYfr; }
  46. Float_t GetZfr() const { return mZfr; }
  47. Float_t GetTfr() const { return mTfr; }
  48. Bool_t GetIsSpec();
  49. //Setters
  50. void SetId(Int_t id);
  51. void SetPdgId(Int_t pdgId) { mPdgId = pdgId; }
  52. void SetPx(Float_t px) { mPx = px; }
  53. void SetPy(Float_t py) { mPy = py; }
  54. void SetPz(Float_t pz) { mPz = pz;}
  55. void SetMass(Float_t mass) { mMass = mass; }
  56. void SetXfr(Float_t xFr) { mXfr = xFr; }
  57. void SetYfr(Float_t yFr) { mYfr = yFr; }
  58. void SetZfr(Float_t zFr) { mZfr = zFr; }
  59. void SetTfr(Float_t tFr) { mTfr = tFr; }
  60. void SetTrack(Int_t id, Int_t pdgId,
  61. Float_t px, Float_t py, Float_t pz, Float_t mass,
  62. Float_t xFr, Float_t yFr, Float_t zFr, Float_t tFr);
  63. //Print track parameters
  64. virtual void Print(Option_t *option="") const {
  65. std::cout << "Track params: "
  66. << "id: " << mId << " pdgId: " << mPdgId
  67. << " px: " << mPx << " py: " << mPy << " pz: " << mPz
  68. << " mass: " << mMass << " xFr: " << mXfr << " yFr: " << mYfr
  69. << " zFr: " << mZfr << "tFr: " << mTfr << std::endl;
  70. }
  71. private:
  72. UShort_t mId; // Number of the particle
  73. Int_t mPdgId; // PDG code
  74. Float_t mPx; // Px (GeV/c)
  75. Float_t mPy; // Py (GeV/c)
  76. Float_t mPz; // Pz (GeV/c)
  77. Float_t mMass; // Particle mass (GeV/c^2)
  78. Float_t mXfr; // x at freeze-out (fm)
  79. Float_t mYfr; // y at freeze-out (fm)
  80. Float_t mZfr; // z at freeze-out (fm)
  81. Float_t mTfr; // Freeze-out time (fm/c)
  82. ClassDef(StO97Track, 2)
  83. };
  84. #endif