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 AddStepMax();
00068 }
00069
00070
00071
00072 #include "G4ComptonScattering.hh"
00073 #include "G4GammaConversion.hh"
00074 #include "G4PhotoElectricEffect.hh"
00075
00076 #include "G4MultipleScattering.hh"
00077
00078 #include "G4eIonisation.hh"
00079 #include "G4eBremsstrahlung.hh"
00080 #include "G4eplusAnnihilation.hh"
00081
00082 #include "G4MuIonisation.hh"
00083 #include "G4MuBremsstrahlung.hh"
00084 #include "G4MuPairProduction.hh"
00085
00086 #include "G4hIonisation.hh"
00087
00088
00089
00090 void PhysicsList::ConstructEM()
00091 {
00092 theParticleIterator->reset();
00093 while( (*theParticleIterator)() ){
00094 G4ParticleDefinition* particle = theParticleIterator->value();
00095 G4ProcessManager* pmanager = particle->GetProcessManager();
00096 G4String particleName = particle->GetParticleName();
00097
00098 if (particleName == "gamma") {
00099
00100 pmanager->AddDiscreteProcess(new G4PhotoElectricEffect);
00101 pmanager->AddDiscreteProcess(new G4ComptonScattering);
00102 pmanager->AddDiscreteProcess(new G4GammaConversion);
00103
00104 } else if (particleName == "e-") {
00105
00106 pmanager->AddProcess(new G4MultipleScattering, -1, 1,1);
00107 pmanager->AddProcess(new G4eIonisation, -1, 2,2);
00108 pmanager->AddProcess(new G4eBremsstrahlung, -1, 3,3);
00109
00110 } else if (particleName == "e+") {
00111
00112 pmanager->AddProcess(new G4MultipleScattering, -1, 1,1);
00113 pmanager->AddProcess(new G4eIonisation, -1, 2,2);
00114 pmanager->AddProcess(new G4eBremsstrahlung, -1, 3,3);
00115 pmanager->AddProcess(new G4eplusAnnihilation, 0,-1,4);
00116
00117 } else if( particleName == "mu+" ||
00118 particleName == "mu-" ) {
00119
00120 pmanager->AddProcess(new G4MultipleScattering, -1, 1,1);
00121 pmanager->AddProcess(new G4MuIonisation, -1, 2,2);
00122 pmanager->AddProcess(new G4MuBremsstrahlung, -1, 3,3);
00123 pmanager->AddProcess(new G4MuPairProduction, -1, 4,4);
00124
00125 } else if (particle->GetPDGCharge() != 0.0) {
00126 pmanager->AddProcess(new G4MultipleScattering, -1, 1,1);
00127 pmanager->AddProcess(new G4hIonisation, -1, 2,2);
00128 }
00129 }
00130 }
00131
00132
00133
00134 #include "G4Decay.hh"
00135
00136 void PhysicsList::ConstructDecay()
00137 {
00138
00139 G4Decay* theDecayProcess = new G4Decay();
00140 theParticleIterator->reset();
00141 while( (*theParticleIterator)() ){
00142 G4ParticleDefinition* particle = theParticleIterator->value();
00143 G4ProcessManager* pmanager = particle->GetProcessManager();
00144 if (theDecayProcess->IsApplicable(*particle)) {
00145 pmanager ->AddProcess(theDecayProcess);
00146
00147 pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep);
00148 pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest);
00149 }
00150 }
00151
00152 }
00153
00154 #include "G4StepLimiter.hh"
00155
00156 void PhysicsList::AddStepMax()
00157 {
00158
00159 G4StepLimiter* stepMaxProcess = new G4StepLimiter();
00160
00161 theParticleIterator->reset();
00162 while ((*theParticleIterator)()){
00163 G4ParticleDefinition* particle = theParticleIterator->value();
00164 G4ProcessManager* pmanager = particle->GetProcessManager();
00165
00166 if (particle->GetPDGCharge() != 0.0)
00167 {
00168 pmanager ->AddDiscreteProcess(stepMaxProcess);
00169 }
00170 }
00171 }
00172
00173
00174
00175 void PhysicsList::SetCuts()
00176 {
00177
00178
00179
00180 SetCutsWithDefault();
00181
00182 if (verboseLevel>0) DumpCutValuesTable();
00183 }
00184
00185
00186