Geant4 11.1.1
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 theGlobalInfo.St = theConfig->getTargetS();
152 const ParticleSpecies theSpecies = theConfig->getProjectileSpecies();
153 theGlobalInfo.Ap = theSpecies.theA;
154 theGlobalInfo.Zp = theSpecies.theZ;
155 theGlobalInfo.Sp = theSpecies.theS;
156 theGlobalInfo.Ep = theConfig->getProjectileKineticEnergy();
157 theGlobalInfo.biasFactor = theConfig->getBias();
158#endif
159
160 fixedImpactParameter = theConfig->getImpactParameter();
161 }
static void setBias(const G4double b)
Set the global bias factor.
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.
G4int getTargetS() const
Get the target strangess number.
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.
Short_t St
Target strangeness number given as input.
Float_t Ep
Projectile kinetic energy given as input.
Float_t biasFactor
Bias factor.
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 Sp
Projectile strangeness 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 163 of file G4INCLCascade.cc.

163 {
165#ifndef INCLXX_IN_GEANT4_MODE
166 NuclearMassTable::deleteTable();
167#endif
174#ifndef INCLXX_IN_GEANT4_MODE
175 Logger::deleteLoggerSlave();
176#endif
179 cascadeAction->afterRunAction();
180 delete cascadeAction;
181 delete propagationModel;
182 delete theConfig;
183 }
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 744 of file G4INCLCascade.cc.

744 {
745 const G4double normalisationFactor = theGlobalInfo.geometricCrossSection /
746 ((G4double) theGlobalInfo.nShots);
747 theGlobalInfo.nucleonAbsorptionCrossSection = normalisationFactor *
748 ((G4double) theGlobalInfo.nNucleonAbsorptions);
749 theGlobalInfo.pionAbsorptionCrossSection = normalisationFactor *
750 ((G4double) theGlobalInfo.nPionAbsorptions);
751 theGlobalInfo.reactionCrossSection = normalisationFactor *
752 ((G4double) (theGlobalInfo.nShots - theGlobalInfo.nTransparents));
753 theGlobalInfo.errorReactionCrossSection = normalisationFactor *
754 std::sqrt((G4double) (theGlobalInfo.nShots - theGlobalInfo.nTransparents));
755 theGlobalInfo.forcedCNCrossSection = normalisationFactor *
756 ((G4double) theGlobalInfo.nForcedCompoundNucleus);
757 theGlobalInfo.errorForcedCNCrossSection = normalisationFactor *
758 std::sqrt((G4double) (theGlobalInfo.nForcedCompoundNucleus));
759 theGlobalInfo.completeFusionCrossSection = normalisationFactor *
760 ((G4double) theGlobalInfo.nCompleteFusion);
761 theGlobalInfo.errorCompleteFusionCrossSection = normalisationFactor *
762 std::sqrt((G4double) (theGlobalInfo.nCompleteFusion));
763 theGlobalInfo.energyViolationInteractionCrossSection = normalisationFactor *
764 ((G4double) theGlobalInfo.nEnergyViolationInteraction);
765
766 theGlobalInfo.initialRandomSeeds.assign(initialSeeds.begin(), initialSeeds.end());
767
768 Random::SeedVector theSeeds = Random::getSeeds();
769 theGlobalInfo.finalRandomSeeds.assign(theSeeds.begin(), theSeeds.end());
770 }
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 233 of file G4INCLCascade.cc.

233 {
234 delete nucleus;
235
236 nucleus = new Nucleus(A, Z, S, theConfig, maxUniverseRadius);
237 nucleus->getStore()->getBook().reset();
238 nucleus->initializeParticles();
239
240 propagationModel->setNucleus(nucleus);
241 return true;
242 }
G4double S(G4double temp)
const G4int Z[17]
const G4double A[17]
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 185 of file G4INCLCascade.cc.

185 {
186 if(A < 0 || A > 300 || Z < 1 || Z > 200) {
187 INCL_ERROR("Unsupported target: A = " << A << " Z = " << Z << " S = " << S << '\n'
188 << "Target configuration rejected." << '\n');
189 return false;
190 }
191 if(projectileSpecies.theType==Composite &&
192 (projectileSpecies.theZ==projectileSpecies.theA || projectileSpecies.theZ==0)) {
193 INCL_ERROR("Unsupported projectile: A = " << projectileSpecies.theA << " Z = " << projectileSpecies.theZ << " S = " << projectileSpecies.theS << '\n'
194 << "Projectile configuration rejected." << '\n');
195 return false;
196 }
197
198 // Reset the forced-transparent flag
199 forceTransparent = false;
200
201 // Initialise the maximum universe radius
202 initUniverseRadius(projectileSpecies, kineticEnergy, A, Z);
203
204 // Initialise the nucleus
205 theZ = Z;
206 theS = S;
207 if(theConfig->isNaturalTarget())
209 else
210 theA = A;
211 initializeTarget(theA, theZ, theS);
212
213 // Set the maximum impact parameter
214 maxImpactParameter = CoulombDistortion::maxImpactParameter(projectileSpecies, kineticEnergy, nucleus);
215 INCL_DEBUG("Maximum impact parameter initialised: " << maxImpactParameter << '\n');
216
217 // For forced CN events
218 initMaxInteractionDistance(projectileSpecies, kineticEnergy);
219
220 // Set the geometric cross section
221 theGlobalInfo.geometricCrossSection =
222 Math::tenPi*std::pow(maxImpactParameter,2);
223
224 // Set the minimum remnant size
225 if(projectileSpecies.theA > 0)
226 minRemnantSize = std::min(theA, 4);
227 else
228 minRemnantSize = std::min(theA-1, 4);
229
230 return true;
231 }
#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 }
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 244 of file G4INCLCascade.cc.

250 {
251 // ReInitialize the bias vector
253 //Particle::INCLBiasVector.Clear();
255
256 // Set the target and the projectile
257 targetInitSuccess = prepareReaction(projectileSpecies, kineticEnergy, targetA, targetZ, targetS);
258
259 if(!targetInitSuccess) {
260 INCL_WARN("Target initialisation failed for A=" << targetA << ", Z=" << targetZ << ", S=" << targetS << '\n');
261 theEventInfo.transparent=true;
262 return theEventInfo;
263 }
264
265 cascadeAction->beforeCascadeAction(propagationModel);
266
267 const G4bool canRunCascade = preCascade(projectileSpecies, kineticEnergy);
268 if(canRunCascade) {
269 cascade();
270 postCascade();
271 cascadeAction->afterCascadeAction(nucleus);
272 }
273 updateGlobalInfo();
274 return theEventInfo;
275 }
#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: