File indexing completed on 2025-01-18 09:17:11
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035 #include "XraySPOPhysicsList.hh"
0036 #include "XraySPOPhysicsListMessenger.hh"
0037
0038 #include "G4EmStandardPhysics_SpacePhysics.hh"
0039 #include "G4EmStandardPhysics.hh"
0040 #include "G4EmStandardPhysics_option1.hh"
0041 #include "G4EmStandardPhysics_option2.hh"
0042 #include "G4EmStandardPhysics_option3.hh"
0043 #include "G4EmStandardPhysics_option4.hh"
0044 #include "G4EmStandardPhysicsSS.hh"
0045 #include "G4EmStandardPhysicsGS.hh"
0046 #include "G4EmStandardPhysicsWVI.hh"
0047 #include "G4EmLivermorePhysics.hh"
0048 #include "G4EmPenelopePhysics.hh"
0049 #include "G4EmLowEPPhysics.hh"
0050
0051 #include "G4LossTableManager.hh"
0052 #include "G4UnitsTable.hh"
0053 #include "G4SystemOfUnits.hh"
0054
0055
0056 #include "G4BosonConstructor.hh"
0057 #include "G4LeptonConstructor.hh"
0058 #include "G4MesonConstructor.hh"
0059 #include "G4BosonConstructor.hh"
0060 #include "G4BaryonConstructor.hh"
0061 #include "G4IonConstructor.hh"
0062 #include "G4ShortLivedConstructor.hh"
0063 #include "G4Decay.hh"
0064 #include "G4PhysicsListHelper.hh"
0065 #include "G4RadioactiveDecay.hh"
0066 #include "G4GenericIon.hh"
0067
0068
0069
0070 XraySPOPhysicsList::XraySPOPhysicsList()
0071 {
0072 fMessenger = new XraySPOPhysicsListMessenger(this);
0073
0074 SetVerboseLevel(1);
0075
0076
0077 fEmPhysicsList = new G4EmStandardPhysics();
0078
0079 G4LossTableManager::Instance();
0080 SetDefaultCutValue(1.*mm);
0081 }
0082
0083
0084
0085 void XraySPOPhysicsList::ConstructParticle()
0086 {
0087 G4BosonConstructor pBosonConstructor;
0088 pBosonConstructor.ConstructParticle();
0089
0090 G4LeptonConstructor pLeptonConstructor;
0091 pLeptonConstructor.ConstructParticle();
0092
0093 G4MesonConstructor pMesonConstructor;
0094 pMesonConstructor.ConstructParticle();
0095
0096 G4BaryonConstructor pBaryonConstructor;
0097 pBaryonConstructor.ConstructParticle();
0098
0099 G4IonConstructor pIonConstructor;
0100 pIonConstructor.ConstructParticle();
0101
0102 G4ShortLivedConstructor pShortLivedConstructor;
0103 pShortLivedConstructor.ConstructParticle();
0104 }
0105
0106
0107
0108 #include "G4ProcessManager.hh"
0109
0110 void XraySPOPhysicsList::ConstructProcess()
0111 {
0112 AddTransportation();
0113
0114
0115 fEmPhysicsList->ConstructProcess();
0116
0117
0118 G4EmParameters* param = G4EmParameters::Instance();
0119 param->SetBuildCSDARange(true);
0120 param->SetMscThetaLimit(0);
0121
0122 AddDecay();
0123
0124 AddRadioactiveDecay();
0125 }
0126
0127
0128
0129 void XraySPOPhysicsList::AddPhysicsList(const G4String& name)
0130 {
0131 if (verboseLevel>0)
0132 {
0133 G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
0134 }
0135
0136 if (name == fEmName)
0137 {
0138 return;
0139 }
0140 if (name == "SpacePhysics")
0141 {
0142 delete fEmPhysicsList;
0143 G4cout << "X - Defining SpacePhysics, no hadronic part" << G4endl;
0144 fEmName = name;
0145 fEmPhysicsList = new G4EmStandardPhysics_SpacePhysics();
0146 }
0147 else if (name == "emstandard_opt0")
0148 {
0149 delete fEmPhysicsList;
0150 fEmPhysicsList = new G4EmStandardPhysics();
0151 }
0152 else if (name == "emstandard_opt1")
0153 {
0154 fEmName = name;
0155 delete fEmPhysicsList;
0156 fEmPhysicsList = new G4EmStandardPhysics_option1();
0157 }
0158 else if (name == "emstandard_opt2")
0159 {
0160 fEmName = name;
0161 delete fEmPhysicsList;
0162 fEmPhysicsList = new G4EmStandardPhysics_option2();
0163 }
0164 else if (name == "emstandard_opt3")
0165 {
0166 fEmName = name;
0167 delete fEmPhysicsList;
0168 fEmPhysicsList = new G4EmStandardPhysics_option3();
0169 }
0170 else if (name == "emstandard_opt4")
0171 {
0172 fEmName = name;
0173 delete fEmPhysicsList;
0174 fEmPhysicsList = new G4EmStandardPhysics_option4();
0175 }
0176 else if (name == "emstandardSS")
0177 {
0178 fEmName = name;
0179 delete fEmPhysicsList;
0180 fEmPhysicsList = new G4EmStandardPhysicsSS();
0181 }
0182 else if (name == "emstandardGS")
0183 {
0184 fEmName = name;
0185 delete fEmPhysicsList;
0186 fEmPhysicsList = new G4EmStandardPhysicsGS();
0187 }
0188 else if (name == "emstandardWVI")
0189 {
0190 fEmName = name;
0191 delete fEmPhysicsList;
0192 fEmPhysicsList = new G4EmStandardPhysicsWVI();
0193 }
0194 else if (name == "emlowenergy")
0195 {
0196 fEmName = name;
0197 delete fEmPhysicsList;
0198 fEmPhysicsList = new G4EmLowEPPhysics();
0199 }
0200 else if (name == "emlivermore")
0201 {
0202 fEmName = name;
0203 delete fEmPhysicsList;
0204 fEmPhysicsList = new G4EmLivermorePhysics();
0205 }
0206 else if (name == "empenelope")
0207 {
0208 fEmName = name;
0209 delete fEmPhysicsList;
0210 fEmPhysicsList = new G4EmPenelopePhysics();
0211 }
0212 else
0213 {
0214 G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
0215 << " is not defined"
0216 << G4endl;
0217 }
0218 }
0219
0220
0221
0222 void XraySPOPhysicsList::AddDecay()
0223 {
0224
0225 G4Decay* decay = new G4Decay();
0226 G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
0227
0228 auto particleIterator=GetParticleIterator();
0229 particleIterator->reset();
0230 while( (*particleIterator)() )
0231 {
0232 G4ParticleDefinition* particle = particleIterator->value();
0233 if (decay->IsApplicable(*particle) && !particle->IsShortLived())
0234 {
0235 ph->RegisterProcess(decay, particle);
0236 }
0237 }
0238 }
0239
0240
0241
0242 void XraySPOPhysicsList::AddRadioactiveDecay()
0243 {
0244 G4RadioactiveDecay* radioactiveDecay = new G4RadioactiveDecay();
0245
0246 radioactiveDecay->SetARM(true);
0247
0248 G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
0249 ph->RegisterProcess(radioactiveDecay, G4GenericIon::GenericIon());
0250 }
0251
0252
0253