Import Geant4 11.0.0 source tree
This commit is contained in:
committed by
Ben Morgan
parent
6399a014b6
commit
80e2389dd8
@@ -14,6 +14,13 @@ code and to keep track of all tags.
|
||||
* Please list in reverse chronological order (last date on top)
|
||||
---------------------------------------------------------------
|
||||
|
||||
04 August 2021 - A.Ribon (hadr-cohe-V10-07-04)
|
||||
--------------------------------------------------
|
||||
- G4HadronElastic, G4LEnp, G4LEpp, G4LEHadronProtonElastic,
|
||||
G4NeutronElectronElModel, G4NeutrinoElectronNcModel,
|
||||
G4ChargeExchange, G4LMsdGenerator : set the creator model ID for the
|
||||
secondaries created, using the new version of G4PhysicsModelCatalog
|
||||
|
||||
16 April 2021 - Ben Morgan (hadr-cohe-V10-07-03)
|
||||
--------------------------------------------------
|
||||
- Migrate build to modular CMake API
|
||||
|
||||
@@ -55,6 +55,10 @@ public:
|
||||
explicit G4ChargeExchange();
|
||||
|
||||
~G4ChargeExchange() override;
|
||||
G4ChargeExchange( const G4ChargeExchange &right ) = delete;
|
||||
const G4ChargeExchange & operator=( const G4ChargeExchange &right ) = delete;
|
||||
G4bool operator==( const G4ChargeExchange &right ) const = delete;
|
||||
G4bool operator!=( const G4ChargeExchange &right ) const = delete;
|
||||
|
||||
G4HadFinalState* ApplyYourself(const G4HadProjectile& aTrack,
|
||||
G4Nucleus& targetNucleus) override;
|
||||
@@ -96,6 +100,8 @@ private:
|
||||
G4ParticleDefinition* theHe3;
|
||||
|
||||
G4double lowestEnergyLimit;
|
||||
|
||||
G4int secID; // Creator model ID for the secondaries created by this model
|
||||
};
|
||||
|
||||
inline void G4ChargeExchange::SetLowestEnergyLimit(G4double value)
|
||||
|
||||
@@ -75,6 +75,7 @@ public:
|
||||
protected:
|
||||
|
||||
G4double pLocalTmax;
|
||||
G4int secID; // Creator model ID for the recoil
|
||||
|
||||
private:
|
||||
|
||||
|
||||
@@ -90,6 +90,7 @@ class G4LMsdGenerator : public G4HadronicInteraction
|
||||
// G4ParticleDefinition* fParticle;
|
||||
|
||||
G4int fPDGencoding;
|
||||
G4int secID; // Creator model ID for the secondaries created by this model
|
||||
|
||||
static const G4double fMxBdata[23][2];
|
||||
static const G4double fProbMx[60][2];
|
||||
|
||||
+1
-1
@@ -52,7 +52,7 @@ class G4NeutronElectronElModel : public G4HadronElastic
|
||||
{
|
||||
public:
|
||||
|
||||
G4NeutronElectronElModel(const G4String& name = "nu-e-elastic");
|
||||
G4NeutronElectronElModel(const G4String& name = "n-e-elastic");
|
||||
|
||||
virtual ~G4NeutronElectronElModel();
|
||||
|
||||
|
||||
@@ -50,9 +50,10 @@
|
||||
#include "G4Pow.hh"
|
||||
|
||||
#include "G4HadronicParameters.hh"
|
||||
#include "G4PhysicsModelCatalog.hh"
|
||||
|
||||
|
||||
G4ChargeExchange::G4ChargeExchange() : G4HadronicInteraction("Charge Exchange")
|
||||
G4ChargeExchange::G4ChargeExchange() : G4HadronicInteraction("Charge Exchange"), secID(-1)
|
||||
{
|
||||
SetMinEnergy( 0.0*GeV );
|
||||
SetMaxEnergy( G4HadronicParameters::Instance()->GetMaxEnergy() );
|
||||
@@ -88,6 +89,8 @@ G4ChargeExchange::G4ChargeExchange() : G4HadronicInteraction("Charge Exchange")
|
||||
theT = G4Triton::Triton();
|
||||
theA = G4Alpha::Alpha();
|
||||
theHe3 = G4He3::He3();
|
||||
|
||||
secID = G4PhysicsModelCatalog::GetModelID( "model_ChargeExchange" );
|
||||
}
|
||||
|
||||
G4ChargeExchange::~G4ChargeExchange()
|
||||
@@ -285,7 +288,7 @@ G4HadFinalState* G4ChargeExchange::ApplyYourself(
|
||||
theParticleChange.SetStatusChange(stopAndKill);
|
||||
theParticleChange.SetEnergyChange(0.0);
|
||||
G4DynamicParticle * aSec = new G4DynamicParticle(theSecondary, nlv1);
|
||||
theParticleChange.AddSecondary(aSec);
|
||||
theParticleChange.AddSecondary(aSec, secID);
|
||||
|
||||
G4double erec = std::max(nlv0.e() - m21, 0.0);
|
||||
|
||||
@@ -298,7 +301,7 @@ G4HadFinalState* G4ChargeExchange::ApplyYourself(
|
||||
aSec->SetKineticEnergy(0.0);
|
||||
} else if(erec > GetRecoilEnergyThreshold()) {
|
||||
aSec = new G4DynamicParticle(theRecoil, nlv0);
|
||||
theParticleChange.AddSecondary(aSec);
|
||||
theParticleChange.AddSecondary(aSec, secID);
|
||||
} else {
|
||||
theParticleChange.SetLocalEnergyDeposit(erec);
|
||||
}
|
||||
|
||||
@@ -43,10 +43,11 @@
|
||||
#include "G4Exp.hh"
|
||||
#include "G4Log.hh"
|
||||
#include "G4HadronicParameters.hh"
|
||||
#include "G4PhysicsModelCatalog.hh"
|
||||
|
||||
|
||||
G4HadronElastic::G4HadronElastic(const G4String& name)
|
||||
: G4HadronicInteraction(name)
|
||||
: G4HadronicInteraction(name), secID(-1)
|
||||
{
|
||||
SetMinEnergy( 0.0*GeV );
|
||||
SetMaxEnergy( G4HadronicParameters::Instance()->GetMaxEnergy() );
|
||||
@@ -58,6 +59,8 @@ G4HadronElastic::G4HadronElastic(const G4String& name)
|
||||
theNeutron = G4Neutron::Neutron();
|
||||
theDeuteron = G4Deuteron::Deuteron();
|
||||
theAlpha = G4Alpha::Alpha();
|
||||
|
||||
secID = G4PhysicsModelCatalog::GetModelID( "model_" + name );
|
||||
}
|
||||
|
||||
G4HadronElastic::~G4HadronElastic()
|
||||
@@ -192,7 +195,7 @@ G4HadFinalState* G4HadronElastic::ApplyYourself(
|
||||
G4ParticleTable::GetParticleTable()->GetIonTable()->GetIon(Z,A,0.0);
|
||||
}
|
||||
G4DynamicParticle * aSec = new G4DynamicParticle(theDef, lv.vect().unit(), erec);
|
||||
theParticleChange.AddSecondary(aSec);
|
||||
theParticleChange.AddSecondary(aSec, secID);
|
||||
} else {
|
||||
theParticleChange.SetLocalEnergyDeposit(erec);
|
||||
}
|
||||
|
||||
@@ -37,13 +37,14 @@
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "Randomize.hh"
|
||||
#include "G4ios.hh"
|
||||
|
||||
#include "G4Pow.hh"
|
||||
#include "G4PhysicsModelCatalog.hh"
|
||||
|
||||
|
||||
G4LEHadronProtonElastic::G4LEHadronProtonElastic():
|
||||
G4HadronElastic("G4LEHadronProtonElastic")
|
||||
{
|
||||
secID = G4PhysicsModelCatalog::GetModelID( "model_" + GetModelName() );
|
||||
SetMinEnergy(0.);
|
||||
SetMaxEnergy(20.*MeV);
|
||||
}
|
||||
@@ -241,7 +242,7 @@ G4LEHadronProtonElastic::ApplyYourself(const G4HadProjectile& aTrack,
|
||||
theParticleChange.SetMomentumChange(newP->GetMomentumDirection());
|
||||
theParticleChange.SetEnergyChange(newP->GetKineticEnergy());
|
||||
delete newP;
|
||||
theParticleChange.AddSecondary(targetParticle);
|
||||
theParticleChange.AddSecondary(targetParticle, secID);
|
||||
|
||||
return &theParticleChange;
|
||||
}
|
||||
|
||||
@@ -41,10 +41,13 @@
|
||||
#include "G4LEnpData.hh"
|
||||
#include "Randomize.hh"
|
||||
|
||||
#include "G4PhysicsModelCatalog.hh"
|
||||
|
||||
|
||||
G4LEnp::G4LEnp():
|
||||
G4HadronElastic("G4LEnp") // G4HadronicInteraction("G4LEnp")
|
||||
{
|
||||
secID = G4PhysicsModelCatalog::GetModelID( "model_" + GetModelName() );
|
||||
// theParticleChange.SetNumberOfSecondaries(1);
|
||||
|
||||
// SetMinEnergy(10.*MeV);
|
||||
@@ -300,7 +303,7 @@ G4LEnp::ApplyYourself(const G4HadProjectile& aTrack, G4Nucleus& targetNucleus)
|
||||
theParticleChange.SetMomentumChange(newP->GetMomentumDirection());
|
||||
theParticleChange.SetEnergyChange(newP->GetKineticEnergy());
|
||||
delete newP;
|
||||
theParticleChange.AddSecondary(targetParticle);
|
||||
theParticleChange.AddSecondary(targetParticle, secID);
|
||||
|
||||
return &theParticleChange;
|
||||
}
|
||||
|
||||
@@ -38,8 +38,12 @@
|
||||
// Initialization of static data arrays:
|
||||
#include "G4LEppData.hh"
|
||||
|
||||
#include "G4PhysicsModelCatalog.hh"
|
||||
|
||||
|
||||
G4LEpp::G4LEpp():G4HadronElastic("G4LEpp")
|
||||
{
|
||||
secID = G4PhysicsModelCatalog::GetModelID( "model_" + GetModelName() );
|
||||
SetMinEnergy(0.);
|
||||
SetMaxEnergy(5.*GeV);
|
||||
}
|
||||
@@ -234,7 +238,7 @@ G4LEpp::ApplyYourself(const G4HadProjectile& aTrack, G4Nucleus& targetNucleus)
|
||||
delete newP;
|
||||
|
||||
// Recoil particle
|
||||
theParticleChange.AddSecondary(targetParticle);
|
||||
theParticleChange.AddSecondary(targetParticle, secID);
|
||||
return &theParticleChange;
|
||||
}
|
||||
|
||||
|
||||
@@ -40,14 +40,16 @@
|
||||
#include "G4DecayKineticTracks.hh"
|
||||
#include "G4KineticTrackVector.hh"
|
||||
#include "G4Log.hh"
|
||||
#include "G4PhysicsModelCatalog.hh"
|
||||
|
||||
|
||||
G4LMsdGenerator::G4LMsdGenerator(const G4String& name)
|
||||
: G4HadronicInteraction(name)
|
||||
: G4HadronicInteraction(name), secID(-1)
|
||||
|
||||
{
|
||||
fPDGencoding = 0;
|
||||
|
||||
secID = G4PhysicsModelCatalog::GetModelID( "model_LMsdGenerator" );
|
||||
|
||||
// theParticleChange = new G4HadFinalState;
|
||||
}
|
||||
|
||||
@@ -243,7 +245,7 @@ G4LMsdGenerator::ApplyYourself( const G4HadProjectile& aTrack,
|
||||
G4ParticleTable::GetParticleTable()->GetIonTable()->GetIon( Z, A, 0.0 );
|
||||
}
|
||||
G4DynamicParticle * aSec = new G4DynamicParticle( recoilDef, lvTarg);
|
||||
theParticleChange.AddSecondary(aSec);
|
||||
theParticleChange.AddSecondary(aSec, secID);
|
||||
}
|
||||
else if( eRecoil > 0.0 )
|
||||
{
|
||||
@@ -275,7 +277,7 @@ G4LMsdGenerator::ApplyYourself( const G4HadProjectile& aTrack,
|
||||
|
||||
// G4cout<<" "<<i<<", "<<aNew->GetDefinition()->GetParticleName()<<", "<<aNew->Get4Momentum()<<G4endl;
|
||||
|
||||
theParticleChange.AddSecondary(aNew);
|
||||
theParticleChange.AddSecondary(aNew, secID);
|
||||
delete ddktv->operator[](i);
|
||||
}
|
||||
delete ddktv;
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
#include "Randomize.hh"
|
||||
#include "G4Electron.hh"
|
||||
#include "G4HadronicParameters.hh"
|
||||
#include "G4PhysicsModelCatalog.hh"
|
||||
|
||||
using namespace std;
|
||||
using namespace CLHEP;
|
||||
@@ -44,6 +45,8 @@ using namespace CLHEP;
|
||||
G4NeutrinoElectronNcModel::G4NeutrinoElectronNcModel(const G4String& name)
|
||||
: G4HadronElastic(name)
|
||||
{
|
||||
secID = G4PhysicsModelCatalog::GetModelID( "model_" + name );
|
||||
|
||||
SetMinEnergy( 0.0*GeV );
|
||||
SetMaxEnergy( G4HadronicParameters::Instance()->GetMaxEnergy() );
|
||||
SetLowestEnergyLimit(1.e-6*eV);
|
||||
@@ -54,7 +57,6 @@ G4NeutrinoElectronNcModel::G4NeutrinoElectronNcModel(const G4String& name)
|
||||
fSin2tW = 0.23129; // 0.2312;
|
||||
|
||||
fCutEnergy = 0.; // default value
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -137,7 +139,7 @@ G4HadFinalState* G4NeutrinoElectronNcModel::ApplyYourself(
|
||||
eP *= ePlab;
|
||||
G4LorentzVector lvt2( eP, eTkin + electron_mass_c2 );
|
||||
G4DynamicParticle * aSec = new G4DynamicParticle( theElectron, lvt2 );
|
||||
theParticleChange.AddSecondary( aSec );
|
||||
theParticleChange.AddSecondary( aSec, secID );
|
||||
|
||||
G4LorentzVector lvp1 = aParticle->Get4Momentum();
|
||||
G4LorentzVector lvt1(0.,0.,0.,electron_mass_c2);
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
#include "G4PhysicsTable.hh"
|
||||
#include "G4PhysicsLogVector.hh"
|
||||
#include "G4PhysicsFreeVector.hh"
|
||||
#include "G4PhysicsModelCatalog.hh"
|
||||
|
||||
|
||||
using namespace std;
|
||||
@@ -48,6 +49,8 @@ using namespace CLHEP;
|
||||
G4NeutronElectronElModel::G4NeutronElectronElModel(const G4String& name)
|
||||
: G4HadronElastic(name)
|
||||
{
|
||||
secID = G4PhysicsModelCatalog::GetModelID( "model_" + name );
|
||||
|
||||
// neutron magneton squared
|
||||
|
||||
fM = neutron_mass_c2; // neutron mass
|
||||
@@ -334,7 +337,7 @@ G4HadFinalState* G4NeutronElectronElModel::ApplyYourself(
|
||||
// G4cout<<"lvt2 = "<<lvt2<<G4endl;
|
||||
|
||||
G4DynamicParticle * aSec = new G4DynamicParticle( theElectron, lvt2 );
|
||||
theParticleChange.AddSecondary( aSec );
|
||||
theParticleChange.AddSecondary( aSec, secID );
|
||||
|
||||
G4LorentzVector lvp2 = lvsum-lvt2;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user