X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=EVGEN%2FAliGenFixed.cxx;h=8dacf599896fedfc6a7a337d5bb9aa0e9f88644c;hb=3c5d5aef0ebefa6004bf104525c5facb673a7761;hp=37e57cbb1a00527840b4fd686da2e626840e1b9d;hpb=642f15cfce9ebda2ff71a55c5edb8d9bc0c729c4;p=u%2Fmrichter%2FAliRoot.git
diff --git a/EVGEN/AliGenFixed.cxx b/EVGEN/AliGenFixed.cxx
index 37e57cbb1a0..8dacf599896 100644
--- a/EVGEN/AliGenFixed.cxx
+++ b/EVGEN/AliGenFixed.cxx
@@ -17,21 +17,9 @@
// Simple particle gun.
// Momentum, phi and theta of the partice as well as the particle type can be set.
+// If fExplicit is true the user set momentum vector is used,
+// otherwise it is calculated.
// andreas.morsch@cern.ch
-//Begin_Html
-/*
- The responsible person for this module is
-Andreas Morsch.
-
-
-
-
-
-*/ -//End_Html -// // -/////////////////////////////////////////////////////////////////// #include "TPDGCode.h" @@ -42,27 +30,29 @@ ClassImp(AliGenFixed) //_____________________________________________________________________________ AliGenFixed::AliGenFixed() - :AliGenerator() + :AliGenerator(), + fIpart(0), + fExplicit(kFALSE) { // // Default constructor // - fIpart = 0; - fExplicit = kFALSE; + for (Int_t i = 0; i < 3; i++) fP[i] = 0.; + } //_____________________________________________________________________________ AliGenFixed::AliGenFixed(Int_t npart) - :AliGenerator(npart) + :AliGenerator(npart), + fIpart(kProton), + fExplicit(kFALSE) { // // Standard constructor // fName="Fixed"; fTitle="Fixed Particle Generator"; - // Generate Proton by default - fIpart=kProton; - fExplicit = kFALSE; + for (Int_t i = 0; i < 3; i++) fP[i] = 0.; } //_____________________________________________________________________________ @@ -73,21 +63,21 @@ void AliGenFixed::Generate() // Float_t polar[3]= {0,0,0}; if(!fExplicit) { - fP[0] = fPMin*TMath::Cos(fPhiMin)*TMath::Sin(fThetaMin); - fP[1] = fPMin*TMath::Sin(fPhiMin)*TMath::Sin(fThetaMin); - fP[2] = fPMin*TMath::Cos(fThetaMin); + fP[0] = fPMin * TMath::Cos(fPhiMin) * TMath::Sin(fThetaMin); + fP[1] = fPMin * TMath::Sin(fPhiMin) * TMath::Sin(fThetaMin); + fP[2] = fPMin * TMath::Cos(fThetaMin); } - Int_t i, nt; + Int_t i, j, nt; // - for(i=0;i