MpdTofHitProducer.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. //------------------------------------------------------------------------------------------------------------------------
  2. #ifndef __MPD_TOF_HIT_PRODUCER_H
  3. #define __MPD_TOF_HIT_PRODUCER_H 1
  4. //------------------------------------------------------------------------------------------------------------------------
  5. /// \class MpdTofHitProducer
  6. ///
  7. /// \brief
  8. /// \author Sergei Lobastov (LHE, JINR, Dubna)
  9. //------------------------------------------------------------------------------------------------------------------------
  10. #include <iostream>
  11. #include <TString.h>
  12. #include "MpdTofHitProducerIdeal.h"
  13. //------------------------------------------------------------------------------------------------------------------------
  14. class TRandom2;
  15. class TEfficiency;
  16. class TH1D;
  17. class TH2D;
  18. //------------------------------------------------------------------------------------------------------------------------
  19. class MpdTofHitProducer : public MpdTofHitProducerIdeal
  20. {
  21. Double_t fTimeSigma = 0.080; // Uncertainties of time, gaus sigma [ns]
  22. Double_t fStripLength; // [cm] strip length, default: 65 cm
  23. Double_t fErrX = 0.5, fErrZ = 1.25/sqrt(12.); // Uncertainties of coordinates, gaus sigma [cm]
  24. TRandom2 *pRandom = nullptr;
  25. // value - distance to the strip edge [cm], gap - 1,3 = outer strip gap, 2 = middle strip gap
  26. Bool_t IsHitCreated(Double_t value, Int_t gap);
  27. Bool_t IsCrossHitCreated(Double_t value, Int_t gap);
  28. public:
  29. MpdTofHitProducer(const char *name = "TOF HitProducer", Bool_t useMCdata = true, Int_t verbose = 1,
  30. Bool_t DoTest = false, const char *flnm = "QA.MpdTofHitProducer.root", double StripLength = 65.);
  31. virtual ~MpdTofHitProducer();
  32. virtual InitStatus Init();
  33. virtual void Exec(Option_t * option);
  34. virtual void Finish();
  35. void SetTimeResolution(Double_t sigma){ fTimeSigma = sigma; };
  36. void SetAlongStripzResolution(Double_t Xerr){ fErrX = Xerr;};
  37. void SetSeed(UInt_t seed = 0);
  38. virtual void AddParameters(TString& buf)const;
  39. ClassDef(MpdTofHitProducer,3)
  40. };
  41. //------------------------------------------------------------------------------------------------------------------------
  42. #endif