34 #define INCLXX_IN_GEANT4_MODE 1
38 #ifndef G4INCLClusteringModelIntercomparison_hh
39 #define G4INCLClusteringModelIntercomparison_hh 1
41 #ifdef INCLXX_IN_GEANT4_MODE
42 #define INCL_CACHING_CLUSTERING_MODEL_INTERCOMPARISON_Set 1
43 #endif // INCLXX_IN_GEANT4_MODE
100 cascadingEnergyPool(0.),
103 runningMaxClusterAlgorithmMass(theConfig->getClusterMaxMass()),
106 consideredPartners(NULL),
107 isInRunningConfiguration(NULL),
113 for(
G4int A=0;
A<=runningMaxClusterAlgorithmMass; ++
A) {
114 if(clusterZMax[
A]>clusterZMaxAll)
115 clusterZMaxAll = clusterZMax[
A];
116 if(
A-clusterZMin[
A]>clusterNMaxAll)
117 clusterNMaxAll =
A-clusterZMin[
A];
119 std::fill(candidateConfiguration,
121 static_cast<Particle*>(NULL));
123 std::fill(runningEnergies,
127 std::fill(runningPotentials,
131 std::fill(runningConfiguration,
138 delete [] consideredPartners;
139 delete [] isInRunningConfiguration;
146 void findClusterStartingFrom(
const G4int oldA,
const G4int oldZ);
155 #if defined(INCL_CACHING_CLUSTERING_MODEL_INTERCOMPARISON_HashMask)
157 #elif defined(INCL_CACHING_CLUSTERING_MODEL_INTERCOMPARISON_Set) || defined(INCL_CACHING_CLUSTERING_MODEL_INTERCOMPARISON_None)
160 #error Unrecognized INCL_CACHING_CLUSTERING_MODEL_INTERCOMPARISON. Allowed values are: Set, HashMask, None.
163 G4int selectedA, selectedZ;
166 G4int clusterZMaxAll, clusterNMaxAll;
184 static const G4double limitCosEscapeAngle;
189 G4int runningMaxClusterAlgorithmMass;
191 G4int nConsideredMax;
214 G4bool *isInRunningConfiguration;
223 #if defined(INCL_CACHING_CLUSTERING_MODEL_INTERCOMPARISON_HashMask)
224 typedef std::set<Hashing::HashType> HashContainer;
225 typedef HashContainer::iterator HashIterator;
229 #elif defined(INCL_CACHING_CLUSTERING_MODEL_INTERCOMPARISON_Set)
237 class SortedNucleonConfiguration {
240 typedef G4int NucleonItem;
243 SortedNucleonConfiguration() : theSize(0), nucleons(NULL) {}
246 SortedNucleonConfiguration(
const SortedNucleonConfiguration &rhs) :
247 theSize(rhs.theSize),
248 nucleons(new NucleonItem[theSize])
250 std::copy(rhs.nucleons, rhs.nucleons+theSize, nucleons);
254 ~SortedNucleonConfiguration() {
259 void swap(SortedNucleonConfiguration &rhs) {
260 std::swap(theSize, rhs.theSize);
261 std::swap(nucleons, rhs.nucleons);
265 SortedNucleonConfiguration &operator=(
const SortedNucleonConfiguration &rhs) {
266 SortedNucleonConfiguration tempConfig(rhs);
278 return std::lexicographical_compare(nucleons, nucleons+theSize, rhs.nucleons, rhs.nucleons+theSize);
282 void fill(NucleonItem *
config,
size_t n) {
284 nucleons =
new NucleonItem[theSize];
285 std::copy(config, config+theSize, nucleons);
286 std::sort(nucleons, nucleons+theSize);
294 NucleonItem *nucleons;
297 typedef std::set<SortedNucleonConfiguration> SortedNucleonConfigurationContainer;
298 typedef SortedNucleonConfigurationContainer::iterator SortedNucleonConfigurationIterator;
302 #elif !defined(INCL_CACHING_CLUSTERING_MODEL_INTERCOMPARISON_None)
303 #error Unrecognized INCL_CACHING_CLUSTERING_MODEL_INTERCOMPARISON. Allowed values are: Set, HashMask, None.
310 G4int maxMassConfigurationSkipping;
virtual G4bool clusterCanEscape(Nucleus const *const, Cluster const *const)
ClusteringModelIntercomparison(Config const *const theConfig)
ConsideredPartner(Particle *const p)
G4double getRealMass(const G4INCL::ParticleType t)
Get particle mass (in MeV/c^2)
double A(double temperature)
const G4int maxClusterMass
virtual ~ClusteringModelIntercomparison()
Container for the relevant information.
virtual Cluster * getCluster(Nucleus *, Particle *)
bool operator<(const CexmcAngularRange &left, const CexmcAngularRange &right)
Functions for hashing a collection of NucleonItems.
Cluster coalescence algorithm used in the IAEA intercomparison.