Import Geant4 11.1.0 source tree
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4PhysListUtil.hh"
|
||||
#include "G4EmParameters.hh"
|
||||
#include "G4VEnergyLossProcess.hh"
|
||||
|
||||
@@ -72,15 +73,22 @@
|
||||
|
||||
#include "G4ChargedGeantino.hh"
|
||||
#include "G4Geantino.hh"
|
||||
#include "G4NeutrinoMu.hh"
|
||||
#include "G4AntiNeutrinoMu.hh"
|
||||
#include "G4NeutrinoE.hh"
|
||||
#include "G4AntiNeutrinoE.hh"
|
||||
|
||||
#include "G4MuonPlus.hh"
|
||||
#include "G4MuonMinus.hh"
|
||||
#include "G4PionPlus.hh"
|
||||
#include "G4PionMinus.hh"
|
||||
#include "G4PionZero.hh"
|
||||
#include "G4KaonPlus.hh"
|
||||
#include "G4KaonMinus.hh"
|
||||
#include "G4Proton.hh"
|
||||
#include "G4AntiProton.hh"
|
||||
#include "G4Lambda.hh"
|
||||
#include "G4AntiLambda.hh"
|
||||
|
||||
#include "G4Deuteron.hh"
|
||||
#include "G4Triton.hh"
|
||||
@@ -351,9 +359,15 @@ void G4EmBuilder::ConstructChargedSS(G4hMultipleScattering* hmsc)
|
||||
|
||||
void G4EmBuilder::ConstructMinimalEmSet()
|
||||
{
|
||||
// instantiate singletones for physics
|
||||
G4PhysListUtil::InitialiseParameters();
|
||||
// pseudo-particles
|
||||
G4Geantino::GeantinoDefinition();
|
||||
G4ChargedGeantino::ChargedGeantinoDefinition();
|
||||
G4NeutrinoMu::NeutrinoMu();
|
||||
G4AntiNeutrinoMu::AntiNeutrinoMu();
|
||||
G4NeutrinoE::NeutrinoE();
|
||||
G4AntiNeutrinoE::AntiNeutrinoE();
|
||||
// gamma
|
||||
G4Gamma::Gamma();
|
||||
// leptons
|
||||
@@ -364,24 +378,29 @@ void G4EmBuilder::ConstructMinimalEmSet()
|
||||
// mesons
|
||||
G4PionPlus::PionPlus();
|
||||
G4PionMinus::PionMinus();
|
||||
G4PionZero::PionZero();
|
||||
G4KaonPlus::KaonPlus();
|
||||
G4KaonMinus::KaonMinus();
|
||||
// barions
|
||||
G4Proton::Proton();
|
||||
G4AntiProton::AntiProton();
|
||||
G4Neutron::Neutron();
|
||||
G4AntiNeutron::AntiNeutron();
|
||||
G4Lambda::Lambda();
|
||||
G4AntiLambda::AntiLambda();
|
||||
// ions
|
||||
G4Deuteron::Deuteron();
|
||||
G4Triton::Triton();
|
||||
G4He3::He3();
|
||||
G4Alpha::Alpha();
|
||||
G4GenericIon::GenericIonDefinition();
|
||||
G4GenericIon::GenericIon();
|
||||
}
|
||||
|
||||
void G4EmBuilder::PrepareEMPhysics()
|
||||
{
|
||||
G4LossTableManager* man = G4LossTableManager::Instance();
|
||||
G4VAtomDeexcitation* ad = man->AtomDeexcitation();
|
||||
if(!ad) {
|
||||
if(nullptr == ad) {
|
||||
ad = new G4UAtomicDeexcitation();
|
||||
man->SetAtomDeexcitation(ad);
|
||||
}
|
||||
|
||||
@@ -63,6 +63,7 @@
|
||||
#include "G4hIonisation.hh"
|
||||
#include "G4ionIonisation.hh"
|
||||
#include "G4eBremsstrahlung.hh"
|
||||
#include "G4eplusAnnihilation.hh"
|
||||
|
||||
// standard models
|
||||
#include "G4LivermorePhotoElectricModel.hh"
|
||||
@@ -77,6 +78,7 @@
|
||||
#include "G4BraggModel.hh"
|
||||
#include "G4BraggIonModel.hh"
|
||||
#include "G4BetheBlochModel.hh"
|
||||
#include "G4DummyModel.hh"
|
||||
|
||||
// DNA models
|
||||
#include "G4DNAOneStepThermalizationModel.hh"
|
||||
@@ -97,25 +99,19 @@
|
||||
#include "G4DNARuddIonisationExtendedModel.hh"
|
||||
#include "G4DNADingfelderChargeDecreaseModel.hh"
|
||||
#include "G4DNADingfelderChargeIncreaseModel.hh"
|
||||
#include "G4DummyModel.hh"
|
||||
#include "G4DNARPWBAExcitationModel.hh"
|
||||
#include "G4DNARPWBAIonisationModel.hh"
|
||||
|
||||
static const G4double lowEnergyRPWBA = 100*CLHEP::MeV;
|
||||
static const G4double lowEnergyMSC = 1*CLHEP::MeV;
|
||||
static const G4double lowEnergyProtonIoni = 2*CLHEP::MeV;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void G4EmDNABuilder::ConstructDNAParticles()
|
||||
{
|
||||
// bosons
|
||||
G4Gamma::Gamma();
|
||||
|
||||
// leptons
|
||||
G4Electron::Electron();
|
||||
G4Positron::Positron();
|
||||
|
||||
// baryons
|
||||
G4Proton::Proton();
|
||||
|
||||
// generic ions
|
||||
G4GenericIon::GenericIon();
|
||||
G4Alpha::Alpha();
|
||||
// standard particles
|
||||
G4EmBuilder::ConstructMinimalEmSet();
|
||||
|
||||
// DNA ions
|
||||
G4DNAGenericIonsManager* genericIonsManager
|
||||
@@ -144,12 +140,12 @@ G4EmDNABuilder::ConstructStandardEmPhysics(const G4double emin_elec,
|
||||
G4ParticleDefinition* gamma = G4Gamma::Gamma();
|
||||
|
||||
// photoelectric effect - Livermore model
|
||||
G4PhotoElectricEffect* thePEEffect = new G4PhotoElectricEffect();
|
||||
auto thePEEffect = new G4PhotoElectricEffect();
|
||||
thePEEffect->SetEmModel(new G4LivermorePhotoElectricModel());
|
||||
ph->RegisterProcess(thePEEffect, gamma);
|
||||
|
||||
// Compton scattering - Klein-Nishina
|
||||
G4ComptonScattering* theComptonScattering = new G4ComptonScattering();
|
||||
auto theComptonScattering = new G4ComptonScattering();
|
||||
theComptonScattering->SetEmModel(new G4KleinNishinaModel());
|
||||
auto cModel = new G4LowEPComptonModel();
|
||||
cModel->SetHighEnergyLimit(20*CLHEP::MeV);
|
||||
@@ -157,17 +153,17 @@ G4EmDNABuilder::ConstructStandardEmPhysics(const G4double emin_elec,
|
||||
ph->RegisterProcess(theComptonScattering, gamma);
|
||||
|
||||
// gamma conversion - 5D model
|
||||
G4GammaConversion* theGammaConversion = new G4GammaConversion();
|
||||
auto theGammaConversion = new G4GammaConversion();
|
||||
ph->RegisterProcess(theGammaConversion, gamma);
|
||||
|
||||
// Rayleigh scattering - Livermore model
|
||||
G4RayleighScattering* theRayleigh = new G4RayleighScattering();
|
||||
auto theRayleigh = new G4RayleighScattering();
|
||||
ph->RegisterProcess(theRayleigh, gamma);
|
||||
|
||||
// electron
|
||||
if(emin_elec < 0.5*MeV) {
|
||||
if(emin_elec < emax) {
|
||||
G4ParticleDefinition* elec = G4Electron::Electron();
|
||||
G4eMultipleScattering* msc_el = new G4eMultipleScattering();
|
||||
auto msc_el = new G4eMultipleScattering();
|
||||
G4VMscModel* msc_model_el;
|
||||
if(mscType == dnaWVI) {
|
||||
msc_model_el = new G4LowEWentzelVIModel();
|
||||
@@ -176,20 +172,18 @@ G4EmDNABuilder::ConstructStandardEmPhysics(const G4double emin_elec,
|
||||
} else {
|
||||
msc_model_el = new G4UrbanMscModel();
|
||||
}
|
||||
msc_model_el->SetActivationLowEnergyLimit(emin_elec);
|
||||
msc_model_el->SetHighEnergyLimit(emax);
|
||||
msc_model_el->SetActivationLowEnergyLimit(lowEnergyMSC);
|
||||
msc_el->SetEmModel(msc_model_el);
|
||||
ph->RegisterProcess(msc_el, elec);
|
||||
|
||||
G4eIonisation* ioni = new G4eIonisation();
|
||||
G4VEmModel* mb_el = new G4MollerBhabhaModel();
|
||||
auto ioni = new G4eIonisation();
|
||||
auto mb_el = new G4MollerBhabhaModel();
|
||||
mb_el->SetActivationLowEnergyLimit(emin_elec);
|
||||
mb_el->SetHighEnergyLimit(emax);
|
||||
ioni->SetEmModel(mb_el);
|
||||
ph->RegisterProcess(ioni, elec);
|
||||
|
||||
G4eBremsstrahlung* brem = new G4eBremsstrahlung();
|
||||
G4VEmModel* sb_el = new G4SeltzerBergerModel();
|
||||
auto brem = new G4eBremsstrahlung();
|
||||
auto sb_el = new G4SeltzerBergerModel();
|
||||
sb_el->SetActivationLowEnergyLimit(emin_elec);
|
||||
sb_el->SetHighEnergyLimit(emax);
|
||||
sb_el->SetAngularDistribution(new G4Generator2BS());
|
||||
@@ -199,7 +193,7 @@ G4EmDNABuilder::ConstructStandardEmPhysics(const G4double emin_elec,
|
||||
|
||||
// positron
|
||||
G4ParticleDefinition* posi = G4Positron::Positron();
|
||||
G4eMultipleScattering* msc_pos = new G4eMultipleScattering();
|
||||
auto msc_pos = new G4eMultipleScattering();
|
||||
G4VMscModel* msc_model_pos;
|
||||
if(mscType == dnaWVI) {
|
||||
msc_model_pos = new G4LowEWentzelVIModel();
|
||||
@@ -211,99 +205,95 @@ G4EmDNABuilder::ConstructStandardEmPhysics(const G4double emin_elec,
|
||||
msc_pos->SetEmModel(msc_model_pos);
|
||||
ph->RegisterProcess(msc_pos, posi);
|
||||
ph->RegisterProcess(new G4eIonisation(), posi);
|
||||
ph->RegisterProcess(new G4eBremsstrahlung(), posi);
|
||||
|
||||
auto brem = new G4eBremsstrahlung();
|
||||
auto sb = new G4SeltzerBergerModel();
|
||||
sb->SetHighEnergyLimit(emax);
|
||||
sb->SetAngularDistribution(new G4Generator2BS());
|
||||
brem->SetEmModel(sb);
|
||||
ph->RegisterProcess(brem, posi);
|
||||
ph->RegisterProcess(new G4eplusAnnihilation(), posi);
|
||||
|
||||
// proton
|
||||
G4ParticleDefinition* part = G4Proton::Proton();
|
||||
if(emin_proton < 0.5*CLHEP::MeV) {
|
||||
G4hMultipleScattering* msc_p = new G4hMultipleScattering();
|
||||
G4VMscModel* msc_model_p;
|
||||
if(mscType == dnaWVI) {
|
||||
msc_model_p = new G4LowEWentzelVIModel();
|
||||
} else {
|
||||
msc_model_p = new G4UrbanMscModel();
|
||||
}
|
||||
msc_model_p->SetActivationLowEnergyLimit(emin_proton);
|
||||
msc_p->SetEmModel(msc_model_p);
|
||||
ph->RegisterProcess(msc_p, part);
|
||||
|
||||
G4hIonisation* ioni = new G4hIonisation();
|
||||
G4VEmModel* br = new G4BraggModel();
|
||||
br->SetActivationLowEnergyLimit(emin_proton);
|
||||
ioni->SetEmModel(br);
|
||||
|
||||
G4VEmModel* be = new G4BetheBlochModel();
|
||||
be->SetActivationLowEnergyLimit(emin_proton);
|
||||
be->SetHighEnergyLimit(emax);
|
||||
ioni->SetEmModel(be);
|
||||
ph->RegisterProcess(ioni, part);
|
||||
if(emin_proton < emax) {
|
||||
G4ParticleDefinition* part = G4Proton::Proton();
|
||||
StandardHadronPhysics(part, lowEnergyMSC, emin_proton, emax,
|
||||
mscType, false);
|
||||
}
|
||||
|
||||
// GenericIon
|
||||
if(emin_ion < 0.5*MeV) {
|
||||
if(emin_ion < emax) {
|
||||
G4ParticleDefinition* ion = G4GenericIon::GenericIon();
|
||||
G4hMultipleScattering* msc_ion = new G4hMultipleScattering();
|
||||
auto imsc = new G4UrbanMscModel();
|
||||
msc_ion->SetEmModel(imsc);
|
||||
ph->RegisterProcess(msc_ion, ion);
|
||||
|
||||
G4ionIonisation* ioni = new G4ionIonisation();
|
||||
G4VEmModel* br = new G4BraggIonModel();
|
||||
br->SetActivationLowEnergyLimit(emin_ion);
|
||||
ioni->SetEmModel(br);
|
||||
|
||||
G4VEmModel* be = new G4BetheBlochModel();
|
||||
be->SetActivationLowEnergyLimit(emin_ion);
|
||||
be->SetHighEnergyLimit(emax);
|
||||
ioni->SetEmModel(be);
|
||||
ph->RegisterProcess(ioni, ion);
|
||||
StandardHadronPhysics(ion, lowEnergyMSC, emin_ion, emax,
|
||||
dnaUrban, true);
|
||||
}
|
||||
|
||||
// alpha
|
||||
part = G4Alpha::Alpha();
|
||||
if(emin_alpha < emax) {
|
||||
G4hMultipleScattering* msc_a = new G4hMultipleScattering();
|
||||
G4VMscModel* msc_model_a = new G4UrbanMscModel();
|
||||
msc_model_a->SetActivationLowEnergyLimit(emin_alpha);
|
||||
msc_a->SetEmModel(msc_model_a);
|
||||
ph->RegisterProcess(msc_a, part);
|
||||
|
||||
G4ionIonisation* ioni = new G4ionIonisation();
|
||||
G4VEmModel* br = new G4BraggIonModel();
|
||||
br->SetActivationLowEnergyLimit(emin_alpha);
|
||||
ioni->SetEmModel(br);
|
||||
|
||||
G4VEmModel* be = new G4BetheBlochModel();
|
||||
be->SetActivationLowEnergyLimit(emin_alpha);
|
||||
be->SetHighEnergyLimit(emax);
|
||||
ioni->SetEmModel(be);
|
||||
|
||||
ph->RegisterProcess(ioni, part);
|
||||
G4ParticleDefinition* part = G4Alpha::Alpha();
|
||||
StandardHadronPhysics(part, lowEnergyMSC, emin_alpha, emax,
|
||||
dnaUrban, true);
|
||||
|
||||
// alpha+
|
||||
G4DNAGenericIonsManager* genericIonsManager
|
||||
= G4DNAGenericIonsManager::Instance();
|
||||
part = genericIonsManager->GetIon("alpha+");
|
||||
StandardHadronPhysics(part, lowEnergyMSC, emin_alpha, emax,
|
||||
dnaUrban, false);
|
||||
}
|
||||
// list of main standard particles
|
||||
const std::vector<G4int> chargedParticles = {
|
||||
13, -13, 211, -211, 321, -321, -2212,
|
||||
1000010020, 1000010030, 1000020030
|
||||
};
|
||||
auto msc = new G4hMultipleScattering();
|
||||
msc->SetEmModel(new G4WentzelVIModel());
|
||||
G4EmBuilder::ConstructBasicEmPhysics(msc, chargedParticles);
|
||||
}
|
||||
|
||||
// alpha+
|
||||
G4DNAGenericIonsManager* genericIonsManager
|
||||
= G4DNAGenericIonsManager::Instance();
|
||||
part = genericIonsManager->GetIon("alpha+");
|
||||
if(emin_alpha < emax) {
|
||||
G4hMultipleScattering* msc_a = new G4hMultipleScattering();
|
||||
G4VMscModel* msc_model_a = new G4UrbanMscModel();
|
||||
msc_model_a->SetActivationLowEnergyLimit(emin_alpha);
|
||||
msc_a->SetEmModel(msc_model_a);
|
||||
ph->RegisterProcess(msc_a, part);
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4hIonisation* ioni = new G4hIonisation();
|
||||
G4VEmModel* br = new G4BraggModel();
|
||||
br->SetActivationLowEnergyLimit(emin_alpha);
|
||||
ioni->SetEmModel(br);
|
||||
|
||||
G4VEmModel* be = new G4BetheBlochModel();
|
||||
be->SetActivationLowEnergyLimit(emin_alpha);
|
||||
be->SetHighEnergyLimit(emax);
|
||||
ioni->SetEmModel(be);
|
||||
|
||||
ph->RegisterProcess(ioni, part);
|
||||
void G4EmDNABuilder::StandardHadronPhysics(G4ParticleDefinition* part,
|
||||
const G4double lowELimitForMSC,
|
||||
const G4double lowELimitForIoni,
|
||||
const G4double maxEnergy,
|
||||
const G4EmDNAMscModelType mscType,
|
||||
const G4bool isIon)
|
||||
{
|
||||
G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
|
||||
G4hMultipleScattering* msc = new G4hMultipleScattering();
|
||||
G4VMscModel* msc_model = nullptr;
|
||||
if(mscType == dnaWVI) {
|
||||
msc_model = new G4LowEWentzelVIModel();
|
||||
} else {
|
||||
msc_model = new G4UrbanMscModel();
|
||||
}
|
||||
msc_model->SetActivationLowEnergyLimit(lowELimitForMSC);
|
||||
msc_model->SetLowEnergyLimit(lowELimitForMSC);
|
||||
msc_model->SetHighEnergyLimit(maxEnergy);
|
||||
msc->SetEmModel(msc_model);
|
||||
ph->RegisterProcess(msc, part);
|
||||
|
||||
G4VEnergyLossProcess* ioni = nullptr;
|
||||
G4VEmModel* mod1 = nullptr;
|
||||
if(isIon) {
|
||||
ioni = new G4ionIonisation();
|
||||
mod1 = new G4BraggIonModel();
|
||||
} else {
|
||||
ioni = new G4hIonisation();
|
||||
mod1 = new G4BraggModel();
|
||||
}
|
||||
G4double eth = lowEnergyProtonIoni*part->GetPDGMass()/CLHEP::proton_mass_c2;
|
||||
mod1->SetActivationLowEnergyLimit(lowELimitForIoni);
|
||||
mod1->SetHighEnergyLimit(eth);
|
||||
ioni->SetEmModel(mod1);
|
||||
|
||||
G4VEmModel* mod2 = new G4BetheBlochModel();
|
||||
mod2->SetActivationLowEnergyLimit(lowELimitForIoni);
|
||||
mod2->SetLowEnergyLimit(eth);
|
||||
ioni->SetEmModel(mod2);
|
||||
|
||||
ph->RegisterProcess(ioni, part);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -350,13 +340,13 @@ G4EmDNABuilder::ConstructDNAElectronPhysics(const G4double emaxDNA,
|
||||
} else {
|
||||
elast = new G4DNAChampionElasticModel();
|
||||
}
|
||||
elast->SetHighEnergyLimit(emaxDNA);
|
||||
elast->SetHighEnergyLimit(lowEnergyMSC);
|
||||
pElasticProcess->AddEmModel(-2, elast, reg);
|
||||
|
||||
if(nullptr != elast2) {
|
||||
elast->SetHighEnergyLimit(emaxCPA100);
|
||||
elast2->SetLowEnergyLimit(emaxCPA100);
|
||||
elast2->SetHighEnergyLimit(emaxDNA);
|
||||
elast2->SetHighEnergyLimit(lowEnergyMSC);
|
||||
pElasticProcess->AddEmModel(-3, elast2, reg);
|
||||
}
|
||||
|
||||
@@ -446,7 +436,7 @@ G4EmDNABuilder::ConstructDNAElectronPhysics(const G4double emaxDNA,
|
||||
|
||||
void
|
||||
G4EmDNABuilder::ConstructDNAProtonPhysics(const G4double e1DNA,
|
||||
const G4double emaxDNA,
|
||||
const G4double emaxIonDNA,
|
||||
const G4int opt,
|
||||
const G4bool fast,
|
||||
const G4bool stationary,
|
||||
@@ -459,22 +449,32 @@ G4EmDNABuilder::ConstructDNAProtonPhysics(const G4double e1DNA,
|
||||
// *** Elastic scattering ***
|
||||
auto pElasticProcess = FindOrBuildElastic(part, "proton_G4DNAElastic");
|
||||
auto modE = new G4DNAIonElasticModel();
|
||||
modE->SetHighEnergyLimit(emaxDNA);
|
||||
modE->SetHighEnergyLimit(lowEnergyMSC);
|
||||
modE->SelectStationary(stationary);
|
||||
pElasticProcess->AddEmModel(-1, modE, reg);
|
||||
|
||||
// *** Excitation ***
|
||||
G4double e2DNA = std::min(e1DNA, lowEnergyRPWBA);
|
||||
auto theDNAExc = FindOrBuildExcitation(part, "proton_G4DNAExcitation");
|
||||
auto modMGE = new G4DNAMillerGreenExcitationModel();
|
||||
modMGE->SetHighEnergyLimit(e1DNA);
|
||||
modMGE->SetHighEnergyLimit(e2DNA);
|
||||
modMGE->SelectStationary(stationary);
|
||||
theDNAExc->AddEmModel(-1, modMGE, reg);
|
||||
|
||||
auto modB = new G4DNABornExcitationModel();
|
||||
modB->SelectStationary(stationary);
|
||||
modB->SetLowEnergyLimit(e1DNA);
|
||||
modB->SetHighEnergyLimit(emax);
|
||||
theDNAExc->AddEmModel(-2, modB, reg);
|
||||
if(e2DNA < lowEnergyRPWBA) {
|
||||
auto modB = new G4DNABornExcitationModel();
|
||||
modB->SelectStationary(stationary);
|
||||
modB->SetLowEnergyLimit(e2DNA);
|
||||
modB->SetHighEnergyLimit(lowEnergyRPWBA);
|
||||
theDNAExc->AddEmModel(-2, modB, reg);
|
||||
}
|
||||
if(lowEnergyRPWBA < emaxIonDNA) {
|
||||
auto modC = new G4DNARPWBAExcitationModel();
|
||||
modC->SelectStationary(stationary);
|
||||
modC->SetLowEnergyLimit(lowEnergyRPWBA);
|
||||
modC->SetHighEnergyLimit(emaxIonDNA);
|
||||
theDNAExc->AddEmModel(-3, modC, reg);
|
||||
}
|
||||
|
||||
// *** Ionisation ***
|
||||
auto theDNAIoni = FindOrBuildIonisation(part, "proton_G4DNAIonisation");
|
||||
@@ -491,13 +491,22 @@ G4EmDNABuilder::ConstructDNAProtonPhysics(const G4double e1DNA,
|
||||
modRI->SetHighEnergyLimit(e1DNA);
|
||||
theDNAIoni->AddEmModel(-1, modRI, reg);
|
||||
|
||||
auto modI = new G4DNABornIonisationModel1();
|
||||
theDNAIoni->SetEmModel(modI);
|
||||
modI->SelectFasterComputation(fast);
|
||||
modI->SelectStationary(stationary);
|
||||
modI->SetLowEnergyLimit(e1DNA);
|
||||
modI->SetHighEnergyLimit(emaxDNA);
|
||||
theDNAIoni->AddEmModel(-2, modI, reg);
|
||||
if(e2DNA < lowEnergyRPWBA) {
|
||||
auto modI = new G4DNABornIonisationModel1();
|
||||
modI->SelectFasterComputation(fast);
|
||||
modI->SelectStationary(stationary);
|
||||
modI->SetLowEnergyLimit(e2DNA);
|
||||
modI->SetHighEnergyLimit(lowEnergyRPWBA);
|
||||
theDNAIoni->AddEmModel(-2, modI, reg);
|
||||
}
|
||||
if(lowEnergyRPWBA < emaxIonDNA) {
|
||||
auto modJ = new G4DNARPWBAIonisationModel();
|
||||
modJ->SelectFasterComputation(fast);
|
||||
modJ->SelectStationary(stationary);
|
||||
modJ->SetLowEnergyLimit(lowEnergyRPWBA);
|
||||
modJ->SetHighEnergyLimit(emaxIonDNA);
|
||||
theDNAIoni->AddEmModel(-3, modJ, reg);
|
||||
}
|
||||
|
||||
// *** Charge decrease ***
|
||||
auto theDNAChargeDecreaseProcess =
|
||||
@@ -514,7 +523,7 @@ G4EmDNABuilder::ConstructDNAProtonPhysics(const G4double e1DNA,
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void
|
||||
G4EmDNABuilder::ConstructDNAIonPhysics(const G4double emaxDNA,
|
||||
G4EmDNABuilder::ConstructDNAIonPhysics(const G4double emaxIonDNA,
|
||||
const G4bool stationary,
|
||||
const G4Region* reg)
|
||||
{
|
||||
@@ -524,7 +533,7 @@ G4EmDNABuilder::ConstructDNAIonPhysics(const G4double emaxDNA,
|
||||
auto theDNAIoni = FindOrBuildIonisation(part, "GenericIon_G4DNAIonisation");
|
||||
auto mod = new G4DNARuddIonisationExtendedModel();
|
||||
mod->SelectStationary(stationary);
|
||||
mod->SetHighEnergyLimit(emaxDNA);
|
||||
mod->SetHighEnergyLimit(emaxIonDNA);
|
||||
theDNAIoni->AddEmModel(-1, mod, reg);
|
||||
|
||||
FindOrBuildCapture(25.0*CLHEP::keV, part);
|
||||
@@ -536,7 +545,7 @@ void
|
||||
G4EmDNABuilder::ConstructDNALightIonPhysics(G4ParticleDefinition* part,
|
||||
const G4int charge,
|
||||
const G4int opt,
|
||||
const G4double emaxDNA,
|
||||
const G4double emaxIonDNA,
|
||||
const G4bool,
|
||||
const G4bool stationary,
|
||||
const G4Region* reg)
|
||||
@@ -549,7 +558,7 @@ G4EmDNABuilder::ConstructDNALightIonPhysics(G4ParticleDefinition* part,
|
||||
auto theDNAElastic = FindOrBuildElastic(part, name + "_G4DNAElastic");
|
||||
auto modEI = new G4DNAIonElasticModel();
|
||||
modEI->SelectStationary(stationary);
|
||||
modEI->SetHighEnergyLimit(emaxDNA);
|
||||
modEI->SetHighEnergyLimit(lowEnergyMSC);
|
||||
theDNAElastic->AddEmModel(-1, modEI, reg);
|
||||
|
||||
// *** Excitation ***
|
||||
@@ -557,7 +566,7 @@ G4EmDNABuilder::ConstructDNALightIonPhysics(G4ParticleDefinition* part,
|
||||
auto modMGE = new G4DNAMillerGreenExcitationModel();
|
||||
modMGE->SelectStationary(stationary);
|
||||
modMGE->SetLowEnergyLimit(0.0);
|
||||
modMGE->SetHighEnergyLimit(emax);
|
||||
modMGE->SetHighEnergyLimit(emaxIonDNA);
|
||||
theDNAExc->AddEmModel(-1, modMGE, reg);
|
||||
|
||||
// *** Ionisation ***
|
||||
@@ -572,7 +581,7 @@ G4EmDNABuilder::ConstructDNALightIonPhysics(G4ParticleDefinition* part,
|
||||
mod->SelectStationary(stationary);
|
||||
modRI = mod;
|
||||
}
|
||||
modRI->SetHighEnergyLimit(emaxDNA);
|
||||
modRI->SetHighEnergyLimit(emaxIonDNA);
|
||||
theDNAIoni->AddEmModel(-1, modRI, reg);
|
||||
|
||||
// *** Charge increase ***
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
|
||||
#include "G4DNAAttachment.hh"
|
||||
#include "G4DNAVibExcitation.hh"
|
||||
#include "G4DNASancheExcitationModel.hh"
|
||||
|
||||
#include "G4DNAElastic.hh"
|
||||
#include "G4DNAChampionElasticModel.hh"
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
|
||||
#include "G4DNAAttachment.hh"
|
||||
#include "G4DNAVibExcitation.hh"
|
||||
#include "G4DNASancheExcitationModel.hh"
|
||||
|
||||
#include "G4DNAElastic.hh"
|
||||
#include "G4DNAChampionElasticModel.hh"
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
#include "G4ProcessManager.hh"
|
||||
#include "G4DNAElectronSolvation.hh"
|
||||
#include "G4DNAVibExcitation.hh"
|
||||
#include "G4DNASancheExcitationModel.hh"
|
||||
#include "G4DNAMolecularDissociation.hh"
|
||||
#include "G4DNABrownianTransportation.hh"
|
||||
#include "G4DNAMolecularReactionTable.hh"
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
|
||||
#include "G4DNAAttachment.hh"
|
||||
#include "G4DNAVibExcitation.hh"
|
||||
#include "G4DNASancheExcitationModel.hh"
|
||||
|
||||
#include "G4DNAElastic.hh"
|
||||
#include "G4DNAChampionElasticModel.hh"
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
#include "G4PhysicsListHelper.hh"
|
||||
#include "G4BuilderType.hh"
|
||||
#include "G4EmBuilder.hh"
|
||||
#include "G4PhysListUtil.hh"
|
||||
|
||||
// factory
|
||||
#include "G4PhysicsConstructorFactory.hh"
|
||||
@@ -50,12 +51,15 @@ G4_DECLARE_PHYSCONSTR_FACTORY(G4EmDNAPhysics);
|
||||
G4EmDNAPhysics::G4EmDNAPhysics(G4int ver, const G4String& name)
|
||||
: G4VPhysicsConstructor(name)
|
||||
{
|
||||
// instantiate singletones for physics
|
||||
G4PhysListUtil::InitialiseParameters();
|
||||
|
||||
// parameters for DNA and for option3 EM physics
|
||||
SetVerboseLevel(ver);
|
||||
G4EmParameters* param = G4EmParameters::Instance();
|
||||
param->SetDefaults();
|
||||
param->SetMinEnergy(10*CLHEP::eV);
|
||||
param->SetMaxEnergy(100*CLHEP::MeV);
|
||||
param->SetMaxEnergy(300*CLHEP::MeV);
|
||||
param->SetLowestElectronEnergy(0*CLHEP::eV);
|
||||
param->SetNumberOfBinsPerDecade(20);
|
||||
param->ActivateAngularGeneratorForIonisation(true);
|
||||
@@ -92,7 +96,7 @@ void G4EmDNAPhysics::ConstructProcess()
|
||||
// parameters
|
||||
G4EmParameters* param = G4EmParameters::Instance();
|
||||
const G4double emaxDNA = 1.*CLHEP::MeV;
|
||||
const G4double emaxIonDNA = 100.*CLHEP::MeV;
|
||||
const G4double emaxIonDNA = 300.*CLHEP::MeV;
|
||||
const G4double eminBorn = 500.*CLHEP::keV;
|
||||
const G4bool fast = param->DNAFast();
|
||||
const G4bool st = param->DNAStationary();
|
||||
@@ -106,26 +110,26 @@ void G4EmDNAPhysics::ConstructProcess()
|
||||
= G4DNAGenericIonsManager::Instance();
|
||||
|
||||
// standard physics
|
||||
G4EmDNABuilder::ConstructStandardEmPhysics(emaxDNA, emaxDNA,
|
||||
G4EmDNABuilder::ConstructStandardEmPhysics(emaxDNA, emaxIonDNA,
|
||||
emaxIonDNA, emaxIonDNA,
|
||||
dnaGS, fast);
|
||||
|
||||
// DNA physics
|
||||
G4EmDNABuilder::ConstructDNAElectronPhysics(emaxDNA, 0, fast, st);
|
||||
G4EmDNABuilder::ConstructDNAProtonPhysics(eminBorn, emaxDNA, 0, fast, st);
|
||||
G4EmDNABuilder::ConstructDNAProtonPhysics(eminBorn, emaxIonDNA, 0, fast, st);
|
||||
G4EmDNABuilder::ConstructDNAIonPhysics(emaxIonDNA, st);
|
||||
|
||||
G4ParticleDefinition* part = genericIonsManager->GetIon("hydrogen");
|
||||
G4EmDNABuilder::ConstructDNALightIonPhysics(part, 0, 0, emaxDNA, fast, st);
|
||||
G4EmDNABuilder::ConstructDNALightIonPhysics(part, 0, 0, emaxIonDNA, fast, st);
|
||||
|
||||
part = G4Alpha::Alpha();
|
||||
G4EmDNABuilder::ConstructDNALightIonPhysics(part, 2, 0, emaxDNA, fast, st);
|
||||
G4EmDNABuilder::ConstructDNALightIonPhysics(part, 2, 0, emaxIonDNA, fast, st);
|
||||
|
||||
part = genericIonsManager->GetIon("alpha+");
|
||||
G4EmDNABuilder::ConstructDNALightIonPhysics(part, 1, 0, emaxDNA, fast, st);
|
||||
G4EmDNABuilder::ConstructDNALightIonPhysics(part, 1, 0, emaxIonDNA, fast, st);
|
||||
|
||||
part = genericIonsManager->GetIon("helium");
|
||||
G4EmDNABuilder::ConstructDNALightIonPhysics(part, 0, 0, emaxDNA, fast, st);
|
||||
G4EmDNABuilder::ConstructDNALightIonPhysics(part, 0, 0, emaxIonDNA, fast, st);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -105,7 +105,7 @@ void G4EmDNAPhysicsActivator::ConstructParticle()
|
||||
void G4EmDNAPhysicsActivator::ConstructProcess()
|
||||
{
|
||||
const std::vector<G4String>& regnamesDNA = theParameters->RegionsDNA();
|
||||
G4int nreg = regnamesDNA.size();
|
||||
std::size_t nreg = regnamesDNA.size();
|
||||
if(0 == nreg)
|
||||
{
|
||||
return;
|
||||
@@ -116,7 +116,7 @@ void G4EmDNAPhysicsActivator::ConstructProcess()
|
||||
G4bool st = theParameters->DNAStationary();
|
||||
|
||||
const G4double emaxDNA = 1.*CLHEP::MeV;
|
||||
const G4double emaxIonDNA = 100.*CLHEP::MeV;
|
||||
const G4double emaxIonDNA = 300.*CLHEP::MeV;
|
||||
const G4double eminBorn = 500.*CLHEP::keV;
|
||||
const G4double emax = theParameters->MaxKinEnergy();
|
||||
|
||||
@@ -137,7 +137,7 @@ void G4EmDNAPhysicsActivator::ConstructProcess()
|
||||
G4ParticleDefinition* h0 = genericIonsManager->GetIon("hydrogen");
|
||||
|
||||
// loop over regions
|
||||
for(G4int i = 0; i < nreg; ++i)
|
||||
for(std::size_t i = 0; i < nreg; ++i)
|
||||
{
|
||||
if(IsVerbose())
|
||||
{
|
||||
@@ -167,7 +167,7 @@ void G4EmDNAPhysicsActivator::ConstructProcess()
|
||||
DeactivateElectronProcesses(emaxDNA, emax, reg);
|
||||
G4EmDNABuilder::ConstructDNAElectronPhysics(emaxDNA, opt, fast, st, reg);
|
||||
DeactivateHadronProcesses(prot, emaxDNA, emax, reg);
|
||||
G4EmDNABuilder::ConstructDNAProtonPhysics(eminBorn, emaxDNA, opt, fast, st, reg);
|
||||
G4EmDNABuilder::ConstructDNAProtonPhysics(eminBorn, emaxIonDNA, opt, fast, st, reg);
|
||||
DeactivateIonProcesses(gion, emaxIonDNA, emax, reg);
|
||||
G4EmDNABuilder::ConstructDNAIonPhysics(emax, st, reg);
|
||||
DeactivateIonProcesses(alpha2, emaxIonDNA, emax, reg);
|
||||
|
||||
@@ -61,7 +61,7 @@ void G4EmDNAPhysics_option2::ConstructProcess()
|
||||
// parameters
|
||||
G4EmParameters* param = G4EmParameters::Instance();
|
||||
const G4double emaxDNA = 1.*CLHEP::MeV;
|
||||
const G4double emaxIonDNA = 100.*CLHEP::MeV;
|
||||
const G4double emaxIonDNA = 300.*CLHEP::MeV;
|
||||
const G4double eminBorn = 500.*CLHEP::keV;
|
||||
const G4bool fast = param->DNAFast();
|
||||
const G4bool st = param->DNAStationary();
|
||||
@@ -75,7 +75,7 @@ void G4EmDNAPhysics_option2::ConstructProcess()
|
||||
= G4DNAGenericIonsManager::Instance();
|
||||
|
||||
// standard physics
|
||||
G4EmDNABuilder::ConstructStandardEmPhysics(emaxDNA, emaxDNA,
|
||||
G4EmDNABuilder::ConstructStandardEmPhysics(emaxDNA, emaxIonDNA,
|
||||
emaxIonDNA, emaxIonDNA,
|
||||
dnaGS, fast);
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ void G4EmDNAPhysics_option4::ConstructProcess()
|
||||
// parameters
|
||||
G4EmParameters* param = G4EmParameters::Instance();
|
||||
const G4double emaxDNA = 1.*CLHEP::MeV;
|
||||
const G4double emaxIonDNA = 100.*CLHEP::MeV;
|
||||
const G4double emaxIonDNA = 300.*CLHEP::MeV;
|
||||
const G4double eminBorn = 500.*CLHEP::keV;
|
||||
const G4bool fast = param->DNAFast();
|
||||
const G4bool st = param->DNAStationary();
|
||||
@@ -72,7 +72,7 @@ void G4EmDNAPhysics_option4::ConstructProcess()
|
||||
= G4DNAGenericIonsManager::Instance();
|
||||
|
||||
// standard physics
|
||||
G4EmDNABuilder::ConstructStandardEmPhysics(emaxDNA, emaxDNA,
|
||||
G4EmDNABuilder::ConstructStandardEmPhysics(emaxDNA, emaxIonDNA,
|
||||
emaxIonDNA, emaxIonDNA,
|
||||
dnaGS, fast);
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ void G4EmDNAPhysics_option6::ConstructProcess()
|
||||
// parameters
|
||||
G4EmParameters* param = G4EmParameters::Instance();
|
||||
const G4double emaxDNA = 1.*CLHEP::MeV;
|
||||
const G4double emaxIonDNA = 100.*CLHEP::MeV;
|
||||
const G4double emaxIonDNA = 300.*CLHEP::MeV;
|
||||
const G4double eminBorn = 500.*CLHEP::keV;
|
||||
const G4bool fast = param->DNAFast();
|
||||
const G4bool st = param->DNAStationary();
|
||||
@@ -85,7 +85,7 @@ void G4EmDNAPhysics_option6::ConstructProcess()
|
||||
= G4DNAGenericIonsManager::Instance();
|
||||
|
||||
// standard physics
|
||||
G4EmDNABuilder::ConstructStandardEmPhysics(emaxDNA, emaxDNA,
|
||||
G4EmDNABuilder::ConstructStandardEmPhysics(emaxDNA, emaxIonDNA,
|
||||
emaxIonDNA, emaxIonDNA,
|
||||
dnaUrban, fast);
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ void G4EmDNAPhysics_option8::ConstructProcess()
|
||||
// parameters
|
||||
G4EmParameters* param = G4EmParameters::Instance();
|
||||
const G4double emaxDNA = 1.*CLHEP::MeV;
|
||||
const G4double emaxIonDNA = 100.*CLHEP::MeV;
|
||||
const G4double emaxIonDNA = 300.*CLHEP::MeV;
|
||||
const G4double eminBorn = 500.*CLHEP::keV;
|
||||
const G4bool fast = param->DNAFast();
|
||||
const G4bool st = param->DNAStationary();
|
||||
@@ -75,7 +75,7 @@ void G4EmDNAPhysics_option8::ConstructProcess()
|
||||
= G4DNAGenericIonsManager::Instance();
|
||||
|
||||
// standard physics
|
||||
G4EmDNABuilder::ConstructStandardEmPhysics(emaxDNA, emaxDNA,
|
||||
G4EmDNABuilder::ConstructStandardEmPhysics(emaxDNA, emaxIonDNA,
|
||||
emaxIonDNA, emaxIonDNA,
|
||||
dnaUrban, fast);
|
||||
|
||||
|
||||
@@ -147,7 +147,7 @@ G4EmModelActivator::G4EmModelActivator(const G4String& emphys)
|
||||
void G4EmModelActivator::ActivateEmOptions()
|
||||
{
|
||||
const std::vector<G4String>& regnamesPhys = theParameters->RegionsPhysics();
|
||||
G4int nreg = regnamesPhys.size();
|
||||
std::size_t nreg = regnamesPhys.size();
|
||||
if(0 == nreg) { return; }
|
||||
G4int verbose = theParameters->Verbose() - 1;
|
||||
if(verbose > 0) {
|
||||
@@ -176,7 +176,7 @@ void G4EmModelActivator::ActivateEmOptions()
|
||||
// general high energy limit
|
||||
G4double highEnergy = theParameters->MaxKinEnergy();
|
||||
|
||||
for(G4int i=0; i<nreg; ++i) {
|
||||
for(std::size_t i=0; i<nreg; ++i) {
|
||||
G4String reg = regnamesPhys[i];
|
||||
if(verbose > 0) {
|
||||
G4cout << i << ". region <" << reg << ">; type <" << typesPhys[i] << "> "
|
||||
@@ -397,7 +397,7 @@ void G4EmModelActivator::ActivateEmOptions()
|
||||
void G4EmModelActivator::ActivatePAI()
|
||||
{
|
||||
const std::vector<G4String> regnamesPAI = theParameters->RegionsPAI();
|
||||
G4int nreg = regnamesPAI.size();
|
||||
std::size_t nreg = regnamesPAI.size();
|
||||
if(0 == nreg) { return; }
|
||||
G4int verbose = theParameters->Verbose() - 1;
|
||||
if(verbose > 0) {
|
||||
@@ -418,7 +418,7 @@ void G4EmModelActivator::ActivatePAI()
|
||||
const G4ParticleDefinition* mumi = G4MuonMinus::MuonMinus();
|
||||
const G4ParticleDefinition* gion = G4GenericIon::GenericIon();
|
||||
|
||||
for(G4int i = 0; i < nreg; ++i) {
|
||||
for(std::size_t i = 0; i < nreg; ++i) {
|
||||
const G4ParticleDefinition* p = nullptr;
|
||||
if(particlesPAI[i] != "all") {
|
||||
p = G4ParticleTable::GetParticleTable()->FindParticle(particlesPAI[i]);
|
||||
@@ -511,7 +511,7 @@ void G4EmModelActivator::ActivatePAI()
|
||||
void G4EmModelActivator::ActivateMicroElec()
|
||||
{
|
||||
const std::vector<G4String> regnamesME = theParameters->RegionsMicroElec();
|
||||
G4int nreg = regnamesME.size();
|
||||
std::size_t nreg = regnamesME.size();
|
||||
if(0 == nreg)
|
||||
{
|
||||
return;
|
||||
@@ -564,7 +564,7 @@ void G4EmModelActivator::ActivateMicroElec()
|
||||
G4LowECapture* ecap = new G4LowECapture(elowest);
|
||||
eman->AddDiscreteProcess(ecap);
|
||||
|
||||
for(G4int i = 0; i < nreg; ++i)
|
||||
for(std::size_t i = 0; i < nreg; ++i)
|
||||
{
|
||||
|
||||
G4String reg = regnamesME[i];
|
||||
|
||||
@@ -208,29 +208,29 @@ void G4GammaGeneralProcess::InitialiseProcess(const G4ParticleDefinition*)
|
||||
|
||||
const G4ProductionCutsTable* theCoupleTable=
|
||||
G4ProductionCutsTable::GetProductionCutsTable();
|
||||
size_t numOfCouples = theCoupleTable->GetTableSize();
|
||||
std::size_t numOfCouples = theCoupleTable->GetTableSize();
|
||||
|
||||
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)));
|
||||
std::size_t nbin1 = std::max(5, nd*G4lrint(std::log10(minPEEnergy/mine)));
|
||||
std::size_t nbin2 = std::max(5, nd*G4lrint(std::log10(maxe/minMMEnergy)));
|
||||
|
||||
G4PhysicsVector* vec = nullptr;
|
||||
G4PhysicsLogVector aVector(mine,minPEEnergy,nbin1,splineFlag);
|
||||
G4PhysicsLogVector bVector(minPEEnergy,minEEEnergy,nLowE,splineFlag);
|
||||
G4PhysicsLogVector cVector(minEEEnergy,minMMEnergy,nHighE,splineFlag);
|
||||
G4PhysicsLogVector dVector(minMMEnergy,maxe,nbin2,splineFlag);
|
||||
G4PhysicsLogVector aVector(mine,minPEEnergy,nbin1,true);
|
||||
G4PhysicsLogVector bVector(minPEEnergy,minEEEnergy,nLowE,false);
|
||||
G4PhysicsLogVector cVector(minEEEnergy,minMMEnergy,nHighE,false);
|
||||
G4PhysicsLogVector dVector(minMMEnergy,maxe,nbin2,true);
|
||||
|
||||
for(size_t i=0; i<nTables; ++i) {
|
||||
for(std::size_t i=0; i<nTables; ++i) {
|
||||
if(!theT[i]) { continue; }
|
||||
//G4cout << "## PreparePhysTable " << i << "." << G4endl;
|
||||
G4PhysicsTable* table = theHandler->MakeTable(i);
|
||||
//G4cout << " make table " << table << G4endl;
|
||||
for(size_t j=0; j<numOfCouples; ++j) {
|
||||
for(std::size_t j=0; j<numOfCouples; ++j) {
|
||||
vec = (*table)[j];
|
||||
if (bld->GetFlag(j) && nullptr == vec) {
|
||||
//G4cout <<" i= "<<i<<" j= "<< j <<" make new vector"<< G4endl;
|
||||
//G4cout <<"InitialiseProcess iTable="<<i<<" jCouple="<< j <<" make new vector"<< G4endl;
|
||||
if(i<=1) {
|
||||
vec = new G4PhysicsVector(aVector);
|
||||
} else if(i<=5) {
|
||||
@@ -285,7 +285,7 @@ void G4GammaGeneralProcess::BuildPhysicsTable(const G4ParticleDefinition& part)
|
||||
if(isTheMaster) {
|
||||
const G4ProductionCutsTable* theCoupleTable=
|
||||
G4ProductionCutsTable::GetProductionCutsTable();
|
||||
size_t numOfCouples = theCoupleTable->GetTableSize();
|
||||
G4int numOfCouples = (G4int)theCoupleTable->GetTableSize();
|
||||
|
||||
G4LossTableBuilder* bld = G4LossTableManager::Instance()->GetTableBuilder();
|
||||
const std::vector<G4PhysicsTable*>& tables = theHandler->GetTables();
|
||||
@@ -298,22 +298,21 @@ void G4GammaGeneralProcess::BuildPhysicsTable(const G4ParticleDefinition& part)
|
||||
G4double sigComp(0.), sigPE(0.), sigConv(0.), sigR(0.),
|
||||
sigN(0.), sigM(0.), val(0.);
|
||||
|
||||
for(size_t i=0; i<numOfCouples; ++i) {
|
||||
for(G4int i=0; i<numOfCouples; ++i) {
|
||||
|
||||
if (bld->GetFlag(i)) {
|
||||
|
||||
G4int idx = (!baseMat) ? i : DensityIndex(i);
|
||||
const G4MaterialCutsCouple* couple =
|
||||
theCoupleTable->GetMaterialCutsCouple(i);
|
||||
const G4Material* material = couple->GetMaterial();
|
||||
|
||||
// energy interval 0
|
||||
size_t nn = (*(tables[0]))[idx]->GetVectorLength();
|
||||
std::size_t nn = (*(tables[0]))[idx]->GetVectorLength();
|
||||
if(1 < verboseLevel) {
|
||||
G4cout << "======= Zone 0 ======= N= " << nn
|
||||
<< " for " << material->GetName() << G4endl;
|
||||
}
|
||||
for(size_t j=0; j<nn; ++j) {
|
||||
for(std::size_t j=0; j<nn; ++j) {
|
||||
G4double e = (*(tables[0]))[idx]->Energy(j);
|
||||
G4double loge = G4Log(e);
|
||||
sigComp = theCompton->GetLambda(e, couple, loge);
|
||||
@@ -336,7 +335,7 @@ void G4GammaGeneralProcess::BuildPhysicsTable(const G4ParticleDefinition& part)
|
||||
if(1 < verboseLevel) {
|
||||
G4cout << "======= Zone 1 ======= N= " << nn << G4endl;
|
||||
}
|
||||
for(size_t j=0; j<nn; ++j) {
|
||||
for(std::size_t j=0; j<nn; ++j) {
|
||||
G4double e = (*(tables[2]))[idx]->Energy(j);
|
||||
G4double loge = G4Log(e);
|
||||
sigComp = theCompton->GetLambda(e, couple, loge);
|
||||
@@ -364,7 +363,7 @@ void G4GammaGeneralProcess::BuildPhysicsTable(const G4ParticleDefinition& part)
|
||||
if(1 < verboseLevel) {
|
||||
G4cout << "======= Zone 2 ======= N= " << nn << G4endl;
|
||||
}
|
||||
for(size_t j=0; j<nn; ++j) {
|
||||
for(std::size_t j=0; j<nn; ++j) {
|
||||
G4double e = (*(tables[6]))[idx]->Energy(j);
|
||||
G4double loge = G4Log(e);
|
||||
sigComp = theCompton->GetLambda(e, couple, loge);
|
||||
@@ -400,7 +399,7 @@ void G4GammaGeneralProcess::BuildPhysicsTable(const G4ParticleDefinition& part)
|
||||
G4cout << "======= Zone 3 ======= N= " << nn
|
||||
<< " for " << material->GetName() << G4endl;
|
||||
}
|
||||
for(size_t j=0; j<nn; ++j) {
|
||||
for(std::size_t j=0; j<nn; ++j) {
|
||||
G4double e = (*(tables[10]))[idx]->Energy(j);
|
||||
G4double loge = G4Log(e);
|
||||
sigComp = theCompton->GetLambda(e, couple, loge);
|
||||
@@ -437,8 +436,9 @@ void G4GammaGeneralProcess::BuildPhysicsTable(const G4ParticleDefinition& part)
|
||||
val = sigN/sum;
|
||||
(*(tables[14]))[idx]->PutValue(j, val);
|
||||
}
|
||||
for(size_t k=0; k<nTables; ++k) {
|
||||
if(splineFlag) {
|
||||
for(std::size_t k=0; k<nTables; ++k) {
|
||||
if(theT[k] && (k <= 1 || k >= 10)) {
|
||||
//G4cout <<"BuildPhysTable spline iTable="<<k<<" jCouple="<< idx << G4endl;
|
||||
(*(tables[k]))[idx]->FillSecondDerivatives();
|
||||
}
|
||||
}
|
||||
@@ -483,8 +483,8 @@ G4double G4GammaGeneralProcess::PostStepGetPhysicalInteractionLength(
|
||||
currentMaterial = couple->GetMaterial();
|
||||
factor = 1.0;
|
||||
if(baseMat) {
|
||||
basedCoupleIndex = DensityIndex(currentCoupleIndex);
|
||||
factor = DensityFactor(currentCoupleIndex);
|
||||
basedCoupleIndex = DensityIndex((G4int)currentCoupleIndex);
|
||||
factor = DensityFactor((G4int)currentCoupleIndex);
|
||||
}
|
||||
recompute = true;
|
||||
}
|
||||
@@ -548,7 +548,7 @@ G4double G4GammaGeneralProcess::TotalCrossSectionPerVolume()
|
||||
//G4cout << "XS1: " << cross << G4endl;
|
||||
peLambda = thePhotoElectric->GetLambda(preStepKinEnergy, currentCouple, preStepLogE);
|
||||
cross += peLambda;
|
||||
//G4cout << "XS2: " << cross << G4endl;
|
||||
//G4cout << "XS2: " << peLambda << G4endl;
|
||||
|
||||
} else if(preStepKinEnergy < minEEEnergy) {
|
||||
cross = ComputeGeneralLambda(1, 2);
|
||||
@@ -562,10 +562,10 @@ G4double G4GammaGeneralProcess::TotalCrossSectionPerVolume()
|
||||
cross = ComputeGeneralLambda(3, 10);
|
||||
//G4cout << "XS5: " << cross << G4endl;
|
||||
}
|
||||
/*
|
||||
/*
|
||||
G4cout << "xs= " << cross << " idxE= " << idxEnergy
|
||||
<< " idxC= " << currentCoupleIndex
|
||||
<< " E= " << energy << G4endl;
|
||||
<< " E= " << preStepKinEnergy << G4endl;
|
||||
*/
|
||||
return cross;
|
||||
}
|
||||
@@ -589,7 +589,7 @@ G4VParticleChange* G4GammaGeneralProcess::PostStepDoIt(const G4Track& track,
|
||||
if(preStepLambda*q <= peLambda) {
|
||||
SelectEmProcess(step, thePhotoElectric);
|
||||
} else {
|
||||
if(theT[1] && preStepLambda*q < preStepLambda*GetProbability(1) + peLambda) {
|
||||
if(theT[1] && preStepLambda*q < (preStepLambda - peLambda)*GetProbability(1) + peLambda) {
|
||||
SelectEmProcess(step, theRayleigh);
|
||||
} else {
|
||||
SelectEmProcess(step, theCompton);
|
||||
@@ -670,7 +670,7 @@ G4bool G4GammaGeneralProcess::StorePhysicsTable(const G4ParticleDefinition* part
|
||||
!theRayleigh->StorePhysicsTable(part, directory, ascii))
|
||||
{ yes = false; }
|
||||
|
||||
for(size_t i=0; i<nTables; ++i) {
|
||||
for(std::size_t i=0; i<nTables; ++i) {
|
||||
if(theT[i]) {
|
||||
G4String nam = (0==i || 2==i || 6==i || 10==i)
|
||||
? "LambdaGeneral" + nameT[i] : "ProbGeneral" + nameT[i];
|
||||
@@ -704,12 +704,13 @@ G4GammaGeneralProcess::RetrievePhysicsTable(const G4ParticleDefinition* part,
|
||||
!theRayleigh->RetrievePhysicsTable(part, directory, ascii))
|
||||
{ yes = false; }
|
||||
|
||||
for(size_t i=0; i<nTables; ++i) {
|
||||
for(std::size_t i=0; i<nTables; ++i) {
|
||||
if(theT[i]) {
|
||||
G4String nam = (0==i || 2==i || 6==i || 10==i)
|
||||
? "LambdaGeneral" + nameT[i] : "ProbGeneral" + nameT[i];
|
||||
G4String fnam = GetPhysicsTableFileName(part,directory,nam,ascii);
|
||||
if(!theHandler->RetrievePhysicsTable(i, part, fnam, ascii, splineFlag))
|
||||
G4String fnam = GetPhysicsTableFileName(part,directory,nam,ascii);
|
||||
G4bool spline = (i <= 1 || i >= 10);
|
||||
if(!theHandler->RetrievePhysicsTable(i, part, fnam, ascii, spline))
|
||||
{ yes = false; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user