File indexing completed on 2025-01-31 09:22:02
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 #include "G4SystemOfUnits.hh"
0029 #include "G4EmDNAPhysics.hh"
0030 #include "G4EmDNAPhysics_option1.hh"
0031 #include "G4EmDNAPhysics_option2.hh"
0032 #include "G4EmDNAPhysics_option3.hh"
0033 #include "G4EmDNAPhysics_option4.hh"
0034 #include "G4EmDNAPhysics_option5.hh"
0035 #include "G4EmDNAPhysics_option6.hh"
0036 #include "G4EmDNAPhysics_option7.hh"
0037 #include "G4EmDNAPhysics_option8.hh"
0038 #include "G4PhysicsConstructorRegistry.hh"
0039 #include "G4ProcessTable.hh"
0040 #include "G4ProcessManager.hh"
0041 #include "G4DNAChampionElasticModel.hh"
0042 #include "G4DNAScreenedRutherfordElasticModel.hh"
0043 #include "G4DNAElastic.hh"
0044 #include "G4PhysicsListHelper.hh"
0045 #include "G4DNAVibExcitation.hh"
0046 #include "G4DNASancheExcitationModel.hh"
0047 #include "G4DNAElectronSolvation.hh"
0048 #include "G4DNAChemistryManager.hh"
0049 #include "G4LeptonConstructor.hh"
0050 #include "G4BosonConstructor.hh"
0051 #include "G4MesonConstructor.hh"
0052 #include "G4BaryonConstructor.hh"
0053 #include "G4ShortLivedConstructor.hh"
0054 #include "PhysicsMessenger.hh"
0055 #include "UserChoosingDNASolvationModel.hh"
0056 #include "InformationKeeper.hh"
0057
0058
0059
0060 PhysicsList::PhysicsList()
0061 : G4VModularPhysicsList()
0062 {
0063 fPhysMsg = std::make_unique<PhysicsMessenger>(this);
0064 SetDefaultCutValue(1.0*nanometer);
0065 SetVerboseLevel(1);
0066 RegisterPhysicsList("G4EmDNAPhysics_option2");
0067 G4ProductionCutsTable::GetProductionCutsTable()->SetEnergyRange(100*eV, 1*GeV);
0068 G4DNAChemistryManager::Instance()->SetChemistryActivation(false);
0069 }
0070
0071
0072
0073 void PhysicsList::ConstructParticle()
0074 {
0075 if(fDNAPhysicsList != nullptr)
0076 {
0077 fDNAPhysicsList->ConstructParticle();
0078 }
0079
0080
0081 G4LeptonConstructor lConstructor;
0082 lConstructor.ConstructParticle();
0083 G4BosonConstructor pBosonConstructor;
0084 pBosonConstructor.ConstructParticle();
0085 G4MesonConstructor pMesonConstructor;
0086 pMesonConstructor.ConstructParticle();
0087 G4BaryonConstructor pBaryonConstructor;
0088 pBaryonConstructor.ConstructParticle();
0089 G4ShortLivedConstructor pShortLivedConstructor;
0090 pShortLivedConstructor.ConstructParticle();
0091
0092 }
0093
0094
0095
0096 void PhysicsList::ConstructProcess()
0097 {
0098 AddTransportation();
0099
0100 if(fDNAPhysicsList != nullptr)
0101 {
0102 fDNAPhysicsList->ConstructProcess();
0103 }
0104
0105 G4VProcess* process = G4ProcessTable::GetProcessTable()->FindProcess(
0106 "e-_G4DNAVibExcitation", "e-");
0107
0108 if (process)
0109 {
0110 G4DNAVibExcitation* vibExcitation = (G4DNAVibExcitation*) process;
0111 G4VEmModel* model = vibExcitation->EmModel();
0112 G4DNASancheExcitationModel* sancheExcitationMod =
0113 dynamic_cast<G4DNASancheExcitationModel*>(model);
0114 if(sancheExcitationMod)
0115 {
0116 sancheExcitationMod->ExtendLowEnergyLimit(0.025 * eV);
0117 }
0118 }
0119
0120
0121
0122
0123 process = G4ProcessTable::GetProcessTable()->FindProcess("e-_G4DNAElastic", "e-");
0124
0125 if (process)
0126 {
0127 G4DNAElastic* vibExcitation = (G4DNAElastic*) process;
0128 G4VEmModel* model = vibExcitation->EmModel();
0129
0130 if(G4DNAChampionElasticModel* championMod =
0131 dynamic_cast<G4DNAChampionElasticModel*>(model))
0132 {
0133 championMod->SetKillBelowThreshold(-1);
0134 }
0135 else if(G4DNAScreenedRutherfordElasticModel* screenRutherfordMod =
0136 dynamic_cast<G4DNAScreenedRutherfordElasticModel*>(model))
0137 {
0138 screenRutherfordMod->SetKillBelowThreshold(-1);
0139 }
0140 }
0141
0142
0143
0144
0145 if (!G4DNAChemistryManager::IsActivated()) {
0146 process = G4ProcessTable::GetProcessTable()->FindProcess("e-_G4DNAElectronSolvation", "e-");
0147 if (!process){
0148 auto pPhysicsListHelper = G4PhysicsListHelper::GetPhysicsListHelper();
0149 pPhysicsListHelper->RegisterProcess(new G4DNAElectronSolvation("e-_G4DNAElectronSolvation"),
0150 G4Electron::Definition());
0151 }
0152 G4DNAElectronSolvation* solvation = dynamic_cast<G4DNAElectronSolvation*>(process);
0153 G4double hLimitE= 0;
0154 G4VEmModel* therm = solvation->GetModelByIndex(0,1);
0155 if (therm) {
0156
0157 hLimitE = therm->HighEnergyLimit();
0158 therm->SetHighEnergyLimit(0*keV);
0159 }
0160 auto thermz = UserChoosingDNASolvationModel::UserGetMacroDefinedModel();
0161 thermz->SetHighEnergyLimit(hLimitE);
0162 solvation->AddEmModel(-1,thermz);
0163 }
0164
0165
0166 }
0167
0168
0169
0170 void PhysicsList::RegisterPhysicsList(const G4String& name)
0171 {
0172 if(name == fPhysDNAName)
0173 {
0174 return;
0175 }
0176 G4bool changedPhys = true;
0177 if(verboseLevel > 0)
0178 {
0179 G4cout << "===== Register constructor ==== " << name << G4endl;
0180 }
0181
0182 if(name == "G4EmDNAPhysics")
0183 {
0184 fDNAPhysicsList.reset(new G4EmDNAPhysics(verboseLevel));
0185 fPhysDNAName = name;
0186 }
0187 else if(name == "G4EmDNAPhysics_option1")
0188 {
0189 fDNAPhysicsList.reset(new G4EmDNAPhysics_option1(verboseLevel));
0190 fPhysDNAName = name;
0191 }
0192 else if(name == "G4EmDNAPhysics_option2")
0193 {
0194 fDNAPhysicsList.reset(new G4EmDNAPhysics_option2(verboseLevel));
0195 fPhysDNAName = name;
0196 }
0197 else if(name == "G4EmDNAPhysics_option3")
0198 {
0199 fDNAPhysicsList.reset(new G4EmDNAPhysics_option3(verboseLevel));
0200 fPhysDNAName = name;
0201 }
0202 else if(name == "G4EmDNAPhysics_option4")
0203 {
0204 fDNAPhysicsList.reset(new G4EmDNAPhysics_option4(verboseLevel));
0205 fPhysDNAName = name;
0206 }
0207 else if(name == "G4EmDNAPhysics_option5")
0208 {
0209 fDNAPhysicsList.reset(new G4EmDNAPhysics_option5(verboseLevel));
0210 fPhysDNAName = name;
0211 }
0212 else if(name == "G4EmDNAPhysics_option6")
0213 {
0214 fDNAPhysicsList.reset(new G4EmDNAPhysics_option6(verboseLevel));
0215 fPhysDNAName = name;
0216 }
0217 else if(name == "G4EmDNAPhysics_option7")
0218 {
0219 fDNAPhysicsList.reset(new G4EmDNAPhysics_option7(verboseLevel));
0220 fPhysDNAName = name;
0221 }
0222 else if(name == "G4EmDNAPhysics_option8")
0223 {
0224 fDNAPhysicsList.reset(new G4EmDNAPhysics_option8(verboseLevel));
0225 fPhysDNAName = name;
0226 }
0227 else
0228 {
0229 G4cout << "PhysicsList::RegisterConstructor: <" << name << ">"
0230 << " fails - name is not defined"
0231 << G4endl;
0232 changedPhys = false;
0233 }
0234
0235 if (changedPhys) InformationKeeper::Instance()->RecordPhysDNAName(name);
0236 }
0237
0238