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: G4EmStandardPhysicsGS 30 // 31 // Author: V.Ivanchenko 05.06.2015 32 // 33 // Modified: 34 // 35 // Class Description: 36 // 37 // Standard EM physics constructor for HEP applications with the Goudsmit 38 // -Saunderson MSC model for e-/e+ Coulomb scattering below 100 [MeV] (instead 39 // of the Urban model). Note, that the Goudsmit-Saunderson MSC model used here 40 // with its HEP settings (i.e. less accurate). The Goudsmit-Saunderson MSC 41 // model with its most accurate settings is used in the G4EmStandard_opt4 42 // physics constructor for e-/e+ Coulomb scattering. 43 // 44 //---------------------------------------------------------------------------- 45 // 46 47 #include "G4EmStandardPhysicsGS.hh" 48 #include "G4SystemOfUnits.hh" 49 #include "G4ParticleDefinition.hh" 50 #include "G4EmParameters.hh" 51 #include "G4EmBuilder.hh" 52 #include "G4LossTableManager.hh" 53 54 #include "G4ComptonScattering.hh" 55 #include "G4GammaConversion.hh" 56 #include "G4PhotoElectricEffect.hh" 57 #include "G4RayleighScattering.hh" 58 #include "G4LivermorePhotoElectricModel.hh" 59 60 #include "G4eMultipleScattering.hh" 61 #include "G4hMultipleScattering.hh" 62 #include "G4CoulombScattering.hh" 63 #include "G4eCoulombScatteringModel.hh" 64 #include "G4WentzelVIModel.hh" 65 #include "G4UrbanMscModel.hh" 66 #include "G4GoudsmitSaundersonMscModel.hh" 67 68 #include "G4eIonisation.hh" 69 #include "G4eBremsstrahlung.hh" 70 #include "G4eplusAnnihilation.hh" 71 72 #include "G4hIonisation.hh" 73 #include "G4ionIonisation.hh" 74 75 #include "G4Gamma.hh" 76 #include "G4Electron.hh" 77 #include "G4Positron.hh" 78 #include "G4GenericIon.hh" 79 80 #include "G4PhysicsListHelper.hh" 81 #include "G4BuilderType.hh" 82 #include "G4EmModelActivator.hh" 83 84 // factory 85 #include "G4PhysicsConstructorFactory.hh" 86 // 87 G4_DECLARE_PHYSCONSTR_FACTORY(G4EmStandardPhysicsGS); 88 89 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 90 91 G4EmStandardPhysicsGS::G4EmStandardPhysicsGS(G4int ver, const G4String&) 92 : G4VPhysicsConstructor("G4EmStandardGS") 93 { 94 SetVerboseLevel(ver); 95 G4EmParameters* param = G4EmParameters::Instance(); 96 param->SetDefaults(); 97 param->SetVerbose(ver); 98 param->SetMscRangeFactor(0.06); 99 // param->SetMscStepLimitType(fUseSafetyPlus); // corresponds to the error-free stepping 100 // param->SetFluo(true); 101 SetPhysicsType(bElectromagnetic); 102 } 103 104 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 105 106 G4EmStandardPhysicsGS::~G4EmStandardPhysicsGS() 107 {} 108 109 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 110 111 void G4EmStandardPhysicsGS::ConstructParticle() 112 { 113 // minimal set of particles for EM physics 114 G4EmBuilder::ConstructMinimalEmSet(); 115 } 116 117 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 118 119 void G4EmStandardPhysicsGS::ConstructProcess() 120 { 121 if(verboseLevel > 1) { 122 G4cout << "### " << GetPhysicsName() << " Construct Processes " << G4endl; 123 } 124 G4EmBuilder::PrepareEMPhysics(); 125 G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper(); 126 127 // processes used by several particles 128 G4hMultipleScattering* hmsc = new G4hMultipleScattering("ionmsc"); 129 G4NuclearStopping* pnuc(nullptr); 130 131 // high energy limit for e+- scattering models and bremsstrahlung 132 G4double highEnergyLimit = G4EmParameters::Instance()->MscEnergyLimit(); 133 134 // Add gamma EM processes 135 G4ParticleDefinition* particle = G4Gamma::Gamma(); 136 137 G4PhotoElectricEffect* pee = new G4PhotoElectricEffect(); 138 pee->SetEmModel(new G4LivermorePhotoElectricModel()); 139 ph->RegisterProcess(pee, particle); 140 141 ph->RegisterProcess(new G4ComptonScattering(), particle); 142 ph->RegisterProcess(new G4GammaConversion(), particle); 143 ph->RegisterProcess(new G4RayleighScattering(), particle); 144 145 // e- 146 particle = G4Electron::Electron(); 147 148 G4eMultipleScattering* msc = new G4eMultipleScattering; 149 G4GoudsmitSaundersonMscModel* msc1 = new G4GoudsmitSaundersonMscModel(); 150 G4WentzelVIModel* msc2 = new G4WentzelVIModel(); 151 msc1->SetHighEnergyLimit(highEnergyLimit); 152 msc2->SetLowEnergyLimit(highEnergyLimit); 153 msc->SetEmModel(msc1); 154 msc->SetEmModel(msc2); 155 156 G4eCoulombScatteringModel* ssm = new G4eCoulombScatteringModel(); 157 G4CoulombScattering* ss = new G4CoulombScattering(); 158 ss->SetEmModel(ssm); 159 ss->SetMinKinEnergy(highEnergyLimit); 160 ssm->SetLowEnergyLimit(highEnergyLimit); 161 ssm->SetActivationLowEnergyLimit(highEnergyLimit); 162 163 ph->RegisterProcess(msc, particle); 164 ph->RegisterProcess(new G4eIonisation(), particle); 165 ph->RegisterProcess(new G4eBremsstrahlung(), particle); 166 ph->RegisterProcess(ss, particle); 167 168 // e+ 169 particle = G4Positron::Positron(); 170 171 msc = new G4eMultipleScattering; 172 msc1 = new G4GoudsmitSaundersonMscModel(); 173 msc2 = new G4WentzelVIModel(); 174 msc1->SetHighEnergyLimit(highEnergyLimit); 175 msc2->SetLowEnergyLimit(highEnergyLimit); 176 msc->SetEmModel(msc1); 177 msc->SetEmModel(msc2); 178 179 ssm = new G4eCoulombScatteringModel(); 180 ss = new G4CoulombScattering(); 181 ss->SetEmModel(ssm); 182 ss->SetMinKinEnergy(highEnergyLimit); 183 ssm->SetLowEnergyLimit(highEnergyLimit); 184 ssm->SetActivationLowEnergyLimit(highEnergyLimit); 185 186 ph->RegisterProcess(msc, particle); 187 ph->RegisterProcess(new G4eIonisation(), particle); 188 ph->RegisterProcess(new G4eBremsstrahlung(), particle); 189 ph->RegisterProcess(new G4eplusAnnihilation(), particle); 190 ph->RegisterProcess(ss, particle); 191 192 // generic ion 193 particle = G4GenericIon::GenericIon(); 194 G4ionIonisation* ionIoni = new G4ionIonisation(); 195 ph->RegisterProcess(hmsc, particle); 196 ph->RegisterProcess(ionIoni, particle); 197 198 // muons, hadrons, ions 199 G4EmBuilder::ConstructCharged(hmsc, pnuc); 200 201 // extra configuration 202 G4EmModelActivator mact(GetPhysicsName()); 203 } 204 205 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 206