]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVGEN/AliGenHalo.cxx
Preliminary files for CMake
[u/mrichter/AliRoot.git] / EVGEN / AliGenHalo.cxx
index 16ccf3d8492e1463c2f496a0f3e3be265fd5ae51..8fb4b372aa9cada1233382067c3f82def2d9a6b7 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-/*
-$Log$
-Revision 1.7  2000/06/30 12:19:07  morsch
-Type of fFileName changed to TString, fp has been !-ed.
+/* $Id$ */
 
-Revision 1.6  2000/06/09 20:36:01  morsch
-All coding rule violations except RS3 corrected
+// 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.5  1999/11/03 17:43:20  fca
-New version from G.Martinez & A.Morsch
-
-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),
+     fp(0),
+     fFileName(0)
 {
 // Constructor
     fName="Halo";
@@ -46,11 +42,12 @@ Introduction of the Copyright and cvs Log
 //
 //  Read all particles
     fNpart=-1;
-    fp=0;
 }
 
 AliGenHalo::AliGenHalo(Int_t npart)
-    :AliGenerator(npart)
+    :AliGenerator(npart),
+     fp(0),
+     fFileName(0)
 {
 // Constructor
     fName="Halo";
@@ -58,15 +55,8 @@ AliGenHalo::AliGenHalo(Int_t npart)
 //
 //  Read all particles
     fNpart=-1;
-    fp=0;
 }
 
-AliGenHalo::AliGenHalo(const AliGenHalo & Halo)
-{
-// copy constructor
-}
-
-
 //____________________________________________________________
 AliGenHalo::~AliGenHalo()
 {
@@ -83,7 +73,7 @@ void AliGenHalo::Init()
 void AliGenHalo::Generate()
 {
 // Generate from input file
-    FILE *fp = fopen(fFileName,"r");
+    fp = fopen(fFileName,"r");
     if (fp) {
        printf("\n File %s opened for reading ! \n ", (char*) &fFileName);
     } else {
@@ -127,23 +117,18 @@ 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];
   }
 }
  
 
-AliGenHalo& AliGenHalo::operator=(const  AliGenHalo& rhs)
-{
-// Assignment operator
-    return *this;
-}
-
-