MpdPHSDGenerator.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /**
  2. *@class MpdPHSDGenerator
  3. *@author V.Voronyuk <vadimv@jinr.ru>
  4. * MpdPHSDGenerator reads newer (instead of default) output (phsd.dat/phsd.dat.gz)
  5. * of HSD/PHSD transport model.
  6. **/
  7. #ifndef Mpd_PHSDGENERATOR_H
  8. #define Mpd_PHSDGENERATOR_H
  9. #ifndef __CINT__
  10. #include <zlib.h>
  11. #endif
  12. #include <TRandom2.h>
  13. #include "FairGenerator.h"
  14. #include "FairPrimaryGenerator.h"
  15. class MpdPHSDGenerator : public FairGenerator
  16. {
  17. public:
  18. MpdPHSDGenerator();
  19. /** Default constructor **/
  20. MpdPHSDGenerator(const char *filename);
  21. /** Destructor **/
  22. virtual ~MpdPHSDGenerator();
  23. /** Read event **/
  24. Bool_t ReadEvent(FairPrimaryGenerator *primGen);
  25. /** Skip n events, return kTRUE if successful **/
  26. Bool_t SkipEvents(Int_t n);
  27. /** Set fixed reaction plane angle **/
  28. void SetPsiRP(Double_t PsiRP) {fPsiRP=PsiRP; fisRP=kFALSE;};
  29. /** **/
  30. void WithHyperonPolarization() {fHPol=kTRUE;};
  31. private:
  32. Int_t fntr; //! number of tracks in given event
  33. Float_t fb; //! impact parameter in given event
  34. #ifndef __CINT__
  35. gzFile fgzFile; //! file
  36. #endif
  37. char fbuffer[256]; //! reading buffer
  38. TRandom2 *frandom; //!
  39. Double_t fPsiRP; //! reaction plane angle
  40. Bool_t fisRP; //! random/fixed reaction plane
  41. Bool_t fHPol; //! with/without polarization info for Hyperons
  42. Bool_t ReadHeader(); //! read event header, return kTRUE if successful
  43. void SkipTrack(); //! skip one track
  44. ClassDef(MpdPHSDGenerator,0);
  45. };
  46. #endif