Import Geant4 11.0.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2021-06-25 16:12:29 +02:00
parent c968e26a39
commit 6399a014b6
4200 changed files with 207479 additions and 237366 deletions
@@ -132,6 +132,27 @@ void G4EmBuilder::ConstructIonEmPhysics(G4hMultipleScattering* hmsc,
}
}
void G4EmBuilder::ConstructIonEmPhysicsSS()
{
G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
G4ParticleDefinition* part = G4Deuteron::Deuteron();
ph->RegisterProcess(new G4hIonisation(), part);
ph->RegisterProcess(new G4CoulombScattering(), part);
part = G4Triton::Triton();
ph->RegisterProcess(new G4hIonisation(), part);
ph->RegisterProcess(new G4CoulombScattering(), part);
part = G4He3::He3();
ph->RegisterProcess(new G4ionIonisation(), part);
ph->RegisterProcess(new G4CoulombScattering(), part);
part = G4Alpha::Alpha();
ph->RegisterProcess(new G4ionIonisation(), part);
ph->RegisterProcess(new G4CoulombScattering(), part);
}
void G4EmBuilder::ConstructLightHadrons(G4ParticleDefinition* part1,
G4ParticleDefinition* part2,
G4bool isHEP, G4bool isProton,
@@ -170,6 +191,30 @@ void G4EmBuilder::ConstructLightHadrons(G4ParticleDefinition* part1,
if( isWVI ) { ph->RegisterProcess(ss, part2); }
}
void G4EmBuilder::ConstructLightHadronsSS(G4ParticleDefinition* part1,
G4ParticleDefinition* part2,
G4bool isHEP)
{
G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
G4hBremsstrahlung* brem = ( isHEP ) ? new G4hBremsstrahlung() : nullptr;
G4hPairProduction* pair = ( isHEP ) ? new G4hPairProduction() : nullptr;
ph->RegisterProcess(new G4hIonisation(), part1);
if( isHEP ) {
ph->RegisterProcess(brem, part1);
ph->RegisterProcess(pair, part1);
}
ph->RegisterProcess(new G4CoulombScattering(), part1);
ph->RegisterProcess(new G4hIonisation(), part2);
if( isHEP ) {
ph->RegisterProcess(brem, part2);
ph->RegisterProcess(pair, part2);
}
ph->RegisterProcess(new G4CoulombScattering(), part2);
}
void G4EmBuilder::ConstructCharged(G4hMultipleScattering* hmsc,
G4NuclearStopping* nucStopping,
G4bool isWVI)
@@ -234,6 +279,60 @@ void G4EmBuilder::ConstructCharged(G4hMultipleScattering* hmsc,
}
}
void G4EmBuilder::ConstructChargedSS(G4hMultipleScattering* hmsc)
{
G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
G4EmParameters* param = G4EmParameters::Instance();
G4HadronicParameters* hpar = G4HadronicParameters::Instance();
G4bool isHEP = ( param->MaxKinEnergy() > hpar->EnergyThresholdForHeavyHadrons() );
// muon bremsstrahlung and pair production
G4MuBremsstrahlung* mub = ( isHEP ) ? new G4MuBremsstrahlung() : nullptr;
G4MuPairProduction* mup = ( isHEP ) ? new G4MuPairProduction() : nullptr;
// muon multiple and single scattering
G4CoulombScattering* muss = new G4CoulombScattering();
// Add standard EM Processes
// mu+-
G4ParticleDefinition* part = G4MuonPlus::MuonPlus();
ph->RegisterProcess(new G4MuIonisation(), part);
if( isHEP ) {
ph->RegisterProcess(mub, part);
ph->RegisterProcess(mup, part);
}
ph->RegisterProcess(muss, part);
part = G4MuonMinus::MuonMinus();
ph->RegisterProcess(new G4MuIonisation(), part);
if( isHEP ) {
ph->RegisterProcess(mub, part);
ph->RegisterProcess(mup, part);
}
ph->RegisterProcess(muss, part);
// pi+-
ConstructLightHadronsSS(G4PionPlus::PionPlus(), G4PionMinus::PionMinus(), isHEP);
// K+-
ConstructLightHadronsSS(G4KaonPlus::KaonPlus(), G4KaonMinus::KaonMinus(), isHEP);
// p, pbar
ConstructLightHadronsSS(G4Proton::Proton(), G4AntiProton::AntiProton(), isHEP);
// ions
ConstructIonEmPhysicsSS();
// hyperons and anti particles
if( isHEP ) {
ConstructBasicEmPhysics(hmsc, G4HadParticles::GetHeavyChargedParticles());
// b- and c- charged particles
if( hpar->EnableBCParticles() ) {
ConstructBasicEmPhysics(hmsc, G4HadParticles::GetBCChargedHadrons());
}
}
}
void G4EmBuilder::ConstructMinimalEmSet()
{
// pseudo-particles
@@ -374,6 +374,38 @@ void G4EmDNAChemistry::ConstructDissociationChannels()
water->NewConfigurationWithElectronOccupancy("DissociativeAttachment", *occ);
water->AddDecayChannel("DissociativeAttachment", decCh1);
//////////////////////////////////////////////////////////
// Electron-hole recombination //
//////////////////////////////////////////////////////////
decCh1 = new G4MolecularDissociationChannel("H2Ovib_DissociationDecay1");
decCh2 = new G4MolecularDissociationChannel("H2Ovib_DissociationDecay2");
decCh3 = new G4MolecularDissociationChannel("H2Ovib_DissociationDecay3");
//Decay 1 : 2OH + H_2
decCh1->AddProduct(H2);
decCh1->AddProduct(OH);
decCh1->AddProduct(OH);
decCh1->SetProbability(0.15);
decCh1->SetDisplacementType(G4DNAWaterDissociationDisplacer::
B1A1_DissociationDecay);
//Decay 2 : OH + H
decCh2->AddProduct(OH);
decCh2->AddProduct(H);
decCh2->SetProbability(0.55);
decCh2->SetDisplacementType(G4DNAWaterDissociationDisplacer::
A1B1_DissociationDecay);
//Decay 3 : relaxation
decCh3->SetProbability(0.30);
const auto pH2Ovib = G4H2O::Definition()->NewConfiguration("H2Ovib");
assert(pH2Ovib != nullptr);
water->AddDecayChannel(pH2Ovib, decCh1);
water->AddDecayChannel(pH2Ovib, decCh2);
water->AddDecayChannel(pH2Ovib, decCh3);
delete occ;
}
@@ -382,6 +382,38 @@ void G4EmDNAChemistry_option1::ConstructDissociationChannels()
water->NewConfigurationWithElectronOccupancy("DissociativeAttachment", *occ);
water->AddDecayChannel("DissociativeAttachment", decCh1);
//////////////////////////////////////////////////////////
// Electron-hole recombination //
//////////////////////////////////////////////////////////
decCh1 = new G4MolecularDissociationChannel("H2Ovib_DissociationDecay1");
decCh2 = new G4MolecularDissociationChannel("H2Ovib_DissociationDecay2");
decCh3 = new G4MolecularDissociationChannel("H2Ovib_DissociationDecay3");
//Decay 1 : 2OH + H_2
decCh1->AddProduct(H2);
decCh1->AddProduct(OH);
decCh1->AddProduct(OH);
decCh1->SetProbability(0.15);
decCh1->SetDisplacementType(G4DNAWaterDissociationDisplacer::
B1A1_DissociationDecay);
//Decay 2 : OH + H
decCh2->AddProduct(OH);
decCh2->AddProduct(H);
decCh2->SetProbability(0.55);
decCh2->SetDisplacementType(G4DNAWaterDissociationDisplacer::
A1B1_DissociationDecay);
//Decay 3 : relaxation
decCh3->SetProbability(0.30);
const auto pH2Ovib = G4H2O::Definition()->NewConfiguration("H2Ovib");
assert(pH2Ovib != nullptr);
water->AddDecayChannel(pH2Ovib, decCh1);
water->AddDecayChannel(pH2Ovib, decCh2);
water->AddDecayChannel(pH2Ovib, decCh3);
delete occ;
}
@@ -411,6 +411,38 @@ void G4EmDNAChemistry_option2::ConstructDissociationChannels()
water->AddDecayChannel(
"DissociativeAttachment", decCh1);
//////////////////////////////////////////////////////////
// Electron-hole recombination //
//////////////////////////////////////////////////////////
decCh1 = new G4MolecularDissociationChannel("H2Ovib_DissociationDecay1");
decCh2 = new G4MolecularDissociationChannel("H2Ovib_DissociationDecay2");
decCh3 = new G4MolecularDissociationChannel("H2Ovib_DissociationDecay3");
//Decay 1 : 2OH + H_2
decCh1->AddProduct(H2);
decCh1->AddProduct(OH);
decCh1->AddProduct(OH);
decCh1->SetProbability(0.15);
decCh1->SetDisplacementType(G4DNAWaterDissociationDisplacer::
B1A1_DissociationDecay);
//Decay 2 : OH + H
decCh2->AddProduct(OH);
decCh2->AddProduct(H);
decCh2->SetProbability(0.55);
decCh2->SetDisplacementType(G4DNAWaterDissociationDisplacer::
A1B1_DissociationDecay);
//Decay 3 : relaxation
decCh3->SetProbability(0.30);
const auto pH2Ovib = G4H2O::Definition()->NewConfiguration("H2Ovib");
assert(pH2Ovib != nullptr);
water->AddDecayChannel(pH2Ovib, decCh1);
water->AddDecayChannel(pH2Ovib, decCh2);
water->AddDecayChannel(pH2Ovib, decCh3);
delete occ;
}
@@ -281,12 +281,17 @@ void G4EmDNAChemistry_option3::ConstructDissociationChannels()
G4MoleculeTable::Instance()->GetConfiguration("H3Op");
G4MolecularConfiguration* H =
G4MoleculeTable::Instance()->GetConfiguration("H");
G4MolecularConfiguration* O =
G4MoleculeTable::Instance()->GetConfiguration("Oxy");
//-------------------------------------
//Define the decay channels
G4MoleculeDefinition* water = G4H2O::Definition();
G4MolecularDissociationChannel* decCh1;
G4MolecularDissociationChannel* decCh2;
G4MolecularDissociationChannel* decCh3;
G4MolecularDissociationChannel* decCh4;
G4MolecularDissociationChannel* decCh5;
G4ElectronOccupancy* occ = new G4ElectronOccupancy(
*(water->GetGroundStateElectronOccupancy()));
@@ -311,7 +316,6 @@ void G4EmDNAChemistry_option3::ConstructDissociationChannels()
decCh2->SetDisplacementType(
G4DNAWaterDissociationDisplacer::A1B1_DissociationDecay);
// water->AddExcitedState("A^1B_1");
occ->RemoveElectron(4, 1); // this is the transition form ground state to
occ->AddElectron(5, 1); // the first unoccupied orbital: A^1B_1
@@ -323,18 +327,20 @@ void G4EmDNAChemistry_option3::ConstructDissociationChannels()
//---------------Excitation on the fourth layer-----------
decCh1 = new G4MolecularDissociationChannel("B^1A_1_Relaxation_Channel");
decCh2 = new G4MolecularDissociationChannel("B^1A_1_DissociativeDecay");
G4MolecularDissociationChannel* decCh3 = new G4MolecularDissociationChannel(
"B^1A_1_AutoIonisation_Channel");
decCh3 = new G4MolecularDissociationChannel("B^1A_1_AutoIonisation_Channel");
decCh4 = new G4MolecularDissociationChannel("A^1B_1_DissociativeDecay");
decCh5 = new G4MolecularDissociationChannel("B^1A_1_DissociativeDecay2");
//Decay 1 : energy
decCh1->SetEnergy(waterExcitation.ExcitationEnergy(1));
decCh1->SetProbability(0.3);
decCh1->SetProbability(0.175);
//Decay 2 : 2OH + H_2
decCh2->AddProduct(H2);
decCh2->AddProduct(OH);
decCh2->AddProduct(OH);
decCh2->SetProbability(0.15);
decCh2->SetProbability(0.0325);
decCh2->SetDisplacementType(
G4DNAWaterDissociationDisplacer::B1A1_DissociationDecay);
@@ -342,9 +348,22 @@ void G4EmDNAChemistry_option3::ConstructDissociationChannels()
decCh3->AddProduct(OH);
decCh3->AddProduct(H3O);
decCh3->AddProduct(e_aq);
decCh3->SetProbability(0.55);
decCh3->SetProbability(0.50);
decCh3->SetDisplacementType(G4DNAWaterDissociationDisplacer::AutoIonisation);
//Decay 4 : H + OH
decCh4->AddProduct(H);
decCh4->AddProduct(OH);
decCh4->SetProbability(0.2535);
decCh4->SetDisplacementType(G4DNAWaterDissociationDisplacer::A1B1_DissociationDecay);
//Decay 5 : 2H + O
decCh5->AddProduct(O);
decCh5->AddProduct(H);
decCh5->AddProduct(H);
decCh5->SetProbability(0.039);
decCh5->SetDisplacementType(G4DNAWaterDissociationDisplacer::B1A1_DissociationDecay2);
*occ = *(water->GetGroundStateElectronOccupancy());
occ->RemoveElectron(3); // this is the transition form ground state to
occ->AddElectron(5, 1); // the first unoccupied orbital: B^1A_1
@@ -353,6 +372,8 @@ void G4EmDNAChemistry_option3::ConstructDissociationChannels()
water->AddDecayChannel("B^1A_1", decCh1);
water->AddDecayChannel("B^1A_1", decCh2);
water->AddDecayChannel("B^1A_1", decCh3);
water->AddDecayChannel("B^1A_1", decCh4);
water->AddDecayChannel("B^1A_1", decCh5);
//-------------------------------------------------------
//-------------------Excitation of 3rd layer-----------------
@@ -501,6 +522,48 @@ void G4EmDNAChemistry_option3::ConstructDissociationChannels()
water->NewConfigurationWithElectronOccupancy("DissociativeAttachment_ch1", *occ);
water->AddDecayChannel("DissociativeAttachment_ch1", decCh1);
//////////////////////////////////////////////////////////
// Electron-hole recombination //
//////////////////////////////////////////////////////////
decCh1 = new G4MolecularDissociationChannel("H2Ovib_DissociationDecay1");
decCh2 = new G4MolecularDissociationChannel("H2Ovib_DissociationDecay2");
decCh3 = new G4MolecularDissociationChannel("H2Ovib_DissociationDecay3");
decCh4 = new G4MolecularDissociationChannel("H2Ovib_DissociationDecay4");
//Decay 1 : 2OH + H_2
decCh1->AddProduct(H2);
decCh1->AddProduct(OH);
decCh1->AddProduct(OH);
decCh1->SetProbability(0.1365);
decCh1->SetDisplacementType(G4DNAWaterDissociationDisplacer::
B1A1_DissociationDecay);
//Decay 2 : OH + H
decCh2->AddProduct(OH);
decCh2->AddProduct(H);
decCh2->SetProbability(0.3575);
decCh2->SetDisplacementType(G4DNAWaterDissociationDisplacer::
A1B1_DissociationDecay);
//Decay 3 : 2H + O(3p)
decCh3->AddProduct(O);
decCh3->AddProduct(H);
decCh3->AddProduct(H);
decCh3->SetProbability(0.156);
decCh3->SetDisplacementType(G4DNAWaterDissociationDisplacer::
B1A1_DissociationDecay2);
//Decay 4 : relaxation
decCh4->SetProbability(0.35);
const auto pH2Ovib = G4H2O::Definition()->NewConfiguration("H2Ovib");
assert(pH2Ovib != nullptr);
water->AddDecayChannel(pH2Ovib, decCh1);
water->AddDecayChannel(pH2Ovib, decCh2);
water->AddDecayChannel(pH2Ovib, decCh3);
water->AddDecayChannel(pH2Ovib, decCh4);
delete occ;
}
@@ -29,10 +29,7 @@
#include "G4SystemOfUnits.hh"
#include "G4DNAGenericIonsManager.hh"
// *** Processes and models for Geant4-DNA
#include "G4DNAElectronSolvation.hh"
#include "G4DNAElastic.hh"
#include "G4DNAChampionElasticModel.hh"
@@ -47,36 +44,34 @@
#include "G4DNAChargeIncrease.hh"
// particles
#include "G4Electron.hh"
#include "G4Proton.hh"
#include "G4Alpha.hh"
#include "G4GenericIon.hh"
#include "G4DNAGenericIonsManager.hh"
// Warning : the following is needed in order to use EM Physics builders
// e+
#include "G4Positron.hh"
#include "G4eMultipleScattering.hh"
#include "G4eIonisation.hh"
#include "G4eBremsstrahlung.hh"
#include "G4eplusAnnihilation.hh"
// gamma
#include "G4Gamma.hh"
#include "G4PhotoElectricEffect.hh"
#include "G4LivermorePhotoElectricModel.hh"
#include "G4ComptonScattering.hh"
#include "G4LivermoreComptonModel.hh"
#include "G4KleinNishinaModel.hh"
#include "G4GammaConversion.hh"
#include "G4LivermoreGammaConversionModel.hh"
#include "G4RayleighScattering.hh"
#include "G4LivermoreRayleighModel.hh"
#include "G4BetheHeitler5DModel.hh"
// utilities
#include "G4EmParameters.hh"
// end of warning
#include "G4LossTableManager.hh"
#include "G4UAtomicDeexcitation.hh"
#include "G4PhysicsListHelper.hh"
#include "G4BuilderType.hh"
#include "G4EmBuilder.hh"
// factory
#include "G4PhysicsConstructorFactory.hh"
@@ -85,14 +80,21 @@ G4_DECLARE_PHYSCONSTR_FACTORY(G4EmDNAPhysics);
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmDNAPhysics::G4EmDNAPhysics(G4int ver, const G4String&)
: G4VPhysicsConstructor("G4EmDNAPhysics"), verbose(ver)
G4EmDNAPhysics::G4EmDNAPhysics(G4int ver, const G4String& name)
: G4VPhysicsConstructor(name)
{
// parameters for DNA and for option3 EM physics
SetVerboseLevel(ver);
G4EmParameters* param = G4EmParameters::Instance();
param->SetDefaults();
param->SetMinEnergy(10*CLHEP::eV);
param->SetLowestElectronEnergy(0*CLHEP::eV);
param->SetNumberOfBinsPerDecade(20);
param->SetStepFunction(0.2, 100*CLHEP::um);
param->SetMscStepLimitType(fUseDistanceToBoundary);
param->SetLateralDisplacementAlg96(true);
param->SetFluo(true);
param->SetAuger(true);
param->SetAugerCascade(true);
param->SetDeexcitationIgnoreCut(true);
param->ActivateDNA();
@@ -108,21 +110,22 @@ G4EmDNAPhysics::~G4EmDNAPhysics()
void G4EmDNAPhysics::ConstructParticle()
{
// bosons
// bosons
G4Gamma::Gamma();
// leptons
// leptons
G4Electron::Electron();
G4Positron::Positron();
// baryons
// baryons
G4Proton::Proton();
G4GenericIon::GenericIonDefinition();
G4Alpha::Alpha();
G4DNAGenericIonsManager * genericIonsManager;
genericIonsManager=G4DNAGenericIonsManager::Instance();
genericIonsManager->GetIon("alpha++");
G4DNAGenericIonsManager* genericIonsManager
= G4DNAGenericIonsManager::Instance();
//genericIonsManager->GetIon("alpha++");
genericIonsManager->GetIon("alpha+");
genericIonsManager->GetIon("helium");
genericIonsManager->GetIon("hydrogen");
@@ -130,151 +133,131 @@ void G4EmDNAPhysics::ConstructParticle()
//genericIonsManager->GetIon("nitrogen");
//genericIonsManager->GetIon("oxygen");
//genericIonsManager->GetIon("iron");
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4EmDNAPhysics::ConstructProcess()
{
if(verbose > 1) {
G4cout << "### " << GetPhysicsName() << " Construct Processes " << G4endl;
if(verboseLevel > 1) {
G4cout << "### " << GetPhysicsName()
<< " Construct Processes " << G4endl;
}
G4PhysicsListHelper* pPhysicsHelper = G4PhysicsListHelper::GetPhysicsListHelper();
ConstructGammaPositronProcesses();
auto pParticleIterator = GetParticleIterator();
pParticleIterator->reset();
while( (*pParticleIterator)() )
{
G4ParticleDefinition* pParticle = pParticleIterator->value();
G4String particleName = pParticle->GetParticleName();
G4PhysicsListHelper* helper =
G4PhysicsListHelper::GetPhysicsListHelper();
G4DNAGenericIonsManager* genericIonsManager
= G4DNAGenericIonsManager::Instance();
if (particleName == "e-") {
// e-
G4ParticleDefinition* part = G4Electron::Electron();
G4DNAElectronSolvation* pSolvation = new G4DNAElectronSolvation("e-_G4DNAElectronSolvation");
auto pSolvationModel = G4DNASolvationModelFactory::GetMacroDefinedModel();
pSolvationModel->SetHighEnergyLimit(7.4*eV); // limit of the Champion's model
pSolvation->SetEmModel(pSolvationModel);
pPhysicsHelper->RegisterProcess(pSolvation, pParticle);
// *** Solvation ***
G4DNAElectronSolvation* pSolvation =
new G4DNAElectronSolvation("e-_G4DNAElectronSolvation");
auto pSolvationModel = G4DNASolvationModelFactory::GetMacroDefinedModel();
pSolvationModel->SetHighEnergyLimit(7.4*eV); // limit of the Champion's model
pSolvation->SetEmModel(pSolvationModel);
helper->RegisterProcess(pSolvation, part);
// *** Elastic scattering (two alternative models available) ***
G4DNAElastic* pElasticProcess = new G4DNAElastic("e-_G4DNAElastic");
pElasticProcess->SetEmModel(new G4DNAChampionElasticModel());
// or alternative model
//theDNAElasticProcess->SetEmModel(new G4DNAScreenedRutherfordElasticModel());
pPhysicsHelper->RegisterProcess(pElasticProcess, pParticle);
// *** Elastic scattering ***
G4DNAElastic* pElasticProcess = new G4DNAElastic("e-_G4DNAElastic");
pElasticProcess->SetEmModel(new G4DNAChampionElasticModel());
helper->RegisterProcess(pElasticProcess, part);
// *** Excitation ***
pPhysicsHelper->RegisterProcess(new G4DNAExcitation("e-_G4DNAExcitation"), pParticle);
// *** Excitation ***
helper->RegisterProcess(new G4DNAExcitation("e-_G4DNAExcitation"), part);
// *** Ionisation ***
pPhysicsHelper->RegisterProcess(new G4DNAIonisation("e-_G4DNAIonisation"), pParticle);
// *** Ionisation ***
helper->RegisterProcess(new G4DNAIonisation("e-_G4DNAIonisation"), part);
// *** Vibrational excitation ***
pPhysicsHelper->RegisterProcess(new G4DNAVibExcitation("e-_G4DNAVibExcitation"), pParticle);
// *** Vibrational excitation ***
helper->RegisterProcess(new G4DNAVibExcitation("e-_G4DNAVibExcitation"), part);
// *** Attachment ***
pPhysicsHelper->RegisterProcess(new G4DNAAttachment("e-_G4DNAAttachment"), pParticle);
// *** Attachment ***
helper->RegisterProcess(new G4DNAAttachment("e-_G4DNAAttachment"), part);
// proton
part = G4Proton::Proton();
helper->RegisterProcess(new G4DNAElastic("proton_G4DNAElastic"), part);
helper->RegisterProcess(new G4DNAExcitation("proton_G4DNAExcitation"), part);
helper->RegisterProcess(new G4DNAIonisation("proton_G4DNAIonisation"), part);
helper->RegisterProcess(new G4DNAChargeDecrease("proton_G4DNAChargeDecrease"), part);
// hydrogen
part = genericIonsManager->GetIon("hydrogen");
helper->RegisterProcess(new G4DNAElastic("hydrogen_G4DNAElastic"), part);
helper->RegisterProcess(new G4DNAExcitation("hydrogen_G4DNAExcitation"), part);
helper->RegisterProcess(new G4DNAIonisation("hydrogen_G4DNAIonisation"), part);
helper->RegisterProcess(new G4DNAChargeIncrease("hydrogen_G4DNAChargeIncrease"), part);
// alpha++
part = G4Alpha::Alpha();
helper->RegisterProcess(new G4DNAElastic("alpha_G4DNAElastic"), part);
helper->RegisterProcess(new G4DNAExcitation("alpha_G4DNAExcitation"), part);
helper->RegisterProcess(new G4DNAIonisation("alpha_G4DNAIonisation"), part);
helper->RegisterProcess(new G4DNAChargeDecrease("alpha_G4DNAChargeDecrease"), part);
// alpha+
part = genericIonsManager->GetIon("alpha+");
helper->RegisterProcess(new G4DNAElastic("alpha+_G4DNAElastic"), part);
helper->RegisterProcess(new G4DNAExcitation("alpha+_G4DNAExcitation"), part);
helper->RegisterProcess(new G4DNAIonisation("alpha+_G4DNAIonisation"), part);
helper->RegisterProcess(new G4DNAChargeDecrease("alpha+_G4DNAChargeDecrease"), part);
helper->RegisterProcess(new G4DNAChargeIncrease("alpha+_G4DNAChargeIncrease"), part);
// helium
part = genericIonsManager->GetIon("helium");
helper->RegisterProcess(new G4DNAElastic("helium_G4DNAElastic"), part);
helper->RegisterProcess(new G4DNAExcitation("helium_G4DNAExcitation"), part);
helper->RegisterProcess(new G4DNAIonisation("helium_G4DNAIonisation"), part);
helper->RegisterProcess(new G4DNAChargeIncrease("helium_G4DNAChargeIncrease"), part);
} else if ( particleName == "proton" ) {
pPhysicsHelper->RegisterProcess(new G4DNAElastic("proton_G4DNAElastic"), pParticle);
pPhysicsHelper->RegisterProcess(new G4DNAExcitation("proton_G4DNAExcitation"), pParticle);
pPhysicsHelper->RegisterProcess(new G4DNAIonisation("proton_G4DNAIonisation"), pParticle);
pPhysicsHelper->RegisterProcess(new G4DNAChargeDecrease("proton_G4DNAChargeDecrease"), pParticle);
// other ions
part = G4GenericIon::GenericIon();
} else if ( particleName == "hydrogen" ) {
pPhysicsHelper->RegisterProcess(new G4DNAElastic("hydrogen_G4DNAElastic"), pParticle);
pPhysicsHelper->RegisterProcess(new G4DNAExcitation("hydrogen_G4DNAExcitation"), pParticle);
pPhysicsHelper->RegisterProcess(new G4DNAIonisation("hydrogen_G4DNAIonisation"), pParticle);
pPhysicsHelper->RegisterProcess(new G4DNAChargeIncrease("hydrogen_G4DNAChargeIncrease"), pParticle);
helper->RegisterProcess(new G4DNAIonisation("GenericIon_G4DNAIonisation"), part);
}
} else if ( particleName == "alpha" ) {
pPhysicsHelper->RegisterProcess(new G4DNAElastic("alpha_G4DNAElastic"), pParticle);
pPhysicsHelper->RegisterProcess(new G4DNAExcitation("alpha_G4DNAExcitation"), pParticle);
pPhysicsHelper->RegisterProcess(new G4DNAIonisation("alpha_G4DNAIonisation"), pParticle);
pPhysicsHelper->RegisterProcess(new G4DNAChargeDecrease("alpha_G4DNAChargeDecrease"), pParticle);
void G4EmDNAPhysics::ConstructGammaPositronProcesses()
{
// this construction is based on G4EmStandardPhysics_option3
G4EmBuilder::PrepareEMPhysics();
} else if ( particleName == "alpha+" ) {
pPhysicsHelper->RegisterProcess(new G4DNAElastic("alpha+_G4DNAElastic"), pParticle);
pPhysicsHelper->RegisterProcess(new G4DNAExcitation("alpha+_G4DNAExcitation"), pParticle);
pPhysicsHelper->RegisterProcess(new G4DNAIonisation("alpha+_G4DNAIonisation"), pParticle);
pPhysicsHelper->RegisterProcess(new G4DNAChargeDecrease("alpha+_G4DNAChargeDecrease"), pParticle);
pPhysicsHelper->RegisterProcess(new G4DNAChargeIncrease("alpha+_G4DNAChargeIncrease"), pParticle);
G4PhysicsListHelper* helper = G4PhysicsListHelper::GetPhysicsListHelper();
G4ParticleDefinition* part = G4Gamma::Gamma();
} else if ( particleName == "helium" ) {
pPhysicsHelper->RegisterProcess(new G4DNAElastic("helium_G4DNAElastic"), pParticle);
pPhysicsHelper->RegisterProcess(new G4DNAExcitation("helium_G4DNAExcitation"), pParticle);
pPhysicsHelper->RegisterProcess(new G4DNAIonisation("helium_G4DNAIonisation"), pParticle);
pPhysicsHelper->RegisterProcess(new G4DNAChargeIncrease("helium_G4DNAChargeIncrease"), pParticle);
} else if ( particleName == "GenericIon" ) {
pPhysicsHelper->RegisterProcess(new G4DNAIonisation("GenericIon_G4DNAIonisation"), pParticle);
// photoelectric effect - Livermore model
G4PhotoElectricEffect* thePEEffect = new G4PhotoElectricEffect();
thePEEffect->SetEmModel(new G4LivermorePhotoElectricModel());
helper->RegisterProcess(thePEEffect, part);
/*
} else if ( particleName == "carbon" ) {
pPhysicsHelper->RegisterProcess(new G4DNAIonisation("carbon_G4DNAIonisation"), particle);
// Compton scattering - Klein-Nishina
G4ComptonScattering* theComptonScattering = new G4ComptonScattering();
theComptonScattering->SetEmModel(new G4KleinNishinaModel());
helper->RegisterProcess(theComptonScattering, part);
} else if ( particleName == "nitrogen" ) {
pPhysicsHelper->RegisterProcess(new G4DNAIonisation("nitrogen_G4DNAIonisation"), particle);
// gamma conversion - 5D model
G4GammaConversion* theGammaConversion = new G4GammaConversion();
theGammaConversion->SetEmModel(new G4BetheHeitler5DModel());
helper->RegisterProcess(theGammaConversion, part);
} else if ( particleName == "oxygen" ) {
pPhysicsHelper->RegisterProcess(new G4DNAIonisation("oxygen_G4DNAIonisation"), particle);
// Rayleigh scattering - Livermore model
G4RayleighScattering* theRayleigh = new G4RayleighScattering();
helper->RegisterProcess(theRayleigh, part);
} else if ( particleName == "iron" ) {
pPhysicsHelper->RegisterProcess(new G4DNAIonisation("iron_G4DNAIonisation"), particle);
*/
part = G4Positron::Positron();
}
// Warning : the following particles and processes are needed by EM Physics builders
// They are taken from the default Livermore Physics list
// These particles are currently not handled by Geant4-DNA
// e+
else if (particleName == "e+") {
G4eMultipleScattering* msc = new G4eMultipleScattering();
msc->SetStepLimitType(fUseDistanceToBoundary);
G4eIonisation* eIoni = new G4eIonisation();
eIoni->SetStepFunction(0.2, 100*um);
pPhysicsHelper->RegisterProcess(msc, pParticle);
pPhysicsHelper->RegisterProcess(eIoni, pParticle);
pPhysicsHelper->RegisterProcess(new G4eBremsstrahlung(), pParticle);
pPhysicsHelper->RegisterProcess(new G4eplusAnnihilation(), pParticle);
} else if (particleName == "gamma") {
// photoelectric effect - Livermore model only
G4PhotoElectricEffect* thePhotoElectricEffect = new G4PhotoElectricEffect();
thePhotoElectricEffect->SetEmModel(new G4LivermorePhotoElectricModel());
pPhysicsHelper->RegisterProcess(thePhotoElectricEffect, pParticle);
// Compton scattering - Livermore model only
G4ComptonScattering* theComptonScattering = new G4ComptonScattering();
theComptonScattering->SetEmModel(new G4LivermoreComptonModel());
pPhysicsHelper->RegisterProcess(theComptonScattering, pParticle);
// gamma conversion - Livermore model below 80 GeV
G4GammaConversion* theGammaConversion = new G4GammaConversion();
theGammaConversion->SetEmModel(new G4LivermoreGammaConversionModel());
pPhysicsHelper->RegisterProcess(theGammaConversion, pParticle);
// default Rayleigh scattering is Livermore
G4RayleighScattering* theRayleigh = new G4RayleighScattering();
pPhysicsHelper->RegisterProcess(theRayleigh, pParticle);
}
// Warning : end of particles and processes are needed by EM Physics builders
}
// Deexcitation
//
G4VAtomDeexcitation* de = new G4UAtomicDeexcitation();
G4LossTableManager::Instance()->SetAtomDeexcitation(de);
helper->RegisterProcess(new G4eMultipleScattering(), part);
helper->RegisterProcess(new G4eIonisation(), part);
helper->RegisterProcess(new G4eBremsstrahlung(), part);
helper->RegisterProcess(new G4eplusAnnihilation(), part);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -240,7 +240,7 @@ void G4EmDNAPhysics_option1::ConstructProcess()
} else if ( particleName == "GenericIon" ) {
G4hMultipleScattering* msc = new G4hMultipleScattering();
msc->SetEmModel(new G4LowEWentzelVIModel(), 1);
msc->SetEmModel(new G4LowEWentzelVIModel());
ph->RegisterProcess(msc, particle);
ph->RegisterProcess(new G4DNAIonisation("GenericIon_G4DNAIonisation"), particle);
@@ -249,7 +249,7 @@ void G4EmDNAPhysics_option1::ConstructProcess()
} else if ( particleName == "carbon" ) {
G4hMultipleScattering* msc = new G4hMultipleScattering();
msc->SetEmModel(new G4LowEWentzelVIModel(), 1);
msc->SetEmModel(new G4LowEWentzelVIModel());
ph->RegisterProcess(msc, particle);
ph->RegisterProcess(new G4DNAIonisation("carbon_G4DNAIonisation"), particle);
@@ -257,7 +257,7 @@ void G4EmDNAPhysics_option1::ConstructProcess()
} else if ( particleName == "nitrogen" ) {
G4hMultipleScattering* msc = new G4hMultipleScattering();
msc->SetEmModel(new G4LowEWentzelVIModel(), 1);
msc->SetEmModel(new G4LowEWentzelVIModel());
ph->RegisterProcess(msc, particle);
ph->RegisterProcess(new G4DNAIonisation("nitrogen_G4DNAIonisation"), particle);
@@ -265,7 +265,7 @@ void G4EmDNAPhysics_option1::ConstructProcess()
} else if ( particleName == "oxygen" ) {
G4hMultipleScattering* msc = new G4hMultipleScattering();
msc->SetEmModel(new G4LowEWentzelVIModel(), 1);
msc->SetEmModel(new G4LowEWentzelVIModel());
ph->RegisterProcess(msc, particle);
ph->RegisterProcess(new G4DNAIonisation("oxygen_G4DNAIonisation"), particle);
@@ -273,7 +273,7 @@ void G4EmDNAPhysics_option1::ConstructProcess()
} else if ( particleName == "iron" ) {
G4hMultipleScattering* msc = new G4hMultipleScattering();
msc->SetEmModel(new G4LowEWentzelVIModel(), 1);
msc->SetEmModel(new G4LowEWentzelVIModel());
ph->RegisterProcess(msc, particle);
ph->RegisterProcess(new G4DNAIonisation("iron_G4DNAIonisation"), particle);
@@ -47,31 +47,11 @@
#include "G4Electron.hh"
#include "G4Proton.hh"
#include "G4Alpha.hh"
#include "G4GenericIon.hh"
// Warning : the following is needed in order to use EM Physics builders
// e+
#include "G4Positron.hh"
#include "G4eMultipleScattering.hh"
#include "G4eIonisation.hh"
#include "G4eBremsstrahlung.hh"
#include "G4eplusAnnihilation.hh"
// gamma
#include "G4Gamma.hh"
#include "G4PhotoElectricEffect.hh"
#include "G4LivermorePhotoElectricModel.hh"
#include "G4ComptonScattering.hh"
#include "G4LivermoreComptonModel.hh"
#include "G4GammaConversion.hh"
#include "G4LivermoreGammaConversionModel.hh"
#include "G4RayleighScattering.hh"
#include "G4LivermoreRayleighModel.hh"
#include "G4EmParameters.hh"
// end of warning
#include "G4LossTableManager.hh"
#include "G4UAtomicDeexcitation.hh"
#include "G4PhysicsListHelper.hh"
#include "G4BuilderType.hh"
@@ -82,34 +62,12 @@ G4_DECLARE_PHYSCONSTR_FACTORY(G4EmDNAPhysics_stationary);
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmDNAPhysics_stationary::G4EmDNAPhysics_stationary(G4int ver)
: G4VPhysicsConstructor("G4EmDNAPhysics_stationary"), verbose(ver)
G4EmDNAPhysics_stationary::G4EmDNAPhysics_stationary(G4int ver, const G4String& nam)
: G4EmDNAPhysics(ver, nam)
{
G4EmParameters* param = G4EmParameters::Instance();
param->SetDefaults();
param->SetFluo(true);
param->SetAuger(true);
param->SetAugerCascade(true);
param->SetDeexcitationIgnoreCut(true);
param->ActivateDNA();
SetPhysicsType(bElectromagnetic);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmDNAPhysics_stationary::G4EmDNAPhysics_stationary(G4int ver, const G4String&)
: G4VPhysicsConstructor("G4EmDNAPhysics_stationary"), verbose(ver)
{
G4EmParameters* param = G4EmParameters::Instance();
param->SetDefaults();
param->SetFluo(true);
param->SetAuger(true);
param->SetAugerCascade(true);
param->SetDeexcitationIgnoreCut(true);
SetPhysicsType(bElectromagnetic);
param->SetDNAStationary(true);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -119,403 +77,248 @@ G4EmDNAPhysics_stationary::~G4EmDNAPhysics_stationary()
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4EmDNAPhysics_stationary::ConstructParticle()
{
// bosons
G4Gamma::Gamma();
// leptons
G4Electron::Electron();
G4Positron::Positron();
// baryons
G4Proton::Proton();
G4GenericIon::GenericIonDefinition();
G4DNAGenericIonsManager * genericIonsManager;
genericIonsManager=G4DNAGenericIonsManager::Instance();
genericIonsManager->GetIon("alpha++");
genericIonsManager->GetIon("alpha+");
genericIonsManager->GetIon("helium");
genericIonsManager->GetIon("hydrogen");
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4EmDNAPhysics_stationary::ConstructProcess()
{
if(verbose > 1) {
if(verboseLevel > 1) {
G4cout << "### " << GetPhysicsName() << " Construct Processes " << G4endl;
}
ConstructGammaPositronProcesses();
G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
G4DNAGenericIonsManager* genericIonsManager
= G4DNAGenericIonsManager::Instance();
auto myParticleIterator=GetParticleIterator();
myParticleIterator->reset();
while( (*myParticleIterator)() )
{
G4ParticleDefinition* particle = myParticleIterator->value();
G4String particleName = particle->GetParticleName();
// e-
G4ParticleDefinition* part = G4Electron::Electron();
if (particleName == "e-") {
// *** Elastic scattering ***
G4DNAElastic* theDNAElastic = new G4DNAElastic("e-_G4DNAElastic");
theDNAElastic->SetEmModel(new G4DNAChampionElasticModel());
ph->RegisterProcess(theDNAElastic, part);
// *** Elastic scattering (two alternative models available) ***
G4DNAElastic* theDNAElasticProcess = new G4DNAElastic("e-_G4DNAElastic");
theDNAElasticProcess->SetEmModel(new G4DNAChampionElasticModel());
// or alternative model
//theDNAElasticProcess
//->SetEmModel(new G4DNAScreenedRutherfordElasticModel());
ph->RegisterProcess(theDNAElasticProcess, particle);
// *** Excitation ***
G4DNAExcitation* theDNAExc = new G4DNAExcitation("e-_G4DNAExcitation");
G4DNABornExcitationModel* modB = new G4DNABornExcitationModel();
theDNAExc->SetEmModel(modB);
modB->SelectStationary(true);
ph->RegisterProcess(theDNAExc, part);
// *** Excitation ***
// *** Ionisation ***
G4DNAIonisation* theDNAIoni = new G4DNAIonisation("e-_G4DNAIonisation");
G4DNABornIonisationModel* modI = new G4DNABornIonisationModel();
theDNAIoni->SetEmModel(modI);
modI->SelectStationary(true);
ph->RegisterProcess(theDNAIoni, part);
G4DNAExcitation* theDNAExcitationProcess =
new G4DNAExcitation("e-_G4DNAExcitation");
G4DNABornExcitationModel* modB = new G4DNABornExcitationModel();
theDNAExcitationProcess->SetEmModel(modB);
modB->SelectStationary(true);
ph->RegisterProcess(theDNAExcitationProcess, particle);
// *** Ionisation ***
G4DNAIonisation* theDNAIonisationProcess =
new G4DNAIonisation("e-_G4DNAIonisation");
G4DNABornIonisationModel* modI = new G4DNABornIonisationModel();
theDNAIonisationProcess->SetEmModel(modI);
modI->SelectStationary(true);
ph->RegisterProcess(theDNAIonisationProcess, particle);
// *** Vibrational excitation ***
G4DNAVibExcitation* theDNAVibExcitationProcess =
new G4DNAVibExcitation("e-_G4DNAVibExcitation");
G4DNASancheExcitationModel* modS = new G4DNASancheExcitationModel();
theDNAVibExcitationProcess->SetEmModel(modS);
modS->SelectStationary(true);
ph->RegisterProcess(theDNAVibExcitationProcess, particle);
// *** Vibrational excitation ***
G4DNAVibExcitation* theDNAVibExc =
new G4DNAVibExcitation("e-_G4DNAVibExcitation");
G4DNASancheExcitationModel* modS = new G4DNASancheExcitationModel();
theDNAVibExc->SetEmModel(modS);
modS->SelectStationary(true);
ph->RegisterProcess(theDNAVibExc, part);
// *** Attachment ***
G4DNAAttachment* theDNAAttachmentProcess =
new G4DNAAttachment("e-_G4DNAAttachment");
G4DNAMeltonAttachmentModel* modM = new G4DNAMeltonAttachmentModel();
theDNAAttachmentProcess->SetEmModel(modM);
modM->SelectStationary(true);
ph->RegisterProcess(theDNAAttachmentProcess, particle);
// *** Attachment ***
G4DNAAttachment* theDNAAttach = new G4DNAAttachment("e-_G4DNAAttachment");
G4DNAMeltonAttachmentModel* modM = new G4DNAMeltonAttachmentModel();
theDNAAttach->SetEmModel(modM);
modM->SelectStationary(true);
ph->RegisterProcess(theDNAAttach, part);
} else if ( particleName == "proton" ) {
// proton
part = G4Proton::Proton();
// *** Elastic ***
G4DNAElastic* theDNAElasticProcess =
new G4DNAElastic("proton_G4DNAElastic");
theDNAElasticProcess->SetEmModel(new G4DNAIonElasticModel());
((G4DNAIonElasticModel*)(theDNAElasticProcess->EmModel()))
->SelectStationary(true);
ph->RegisterProcess(theDNAElasticProcess, particle);
// *** Elastic ***
theDNAElastic = new G4DNAElastic("proton_G4DNAElastic");
G4DNAIonElasticModel* modE = new G4DNAIonElasticModel();
theDNAElastic->SetEmModel(modE);
modE->SelectStationary(true);
ph->RegisterProcess(theDNAElastic, part);
// *** Excitation ***
G4DNAExcitation* theDNAExcitationProcess =
new G4DNAExcitation("proton_G4DNAExcitation");
theDNAExcitationProcess
->SetEmModel(new G4DNAMillerGreenExcitationModel(),1);
theDNAExcitationProcess
->SetEmModel(new G4DNABornExcitationModel(),2);
((G4DNAMillerGreenExcitationModel*)
(theDNAExcitationProcess->EmModel(0)))->SetLowEnergyLimit(10*eV);
((G4DNAMillerGreenExcitationModel*)
(theDNAExcitationProcess->EmModel(0)))->SetHighEnergyLimit(500*keV);
((G4DNAMillerGreenExcitationModel*)
(theDNAExcitationProcess->EmModel(0)))->SelectStationary(true);
((G4DNABornExcitationModel*)
(theDNAExcitationProcess->EmModel(1)))->SetLowEnergyLimit(500*keV);
((G4DNABornExcitationModel*)
(theDNAExcitationProcess->EmModel(1)))->SetHighEnergyLimit(100*MeV);
((G4DNABornExcitationModel*)
(theDNAExcitationProcess->EmModel(1)))->SelectStationary(true);
ph->RegisterProcess(theDNAExcitationProcess, particle);
// *** Excitation ***
theDNAExc = new G4DNAExcitation("proton_G4DNAExcitation");
G4DNAMillerGreenExcitationModel* modMGE =
new G4DNAMillerGreenExcitationModel();
modMGE->SetLowEnergyLimit(10*eV);
modMGE->SetHighEnergyLimit(500*keV);
modMGE->SelectStationary(true);
theDNAExc->SetEmModel(modMGE);
G4DNABornExcitationModel* modBE = new G4DNABornExcitationModel();
modBE->SetLowEnergyLimit(500*keV);
modBE->SetHighEnergyLimit(100*MeV);
modBE->SelectStationary(true);
theDNAExc->SetEmModel(modBE);
ph->RegisterProcess(theDNAExc, part);
// *** Ionisation ***
// *** Ionisation ***
theDNAIoni = new G4DNAIonisation("proton_G4DNAIonisation");
G4DNARuddIonisationModel* modRI = new G4DNARuddIonisationModel();
modRI->SetLowEnergyLimit(0*eV);
modRI->SetHighEnergyLimit(500*keV);
modRI->SelectStationary(true);
theDNAIoni->SetEmModel(modRI);
G4DNABornIonisationModel* modBI = new G4DNABornIonisationModel();
modBI->SetLowEnergyLimit(500*keV);
modBI->SetHighEnergyLimit(100*MeV);
modBI->SelectStationary(true);
theDNAIoni->SetEmModel(modBI);
ph->RegisterProcess(theDNAIoni, part);
// *** Charge decrease ***
G4DNAChargeDecrease* theDNAChargeDecreaseProcess =
new G4DNAChargeDecrease("proton_G4DNAChargeDecrease");
G4DNADingfelderChargeDecreaseModel* modDCD =
new G4DNADingfelderChargeDecreaseModel();
modDCD->SelectStationary(true);
theDNAChargeDecreaseProcess->SetEmModel(modDCD);
ph->RegisterProcess(theDNAChargeDecreaseProcess, part);
// hydrogen
part = genericIonsManager->GetIon("hydrogen");
G4DNAIonisation* theDNAIonisationProcess =
new G4DNAIonisation("proton_G4DNAIonisation");
// *** Elastic ***
theDNAElastic = new G4DNAElastic("hydrogen_G4DNAElastic");
G4DNAIonElasticModel* modEI = new G4DNAIonElasticModel();
modEI->SelectStationary(true);
theDNAElastic->SetEmModel(modEI);
ph->RegisterProcess(theDNAElastic, part);
theDNAIonisationProcess->SetEmModel(new G4DNARuddIonisationModel);
theDNAIonisationProcess->SetEmModel(new G4DNABornIonisationModel);
// *** Excitation ***
theDNAExc = new G4DNAExcitation("hydrogen_G4DNAExcitation");
modMGE = new G4DNAMillerGreenExcitationModel();
modMGE->SelectStationary(true);
theDNAExc->SetEmModel(modMGE);
ph->RegisterProcess(theDNAExc, part);
// *** Ionisation ***
theDNAIoni = new G4DNAIonisation("hydrogen_G4DNAIonisation");
modRI = new G4DNARuddIonisationModel();
theDNAIoni->SetEmModel(new G4DNARuddIonisationModel());
modRI->SelectStationary(true);
ph->RegisterProcess(theDNAIoni, part);
// *** Charge increase ***
G4DNAChargeIncrease* theDNAChargeIncreaseProcess =
new G4DNAChargeIncrease("hydrogen_G4DNAChargeIncrease");
G4DNADingfelderChargeIncreaseModel* modDCI =
new G4DNADingfelderChargeIncreaseModel();
modDCI->SelectStationary(true);
theDNAChargeIncreaseProcess->SetEmModel(modDCI);
ph->RegisterProcess(theDNAChargeIncreaseProcess, part);
// alpha++
part = G4Alpha::Alpha();
((G4DNARuddIonisationModel*)(theDNAIonisationProcess->EmModel(0)))
->SetLowEnergyLimit(0*eV);
((G4DNARuddIonisationModel*)(theDNAIonisationProcess->EmModel(0)))
->SetHighEnergyLimit(500*keV);
((G4DNARuddIonisationModel*)(theDNAIonisationProcess->EmModel(0)))
->SelectStationary(true);
// *** Elastic ***
theDNAElastic = new G4DNAElastic("alpha_G4DNAElastic");
modEI = new G4DNAIonElasticModel();
modEI->SelectStationary(true);
theDNAElastic->SetEmModel(modEI);
ph->RegisterProcess(theDNAElastic, part);
((G4DNABornIonisationModel*)(theDNAIonisationProcess->EmModel(1)))
->SetLowEnergyLimit(500*keV);
((G4DNABornIonisationModel*)(theDNAIonisationProcess->EmModel(1)))
->SetHighEnergyLimit(100*MeV);
((G4DNABornIonisationModel*)(theDNAIonisationProcess->EmModel(1)))
->SelectStationary(true);
ph->RegisterProcess(theDNAIonisationProcess, particle);
// *** Charge decrease ***
G4DNAChargeDecrease* theDNAChargeDecreaseProcess =
new G4DNAChargeDecrease("proton_G4DNAChargeDecrease");
theDNAChargeDecreaseProcess
->SetEmModel(new G4DNADingfelderChargeDecreaseModel());
((G4DNADingfelderChargeDecreaseModel*)
(theDNAChargeDecreaseProcess->EmModel()))->SelectStationary(true);
ph->RegisterProcess(theDNAChargeDecreaseProcess, particle);
} else if ( particleName == "hydrogen" ) {
// *** Elastic ***
G4DNAElastic* theDNAElasticProcess =
new G4DNAElastic("hydrogen_G4DNAElastic");
theDNAElasticProcess->SetEmModel(new G4DNAIonElasticModel());
((G4DNAIonElasticModel*)(theDNAElasticProcess->EmModel()))
->SelectStationary(true);
ph->RegisterProcess(theDNAElasticProcess, particle);
// *** Excitation ***
G4DNAExcitation* theDNAExcitationProcess =
new G4DNAExcitation("hydrogen_G4DNAExcitation");
theDNAExcitationProcess
->SetEmModel(new G4DNAMillerGreenExcitationModel());
((G4DNAMillerGreenExcitationModel*)(theDNAExcitationProcess->EmModel()))
->SelectStationary(true);
ph->RegisterProcess(theDNAExcitationProcess, particle);
// *** Ionisation ***
G4DNAIonisation* theDNAIonisationProcess =
new G4DNAIonisation("hydrogen_G4DNAIonisation");
theDNAIonisationProcess->SetEmModel(new G4DNARuddIonisationModel());
((G4DNARuddIonisationModel*)(theDNAIonisationProcess->EmModel()))
->SelectStationary(true);
ph->RegisterProcess(theDNAIonisationProcess, particle);
// *** Charge increase ***
G4DNAChargeIncrease* theDNAChargeIncreaseProcess =
new G4DNAChargeIncrease("hydrogen_G4DNAChargeIncrease");
theDNAChargeIncreaseProcess
->SetEmModel(new G4DNADingfelderChargeIncreaseModel());
((G4DNADingfelderChargeIncreaseModel*)
(theDNAChargeIncreaseProcess->EmModel()))
->SelectStationary(true);
ph->RegisterProcess(theDNAChargeIncreaseProcess, particle);
} else if ( particleName == "alpha" ) {
// *** Elastic ***
G4DNAElastic* theDNAElasticProcess =
new G4DNAElastic("alpha_G4DNAElastic");
theDNAElasticProcess->SetEmModel(new G4DNAIonElasticModel());
((G4DNAIonElasticModel*)(theDNAElasticProcess->EmModel()))
->SelectStationary(true);
ph->RegisterProcess(theDNAElasticProcess, particle);
// *** Excitation ***
G4DNAExcitation* theDNAExcitationProcess =
new G4DNAExcitation("alpha_G4DNAExcitation");
theDNAExcitationProcess->SetEmModel
(new G4DNAMillerGreenExcitationModel());
((G4DNAMillerGreenExcitationModel*)(theDNAExcitationProcess->EmModel()))
->SelectStationary(true);
ph->RegisterProcess(theDNAExcitationProcess, particle);
// *** Excitation ***
theDNAExc = new G4DNAExcitation("alpha_G4DNAExcitation");
modMGE = new G4DNAMillerGreenExcitationModel();
modMGE->SelectStationary(true);
theDNAExc->SetEmModel(modMGE);
ph->RegisterProcess(theDNAExc, part);
// *** Ionisation ***
// *** Ionisation ***
theDNAIoni = new G4DNAIonisation("alpha_G4DNAIonisation");
modRI = new G4DNARuddIonisationModel();
theDNAIoni->SetEmModel(new G4DNARuddIonisationModel());
modRI->SelectStationary(true);
ph->RegisterProcess(theDNAIoni, part);
G4DNAIonisation* theDNAIonisationProcess =
new G4DNAIonisation("alpha_G4DNAIonisation");
theDNAIonisationProcess->SetEmModel(new G4DNARuddIonisationModel());
((G4DNARuddIonisationModel*)(theDNAIonisationProcess->EmModel()))
->SelectStationary(true);
ph->RegisterProcess(theDNAIonisationProcess, particle);
// *** Charge decrease ***
theDNAChargeDecreaseProcess =
new G4DNAChargeDecrease("alpha_G4DNAChargeDecrease");
modDCD = new G4DNADingfelderChargeDecreaseModel();
modDCD->SelectStationary(true);
theDNAChargeDecreaseProcess->SetEmModel(modDCD);
ph->RegisterProcess(theDNAChargeDecreaseProcess, part);
// *** Charge decrease ***
G4DNAChargeDecrease* theDNAChargeDecreaseProcess =
new G4DNAChargeDecrease("alpha_G4DNAChargeDecrease");
theDNAChargeDecreaseProcess->SetEmModel
(new G4DNADingfelderChargeDecreaseModel());
((G4DNADingfelderChargeDecreaseModel*)
(theDNAChargeDecreaseProcess->EmModel()))
->SelectStationary(true);
ph->RegisterProcess(theDNAChargeDecreaseProcess, particle);
} else if ( particleName == "alpha+" ) {
// alpha+
part = genericIonsManager->GetIon("alpha+");
// *** Elastic ***
// *** Elastic ***
theDNAElastic = new G4DNAElastic("alpha+_G4DNAElastic");
modEI = new G4DNAIonElasticModel();
modEI->SelectStationary(true);
theDNAElastic->SetEmModel(modEI);
ph->RegisterProcess(theDNAElastic, part);
G4DNAElastic* theDNAElasticProcess =
new G4DNAElastic("alpha+_G4DNAElastic");
theDNAElasticProcess->SetEmModel(new G4DNAIonElasticModel());
((G4DNAIonElasticModel*)(theDNAElasticProcess->EmModel()))
->SelectStationary(true);
ph->RegisterProcess(theDNAElasticProcess, particle);
// *** Excitation ***
G4DNAExcitation* theDNAExcitationProcess =
new G4DNAExcitation("alpha+_G4DNAExcitation");
theDNAExcitationProcess->SetEmModel
(new G4DNAMillerGreenExcitationModel());
((G4DNAMillerGreenExcitationModel*)
(theDNAExcitationProcess->EmModel()))->SelectStationary(true);
ph->RegisterProcess(theDNAExcitationProcess, particle);
// *** Excitation ***
theDNAExc = new G4DNAExcitation("alpha+_G4DNAExcitation");
modMGE = new G4DNAMillerGreenExcitationModel();
modMGE->SelectStationary(true);
theDNAExc->SetEmModel(modMGE);
ph->RegisterProcess(theDNAExc, part);
// *** Ionisation ***
// *** Ionisation ***
theDNAIoni = new G4DNAIonisation("alpha+_G4DNAIonisation");
modRI = new G4DNARuddIonisationModel();
theDNAIoni->SetEmModel(new G4DNARuddIonisationModel());
modRI->SelectStationary(true);
ph->RegisterProcess(theDNAIoni, part);
G4DNAIonisation* theDNAIonisationProcess =
new G4DNAIonisation("alpha+_G4DNAIonisation");
theDNAIonisationProcess->SetEmModel(new G4DNARuddIonisationModel());
((G4DNARuddIonisationModel*)(theDNAIonisationProcess->EmModel()))
->SelectStationary(true);
ph->RegisterProcess(theDNAIonisationProcess, particle);
// *** Charge decrease ***
theDNAChargeDecreaseProcess =
new G4DNAChargeDecrease("alpha+_G4DNAChargeDecrease");
modDCD = new G4DNADingfelderChargeDecreaseModel();
modDCD->SelectStationary(true);
theDNAChargeDecreaseProcess->SetEmModel(modDCD);
ph->RegisterProcess(theDNAChargeDecreaseProcess, part);
// *** Charge decrease ***
// *** Charge increase ***
theDNAChargeIncreaseProcess =
new G4DNAChargeIncrease("alpha+_G4DNAChargeIncrease");
modDCI = new G4DNADingfelderChargeIncreaseModel();
modDCI->SelectStationary(true);
theDNAChargeIncreaseProcess->SetEmModel(modDCI);
ph->RegisterProcess(theDNAChargeIncreaseProcess, part);
G4DNAChargeDecrease* theDNAChargeDecreaseProcess =
new G4DNAChargeDecrease("alpha+_G4DNAChargeDecrease");
theDNAChargeDecreaseProcess->SetEmModel
(new G4DNADingfelderChargeDecreaseModel());
((G4DNADingfelderChargeDecreaseModel*)
(theDNAChargeDecreaseProcess->EmModel()))->SelectStationary(true);
ph->RegisterProcess(theDNAChargeDecreaseProcess, particle);
// *** Charge increase ***
G4DNAChargeIncrease* theDNAChargeIncreaseProcess =
new G4DNAChargeIncrease("alpha+_G4DNAChargeIncrease");
theDNAChargeIncreaseProcess->SetEmModel
(new G4DNADingfelderChargeIncreaseModel());
((G4DNADingfelderChargeIncreaseModel*)
(theDNAChargeIncreaseProcess->EmModel()))->SelectStationary(true);
ph->RegisterProcess(theDNAChargeIncreaseProcess, particle);
} else if ( particleName == "helium" ) {
// helium
part = genericIonsManager->GetIon("helium");
// *** Elastic ***
// *** Elastic ***
theDNAElastic = new G4DNAElastic("helium_G4DNAElastic");
modEI = new G4DNAIonElasticModel();
modEI->SelectStationary(true);
theDNAElastic->SetEmModel(modEI);
ph->RegisterProcess(theDNAElastic, part);
G4DNAElastic* theDNAElasticProcess =
new G4DNAElastic("helium_G4DNAElastic");
theDNAElasticProcess->SetEmModel
(new G4DNAIonElasticModel());
((G4DNAIonElasticModel*)(theDNAElasticProcess->EmModel()))
->SelectStationary(true);
ph->RegisterProcess(theDNAElasticProcess, particle);
// *** Excitation ***
G4DNAExcitation* theDNAExcitationProcess =
new G4DNAExcitation("helium_G4DNAExcitation");
theDNAExcitationProcess->SetEmModel
(new G4DNAMillerGreenExcitationModel());
((G4DNAMillerGreenExcitationModel*)(theDNAExcitationProcess->EmModel()))
->SelectStationary(true);
ph->RegisterProcess(theDNAExcitationProcess, particle);
// *** Excitation ***
theDNAExc = new G4DNAExcitation("helium_G4DNAExcitation");
modMGE = new G4DNAMillerGreenExcitationModel();
modMGE->SelectStationary(true);
theDNAExc->SetEmModel(modMGE);
ph->RegisterProcess(theDNAExc, part);
// *** Ionisation ***
// *** Ionisation ***
theDNAIoni = new G4DNAIonisation("helium_G4DNAIonisation");
modRI = new G4DNARuddIonisationModel();
theDNAIoni->SetEmModel(new G4DNARuddIonisationModel());
modRI->SelectStationary(true);
ph->RegisterProcess(theDNAIoni, part);
G4DNAIonisation* theDNAIonisationProcess =
new G4DNAIonisation("helium_G4DNAIonisation");
theDNAIonisationProcess->SetEmModel
(new G4DNARuddIonisationModel());
((G4DNARuddIonisationModel*)(theDNAIonisationProcess->EmModel()))
->SelectStationary(true);
ph->RegisterProcess(theDNAIonisationProcess, particle);
// *** Charge increase ***
G4DNAChargeIncrease* theDNAChargeIncreaseProcess =
new G4DNAChargeIncrease("helium_G4DNAChargeIncrease");
theDNAChargeIncreaseProcess->SetEmModel
(new G4DNADingfelderChargeIncreaseModel());
((G4DNADingfelderChargeIncreaseModel*)
(theDNAChargeIncreaseProcess->EmModel()))
->SelectStationary(true);
ph->RegisterProcess(theDNAChargeIncreaseProcess, particle);
// *** Charge increase ***
theDNAChargeIncreaseProcess =
new G4DNAChargeIncrease("helium_G4DNAChargeIncrease");
modDCI = new G4DNADingfelderChargeIncreaseModel();
modDCI->SelectStationary(true);
theDNAChargeIncreaseProcess->SetEmModel(modDCI);
ph->RegisterProcess(theDNAChargeIncreaseProcess, part);
} else if ( particleName == "GenericIon" ) {
// other ions
part = G4GenericIon::GenericIon();
// *** Ionisation ***
G4DNAIonisation* theDNAIonisationProcess =
new G4DNAIonisation("GenericIon_G4DNAIonisation");
theDNAIonisationProcess->SetEmModel(
new G4DNARuddIonisationExtendedModel());
((G4DNARuddIonisationExtendedModel*)(theDNAIonisationProcess->EmModel()))
->SelectStationary(true);
ph->RegisterProcess(theDNAIonisationProcess, particle);
}
// Warning : the following particles and processes are needed by EM Physics
// builders
// They are taken from the default Livermore Physics list
// These particles are currently not handled by Geant4-DNA
// e+
else if (particleName == "e+") {
// Identical to G4EmStandardPhysics_stationary
G4eMultipleScattering* msc = new G4eMultipleScattering();
msc->SetStepLimitType(fUseDistanceToBoundary);
G4eIonisation* eIoni = new G4eIonisation();
eIoni->SetStepFunction(0.2, 100*um);
ph->RegisterProcess(msc, particle);
ph->RegisterProcess(eIoni, particle);
ph->RegisterProcess(new G4eBremsstrahlung(), particle);
ph->RegisterProcess(new G4eplusAnnihilation(), particle);
} else if (particleName == "gamma") {
// photoelectric effect - Livermore model only
G4PhotoElectricEffect* thePhotoElectricEffect = new G4PhotoElectricEffect();
thePhotoElectricEffect->SetEmModel(new G4LivermorePhotoElectricModel());
ph->RegisterProcess(thePhotoElectricEffect, particle);
// Compton scattering - Livermore model only
G4ComptonScattering* theComptonScattering = new G4ComptonScattering();
theComptonScattering->SetEmModel(new G4LivermoreComptonModel());
ph->RegisterProcess(theComptonScattering, particle);
// gamma conversion - Livermore model below 80 GeV
G4GammaConversion* theGammaConversion = new G4GammaConversion();
theGammaConversion->SetEmModel(new G4LivermoreGammaConversionModel());
ph->RegisterProcess(theGammaConversion, particle);
// default Rayleigh scattering is Livermore
G4RayleighScattering* theRayleigh = new G4RayleighScattering();
ph->RegisterProcess(theRayleigh, particle);
}
// Warning : end of particles and processes are needed by EM Physics build.
}
// Deexcitation
//
G4VAtomDeexcitation* de = new G4UAtomicDeexcitation();
G4LossTableManager::Instance()->SetAtomDeexcitation(de);
// *** Ionisation ***
theDNAIoni = new G4DNAIonisation("GenericIon_G4DNAIonisation");
G4DNARuddIonisationExtendedModel* mod =
new G4DNARuddIonisationExtendedModel();
mod->SelectStationary(true);
theDNAIoni->SetEmModel(mod);
ph->RegisterProcess(theDNAIoni, part);
}
@@ -1,239 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
#include "G4EmLEPTSPhysics.hh"
#include "G4LivermoreRayleighModel.hh"
#include "G4LivermoreComptonModel.hh"
#include "G4LivermorePhotoElectricModel.hh"
#include "G4LivermoreGammaConversionModel.hh"
#include "G4GammaConversion.hh"
#include "G4RayleighScattering.hh"
#include "G4ComptonScattering.hh"
#include "G4PhotoElectricEffect.hh"
#include "G4OpRayleigh.hh"
#include "G4eMultipleScattering.hh"
#include "G4eIonisation.hh"
#include "G4eBremsstrahlung.hh"
#include "G4DNAElastic.hh"
#include "G4DNAIonisation.hh"
#include "G4DNAExcitation.hh"
#include "G4DNADissociation.hh"
#include "G4DNAVibExcitation.hh"
#include "G4DNARotExcitation.hh"
#include "G4DNAAttachment.hh"
#include "G4DNAPositronium.hh"
#include "G4DNAChargeDecrease.hh"
#include "G4DNAChargeIncrease.hh"
#include "G4LEPTSElasticModel.hh"
#include "G4LEPTSIonisationModel.hh"
#include "G4LEPTSExcitationModel.hh"
#include "G4LEPTSVibExcitationModel.hh"
#include "G4LEPTSAttachmentModel.hh"
#include "G4GenericIon.hh"
#include "G4LossTableManager.hh"
#include "G4UAtomicDeexcitation.hh"
#include "G4EmParameters.hh"
#include "G4PhysicsListHelper.hh"
#include "G4BuilderType.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmLEPTSPhysics::G4EmLEPTSPhysics( const G4String& name)
: G4VPhysicsConstructor(name)
{
G4EmParameters::Instance()->SetDefaults();
SetPhysicsType(bElectromagnetic);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4EmLEPTSPhysics::ConstructParticle()
{
G4Gamma::Gamma();
G4Electron::Electron();
G4Positron::Positron();
// baryons
G4Proton::Proton();
G4GenericIon::GenericIonDefinition();
G4DNAGenericIonsManager * genericIonsManager;
genericIonsManager=G4DNAGenericIonsManager::Instance();
genericIonsManager->GetIon("alpha++");
genericIonsManager->GetIon("alpha+");
genericIonsManager->GetIon("helium");
genericIonsManager->GetIon("hydrogen");
genericIonsManager->GetIon("carbon");
genericIonsManager->GetIon("nitrogen");
genericIonsManager->GetIon("oxygen");
genericIonsManager->GetIon("iron");
}
//....oooOO0OOooo.......oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4EmLEPTSPhysics::ConstructProcess()
{
auto myParticleIterator=GetParticleIterator();
myParticleIterator->reset();
while( (*myParticleIterator)() ){
G4ParticleDefinition * particle = myParticleIterator->value();
G4String particleName = particle->GetParticleName();
G4ProcessManager * manager = particle->GetProcessManager();
G4cout << " particle " << particle->GetParticleName() << " manager " << manager << G4endl; //GDEB
if(particleName=="e-") {
G4DNAElastic* elastic = new G4DNAElastic("e-_G4LEPTSElastic");
elastic->SetEmModel( new G4LEPTSElasticModel );
manager->AddDiscreteProcess(elastic );
G4DNAIonisation* ioni = new G4DNAIonisation("e-_G4LEPTSIonisation");
ioni->SetEmModel( new G4LEPTSIonisationModel );
manager->AddDiscreteProcess( ioni );
G4DNAExcitation* excit = new G4DNAExcitation("e-_G4LEPTSExcitation");
excit->SetEmModel( new G4LEPTSExcitationModel );
manager->AddDiscreteProcess( excit );
manager->AddDiscreteProcess(new G4DNADissociation("e-_G4LEPTSDissocNeutr") );
G4DNAVibExcitation* vibExcit = new G4DNAVibExcitation("e-_G4LEPTSExcitVibrat");
vibExcit->SetEmModel( new G4LEPTSVibExcitationModel );
manager->AddDiscreteProcess( vibExcit );
manager->AddDiscreteProcess( new G4DNARotExcitation("e-_G4LEPTSExcitRotat") );
G4DNAAttachment* attach = new G4DNAAttachment("e-_G4LEPTSAttachment");
attach->SetEmModel( new G4LEPTSAttachmentModel );
manager->AddDiscreteProcess( attach );
} else if(particleName=="e+") {
G4DNAElastic* elastic = new G4DNAElastic("e+_G4LEPTSElastic");
elastic->SetEmModel( new G4LEPTSElasticModel );
manager->AddDiscreteProcess(elastic );
G4DNAIonisation* ioni = new G4DNAIonisation("e+_G4LEPTSIonisation");
ioni->SetEmModel( new G4LEPTSIonisationModel );
manager->AddDiscreteProcess( ioni );
G4DNAExcitation* excit = new G4DNAExcitation("e+_G4LEPTSExcitation");
excit->SetEmModel( new G4LEPTSExcitationModel );
manager->AddDiscreteProcess( excit );
manager->AddDiscreteProcess(new G4DNADissociation("e+_G4LEPTSDissocNeutr") );
G4DNAVibExcitation* vibExcit = new G4DNAVibExcitation("e+_G4LEPTSExcitVibrat");
vibExcit->SetEmModel( new G4LEPTSVibExcitationModel );
manager->AddDiscreteProcess( vibExcit );
manager->AddDiscreteProcess( new G4DNARotExcitation("e+_G4LEPTSExcitRotat") );
G4DNAAttachment* attach = new G4DNAAttachment("e+_G4LEPTSAttachment");
attach->SetEmModel( new G4LEPTSAttachmentModel );
manager->AddDiscreteProcess( attach );
manager->AddDiscreteProcess(new G4DNAPositronium("e+_G4LEPTSPositronium") );
/* } else if ( particleName == "proton" ) {
manager->AddDiscreteProcess(new G4DNAExcitation("proton_G4DNAExcitation"));
manager->AddDiscreteProcess(new G4DNAIonisation("proton_G4DNAIonisation"));
manager->AddDiscreteProcess(new G4DNAChargeDecrease("proton_G4DNAChargeDecrease"));
} else if ( particleName == "hydrogen" ) {
manager->AddDiscreteProcess(new G4DNAExcitation("hydrogen_G4DNAExcitation"));
manager->AddDiscreteProcess(new G4DNAIonisation("hydrogen_G4DNAIonisation"));
manager->AddDiscreteProcess(new G4DNAChargeIncrease("hydrogen_G4DNAChargeIncrease"));
} else if ( particleName == "alpha" ) {
manager->AddDiscreteProcess(new G4DNAExcitation("alpha_G4DNAExcitation"));
manager->AddDiscreteProcess(new G4DNAIonisation("alpha_G4DNAIonisation"));
manager->AddDiscreteProcess(new G4DNAChargeDecrease("alpha_G4DNAChargeDecrease"));
} else if ( particleName == "alpha+" ) {
manager->AddDiscreteProcess(new G4DNAExcitation("alpha+_G4DNAExcitation"));
manager->AddDiscreteProcess(new G4DNAIonisation("alpha+_G4DNAIonisation"));
manager->AddDiscreteProcess(new G4DNAChargeDecrease("alpha+_G4DNAChargeDecrease"));
manager->AddDiscreteProcess(new G4DNAChargeIncrease("alpha+_G4DNAChargeIncrease"));
} else if ( particleName == "helium" ) {
manager->AddDiscreteProcess(new G4DNAExcitation("helium_G4DNAExcitation"));
manager->AddDiscreteProcess(new G4DNAIonisation("helium_G4DNAIonisation"));
manager->AddDiscreteProcess(new G4DNAChargeIncrease("helium_G4DNAChargeIncrease"));
// Extension to HZE proposed by Z. Francis
} else if ( particleName == "carbon" ) {
manager->AddDiscreteProcess(new G4DNAIonisation("carbon_G4DNAIonisation"));
} else if ( particleName == "nitrogen" ) {
manager->AddDiscreteProcess(new G4DNAIonisation("nitrogen_G4DNAIonisation"));
} else if ( particleName == "oxygen" ) {
manager->AddDiscreteProcess(new G4DNAIonisation("oxygen_G4DNAIonisation"));
} else if ( particleName == "iron" ) {
manager->AddDiscreteProcess(new G4DNAIonisation("iron_G4DNAIonisation"));
*/
} else if (particleName == "gamma") {
G4double LivermoreHighEnergyLimit = CLHEP::GeV;
G4PhotoElectricEffect* thePhotoElectricEffect = new G4PhotoElectricEffect();
G4LivermorePhotoElectricModel* theLivermorePhotoElectricModel =
new G4LivermorePhotoElectricModel();
theLivermorePhotoElectricModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
thePhotoElectricEffect->AddEmModel(0, theLivermorePhotoElectricModel);
manager->AddDiscreteProcess(thePhotoElectricEffect);
G4ComptonScattering* theComptonScattering = new G4ComptonScattering();
G4LivermoreComptonModel* theLivermoreComptonModel =
new G4LivermoreComptonModel();
theLivermoreComptonModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
theComptonScattering->AddEmModel(0, theLivermoreComptonModel);
manager->AddDiscreteProcess(theComptonScattering);
G4GammaConversion* theGammaConversion = new G4GammaConversion();
G4LivermoreGammaConversionModel* theLivermoreGammaConversionModel =
new G4LivermoreGammaConversionModel();
theLivermoreGammaConversionModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
theGammaConversion->AddEmModel(0, theLivermoreGammaConversionModel);
manager->AddDiscreteProcess(theGammaConversion);
G4RayleighScattering* theRayleigh = new G4RayleighScattering();
G4LivermoreRayleighModel* theRayleighModel = new G4LivermoreRayleighModel();
theRayleighModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
theRayleigh->AddEmModel(0, theRayleighModel);
manager->AddDiscreteProcess(theRayleigh);
}
}
}
@@ -29,13 +29,16 @@
#include "G4SystemOfUnits.hh"
// *** Processes and models
// gamma
#include "G4PhotoElectricEffect.hh"
#include "G4LivermorePhotoElectricModel.hh"
#include "G4PhotoElectricAngularGeneratorPolarized.hh"
#include "G4ComptonScattering.hh"
#include "G4LivermoreComptonModel.hh"
#include "G4LivermorePolarizedComptonModel.hh"
#include "G4KleinNishinaModel.hh"
#include "G4LowEPPolarizedComptonModel.hh"
#include "G4GammaConversion.hh"
#include "G4LivermoreGammaConversionModel.hh"
@@ -43,6 +46,7 @@
#include "G4RayleighScattering.hh"
#include "G4LivermoreRayleighModel.hh"
#include "G4LivermorePolarizedRayleighModel.hh"
#include "G4PEEffectFluoModel.hh"
#include "G4KleinNishinaModel.hh"
@@ -105,11 +109,12 @@ G4_DECLARE_PHYSCONSTR_FACTORY(G4EmLivermorePhysics);
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmLivermorePhysics::G4EmLivermorePhysics(G4int ver, const G4String& pname)
: G4VPhysicsConstructor(pname), verbose(ver)
: G4VPhysicsConstructor(pname)
{
SetVerboseLevel(ver);
G4EmParameters* param = G4EmParameters::Instance();
param->SetDefaults();
param->SetVerbose(verbose);
param->SetVerbose(ver);
param->SetMinEnergy(100*CLHEP::eV);
param->SetLowestElectronEnergy(100*CLHEP::eV);
param->SetNumberOfBinsPerDecade(20);
@@ -145,53 +150,70 @@ void G4EmLivermorePhysics::ConstructParticle()
void G4EmLivermorePhysics::ConstructProcess()
{
if(verbose > 1) {
if(verboseLevel > 1) {
G4cout << "### " << GetPhysicsName() << " Construct Processes " << G4endl;
}
G4EmBuilder::PrepareEMPhysics();
G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
G4EmParameters* param = G4EmParameters::Instance();
// processes used by several particles
G4ePairProduction* ee = new G4ePairProduction();
G4hMultipleScattering* hmsc = new G4hMultipleScattering("ionmsc");
// high energy limit for e+- scattering models
G4double highEnergyLimit= G4EmParameters::Instance()->MscEnergyLimit();
G4double livEnergyLimit = 1*GeV;
G4double highEnergyLimit= param->MscEnergyLimit();
G4double livEnergyLimit = 1*CLHEP::GeV;
// nuclear stopping
G4double nielEnergyLimit = G4EmParameters::Instance()->MaxNIELEnergy();
G4NuclearStopping* pnuc = new G4NuclearStopping();
pnuc->SetMaxKinEnergy(nielEnergyLimit);
G4double nielEnergyLimit = param->MaxNIELEnergy();
G4NuclearStopping* pnuc = nullptr;
if(nielEnergyLimit > 0.0) {
pnuc = new G4NuclearStopping();
pnuc->SetMaxKinEnergy(nielEnergyLimit);
}
// Add Livermore EM Processes
// Add gamma EM Processes
G4ParticleDefinition* particle = G4Gamma::Gamma();
G4bool polar = param->EnablePolarisation();
// photoelectric effect - Livermore model only
G4PhotoElectricEffect* thePhotoElectricEffect = new G4PhotoElectricEffect();
thePhotoElectricEffect->SetEmModel(new G4LivermorePhotoElectricModel());
G4PhotoElectricEffect* pe = new G4PhotoElectricEffect();
G4VEmModel* peModel = new G4LivermorePhotoElectricModel();
pe->SetEmModel(peModel);
if(polar) {
peModel->SetAngularDistribution(new G4PhotoElectricAngularGeneratorPolarized());
}
// Compton scattering - Livermore model only
G4ComptonScattering* theComptonScattering = new G4ComptonScattering();
theComptonScattering->SetEmModel(new G4KleinNishinaModel());
G4VEmModel* comptLiv = new G4LivermoreComptonModel();
comptLiv->SetHighEnergyLimit(livEnergyLimit);
theComptonScattering->AddEmModel(0, comptLiv);
G4ComptonScattering* cs = new G4ComptonScattering;
cs->SetEmModel(new G4KleinNishinaModel());
G4VEmModel* cModel = nullptr;
if(polar) {
cModel = new G4LivermorePolarizedComptonModel();
cModel->SetHighEnergyLimit(20*CLHEP::MeV);
} else {
cModel = new G4LivermoreComptonModel();
cModel->SetHighEnergyLimit(livEnergyLimit);
}
cs->AddEmModel(0, cModel);
// gamma conversion
G4GammaConversion* theGammaConversion = new G4GammaConversion();
G4GammaConversion* gc = new G4GammaConversion();
G4VEmModel* convLiv = new G4LivermoreGammaConversion5DModel();
theGammaConversion->SetEmModel(convLiv);
gc->SetEmModel(convLiv);
// default Rayleigh scattering is Livermore
G4RayleighScattering* theRayleigh = new G4RayleighScattering();
// Rayleigh scattering
G4RayleighScattering* rl = new G4RayleighScattering();
if(polar) {
rl->SetEmModel(new G4LivermorePolarizedRayleighModel());
}
ph->RegisterProcess(thePhotoElectricEffect, particle);
ph->RegisterProcess(theComptonScattering, particle);
ph->RegisterProcess(theGammaConversion, particle);
ph->RegisterProcess(theRayleigh, particle);
ph->RegisterProcess(pe, particle);
ph->RegisterProcess(cs, particle);
ph->RegisterProcess(gc, particle);
ph->RegisterProcess(rl, particle);
// e-
particle = G4Electron::Electron();
@@ -227,6 +249,8 @@ void G4EmLivermorePhysics::ConstructProcess()
brem->SetEmModel(br1);
brem->SetEmModel(br2);
br1->SetHighEnergyLimit(GeV);
G4ePairProduction* ee = new G4ePairProduction();
// register processes
ph->RegisterProcess(msc, particle);
@@ -281,7 +305,7 @@ void G4EmLivermorePhysics::ConstructProcess()
ionIoni->SetEmModel(new G4IonParametrisedLossModel());
ph->RegisterProcess(hmsc, particle);
ph->RegisterProcess(ionIoni, particle);
ph->RegisterProcess(pnuc, particle);
if(nullptr != pnuc) { ph->RegisterProcess(pnuc, particle); }
// muons, hadrons, ions
G4EmBuilder::ConstructCharged(hmsc, pnuc);
@@ -25,34 +25,7 @@
//
#include "G4EmLivermorePolarizedPhysics.hh"
#include "G4ParticleDefinition.hh"
#include "G4SystemOfUnits.hh"
// *** Processes and models
// gamma
#include "G4LivermorePolarizedPhotoElectricModel.hh"
#include "G4LivermorePolarizedComptonModel.hh"
#include "G4LivermorePolarizedGammaConversionModel.hh"
#include "G4LivermorePolarizedRayleighModel.hh"
#include "G4LivermorePhotoElectricModel.hh"
#include "G4PhotoElectricAngularGeneratorPolarized.hh"
#include "G4PEEffectFluoModel.hh"
#include "G4KleinNishinaModel.hh"
// interfaces
#include "G4EmParameters.hh"
#include "G4LossTableManager.hh"
#include "G4EmConfigurator.hh"
// particles
#include "G4Gamma.hh"
//
#include "G4PhysicsListHelper.hh"
#include "G4BuilderType.hh"
// factory
#include "G4PhysicsConstructorFactory.hh"
@@ -63,11 +36,10 @@ G4_DECLARE_PHYSCONSTR_FACTORY(G4EmLivermorePolarizedPhysics);
G4EmLivermorePolarizedPhysics::G4EmLivermorePolarizedPhysics(G4int ver,
const G4String&)
: G4EmLivermorePhysics(ver, "G4EmLivermorePolarized"), verbose(ver)
: G4EmLivermorePhysics(ver, "G4EmLivermorePolarized")
{
G4EmParameters* param = G4EmParameters::Instance();
param->SetEnablePolarisation(true);
SetPhysicsType(bElectromagnetic);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -76,34 +48,3 @@ G4EmLivermorePolarizedPhysics::~G4EmLivermorePolarizedPhysics()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4EmLivermorePolarizedPhysics::ConstructProcess()
{
if(verbose > 1) {
G4cout << "### " << GetPhysicsName() << " Construct Processes " << G4endl;
}
G4EmLivermorePhysics::ConstructProcess();
G4LossTableManager* man = G4LossTableManager::Instance();
G4EmConfigurator* em_config = man->EmConfigurator();
G4double livEnergyLimit = 1*GeV;
// Add Livermore EM Processes
G4VEmModel* mod = new G4LivermorePhotoElectricModel();
mod->SetAngularDistribution(new G4PhotoElectricAngularGeneratorPolarized());
em_config->SetExtraEmModel("gamma", "phot", mod);
G4VEmModel* comptLiv = new G4LivermorePolarizedComptonModel();
comptLiv->SetHighEnergyLimit(livEnergyLimit);
em_config->SetExtraEmModel("gamma", "compt", comptLiv);
G4VEmModel* convLiv = new G4LivermorePolarizedGammaConversionModel();
convLiv->SetHighEnergyLimit(livEnergyLimit);
em_config->SetExtraEmModel("gamma", "conv", convLiv);
G4VEmModel* theRay = new G4LivermorePolarizedRayleighModel();
em_config->SetExtraEmModel("gamma", "Rayl", theRay);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -22,6 +22,18 @@
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
// | |
// | History: |
// | -------- |
// | |
// | Feb. 2021 JMCB - Adapted for polarized gamma ray transport. |
// | See "An electromagnetic physics constructor |
// | for low energy polarised X-/gamma ray transport |
// | in Geant4", J. M. C. Brown and M. R. Dimmock, |
// | arXiv:2102.02721 (2021). |
// | https://arxiv.org/abs/2102.02721 |
// | |
// *********************************************************************
//
#include "G4EmLowEPPhysics.hh"
@@ -34,16 +46,16 @@
// gamma
#include "G4PhotoElectricEffect.hh"
#include "G4LivermorePhotoElectricModel.hh"
#include "G4PhotoElectricAngularGeneratorPolarized.hh"
#include "G4ComptonScattering.hh"
#include "G4LowEPComptonModel.hh"
#include "G4LivermoreComptonModel.hh"
#include "G4LowEPPolarizedComptonModel.hh"
#include "G4GammaConversion.hh"
#include "G4LivermoreGammaConversionModel.hh"
#include "G4BetheHeitler5DModel.hh"
#include "G4RayleighScattering.hh"
#include "G4LivermoreRayleighModel.hh"
#include "G4LivermorePolarizedRayleighModel.hh"
#include "G4PEEffectFluoModel.hh"
#include "G4KleinNishinaModel.hh"
@@ -59,10 +71,10 @@
#include "G4eBremsstrahlung.hh"
#include "G4SeltzerBergerModel.hh"
#include "G4Generator2BS.hh"
#include "G4BetheHeitler5DModel.hh"
// e+
#include "G4eplusAnnihilation.hh"
#include "G4PenelopeIonisationModel.hh"
// hadrons
#include "G4hMultipleScattering.hh"
@@ -107,11 +119,12 @@ G4_DECLARE_PHYSCONSTR_FACTORY(G4EmLowEPPhysics);
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmLowEPPhysics::G4EmLowEPPhysics(G4int ver, const G4String&)
: G4VPhysicsConstructor("G4EmLowEPPhysics"), verbose(ver)
: G4VPhysicsConstructor("G4EmLowEPPhysics")
{
SetVerboseLevel(ver);
G4EmParameters* param = G4EmParameters::Instance();
param->SetDefaults();
param->SetVerbose(verbose);
param->SetVerbose(ver);
param->SetMinEnergy(100*CLHEP::eV);
param->SetLowestElectronEnergy(100*CLHEP::eV);
param->SetNumberOfBinsPerDecade(20);
@@ -124,6 +137,7 @@ G4EmLowEPPhysics::G4EmLowEPPhysics(G4int ver, const G4String&)
param->SetMscRangeFactor(0.04);
param->SetMuHadLateralDisplacement(true);
param->SetFluo(true);
param->SetAuger(true);
param->SetUseICRU90Data(true);
SetPhysicsType(bElectromagnetic);
}
@@ -145,34 +159,41 @@ void G4EmLowEPPhysics::ConstructParticle()
void G4EmLowEPPhysics::ConstructProcess()
{
if(verbose > 1) {
if(verboseLevel > 1) {
G4cout << "### " << GetPhysicsName() << " Construct Processes " << G4endl;
}
G4EmBuilder::PrepareEMPhysics();
G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
G4EmParameters* param = G4EmParameters::Instance();
// common processes
G4ePairProduction* ee = new G4ePairProduction();
G4hMultipleScattering* hmsc = new G4hMultipleScattering("ionmsc");
// nuclear stopping
G4NuclearStopping* pnuc = new G4NuclearStopping();
pnuc->SetMaxKinEnergy(CLHEP::MeV);
G4double nielEnergyLimit = param->MaxNIELEnergy();
G4NuclearStopping* pnuc = nullptr;
if(nielEnergyLimit > 0.0) {
pnuc = new G4NuclearStopping();
pnuc->SetMaxKinEnergy(nielEnergyLimit);
}
// high energy limit for e+- scattering models and bremsstrahlung
G4double highEnergyLimit = param->MscEnergyLimit();
// Add gamma EM Processes
G4ParticleDefinition* particle = G4Gamma::Gamma();
// Photoelectric absorption
G4PhotoElectricEffect* pe = new G4PhotoElectricEffect();
G4VEmModel* theLivermorePEModel = new G4LivermorePhotoElectricModel();
theLivermorePEModel->SetAngularDistribution(new G4PhotoElectricAngularGeneratorPolarized());
pe->SetEmModel(theLivermorePEModel);
// Compton scattering - Livermore model above 20 MeV, Monarsh's model below
// Compton scattering - Polarised Monash model
G4ComptonScattering* cs = new G4ComptonScattering;
cs->SetEmModel(new G4KleinNishinaModel());
G4VEmModel* theLowEPComptonModel = new G4LowEPComptonModel();
theLowEPComptonModel->SetHighEnergyLimit(20*MeV);
cs->AddEmModel(0, theLowEPComptonModel);
G4VEmModel* theLowEPCSModel = new G4LowEPPolarizedComptonModel();
cs->SetEmModel(theLowEPCSModel);
// gamma conversion - 5D model below 80 GeV with Livermore x-sections
G4GammaConversion* theGammaConversion = new G4GammaConversion();
@@ -181,6 +202,8 @@ void G4EmLowEPPhysics::ConstructProcess()
// default Rayleigh scattering is Livermore
G4RayleighScattering* theRayleigh = new G4RayleighScattering();
G4VEmModel* theLivermorePRSModel = new G4LivermorePolarizedRayleighModel();
theRayleigh->SetEmModel(theLivermorePRSModel);
ph->RegisterProcess(pe, particle);
ph->RegisterProcess(cs, particle);
@@ -192,7 +215,19 @@ void G4EmLowEPPhysics::ConstructProcess()
// multiple scattering
G4eMultipleScattering* msc = new G4eMultipleScattering();
msc->SetEmModel(new G4LowEWentzelVIModel());
G4GoudsmitSaundersonMscModel* msc1 = new G4GoudsmitSaundersonMscModel();
G4WentzelVIModel* msc2 = new G4WentzelVIModel();
msc1->SetHighEnergyLimit(highEnergyLimit);
msc2->SetLowEnergyLimit(highEnergyLimit);
msc->SetEmModel(msc1);
msc->SetEmModel(msc2);
G4eCoulombScatteringModel* ssm = new G4eCoulombScatteringModel();
G4CoulombScattering* ss = new G4CoulombScattering();
ss->SetEmModel(ssm);
ss->SetMinKinEnergy(highEnergyLimit);
ssm->SetLowEnergyLimit(highEnergyLimit);
ssm->SetActivationLowEnergyLimit(highEnergyLimit);
// Ionisation - Livermore should be used only for low energies
G4eIonisation* eioni = new G4eIonisation();
@@ -209,21 +244,40 @@ void G4EmLowEPPhysics::ConstructProcess()
brem->SetEmModel(br1);
brem->SetEmModel(br2);
br1->SetHighEnergyLimit(GeV);
G4ePairProduction* ee = new G4ePairProduction();
// register processes
ph->RegisterProcess(msc, particle);
ph->RegisterProcess(ss, particle);
ph->RegisterProcess(eioni, particle);
ph->RegisterProcess(brem, particle);
ph->RegisterProcess(ee, particle);
// e+
particle = G4Positron::Positron();
// multiple scattering
msc = new G4eMultipleScattering();
msc->SetEmModel(new G4LowEWentzelVIModel());
msc1 = new G4GoudsmitSaundersonMscModel();
msc2 = new G4WentzelVIModel();
msc1->SetHighEnergyLimit(highEnergyLimit);
msc2->SetLowEnergyLimit(highEnergyLimit);
msc->SetEmModel(msc1);
msc->SetEmModel(msc2);
ssm = new G4eCoulombScatteringModel();
ss = new G4CoulombScattering();
ss->SetEmModel(ssm);
ss->SetMinKinEnergy(highEnergyLimit);
ssm->SetLowEnergyLimit(highEnergyLimit);
ssm->SetActivationLowEnergyLimit(highEnergyLimit);
// Standard ionisation
eioni = new G4eIonisation();
G4VEmModel* pen = new G4PenelopeIonisationModel();
pen->SetHighEnergyLimit(0.1*MeV);
eioni->AddEmModel(0, pen, new G4UniversalFluctuation());
// Bremsstrahlung
brem = new G4eBremsstrahlung();
@@ -237,6 +291,7 @@ void G4EmLowEPPhysics::ConstructProcess()
// register processes
ph->RegisterProcess(msc, particle);
ph->RegisterProcess(ss, particle);
ph->RegisterProcess(eioni, particle);
ph->RegisterProcess(brem, particle);
ph->RegisterProcess(ee, particle);
@@ -251,7 +306,7 @@ void G4EmLowEPPhysics::ConstructProcess()
ph->RegisterProcess(hmsc, particle);
ph->RegisterProcess(ionIoni, particle);
ph->RegisterProcess(pnuc, particle);
if(nullptr != pnuc) { ph->RegisterProcess(pnuc, particle); }
// muons, hadrons ions
G4EmBuilder::ConstructCharged(hmsc, pnuc);
@@ -105,11 +105,12 @@ G4_DECLARE_PHYSCONSTR_FACTORY(G4EmPenelopePhysics);
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmPenelopePhysics::G4EmPenelopePhysics(G4int ver, const G4String&)
: G4VPhysicsConstructor("G4EmPenelope"), verbose(ver)
: G4VPhysicsConstructor("G4EmPenelope")
{
SetVerboseLevel(ver);
G4EmParameters* param = G4EmParameters::Instance();
param->SetDefaults();
param->SetVerbose(verbose);
param->SetVerbose(ver);
param->SetMinEnergy(100*CLHEP::eV);
param->SetLowestElectronEnergy(100*CLHEP::eV);
param->SetNumberOfBinsPerDecade(20);
@@ -146,23 +147,26 @@ void G4EmPenelopePhysics::ConstructParticle()
void G4EmPenelopePhysics::ConstructProcess()
{
if(verbose > 1) {
if(verboseLevel > 1) {
G4cout << "### " << GetPhysicsName() << " Construct Processes " << G4endl;
}
G4EmBuilder::PrepareEMPhysics();
G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
G4EmParameters* param = G4EmParameters::Instance();
// processes used by several particles
G4ePairProduction* ee = new G4ePairProduction();
G4hMultipleScattering* hmsc = new G4hMultipleScattering("ionmsc");
// high energy limit for e+- scattering models
G4double highEnergyLimit = G4EmParameters::Instance()->MscEnergyLimit();
G4double highEnergyLimit = param->MscEnergyLimit();
// nuclear stopping
G4double nielEnergyLimit = G4EmParameters::Instance()->MaxNIELEnergy();
G4NuclearStopping* pnuc = new G4NuclearStopping();
pnuc->SetMaxKinEnergy(nielEnergyLimit);
G4double nielEnergyLimit = param->MaxNIELEnergy();
G4NuclearStopping* pnuc = nullptr;
if(nielEnergyLimit > 0.0) {
pnuc = new G4NuclearStopping();
pnuc->SetMaxKinEnergy(nielEnergyLimit);
}
//Applicability range for Penelope models
//for higher energies, the Standard models are used
@@ -232,6 +236,8 @@ void G4EmPenelopePhysics::ConstructProcess()
theBremPenelope->SetHighEnergyLimit(PenelopeHighEnergyLimit);
brem->SetEmModel(theBremPenelope);
G4ePairProduction* ee = new G4ePairProduction();
// register processes
ph->RegisterProcess(msc, particle);
ph->RegisterProcess(eioni, particle);
@@ -290,7 +296,7 @@ void G4EmPenelopePhysics::ConstructProcess()
ionIoni->SetEmModel(new G4IonParametrisedLossModel());
ph->RegisterProcess(hmsc, particle);
ph->RegisterProcess(ionIoni, particle);
ph->RegisterProcess(pnuc, particle);
if(nullptr != pnuc) { ph->RegisterProcess(pnuc, particle); }
// muons, hadrons, ions
G4EmBuilder::ConstructCharged(hmsc, pnuc);
@@ -43,10 +43,13 @@
#include "G4LossTableManager.hh"
#include "G4ComptonScattering.hh"
#include "G4KleinNishinaModel.hh"
#include "G4GammaConversion.hh"
#include "G4PhotoElectricEffect.hh"
#include "G4RayleighScattering.hh"
#include "G4LivermorePhotoElectricModel.hh"
#include "G4LivermorePolarizedRayleighModel.hh"
#include "G4PhotoElectricAngularGeneratorPolarized.hh"
#include "G4eMultipleScattering.hh"
#include "G4hMultipleScattering.hh"
@@ -61,6 +64,7 @@
#include "G4hIonisation.hh"
#include "G4ionIonisation.hh"
#include "G4NuclearStopping.hh"
#include "G4Gamma.hh"
#include "G4Electron.hh"
@@ -80,11 +84,12 @@ G4_DECLARE_PHYSCONSTR_FACTORY(G4EmStandardPhysics);
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmStandardPhysics::G4EmStandardPhysics(G4int ver, const G4String&)
: G4VPhysicsConstructor("G4EmStandard"), verbose(ver)
: G4VPhysicsConstructor("G4EmStandard")
{
SetVerboseLevel(ver);
G4EmParameters* param = G4EmParameters::Instance();
param->SetDefaults();
param->SetVerbose(verbose);
param->SetVerbose(ver);
SetPhysicsType(bElectromagnetic);
}
@@ -105,40 +110,66 @@ void G4EmStandardPhysics::ConstructParticle()
void G4EmStandardPhysics::ConstructProcess()
{
if(verbose > 1) {
if(verboseLevel > 1) {
G4cout << "### " << GetPhysicsName() << " Construct Processes " << G4endl;
}
G4EmBuilder::PrepareEMPhysics();
G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
G4EmParameters* param = G4EmParameters::Instance();
// processes used by several particles
G4hMultipleScattering* hmsc = new G4hMultipleScattering("ionmsc");
G4NuclearStopping* pnuc(nullptr);
// nuclear stopping is enabled if th eenergy limit above zero
G4double nielEnergyLimit = param->MaxNIELEnergy();
G4NuclearStopping* pnuc = nullptr;
if(nielEnergyLimit > 0.0) {
pnuc = new G4NuclearStopping();
pnuc->SetMaxKinEnergy(nielEnergyLimit);
}
// high energy limit for e+- scattering models and bremsstrahlung
G4double highEnergyLimit = G4EmParameters::Instance()->MscEnergyLimit();
G4double highEnergyLimit = param->MscEnergyLimit();
// Add gamma EM Processes
G4ParticleDefinition* particle = G4Gamma::Gamma();
G4bool polar = param->EnablePolarisation();
G4PhotoElectricEffect* pee = new G4PhotoElectricEffect();
pee->SetEmModel(new G4LivermorePhotoElectricModel());
// Photoelectric
G4PhotoElectricEffect* pe = new G4PhotoElectricEffect();
G4VEmModel* peModel = new G4LivermorePhotoElectricModel();
pe->SetEmModel(peModel);
if(polar) {
peModel->SetAngularDistribution(new G4PhotoElectricAngularGeneratorPolarized());
}
// Compton scattering
G4ComptonScattering* cs = new G4ComptonScattering;
if(polar) {
cs->SetEmModel(new G4KleinNishinaModel());
}
// default Rayleigh scattering is Livermore
G4RayleighScattering* rl = new G4RayleighScattering();
if(polar) {
rl->SetEmModel(new G4LivermorePolarizedRayleighModel());
}
if(G4EmParameters::Instance()->GeneralProcessActive()) {
G4GammaGeneralProcess* sp = new G4GammaGeneralProcess();
sp->AddEmProcess(pee);
sp->AddEmProcess(new G4ComptonScattering());
sp->AddEmProcess(pe);
sp->AddEmProcess(cs);
sp->AddEmProcess(new G4GammaConversion());
sp->AddEmProcess(new G4RayleighScattering());
sp->AddEmProcess(rl);
G4LossTableManager::Instance()->SetGammaGeneralProcess(sp);
ph->RegisterProcess(sp, particle);
} else {
ph->RegisterProcess(pee, particle);
ph->RegisterProcess(new G4ComptonScattering(), particle);
ph->RegisterProcess(pe, particle);
ph->RegisterProcess(cs, particle);
ph->RegisterProcess(new G4GammaConversion(), particle);
ph->RegisterProcess(new G4RayleighScattering(), particle);
ph->RegisterProcess(rl, particle);
}
// e-
@@ -193,6 +224,7 @@ void G4EmStandardPhysics::ConstructProcess()
G4ionIonisation* ionIoni = new G4ionIonisation();
ph->RegisterProcess(hmsc, particle);
ph->RegisterProcess(ionIoni, particle);
if(nullptr != pnuc) { ph->RegisterProcess(pnuc, particle); }
// muons, hadrons ions
G4EmBuilder::ConstructCharged(hmsc, pnuc);
@@ -89,11 +89,12 @@ G4_DECLARE_PHYSCONSTR_FACTORY(G4EmStandardPhysicsGS);
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmStandardPhysicsGS::G4EmStandardPhysicsGS(G4int ver, const G4String&)
: G4VPhysicsConstructor("G4EmStandardGS"), verbose(ver)
: G4VPhysicsConstructor("G4EmStandardGS")
{
SetVerboseLevel(ver);
G4EmParameters* param = G4EmParameters::Instance();
param->SetDefaults();
param->SetVerbose(verbose);
param->SetVerbose(ver);
param->SetMscRangeFactor(0.06);
// param->SetMscStepLimitType(fUseSafetyPlus); // corresponds to the error-free stepping
// param->SetFluo(true);
@@ -117,7 +118,7 @@ void G4EmStandardPhysicsGS::ConstructParticle()
void G4EmStandardPhysicsGS::ConstructProcess()
{
if(verbose > 1) {
if(verboseLevel > 1) {
G4cout << "### " << GetPhysicsName() << " Construct Processes " << G4endl;
}
G4EmBuilder::PrepareEMPhysics();
@@ -52,22 +52,18 @@
#include "G4GammaConversion.hh"
#include "G4PhotoElectricEffect.hh"
#include "G4RayleighScattering.hh"
#include "G4BetheHeitler5DModel.hh"
#include "G4hMultipleScattering.hh"
#include "G4KleinNishinaModel.hh"
#include "G4LivermorePhotoElectricModel.hh"
#include "G4eMultipleScattering.hh"
#include "G4MuMultipleScattering.hh"
#include "G4hMultipleScattering.hh"
#include "G4CoulombScattering.hh"
#include "G4eCoulombScatteringModel.hh"
#include "G4hCoulombScatteringModel.hh"
#include "G4WentzelVIModel.hh"
#include "G4UrbanMscModel.hh"
#include "G4LivermorePhotoElectricModel.hh"
#include "G4LivermorePolarizedRayleighModel.hh"
#include "G4PhotoElectricAngularGeneratorPolarized.hh"
#include "G4MuBremsstrahlungModel.hh"
#include "G4MuPairProductionModel.hh"
#include "G4hBremsstrahlungModel.hh"
#include "G4hPairProductionModel.hh"
//#include "G4eSingleCoulombScatteringModel.hh"
#include "G4eDPWACoulombScatteringModel.hh"
@@ -75,38 +71,21 @@
#include "G4eBremsstrahlung.hh"
#include "G4eplusAnnihilation.hh"
#include "G4UAtomicDeexcitation.hh"
#include "G4MuIonisation.hh"
#include "G4MuBremsstrahlung.hh"
#include "G4MuPairProduction.hh"
#include "G4hBremsstrahlung.hh"
#include "G4hPairProduction.hh"
#include "G4ePairProduction.hh"
#include "G4hIonisation.hh"
#include "G4ionIonisation.hh"
#include "G4alphaIonisation.hh"
#include "G4ParticleTable.hh"
#include "G4Gamma.hh"
#include "G4Electron.hh"
#include "G4Positron.hh"
#include "G4MuonPlus.hh"
#include "G4MuonMinus.hh"
#include "G4PionPlus.hh"
#include "G4PionMinus.hh"
#include "G4KaonPlus.hh"
#include "G4KaonMinus.hh"
#include "G4Proton.hh"
#include "G4AntiProton.hh"
#include "G4Deuteron.hh"
#include "G4Triton.hh"
#include "G4He3.hh"
#include "G4Alpha.hh"
#include "G4GenericIon.hh"
#include "G4PhysicsListHelper.hh"
#include "G4BuilderType.hh"
#include "G4EmModelActivator.hh"
#include "G4GammaGeneralProcess.hh"
// factory
#include "G4PhysicsConstructorFactory.hh"
@@ -116,14 +95,16 @@ G4_DECLARE_PHYSCONSTR_FACTORY(G4EmStandardPhysicsSS);
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmStandardPhysicsSS::G4EmStandardPhysicsSS(G4int ver)
: G4VPhysicsConstructor("G4EmStandardSS"), verbose(ver)
: G4VPhysicsConstructor("G4EmStandardSS")
{
SetVerboseLevel(ver);
G4EmParameters* param = G4EmParameters::Instance();
param->SetDefaults();
param->SetVerbose(verbose);
param->SetVerbose(ver);
param->SetLowestElectronEnergy(10*CLHEP::eV);
param->SetMscThetaLimit(0.0);
param->SetAugerCascade(true);
param->SetUseMottCorrection(true); // use Mott-correction for e-/e+ msc gs
param->SetAuger(true);
param->SetPixe(true);
SetPhysicsType(bElectromagnetic);
}
@@ -145,156 +126,98 @@ void G4EmStandardPhysicsSS::ConstructParticle()
void G4EmStandardPhysicsSS::ConstructProcess()
{
if(verbose > 1) {
if(verboseLevel > 1) {
G4cout << "### " << GetPhysicsName() << " Construct Processes " << G4endl;
}
G4EmBuilder::PrepareEMPhysics();
G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
G4EmParameters* param = G4EmParameters::Instance();
// muon & hadron bremsstrahlung and pair production
G4MuBremsstrahlung* mub = new G4MuBremsstrahlung();
G4MuPairProduction* mup = new G4MuPairProduction();
G4hBremsstrahlung* pib = new G4hBremsstrahlung();
G4hPairProduction* pip = new G4hPairProduction();
G4hBremsstrahlung* kb = new G4hBremsstrahlung();
G4hPairProduction* kp = new G4hPairProduction();
G4hBremsstrahlung* pb = new G4hBremsstrahlung();
G4hPairProduction* pp = new G4hPairProduction();
// processes used by several particles
G4hMultipleScattering* hmsc = new G4hMultipleScattering("ionmsc");
// muon & hadron scattering
G4CoulombScattering* muss = new G4CoulombScattering();
muss->SetEmModel(new G4hCoulombScatteringModel());
G4CoulombScattering* piss = new G4CoulombScattering();
piss->SetEmModel(new G4hCoulombScatteringModel());
G4CoulombScattering* kss = new G4CoulombScattering();
kss->SetEmModel(new G4hCoulombScatteringModel());
// Add gamma EM Processes
G4ParticleDefinition* particle = G4Gamma::Gamma();
// Add standard EM Processes
G4ParticleTable* table = G4ParticleTable::GetParticleTable();
for(const auto& particleName : partList.PartNames()) {
G4ParticleDefinition* particle = table->FindParticle(particleName);
if (!particle) { continue; }
if (particleName == "gamma") {
G4PhotoElectricEffect* pee = new G4PhotoElectricEffect();
pee->SetEmModel(new G4LivermorePhotoElectricModel());
G4ComptonScattering* cs = new G4ComptonScattering;
cs->SetEmModel(new G4KleinNishinaModel());
ph->RegisterProcess(pee, particle);
ph->RegisterProcess(cs, particle);
ph->RegisterProcess(new G4GammaConversion(), particle);
ph->RegisterProcess(new G4RayleighScattering(), particle);
} else if (particleName == "e-") {
G4CoulombScattering* ss = new G4CoulombScattering();
ss->AddEmModel(0, new G4eDPWACoulombScatteringModel());
// if(G4EmParameters::Instance()->UseMottCorrection()) {
// ss->SetEmModel(new G4eSingleCoulombScatteringModel());
// }
ph->RegisterProcess(new G4eIonisation(), particle);
ph->RegisterProcess(new G4eBremsstrahlung(), particle);
ph->RegisterProcess(ss, particle);
} else if (particleName == "e+") {
G4CoulombScattering* ss = new G4CoulombScattering();
ss->AddEmModel(0, new G4eDPWACoulombScatteringModel());
// if(G4EmParameters::Instance()->UseMottCorrection()) {
// ss->SetEmModel(new G4eSingleCoulombScatteringModel());
// }
ph->RegisterProcess(new G4eIonisation(), particle);
ph->RegisterProcess(new G4eBremsstrahlung(), particle);
ph->RegisterProcess(new G4eplusAnnihilation(), particle);
ph->RegisterProcess(ss, particle);
} else if (particleName == "mu+" ||
particleName == "mu-" ) {
ph->RegisterProcess(new G4MuIonisation(), particle);
ph->RegisterProcess(mub, particle);
ph->RegisterProcess(mup, particle);
ph->RegisterProcess(muss, particle);
} else if (particleName == "alpha" ||
particleName == "He3") {
ph->RegisterProcess(new G4ionIonisation(), particle);
ph->RegisterProcess(new G4CoulombScattering(), particle);
} else if (particleName == "GenericIon") {
ph->RegisterProcess(new G4ionIonisation(), particle);
ph->RegisterProcess(new G4CoulombScattering(), particle);
} else if (particleName == "pi+" ||
particleName == "pi-" ) {
ph->RegisterProcess(new G4hIonisation(), particle);
ph->RegisterProcess(pib, particle);
ph->RegisterProcess(pip, particle);
ph->RegisterProcess(piss, particle);
} else if (particleName == "kaon+" ||
particleName == "kaon-" ) {
ph->RegisterProcess(new G4hIonisation(), particle);
ph->RegisterProcess(kb, particle);
ph->RegisterProcess(kp, particle);
ph->RegisterProcess(kss, particle);
} else if (particleName == "proton" ||
particleName == "anti_proton") {
G4CoulombScattering* pss = new G4CoulombScattering();
pss->SetEmModel(new G4hCoulombScatteringModel());
ph->RegisterProcess(new G4hIonisation(), particle);
ph->RegisterProcess(pb, particle);
ph->RegisterProcess(pp, particle);
ph->RegisterProcess(pss, particle);
} else if (particleName == "B+" ||
particleName == "B-" ||
particleName == "D+" ||
particleName == "D-" ||
particleName == "Ds+" ||
particleName == "Ds-" ||
particleName == "anti_He3" ||
particleName == "anti_alpha" ||
particleName == "anti_deuteron" ||
particleName == "anti_lambda_c+" ||
particleName == "anti_omega-" ||
particleName == "anti_sigma_c+" ||
particleName == "anti_sigma_c++" ||
particleName == "anti_sigma+" ||
particleName == "anti_sigma-" ||
particleName == "anti_triton" ||
particleName == "anti_xi_c+" ||
particleName == "anti_xi-" ||
particleName == "deuteron" ||
particleName == "lambda_c+" ||
particleName == "omega-" ||
particleName == "sigma_c+" ||
particleName == "sigma_c++" ||
particleName == "sigma+" ||
particleName == "sigma-" ||
particleName == "tau+" ||
particleName == "tau-" ||
particleName == "triton" ||
particleName == "xi_c+" ||
particleName == "xi-" ) {
ph->RegisterProcess(new G4hIonisation(), particle);
ph->RegisterProcess(new G4CoulombScattering(), particle);
}
// Photoelectric
G4PhotoElectricEffect* pe = new G4PhotoElectricEffect();
G4VEmModel* peModel = new G4LivermorePhotoElectricModel();
pe->SetEmModel(peModel);
if(param->EnablePolarisation()) {
peModel->SetAngularDistribution(new G4PhotoElectricAngularGeneratorPolarized());
}
// Compton scattering
G4ComptonScattering* cs = new G4ComptonScattering;
cs->SetEmModel(new G4KleinNishinaModel());
// Gamma conversion
G4GammaConversion* gc = new G4GammaConversion();
G4VEmModel* conv = new G4BetheHeitler5DModel();
gc->SetEmModel(conv);
// default Rayleigh scattering is Livermore
G4RayleighScattering* rl = new G4RayleighScattering();
if(param->EnablePolarisation()) {
rl->SetEmModel(new G4LivermorePolarizedRayleighModel());
}
if(param->GeneralProcessActive()) {
G4GammaGeneralProcess* sp = new G4GammaGeneralProcess();
sp->AddEmProcess(pe);
sp->AddEmProcess(cs);
sp->AddEmProcess(gc);
sp->AddEmProcess(rl);
G4LossTableManager::Instance()->SetGammaGeneralProcess(sp);
ph->RegisterProcess(sp, particle);
} else {
ph->RegisterProcess(pe, particle);
ph->RegisterProcess(cs, particle);
ph->RegisterProcess(gc, particle);
ph->RegisterProcess(rl, particle);
}
// e-
particle = G4Electron::Electron();
G4CoulombScattering* ss = new G4CoulombScattering();
if(param->UseMottCorrection()) {
ss->SetEmModel(new G4eDPWACoulombScatteringModel());
} else {
ss->SetEmModel(new G4eCoulombScatteringModel());
}
ph->RegisterProcess(new G4eIonisation(), particle);
ph->RegisterProcess(new G4eBremsstrahlung(), particle);
G4ePairProduction* ee = new G4ePairProduction();
ph->RegisterProcess(ee, particle);
ph->RegisterProcess(ss, particle);
// e+
particle = G4Positron::Positron();
ss = new G4CoulombScattering();
if(param->UseMottCorrection()) {
ss->SetEmModel(new G4eDPWACoulombScatteringModel());
} else {
ss->SetEmModel(new G4eCoulombScatteringModel());
}
ph->RegisterProcess(new G4eIonisation(), particle);
ph->RegisterProcess(new G4eBremsstrahlung(), particle);
ph->RegisterProcess(ee, particle);
ph->RegisterProcess(ss, particle);
ph->RegisterProcess(new G4eplusAnnihilation(), particle);
// generic ion
particle = G4GenericIon::GenericIon();
G4ionIonisation* ionIoni = new G4ionIonisation();
ph->RegisterProcess(ionIoni, particle);
ph->RegisterProcess(new G4CoulombScattering(), particle);
// muons, hadrons, ions
G4EmBuilder::ConstructChargedSS(hmsc);
// extra configuration
G4EmModelActivator mact(GetPhysicsName());
}
@@ -93,11 +93,11 @@ G4_DECLARE_PHYSCONSTR_FACTORY(G4EmStandardPhysicsWVI);
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmStandardPhysicsWVI::G4EmStandardPhysicsWVI(G4int ver)
: G4VPhysicsConstructor("G4EmStandardWVI"), verbose(ver)
: G4VPhysicsConstructor("G4EmStandardWVI")
{
G4EmParameters* param = G4EmParameters::Instance();
param->SetDefaults();
param->SetVerbose(verbose);
param->SetVerbose(ver);
param->SetMinEnergy(10*CLHEP::eV);
param->SetLowestElectronEnergy(10*CLHEP::eV);
param->SetNumberOfBinsPerDecade(20);
@@ -130,7 +130,7 @@ void G4EmStandardPhysicsWVI::ConstructParticle()
void G4EmStandardPhysicsWVI::ConstructProcess()
{
if(verbose > 1) {
if(verboseLevel > 1) {
G4cout << "### " << GetPhysicsName() << " Construct Processes " << G4endl;
}
G4EmBuilder::PrepareEMPhysics();
@@ -82,11 +82,12 @@ G4_DECLARE_PHYSCONSTR_FACTORY(G4EmStandardPhysics_option1);
G4EmStandardPhysics_option1::G4EmStandardPhysics_option1(G4int ver,
const G4String&)
: G4VPhysicsConstructor("G4EmStandard_opt1"), verbose(ver)
: G4VPhysicsConstructor("G4EmStandard_opt1")
{
SetVerboseLevel(ver);
G4EmParameters* param = G4EmParameters::Instance();
param->SetDefaults();
param->SetVerbose(verbose);
param->SetVerbose(ver);
param->SetApplyCuts(true);
param->SetGeneralProcessActive(true);
param->SetStepFunction(0.8, 1*CLHEP::mm);
@@ -112,7 +113,7 @@ void G4EmStandardPhysics_option1::ConstructParticle()
void G4EmStandardPhysics_option1::ConstructProcess()
{
if(verbose > 1) {
if(verboseLevel > 1) {
G4cout << "### " << GetPhysicsName() << " Construct Processes " << G4endl;
}
G4EmBuilder::PrepareEMPhysics();
@@ -96,11 +96,12 @@ G4_DECLARE_PHYSCONSTR_FACTORY(G4EmStandardPhysics_option2);
G4EmStandardPhysics_option2::G4EmStandardPhysics_option2(G4int ver,
const G4String&)
: G4VPhysicsConstructor("G4EmStandard_opt2"), verbose(ver)
: G4VPhysicsConstructor("G4EmStandard_opt2")
{
SetVerboseLevel(ver);
G4EmParameters* param = G4EmParameters::Instance();
param->SetDefaults();
param->SetVerbose(verbose);
param->SetVerbose(ver);
param->SetApplyCuts(false);
param->SetStepFunction(0.8, 1*CLHEP::mm);
param->SetMscRangeFactor(0.2);
@@ -126,7 +127,7 @@ void G4EmStandardPhysics_option2::ConstructParticle()
void G4EmStandardPhysics_option2::ConstructProcess()
{
if(verbose > 1) {
if(verboseLevel > 1) {
G4cout << "### " << GetPhysicsName() << " Construct Processes " << G4endl;
}
G4EmBuilder::PrepareEMPhysics();
@@ -52,6 +52,9 @@
#include "G4PEEffectFluoModel.hh"
#include "G4KleinNishinaModel.hh"
#include "G4LivermorePhotoElectricModel.hh"
#include "G4LivermorePolarizedRayleighModel.hh"
#include "G4PhotoElectricAngularGeneratorPolarized.hh"
#include "G4BetheHeitler5DModel.hh"
#include "G4eMultipleScattering.hh"
#include "G4hMultipleScattering.hh"
@@ -94,11 +97,12 @@ G4_DECLARE_PHYSCONSTR_FACTORY(G4EmStandardPhysics_option3);
G4EmStandardPhysics_option3::G4EmStandardPhysics_option3(G4int ver,
const G4String&)
: G4VPhysicsConstructor("G4EmStandard_opt3"), verbose(ver)
: G4VPhysicsConstructor("G4EmStandard_opt3")
{
SetVerboseLevel(ver);
G4EmParameters* param = G4EmParameters::Instance();
param->SetDefaults();
param->SetVerbose(verbose);
param->SetVerbose(ver);
param->SetMinEnergy(10*CLHEP::eV);
param->SetLowestElectronEnergy(100*CLHEP::eV);
param->SetNumberOfBinsPerDecade(20);
@@ -134,44 +138,61 @@ void G4EmStandardPhysics_option3::ConstructParticle()
void G4EmStandardPhysics_option3::ConstructProcess()
{
if(verbose > 1) {
if(verboseLevel > 1) {
G4cout << "### " << GetPhysicsName() << " Construct Processes " << G4endl;
}
G4EmBuilder::PrepareEMPhysics();
G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
G4EmParameters* param = G4EmParameters::Instance();
// processes used by several particles
G4ePairProduction* ee = new G4ePairProduction();
G4hMultipleScattering* hmsc = new G4hMultipleScattering("ionmsc");
// nuclear stopping
G4double nielEnergyLimit = G4EmParameters::Instance()->MaxNIELEnergy();
G4NuclearStopping* pnuc = new G4NuclearStopping();
pnuc->SetMaxKinEnergy(nielEnergyLimit);
// nuclear stopping is enabled if th eenergy limit above zero
G4double nielEnergyLimit = param->MaxNIELEnergy();
G4NuclearStopping* pnuc = nullptr;
if(nielEnergyLimit > 0.0) {
pnuc = new G4NuclearStopping();
pnuc->SetMaxKinEnergy(nielEnergyLimit);
}
// Add gamma EM Processes
G4ParticleDefinition* particle = G4Gamma::Gamma();
G4PhotoElectricEffect* pee = new G4PhotoElectricEffect();
pee->SetEmModel(new G4LivermorePhotoElectricModel());
G4PhotoElectricEffect* pe = new G4PhotoElectricEffect();
G4VEmModel* peModel = new G4LivermorePhotoElectricModel();
pe->SetEmModel(peModel);
if(param->EnablePolarisation()) {
peModel->SetAngularDistribution(new G4PhotoElectricAngularGeneratorPolarized());
}
G4ComptonScattering* cs = new G4ComptonScattering();
cs->SetEmModel(new G4KleinNishinaModel());
G4GammaConversion* gc = new G4GammaConversion();
if(param->EnablePolarisation()) {
gc->SetEmModel(new G4BetheHeitler5DModel());
}
G4RayleighScattering* rl = new G4RayleighScattering();
if(param->EnablePolarisation()) {
rl->SetEmModel(new G4LivermorePolarizedRayleighModel());
}
if(G4EmParameters::Instance()->GeneralProcessActive()) {
G4GammaGeneralProcess* sp = new G4GammaGeneralProcess();
sp->AddEmProcess(pee);
sp->AddEmProcess(pe);
sp->AddEmProcess(cs);
sp->AddEmProcess(new G4GammaConversion());
sp->AddEmProcess(new G4RayleighScattering());
sp->AddEmProcess(gc);
sp->AddEmProcess(rl);
G4LossTableManager::Instance()->SetGammaGeneralProcess(sp);
ph->RegisterProcess(sp, particle);
} else {
ph->RegisterProcess(pee,particle);
ph->RegisterProcess(pe, particle);
ph->RegisterProcess(cs, particle);
ph->RegisterProcess(new G4GammaConversion(), particle);
ph->RegisterProcess(new G4RayleighScattering(), particle);
ph->RegisterProcess(gc, particle);
ph->RegisterProcess(rl, particle);
}
// e-
@@ -189,6 +210,8 @@ void G4EmStandardPhysics_option3::ConstructProcess()
brem->SetEmModel(br2);
br2->SetLowEnergyLimit(CLHEP::GeV);
G4ePairProduction* ee = new G4ePairProduction();
ph->RegisterProcess(msc, particle);
ph->RegisterProcess(eIoni, particle);
ph->RegisterProcess(brem, particle);
@@ -221,7 +244,7 @@ void G4EmStandardPhysics_option3::ConstructProcess()
ionIoni->SetEmModel(new G4IonParametrisedLossModel());
ph->RegisterProcess(hmsc, particle);
ph->RegisterProcess(ionIoni, particle);
ph->RegisterProcess(pnuc, particle);
if(nullptr != pnuc) { ph->RegisterProcess(pnuc, particle); }
// muons, hadrons, ions
G4EmBuilder::ConstructCharged(hmsc, pnuc, false);
@@ -53,9 +53,12 @@
#include "G4RayleighScattering.hh"
#include "G4PEEffectFluoModel.hh"
#include "G4KleinNishinaModel.hh"
#include "G4LowEPComptonModel.hh"
#include "G4BetheHeitler5DModel.hh"
#include "G4LivermorePhotoElectricModel.hh"
#include "G4LivermorePolarizedRayleighModel.hh"
#include "G4PhotoElectricAngularGeneratorPolarized.hh"
#include "G4LowEPComptonModel.hh"
#include "G4LowEPPolarizedComptonModel.hh"
#include "G4eMultipleScattering.hh"
#include "G4hMultipleScattering.hh"
@@ -103,11 +106,12 @@ G4_DECLARE_PHYSCONSTR_FACTORY(G4EmStandardPhysics_option4);
G4EmStandardPhysics_option4::G4EmStandardPhysics_option4(G4int ver,
const G4String&)
: G4VPhysicsConstructor("G4EmStandard_opt4"), verbose(ver)
: G4VPhysicsConstructor("G4EmStandard_opt4")
{
SetVerboseLevel(ver);
G4EmParameters* param = G4EmParameters::Instance();
param->SetDefaults();
param->SetVerbose(verbose);
param->SetVerbose(ver);
param->SetMinEnergy(100*CLHEP::eV);
param->SetLowestElectronEnergy(100*CLHEP::eV);
param->SetNumberOfBinsPerDecade(20);
@@ -144,58 +148,76 @@ void G4EmStandardPhysics_option4::ConstructParticle()
void G4EmStandardPhysics_option4::ConstructProcess()
{
if(verbose > 1) {
if(verboseLevel > 1) {
G4cout << "### " << GetPhysicsName() << " Construct Processes " << G4endl;
}
G4EmBuilder::PrepareEMPhysics();
G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
G4EmParameters* param = G4EmParameters::Instance();
// processes used by several particles
G4ePairProduction* ee = new G4ePairProduction();
G4hMultipleScattering* hmsc = new G4hMultipleScattering("ionmsc");
// nuclear stopping
G4double nielEnergyLimit = G4EmParameters::Instance()->MaxNIELEnergy();
G4NuclearStopping* pnuc = new G4NuclearStopping();
pnuc->SetMaxKinEnergy(nielEnergyLimit);
// nuclear stopping is enabled if the energy limit above zero
G4double nielEnergyLimit = param->MaxNIELEnergy();
G4NuclearStopping* pnuc = nullptr;
if(nielEnergyLimit > 0.0) {
pnuc = new G4NuclearStopping();
pnuc->SetMaxKinEnergy(nielEnergyLimit);
}
// high energy limit for e+- scattering models and bremsstrahlung
G4double highEnergyLimit = G4EmParameters::Instance()->MscEnergyLimit();
G4double highEnergyLimit = param->MscEnergyLimit();
// Add gamma EM Processes
G4ParticleDefinition* particle = G4Gamma::Gamma();
G4bool polar = param->EnablePolarisation();
// Photoelectric
G4PhotoElectricEffect* pe = new G4PhotoElectricEffect();
G4VEmModel* theLivermorePEModel = new G4LivermorePhotoElectricModel();
pe->SetEmModel(theLivermorePEModel);
G4VEmModel* peModel = new G4LivermorePhotoElectricModel();
pe->SetEmModel(peModel);
if(polar) {
peModel->SetAngularDistribution(new G4PhotoElectricAngularGeneratorPolarized());
}
// Compton scattering
G4ComptonScattering* cs = new G4ComptonScattering;
cs->SetEmModel(new G4KleinNishinaModel());
G4VEmModel* theLowEPComptonModel = new G4LowEPComptonModel();
theLowEPComptonModel->SetHighEnergyLimit(20*CLHEP::MeV);
cs->AddEmModel(0, theLowEPComptonModel);
G4VEmModel* cModel = nullptr;
if(polar) {
cModel = new G4LowEPPolarizedComptonModel();
} else {
cModel = new G4LowEPComptonModel();
}
cModel->SetHighEnergyLimit(20*CLHEP::MeV);
cs->AddEmModel(0, cModel);
// Gamma conversion
G4GammaConversion* gc = new G4GammaConversion();
G4VEmModel* conv = new G4BetheHeitler5DModel();
gc->SetEmModel(conv);
if(G4EmParameters::Instance()->GeneralProcessActive()) {
// default Rayleigh scattering is Livermore
G4RayleighScattering* rl = new G4RayleighScattering();
if(polar) {
rl->SetEmModel(new G4LivermorePolarizedRayleighModel());
}
if(param->GeneralProcessActive()) {
G4GammaGeneralProcess* sp = new G4GammaGeneralProcess();
sp->AddEmProcess(pe);
sp->AddEmProcess(cs);
sp->AddEmProcess(gc);
sp->AddEmProcess(new G4RayleighScattering());
sp->AddEmProcess(rl);
G4LossTableManager::Instance()->SetGammaGeneralProcess(sp);
ph->RegisterProcess(sp, particle);
} else {
ph->RegisterProcess(pe, particle);
ph->RegisterProcess(cs, particle);
ph->RegisterProcess(gc, particle);
ph->RegisterProcess(new G4RayleighScattering(), particle);
ph->RegisterProcess(rl, particle);
}
// e-
@@ -235,6 +257,8 @@ void G4EmStandardPhysics_option4::ConstructProcess()
brem->SetEmModel(br2);
br1->SetHighEnergyLimit(CLHEP::GeV);
G4ePairProduction* ee = new G4ePairProduction();
// register processes
ph->RegisterProcess(msc, particle);
ph->RegisterProcess(eioni, particle);
@@ -293,7 +317,7 @@ void G4EmStandardPhysics_option4::ConstructProcess()
ionIoni->SetEmModel(new G4IonParametrisedLossModel());
ph->RegisterProcess(hmsc, particle);
ph->RegisterProcess(ionIoni, particle);
ph->RegisterProcess(pnuc, particle);
if(nullptr != pnuc) { ph->RegisterProcess(pnuc, particle); }
// muons, hadrons, ions
G4EmBuilder::ConstructCharged(hmsc, pnuc);
@@ -214,16 +214,11 @@ void G4GammaGeneralProcess::InitialiseProcess(const G4ParticleDefinition*)
size_t nbin2 = std::max(5, nd*G4lrint(std::log10(maxe/minMMEnergy)));
G4PhysicsVector* vec = nullptr;
G4PhysicsLogVector aVector(mine,minPEEnergy,nbin1);
G4PhysicsLogVector bVector(minPEEnergy,minEEEnergy,nLowE);
G4PhysicsLogVector cVector(minEEEnergy,minMMEnergy,nHighE);
G4PhysicsLogVector dVector(minMMEnergy,maxe,nbin2);
if(splineFlag) {
aVector.SetSpline(splineFlag);
bVector.SetSpline(splineFlag);
cVector.SetSpline(splineFlag);
dVector.SetSpline(splineFlag);
}
G4PhysicsLogVector aVector(mine,minPEEnergy,nbin1,splineFlag);
G4PhysicsLogVector bVector(minPEEnergy,minEEEnergy,nLowE,splineFlag);
G4PhysicsLogVector cVector(minEEEnergy,minMMEnergy,nHighE,splineFlag);
G4PhysicsLogVector dVector(minMMEnergy,maxe,nbin2,splineFlag);
for(size_t i=0; i<nTables; ++i) {
if(!theT[i]) { continue; }
//G4cout << "## PreparePhysTable " << i << "." << G4endl;
@@ -683,8 +678,8 @@ G4bool G4GammaGeneralProcess::StorePhysicsTable(const G4ParticleDefinition* part
G4bool
G4GammaGeneralProcess::RetrievePhysicsTable(const G4ParticleDefinition* part,
const G4String& directory,
G4bool ascii)
const G4String& directory,
G4bool ascii)
{
if(1 < verboseLevel) {
G4cout << "G4GammaGeneralProcess::RetrievePhysicsTable() for "
@@ -707,14 +702,16 @@ G4GammaGeneralProcess::RetrievePhysicsTable(const G4ParticleDefinition* part,
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))
if(!theHandler->RetrievePhysicsTable(i, part, fnam, ascii, splineFlag))
{ yes = false; }
}
}
if(yes) {
}
return yes;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....Ooooo0ooooo ........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4GammaGeneralProcess::GetMeanFreePath(const G4Track& track,
G4double,
@@ -161,211 +161,3 @@ void G4OpticalPhysics::ConstructProcess()
if (verboseLevel > 0)
G4cout << "### " << namePhysics << " physics constructed." << G4endl;
}
// DEPRECATED
// the methods below are kept for backwards compatibility, and are to be
// removed in future. Please use the methods in
// G4OpticalParameters instead.
void G4OpticalPhysics::Configure(G4OpticalProcessIndex index, G4bool val) {
G4OpticalParameters* params = G4OpticalParameters::Instance();
if (index == kCerenkov) params->SetProcessActivation("Cerenkov", val);
else if (index == kScintillation) params->SetProcessActivation("Scintillation", val);
else if (index == kAbsorption) params->SetProcessActivation("Absorption", val);
else if (index == kRayleigh) params->SetProcessActivation("Rayleigh", val);
else if (index == kMieHG) params->SetProcessActivation("MieHG", val);
else if (index == kBoundary) params->SetProcessActivation("Boundary", val);
else if (index == kWLS) params->SetProcessActivation("WLS", val);
else if (index == kWLS2) params->SetProcessActivation("WLS2", val);
}
void G4OpticalPhysics::SetTrackSecondariesFirst(G4OpticalProcessIndex index, G4bool val) {
if (index == kCerenkov)
G4OpticalParameters::Instance()->SetCerenkovTrackSecondariesFirst(val);
else if (index == kScintillation)
G4OpticalParameters::Instance()->SetScintTrackSecondariesFirst(val);
G4ExceptionDescription ed;
ed << "Method G4OpticalPhysics::SetTrackSecondariesFirst is deprecated." << G4endl
<< "Use G4OpticalParameters::Set[Cerenkov/Scint]TrackSecondariesFirst(G4bool) instead.";
PrintWarning(ed);
}
// Cerenkov
void G4OpticalPhysics::SetMaxNumPhotonsPerStep(G4int val) {
G4OpticalParameters::Instance()->SetCerenkovMaxPhotonsPerStep(val);
G4ExceptionDescription ed;
ed << "Method G4OpticalPhysics::SetMaxNumPhotonsPerStep is deprecated." << G4endl
<< "Use G4OpticalParameters::SetCerenkovMaxPhotonsPerStep(G4int) instead.";
PrintWarning(ed);
}
void G4OpticalPhysics::SetMaxBetaChangePerStep(G4double val) {
G4OpticalParameters::Instance()->SetCerenkovMaxBetaChange(val);
G4ExceptionDescription ed;
ed << "Method G4OpticalPhysics::SetMaxBetaChangePerStep is deprecated." << G4endl
<< "Use G4OpticalParameters::SetCerenkovMaxBetaChange(G4double) instead.";
PrintWarning(ed);
}
void G4OpticalPhysics::SetCerenkovStackPhotons(G4bool val) {
G4OpticalParameters::Instance()->SetCerenkovStackPhotons(val);
G4ExceptionDescription ed;
ed << "Method G4OpticalPhysics::SetCerenkovStackPhotons is deprecated." << G4endl
<< "Use G4OpticalParameters::SetCerenkovStackPhotons(G4int) "
<< "instead.";
PrintWarning(ed);
}
void G4OpticalPhysics::SetCerenkovTrackSecondariesFirst(G4bool val) {
G4OpticalParameters::Instance()->SetCerenkovTrackSecondariesFirst(val);
G4ExceptionDescription ed;
ed << "Method G4OpticalPhysics::SetCerenkovTrackSecondariesFirst is deprecated." << G4endl
<< "Use G4OpticalParameters::SetCerenkovTrackSecondariesFirst(G4int) instead.";
PrintWarning(ed);
}
void G4OpticalPhysics::SetCerenkovVerbosity(G4int val) {
G4OpticalParameters::Instance()->SetCerenkovVerboseLevel(val);
G4ExceptionDescription ed;
ed << "Method G4OpticalPhysics::SetCerenkovVerbosity is deprecated." << G4endl
<< "Use G4OpticalParameters::SetCerenkovVerbosity(G4int) instead.";
PrintWarning(ed);
}
// Scintillation
void G4OpticalPhysics::SetScintillationYieldFactor(G4double val) {
G4OpticalParameters::Instance()->SetScintYieldFactor(val);
G4ExceptionDescription ed;
ed << "Method G4OpticalPhysics::SetScintillationYieldFactor is deprecated." << G4endl
<< "Use G4OpticalParameters::SetScintYieldFactor(G4double) instead.";
PrintWarning(ed);
}
void G4OpticalPhysics::SetScintillationExcitationRatio(G4double val) {
G4OpticalParameters::Instance()->SetScintExcitationRatio(val);
G4ExceptionDescription ed;
ed << "Method G4OpticalPhysics::SetScintillationExcitationRatio is deprecated." << G4endl
<< "Use G4OpticalParameters::SetScintExcitationRatio(G4double) instead.";
PrintWarning(ed);
}
void G4OpticalPhysics::SetScintillationByParticleType(G4bool val) {
G4OpticalParameters::Instance()->SetScintByParticleType(val);
G4ExceptionDescription ed;
ed << "Method G4OpticalPhysics::SetScintillationByParticleType is deprecated." << G4endl
<< "Use G4OpticalParameters::SetScintByParticleType(G4bool) instead.";
PrintWarning(ed);
}
void G4OpticalPhysics::SetScintillationTrackInfo(G4bool val) {
G4OpticalParameters::Instance()->SetScintTrackInfo(val);
G4ExceptionDescription ed;
ed << "Method G4OpticalPhysics::SetScintillationTrackInfo is deprecated." << G4endl
<< "Use G4OpticalParameters::SetScintTrackInfo(G4bool) instead.";
PrintWarning(ed);
}
void G4OpticalPhysics::SetScintillationTrackSecondariesFirst(G4bool val) {
G4OpticalParameters::Instance()->SetScintTrackSecondariesFirst(val);
G4ExceptionDescription ed;
ed << "Method G4OpticalPhysics::SetScintillationTrackSecondariesFirst is deprecated." << G4endl
<< "Use G4OpticalParameters::SetScintTrackSecondariesFirst(G4bool) instead.";
PrintWarning(ed);
}
void G4OpticalPhysics::SetFiniteRiseTime(G4bool val) {
G4OpticalParameters::Instance()->SetScintFiniteRiseTime(val);
G4ExceptionDescription ed;
ed << "Method G4OpticalPhysics::SetFiniteRiseTime is deprecated." << G4endl
<< "Use G4OpticalParameters::SetScintFiniteRiseTime(G4bool) instead.";
PrintWarning(ed);
}
void G4OpticalPhysics::SetScintillationStackPhotons(G4bool val) {
G4OpticalParameters::Instance()->SetScintStackPhotons(val);
G4ExceptionDescription ed;
ed << "Method G4OpticalPhysics::SetScintillationStackPhotons is deprecated." << G4endl
<< "Use G4OpticalParameters::SetScintStackPhotons(G4bool) instead.";
PrintWarning(ed);
}
void G4OpticalPhysics::SetScintillationVerbosity(G4int val) {
G4OpticalParameters::Instance()->SetScintVerboseLevel(val);
G4ExceptionDescription ed;
ed << "Method G4OpticalPhysics::SetScintillationVerbosity is deprecated." << G4endl
<< "Use G4OpticalParameters::SetScintVerboseLevel(G4int) instead.";
PrintWarning(ed);
}
void G4OpticalPhysics::SetScintillationEnhancedTimeConstants(G4bool val) {
G4OpticalParameters::Instance()->SetScintEnhancedTimeConstants(val);
G4ExceptionDescription ed;
ed << "Method G4OpticalPhysics::SetScintillationEnhanceTimeConstants is deprecated." << G4endl
<< "Use G4OpticalParameters::SetScintEnhancedTimeConstants(G4bool) instead.";
PrintWarning(ed);
}
//void AddScintillationSaturation(G4EmSaturation* );
// WLS
void G4OpticalPhysics::SetWLSTimeProfile(G4String val) {
G4OpticalParameters::Instance()->SetWLSTimeProfile(val);
G4ExceptionDescription ed;
ed << "Method G4OpticalPhysics::SetWLSTimeProfile is deprecated." << G4endl
<< "Use G4OpticalParameters::SetWLSTimeProfile(G4String) instead.";
PrintWarning(ed);
}
void G4OpticalPhysics::SetWLSVerbosity(G4int val) {
G4OpticalParameters::Instance()->SetWLSVerboseLevel(val);
G4ExceptionDescription ed;
ed << "Method G4OpticalPhysics::SetWLSVerbosity is deprecated." << G4endl
<< "Use G4OpticalParameters::SetWLSVerboseLevel(G4int) instead.";
PrintWarning(ed);
}
//boundary
void G4OpticalPhysics::SetBoundaryVerbosity(G4int val) {
G4OpticalParameters::Instance()->SetBoundaryVerboseLevel(val);
G4ExceptionDescription ed;
ed << "Method G4OpticalPhysics::SetBoundaryVerbosity is deprecated." << G4endl
<< "Use G4OpticalParameters::SetBoundaryVerboseLevel(G4int) instead.";
PrintWarning(ed);
}
void G4OpticalPhysics::SetInvokeSD(G4bool val) {
G4OpticalParameters::Instance()->SetBoundaryInvokeSD(val);
G4ExceptionDescription ed;
ed << "Method G4OpticalPhysics::SetInvokeSD is deprecated." << G4endl
<< "Use G4OpticalParameters::SetBoundaryInvokeSD(G4bool) instead.";
PrintWarning(ed);
}
void G4OpticalPhysics::SetAbsorptionVerbosity(G4int val) {
G4OpticalParameters::Instance()->SetAbsorptionVerboseLevel(val);
G4ExceptionDescription ed;
ed << "Method G4OpticalPhysics::SetAbsorptionVerbosity is deprecated." << G4endl
<< "Use G4OpticalParameters::SetAbsorptionVerboseLevel(G4int) instead.";
PrintWarning(ed);
}
void G4OpticalPhysics::SetRayleighVerbosity(G4int val) {
G4OpticalParameters::Instance()->SetRayleighVerboseLevel(val);
G4ExceptionDescription ed;
ed << "Method G4OpticalPhysics::SetRayleighVerbosity is deprecated." << G4endl
<< "Use G4OpticalParameters::SetRayleighVerboseLevel(G4int) instead.";
PrintWarning(ed);
}
void G4OpticalPhysics::SetMieVerbosity(G4int val) {
G4OpticalParameters::Instance()->SetMieVerboseLevel(val);
G4ExceptionDescription ed;
ed << "Method G4OpticalPhysics::SetMieVerbosity is deprecated." << G4endl
<< "Use G4OpticalParameters::SetMieVerboseLevel(G4int) instead.";
PrintWarning(ed);
}
void G4OpticalPhysics::PrintWarning(G4ExceptionDescription& ed) const {
G4Exception("G4OpticalPhysics", "Optical0021", JustWarning, ed);
}