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 // GEANT 4 - ULTRA experiment example 29 // -------------------------------------------------------------- 30 // 31 // Code developed by: 32 // B. Tome, M.C. Espirito-Santo, A. Trindade, P. Rodrigues 33 // 34 // **************************************************** 35 // * UltraPhysicsList.cc 36 // **************************************************** 37 // 38 // Ultra Physics List class; Standard and Low Energy EM processes are defined for 39 // the relevant particles. Optical processes are declared. 40 // 41 #include "G4ios.hh" 42 //#include "iomanip.h" 43 #include "globals.hh" 44 45 #include "UltraPhysicsList.hh" 46 47 #include "G4ParticleDefinition.hh" 48 #include "G4ParticleTypes.hh" 49 #include "G4ParticleWithCuts.hh" 50 #include "G4ParticleTable.hh" 51 #include "G4Material.hh" 52 #include "G4MaterialTable.hh" 53 #include "G4ProcessManager.hh" 54 #include "G4ProcessVector.hh" 55 56 #include "G4EmStandardPhysics.hh" 57 #include "G4EmLivermorePhysics.hh" 58 #include "G4EmPenelopePhysics.hh" 59 #include "G4EmLowEPPhysics.hh" 60 #include "G4DecayPhysics.hh" 61 #include "G4IonPhysics.hh" 62 #include "G4EmExtraPhysics.hh" 63 #include "G4StoppingPhysics.hh" 64 #include "G4OpticalPhysics.hh" 65 66 #include "G4UnitsTable.hh" 67 #include "G4SystemOfUnits.hh" 68 #include "G4LossTableManager.hh" 69 70 UltraPhysicsList::UltraPhysicsList() : G4VModularPhysicsList(), 71 fEmPhysicsList(0), 72 fOpPhysicsList(0), 73 fDecayPhysicsList(0), 74 fVerboseLebel(1), 75 fMaxNumPhotonStep(20) 76 { 77 G4LossTableManager::Instance(); 78 SetDefaultCutValue(1*mm); 79 80 // fMessenger = new UltraPhysicsListMessenger(this); 81 // fStepMaxProcess = new StepMax(); 82 83 // Initilise flags 84 85 SetVerboseLevel(1); 86 87 88 // EM physics 89 fEmName = G4String("emstandard"); 90 fEmPhysicsList = new G4EmStandardPhysics(); 91 fOpPhysicsList = new G4OpticalPhysics(); 92 93 // Decay Physics is always defined 94 fDecayPhysicsList = new G4DecayPhysics(); 95 } 96 97 UltraPhysicsList::~UltraPhysicsList() 98 { 99 delete fDecayPhysicsList; 100 delete fEmPhysicsList; 101 delete fOpPhysicsList; 102 // delete fStepMaxProcess; 103 } 104 105 106 void UltraPhysicsList::ConstructParticle() 107 { 108 fDecayPhysicsList->ConstructParticle(); 109 } 110 111 112 void UltraPhysicsList::ConstructProcess() 113 { 114 AddTransportation(); 115 if (fEmPhysicsList) 116 fEmPhysicsList->ConstructProcess(); 117 118 if (fOpPhysicsList) 119 fOpPhysicsList->ConstructProcess(); 120 121 if (fDecayPhysicsList) 122 fDecayPhysicsList->ConstructProcess(); 123 } 124 125 126 void UltraPhysicsList::SetCuts() 127 { 128 if (verboseLevel >1){ 129 G4cout << "UltraPhysicsList::SetCuts:"; 130 } 131 // " G4VUserPhysicsList::SetCutsWithDefault" method sets 132 // the default cut value for all particle types 133 SetCutsWithDefault(); 134 } 135