#include <G4VHadronPhysics.hh>
Inheritance diagram for G4VHadronPhysics:
Definition at line 51 of file G4VHadronPhysics.hh.
Definition at line 57 of file G4VHadronPhysics.cc.
References G4cout, G4endl, G4VPhysicsConstructor::SetVerboseLevel(), and G4VPhysicsConstructor::verboseLevel.
00058 : G4VPhysicsConstructor(aName) 00059 { 00060 SetVerboseLevel(verb); 00061 if (verboseLevel>1) { 00062 G4cout << "### G4VHadronPhysics: <" << aName << "> is created " 00063 << G4endl; 00064 } 00065 }
G4VHadronPhysics::~G4VHadronPhysics | ( | ) | [virtual] |
Definition at line 67 of file G4VHadronPhysics.cc.
References CLHEP::detail::n.
00068 { 00069 G4int n = builders.size(); 00070 if(n > 0) { 00071 for(G4int i=0; i<n; i++) {delete builders[i];} 00072 } 00073 }
void G4VHadronPhysics::AddCaptureCrossSection | ( | G4VCrossSectionDataSet * | ) |
Definition at line 185 of file G4VHadronPhysics.cc.
References G4HadronicProcess::AddDataSet(), FindCaptureProcess(), G4cout, G4endl, and G4VPhysicsConstructor::verboseLevel.
00186 { 00187 G4HadronicProcess* had = FindCaptureProcess(); 00188 if(!had) return; 00189 had->AddDataSet(xsec); 00190 if (verboseLevel>1) { 00191 G4cout << "### G4VHadronPhysics: the capture cross section " 00192 << " is added for neutron" 00193 << G4endl; 00194 } 00195 }
void G4VHadronPhysics::AddElasticCrossSection | ( | const G4ParticleDefinition * | , | |
G4VCrossSectionDataSet * | ||||
) |
Definition at line 170 of file G4VHadronPhysics.cc.
References G4HadronicProcess::AddDataSet(), FindElasticProcess(), G4cout, G4endl, G4ParticleDefinition::GetParticleName(), and G4VPhysicsConstructor::verboseLevel.
00172 { 00173 if(!p) return; 00174 G4HadronicProcess* had = FindElasticProcess(p); 00175 if(!had) return; 00176 had->AddDataSet(xsec); 00177 if (verboseLevel>1) { 00178 G4cout << "### G4VHadronPhysics: the inelastic cross section " 00179 << " is added for " << p->GetParticleName() 00180 << G4endl; 00181 } 00182 }
void G4VHadronPhysics::AddElasticCrossSection | ( | const G4String & | , | |
G4VCrossSectionDataSet * | ||||
) |
Definition at line 156 of file G4VHadronPhysics.cc.
References G4ParticleTable::FindParticle(), G4cout, G4endl, and G4ParticleTable::GetParticleTable().
00158 { 00159 const G4ParticleDefinition* p = 00160 G4ParticleTable::GetParticleTable()->FindParticle(pname); 00161 if(!p) { 00162 G4cout << "### G4VHadronPhysics WARNING: fails to find particle " 00163 << pname << G4endl; 00164 } else { 00165 AddElasticCrossSection(p, xsec); 00166 } 00167 }
void G4VHadronPhysics::AddFissionCrossSection | ( | G4VCrossSectionDataSet * | ) |
Definition at line 198 of file G4VHadronPhysics.cc.
References G4HadronicProcess::AddDataSet(), FindFissionProcess(), G4cout, G4endl, and G4VPhysicsConstructor::verboseLevel.
00199 { 00200 G4HadronicProcess* had = FindFissionProcess(); 00201 if(!had) return; 00202 had->AddDataSet(xsec); 00203 if (verboseLevel>1) { 00204 G4cout << "### G4VHadronPhysics: the fission cross section " 00205 << " is added for neutron" 00206 << G4endl; 00207 } 00208 }
void G4VHadronPhysics::AddInelasticCrossSection | ( | const G4ParticleDefinition * | , | |
G4VCrossSectionDataSet * | ||||
) |
Definition at line 141 of file G4VHadronPhysics.cc.
References G4HadronicProcess::AddDataSet(), FindInelasticProcess(), G4cout, G4endl, G4ParticleDefinition::GetParticleName(), and G4VPhysicsConstructor::verboseLevel.
00143 { 00144 if(!p) return; 00145 G4HadronicProcess* had = FindInelasticProcess(p); 00146 if(!had) return; 00147 had->AddDataSet(xsec); 00148 if (verboseLevel>1) { 00149 G4cout << "### G4VHadronPhysics: the inelastic cross section " 00150 << " is added for " << p->GetParticleName() 00151 << G4endl; 00152 } 00153 }
void G4VHadronPhysics::AddInelasticCrossSection | ( | const G4String & | , | |
G4VCrossSectionDataSet * | ||||
) |
Definition at line 127 of file G4VHadronPhysics.cc.
References G4ParticleTable::FindParticle(), G4cout, G4endl, and G4ParticleTable::GetParticleTable().
00129 { 00130 const G4ParticleDefinition* p = 00131 G4ParticleTable::GetParticleTable()->FindParticle(pname); 00132 if(!p) { 00133 G4cout << "### G4VHadronPhysics WARNING: fails to find particle " 00134 << pname << G4endl; 00135 } else { 00136 AddInelasticCrossSection(p, xsec); 00137 } 00138 }
G4HadronicInteraction * G4VHadronPhysics::BuildModel | ( | G4VHadronModelBuilder * | , | |
G4double | emin, | |||
G4double | emax | |||
) |
Definition at line 91 of file G4VHadronPhysics.cc.
References G4cout, G4endl, G4VHadronModelBuilder::GetModel(), G4HadronicInteraction::GetModelName(), G4HadronicInteraction::SetMaxEnergy(), G4HadronicInteraction::SetMinEnergy(), and G4VPhysicsConstructor::verboseLevel.
Referenced by G4HadronInelasticQBBC::ConstructProcess().
00094 { 00095 builders.push_back(mBuilder); 00096 G4HadronicInteraction* model = mBuilder->GetModel(); 00097 model->SetMinEnergy(emin); 00098 model->SetMaxEnergy(emax); 00099 if (verboseLevel>1) { 00100 G4cout << "### G4VHadronPhysics <" 00101 << model->GetModelName() << " Emin(GeV)= " 00102 << emin/GeV << " Emax(GeV)= " << emax/GeV 00103 << G4endl; 00104 } 00105 00106 return model; 00107 }
void G4VHadronPhysics::ConstructParticle | ( | ) | [virtual] |
Implements G4VPhysicsConstructor.
Definition at line 75 of file G4VHadronPhysics.cc.
References G4ShortLivedConstructor::ConstructParticle(), G4IonConstructor::ConstructParticle(), G4BaryonConstructor::ConstructParticle(), and G4MesonConstructor::ConstructParticle().
00076 { 00077 G4MesonConstructor pMesonConstructor; 00078 pMesonConstructor.ConstructParticle(); 00079 00080 G4BaryonConstructor pBaryonConstructor; 00081 pBaryonConstructor.ConstructParticle(); 00082 00083 G4IonConstructor pIonConstructor; 00084 pIonConstructor.ConstructParticle(); 00085 00086 G4ShortLivedConstructor pShortLivedConstructor; 00087 pShortLivedConstructor.ConstructParticle(); 00088 }
G4HadronicProcess * G4VHadronPhysics::FindCaptureProcess | ( | ) | [protected] |
Definition at line 281 of file G4VHadronPhysics.cc.
References G4ProcessManager::AddDiscreteProcess(), fCapture, G4ProcessManager::GetProcessList(), G4ParticleDefinition::GetProcessManager(), CLHEP::detail::n, G4Neutron::Neutron(), and G4ProcessVector::size().
Referenced by AddCaptureCrossSection(), and G4HadronInelasticQBBC::ConstructProcess().
00282 { 00283 G4HadronicProcess* had = 0; 00284 G4ProcessManager* pmanager = 00285 G4Neutron::Neutron()->GetProcessManager(); 00286 G4ProcessVector* pv = pmanager->GetProcessList(); 00287 size_t n = pv->size(); 00288 if(0 < n) { 00289 for(size_t i=0; i<n; ++i) { 00290 if(fCapture == ((*pv)[i])->GetProcessSubType()) { 00291 had = static_cast<G4HadronicProcess*>((*pv)[i]); 00292 return had; 00293 } 00294 } 00295 } 00296 had = new G4HadronCaptureProcess("nCapture"); 00297 pmanager->AddDiscreteProcess(had); 00298 return had; 00299 }
G4HadronicProcess * G4VHadronPhysics::FindElasticProcess | ( | const G4ParticleDefinition * | ) | [protected] |
Definition at line 261 of file G4VHadronPhysics.cc.
References G4ProcessManager::AddDiscreteProcess(), fHadronElastic, G4ProcessManager::GetProcessList(), G4ParticleDefinition::GetProcessManager(), CLHEP::detail::n, and G4ProcessVector::size().
00262 { 00263 G4HadronicProcess* had = 0; 00264 if(!p) return had; 00265 G4ProcessManager* pmanager = p->GetProcessManager(); 00266 G4ProcessVector* pv = pmanager->GetProcessList(); 00267 size_t n = pv->size(); 00268 if(0 < n) { 00269 for(size_t i=0; i<n; ++i) { 00270 if(fHadronElastic == ((*pv)[i])->GetProcessSubType()) { 00271 had = static_cast<G4HadronicProcess*>((*pv)[i]); 00272 return had; 00273 } 00274 } 00275 } 00276 had = new G4HadronElasticProcess("hElastic"); 00277 pmanager->AddDiscreteProcess(had); 00278 return had; 00279 }
G4HadronicProcess * G4VHadronPhysics::FindElasticProcess | ( | const G4String & | ) | [protected] |
Definition at line 247 of file G4VHadronPhysics.cc.
References G4ParticleTable::FindParticle(), G4cout, G4endl, and G4ParticleTable::GetParticleTable().
Referenced by AddElasticCrossSection().
00248 { 00249 G4HadronicProcess* had = 0; 00250 const G4ParticleDefinition* p = 00251 G4ParticleTable::GetParticleTable()->FindParticle(pname); 00252 if(!p) { 00253 G4cout << "### G4VHadronPhysics WARNING: fails to find particle " 00254 << pname << G4endl; 00255 return had; 00256 } 00257 return FindElasticProcess(p); 00258 }
G4HadronicProcess * G4VHadronPhysics::FindFissionProcess | ( | ) | [protected] |
Definition at line 301 of file G4VHadronPhysics.cc.
References G4ProcessManager::AddDiscreteProcess(), fFission, G4ProcessManager::GetProcessList(), G4ParticleDefinition::GetProcessManager(), CLHEP::detail::n, G4Neutron::Neutron(), and G4ProcessVector::size().
Referenced by AddFissionCrossSection().
00302 { 00303 G4HadronicProcess* had = 0; 00304 G4ProcessManager* pmanager = 00305 G4Neutron::Neutron()->GetProcessManager(); 00306 G4ProcessVector* pv = pmanager->GetProcessList(); 00307 size_t n = pv->size(); 00308 if(0 < n) { 00309 for(size_t i=0; i<n; ++i) { 00310 if(fFission == ((*pv)[i])->GetProcessSubType()) { 00311 had = static_cast<G4HadronicProcess*>((*pv)[i]); 00312 return had; 00313 } 00314 } 00315 } 00316 had = new G4HadronFissionProcess("nFission"); 00317 pmanager->AddDiscreteProcess(had); 00318 return had; 00319 }
G4HadronicProcess * G4VHadronPhysics::FindInelasticProcess | ( | const G4ParticleDefinition * | ) | [protected] |
Definition at line 225 of file G4VHadronPhysics.cc.
References G4ProcessManager::AddDiscreteProcess(), fHadronInelastic, G4ParticleDefinition::GetParticleName(), G4ProcessManager::GetProcessList(), G4ParticleDefinition::GetProcessManager(), CLHEP::detail::n, and G4ProcessVector::size().
00226 { 00227 G4HadronicProcess* had = 0; 00228 if(!p) return had; 00229 G4ProcessManager* pmanager = p->GetProcessManager(); 00230 G4ProcessVector* pv = pmanager->GetProcessList(); 00231 size_t n = pv->size(); 00232 if(0 < n) { 00233 for(size_t i=0; i<n; ++i) { 00234 if(fHadronInelastic == ((*pv)[i])->GetProcessSubType()) { 00235 had = static_cast<G4HadronicProcess*>((*pv)[i]); 00236 return had; 00237 } 00238 } 00239 } 00240 G4ParticleDefinition* part = const_cast<G4ParticleDefinition*>(p); 00241 had = new G4HadronInelasticProcess(part->GetParticleName()+"Inelastic",part); 00242 pmanager->AddDiscreteProcess(had); 00243 return had; 00244 }
G4HadronicProcess * G4VHadronPhysics::FindInelasticProcess | ( | const G4String & | ) | [protected] |
Definition at line 211 of file G4VHadronPhysics.cc.
References G4ParticleTable::FindParticle(), G4cout, G4endl, and G4ParticleTable::GetParticleTable().
Referenced by AddInelasticCrossSection(), and G4HadronInelasticQBBC::ConstructProcess().
00212 { 00213 G4HadronicProcess* had = 0; 00214 const G4ParticleDefinition* p = 00215 G4ParticleTable::GetParticleTable()->FindParticle(pname); 00216 if(!p) { 00217 G4cout << "### G4VHadronPhysics WARNING: fails to find particle " 00218 << pname << G4endl; 00219 return had; 00220 } 00221 return FindInelasticProcess(p); 00222 }
G4HadronicInteraction * G4VHadronPhysics::NewModel | ( | G4HadronicInteraction * | , | |
G4double | emin, | |||
G4double | emax | |||
) |
Definition at line 110 of file G4VHadronPhysics.cc.
References G4cout, G4endl, G4HadronicInteraction::GetModelName(), G4HadronicInteraction::SetMaxEnergy(), G4HadronicInteraction::SetMinEnergy(), and G4VPhysicsConstructor::verboseLevel.
Referenced by G4HadronInelasticQBBC::ConstructProcess().
00113 { 00114 if(!model) return model; 00115 model->SetMinEnergy(emin); 00116 model->SetMaxEnergy(emax); 00117 if (verboseLevel>1) { 00118 G4cout << "### G4VHadronPhysics <" 00119 << model->GetModelName() << " Emin(GeV)= " 00120 << emin/GeV << " Emax(GeV)= " << emax/GeV 00121 << G4endl; 00122 } 00123 return model; 00124 }