]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVGEN/AliGenBeamGas.cxx
First upload of strip unit survey data from the measurements of 11 September 2006
[u/mrichter/AliRoot.git] / EVGEN / AliGenBeamGas.cxx
index d5596ed30ad79366ffc4025d7f3fb1ae138efd4f..bfb4f5c9a5c238f0bd8f569bc72a89b94d7f3110 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-/*
-$Log$
-*/
-
-
-// Event generator that using an instance of type AliGenReader
-// reads particles from a file and applies cuts. 
+/* $Id$ */
 
+//
+// Generator to simulate beam gas interactions.
+// At present single interactions are read from an external file. 
+// Several interactions are combined in one event.
+// By default the vertex is smeared between +/- 20 m
+// Author: andreas.morsch@cern.ch
 
 #include "AliGenBeamGas.h"
-#include "AliRun.h"
 
 #include <TParticle.h>
-#include <TFile.h>
-#include <TTree.h>
 
 
- ClassImp(AliGenBeamGas)
+ClassImp(AliGenBeamGas)
 
 AliGenBeamGas::AliGenBeamGas()
-  :AliGenExtFile()
+    :AliGenExtFile(), 
+     fInteractions(1)
 {
 //  Constructor
 //
-    fInteractions = 1;
+    fOsigma[0] =    0.;
+    fOsigma[1] =    0.;
+    fOsigma[2] = 2000.;
 }
 
-AliGenBeamGas::AliGenBeamGas(const AliGenBeamGas & ExtFile)
-{
-// copy constructor
-}
 //____________________________________________________________
 
 AliGenBeamGas::~AliGenBeamGas()
@@ -77,7 +73,7 @@ void AliGenBeamGas::Generate()
 //
 //  Interaction vertex
 //
-      origin[2] = 4000. * random[0] - 2000.;
+      origin[2] = 2. * fOsigma[2] * random[0] - fOsigma[2];
 //
 //    beam 1 or 2
 //      
@@ -106,7 +102,7 @@ void AliGenBeamGas::Generate()
          Int_t idpart     = iparticle->GetPdgCode();
          Int_t decayed    = iparticle->GetFirstDaughter();
          Int_t doTracking = fTrackIt && (decayed < 0) && (TMath::Abs(idpart) > 10);
-         SetTrack(doTracking,-1,idpart,p,origin,polar,0,kPPrimary,nt);
+         PushTrack(doTracking,-1,idpart,p,origin,polar,0,kPPrimary,nt);
          KeepTrack(nt);
       } // track loop
       nInt++;
@@ -118,16 +114,6 @@ void AliGenBeamGas::Generate()
 }
 
 
-//AliGenBeamGas& AliGenBeamGas::operator=(const  AliGenBeamGas& rhs)
-//{
-// Assignment operator
-//    return *this;
-//}
-
-
-
-
-