MpdVHLLEGenerator.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*
  2. * File: MpdVHLLEGenerator.h
  3. * Author: Pavel Batyuk
  4. *
  5. * Created on April 27, 2016
  6. */
  7. #ifndef MPDVHLLEGENERATOR_H
  8. #define MPDVHLLEGENERATOR_H
  9. #include <iostream>
  10. #include "FairGenerator.h"
  11. #include "FairMCEventHeader.h"
  12. #include "FairPrimaryGenerator.h"
  13. #include "TFile.h"
  14. #include "TChain.h"
  15. #include "MpdFreezoutGenerator.h"
  16. using namespace std;
  17. using namespace TMath;
  18. const UInt_t dim = 1e5;
  19. class TVirtualMCStack;
  20. class FairPrimaryGenerator;
  21. class MpdVHLLEGenerator : public FairGenerator {
  22. public:
  23. MpdVHLLEGenerator();
  24. MpdVHLLEGenerator(TString fileName, Bool_t isCascade);
  25. ~MpdVHLLEGenerator();
  26. Bool_t ReadEvent(FairPrimaryGenerator* primGen);
  27. void SkipEvents(Int_t ev) {
  28. fEventNumber = ev;
  29. cout << "NUMBER OF SKIPPED EVENTS = " << ev << endl;
  30. }
  31. private:
  32. TFile* fInputFile; //! Input file
  33. TString fFileName; //! Input file name
  34. TChain* fDstTree; //!
  35. Float_t fPx[dim]; //!
  36. Float_t fPy[dim]; //!
  37. Float_t fPz[dim]; //!
  38. Float_t fX[dim]; //!
  39. Float_t fY[dim]; //!
  40. Float_t fZ[dim]; //!
  41. Float_t fE[dim]; //!
  42. Float_t fT[dim]; //!
  43. Int_t fPID[dim]; //!
  44. Int_t fNpart; //!
  45. Int_t fEventNumber; //!
  46. TClonesArray *fFreezout; //!
  47. TString fBranch; //! treefin corresponds to hydro + cascade, treeini -- to hydro calculations only
  48. void SetCascade(Bool_t flag) {
  49. fBranch = (flag) ? "treefin" : "treeini";
  50. }
  51. MpdVHLLEGenerator(const MpdVHLLEGenerator&);
  52. MpdVHLLEGenerator& operator=(const MpdVHLLEGenerator&);
  53. ClassDef(MpdVHLLEGenerator, 1);
  54. };
  55. #endif