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