MpdTof.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. //------------------------------------------------------------------------------------------------------------------------
  2. #ifndef __MPD_TOF_H
  3. #define __MPD_TOF_H 1
  4. //------------------------------------------------------------------------------------------------------------------------
  5. /// \class MpdTof, version = 8 (14 sectors, 20 detectors, 72 strips)
  6. ///
  7. /// \brief
  8. /// \author Sergei Lobastov (LHE, JINR, Dubna)
  9. //------------------------------------------------------------------------------------------------------------------------
  10. #include <TLorentzVector.h>
  11. #include <TVector3.h>
  12. #include "MpdTofUtils.h"
  13. #include "FairDetector.h"
  14. //------------------------------------------------------------------------------------------------------------------------
  15. class MpdTofPoint;
  16. class FairVolume;
  17. class TClonesArray;
  18. //------------------------------------------------------------------------------------------------------------------------
  19. class MpdTof : public FairDetector
  20. {
  21. // Track information to be stored until the track leaves the active volume.
  22. Int_t fTrackID; //! track index
  23. Int_t fVolumeID; //! volume id
  24. TLorentzVector fPos; //! position
  25. TLorentzVector fMom; //! momentum
  26. Double_t fTime; //! time
  27. Double_t fLength; //! length
  28. Double_t fELoss; //! energy loss
  29. Int_t fPosIndex = 0; //!
  30. TClonesArray *aTofHits = nullptr; //! Hit collection
  31. void ConstructAsciiGeometry();
  32. MpdTofPoint* AddPoint(Int_t trackID, Int_t detID, TVector3 pos, TVector3 mom, Double_t time, Double_t length, Double_t eLoss);
  33. void ResetParameters();
  34. public:
  35. MpdTof(const char* name = "TOF", Bool_t active = kTRUE);
  36. virtual ~MpdTof();
  37. virtual Bool_t ProcessHits(FairVolume* vol = nullptr);
  38. virtual void EndOfEvent();
  39. virtual void Register();
  40. virtual TClonesArray* GetCollection(Int_t iColl) const;
  41. virtual void Print() const;
  42. virtual void Reset();
  43. virtual void CopyClones(TClonesArray* from, TClonesArray* to, Int_t offset);
  44. virtual void ConstructGeometry();
  45. virtual Bool_t CheckIfSensitive(std::string name);
  46. static void Dump(TClonesArray *aHits, TClonesArray *aPoints, TClonesArray *aTracks, const char* comment = nullptr, std::ostream& os = std::cout);
  47. static void Print(const TVector3&, const char* comment = nullptr, std::ostream& os = std::cout);
  48. static void GetDelta(const TVector3& mcPos, const TVector3& estPos, double& dev, double& devZ, double& devR, double& devPhi);
  49. ClassDef(MpdTof,3)
  50. };
  51. //------------------------------------------------------------------------------------------------------------------------
  52. #endif