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 /// \file PhysListEmPenelope.cc 27 /// \brief Implementation of the PhysListEmPenelope class 28 // 29 // 30 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 31 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 32 33 #include "PhysListEmPenelope.hh" 34 35 #include "G4BuilderType.hh" 36 #include "G4ParticleDefinition.hh" 37 #include "G4ProcessManager.hh" 38 39 // gamma 40 41 #include "G4ComptonScattering.hh" 42 #include "G4GammaConversion.hh" 43 #include "G4PenelopeComptonModel.hh" 44 #include "G4PenelopeGammaConversionModel.hh" 45 #include "G4PenelopePhotoElectricModel.hh" 46 #include "G4PenelopeRayleighModel.hh" 47 #include "G4PhotoElectricEffect.hh" 48 #include "G4RayleighScattering.hh" 49 50 // e- 51 52 #include "G4PenelopeBremsstrahlungModel.hh" 53 #include "G4PenelopeIonisationModel.hh" 54 #include "G4UniversalFluctuation.hh" 55 #include "G4eBremsstrahlung.hh" 56 #include "G4eIonisation.hh" 57 58 // e+ 59 60 #include "G4PenelopeAnnihilationModel.hh" 61 #include "G4eplusAnnihilation.hh" 62 63 // mu 64 65 #include "G4MuBremsstrahlung.hh" 66 #include "G4MuIonisation.hh" 67 #include "G4MuPairProduction.hh" 68 69 // hadrons, ions 70 71 #include "G4hIonisation.hh" 72 #include "G4ionIonisation.hh" 73 74 // deexcitation 75 76 #include "G4LossTableManager.hh" 77 #include "G4SystemOfUnits.hh" 78 #include "G4UAtomicDeexcitation.hh" 79 80 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 81 82 PhysListEmPenelope::PhysListEmPenelope(const G4String& name) : G4VPhysicsConstructor(name) 83 { 84 G4EmParameters* param = G4EmParameters::Instance(); 85 param->SetDefaults(); 86 param->SetMinEnergy(10 * eV); 87 param->SetMaxEnergy(10 * TeV); 88 param->SetNumberOfBinsPerDecade(10); 89 90 param->SetVerbose(0); 91 param->Dump(); 92 } 93 94 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 95 96 void PhysListEmPenelope::ConstructProcess() 97 { 98 // Add standard EM Processes 99 100 auto particleIterator = GetParticleIterator(); 101 particleIterator->reset(); 102 while ((*particleIterator)()) { 103 G4ParticleDefinition* particle = particleIterator->value(); 104 G4ProcessManager* pmanager = particle->GetProcessManager(); 105 G4String particleName = particle->GetParticleName(); 106 107 // Applicability range for Penelope models 108 // for higher energies, the Standard models are used 109 G4double highEnergyLimit = 1 * GeV; 110 111 if (particleName == "gamma") { 112 // gamma 113 114 G4PhotoElectricEffect* phot = new G4PhotoElectricEffect(); 115 G4PenelopePhotoElectricModel* photModel = new G4PenelopePhotoElectricModel(); 116 photModel->SetHighEnergyLimit(highEnergyLimit); 117 phot->AddEmModel(0, photModel); 118 pmanager->AddDiscreteProcess(phot); 119 120 G4ComptonScattering* compt = new G4ComptonScattering(); 121 G4PenelopeComptonModel* comptModel = new G4PenelopeComptonModel(); 122 comptModel->SetHighEnergyLimit(highEnergyLimit); 123 compt->AddEmModel(0, comptModel); 124 pmanager->AddDiscreteProcess(compt); 125 126 G4GammaConversion* conv = new G4GammaConversion(); 127 G4PenelopeGammaConversionModel* convModel = new G4PenelopeGammaConversionModel(); 128 convModel->SetHighEnergyLimit(highEnergyLimit); 129 conv->AddEmModel(0, convModel); 130 pmanager->AddDiscreteProcess(conv); 131 132 G4RayleighScattering* rayl = new G4RayleighScattering(); 133 G4PenelopeRayleighModel* raylModel = new G4PenelopeRayleighModel(); 134 raylModel->SetHighEnergyLimit(highEnergyLimit); 135 rayl->AddEmModel(0, raylModel); 136 pmanager->AddDiscreteProcess(rayl); 137 } 138 else if (particleName == "e-") { 139 // electron 140 141 G4eIonisation* eIoni = new G4eIonisation(); 142 G4PenelopeIonisationModel* eIoniModel = new G4PenelopeIonisationModel(); 143 eIoniModel->SetHighEnergyLimit(highEnergyLimit); 144 eIoni->AddEmModel(0, eIoniModel, new G4UniversalFluctuation()); 145 pmanager->AddProcess(eIoni, -1, -1, 1); 146 147 G4eBremsstrahlung* eBrem = new G4eBremsstrahlung(); 148 G4PenelopeBremsstrahlungModel* eBremModel = new G4PenelopeBremsstrahlungModel(); 149 eBremModel->SetHighEnergyLimit(highEnergyLimit); 150 eBrem->AddEmModel(0, eBremModel); 151 pmanager->AddProcess(eBrem, -1, -1, 2); 152 } 153 else if (particleName == "e+") { 154 // positron 155 G4eIonisation* eIoni = new G4eIonisation(); 156 G4PenelopeIonisationModel* eIoniModel = new G4PenelopeIonisationModel(); 157 eIoniModel->SetHighEnergyLimit(highEnergyLimit); 158 eIoni->AddEmModel(0, eIoniModel, new G4UniversalFluctuation()); 159 pmanager->AddProcess(eIoni, -1, -1, 1); 160 161 G4eBremsstrahlung* eBrem = new G4eBremsstrahlung(); 162 G4PenelopeBremsstrahlungModel* eBremModel = new G4PenelopeBremsstrahlungModel(); 163 eBremModel->SetHighEnergyLimit(highEnergyLimit); 164 eBrem->AddEmModel(0, eBremModel); 165 pmanager->AddProcess(eBrem, -1, -1, 2); 166 167 G4eplusAnnihilation* eAnni = new G4eplusAnnihilation(); 168 G4PenelopeAnnihilationModel* eAnniModel = new G4PenelopeAnnihilationModel(); 169 eAnniModel->SetHighEnergyLimit(highEnergyLimit); 170 eAnni->AddEmModel(0, eAnniModel); 171 pmanager->AddProcess(eAnni, 0, -1, 3); 172 } 173 else if (particleName == "mu+" || particleName == "mu-") { 174 // muon 175 pmanager->AddProcess(new G4MuIonisation, -1, -1, 1); 176 pmanager->AddProcess(new G4MuBremsstrahlung, -1, -1, 2); 177 pmanager->AddProcess(new G4MuPairProduction, -1, -1, 3); 178 } 179 else if (particleName == "alpha" || particleName == "GenericIon") { 180 pmanager->AddProcess(new G4ionIonisation, -1, -1, 1); 181 } 182 else if ((!particle->IsShortLived()) && (particle->GetPDGCharge() != 0.0) 183 && (particle->GetParticleName() != "chargedgeantino")) 184 { 185 // all others charged particles except geantino 186 pmanager->AddProcess(new G4hIonisation, -1, -1, 1); 187 } 188 } 189 190 // Deexcitation 191 // 192 G4VAtomDeexcitation* deex = new G4UAtomicDeexcitation(); 193 G4LossTableManager::Instance()->SetAtomDeexcitation(deex); 194 } 195 196 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 197