35#ifndef G4CASCADE_COALESCENCE_HH
36#define G4CASCADE_COALESCENCE_HH
59 typedef std::vector<size_t> ClusterCandidate;
67 std::vector<ClusterCandidate> allClusters;
68 std::set<size_t> triedClusters;
69 std::set<size_t> usedNucleons;
72 const std::vector<G4InuclElementaryParticle>* thisHadrons;
74 ClusterCandidate thisCluster;
78 void selectCandidates();
80 void removeNucleons();
83 void tryClusters(
size_t idx1,
size_t idx2);
84 void tryClusters(
size_t idx1,
size_t idx2,
size_t idx3);
85 void tryClusters(
size_t idx1,
size_t idx2,
size_t idx3,
size_t idx4);
88 void fillCluster(
size_t idx1,
size_t idx2);
89 void fillCluster(
size_t idx1,
size_t idx2,
size_t idx3);
90 void fillCluster(
size_t idx1,
size_t idx2,
size_t idx3,
size_t idx4);
93 size_t clusterHash(
const ClusterCandidate& clus)
const;
96 bool clusterTried(
const ClusterCandidate& clus)
const {
97 return triedClusters.find(clusterHash(clus)) != triedClusters.end();
101 bool nucleonUsed(
size_t idx)
const {
102 return usedNucleons.find(idx) != usedNucleons.end();
106 bool allNucleons(
const ClusterCandidate& clus)
const;
107 bool goodCluster(
const ClusterCandidate& clus)
const;
108 G4int clusterType(
const ClusterCandidate& aCluster)
const;
112 return (*thisHadrons)[idx];
116 bool makeLightIon(
const ClusterCandidate& aCluster);
119 G4LorentzVector getClusterMomentum(
const ClusterCandidate& aCluster)
const;
121 G4double maxDeltaP(
const ClusterCandidate& aCluster)
const;
124 void reportArgs(
const G4String& name,
const ClusterCandidate& clus)
const;
void FindClusters(G4CollisionOutput &finalState)
void setVerboseLevel(G4int verbose)
virtual ~G4CascadeCoalescence()