* 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)
+AliGenBeamGas::AliGenBeamGas(const AliGenBeamGas & beamgas):
+ AliGenExtFile(beamgas),
+ fInteractions(1)
{
-// copy constructor
+// Copy constructor
+ beamgas.Copy(*this);
}
//____________________________________________________________
//
// Interaction vertex
//
- origin[2] = 4000. * random[0] - 2000.;
+ origin[2] = 2. * fOsigma[2] * random[0] - fOsigma[2];
//
// beam 1 or 2
//
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++;
}
-//AliGenBeamGas& AliGenBeamGas::operator=(const AliGenBeamGas& rhs)
-//{
-// Assignment operator
-// return *this;
-//}
-
+void AliGenBeamGas::Copy(TObject&) const
+{
+ //
+ // Copy
+ //
+ Fatal("Copy","Not implemented!\n");
+}