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