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 /// \file electromagnetic/TestEm0/src/PhysicsL 26 /// \file electromagnetic/TestEm0/src/PhysicsList.cc 27 /// \brief Implementation of the PhysicsList c 27 /// \brief Implementation of the PhysicsList class 28 // 28 // >> 29 // 29 // 30 // 30 //....oooOO0OOooo........oooOO0OOooo........oo 31 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 31 //....oooOO0OOooo........oooOO0OOooo........oo 32 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 32 33 33 #include "PhysicsList.hh" 34 #include "PhysicsList.hh" 34 << 35 #include "PhysListEmStandard.hh" << 36 #include "PhysicsListMessenger.hh" 35 #include "PhysicsListMessenger.hh" 37 << 36 38 #include "G4EmLivermorePhysics.hh" << 37 #include "PhysListEmStandard.hh" 39 #include "G4EmParameters.hh" << 40 #include "G4EmPenelopePhysics.hh" << 41 #include "G4EmStandardPhysics.hh" 38 #include "G4EmStandardPhysics.hh" 42 #include "G4EmStandardPhysics_option1.hh" 39 #include "G4EmStandardPhysics_option1.hh" 43 #include "G4EmStandardPhysics_option2.hh" 40 #include "G4EmStandardPhysics_option2.hh" 44 #include "G4EmStandardPhysics_option3.hh" 41 #include "G4EmStandardPhysics_option3.hh" 45 #include "G4EmStandardPhysics_option4.hh" 42 #include "G4EmStandardPhysics_option4.hh" >> 43 #include "G4EmLivermorePhysics.hh" >> 44 #include "G4EmPenelopePhysics.hh" >> 45 46 #include "G4LossTableManager.hh" 46 #include "G4LossTableManager.hh" 47 #include "G4SystemOfUnits.hh" << 48 #include "G4UnitsTable.hh" 47 #include "G4UnitsTable.hh" >> 48 #include "G4SystemOfUnits.hh" >> 49 >> 50 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... >> 51 >> 52 PhysicsList::PhysicsList() >> 53 : G4VModularPhysicsList(), >> 54 fEmPhysicsList(0),fEmName("local"),fMessenger(0) >> 55 { >> 56 G4LossTableManager::Instance(); >> 57 >> 58 // set default cut value >> 59 SetDefaultCutValue(1.0*mm); >> 60 >> 61 fMessenger = new PhysicsListMessenger(this); >> 62 >> 63 SetVerboseLevel(1); >> 64 >> 65 // EM physics >> 66 fEmName = G4String("local"); >> 67 fEmPhysicsList = new PhysListEmStandard(fEmName); >> 68 >> 69 //add new units for cross sections >> 70 // >> 71 new G4UnitDefinition( "mm2/g", "mm2/g","Surface/Mass", mm2/g); >> 72 new G4UnitDefinition( "um2/mg", "um2/mg","Surface/Mass", um*um/mg); >> 73 } >> 74 >> 75 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... >> 76 >> 77 PhysicsList::~PhysicsList() >> 78 { >> 79 delete fMessenger; >> 80 } >> 81 >> 82 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 49 83 50 // Bosons 84 // Bosons 51 #include "G4ChargedGeantino.hh" 85 #include "G4ChargedGeantino.hh" 52 #include "G4Gamma.hh" << 53 #include "G4Geantino.hh" 86 #include "G4Geantino.hh" >> 87 #include "G4Gamma.hh" 54 #include "G4OpticalPhoton.hh" 88 #include "G4OpticalPhoton.hh" 55 89 56 // leptons 90 // leptons 57 #include "G4AntiNeutrinoE.hh" << 58 #include "G4AntiNeutrinoMu.hh" << 59 #include "G4Electron.hh" << 60 #include "G4MuonMinus.hh" << 61 #include "G4MuonPlus.hh" 91 #include "G4MuonPlus.hh" 62 #include "G4NeutrinoE.hh" << 92 #include "G4MuonMinus.hh" 63 #include "G4NeutrinoMu.hh" 93 #include "G4NeutrinoMu.hh" >> 94 #include "G4AntiNeutrinoMu.hh" >> 95 >> 96 #include "G4Electron.hh" 64 #include "G4Positron.hh" 97 #include "G4Positron.hh" >> 98 #include "G4NeutrinoE.hh" >> 99 #include "G4AntiNeutrinoE.hh" 65 100 66 // Mesons 101 // Mesons 67 #include "G4AntiKaonZero.hh" << 102 #include "G4PionPlus.hh" >> 103 #include "G4PionMinus.hh" >> 104 #include "G4PionZero.hh" 68 #include "G4Eta.hh" 105 #include "G4Eta.hh" 69 #include "G4EtaPrime.hh" 106 #include "G4EtaPrime.hh" 70 #include "G4KaonMinus.hh" << 107 71 #include "G4KaonPlus.hh" 108 #include "G4KaonPlus.hh" >> 109 #include "G4KaonMinus.hh" 72 #include "G4KaonZero.hh" 110 #include "G4KaonZero.hh" >> 111 #include "G4AntiKaonZero.hh" 73 #include "G4KaonZeroLong.hh" 112 #include "G4KaonZeroLong.hh" 74 #include "G4KaonZeroShort.hh" 113 #include "G4KaonZeroShort.hh" 75 #include "G4PionMinus.hh" << 76 #include "G4PionPlus.hh" << 77 #include "G4PionZero.hh" << 78 114 79 // Baryons 115 // Baryons 80 #include "G4AntiNeutron.hh" << 116 #include "G4Proton.hh" 81 #include "G4AntiProton.hh" 117 #include "G4AntiProton.hh" 82 #include "G4Neutron.hh" 118 #include "G4Neutron.hh" 83 #include "G4Proton.hh" << 119 #include "G4AntiNeutron.hh" 84 120 85 // Nuclei 121 // Nuclei 86 #include "G4Alpha.hh" << 87 #include "G4Deuteron.hh" 122 #include "G4Deuteron.hh" 88 #include "G4GenericIon.hh" << 89 #include "G4Triton.hh" 123 #include "G4Triton.hh" 90 << 124 #include "G4Alpha.hh" 91 //....oooOO0OOooo........oooOO0OOooo........oo << 125 #include "G4GenericIon.hh" 92 << 93 PhysicsList::PhysicsList() << 94 { << 95 fMessenger = new PhysicsListMessenger(this); << 96 << 97 // set default cut value << 98 SetDefaultCutValue(1.0 * mm); << 99 << 100 SetVerboseLevel(1); << 101 << 102 AddPhysicsList("emstandard_opt0"); << 103 << 104 G4ProductionCutsTable::GetProductionCutsTabl << 105 << 106 // add new units for cross sections << 107 // << 108 new G4UnitDefinition("mm2/g", "mm2/g", "Surf << 109 new G4UnitDefinition("um2/mg", "um2/mg", "Su << 110 } << 111 << 112 //....oooOO0OOooo........oooOO0OOooo........oo << 113 << 114 PhysicsList::~PhysicsList() << 115 { << 116 delete fMessenger; << 117 } << 118 126 119 //....oooOO0OOooo........oooOO0OOooo........oo 127 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 120 128 121 void PhysicsList::ConstructParticle() 129 void PhysicsList::ConstructParticle() 122 { 130 { 123 // pseudo-particles << 131 // pseudo-particles 124 G4Geantino::GeantinoDefinition(); 132 G4Geantino::GeantinoDefinition(); 125 G4ChargedGeantino::ChargedGeantinoDefinition 133 G4ChargedGeantino::ChargedGeantinoDefinition(); 126 << 134 127 // gamma << 135 // gamma 128 G4Gamma::GammaDefinition(); 136 G4Gamma::GammaDefinition(); 129 << 137 130 // optical photon << 138 // optical photon 131 G4OpticalPhoton::OpticalPhotonDefinition(); 139 G4OpticalPhoton::OpticalPhotonDefinition(); 132 140 133 // leptons << 141 // leptons 134 G4Electron::ElectronDefinition(); 142 G4Electron::ElectronDefinition(); 135 G4Positron::PositronDefinition(); 143 G4Positron::PositronDefinition(); 136 G4MuonPlus::MuonPlusDefinition(); 144 G4MuonPlus::MuonPlusDefinition(); 137 G4MuonMinus::MuonMinusDefinition(); 145 G4MuonMinus::MuonMinusDefinition(); 138 146 139 G4NeutrinoE::NeutrinoEDefinition(); 147 G4NeutrinoE::NeutrinoEDefinition(); 140 G4AntiNeutrinoE::AntiNeutrinoEDefinition(); 148 G4AntiNeutrinoE::AntiNeutrinoEDefinition(); 141 G4NeutrinoMu::NeutrinoMuDefinition(); 149 G4NeutrinoMu::NeutrinoMuDefinition(); 142 G4AntiNeutrinoMu::AntiNeutrinoMuDefinition() << 150 G4AntiNeutrinoMu::AntiNeutrinoMuDefinition(); 143 151 144 // mesons << 152 // mesons 145 G4PionPlus::PionPlusDefinition(); 153 G4PionPlus::PionPlusDefinition(); 146 G4PionMinus::PionMinusDefinition(); 154 G4PionMinus::PionMinusDefinition(); 147 G4PionZero::PionZeroDefinition(); 155 G4PionZero::PionZeroDefinition(); 148 G4Eta::EtaDefinition(); 156 G4Eta::EtaDefinition(); 149 G4EtaPrime::EtaPrimeDefinition(); 157 G4EtaPrime::EtaPrimeDefinition(); 150 G4KaonPlus::KaonPlusDefinition(); 158 G4KaonPlus::KaonPlusDefinition(); 151 G4KaonMinus::KaonMinusDefinition(); 159 G4KaonMinus::KaonMinusDefinition(); 152 G4KaonZero::KaonZeroDefinition(); 160 G4KaonZero::KaonZeroDefinition(); 153 G4AntiKaonZero::AntiKaonZeroDefinition(); 161 G4AntiKaonZero::AntiKaonZeroDefinition(); 154 G4KaonZeroLong::KaonZeroLongDefinition(); 162 G4KaonZeroLong::KaonZeroLongDefinition(); 155 G4KaonZeroShort::KaonZeroShortDefinition(); 163 G4KaonZeroShort::KaonZeroShortDefinition(); 156 164 157 // barions << 165 // barions 158 G4Proton::ProtonDefinition(); 166 G4Proton::ProtonDefinition(); 159 G4AntiProton::AntiProtonDefinition(); 167 G4AntiProton::AntiProtonDefinition(); 160 G4Neutron::NeutronDefinition(); 168 G4Neutron::NeutronDefinition(); 161 G4AntiNeutron::AntiNeutronDefinition(); 169 G4AntiNeutron::AntiNeutronDefinition(); 162 170 163 // ions << 171 // ions 164 G4Deuteron::DeuteronDefinition(); 172 G4Deuteron::DeuteronDefinition(); 165 G4Triton::TritonDefinition(); 173 G4Triton::TritonDefinition(); 166 G4Alpha::AlphaDefinition(); 174 G4Alpha::AlphaDefinition(); 167 G4GenericIon::GenericIonDefinition(); 175 G4GenericIon::GenericIonDefinition(); 168 } 176 } 169 177 170 //....oooOO0OOooo........oooOO0OOooo........oo 178 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 171 179 172 void PhysicsList::ConstructProcess() 180 void PhysicsList::ConstructProcess() 173 { 181 { 174 // Transportation 182 // Transportation 175 // 183 // 176 AddTransportation(); 184 AddTransportation(); 177 185 178 // Electromagnetic physics list 186 // Electromagnetic physics list 179 // 187 // 180 fEmPhysicsList->ConstructProcess(); << 188 fEmPhysicsList->ConstructProcess(); 181 } 189 } 182 190 183 //....oooOO0OOooo........oooOO0OOooo........oo 191 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 184 192 185 void PhysicsList::AddPhysicsList(const G4Strin 193 void PhysicsList::AddPhysicsList(const G4String& name) 186 { 194 { 187 if (verboseLevel > 0) { << 195 if (verboseLevel>0) { 188 G4cout << "PhysicsList::AddPhysicsList: <" 196 G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl; 189 } 197 } 190 << 198 191 if (name == fEmName) return; 199 if (name == fEmName) return; 192 200 193 if (name == "local") { 201 if (name == "local") { >> 202 194 fEmName = name; 203 fEmName = name; 195 delete fEmPhysicsList; 204 delete fEmPhysicsList; 196 fEmPhysicsList = new PhysListEmStandard(na 205 fEmPhysicsList = new PhysListEmStandard(name); 197 } << 206 198 else if (name == "emstandard_opt0") { << 207 } else if (name == "emstandard_opt0"){ 199 fEmName = name; 208 fEmName = name; 200 delete fEmPhysicsList; 209 delete fEmPhysicsList; 201 fEmPhysicsList = new G4EmStandardPhysics() 210 fEmPhysicsList = new G4EmStandardPhysics(); 202 } << 211 203 else if (name == "emstandard_opt1") { << 212 } else if (name == "emstandard_opt1"){ 204 fEmName = name; 213 fEmName = name; 205 delete fEmPhysicsList; 214 delete fEmPhysicsList; 206 fEmPhysicsList = new G4EmStandardPhysics_o 215 fEmPhysicsList = new G4EmStandardPhysics_option1(); 207 } << 216 208 else if (name == "emstandard_opt2") { << 217 } else if (name == "emstandard_opt2"){ 209 fEmName = name; 218 fEmName = name; 210 delete fEmPhysicsList; 219 delete fEmPhysicsList; 211 fEmPhysicsList = new G4EmStandardPhysics_o 220 fEmPhysicsList = new G4EmStandardPhysics_option2(); 212 } << 221 213 else if (name == "emstandard_opt3") { << 222 } else if (name == "emstandard_opt3"){ 214 fEmName = name; 223 fEmName = name; 215 delete fEmPhysicsList; 224 delete fEmPhysicsList; 216 fEmPhysicsList = new G4EmStandardPhysics_o 225 fEmPhysicsList = new G4EmStandardPhysics_option3(); 217 } << 226 218 else if (name == "emstandard_opt4") { << 227 } else if (name == "emstandard_opt4"){ 219 fEmName = name; 228 fEmName = name; 220 delete fEmPhysicsList; 229 delete fEmPhysicsList; 221 fEmPhysicsList = new G4EmStandardPhysics_o 230 fEmPhysicsList = new G4EmStandardPhysics_option4(); 222 } << 231 223 else if (name == "empenelope") { << 232 } else if (name == "empenelope"){ 224 fEmName = name; 233 fEmName = name; 225 delete fEmPhysicsList; 234 delete fEmPhysicsList; 226 fEmPhysicsList = new G4EmPenelopePhysics() 235 fEmPhysicsList = new G4EmPenelopePhysics(); 227 } << 236 228 else if (name == "emlivermore") { << 237 } else if (name == "emlivermore"){ 229 fEmName = name; 238 fEmName = name; 230 delete fEmPhysicsList; 239 delete fEmPhysicsList; 231 fEmPhysicsList = new G4EmLivermorePhysics( 240 fEmPhysicsList = new G4EmLivermorePhysics(); 232 } << 241 233 else { << 242 } else { >> 243 234 G4cout << "PhysicsList::AddPhysicsList: <" 244 G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" 235 << " is not defined" << G4endl; << 245 << " is not defined" >> 246 << G4endl; 236 } 247 } >> 248 } 237 249 238 // Em options << 250 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 239 // << 251 240 G4EmParameters::Instance()->SetBuildCSDARang << 252 #include "G4Gamma.hh" 241 G4EmParameters::Instance()->SetGeneralProces << 253 #include "G4Electron.hh" >> 254 #include "G4Positron.hh" >> 255 >> 256 void PhysicsList::SetCuts() >> 257 { >> 258 // fixe lower limit for cut >> 259 G4ProductionCutsTable::GetProductionCutsTable()->SetEnergyRange(100*eV, 1*GeV); >> 260 >> 261 // call base class method to set cuts which default value can be >> 262 // modified via /run/setCut/* commands >> 263 G4VUserPhysicsList::SetCuts(); >> 264 >> 265 DumpCutValuesTable(); 242 } 266 } 243 267 244 //....oooOO0OOooo........oooOO0OOooo........oo 268 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 245 269