MpdDCMSMMGenerator.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. // -------------------------------------------------------------------------
  2. // ----- MpdDCMSMMGenerator header file -----
  3. // ----- Created 27-AUG-2019 by Igor Rufanov -----
  4. // -------------------------------------------------------------------------
  5. // The MpdDCMSMMGenerator reads the CAS-SMM-evt.out file from DCM-SMM
  6. // ( Dubna Cascade Model + Statistical Multifragmentation Model).
  7. // PHYS REV C 95, 014902 (2017) & Phys Rep 257 (1995) 133.
  8. // The code of the model was provided by Alexander Botvina.
  9. #define GZIP_SUPPORT // version with gz support
  10. #ifndef MPDDCMSMMGENERATOR_H
  11. #define MPDDCMSMMGENERATOR_H
  12. #include "FairGenerator.h"
  13. #ifdef GZIP_SUPPORT
  14. #ifndef __CINT__
  15. #include <zlib.h>
  16. #endif
  17. #endif
  18. class MpdDCMSMMGenerator : public FairGenerator
  19. {
  20. public:
  21. /** Default constructor without arguments should not be used. **/
  22. MpdDCMSMMGenerator();
  23. /** Standard constructor. **/
  24. MpdDCMSMMGenerator(const char* fileName);
  25. /** Destructor. **/
  26. ~MpdDCMSMMGenerator();
  27. Bool_t ReadEvent(FairPrimaryGenerator* primGen);
  28. Bool_t SkipEvents(Int_t count);
  29. Int_t FindPDGCodeParticipant( Int_t A, Int_t S, Int_t Z, Float_t mass, Double_t &massFactor);
  30. Int_t FindPDGCodeSpectator( Int_t N, Int_t Z, Int_t &dN);
  31. Int_t RegisterIons( void);
  32. private:
  33. #ifdef GZIP_SUPPORT
  34. #ifndef __CINT__
  35. gzFile fInputFile; //! Input file
  36. #endif
  37. #else
  38. FILE* fInputFile; //! Input file
  39. #endif
  40. const Char_t* fFileName; //! Input file name
  41. Bool_t fFixedTarget; // set TRUE for fixed target MC (with Lorentz transformation to lab)
  42. Double_t fGammaCM; // NN center of mass gamma from file header
  43. Double_t fBetaCM; // NN center of mass beta computed from fGammaCM
  44. Bool_t fSpectatorsON; // includes spectators (with heavy ions) into MC
  45. static const Int_t fZMax=82; // maximal charge of ions in MC
  46. Int_t fN1[fZMax+1], fN2[fZMax+1]; // region of barion number for given Z for registered ions
  47. MpdDCMSMMGenerator(const MpdDCMSMMGenerator&);
  48. MpdDCMSMMGenerator& operator=(const MpdDCMSMMGenerator&);
  49. ClassDef(MpdDCMSMMGenerator,0);
  50. };
  51. #endif