34 #define INCLXX_IN_GEANT4_MODE 1
38 #ifndef G4INCLCluster_hh
39 #define G4INCLCluster_hh 1
71 if(createParticleSampler)
78 template<
class Iterator>
86 for(Iterator i = begin; i != end; ++i) {
117 swap(temporaryCluster);
205 theA += (*p)->getA();
206 theZ += (*p)->getZ();
207 theS += (*p)->getS();
222 std::stringstream ss;
223 ss <<
"Cluster (ID = " <<
ID <<
") type = ";
226 <<
" A = " <<
theA <<
'\n'
227 <<
" Z = " <<
theZ <<
'\n'
228 <<
" S = " <<
theS <<
'\n'
229 <<
" mass = " <<
getMass() <<
'\n'
237 <<
"Contains the following particles:"
260 theCMPosition += (*p)->getPosition();
261 theTotalMomentum += (*p)->getMomentum();
262 theTotalEnergy += (*p)->getEnergy();
264 theCMPosition /=
theA;
282 (*p)->setMomentum(((*p)->getMomentum()-theTotalMomentum/
theA)*rescaling);
285 (*p)->setPosition(((*p)->getPosition()-theCMPosition)*rescaling);
309 INCL_DEBUG(
"The dynamical potential is " << theDynamicalPotential <<
" MeV" <<
'\n');
312 const G4double energy = (*p)->getEnergy() - theDynamicalPotential;
316 (*p)->setEnergy(energy);
317 (*p)->setMass(std::sqrt(energy*energy - momentum.
mag2()));
319 INCL_DEBUG(
"Cluster components are now off shell:" <<
'\n'
332 (*p)->setPosition((*p)->getPosition()+shift);
347 (*p)->boost(aBoostVector);
353 INCL_DEBUG(
"Cluster was boosted with (bx,by,bz)=("
354 << aBoostVector.
getX() <<
", " << aBoostVector.
getY() <<
", " << aBoostVector.
getZ() <<
"):"
370 const G4double pMass = (*p)->getMass();
371 const ThreeVector frozenMomentum = normMomentum * pMass;
372 const G4double frozenEnergy = std::sqrt(frozenMomentum.
mag2()+pMass*pMass);
373 (*p)->setFrozenMomentum(frozenMomentum);
374 (*p)->setFrozenEnergy(frozenEnergy);
375 (*p)->freezePropagation();
401 (*p)->makeProjectileSpectator();
409 (*p)->makeTargetSpectator();
417 (*p)->makeParticipant();
440 G4double theDynamicalPotential = 0.0;
442 theDynamicalPotential += (*p)->getEnergy();
445 theDynamicalPotential /=
theA;
447 return theDynamicalPotential;