33 #define INCLXX_IN_GEANT4_MODE 1
49 sampleOneParticle(&
ParticleSampler::sampleOneParticleWithoutRPCorrelation),
52 theRCDFTable(rCDFTable),
53 thePCDFTable(pCDFTable),
63 updateSampleOneParticleMethod();
68 updateSampleOneParticleMethod();
71 void ParticleSampler::updateSampleOneParticleMethod() {
72 if(theDensity && thePotential)
73 sampleOneParticle = &ParticleSampler::sampleOneParticleWithRPCorrelation;
75 sampleOneParticle = &ParticleSampler::sampleOneParticleWithoutRPCorrelation;
82 for(
G4int i = 1; i <= theA; ++i) {
85 Particle *
p = (this->*(this->sampleOneParticle))(type);
97 theList.push_back(aProton);
98 theList.push_back(aNeutron);
108 const G4double momentumRatio = momentumVector.
mag()/theFermiMomentum;
110 return new Particle(t, momentumVector, positionVector);
113 Particle *ParticleSampler::sampleOneParticleWithoutRPCorrelation(
const ParticleType t)
const {
118 return new Particle(t, momentumVector, positionVector);