File indexing completed on 2026-09-20 08:30:36
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 "G4UserSpecialCuts.hh"
0054
0055
0056
0057 #include "G4BaryonConstructor.hh"
0058 #include "G4BosonConstructor.hh"
0059 #include "G4DNAGenericIonsManager.hh"
0060 #include "G4IonConstructor.hh"
0061 #include "G4LeptonConstructor.hh"
0062 #include "G4MesonConstructor.hh"
0063 #include "G4ShortLivedConstructor.hh"
0064
0065
0066
0067 PhysicsList::PhysicsList() : G4VModularPhysicsList(), fEmPhysicsList(0), fMessenger(0)
0068 {
0069 fMessenger = new PhysicsListMessenger(this);
0070
0071 SetVerboseLevel(1);
0072
0073 fEmPhysicsList = new G4EmDNAPhysics_option2();
0074 }
0075
0076
0077
0078 PhysicsList::~PhysicsList()
0079 {
0080 delete fMessenger;
0081 delete fEmPhysicsList;
0082 }
0083
0084
0085
0086 void PhysicsList::ConstructParticle()
0087 {
0088 G4BosonConstructor pBosonConstructor;
0089 pBosonConstructor.ConstructParticle();
0090
0091 G4LeptonConstructor pLeptonConstructor;
0092 pLeptonConstructor.ConstructParticle();
0093
0094 G4MesonConstructor pMesonConstructor;
0095 pMesonConstructor.ConstructParticle();
0096
0097 G4BaryonConstructor pBaryonConstructor;
0098 pBaryonConstructor.ConstructParticle();
0099
0100 G4IonConstructor pIonConstructor;
0101 pIonConstructor.ConstructParticle();
0102
0103 G4ShortLivedConstructor pShortLivedConstructor;
0104 pShortLivedConstructor.ConstructParticle();
0105
0106 G4DNAGenericIonsManager* genericIonsManager;
0107 genericIonsManager = G4DNAGenericIonsManager::Instance();
0108 genericIonsManager->GetIon("alpha++");
0109 genericIonsManager->GetIon("alpha+");
0110 genericIonsManager->GetIon("helium");
0111 genericIonsManager->GetIon("hydrogen");
0112 }
0113
0114
0115
0116 void PhysicsList::ConstructProcess()
0117 {
0118
0119 AddTransportation();
0120
0121
0122 fEmPhysicsList->ConstructProcess();
0123
0124
0125 AddTrackingCut();
0126 }
0127
0128
0129
0130 void PhysicsList::AddPhysicsList(const G4String& name)
0131 {
0132 if (verboseLevel > -1) {
0133 G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
0134 }
0135
0136 if (name == fEmName) return;
0137
0138 if (name == "dna") {
0139 fEmName = name;
0140 delete fEmPhysicsList;
0141 fEmPhysicsList = new G4EmDNAPhysics();
0142 }
0143 else if (name == "dna_opt1") {
0144 fEmName = name;
0145 delete fEmPhysicsList;
0146 fEmPhysicsList = new G4EmDNAPhysics_option1();
0147 }
0148 else if (name == "dna_opt2") {
0149 fEmName = name;
0150 delete fEmPhysicsList;
0151 fEmPhysicsList = new G4EmDNAPhysics_option2();
0152 }
0153 else if (name == "dna_opt3") {
0154 fEmName = name;
0155 delete fEmPhysicsList;
0156 fEmPhysicsList = new G4EmDNAPhysics_option3();
0157 }
0158 else if (name == "dna_opt4") {
0159 fEmName = name;
0160 delete fEmPhysicsList;
0161 fEmPhysicsList = new G4EmDNAPhysics_option4();
0162 }
0163 else if (name == "dna_opt5") {
0164 fEmName = name;
0165 delete fEmPhysicsList;
0166 fEmPhysicsList = new G4EmDNAPhysics_option5();
0167 }
0168 else if (name == "dna_opt6") {
0169 fEmName = name;
0170 delete fEmPhysicsList;
0171 fEmPhysicsList = new G4EmDNAPhysics_option6();
0172 }
0173 else if (name == "dna_opt7") {
0174 fEmName = name;
0175 delete fEmPhysicsList;
0176 fEmPhysicsList = new G4EmDNAPhysics_option7();
0177 }
0178 else if (name == "dna_opt8") {
0179 fEmName = name;
0180 delete fEmPhysicsList;
0181 fEmPhysicsList = new G4EmDNAPhysics_option8();
0182 }
0183 else {
0184 G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
0185 << " is not defined" << G4endl;
0186 }
0187 }
0188
0189
0190
0191 void PhysicsList::AddTrackingCut()
0192 {
0193 G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
0194
0195 auto particleIterator = GetParticleIterator();
0196 particleIterator->reset();
0197 while ((*particleIterator)()) {
0198 G4ParticleDefinition* particle = particleIterator->value();
0199 G4String particleName = particle->GetParticleName();
0200
0201 if (particleName == "e-") {
0202 ph->RegisterProcess(new G4UserSpecialCuts(), particle);
0203 }
0204 }
0205 }
0206
0207