Geant4  10.04
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
ClusteringModelIntercomparison Class Reference

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

Inheritance diagram for ClusteringModelIntercomparison:
IClusteringModel

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 *)
 
virtual G4bool clusterCanEscape (Nucleus const *const, Cluster const *const)
 
- Public Member Functions inherited from 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]
 Lower limit of Z for cluster of mass A. More...
 
static const G4int clusterZMax [ParticleTable::maxClusterMass+1]
 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
 

Detailed Description

Cluster coalescence algorithm used in the IAEA intercomparison.

Member Typedef Documentation

typedef SortedNucleonConfigurationContainer::iterator SortedNucleonConfigurationIterator
private

Constructor & Destructor Documentation

Member Function Documentation

virtual Cluster* 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 IClusteringModel.

virtual G4bool clusterCanEscape ( Nucleus const const,
Cluster const const 
)
virtual

Determine whether cluster can escape or not.

Implements IClusteringModel.

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

Member Data Documentation

Nucleus* theNucleus
private
ThreeVector runningMomenta[ParticleTable::maxClusterMass+1]
private
ThreeVector runningPositions[ParticleTable::maxClusterMass+1]
private
G4int selectedA
private
G4int selectedZ
private
G4double sqtot
private
G4double cascadingEnergyPool
private
const G4int clusterZMin[ParticleTable::maxClusterMass+1]
staticprivate

Lower limit of Z for cluster of mass A.

Referenced by ClusteringModelIntercomparison::ClusteringModelIntercomparison().

const G4int clusterZMax[ParticleTable::maxClusterMass+1]
staticprivate

Upper limit of Z for cluster of mass A.

Referenced by ClusteringModelIntercomparison::ClusteringModelIntercomparison().

const G4double clusterPosFact[ParticleTable::maxClusterMass+1]
staticprivate

Precomputed factor 1.0/A.

const G4double clusterPosFact2[ParticleTable::maxClusterMass+1]
staticprivate

Precomputed factor (1.0/A)^2.

const G4double clusterPhaseSpaceCut[ParticleTable::maxClusterMass+1]
staticprivate

Phase-space parameters for cluster formation.

const G4double limitCosEscapeAngle
staticprivate
const G4double protonMass
private
const G4double neutronMass
private
G4int runningMaxClusterAlgorithmMass
private
G4int nConsideredMax
private
G4int nConsidered
private
ConsideredPartner* 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.

Referenced by ClusteringModelIntercomparison::~ClusteringModelIntercomparison().

G4bool* 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.

Referenced by ClusteringModelIntercomparison::~ClusteringModelIntercomparison().

Particle* 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.

Referenced by ClusteringModelIntercomparison::ClusteringModelIntercomparison().

Array of containers for configurations that have already been checked.

G4int maxMassConfigurationSkipping
private

Maximum mass for configuration storage.

Skipping configurations becomes inefficient above this mass.