Geant4 Cross Reference |
1 // 1 2 // ******************************************* 3 // * License and Disclaimer 4 // * 5 // * The Geant4 software is copyright of th 6 // * the Geant4 Collaboration. It is provided 7 // * conditions of the Geant4 Software License 8 // * LICENSE and available at http://cern.ch/ 9 // * include a list of copyright holders. 10 // * 11 // * Neither the authors of this software syst 12 // * institutes,nor the agencies providing fin 13 // * work make any representation or warran 14 // * regarding this software system or assum 15 // * use. Please see the license in the file 16 // * for the full disclaimer and the limitatio 17 // * 18 // * This code implementation is the result 19 // * technical work of the GEANT4 collaboratio 20 // * By using, copying, modifying or distri 21 // * any work based on the software) you ag 22 // * use in resulting scientific publicati 23 // * acceptance of all terms of the Geant4 Sof 24 // ******************************************* 25 // 26 27 #include "PhysicsList.hh" 28 #include "G4SystemOfUnits.hh" 29 #include "G4EmDNAPhysics.hh" 30 #include "G4EmDNAPhysics_option1.hh" 31 #include "G4EmDNAPhysics_option2.hh" 32 #include "G4EmDNAPhysics_option3.hh" 33 #include "G4EmDNAPhysics_option4.hh" 34 #include "G4EmDNAPhysics_option5.hh" 35 #include "G4EmDNAPhysics_option6.hh" 36 #include "G4EmDNAPhysics_option7.hh" 37 #include "G4EmDNAPhysics_option8.hh" 38 #include "G4PhysicsConstructorRegistry.hh" 39 #include "G4ProcessTable.hh" 40 #include "G4ProcessManager.hh" 41 #include "G4DNAChampionElasticModel.hh" 42 #include "G4DNAScreenedRutherfordElasticModel. 43 #include "G4DNAElastic.hh" 44 #include "G4PhysicsListHelper.hh" 45 #include "G4DNAVibExcitation.hh" 46 #include "G4DNASancheExcitationModel.hh" 47 #include "G4DNAElectronSolvation.hh" 48 #include "G4DNAChemistryManager.hh" 49 #include "G4LeptonConstructor.hh" 50 #include "G4BosonConstructor.hh" 51 #include "G4MesonConstructor.hh" 52 #include "G4BaryonConstructor.hh" 53 #include "G4ShortLivedConstructor.hh" 54 #include "G4DNAMolecule.hh" 55 #include "UserChoosingDNASolvationModel.hh" 56 #include "DetectorConstruction.hh" 57 #include "DetectorConstruction.hh" 58 59 //....oooOO0OOooo........oooOO0OOooo........oo 60 61 PhysicsList::PhysicsList() 62 : G4VModularPhysicsList() 63 { 64 DefineCommands(); 65 SetDefaultCutValue(1.0*nanometer); 66 SetVerboseLevel(1); 67 RegisterPhysicsList("G4EmDNAPhysics_option 68 G4ProductionCutsTable::GetProductionCutsTa 69 if (gRunMode == RunningMode::Phys){ 70 G4DNAChemistryManager::Instance()->Set 71 } 72 } 73 74 //....oooOO0OOooo........oooOO0OOooo........oo 75 76 void PhysicsList::ConstructParticle() 77 { 78 if(fDNAPhysicsList != nullptr) 79 { 80 fDNAPhysicsList->ConstructParticle(); 81 //dna molecules to get rid of warning 82 G4Deoxyribose::Definition(); 83 G4Phosphate::Definition(); 84 G4Adenine::Definition(); 85 G4Guanine::Definition(); 86 G4Thymine::Definition(); 87 G4Cytosine::Definition(); 88 G4Histone::Definition(); 89 } 90 if(fEmDNAChemistryList != nullptr) 91 { 92 fEmDNAChemistryList->ConstructParticle 93 } 94 // construct following pqrticles to get ri 95 96 G4LeptonConstructor lConstructor; 97 lConstructor.ConstructParticle(); 98 G4BosonConstructor pBosonConstructor; 99 pBosonConstructor.ConstructParticle(); 100 G4MesonConstructor pMesonConstructor; 101 pMesonConstructor.ConstructParticle(); 102 G4BaryonConstructor pBaryonConstructor; 103 pBaryonConstructor.ConstructParticle(); 104 G4ShortLivedConstructor pShortLivedConstru 105 pShortLivedConstructor.ConstructParticle() 106 107 } 108 109 //....oooOO0OOooo........oooOO0OOooo........oo 110 111 void PhysicsList::ConstructProcess() 112 { 113 AddTransportation(); 114 115 if(fDNAPhysicsList != nullptr) 116 { 117 fDNAPhysicsList->ConstructProcess(); 118 } 119 120 if (gRunMode == RunningMode::Chem) { 121 if(fEmDNAChemistryList != nullptr) 122 { 123 fEmDNAChemistryList->ConstructProc 124 } 125 } else { 126 G4VProcess* process = G4ProcessTable:: 127 "e-_G4DNAVibExcitation", " 128 129 if (process) 130 { 131 G4DNAVibExcitation* vibExcitation 132 G4VEmModel* model = vibExcitation- 133 G4DNASancheExcitationModel* sanche 134 dynamic_cast<G4DNASancheEx 135 if(sancheExcitationMod) 136 { 137 sancheExcitationMod->ExtendLow 138 } 139 } 140 141 // Modify elastic scattering models to 142 // at low energy 143 // 144 process = G4ProcessTable::GetProcessTa 145 146 if (process) 147 { 148 G4DNAElastic* vibExcitation = (G4D 149 G4VEmModel* model = vibExcitation- 150 151 if(G4DNAChampionElasticModel* cham 152 dynamic_cast<G4DNAChampionElas 153 { 154 championMod->SetKillBelowThreshold 155 } 156 else if(G4DNAScreenedRutherfordEla 157 dynamic_cast<G4DNAScreenedRuth 158 { 159 screenRutherfordMod->SetKillBelowT 160 } 161 } 162 163 // force to use UserChoosingDNASolvati 164 //invoke G4EmDNAChemistryManager::Crea 165 // when G4DNAChemistryManager is disab 166 if (!G4DNAChemistryManager::IsActivate 167 process = G4ProcessTable::GetProce 168 if (!process){ 169 auto pPhysicsListHelper = G4Ph 170 pPhysicsListHelper->RegisterPr 171 172 } 173 G4DNAElectronSolvation* solvation 174 G4double hLimitE= 0; 175 G4VEmModel* therm = solvation->Get 176 if (therm) { 177 178 hLimitE = therm->HighEnergyLim 179 therm->SetHighEnergyLimit(0*ke 180 } 181 auto thermz = UserChoosingDNASolva 182 thermz->SetHighEnergyLimit(hLimitE 183 solvation->AddEmModel(-1,thermz); 184 } 185 186 } 187 } 188 189 //....oooOO0OOooo........oooOO0OOooo........oo 190 191 void PhysicsList::RegisterPhysicsList(const G4 192 { 193 if(name == fPhysDNAName) 194 { 195 return; 196 } 197 if(verboseLevel > 0) 198 { 199 G4cout << "===== Register constructor 200 } 201 202 if(name == "G4EmDNAPhysics") 203 { 204 fDNAPhysicsList.reset(new G4EmDNAPhysi 205 fPhysDNAName = name; 206 } 207 else if(name == "G4EmDNAPhysics_option1") 208 { 209 fDNAPhysicsList.reset(new G4EmDNAPhysi 210 fPhysDNAName = name; 211 } 212 else if(name == "G4EmDNAPhysics_option2") 213 { 214 fDNAPhysicsList.reset(new G4EmDNAPhysi 215 fPhysDNAName = name; 216 } 217 else if(name == "G4EmDNAPhysics_option3") 218 { 219 fDNAPhysicsList.reset(new G4EmDNAPhysi 220 fPhysDNAName = name; 221 } 222 else if(name == "G4EmDNAPhysics_option4") 223 { 224 fDNAPhysicsList.reset(new G4EmDNAPhysi 225 fPhysDNAName = name; 226 } 227 else if(name == "G4EmDNAPhysics_option5") 228 { 229 fDNAPhysicsList.reset(new G4EmDNAPhysi 230 fPhysDNAName = name; 231 } 232 else if(name == "G4EmDNAPhysics_option6") 233 { 234 fDNAPhysicsList.reset(new G4EmDNAPhysi 235 fPhysDNAName = name; 236 } 237 else if(name == "G4EmDNAPhysics_option7") 238 { 239 fDNAPhysicsList.reset(new G4EmDNAPhysi 240 fPhysDNAName = name; 241 } 242 else if(name == "G4EmDNAPhysics_option8") 243 { 244 fDNAPhysicsList.reset(new G4EmDNAPhysi 245 fPhysDNAName = name; 246 } 247 else 248 { 249 G4cout << "PhysicsList::RegisterConstr 250 << " fails - name is not define 251 << G4endl; 252 } 253 } 254 255 //....oooOO0OOooo........oooOO0OOooo........oo 256 257 void PhysicsList::RegisterChemListConstructor( 258 { 259 if(verboseLevel > 0) 260 { 261 G4cout << "===== Register constructor 262 } 263 264 if(name == "G4EmDNAChemistry_option2") 265 { 266 if ( fEmDNAChemistryList != nullptr) r 267 fEmDNAChemistryList.reset(new G4EmDNAC 268 fEmDNAChemistryList->SetVerboseLevel(v 269 G4EmParameters::Instance()->SetTimeSte 270 fChemListName = name; 271 } 272 else if(name == "G4EmDNAChemistry_option3" 273 { 274 if ( fEmDNAChemistryList != nullptr) r 275 fEmDNAChemistryList.reset(new G4EmDNAC 276 fEmDNAChemistryList->SetVerboseLevel(v 277 G4EmParameters::Instance()->SetTimeSte 278 fChemListName = name; 279 } 280 else 281 { 282 G4ExceptionDescription msg; 283 msg <<"ChemPhysicsList::RegisterChemLi 284 <<" fails - name is not defined"; 285 G4Exception("ChemPhysicsList::Register 286 JustWarning, msg); 287 } 288 } 289 290 //....oooOO0OOooo........oooOO0OOooo........oo 291 292 void PhysicsList::DefineCommands() 293 { 294 fMessenger = std::make_unique<G4GenericMes 295 "/dsbandrepair/ph 296 "cmd control"); 297 auto & fPhysListCmd = fMessenger->DeclareM 298 299 fPhysListCmd.SetParameterName("physList",t 300 fPhysListCmd.SetDefaultValue("G4EmDNAPhysi 301 302 auto & fChemListCmd = fMessenger->DeclareM 303 304 fChemListCmd.SetParameterName("chemList",t 305 fChemListCmd.SetDefaultValue("G4EmDNAChemi 306 } 307 308 //....oooOO0OOooo........oooOO0OOooo........oo