File indexing completed on 2025-02-23 09:22:04
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
0040
0041
0042
0043 #include "PhysicsList.hh"
0044
0045 #include "CommandLineParser.hh"
0046
0047 #include "G4EmParameters.hh"
0048 #include "G4SystemOfUnits.hh"
0049
0050 #include "G4EmDNAChemistry.hh"
0051 #include "G4EmDNAChemistry_option1.hh"
0052 #include "G4EmDNAPhysics.hh"
0053 #include "G4EmDNAPhysics_option1.hh"
0054 #include "G4EmDNAPhysics_option2.hh"
0055 #include "G4EmDNAPhysics_option3.hh"
0056 #include "G4EmDNAPhysics_option4.hh"
0057 #include "G4EmDNAPhysics_option5.hh"
0058 #include "G4EmDNAPhysics_option6.hh"
0059 #include "G4EmDNAPhysics_option7.hh"
0060 #include "G4EmDNAPhysics_option8.hh"
0061
0062 #include "G4EmLivermorePhysics.hh"
0063 #include "G4EmPenelopePhysics.hh"
0064 #include "G4EmStandardPhysics.hh"
0065 #include "G4EmStandardPhysics_option3.hh"
0066 #include "G4EmStandardPhysics_option4.hh"
0067
0068 #include "G4DecayPhysics.hh"
0069 #include "G4EmDNAPhysicsActivator.hh"
0070 #include "G4EmExtraPhysics.hh"
0071 #include "G4HadronElasticPhysics.hh"
0072 #include "G4HadronPhysicsQGSP_BIC.hh"
0073 #include "G4IonPhysics.hh"
0074 #include "G4NeutronTrackingCut.hh"
0075 #include "G4RadioactiveDecayPhysics.hh"
0076 #include "G4StoppingPhysics.hh"
0077
0078 using namespace G4DNAPARSER;
0079
0080
0081
0082 PhysicsList::PhysicsList()
0083 : G4VModularPhysicsList(),
0084 fEmPhysicsList(nullptr),
0085 fDNAActivator(nullptr),
0086 fEmDNAChemistryList(nullptr),
0087 fEmDNAChemistryList1(nullptr),
0088 fEmName(""),
0089 fHadronic(false)
0090 {
0091 G4double currentDefaultCut = 1. * micrometer;
0092 SetDefaultCutValue(currentDefaultCut);
0093 SetVerboseLevel(1);
0094
0095 G4ProductionCutsTable::GetProductionCutsTable()->SetEnergyRange(100 * eV, 1 * GeV);
0096
0097
0098
0099
0100
0101 G4cout << "Livermore + DNAphysics is activated!" << G4endl;
0102 RegisterConstructor("emlivermore");
0103
0104
0105
0106
0107 fDNAActivator = new G4EmDNAPhysicsActivator();
0108
0109
0110
0111
0112
0113
0114 if (CommandLineParser::GetParser()->GetCommandIfActive("-dnachemON")) {
0115 G4cout << "DNAChemistry is activated!" << G4endl;
0116 RegisterPhysics(new G4EmDNAChemistry());
0117 }
0118
0119
0120 if (CommandLineParser::GetParser()->GetCommandIfActive("-dnahad")) {
0121 G4cout << "QGSP_BIC is activated!" << G4endl;
0122 RegisterConstructor("QGSP_BIC");
0123 fHadronic = true;
0124 }
0125 }
0126
0127
0128
0129 PhysicsList::~PhysicsList() {}
0130
0131
0132
0133 void PhysicsList::ConstructParticle()
0134 {
0135 if (fEmPhysicsList) {
0136 fEmPhysicsList->ConstructParticle();
0137 }
0138 if (fDNAActivator) {
0139 fDNAActivator->ConstructParticle();
0140 }
0141 if (fEmDNAChemistryList) {
0142 fEmDNAChemistryList->ConstructParticle();
0143 }
0144 if (fEmDNAChemistryList1) {
0145 fEmDNAChemistryList1->ConstructParticle();
0146 }
0147 G4VModularPhysicsList::ConstructParticle();
0148 }
0149
0150
0151
0152 void PhysicsList::ConstructProcess()
0153 {
0154 if (fEmPhysicsList) {
0155 fEmPhysicsList->ConstructProcess();
0156 }
0157 if (fDNAActivator) {
0158 fDNAActivator->ConstructProcess();
0159 }
0160 if (fEmDNAChemistryList) {
0161 fEmDNAChemistryList->ConstructProcess();
0162 }
0163 if (fEmDNAChemistryList1) {
0164 fEmDNAChemistryList1->ConstructProcess();
0165 }
0166 G4VModularPhysicsList::ConstructProcess();
0167 }
0168
0169
0170
0171 void PhysicsList::RegisterConstructor(const G4String& name)
0172 {
0173 if (name == fEmName) {
0174 return;
0175 }
0176 if (name == "emstandard_opt0") {
0177 fEmName = name;
0178 delete fEmPhysicsList;
0179 fEmPhysicsList = new G4EmStandardPhysics();
0180 }
0181 else if (name == "emstandard_opt3") {
0182 fEmName = name;
0183 delete fEmPhysicsList;
0184 fEmPhysicsList = new G4EmStandardPhysics_option3();
0185 }
0186 else if (name == "emstandard_opt4") {
0187 fEmName = name;
0188 delete fEmPhysicsList;
0189 fEmPhysicsList = new G4EmStandardPhysics_option4();
0190 }
0191 else if (name == "empenelope") {
0192 fEmName = name;
0193 delete fEmPhysicsList;
0194 fEmPhysicsList = new G4EmPenelopePhysics();
0195 }
0196 else if (name == "emlivermore") {
0197 fEmName = name;
0198 delete fEmPhysicsList;
0199 fEmPhysicsList = new G4EmLivermorePhysics();
0200 }
0201 else if (name == "G4EmDNAPhysics") {
0202 delete fEmPhysicsList;
0203 fEmPhysicsList = new G4EmDNAPhysics(verboseLevel);
0204 fEmName = name;
0205 }
0206 else if (name == "G4EmDNAPhysics_option1") {
0207 delete fEmPhysicsList;
0208 fEmPhysicsList = new G4EmDNAPhysics_option1(verboseLevel);
0209 fEmName = name;
0210 }
0211 else if (name == "G4EmDNAPhysics_option2") {
0212 delete fEmPhysicsList;
0213 fEmPhysicsList = new G4EmDNAPhysics_option2(verboseLevel);
0214 fEmName = name;
0215 }
0216 else if (name == "G4EmDNAPhysics_option3") {
0217 delete fEmPhysicsList;
0218 fEmPhysicsList = new G4EmDNAPhysics_option3(verboseLevel);
0219 fEmName = name;
0220 }
0221 else if (name == "G4EmDNAPhysics_option4") {
0222 delete fEmPhysicsList;
0223 fEmPhysicsList = new G4EmDNAPhysics_option4(verboseLevel);
0224 fEmName = name;
0225 }
0226 else if (name == "G4EmDNAPhysics_option5") {
0227 delete fEmPhysicsList;
0228 fEmPhysicsList = new G4EmDNAPhysics_option5(verboseLevel);
0229 fEmName = name;
0230 }
0231 else if (name == "G4EmDNAPhysics_option6") {
0232 delete fEmPhysicsList;
0233 fEmPhysicsList = new G4EmDNAPhysics_option6(verboseLevel);
0234 fEmName = name;
0235 }
0236 else if (name == "G4EmDNAPhysics_option7") {
0237 delete fEmPhysicsList;
0238 fEmPhysicsList = new G4EmDNAPhysics_option7(verboseLevel);
0239 fEmName = name;
0240 }
0241 else if (name == "G4EmDNAPhysics_option8") {
0242 delete fEmPhysicsList;
0243 fEmPhysicsList = new G4EmDNAPhysics_option8(verboseLevel);
0244 fEmName = name;
0245 }
0246 else if (name == "QGSP_BIC") {
0247 if (fHadronic) {
0248 return;
0249 }
0250
0251 RegisterConstructor("G4HadronElasticPhysics");
0252
0253 RegisterConstructor("G4HadronPhysicsQGSP_BIC");
0254
0255 RegisterConstructor("G4StoppingPhysics");
0256
0257 RegisterConstructor("G4IonBinaryCascadePhysics");
0258
0259 RegisterConstructor("G4EmExtraPhysics");
0260
0261 RegisterConstructor("G4NeutronTrackingCut");
0262
0263 RegisterConstructor("G4DecayPhysics");
0264
0265 RegisterConstructor("G4RadioactiveDecayPhysics");
0266 }
0267 else if (name == "G4EmDNAChemistry") {
0268 if (fEmDNAChemistryList || fEmDNAChemistryList1) {
0269 return;
0270 }
0271 fEmDNAChemistryList = new G4EmDNAChemistry();
0272 }
0273 else if (name == "G4EmDNAChemistry_option1") {
0274 if (fEmDNAChemistryList || fEmDNAChemistryList1) {
0275 return;
0276 }
0277 fEmDNAChemistryList1 = new G4EmDNAChemistry_option1();
0278 }
0279 else {
0280 G4cout << "PhysicsList::RegisterConstructor: <" << name << ">"
0281 << " fails - name is not defined" << G4endl;
0282 }
0283 }
0284
0285