]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVGEN/AliGenKrypton.cxx
SetSeed implementation
[u/mrichter/AliRoot.git] / EVGEN / AliGenKrypton.cxx
index 8acf6b76e00b5d960a8570ecce9796793c2d7d81..bafcf2df2ba684c7dd57f7f8662f2cb2864fe167 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.2  2007/10/23 09:27:16  hristov
+Adding dependence on the dip angle (Marek)
+
 Revision 1.1  2007/06/24 20:53:11  hristov
 New generator for the krypton runs of TPC (Marek)
 
@@ -90,13 +93,14 @@ void AliGenKrypton::Generate(){
   // gammas
   //
   for(Int_t i=0;i<ngamma;i++){
+    rnd=gRandom->Rndm();
+    Double_t theta = TMath::Pi()*rnd;
     rnd=gRandom->Rndm();
     phi=TMath::TwoPi()*rnd;    
     ptot=egamma[i];
-    p[0]=ptot*TMath::Cos(phi);
-    p[1]=ptot*TMath::Sin(phi);
-    rnd=gRandom->Rndm();
-    p[2]=ptot*TMath::Cos(TMath::Pi()*rnd);
+    p[0]=ptot*TMath::Cos(phi)*TMath::Sin(theta);
+    p[1]=ptot*TMath::Sin(phi)*TMath::Sin(theta);
+    p[2]=ptot*TMath::Cos(theta);
     //
     // her push particle
     //
@@ -117,7 +121,7 @@ void AliGenKrypton::KrDecay(Int_t &nelectron, Int_t &ngamma, Double_t *eelectron
   //
   // first decay - 32 keV
   //
-  if(rnd < prob1[0]) {
+   if(rnd < prob1[0]) {
     // 2 electrons
     nelectron = 2;
     eelectron[0]=30.e-6;
@@ -154,5 +158,7 @@ void AliGenKrypton::KrDecay(Int_t &nelectron, Int_t &ngamma, Double_t *eelectron
     ngamma++;
     egamma[ngamma-1]=9.e-6;
   }
+  
+
 }
 //________________________________________________________________________