MpdHypYPtGenerator.h 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. // -------------------------------------------------------------------------
  2. // ----- CbmAnaHypYPtGenerator header file -----
  3. // ----- Created 03/10/04 by E. Kryshen -----
  4. // ----- Updated 10/02/10 by A. Zinchenko for MPD (with name change) -----
  5. // -------------------------------------------------------------------------
  6. /** CbmAnaHypYPtGenerator.h
  7. ** @author Evgeny Kryshen <e.kryshen@gsi.de>
  8. **
  9. ** The CbmAnaHypYPtGenerator generates particles with a given
  10. ** distribution over pt (dn/dpt = pt*exp(-mt/T)
  11. ** and rapidity (Gaussian) with fixed multiplicity per event.
  12. ** Derived from FairGenerator.
  13. */
  14. #ifndef MPDHYPYPTGENERATOR_H
  15. #define MPDHYPYPTGENERATOR_H
  16. #include "FairGenerator.h"
  17. #include "TF1.h"
  18. using namespace std;
  19. class FairPrimaryGenerator;
  20. class MpdHypYPtGenerator : public FairGenerator
  21. {
  22. public:
  23. /** Default constructor. */
  24. MpdHypYPtGenerator();
  25. /** Constructor with PDG-ID, multiplicity
  26. **@param pdgid Particle type (PDG encoding)
  27. **@param mult Multiplicity (default is 1)
  28. **/
  29. MpdHypYPtGenerator(Int_t pdgid, Int_t mult = 1, Double_t yield = -1.0);
  30. /** Destructor */
  31. virtual ~MpdHypYPtGenerator() {};
  32. /** Modifiers */
  33. inline void SetPDGType (Int_t pdg) {fPDGType = pdg; };
  34. inline void SetMultiplicity (Int_t mult) {fMult = mult; };
  35. //inline void SetDistributionPt (Double_t T=0.154319) {fT=T;};
  36. inline void SetDistributionPt (Double_t T=0.223) {fT=T;}; //AZ - for Omega- @ 9 GeV/n AuAu UrQMD
  37. //inline void SetDistributionY (Double_t y0=1.98604, Double_t sigma=0.617173) {fY0=y0;fSigma=sigma;};
  38. inline void SetDistributionY (Double_t y0=0, Double_t sigma=0.72) {fY0=y0;fSigma=sigma;}; // AZ - for Omega- @ 9 GeV/n AuAu UrQMD
  39. inline void SetRangePt (Double_t ptMin=0, Double_t ptMax=3) {fPtMin=ptMin;fPtMax=ptMax;};
  40. /** Initializer */
  41. Bool_t Init();
  42. /** Creates an event with given type and multiplicity.
  43. **@param primGen pointer to the CbmPrimaryGenerator
  44. */
  45. virtual Bool_t ReadEvent(FairPrimaryGenerator* primGen);
  46. private:
  47. Int_t fPDGType; ///< Particle type (PDG encoding)
  48. Int_t fMult; ///< Multiplicity
  49. Double_t fT; ///< Temperature in the Pt distribution
  50. Double_t fY0; ///< Mean rapidity
  51. Double_t fSigma; ///< Simga in the rapidity distribution
  52. Double_t fPtMin; ///< Max value of Pt
  53. Double_t fPtMax; ///< Min value of Pt
  54. Double_t fPDGMass; ///< Particle mass [GeV]
  55. TF1* fDistPt; //! Pointer to the Pt function
  56. Double_t fYield; ///< yield (particle / event)
  57. ClassDef(MpdHypYPtGenerator,1);
  58. };
  59. #endif