Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
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.
 
INCLoperator= (const INCL &rhs)
 Dummy assignment operator to silence Coverity warning.
 
G4bool prepareReaction (const ParticleSpecies &projectileSpecies, const G4double kineticEnergy, const G4int A, const G4int Z, const G4int S)
 
G4bool initializeTarget (const G4int A, const G4int Z, const G4int S)
 
const EventInfoprocessEvent ()
 
const EventInfoprocessEvent (ParticleSpecies const &projectileSpecies, const G4double kineticEnergy, const G4int targetA, const G4int targetZ, const G4int targetS)
 
void finalizeGlobalInfo (Random::SeedVector const &initialSeeds)
 
const GlobalInfogetGlobalInfo () const
 

Detailed Description

Definition at line 52 of file G4INCLCascade.hh.

Constructor & Destructor Documentation

◆ INCL() [1/2]

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

Definition at line 79 of file G4INCLCascade.cc.

80 :propagationModel(0), theA(208), theZ(82), theS(0),
81 targetInitSuccess(false),
82 maxImpactParameter(0.),
83 maxUniverseRadius(0.),
84 maxInteractionDistance(0.),
85 fixedImpactParameter(0.),
86 theConfig(config),
87 nucleus(NULL),
88 forceTransparent(false),
89 minRemnantSize(4)
90 {
91 // Set the logger object.
92#ifdef INCLXX_IN_GEANT4_MODE
94#else // INCLXX_IN_GEANT4_MODE
95 Logger::initialize(theConfig);
96#endif // INCLXX_IN_GEANT4_MODE
97
98 // Set the random number generator algorithm. The system can support
99 // multiple different generator algorithms in a completely
100 // transparent way.
101 Random::initialize(theConfig);
102
103 // Select the Pauli and CDPP blocking algorithms
104 Pauli::initialize(theConfig);
105
106 // Set the cross-section set
107 CrossSections::initialize(theConfig);
108
109 // Set the phase-space generator
111
112 // Select the Coulomb-distortion algorithm:
114
115 // Select the clustering algorithm:
116 Clustering::initialize(theConfig);
117
118 // Initialize the INCL particle table:
119 ParticleTable::initialize(theConfig);
120
121 // Initialize the value of cutNN in BinaryCollisionAvatar
123
124 // Initialize the value of strange cross section bias
126
127 // Propagation model is responsible for finding avatars and
128 // transporting the particles. In principle this step is "hidden"
129 // behind an abstract interface and the rest of the system does not
130 // care how the transportation and avatar finding is done. This
131 // should allow us to "easily" experiment with different avatar
132 // finding schemes and even to support things like curved
133 // trajectories in the future.
134 propagationModel = new StandardPropagationModel(theConfig->getLocalEnergyBBType(),theConfig->getLocalEnergyPiType(),theConfig->getHadronizationTime());
136 cascadeAction = new AvatarDumpAction();
137 else
138 cascadeAction = new CascadeAction();
139 cascadeAction->beforeRunAction(theConfig);
140
141 theGlobalInfo.cascadeModel = theConfig->getVersionString();
142 theGlobalInfo.deexcitationModel = theConfig->getDeExcitationString();
143#ifdef INCL_ROOT_USE
144 theGlobalInfo.rootSelection = theConfig->getROOTSelectionString();
145#endif
146
147#ifndef INCLXX_IN_GEANT4_MODE
148 // Fill in the global information
149 theGlobalInfo.At = theConfig->getTargetA();
150 theGlobalInfo.Zt = theConfig->getTargetZ();
151 const ParticleSpecies theSpecies = theConfig->getProjectileSpecies();
152 theGlobalInfo.Ap = theSpecies.theA;
153 theGlobalInfo.Zp = theSpecies.theZ;
154 theGlobalInfo.Ep = theConfig->getProjectileKineticEnergy();
155#endif
156
157 fixedImpactParameter = theConfig->getImpactParameter();
158 }
static void setBias(const G4double b)
Set the bias.
static void setCutNN(const G4double c)
static std::string const getVersionString()
Get the INCL version string.
G4double getImpactParameter() const
CascadeActionType getCascadeActionType() const
Get the cascade-action type.
G4int getTargetA() const
Get the target mass number.
Definition: G4INCLConfig.hh:94
G4double getProjectileKineticEnergy() const
Get the projectile kinetic energy.
G4double getHadronizationTime() const
Get the hadronization time.
ParticleSpecies getProjectileSpecies() const
Get the projectile species.
LocalEnergyType getLocalEnergyPiType() const
Get the type of local energy for pi-N and decay avatars.
G4double getCutNN() const
LocalEnergyType getLocalEnergyBBType() const
Get the type of local energy for N-N avatars.
G4double getBias() const
Get the bias.
G4int getTargetZ() const
Get the target charge number.
Definition: G4INCLConfig.hh:97
std::string getDeExcitationString() const
Get the de-excitation string.
void initialize(Config const *const theConfig)
Initialize the clustering model based on the Config object.
void initialize(Config const *const theConfig)
Initialize the Coulomb-distortion algorithm.
void initialize(Config const *const theConfig)
void initVerbosityLevelFromEnvvar()
void initialize(Config const *const theConfig=0)
Initialize the particle table.
void initialize(Config const *const aConfig)
Initialise blockers according to a Config object.
void initialize(Config const *const theConfig)
void initialize(Config const *const)
Initialize generator according to a Config object.
std::string deexcitationModel
Name of the de-excitation model.
Float_t Ep
Projectile kinetic energy given as input.
Short_t At
Target mass number given as input.
Short_t Zt
Target charge number given as input.
Short_t Ap
Projectile mass number given as input.
Short_t Zp
Projectile charge number given as input.
std::string cascadeModel
Name of the cascade model.

◆ ~INCL()

G4INCL::INCL::~INCL ( )

Definition at line 160 of file G4INCLCascade.cc.

160 {
162#ifndef INCLXX_IN_GEANT4_MODE
163 NuclearMassTable::deleteTable();
164#endif
171#ifndef INCLXX_IN_GEANT4_MODE
172 Logger::deleteLoggerSlave();
173#endif
176 cascadeAction->afterRunAction();
177 delete cascadeAction;
178 delete propagationModel;
179 delete theConfig;
180 }
static void deleteBackupParticles()
Release the memory allocated for the backup particles.
void deleteClusteringModel()
Delete the clustering model.
void deleteCoulomb()
Delete the Coulomb-distortion object.
void clearCache()
Clear the INuclearPotential cache.
void deleteBlockers()
Delete blockers.
void deleteGenerator()

◆ INCL() [2/2]

G4INCL::INCL::INCL ( const INCL rhs)

Dummy copy constructor to silence Coverity warning.

Member Function Documentation

◆ finalizeGlobalInfo()

void G4INCL::INCL::finalizeGlobalInfo ( Random::SeedVector const &  initialSeeds)

Definition at line 741 of file G4INCLCascade.cc.

741 {
742 const G4double normalisationFactor = theGlobalInfo.geometricCrossSection /
743 ((G4double) theGlobalInfo.nShots);
744 theGlobalInfo.nucleonAbsorptionCrossSection = normalisationFactor *
745 ((G4double) theGlobalInfo.nNucleonAbsorptions);
746 theGlobalInfo.pionAbsorptionCrossSection = normalisationFactor *
747 ((G4double) theGlobalInfo.nPionAbsorptions);
748 theGlobalInfo.reactionCrossSection = normalisationFactor *
749 ((G4double) (theGlobalInfo.nShots - theGlobalInfo.nTransparents));
750 theGlobalInfo.errorReactionCrossSection = normalisationFactor *
751 std::sqrt((G4double) (theGlobalInfo.nShots - theGlobalInfo.nTransparents));
752 theGlobalInfo.forcedCNCrossSection = normalisationFactor *
753 ((G4double) theGlobalInfo.nForcedCompoundNucleus);
754 theGlobalInfo.errorForcedCNCrossSection = normalisationFactor *
755 std::sqrt((G4double) (theGlobalInfo.nForcedCompoundNucleus));
756 theGlobalInfo.completeFusionCrossSection = normalisationFactor *
757 ((G4double) theGlobalInfo.nCompleteFusion);
758 theGlobalInfo.errorCompleteFusionCrossSection = normalisationFactor *
759 std::sqrt((G4double) (theGlobalInfo.nCompleteFusion));
760 theGlobalInfo.energyViolationInteractionCrossSection = normalisationFactor *
761 ((G4double) theGlobalInfo.nEnergyViolationInteraction);
762
763 theGlobalInfo.initialRandomSeeds.assign(initialSeeds.begin(), initialSeeds.end());
764
765 Random::SeedVector theSeeds = Random::getSeeds();
766 theGlobalInfo.finalRandomSeeds.assign(theSeeds.begin(), theSeeds.end());
767 }
double G4double
Definition: G4Types.hh:83
SeedVector getSeeds()
Definition: G4INCLRandom.cc:89
Int_t nNucleonAbsorptions
Number of nucleon absorptions (no outcoming particles)
Float_t forcedCNCrossSection
Calculated forced-compound-nucleus cross section.
Float_t pionAbsorptionCrossSection
Pion absorption cross section.
Float_t errorCompleteFusionCrossSection
Error on the calculated complete-fusion cross section (nParticles==0)
Int_t nEnergyViolationInteraction
Number of attempted collisions/decays for which the energy-conservation algorithm failed to find a so...
std::vector< Int_t > initialRandomSeeds
Initial seeds for the pseudo-random-number generator.
Int_t nShots
Number of shots.
Float_t completeFusionCrossSection
Calculated complete-fusion cross section (nParticles==0)
Float_t nucleonAbsorptionCrossSection
Nucleon absorption cross section.
Float_t errorReactionCrossSection
Error on the calculated reaction cross section.
std::vector< Int_t > finalRandomSeeds
Final seeds for the pseudo-random-number generator.
Int_t nPionAbsorptions
Number of nucleon absorptions (no outcoming pions)
Float_t energyViolationInteractionCrossSection
Cross section for attempted collisions/decays for which the energy-conservation algorithm failed to f...
Int_t nCompleteFusion
Number of complete-fusion events (nParticles==0)
Int_t nTransparents
Number of transparent shots.
Int_t nForcedCompoundNucleus
Number of forced compound-nucleus events.
Float_t reactionCrossSection
Calculated reaction cross section.
Float_t errorForcedCNCrossSection
Error on the calculated forced-compound-nucleus cross section.
Float_t geometricCrossSection
Geometric cross section.

◆ getGlobalInfo()

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

Definition at line 84 of file G4INCLCascade.hh.

84{ return theGlobalInfo; }

◆ initializeTarget()

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

Definition at line 230 of file G4INCLCascade.cc.

230 {
231 delete nucleus;
232
233 nucleus = new Nucleus(A, Z, S, theConfig, maxUniverseRadius);
234 nucleus->getStore()->getBook().reset();
235 nucleus->initializeParticles();
236
237 propagationModel->setNucleus(nucleus);
238 return true;
239 }
double S(double temp)
void reset()
Definition: G4INCLBook.hh:52
virtual void setNucleus(G4INCL::Nucleus *nucleus)=0
Store * getStore() const
void initializeParticles()
Book & getBook()
Definition: G4INCLStore.hh:259

Referenced by prepareReaction().

◆ operator=()

INCL & G4INCL::INCL::operator= ( const INCL rhs)

Dummy assignment operator to silence Coverity warning.

◆ prepareReaction()

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

Definition at line 182 of file G4INCLCascade.cc.

182 {
183 if(A < 0 || A > 300 || Z < 1 || Z > 200) {
184 INCL_ERROR("Unsupported target: A = " << A << " Z = " << Z << " S = " << S << '\n'
185 << "Target configuration rejected." << '\n');
186 return false;
187 }
188 if(projectileSpecies.theType==Composite &&
189 (projectileSpecies.theZ==projectileSpecies.theA || projectileSpecies.theZ==0)) {
190 INCL_ERROR("Unsupported projectile: A = " << projectileSpecies.theA << " Z = " << projectileSpecies.theZ << " S = " << projectileSpecies.theS << '\n'
191 << "Projectile configuration rejected." << '\n');
192 return false;
193 }
194
195 // Reset the forced-transparent flag
196 forceTransparent = false;
197
198 // Initialise the maximum universe radius
199 initUniverseRadius(projectileSpecies, kineticEnergy, A, Z);
200
201 // Initialise the nucleus
202 theZ = Z;
203 theS = S;
204 if(theConfig->isNaturalTarget())
206 else
207 theA = A;
208 initializeTarget(theA, theZ, theS);
209
210 // Set the maximum impact parameter
211 maxImpactParameter = CoulombDistortion::maxImpactParameter(projectileSpecies, kineticEnergy, nucleus);
212 INCL_DEBUG("Maximum impact parameter initialised: " << maxImpactParameter << '\n');
213
214 // For forced CN events
215 initMaxInteractionDistance(projectileSpecies, kineticEnergy);
216
217 // Set the geometric cross section
218 theGlobalInfo.geometricCrossSection =
219 Math::tenPi*std::pow(maxImpactParameter,2);
220
221 // Set the minimum remnant size
222 if(projectileSpecies.theA > 0)
223 minRemnantSize = std::min(theA, 4);
224 else
225 minRemnantSize = std::min(theA-1, 4);
226
227 return true;
228 }
double A(double temperature)
#define INCL_ERROR(x)
#define INCL_DEBUG(x)
G4bool isNaturalTarget() const
Natural targets.
Definition: G4INCLConfig.hh:87
G4bool initializeTarget(const G4int A, const G4int Z, const G4int S)
G4double maxImpactParameter(ParticleSpecies const &p, const G4double kinE, Nucleus const *const n)
Return the maximum impact parameter for Coulomb-distorted trajectories.
const G4double tenPi
G4int drawRandomNaturalIsotope(const G4int Z)

Referenced by processEvent().

◆ processEvent() [1/2]

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

Definition at line 66 of file G4INCLCascade.hh.

66 {
67 return processEvent(
68 theConfig->getProjectileSpecies(),
69 theConfig->getProjectileKineticEnergy(),
70 theConfig->getTargetA(),
71 theConfig->getTargetZ(),
72 theConfig->getTargetS()
73 );
74 }
G4int getTargetS() const
Get the target strangess number.
const EventInfo & processEvent()

Referenced by G4INCLXXInterface::ApplyYourself(), and processEvent().

◆ processEvent() [2/2]

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

Definition at line 241 of file G4INCLCascade.cc.

247 {
248 // ReInitialize the bias vector
250 //Particle::INCLBiasVector.Clear();
252
253 // Set the target and the projectile
254 targetInitSuccess = prepareReaction(projectileSpecies, kineticEnergy, targetA, targetZ, targetS);
255
256 if(!targetInitSuccess) {
257 INCL_WARN("Target initialisation failed for A=" << targetA << ", Z=" << targetZ << ", S=" << targetS << '\n');
258 theEventInfo.transparent=true;
259 return theEventInfo;
260 }
261
262 cascadeAction->beforeCascadeAction(propagationModel);
263
264 const G4bool canRunCascade = preCascade(projectileSpecies, kineticEnergy);
265 if(canRunCascade) {
266 cascade();
267 postCascade();
268 cascadeAction->afterCascadeAction(nucleus);
269 }
270 updateGlobalInfo();
271 return theEventInfo;
272 }
#define INCL_WARN(x)
bool G4bool
Definition: G4Types.hh:86
G4bool prepareReaction(const ParticleSpecies &projectileSpecies, const G4double kineticEnergy, const G4int A, const G4int Z, const G4int S)
static std::vector< G4double > INCLBiasVector
Time ordered vector of all bias applied.
static G4ThreadLocal G4int nextBiasedCollisionID
Bool_t transparent
True if the event is transparent.

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