File indexing completed on 2025-02-23 09:22:40
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033 #include "ElectromagneticPhysics.hh"
0034
0035 #include "G4BuilderType.hh"
0036 #include "G4ComptonScattering.hh"
0037 #include "G4GammaConversion.hh"
0038 #include "G4IonParametrisedLossModel.hh"
0039 #include "G4LossTableManager.hh"
0040 #include "G4MuBremsstrahlung.hh"
0041 #include "G4MuIonisation.hh"
0042 #include "G4MuMultipleScattering.hh"
0043 #include "G4MuPairProduction.hh"
0044 #include "G4NuclearStopping.hh"
0045 #include "G4ParticleDefinition.hh"
0046 #include "G4PhotoElectricEffect.hh"
0047 #include "G4PhysicsListHelper.hh"
0048 #include "G4ProcessManager.hh"
0049 #include "G4RayleighScattering.hh"
0050 #include "G4SystemOfUnits.hh"
0051 #include "G4UAtomicDeexcitation.hh"
0052 #include "G4eBremsstrahlung.hh"
0053 #include "G4eIonisation.hh"
0054 #include "G4eMultipleScattering.hh"
0055 #include "G4eplusAnnihilation.hh"
0056 #include "G4hBremsstrahlung.hh"
0057 #include "G4hIonisation.hh"
0058 #include "G4hMultipleScattering.hh"
0059 #include "G4hPairProduction.hh"
0060 #include "G4ionIonisation.hh"
0061
0062
0063
0064 ElectromagneticPhysics::ElectromagneticPhysics(const G4String& name) : G4VPhysicsConstructor(name)
0065 {
0066 SetPhysicsType(bElectromagnetic);
0067
0068 G4EmParameters* param = G4EmParameters::Instance();
0069 param->SetDefaults();
0070 param->SetStepFunction(0.2, 100 * um);
0071 param->SetStepFunctionMuHad(0.1, 10 * um);
0072 param->SetStepFunctionLightIons(0.1, 10 * um);
0073 param->SetStepFunctionIons(0.1, 1 * um);
0074 param->SetDeexcitationIgnoreCut(true);
0075 }
0076
0077
0078
0079 void ElectromagneticPhysics::ConstructProcess()
0080 {
0081 G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
0082
0083
0084
0085 auto particleIterator = GetParticleIterator();
0086 particleIterator->reset();
0087 while ((*particleIterator)()) {
0088 G4ParticleDefinition* particle = particleIterator->value();
0089 G4String particleName = particle->GetParticleName();
0090
0091 if (particleName == "gamma") {
0092 ph->RegisterProcess(new G4RayleighScattering, particle);
0093 ph->RegisterProcess(new G4PhotoElectricEffect, particle);
0094 ph->RegisterProcess(new G4ComptonScattering, particle);
0095 ph->RegisterProcess(new G4GammaConversion, particle);
0096 }
0097 else if (particleName == "e-") {
0098 ph->RegisterProcess(new G4eMultipleScattering(), particle);
0099 ph->RegisterProcess(new G4eIonisation, particle);
0100 ph->RegisterProcess(new G4eBremsstrahlung(), particle);
0101 }
0102 else if (particleName == "e+") {
0103 ph->RegisterProcess(new G4eMultipleScattering(), particle);
0104 ph->RegisterProcess(new G4eIonisation, particle);
0105 ph->RegisterProcess(new G4eBremsstrahlung(), particle);
0106 ph->RegisterProcess(new G4eplusAnnihilation(), particle);
0107 }
0108 else if (particleName == "mu+" || particleName == "mu-") {
0109 ph->RegisterProcess(new G4MuMultipleScattering(), particle);
0110 ph->RegisterProcess(new G4MuIonisation, particle);
0111 ph->RegisterProcess(new G4MuBremsstrahlung(), particle);
0112 ph->RegisterProcess(new G4MuPairProduction(), particle);
0113 }
0114 else if (particleName == "proton" || particleName == "pi-" || particleName == "pi+") {
0115 ph->RegisterProcess(new G4hMultipleScattering(), particle);
0116 ph->RegisterProcess(new G4hIonisation, particle);
0117 }
0118 else if (particleName == "alpha" || particleName == "He3") {
0119 ph->RegisterProcess(new G4hMultipleScattering(), particle);
0120 ph->RegisterProcess(new G4ionIonisation, particle);
0121 ph->RegisterProcess(new G4NuclearStopping(), particle);
0122 }
0123 else if (particleName == "GenericIon") {
0124 ph->RegisterProcess(new G4hMultipleScattering(), particle);
0125 G4ionIonisation* ionIoni = new G4ionIonisation();
0126 ionIoni->SetEmModel(new G4IonParametrisedLossModel());
0127 ph->RegisterProcess(ionIoni, particle);
0128 ph->RegisterProcess(new G4NuclearStopping(), particle);
0129 }
0130 else if ((!particle->IsShortLived()) && (particle->GetPDGCharge() != 0.0)
0131 && (particle->GetParticleName() != "chargedgeantino"))
0132 {
0133
0134 ph->RegisterProcess(new G4hMultipleScattering(), particle);
0135 ph->RegisterProcess(new G4hIonisation(), particle);
0136 }
0137 }
0138
0139
0140
0141 G4VAtomDeexcitation* de = new G4UAtomicDeexcitation();
0142 G4LossTableManager::Instance()->SetAtomDeexcitation(de);
0143 }
0144
0145