Geant4  10.02.p03
G4LENDCrossSection Class Reference

#include <G4LENDCrossSection.hh>

Inheritance diagram for G4LENDCrossSection:
Collaboration diagram for G4LENDCrossSection:

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 ()
 
- Public Member Functions inherited from G4VCrossSectionDataSet
 G4VCrossSectionDataSet (const G4String &nam="")
 
virtual ~G4VCrossSectionDataSet ()
 
virtual G4bool IsElementApplicable (const G4DynamicParticle *, G4int Z, const G4Material *mat=0)
 
G4double GetCrossSection (const G4DynamicParticle *, const G4Element *, const G4Material *mat=0)
 
G4double ComputeCrossSection (const G4DynamicParticle *, const G4Element *, const G4Material *mat=0)
 
virtual G4double GetElementCrossSection (const G4DynamicParticle *, G4int Z, const G4Material *mat=0)
 
virtual G4Isotope * SelectIsotope (const G4Element *, G4double kinEnergy)
 
virtual void CrossSectionDescription (std::ostream &) const
 
virtual G4int GetVerboseLevel () const
 
virtual void SetVerboseLevel (G4int value)
 
G4double GetMinKinEnergy () const
 
void SetMinKinEnergy (G4double value)
 
G4double GetMaxKinEnergy () const
 
void SetMaxKinEnergy (G4double value)
 
const G4String & GetName () const
 

Protected Member Functions

void create_used_target_map ()
 
virtual G4double getLENDCrossSection (G4GIDI_target *, G4double, G4double)
 
G4double GetUltraLowEnergyExtrapolatedXS (G4double, G4double, G4double, G4double, G4double)
 
- Protected Member Functions inherited from G4VCrossSectionDataSet
void SetName (const G4String &)
 

Protected Attributes

G4ParticleDefinition * proj
 
- Protected Attributes inherited from G4VCrossSectionDataSet
G4int verboseLevel
 

Private Member Functions

void recreate_used_target_map ()
 

Private Attributes

std::map< G4int, G4LENDUsedTarget *> usedTarget_map
 
G4String default_evaluation
 
G4bool allow_nat
 
G4bool allow_any
 
G4LENDManager * lend_manager
 

Detailed Description

Definition at line 57 of file G4LENDCrossSection.hh.

Constructor & Destructor Documentation

◆ G4LENDCrossSection()

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

Definition at line 84 of file G4LENDCrossSection.cc.

86 {
87 
88  proj = NULL; //will be set in an inherited class
89  //default_evaluation = "endl99";
90  //default_evaluation = "ENDF.B-VII.0";
91  default_evaluation = "ENDF/BVII.1";
92 
93  allow_nat = false;
94  allow_any = false;
95 
96  SetMinKinEnergy( 0*MeV );
97  SetMaxKinEnergy( 20*MeV );
98 
100 
101 }
static const double MeV
Definition: G4SIunits.hh:211
G4VCrossSectionDataSet(const G4String &nam="")
G4ParticleDefinition * proj
G4LENDManager * lend_manager
void SetMinKinEnergy(G4double value)
static G4LENDManager * GetInstance()
void SetMaxKinEnergy(G4double value)
Here is the call graph for this function:

◆ ~G4LENDCrossSection()

G4LENDCrossSection::~G4LENDCrossSection ( )

Definition at line 103 of file G4LENDCrossSection.cc.

104 {
105 
106  for ( std::map< G4int , G4LENDUsedTarget* >::iterator
107  it = usedTarget_map.begin() ; it != usedTarget_map.end() ; it ++ )
108  {
109  delete it->second;
110  }
111 
112 }
std::map< G4int, G4LENDUsedTarget *> usedTarget_map

Member Function Documentation

◆ AllowAnyCandidateTarget()

void G4LENDCrossSection::AllowAnyCandidateTarget ( )
inline

Definition at line 96 of file G4LENDCrossSection.hh.

96 { allow_any = true; };
Here is the caller graph for this function:

◆ AllowNaturalAbundanceTarget()

void G4LENDCrossSection::AllowNaturalAbundanceTarget ( )
inline

Definition at line 95 of file G4LENDCrossSection.hh.

95 { allow_nat = true; };

◆ BuildPhysicsTable()

void G4LENDCrossSection::BuildPhysicsTable ( const G4ParticleDefinition &  )
virtual

Reimplemented from G4VCrossSectionDataSet.

Definition at line 114 of file G4LENDCrossSection.cc.

115 {
117 }
Here is the call graph for this function:

◆ ChangeDefaultEvaluation()

void G4LENDCrossSection::ChangeDefaultEvaluation ( G4String  name_tmp)
inline

Definition at line 94 of file G4LENDCrossSection.hh.

94 { default_evaluation = name_tmp; };
Here is the caller graph for this function:

◆ create_used_target_map()

void G4LENDCrossSection::create_used_target_map ( )
protected

Definition at line 276 of file G4LENDCrossSection.cc.

277 {
278 
280 
281  size_t numberOfElements = G4Element::GetNumberOfElements();
282  static const G4ElementTable* theElementTable = G4Element::GetElementTable();
283 
284  for ( size_t i = 0 ; i < numberOfElements ; ++i )
285  {
286 
287  const G4Element* anElement = (*theElementTable)[i];
288  G4int numberOfIsotope = anElement->GetNumberOfIsotopes();
289 
290  if ( numberOfIsotope > 0 )
291  {
292  // User Defined Abundances
293  for ( G4int i_iso = 0 ; i_iso < numberOfIsotope ; i_iso++ )
294  {
295  G4int iZ = anElement->GetIsotope( i_iso )->GetZ();
296  G4int iA = anElement->GetIsotope( i_iso )->GetN();
297  G4int iIsomer = anElement->GetIsotope( i_iso )->Getm();
298 
299  //G4LENDUsedTarget* aTarget = new G4LENDUsedTarget ( G4Neutron::Neutron() , default_evaluation , iZ , iA );
300  G4LENDUsedTarget* aTarget = new G4LENDUsedTarget ( proj , default_evaluation , iZ , iA );
301  if ( allow_nat == true ) aTarget->AllowNat();
302  if ( allow_any == true ) aTarget->AllowAny();
303  usedTarget_map.insert( std::pair< G4int , G4LENDUsedTarget* > ( lend_manager->GetNucleusEncoding( iZ , iA , iIsomer ) , aTarget ) );
304  }
305  }
306  else
307  {
308  // Natural Abundances
310  G4int iZ = int ( anElement->GetZ() );
311  //G4cout << nistElementBuild->GetNumberOfNistIsotopes( int ( anElement->GetZ() ) ) << G4endl;
312  G4int numberOfNistIso = nistElementBuild->GetNumberOfNistIsotopes( int ( anElement->GetZ() ) );
313 
314  for ( G4int ii = 0 ; ii < numberOfNistIso ; ii++ )
315  {
316  //G4cout << nistElementBuild->GetIsotopeAbundance( iZ , nistElementBuild->GetNistFirstIsotopeN( iZ ) + i ) << G4endl;
317  if ( nistElementBuild->GetIsotopeAbundance( iZ , nistElementBuild->GetNistFirstIsotopeN( iZ ) + ii ) > 0 )
318  {
319  G4int iMass = nistElementBuild->GetNistFirstIsotopeN( iZ ) + ii;
320  //G4cout << iZ << " " << nistElementBuild->GetNistFirstIsotopeN( iZ ) + i << " " << nistElementBuild->GetIsotopeAbundance ( iZ , iMass ) << G4endl;
321  G4int iIsomer = 0;
322 
323  G4LENDUsedTarget* aTarget = new G4LENDUsedTarget ( proj , default_evaluation , iZ , iMass );
324  if ( allow_nat == true ) aTarget->AllowNat();
325  if ( allow_any == true ) aTarget->AllowAny();
326  usedTarget_map.insert( std::pair< G4int , G4LENDUsedTarget* > ( lend_manager->GetNucleusEncoding( iZ , iMass , iIsomer ) , aTarget ) );
327 
328  }
329 
330  }
331  }
332  }
333 
334  G4cout << "Dump UsedTarget for " << GetName() << G4endl;
335  //G4cout << "Requested Evaluation, Z , A -> Actual Evaluation, Z , A(0=Nat) , Pointer of Target" << G4endl;
336  G4cout << "Requested Evaluation, Z , A -> Actual Evaluation, Z , A(0=Nat) " << G4endl;
337  for ( std::map< G4int , G4LENDUsedTarget* >::iterator
338  it = usedTarget_map.begin() ; it != usedTarget_map.end() ; it ++ )
339  {
340  G4cout
341  << " " << it->second->GetWantedEvaluation()
342  << ", " << it->second->GetWantedZ()
343  << ", " << it->second->GetWantedA()
344  << " -> " << it->second->GetActualEvaluation()
345  << ", " << it->second->GetActualZ()
346  << ", " << it->second->GetActualA()
347  //<< ", " << it->second->GetTarget()
348  << G4endl;
349  }
350 
351 }
const G4Isotope * GetIsotope(G4int iso) const
Definition: G4Element.hh:169
G4double GetIsotopeAbundance(G4int Z, G4int N) const
G4NistElementBuilder * GetNistElementBuilder()
G4ParticleDefinition * proj
int G4int
Definition: G4Types.hh:78
size_t GetNumberOfIsotopes() const
Definition: G4Element.hh:158
G4int GetNucleusEncoding(G4int iZ, G4int iA, G4int iM)
G4LENDManager * lend_manager
G4GLOB_DLL std::ostream G4cout
static size_t GetNumberOfElements()
Definition: G4Element.cc:402
G4int Getm() const
Definition: G4Isotope.hh:100
G4int GetN() const
Definition: G4Isotope.hh:94
#define G4endl
Definition: G4ios.hh:61
G4int GetZ() const
Definition: G4Isotope.hh:91
std::vector< G4Element * > G4ElementTable
G4int GetNumberOfNistIsotopes(G4int Z) const
G4bool RequestChangeOfVerboseLevel(G4int)
G4int GetNistFirstIsotopeN(G4int Z) const
static G4ElementTable * GetElementTable()
Definition: G4Element.cc:395
G4double GetZ() const
Definition: G4Element.hh:131
std::map< G4int, G4LENDUsedTarget *> usedTarget_map
const G4String & GetName() const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DumpPhysicsTable()

void G4LENDCrossSection::DumpPhysicsTable ( const G4ParticleDefinition &  aP)
virtual

Reimplemented from G4VCrossSectionDataSet.

Definition at line 119 of file G4LENDCrossSection.cc.

120 {
121 
122  if ( &aP != proj )
123  throw G4HadronicException(__FILE__, __LINE__, "Attempt to use LEND data for particles other than neutrons!!!");
124 
125  G4cout << G4endl;
126  G4cout << "Dump Cross Sections of " << GetName() << G4endl;
127  G4cout << "(Pointwise cross-section at 300 Kelvin.)" << G4endl;
128  G4cout << G4endl;
129 
130  G4cout << "Target informaiton " << G4endl;
131 
132  for ( std::map< G4int , G4LENDUsedTarget* >::iterator
133  it = usedTarget_map.begin() ; it != usedTarget_map.end() ; it ++ )
134  {
135  G4cout
136  << "Wanted " << it->second->GetWantedEvaluation()
137  << ", Z= " << it->second->GetWantedZ()
138  << ", A= " << it->second->GetWantedA()
139  << "; Actual " << it->second->GetActualEvaluation()
140  << ", Z= " << it->second->GetActualZ()
141  << ", A= " << it->second->GetActualA()
142  << ", " << it->second->GetTarget()
143  << G4endl;
144 
145  G4int ie = 0;
146 
147  G4GIDI_target* aTarget = it->second->GetTarget();
148  G4double aT = 300;
149  for ( ie = 0 ; ie < 130 ; ie++ )
150  {
151  G4double ke = 1.0e-5 * G4Pow::GetInstance()->powA ( 10.0 , ie/10.0 ) *eV;
152 
153  if ( ke < 20*MeV )
154  {
155  G4cout << " " << GetName() << ", cross section at " << ke/eV << " [eV] = " << getLENDCrossSection ( aTarget , ke , aT )/barn << " [barn] " << G4endl;
156  }
157  }
158  G4cout << G4endl;
159 
160  }
161 
162 }
static G4Pow * GetInstance()
Definition: G4Pow.cc:55
virtual G4double getLENDCrossSection(G4GIDI_target *, G4double, G4double)
static const double MeV
Definition: G4SIunits.hh:211
G4ParticleDefinition * proj
int G4int
Definition: G4Types.hh:78
G4GLOB_DLL std::ostream G4cout
static const double eV
Definition: G4SIunits.hh:212
#define G4endl
Definition: G4ios.hh:61
static const double barn
Definition: G4SIunits.hh:104
G4double powA(G4double A, G4double y) const
Definition: G4Pow.hh:259
double G4double
Definition: G4Types.hh:76
std::map< G4int, G4LENDUsedTarget *> usedTarget_map
const G4String & GetName() const
Here is the call graph for this function:

◆ GetIsoCrossSection()

G4double G4LENDCrossSection::GetIsoCrossSection ( const G4DynamicParticle *  dp,
G4int  iZ,
G4int  iA,
const G4Isotope *  isotope,
const G4Element *  ,
const G4Material *  material 
)
virtual

Reimplemented from G4VCrossSectionDataSet.

Definition at line 57 of file G4LENDCrossSection.cc.

59 {
60 
61  G4double xs = 0.0;
62  G4double ke = dp->GetKineticEnergy();
63  G4double temp = material->GetTemperature();
64  G4int iM = isotope->Getm();
65 
66  G4GIDI_target* aTarget = usedTarget_map.find( lend_manager->GetNucleusEncoding( iZ , iA , iM ) )->second->GetTarget();
67 
68  xs = getLENDCrossSection ( aTarget , ke , temp );
69 
70  return xs;
71 }
virtual G4double getLENDCrossSection(G4GIDI_target *, G4double, G4double)
int G4int
Definition: G4Types.hh:78
G4int GetNucleusEncoding(G4int iZ, G4int iA, G4int iM)
G4LENDManager * lend_manager
G4double GetKineticEnergy() const
G4int Getm() const
Definition: G4Isotope.hh:100
static const double second
Definition: G4SIunits.hh:156
G4double GetTemperature() const
Definition: G4Material.hh:182
double G4double
Definition: G4Types.hh:76
std::map< G4int, G4LENDUsedTarget *> usedTarget_map
Here is the call graph for this function:

◆ getLENDCrossSection()

virtual G4double G4LENDCrossSection::getLENDCrossSection ( G4GIDI_target *  ,
G4double  ,
G4double   
)
inlineprotectedvirtual

Reimplemented in G4LENDInelasticCrossSection, G4LENDCaptureCrossSection, G4LENDElasticCrossSection, and G4LENDFissionCrossSection.

Definition at line 129 of file G4LENDCrossSection.hh.

129 { return 0.0; };
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetUltraLowEnergyExtrapolatedXS()

G4double G4LENDCrossSection::GetUltraLowEnergyExtrapolatedXS ( G4double  x1,
G4double  x2,
G4double  y1,
G4double  y2,
G4double  ke 
)
protected

Definition at line 354 of file G4LENDCrossSection.cc.

355 {
356  //XS propotinal to 1/v at low energy -> 1/root(E)
357  //XS = a * 1/root(E) + b
358  G4double a = ( y2 - y1 ) / ( 1/std::sqrt(x2) - 1/std::sqrt(x1) );
359  G4double b = y1 - a * 1/std::sqrt(x1);
360  G4double result = a * 1/std::sqrt(ke) + b;
361  return result;
362 }
Double_t y2[nxs]
Double_t y1[nxs]
Double_t x2[nxs]
Double_t x1[nxs]
double G4double
Definition: G4Types.hh:76
Here is the caller graph for this function:

◆ IsIsoApplicable()

G4bool G4LENDCrossSection::IsIsoApplicable ( const G4DynamicParticle *  dp,
G4int  ,
G4int  ,
const G4Element *  ,
const G4Material *   
)
virtual

Reimplemented from G4VCrossSectionDataSet.

Definition at line 47 of file G4LENDCrossSection.cc.

49 {
50  G4double eKin = dp->GetKineticEnergy();
51  if ( dp->GetDefinition() != proj ) return false;
52  if ( eKin > GetMaxKinEnergy() || eKin < GetMinKinEnergy() ) return false;
53 
54  return true;
55 }
G4ParticleDefinition * proj
G4double GetKineticEnergy() const
G4ParticleDefinition * GetDefinition() const
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:

◆ recreate_used_target_map()

void G4LENDCrossSection::recreate_used_target_map ( )
private

Definition at line 262 of file G4LENDCrossSection.cc.

263 {
264  for ( std::map< G4int , G4LENDUsedTarget* >::iterator
265  it = usedTarget_map.begin() ; it != usedTarget_map.end() ; it ++ )
266  {
267  delete it->second;
268  }
269  usedTarget_map.clear();
270 
272 }
std::map< G4int, G4LENDUsedTarget *> usedTarget_map
Here is the call graph for this function:

Member Data Documentation

◆ allow_any

G4bool G4LENDCrossSection::allow_any
private

Definition at line 120 of file G4LENDCrossSection.hh.

◆ allow_nat

G4bool G4LENDCrossSection::allow_nat
private

Definition at line 119 of file G4LENDCrossSection.hh.

◆ default_evaluation

G4String G4LENDCrossSection::default_evaluation
private

Definition at line 118 of file G4LENDCrossSection.hh.

◆ lend_manager

G4LENDManager* G4LENDCrossSection::lend_manager
private

Definition at line 122 of file G4LENDCrossSection.hh.

◆ proj

G4ParticleDefinition* G4LENDCrossSection::proj
protected

Definition at line 127 of file G4LENDCrossSection.hh.

◆ usedTarget_map

std::map< G4int , G4LENDUsedTarget* > G4LENDCrossSection::usedTarget_map
private

Definition at line 96 of file G4LENDCrossSection.hh.


The documentation for this class was generated from the following files: