MpdEctKalmanTrack.h 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. #ifndef MPDECTKALMANTRACK_H
  2. #define MPDECTKALMANTRACK_H
  3. /// \ingroup rec
  4. /// \class MpdEctKalmanTrack
  5. /// \brief Kalman track in MPD straw end-cap detector
  6. ///
  7. /// \author Alexander Zinchenko, LHE JINR Dubna
  8. #include "MpdKalmanTrack.h"
  9. #include "MpdKalmanHit.h"
  10. #include <TClonesArray.h>
  11. //#include <TVector3.h>
  12. //class MpdEtofPoint;
  13. class FairHit;
  14. class TpcLheHit;
  15. class MpdTpcKalmanTrack;
  16. class MpdEctKalmanTrack : public MpdKalmanTrack
  17. {
  18. public:
  19. MpdEctKalmanTrack(); ///< Default ctor
  20. virtual ~MpdEctKalmanTrack(); ///< Destructor
  21. //MpdEctKalmanTrack(Int_t tpcIndx, const TpcLheKalmanTrack &tpcTrack); ///< Ctor from the TPC track
  22. MpdEctKalmanTrack(Int_t tpcIndx, const MpdTpcKalmanTrack &tpcTrack); ///< Ctor from TPC track
  23. MpdEctKalmanTrack(Int_t tofIndx, Int_t tpcIndx, FairHit *tof, TpcLheHit *tpc, TVector3 &vert); ///< Ctor from ETOF and TPC hits
  24. //MpdEctKalmanTrack(Int_t tofIndx, Int_t ectIndx, MpdEtofPoint *tof, MpdKalmanHitZ *ect, TVector3 &vert); ///< Ctor from ETOF and ECT hits
  25. MpdEctKalmanTrack(Int_t tofIndx, Int_t ectIndx, FairHit *tof, MpdKalmanHit *ect, TVector3 &vert); ///< Ctor from ETOF and ECT hits
  26. MpdEctKalmanTrack (const MpdEctKalmanTrack& track); ///< copy constructor
  27. MpdEctKalmanTrack& operator=(const MpdEctKalmanTrack& track); // assignment operator
  28. Int_t GetLastLay() const { return fLastLay; } ///< get the outermost layer
  29. Int_t GetNofTrHits() const { return fTrHits->GetEntriesFast(); } ///< get number of track hits
  30. Int_t GetMirrors() const { return fMirrors; } /// get number of mirror hits
  31. Int_t GetMisses() const { return fMisses; } /// get number of missing tubes
  32. Int_t GetTpcIndex() const { return fTpcIndex; } /// get index of TPC track or hit
  33. Int_t GetTofIndex() const { return fTofIndex; }; /// get index of TOF hit
  34. TClonesArray *GetTrHits() const { return fTrHits; } ///< get track hits
  35. Double_t GetRadNew(); ///< get track new radial position
  36. Double_t *GetParam1() { return fParam1; } ///< get params at first hit
  37. Int_t GetFlag() const { return fFlag; } /// get flag
  38. Int_t IsFromTpc() const { return fFlag & 1; } /// is track propagated from TPC?
  39. Int_t IsFromEtof() const { return fFlag & 2; } /// is track propagated from ETOF?
  40. Int_t IsMatchTpc() const { return fFlag & 4; } /// is track matched with TPC track?
  41. Int_t IsMatchEtof() const { return fFlag & 8; } /// is track matched with ETOF hit?
  42. void SetLastLay() { fLastLay = ((MpdKalmanHit*)GetHits()->Last())->GetLayer(); } ///< set last layer
  43. void SetLastLay(Int_t lay) { fLastLay = lay; } ///< set last layer
  44. void SetMirrors(Int_t nMirr) { fMirrors = nMirr; } /// set number of mirror hits
  45. void SetMisses(Int_t nMiss) { fMisses = nMiss; } /// set number of missing tubes
  46. void SetParam1() { for (Int_t i = 0; i < 5; ++i) fParam1[i] = GetParamNew(i); } ///< set params at first hit
  47. void SetTofIndex(Int_t tof) { fTofIndex = tof; } /// set TOF hit index
  48. void SetTpcIndex(Int_t tpc) { fTpcIndex = tpc; } /// set TPC track index
  49. void SetFlag(Int_t flag) { fFlag = flag; } /// set flag
  50. void SetFromTpc() { fFlag |= 1; } /// track propagated from TPC
  51. void SetFromEtof() { fFlag |= 2; } /// track propagated from ETOF
  52. void SetMatchTpc() { fFlag |= 4; } /// track matched with TPC track
  53. void SetMatchEtof() { fFlag |= 8; } /// track matched with ETOF hit
  54. void StartBack(); ///< prepare for back tracing
  55. void Print(Option_t *opt); ///< print track info
  56. //Bool_t IsSortable() const { return kTRUE; }
  57. //Int_t Compare(const TObject* track) const; ///< sort in descending order in Pt
  58. void Reset(); ///< reset track (similar to destructor)
  59. private:
  60. //void EvalCovar(const MpdKalmanHitR *hitOut, const MpdKalmanHitR *hitIn); ///< evaluate covar. matrix
  61. Int_t fLastLay; ///< the outermost layer number achieved
  62. Int_t fTpcIndex; ///< TPC track or hit index
  63. Int_t fTofIndex; ///< TOF hit index
  64. Int_t fFlag; ///< track flag
  65. Int_t fMirrors; ///< number of mirror hits (due to left-right ambiguity)
  66. Int_t fMisses; ///< number of missing tubes
  67. TClonesArray *fTrHits; ///< track hits
  68. Double_t fParam1[5]; //!< track param at first hit
  69. ClassDef(MpdEctKalmanTrack,2);
  70. };
  71. #endif