PandaRoot
PndGasGenerator.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // ----- PndGasGenerator header file -----
3 // ----- Created 02/04/09 by F. Uhlig -----
4 // -------------------------------------------------------------------------
5 
21 #ifndef PND_GASGENERATOR_H
22 #define PND_GASGENERATOR_H
23 
24 #include "FairGenerator.h"
25 #include <iostream>
26 
27 class FairPrimaryGenerator;
28 class TF1;
29 
30 class PndGasGenerator : public FairGenerator {
31  public:
34 
39  PndGasGenerator(Int_t pdgid, Int_t mult = 1);
40 
42  virtual ~PndGasGenerator(){};
43 
45  void SetPDGType(Int_t pdg) { fPDGType = pdg; };
46 
47  void SetMultiplicity(Int_t mult) { fMult = mult; };
48 
49  void SetPRange(Double32_t pmin = 0, Double32_t pmax = 10)
50  {
51  fPMin = pmin;
52  fPMax = pmax;
53  fPRangeIsSet = kTRUE;
54  }
55 
56  void SetPhiRange(Double32_t phimin = 0, Double32_t phimax = 360)
57  {
58  fPhiMin = phimin;
59  fPhiMax = phimax;
60  };
61 
62  void SetThetaRange(Double32_t thetamin = 0, Double32_t thetamax = 90)
63  {
64  fThetaMin = thetamin;
65  fThetaMax = thetamax;
66  fThetaRangeIsSet = kTRUE;
67  };
68 
69  void SetCosTheta() { fCosThetaIsSet = kTRUE; };
70 
71  void SetZRange(Double32_t zmin = 0, Double32_t zmax = 10)
72  {
73  fZMin = zmin;
74  fZMax = zmax;
75  }
76 
77  void SetRadius(Double32_t radius = 0.2) { fRadius = radius; }
78 
79  // void SetDensityProfile(TString in)
80 
81  void SetDebug(Bool_t debug = 0) { fDebug = debug; }
82 
84  Bool_t Init();
85 
89  virtual Bool_t ReadEvent(FairPrimaryGenerator *primGen);
90 
91  private:
92  Int_t fPDGType; // Particle type (PDG encoding)
93  Int_t fMult; // Multiplicity
94 
95  Double32_t fPDGMass; // Particle mass [GeV]
96  Double32_t fPhiMin, fPhiMax; // Azimuth angle range [degree]
97  Double32_t fPMin, fPMax; // Momentum range in lab system
98  Double32_t fThetaMin, fThetaMax; // Polar angle range in lab system [degree]
99  Double32_t fX, fY, fZ; // Point vertex coordinates [cm]
100  Double32_t fRadius; // Radius of beam profile
101 
102  Bool_t fThetaRangeIsSet; // True if theta range is set
103  Bool_t fCosThetaIsSet; // True if uniform distribution in cos(theta) is set (default -> uniform theta)
104  Bool_t fPRangeIsSet; // True if abs.momentum range is set
105  Double32_t fZMin, fZMax; // Minimum and maximum z position
106  Bool_t fDebug; // Debug switch
107 
108  // TString fProfileFunction; // function to generate density profile
109  TF1 *fDensityProfile; // density profile
110 
111  ClassDef(PndGasGenerator, 1);
112 };
113 
114 #endif
void SetPRange(Double32_t pmin=0, Double32_t pmax=10)
void SetPDGType(Int_t pdg)
void SetDebug(Bool_t debug=0)
void SetZRange(Double32_t zmin=0, Double32_t zmax=10)
virtual ~PndGasGenerator()
void SetRadius(Double32_t radius=0.2)
void SetMultiplicity(Int_t mult)
void SetThetaRange(Double32_t thetamin=0, Double32_t thetamax=90)
virtual Bool_t ReadEvent(FairPrimaryGenerator *primGen)
void SetPhiRange(Double32_t phimin=0, Double32_t phimax=360)