File indexing completed on 2026-04-18 07:42:19
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 #include "PhysicsList.hh"
0030
0031 #include "G4SystemOfUnits.hh"
0032 #include "G4UnitsTable.hh"
0033
0034 #include "PhysicsListMessenger.hh"
0035
0036
0037 #include "G4Gamma.hh"
0038 #include "G4Electron.hh"
0039 #include "G4Positron.hh"
0040 #include "G4Proton.hh"
0041 #include "G4BaryonConstructor.hh"
0042 #include "G4BosonConstructor.hh"
0043 #include "G4DNAGenericIonsManager.hh"
0044 #include "G4IonConstructor.hh"
0045 #include "G4LeptonConstructor.hh"
0046 #include "G4MesonConstructor.hh"
0047 #include "G4ShortLivedConstructor.hh"
0048
0049
0050
0051 #include "G4EmDNAPhysics.hh"
0052 #include "G4EmDNAPhysics_option1.hh"
0053 #include "G4EmDNAPhysics_option2.hh"
0054 #include "G4EmDNAPhysics_option3.hh"
0055 #include "G4EmDNAPhysics_option4.hh"
0056 #include "G4EmDNAPhysics_option5.hh"
0057 #include "G4EmDNAPhysics_option6.hh"
0058 #include "G4EmDNAPhysics_option7.hh"
0059 #include "G4EmDNAPhysics_option8.hh"
0060 #include "G4EmLivermorePhysics.hh"
0061 #include "G4EmPenelopePhysics.hh"
0062 #include "G4EmStandardPhysics_option4.hh"
0063
0064
0065
0066 #include <memory>
0067
0068
0069
0070 PhysicsList::PhysicsList() : G4VModularPhysicsList()
0071 {
0072 fMessenger = std::make_unique<PhysicsListMessenger>(this);
0073 SetVerboseLevel(1);
0074 fPhysicsList = std::make_unique<G4EmDNAPhysics_option2>();
0075 }
0076
0077
0078
0079 PhysicsList::~PhysicsList() = default;
0080
0081
0082
0083 void PhysicsList::ConstructParticle()
0084 {
0085
0086
0087
0088
0089 G4BosonConstructor pBosonConstructor;
0090 pBosonConstructor.ConstructParticle();
0091
0092 G4LeptonConstructor pLeptonConstructor;
0093 pLeptonConstructor.ConstructParticle();
0094
0095 G4MesonConstructor pMesonConstructor;
0096 pMesonConstructor.ConstructParticle();
0097
0098 G4BaryonConstructor pBaryonConstructor;
0099 pBaryonConstructor.ConstructParticle();
0100
0101 G4IonConstructor pIonConstructor;
0102 pIonConstructor.ConstructParticle();
0103
0104 G4ShortLivedConstructor pShortLivedConstructor;
0105 pShortLivedConstructor.ConstructParticle();
0106
0107 G4DNAGenericIonsManager* genericIonsManager;
0108 genericIonsManager = G4DNAGenericIonsManager::Instance();
0109 genericIonsManager->GetIon("hydrogen");
0110 genericIonsManager->GetIon("deuteron");
0111 genericIonsManager->GetIon("triton");
0112 genericIonsManager->GetIon("helium");
0113 genericIonsManager->GetIon("alpha");
0114 genericIonsManager->GetIon("alpha+");
0115 genericIonsManager->GetIon("alpha++");
0116 genericIonsManager->GetIon("carbon");
0117 }
0118
0119
0120
0121 void PhysicsList::ConstructProcess()
0122 {
0123
0124 AddTransportation();
0125
0126
0127 fPhysicsList->ConstructProcess();
0128
0129
0130 SetCuts();
0131 }
0132
0133
0134
0135 void PhysicsList::AddPhysicsList(const G4String& name)
0136 {
0137 if (verboseLevel > -1) {
0138 G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
0139 }
0140
0141 if (name == fName) return;
0142
0143 if (name == "dna") {
0144 fName = name;
0145 fPhysicsList = std::make_unique<G4EmDNAPhysics>();
0146 G4cout << fPhysicsList->GetPhysicsName()
0147 << " physics package has been activated." << G4endl;
0148 }
0149 else if (name == "dna_opt1") {
0150 fName = name;
0151 fPhysicsList = std::make_unique<G4EmDNAPhysics_option1>();
0152 G4cout << fPhysicsList->GetPhysicsName()
0153 << " physics package has been activated." << G4endl;
0154 }
0155
0156 else if (name == "dna_opt2") {
0157 fName = name;
0158 fPhysicsList = std::make_unique<G4EmDNAPhysics_option2>();
0159 G4cout << fPhysicsList->GetPhysicsName()
0160 << " physics package has been activated." << G4endl;
0161 }
0162
0163 else if (name == "dna_opt3") {
0164 fName = name;
0165 fPhysicsList = std::make_unique<G4EmDNAPhysics_option3>();
0166 G4cout << fPhysicsList->GetPhysicsName()
0167 << " physics package has been activated." << G4endl;
0168 }
0169
0170 else if (name == "dna_opt4") {
0171 fName = name;
0172 fPhysicsList = std::make_unique<G4EmDNAPhysics_option4>();
0173 G4cout << fPhysicsList->GetPhysicsName()
0174 << " physics package has been activated." << G4endl;
0175 }
0176
0177 else if (name == "dna_opt5") {
0178 fName = name;
0179 fPhysicsList = std::make_unique<G4EmDNAPhysics_option5>();
0180 G4cout << fPhysicsList->GetPhysicsName()
0181 << " physics package has been activated." << G4endl;
0182 }
0183
0184 else if (name == "dna_opt6") {
0185 fName = name;
0186 fPhysicsList = std::make_unique<G4EmDNAPhysics_option6>();
0187 G4cout << fPhysicsList->GetPhysicsName()
0188 << " physics package has been activated." << G4endl;
0189 }
0190
0191 else if (name == "dna_opt7") {
0192 fName = name;
0193 fPhysicsList = std::make_unique<G4EmDNAPhysics_option7>();
0194 G4cout << fPhysicsList->GetPhysicsName()
0195 << " physics package has been activated." << G4endl;
0196 }
0197
0198 else if (name == "dna_opt8") {
0199 fName = name;
0200 fPhysicsList = std::make_unique<G4EmDNAPhysics_option8>();
0201 G4cout << fPhysicsList->GetPhysicsName()
0202 << " physics package has been activated." << G4endl;
0203 }
0204
0205 else if (name == "liv") {
0206 fName = name;
0207 fPhysicsList = std::make_unique<G4EmLivermorePhysics>();
0208 G4cout << fPhysicsList->GetPhysicsName()
0209 << " physics package has been activated." << G4endl;
0210 }
0211
0212 else if (name == "penelope") {
0213 fName = name;
0214 fPhysicsList = std::make_unique<G4EmPenelopePhysics>();
0215 G4cout << fPhysicsList->GetPhysicsName()
0216 << " physics package has been activated." << G4endl;
0217 }
0218
0219 else if (name == "em_standard_opt4") {
0220 fName = name;
0221 fPhysicsList = std::make_unique<G4EmStandardPhysics_option4>();
0222 G4cout << fPhysicsList->GetPhysicsName()
0223 << " physics package has been activated." << G4endl;
0224 }
0225
0226 else {
0227 G4cout << "PhysicsList::AddPhysicsList: \"" << name << "\" is not defined!"
0228 << G4endl;
0229 }
0230 }
0231
0232