Warning, file /geant4/examples/extended/medical/dna/dnaphysics/src/PhysicsList.cc was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
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 #include "PhysicsList.hh"
0040
0041 #include "G4DecayPhysics.hh"
0042 #include "G4EmDNABuilder.hh"
0043 #include "G4EmDNAPhysics.hh"
0044 #include "G4EmDNAPhysics_option1.hh"
0045 #include "G4EmDNAPhysics_option2.hh"
0046 #include "G4EmDNAPhysics_option3.hh"
0047 #include "G4EmDNAPhysics_option4.hh"
0048 #include "G4EmDNAPhysics_option5.hh"
0049 #include "G4EmDNAPhysics_option6.hh"
0050 #include "G4EmDNAPhysics_option7.hh"
0051 #include "G4EmDNAPhysics_option8.hh"
0052 #include "G4EmLivermorePhysics.hh"
0053 #include "G4EmParameters.hh"
0054 #include "G4EmPenelopePhysics.hh"
0055 #include "G4EmStandardPhysics.hh"
0056 #include "G4EmStandardPhysics_option3.hh"
0057 #include "G4EmStandardPhysics_option4.hh"
0058 #include "G4GenericIon.hh"
0059 #include "G4RadioactiveDecayPhysics.hh"
0060 #include "G4SystemOfUnits.hh"
0061 #include "G4NuclideTable.hh"
0062
0063
0064
0065 PhysicsList::PhysicsList() : G4VModularPhysicsList()
0066 {
0067 SetDefaultCutValue(1.0 * micrometer);
0068 SetVerboseLevel(1);
0069
0070 fEmPhysics = "DNA_Opt2";
0071 fEmPhysicsList = new G4EmDNAPhysics_option2();
0072 fDecayPhysicsList = new G4DecayPhysics();
0073
0074 G4ProductionCutsTable::GetProductionCutsTable()->SetEnergyRange(100 * eV, 1 * GeV);
0075 G4EmParameters* param = G4EmParameters::Instance();
0076 param->SetMinEnergy(100 * eV);
0077 param->SetMaxEnergy(1 * GeV);
0078
0079
0080 G4NuclideTable::GetInstance()->SetThresholdOfHalfLife(0.1 * picosecond);
0081 G4NuclideTable::GetInstance()->SetLevelTolerance(1.0 * eV);
0082 }
0083
0084
0085
0086 PhysicsList::~PhysicsList()
0087 {
0088 delete fEmPhysicsList;
0089 delete fDecayPhysicsList;
0090 delete fRadDecayPhysicsList;
0091 }
0092
0093
0094
0095 void PhysicsList::ConstructParticle()
0096 {
0097 fEmPhysicsList->ConstructParticle();
0098 fDecayPhysicsList->ConstructParticle();
0099 }
0100
0101
0102
0103 void PhysicsList::ConstructProcess()
0104 {
0105 AddTransportation();
0106 fEmPhysicsList->ConstructProcess();
0107 fDecayPhysicsList->ConstructProcess();
0108 if (nullptr != fRadDecayPhysicsList) {
0109 fRadDecayPhysicsList->ConstructProcess();
0110 }
0111 if (fIsTrackingCutSet) {
0112 TrackingCut();
0113 }
0114 }
0115
0116
0117
0118 void PhysicsList::AddPhysics(const G4String& name)
0119 {
0120 if (name == fEmPhysics) {
0121 return;
0122 }
0123
0124 G4cout << "### PhysicsList::AddPhysics Warning: Physics List <" << name << "> is requested"
0125 << G4endl;
0126
0127 fEmPhysics = name;
0128
0129 if (name == "emstandard_opt0") {
0130 delete fEmPhysicsList;
0131 fEmPhysicsList = new G4EmStandardPhysics();
0132 }
0133 else if (name == "emstandard_opt3") {
0134 delete fEmPhysicsList;
0135 fEmPhysicsList = new G4EmStandardPhysics_option3();
0136 }
0137 else if (name == "emstandard_opt4") {
0138 delete fEmPhysicsList;
0139 fEmPhysicsList = new G4EmStandardPhysics_option4();
0140 }
0141 else if (name == "raddecay") {
0142 if (nullptr == fRadDecayPhysicsList) fRadDecayPhysicsList = new G4RadioactiveDecayPhysics();
0143 }
0144 else if (name == "emlivermore") {
0145 delete fEmPhysicsList;
0146 fEmPhysicsList = new G4EmLivermorePhysics();
0147 }
0148 else if (name == "empenelope") {
0149 delete fEmPhysicsList;
0150 fEmPhysicsList = new G4EmPenelopePhysics();
0151 }
0152 else if (name == "DNA_Opt0") {
0153 delete fEmPhysicsList;
0154 fEmPhysicsList = new G4EmDNAPhysics();
0155 }
0156 else if (name == "DNA_Opt1") {
0157 delete fEmPhysicsList;
0158 fEmPhysicsList = new G4EmDNAPhysics_option1();
0159 }
0160 else if (name == "DNA_Opt2") {
0161 delete fEmPhysicsList;
0162 fEmPhysicsList = new G4EmDNAPhysics_option2();
0163 }
0164 else if (name == "DNA_Opt3") {
0165 delete fEmPhysicsList;
0166 fEmPhysicsList = new G4EmDNAPhysics_option3();
0167 }
0168 else if (name == "DNA_Opt4") {
0169 delete fEmPhysicsList;
0170 fEmPhysicsList = new G4EmDNAPhysics_option4();
0171 }
0172 else if (name == "DNA_Opt5") {
0173 delete fEmPhysicsList;
0174 fEmPhysicsList = new G4EmDNAPhysics_option5();
0175 }
0176 else if (name == "DNA_Opt6") {
0177 delete fEmPhysicsList;
0178 fEmPhysicsList = new G4EmDNAPhysics_option6();
0179 }
0180 else if (name == "DNA_Opt7") {
0181 delete fEmPhysicsList;
0182 fEmPhysicsList = new G4EmDNAPhysics_option7();
0183 }
0184 else if (name == "DNA_Opt8") {
0185 delete fEmPhysicsList;
0186 fEmPhysicsList = new G4EmDNAPhysics_option8();
0187 }
0188 else {
0189 G4cout << "### PhysicsList::AddPhysics Warning: Physics List <" << name
0190 << "> is does not exist - the command ignored" << G4endl;
0191 }
0192 }
0193
0194
0195
0196 void PhysicsList::TrackingCut()
0197 {
0198 auto particle = G4GenericIon::GenericIon();
0199 auto particleName = particle->GetParticleName();
0200 auto capture = G4EmDNABuilder::FindOrBuildCapture(0.5 * CLHEP::MeV, particle);
0201 capture->AddRegion("World");
0202 capture->SetKinEnergyLimit(0.5 * CLHEP::MeV);
0203 }
0204
0205
0206
0207 void PhysicsList::SetTrackingCut(G4bool isCut)
0208 {
0209 fIsTrackingCutSet = isCut;
0210 }