File indexing completed on 2025-10-31 08:23:38
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");
0075   if (CommandLineParser::GetParser()->GetCommandIfActive("-chemOFF") == 0) {
0076     RegisterConstructor("G4EmDNAChemistry");
0077   }
0078 }
0079 
0080 
0081 
0082 PhysicsList::~PhysicsList()
0083 {
0084   delete fEmDNAPhysicsList;
0085   delete fEmDNAChemistryList;
0086   delete fEmDNAChemistryList1;
0087 }
0088 
0089 
0090 
0091 void PhysicsList::ConstructParticle()
0092 {
0093   if (fEmDNAPhysicsList) {
0094     fEmDNAPhysicsList->ConstructParticle();
0095   }
0096   if (fEmDNAChemistryList) {
0097     fEmDNAChemistryList->ConstructParticle();
0098   }
0099   if (fEmDNAChemistryList1) {
0100     fEmDNAChemistryList1->ConstructParticle();
0101   }
0102 }
0103 
0104 
0105 
0106 void PhysicsList::ConstructProcess()
0107 {
0108   AddTransportation();
0109   if (fEmDNAPhysicsList) {
0110     fEmDNAPhysicsList->ConstructProcess();
0111   }
0112   if (fEmDNAChemistryList) {
0113     fEmDNAChemistryList->ConstructProcess();
0114   }
0115   if (fEmDNAChemistryList1) {
0116     fEmDNAChemistryList1->ConstructProcess();
0117   }
0118 }
0119 
0120 
0121 
0122 void PhysicsList::RegisterConstructor(const G4String& name)
0123 {
0124   if (name == fPhysDNAName) {
0125     return;
0126   }
0127   if (verboseLevel > 0) {
0128     G4cout << "===== Register constructor ==== " << name << G4endl;
0129   }
0130   if (name == "G4EmDNAPhysics") {
0131     delete fEmDNAPhysicsList;
0132     fEmDNAPhysicsList = new G4EmDNAPhysics(verboseLevel);
0133     fPhysDNAName = name;
0134   }
0135   else if (name == "G4EmDNAPhysics_option1") {
0136     delete fEmDNAPhysicsList;
0137     fEmDNAPhysicsList = new G4EmDNAPhysics_option1(verboseLevel);
0138     fPhysDNAName = name;
0139   }
0140   else if (name == "G4EmDNAPhysics_option2") {
0141     delete fEmDNAPhysicsList;
0142     fEmDNAPhysicsList = new G4EmDNAPhysics_option2(verboseLevel);
0143     fPhysDNAName = name;
0144   }
0145   else if (name == "G4EmDNAPhysics_option3") {
0146     delete fEmDNAPhysicsList;
0147     fEmDNAPhysicsList = new G4EmDNAPhysics_option3(verboseLevel);
0148     fPhysDNAName = name;
0149   }
0150   else if (name == "G4EmDNAPhysics_option4") {
0151     delete fEmDNAPhysicsList;
0152     fEmDNAPhysicsList = new G4EmDNAPhysics_option4(verboseLevel);
0153     fPhysDNAName = name;
0154   }
0155   else if (name == "G4EmDNAPhysics_option5") {
0156     delete fEmDNAPhysicsList;
0157     fEmDNAPhysicsList = new G4EmDNAPhysics_option5(verboseLevel);
0158     fPhysDNAName = name;
0159   }
0160   else if (name == "G4EmDNAPhysics_option6") {
0161     delete fEmDNAPhysicsList;
0162     fEmDNAPhysicsList = new G4EmDNAPhysics_option6(verboseLevel);
0163     fPhysDNAName = name;
0164   }
0165   else if (name == "G4EmDNAPhysics_option7") {
0166     delete fEmDNAPhysicsList;
0167     fEmDNAPhysicsList = new G4EmDNAPhysics_option7(verboseLevel);
0168     fPhysDNAName = name;
0169   }
0170   else if (name == "G4EmDNAPhysics_option8") {
0171     delete fEmDNAPhysicsList;
0172     fEmDNAPhysicsList = new G4EmDNAPhysics_option8(verboseLevel);
0173     fPhysDNAName = name;
0174   }
0175   else if (name == "G4EmDNAChemistry") {
0176     if (fEmDNAChemistryList || fEmDNAChemistryList1) {
0177       return;
0178     }
0179     fEmDNAChemistryList = new G4EmDNAChemistry();
0180     fEmDNAChemistryList->SetVerboseLevel(verboseLevel);
0181   }
0182   else if (name == "G4EmDNAChemistry_option1") {
0183     if (fEmDNAChemistryList || fEmDNAChemistryList1) {
0184       return;
0185     }
0186     fEmDNAChemistryList1 = new G4EmDNAChemistry_option1();
0187     fEmDNAChemistryList1->SetVerboseLevel(verboseLevel);
0188   }
0189   else {
0190     G4cout << "PhysicsList::RegisterConstructor: <" << name << ">"
0191            << " fails - name is not defined" << G4endl;
0192   }
0193 }
0194 
0195