]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVGEN/AliGenHaloProtvino.cxx
AliSTARTRawReader for Chiara's needs
[u/mrichter/AliRoot.git] / EVGEN / AliGenHaloProtvino.cxx
index f7aec29e99c07646cdda796314d13671037ec532..900ddda3ec78773f3932c28041d648c14937cb63 100644 (file)
 ClassImp(AliGenHaloProtvino)
 
 AliGenHaloProtvino::AliGenHaloProtvino()
-    :AliGenerator(-1)
+    :AliGenerator(-1), 
+     fFile(0),
+     fFileName(0),
+     fSide(1),
+     fRunPeriod(kY3D90),
+     fTimePerEvent(1.e-4),
+     fNskip(0),
+     fZ1(0),
+     fZ2(0),
+     fG1(0),
+     fG2(0),
+     fGPASize(0)
 {
 // Constructor
     
@@ -44,32 +55,45 @@ AliGenHaloProtvino::AliGenHaloProtvino()
 //
 //  Read all particles
     fNpart = -1;
-    fFile  =  0;
-    fSide  =  1;
-//
-    SetRunPeriod();
-    SetTimePerEvent();
     SetAnalog(0);
 }
 
 AliGenHaloProtvino::AliGenHaloProtvino(Int_t npart)
-    :AliGenerator(npart)
+    :AliGenerator(npart),
+     fFile(0),
+     fFileName(0),
+     fSide(1),
+     fRunPeriod(kY3D90),
+     fTimePerEvent(1.e-4),
+     fNskip(0),
+     fZ1(0),
+     fZ2(0),
+     fG1(0),
+     fG2(0),
+     fGPASize(0)
 {
 // Constructor
     fName = "Halo";
     fTitle= "Halo from LHC Tunnel";
 //
     fNpart   = npart;
-    fFile    = 0;
-    fSide    = 1;
 //
-    SetRunPeriod();
-    SetTimePerEvent();
     SetAnalog(0);
 }
 
 AliGenHaloProtvino::AliGenHaloProtvino(const AliGenHaloProtvino & HaloProtvino):
-    AliGenerator(HaloProtvino)
+    AliGenerator(HaloProtvino),
+    fFile(0),
+    fFileName(0),
+    fSide(1),
+    fRunPeriod(kY3D90),
+    fTimePerEvent(1.e-4),
+    fNskip(0),
+    fZ1(0),
+    fZ2(0),
+    fG1(0),
+    fG2(0),
+    fGPASize(0)
 {
 // Copy constructor
     HaloProtvino.Copy(*this);
@@ -88,9 +112,9 @@ void AliGenHaloProtvino::Init()
 // Initialisation
     fFile = fopen(fFileName,"r");
     if (fFile) {
-       printf("\n File %s opened for reading, %p ! \n ",  fFileName.Data(), fFile);
+       printf("\n File %s opened for reading, %p ! \n ",  fFileName.Data(), (void*)fFile);
     } else {
-       printf("\n Opening of file %s failed,  %p ! \n ",  fFileName.Data(), fFile);
+       printf("\n Opening of file %s failed,  %p ! \n ",  fFileName.Data(), (void*)fFile);
     }
 //
 //
@@ -217,7 +241,7 @@ void AliGenHaloProtvino::Generate()
   Float_t amass;
   //
   Int_t ncols, nt;
-  Int_t nskip = 0;
+  static Int_t nskip = 0;
   Int_t nread = 0;
 
   Float_t* zPrimary = new Float_t [fNpart];
@@ -232,7 +256,7 @@ void AliGenHaloProtvino::Generate()
   
   Float_t zVertexOld = -1.e10;
   Int_t   nInt       = 0;        // Counts number of interactions
-  Float_t Wgt = 0.;
+  Float_t wwgt = 0.;
   
   while(1) {
 //
@@ -343,7 +367,7 @@ void AliGenHaloProtvino::Generate()
              PushTrack(fTrackIt,ntP,ipart[nprim],p,origin,polar,t,kPNoProcess,nt,fParentWeight);
          }
       }
-      Wgt += fParentWeight;
+      wwgt += fParentWeight;
       
       SetHighWaterMark(nt);
   }
@@ -356,7 +380,7 @@ void AliGenHaloProtvino::Generate()
   delete [] vy;      
   delete [] tx;      
   delete [] ty;     
-  printf("Total weight %f\n\n", Wgt);
+  printf("Total weight %f\n\n", wwgt);
   
 }
  
@@ -410,7 +434,7 @@ Float_t AliGenHaloProtvino::GasPressureWeight(Float_t zPrimary)
     return weight;
 }
 
-void AliGenHaloProtvino::Draw()
+void AliGenHaloProtvino::Draw(Option_t *)
 {
 // Draws the gas pressure distribution
     Float_t z[400];