33 #define INCLXX_IN_GEANT4_MODE 1
63 :theNucleus(0), maximumTime(70.0), currentTime(0.0), firstAvatar(true),
64 theLocalEnergyType(localEnergyType),
65 theLocalEnergyDeltaType(localEnergyDeltaType)
81 return shootComposite(projectileSpecies, kineticEnergy, impactParameter, phi);
93 G4double momentumZ = std::sqrt(energy*energy - projectileMass*projectileMass);
99 temfin = 29.8 * std::pow(theNucleus->
getA(), 0.16);
102 temfin = 30.18 * std::pow(theNucleus->
getA(), 0.17*(1.0 - 5.7E-5*tlab));
105 maximumTime = temfin;
111 const G4double traversalTime = distance / projectileVelocity;
112 if(maximumTime < traversalTime)
113 maximumTime = traversalTime;
114 DEBUG(
"Cascade stopping time is " << maximumTime << std::endl);
120 DEBUG(
"impactParameter>CoulombDistortion::maxImpactParameter" << std::endl);
126 impactParameter * std::sin(phi),
168 maximumTime = 29.8 * std::pow(theNucleus->
getA(), 0.16);
173 const G4double distance = 2.*rMax + 2.725*rms;
175 const G4double traversalTime = distance / projectileVelocity;
176 if(maximumTime < traversalTime)
177 maximumTime = traversalTime;
178 DEBUG(
"Cascade stopping time is " << maximumTime << std::endl);
185 DEBUG(
"impactParameter>CoulombDistortion::maxImpactParameter" << std::endl);
192 impactParameter * std::sin(phi),
220 if(theAvatarList.empty()) {
221 DEBUG(
"No ParticleEntryAvatar found, transparent event" << std::endl);
255 theNucleus = nucleus;
260 if(anAvatar) theNucleus->
getStore()->
add(anAvatar);
272 G4double minDistOfApproachSquared = 0.0;
274 if(t>maximumTime || t<currentTime)
return NULL;
287 const G4bool p1HasLocalEnergy = (hasLocalEnergy && !p1->
isPion());
288 const G4bool p2HasLocalEnergy = (hasLocalEnergy && !p2->
isPion());
291 if(p1HasLocalEnergy) {
294 *p1 = backupParticle1;
300 if(p2HasLocalEnergy) {
303 *p2 = backupParticle2;
304 if(p1HasLocalEnergy) {
305 *p1 = backupParticle1;
317 if(p1HasLocalEnergy) {
318 *p1 = backupParticle1;
320 if(p2HasLocalEnergy) {
321 *p2 = backupParticle2;
330 if(
Math::tenPi*minDistOfApproachSquared > totalCrossSection)
return NULL;
346 if(theIntersection.
exists) {
347 time = currentTime + theIntersection.
time;
349 ERROR(
"Imaginary reflection time for particle: " << std::endl
350 << aParticle->
print());
367 (*minDistOfApproach) = 100000.0;
368 return currentTime + 100000.0;
372 (*minDistOfApproach) = distance.
mag2() + time * t7;
373 return currentTime + time;
379 for(
ParticleIter updated = updatedParticles.begin(); updated != updatedParticles.end(); ++updated)
382 for(
ParticleIter particle = particles.begin(); particle != particles.end(); ++particle)
388 if((*particle)->isInList(updatedParticles))
continue;
398 haveExcept=(except.size()!=0);
401 for(
ParticleIter p1 = particles.begin(); p1 != particles.end(); ++p1)
405 for(++p2; p2 != particles.end(); ++p2)
408 if(haveExcept && (*p1)->isInList(except) && (*p2)->isInList(except))
continue;
418 for(
ParticleIter iter = particles.begin(); iter != particles.end(); ++iter) {
428 if(particles.empty()) {
ERROR(
"No particles inside the nucleus!" << std::endl); }
429 for(
ParticleIter i = particles.begin(); i != particles.end(); ++i) {
441 for(
ParticleIter i = particles.begin(); i != particles.end(); ++i) {
442 if((*i)->isDelta()) {
444 G4double time = currentTime + decayTime;
445 if(time <= maximumTime) {
456 #ifdef INCL_REGENERATE_AVATARS
457 #warning "The INCL_REGENERATE_AVATARS code has not been tested in a while. Use it at your peril."
471 updatedParticles.push_back(blockedDelta);
476 needNewAvatars.splice(needNewAvatars.end(), created);
481 if(theAvatar == 0)
return 0;
484 if(theAvatar->
getTime() < currentTime) {
485 ERROR(
"Avatar time = " << theAvatar->
getTime() <<
", currentTime = " << currentTime << std::endl);
487 }
else if(theAvatar->
getTime() > currentTime) {
490 currentTime = theAvatar->
getTime();
497 void StandardPropagationModel::putSpectatorsOnShell(
IAvatarList const &entryAvatars,
ParticleList const &spectators) {
501 const G4double oldEnergy = (*p)->getEnergy();
502 (*p)->setTableMass();
503 (*p)->adjustEnergyFromMomentum();
504 deltaE += (*p)->getEnergy() - oldEnergy;
507 deltaE /= entryAvatars.size();
509 for(
IAvatarIter a=entryAvatars.begin();
a!=entryAvatars.end(); ++
a) {
516 p->setEnergy(energy);
517 const G4double newMass = std::sqrt(energy*energy - p->getMomentum().mag2());