]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVGEN/AliGenBeamGas.cxx
increase cell time diff histogram binning
[u/mrichter/AliRoot.git] / EVGEN / AliGenBeamGas.cxx
index dbd7c9052a13c0c0bbb98a66a76bf0186832a8c9..753acb3f602d325cfdb0e6e69fbbc61d62d647e8 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-/*
-$Log$
-Revision 1.1  2002/05/15 08:59:36  morsch
-First commit.
-
-*/
+/* $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 "AliGenReader.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()
@@ -89,7 +79,9 @@ void AliGenBeamGas::Generate()
 //    beam 1 or 2
 //      
       Float_t ibeam = (random[1] < 0.5) ? -1. : 1.;
-      
+
+      // Interaction time
+      Float_t time = origin[2]/TMath::Ccgs()*ibeam;
 //
 //    Read next event
 //      
@@ -113,7 +105,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,time,kPPrimary,nt);
          KeepTrack(nt);
       } // track loop
       nInt++;
@@ -125,16 +117,6 @@ void AliGenBeamGas::Generate()
 }
 
 
-//AliGenBeamGas& AliGenBeamGas::operator=(const  AliGenBeamGas& rhs)
-//{
-// Assignment operator
-//    return *this;
-//}
-
-
-
-
-