MpdEPOSGenerator.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /**
  2. *@class MpdEPOSGenerator
  3. *@author K.Shtejer <kshtejer@jinr.ru>
  4. * MpdEPOSGenerator reads output of EPOS transport model in HepMC format.
  5. * (crmc_epos199.hepmc / crmc_epos199.hepmc.gz)
  6. * This interfase assumes that the two header lines and the footer line
  7. * starting with "HepMC::" have been removed.
  8. *
  9. * Last updates: June 8, 2018
  10. *
  11. **/
  12. #ifndef Mpd_EPOSGENERATOR_H
  13. #define Mpd_EPOSGENERATOR_H
  14. #ifndef __CINT__
  15. #include <zlib.h>
  16. #endif
  17. #include <TRandom2.h>
  18. #include "FairGenerator.h"
  19. #include "FairPrimaryGenerator.h"
  20. class MpdEPOSGenerator : public FairGenerator
  21. {
  22. public:
  23. MpdEPOSGenerator();
  24. /** Default constructor **/
  25. MpdEPOSGenerator(const char *filename);
  26. /** Destructor **/
  27. virtual ~MpdEPOSGenerator();
  28. /** Read event **/
  29. Bool_t ReadEvent(FairPrimaryGenerator *primGen);
  30. /** Skip n events, return kTRUE if successful **/
  31. // Bool_t SkipEvents(Int_t n);
  32. /** Set fixed reaction plane angle **/
  33. void SetPsiRP(Double_t PsiRP) {fPsiRP=PsiRP; fisRP=kFALSE;};
  34. private:
  35. Int_t res; //! number of scans in lines
  36. char charId[2]; //! First character identifying each line
  37. Float_t fb; //! impact parameter in given event
  38. Int_t numVtx; //! number of vertexes in given event
  39. Int_t ivtx; //! id of vertex (Vtx defined by incoming & outgoing particles)
  40. Int_t inpart; //! number of incoming particles "orphan"
  41. Int_t outpart; //! number of outgoing particles
  42. Int_t fntr; //! number of tracks in given vertex
  43. Int_t itrk; //! id of track (particle)
  44. Int_t ipdg; //! PDG code
  45. Float_t px,py,pz; //! Momemntum components
  46. Float_t imass; //! Generated mass for this particle
  47. Int_t istatus; //! Code status (decayed or not)
  48. #ifndef __CINT__
  49. gzFile fgzFile; //! file
  50. #endif
  51. char fbuffer[256]; //! reading buffer
  52. TRandom2 *frandom; //!
  53. Double_t fPsiRP; //! reaction plane angle
  54. Bool_t fisRP; //! random/fixed reaction plane
  55. ClassDef(MpdEPOSGenerator,0);
  56. };
  57. #endif