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 XraySPOPhysicsList.cc 27 /// \brief Implementation of the PhysicsList class 28 // 29 // Authors: P.Dondero (paolo.dondero@cern.ch), R.Stanzani (ronny.stanzani@cern.ch) 30 // 31 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 32 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 33 34 35 #include "XraySPOPhysicsList.hh" 36 #include "XraySPOPhysicsListMessenger.hh" 37 38 #include "G4EmStandardPhysics_SpacePhysics.hh" 39 #include "G4EmStandardPhysics.hh" 40 #include "G4EmStandardPhysics_option1.hh" 41 #include "G4EmStandardPhysics_option2.hh" 42 #include "G4EmStandardPhysics_option3.hh" 43 #include "G4EmStandardPhysics_option4.hh" 44 #include "G4EmStandardPhysicsSS.hh" 45 #include "G4EmStandardPhysicsGS.hh" 46 #include "G4EmStandardPhysicsWVI.hh" 47 #include "G4EmLivermorePhysics.hh" 48 #include "G4EmPenelopePhysics.hh" 49 #include "G4EmLowEPPhysics.hh" 50 51 #include "G4LossTableManager.hh" 52 #include "G4UnitsTable.hh" 53 #include "G4SystemOfUnits.hh" 54 55 // particles 56 #include "G4BosonConstructor.hh" 57 #include "G4LeptonConstructor.hh" 58 #include "G4MesonConstructor.hh" 59 #include "G4BosonConstructor.hh" 60 #include "G4BaryonConstructor.hh" 61 #include "G4IonConstructor.hh" 62 #include "G4ShortLivedConstructor.hh" 63 #include "G4Decay.hh" 64 #include "G4PhysicsListHelper.hh" 65 #include "G4RadioactiveDecay.hh" 66 #include "G4GenericIon.hh" 67 68 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 69 70 XraySPOPhysicsList::XraySPOPhysicsList() 71 { 72 fMessenger = new XraySPOPhysicsListMessenger(this); 73 74 SetVerboseLevel(1); 75 76 // EM physics 77 fEmPhysicsList = new G4EmStandardPhysics(); 78 79 G4LossTableManager::Instance(); 80 SetDefaultCutValue(1.*mm); 81 } 82 83 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 84 85 void XraySPOPhysicsList::ConstructParticle() 86 { 87 G4BosonConstructor pBosonConstructor; 88 pBosonConstructor.ConstructParticle(); 89 90 G4LeptonConstructor pLeptonConstructor; 91 pLeptonConstructor.ConstructParticle(); 92 93 G4MesonConstructor pMesonConstructor; 94 pMesonConstructor.ConstructParticle(); 95 96 G4BaryonConstructor pBaryonConstructor; 97 pBaryonConstructor.ConstructParticle(); 98 99 G4IonConstructor pIonConstructor; 100 pIonConstructor.ConstructParticle(); 101 102 G4ShortLivedConstructor pShortLivedConstructor; 103 pShortLivedConstructor.ConstructParticle(); 104 } 105 106 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 107 108 #include "G4ProcessManager.hh" 109 110 void XraySPOPhysicsList::ConstructProcess() 111 { 112 AddTransportation(); 113 114 // electromagnetic physics list 115 fEmPhysicsList->ConstructProcess(); 116 117 // Em options 118 G4EmParameters* param = G4EmParameters::Instance(); 119 param->SetBuildCSDARange(true); 120 param->SetMscThetaLimit(0); 121 122 AddDecay(); 123 124 AddRadioactiveDecay(); 125 } 126 127 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 128 129 void XraySPOPhysicsList::AddPhysicsList(const G4String& name) 130 { 131 if (verboseLevel>0) 132 { 133 G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl; 134 } 135 136 if (name == fEmName) 137 { 138 return; 139 } 140 if (name == "SpacePhysics") 141 { 142 delete fEmPhysicsList; 143 G4cout << "X - Defining SpacePhysics, no hadronic part" << G4endl; 144 fEmName = name; 145 fEmPhysicsList = new G4EmStandardPhysics_SpacePhysics(); 146 } 147 else if (name == "emstandard_opt0") 148 { 149 delete fEmPhysicsList; 150 fEmPhysicsList = new G4EmStandardPhysics(); 151 } 152 else if (name == "emstandard_opt1") 153 { 154 fEmName = name; 155 delete fEmPhysicsList; 156 fEmPhysicsList = new G4EmStandardPhysics_option1(); 157 } 158 else if (name == "emstandard_opt2") 159 { 160 fEmName = name; 161 delete fEmPhysicsList; 162 fEmPhysicsList = new G4EmStandardPhysics_option2(); 163 } 164 else if (name == "emstandard_opt3") 165 { 166 fEmName = name; 167 delete fEmPhysicsList; 168 fEmPhysicsList = new G4EmStandardPhysics_option3(); 169 } 170 else if (name == "emstandard_opt4") 171 { 172 fEmName = name; 173 delete fEmPhysicsList; 174 fEmPhysicsList = new G4EmStandardPhysics_option4(); 175 } 176 else if (name == "emstandardSS") 177 { 178 fEmName = name; 179 delete fEmPhysicsList; 180 fEmPhysicsList = new G4EmStandardPhysicsSS(); 181 } 182 else if (name == "emstandardGS") 183 { 184 fEmName = name; 185 delete fEmPhysicsList; 186 fEmPhysicsList = new G4EmStandardPhysicsGS(); 187 } 188 else if (name == "emstandardWVI") 189 { 190 fEmName = name; 191 delete fEmPhysicsList; 192 fEmPhysicsList = new G4EmStandardPhysicsWVI(); 193 } 194 else if (name == "emlowenergy") 195 { 196 fEmName = name; 197 delete fEmPhysicsList; 198 fEmPhysicsList = new G4EmLowEPPhysics(); 199 } 200 else if (name == "emlivermore") 201 { 202 fEmName = name; 203 delete fEmPhysicsList; 204 fEmPhysicsList = new G4EmLivermorePhysics(); 205 } 206 else if (name == "empenelope") 207 { 208 fEmName = name; 209 delete fEmPhysicsList; 210 fEmPhysicsList = new G4EmPenelopePhysics(); 211 } 212 else 213 { 214 G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" 215 << " is not defined" 216 << G4endl; 217 } 218 } 219 220 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 221 222 void XraySPOPhysicsList::AddDecay() 223 { 224 // decay process 225 G4Decay* decay = new G4Decay(); 226 G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper(); 227 228 auto particleIterator=GetParticleIterator(); 229 particleIterator->reset(); 230 while( (*particleIterator)() ) 231 { 232 G4ParticleDefinition* particle = particleIterator->value(); 233 if (decay->IsApplicable(*particle) && !particle->IsShortLived()) 234 { 235 ph->RegisterProcess(decay, particle); 236 } 237 } 238 } 239 240 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 241 242 void XraySPOPhysicsList::AddRadioactiveDecay() 243 { 244 G4RadioactiveDecay* radioactiveDecay = new G4RadioactiveDecay(); 245 246 radioactiveDecay->SetARM(true); //Atomic Rearangement 247 248 G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper(); 249 ph->RegisterProcess(radioactiveDecay, G4GenericIon::GenericIon()); 250 } 251 252 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 253 254