]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TRD/AliTRDsimpleGen.cxx
Avoiding relative path to include files
[u/mrichter/AliRoot.git] / TRD / AliTRDsimpleGen.cxx
index 098fcaf8a8aa0b0c886b50a3155d473de2413bf6..08797125221239946cdf4768ae197a02247f3aaf 100644 (file)
@@ -13,9 +13,7 @@
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
  
-/*
-$Log$                                                          
-*/
+/* $Id$ */
  
 ///////////////////////////////////////////////////////////////////////////////
 //                                                                           //
@@ -26,9 +24,13 @@ $Log$
 #include <stdlib.h>
  
 #include <TRandom.h>
+#include <TMCProcess.h>
+
+#include "AliRun.h"
 
 #include "AliTRDsimpleGen.h"
 #include "AliTRDsimpleMC.h"
+#include "AliMC.h"
  
 ClassImp(AliTRDsimpleGen)
  
@@ -46,7 +48,7 @@ AliTRDsimpleGen::AliTRDsimpleGen():TObject()
 }                                                                               
  
 //_____________________________________________________________________________
-AliTRDsimpleGen::AliTRDsimpleGen(const AliTRDsimpleGen &g)
+AliTRDsimpleGen::AliTRDsimpleGen(const AliTRDsimpleGen &g):TObject(g)
 {
   //
   // AliTRDsimpleGen copy constructor
@@ -109,6 +111,14 @@ void AliTRDsimpleGen::NewParticle(Int_t ievent)
             ,fMomMax);
     }
     printf("\n");
+
+    // Add one dummy particle to the stack so that AddHit will work
+    Float_t mom[3] = { 0.0 };
+    Float_t vtx[3] = { 0.0 };
+    Float_t pol[3] = { 0.0 };
+    Int_t   ntr    = 0;
+    gAlice->GetMCApp()->PushTrack(0,-1,fPdg,mom,vtx,pol,0.0,kPPrimary,ntr);
+
   }
 
   Double_t p = fMomMax;