File indexing completed on 2026-04-07 07:52:32
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
0042
0043
0044 #include "PhysicsList.hh"
0045
0046 #include "CommandLineParser.hh"
0047
0048 #include "G4EmParameters.hh"
0049 #include "G4SystemOfUnits.hh"
0050
0051 #include "G4EmDNAChemistry.hh"
0052 #include "G4EmDNAChemistry_option1.hh"
0053 #include "G4EmDNAPhysics.hh"
0054 #include "G4EmDNAPhysics_option1.hh"
0055 #include "G4EmDNAPhysics_option2.hh"
0056 #include "G4EmDNAPhysics_option3.hh"
0057 #include "G4EmDNAPhysics_option4.hh"
0058 #include "G4EmDNAPhysics_option5.hh"
0059 #include "G4EmDNAPhysics_option6.hh"
0060 #include "G4EmDNAPhysics_option7.hh"
0061 #include "G4EmDNAPhysics_option8.hh"
0062
0063 #include "G4EmLivermorePhysics.hh"
0064 #include "G4EmPenelopePhysics.hh"
0065 #include "G4EmStandardPhysics.hh"
0066 #include "G4EmStandardPhysics_option3.hh"
0067 #include "G4EmStandardPhysics_option4.hh"
0068
0069 #include "G4DecayPhysics.hh"
0070 #include "G4EmDNAPhysicsActivator.hh"
0071 #include "G4EmExtraPhysics.hh"
0072 #include "G4HadronElasticPhysics.hh"
0073 #include "G4HadronPhysicsQGSP_BIC.hh"
0074 #include "G4IonPhysics.hh"
0075 #include "G4NeutronTrackingCut.hh"
0076 #include "G4RadioactiveDecayPhysics.hh"
0077 #include "G4StoppingPhysics.hh"
0078
0079 using namespace G4DNAPARSER;
0080
0081
0082
0083 PhysicsList::PhysicsList()
0084 : G4VModularPhysicsList(),
0085 fEmPhysicsList(nullptr),
0086 fDNAActivator(nullptr),
0087 fEmDNAChemistryList(nullptr),
0088 fEmDNAChemistryList1(nullptr),
0089 fEmName(""),
0090 fHadronic(false)
0091 {
0092 G4double currentDefaultCut = 1. * micrometer;
0093 SetDefaultCutValue(currentDefaultCut);
0094 SetVerboseLevel(1);
0095
0096 G4ProductionCutsTable::GetProductionCutsTable()->SetEnergyRange(100 * eV, 1 * GeV);
0097
0098
0099
0100
0101
0102 G4cout << "Livermore + DNAphysics is activated!" << G4endl;
0103 RegisterConstructor("emlivermore");
0104
0105
0106
0107
0108 fDNAActivator = new G4EmDNAPhysicsActivator();
0109
0110
0111
0112
0113
0114
0115 if (CommandLineParser::GetParser()->GetCommandIfActive("-dnachemON")) {
0116 G4cout << "DNAChemistry is activated!" << G4endl;
0117 RegisterPhysics(new G4EmDNAChemistry());
0118 }
0119
0120
0121 if (CommandLineParser::GetParser()->GetCommandIfActive("-dnahad")) {
0122 G4cout << "QGSP_BIC is activated!" << G4endl;
0123 RegisterConstructor("QGSP_BIC");
0124 fHadronic = true;
0125 }
0126 }
0127
0128
0129
0130 PhysicsList::~PhysicsList() {}
0131
0132
0133
0134 void PhysicsList::ConstructParticle()
0135 {
0136 if (fEmPhysicsList) {
0137 fEmPhysicsList->ConstructParticle();
0138 }
0139 if (fDNAActivator) {
0140 fDNAActivator->ConstructParticle();
0141 }
0142 if (fEmDNAChemistryList) {
0143 fEmDNAChemistryList->ConstructParticle();
0144 }
0145 if (fEmDNAChemistryList1) {
0146 fEmDNAChemistryList1->ConstructParticle();
0147 }
0148 G4VModularPhysicsList::ConstructParticle();
0149 }
0150
0151
0152
0153 void PhysicsList::ConstructProcess()
0154 {
0155 if (fEmPhysicsList) {
0156 fEmPhysicsList->ConstructProcess();
0157 }
0158 if (fDNAActivator) {
0159 fDNAActivator->ConstructProcess();
0160 }
0161 if (fEmDNAChemistryList) {
0162 fEmDNAChemistryList->ConstructProcess();
0163 }
0164 if (fEmDNAChemistryList1) {
0165 fEmDNAChemistryList1->ConstructProcess();
0166 }
0167 G4VModularPhysicsList::ConstructProcess();
0168 }
0169
0170
0171
0172 void PhysicsList::RegisterConstructor(const G4String& name)
0173 {
0174 if (name == fEmName) {
0175 return;
0176 }
0177 if (name == "emstandard_opt0") {
0178 fEmName = name;
0179 delete fEmPhysicsList;
0180 fEmPhysicsList = new G4EmStandardPhysics();
0181 }
0182 else if (name == "emstandard_opt3") {
0183 fEmName = name;
0184 delete fEmPhysicsList;
0185 fEmPhysicsList = new G4EmStandardPhysics_option3();
0186 }
0187 else if (name == "emstandard_opt4") {
0188 fEmName = name;
0189 delete fEmPhysicsList;
0190 fEmPhysicsList = new G4EmStandardPhysics_option4();
0191 }
0192 else if (name == "empenelope") {
0193 fEmName = name;
0194 delete fEmPhysicsList;
0195 fEmPhysicsList = new G4EmPenelopePhysics();
0196 }
0197 else if (name == "emlivermore") {
0198 fEmName = name;
0199 delete fEmPhysicsList;
0200 fEmPhysicsList = new G4EmLivermorePhysics();
0201 }
0202 else if (name == "G4EmDNAPhysics") {
0203 delete fEmPhysicsList;
0204 fEmPhysicsList = new G4EmDNAPhysics(verboseLevel);
0205 fEmName = name;
0206 }
0207 else if (name == "G4EmDNAPhysics_option1") {
0208 delete fEmPhysicsList;
0209 fEmPhysicsList = new G4EmDNAPhysics_option1(verboseLevel);
0210 fEmName = name;
0211 }
0212 else if (name == "G4EmDNAPhysics_option2") {
0213 delete fEmPhysicsList;
0214 fEmPhysicsList = new G4EmDNAPhysics_option2(verboseLevel);
0215 fEmName = name;
0216 }
0217 else if (name == "G4EmDNAPhysics_option3") {
0218 delete fEmPhysicsList;
0219 fEmPhysicsList = new G4EmDNAPhysics_option3(verboseLevel);
0220 fEmName = name;
0221 }
0222 else if (name == "G4EmDNAPhysics_option4") {
0223 delete fEmPhysicsList;
0224 fEmPhysicsList = new G4EmDNAPhysics_option4(verboseLevel);
0225 fEmName = name;
0226 }
0227 else if (name == "G4EmDNAPhysics_option5") {
0228 delete fEmPhysicsList;
0229 fEmPhysicsList = new G4EmDNAPhysics_option5(verboseLevel);
0230 fEmName = name;
0231 }
0232 else if (name == "G4EmDNAPhysics_option6") {
0233 delete fEmPhysicsList;
0234 fEmPhysicsList = new G4EmDNAPhysics_option6(verboseLevel);
0235 fEmName = name;
0236 }
0237 else if (name == "G4EmDNAPhysics_option7") {
0238 delete fEmPhysicsList;
0239 fEmPhysicsList = new G4EmDNAPhysics_option7(verboseLevel);
0240 fEmName = name;
0241 }
0242 else if (name == "G4EmDNAPhysics_option8") {
0243 delete fEmPhysicsList;
0244 fEmPhysicsList = new G4EmDNAPhysics_option8(verboseLevel);
0245 fEmName = name;
0246 }
0247 else if (name == "QGSP_BIC") {
0248 if (fHadronic) {
0249 return;
0250 }
0251
0252 RegisterConstructor("G4HadronElasticPhysics");
0253
0254 RegisterConstructor("G4HadronPhysicsQGSP_BIC");
0255
0256 RegisterConstructor("G4StoppingPhysics");
0257
0258 RegisterConstructor("G4IonBinaryCascadePhysics");
0259
0260 RegisterConstructor("G4EmExtraPhysics");
0261
0262 RegisterConstructor("G4NeutronTrackingCut");
0263
0264 RegisterConstructor("G4DecayPhysics");
0265
0266 RegisterConstructor("G4RadioactiveDecayPhysics");
0267 }
0268 else if (name == "G4EmDNAChemistry") {
0269 if (fEmDNAChemistryList || fEmDNAChemistryList1) {
0270 return;
0271 }
0272 fEmDNAChemistryList = new G4EmDNAChemistry();
0273 }
0274 else if (name == "G4EmDNAChemistry_option1") {
0275 if (fEmDNAChemistryList || fEmDNAChemistryList1) {
0276 return;
0277 }
0278 fEmDNAChemistryList1 = new G4EmDNAChemistry_option1();
0279 }
0280 else {
0281 G4cout << "PhysicsList::RegisterConstructor: <" << name << ">"
0282 << " fails - name is not defined" << G4endl;
0283 }
0284 }
0285
0286