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