+//_______________________________________________________________________
+void AliGenerator::VertexInternal()
+{
+ //
+ // Obtain calculated vertex
+ // Default is gaussian smearing
+ Float_t random[6];
+ Float_t dv[3];
+ Int_t j;
+ dv[2] = 1.e10;
+ if (!TestBit(kVertexRange)) {
+ while(TMath::Abs(dv[2]) > fCutVertexZ*fOsigma[2]) {
+ Rndm(random,6);
+ for (j=0; j < 3; j++) {
+ dv[j] = fOsigma[j]*TMath::Cos(2*random[2*j]*TMath::Pi())*
+ TMath::Sqrt(-2*TMath::Log(random[2*j+1]));
+ }
+ }
+ for (j=0; j < 3; j++) fVertex[j] = fOrigin[j] + dv[j];
+ } else {
+ Rndm(random,3);
+ for (j=0; j < 3; j++)
+ fVertex[j] = fVMin[j] + random[j] * (fVMax[j] - fVMin[j]);
+ }
+}
+
+//_______________________________________________________________________
+void AliGenerator::PushTrack(Int_t done, Int_t parent, Int_t pdg,
+ Float_t *pmom, Float_t *vpos, Float_t *polar,
+ Float_t tof, TMCProcess mech, Int_t &ntr,
+ Float_t weight, Int_t is)
+{
+ //
+ // Loads one track on the stack
+ //
+
+ if (fStack)
+ fStack->PushTrack(done, parent, pdg, pmom, vpos, polar, tof,
+ mech, ntr, weight, is);
+ else
+ gAlice->GetMCApp()->PushTrack(done, parent, pdg, pmom, vpos, polar, tof,
+ mech, ntr, weight, is);
+}
+
+//_______________________________________________________________________
+void AliGenerator::PushTrack(Int_t done, Int_t parent, Int_t pdg,
+ Double_t px, Double_t py, Double_t pz, Double_t e,
+ Double_t vx, Double_t vy, Double_t vz, Double_t tof,
+ Double_t polx, Double_t poly, Double_t polz,
+ TMCProcess mech, Int_t &ntr, Float_t weight, Int_t is)
+{
+ //
+ // Loads one track on the stack
+ //
+
+ if (fStack)
+ fStack->PushTrack(done, parent, pdg, px, py, pz, e, vx, vy, vz, tof,
+ polx, poly, polz, mech, ntr, weight, is);
+ else
+ gAlice->GetMCApp()->PushTrack(done, parent, pdg, px, py, pz, e, vx, vy, vz, tof,
+ polx, poly, polz, mech, ntr, weight, is);
+}
+
+
+//_______________________________________________________________________
+void AliGenerator:: KeepTrack(Int_t itrack)
+{
+ //
+ // Declare a track permanent on the stack
+ //
+ if (fStack)
+ fStack->KeepTrack(itrack);
+ else
+ gAlice->GetMCApp()->KeepTrack(itrack);
+
+}
+
+//_______________________________________________________________________
+void AliGenerator:: SetHighWaterMark(Int_t nt)
+{
+ //
+ // Internal function to set the maximum index used in the stack
+ //
+ if (fStack)
+ fStack->SetHighWaterMark(nt);
+ else
+ gAlice->GetMCApp()->SetHighWaterMark(nt);
+
+}
+void AliGenerator::FinishRun()
+{
+ ;
+}