64 typedef std::vector<G4InuclElementaryParticle>
hadronList;
79 : verboseLevel(verbose), thisFinalState(0), thisHadrons(0) {}
88 G4cout <<
" >>> G4CascadeCoalescence::FindClusters()" <<
G4endl;
107 G4cout <<
" >>> G4CascadeCoalescence::selectCandidates()" <<
G4endl;
114 for (
size_t idx1=0; idx1<nHad; idx1++) {
116 for (
size_t idx2=idx1+1; idx2<nHad; idx2++) {
118 for (
size_t idx3=idx2+1; idx3<nHad; idx3++) {
120 for (
size_t idx4=idx3+1; idx4<nHad; idx4++) {
141 size_t idx3,
size_t idx4) {
146 G4cout <<
" >>> G4CascadeCoalescence::tryClusters " << idx1 <<
" " << idx2
147 <<
" " << idx3 <<
" " << idx4 <<
G4endl;
175 G4cout <<
" >>> G4CascadeCoalescence::tryClusters " << idx1 <<
" " << idx2
204 G4cout <<
" >>> G4CascadeCoalescence::tryClusters " << idx1 <<
" " << idx2
222 G4cout <<
" >>> G4CascadeCoalescence::createNuclei()" <<
G4endl;
242 G4cout <<
" >>> G4CascadeCoalescence::removeNucleons()" <<
G4endl;
245 std::set<size_t>::reverse_iterator usedIter;
258 for (
size_t i=0; i<aCluster.size(); i++)
273 for (
size_t i=0; i<aCluster.size(); i++) {
277 if ((dp = nucl.
getMomentum().boost(-boost).rho()) > maxDP) maxDP = dp;
291 for (
size_t i=0; i<aCluster.size(); i++) {
304 for (
size_t i=0; i<aCluster.size(); i++) {
305 hash = hash*1000 + aCluster[i];
342 for (
size_t i=0; i<clus.size(); i++)
355 if (clus.size() == 2)
358 if (clus.size() == 3)
362 if (clus.size() == 4)
377 if (aCluster.size()<2)
return false;
379 G4int A = aCluster.size();
383 if (A==2 && type==3) Z = 1;
384 if (A==3 && type==5) Z = 1;
385 if (A==3 && type==4) Z = 2;
386 if (A==4 && type==6) Z = 2;
388 if (Z < 0)
return false;
403 G4cout <<
" >>> G4CascadeCoalescence::" << name <<
" ";
404 std::copy(aCluster.begin(), aCluster.end(),
405 std::ostream_iterator<size_t>(
G4cout,
" "));
409 for (
size_t i=0; i<aCluster.size(); i++)
void fill(G4int a, G4int z, G4double exc=0., Model model=DefaultModel)
static const G4double dpMaxTriplet
CLHEP::Hep3Vector G4ThreeVector
static G4double dpMaxAlpha()
bool allNucleons(const ClusterCandidate &clus) const
G4LorentzVector getMomentum() const
size_t clusterHash(const ClusterCandidate &clus) const
std::vector< size_t > ClusterCandidate
void printCollisionOutput(std::ostream &os=G4cout) const
std::set< size_t > triedClusters
std::vector< G4InuclElementaryParticle > hadronList
G4double maxDeltaP(const ClusterCandidate &aCluster) const
bool makeLightIon(const ClusterCandidate &aCluster)
std::set< size_t > usedNucleons
void reportArgs(const G4String &name, const ClusterCandidate &clus) const
bool goodCluster(const ClusterCandidate &clus) const
std::vector< ClusterCandidate > allClusters
void copy(std::vector< T > &main, const std::vector< T > &data)
const std::vector< G4InuclElementaryParticle > * thisHadrons
G4CollisionOutput * thisFinalState
const G4InuclElementaryParticle & getHadron(size_t idx) const
G4GLOB_DLL std::ostream G4cout
G4bool nucleon(G4int ityp)
bool nucleonUsed(size_t idx) const
G4int clusterType(const ClusterCandidate &aCluster) const
G4InuclNuclei thisLightIon
void reportResult(const G4String &name, const G4InuclNuclei &nucl) const
bool clusterTried(const ClusterCandidate &clus) const
void removeOutgoingParticle(G4int index)
static const G4double dpMaxAlpha
G4CascadeCoalescence(G4int verbose=0)
static const G4double A[nN]
hadronList::const_iterator hadronIter
static G4double dpMaxTriplet()
void tryClusters(size_t idx1, size_t idx2)
static G4double dpMaxDoublet()
const std::vector< G4InuclElementaryParticle > & getOutgoingParticles() const
ClusterCandidate thisCluster
void addOutgoingNucleus(const G4InuclNuclei &nuclei)
void FindClusters(G4CollisionOutput &finalState)
static const G4double dpMaxDoublet
static unsigned long FASTCALL hash(KEY s)
virtual ~G4CascadeCoalescence()
G4LorentzVector getClusterMomentum(const ClusterCandidate &aCluster) const
CLHEP::HepLorentzVector G4LorentzVector
void fillCluster(size_t idx1, size_t idx2)