]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVGEN/AliGenHalo.cxx
executable for local monitoring on a GDC added
[u/mrichter/AliRoot.git] / EVGEN / AliGenHalo.cxx
index 9960ced03bc0b7a562344dfe26a7ad5b220096aa..9a900856df4aac78bdd32bbda50646570896a470 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-/*
-$Log$
-Revision 1.6  2000/06/09 20:36:01  morsch
-All coding rule violations except RS3 corrected
+/* $Id$ */
 
-Revision 1.5  1999/11/03 17:43:20  fca
-New version from G.Martinez & A.Morsch
+// Read background particles from a boundary source
+// Very specialized generator to simulate background from beam halo.
+// The input file is a text file specially prepared 
+// for this purpose.
+// Author: andreas.morsch@cern.ch
 
-Revision 1.4  1999/09/29 09:24:14  fca
-Introduction of the Copyright and cvs Log
+#include <stdlib.h>
 
-*/
+#include <TDatabasePDG.h>
+#include <TPDGCode.h>
 
 #include "AliGenHalo.h"
 #include "AliRun.h"
-#include "AliPDG.h"
 
-#include <TDatabasePDG.h>
-#include <stdlib.h>
+ClassImp(AliGenHalo)
 
- ClassImp(AliGenHalo)
-     AliGenHalo::AliGenHalo()
-        :AliGenerator(-1)
+AliGenHalo::AliGenHalo()
+    :AliGenerator(-1)
 {
 // Constructor
     fName="Halo";
     fTitle="Halo from LHC Tunnel";
-    // Set the default file 
-    fFileName=TString("~/marsip/marsip5.mu");
 //
 //  Read all particles
     fNpart=-1;
@@ -54,8 +49,6 @@ AliGenHalo::AliGenHalo(Int_t npart)
 // Constructor
     fName="Halo";
     fTitle="Halo from LHC Tunnel";
-    // Set the default file 
-    fFileName=TString("~/marsip/marsip5.mu");
 //
 //  Read all particles
     fNpart=-1;
@@ -63,8 +56,10 @@ AliGenHalo::AliGenHalo(Int_t npart)
 }
 
 AliGenHalo::AliGenHalo(const AliGenHalo & Halo)
+    :AliGenerator(Halo)
 {
-// copy constructor
+// Copy constructor
+    Halo.Copy(*this);
 }
 
 
@@ -128,10 +123,12 @@ void AliGenHalo::Generate()
       p[1]=p0*ty;
       p[2]=p0*tz;
       fParentWeight=wgt;
-      gAlice->SetTrack(fTrackIt,-1,ipart,p,origin,polar,0,"Halo+",nt,fParentWeight);
+      PushTrack(fTrackIt,-1,ipart,p,origin,polar,0,kPNoProcess,nt,fParentWeight);
+//    PushTrack(fTrackIt,-1,ipart,p,origin,polar,0,"Halo+",nt,fParentWeight);
       origin[2]=-origin[2];
       p[2]=-p[2];
-      gAlice->SetTrack(fTrackIt,-1,ipart,p,origin,polar,0,"Halo-",nt,fParentWeight);
+      PushTrack(fTrackIt,-1,ipart,p,origin,polar,0,kPNoProcess,nt,fParentWeight);
+//    PushTrack(fTrackIt,-1,ipart,p,origin,polar,0,"Halo-",nt,fParentWeight);
       origin[2]=-origin[2];
       p[2]=-p[2];
   }
@@ -141,10 +138,20 @@ void AliGenHalo::Generate()
 AliGenHalo& AliGenHalo::operator=(const  AliGenHalo& rhs)
 {
 // Assignment operator
+    rhs.Copy(*this);
     return *this;
 }
 
 
+void AliGenHalo::Copy(AliGenHalo&) const
+{
+    //
+    // Copy 
+  //
+    Fatal("Copy","Not implemented!\n");
+}
+
+