Geant4 Cross Reference |
1 // 1 2 // ******************************************* 3 // * License and Disclaimer 4 // * 5 // * The Geant4 software is copyright of th 6 // * the Geant4 Collaboration. It is provided 7 // * conditions of the Geant4 Software License 8 // * LICENSE and available at http://cern.ch/ 9 // * include a list of copyright holders. 10 // * 11 // * Neither the authors of this software syst 12 // * institutes,nor the agencies providing fin 13 // * work make any representation or warran 14 // * regarding this software system or assum 15 // * use. Please see the license in the file 16 // * for the full disclaimer and the limitatio 17 // * 18 // * This code implementation is the result 19 // * technical work of the GEANT4 collaboratio 20 // * By using, copying, modifying or distri 21 // * any work based on the software) you ag 22 // * use in resulting scientific publicati 23 // * acceptance of all terms of the Geant4 Sof 24 // ******************************************* 25 // 26 // ClassName: G4EmStandardPhysics_SpacePhysics 27 // 28 // Authors: P.Dondero (paolo.dondero@cern.ch) 29 // 30 //....oooOO0OOooo........oooOO0OOooo........oo 31 //....oooOO0OOooo........oooOO0OOooo........oo 32 33 34 #include "G4EmStandardPhysics_SpacePhysics.hh" 35 36 #include "G4SystemOfUnits.hh" 37 #include "G4ParticleDefinition.hh" 38 #include "G4LossTableManager.hh" 39 #include "G4EmParameters.hh" 40 #include "G4EmBuilder.hh" 41 42 #include "G4ComptonScattering.hh" 43 #include "G4GammaConversion.hh" 44 #include "G4PhotoElectricEffect.hh" 45 #include "G4RayleighScattering.hh" 46 #include "G4PEEffectFluoModel.hh" 47 #include "G4KleinNishinaModel.hh" 48 #include "G4BetheHeitler5DModel.hh" 49 #include "G4LivermorePhotoElectricModel.hh" 50 #include "G4LivermorePolarizedRayleighModel.hh 51 #include "G4PhotoElectricAngularGeneratorPolar 52 #include "G4LowEPComptonModel.hh" 53 #include "G4LowEPPolarizedComptonModel.hh" 54 55 #include "G4eMultipleScattering.hh" 56 #include "G4hMultipleScattering.hh" 57 #include "G4MscStepLimitType.hh" 58 #include "G4UrbanMscModel.hh" 59 #include "G4GoudsmitSaundersonMscModel.hh" 60 #include "G4DummyModel.hh" 61 #include "G4WentzelVIModel.hh" 62 #include "G4CoulombScattering.hh" 63 #include "G4eCoulombScatteringModel.hh" 64 65 #include "G4eIonisation.hh" 66 #include "G4eBremsstrahlung.hh" 67 #include "G4Generator2BS.hh" 68 #include "G4Generator2BN.hh" 69 #include "G4SeltzerBergerModel.hh" 70 #include "G4ePairProduction.hh" 71 #include "G4LivermoreIonisationModel.hh" 72 #include "G4PenelopeIonisationModel.hh" 73 #include "G4UniversalFluctuation.hh" 74 #include "G4UrbanFluctuation.hh" 75 76 #include "G4eplusAnnihilation.hh" 77 #include "G4hIonisation.hh" 78 #include "G4ionIonisation.hh" 79 #include "G4IonParametrisedLossModel.hh" 80 #include "G4NuclearStopping.hh" 81 #include "G4Gamma.hh" 82 #include "G4Electron.hh" 83 #include "G4Positron.hh" 84 #include "G4GenericIon.hh" 85 #include "G4PhysicsListHelper.hh" 86 #include "G4BuilderType.hh" 87 #include "G4EmModelActivator.hh" 88 #include "G4GammaGeneralProcess.hh" 89 90 // factory 91 #include "G4PhysicsConstructorFactory.hh" 92 93 //....oooOO0OOooo........oooOO0OOooo........oo 94 95 G4EmStandardPhysics_SpacePhysics::G4EmStandard 96 : G4VPhysicsConstructor("G4EmStandard_SpaceP 97 { 98 G4cout << "---> Using G4EmStandard_SpacePhys 99 G4EmParameters* param = G4EmParameters::Inst 100 param->SetDefaults(); 101 param->SetVerbose(ver); 102 param->SetMinEnergy(100*CLHEP::eV); 103 param->SetLowestElectronEnergy(50*CLHEP::eV) 104 param->SetNumberOfBinsPerDecade(20); 105 param->ActivateAngularGeneratorForIonisation 106 param->SetStepFunction(0.2, 10*CLHEP::um); 107 param->SetStepFunctionMuHad(0.05, 0.01*CLHEP 108 param->SetStepFunctionLightIons(0.1, 20*CLHE 109 param->SetStepFunctionIons(0.1, 1*CLHEP::um) 110 param->SetUseMottCorrection(true); // use Mo 111 param->SetMscStepLimitType(fUseSafetyPlus); 112 param->SetMscSkin(3); // error- 113 param->SetMscRangeFactor(0.08); // error- 114 param->SetMuHadLateralDisplacement(true); 115 param->SetFluo(true); 116 param->SetUseICRU90Data(true); 117 param->SetMaxNIELEnergy(1*CLHEP::MeV); 118 SetPhysicsType(bElectromagnetic); 119 } 120 121 //....oooOO0OOooo........oooOO0OOooo........oo 122 123 void G4EmStandardPhysics_SpacePhysics::Constru 124 { 125 // minimal set of particles for EM physics 126 G4EmBuilder::ConstructMinimalEmSet(); 127 } 128 129 //....oooOO0OOooo........oooOO0OOooo........oo 130 131 void G4EmStandardPhysics_SpacePhysics::Constru 132 { 133 if(fVerbose > 1) 134 { 135 G4cout << "### " << GetPhysicsName() << " 136 } 137 G4EmBuilder::PrepareEMPhysics(); 138 139 G4PhysicsListHelper* ph = G4PhysicsListHelpe 140 G4EmParameters* param = G4EmParameters::Inst 141 142 // processes used by several particles 143 G4hMultipleScattering* hmsc = new G4hMultipl 144 145 // nuclear stopping is enabled if the energy 146 G4double nielEnergyLimit = param->MaxNIELEne 147 G4NuclearStopping* pnuc = nullptr; 148 if(nielEnergyLimit > 0.0) 149 { 150 pnuc = new G4NuclearStopping(); 151 pnuc->SetMaxKinEnergy(nielEnergyLimit); 152 } 153 154 // high energy limit for e+- scattering mode 155 G4double highEnergyLimit = param->MscEnergyL 156 157 // Add gamma EM Processes 158 G4ParticleDefinition* particle = G4Gamma::Ga 159 G4bool polar = param->EnablePolarisation(); 160 161 // Photoelectric 162 G4PhotoElectricEffect* pe = new G4PhotoElect 163 G4VEmModel* peModel = new G4LivermorePhotoEl 164 pe->SetEmModel(peModel); 165 if(polar) 166 { 167 peModel->SetAngularDistribution(new G4Phot 168 } 169 170 // Compton scattering 171 G4ComptonScattering* cs = new G4ComptonScatt 172 cs->SetEmModel(new G4KleinNishinaModel()); 173 G4VEmModel* cModel = nullptr; 174 if(polar) 175 { 176 cModel = new G4LowEPPolarizedComptonModel( 177 } 178 else 179 { 180 cModel = new G4LowEPComptonModel(); 181 } 182 cModel->SetHighEnergyLimit(20*CLHEP::MeV); 183 cs->AddEmModel(0, cModel); 184 185 // Gamma conversion 186 G4GammaConversion* gc = new G4GammaConversio 187 G4VEmModel* conv = new G4BetheHeitler5DModel 188 gc->SetEmModel(conv); 189 190 // default Rayleigh scattering is Livermore 191 G4RayleighScattering* rl = new G4RayleighSca 192 if(polar) 193 { 194 rl->SetEmModel(new G4LivermorePolarizedRay 195 } 196 197 if(param->GeneralProcessActive()) 198 { 199 G4GammaGeneralProcess* sp = new G4GammaGen 200 sp->AddEmProcess(pe); 201 sp->AddEmProcess(cs); 202 sp->AddEmProcess(gc); 203 sp->AddEmProcess(rl); 204 G4LossTableManager::Instance()->SetGammaGe 205 ph->RegisterProcess(sp, particle); 206 } 207 else 208 { 209 ph->RegisterProcess(pe, particle); 210 ph->RegisterProcess(cs, particle); 211 ph->RegisterProcess(gc, particle); 212 ph->RegisterProcess(rl, particle); 213 } 214 215 // e- 216 particle = G4Electron::Electron(); 217 218 // multiple scattering 219 G4eMultipleScattering* msc = new G4eMultiple 220 // e-/e+ msc gs with Mott-correction 221 // (Mott-correction is set through G4EmParam 222 G4GoudsmitSaundersonMscModel* msc1 = new G4G 223 G4WentzelVIModel* msc2 = new G4WentzelVIMode 224 msc1->SetHighEnergyLimit(highEnergyLimit); 225 msc2->SetLowEnergyLimit(highEnergyLimit); 226 msc->SetEmModel(msc1); 227 msc->SetEmModel(msc2); 228 229 auto *ssm = new G4eCoulombScatteringModel(); 230 G4CoulombScattering* ss = new G4CoulombScatt 231 ss->SetEmModel(ssm); 232 ss->SetMinKinEnergy(highEnergyLimit); 233 ssm->SetLowEnergyLimit(highEnergyLimit); 234 ssm->SetActivationLowEnergyLimit(highEnergyL 235 236 // ionisation 237 G4eIonisation* eioni = new G4eIonisation(); 238 G4VEmModel* theIoniLiv = new G4LivermoreIoni 239 eioni->SetFluctModel(new G4UrbanFluctuation( 240 theIoniLiv->SetHighEnergyLimit(0.1*CLHEP::Me 241 eioni->AddEmModel(0, theIoniLiv, new G4Unive 242 243 // bremsstrahlung 244 G4eBremsstrahlung* brem = new G4eBremsstrahl 245 G4SeltzerBergerModel* br1 = new G4SeltzerBer 246 G4eBremsstrahlungRelModel* br2 = new G4eBrem 247 br1->SetAngularDistribution(new G4Generator2 248 br2->SetAngularDistribution(new G4Generator2 249 brem->SetEmModel(br1); 250 brem->SetEmModel(br2); 251 br1->SetHighEnergyLimit(CLHEP::GeV); 252 253 G4ePairProduction* ee = new G4ePairProductio 254 255 // register processes 256 ph->RegisterProcess(msc, particle); 257 ph->RegisterProcess(eioni, particle); 258 ph->RegisterProcess(brem, particle); 259 ph->RegisterProcess(ee, particle); 260 ph->RegisterProcess(ss, particle); 261 262 // e+ 263 particle = G4Positron::Positron(); 264 265 // multiple scattering 266 msc = new G4eMultipleScattering(); 267 // e-/e+ msc gs with Mott-correction 268 // (Mott-correction is set through G4EmParam 269 msc1 = new G4GoudsmitSaundersonMscModel(); 270 msc2 = new G4WentzelVIModel(); 271 msc1->SetHighEnergyLimit(highEnergyLimit); 272 msc2->SetLowEnergyLimit(highEnergyLimit); 273 msc->SetEmModel(msc1); 274 msc->SetEmModel(msc2); 275 276 ssm = new G4eCoulombScatteringModel(); 277 ss = new G4CoulombScattering(); 278 ss->SetEmModel(ssm); 279 ss->SetMinKinEnergy(highEnergyLimit); 280 ssm->SetLowEnergyLimit(highEnergyLimit); 281 ssm->SetActivationLowEnergyLimit(highEnergyL 282 283 // ionisation 284 eioni = new G4eIonisation(); 285 eioni->SetFluctModel(new G4UrbanFluctuation( 286 G4VEmModel* pen = new G4PenelopeIonisationMo 287 pen->SetHighEnergyLimit(0.1*CLHEP::MeV); 288 eioni->AddEmModel(0, pen, new G4UniversalFlu 289 290 // bremsstrahlung 291 brem = new G4eBremsstrahlung(); 292 br1 = new G4SeltzerBergerModel(); 293 br2 = new G4eBremsstrahlungRelModel(); 294 br1->SetAngularDistribution(new G4Generator2 295 br2->SetAngularDistribution(new G4Generator2 296 brem->SetEmModel(br1); 297 brem->SetEmModel(br2); 298 br1->SetHighEnergyLimit(CLHEP::GeV); 299 300 // register processes 301 ph->RegisterProcess(msc, particle); 302 ph->RegisterProcess(eioni, particle); 303 ph->RegisterProcess(brem, particle); 304 ph->RegisterProcess(ee, particle); 305 ph->RegisterProcess(new G4eplusAnnihilation( 306 ph->RegisterProcess(ss, particle); 307 308 // generic ion 309 particle = G4GenericIon::GenericIon(); 310 G4ionIonisation* ionIoni = new G4ionIonisati 311 ionIoni->SetEmModel(new G4IonParametrisedLos 312 ph->RegisterProcess(hmsc, particle); 313 ph->RegisterProcess(ionIoni, particle); 314 if(nullptr != pnuc) 315 { 316 ph->RegisterProcess(pnuc, particle); 317 } 318 319 // muons, hadrons, ions 320 G4EmBuilder::ConstructCharged(hmsc, pnuc); 321 322 // extra configuration 323 G4EmModelActivator mact(GetPhysicsName()); 324 } 325 326 //....oooOO0OOooo........oooOO0OOooo........oo 327