MpdTofHit.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. //------------------------------------------------------------------------------------------------------------------------
  2. #ifndef __MPD_TOF_HIT_H
  3. #define __MPD_TOF_HIT_H 1
  4. #include <vector>
  5. #include "MpdTofUtils.h"
  6. #include "FairHit.h"
  7. //------------------------------------------------------------------------------------------------------------------------
  8. class MpdTofHit : public FairHit
  9. {
  10. protected:
  11. Double_t fTime; // Time since event start [ns]
  12. Int_t fFlag; // Flag for general purposes [TDC, event tagging...]
  13. public:
  14. MpdTofHit();
  15. MpdTofHit(Int_t suid, TVector3 pos, TVector3 dpos, Int_t refIndex, Double_t tof, Int_t flag = 0);
  16. void Print(const char* comment = nullptr, std::ostream& os = std::cout) const;
  17. Double_t GetTime() const { return fTime; };
  18. Int_t GetFlag() const { return fFlag; };
  19. void SetTime(Double_t time) { fTime = time; };
  20. void SetFlag(Int_t flag) { fFlag = flag; };
  21. void AddFlag(Int_t flag) { fFlag = fFlag | flag; };
  22. bool CheckSuid(Int_t suid) const;
  23. bool CheckTid(Int_t tid) const;
  24. bool IsSameTid(const MpdTofHit&) const;
  25. void getLinks(const MpdTofUtils::k_LinkType type, std::vector<Int_t>&) const;
  26. inline void GetXYZ(Double_t *carray) const { carray[0] = fX; carray[1] = fY; carray[2] = fZ;}
  27. ClassDef(MpdTofHit,2)
  28. };
  29. //------------------------------------------------------------------------------------------------------------------------
  30. #endif