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 #include "G4MesonConstructor.hh"
00030 #include "G4BaryonConstructor.hh"
00031 #include "G4ShortLivedConstructor.hh"
00032 #include "G4BosonConstructor.hh"
00033 #include "G4LeptonConstructor.hh"
00034 #include "G4IonConstructor.hh"
00035
00036 void PhysicsList::ConstructParticle()
00037 {
00038
00039 G4Geantino::GeantinoDefinition();
00040
00041
00042 G4Gamma::GammaDefinition();
00043
00044
00045 G4Electron::ElectronDefinition();
00046 G4Positron::PositronDefinition();
00047
00048
00049 G4MuonPlus::MuonPlusDefinition();
00050 G4MuonMinus::MuonMinusDefinition();
00051
00052 G4NeutrinoE::NeutrinoEDefinition();
00053 G4AntiNeutrinoE::AntiNeutrinoEDefinition();
00054 G4NeutrinoMu::NeutrinoMuDefinition();
00055 G4AntiNeutrinoMu::AntiNeutrinoMuDefinition();
00056
00057 G4Proton::ProtonDefinition();
00058 G4Neutron::NeutronDefinition();
00059
00060 G4LeptonConstructor pLeptonConstructor;
00061 pLeptonConstructor.ConstructParticle();
00062
00063 G4MesonConstructor pMesonConstructor;
00064 pMesonConstructor.ConstructParticle();
00065
00066 G4BaryonConstructor pBaryonConstructor;
00067 pBaryonConstructor.ConstructParticle();
00068
00069 G4ShortLivedConstructor pShortLivedConstructor;
00070 pShortLivedConstructor.ConstructParticle();
00071
00072 G4BosonConstructor pBosonConstructor;
00073 pBosonConstructor.ConstructParticle();
00074
00075 G4IonConstructor pConstructor;
00076 pConstructor.ConstructParticle();
00077
00078 }
00079
00080
00081
00082 void PhysicsList::ConstructProcess()
00083 {
00084 AddTransportation();
00085 ConstructEM();
00086 ConstructDecay();
00087 ConstructHad();
00088
00089
00090
00091 AddStepMax();
00092 }
00093
00094
00095
00096 #include "G4ComptonScattering.hh"
00097 #include "G4GammaConversion.hh"
00098 #include "G4PhotoElectricEffect.hh"
00099
00100 #include "G4MultipleScattering.hh"
00101
00102 #include "G4eIonisation.hh"
00103 #include "G4eBremsstrahlung.hh"
00104 #include "G4eplusAnnihilation.hh"
00105
00106 #include "G4MuIonisation.hh"
00107 #include "G4MuBremsstrahlung.hh"
00108 #include "G4MuPairProduction.hh"
00109
00110 #include "G4hIonisation.hh"
00111
00112
00113
00114 void PhysicsList::ConstructEM()
00115 {
00116 theParticleIterator->reset();
00117 while( (*theParticleIterator)() ){
00118 G4ParticleDefinition* particle = theParticleIterator->value();
00119 G4ProcessManager* pmanager = particle->GetProcessManager();
00120 G4String particleName = particle->GetParticleName();
00121
00122 if (particleName == "gamma") {
00123
00124 pmanager->AddDiscreteProcess(new G4PhotoElectricEffect);
00125 pmanager->AddDiscreteProcess(new G4ComptonScattering);
00126 pmanager->AddDiscreteProcess(new G4GammaConversion);
00127
00128 } else if (particleName == "e-") {
00129
00130 pmanager->AddProcess(new G4MultipleScattering, -1, 1,1);
00131 pmanager->AddProcess(new G4eIonisation, -1, 2,2);
00132 pmanager->AddProcess(new G4eBremsstrahlung, -1, 3,3);
00133
00134 } else if (particleName == "e+") {
00135
00136 pmanager->AddProcess(new G4MultipleScattering, -1, 1,1);
00137 pmanager->AddProcess(new G4eIonisation, -1, 2,2);
00138 pmanager->AddProcess(new G4eBremsstrahlung, -1, 3,3);
00139 pmanager->AddProcess(new G4eplusAnnihilation, 0,-1,4);
00140
00141 } else if( particleName == "mu+" ||
00142 particleName == "mu-" ) {
00143
00144 pmanager->AddProcess(new G4MultipleScattering, -1, 1,1);
00145 pmanager->AddProcess(new G4MuIonisation, -1, 2,2);
00146 pmanager->AddProcess(new G4MuBremsstrahlung, -1, 3,3);
00147 pmanager->AddProcess(new G4MuPairProduction, -1, 4,4);
00148
00149 } else if (particle->GetPDGCharge() != 0.0 &&
00150 ! particle->IsShortLived() &&
00151 particle->GetParticleName() != "chargedgeantino" ) {
00152 pmanager->AddProcess(new G4MultipleScattering, -1, 1,1);
00153 pmanager->AddProcess(new G4hIonisation, -1, 2,2);
00154 }
00155 }
00156 }
00157
00158
00159
00160 #include "G4Decay.hh"
00161
00162 void PhysicsList::ConstructDecay()
00163 {
00164
00165 G4Decay* theDecayProcess = new G4Decay();
00166 theParticleIterator->reset();
00167 while( (*theParticleIterator)() ){
00168 G4ParticleDefinition* particle = theParticleIterator->value();
00169 G4ProcessManager* pmanager = particle->GetProcessManager();
00170 if (theDecayProcess->IsApplicable(*particle)) {
00171 pmanager ->AddProcess(theDecayProcess);
00172
00173 pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep);
00174 pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest);
00175 }
00176 }
00177 }
00178
00179
00180
00181 #include "G4HadronElasticProcess.hh"
00182 #include "G4LElastic.hh"
00183 #include "G4ProtonInelasticProcess.hh"
00184 #include "G4NeutronInelasticProcess.hh"
00185 #include "G4BinaryCascade.hh"
00186 #include "G4HadronCaptureProcess.hh"
00187 #include "G4LCapture.hh"
00188 #include "G4HadronFissionProcess.hh"
00189 #include "G4LFission.hh"
00190 #include "G4NucleonNuclearCrossSection.hh"
00191
00192
00193 #include "G4TheoFSGenerator.hh"
00194 #include "G4FTFModel.hh"
00195 #include "G4ExcitedStringDecay.hh"
00196 #include "G4LundStringFragmentation.hh"
00197
00198 void PhysicsList::ConstructHad()
00199 {
00200
00201
00202 G4ParticleDefinition* proton = G4Proton::Proton();
00203 G4ProcessManager* proton_manager = proton->GetProcessManager();
00204
00205
00206
00207 G4HadronElasticProcess* theElasticProcess = new G4HadronElasticProcess();
00208
00209
00210
00211 G4LElastic* theElasticModel = new G4LElastic();
00212 theElasticProcess->RegisterMe(theElasticModel);
00213 proton_manager->AddDiscreteProcess(theElasticProcess);
00214
00215
00216
00217 G4ProtonInelasticProcess* protonInelasticprocess
00218 = new G4ProtonInelasticProcess();
00219
00220
00221
00222 G4BinaryCascade* theModel = new G4BinaryCascade();
00223 protonInelasticprocess->RegisterMe(theModel);
00224
00225
00226
00227 protonInelasticprocess->AddDataSet(new G4NucleonNuclearCrossSection());
00228
00229
00230
00231 proton_manager->AddDiscreteProcess(protonInelasticprocess);
00232
00233
00234
00235 G4ParticleDefinition* neutron = G4Neutron::Neutron();
00236 G4ProcessManager* neutron_manager = neutron->GetProcessManager();
00237
00238
00239
00240 neutron_manager->AddDiscreteProcess(theElasticProcess);
00241
00242
00243
00244 G4NeutronInelasticProcess* neutronInelasticprocess
00245 = new G4NeutronInelasticProcess();
00246
00247
00248
00249 neutronInelasticprocess->RegisterMe(theModel);
00250
00251
00252
00253 neutronInelasticprocess->AddDataSet(new G4NucleonNuclearCrossSection());
00254
00255
00256
00257 neutron_manager->AddDiscreteProcess(neutronInelasticprocess);
00258
00259
00260
00261 G4HadronCaptureProcess * theNeutronCapture = new G4HadronCaptureProcess();
00262 G4LCapture * theNeutronCaptureModel = new G4LCapture();
00263 theNeutronCapture->RegisterMe(theNeutronCaptureModel);
00264 neutron_manager->AddDiscreteProcess(theNeutronCapture);
00265
00266
00267
00268 G4HadronFissionProcess * theNeutronFission = new G4HadronFissionProcess();
00269 G4LFission * theNeutronFissionModel = new G4LFission();
00270 theNeutronFission->RegisterMe(theNeutronFissionModel);
00271 neutron_manager->AddDiscreteProcess(theNeutronFission);
00272
00273
00274
00275
00276
00277
00278
00279
00280
00281
00282
00283
00284
00285
00286
00287
00288
00289
00290
00291
00292
00293
00294 }
00295
00296
00297
00298
00299 #include "G4StepLimiter.hh"
00300
00301 void PhysicsList::AddStepMax()
00302 {
00303
00304 G4StepLimiter* stepMaxProcess = new G4StepLimiter();
00305
00306 theParticleIterator->reset();
00307 while ((*theParticleIterator)()){
00308 G4ParticleDefinition* particle = theParticleIterator->value();
00309 G4ProcessManager* pmanager = particle->GetProcessManager();
00310 if (particle->GetPDGCharge() != 0.0)
00311 {
00312 pmanager ->AddDiscreteProcess(stepMaxProcess);
00313 }
00314 }
00315 }
00316
00317
00318
00319 void PhysicsList::SetCuts()
00320 {
00321
00322
00323
00324 SetCutsWithDefault();
00325
00326 if (verboseLevel>0) DumpCutValuesTable();
00327 }
00328
00329
00330