File indexing completed on 2025-02-23 09:21:52
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 #include "PhysicsList.hh"
0028
0029 #include "G4EmDNAChemistry_option2.hh"
0030 #include "G4EmDNAPhysics.hh"
0031 #include "G4EmDNAPhysics_option1.hh"
0032 #include "G4EmDNAPhysics_option2.hh"
0033 #include "G4EmDNAPhysics_option3.hh"
0034 #include "G4EmDNAPhysics_option4.hh"
0035 #include "G4EmDNAPhysics_option5.hh"
0036 #include "G4EmDNAPhysics_option6.hh"
0037 #include "G4EmDNAPhysics_option7.hh"
0038 #include "G4EmDNAPhysics_option8.hh"
0039 #include "G4PhysicsConstructorRegistry.hh"
0040 #include "G4SystemOfUnits.hh"
0041
0042
0043 PhysicsList::PhysicsList()
0044 : G4VModularPhysicsList(), fDNAPhysicsList(nullptr), fChemistryList_option2(nullptr)
0045 {
0046 SetDefaultCutValue(1.0 * nanometer);
0047 SetVerboseLevel(1);
0048 RegisterConstructor("G4EmDNAPhysics");
0049 RegisterConstructor("G4EmDNAChemistry_option2");
0050
0051 G4ProductionCutsTable::GetProductionCutsTable()->SetEnergyRange(100 * eV, 1 * GeV);
0052 }
0053
0054
0055
0056 PhysicsList::~PhysicsList() {}
0057
0058
0059 void PhysicsList::ConstructParticle()
0060 {
0061 if (fDNAPhysicsList != nullptr) {
0062 fDNAPhysicsList->ConstructParticle();
0063 }
0064
0065 if (fChemistryList_option2 != nullptr) {
0066 fChemistryList_option2->ConstructParticle();
0067 }
0068 }
0069
0070
0071
0072 void PhysicsList::ConstructProcess()
0073 {
0074 AddTransportation();
0075
0076 if (fDNAPhysicsList != nullptr) {
0077 fDNAPhysicsList->ConstructProcess();
0078 }
0079 if (fChemistryList_option2 != nullptr) {
0080 fChemistryList_option2->ConstructProcess();
0081 }
0082 }
0083
0084
0085
0086 void PhysicsList::RegisterConstructor(const G4String& name)
0087 {
0088 if (name == fPhysDNAName) {
0089 return;
0090 }
0091
0092 if (verboseLevel > 0) {
0093 G4cout << "===== Register constructor ==== " << name << G4endl;
0094 }
0095
0096 if (name == "G4EmDNAPhysics") {
0097 fDNAPhysicsList.reset(new G4EmDNAPhysics(verboseLevel));
0098 fPhysDNAName = name;
0099 }
0100 else if (name == "G4EmDNAPhysics_option1") {
0101 fDNAPhysicsList.reset(new G4EmDNAPhysics_option1(verboseLevel));
0102 fPhysDNAName = name;
0103 }
0104 else if (name == "G4EmDNAPhysics_option2") {
0105 fDNAPhysicsList.reset(new G4EmDNAPhysics_option2(verboseLevel));
0106 fPhysDNAName = name;
0107 }
0108 else if (name == "G4EmDNAPhysics_option3") {
0109 fDNAPhysicsList.reset(new G4EmDNAPhysics_option3(verboseLevel));
0110 fPhysDNAName = name;
0111 }
0112 else if (name == "G4EmDNAPhysics_option4") {
0113 fDNAPhysicsList.reset(new G4EmDNAPhysics_option4(verboseLevel));
0114 fPhysDNAName = name;
0115 }
0116 else if (name == "G4EmDNAPhysics_option5") {
0117 fDNAPhysicsList.reset(new G4EmDNAPhysics_option5(verboseLevel));
0118 fPhysDNAName = name;
0119 }
0120 else if (name == "G4EmDNAPhysics_option6") {
0121 fDNAPhysicsList.reset(new G4EmDNAPhysics_option6(verboseLevel));
0122 fPhysDNAName = name;
0123 }
0124 else if (name == "G4EmDNAPhysics_option7") {
0125 fDNAPhysicsList.reset(new G4EmDNAPhysics_option7(verboseLevel));
0126 fPhysDNAName = name;
0127 }
0128 else if (name == "G4EmDNAPhysics_option8") {
0129 fDNAPhysicsList.reset(new G4EmDNAPhysics_option8(verboseLevel));
0130 fPhysDNAName = name;
0131 }
0132 else if (name == "G4EmDNAChemistry_option2") {
0133 fChemistryList_option2.reset(new G4EmDNAChemistry_option2());
0134 fChemistryList_option2->SetVerboseLevel(verboseLevel);
0135 }
0136 else {
0137 G4cout << "PhysicsList::RegisterConstructor: <" << name << ">"
0138 << " fails - name is not defined" << G4endl;
0139 }
0140 }
0141