FairRoot/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 {
32 public:
33 
36 
41  PndGasGenerator(Int_t pdgid, Int_t mult=1);
42 
43 
45  virtual ~PndGasGenerator() {};
46 
48  void SetPDGType (Int_t pdg) {fPDGType = pdg; };
49 
50  void SetMultiplicity (Int_t mult) {fMult = mult; };
51 
52  void SetPRange(Double32_t pmin=0 , Double32_t pmax=10)
53  {fPMin=pmin; fPMax=pmax; fPRangeIsSet=kTRUE;}
54 
55  void SetPhiRange (Double32_t phimin=0 , Double32_t phimax=360)
56  {fPhiMin=phimin; fPhiMax=phimax;};
57 
58  void SetThetaRange (Double32_t thetamin=0, Double32_t thetamax=90)
59  {fThetaMin=thetamin; fThetaMax=thetamax; fThetaRangeIsSet=kTRUE;};
60 
61  void SetCosTheta ()
62  {fCosThetaIsSet=kTRUE;};
63 
64  void SetZRange (Double32_t zmin=0, Double32_t zmax=10)
65  {fZMin=zmin; fZMax=zmax;}
66 
67  void SetRadius (Double32_t radius=0.2) {fRadius=radius;}
68 
69  // void SetDensityProfile(TString in)
70 
71  void SetDebug(Bool_t debug=0) {fDebug = debug;}
72 
74  Bool_t Init();
75 
79  virtual Bool_t ReadEvent(FairPrimaryGenerator* primGen);
80 
81 private:
82  Int_t fPDGType; // Particle type (PDG encoding)
83  Int_t fMult; // Multiplicity
84 
85  Double32_t fPDGMass; // Particle mass [GeV]
86  Double32_t fPhiMin, fPhiMax; // Azimuth angle range [degree]
87  Double32_t fPMin, fPMax; // Momentum range in lab system
88  Double32_t fThetaMin, fThetaMax; // Polar angle range in lab system [degree]
89  Double32_t fX, fY, fZ; // Point vertex coordinates [cm]
90  Double32_t fRadius; // Radius of beam profile
91 
92  Bool_t fThetaRangeIsSet; // True if theta range is set
93  Bool_t fCosThetaIsSet; // True if uniform distribution in cos(theta) is set (default -> uniform theta)
94  Bool_t fPRangeIsSet; // True if abs.momentum range is set
95  Double32_t fZMin, fZMax; // Minimum and maximum z position
96  Bool_t fDebug; // Debug switch
97 
98  // TString fProfileFunction; // function to generate density profile
99  TF1* fDensityProfile; // density profile
100 
102 
103 };
104 
105 
106 #endif
void SetPRange(Double32_t pmin=0, Double32_t pmax=10)
void SetPDGType(Int_t pdg)
Double32_t fPDGMass
Double32_t fPhiMax
void SetDebug(Bool_t debug=0)
void SetZRange(Double32_t zmin=0, Double32_t zmax=10)
Double32_t fPMax
FairPrimaryGenerator * primGen
Definition: sim_emc_apd.C:81
Double32_t fThetaMax
Double32_t fZMin
virtual Bool_t ReadEvent(FairPrimaryGenerator *primGen)
virtual ~PndGasGenerator()
void SetRadius(Double32_t radius=0.2)
Double32_t fPMin
void SetMultiplicity(Int_t mult)
Double32_t fRadius
void SetThetaRange(Double32_t thetamin=0, Double32_t thetamax=90)
Double32_t fThetaMin
void SetPhiRange(Double32_t phimin=0, Double32_t phimax=360)
ClassDef(PndGasGenerator, 1)
Double32_t fPhiMin
Double_t mult
Double32_t fZMax