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
99 cascadingEnergyPool(0.),
102 runningMaxClusterAlgorithmMass(theConfig->getClusterMaxMass()),
105 consideredPartners(NULL),
106 isInRunningConfiguration(NULL),
112 for(
G4int A=0; A<=runningMaxClusterAlgorithmMass; ++A) {
113 if(clusterZMax[A]>clusterZMaxAll)
114 clusterZMaxAll = clusterZMax[A];
115 if(A-clusterZMin[A]>clusterNMaxAll)
116 clusterNMaxAll = A-clusterZMin[A];
118 std::fill(candidateConfiguration,
120 static_cast<Particle*>(NULL));
122 std::fill(runningEnergies,
126 std::fill(runningPotentials,
130 std::fill(runningConfiguration,
137 delete [] consideredPartners;
138 delete [] isInRunningConfiguration;
145 void findClusterStartingFrom(
const G4int oldA,
const G4int oldZ);
154 #if defined(INCL_CACHING_CLUSTERING_MODEL_INTERCOMPARISON_HashMask)
156 #elif defined(INCL_CACHING_CLUSTERING_MODEL_INTERCOMPARISON_Set)
159 #error Unrecognized INCL_CACHING_CLUSTERING_MODEL_INTERCOMPARISON. Allowed values are: Set, HashMask.
162 G4int selectedA, selectedZ;
165 G4int clusterZMaxAll, clusterNMaxAll;
183 static const G4double limitCosEscapeAngle;
188 G4int runningMaxClusterAlgorithmMass;
190 G4int nConsideredMax;
213 G4bool *isInRunningConfiguration;
222 #if defined(INCL_CACHING_CLUSTERING_MODEL_INTERCOMPARISON_HashMask)
223 typedef std::set<Hashing::HashType> HashContainer;
224 typedef HashContainer::iterator HashIterator;
228 #elif defined(INCL_CACHING_CLUSTERING_MODEL_INTERCOMPARISON_Set)
236 class SortedNucleonConfiguration {
239 typedef G4int NucleonItem;
242 SortedNucleonConfiguration() : theSize(0), nucleons(NULL) {}
245 SortedNucleonConfiguration(
const SortedNucleonConfiguration &rhs) :
246 theSize(rhs.theSize),
247 nucleons(new NucleonItem[theSize])
249 std::copy(rhs.nucleons, rhs.nucleons+theSize, nucleons);
253 ~SortedNucleonConfiguration() {
258 void swap(SortedNucleonConfiguration &rhs) {
264 SortedNucleonConfiguration &operator=(
const SortedNucleonConfiguration &rhs) {
265 SortedNucleonConfiguration tempConfig(rhs);
277 return std::lexicographical_compare(nucleons, nucleons+theSize, rhs.nucleons, rhs.nucleons+theSize);
281 void fill(NucleonItem *
config,
size_t n) {
283 nucleons =
new NucleonItem[theSize];
284 std::copy(config, config+theSize, nucleons);
293 NucleonItem *nucleons;
296 typedef std::set<SortedNucleonConfiguration> SortedNucleonConfigurationContainer;
297 typedef SortedNucleonConfigurationContainer::iterator SortedNucleonConfigurationIterator;
302 #error Unrecognized INCL_CACHING_CLUSTERING_MODEL_INTERCOMPARISON. Allowed values are: Set, HashMask.
309 G4int maxMassConfigurationSkipping;
virtual G4bool clusterCanEscape(Nucleus const *const, Cluster const *const)
ClusteringModelIntercomparison(Config const *const theConfig)
ConsideredPartner(Particle *const p)
void copy(std::vector< T > &main, const std::vector< T > &data)
G4double getRealMass(const G4INCL::ParticleType t)
Get particle mass (in MeV/c^2)
const G4int maxClusterMass
virtual ~ClusteringModelIntercomparison()
void swap(shared_ptr< P > &, shared_ptr< P > &)
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.