]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliGenerator.cxx
Splitting of TRD library (T.Kuhr)
[u/mrichter/AliRoot.git] / STEER / AliGenerator.cxx
index 8a3887e5e41db49af5735e5e0f7f1abd13705931..8fb713f66a3efdb3e6f8874dfdc5b1f47420f5aa 100644 (file)
@@ -35,6 +35,7 @@
 //                                                               //
 ///////////////////////////////////////////////////////////////////
 #include <TGenerator.h>
+#include <TMCProcess.h>
 
 #include "AliCollisionGeometry.h"
 #include "AliConfig.h"
@@ -42,6 +43,7 @@
 #include "AliRun.h"
 #include "AliStack.h"
 #include "AliMC.h"
+#include "AliVertexGenerator.h"
 
 ClassImp(AliGenerator)
 
@@ -209,7 +211,7 @@ AliGenerator & AliGenerator::operator=(const AliGenerator &gen)
 }
 
 //_______________________________________________________________________
-void AliGenerator::Copy(AliGenerator &/* gen */) const
+void AliGenerator::Copy(TObject &/* gen */) const
 {
   //
   // Copy *this onto gen
@@ -357,12 +359,13 @@ void AliGenerator::Vertex()
 //_______________________________________________________________________
 void AliGenerator::VertexExternal()
 {
-    // Dummy !!!!!!
-    // Obtain vertex from external source 
     //
-    // Should be something like fVertex = gAlice->GetVertex()
-    
-    fVertex[0]=fVertex[1]=fVertex[2]=0;  
+    // Obtain vertex from external source (vertex generator)
+    //
+    TVector3 vertex = fVertexGenerator->GetVertex();
+    fVertex[0] = vertex.X();
+    fVertex[1] = vertex.Y();
+    fVertex[2] = vertex.Z();
 }
 
 //_______________________________________________________________________