// //
///////////////////////////////////////////////////////////////////
#include <TGenerator.h>
+#include <TMCProcess.h>
+#include "AliLog.h"
#include "AliCollisionGeometry.h"
#include "AliConfig.h"
#include "AliGenerator.h"
#include "AliRun.h"
#include "AliStack.h"
#include "AliMC.h"
+#include "AliVertexGenerator.h"
ClassImp(AliGenerator)
//_______________________________________________________________________
AliGenerator::AliGenerator():
+ TNamed(),
+ AliRndm(),
fMCEvGen(0),
fThetaMin(0),
fThetaMax(0),
fVertexSmear(kNoSmear),
fVertexSource(kInternal),
fCutVertexZ(0),
+ fPileUpTimeWindow(-1.),
fTrackIt(0),
+ fVertexGenerator(0),
fOrigin(3),
fOsigma(3),
fVertex(3),
fStack(0),
+ fContainer(0),
fCollisionGeometry(0)
{
//
// Default constructor
//
if (gAlice) {
- if (gAlice->GetDebug()>0)
- printf("\n AliGenerator Default Constructor\n\n");
+ AliDebug(1, "AliGenerator Default Constructor");
AliMC * mc = gAlice->GetMCApp();
if (mc) mc->SetGenerator(this);
}
//_______________________________________________________________________
AliGenerator::AliGenerator(Int_t npart):
+ TNamed(),
+ AliRndm(),
fMCEvGen(0),
fThetaMin(0),
fThetaMax(0),
fVertexSmear(kNoSmear),
fVertexSource(kInternal),
fCutVertexZ(0),
+ fPileUpTimeWindow(-1.),
fTrackIt(0),
+ fVertexGenerator(0),
fOrigin(3),
fOsigma(3),
fVertex(3),
fStack(0),
+ fContainer(0),
fCollisionGeometry(0)
{
//
// Standard constructor
//
if (gAlice) {
- if (gAlice->GetDebug()>0)
- printf("\n AliGenerator Constructor initializing number of particles \n\n");
+ AliDebug(1, "AliGenerator Constructor initializing number of particles");
AliMC * mc = gAlice->GetMCApp();
if (mc) mc->SetGenerator(this);
}
AliConfig::Instance()->Add(this);
}
-//_______________________________________________________________________
-AliGenerator::AliGenerator(const AliGenerator &gen):
- TNamed(gen),
- AliRndm(gen),
- fMCEvGen(0),
- fThetaMin(0),
- fThetaMax(0),
- fPhiMin(0),
- fPhiMax(0),
- fPMin(0),
- fPMax(0),
- fPtMin(0),
- fPtMax(0),
- fYMin(0),
- fYMax(0),
- fVMin(3),
- fVMax(3),
- fNpart(0),
- fParentWeight(0),
- fChildWeight(0),
- fAnalog(0),
- fVertexSmear(kNoSmear),
- fVertexSource(kInternal),
- fCutVertexZ(0),
- fTrackIt(0),
- fOrigin(3),
- fOsigma(3),
- fVertex(3),
- fStack(0)
-{
- //
- // Copy constructor
- //
- gen.Copy(*this);
-}
-
-//_______________________________________________________________________
-AliGenerator & AliGenerator::operator=(const AliGenerator &gen)
-{
- //
- // Assignment operator
- //
- gen.Copy(*this);
- return (*this);
-}
-
-//_______________________________________________________________________
-void AliGenerator::Copy(TObject &/* gen */) const
-{
- //
- // Copy *this onto gen
- //
- Fatal("Copy","Not implemented!\n");
-}
-
//_______________________________________________________________________
AliGenerator::~AliGenerator()
{
//_______________________________________________________________________
void AliGenerator::VertexExternal()
{
- // Dummy !!!!!!
- // Obtain vertex from external source
//
- // Should be something like fVertex = gAlice->GetVertex()
-
- fVertex[0]=fVertex[1]=fVertex[2]=0;
+ // Obtain vertex from external source (vertex generator)
+ //
+ TVector3 vertex = fVertexGenerator->GetVertex();
+ fVertex[0] = vertex.X();
+ fVertex[1] = vertex.Y();
+ fVertex[2] = vertex.Z();
}
//_______________________________________________________________________
//
// Loads one track on the stack
//
-
+
if (fStack)
fStack->PushTrack(done, parent, pdg, pmom, vpos, polar, tof,
mech, ntr, weight, is);