33 #define INCLXX_IN_GEANT4_MODE 1
37 #ifndef G4INCLCluster_hh
38 #define G4INCLCluster_hh 1
68 if(createParticleSampler)
75 template<
class Iterator>
83 for(Iterator i = begin; i != end; ++i) {
110 swap(temporaryCluster);
190 std::stringstream ss;
191 ss <<
"Cluster (ID = " <<
ID <<
") type = ";
194 <<
" A = " <<
theA << std::endl
195 <<
" Z = " <<
theZ << std::endl
196 <<
" mass = " <<
getMass() << std::endl
197 <<
" energy = " <<
theEnergy << std::endl
204 <<
"Contains the following particles:"
227 theCMPosition += (*p)->getPosition();
228 theTotalMomentum += (*p)->getMomentum();
229 theTotalEnergy += (*p)->getEnergy();
231 theCMPosition /=
theA;
249 (*p)->setMomentum(((*p)->getMomentum()-theTotalMomentum/
theA)*rescaling);
252 (*p)->setPosition(((*p)->getPosition()-theCMPosition)*rescaling);
264 DEBUG(
"Cluster boosted to internal CM:" << std::endl <<
print());
275 const G4double theDynamicalPotential = computeDynamicalPotential();
276 DEBUG(
"The dynamical potential is " << theDynamicalPotential <<
" MeV" << std::endl);
279 const G4double energy = (*p)->getEnergy() - theDynamicalPotential;
283 (*p)->setEnergy(energy);
284 (*p)->setMass(std::sqrt(energy*energy - momentum.
mag2()));
285 DEBUG(
"Cluster components are now off shell:" << std::endl
299 (*p)->setPosition((*p)->getPosition()+shift);
314 (*p)->boost(aBoostVector);
319 DEBUG(
"Cluster was boosted with (bx,by,bz)=("
320 << aBoostVector.
getX() <<
", " << aBoostVector.
getY() <<
", " << aBoostVector.
getZ() <<
"):"
321 << std::endl <<
print());
336 const G4double pMass = (*p)->getMass();
337 const ThreeVector frozenMomentum = normMomentum * pMass;
338 const G4double frozenEnergy = std::sqrt(frozenMomentum.
mag2()+pMass*pMass);
339 (*p)->setFrozenMomentum(frozenMomentum);
340 (*p)->setFrozenEnergy(frozenEnergy);
341 (*p)->freezePropagation();
355 (*p)->rotate(angle, axis);
363 (*p)->makeProjectileSpectator();
371 (*p)->makeTargetSpectator();
379 (*p)->makeParticipant();
401 G4double computeDynamicalPotential() {
402 G4double theDynamicalPotential = 0.0;
404 theDynamicalPotential += (*p)->getEnergy();
407 theDynamicalPotential /=
theA;
409 return theDynamicalPotential;