MpdEctTrackFollow2Tpc.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. #ifndef MPD_ECTTRACKFOLLOW2TPC_H
  2. #define MPD_ECTTRACKFOLLOW2TPC_H
  3. //#include "MpdKalmanHitZ.h"
  4. #include "FairTask.h"
  5. //#include "FairStsKFTrackFitter.h"
  6. //#include "TLorentzVector.h"
  7. #include "TH1.h"
  8. class MpdKalmanHitZ;
  9. class MpdKalmanHit;
  10. class MpdKalmanTrack;
  11. class MpdEtofPoint;
  12. class TpcLheHit;
  13. class MpdEctKalmanTrack;
  14. class TClonesArray;
  15. class TVector2;
  16. class MpdEctTrackFollow2Tpc :public FairTask
  17. {
  18. public:
  19. /** Constructor **/
  20. MpdEctTrackFollow2Tpc(const char *name="MpdEctTrackFollow2Tpc", Int_t iVerbose = 1 );
  21. /** Destructor **/
  22. virtual ~MpdEctTrackFollow2Tpc();
  23. /// * FairTask methods
  24. /** Intialisation at begin of run. To be implemented in the derived class.
  25. *@value Success If not kSUCCESS, task will be set inactive.
  26. **/
  27. InitStatus Init();
  28. /** Reinitialisation.
  29. *@value Success If not kSUCCESS, task will be set inactive.
  30. **/
  31. InitStatus ReInit();
  32. /** Intialise parameter containers.
  33. **/
  34. void SetParContainers();
  35. void Exec(Option_t * option);
  36. /** Action after each event. **/
  37. void Finish();
  38. void Reset();
  39. private:
  40. Int_t GetNofHitsInLayer(Int_t lay) { return (Int_t)fhLays->GetCellContent(lay+1,0); }
  41. Int_t GetHitsInLayer(Int_t lay) { return fLayPointers[lay]; } ///< first index of hits in layer
  42. void FollowInTPC(); // propagate tracks into TPC
  43. void MakeKalmanHits(); // create Kalman hits
  44. void GetTpcHits(); // get TPC hits near zMax
  45. Int_t RunKalmanFilter(MpdEctKalmanTrack *track, Int_t layBeg); ///< run Kalman filter
  46. void RemoveDoubles(); ///< remove double tracks
  47. Int_t NofCommonHits(MpdEctKalmanTrack* track, MpdEctKalmanTrack* track1); ///< get number of common hits
  48. void AddHits(); // add hit objects to tracks
  49. void SetTrackID(MpdEctKalmanTrack *track); // set track ID from IDs of its hits
  50. void StoreTracks(); // transfer tracks from fTrackCand to fTracks
  51. void ExcludeHits() { }; // exclude used hits
  52. void Write();
  53. void Writedir2current( TObject *obj );
  54. Double_t Proxim(MpdKalmanTrack *track, const MpdKalmanHit *hit); ///< adjust R-Phi coord. for continuity
  55. Int_t fNPass;
  56. TDirectory *fHistoDir;
  57. TH1F *fhNBranches;
  58. TClonesArray *fEctPoints; //! ECT points
  59. TClonesArray *fTpcPoints; //! TPC points
  60. TClonesArray *fEctTracks; //! ECT tracks
  61. TClonesArray *fTpcHits; //! TPC hits
  62. TClonesArray *fKHits; //! TPC Kalman hits
  63. TClonesArray *fMCTracks; //!< array of MC tracks
  64. TClonesArray *fTpcTracks; //! TPC tracks
  65. TClonesArray *fTracks; //! ECT tracks
  66. Int_t *fLayPointers; //!< locations of hits from different layers
  67. TH1F *fhLays; //!< histo with layer hit multiplicities
  68. //FairVertex *fPrimVtx;
  69. //FairStsKFTrackFitter fStsFitter;
  70. private:
  71. // Some constants
  72. static const Double_t fgkChi2Cut; ///< max accepted Chi2 of hit for track
  73. static const Double_t fgkLayCut; ///< max accepted TPC layer
  74. ClassDef(MpdEctTrackFollow2Tpc,1);
  75. };
  76. #endif