MpdTofHitProducerIdeal.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. //------------------------------------------------------------------------------------------------------------------------
  2. #ifndef __MPD_TOF_HIT_PRODUCER_IDEAL_H
  3. #define __MPD_TOF_HIT_PRODUCER_IDEAL_H 1
  4. #include <TVector3.h>
  5. #include <TList.h>
  6. #include "FairTask.h"
  7. //------------------------------------------------------------------------------------------------------------------------
  8. class TClonesArray;
  9. class MpdTofHitProducerQA;
  10. //------------------------------------------------------------------------------------------------------------------------
  11. class MpdTofHitProducerIdeal : public FairTask
  12. {
  13. protected:
  14. TClonesArray *aMcPoints = nullptr; //! <--- MC input
  15. TClonesArray *aMcTracks = nullptr; //! <--- MC input
  16. TClonesArray *aExpDigits = nullptr; //! <--- Exp input
  17. TClonesArray *aTofHits = nullptr; //! ---> output
  18. Bool_t fDoTest;
  19. Bool_t fDoMergeHits;
  20. Bool_t fUseMCData;
  21. Bool_t fOnlyPrimary = false;
  22. MpdTofHitProducerQA *pQA = nullptr; //!
  23. void AddHit(Int_t detUID, const TVector3& posHit, const TVector3& posHitErr, Int_t mcPointIndex, Int_t mcTrackIndex, Double_t time, Int_t flag);
  24. void AddHit(Int_t detUID, const TVector3& posHit, const TVector3& posHitErr, Int_t expDigitIndex, Double_t time, Int_t flag);
  25. Int_t CompressHits();
  26. size_t MergeHitsOnStrip(); // save only the fastest hit in the strip
  27. public:
  28. MpdTofHitProducerIdeal(const char *name = "TOF Ideal HitProducer", Bool_t useMCdata = true, Int_t verbose = 1, Bool_t DoTest = false, Bool_t DoMergeHits = false, const char *flnm = "QA.MpdTofHitProducerIdeal.root", bool IsEndcap = false);
  29. virtual ~MpdTofHitProducerIdeal();
  30. virtual InitStatus Init();
  31. virtual void Exec(Option_t * option);
  32. virtual void Finish();
  33. void SetOnlyPrimary(Bool_t opt = true) { fOnlyPrimary = opt; }
  34. void Dump(const char* comment = nullptr, std::ostream& out = std::cout) const;
  35. virtual void AddParameters(TString& buf)const;
  36. ClassDef(MpdTofHitProducerIdeal,3);
  37. };
  38. //------------------------------------------------------------------------------------------------------------------------
  39. #endif