* provided "as is" without express or implied warranty. *
**************************************************************************/
-/*
-$Log$
-Revision 1.4 2002/10/14 14:55:35 hristov
-Merging the VirtualMC branch to the main development branch (HEAD)
-
-Revision 1.2.2.3 2002/10/11 10:40:46 hristov
-Default case added
-
-Revision 1.2.2.2 2002/07/26 18:34:02 alibrary
-Updating VirtualMC
-
-Revision 1.3 2002/07/26 15:32:24 hristov
-stream.h doesn't exest on Sun, removed from includes
-
-Revision 1.2 2002/07/19 11:43:10 morsch
-- Write full stack.
-- Use SetTrack passing energy.
-
-Revision 1.1 2002/07/16 11:33:26 morsch
-First commit.
-
-*/
-
+/* $Id$ */
// Generator using Herwig as an external generator
#include "THerwig6.h"
#include "Riostream.h"
+#include "AliMC.h"
+
+ClassImp(AliGenHerwig)
- ClassImp(AliGenHerwig)
+static TRandom * sRandom;
AliGenHerwig::AliGenHerwig()
{
}
AliGenHerwig::AliGenHerwig(const AliGenHerwig & Herwig)
+ :AliGenMC(Herwig)
{
-// copy constructor
+// Copy constructor
+ Herwig.Copy(*this);
}
fTarget.Resize(8);
fProjectile.Resize(8);
SetMC(new THerwig6());
- fHerwig=(THerwig6*) fgMCEvGen;
+ fHerwig=(THerwig6*) fMCEvGen;
// initialize common blocks
fHerwig->Initialize(fProjectile, fTarget, fMomentum1, fMomentum2, fProcess);
// reset parameters according to user needs
Float_t tof = kconv*iparticle->T();
Int_t iparent = (imo > -1) ? newPos[imo] : -1;
Int_t trackIt = (ks == 1) && fTrackIt;
- gAlice->SetTrack(trackIt, iparent, kf,
+ gAlice->GetMCApp()->PushTrack(trackIt, iparent, kf,
p[0], p[1], p[2], p[3],
origin[0], origin[1], origin[2],
tof,
{
// Adjust the weights after generation of all events
TParticle *part;
- Int_t ntrack=gAlice->GetNtrack();
+ Int_t ntrack=gAlice->GetMCApp()->GetNtrack();
for (Int_t i=0; i<ntrack; i++) {
- part= gAlice->Particle(i);
+ part= gAlice->GetMCApp()->Particle(i);
part->SetWeight(part->GetWeight()*fKineBias);
}
}
AliGenHerwig& AliGenHerwig::operator=(const AliGenHerwig& rhs)
{
// Assignment operator
- return *this;
+ rhs.Copy(*this);
+ return (*this);
}