FairRoot/PandaRoot
PndBoxGenerator.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // ----- PndBoxGenerator header file -----
3 // ----- Created 22/05/07 by S.Spataro -----
4 // -------------------------------------------------------------------------
5 
17 #ifndef PND_BOXGENERATOR_H
18 #define PND_BOXGENERATOR_H
19 
20 #include "FairGenerator.h"
21 #include <iostream>
22 
23 class FairPrimaryGenerator;
24 
25 class PndBoxGenerator : public FairGenerator
26 {
27 public:
28 
31 
36  PndBoxGenerator(Int_t pdgid, Int_t mult=1);
37 
39  virtual ~PndBoxGenerator() {};
40 
42  void SetPDGType (Int_t pdg) {fPDGType = pdg; };
43 
44  void SetMultiplicity (Int_t mult) {fMult = mult; };
45 
46  void SetPRange(Double32_t pmin=0 , Double32_t pmax=10)
47  {fPMin=pmin; fPMax=pmax; fPRangeIsSet=kTRUE;}
48 
49  void SetPtRange (Double32_t ptmin=0 , Double32_t ptmax=10)
50  {fPtMin=ptmin; fPtMax=ptmax; fPtRangeIsSet=kTRUE;};
51 
52  void SetPhiRange (Double32_t phimin=0 , Double32_t phimax=360)
53  {fPhiMin=phimin; fPhiMax=phimax;};
54 
55  void SetEtaRange (Double32_t etamin=-5 , Double32_t etamax=7)
56  {fEtaMin=etamin; fEtaMax=etamax; fEtaRangeIsSet=kTRUE;};
57 
58  void SetYRange (Double32_t ymin=-5 , Double32_t ymax=7)
59  {fYMin=ymin; fYMax=ymax; fYRangeIsSet=kTRUE;};
60 
61  void SetThetaRange (Double32_t thetamin=0, Double32_t thetamax=90)
62  {fThetaMin=thetamin; fThetaMax=thetamax; fThetaRangeIsSet=kTRUE;};
63 
64  void SetCosTheta ()
65  {fCosThetaIsSet=kTRUE;};
66 
67  void SetInverseP ()
68  {fInversePIsSet=kTRUE;};
69 
70  void SetXYZ (Double32_t x=0, Double32_t y=0, Double32_t z=0) {
71  fX=x; fY=y; fZ=z; fPointVtxIsSet=kTRUE;}
72 
73  void SetBoxXYZ (Double32_t x1=0, Double32_t y1=0, Double32_t x2=0, Double32_t y2=0, Double32_t z=0) {
74  fX1=x1; fY1=y1; fX2=x2; fY2=y2; fZ=z; fBoxVtxIsSet=kTRUE;}
75 
76  void SetDebug(Bool_t debug=0) {fDebug = debug;}
77 
79  Bool_t Init();
80 
84  virtual Bool_t ReadEvent(FairPrimaryGenerator* primGen);
85 
86 private:
87  Int_t fPDGType; // Particle type (PDG encoding)
88  Int_t fMult; // Multiplicity
89 
90  Double32_t fPDGMass; // Particle mass [GeV]
91  Double32_t fPtMin, fPtMax; // Transverse momentum range [GeV]
92  Double32_t fPhiMin, fPhiMax; // Azimuth angle range [degree]
93  Double32_t fEtaMin, fEtaMax; // Pseudorapidity range in lab system
94  Double32_t fYMin, fYMax; // Rapidity range in lab system
95  Double32_t fPMin, fPMax; // Momentum range in lab system
96  Double32_t fThetaMin, fThetaMax; // Polar angle range in lab system [degree]
97  Double32_t fX, fY, fZ; // Point vertex coordinates [cm]
98  Double32_t fX1, fY1, fX2, fY2; // Box vertex coords (x1,y1)->(x2,y2)
99 
100  Bool_t fEtaRangeIsSet; // True if eta range is set
101  Bool_t fYRangeIsSet; // True if rapidity range is set
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 fInversePIsSet; // True if uniform distribution in 1/p
105  Bool_t fPtRangeIsSet; // True if transverse momentum range is set
106  Bool_t fPRangeIsSet; // True if abs.momentum range is set
107  Bool_t fPointVtxIsSet; // True if point vertex is set
108  Bool_t fBoxVtxIsSet; // True if box vertex is set
109  Bool_t fDebug; // Debug switch
110 
112 
113 };
114 
115 
116 #endif
void SetPDGType(Int_t pdg)
void SetThetaRange(Double32_t thetamin=0, Double32_t thetamax=90)
Double32_t fYMax
Double32_t fPtMin
void SetBoxXYZ(Double32_t x1=0, Double32_t y1=0, Double32_t x2=0, Double32_t y2=0, Double32_t z=0)
void SetYRange(Double32_t ymin=-5, Double32_t ymax=7)
Double32_t fPhiMin
Double32_t fEtaMin
void SetXYZ(Double32_t x=0, Double32_t y=0, Double32_t z=0)
Double32_t fPMax
Double32_t fPhiMax
FairPrimaryGenerator * primGen
Definition: sim_emc_apd.C:81
Double32_t fThetaMax
Double32_t fPDGMass
Double32_t fThetaMin
Double32_t fPMin
void SetEtaRange(Double32_t etamin=-5, Double32_t etamax=7)
void SetPtRange(Double32_t ptmin=0, Double32_t ptmax=10)
Double_t z
void SetMultiplicity(Int_t mult)
virtual Bool_t ReadEvent(FairPrimaryGenerator *primGen)
void SetDebug(Bool_t debug=0)
Double32_t fEtaMax
Double_t x
Double32_t fYMin
void SetPRange(Double32_t pmin=0, Double32_t pmax=10)
virtual ~PndBoxGenerator()
Double_t y
Double32_t fPtMax
ClassDef(PndBoxGenerator, 1)
Double_t mult
void SetPhiRange(Double32_t phimin=0, Double32_t phimax=360)