StFemtoEvent.h 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  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 STFEMTOEVENT_HH
  7. #define STFEMTOEVENT_HH
  8. #include "Rtypes.h"
  9. #include "TObject.h"
  10. #include "StFemtoTrack.h"
  11. #include "TClonesArray.h"
  12. #include "TVector3.h"
  13. #include "math.h"
  14. //_________________
  15. class StFemtoEvent : public TObject {
  16. public:
  17. StFemtoEvent();
  18. ~StFemtoEvent();
  19. //Setters
  20. void SetEventId(Int_t id) { mEventId = id; }
  21. void SetRunId(Int_t id) { mRunId = id; }
  22. void SetCollisionType(Bool_t type) { mCollisionType = type;}
  23. void SetRefMult(Int_t mult);
  24. void SetRefMult2(Int_t mult);
  25. void SetRefMultCorr(Float_t rf);
  26. void SetRefMultCorrWeight(Float_t w);
  27. void SetCent16(Int_t c) { mCent16 = (Char_t)c; }
  28. void SetRefMultPos(Int_t m) { mRefMultPos = (UShort_t)m; }
  29. void SetRefMult2Pos(Int_t m) { mRefMult2Pos = (UShort_t)m; }
  30. void SetNumberOfBTofHit(Int_t m) { if(m<=0) {mNumberOfBTofHit=0;} else {mNumberOfBTofHit = (UShort_t)m;} }
  31. void SetNumberOfBTofHit(UInt_t m) { if(m<=0) {mNumberOfBTofHit=0;} else {mNumberOfBTofHit = (UShort_t)m;} }
  32. void SetNumberOfPrimaryTracks(Int_t m) { mNumberOfPrimaryTracks = (UShort_t)m; }
  33. void SetNumberOfGlobalTracks(Int_t m) { mNumberOfGlobalTracks = (UShort_t)m; }
  34. void SetMagneticField(Float_t f);
  35. void SetPrimaryVertexPosition(Float_t x, Float_t y, Float_t z);
  36. void SetPrimaryVertexX(Float_t x) { mVertexPositionX = x; }
  37. void SetPrimaryVertexY(Float_t y) { mVertexPositionY = y; }
  38. void SetPrimaryVertexZ(Float_t z) { mVertexPositionZ = z; }
  39. void SetVpdVz(Float_t vz) { mVpdVz = vz; }
  40. void SetTriggerId(UInt_t id) { mTriggerId = id; }
  41. void SetPrimaryVertexRanking(Float_t);
  42. void SetSphericity(Float_t sph) { mSphericity = (char)round(sph*100.); }
  43. void SetRPeast(Float_t rp) { mRPeast = rp; }
  44. void SetRPwest(Float_t rp) { mRPwest = rp; }
  45. StFemtoTrack* AddFemtoTrack();
  46. void Clear(Option_t* option = "C");
  47. //Getters
  48. Int_t GetEventId() const { return mEventId; }
  49. Int_t GetRunId() const { return mRunId; }
  50. Bool_t GetCollisionType() const { return mCollisionType; }
  51. UInt_t GetRefMult() const { return (UInt_t)mRefMult; }
  52. UInt_t GetRefMult2() const { return (UInt_t)mRefMult2;}
  53. Float_t GetRefMultCorr() const { return (Float_t)mRefMultCorr * 0.1; }
  54. Float_t GetRefMultCorrWeight() const { return (Float_t)mRefMultCorrWeight * 0.0001; }
  55. UShort_t GetCent9() const;
  56. UShort_t GetCent16() const { return (UShort_t)mCent16; }
  57. UShort_t GetRefMultPos() const { return mRefMultPos; }
  58. UShort_t GetRefMultNeg() const { return (mRefMult - mRefMultPos); }
  59. UShort_t GetRefMult2Pos() const { return mRefMult2Pos; }
  60. UShort_t GetRefMult2Neg() const { return (mRefMult2 - mRefMult2Pos); }
  61. Float_t GetZDCe() const { return (Float_t)30000; }
  62. Float_t GetZDCw() const { return (Float_t)30000; }
  63. UShort_t GetNumberOfBTofHit() const { return mNumberOfBTofHit; }
  64. UShort_t GetNumberOfPrimaryTracks() const { return mNumberOfPrimaryTracks; }
  65. UShort_t GetNumberOfGlobalTracks() const { return mNumberOfGlobalTracks; }
  66. Float_t GetMagneticField() const { return (Float_t)mMagField*0.001; }
  67. TVector3 GetPrimaryVertexPosition() const;
  68. Float_t GetVertexPositionX() const { return mVertexPositionX; }
  69. Float_t GetVertexPositionY() const { return mVertexPositionY; }
  70. Float_t GetVertexPositionZ() const { return mVertexPositionZ; }
  71. Float_t GetVertexPositionR() const;
  72. Float_t GetVpdVz() const { return mVpdVz; }
  73. UInt_t GetTriggerId() const { return mTriggerId; }
  74. Float_t GetPrimaryVertexRanking() const { return (Float_t)mPrimaryVertexRanking; }
  75. TClonesArray *GetFemtoTracks() const { return mFemtoTracks; }
  76. Int_t GetNFemtoTracks() const { return (Int_t)mNFemtoTracks; }
  77. Float_t GetSphericity() const { return ((float)mSphericity)/100.; }
  78. Float_t GetRPeast() const { return mRPeast; }
  79. Float_t GetRPwest() const { return mRPwest; }
  80. private:
  81. Int_t mEventId;
  82. Int_t mRunId;
  83. Char_t mSphericity; //transverse sphericity
  84. Float_t mRPeast, mRPwest; // reaction plane
  85. Bool_t mCollisionType; //0-pp, 1-AA(from those where RefMultCorr is defined)
  86. UShort_t mRefMult; //mRefMult
  87. UShort_t mRefMultCorr; //mRefMultCorr * 10
  88. UShort_t mRefMultCorrWeight; //mRefMultCorrWight * 10000
  89. UShort_t mRefMult2; //refMult for |eta| < 1.0
  90. Char_t mCent16;
  91. UShort_t mRefMultPos; //n positive for refMult
  92. UShort_t mRefMult2Pos; //n positive for refMult2
  93. UShort_t mNumberOfPrimaryTracks;
  94. UShort_t mNumberOfGlobalTracks;
  95. UShort_t mNumberOfBTofHit;
  96. Short_t mMagField; //Field*1000
  97. Float_t mVertexPositionX; //VtxX
  98. Float_t mVertexPositionY; //VtxY
  99. Float_t mVertexPositionZ; //VtxZ
  100. Float_t mVpdVz; //VzVpd
  101. UInt_t mTriggerId;
  102. Char_t mPrimaryVertexRanking; //-9: bad; 1: <1; 2: <100; 3: <10^9; 4: > 10^9
  103. UShort_t mNFemtoTracks;
  104. TClonesArray *mFemtoTracks;
  105. ClassDef(StFemtoEvent, 102)
  106. };
  107. #endif