MpdTofMatchingData.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. //------------------------------------------------------------------------------------------------------------------------
  2. #ifndef __MPD_TOF_MATCHING_DATA_H
  3. #define __MPD_TOF_MATCHING_DATA_H 1
  4. //------------------------------------------------------------------------------------------------------------------------
  5. /// \class MpdTofMatchingData
  6. ///
  7. /// \brief
  8. /// \author Sergei Lobastov (LHE, JINR, Dubna)
  9. //------------------------------------------------------------------------------------------------------------------------
  10. #include <TObject.h>
  11. #include <TVector3.h>
  12. //------------------------------------------------------------------------------------------------------------------------
  13. class MpdTofHit;
  14. class MpdTofMatchingData : public TObject
  15. {
  16. Int_t fKFTrackIndex = -1; // KF Track index( branchname: "TpcKalmanTrack", classname: "MpdTpcKalmanTrack")
  17. Int_t fTofHitIndex = -1; // if > 0 TofHit index( branchname: "TOFHit", classname: "MpdTofHit")
  18. Double_t fBeta; // calc.
  19. Double_t fMass2; // calc., [GeV^2]
  20. Double_t fWeight = 0.; // matching weight
  21. Double_t fNormWeight = 0.; // normalized matching weight [0., 1.]
  22. Double_t fLength; // Track length [cm], {KFTrack refit}
  23. Int_t fNmbTrHits = 0; // number of track hits {KFTrack refit}
  24. TVector3 fMomentum; // Momentum [GeV/c] {KFTrack copy}
  25. Double_t fdPhi; // VR
  26. Double_t fdZed; // VR
  27. public:
  28. // CAUTION: transparent data, MUST be used only at run-time, for debug purpose
  29. Double_t fTime; //! Time since event start [ns] {TofHit copy}
  30. Int_t fFlag = 0; //! copy of MpdTofHit::fFlag instance.
  31. TVector3 fEstPoint; //! extrapolated point on pad plate(x,y,z), [cm] {KFTrack refit}
  32. TVector3 fHitPosition; //! Position of hit [cm] {TofHit copy}
  33. bool fIsTrueMatching = false;//!
  34. bool fHadTofSignal = false; //!
  35. bool fBestParameter = false; //!
  36. MpdTofMatchingData();
  37. MpdTofMatchingData(Int_t kfTrackId, Int_t tofHitId, Double_t weight, const MpdTofHit*, Double_t length, Int_t nTrHits, const TVector3& Momentum, const TVector3& estPoint);
  38. bool operator==(const MpdTofMatchingData& rhs){ return ( this->fKFTrackIndex == rhs.fKFTrackIndex && this->fTofHitIndex == rhs.fTofHitIndex ); }
  39. void Print(const char* comment = nullptr, std::ostream& os = std::cout)const;
  40. Int_t GetKFTrackIndex(void)const{ return fKFTrackIndex;};
  41. Int_t GetTofHitIndex(void)const{ return fTofHitIndex;};
  42. Double_t GetTrackLength(void)const{ return fLength;};
  43. Int_t GetNmbTrHits(void)const{ return fNmbTrHits;};
  44. Double_t GetBeta(void) const { return fBeta;};
  45. Double_t GetMass2(void)const{ return fMass2;};
  46. TVector3 GetMomentum(void)const {return fMomentum;};
  47. Double_t GetWeight(void)const{ return fWeight;};
  48. Double_t GetNormWeight(void)const{ return fNormWeight;};
  49. void SetNormWeight(Double_t v){fNormWeight = v;};
  50. Double_t GetdPhi(void)const{ return fdPhi;};
  51. Double_t GetdZed(void)const{ return fdZed;};
  52. // CAUTION: getters for transparent(NOT serialized) data
  53. Double_t GetDelta(void)const{ return (fEstPoint - fHitPosition).Mag();};
  54. ClassDef(MpdTofMatchingData, 8)
  55. };
  56. //------------------------------------------------------------------------------------------------------------------------
  57. #endif