Import Geant4 11.0.0 source tree
This commit is contained in:
committed by
Ben Morgan
parent
6399a014b6
commit
80e2389dd8
@@ -13,6 +13,11 @@ code and to keep track of all tags.
|
||||
* Please list in reverse chronological order (last date on top)
|
||||
---------------------------------------------------------------
|
||||
|
||||
04-Aug-2021 Alberto Ribon (had-abrasion-V10-07-02)
|
||||
--------------------------------------------------
|
||||
- G4WilsonAbrasionModel : migrated to the new version of
|
||||
G4PhysicsModelCatalog
|
||||
|
||||
16-Apr-2021 Ben Morgan (had-abrasion-V10-07-01)
|
||||
--------------------------------------------------
|
||||
- Migrate build to modular CMake API
|
||||
|
||||
@@ -81,9 +81,8 @@ class G4WilsonAbrasionModel : public G4HadronicInteraction
|
||||
G4WilsonAbrasionModel(G4ExcitationHandler*);
|
||||
~G4WilsonAbrasionModel();
|
||||
|
||||
G4WilsonAbrasionModel(const G4WilsonAbrasionModel& right);
|
||||
|
||||
const G4WilsonAbrasionModel& operator=(G4WilsonAbrasionModel& right);
|
||||
G4WilsonAbrasionModel(const G4WilsonAbrasionModel& right) = delete;
|
||||
const G4WilsonAbrasionModel& operator=(G4WilsonAbrasionModel& right) = delete;
|
||||
|
||||
virtual G4HadFinalState* ApplyYourself(const G4HadProjectile&, G4Nucleus&);
|
||||
void SetVerboseLevel(G4int);
|
||||
@@ -114,6 +113,7 @@ class G4WilsonAbrasionModel : public G4HadronicInteraction
|
||||
G4double B;
|
||||
G4double third;
|
||||
G4double fradius;
|
||||
G4int secID; // Creator model ID for the secondaries created by this model
|
||||
};
|
||||
|
||||
inline void
|
||||
|
||||
@@ -111,9 +111,11 @@
|
||||
#include "G4Exp.hh"
|
||||
#include "G4Pow.hh"
|
||||
|
||||
#include "G4PhysicsModelCatalog.hh"
|
||||
|
||||
|
||||
G4WilsonAbrasionModel::G4WilsonAbrasionModel(G4bool useAblation1)
|
||||
:G4HadronicInteraction("G4WilsonAbrasion")
|
||||
: G4HadronicInteraction("G4WilsonAbrasion"), secID(-1)
|
||||
{
|
||||
// Send message to stdout to advise that the G4Abrasion model is being used.
|
||||
PrintWelcomeMessage();
|
||||
@@ -150,6 +152,9 @@ G4WilsonAbrasionModel::G4WilsonAbrasionModel(G4bool useAblation1)
|
||||
fradius = 0.99;
|
||||
conserveEnergy = false;
|
||||
conserveMomentum = true;
|
||||
|
||||
// Creator model ID for the secondaries created by this model
|
||||
secID = G4PhysicsModelCatalog::GetModelID( "model_" + GetModelName() );
|
||||
}
|
||||
|
||||
void G4WilsonAbrasionModel::ModelDescription(std::ostream& outFile) const
|
||||
@@ -164,7 +169,8 @@ void G4WilsonAbrasionModel::ModelDescription(std::ostream& outFile) const
|
||||
<< "projectile energies between 70 MeV/n and 10.1 GeV/n. \n";
|
||||
}
|
||||
|
||||
G4WilsonAbrasionModel::G4WilsonAbrasionModel(G4ExcitationHandler* aExcitationHandler)
|
||||
G4WilsonAbrasionModel::G4WilsonAbrasionModel(G4ExcitationHandler* aExcitationHandler) :
|
||||
G4HadronicInteraction("G4WilsonAbrasion"), secID(-1)
|
||||
{
|
||||
// Send message to stdout to advise that the G4Abrasion model is being used.
|
||||
|
||||
@@ -196,13 +202,16 @@ G4WilsonAbrasionModel::G4WilsonAbrasionModel(G4ExcitationHandler* aExcitationHan
|
||||
// npK, when mutiplied by the nuclear Fermi momentum, determines the range of
|
||||
// momentum over which the secondary nucleon momentum is sampled.
|
||||
//
|
||||
r0sq = 0.0; //A.R. 14-Aug-2012 Coverity fix.
|
||||
r0sq = 0.0;
|
||||
npK = 5.0;
|
||||
B = 10.0 * MeV;
|
||||
third = 1.0 / 3.0;
|
||||
fradius = 0.99;
|
||||
conserveEnergy = false;
|
||||
conserveMomentum = true;
|
||||
|
||||
// Creator model ID for the secondaries created by this model
|
||||
secID = G4PhysicsModelCatalog::GetModelID( "model_" + GetModelName() );
|
||||
}
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@@ -616,9 +625,9 @@ G4HadFinalState *G4WilsonAbrasionModel::ApplyYourself (
|
||||
G4DynamicParticle *secondary =
|
||||
new G4DynamicParticle((*iter)->GetDefinition(),
|
||||
(*iter)->GetTotalEnergy(), (*iter)->GetMomentum());
|
||||
theParticleChange.AddSecondary (secondary); // Added MHM 20050118
|
||||
theParticleChange.AddSecondary (secondary, secID);
|
||||
G4String particleName = (*iter)->GetDefinition()->GetParticleName();
|
||||
delete (*iter); // get rid of leftover particle def! // Added MHM 20050118
|
||||
delete (*iter); // get rid of leftover particle def!
|
||||
if (verboseLevel >= 2 && particleName.find("[",0) < particleName.size())
|
||||
{
|
||||
G4cout <<"------------------------" <<G4endl;
|
||||
@@ -629,7 +638,7 @@ G4HadFinalState *G4WilsonAbrasionModel::ApplyYourself (
|
||||
<<G4endl;
|
||||
}
|
||||
}
|
||||
delete products; // Added MHM 20050118
|
||||
delete products;
|
||||
}
|
||||
//
|
||||
//
|
||||
@@ -653,9 +662,9 @@ G4HadFinalState *G4WilsonAbrasionModel::ApplyYourself (
|
||||
G4DynamicParticle *secondary =
|
||||
new G4DynamicParticle((*iter)->GetDefinition(),
|
||||
(*iter)->GetTotalEnergy(), (*iter)->GetMomentum());
|
||||
theParticleChange.AddSecondary (secondary);
|
||||
theParticleChange.AddSecondary (secondary, secID);
|
||||
G4String particleName = (*iter)->GetDefinition()->GetParticleName();
|
||||
delete (*iter); // get rid of leftover particle def! // Added MHM 20050118
|
||||
delete (*iter); // get rid of leftover particle def!
|
||||
if (verboseLevel >= 2 && particleName.find("[",0) < particleName.size())
|
||||
{
|
||||
G4cout <<"--------------------" <<G4endl;
|
||||
@@ -666,7 +675,7 @@ G4HadFinalState *G4WilsonAbrasionModel::ApplyYourself (
|
||||
<<G4endl;
|
||||
}
|
||||
}
|
||||
delete products; // Added MHM 20050118
|
||||
delete products;
|
||||
}
|
||||
|
||||
if (verboseLevel >= 2)
|
||||
@@ -766,7 +775,7 @@ G4Fragment *G4WilsonAbrasionModel::GetAbradedNucleons (G4int Dabr, G4double A,
|
||||
G4double nucleonMass = typeNucleon->GetPDGMass();
|
||||
G4double E = std::sqrt(p*p + nucleonMass*nucleonMass)-nucleonMass;
|
||||
dynamicNucleon = new G4DynamicParticle(typeNucleon,direction,E);
|
||||
theParticleChange.AddSecondary (dynamicNucleon);
|
||||
theParticleChange.AddSecondary (dynamicNucleon, secID);
|
||||
pabr += p*direction;
|
||||
}
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user