File indexing completed on 2026-03-31 07:50:24
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 "CommandLineParser.hh"
0042
0043 #include "G4EmDNAChemistry.hh"
0044 #include "G4EmDNAChemistry_option1.hh"
0045 #include "G4EmDNAPhysics.hh"
0046 #include "G4EmDNAPhysics_option1.hh"
0047 #include "G4EmDNAPhysics_option2.hh"
0048 #include "G4EmDNAPhysics_option3.hh"
0049 #include "G4EmDNAPhysics_option4.hh"
0050 #include "G4EmDNAPhysics_option5.hh"
0051 #include "G4EmDNAPhysics_option6.hh"
0052 #include "G4EmDNAPhysics_option7.hh"
0053 #include "G4EmDNAPhysics_option8.hh"
0054 #include "G4EmParameters.hh"
0055 #include "G4PhysicsConstructorRegistry.hh"
0056 #include "G4SystemOfUnits.hh"
0057
0058 using namespace G4DNAPARSER;
0059
0060
0061
0062 PhysicsList::PhysicsList()
0063 : G4VModularPhysicsList(),
0064 fEmDNAPhysicsList(nullptr),
0065 fEmDNAChemistryList(nullptr),
0066 fEmDNAChemistryList1(nullptr),
0067 fPhysDNAName("")
0068 {
0069 G4double currentDefaultCut = 1. * nanometer;
0070
0071 G4ProductionCutsTable::GetProductionCutsTable()->SetEnergyRange(100 * eV, 1 * GeV);
0072 SetDefaultCutValue(currentDefaultCut);
0073 SetVerboseLevel(1);
0074
0075 RegisterConstructor("G4EmDNAPhysics");
0076 if (CommandLineParser::GetParser()->GetCommandIfActive("-chemOFF") == 0) {
0077 RegisterConstructor("G4EmDNAChemistry");
0078 }
0079 }
0080
0081
0082
0083 PhysicsList::~PhysicsList()
0084 {
0085 delete fEmDNAPhysicsList;
0086 delete fEmDNAChemistryList;
0087 delete fEmDNAChemistryList1;
0088 }
0089
0090
0091
0092 void PhysicsList::ConstructParticle()
0093 {
0094 if (fEmDNAPhysicsList) {
0095 fEmDNAPhysicsList->ConstructParticle();
0096 }
0097 if (fEmDNAChemistryList) {
0098 fEmDNAChemistryList->ConstructParticle();
0099 }
0100 if (fEmDNAChemistryList1) {
0101 fEmDNAChemistryList1->ConstructParticle();
0102 }
0103 }
0104
0105
0106
0107 void PhysicsList::ConstructProcess()
0108 {
0109 AddTransportation();
0110 if (fEmDNAPhysicsList) {
0111 fEmDNAPhysicsList->ConstructProcess();
0112 }
0113 if (fEmDNAChemistryList) {
0114 fEmDNAChemistryList->ConstructProcess();
0115 }
0116 if (fEmDNAChemistryList1) {
0117 fEmDNAChemistryList1->ConstructProcess();
0118 }
0119 }
0120
0121
0122
0123 void PhysicsList::RegisterConstructor(const G4String& name)
0124 {
0125 if (name == fPhysDNAName) {
0126 return;
0127 }
0128 if (verboseLevel > 0) {
0129 G4cout << "===== Register constructor ==== " << name << G4endl;
0130 }
0131 if (name == "G4EmDNAPhysics") {
0132 delete fEmDNAPhysicsList;
0133 fEmDNAPhysicsList = new G4EmDNAPhysics(verboseLevel);
0134 fPhysDNAName = name;
0135 }
0136 else if (name == "G4EmDNAPhysics_option1") {
0137 delete fEmDNAPhysicsList;
0138 fEmDNAPhysicsList = new G4EmDNAPhysics_option1(verboseLevel);
0139 fPhysDNAName = name;
0140 }
0141 else if (name == "G4EmDNAPhysics_option2") {
0142 delete fEmDNAPhysicsList;
0143 fEmDNAPhysicsList = new G4EmDNAPhysics_option2(verboseLevel);
0144 fPhysDNAName = name;
0145 }
0146 else if (name == "G4EmDNAPhysics_option3") {
0147 delete fEmDNAPhysicsList;
0148 fEmDNAPhysicsList = new G4EmDNAPhysics_option3(verboseLevel);
0149 fPhysDNAName = name;
0150 }
0151 else if (name == "G4EmDNAPhysics_option4") {
0152 delete fEmDNAPhysicsList;
0153 fEmDNAPhysicsList = new G4EmDNAPhysics_option4(verboseLevel);
0154 fPhysDNAName = name;
0155 }
0156 else if (name == "G4EmDNAPhysics_option5") {
0157 delete fEmDNAPhysicsList;
0158 fEmDNAPhysicsList = new G4EmDNAPhysics_option5(verboseLevel);
0159 fPhysDNAName = name;
0160 }
0161 else if (name == "G4EmDNAPhysics_option6") {
0162 delete fEmDNAPhysicsList;
0163 fEmDNAPhysicsList = new G4EmDNAPhysics_option6(verboseLevel);
0164 fPhysDNAName = name;
0165 }
0166 else if (name == "G4EmDNAPhysics_option7") {
0167 delete fEmDNAPhysicsList;
0168 fEmDNAPhysicsList = new G4EmDNAPhysics_option7(verboseLevel);
0169 fPhysDNAName = name;
0170 }
0171 else if (name == "G4EmDNAPhysics_option8") {
0172 delete fEmDNAPhysicsList;
0173 fEmDNAPhysicsList = new G4EmDNAPhysics_option8(verboseLevel);
0174 fPhysDNAName = name;
0175 }
0176 else if (name == "G4EmDNAChemistry") {
0177 if (fEmDNAChemistryList || fEmDNAChemistryList1) {
0178 return;
0179 }
0180 fEmDNAChemistryList = new G4EmDNAChemistry();
0181 fEmDNAChemistryList->SetVerboseLevel(verboseLevel);
0182 }
0183 else if (name == "G4EmDNAChemistry_option1") {
0184 if (fEmDNAChemistryList || fEmDNAChemistryList1) {
0185 return;
0186 }
0187 fEmDNAChemistryList1 = new G4EmDNAChemistry_option1();
0188 fEmDNAChemistryList1->SetVerboseLevel(verboseLevel);
0189 }
0190 else {
0191 G4cout << "PhysicsList::RegisterConstructor: <" << name << ">"
0192 << " fails - name is not defined" << G4endl;
0193 }
0194 }
0195
0196