29 #ifndef PND_BOXGENERATOR_H 30 #define PND_BOXGENERATOR_H 35 class FairPrimaryGenerator;
56 void SetPRange(Double32_t pmin = 0, Double32_t pmax = 10)
63 void SetPtRange(Double32_t ptmin = 0, Double32_t ptmax = 10)
67 fPtRangeIsSet = kTRUE;
70 void SetPhiRange(Double32_t phimin = 0, Double32_t phimax = 360)
76 void SetEtaRange(Double32_t etamin = -5, Double32_t etamax = 7)
80 fEtaRangeIsSet = kTRUE;
83 void SetYRange(Double32_t ymin = -5, Double32_t ymax = 7)
94 fThetaRangeIsSet = kTRUE;
101 void SetXYZ(Double32_t x = 0, Double32_t y = 0, Double32_t z = 0)
106 fPointVtxIsSet = kTRUE;
109 void SetBoxXYZ(Double32_t x1 = 0, Double32_t y1 = 0, Double32_t x2 = 0, Double32_t y2 = 0, Double32_t z = 0)
116 fBoxVtxIsSet = kTRUE;
119 void SetDebug(Bool_t debug = 0) { fDebug = debug; }
127 virtual Bool_t
ReadEvent(FairPrimaryGenerator *primGen);
131 out <<
"BoxGenerator settings:" << std::endl;
132 out << gen.fMult <<
" * " << gen.fPDGType << std::endl;
133 if (gen.fPRangeIsSet) out <<
"P Range: " << gen.fPMin <<
" < " << gen.fPMax << std::endl;
134 if (gen.fPtRangeIsSet) out <<
"Pt Range: " << gen.fPtMin <<
" < " << gen.fPtMax << std::endl;
135 if (gen.fInversePIsSet) out <<
"InverseP is set" << std::endl;
136 if (gen.fThetaRangeIsSet) out <<
"Theta Range: " << gen.fThetaMin <<
" < " << gen.fThetaMax << std::endl;
137 if (gen.fCosThetaIsSet) out <<
"CosTheta is set" << std::endl;
138 if (gen.fEtaRangeIsSet) out <<
"Eta Range: " << gen.fEtaMin <<
" < " << gen.fEtaMax << std::endl;
139 if (gen.fYRangeIsSet) out <<
"Y Range: " << gen.fYMin <<
" < " << gen.fYMax << std::endl;
140 out <<
"Phi Range: " << gen.fPhiMin <<
" < " << gen.fPhiMax << std::endl;
141 if (gen.fPointVtxIsSet) out <<
"Point Vertex: " << gen.fX <<
"/" << gen.fY <<
"/" << gen.fZ << std::endl;
142 if (gen.fBoxVtxIsSet) out <<
"Box Vertex: p1: " << gen.fX1 <<
"/" << gen.fY1 <<
" p2: " << gen.fX2 <<
"/" << gen.fY2 <<
" z " << gen.fZ << std::endl;
153 Double32_t fPtMin, fPtMax;
154 Double32_t fPhiMin, fPhiMax;
155 Double32_t fEtaMin, fEtaMax;
156 Double32_t fYMin, fYMax;
157 Double32_t fPMin, fPMax;
158 Double32_t fThetaMin, fThetaMax;
159 Double32_t fX, fY, fZ;
160 Double32_t fX1, fY1, fX2, fY2;
162 Bool_t fEtaRangeIsSet;
164 Bool_t fThetaRangeIsSet;
165 Bool_t fCosThetaIsSet;
166 Bool_t fInversePIsSet;
167 Bool_t fPtRangeIsSet;
169 Bool_t fPointVtxIsSet;
void SetPDGType(Int_t pdg)
void SetThetaRange(Double32_t thetamin=0, Double32_t thetamax=90)
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)
void SetXYZ(Double32_t x=0, Double32_t y=0, Double32_t z=0)
virtual Bool_t ReadEvent(FairPrimaryGenerator *primGen)
void SetEtaRange(Double32_t etamin=-5, Double32_t etamax=7)
void SetPtRange(Double32_t ptmin=0, Double32_t ptmax=10)
void SetMultiplicity(Int_t mult)
void SetDebug(Bool_t debug=0)
friend std::ostream & operator<<(std::ostream &out, PndBoxGenerator &gen)
void SetPRange(Double32_t pmin=0, Double32_t pmax=10)
virtual ~PndBoxGenerator()
void SetPhiRange(Double32_t phimin=0, Double32_t phimax=360)