Geant4 Cross Reference |
1 // 2 // ******************************************************************** 3 // * License and Disclaimer * 4 // * * 5 // * The Geant4 software is copyright of the Copyright Holders of * 6 // * the Geant4 Collaboration. It is provided under the terms and * 7 // * conditions of the Geant4 Software License, included in the file * 8 // * LICENSE and available at http://cern.ch/geant4/license . These * 9 // * include a list of copyright holders. * 10 // * * 11 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file LICENSE and URL above * 16 // * for the full disclaimer and the limitation of liability. * 17 // * * 18 // * This code implementation is the result of the scientific and * 19 // * technical work of the GEANT4 collaboration. * 20 // * By using, copying, modifying or distributing the software (or * 21 // * any work based on the software) you agree to acknowledge its * 22 // * use in resulting scientific publications, and indicate your * 23 // * acceptance of all terms of the Geant4 Software license. * 24 // ******************************************************************** 25 // 26 // 27 //--------------------------------------------------------------------------- 28 // 29 // ClassName: G4EmStandardPhysics_option4 30 // 31 // Author: V.Ivanchenko 28.09.2012 from Option3 physics constructor 32 // 33 // Modified: 34 // 35 // 22.09.17 M.Novak: change msc model for e-/e+ below 100 MeV from Urban+ 36 // UseDistanceToBoundary stepping to GS + Mott-correction + error 37 // -free stepping. 38 // 39 //---------------------------------------------------------------------------- 40 // 41 42 #include "G4EmStandardPhysics_option4.hh" 43 44 #include "G4SystemOfUnits.hh" 45 #include "G4ParticleDefinition.hh" 46 #include "G4LossTableManager.hh" 47 #include "G4EmParameters.hh" 48 #include "G4EmBuilder.hh" 49 #include "G4EmStandUtil.hh" 50 51 #include "G4ComptonScattering.hh" 52 #include "G4GammaConversion.hh" 53 #include "G4PhotoElectricEffect.hh" 54 #include "G4RayleighScattering.hh" 55 #include "G4PEEffectFluoModel.hh" 56 #include "G4KleinNishinaModel.hh" 57 #include "G4BetheHeitler5DModel.hh" 58 #include "G4LivermorePhotoElectricModel.hh" 59 #include "G4LivermorePolarizedRayleighModel.hh" 60 #include "G4PhotoElectricAngularGeneratorPolarized.hh" 61 #include "G4LowEPComptonModel.hh" 62 #include "G4LowEPPolarizedComptonModel.hh" 63 64 #include "G4hMultipleScattering.hh" 65 #include "G4MscStepLimitType.hh" 66 #include "G4UrbanMscModel.hh" 67 #include "G4GoudsmitSaundersonMscModel.hh" 68 #include "G4DummyModel.hh" 69 #include "G4WentzelVIModel.hh" 70 #include "G4CoulombScattering.hh" 71 #include "G4eCoulombScatteringModel.hh" 72 73 #include "G4eIonisation.hh" 74 #include "G4eBremsstrahlung.hh" 75 #include "G4Generator2BS.hh" 76 #include "G4Generator2BN.hh" 77 #include "G4SeltzerBergerModel.hh" 78 #include "G4ePairProduction.hh" 79 #include "G4LivermoreIonisationModel.hh" 80 #include "G4PenelopeIonisationModel.hh" 81 82 #include "G4eplusAnnihilation.hh" 83 84 #include "G4hIonisation.hh" 85 #include "G4ionIonisation.hh" 86 #include "G4IonParametrisedLossModel.hh" 87 #include "G4LindhardSorensenIonModel.hh" 88 #include "G4NuclearStopping.hh" 89 #include "G4eplusTo2or3GammaModel.hh" 90 91 #include "G4Gamma.hh" 92 #include "G4Electron.hh" 93 #include "G4Positron.hh" 94 #include "G4GenericIon.hh" 95 96 #include "G4PhysicsListHelper.hh" 97 #include "G4BuilderType.hh" 98 #include "G4EmModelActivator.hh" 99 #include "G4GammaGeneralProcess.hh" 100 101 // factory 102 #include "G4PhysicsConstructorFactory.hh" 103 // 104 G4_DECLARE_PHYSCONSTR_FACTORY(G4EmStandardPhysics_option4); 105 106 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 107 108 G4EmStandardPhysics_option4::G4EmStandardPhysics_option4(G4int ver, 109 const G4String&) 110 : G4VPhysicsConstructor("G4EmStandard_opt4") 111 { 112 SetVerboseLevel(ver); 113 G4EmParameters* param = G4EmParameters::Instance(); 114 param->SetDefaults(); 115 param->SetVerbose(ver); 116 param->SetGeneralProcessActive(true); 117 param->SetMinEnergy(100*CLHEP::eV); 118 param->SetLowestElectronEnergy(100*CLHEP::eV); 119 param->SetNumberOfBinsPerDecade(20); 120 param->ActivateAngularGeneratorForIonisation(true); 121 param->SetStepFunction(0.2, 10*CLHEP::um); 122 param->SetStepFunctionMuHad(0.1, 50*CLHEP::um); 123 param->SetStepFunctionLightIons(0.1, 20*CLHEP::um); 124 param->SetStepFunctionIons(0.1, 1*CLHEP::um); 125 param->SetUseMottCorrection(true); // use Mott-correction for e-/e+ msc gs 126 param->SetMscStepLimitType(fUseSafetyPlus); // for e-/e+ msc gs 127 param->SetMscSkin(3); // error-free stepping for e-/e+ msc gs 128 param->SetMscRangeFactor(0.08); // error-free stepping for e-/e+ msc gs 129 param->SetMuHadLateralDisplacement(true); 130 param->SetFluo(true); 131 param->SetUseICRU90Data(true); 132 param->Set3GammaAnnihilationOnFly(true); 133 param->SetFluctuationType(fUrbanFluctuation); 134 param->SetMaxNIELEnergy(1*CLHEP::MeV); 135 param->SetPositronAtRestModelType(fAllisonPositronium); 136 SetPhysicsType(bElectromagnetic); 137 } 138 139 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 140 141 G4EmStandardPhysics_option4::~G4EmStandardPhysics_option4() = default; 142 143 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 144 145 void G4EmStandardPhysics_option4::ConstructParticle() 146 { 147 // minimal set of particles for EM physics 148 G4EmBuilder::ConstructMinimalEmSet(); 149 } 150 151 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 152 153 void G4EmStandardPhysics_option4::ConstructProcess() 154 { 155 if(verboseLevel > 1) { 156 G4cout << "### " << GetPhysicsName() << " Construct Processes " << G4endl; 157 } 158 G4EmBuilder::PrepareEMPhysics(); 159 160 G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper(); 161 G4EmParameters* param = G4EmParameters::Instance(); 162 163 // processes used by several particles 164 G4hMultipleScattering* hmsc = new G4hMultipleScattering("ionmsc"); 165 166 // nuclear stopping is enabled if the energy limit above zero 167 G4double nielEnergyLimit = param->MaxNIELEnergy(); 168 G4NuclearStopping* pnuc = nullptr; 169 if(nielEnergyLimit > 0.0) { 170 pnuc = new G4NuclearStopping(); 171 pnuc->SetMaxKinEnergy(nielEnergyLimit); 172 } 173 174 // high energy limit for e+- scattering models and bremsstrahlung 175 G4double highEnergyLimit = param->MscEnergyLimit(); 176 177 // Add gamma EM Processes 178 G4ParticleDefinition* particle = G4Gamma::Gamma(); 179 G4bool polar = param->EnablePolarisation(); 180 181 // Photoelectric 182 G4PhotoElectricEffect* pe = new G4PhotoElectricEffect(); 183 G4VEmModel* peModel = new G4LivermorePhotoElectricModel(); 184 pe->SetEmModel(peModel); 185 if(polar) { 186 peModel->SetAngularDistribution(new G4PhotoElectricAngularGeneratorPolarized()); 187 } 188 189 // Compton scattering 190 G4ComptonScattering* cs = new G4ComptonScattering; 191 cs->SetEmModel(new G4KleinNishinaModel()); 192 G4VEmModel* cModel = nullptr; 193 if(polar) { 194 cModel = new G4LowEPPolarizedComptonModel(); 195 } else { 196 cModel = new G4LowEPComptonModel(); 197 } 198 cModel->SetHighEnergyLimit(20*CLHEP::MeV); 199 cs->AddEmModel(0, cModel); 200 201 // Gamma conversion 202 G4GammaConversion* gc = new G4GammaConversion(); 203 G4VEmModel* conv = new G4BetheHeitler5DModel(); 204 gc->SetEmModel(conv); 205 206 // default Rayleigh scattering is Livermore 207 G4RayleighScattering* rl = new G4RayleighScattering(); 208 if(polar) { 209 rl->SetEmModel(new G4LivermorePolarizedRayleighModel()); 210 } 211 212 if(param->GeneralProcessActive()) { 213 G4GammaGeneralProcess* sp = new G4GammaGeneralProcess(); 214 sp->AddEmProcess(pe); 215 sp->AddEmProcess(cs); 216 sp->AddEmProcess(gc); 217 sp->AddEmProcess(rl); 218 G4LossTableManager::Instance()->SetGammaGeneralProcess(sp); 219 ph->RegisterProcess(sp, particle); 220 } else { 221 ph->RegisterProcess(pe, particle); 222 ph->RegisterProcess(cs, particle); 223 ph->RegisterProcess(gc, particle); 224 ph->RegisterProcess(rl, particle); 225 } 226 227 // e- 228 particle = G4Electron::Electron(); 229 230 // e-/e+ msc gs with Mott-correction 231 // (Mott-correction is set through G4EmParameters) 232 G4GoudsmitSaundersonMscModel* msc1 = new G4GoudsmitSaundersonMscModel(); 233 G4WentzelVIModel* msc2 = new G4WentzelVIModel(); 234 msc1->SetHighEnergyLimit(highEnergyLimit); 235 msc2->SetLowEnergyLimit(highEnergyLimit); 236 G4EmBuilder::ConstructElectronMscProcess(msc1, msc2, particle); 237 238 G4eCoulombScatteringModel* ssm = new G4eCoulombScatteringModel(); 239 G4CoulombScattering* ss = new G4CoulombScattering(); 240 ss->SetEmModel(ssm); 241 ss->SetMinKinEnergy(highEnergyLimit); 242 ssm->SetLowEnergyLimit(highEnergyLimit); 243 ssm->SetActivationLowEnergyLimit(highEnergyLimit); 244 245 // ionisation 246 G4eIonisation* eioni = new G4eIonisation(); 247 eioni->SetFluctModel(G4EmStandUtil::ModelOfFluctuations()); 248 G4VEmModel* theIoniMod = new G4PenelopeIonisationModel(); 249 theIoniMod->SetHighEnergyLimit(0.1*CLHEP::MeV); 250 eioni->AddEmModel(0, theIoniMod); 251 252 // bremsstrahlung 253 G4eBremsstrahlung* brem = new G4eBremsstrahlung(); 254 G4SeltzerBergerModel* br1 = new G4SeltzerBergerModel(); 255 G4eBremsstrahlungRelModel* br2 = new G4eBremsstrahlungRelModel(); 256 br1->SetAngularDistribution(new G4Generator2BS()); 257 br2->SetAngularDistribution(new G4Generator2BS()); 258 brem->SetEmModel(br1); 259 brem->SetEmModel(br2); 260 br1->SetHighEnergyLimit(CLHEP::GeV); 261 262 G4ePairProduction* ee = new G4ePairProduction(); 263 264 // register processes 265 ph->RegisterProcess(eioni, particle); 266 ph->RegisterProcess(brem, particle); 267 ph->RegisterProcess(ee, particle); 268 ph->RegisterProcess(ss, particle); 269 270 // e+ 271 particle = G4Positron::Positron(); 272 273 // e-/e+ msc gs with Mott-correction 274 // (Mott-correction is set through G4EmParameters) 275 msc1 = new G4GoudsmitSaundersonMscModel(); 276 msc2 = new G4WentzelVIModel(); 277 msc1->SetHighEnergyLimit(highEnergyLimit); 278 msc2->SetLowEnergyLimit(highEnergyLimit); 279 G4EmBuilder::ConstructElectronMscProcess(msc1, msc2, particle); 280 281 ssm = new G4eCoulombScatteringModel(); 282 ss = new G4CoulombScattering(); 283 ss->SetEmModel(ssm); 284 ss->SetMinKinEnergy(highEnergyLimit); 285 ssm->SetLowEnergyLimit(highEnergyLimit); 286 ssm->SetActivationLowEnergyLimit(highEnergyLimit); 287 288 // ionisation 289 eioni = new G4eIonisation(); 290 eioni->SetFluctModel(G4EmStandUtil::ModelOfFluctuations()); 291 G4VEmModel* pen = new G4PenelopeIonisationModel(); 292 pen->SetHighEnergyLimit(0.1*CLHEP::MeV); 293 eioni->AddEmModel(0, pen); 294 295 // bremsstrahlung 296 brem = new G4eBremsstrahlung(); 297 br1 = new G4SeltzerBergerModel(); 298 br2 = new G4eBremsstrahlungRelModel(); 299 br1->SetAngularDistribution(new G4Generator2BS()); 300 br2->SetAngularDistribution(new G4Generator2BS()); 301 brem->SetEmModel(br1); 302 brem->SetEmModel(br2); 303 br1->SetHighEnergyLimit(CLHEP::GeV); 304 305 // annihilation 306 auto anni = new G4eplusAnnihilation(); 307 if (param->Use3GammaAnnihilationOnFly()) { 308 anni->SetEmModel(new G4eplusTo2or3GammaModel()); 309 } 310 311 // register processes 312 ph->RegisterProcess(eioni, particle); 313 ph->RegisterProcess(brem, particle); 314 ph->RegisterProcess(ee, particle); 315 ph->RegisterProcess(anni, particle); 316 ph->RegisterProcess(ss, particle); 317 318 // generic ion 319 particle = G4GenericIon::GenericIon(); 320 G4ionIonisation* ionIoni = new G4ionIonisation(); 321 ionIoni->SetEmModel(new G4LindhardSorensenIonModel()); 322 ph->RegisterProcess(hmsc, particle); 323 ph->RegisterProcess(ionIoni, particle); 324 if(nullptr != pnuc) { ph->RegisterProcess(pnuc, particle); } 325 326 // muons, hadrons, ions 327 G4EmBuilder::ConstructCharged(hmsc, pnuc); 328 329 // extra configuration 330 G4EmModelActivator mact(GetPhysicsName()); 331 } 332 333 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 334