MpdStsPoint.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. //------------------------------------------------------------------------------------------------------------------------
  2. // -------------------------------------------------------------------------
  3. // ----- MpdStsPoint header file -----
  4. // -------------------------------------------------------------------------
  5. #ifndef MPDSTSPOINT_H
  6. #define MPDSTSPOINT_H
  7. #include "TObject.h"
  8. #include "TVector3.h"
  9. #include "FairMCPoint.h"
  10. using namespace std;
  11. //------------------------------------------------------------------------------------------------------------------------
  12. class MpdStsPoint : public FairMCPoint
  13. {
  14. public:
  15. /** Constructor with arguments
  16. *@param trackID Index of MCTrack
  17. *@param detID Detector ID
  18. *@param pos Ccoordinates at entrance to active volume [cm]
  19. *@param mom Momentum of track at entrance [GeV]
  20. *@param tof Time since event start [ns]
  21. *@param length Track length since creation [cm]
  22. *@param eLoss Energy deposit [GeV]
  23. **/
  24. MpdStsPoint(Int_t trackID, Int_t detID, TVector3 posIn, TVector3 momIn,
  25. TVector3 posOut, Double_t tof, Double_t length, Double_t eLoss);
  26. MpdStsPoint(const MpdStsPoint& point) { *this = point; }
  27. MpdStsPoint();
  28. virtual ~MpdStsPoint();
  29. // Output to screen
  30. virtual void Print(const Option_t* opt) const;
  31. Double_t GetXout() const { return fXout; }
  32. Double_t GetYout() const { return fYout; }
  33. Double_t GetZout() const { return fZout; }
  34. void PositionOut(TVector3& pos) { pos.SetXYZ(fXout, fYout, fZout); }
  35. void SetPositionOut(const TVector3& pos);
  36. protected:
  37. Double32_t fXout, fYout, fZout; // Point coordinates at exit [cm]
  38. ClassDef(MpdStsPoint,1)
  39. };
  40. inline void MpdStsPoint::SetPositionOut(const TVector3& pos) {
  41. fXout = pos.X();
  42. fYout = pos.Y();
  43. fZout = pos.Z();
  44. }
  45. //------------------------------------------------------------------------------------------------------------------------
  46. #endif