return ok;
}
+void AliGenPythia::SetSeed(UInt_t seed)
+{
+ GetRandom()->SetSeed(seed);
+}
// Select process type
virtual void SetProcess(Process_t proc = kPyCharm) {fProcess = proc;}
virtual void SetTune(Int_t itune) {fItune = itune;}
+ virtual void SetSeed(UInt_t seed);
// Select structure function
virtual void SetStrucFunc(StrucFunc_t func = kCTEQ5L) {fStrucFunc = func;}
// }
}
+void AliGenPythiaPlus::SetSeed(UInt_t seed)
+{
+ fPythia->SetSeed(seed);
+}
+
void AliGenPythiaPlus::Generate()
{
// Generate one event
#endif
-
virtual ~AliGenPythiaPlus();
virtual void Generate();
virtual void Init();
+ virtual void SetSeed(UInt_t seed);
+
// Range of events to be printed
virtual void SetEventListRange(Int_t eventFirst=-1, Int_t eventLast=-1);
// Select process type
/* $Id$ */
#include "AliPythiaBase.h"
+#include <cstdlib>
ClassImp(AliPythiaBase)
// Default constructor
}
+void AliPythiaBase::SetSeed(UInt_t)
+{
+ Printf("FATAL -> SetSeed not implemented");
+ ::abort();
+}
virtual Int_t CheckedLuComp(Int_t /*kf*/) {return -1;}
// Pythia initialisation for selected processes
virtual void ProcInit (Process_t /*process*/, Float_t /*energy*/, StrucFunc_t /*strucfunc*/, Int_t /* tune */) {;}
+ virtual void SetSeed(UInt_t seed);
virtual void GenerateEvent() {;}
virtual void GenerateMIEvent() {;}
virtual Int_t GetNumberOfParticles() {return -1;};
Initialize(2212, 2212, fEcms);
}
+void AliPythia8::SetSeed(UInt_t seed)
+{
+ //
+ // set seed in PYTHIA8
+ // NB. 900000000 is the maximum seed (0 is not allowed)
+ //
+ ReadString("Random:setSeed = on");
+ ReadString(Form("Random:seed = %d", (seed % 900000000) + 1));
+}
+
void AliPythia8::SetNuclei(Int_t /*a1*/, Int_t /*a2*/)
{
// Treat protons as inside nuclei with mass numbers a1 and a2
virtual Int_t CheckedLuComp(Int_t /*kf*/) {return -1;}
// Pythia initialisation for selected processes
virtual void ProcInit (Process_t process, Float_t energy, StrucFunc_t strucfunc, Int_t tune);
+ virtual void SetSeed(UInt_t seed);
virtual void GenerateEvent();
virtual void GenerateMIEvent();
virtual void HadronizeEvent();
{
;
}
+
+//_______________________________________________________________________
+void AliGenerator::SetSeed(UInt_t seed)
+{
+ //
+ // function to set the seed in the random number generator used by this generator
+ //
+
+ AliFatal("Not implemented!");
+}
virtual void SetTarget(TString tar="", Int_t a = 0, Int_t z = 0)
{fTarget = tar; fATarget = a; fZTarget = z;}
+ virtual void SetSeed(UInt_t seed);
+
protected:
virtual void PushTrack(Int_t done, Int_t parent, Int_t pdg,
Float_t *pmom, Float_t *vpos, Float_t *polar,
Printf("AliMCGenHandler::Init: Using seed: %d", fSeed);
gRandom->SetSeed(fSeed);
+ fGenerator->SetSeed(fSeed);
}
AliRunLoader* rl = AliRunLoader::Open("galice.root","FASTRUN","recreate");
fAmpt->SetReactionPlaneAngle(0.0);
}
+void AliGenAmpt::SetSeed(UInt_t seed)
+{
+ AliAmptRndm::GetAmptRandom()->SetSeed(seed);
+}
+
void AliGenAmpt::Generate()
{
// Generate one event
virtual TAmpt *Ampt() { return fAmpt; }
virtual void Generate();
virtual void Init();
+ virtual void SetSeed(UInt_t seed);
virtual void SetEnergyCMS(Float_t energy=5500) {fEnergyCMS=energy;}
virtual void SetReferenceFrame(TString frame="CMS")
{fFrame=frame;}
//
}
+void AliGenHijing::SetSeed(UInt_t seed)
+{
+ AliHijingRndm::GetHijingRandom()->SetSeed(seed);
+}
+
void AliGenHijing::Generate()
{
// Generate one event
virtual ~AliGenHijing();
virtual void Generate();
virtual void Init();
+ virtual void SetSeed(UInt_t seed);
// set centre of mass energy
virtual void SetEnergyCMS(Float_t energy=5500) {fEnergyCMS=energy;}
virtual void SetReferenceFrame(TString frame="CMS")
void SetMuQ(Double_t value) {fHydjetParams.fMuI3 = value;} // Isospin chemical potential [GeV]
void SetThFrzTemperature(Double_t value) {fHydjetParams.fThFO = value;} // Temperature for the thermal freezeout [GeV]
void SetMuPionThermal(Double_t value) {fHydjetParams.fMu_th_pip = value;} // Chemical potential for pi+ at thermal freezeout [GeV]
- void SetSeed(Int_t value) {fHydjetParams.fSeed = value;} //parameter to set the random nuber seed (=0 the current time is used
+ virtual void SetSeed(UInt_t value) {fHydjetParams.fSeed = value;} //parameter to set the random nuber seed (=0 the current time is used
//to set the random generator seed, !=0 the value fSeed is
//used to set the random generator seed and then the state of random
//number generator in PYTHIA MRPY(1)=fSeed