Import Geant4 10.7.2 source tree

This commit is contained in:
Gabriele Cosmo
2021-06-14 10:01:31 +02:00
parent 3dfcdb544e
commit c968e26a39
271 changed files with 26365 additions and 21942 deletions
@@ -13,6 +13,15 @@ introduced in the code and keeptrack of all tags.
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
24 April 2021, V.Ivanchenko (phys-ctor-em-V10-06-22)
- G4EmStandardPhysics, G4EmStandardPhysicsGS - set default verbosity 1
18 March 2021, V.Ivanchenko
- GeneralGammaProcess - reduced usage of protected variables
12 Febuary 2021, V.Ivanchenko
- G4EmBuilder - added geantinos to the minimal list of EM particles
18 January 2021, V.Ivanchenko (phys-ctor-em-V10-06-21)
- G4GammaGeneralProcess - changed 1st energy limit from 50 keV to 150 keV
to guarantee K-shell energy for any element be within 1st energy area;
@@ -52,7 +52,7 @@ class G4EmStandardPhysics : public G4VPhysicsConstructor
{
public:
explicit G4EmStandardPhysics(G4int ver=0, const G4String& name="");
explicit G4EmStandardPhysics(G4int ver=1, const G4String& name="");
~G4EmStandardPhysics() override;
@@ -52,7 +52,7 @@ class G4EmStandardPhysicsGS : public G4VPhysicsConstructor
{
public:
explicit G4EmStandardPhysicsGS(G4int ver=0, const G4String& name="");
explicit G4EmStandardPhysicsGS(G4int ver=1, const G4String& name="");
~G4EmStandardPhysicsGS() override;
@@ -47,8 +47,6 @@
#ifndef G4GammaGeneralProcess_h
#define G4GammaGeneralProcess_h 1
#include <CLHEP/Units/SystemOfUnits.h>
#include "G4VEmProcess.hh"
#include "globals.hh"
#include "G4EmDataHandler.hh"
@@ -157,8 +155,8 @@ private:
protected:
G4HadronicProcess* theGammaNuclear;
G4VProcess* selectedProc;
G4HadronicProcess* theGammaNuclear = nullptr;
G4VProcess* selectedProc = nullptr;
private:
static G4EmDataHandler* theHandler;
@@ -166,23 +164,23 @@ private:
static G4bool theT[nTables];
static G4String nameT[nTables];
G4VEmProcess* thePhotoElectric;
G4VEmProcess* theCompton;
G4VEmProcess* theConversionEE;
G4VEmProcess* theRayleigh;
G4GammaConversionToMuons* theConversionMM;
G4VEmProcess* thePhotoElectric = nullptr;
G4VEmProcess* theCompton = nullptr;
G4VEmProcess* theConversionEE = nullptr;
G4VEmProcess* theRayleigh = nullptr;
G4GammaConversionToMuons* theConversionMM = nullptr;
G4double minPEEnergy;
G4double minEEEnergy;
G4double minMMEnergy;
G4double peLambda;
G4double preStepLogE;
G4double factor;
G4double peLambda = 0.0;
G4double preStepLogE = 1.0;
G4double factor = 1.0;
size_t nLowE;
size_t nHighE;
size_t idxEnergy;
G4bool splineFlag;
size_t nLowE = 40;
size_t nHighE = 50;
size_t idxEnergy = 0;
G4bool splineFlag = false;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -216,7 +214,7 @@ G4GammaGeneralProcess::SelectedProcess(const G4Step& step, G4VProcess* ptr)
inline void G4GammaGeneralProcess::SelectEmProcess(const G4Step& step, G4VEmProcess* proc)
{
proc->CurrentSetup(currentCouple,preStepKinEnergy);
proc->CurrentSetup(currentCouple, preStepKinEnergy);
SelectedProcess(step, proc);
}
@@ -66,6 +66,9 @@
#include "G4Electron.hh"
#include "G4Positron.hh"
#include "G4ChargedGeantino.hh"
#include "G4Geantino.hh"
#include "G4MuonPlus.hh"
#include "G4MuonMinus.hh"
#include "G4PionPlus.hh"
@@ -233,6 +236,9 @@ void G4EmBuilder::ConstructCharged(G4hMultipleScattering* hmsc,
void G4EmBuilder::ConstructMinimalEmSet()
{
// pseudo-particles
G4Geantino::GeantinoDefinition();
G4ChargedGeantino::ChargedGeantinoDefinition();
// gamma
G4Gamma::Gamma();
// leptons
@@ -68,6 +68,7 @@
#include "G4Material.hh"
#include "G4MaterialCutsCouple.hh"
#include "G4GammaConversionToMuons.hh"
#include "G4Gamma.hh"
#include "G4Log.hh"
#include <iostream>
@@ -86,22 +87,10 @@ G4GammaGeneralProcess::G4GammaGeneralProcess():
G4VEmProcess("GammaGeneralProc", fElectromagnetic),
minPEEnergy(150*CLHEP::keV),
minEEEnergy(2*CLHEP::electron_mass_c2),
minMMEnergy(100*CLHEP::MeV),
peLambda(0.0),
nLowE(40),
nHighE(50),
splineFlag(false)
minMMEnergy(100*CLHEP::MeV)
{
thePhotoElectric = theCompton = theConversionEE = theRayleigh = nullptr;
theGammaNuclear = nullptr;
theConversionMM = nullptr;
selectedProc = nullptr;
idxEnergy = 0;
preStepLogE = factor = 1.0;
SetVerboseLevel(1);
SetParticle(theGamma);
SetParticle(G4Gamma::Gamma());
SetProcessSubType(fGammaGeneralProcess);
}
@@ -153,14 +142,16 @@ void G4GammaGeneralProcess::AddHadProcess(G4HadronicProcess* ptr)
void G4GammaGeneralProcess::PreparePhysicsTable(const G4ParticleDefinition& part)
{
SetParticle(&part);
currentCouple = nullptr;
currentMaterial = nullptr;
preStepLambda = 0.0;
idxEnergy = 0;
currentCouple = nullptr;
isTheMaster = lManager->IsMaster();
if(isTheMaster) { SetVerboseLevel(theParameters->Verbose()); }
else { SetVerboseLevel(theParameters->WorkerVerbose()); }
G4EmParameters* param = G4EmParameters::Instance();
G4LossTableManager* man = G4LossTableManager::Instance();
isTheMaster = man->IsMaster();
if(isTheMaster) { SetVerboseLevel(param->Verbose()); }
else { SetVerboseLevel(param->WorkerVerbose()); }
if(1 < verboseLevel) {
G4cout << "G4GammaGeneralProcess::PreparePhysicsTable() for "
@@ -197,6 +188,9 @@ void G4GammaGeneralProcess::InitialiseProcess(const G4ParticleDefinition*)
{
if(isTheMaster) {
G4EmParameters* param = G4EmParameters::Instance();
G4LossTableManager* man = G4LossTableManager::Instance();
// tables are created and its size is defined only once
if(nullptr == theHandler) {
theHandler = new G4EmDataHandler(nTables);
@@ -207,15 +201,15 @@ void G4GammaGeneralProcess::InitialiseProcess(const G4ParticleDefinition*)
theHandler->SetMasterProcess(theConversionEE);
theHandler->SetMasterProcess(theRayleigh);
}
auto bld = lManager->GetTableBuilder();
auto bld = man->GetTableBuilder();
const G4ProductionCutsTable* theCoupleTable=
G4ProductionCutsTable::GetProductionCutsTable();
size_t numOfCouples = theCoupleTable->GetTableSize();
G4double mine = theParameters->MinKinEnergy();
G4double maxe = theParameters->MaxKinEnergy();
G4int nd = theParameters->NumberOfBinsPerDecade();
G4double mine = param->MinKinEnergy();
G4double maxe = param->MaxKinEnergy();
G4int nd = param->NumberOfBinsPerDecade();
size_t nbin1 = std::max(5, nd*G4lrint(std::log10(minPEEnergy/mine)));
size_t nbin2 = std::max(5, nd*G4lrint(std::log10(maxe/minMMEnergy)));
@@ -230,7 +224,6 @@ void G4GammaGeneralProcess::InitialiseProcess(const G4ParticleDefinition*)
cVector.SetSpline(splineFlag);
dVector.SetSpline(splineFlag);
}
for(size_t i=0; i<nTables; ++i) {
if(!theT[i]) { continue; }
//G4cout << "## PreparePhysTable " << i << "." << G4endl;
@@ -295,7 +288,7 @@ void G4GammaGeneralProcess::BuildPhysicsTable(const G4ParticleDefinition& part)
G4ProductionCutsTable::GetProductionCutsTable();
size_t numOfCouples = theCoupleTable->GetTableSize();
G4LossTableBuilder* bld = lManager->GetTableBuilder();
G4LossTableBuilder* bld = G4LossTableManager::Instance()->GetTableBuilder();
const std::vector<G4PhysicsTable*>& tables = theHandler->GetTables();
G4CrossSectionDataStore* gn = (nullptr != theGammaNuclear)
@@ -468,7 +461,6 @@ void G4GammaGeneralProcess::BuildPhysicsTable(const G4ParticleDefinition& part)
void G4GammaGeneralProcess::StartTracking(G4Track*)
{
theNumberOfInteractionLengthLeft = -1.0;
currentMaterial = nullptr;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -482,17 +474,24 @@ G4double G4GammaGeneralProcess::PostStepGetPhysicalInteractionLength(
G4double x = DBL_MAX;
G4double energy = track.GetKineticEnergy();
currentCouple = track.GetMaterialCutsCouple();
const G4Material* mat = currentCouple->GetMaterial();
const G4MaterialCutsCouple* couple = track.GetMaterialCutsCouple();
// compute mean free path
if(mat != currentMaterial || energy != preStepKinEnergy) {
currentCoupleIndex = currentCouple->GetIndex();
G4bool recompute = false;
if(couple != currentCouple) {
currentCouple = couple;
currentCoupleIndex = couple->GetIndex();
basedCoupleIndex = (*theDensityIdx)[currentCoupleIndex];
factor = (*theDensityFactor)[currentCoupleIndex];
currentMaterial = mat;
currentMaterial = couple->GetMaterial();
recompute = true;
}
if(energy != preStepKinEnergy) {
preStepKinEnergy = energy;
preStepLogE = track.GetDynamicParticle()->GetLogKineticEnergy();
recompute = true;
}
if(recompute) {
preStepLambda = TotalCrossSectionPerVolume();
// zero cross section
@@ -578,8 +577,8 @@ G4VParticleChange* G4GammaGeneralProcess::PostStepDoIt(const G4Track& track,
theNumberOfInteractionLengthLeft = -1.0;
selectedProc = nullptr;
G4double q = G4UniformRand();
/*
G4cout << "PostStep: preStepLambda= " << preStepLambda << " x= " << x
/*
G4cout << "PostStep: preStepLambda= " << preStepLambda
<< " PE= " << peLambda << " q= " << q << " idxE= " << idxEnergy
<< G4endl;
*/
@@ -648,7 +647,7 @@ void G4GammaGeneralProcess::SelectHadProcess(const G4Track& track,
{
SelectedProcess(step, proc);
proc->GetCrossSectionDataStore()->ComputeCrossSection(track.GetDynamicParticle(),
track.GetMaterial());
currentMaterial);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -13,6 +13,9 @@ introduced in the code and keeptrack of all tags.
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
10-March-2021, Krzysztof Genser (phys-ctor-hinelastic-V10-06-20)
- G4HadronPhysicsShielding: corrected parameters of the M variant
05-December-2020, Vladimir Ivanchenko (phys-ctor-hinelastic-V10-06-19)
- G4HadronPhysicsFTFP_BERT, G4HadronPhysicsQGSP_BERT, G4HadronInelasticQBBC,
G4HadronPhysicsQGSP_BIC : fixed type of builder in all hadron
@@ -131,6 +131,12 @@ G4HadronPhysicsShielding::G4HadronPhysicsShielding(const G4String& name, G4int,
{
minFTFP_pion = minFTFPEnergy;
maxBERT_pion = maxBertiniEnergy;
minFTFP_kaon = minFTFPEnergy;
maxBERT_kaon = maxBertiniEnergy;
minFTFP_proton = minFTFPEnergy;
maxBERT_proton = maxBertiniEnergy;
minFTFP_neutron = minFTFPEnergy;
maxBERT_neutron = maxBertiniEnergy;
}
G4HadronPhysicsShielding::~G4HadronPhysicsShielding()
+4
View File
@@ -13,6 +13,10 @@ introduced in the code and keeptrack of all tags.
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
17-February-2021 Robert Hatcher (phys-lists-V10-06-03)
- Update list of EM extension shorthands known to extensible factory to
match old factory
24-November-2020 Alberto Ribon (phys-lists-V10-06-02)
- LBE : added G4ShortLivedConstructor (to avoid crashes, e.g. when rho0
is produced by the decay of eta_prime).
@@ -81,11 +81,16 @@ G4PhysListRegistry* G4PhysListRegistry::Instance()
// the GS EM extension originally required double underscores
// support either one or two as __GS is confusing to users
// same for __SS
theInstance->AddPhysicsExtension("GS","G4EmStandardPhysicsGS");
theInstance->AddPhysicsExtension("GS" ,"G4EmStandardPhysicsGS");
theInstance->AddPhysicsExtension("_GS","G4EmStandardPhysicsGS");
theInstance->AddPhysicsExtension("SS","G4EmStandardPhysicsSS");
theInstance->AddPhysicsExtension("SS" ,"G4EmStandardPhysicsSS");
theInstance->AddPhysicsExtension("_SS","G4EmStandardPhysicsSS");
theInstance->AddPhysicsExtension("EM0","G4EmStandardPhysics");
theInstance->AddPhysicsExtension("WVI","G4EmStandardPhysicsWVI");
theInstance->AddPhysicsExtension("LE" ,"G4EmLowEPPhysics");
theInstance->AddPhysicsExtension("_LE","G4EmLowEPPhysics");
return theInstance;
}