]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVGEN/AliGenHalo.cxx
Transition to NewIO
[u/mrichter/AliRoot.git] / EVGEN / AliGenHalo.cxx
index 44eba2023aa0672a8359de5da3cfd6b66b75465d..d9e830884b8fd5c99b1677311b8348fa343e0701 100644 (file)
 
 /*
 $Log$
+Revision 1.11.6.1  2003/04/14 17:33:50  hristov
+Merging with v3-09-08 (part1)
+
+Revision 1.12  2003/01/14 10:50:18  alibrary
+Cleanup of STEER coding conventions
+
+Revision 1.11  2001/07/27 17:09:36  morsch
+Use local SetTrack, KeepTrack and SetHighWaterMark methods
+to delegate either to local stack or to stack owned by AliRun.
+(Piotr Skowronski, A.M.)
+
+Revision 1.10  2000/12/21 16:24:06  morsch
+Coding convention clean-up
+
+Revision 1.9  2000/11/30 07:12:50  alibrary
+Introducing new Rndm and QA classes
+
+Revision 1.8  2000/10/02 15:20:40  morsch
+Direct reference to default input file removed.
+
+Revision 1.7  2000/06/30 12:19:07  morsch
+Type of fFileName changed to TString, fp has been !-ed.
+
+Revision 1.6  2000/06/09 20:36:01  morsch
+All coding rule violations except RS3 corrected
+
 Revision 1.5  1999/11/03 17:43:20  fca
 New version from G.Martinez & A.Morsch
 
@@ -23,13 +49,20 @@ Introduction of the Copyright and cvs Log
 
 */
 
-#include "AliGenHalo.h"
-#include "AliRun.h"
-#include "AliPDG.h"
+// 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
 
-#include <TDatabasePDG.h>
 #include <stdlib.h>
 
+#include <TDatabasePDG.h>
+#include <TPDGCode.h>
+
+#include "AliGenHalo.h"
+#include "AliRun.h"
+
  ClassImp(AliGenHalo)
      AliGenHalo::AliGenHalo()
         :AliGenerator(-1)
@@ -37,8 +70,6 @@ Introduction of the Copyright and cvs Log
 // Constructor
     fName="Halo";
     fTitle="Halo from LHC Tunnel";
-    // Set the default file 
-    fFileName="~/marsip/marsip5.mu";
 //
 //  Read all particles
     fNpart=-1;
@@ -51,8 +82,6 @@ AliGenHalo::AliGenHalo(Int_t npart)
 // Constructor
     fName="Halo";
     fTitle="Halo from LHC Tunnel";
-    // Set the default file 
-    fFileName="~/marsip/marsip5.mu";
 //
 //  Read all particles
     fNpart=-1;
@@ -83,9 +112,9 @@ void AliGenHalo::Generate()
 // Generate from input file
     FILE *fp = fopen(fFileName,"r");
     if (fp) {
-       printf("\n File %s opened for reading ! \n ", fFileName);
+       printf("\n File %s opened for reading ! \n ", (char*) &fFileName);
     } else {
-       printf("\n Opening of file %s failed ! \n ", fFileName);
+       printf("\n Opening of file %s failed ! \n ",  (char*) &fFileName);
     }
 //
 // MARS particle codes
@@ -125,10 +154,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);
+      SetTrack(fTrackIt,-1,ipart,p,origin,polar,0,kPNoProcess,nt,fParentWeight);
+//    SetTrack(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);
+      SetTrack(fTrackIt,-1,ipart,p,origin,polar,0,kPNoProcess,nt,fParentWeight);
+//    SetTrack(fTrackIt,-1,ipart,p,origin,polar,0,"Halo-",nt,fParentWeight);
       origin[2]=-origin[2];
       p[2]=-p[2];
   }