34 #define INCLXX_IN_GEANT4_MODE 1
61 const G4double pMomCosAng = pMomVec.dot(collisionAxis)/pMom;
66 const G4double cosAngSlope = 2
e-6 * slope * pIn * pMom;
67 const G4double cosAng = 1. + std::log(1. -
Random::shoot()*(1.-std::exp(-2.*cosAngSlope)))/cosAngSlope;
71 const G4double rotationAngle = ang - pMomAng;
77 rotationAxis = collisionAxis.vector(pMomVec);
78 const G4double axisLength = rotationAxis.mag();
79 const G4double oneOverLength = 1./axisLength;
80 rotationAxis *= oneOverLength;
84 rotationAxis = collisionAxis.anyOrthogonal();
88 particles.rotateMomentum(rotationAngle, rotationAxis);
93 namespace PhaseSpaceGenerator {
95 return thePhaseSpaceGenerator->generate(sqrtS, particles);
102 biasMe = particles[index];
106 if(pInVec.
mag() != 0.) bias(particles, pInVec, slope);
110 thePhaseSpaceGenerator =
g;
114 return thePhaseSpaceGenerator;
118 delete thePhaseSpaceGenerator;
119 thePhaseSpaceGenerator = NULL;