![]() |
|
|||
File indexing completed on 2025-02-23 09:20:59
0001 // 0002 // ******************************************************************** 0003 // * License and Disclaimer * 0004 // * * 0005 // * The Geant4 software is copyright of the Copyright Holders of * 0006 // * the Geant4 Collaboration. It is provided under the terms and * 0007 // * conditions of the Geant4 Software License, included in the file * 0008 // * LICENSE and available at http://cern.ch/geant4/license . These * 0009 // * include a list of copyright holders. * 0010 // * * 0011 // * Neither the authors of this software system, nor their employing * 0012 // * institutes,nor the agencies providing financial support for this * 0013 // * work make any representation or warranty, express or implied, * 0014 // * regarding this software system or assume any liability for its * 0015 // * use. Please see the license in the file LICENSE and URL above * 0016 // * for the full disclaimer and the limitation of liability. * 0017 // * * 0018 // * This code implementation is the result of the scientific and * 0019 // * technical work of the GEANT4 collaboration. * 0020 // * By using, copying, modifying or distributing the software (or * 0021 // * any work based on the software) you agree to acknowledge its * 0022 // * use in resulting scientific publications, and indicate your * 0023 // * acceptance of all terms of the Geant4 Software license. * 0024 // ******************************************************************** 0025 // 0026 /// \file electromagnetic/TestEm4/src/PhysicsList.cc 0027 /// \brief Implementation of the PhysicsList class 0028 // 0029 // 0030 // 0031 0032 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0033 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0034 0035 #include "PhysicsList.hh" 0036 0037 #include "G4ComptonScattering.hh" 0038 #include "G4EmBuilder.hh" 0039 #include "G4GammaConversion.hh" 0040 #include "G4ParticleDefinition.hh" 0041 #include "G4ParticleTable.hh" 0042 #include "G4ParticleTypes.hh" 0043 #include "G4PhotoElectricEffect.hh" 0044 #include "G4PhysicsListHelper.hh" 0045 #include "G4ProcessManager.hh" 0046 #include "G4SystemOfUnits.hh" 0047 #include "G4eBremsstrahlung.hh" 0048 #include "G4eIonisation.hh" 0049 #include "G4eMultipleScattering.hh" 0050 #include "G4eplusAnnihilation.hh" 0051 0052 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0053 0054 PhysicsList::PhysicsList() 0055 { 0056 defaultCutValue = 1.0 * mm; 0057 } 0058 0059 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0060 0061 void PhysicsList::ConstructParticle() 0062 { 0063 // In this method, static member functions should be called 0064 // for all particles which you want to use. 0065 // This ensures that objects of these particle types will be 0066 // created in the program. 0067 G4EmBuilder::ConstructMinimalEmSet(); 0068 } 0069 0070 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 0071 0072 void PhysicsList::ConstructProcess() 0073 { 0074 AddTransportation(); 0075 G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper(); 0076 0077 auto particleIterator = GetParticleIterator(); 0078 particleIterator->reset(); 0079 while ((*particleIterator)()) { 0080 G4ParticleDefinition* particle = particleIterator->value(); 0081 G4String particleName = particle->GetParticleName(); 0082 0083 if (particleName == "gamma") { 0084 ph->RegisterProcess(new G4PhotoElectricEffect, particle); 0085 ph->RegisterProcess(new G4ComptonScattering, particle); 0086 ph->RegisterProcess(new G4GammaConversion, particle); 0087 } 0088 else if (particleName == "e-") { 0089 ph->RegisterProcess(new G4eMultipleScattering, particle); 0090 ph->RegisterProcess(new G4eIonisation, particle); 0091 ph->RegisterProcess(new G4eBremsstrahlung, particle); 0092 } 0093 else if (particleName == "e+") { 0094 ph->RegisterProcess(new G4eMultipleScattering, particle); 0095 ph->RegisterProcess(new G4eIonisation, particle); 0096 ph->RegisterProcess(new G4eBremsstrahlung, particle); 0097 ph->RegisterProcess(new G4eplusAnnihilation, particle); 0098 } 0099 } 0100 } 0101 0102 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |