File indexing completed on 2025-01-18 09:17:01
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 #include "PhysicsList.hh"
0030 #include "G4SystemOfUnits.hh"
0031
0032
0033
0034 PhysicsList::PhysicsList(): G4VUserPhysicsList()
0035 {
0036 defaultCutValue = 1*micrometer;
0037 fCutForGamma = defaultCutValue;
0038 fCutForElectron = defaultCutValue;
0039 fCutForPositron = defaultCutValue;
0040 fCutForProton = defaultCutValue;
0041
0042 SetVerboseLevel(1);
0043 }
0044
0045
0046
0047 PhysicsList::~PhysicsList()
0048 {}
0049
0050
0051
0052 void PhysicsList::ConstructParticle()
0053 {
0054 ConstructBosons();
0055 ConstructLeptons();
0056 ConstructBarions();
0057 }
0058
0059
0060
0061 void PhysicsList::ConstructBosons()
0062 {
0063
0064 G4Gamma::GammaDefinition();
0065
0066
0067 G4OpticalPhoton::OpticalPhotonDefinition();
0068 }
0069
0070
0071 void PhysicsList::ConstructLeptons()
0072 {
0073
0074 G4Electron::ElectronDefinition();
0075 G4Positron::PositronDefinition();
0076 }
0077
0078
0079
0080 void PhysicsList::ConstructBarions()
0081 {
0082
0083 G4Proton::ProtonDefinition();
0084 G4AntiProton::AntiProtonDefinition();
0085 G4GenericIon::GenericIonDefinition();
0086 }
0087
0088
0089
0090 void PhysicsList::ConstructProcess()
0091 {
0092 AddTransportation();
0093 ConstructEM();
0094 ConstructGeneral();
0095 }
0096
0097
0098
0099 #include "G4PhotoElectricEffect.hh"
0100 #include "G4ComptonScattering.hh"
0101 #include "G4GammaConversion.hh"
0102
0103 #include "G4eMultipleScattering.hh"
0104 #include "G4eIonisation.hh"
0105 #include "G4eBremsstrahlung.hh"
0106 #include "G4eplusAnnihilation.hh"
0107
0108 #include "G4MuMultipleScattering.hh"
0109 #include "G4WentzelVIModel.hh"
0110
0111 #include "G4MuIonisation.hh"
0112 #include "G4MuBremsstrahlung.hh"
0113 #include "G4MuPairProduction.hh"
0114 #include "G4CoulombScattering.hh"
0115
0116 #include "G4hMultipleScattering.hh"
0117 #include "G4ionIonisation.hh"
0118 #include "G4hIonisation.hh"
0119 #include "G4hBremsstrahlung.hh"
0120 #include "G4hPairProduction.hh"
0121
0122 #include "G4StepLimiter.hh"
0123
0124
0125
0126 void PhysicsList::ConstructEM()
0127 {
0128
0129 G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
0130
0131
0132
0133
0134
0135
0136 auto particleIterator=GetParticleIterator();
0137 particleIterator->reset();
0138
0139 while( (*particleIterator)() ){
0140
0141 G4ParticleDefinition* particle = particleIterator->value();
0142
0143 G4String particleName = particle->GetParticleName();
0144
0145 if (particleName == "gamma") {
0146
0147 ph->RegisterProcess(new G4PhotoElectricEffect(), particle);
0148 ph->RegisterProcess(new G4ComptonScattering(), particle);
0149 ph->RegisterProcess(new G4GammaConversion(), particle);
0150
0151 } else if (particleName == "e-") {
0152
0153 ph->RegisterProcess(new G4eMultipleScattering(), particle);
0154 ph->RegisterProcess(new G4eIonisation(), particle);
0155 ph->RegisterProcess(new G4eBremsstrahlung(), particle);
0156
0157 } else if (particleName == "e+") {
0158
0159 ph->RegisterProcess(new G4eMultipleScattering(), particle);
0160 ph->RegisterProcess(new G4eIonisation(), particle);
0161 ph->RegisterProcess(new G4eBremsstrahlung(), particle);
0162 ph->RegisterProcess(new G4eplusAnnihilation(), particle);
0163
0164 } else if( particleName == "mu+" ||
0165 particleName == "mu-" ) {
0166
0167 G4MuMultipleScattering* msc = new G4MuMultipleScattering();
0168 msc->AddEmModel(0, new G4WentzelVIModel());
0169
0170 ph->RegisterProcess(msc, particle);
0171 ph->RegisterProcess(new G4MuIonisation(), particle);
0172 ph->RegisterProcess(new G4MuBremsstrahlung(), particle);
0173 ph->RegisterProcess(new G4MuPairProduction(), particle);
0174 ph->RegisterProcess(new G4CoulombScattering(), particle);
0175
0176 } else if (particleName == "alpha" ||
0177 particleName == "He3") {
0178
0179 ph->RegisterProcess(new G4hMultipleScattering(), particle);
0180 ph->RegisterProcess(new G4ionIonisation(), particle);
0181
0182 } else if (particleName == "GenericIon") {
0183
0184 ph->RegisterProcess(new G4hMultipleScattering(), particle);
0185 ph->RegisterProcess(new G4ionIonisation(), particle);
0186
0187 } else if (particleName == "proton") {
0188 ph->RegisterProcess(new G4hMultipleScattering(), particle);
0189 ph->RegisterProcess(new G4hIonisation(), particle);
0190 ph->RegisterProcess(new G4hBremsstrahlung(), particle);
0191 ph->RegisterProcess(new G4hPairProduction(), particle);
0192
0193 ph->RegisterProcess(new G4StepLimiter(), particle);
0194
0195 }
0196 }
0197 }
0198
0199
0200
0201 void PhysicsList::ConstructGeneral()
0202 { }
0203
0204
0205
0206 void PhysicsList::SetCuts()
0207 {
0208 if (verboseLevel >0){
0209 G4cout << "PhysicsList::SetCuts:";
0210 G4cout << "CutLength : " << G4BestUnit(defaultCutValue,"Length") << G4endl;
0211 }
0212
0213 SetCutValue(fCutForGamma, "gamma");
0214 SetCutValue(fCutForElectron, "e-");
0215 SetCutValue(fCutForPositron, "e+");
0216 SetCutValue(fCutForProton, "proton");
0217 SetCutValue(fCutForProton, "anti_proton");
0218
0219 if (verboseLevel>0) DumpCutValuesTable();
0220 }
0221
0222
0223
0224 void PhysicsList::SetGammaCut(G4double val)
0225 {
0226 fCutForGamma = val;
0227 }
0228
0229
0230
0231 void PhysicsList::SetElectronCut(G4double val)
0232 {
0233 fCutForElectron = val;
0234 }
0235
0236
0237
0238 void PhysicsList::SetPositronCut(G4double val)
0239 {
0240 fCutForPositron = val;
0241 }
0242
0243
0244
0245 void PhysicsList::SetProtonCut(G4double val)
0246 {
0247 fCutForProton = val;
0248 }