G4INCL::INCL Class Reference

#include <G4INCLCascade.hh>


Public Member Functions

 INCL (Config const *const config)
 ~INCL ()
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
std::string configToString ()

Data Structures

class  RecoilCMFunctor
 Class to adjust remnant recoil in the reaction CM system.
class  RecoilFunctor
 Class to adjust remnant recoil.


Detailed Description

Definition at line 53 of file G4INCLCascade.hh.


Constructor & Destructor Documentation

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

Definition at line 80 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::getLogFileName(), G4INCL::Config::getPauliType(), G4INCL::Config::getRandomSeeds(), G4INCL::Config::getVerbosity(), G4INCL::GlobalPauli, INFO, G4INCL::ParticleTable::initialize(), G4INCL::IntercomparisonClusterAlgorithm, G4INCL::NonRelativisticCoulomb, G4INCL::NoPauli, G4INCL::Pauli::setBlocker(), G4INCL::Pauli::setCDPP(), G4INCL::Clustering::setClusteringModel(), G4INCL::CoulombDistortion::setCoulomb(), G4INCL::Random::setGenerator(), G4INCL::Logger::setLoggerSlave(), G4INCL::Logger::setVerbosityLevel(), G4INCL::StatisticalPauli, G4INCL::StrictPauli, G4INCL::StrictStatisticalPauli, G4INCL::ParticleSpecies::theA, G4INCL::ParticleSpecies::theZ, G4INCL::GlobalInfo::Zp, and G4INCL::GlobalInfo::Zt.

00081     :propagationModel(0), theA(208), theZ(82),
00082     targetInitSuccess(false),
00083     maxImpactParameter(0.),
00084     maxUniverseRadius(0.),
00085     maxInteractionDistance(0.),
00086     fixedImpactParameter(0.),
00087     theConfig(config),
00088     nucleus(NULL),
00089     minRemnantSize(4)
00090   {
00091     // Set the logger object.
00092     G4INCL::Logger::setLoggerSlave(new G4INCL::LoggerSlave(theConfig->getLogFileName()));
00093     G4INCL::Logger::setVerbosityLevel(theConfig->getVerbosity());
00094 
00095     // Set the random number generator algorithm. The system can support
00096     // multiple different generator algorithms in a completely
00097     // transparent way.
00098 #ifdef INCLXX_IN_GEANT4_MODE
00099     G4INCL::Random::setGenerator(new G4INCL::Geant4RandomGenerator());
00100 #else
00101     G4INCL::Random::setGenerator(new G4INCL::Ranecu(theConfig->getRandomSeeds()));
00102 #endif // INCLXX_IN_GEANT4_MODE
00103 
00104     // Select the Pauli blocking algorithm:
00105     G4INCL::PauliType pauli = theConfig->getPauliType();
00106     if(pauli == G4INCL::StrictStatisticalPauli)
00107       G4INCL::Pauli::setBlocker(new G4INCL::PauliStrictStandard);
00108     else if(pauli == G4INCL::StatisticalPauli)
00109       G4INCL::Pauli::setBlocker(new G4INCL::PauliStandard);
00110     else if(pauli == G4INCL::StrictPauli)
00111       G4INCL::Pauli::setBlocker(new G4INCL::PauliStrict);
00112     else if(pauli == G4INCL::GlobalPauli)
00113       G4INCL::Pauli::setBlocker(new G4INCL::PauliGlobal);
00114     else if(pauli == G4INCL::NoPauli)
00115       G4INCL::Pauli::setBlocker(NULL);
00116 
00117     if(theConfig->getCDPP())
00118       G4INCL::Pauli::setCDPP(new G4INCL::CDPP);
00119     else
00120       G4INCL::Pauli::setCDPP(NULL);
00121 
00122     // Select the Coulomb-distortion algorithm:
00123     G4INCL::CoulombType coulombType = theConfig->getCoulombType();
00124     if(coulombType == G4INCL::NonRelativisticCoulomb)
00125       G4INCL::CoulombDistortion::setCoulomb(new G4INCL::CoulombNonRelativistic);
00126     else // if(coulombType == G4INCL::NoCoulomb)
00127       G4INCL::CoulombDistortion::setCoulomb(new G4INCL::CoulombNone);
00128 
00129     // Select the clustering algorithm:
00130     G4INCL::ClusterAlgorithmType clusterAlgorithm = theConfig->getClusterAlgorithm();
00131     if(clusterAlgorithm == G4INCL::IntercomparisonClusterAlgorithm)
00132       G4INCL::Clustering::setClusteringModel(new G4INCL::ClusteringModelIntercomparison(theConfig));
00133     else // if(clusterAlgorithm == G4INCL::NoClusterAlgorithm)
00134       G4INCL::Clustering::setClusteringModel(new G4INCL::ClusteringModelNone);
00135 
00136     // Initialize the INCL particle table:
00137     G4INCL::ParticleTable::initialize(theConfig);
00138 
00139     // Propagation model is responsible for finding avatars and
00140     // transporting the particles. In principle this step is "hidden"
00141     // behind an abstract interface and the rest of the system does not
00142     // care how the transportation and avatar finding is done. This
00143     // should allow us to "easily" experiment with different avatar
00144     // finding schemes and even to support things like curved
00145     // trajectories in the future.
00146     propagationModel = new G4INCL::StandardPropagationModel(theConfig->getLocalEnergyBBType(),theConfig->getLocalEnergyPiType());
00147     eventAction = new EventAction();
00148     propagationAction = new PropagationAction();
00149     avatarAction = new AvatarAction();
00150 
00151     theGlobalInfo.cascadeModel = theConfig->getVersionID().c_str();
00152     theGlobalInfo.deexcitationModel = "none";
00153 
00154 #ifndef INCLXX_IN_GEANT4_MODE
00155     // Fill in the global information
00156     theGlobalInfo.At = theConfig->getTargetA();
00157     theGlobalInfo.Zt = theConfig->getTargetZ();
00158     const ParticleSpecies theSpecies = theConfig->getProjectileSpecies();
00159     theGlobalInfo.Ap = theSpecies.theA;
00160     theGlobalInfo.Zp = theSpecies.theZ;
00161     theGlobalInfo.Ep = theConfig->getProjectileKineticEnergy();
00162     // Echo the input parameters to the log file
00163     INFO(theConfig->echo() << std::endl);
00164 #endif
00165 
00166     fixedImpactParameter = theConfig->getImpactParameter();
00167   }

G4INCL::INCL::~INCL (  ) 

Definition at line 169 of file G4INCLCascade.cc.

References G4INCL::NuclearDensityFactory::clearCache(), G4INCL::Pauli::deleteBlockers(), G4INCL::Clustering::deleteClusteringModel(), G4INCL::CoulombDistortion::deleteCoulomb(), G4INCL::Random::deleteGenerator(), and G4INCL::Logger::deleteLoggerSlave().

00169               {
00170     G4INCL::Pauli::deleteBlockers();
00171     G4INCL::CoulombDistortion::deleteCoulomb();
00172     G4INCL::Random::deleteGenerator();
00173     G4INCL::Clustering::deleteClusteringModel();
00174     G4INCL::Logger::deleteLoggerSlave();
00175     G4INCL::NuclearDensityFactory::clearCache();
00176     delete avatarAction;
00177     delete propagationAction;
00178     delete eventAction;
00179     delete propagationModel;
00180     delete theConfig;
00181   }


Member Function Documentation

std::string G4INCL::INCL::configToString (  )  [inline]

Definition at line 79 of file G4INCLCascade.hh.

References G4INCL::Config::echo().

Referenced by G4INCLXXInterface::ApplyYourself().

00079 { return theConfig->echo(); }

void G4INCL::INCL::finalizeGlobalInfo (  ) 

Definition at line 678 of file G4INCLCascade.cc.

References G4INCL::GlobalInfo::errorReactionCrossSection, G4INCL::GlobalInfo::geometricCrossSection, G4INCL::GlobalInfo::nNucleonAbsorptions, G4INCL::GlobalInfo::nPionAbsorptions, G4INCL::GlobalInfo::nShots, G4INCL::GlobalInfo::nTransparents, G4INCL::GlobalInfo::nucleonAbsorptionCrossSection, G4INCL::GlobalInfo::pionAbsorptionCrossSection, and G4INCL::GlobalInfo::reactionCrossSection.

00678                                 {
00679     theGlobalInfo.nucleonAbsorptionCrossSection = theGlobalInfo.geometricCrossSection *
00680       ((G4double) theGlobalInfo.nNucleonAbsorptions) / ((G4double) theGlobalInfo.nShots);
00681     theGlobalInfo.pionAbsorptionCrossSection = theGlobalInfo.geometricCrossSection *
00682       ((G4double) theGlobalInfo.nPionAbsorptions) / ((G4double) theGlobalInfo.nShots);
00683     theGlobalInfo.reactionCrossSection = theGlobalInfo.geometricCrossSection *
00684       ((G4double) (theGlobalInfo.nShots - theGlobalInfo.nTransparents)) /
00685       ((G4double) theGlobalInfo.nShots);
00686     theGlobalInfo.errorReactionCrossSection = theGlobalInfo.geometricCrossSection *
00687       std::sqrt((G4double) (theGlobalInfo.nShots - theGlobalInfo.nTransparents)) /
00688       ((G4double) theGlobalInfo.nShots);
00689   }

const GlobalInfo& G4INCL::INCL::getGlobalInfo (  )  const [inline]

Definition at line 77 of file G4INCLCascade.hh.

00077 { return theGlobalInfo; }

G4bool G4INCL::INCL::initializeTarget ( const G4int  A,
const G4int  Z 
)

Definition at line 218 of file G4INCLCascade.cc.

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

Referenced by prepareReaction().

00218                                                             {
00219     delete nucleus;
00220 
00221     nucleus = new Nucleus(A, Z, theConfig, maxUniverseRadius);
00222     nucleus->getStore()->getBook()->reset();
00223     nucleus->initializeParticles();
00224 
00225     propagationModel->setNucleus(nucleus);
00226     return true;
00227   }

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

Definition at line 183 of file G4INCLCascade.cc.

References G4INCL::ParticleTable::drawRandomNaturalIsotope(), ERROR, G4INCL::GlobalInfo::geometricCrossSection, initializeTarget(), G4INCL::Config::isNaturalTarget(), G4INCL::CoulombDistortion::maxImpactParameter(), G4INCL::Math::tenPi, and G4INCL::ParticleSpecies::theA.

Referenced by processEvent().

00183                                                                                                                                    {
00184     if(A < 0 || A > 300 || Z < 1 || Z > 200) {
00185       ERROR("Unsupported target: A = " << A << " Z = " << Z << std::endl);
00186       ERROR("Target configuration rejected." << std::endl);
00187       return false;
00188     }
00189 
00190     // Initialise the maximum universe radius
00191     initUniverseRadius(projectileSpecies, kineticEnergy, A, Z);
00192 
00193     // Initialise the nucleus
00194     theZ = Z;
00195     if(theConfig->isNaturalTarget())
00196       theA = ParticleTable::drawRandomNaturalIsotope(Z);
00197     else
00198       theA = A;
00199     initializeTarget(theA, theZ);
00200 
00201     // Set the maximum impact parameter
00202     maxImpactParameter = CoulombDistortion::maxImpactParameter(projectileSpecies, kineticEnergy, nucleus);
00203     initMaxInteractionDistance(projectileSpecies, kineticEnergy); // for forced CN events
00204 
00205     // Set the geometric cross section
00206     theGlobalInfo.geometricCrossSection =
00207       Math::tenPi*std::pow(maxImpactParameter,2);
00208 
00209     // Set the minimum remnant size
00210     if(projectileSpecies.theA > 0)
00211       minRemnantSize = std::min(theA, 4);
00212     else
00213       minRemnantSize = std::min(theA-1, 4);
00214 
00215     return true;
00216   }

const EventInfo & G4INCL::INCL::processEvent ( ParticleSpecies const &  projectileSpecies,
const G4double  kineticEnergy,
const G4int  targetA,
const G4int  targetZ 
)

Definition at line 229 of file G4INCLCascade.cc.

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

00234         {
00235     // Set the target and the projectile
00236     targetInitSuccess = prepareReaction(projectileSpecies, kineticEnergy, targetA, targetZ);
00237 
00238     if(!targetInitSuccess) {
00239       WARN("Target initialisation failed for A=" << targetA << ", Z=" << targetZ << std::endl);
00240       theEventInfo.transparent=true;
00241       return theEventInfo;
00242     }
00243 
00244     const G4bool canRunCascade = preCascade(projectileSpecies, kineticEnergy);
00245     if(canRunCascade) {
00246       cascade();
00247       postCascade();
00248     }
00249     return theEventInfo;
00250   }

const EventInfo& G4INCL::INCL::processEvent (  )  [inline]

Definition at line 61 of file G4INCLCascade.hh.

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

Referenced by G4INCLXXInterface::ApplyYourself().

00061                                              {
00062         return processEvent(
00063             theConfig->getProjectileSpecies(),
00064             theConfig->getProjectileKineticEnergy(),
00065             theConfig->getTargetA(),
00066             theConfig->getTargetZ()
00067             );
00068       }


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:54:06 2013 for Geant4 by  doxygen 1.4.7