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