G4NeutronHPorLFissionData Class Reference

#include <G4NeutronHPorLFissionData.hh>

Inheritance diagram for G4NeutronHPorLFissionData:

G4VCrossSectionDataSet

Public Member Functions

 G4NeutronHPorLFissionData ()
 G4NeutronHPorLFissionData (G4NeutronHPChannel *, std::set< G4String > *)
 ~G4NeutronHPorLFissionData ()
G4bool IsIsoApplicable (const G4DynamicParticle *, G4int, G4int, const G4Element *, const G4Material *)
G4double GetIsoCrossSection (const G4DynamicParticle *, G4int, G4int, const G4Isotope *, const G4Element *, const G4Material *)
G4double GetCrossSection (const G4DynamicParticle *, const G4Element *, G4double aT)
void BuildPhysicsTable (const G4ParticleDefinition &)
void DumpPhysicsTable (const G4ParticleDefinition &)

Detailed Description

Definition at line 55 of file G4NeutronHPorLFissionData.hh.


Constructor & Destructor Documentation

G4NeutronHPorLFissionData::G4NeutronHPorLFissionData (  ) 

Definition at line 43 of file G4NeutronHPorLFissionData.cc.

References G4VCrossSectionDataSet::SetMaxKinEnergy(), and G4VCrossSectionDataSet::SetMinKinEnergy().

00044 {
00045    SetMinKinEnergy( 0*MeV );                                   
00046    SetMaxKinEnergy( 20*MeV );                                   
00047 
00048    ke_cache = 0.0;
00049    xs_cache = 0.0;
00050    element_cache = NULL;
00051    material_cache = NULL;
00052 //   BuildPhysicsTable(*G4Neutron::Neutron());
00053 }

G4NeutronHPorLFissionData::G4NeutronHPorLFissionData ( G4NeutronHPChannel ,
std::set< G4String > *   
)

Definition at line 91 of file G4NeutronHPorLFissionData.cc.

References G4VCrossSectionDataSet::SetMaxKinEnergy(), and G4VCrossSectionDataSet::SetMinKinEnergy().

00092 :G4VCrossSectionDataSet("NeutronHPorLFissionXS")
00093 {
00094    theFissionChannel = pChannel;
00095    unavailable_elements = pSet;   
00096 
00097    SetMinKinEnergy( 0*MeV );                                   
00098    SetMaxKinEnergy( 20*MeV );                                   
00099 
00100    ke_cache = 0.0;
00101    xs_cache = 0.0;
00102    element_cache = NULL;
00103    material_cache = NULL;
00104 }

G4NeutronHPorLFissionData::~G4NeutronHPorLFissionData (  ) 

Definition at line 55 of file G4NeutronHPorLFissionData.cc.

00056 {
00057 //  delete theCrossSections;
00058 }


Member Function Documentation

void G4NeutronHPorLFissionData::BuildPhysicsTable ( const G4ParticleDefinition  )  [virtual]

Reimplemented from G4VCrossSectionDataSet.

Definition at line 119 of file G4NeutronHPorLFissionData.cc.

References G4Neutron::Neutron().

00120 {
00121    if( &aP!=G4Neutron::Neutron() ) 
00122       throw G4HadronicException(__FILE__, __LINE__, "Attempt to use NeutronHP data for particles other than neutrons!!!");  
00123 }

void G4NeutronHPorLFissionData::DumpPhysicsTable ( const G4ParticleDefinition  )  [virtual]

Reimplemented from G4VCrossSectionDataSet.

Definition at line 127 of file G4NeutronHPorLFissionData.cc.

References G4Neutron::Neutron().

00128 {
00129   if(&aP!=G4Neutron::Neutron()) 
00130      throw G4HadronicException(__FILE__, __LINE__, "Attempt to use NeutronHP data for particles other than neutrons!!!");  
00131 //  G4cout << "G4NeutronHPorLFissionData::DumpPhysicsTable still to be implemented"<<G4endl;
00132 }

G4double G4NeutronHPorLFissionData::GetCrossSection ( const G4DynamicParticle ,
const G4Element ,
G4double  aT 
)

Definition at line 142 of file G4NeutronHPorLFissionData.cc.

References buffer, G4DynamicParticle::GetDefinition(), G4Element::GetIndex(), G4ReactionProduct::GetKineticEnergy(), G4DynamicParticle::GetKineticEnergy(), G4ReactionProduct::GetMass(), G4ReactionProduct::GetMomentum(), G4DynamicParticle::GetMomentum(), G4Element::GetN(), G4NucleiProperties::GetNuclearMass(), G4ParticleDefinition::GetPDGMass(), G4Nucleus::GetThermalNucleus(), G4NeutronHPChannel::GetXsec(), G4Element::GetZ(), G4ReactionProduct::Lorentz(), and G4Neutron::Neutron().

Referenced by GetIsoCrossSection().

00143 {
00144   G4double result = 0;
00145   if ( anE->GetZ() < 90 ) return result;
00146 
00147 //  G4bool outOfRange;
00148   G4int index = anE->GetIndex();
00149 
00150   // prepare neutron
00151   G4double eKinetic = aP->GetKineticEnergy();
00152   G4ReactionProduct theNeutron( aP->GetDefinition() );
00153   theNeutron.SetMomentum( aP->GetMomentum() );
00154   theNeutron.SetKineticEnergy( eKinetic );
00155 
00156   // prepare thermal nucleus
00157   G4Nucleus aNuc;
00158   G4double eps = 0.0001;
00159   G4double theA = anE->GetN();
00160   G4double theZ = anE->GetZ();
00161   G4double eleMass; 
00162   eleMass = ( G4NucleiProperties::GetNuclearMass(static_cast<G4int>(theA+eps), static_cast<G4int>(theZ+eps))
00163              ) / G4Neutron::Neutron()->GetPDGMass();
00164   
00165   G4ReactionProduct boosted;
00166   G4double aXsection;
00167   
00168   // MC integration loop
00169   G4int counter = 0;
00170   G4double buffer = 0;
00171   G4int size = G4int(std::max(10., aT/60*kelvin));
00172   G4ThreeVector neutronVelocity = 1./G4Neutron::Neutron()->GetPDGMass()*theNeutron.GetMomentum();
00173   G4double neutronVMag = neutronVelocity.mag();
00174   while(counter == 0 || std::abs(buffer-result/std::max(1,counter)) > 0.03*buffer)
00175   {
00176     if(counter) buffer = result/counter;
00177     while (counter<size)
00178     {
00179       counter ++;
00180       G4ReactionProduct aThermalNuc = aNuc.GetThermalNucleus(eleMass, aT);
00181       boosted.Lorentz(theNeutron, aThermalNuc);
00182       G4double theEkin = boosted.GetKineticEnergy();
00183       //aXsection = (*((*theCrossSections)(index))).GetValue(theEkin, outOfRange);
00184       aXsection = theFissionChannel[index].GetXsec( theEkin );
00185       // velocity correction.
00186       G4ThreeVector targetVelocity = 1./aThermalNuc.GetMass()*aThermalNuc.GetMomentum();
00187       aXsection *= (targetVelocity-neutronVelocity).mag()/neutronVMag;
00188       result += aXsection;
00189     }
00190     size += size;
00191   }
00192   result /= counter;
00193   return result;
00194 }

G4double G4NeutronHPorLFissionData::GetIsoCrossSection ( const G4DynamicParticle ,
G4int  ,
G4int  ,
const G4Isotope ,
const G4Element ,
const G4Material  
) [virtual]

Reimplemented from G4VCrossSectionDataSet.

Definition at line 74 of file G4NeutronHPorLFissionData.cc.

References GetCrossSection(), and G4DynamicParticle::GetKineticEnergy().

00079 {
00080    if ( dp->GetKineticEnergy() == ke_cache && element == element_cache &&  material == material_cache ) return xs_cache;
00081 
00082    ke_cache = dp->GetKineticEnergy();
00083    element_cache = element;
00084    material_cache = material;
00085    G4double xs = GetCrossSection( dp , element , material->GetTemperature() );
00086    xs_cache = xs;
00087    return xs;
00088    //return GetCrossSection( dp , element , material->GetTemperature() );
00089 }

G4bool G4NeutronHPorLFissionData::IsIsoApplicable ( const G4DynamicParticle ,
G4int  ,
G4int  ,
const G4Element ,
const G4Material  
) [virtual]

Reimplemented from G4VCrossSectionDataSet.

Definition at line 60 of file G4NeutronHPorLFissionData.cc.

References G4DynamicParticle::GetDefinition(), G4DynamicParticle::GetKineticEnergy(), G4VCrossSectionDataSet::GetMaxKinEnergy(), G4VCrossSectionDataSet::GetMinKinEnergy(), G4Element::GetName(), and G4Neutron::Neutron().

00064 {
00065    G4double eKin = dp->GetKineticEnergy();
00066    if ( eKin > GetMaxKinEnergy() 
00067      || eKin < GetMinKinEnergy() 
00068      || dp->GetDefinition() != G4Neutron::Neutron() ) return false;                                   
00069    if ( unavailable_elements->find( element->GetName() ) != unavailable_elements->end() ) return false;
00070 
00071    return true;
00072 }


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:52:41 2013 for Geant4 by  doxygen 1.4.7