#include <G4NeutronCrossSectionXS.hh>
Inheritance diagram for G4NeutronCrossSectionXS:
Public Member Functions | |
G4NeutronCrossSectionXS (G4int ver=0) | |
virtual | ~G4NeutronCrossSectionXS () |
virtual void | ConstructParticle () |
virtual void | ConstructProcess () |
Definition at line 45 of file G4NeutronCrossSectionXS.hh.
G4NeutronCrossSectionXS::G4NeutronCrossSectionXS | ( | G4int | ver = 0 |
) |
Definition at line 61 of file G4NeutronCrossSectionXS.cc.
00061 : 00062 G4VPhysicsConstructor("NeutronXS"), verbose(ver) 00063 { 00064 G4DataQuestionaire q(no,no,no,no,no,neutronxs); 00065 }
G4NeutronCrossSectionXS::~G4NeutronCrossSectionXS | ( | ) | [virtual] |
void G4NeutronCrossSectionXS::ConstructParticle | ( | ) | [virtual] |
Implements G4VPhysicsConstructor.
Definition at line 70 of file G4NeutronCrossSectionXS.cc.
References G4Neutron::Neutron().
00071 { 00072 G4Neutron::Neutron(); 00073 }
void G4NeutronCrossSectionXS::ConstructProcess | ( | ) | [virtual] |
Implements G4VPhysicsConstructor.
Definition at line 75 of file G4NeutronCrossSectionXS.cc.
References G4HadronicProcess::AddDataSet(), fCapture, fHadronInelastic, G4cout, G4endl, CLHEP::detail::n, G4Neutron::Neutron(), neutron, and G4ProcessVector::size().
00076 { 00077 00078 G4NeutronInelasticXS* xinel = new G4NeutronInelasticXS(); 00079 G4NeutronCaptureXS* xcap = new G4NeutronCaptureXS(); 00080 00081 const G4ParticleDefinition* neutron = G4Neutron::Neutron(); 00082 if(verbose > 1) { 00083 G4cout << "### G4NeutronCrossSectionXS: use alternative neutron X-sections" 00084 << G4endl; 00085 } 00086 00087 G4ProcessVector* pv = neutron->GetProcessManager()->GetProcessList(); 00088 G4int n = pv->size(); 00089 G4HadronicProcess* had = 0; 00090 for(G4int i=0; i<n; i++) { 00091 if(fHadronInelastic == ((*pv)[i])->GetProcessSubType()) { 00092 had = static_cast<G4HadronicProcess*>((*pv)[i]); 00093 had->AddDataSet(xinel); 00094 } else if(fCapture == ((*pv)[i])->GetProcessSubType()) { 00095 had = static_cast<G4HadronicProcess*>((*pv)[i]); 00096 had->AddDataSet(xcap); 00097 } 00098 } 00099 }