Geant4 Cross Reference |
1 // 1 // 2 // ******************************************* 2 // ******************************************************************** 3 // * License and Disclaimer 3 // * License and Disclaimer * 4 // * 4 // * * 5 // * The Geant4 software is copyright of th 5 // * The Geant4 software is copyright of the Copyright Holders of * 6 // * the Geant4 Collaboration. It is provided 6 // * the Geant4 Collaboration. It is provided under the terms and * 7 // * conditions of the Geant4 Software License 7 // * conditions of the Geant4 Software License, included in the file * 8 // * LICENSE and available at http://cern.ch/ 8 // * LICENSE and available at http://cern.ch/geant4/license . These * 9 // * include a list of copyright holders. 9 // * include a list of copyright holders. * 10 // * 10 // * * 11 // * Neither the authors of this software syst 11 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing fin 12 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warran 13 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assum 14 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file 15 // * use. Please see the license in the file LICENSE and URL above * 16 // * for the full disclaimer and the limitatio 16 // * for the full disclaimer and the limitation of liability. * 17 // * 17 // * * 18 // * This code implementation is the result 18 // * This code implementation is the result of the scientific and * 19 // * technical work of the GEANT4 collaboratio 19 // * technical work of the GEANT4 collaboration. * 20 // * By using, copying, modifying or distri 20 // * By using, copying, modifying or distributing the software (or * 21 // * any work based on the software) you ag 21 // * any work based on the software) you agree to acknowledge its * 22 // * use in resulting scientific publicati 22 // * use in resulting scientific publications, and indicate your * 23 // * acceptance of all terms of the Geant4 Sof 23 // * acceptance of all terms of the Geant4 Software license. * 24 // ******************************************* 24 // ******************************************************************** 25 // 25 // 26 // ------------------------------------------- 26 // ------------------------------------------------------------------- 27 // ------------------------------------------- 27 // ------------------------------------------------------------------- 28 28 29 //....oooOO0OOooo........oooOO0OOooo........oo 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 30 30 31 #include "MicroElecSiPhysics.hh" 31 #include "MicroElecSiPhysics.hh" 32 #include "G4SystemOfUnits.hh" 32 #include "G4SystemOfUnits.hh" 33 33 34 // Geant4-MicroElec MODELS 34 // Geant4-MicroElec MODELS 35 35 36 #include "G4MicroElecElastic.hh" 36 #include "G4MicroElecElastic.hh" 37 #include "G4MicroElecElasticModel.hh" 37 #include "G4MicroElecElasticModel.hh" 38 38 39 #include "G4MicroElecInelastic.hh" 39 #include "G4MicroElecInelastic.hh" 40 #include "G4MicroElecInelasticModel.hh" 40 #include "G4MicroElecInelasticModel.hh" 41 // 41 // 42 42 43 #include "G4LossTableManager.hh" 43 #include "G4LossTableManager.hh" 44 #include "G4EmConfigurator.hh" 44 #include "G4EmConfigurator.hh" 45 #include "G4VEmModel.hh" 45 #include "G4VEmModel.hh" 46 #include "G4DummyModel.hh" 46 #include "G4DummyModel.hh" 47 #include "G4eIonisation.hh" 47 #include "G4eIonisation.hh" 48 #include "G4hIonisation.hh" 48 #include "G4hIonisation.hh" 49 #include "G4ionIonisation.hh" 49 #include "G4ionIonisation.hh" 50 #include "G4eMultipleScattering.hh" 50 #include "G4eMultipleScattering.hh" 51 #include "G4hMultipleScattering.hh" 51 #include "G4hMultipleScattering.hh" 52 #include "G4BraggModel.hh" 52 #include "G4BraggModel.hh" 53 #include "G4BraggIonModel.hh" 53 #include "G4BraggIonModel.hh" 54 #include "G4BetheBlochModel.hh" 54 #include "G4BetheBlochModel.hh" 55 #include "G4UrbanMscModel.hh" 55 #include "G4UrbanMscModel.hh" 56 #include "G4MollerBhabhaModel.hh" 56 #include "G4MollerBhabhaModel.hh" 57 #include "G4IonFluctuations.hh" 57 #include "G4IonFluctuations.hh" 58 #include "G4UniversalFluctuation.hh" 58 #include "G4UniversalFluctuation.hh" 59 59 60 #include "ElectronCapture.hh" 60 #include "ElectronCapture.hh" 61 61 62 #include "G4UAtomicDeexcitation.hh" 62 #include "G4UAtomicDeexcitation.hh" 63 63 64 //....oooOO0OOooo........oooOO0OOooo........oo 64 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 65 65 66 MicroElecSiPhysics::MicroElecSiPhysics(): G4V 66 MicroElecSiPhysics::MicroElecSiPhysics(): G4VUserPhysicsList() 67 { 67 { 68 defaultCutValue = 1*micrometer; 68 defaultCutValue = 1*micrometer; 69 cutForGamma = defaultCutValue; 69 cutForGamma = defaultCutValue; 70 cutForElectron = defaultCutValue; 70 cutForElectron = defaultCutValue; 71 cutForPositron = defaultCutValue; 71 cutForPositron = defaultCutValue; 72 cutForProton = defaultCutValue; 72 cutForProton = defaultCutValue; 73 73 74 SetVerboseLevel(1); 74 SetVerboseLevel(1); 75 } 75 } 76 76 77 //....oooOO0OOooo........oooOO0OOooo........oo 77 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 78 78 79 MicroElecSiPhysics::~MicroElecSiPhysics() 79 MicroElecSiPhysics::~MicroElecSiPhysics() 80 {} 80 {} 81 81 82 //....oooOO0OOooo........oooOO0OOooo........oo 82 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 83 83 84 void MicroElecSiPhysics::ConstructParticle() 84 void MicroElecSiPhysics::ConstructParticle() 85 { 85 { 86 ConstructBosons(); 86 ConstructBosons(); 87 ConstructLeptons(); 87 ConstructLeptons(); 88 ConstructBarions(); 88 ConstructBarions(); 89 } 89 } 90 90 91 //....oooOO0OOooo........oooOO0OOooo........oo 91 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 92 92 93 void MicroElecSiPhysics::ConstructBosons() 93 void MicroElecSiPhysics::ConstructBosons() 94 { 94 { 95 // gamma 95 // gamma 96 G4Gamma::GammaDefinition(); 96 G4Gamma::GammaDefinition(); 97 } 97 } 98 //....oooOO0OOooo........oooOO0OOooo........o 98 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 99 99 100 void MicroElecSiPhysics::ConstructLeptons() 100 void MicroElecSiPhysics::ConstructLeptons() 101 { 101 { 102 // leptons 102 // leptons 103 G4Electron::ElectronDefinition(); 103 G4Electron::ElectronDefinition(); 104 G4Positron::PositronDefinition(); 104 G4Positron::PositronDefinition(); 105 } 105 } 106 106 107 //....oooOO0OOooo........oooOO0OOooo........oo 107 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 108 108 109 void MicroElecSiPhysics::ConstructBarions() 109 void MicroElecSiPhysics::ConstructBarions() 110 { 110 { 111 // baryons 111 // baryons 112 G4Proton::ProtonDefinition(); 112 G4Proton::ProtonDefinition(); 113 G4GenericIon::GenericIonDefinition(); 113 G4GenericIon::GenericIonDefinition(); 114 } 114 } 115 115 116 //....oooOO0OOooo........oooOO0OOooo........oo 116 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 117 117 118 void MicroElecSiPhysics::ConstructProcess() 118 void MicroElecSiPhysics::ConstructProcess() 119 { 119 { 120 AddTransportation(); 120 AddTransportation(); 121 ConstructEM(); 121 ConstructEM(); 122 ConstructGeneral(); 122 ConstructGeneral(); 123 } 123 } 124 124 125 //....oooOO0OOooo........oooOO0OOooo........oo 125 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 126 126 127 void MicroElecSiPhysics::ConstructEM() 127 void MicroElecSiPhysics::ConstructEM() 128 { 128 { 129 129 130 auto particleIterator=GetParticleIterator(); 130 auto particleIterator=GetParticleIterator(); 131 particleIterator->reset(); 131 particleIterator->reset(); 132 132 133 while( (*particleIterator)() ) 133 while( (*particleIterator)() ) 134 { 134 { 135 135 136 G4ParticleDefinition* particle = particleI 136 G4ParticleDefinition* particle = particleIterator->value(); 137 G4ProcessManager* pmanager = particle->Get 137 G4ProcessManager* pmanager = particle->GetProcessManager(); 138 G4String particleName = particle->GetParti 138 G4String particleName = particle->GetParticleName(); 139 139 140 // ********************************* 140 // ********************************* 141 // 1) Processes for the World region 141 // 1) Processes for the World region 142 // ********************************* 142 // ********************************* 143 143 144 if (particleName == "e-") { 144 if (particleName == "e-") { 145 145 146 // STANDARD msc is active in the world 146 // STANDARD msc is active in the world 147 G4eMultipleScattering* msc = new G4eMult 147 G4eMultipleScattering* msc = new G4eMultipleScattering(); 148 msc->AddEmModel(1, new G4UrbanMscModel() 148 msc->AddEmModel(1, new G4UrbanMscModel()); 149 pmanager->AddProcess(msc, -1, 1, -1); 149 pmanager->AddProcess(msc, -1, 1, -1); 150 150 151 // STANDARD ionisation is active in the 151 // STANDARD ionisation is active in the world 152 G4eIonisation* eion = new G4eIonisation( 152 G4eIonisation* eion = new G4eIonisation(); 153 pmanager->AddProcess(eion, -1, 2, 2); 153 pmanager->AddProcess(eion, -1, 2, 2); 154 154 155 // MicroElec elastic is not active in th 155 // MicroElec elastic is not active in the world 156 G4MicroElecElastic* theMicroElecElasticP 156 G4MicroElecElastic* theMicroElecElasticProcess = new G4MicroElecElastic("e-_G4MicroElecElastic"); 157 theMicroElecElasticProcess->SetEmModel(n 157 theMicroElecElasticProcess->SetEmModel(new G4DummyModel()); 158 pmanager->AddDiscreteProcess(theMicroEle 158 pmanager->AddDiscreteProcess(theMicroElecElasticProcess); 159 159 160 // MicroElec ionisation is not active in 160 // MicroElec ionisation is not active in the world 161 G4MicroElecInelastic* microelecioni = ne 161 G4MicroElecInelastic* microelecioni = new G4MicroElecInelastic("e-_G4MicroElecInelastic"); 162 microelecioni->SetEmModel(new G4DummyMod 162 microelecioni->SetEmModel(new G4DummyModel()); 163 pmanager->AddDiscreteProcess(microelecio 163 pmanager->AddDiscreteProcess(microelecioni); 164 164 165 // THE FOLLOWING PROCESS WILL KILL ALL E 165 // THE FOLLOWING PROCESS WILL KILL ALL ELECTRONS BELOW A SELECTED ENERY THRESHOLD 166 // Capture of low-energy e- 166 // Capture of low-energy e- 167 ElectronCapture* ecap = new ElectronCapt 167 ElectronCapture* ecap = new ElectronCapture("Target", 16.7*eV); 168 pmanager->AddDiscreteProcess(ecap); 168 pmanager->AddDiscreteProcess(ecap); 169 169 170 } else if ( particleName == "proton" ) { 170 } else if ( particleName == "proton" ) { 171 171 172 // STANDARD msc is active in the world 172 // STANDARD msc is active in the world 173 G4hMultipleScattering* msc = new G4hMult 173 G4hMultipleScattering* msc = new G4hMultipleScattering(); 174 msc->AddEmModel(1, new G4UrbanMscModel() 174 msc->AddEmModel(1, new G4UrbanMscModel()); 175 pmanager->AddProcess(msc, -1, 1, -1); 175 pmanager->AddProcess(msc, -1, 1, -1); 176 176 177 // STANDARD ionisation is active in the 177 // STANDARD ionisation is active in the world 178 G4hIonisation* hion = new G4hIonisation( 178 G4hIonisation* hion = new G4hIonisation(); 179 pmanager->AddProcess(hion, -1, 2, 2); 179 pmanager->AddProcess(hion, -1, 2, 2); 180 180 181 // MicroElec ionisation is not active in 181 // MicroElec ionisation is not active in the world 182 G4MicroElecInelastic* microelecioni = ne 182 G4MicroElecInelastic* microelecioni = new G4MicroElecInelastic("p_G4MicroElecInelastic"); 183 microelecioni->SetEmModel(new G4DummyMod 183 microelecioni->SetEmModel(new G4DummyModel()); 184 microelecioni->SetEmModel(new G4DummyMod 184 microelecioni->SetEmModel(new G4DummyModel()); 185 pmanager->AddDiscreteProcess(microelecio 185 pmanager->AddDiscreteProcess(microelecioni); 186 186 187 } else if (particleName == "GenericIon") { 187 } else if (particleName == "GenericIon") { 188 188 189 // STANDARD msc is active in the world 189 // STANDARD msc is active in the world 190 G4hMultipleScattering* msc = new G4hMult 190 G4hMultipleScattering* msc = new G4hMultipleScattering(); 191 msc->AddEmModel(1, new G4UrbanMscModel() 191 msc->AddEmModel(1, new G4UrbanMscModel()); 192 pmanager->AddProcess(new G4hMultipleScat 192 pmanager->AddProcess(new G4hMultipleScattering, -1, 1, -1); 193 193 194 // STANDARD ionisation is active in the 194 // STANDARD ionisation is active in the world 195 G4ionIonisation* hion = new G4ionIonisat 195 G4ionIonisation* hion = new G4ionIonisation(); 196 pmanager->AddProcess(hion, -1, 2, 2); 196 pmanager->AddProcess(hion, -1, 2, 2); 197 197 198 // MicroElec ionisation is not active in 198 // MicroElec ionisation is not active in the world 199 G4MicroElecInelastic* microelecioni = ne 199 G4MicroElecInelastic* microelecioni = new G4MicroElecInelastic("ion_G4MicroElecInelastic"); 200 microelecioni->SetEmModel(new G4DummyMod 200 microelecioni->SetEmModel(new G4DummyModel()); 201 microelecioni->SetEmModel(new G4DummyMod 201 microelecioni->SetEmModel(new G4DummyModel()); 202 pmanager->AddDiscreteProcess(microelecio 202 pmanager->AddDiscreteProcess(microelecioni); 203 } 203 } 204 } 204 } 205 205 206 // ************************************** 206 // ************************************** 207 // 2) Define processes for Target region 207 // 2) Define processes for Target region 208 // ************************************** 208 // ************************************** 209 209 210 // STANDARD EM processes should be inactivat 210 // STANDARD EM processes should be inactivated when corresponding MicroElec processes are used 211 // - STANDARD EM e- processes are inactivate 211 // - STANDARD EM e- processes are inactivated below 100 MeV 212 // - STANDARD EM proton & ion processes are 212 // - STANDARD EM proton & ion processes are inactivated below standEnergyLimit 213 // 213 // 214 G4EmConfigurator* em_config = G4LossTableMan 214 G4EmConfigurator* em_config = G4LossTableManager::Instance()->EmConfigurator(); 215 215 216 G4VEmModel* mod; 216 G4VEmModel* mod; 217 // *** e- 217 // *** e- 218 218 219 // ---> STANDARD EM processes are inactivate 219 // ---> STANDARD EM processes are inactivated below 100 MeV 220 220 221 G4UrbanMscModel* msc = new G4UrbanMscModel( 221 G4UrbanMscModel* msc = new G4UrbanMscModel(); 222 msc->SetActivationLowEnergyLimit(100*MeV); 222 msc->SetActivationLowEnergyLimit(100*MeV); 223 em_config->SetExtraEmModel("e-","msc",msc,"T 223 em_config->SetExtraEmModel("e-","msc",msc,"Target"); 224 224 225 mod = new G4MollerBhabhaModel(); 225 mod = new G4MollerBhabhaModel(); 226 mod->SetActivationLowEnergyLimit(100*MeV); 226 mod->SetActivationLowEnergyLimit(100*MeV); 227 em_config->SetExtraEmModel("e-","eIoni",mod, 227 em_config->SetExtraEmModel("e-","eIoni",mod,"Target",0.0,10*TeV, new G4UniversalFluctuation()); 228 228 229 // ---> MicroElec processes activated 229 // ---> MicroElec processes activated 230 230 231 mod = new G4MicroElecElasticModel(); 231 mod = new G4MicroElecElasticModel(); 232 em_config->SetExtraEmModel("e-","e-_G4MicroE 232 em_config->SetExtraEmModel("e-","e-_G4MicroElecElastic",mod,"Target",0.0,100*MeV); 233 233 234 mod = new G4MicroElecInelasticModel(); 234 mod = new G4MicroElecInelasticModel(); 235 em_config->SetExtraEmModel("e-","e-_G4MicroE 235 em_config->SetExtraEmModel("e-","e-_G4MicroElecInelastic",mod,"Target",16.7*eV,100*MeV); 236 236 237 // *** proton 237 // *** proton 238 238 239 // ---> STANDARD EM processes inactivated be 239 // ---> STANDARD EM processes inactivated below standEnergyLimit 240 240 241 // STANDARD msc is still active 241 // STANDARD msc is still active 242 // Inactivate following STANDARD processes 242 // Inactivate following STANDARD processes 243 243 244 mod = new G4BraggModel(); 244 mod = new G4BraggModel(); 245 mod->SetActivationHighEnergyLimit(50*keV); 245 mod->SetActivationHighEnergyLimit(50*keV); 246 em_config->SetExtraEmModel("proton","hIoni", 246 em_config->SetExtraEmModel("proton","hIoni",mod,"Target",0.0,2*MeV, new G4IonFluctuations()); 247 247 248 mod = new G4BetheBlochModel(); 248 mod = new G4BetheBlochModel(); 249 mod->SetActivationLowEnergyLimit(10*GeV); 249 mod->SetActivationLowEnergyLimit(10*GeV); 250 em_config->SetExtraEmModel("proton","hIoni", 250 em_config->SetExtraEmModel("proton","hIoni",mod,"Target",2*MeV,10*TeV, new G4IonFluctuations()); 251 251 252 // ---> MicroElec processes activated 252 // ---> MicroElec processes activated 253 mod = new G4MicroElecInelasticModel(); 253 mod = new G4MicroElecInelasticModel(); 254 mod->SetActivationLowEnergyLimit(50*keV); 254 mod->SetActivationLowEnergyLimit(50*keV); 255 em_config->SetExtraEmModel("proton","p_G4Mic 255 em_config->SetExtraEmModel("proton","p_G4MicroElecInelastic",mod,"Target",0.0,10*GeV); 256 em_config->SetExtraEmModel("proton","p_G4Mic 256 em_config->SetExtraEmModel("proton","p_G4MicroElecInelastic",new G4DummyModel, 257 "Target",10*GeV,10*TeV); 257 "Target",10*GeV,10*TeV); 258 258 259 // *** ion 259 // *** ion 260 260 261 // ---> STANDARD EM processes inactivated be 261 // ---> STANDARD EM processes inactivated below standEnergyLimit 262 262 263 // STANDARD msc is still active 263 // STANDARD msc is still active 264 // Inactivate following STANDARD processes 264 // Inactivate following STANDARD processes 265 265 266 mod = new G4BraggIonModel(); 266 mod = new G4BraggIonModel(); 267 mod->SetActivationHighEnergyLimit(50*keV); 267 mod->SetActivationHighEnergyLimit(50*keV); 268 em_config->SetExtraEmModel("GenericIon","ion 268 em_config->SetExtraEmModel("GenericIon","ionIoni",mod,"Target",0.0,2*MeV, new G4IonFluctuations()); 269 269 270 mod = new G4BetheBlochModel(); 270 mod = new G4BetheBlochModel(); 271 mod->SetActivationLowEnergyLimit(10*GeV); 271 mod->SetActivationLowEnergyLimit(10*GeV); 272 em_config->SetExtraEmModel("GenericIon","ion 272 em_config->SetExtraEmModel("GenericIon","ionIoni",mod,"Target",2*MeV,10*TeV, new G4IonFluctuations()); 273 273 274 // ---> MicroElec processes activated 274 // ---> MicroElec processes activated 275 mod = new G4MicroElecInelasticModel(); 275 mod = new G4MicroElecInelasticModel(); 276 mod->SetActivationLowEnergyLimit(50*keV); 276 mod->SetActivationLowEnergyLimit(50*keV); 277 em_config->SetExtraEmModel("GenericIon","ion 277 em_config->SetExtraEmModel("GenericIon","ion_G4MicroElecInelastic",mod, 278 "Target",0.0,10*GeV); 278 "Target",0.0,10*GeV); 279 em_config->SetExtraEmModel("GenericIon","ion 279 em_config->SetExtraEmModel("GenericIon","ion_G4MicroElecInelastic",new G4DummyModel, 280 "Target",10*GeV,10*TeV); 280 "Target",10*GeV,10*TeV); 281 281 282 // Deexcitation 282 // Deexcitation 283 // 283 // 284 G4VAtomDeexcitation* de = new G4UAtomicDeexc 284 G4VAtomDeexcitation* de = new G4UAtomicDeexcitation(); 285 G4LossTableManager::Instance()->SetAtomDeexc 285 G4LossTableManager::Instance()->SetAtomDeexcitation(de); 286 de->SetFluo(true); 286 de->SetFluo(true); 287 de->SetAuger(true); 287 de->SetAuger(true); 288 de->SetPIXE(true); 288 de->SetPIXE(true); 289 de->InitialiseForNewRun(); 289 de->InitialiseForNewRun(); 290 290 291 291 292 } 292 } 293 293 294 //....oooOO0OOooo........oooOO0OOooo........oo 294 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 295 295 296 void MicroElecSiPhysics::ConstructGeneral() 296 void MicroElecSiPhysics::ConstructGeneral() 297 { } 297 { } 298 298 299 //....oooOO0OOooo........oooOO0OOooo........oo 299 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 300 300 301 void MicroElecSiPhysics::SetCuts() 301 void MicroElecSiPhysics::SetCuts() 302 { 302 { 303 if (verboseLevel >0) 303 if (verboseLevel >0) 304 { 304 { 305 G4cout << "MicroElecSiPhysics::SetCuts:"; 305 G4cout << "MicroElecSiPhysics::SetCuts:"; 306 G4cout << "CutLength : " << G4BestUnit(def 306 G4cout << "CutLength : " << G4BestUnit(defaultCutValue,"Length") << G4endl; 307 } 307 } 308 308 309 // set cut values for gamma at first and for 309 // set cut values for gamma at first and for e- second and next for e+, 310 // because some processes for e+/e- need cut 310 // because some processes for e+/e- need cut values for gamma 311 SetCutValue(cutForGamma, "gamma"); 311 SetCutValue(cutForGamma, "gamma"); 312 SetCutValue(cutForElectron, "e-"); 312 SetCutValue(cutForElectron, "e-"); 313 SetCutValue(cutForPositron, "e+"); 313 SetCutValue(cutForPositron, "e+"); 314 SetCutValue(cutForProton, "proton"); 314 SetCutValue(cutForProton, "proton"); 315 315 316 if (verboseLevel>0) { DumpCutValuesTable(); 316 if (verboseLevel>0) { DumpCutValuesTable(); } 317 } 317 } 318 318