File indexing completed on 2026-05-16 07:42:38
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 #include "PhysicsList.hh"
0041
0042 #include "PhysicsListMessenger.hh"
0043
0044 #include "G4EmDNAPhysics.hh"
0045 #include "G4EmDNAPhysics_option1.hh"
0046 #include "G4EmDNAPhysics_option2.hh"
0047 #include "G4EmDNAPhysics_option3.hh"
0048 #include "G4EmDNAPhysics_option4.hh"
0049 #include "G4EmDNAPhysics_option5.hh"
0050 #include "G4EmDNAPhysics_option6.hh"
0051 #include "G4EmDNAPhysics_option7.hh"
0052 #include "G4EmDNAPhysics_option8.hh"
0053 #include "G4EmStandardPhysics_option4.hh"
0054 #include "G4SystemOfUnits.hh"
0055 #include "G4UnitsTable.hh"
0056 #include "G4UserSpecialCuts.hh"
0057
0058
0059
0060 PhysicsList::PhysicsList()
0061 {
0062 fMessenger = new PhysicsListMessenger(this);
0063
0064 SetVerboseLevel(1);
0065
0066
0067 fEmPhysicsList = new G4EmDNAPhysics();
0068 }
0069
0070
0071
0072 PhysicsList::~PhysicsList()
0073 {
0074 delete fMessenger;
0075 delete fEmPhysicsList;
0076 }
0077
0078
0079
0080 void PhysicsList::ConstructParticle()
0081 {
0082 fEmPhysicsList->ConstructParticle();
0083 }
0084
0085
0086
0087 void PhysicsList::ConstructProcess()
0088 {
0089
0090 AddTransportation();
0091
0092
0093 fEmPhysicsList->ConstructProcess();
0094
0095
0096 AddTrackingCut();
0097 }
0098
0099
0100
0101 void PhysicsList::AddPhysicsList(const G4String& name)
0102 {
0103 if (verboseLevel > -1) {
0104 G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
0105 }
0106
0107 if (name == fEmName) return;
0108
0109 if (name == "dna") {
0110 fEmName = name;
0111 delete fEmPhysicsList;
0112 fEmPhysicsList = new G4EmDNAPhysics();
0113 }
0114 else if (name == "dna_opt1") {
0115 fEmName = name;
0116 delete fEmPhysicsList;
0117 fEmPhysicsList = new G4EmDNAPhysics_option1();
0118 }
0119 else if (name == "dna_opt2") {
0120 fEmName = name;
0121 delete fEmPhysicsList;
0122 fEmPhysicsList = new G4EmDNAPhysics_option2();
0123 }
0124 else if (name == "dna_opt3") {
0125 fEmName = name;
0126 delete fEmPhysicsList;
0127 fEmPhysicsList = new G4EmDNAPhysics_option3();
0128 }
0129 else if (name == "dna_opt4") {
0130 fEmName = name;
0131 delete fEmPhysicsList;
0132 fEmPhysicsList = new G4EmDNAPhysics_option4();
0133 }
0134 else if (name == "dna_opt5") {
0135 fEmName = name;
0136 delete fEmPhysicsList;
0137 fEmPhysicsList = new G4EmDNAPhysics_option5();
0138 }
0139 else if (name == "dna_opt6") {
0140 fEmName = name;
0141 delete fEmPhysicsList;
0142 fEmPhysicsList = new G4EmDNAPhysics_option6();
0143 }
0144 else if (name == "dna_opt7") {
0145 fEmName = name;
0146 delete fEmPhysicsList;
0147 fEmPhysicsList = new G4EmDNAPhysics_option7();
0148 }
0149 else if (name == "dna_opt8") {
0150 fEmName = name;
0151 delete fEmPhysicsList;
0152 fEmPhysicsList = new G4EmDNAPhysics_option8();
0153 }
0154 else if (name == "std_opt4") {
0155 fEmName = name;
0156 delete fEmPhysicsList;
0157 fEmPhysicsList = new G4EmStandardPhysics_option4();
0158 }
0159 else {
0160 G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
0161 << " is not defined" << G4endl;
0162 }
0163 }
0164
0165
0166
0167 void PhysicsList::AddTrackingCut()
0168 {
0169 G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
0170
0171 auto particleIterator = GetParticleIterator();
0172 particleIterator->reset();
0173 while ((*particleIterator)()) {
0174 G4ParticleDefinition* particle = particleIterator->value();
0175 if (particle->GetPDGCharge() != 0.0 && !particle->IsShortLived()) {
0176 ph->RegisterProcess(new G4UserSpecialCuts(), particle);
0177 }
0178 }
0179 }