Geant4  10.00.p02
G4INCL::ClusteringModelIntercomparison Class Reference

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

#include <G4INCLClusteringModelIntercomparison.hh>

+ Inheritance diagram for G4INCL::ClusteringModelIntercomparison:
+ Collaboration diagram for G4INCL::ClusteringModelIntercomparison:

Classes

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

Public Member Functions

 ClusteringModelIntercomparison (Config const *const theConfig)
 
virtual ~ClusteringModelIntercomparison ()
 
virtual ClustergetCluster (Nucleus *, Particle *)
 Choose a cluster candidate to be produced. More...
 
virtual G4bool clusterCanEscape (Nucleus const *const, Cluster const *const)
 Determine whether cluster can escape or not. More...
 
- Public Member Functions inherited from G4INCL::IClusteringModel
 IClusteringModel ()
 
virtual ~IClusteringModel ()
 

Private Types

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

Private Member Functions

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

Private Attributes

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

Static Private Attributes

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 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 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 G4double clusterPhaseSpaceCut [ParticleTable::maxClusterMass+1]
 Phase-space parameters for cluster formation. More...
 
static const G4double limitCosEscapeAngle = 0.7
 

Detailed Description

Cluster coalescence algorithm used in the IAEA intercomparison.

Definition at line 92 of file G4INCLClusteringModelIntercomparison.hh.

Member Typedef Documentation

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

Definition at line 297 of file G4INCLClusteringModelIntercomparison.hh.

Constructor & Destructor Documentation

G4INCL::ClusteringModelIntercomparison::ClusteringModelIntercomparison ( Config const *const  theConfig)
inline
virtual G4INCL::ClusteringModelIntercomparison::~ClusteringModelIntercomparison ( )
inlinevirtual

Member Function Documentation

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

Determine whether cluster can escape or not.

Implements G4INCL::IClusteringModel.

Definition at line 373 of file G4INCLClusteringModelIntercomparison.cc.

References G4INCL::ThreeVector::dot(), G4INCL::Particle::getA(), G4INCL::Particle::getMomentum(), G4INCL::Particle::getPosition(), limitCosEscapeAngle, G4INCL::ThreeVector::mag2(), and pos.

+ Here is the call graph for this function:

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

Definition at line 213 of file G4INCLClusteringModelIntercomparison.cc.

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

Referenced by findClusterStartingFrom().

+ Here is the caller graph for this function:

Member Data Documentation

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 220 of file G4INCLClusteringModelIntercomparison.hh.

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

G4double G4INCL::ClusteringModelIntercomparison::cascadingEnergyPool
private

Definition at line 167 of file G4INCLClusteringModelIntercomparison.hh.

Referenced by findClusterStartingFrom(), and getCluster().

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

Array of containers for configurations that have already been checked.

Definition at line 300 of file G4INCLClusteringModelIntercomparison.hh.

Referenced by findClusterStartingFrom(), and getCluster().

G4int G4INCL::ClusteringModelIntercomparison::clusterNMaxAll
private
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 181 of file G4INCLClusteringModelIntercomparison.hh.

Referenced by findClusterStartingFrom(), and getCluster().

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 175 of file G4INCLClusteringModelIntercomparison.hh.

Referenced by findClusterStartingFrom().

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 178 of file G4INCLClusteringModelIntercomparison.hh.

Referenced by getCluster(), and getPhaseSpace().

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 172 of file G4INCLClusteringModelIntercomparison.hh.

Referenced by ClusteringModelIntercomparison(), and findClusterStartingFrom().

G4int G4INCL::ClusteringModelIntercomparison::clusterZMaxAll
private
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 170 of file G4INCLClusteringModelIntercomparison.hh.

Referenced by ClusteringModelIntercomparison(), and findClusterStartingFrom().

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 206 of file G4INCLClusteringModelIntercomparison.hh.

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

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 213 of file G4INCLClusteringModelIntercomparison.hh.

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

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

Definition at line 183 of file G4INCLClusteringModelIntercomparison.hh.

Referenced by clusterCanEscape().

G4int G4INCL::ClusteringModelIntercomparison::maxMassConfigurationSkipping
private

Maximum mass for configuration storage.

Skipping configurations becomes inefficient above this mass.

Definition at line 309 of file G4INCLClusteringModelIntercomparison.hh.

Referenced by getCluster().

G4int G4INCL::ClusteringModelIntercomparison::nConsidered
private

Definition at line 191 of file G4INCLClusteringModelIntercomparison.hh.

Referenced by findClusterStartingFrom(), and getCluster().

G4int G4INCL::ClusteringModelIntercomparison::nConsideredMax
private

Definition at line 190 of file G4INCLClusteringModelIntercomparison.hh.

Referenced by getCluster().

const G4double G4INCL::ClusteringModelIntercomparison::neutronMass
private

Definition at line 186 of file G4INCLClusteringModelIntercomparison.hh.

Referenced by findClusterStartingFrom().

const G4double G4INCL::ClusteringModelIntercomparison::protonMass
private

Definition at line 185 of file G4INCLClusteringModelIntercomparison.hh.

Referenced by findClusterStartingFrom().

G4int G4INCL::ClusteringModelIntercomparison::runningConfiguration[ParticleTable::maxClusterMass]
private
G4double G4INCL::ClusteringModelIntercomparison::runningEnergies[ParticleTable::maxClusterMass+1]
private
G4int G4INCL::ClusteringModelIntercomparison::runningMaxClusterAlgorithmMass
private
ThreeVector G4INCL::ClusteringModelIntercomparison::runningMomenta[ParticleTable::maxClusterMass+1]
private
ThreeVector G4INCL::ClusteringModelIntercomparison::runningPositions[ParticleTable::maxClusterMass+1]
private
G4double G4INCL::ClusteringModelIntercomparison::runningPotentials[ParticleTable::maxClusterMass+1]
private
G4int G4INCL::ClusteringModelIntercomparison::selectedA
private

Definition at line 162 of file G4INCLClusteringModelIntercomparison.hh.

Referenced by findClusterStartingFrom(), and getCluster().

G4int G4INCL::ClusteringModelIntercomparison::selectedZ
private

Definition at line 162 of file G4INCLClusteringModelIntercomparison.hh.

Referenced by findClusterStartingFrom(), and getCluster().

G4double G4INCL::ClusteringModelIntercomparison::sqtot
private

Definition at line 163 of file G4INCLClusteringModelIntercomparison.hh.

Referenced by findClusterStartingFrom(), and getCluster().

Nucleus* G4INCL::ClusteringModelIntercomparison::theNucleus
private

Definition at line 148 of file G4INCLClusteringModelIntercomparison.hh.

Referenced by findClusterStartingFrom(), and getCluster().


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