Geant4-11
Data Structures | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes
G4INCL::ClusteringModelIntercomparison Class Reference

Cluster coalescence algorithm used in the IAEA intercomparison. More...

#include <G4INCLClusteringModelIntercomparison.hh>

Inheritance diagram for G4INCL::ClusteringModelIntercomparison:
G4INCL::IClusteringModel

Data Structures

class  SortedNucleonConfiguration
 Class for storing and comparing sorted nucleon configurations. More...
 

Public Member Functions

virtual G4bool clusterCanEscape (Nucleus const *const, Cluster const *const)
 
 ClusteringModelIntercomparison (Config const *const theConfig)
 
virtual ClustergetCluster (Nucleus *, Particle *)
 
virtual ~ClusteringModelIntercomparison ()
 

Private Types

typedef std::set< SortedNucleonConfigurationSortedNucleonConfigurationContainer
 
typedef SortedNucleonConfigurationContainer::iterator SortedNucleonConfigurationIterator
 

Private Member Functions

void findClusterStartingFrom (const G4int oldA, const G4int oldZ, const G4int oldS)
 
G4double getPhaseSpace (const G4int oldA, ConsideredPartner const &p)
 

Private Attributes

ParticlecandidateConfiguration [ParticleTable::maxClusterMass]
 Best cluster configuration. More...
 
G4double cascadingEnergyPool
 
SortedNucleonConfigurationContainer checkedConfigurations [ParticleTable::maxClusterMass-2]
 Array of containers for configurations that have already been checked. More...
 
G4int clusterNMaxAll
 
G4int clusterZMaxAll
 
ConsideredPartnerconsideredPartners
 Array of considered cluster partners. More...
 
G4boolisInRunningConfiguration
 Array of flags for nucleons in the running configuration. More...
 
const G4double lambdaMass
 
G4int maxMassConfigurationSkipping
 Maximum mass for configuration storage. More...
 
G4int nConsidered
 
G4int nConsideredMax
 
const G4double neutronMass
 
const G4double protonMass
 
G4int runningConfiguration [ParticleTable::maxClusterMass]
 
G4double runningEnergies [ParticleTable::maxClusterMass+1]
 
G4int runningMaxClusterAlgorithmMass
 
ThreeVector runningMomenta [ParticleTable::maxClusterMass+1]
 
ThreeVector runningPositions [ParticleTable::maxClusterMass+1]
 
G4double runningPotentials [ParticleTable::maxClusterMass+1]
 
G4int selectedA
 
G4int selectedS
 
G4int selectedZ
 
G4double sqtot
 
NucleustheNucleus
 

Static Private Attributes

static const G4double clusterPhaseSpaceCut [ParticleTable::maxClusterMass+1]
 Phase-space parameters for cluster formation. More...
 
static const G4double clusterPosFact [ParticleTable::maxClusterMass+1]
 Precomputed factor 1.0/A. More...
 
static const G4double clusterPosFact2 [ParticleTable::maxClusterMass+1]
 Precomputed factor (1.0/A)^2. More...
 
static const G4int clusterZMax [ParticleTable::maxClusterMass+1] = {0, 0, 1, 2, 3, 3, 5, 5, 6, 6, 7, 7, 8}
 Upper limit of Z for cluster of mass A. More...
 
static const G4int clusterZMin [ParticleTable::maxClusterMass+1] = {0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 3}
 Lower limit of Z for cluster of mass A. More...
 
static const G4double limitCosEscapeAngle = 0.7
 

Detailed Description

Cluster coalescence algorithm used in the IAEA intercomparison.

Definition at line 96 of file G4INCLClusteringModelIntercomparison.hh.

Member Typedef Documentation

◆ SortedNucleonConfigurationContainer

Definition at line 303 of file G4INCLClusteringModelIntercomparison.hh.

◆ SortedNucleonConfigurationIterator

typedef SortedNucleonConfigurationContainer::iterator G4INCL::ClusteringModelIntercomparison::SortedNucleonConfigurationIterator
private

Definition at line 304 of file G4INCLClusteringModelIntercomparison.hh.

Constructor & Destructor Documentation

◆ ClusteringModelIntercomparison()

G4INCL::ClusteringModelIntercomparison::ClusteringModelIntercomparison ( Config const *const  theConfig)
inline

Definition at line 98 of file G4INCLClusteringModelIntercomparison.hh.

98 :
99 theNucleus(NULL),
100 selectedA(0),
101 selectedZ(0),
102 selectedS(0),
103 sqtot(0.),
108 runningMaxClusterAlgorithmMass(theConfig->getClusterMaxMass()),
110 nConsidered(0),
111 consideredPartners(NULL),
114 {
115 // Set up the maximum charge and neutron number for clusters
116 clusterZMaxAll = 0;
117 clusterNMaxAll = 0;
123 }
124 std::fill(candidateConfiguration,
126 static_cast<Particle*>(NULL));
127
128 std::fill(runningEnergies,
130 0.0);
131
132 std::fill(runningPotentials,
134 0.0);
135
136 std::fill(runningConfiguration,
138 -1);
139
140 }
int G4int
Definition: G4Types.hh:85
const G4double A[17]
G4double runningPotentials[ParticleTable::maxClusterMass+1]
G4double runningEnergies[ParticleTable::maxClusterMass+1]
static const G4int clusterZMin[ParticleTable::maxClusterMass+1]
Lower limit of Z for cluster of mass A.
G4int runningConfiguration[ParticleTable::maxClusterMass]
G4bool * isInRunningConfiguration
Array of flags for nucleons in the running configuration.
static const G4int clusterZMax[ParticleTable::maxClusterMass+1]
Upper limit of Z for cluster of mass A.
G4int maxMassConfigurationSkipping
Maximum mass for configuration storage.
ConsideredPartner * consideredPartners
Array of considered cluster partners.
Particle * candidateConfiguration[ParticleTable::maxClusterMass]
Best cluster configuration.
G4double getRealMass(const G4INCL::ParticleType t)
Get particle mass (in MeV/c^2)

References A, candidateConfiguration, clusterNMaxAll, clusterZMax, clusterZMaxAll, clusterZMin, G4INCL::ParticleTable::maxClusterMass, runningConfiguration, runningEnergies, runningMaxClusterAlgorithmMass, and runningPotentials.

◆ ~ClusteringModelIntercomparison()

virtual G4INCL::ClusteringModelIntercomparison::~ClusteringModelIntercomparison ( )
inlinevirtual

Definition at line 142 of file G4INCLClusteringModelIntercomparison.hh.

142 {
143 delete [] consideredPartners;
144 delete [] isInRunningConfiguration;
145 }

References consideredPartners, and isInRunningConfiguration.

Member Function Documentation

◆ clusterCanEscape()

G4bool G4INCL::ClusteringModelIntercomparison::clusterCanEscape ( Nucleus const * const  ,
Cluster const * const   
)
virtual

Determine whether cluster can escape or not.

Implements G4INCL::IClusteringModel.

Definition at line 380 of file G4INCLClusteringModelIntercomparison.cc.

380 {
381 // Forbid emission of the whole nucleus
382 if(c->getA()>=n->getA() || c->getS()>0)
383 return false;
384
385 // Check the escape angle of the cluster
386 const ThreeVector &pos = c->getPosition();
387 const ThreeVector &mom = c->getMomentum();
388 const G4double cosEscapeAngle = pos.dot(mom) / std::sqrt(pos.mag2()*mom.mag2());
389 if(cosEscapeAngle < limitCosEscapeAngle)
390 return false;
391
392 return true;
393 }
static const G4double pos
double G4double
Definition: G4Types.hh:83

References G4INCL::Particle::getA(), G4INCL::Particle::getMomentum(), G4INCL::Particle::getPosition(), G4INCL::Particle::getS(), limitCosEscapeAngle, G4INCL::ThreeVector::mag2(), CLHEP::detail::n, and pos.

◆ findClusterStartingFrom()

void G4INCL::ClusteringModelIntercomparison::findClusterStartingFrom ( const G4int  oldA,
const G4int  oldZ,
const G4int  oldS 
)
private

Definition at line 222 of file G4INCLClusteringModelIntercomparison.cc.

222 {
223 const G4int newA = oldA + 1;
224 const G4int oldAMinusOne = oldA - 1;
225 G4int newZ;
226 G4int newN;
227 G4int newS;
228
229 // Look up the phase-space cut
230 const G4double phaseSpaceCut = clusterPhaseSpaceCut[newA];
231
232 // Configuration caching enabled only for a certain mass interval
233 const G4bool cachingEnabled = (newA<=maxMassConfigurationSkipping && newA>=3);
234
235 // Set the pointer to the container of cached configurations
236#if defined(INCL_CACHING_CLUSTERING_MODEL_INTERCOMPARISON_HashMask)
237 HashContainer *theHashContainer;
238 if(cachingEnabled)
239 theHashContainer = &(checkedConfigurations[oldA-2]);
240 else
241 theHashContainer = NULL;
242#elif defined(INCL_CACHING_CLUSTERING_MODEL_INTERCOMPARISON_Set)
243 SortedNucleonConfigurationContainer *theConfigContainer;
244 if(cachingEnabled)
245 theConfigContainer = &(checkedConfigurations[oldA-2]);
246 else
247 theConfigContainer = NULL;
248#elif !defined(INCL_CACHING_CLUSTERING_MODEL_INTERCOMPARISON_None)
249#error Unrecognized INCL_CACHING_CLUSTERING_MODEL_INTERCOMPARISON. Allowed values are: Set, HashMask, None.
250#endif
251
252 // Minimum and maximum Z values for this mass
253 const G4int ZMinForNewA = clusterZMin[newA];
254 const G4int ZMaxForNewA = clusterZMax[newA];
255
256 for(G4int i=0; i<nConsidered; ++i) {
257 // Only accept particles that are not already part of the cluster
258 if(isInRunningConfiguration[i]) continue;
259
260 ConsideredPartner const &candidateNucleon = consideredPartners[i];
261
262 // Z and A of the new cluster
263 newZ = oldZ + candidateNucleon.Z;
264 newS = oldS + candidateNucleon.S;
265 newN = newA - newZ;
266
267 // Skip this nucleon if we already have too many protons or neutrons
268 if(newZ > clusterZMaxAll || newN > clusterNMaxAll || newS>0)
269 continue;
270
271 // Compute the phase space factor for a new cluster which
272 // consists of the previous running cluster and the new
273 // candidate nucleon:
274 const G4double phaseSpace = getPhaseSpace(oldA, candidateNucleon);
275 if(phaseSpace > phaseSpaceCut) continue;
276
277 // Store the candidate nucleon in the running configuration
278 runningConfiguration[oldAMinusOne] = i;
279#if defined(INCL_CACHING_CLUSTERING_MODEL_INTERCOMPARISON_HashMask)
280 Hashing::HashType configHash;
281 HashIterator aHashIter;
282#elif defined(INCL_CACHING_CLUSTERING_MODEL_INTERCOMPARISON_Set)
283 SortedNucleonConfiguration thisConfig;
285#endif
286 if(cachingEnabled) {
287#if defined(INCL_CACHING_CLUSTERING_MODEL_INTERCOMPARISON_HashMask)
288 configHash = Hashing::hashConfig(runningConfiguration, oldA);
289 aHashIter = theHashContainer->lower_bound(configHash);
290 // If we have already checked this configuration, skip it
291 if(aHashIter!=theHashContainer->end()
292 && !(configHash < *aHashIter))
293 continue;
294#elif defined(INCL_CACHING_CLUSTERING_MODEL_INTERCOMPARISON_Set)
295 thisConfig.fill(runningConfiguration,oldA);
296 thisConfigIter = theConfigContainer->lower_bound(thisConfig);
297 // If we have already checked this configuration, skip it
298 if(thisConfigIter!=theConfigContainer->end()
299 && !(thisConfig < *thisConfigIter))
300 continue;
301#endif
302 }
303
304 // Sum of the total energies of the cluster components
305 runningEnergies[newA] = runningEnergies[oldA] + candidateNucleon.energy;
306 // Sum of the potential energies of the cluster components
307 runningPotentials[newA] = runningPotentials[oldA] + candidateNucleon.potentialEnergy;
308
309 // Update the available cascading kinetic energy
310 G4double oldCascadingEnergyPool = cascadingEnergyPool;
311 if(!candidateNucleon.isTargetSpectator)
312 cascadingEnergyPool -= candidateNucleon.energy - candidateNucleon.potentialEnergy - 931.3;
313
314 // Check an approximate Coulomb barrier. If the cluster is below
315 // 0.5*barrier and the remaining available energy from cascading nucleons
316 // will not bring it above, reject the cluster.
317 const G4double halfB = 0.72 * newZ *
319 const G4double tout = runningEnergies[newA] - runningPotentials[newA] -
320 931.3*newA;
321 if(tout<=halfB && tout+cascadingEnergyPool<=halfB) {
322 cascadingEnergyPool = oldCascadingEnergyPool;
323 continue;
324 }
325
326 // Here the nucleon has passed all the tests. Accept it in the cluster.
327 runningPositions[newA] = (runningPositions[oldA] * oldA + candidateNucleon.position)*clusterPosFact[newA];
328 runningMomenta[newA] = runningMomenta[oldA] + candidateNucleon.momentum;
329
330 // Add the config to the container
331 if(cachingEnabled) {
332#if defined(INCL_CACHING_CLUSTERING_MODEL_INTERCOMPARISON_HashMask)
333 theHashContainer->insert(aHashIter, configHash);
334#elif defined(INCL_CACHING_CLUSTERING_MODEL_INTERCOMPARISON_Set)
335 theConfigContainer->insert(thisConfigIter, thisConfig);
336#endif
337 }
338
339 // Set the flag that reminds us that this nucleon has already been taken
340 // in the running configuration
341 isInRunningConfiguration[i] = true;
342
343 // Keep track of the best physical cluster
344 if(newZ >= ZMinForNewA && newZ <= ZMaxForNewA) {
345 // Note: sqc is real kinetic energy, not the square of the kinetic energy!
347 runningMomenta[newA]);
348 const G4double sqct = (sqc - 2.*newZ*protonMass - 2.*(newA+newS-newZ)*neutronMass + 2.*newS*lambdaMass
349 + ParticleTable::getRealMass(newA, newZ, newS))
350 *clusterPosFact[newA];
351
352 if(sqct < sqtot) {
353 // This is the best cluster we have found so far. Store its
354 // kinematics.
355 sqtot = sqct;
356 selectedA = newA;
357 selectedZ = newZ;
358 selectedS = newS;
359
360 // Store the running configuration in a ParticleList
361 for(G4int j=0; j<oldA; ++j)
363
364 // Sanity check on number of nucleons in running configuration
365// assert(std::count(isInRunningConfiguration, isInRunningConfiguration+nConsidered, true)==selectedA-1);
366 }
367 }
368
369 // The method recursively calls itself for the next mass
370 if(newA < runningMaxClusterAlgorithmMass && newA+1 < theNucleus->getA() && newS<=0) {
371 findClusterStartingFrom(newA, newZ, newS);
372 }
373
374 // Reset the running configuration flag and the cascading energy pool
375 isInRunningConfiguration[i] = false;
376 cascadingEnergyPool = oldCascadingEnergyPool;
377 }
378 }
bool G4bool
Definition: G4Types.hh:86
G4double getPhaseSpace(const G4int oldA, ConsideredPartner const &p)
static const G4double clusterPhaseSpaceCut[ParticleTable::maxClusterMass+1]
Phase-space parameters for cluster formation.
static const G4double clusterPosFact[ParticleTable::maxClusterMass+1]
Precomputed factor 1.0/A.
SortedNucleonConfigurationContainer checkedConfigurations[ParticleTable::maxClusterMass-2]
Array of containers for configurations that have already been checked.
ThreeVector runningMomenta[ParticleTable::maxClusterMass+1]
SortedNucleonConfigurationContainer::iterator SortedNucleonConfigurationIterator
void findClusterStartingFrom(const G4int oldA, const G4int oldZ, const G4int oldS)
ThreeVector runningPositions[ParticleTable::maxClusterMass+1]
std::set< SortedNucleonConfiguration > SortedNucleonConfigurationContainer
G4double getProtonNuclearRadius() const
NuclearDensity const * getDensity() const
Getter for theDensity.
G4int getZ() const
Returns the charge number.
G4int getA() const
Returns the baryon number.
G4double invariantMass(const G4double E, const ThreeVector &p)

References candidateConfiguration, cascadingEnergyPool, checkedConfigurations, clusterNMaxAll, clusterPhaseSpaceCut, clusterPosFact, clusterZMax, clusterZMaxAll, clusterZMin, consideredPartners, G4INCL::ConsideredPartner::energy, G4INCL::ClusteringModelIntercomparison::SortedNucleonConfiguration::fill(), findClusterStartingFrom(), G4INCL::Particle::getA(), G4INCL::Nucleus::getDensity(), getPhaseSpace(), G4INCL::NuclearDensity::getProtonNuclearRadius(), G4INCL::ParticleTable::getRealMass(), G4INCL::Particle::getZ(), G4INCL::KinematicsUtils::invariantMass(), isInRunningConfiguration, G4INCL::ConsideredPartner::isTargetSpectator, lambdaMass, G4INCL::ConsideredPartner::momentum, nConsidered, neutronMass, G4INCL::ConsideredPartner::position, G4INCL::ConsideredPartner::potentialEnergy, protonMass, runningConfiguration, runningEnergies, runningMaxClusterAlgorithmMass, runningMomenta, runningPositions, runningPotentials, G4INCL::ConsideredPartner::S, selectedA, selectedS, selectedZ, sqtot, theNucleus, and G4INCL::ConsideredPartner::Z.

Referenced by findClusterStartingFrom(), and getCluster().

◆ getCluster()

Cluster * G4INCL::ClusteringModelIntercomparison::getCluster ( Nucleus ,
Particle  
)
virtual

Choose a cluster candidate to be produced. At this point we don't yet decide if it can pass through the Coulomb barrier or not.

Implements G4INCL::IClusteringModel.

Definition at line 80 of file G4INCLClusteringModelIntercomparison.cc.

80 {
81 // Set the maximum clustering mass dynamically, based on the current nucleus
82 const G4int maxClusterAlgorithmMass = nucleus->getStore()->getConfig()->getClusterMaxMass();
83 runningMaxClusterAlgorithmMass = std::min(maxClusterAlgorithmMass, nucleus->getA()/2);
84
85 // Nucleus too small?
87 return NULL;
88
89 theNucleus = nucleus;
90 Particle *theLeadingParticle = particle;
91
92 // Initialise sqtot to a large number
93 sqtot = 50000.0;
94 selectedA = 0;
95 selectedZ = 0;
96
97 // The distance parameter, known as h in publications.
98 // Default value is 1 fm.
99 const G4double transp = 1.0;
100
101 const G4double rmaxws = theNucleus->getUniverseRadius();
102
103 // Radius of the sphere where the leading particle is positioned.
104 const G4double Rprime = theNucleus->getDensity()->getProtonNuclearRadius() + transp;
105
106 // Bring the leading particle back to the coalescence sphere
107 const G4double pk = theLeadingParticle->getMomentum().mag();
108 const G4double cospr = theLeadingParticle->getPosition().dot(theLeadingParticle->getMomentum())/(theNucleus->getUniverseRadius() * pk);
109 const G4double arg = rmaxws*rmaxws - Rprime*Rprime;
110 G4double translat;
111
112 if(arg > 0.0) {
113 // coalescence sphere smaller than Rmax
114 const G4double cosmin = std::sqrt(arg)/rmaxws;
115 if(cospr <= cosmin) {
116 // there is an intersection with the coalescence sphere
117 translat = rmaxws * cospr;
118 } else {
119 // no intersection with the coalescence sphere
120 translat = rmaxws * (cospr - std::sqrt(cospr*cospr - cosmin*cosmin));
121 }
122 } else {
123 // coalescence sphere larger than Rmax
124 translat = rmaxws * cospr - std::sqrt(Rprime*Rprime - rmaxws*rmaxws*(1.0 - cospr*cospr));
125 }
126
127 const ThreeVector oldLeadingParticlePosition = theLeadingParticle->getPosition();
128 const ThreeVector leadingParticlePosition = oldLeadingParticlePosition - theLeadingParticle->getMomentum() * (translat/pk);
129 const ThreeVector &leadingParticleMomentum = theLeadingParticle->getMomentum();
130 theLeadingParticle->setPosition(leadingParticlePosition);
131
132 // Initialise the array of considered nucleons
133 const G4int theNucleusA = theNucleus->getA();
134 if(nConsideredMax < theNucleusA) {
135 delete [] consideredPartners;
136 delete [] isInRunningConfiguration;
137 nConsideredMax = 2*theNucleusA;
138 consideredPartners = new ConsideredPartner[nConsideredMax];
140 std::fill(isInRunningConfiguration,
142 false);
143 }
144
145 // Select the subset of nucleons that will be considered in the
146 // cluster production:
148 nConsidered = 0;
149 ParticleList const &particles = theNucleus->getStore()->getParticles();
150 for(ParticleIter i=particles.begin(), e=particles.end(); i!=e; ++i) {
151 if (!(*i)->isNucleonorLambda()) continue; // Only nucleons and lambdas are allowed in clusters
152 if ((*i)->getID() == theLeadingParticle->getID()) continue; // Don't count the leading particle
153
154 G4double space = ((*i)->getPosition() - leadingParticlePosition).mag2();
155 G4double momentum = ((*i)->getMomentum() - leadingParticleMomentum).mag2();
157 // Nucleons are accepted only if they are "close enough" in phase space
158 // to the leading nucleon. The selected phase-space parameter corresponds
159 // to the running maximum cluster mass.
162 // Keep trace of how much energy is carried by cascading nucleons. This
163 // is used to stop the clustering algorithm as soon as possible.
164 if(!(*i)->isTargetSpectator())
166 nConsidered++;
167 // Make sure we don't exceed the array size
168// assert(nConsidered<=nConsideredMax);
169 }
170 }
171 // Sort the list of considered partners so that we give priority
172 // to participants. As soon as we encounter the first spectator in
173 // the list we know that all the remaining nucleons will be
174 // spectators too.
175// std::partition(consideredPartners, consideredPartners+nConsidered, cascadingFirstPredicate);
176
177#ifndef INCL_CACHING_CLUSTERING_MODEL_INTERCOMPARISON_None
178 // Clear the sets of checked configurations
179 // We stop caching two masses short of the max mass -- there seems to be a
180 // performance hit above
182 for(G4int i=0; i<runningMaxClusterAlgorithmMass-2; ++i) // no caching for A=1,2
183 checkedConfigurations[i].clear();
184#endif
185
186 // Initialise position, momentum and energy of the running cluster
187 // configuration
188 runningPositions[1] = leadingParticlePosition;
189 runningMomenta[1] = leadingParticleMomentum;
190 runningEnergies[1] = theLeadingParticle->getEnergy();
191 runningPotentials[1] = theLeadingParticle->getPotentialEnergy();
192
193 // Make sure that all the elements of isInRunningConfiguration are false.
194// assert(std::count(isInRunningConfiguration, isInRunningConfiguration+nConsidered, true)==0);
195
196 // Start the cluster search!
197 findClusterStartingFrom(1, theLeadingParticle->getZ(), 0);
198
199 // Again, make sure that all the elements of isInRunningConfiguration have
200 // been reset to false. This is a sanity check.
201// assert(std::count(isInRunningConfiguration, isInRunningConfiguration+nConsidered, true)==0);
202
203 Cluster *chosenCluster = 0;
204 if(selectedA!=0) { // A cluster was found!
205 candidateConfiguration[selectedA-1] = theLeadingParticle;
206 chosenCluster = new Cluster(candidateConfiguration,
208 }
209
210 // Restore the original position of the leading particle
211 theLeadingParticle->setPosition(oldLeadingParticlePosition);
212
213 return chosenCluster;
214 }
static const G4double clusterPosFact2[ParticleTable::maxClusterMass+1]
Precomputed factor (1.0/A)^2.
Store * getStore() const
G4double getUniverseRadius() const
Getter for theUniverseRadius.
ParticleList const & getParticles() const
Definition: G4INCLStore.hh:253
G4double energy(const ThreeVector &p, const G4double m)
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
ParticleList::const_iterator ParticleIter

References candidateConfiguration, cascadingEnergyPool, checkedConfigurations, clusterPhaseSpaceCut, clusterPosFact2, consideredPartners, G4INCL::ThreeVector::dot(), G4INCL::KinematicsUtils::energy(), findClusterStartingFrom(), G4INCL::Particle::getA(), G4INCL::Config::getClusterMaxMass(), G4INCL::Store::getConfig(), G4INCL::Nucleus::getDensity(), G4INCL::Particle::getEnergy(), G4INCL::Particle::getID(), G4INCL::Particle::getMomentum(), G4INCL::Store::getParticles(), G4INCL::Particle::getPosition(), G4INCL::Particle::getPotentialEnergy(), G4INCL::NuclearDensity::getProtonNuclearRadius(), G4INCL::Nucleus::getStore(), G4INCL::Nucleus::getUniverseRadius(), G4INCL::Particle::getZ(), isInRunningConfiguration, G4INCL::ThreeVector::mag(), maxMassConfigurationSkipping, G4INCL::Math::min(), nConsidered, nConsideredMax, runningEnergies, runningMaxClusterAlgorithmMass, runningMomenta, runningPositions, runningPotentials, selectedA, selectedZ, G4INCL::Particle::setPosition(), sqtot, and theNucleus.

◆ getPhaseSpace()

G4double G4INCL::ClusteringModelIntercomparison::getPhaseSpace ( const G4int  oldA,
ConsideredPartner const &  p 
)
private

Definition at line 216 of file G4INCLClusteringModelIntercomparison.cc.

216 {
217 const G4double psSpace = (p.position - runningPositions[oldA]).mag2();
218 const G4double psMomentum = (p.momentum*oldA - runningMomenta[oldA]).mag2();
219 return psSpace * psMomentum * clusterPosFact2[oldA + 1];
220 }

References clusterPosFact2, G4INCL::ConsideredPartner::momentum, G4INCL::ConsideredPartner::position, runningMomenta, and runningPositions.

Referenced by findClusterStartingFrom().

Field Documentation

◆ candidateConfiguration

Particle* G4INCL::ClusteringModelIntercomparison::candidateConfiguration[ParticleTable::maxClusterMass]
private

Best cluster configuration.

This array contains pointers to the nucleons which make up the best cluster configuration that has been found so far.

Definition at line 227 of file G4INCLClusteringModelIntercomparison.hh.

Referenced by ClusteringModelIntercomparison(), findClusterStartingFrom(), and getCluster().

◆ cascadingEnergyPool

G4double G4INCL::ClusteringModelIntercomparison::cascadingEnergyPool
private

Definition at line 173 of file G4INCLClusteringModelIntercomparison.hh.

Referenced by findClusterStartingFrom(), and getCluster().

◆ checkedConfigurations

SortedNucleonConfigurationContainer G4INCL::ClusteringModelIntercomparison::checkedConfigurations[ParticleTable::maxClusterMass-2]
private

Array of containers for configurations that have already been checked.

Definition at line 307 of file G4INCLClusteringModelIntercomparison.hh.

Referenced by findClusterStartingFrom(), and getCluster().

◆ clusterNMaxAll

G4int G4INCL::ClusteringModelIntercomparison::clusterNMaxAll
private

◆ clusterPhaseSpaceCut

const G4double G4INCL::ClusteringModelIntercomparison::clusterPhaseSpaceCut
staticprivate
Initial value:
= {0.0, 70000.0, 180000.0,
90000.0, 90000.0,
128941.0 ,145607.0,
161365.0, 176389.0,
190798.0, 204681.0,
218109.0, 231135.0}

Phase-space parameters for cluster formation.

Definition at line 187 of file G4INCLClusteringModelIntercomparison.hh.

Referenced by findClusterStartingFrom(), and getCluster().

◆ clusterPosFact

const G4double G4INCL::ClusteringModelIntercomparison::clusterPosFact
staticprivate
Initial value:
= {0.0, 1.0, 0.5,
0.33333, 0.25,
0.2, 0.16667,
0.14286, 0.125,
0.11111, 0.1,
0.09091, 0.083333}

Precomputed factor 1.0/A.

Definition at line 181 of file G4INCLClusteringModelIntercomparison.hh.

Referenced by findClusterStartingFrom().

◆ clusterPosFact2

const G4double G4INCL::ClusteringModelIntercomparison::clusterPosFact2
staticprivate
Initial value:
= {0.0, 1.0, 0.25,
0.11111, 0.0625,
0.04, 0.0277778,
0.020408, 0.015625,
0.012346, 0.01,
0.0082645, 0.0069444}

Precomputed factor (1.0/A)^2.

Definition at line 184 of file G4INCLClusteringModelIntercomparison.hh.

Referenced by getCluster(), and getPhaseSpace().

◆ clusterZMax

const G4int G4INCL::ClusteringModelIntercomparison::clusterZMax = {0, 0, 1, 2, 3, 3, 5, 5, 6, 6, 7, 7, 8}
staticprivate

Upper limit of Z for cluster of mass A.

Definition at line 178 of file G4INCLClusteringModelIntercomparison.hh.

Referenced by ClusteringModelIntercomparison(), and findClusterStartingFrom().

◆ clusterZMaxAll

G4int G4INCL::ClusteringModelIntercomparison::clusterZMaxAll
private

◆ clusterZMin

const G4int G4INCL::ClusteringModelIntercomparison::clusterZMin = {0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 3}
staticprivate

Lower limit of Z for cluster of mass A.

Definition at line 176 of file G4INCLClusteringModelIntercomparison.hh.

Referenced by ClusteringModelIntercomparison(), and findClusterStartingFrom().

◆ consideredPartners

ConsideredPartner* G4INCL::ClusteringModelIntercomparison::consideredPartners
private

Array of considered cluster partners.

A dynamical array of ConsideredPartner objects is allocated on this variable and filled with pointers to nucleons which are eligible for clustering. We used to use a ParticleList for this purpose, but this made it very cumbersome to check whether nucleons had already been included in the running configuration. Using an array of Particle* coupled with a boolean mask (

See also
{isInRunningConfiguration}) reduces the overhead by a large amount. Running times for 1-GeV p+Pb208 went down by almost 30% (!).

Lesson learnt: when you need speed, nothing beats a good ol' array.

Definition at line 213 of file G4INCLClusteringModelIntercomparison.hh.

Referenced by findClusterStartingFrom(), getCluster(), and ~ClusteringModelIntercomparison().

◆ isInRunningConfiguration

G4bool* G4INCL::ClusteringModelIntercomparison::isInRunningConfiguration
private

Array of flags for nucleons in the running configuration.

Clustering partners that are already used in the running cluster configuration are flagged as "true" in this array.

Definition at line 220 of file G4INCLClusteringModelIntercomparison.hh.

Referenced by findClusterStartingFrom(), getCluster(), and ~ClusteringModelIntercomparison().

◆ lambdaMass

const G4double G4INCL::ClusteringModelIntercomparison::lambdaMass
private

Definition at line 193 of file G4INCLClusteringModelIntercomparison.hh.

Referenced by findClusterStartingFrom().

◆ limitCosEscapeAngle

const G4double G4INCL::ClusteringModelIntercomparison::limitCosEscapeAngle = 0.7
staticprivate

Definition at line 189 of file G4INCLClusteringModelIntercomparison.hh.

Referenced by clusterCanEscape().

◆ maxMassConfigurationSkipping

G4int G4INCL::ClusteringModelIntercomparison::maxMassConfigurationSkipping
private

Maximum mass for configuration storage.

Skipping configurations becomes inefficient above this mass.

Definition at line 316 of file G4INCLClusteringModelIntercomparison.hh.

Referenced by getCluster().

◆ nConsidered

G4int G4INCL::ClusteringModelIntercomparison::nConsidered
private

Definition at line 198 of file G4INCLClusteringModelIntercomparison.hh.

Referenced by findClusterStartingFrom(), and getCluster().

◆ nConsideredMax

G4int G4INCL::ClusteringModelIntercomparison::nConsideredMax
private

Definition at line 197 of file G4INCLClusteringModelIntercomparison.hh.

Referenced by getCluster().

◆ neutronMass

const G4double G4INCL::ClusteringModelIntercomparison::neutronMass
private

Definition at line 192 of file G4INCLClusteringModelIntercomparison.hh.

Referenced by findClusterStartingFrom().

◆ protonMass

const G4double G4INCL::ClusteringModelIntercomparison::protonMass
private

Definition at line 191 of file G4INCLClusteringModelIntercomparison.hh.

Referenced by findClusterStartingFrom().

◆ runningConfiguration

G4int G4INCL::ClusteringModelIntercomparison::runningConfiguration[ParticleTable::maxClusterMass]
private

◆ runningEnergies

G4double G4INCL::ClusteringModelIntercomparison::runningEnergies[ParticleTable::maxClusterMass+1]
private

◆ runningMaxClusterAlgorithmMass

G4int G4INCL::ClusteringModelIntercomparison::runningMaxClusterAlgorithmMass
private

◆ runningMomenta

ThreeVector G4INCL::ClusteringModelIntercomparison::runningMomenta[ParticleTable::maxClusterMass+1]
private

◆ runningPositions

ThreeVector G4INCL::ClusteringModelIntercomparison::runningPositions[ParticleTable::maxClusterMass+1]
private

◆ runningPotentials

G4double G4INCL::ClusteringModelIntercomparison::runningPotentials[ParticleTable::maxClusterMass+1]
private

◆ selectedA

G4int G4INCL::ClusteringModelIntercomparison::selectedA
private

Definition at line 168 of file G4INCLClusteringModelIntercomparison.hh.

Referenced by findClusterStartingFrom(), and getCluster().

◆ selectedS

G4int G4INCL::ClusteringModelIntercomparison::selectedS
private

Definition at line 168 of file G4INCLClusteringModelIntercomparison.hh.

Referenced by findClusterStartingFrom().

◆ selectedZ

G4int G4INCL::ClusteringModelIntercomparison::selectedZ
private

Definition at line 168 of file G4INCLClusteringModelIntercomparison.hh.

Referenced by findClusterStartingFrom(), and getCluster().

◆ sqtot

G4double G4INCL::ClusteringModelIntercomparison::sqtot
private

Definition at line 169 of file G4INCLClusteringModelIntercomparison.hh.

Referenced by findClusterStartingFrom(), and getCluster().

◆ theNucleus

Nucleus* G4INCL::ClusteringModelIntercomparison::theNucleus
private

Definition at line 154 of file G4INCLClusteringModelIntercomparison.hh.

Referenced by findClusterStartingFrom(), and getCluster().


The documentation for this class was generated from the following files: