MpdPlutoGenerator.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. // -------------------------------------------------------------------------
  2. // ----- MpdPlutoGenerator header file -----
  3. // ----- Created 13/07/04 by V. Friese / D.Bertini -----
  4. // ----- Modified from FairPlutoGenerator for MPD by V. Zhezher -----
  5. // -------------------------------------------------------------------------
  6. /** MpdPlutoGenerator.h
  7. *@author V.Friese <v.friese@gsi.de>
  8. *@author D.Bertini <d.bertini@gsi.de>
  9. *
  10. The MpdPlutoGenerator reads the PLUTO output file (ROOT format)
  11. and inserts the tracks into the FairStack via the FairPrimaryGenerator.
  12. Derived from FairGenerator.
  13. **/
  14. #ifndef MPD_PLUTOGENERATOR_H
  15. #define MPD_PLUTOGENERATOR_H
  16. #include "FairGenerator.h"
  17. class TClonesArray;
  18. class TFile;
  19. class TTree;
  20. class TVirtualMCStack;
  21. class FairPrimaryGenerator;
  22. class MpdPlutoGenerator : public FairGenerator
  23. {
  24. public:
  25. /** Default constructor (should not be used) **/
  26. MpdPlutoGenerator();
  27. /** Standard constructor
  28. ** @param fileName The input (PLUTO) file name
  29. **/
  30. MpdPlutoGenerator(const Char_t* fileName, Double_t ekin);
  31. /** Destructor **/
  32. virtual ~MpdPlutoGenerator();
  33. /** Reads on event from the input file and pushes the tracks onto
  34. ** the stack. Abstract method in base class.
  35. ** @param primGen pointer to the FairPrimaryGenerator
  36. **/
  37. virtual Bool_t ReadEvent(FairPrimaryGenerator* primGen);
  38. //Skip some events in file
  39. Bool_t SkipEvents(Int_t count);
  40. private:
  41. Int_t iEvent; //! Event number
  42. Double_t fEkin; //! Target energy in lab system
  43. const Char_t* fFileName; //! Input file name
  44. TFile* fInputFile; //! Pointer to input file
  45. TTree* fInputTree; //! Pointer to input tree
  46. TClonesArray* fParticles; //! Particle array from PLUTO
  47. /** Private method CloseInput. Just for convenience. Closes the
  48. ** input file properly. Called from destructor and from ReadEvent. **/
  49. void CloseInput();
  50. ClassDef(MpdPlutoGenerator,1);
  51. };
  52. #endif