From ca33591a510f802e71e66ea3a23de4129f8f5398 Mon Sep 17 00:00:00 2001 From: morsch Date: Mon, 2 Dec 2002 10:02:40 +0000 Subject: [PATCH] Corrections introduced by F. Silker: - SetBetaSource - Particle type according to charge. --- EVGEN/AliGenGrayParticles.cxx | 11 +++++++++-- EVGEN/AliGenGrayParticles.h | 4 ++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/EVGEN/AliGenGrayParticles.cxx b/EVGEN/AliGenGrayParticles.cxx index 98c567d96a6..bd2a475627f 100644 --- a/EVGEN/AliGenGrayParticles.cxx +++ b/EVGEN/AliGenGrayParticles.cxx @@ -15,6 +15,9 @@ /* $Log$ +Revision 1.2 2002/10/14 14:55:35 hristov +Merging the VirtualMC branch to the main development branch (HEAD) + Revision 1.1.2.1 2002/10/10 16:40:08 hristov Updating VirtualMC to v3-09-02 @@ -48,7 +51,9 @@ AliGenGrayParticles::AliGenGrayParticles(Int_t npart) SetPmax(); SetTarget(); SetNominalCmsEnergy(); + SetCharge(); SetTemperature(); + SetBetaSource(); } //____________________________________________________________ @@ -79,8 +84,10 @@ void AliGenGrayParticles::Generate() Float_t polar [3] = {0., 0., 0.}; Int_t nt, i; for(i = 0;i < fNpart; i++) { - Int_t kf = kProton; - GenerateSlow(1, fTemperature, 0., p); + Int_t kf; + if(fCharge==1) kf = kProton; + else kf = kNeutron; + GenerateSlow(fCharge, fTemperature, fBetaSource, p); SetTrack(fTrackIt, -1, kf, p, origin, polar, 0., kPNoProcess, nt, 1.); diff --git a/EVGEN/AliGenGrayParticles.h b/EVGEN/AliGenGrayParticles.h index 6dcec202d9d..108dae67f31 100644 --- a/EVGEN/AliGenGrayParticles.h +++ b/EVGEN/AliGenGrayParticles.h @@ -18,7 +18,9 @@ public: virtual void SetPmax(Float_t pmax = 10.) {fPmax = pmax;} virtual void SetNominalCmsEnergy(Float_t energy = 14000.) {fCMS = energy;} virtual void SetTarget(Float_t a=208, Float_t z=82) {fATarget = a; fZTarget = z;} + virtual void SetCharge(Int_t c = 1) {fCharge = c;} virtual void SetTemperature(Double_t t = 0.05) {fTemperature = t;} + virtual void SetBetaSource(Double_t b = 0.05) {fBetaSource = b;} protected: void GenerateSlow(Int_t charge, Double_t T, Double_t beta, Float_t* q); @@ -31,7 +33,9 @@ public: Float_t fPmax; // Maximum slow nucleon momentum Float_t fATarget; // Target nucleus mass number Float_t fZTarget; // Target nucleus charge number + Int_t fCharge; // Slow nucleon charge Float_t fTemperature; // Source Temperature + Float_t fBetaSource; // Source beta ClassDef(AliGenGrayParticles,1) // Gray Particle Generator }; #endif -- 2.43.0