Import Geant4 11.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2021-12-10 16:15:15 +00:00
committed by Ben Morgan
parent 6399a014b6
commit 80e2389dd8
3932 changed files with 202519 additions and 246221 deletions
@@ -14,6 +14,12 @@ code and to keep track of all tags.
* Please list in reverse chronological order (last date on top)
---------------------------------------------------------------
04 August 2021 - Alberto Ribon (hadr-emd-V10-07-02)
---------------------------------------------------
- G4EMDissociation : set the creator model ID for secondaries created
by projectile and target diffraction, using the new version of
G4PhysicsModelCatalog
16 April 2021 - Ben Morgan (hadr-emd-V10-07-01)
--------------------------------------------------
- Migrate build to modular CMake API
@@ -79,11 +79,11 @@ class G4EMDissociation : public G4HadronicInteraction
{
public:
G4EMDissociation();
G4EMDissociation(const G4EMDissociation& emd);
G4EMDissociation (G4ExcitationHandler *);
~G4EMDissociation ();
const G4EMDissociation& operator=(G4EMDissociation &right);
G4EMDissociation(const G4EMDissociation& emd) = delete;
const G4EMDissociation& operator=(G4EMDissociation &right) = delete;
virtual G4HadFinalState* ApplyYourself(const G4HadProjectile&, G4Nucleus&);
@@ -95,5 +95,7 @@ class G4EMDissociation : public G4HadronicInteraction
G4bool handlerDefinedInternally;
G4EMDissociationCrossSection* dissociationCrossSection;
G4EMDissociationSpectrum* thePhotonSpectrum;
G4int secID_projectileDissociation; // Creator model ID for the secondaries created by projectile dissociation
G4int secID_targetDissociation; // Creator model ID for the secondaries created by target dissociation
};
#endif
@@ -74,9 +74,12 @@
#include "G4ReactionProductVector.hh"
#include "Randomize.hh"
#include "globals.hh"
#include "G4PhysicsModelCatalog.hh"
G4EMDissociation::G4EMDissociation():G4HadronicInteraction("EMDissociation") {
G4EMDissociation::G4EMDissociation() :
G4HadronicInteraction("EMDissociation"),
secID_projectileDissociation(-1), secID_targetDissociation(-1)
{
// Send message to stdout to advise that the G4EMDissociation model is being
// used.
PrintWelcomeMessage();
@@ -98,9 +101,15 @@ G4EMDissociation::G4EMDissociation():G4HadronicInteraction("EMDissociation") {
// Set the default verbose level to 0 - no output.
verboseLevel = 0;
// Creator model ID for the secondaries created by this model
secID_projectileDissociation = G4PhysicsModelCatalog::GetModelID( "model_projectile" + GetModelName() );
secID_targetDissociation = G4PhysicsModelCatalog::GetModelID( "model_target" + GetModelName() );
}
G4EMDissociation::G4EMDissociation (G4ExcitationHandler *aExcitationHandler)
G4EMDissociation::G4EMDissociation (G4ExcitationHandler *aExcitationHandler) :
G4HadronicInteraction("EMDissociation"),
secID_projectileDissociation(-1), secID_targetDissociation(-1)
{
// Send message to stdout to advise that the G4EMDissociation model is being
// used.
@@ -119,6 +128,10 @@ G4EMDissociation::G4EMDissociation (G4ExcitationHandler *aExcitationHandler)
SetMinEnergy(100.0*MeV);
SetMaxEnergy(500.0*GeV);
verboseLevel = 0;
// Creator model ID for the secondaries created by this model
secID_projectileDissociation = G4PhysicsModelCatalog::GetModelID( "model_projectile" + GetModelName() );
secID_targetDissociation = G4PhysicsModelCatalog::GetModelID( "model_target" + GetModelName() );
}
@@ -197,7 +210,8 @@ G4HadFinalState *G4EMDissociation::ApplyYourself
// Now sample whether the interaction involved EM dissociation of the projectile
// or the target.
G4int secID = -1; // Creator model ID for the secondaries
if (G4UniformRand() <
totCrossSectionP / (totCrossSectionP + totCrossSectionT)) {
@@ -207,6 +221,7 @@ G4HadFinalState *G4EMDissociation::ApplyYourself
// which passed from the target nucleus ... this will be used to define the
// excitation of the projectile.
secID = secID_projectileDissociation;
mass = MP;
if (G4UniformRand() < dissociationCrossSection->
GetWilsonProbabilityForProtonDissociation (AP, ZP))
@@ -253,7 +268,8 @@ G4HadFinalState *G4EMDissociation::ApplyYourself
// proton or a neutron was ejected. Then determine the energy of the virtual
// gamma ray which passed from the projectile nucleus ... this will be used to
// define the excitation of the target.
secID = secID_targetDissociation;
mass = MT;
if (G4UniformRand() < dissociationCrossSection->
GetWilsonProbabilityForProtonDissociation (AT, ZT))
@@ -294,7 +310,7 @@ G4HadFinalState *G4EMDissociation::ApplyYourself
G4ThreeVector v = pP.vect();
v.setMag(1.0);
G4DynamicParticle *changedP = new G4DynamicParticle (definitionP, v, E*AP-Eg);
theParticleChange.AddSecondary (changedP);
theParticleChange.AddSecondary (changedP, secID);
if (verboseLevel >= 2)
{
G4cout <<"Projectile change:" <<G4endl;
@@ -341,7 +357,7 @@ G4HadFinalState *G4EMDissociation::ApplyYourself
// The "decay" products have to be transferred to the G4HadFinalState object.
// Furthermore, the residual nucleus should be de-excited.
theParticleChange.AddSecondary (dynamicNucleon);
theParticleChange.AddSecondary (dynamicNucleon, secID);
if (verboseLevel >= 2) {
G4cout <<"Nucleon from the EMD process:" <<G4endl;
dynamicNucleon->DumpInfo();
@@ -369,7 +385,7 @@ G4HadFinalState *G4EMDissociation::ApplyYourself
for (iter = products->begin(); iter != products->end(); ++iter) {
secondary = new G4DynamicParticle((*iter)->GetDefinition(),
(*iter)->GetTotalEnergy(), (*iter)->GetMomentum());
theParticleChange.AddSecondary (secondary);
theParticleChange.AddSecondary (secondary, secID);
}
delete products;