File indexing completed on 2025-02-23 09:21:56
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
0036
0037
0038
0039
0040
0041 #include "PhysicsList.hh"
0042
0043 #include "G4DecayPhysics.hh"
0044 #include "G4EmDNABuilder.hh"
0045 #include "G4EmDNAPhysics.hh"
0046 #include "G4EmDNAPhysicsActivator.hh"
0047 #include "G4EmDNAPhysics_option1.hh"
0048 #include "G4EmDNAPhysics_option2.hh"
0049 #include "G4EmDNAPhysics_option3.hh"
0050 #include "G4EmDNAPhysics_option4.hh"
0051 #include "G4EmDNAPhysics_option5.hh"
0052 #include "G4EmDNAPhysics_option6.hh"
0053 #include "G4EmDNAPhysics_option7.hh"
0054 #include "G4EmDNAPhysics_option8.hh"
0055 #include "G4EmLivermorePhysics.hh"
0056 #include "G4EmPenelopePhysics.hh"
0057 #include "G4EmStandardPhysics.hh"
0058 #include "G4EmStandardPhysics_option3.hh"
0059 #include "G4EmStandardPhysics_option4.hh"
0060 #include "G4GenericIon.hh"
0061 #include "G4RadioactiveDecayPhysics.hh"
0062
0063
0064
0065 PhysicsList::PhysicsList() : G4VModularPhysicsList()
0066 {
0067 SetDefaultCutValue(1.0 * micrometer);
0068 SetVerboseLevel(1);
0069
0070 fEmPhysics = "emstandard_opt4";
0071 fEmPhysicsList = new G4EmStandardPhysics_option4();
0072 fDecayPhysicsList = new G4DecayPhysics();
0073 fEmDNAActivator = new G4EmDNAPhysicsActivator();
0074
0075 G4ProductionCutsTable::GetProductionCutsTable()->SetEnergyRange(100 * eV, 1 * GeV);
0076 G4EmParameters* param = G4EmParameters::Instance();
0077 param->SetMinEnergy(100 * eV);
0078 param->SetMaxEnergy(1 * GeV);
0079 }
0080
0081
0082
0083 PhysicsList::~PhysicsList()
0084 {
0085 delete fEmPhysicsList;
0086 delete fEmDNAActivator;
0087 delete fDecayPhysicsList;
0088 delete fRadDecayPhysicsList;
0089 }
0090
0091
0092
0093 void PhysicsList::ConstructParticle()
0094 {
0095 fEmPhysicsList->ConstructParticle();
0096 fDecayPhysicsList->ConstructParticle();
0097 fEmDNAActivator->ConstructParticle();
0098 }
0099
0100
0101
0102 void PhysicsList::ConstructProcess()
0103 {
0104 AddTransportation();
0105 fEmPhysicsList->ConstructProcess();
0106 fDecayPhysicsList->ConstructProcess();
0107
0108 if (nullptr != fRadDecayPhysicsList) {
0109 fRadDecayPhysicsList->ConstructProcess();
0110 }
0111
0112 if (!fDNAPL) {
0113 fEmDNAActivator->ConstructProcess();
0114 }
0115
0116 if (fIsTrackingCutSet) {
0117 TrackingCut();
0118 }
0119 }
0120
0121
0122
0123 void PhysicsList::AddPhysics(const G4String& name)
0124 {
0125 if (name == fEmPhysics) {
0126 return;
0127 }
0128
0129 G4cout << "### PhysicsList::AddPhysics Warning: Physics List <" << name << "> is requested"
0130 << G4endl;
0131
0132 fEmPhysics = name;
0133
0134 if (name == "emstandard_opt0") {
0135 delete fEmPhysicsList;
0136 fEmPhysicsList = new G4EmStandardPhysics();
0137 fDNAPL = false;
0138 }
0139 else if (name == "emstandard_opt3") {
0140 delete fEmPhysicsList;
0141 fEmPhysicsList = new G4EmStandardPhysics_option3();
0142 fDNAPL = false;
0143 }
0144 else if (name == "emstandard_opt4") {
0145 delete fEmPhysicsList;
0146 fEmPhysicsList = new G4EmStandardPhysics_option4();
0147 fDNAPL = false;
0148 }
0149 else if (name == "raddecay") {
0150 if (nullptr == fRadDecayPhysicsList) fRadDecayPhysicsList = new G4RadioactiveDecayPhysics();
0151 }
0152 else if (name == "emlivermore") {
0153 delete fEmPhysicsList;
0154 fEmPhysicsList = new G4EmLivermorePhysics();
0155 fDNAPL = false;
0156 }
0157 else if (name == "empenelope") {
0158 delete fEmPhysicsList;
0159 fEmPhysicsList = new G4EmPenelopePhysics();
0160 fDNAPL = false;
0161 }
0162 else if (name == "DNA_Opt0") {
0163 delete fEmPhysicsList;
0164 fEmPhysicsList = new G4EmDNAPhysics();
0165 fDNAPL = true;
0166 }
0167 else if (name == "DNA_Opt1") {
0168 delete fEmPhysicsList;
0169 fEmPhysicsList = new G4EmDNAPhysics_option1();
0170 fDNAPL = true;
0171 }
0172 else if (name == "DNA_Opt2") {
0173 delete fEmPhysicsList;
0174 fEmPhysicsList = new G4EmDNAPhysics_option2();
0175 fDNAPL = true;
0176 }
0177 else if (name == "DNA_Opt3") {
0178 delete fEmPhysicsList;
0179 fEmPhysicsList = new G4EmDNAPhysics_option3();
0180 fDNAPL = true;
0181 }
0182 else if (name == "DNA_Opt4") {
0183 delete fEmPhysicsList;
0184 fEmPhysicsList = new G4EmDNAPhysics_option4();
0185 fDNAPL = true;
0186 }
0187 else if (name == "DNA_Opt5") {
0188 delete fEmPhysicsList;
0189 fEmPhysicsList = new G4EmDNAPhysics_option5();
0190 fDNAPL = true;
0191 }
0192 else if (name == "DNA_Opt6") {
0193 delete fEmPhysicsList;
0194 fEmPhysicsList = new G4EmDNAPhysics_option6();
0195 fDNAPL = true;
0196 }
0197 else if (name == "DNA_Opt7") {
0198 delete fEmPhysicsList;
0199 fEmPhysicsList = new G4EmDNAPhysics_option7();
0200 fDNAPL = true;
0201 }
0202 else if (name == "DNA_Opt8") {
0203 delete fEmPhysicsList;
0204 fEmPhysicsList = new G4EmDNAPhysics_option8();
0205 fDNAPL = true;
0206 }
0207 else {
0208 G4cout << "### PhysicsList::AddPhysics Warning: Physics List <" << name
0209 << "> is does not exist - the command ignored" << G4endl;
0210 }
0211 }
0212
0213
0214
0215 void PhysicsList::TrackingCut()
0216 {
0217 auto particle = G4GenericIon::GenericIon();
0218 auto particleName = particle->GetParticleName();
0219 auto capture = G4EmDNABuilder::FindOrBuildCapture(0.5 * CLHEP::MeV, particle);
0220 capture->AddRegion("World");
0221 capture->AddRegion("regionTarget");
0222 capture->SetKinEnergyLimit(0.5 * CLHEP::MeV);
0223 }
0224
0225
0226
0227 void PhysicsList::SetTrackingCut(G4bool isCut)
0228 {
0229 fIsTrackingCutSet = isCut;
0230 }