G4LENDCrossSection Class Reference

#include <G4LENDCrossSection.hh>

Inheritance diagram for G4LENDCrossSection:

G4VCrossSectionDataSet G4LENDCaptureCrossSection G4LENDElasticCrossSection G4LENDFissionCrossSection G4LENDInelasticCrossSection

Public Member Functions

 G4LENDCrossSection (const G4String name="")
 ~G4LENDCrossSection ()
G4bool IsIsoApplicable (const G4DynamicParticle *, G4int, G4int, const G4Element *, const G4Material *)
G4double GetIsoCrossSection (const G4DynamicParticle *, G4int, G4int, const G4Isotope *, const G4Element *, const G4Material *)
void BuildPhysicsTable (const G4ParticleDefinition &)
void DumpPhysicsTable (const G4ParticleDefinition &)
void ChangeDefaultEvaluation (G4String name_tmp)
void AllowNaturalAbundanceTarget ()
void AllowAnyCandidateTarget ()

Protected Member Functions

void create_used_target_map ()
virtual G4double getLENDCrossSection (G4GIDI_target *, G4double, G4double)
G4double GetUltraLowEnergyExtrapolatedXS (G4double, G4double, G4double, G4double, G4double)

Protected Attributes

G4ParticleDefinitionproj

Detailed Description

Definition at line 57 of file G4LENDCrossSection.hh.


Constructor & Destructor Documentation

G4LENDCrossSection::G4LENDCrossSection ( const G4String  name = ""  ) 

Definition at line 82 of file G4LENDCrossSection.cc.

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

00083 :G4VCrossSectionDataSet( nam )
00084 {
00085 
00086    default_evaluation = "endl99";
00087    allow_nat = false;
00088    allow_any = false;
00089 
00090    SetMinKinEnergy(  0*MeV );
00091    SetMaxKinEnergy( 20*MeV );
00092 
00093    lend_manager = G4LENDManager::GetInstance(); 
00094 
00095 }

G4LENDCrossSection::~G4LENDCrossSection (  ) 

Definition at line 97 of file G4LENDCrossSection.cc.

00098 {
00099 
00100    for ( std::map< G4int , G4LENDUsedTarget* >::iterator 
00101          it = usedTarget_map.begin() ; it != usedTarget_map.end() ; it ++ )
00102    { 
00103       delete it->second;  
00104    }
00105 
00106 }


Member Function Documentation

void G4LENDCrossSection::AllowAnyCandidateTarget (  )  [inline]

Definition at line 96 of file G4LENDCrossSection.hh.

Referenced by G4NeutronLENDBuilder::Build(), and G4HadronElasticPhysicsLEND::ConstructProcess().

00096 { allow_any = true; };

void G4LENDCrossSection::AllowNaturalAbundanceTarget (  )  [inline]

Definition at line 95 of file G4LENDCrossSection.hh.

00095 { allow_nat = true; };

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

Reimplemented from G4VCrossSectionDataSet.

Definition at line 108 of file G4LENDCrossSection.cc.

References create_used_target_map().

00109 {
00110    create_used_target_map();
00111 }

void G4LENDCrossSection::ChangeDefaultEvaluation ( G4String  name_tmp  )  [inline]

Definition at line 94 of file G4LENDCrossSection.hh.

Referenced by G4NeutronLENDBuilder::Build(), and G4HadronElasticPhysicsLEND::ConstructProcess().

00094 { default_evaluation = name_tmp; };

void G4LENDCrossSection::create_used_target_map (  )  [protected]

Definition at line 270 of file G4LENDCrossSection.cc.

References G4LENDUsedTarget::AllowAny(), G4LENDUsedTarget::AllowNat(), G4cout, G4endl, G4Element::GetElementTable(), G4NistElementBuilder::GetIsotopeAbundance(), G4VCrossSectionDataSet::GetName(), G4LENDManager::GetNistElementBuilder(), G4NistElementBuilder::GetNistFirstIsotopeN(), G4LENDManager::GetNucleusEncoding(), G4Element::GetNumberOfElements(), G4NistElementBuilder::GetNumberOfNistIsotopes(), proj, G4LENDManager::RequestChangeOfVerboseLevel(), and G4VCrossSectionDataSet::verboseLevel.

Referenced by BuildPhysicsTable().

00271 {
00272 
00273    lend_manager->RequestChangeOfVerboseLevel( verboseLevel );
00274 
00275    size_t numberOfElements = G4Element::GetNumberOfElements();
00276    static const G4ElementTable* theElementTable = G4Element::GetElementTable();
00277 
00278    for ( size_t i = 0 ; i < numberOfElements ; ++i )
00279    {
00280 
00281       const G4Element* anElement = (*theElementTable)[i];
00282       G4int numberOfIsotope = anElement->GetNumberOfIsotopes(); 
00283 
00284       if ( numberOfIsotope > 0 )
00285       {
00286       // User Defined Abundances   
00287          for ( G4int i_iso = 0 ; i_iso < numberOfIsotope ; i_iso++ )
00288          {
00289             G4int iZ = anElement->GetIsotope( i_iso )->GetZ();
00290             G4int iA = anElement->GetIsotope( i_iso )->GetN();
00291 
00292             //G4LENDUsedTarget* aTarget = new G4LENDUsedTarget ( G4Neutron::Neutron() , default_evaluation , iZ , iA );  
00293             G4LENDUsedTarget* aTarget = new G4LENDUsedTarget ( proj , default_evaluation , iZ , iA );  
00294             if ( allow_nat == true ) aTarget->AllowNat();
00295             if ( allow_any == true ) aTarget->AllowAny();
00296             usedTarget_map.insert( std::pair< G4int , G4LENDUsedTarget* > ( lend_manager->GetNucleusEncoding( iZ , iA ) , aTarget ) );
00297          }
00298       }
00299       else
00300       {
00301       // Natural Abundances   
00302          G4NistElementBuilder* nistElementBuild = lend_manager->GetNistElementBuilder();
00303          G4int iZ = int ( anElement->GetZ() );
00304          //G4cout << nistElementBuild->GetNumberOfNistIsotopes( int ( anElement->GetZ() ) ) << G4endl;
00305          G4int numberOfNistIso = nistElementBuild->GetNumberOfNistIsotopes( int ( anElement->GetZ() ) ); 
00306 
00307          for ( G4int ii = 0 ; ii < numberOfNistIso ; ii++ )
00308          {
00309             //G4cout << nistElementBuild->GetIsotopeAbundance( iZ , nistElementBuild->GetNistFirstIsotopeN( iZ ) + i ) << G4endl;
00310             if ( nistElementBuild->GetIsotopeAbundance( iZ , nistElementBuild->GetNistFirstIsotopeN( iZ ) + ii ) > 0 )
00311             {
00312                G4int iMass = nistElementBuild->GetNistFirstIsotopeN( iZ ) + ii;  
00313                //G4cout << iZ << " " << nistElementBuild->GetNistFirstIsotopeN( iZ ) + i << " " << nistElementBuild->GetIsotopeAbundance ( iZ , iMass ) << G4endl;  
00314 
00315                G4LENDUsedTarget* aTarget = new G4LENDUsedTarget ( proj , default_evaluation , iZ , iMass );  
00316                if ( allow_nat == true ) aTarget->AllowNat();
00317                if ( allow_any == true ) aTarget->AllowAny();
00318                usedTarget_map.insert( std::pair< G4int , G4LENDUsedTarget* > ( lend_manager->GetNucleusEncoding( iZ , iMass ) , aTarget ) );
00319 
00320             }
00321 
00322          }
00323       }
00324    }
00325 
00326    G4cout << "Dump UsedTarget for " << GetName() << G4endl;
00327    G4cout << "Requested Evaluation, Z , A -> Actual Evaluation, Z , A(0=Nat) , Pointer of Target" << G4endl;
00328    for ( std::map< G4int , G4LENDUsedTarget* >::iterator 
00329          it = usedTarget_map.begin() ; it != usedTarget_map.end() ; it ++ )
00330    {
00331       G4cout 
00332          << " " << it->second->GetWantedEvaluation() 
00333          << ", " << it->second->GetWantedZ() 
00334          << ", " << it->second->GetWantedA() 
00335          << " -> " << it->second->GetActualEvaluation() 
00336          << ", " << it->second->GetActualZ() 
00337          << ", " << it->second->GetActualA() 
00338          << ", " << it->second->GetTarget() 
00339          << G4endl; 
00340    } 
00341 
00342 }

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

Reimplemented from G4VCrossSectionDataSet.

Definition at line 113 of file G4LENDCrossSection.cc.

References G4cout, G4endl, getLENDCrossSection(), G4VCrossSectionDataSet::GetName(), and proj.

00114 {
00115 
00116   if ( &aP != proj ) 
00117      throw G4HadronicException(__FILE__, __LINE__, "Attempt to use LEND data for particles other than neutrons!!!");  
00118 
00119    G4cout << G4endl;
00120    G4cout << "Dump Cross Sections of " << GetName() << G4endl;
00121    G4cout << "(Pointwise cross-section at 300 Kelvin.)" << G4endl;
00122    G4cout << G4endl;
00123 
00124    G4cout << "Target informaiton " << G4endl;
00125 
00126    for ( std::map< G4int , G4LENDUsedTarget* >::iterator 
00127          it = usedTarget_map.begin() ; it != usedTarget_map.end() ; it ++ )
00128    {
00129       G4cout 
00130          << "Wanted " << it->second->GetWantedEvaluation() 
00131          << ", Z= " << it->second->GetWantedZ() 
00132          << ", A= " << it->second->GetWantedA() 
00133          << "; Actual " << it->second->GetActualEvaluation() 
00134          << ", Z= " << it->second->GetActualZ() 
00135          << ", A= " << it->second->GetActualA() 
00136          << ", " << it->second->GetTarget() 
00137          << G4endl; 
00138 
00139       G4int ie = 0;
00140 
00141       G4GIDI_target* aTarget = it->second->GetTarget();
00142       G4double aT = 300;
00143       for ( ie = 0 ; ie < 130 ; ie++ )
00144       {
00145          G4double ke = 1.0e-5 * std::pow ( 10.0 , ie/10.0 ) *eV;
00146 
00147          if ( ke < 20*MeV )
00148          {
00149             G4cout << "  " << GetName() << ", cross section at " << ke/eV << " [eV] = " << getLENDCrossSection ( aTarget , ke , aT )/barn << " [barn] " << G4endl;
00150          }
00151       }
00152       G4cout << G4endl;
00153 
00154    }
00155 
00156 }

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

Reimplemented from G4VCrossSectionDataSet.

Definition at line 56 of file G4LENDCrossSection.cc.

References G4DynamicParticle::GetKineticEnergy(), getLENDCrossSection(), G4LENDManager::GetNucleusEncoding(), and G4Material::GetTemperature().

00058 {
00059 
00060    G4double xs = 0.0;
00061    G4double ke = dp->GetKineticEnergy();
00062    G4double temp = material->GetTemperature();
00063 
00064    G4GIDI_target* aTarget = usedTarget_map.find( lend_manager->GetNucleusEncoding( iZ , iA ) )->second->GetTarget();
00065 
00066    xs = getLENDCrossSection ( aTarget , ke , temp );
00067 
00068    return xs;
00069 }

virtual G4double G4LENDCrossSection::getLENDCrossSection ( G4GIDI_target ,
G4double  ,
G4double   
) [inline, protected, virtual]

Definition at line 129 of file G4LENDCrossSection.hh.

Referenced by DumpPhysicsTable(), and GetIsoCrossSection().

00129 { return 0.0; };

G4double G4LENDCrossSection::GetUltraLowEnergyExtrapolatedXS ( G4double  ,
G4double  ,
G4double  ,
G4double  ,
G4double   
) [protected]

Definition at line 345 of file G4LENDCrossSection.cc.

00346 {
00347    //XS propotinal to 1/v at low energy -> 1/root(E) 
00348    //XS = a * 1/root(E) + b  
00349    G4double a = ( y2 - y1 ) / ( 1/std::sqrt(x2) - 1/std::sqrt(x1) );
00350    G4double b = y1 - a * 1/std::sqrt(x1);
00351    G4double result = a * 1/std::sqrt(ke) + b;
00352    return result;
00353 }

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

Reimplemented from G4VCrossSectionDataSet.

Definition at line 46 of file G4LENDCrossSection.cc.

References G4DynamicParticle::GetDefinition(), G4DynamicParticle::GetKineticEnergy(), G4VCrossSectionDataSet::GetMaxKinEnergy(), G4VCrossSectionDataSet::GetMinKinEnergy(), and proj.

00048 {
00049    G4double eKin = dp->GetKineticEnergy();
00050    if ( dp->GetDefinition() != proj ) return false;
00051    if ( eKin > GetMaxKinEnergy() || eKin < GetMinKinEnergy() ) return false;
00052 
00053    return true;
00054 }


Field Documentation

G4ParticleDefinition* G4LENDCrossSection::proj [protected]

Definition at line 127 of file G4LENDCrossSection.hh.

Referenced by create_used_target_map(), DumpPhysicsTable(), G4LENDCaptureCrossSection::G4LENDCaptureCrossSection(), G4LENDElasticCrossSection::G4LENDElasticCrossSection(), G4LENDFissionCrossSection::G4LENDFissionCrossSection(), G4LENDInelasticCrossSection::G4LENDInelasticCrossSection(), and IsIsoApplicable().


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