Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Data Structures | Public Member Functions
G4INCL::INCL Class Reference

#include <G4INCLCascade.hh>

Public Member Functions

 INCL (Config const *const config)
 
 ~INCL ()
 
 INCL (const INCL &rhs)
 Dummy copy constructor to silence Coverity warning. More...
 
INCLoperator= (const INCL &rhs)
 Dummy assignment operator to silence Coverity warning. More...
 
G4bool prepareReaction (const ParticleSpecies &projectileSpecies, const G4double kineticEnergy, const G4int A, const G4int Z)
 
G4bool initializeTarget (const G4int A, const G4int Z)
 
const EventInfoprocessEvent ()
 
const EventInfoprocessEvent (ParticleSpecies const &projectileSpecies, const G4double kineticEnergy, const G4int targetA, const G4int targetZ)
 
void finalizeGlobalInfo ()
 
const GlobalInfogetGlobalInfo () const
 

Detailed Description

Definition at line 51 of file G4INCLCascade.hh.

Constructor & Destructor Documentation

G4INCL::INCL::INCL ( G4INCL::Config const *const  config)

Definition at line 87 of file G4INCLCascade.cc.

References G4INCL::GlobalInfo::Ap, G4INCL::GlobalInfo::At, G4INCL::GlobalInfo::cascadeModel, G4INCL::GlobalInfo::deexcitationModel, G4INCL::GlobalInfo::Ep, G4INCL::Config::getCDPP(), G4INCL::Config::getClusterAlgorithm(), G4INCL::Config::getCoulombType(), G4INCL::Config::getCutNN(), G4INCL::Config::getDeExcitationString(), G4INCL::Config::getImpactParameter(), G4INCL::Config::getLocalEnergyBBType(), G4INCL::Config::getLocalEnergyPiType(), G4INCL::Config::getLogFileName(), G4INCL::Config::getPauliType(), G4INCL::Config::getProjectileKineticEnergy(), G4INCL::Config::getProjectileSpecies(), G4INCL::Config::getRandomSeeds(), G4INCL::Config::getTargetA(), G4INCL::Config::getTargetZ(), G4INCL::Config::getVerbosity(), G4INCL::Config::getVersionString(), G4INCL::GlobalPauli, INCL_INFO, G4INCL::ParticleTable::initialize(), G4INCL::Logger::initVerbosityLevelFromEnvvar(), G4INCL::IntercomparisonClusterAlgorithm, G4INCL::NonRelativisticCoulomb, G4INCL::NoPauli, G4INCL::Pauli::setBlocker(), G4INCL::Pauli::setCDPP(), G4INCL::Clustering::setClusteringModel(), G4INCL::CoulombDistortion::setCoulomb(), G4INCL::CrossSections::setCrossSections(), G4INCL::BinaryCollisionAvatar::setCutNN(), G4INCL::Random::setGenerator(), G4INCL::StatisticalPauli, G4INCL::StrictPauli, G4INCL::StrictStatisticalPauli, G4INCL::ParticleSpecies::theA, G4INCL::ParticleSpecies::theZ, G4INCL::GlobalInfo::Zp, and G4INCL::GlobalInfo::Zt.

88  :propagationModel(0), theA(208), theZ(82),
89  targetInitSuccess(false),
90  maxImpactParameter(0.),
91  maxUniverseRadius(0.),
92  maxInteractionDistance(0.),
93  fixedImpactParameter(0.),
94  theConfig(config),
95  nucleus(NULL),
96  forceTransparent(false),
97  minRemnantSize(4)
98  {
99  // Set the logger object.
100 #ifdef INCLXX_IN_GEANT4_MODE
102 #else // INCLXX_IN_GEANT4_MODE
103  G4INCL::Logger::setLoggerSlave(new G4INCL::LoggerSlave(theConfig->getLogFileName()));
104  G4INCL::Logger::setVerbosityLevel(theConfig->getVerbosity());
105 #endif // INCLXX_IN_GEANT4_MODE
106 
107  // Set the random number generator algorithm. The system can support
108  // multiple different generator algorithms in a completely
109  // transparent way.
110 #ifdef INCLXX_IN_GEANT4_MODE
112 #else // INCLXX_IN_GEANT4_MODE
114 #endif // INCLXX_IN_GEANT4_MODE
115 
116  // Select the Pauli blocking algorithm:
117  G4INCL::PauliType pauli = theConfig->getPauliType();
118  if(pauli == G4INCL::StrictStatisticalPauli)
120  else if(pauli == G4INCL::StatisticalPauli)
122  else if(pauli == G4INCL::StrictPauli)
124  else if(pauli == G4INCL::GlobalPauli)
126  else if(pauli == G4INCL::NoPauli)
128 
129  // Set the cross-section set
130  CrossSections::setCrossSections(new CrossSectionsINCL46);
131 
132  if(theConfig->getCDPP())
134  else
136 
137  // Select the Coulomb-distortion algorithm:
138  G4INCL::CoulombType coulombType = theConfig->getCoulombType();
139  if(coulombType == G4INCL::NonRelativisticCoulomb)
141  else // if(coulombType == G4INCL::NoCoulomb)
143 
144  // Select the clustering algorithm:
145  G4INCL::ClusterAlgorithmType clusterAlgorithm = theConfig->getClusterAlgorithm();
146  if(clusterAlgorithm == G4INCL::IntercomparisonClusterAlgorithm)
148  else // if(clusterAlgorithm == G4INCL::NoClusterAlgorithm)
150 
151  // Initialize the INCL particle table:
153 
154  // Initialize the value of cutNN in BinaryCollisionAvatar
156 
157  // Propagation model is responsible for finding avatars and
158  // transporting the particles. In principle this step is "hidden"
159  // behind an abstract interface and the rest of the system does not
160  // care how the transportation and avatar finding is done. This
161  // should allow us to "easily" experiment with different avatar
162  // finding schemes and even to support things like curved
163  // trajectories in the future.
164  propagationModel = new G4INCL::StandardPropagationModel(theConfig->getLocalEnergyBBType(),theConfig->getLocalEnergyPiType());
165  cascadeAction = new CascadeAction();
166  cascadeAction->beforeRunAction(theConfig);
167 
168  theGlobalInfo.cascadeModel = theConfig->getVersionString();
169  theGlobalInfo.deexcitationModel = theConfig->getDeExcitationString();
170 #ifdef INCL_ROOT_USE
171  theGlobalInfo.rootSelection = theConfig->getROOTSelectionString();
172 #endif
173 
174 #ifndef INCLXX_IN_GEANT4_MODE
175  // Fill in the global information
176  theGlobalInfo.At = theConfig->getTargetA();
177  theGlobalInfo.Zt = theConfig->getTargetZ();
178  const ParticleSpecies theSpecies = theConfig->getProjectileSpecies();
179  theGlobalInfo.Ap = theSpecies.theA;
180  theGlobalInfo.Zp = theSpecies.theZ;
181  theGlobalInfo.Ep = theConfig->getProjectileKineticEnergy();
182  // Echo the input parameters to the log file
183  INCL_INFO(theConfig->echo() << std::endl);
184 #endif
185 
186  fixedImpactParameter = theConfig->getImpactParameter();
187  }
Short_t Ap
Projectile mass number given as input.
static void setCutNN(const G4double c)
G4int getTargetZ() const
Get the target charge number.
std::string cascadeModel
Name of the cascade model.
static void setCoulomb(ICoulomb *const coulomb)
Set the Coulomb-distortion algorithm.
Float_t Ep
Projectile kinetic energy given as input.
Short_t At
Target mass number given as input.
static void setBlocker(IPauli *const)
void setCrossSections(ICrossSections *c)
G4int getVerbosity() const
Get the verbosity.
Definition: G4INCLConfig.hh:96
G4double getImpactParameter() const
G4bool getCDPP() const
Do we want CDPP?
static std::string const getVersionString()
Get the INCL version string.
std::string deexcitationModel
Name of the de-excitation model.
PauliType getPauliType() const
Get the Pauli-blocking algorithm.
G4int getTargetA() const
Get the target mass number.
void setGenerator(G4INCL::IRandomGenerator *aGenerator)
Definition: G4INCLRandom.cc:58
Short_t Zp
Projectile charge number given as input.
void initVerbosityLevelFromEnvvar()
#define INCL_INFO(x)
Random::SeedVector getRandomSeeds() const
Get the seeds for the random-number generator.
ClusterAlgorithmType getClusterAlgorithm() const
Get the clustering algorithm.
std::string const & getLogFileName() const
Get the log file name.
std::string getDeExcitationString() const
Get the de-excitation string.
ParticleSpecies getProjectileSpecies() const
Get the projectile species.
LocalEnergyType getLocalEnergyPiType() const
Get the type of local energy for pi-N and decay avatars.
LocalEnergyType getLocalEnergyBBType() const
Get the type of local energy for N-N avatars.
CoulombType getCoulombType() const
Get the Coulomb-distortion algorithm.
static void setClusteringModel(IClusteringModel *const model)
Set the clustering model.
Short_t Zt
Target charge number given as input.
static void setCDPP(IPauli *const)
Cluster coalescence algorithm used in the IAEA intercomparison.
G4double getProjectileKineticEnergy() const
Get the projectile kinetic energy.
void initialize(Config const *const theConfig=0)
Initialize the particle table.
G4double getCutNN() const
G4INCL::INCL::~INCL ( )

Definition at line 189 of file G4INCLCascade.cc.

References G4INCL::NuclearDensityFactory::clearCache(), G4INCL::NuclearPotential::clearCache(), G4INCL::InteractionAvatar::deleteBackupParticles(), G4INCL::Pauli::deleteBlockers(), G4INCL::Clustering::deleteClusteringModel(), G4INCL::CoulombDistortion::deleteCoulomb(), G4INCL::CrossSections::deleteCrossSections(), and G4INCL::Random::deleteGenerator().

189  {
191 #ifndef INCLXX_IN_GEANT4_MODE
192  G4INCL::NuclearMassTable::deleteTable();
193 #endif
199 #ifndef INCLXX_IN_GEANT4_MODE
200  G4INCL::Logger::deleteLoggerSlave();
201 #endif
204  cascadeAction->afterRunAction();
205  delete cascadeAction;
206  delete propagationModel;
207  delete theConfig;
208  }
void deleteGenerator()
static void deleteBlockers()
void clearCache()
Clear the INuclearPotential cache.
static void deleteCoulomb()
Delete the Coulomb-distortion object.
static void deleteBackupParticles()
Release the memory allocated for the backup particles.
static void deleteClusteringModel()
G4INCL::INCL::INCL ( const INCL rhs)

Dummy copy constructor to silence Coverity warning.

Member Function Documentation

void G4INCL::INCL::finalizeGlobalInfo ( )

Definition at line 711 of file G4INCLCascade.cc.

References G4INCL::GlobalInfo::completeFusionCrossSection, G4INCL::GlobalInfo::energyViolationInteractionCrossSection, G4INCL::GlobalInfo::errorCompleteFusionCrossSection, G4INCL::GlobalInfo::errorForcedCNCrossSection, G4INCL::GlobalInfo::errorReactionCrossSection, G4INCL::GlobalInfo::forcedCNCrossSection, G4INCL::GlobalInfo::geometricCrossSection, G4INCL::GlobalInfo::nCompleteFusion, G4INCL::GlobalInfo::nEnergyViolationInteraction, G4INCL::GlobalInfo::nForcedCompoundNucleus, G4INCL::GlobalInfo::nNucleonAbsorptions, G4INCL::GlobalInfo::nPionAbsorptions, G4INCL::GlobalInfo::nShots, G4INCL::GlobalInfo::nTransparents, G4INCL::GlobalInfo::nucleonAbsorptionCrossSection, G4INCL::GlobalInfo::pionAbsorptionCrossSection, and G4INCL::GlobalInfo::reactionCrossSection.

711  {
712  const G4double normalisationFactor = theGlobalInfo.geometricCrossSection /
713  ((G4double) theGlobalInfo.nShots);
714  theGlobalInfo.nucleonAbsorptionCrossSection = normalisationFactor *
715  ((G4double) theGlobalInfo.nNucleonAbsorptions);
716  theGlobalInfo.pionAbsorptionCrossSection = normalisationFactor *
717  ((G4double) theGlobalInfo.nPionAbsorptions);
718  theGlobalInfo.reactionCrossSection = normalisationFactor *
719  ((G4double) (theGlobalInfo.nShots - theGlobalInfo.nTransparents));
720  theGlobalInfo.errorReactionCrossSection = normalisationFactor *
721  std::sqrt((G4double) (theGlobalInfo.nShots - theGlobalInfo.nTransparents));
722  theGlobalInfo.forcedCNCrossSection = normalisationFactor *
723  ((G4double) theGlobalInfo.nForcedCompoundNucleus);
724  theGlobalInfo.errorForcedCNCrossSection = normalisationFactor *
725  std::sqrt((G4double) (theGlobalInfo.nForcedCompoundNucleus));
726  theGlobalInfo.completeFusionCrossSection = normalisationFactor *
727  ((G4double) theGlobalInfo.nCompleteFusion);
728  theGlobalInfo.errorCompleteFusionCrossSection = normalisationFactor *
729  std::sqrt((G4double) (theGlobalInfo.nCompleteFusion));
730  theGlobalInfo.energyViolationInteractionCrossSection = normalisationFactor *
731  ((G4double) theGlobalInfo.nEnergyViolationInteraction);
732  }
Float_t nucleonAbsorptionCrossSection
Nucleon absorption cross section.
Int_t nForcedCompoundNucleus
Number of forced compound-nucleus events.
Float_t errorReactionCrossSection
Error on the calculated reaction cross section.
Float_t forcedCNCrossSection
Calculated forced-compound-nucleus cross section.
Float_t pionAbsorptionCrossSection
Pion absorption cross section.
Int_t nTransparents
Number of transparent shots.
Float_t completeFusionCrossSection
Calculated complete-fusion cross section (nParticles==0)
Int_t nShots
Number of shots.
Float_t reactionCrossSection
Calculated reaction cross section.
Float_t geometricCrossSection
Geometric cross section.
Float_t errorCompleteFusionCrossSection
Error on the calculated complete-fusion cross section (nParticles==0)
Int_t nPionAbsorptions
Number of nucleon absorptions (no outcoming pions)
Int_t nEnergyViolationInteraction
Number of attempted collisions/decays for which the energy-conservation algorithm failed to find a so...
double G4double
Definition: G4Types.hh:76
Int_t nNucleonAbsorptions
Number of nucleon absorptions (no outcoming particles)
Float_t energyViolationInteractionCrossSection
Cross section for attempted collisions/decays for which the energy-conservation algorithm failed to f...
Float_t errorForcedCNCrossSection
Error on the calculated forced-compound-nucleus cross section.
Int_t nCompleteFusion
Number of complete-fusion events (nParticles==0)
const GlobalInfo& G4INCL::INCL::getGlobalInfo ( ) const
inline

Definition at line 81 of file G4INCLCascade.hh.

81 { return theGlobalInfo; }
G4bool G4INCL::INCL::initializeTarget ( const G4int  A,
const G4int  Z 
)

Definition at line 257 of file G4INCLCascade.cc.

References G4INCL::Store::getBook(), G4INCL::Nucleus::getStore(), G4INCL::Nucleus::initializeParticles(), G4INCL::Book::reset(), and G4INCL::IPropagationModel::setNucleus().

Referenced by prepareReaction().

257  {
258  delete nucleus;
259 
260  nucleus = new Nucleus(A, Z, theConfig, maxUniverseRadius);
261  nucleus->getStore()->getBook().reset();
262  nucleus->initializeParticles();
263 
264  propagationModel->setNucleus(nucleus);
265  return true;
266  }
void initializeParticles()
Store * getStore() const
Book & getBook()
Definition: G4INCLStore.hh:237
void reset()
Definition: G4INCLBook.hh:51
virtual void setNucleus(G4INCL::Nucleus *nucleus)=0
INCL& G4INCL::INCL::operator= ( const INCL rhs)

Dummy assignment operator to silence Coverity warning.

G4bool G4INCL::INCL::prepareReaction ( const ParticleSpecies projectileSpecies,
const G4double  kineticEnergy,
const G4int  A,
const G4int  Z 
)

Definition at line 210 of file G4INCLCascade.cc.

References G4INCL::Composite, G4INCL::ParticleTable::drawRandomNaturalIsotope(), G4INCL::GlobalInfo::geometricCrossSection, INCL_DEBUG, INCL_ERROR, initializeTarget(), G4INCL::Config::isNaturalTarget(), G4INCL::CoulombDistortion::maxImpactParameter(), G4INCL::Math::min(), G4INCL::Math::tenPi, G4INCL::ParticleSpecies::theA, G4INCL::ParticleSpecies::theType, and G4INCL::ParticleSpecies::theZ.

Referenced by processEvent().

210  {
211  if(A < 0 || A > 300 || Z < 1 || Z > 200) {
212  INCL_ERROR("Unsupported target: A = " << A << " Z = " << Z << std::endl
213  << "Target configuration rejected." << std::endl);
214  return false;
215  }
216  if(projectileSpecies.theType==Composite &&
217  (projectileSpecies.theZ==projectileSpecies.theA || projectileSpecies.theZ==0)) {
218  INCL_ERROR("Unsupported projectile: A = " << projectileSpecies.theA << " Z = " << projectileSpecies.theZ << std::endl
219  << "Projectile configuration rejected." << std::endl);
220  return false;
221  }
222 
223  // Reset the forced-transparent flag
224  forceTransparent = false;
225 
226  // Initialise the maximum universe radius
227  initUniverseRadius(projectileSpecies, kineticEnergy, A, Z);
228 
229  // Initialise the nucleus
230  theZ = Z;
231  if(theConfig->isNaturalTarget())
233  else
234  theA = A;
235  initializeTarget(theA, theZ);
236 
237  // Set the maximum impact parameter
238  maxImpactParameter = CoulombDistortion::maxImpactParameter(projectileSpecies, kineticEnergy, nucleus);
239  INCL_DEBUG("Maximum impact parameter initialised: " << maxImpactParameter << std::endl);
240 
241  // For forced CN events
242  initMaxInteractionDistance(projectileSpecies, kineticEnergy);
243 
244  // Set the geometric cross section
245  theGlobalInfo.geometricCrossSection =
246  Math::tenPi*std::pow(maxImpactParameter,2);
247 
248  // Set the minimum remnant size
249  if(projectileSpecies.theA > 0)
250  minRemnantSize = std::min(theA, 4);
251  else
252  minRemnantSize = std::min(theA-1, 4);
253 
254  return true;
255  }
const G4double tenPi
#define INCL_ERROR(x)
G4bool isNaturalTarget() const
Natural targets.
static G4double maxImpactParameter(ParticleSpecies const &p, const G4double kinE, Nucleus const *const n)
Return the maximum impact parameter for Coulomb-distorted trajectories.
Float_t geometricCrossSection
Geometric cross section.
G4bool initializeTarget(const G4int A, const G4int Z)
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
G4int drawRandomNaturalIsotope(const G4int Z)
#define INCL_DEBUG(x)
const EventInfo& G4INCL::INCL::processEvent ( )
inline

Definition at line 65 of file G4INCLCascade.hh.

References G4INCL::Config::getProjectileKineticEnergy(), G4INCL::Config::getProjectileSpecies(), G4INCL::Config::getTargetA(), and G4INCL::Config::getTargetZ().

Referenced by G4INCLXXInterface::ApplyYourself().

65  {
66  return processEvent(
67  theConfig->getProjectileSpecies(),
68  theConfig->getProjectileKineticEnergy(),
69  theConfig->getTargetA(),
70  theConfig->getTargetZ()
71  );
72  }
G4int getTargetZ() const
Get the target charge number.
G4int getTargetA() const
Get the target mass number.
const EventInfo & processEvent()
ParticleSpecies getProjectileSpecies() const
Get the projectile species.
G4double getProjectileKineticEnergy() const
Get the projectile kinetic energy.
const EventInfo & G4INCL::INCL::processEvent ( ParticleSpecies const &  projectileSpecies,
const G4double  kineticEnergy,
const G4int  targetA,
const G4int  targetZ 
)

Definition at line 268 of file G4INCLCascade.cc.

References INCL_WARN, prepareReaction(), and G4INCL::EventInfo::transparent.

273  {
274  // Set the target and the projectile
275  targetInitSuccess = prepareReaction(projectileSpecies, kineticEnergy, targetA, targetZ);
276 
277  if(!targetInitSuccess) {
278  INCL_WARN("Target initialisation failed for A=" << targetA << ", Z=" << targetZ << std::endl);
279  theEventInfo.transparent=true;
280  return theEventInfo;
281  }
282 
283  cascadeAction->beforeCascadeAction(propagationModel);
284 
285  const G4bool canRunCascade = preCascade(projectileSpecies, kineticEnergy);
286  if(canRunCascade) {
287  cascade();
288  postCascade();
289  cascadeAction->afterCascadeAction(nucleus);
290  }
291  updateGlobalInfo();
292  return theEventInfo;
293  }
G4bool prepareReaction(const ParticleSpecies &projectileSpecies, const G4double kineticEnergy, const G4int A, const G4int Z)
#define INCL_WARN(x)
bool G4bool
Definition: G4Types.hh:79
Bool_t transparent
True if the event is transparent.

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