]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVGEN/AliGenHalo.cxx
Size of katt and patt increased to 200000.
[u/mrichter/AliRoot.git] / EVGEN / AliGenHalo.cxx
index d1530450a7635f2369e3c42994ae88452fb66956..4eef63b879c4a448d93c6d91c7bb688e27c9b19f 100644 (file)
 
 /*
 $Log$
+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
+
 Revision 1.4  1999/09/29 09:24:14  fca
 Introduction of the Copyright and cvs Log
 
 */
 
 #include "AliGenHalo.h"
-#include "AliGenMUONlib.h"
-#include "AliMC.h"
 #include "AliRun.h"
 #include "AliPDG.h"
 
-#include <TDirectory.h>
 #include <TDatabasePDG.h>
-#include <TFile.h>
-#include <TTree.h>
 #include <stdlib.h>
+
  ClassImp(AliGenHalo)
      AliGenHalo::AliGenHalo()
         :AliGenerator(-1)
 {
+// Constructor
     fName="Halo";
     fTitle="Halo from LHC Tunnel";
-    // Set the default file 
-    fFileName="~/marsip/marsip5.mu";
 //
 //  Read all particles
     fNpart=-1;
@@ -48,38 +55,46 @@ Introduction of the Copyright and cvs Log
 AliGenHalo::AliGenHalo(Int_t npart)
     :AliGenerator(npart)
 {
+// Constructor
     fName="Halo";
     fTitle="Halo from LHC Tunnel";
-    // Set the default file 
-    fFileName="~/marsip/marsip5.mu";
 //
 //  Read all particles
     fNpart=-1;
     fp=0;
 }
 
+AliGenHalo::AliGenHalo(const AliGenHalo & Halo)
+{
+// copy constructor
+}
+
+
 //____________________________________________________________
 AliGenHalo::~AliGenHalo()
 {
+// Destructor
 }
 
 //____________________________________________________________
 void AliGenHalo::Init() 
-{}
+{
+// Initialisation
+}
 
 //____________________________________________________________
 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
-    // const Int_t imars[12]={0,14, 13, 8, 9, 11, 12, 5, 6, 1, 3, 2};
-  const Int_t imars[12]={0,kProton,kNeutron,kPiPlus,kPiMinus,kKPlus,kKMinus,
+  const Int_t kmars[12]={0,kProton,kNeutron,kPiPlus,kPiMinus,kKPlus,kKMinus,
                         kMuonPlus,kMuonMinus,kGamma,kElectron,kPositron};
  
   Float_t polar[3]= {0,0,0};
@@ -101,7 +116,7 @@ void AliGenHalo::Generate()
       if (ncols < 0) break;
       nread++;
       if (fNpart !=-1 && nread > fNpart) break;
-      ipart = imars[ipart];
+      ipart = kmars[ipart];
       amass = TDatabasePDG::Instance()->GetParticle(ipart)->Mass();
       p0=sqrt(ekin*ekin + 2.*amass);
       
@@ -115,16 +130,24 @@ 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);
+      gAlice->SetTrack(fTrackIt,-1,ipart,p,origin,polar,0,kPNoProcess,nt,fParentWeight);
+//      gAlice->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);
+      gAlice->SetTrack(fTrackIt,-1,ipart,p,origin,polar,0,kPNoProcess,nt,fParentWeight);
+//      gAlice->SetTrack(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;
+}
+