00001
00002
00003
00004
00005
00006
00007
00008 #include "globals.hh"
00009 #include "PhysicsList.hh"
00010
00011 #include "G4ProcessManager.hh"
00012 #include "G4ParticleTypes.hh"
00013
00014
00015
00016 PhysicsList::PhysicsList(): G4VUserPhysicsList()
00017 {
00018 defaultCutValue = 1.0*mm;
00019 SetVerboseLevel(1);
00020 }
00021
00022
00023
00024 PhysicsList::~PhysicsList()
00025 {}
00026
00027
00028
00029 void PhysicsList::ConstructParticle()
00030 {
00031
00032 G4Geantino::GeantinoDefinition();
00033
00034
00035 G4Gamma::GammaDefinition();
00036
00037
00038 G4Electron::ElectronDefinition();
00039 G4Positron::PositronDefinition();
00040
00041
00042 G4MuonPlus::MuonPlusDefinition();
00043 G4MuonMinus::MuonMinusDefinition();
00044
00045 G4NeutrinoE::NeutrinoEDefinition();
00046 G4AntiNeutrinoE::AntiNeutrinoEDefinition();
00047 G4NeutrinoMu::NeutrinoMuDefinition();
00048 G4AntiNeutrinoMu::AntiNeutrinoMuDefinition();
00049
00050
00051 G4Proton::ProtonDefinition();
00052
00053
00054 G4Neutron::NeutronDefinition();
00055 }
00056
00057
00058
00059 void PhysicsList::ConstructProcess()
00060 {
00061 AddTransportation();
00062 ConstructEM();
00063 ConstructDecay();
00064 }
00065
00066
00067
00068 #include "G4ComptonScattering.hh"
00069 #include "G4GammaConversion.hh"
00070 #include "G4PhotoElectricEffect.hh"
00071
00072 #include "G4MultipleScattering.hh"
00073
00074 #include "G4eIonisation.hh"
00075 #include "G4eBremsstrahlung.hh"
00076 #include "G4eplusAnnihilation.hh"
00077
00078 #include "G4MuIonisation.hh"
00079 #include "G4MuBremsstrahlung.hh"
00080 #include "G4MuPairProduction.hh"
00081
00082 #include "G4hIonisation.hh"
00083
00084
00085
00086 void PhysicsList::ConstructEM()
00087 {
00088 theParticleIterator->reset();
00089 while( (*theParticleIterator)() ){
00090 G4ParticleDefinition* particle = theParticleIterator->value();
00091 G4ProcessManager* pmanager = particle->GetProcessManager();
00092 G4String particleName = particle->GetParticleName();
00093
00094 if (particleName == "gamma") {
00095
00096 pmanager->AddDiscreteProcess(new G4PhotoElectricEffect);
00097 pmanager->AddDiscreteProcess(new G4ComptonScattering);
00098 pmanager->AddDiscreteProcess(new G4GammaConversion);
00099
00100 } else if (particleName == "e-") {
00101
00102 pmanager->AddProcess(new G4MultipleScattering, -1, 1,1);
00103 pmanager->AddProcess(new G4eIonisation, -1, 2,2);
00104 pmanager->AddProcess(new G4eBremsstrahlung, -1, 3,3);
00105
00106 } else if (particleName == "e+") {
00107
00108 pmanager->AddProcess(new G4MultipleScattering, -1, 1,1);
00109 pmanager->AddProcess(new G4eIonisation, -1, 2,2);
00110 pmanager->AddProcess(new G4eBremsstrahlung, -1, 3,3);
00111 pmanager->AddProcess(new G4eplusAnnihilation, 0,-1,4);
00112
00113 } else if( particleName == "mu+" ||
00114 particleName == "mu-" ) {
00115
00116 pmanager->AddProcess(new G4MultipleScattering, -1, 1,1);
00117 pmanager->AddProcess(new G4MuIonisation, -1, 2,2);
00118 pmanager->AddProcess(new G4MuBremsstrahlung, -1, 3,3);
00119 pmanager->AddProcess(new G4MuPairProduction, -1, 4,4);
00120
00121 } else if (particle->GetPDGCharge() != 0.0) {
00122 pmanager->AddProcess(new G4MultipleScattering, -1, 1,1);
00123 pmanager->AddProcess(new G4hIonisation, -1, 2,2);
00124 }
00125 }
00126 }
00127
00128
00129
00130 #include "G4Decay.hh"
00131
00132 void PhysicsList::ConstructDecay()
00133 {
00134
00135 G4Decay* theDecayProcess = new G4Decay();
00136 theParticleIterator->reset();
00137 while( (*theParticleIterator)() ){
00138 G4ParticleDefinition* particle = theParticleIterator->value();
00139 G4ProcessManager* pmanager = particle->GetProcessManager();
00140 if (theDecayProcess->IsApplicable(*particle)) {
00141 pmanager ->AddProcess(theDecayProcess);
00142
00143 pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep);
00144 pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest);
00145 }
00146 }
00147 }
00148
00149
00150
00151 void PhysicsList::SetCuts()
00152 {
00153
00154
00155
00156 SetCutsWithDefault();
00157
00158 if (verboseLevel>0) DumpCutValuesTable();
00159 }
00160
00161
00162