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 electromagnetic/TestEm7/src/PhysListEmStandard.cc 27 /// \brief Implementation of the PhysListEmStandard class 28 // 29 // 30 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 31 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 32 33 #include "PhysListEmStandard.hh" 34 35 #include "G4BuilderType.hh" 36 #include "G4ComptonScattering.hh" 37 #include "G4EmParameters.hh" 38 #include "G4GammaConversion.hh" 39 #include "G4IonParametrisedLossModel.hh" 40 #include "G4KleinNishinaModel.hh" 41 #include "G4LossTableManager.hh" 42 #include "G4MscStepLimitType.hh" 43 #include "G4MuBremsstrahlung.hh" 44 #include "G4MuIonisation.hh" 45 #include "G4MuMultipleScattering.hh" 46 #include "G4MuPairProduction.hh" 47 #include "G4NuclearStopping.hh" 48 #include "G4ParticleDefinition.hh" 49 #include "G4PhotoElectricEffect.hh" 50 #include "G4PhysicsListHelper.hh" 51 #include "G4ProcessManager.hh" 52 #include "G4RayleighScattering.hh" 53 #include "G4SystemOfUnits.hh" 54 #include "G4UAtomicDeexcitation.hh" 55 #include "G4eBremsstrahlung.hh" 56 #include "G4eIonisation.hh" 57 #include "G4eMultipleScattering.hh" 58 #include "G4eplusAnnihilation.hh" 59 #include "G4hBremsstrahlung.hh" 60 #include "G4hIonisation.hh" 61 #include "G4hMultipleScattering.hh" 62 #include "G4hPairProduction.hh" 63 #include "G4ionIonisation.hh" 64 65 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 66 67 PhysListEmStandard::PhysListEmStandard(const G4String&) : G4VPhysicsConstructor("local") 68 { 69 G4EmParameters* param = G4EmParameters::Instance(); 70 param->SetDefaults(); 71 param->SetVerbose(1); 72 param->SetMinEnergy(100 * eV); 73 param->SetMaxEnergy(10 * TeV); 74 param->SetLowestElectronEnergy(100 * eV); 75 param->SetNumberOfBinsPerDecade(20); 76 param->ActivateAngularGeneratorForIonisation(true); 77 param->SetUseMottCorrection(true); 78 param->SetStepFunction(0.2, 100 * CLHEP::um); 79 param->SetStepFunctionMuHad(0.2, 50 * CLHEP::um); 80 param->SetStepFunctionLightIons(0.1, 20 * CLHEP::um); 81 param->SetStepFunctionIons(0.1, 1 * CLHEP::um); 82 param->SetMscRangeFactor(0.03); 83 param->SetLateralDisplacementAlg96(true); 84 param->SetMscStepLimitType(fUseDistanceToBoundary); 85 param->SetMuHadLateralDisplacement(true); 86 param->SetFluctuationType(fUrbanFluctuation); 87 param->SetFluo(true); 88 SetPhysicsType(bElectromagnetic); 89 } 90 91 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 92 93 PhysListEmStandard::~PhysListEmStandard() {} 94 95 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 96 97 void PhysListEmStandard::ConstructProcess() 98 { 99 G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper(); 100 101 // Add standard EM Processes 102 // 103 auto particleIterator = GetParticleIterator(); 104 particleIterator->reset(); 105 while ((*particleIterator)()) { 106 G4ParticleDefinition* particle = particleIterator->value(); 107 G4String particleName = particle->GetParticleName(); 108 109 if (particleName == "gamma") { 110 ph->RegisterProcess(new G4PhotoElectricEffect, particle); 111 G4ComptonScattering* cs = new G4ComptonScattering; 112 cs->SetEmModel(new G4KleinNishinaModel()); 113 ph->RegisterProcess(cs, particle); 114 ph->RegisterProcess(new G4GammaConversion, particle); 115 ph->RegisterProcess(new G4RayleighScattering, particle); 116 } 117 else if (particleName == "e-") { 118 ph->RegisterProcess(new G4eMultipleScattering(), particle); 119 // 120 G4eIonisation* eIoni = new G4eIonisation(); 121 ph->RegisterProcess(eIoni, particle); 122 // 123 ph->RegisterProcess(new G4eBremsstrahlung(), particle); 124 } 125 else if (particleName == "e+") { 126 ph->RegisterProcess(new G4eMultipleScattering(), particle); 127 // 128 G4eIonisation* eIoni = new G4eIonisation(); 129 ph->RegisterProcess(eIoni, particle); 130 // 131 ph->RegisterProcess(new G4eBremsstrahlung(), particle); 132 // 133 ph->RegisterProcess(new G4eplusAnnihilation(), particle); 134 } 135 else if (particleName == "mu+" || particleName == "mu-") { 136 ph->RegisterProcess(new G4MuMultipleScattering(), particle); 137 G4MuIonisation* muIoni = new G4MuIonisation(); 138 ph->RegisterProcess(muIoni, particle); 139 ph->RegisterProcess(new G4MuBremsstrahlung(), particle); 140 ph->RegisterProcess(new G4MuPairProduction(), particle); 141 } 142 else if (particleName == "proton" || particleName == "pi-" || particleName == "pi+") { 143 ph->RegisterProcess(new G4hMultipleScattering(), particle); 144 G4hIonisation* hIoni = new G4hIonisation(); 145 ph->RegisterProcess(hIoni, particle); 146 ph->RegisterProcess(new G4hBremsstrahlung(), particle); 147 ph->RegisterProcess(new G4hPairProduction(), particle); 148 } 149 else if (particleName == "alpha" || particleName == "He3") { 150 ph->RegisterProcess(new G4hMultipleScattering(), particle); 151 G4ionIonisation* ionIoni = new G4ionIonisation(); 152 ph->RegisterProcess(ionIoni, particle); 153 ph->RegisterProcess(new G4NuclearStopping(), particle); 154 } 155 else if (particleName == "GenericIon") { 156 ph->RegisterProcess(new G4hMultipleScattering(), particle); 157 G4ionIonisation* ionIoni = new G4ionIonisation(); 158 ionIoni->SetEmModel(new G4IonParametrisedLossModel()); 159 ph->RegisterProcess(ionIoni, particle); 160 ph->RegisterProcess(new G4NuclearStopping(), particle); 161 } 162 else if ((!particle->IsShortLived()) && (particle->GetPDGCharge() != 0.0) 163 && (particle->GetParticleName() != "chargedgeantino")) 164 { 165 // all others charged particles except geantino 166 ph->RegisterProcess(new G4hMultipleScattering(), particle); 167 ph->RegisterProcess(new G4hIonisation(), particle); 168 } 169 } 170 171 // Deexcitation 172 // 173 G4VAtomDeexcitation* de = new G4UAtomicDeexcitation(); 174 G4LossTableManager::Instance()->SetAtomDeexcitation(de); 175 } 176 177 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 178