33 #define INCLXX_IN_GEANT4_MODE 1
37 #ifndef G4INCLClusteringModelIntercomparison_hh
38 #define G4INCLClusteringModelIntercomparison_hh 1
40 #ifdef INCLXX_IN_GEANT4_MODE
41 #define INCL_CACHING_CLUSTERING_MODEL_INTERCOMPARISON_Set 1
42 #endif // INCLXX_IN_GEANT4_MODE
65 cascadingEnergyPool(0.),
68 runningMaxClusterAlgorithmMass(theConfig->getClusterMaxMass()),
71 consideredPartners(NULL),
72 isInRunningConfiguration(NULL),
78 for(
G4int A=0; A<=runningMaxClusterAlgorithmMass; ++A) {
84 std::fill(candidateConfiguration,
86 static_cast<Particle*>(NULL));
88 std::fill(runningEnergies,
92 std::fill(runningPotentials,
96 std::fill(runningConfiguration,
103 delete [] consideredPartners;
104 delete [] isInRunningConfiguration;
111 void findClusterStartingFrom(
const G4int oldA,
const G4int oldZ);
120 #if defined(INCL_CACHING_CLUSTERING_MODEL_INTERCOMPARISON_HashMask)
122 #elif defined(INCL_CACHING_CLUSTERING_MODEL_INTERCOMPARISON_Set)
125 #error Unrecognized INCL_CACHING_CLUSTERING_MODEL_INTERCOMPARISON. Allowed values are: Set, HashMask.
128 G4int selectedA, selectedZ;
131 G4int clusterZMaxAll, clusterNMaxAll;
135 static const G4double limitCosEscapeAngle;
140 G4int runningMaxClusterAlgorithmMass;
142 G4int nConsideredMax;
164 G4bool *isInRunningConfiguration;
173 #if defined(INCL_CACHING_CLUSTERING_MODEL_INTERCOMPARISON_HashMask)
174 typedef std::set<Hashing::HashType> HashContainer;
175 typedef HashContainer::iterator HashIterator;
179 #elif defined(INCL_CACHING_CLUSTERING_MODEL_INTERCOMPARISON_Set)
187 class SortedNucleonConfiguration {
190 typedef G4int NucleonItem;
193 SortedNucleonConfiguration() : theSize(0), nucleons(NULL) {}
196 SortedNucleonConfiguration(
const SortedNucleonConfiguration &rhs) :
197 theSize(rhs.theSize),
198 nucleons(new NucleonItem[theSize])
200 std::copy(rhs.nucleons, rhs.nucleons+theSize, nucleons);
204 ~SortedNucleonConfiguration() {
209 void swap(SortedNucleonConfiguration &rhs) {
215 SortedNucleonConfiguration &operator=(
const SortedNucleonConfiguration &rhs) {
216 SortedNucleonConfiguration tempConfig(rhs);
228 return std::lexicographical_compare(nucleons, nucleons+theSize, rhs.nucleons, rhs.nucleons+theSize);
232 void fill(NucleonItem *
config,
size_t n) {
234 nucleons =
new NucleonItem[theSize];
235 std::copy(config, config+theSize, nucleons);
244 NucleonItem *nucleons;
247 typedef std::set<SortedNucleonConfiguration> SortedNucleonConfigurationContainer;
248 typedef SortedNucleonConfigurationContainer::iterator SortedNucleonConfigurationIterator;
253 #error Unrecognized INCL_CACHING_CLUSTERING_MODEL_INTERCOMPARISON. Allowed values are: Set, HashMask.
260 G4int maxMassConfigurationSkipping;