Geant4 11.1.1
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4PhotoNuclearCrossSection Class Reference

#include <G4PhotoNuclearCrossSection.hh>

+ Inheritance diagram for G4PhotoNuclearCrossSection:

Public Member Functions

 G4PhotoNuclearCrossSection ()
 
virtual ~G4PhotoNuclearCrossSection ()
 
virtual void CrossSectionDescription (std::ostream &) const
 
virtual G4bool IsIsoApplicable (const G4DynamicParticle *particle, G4int Z, G4int A, const G4Element *elm=0, const G4Material *mat=0)
 
virtual G4bool IsElementApplicable (const G4DynamicParticle *particle, G4int Z, const G4Material *)
 
virtual G4double GetIsoCrossSection (const G4DynamicParticle *dynPart, G4int Z, G4int A, const G4Isotope *, const G4Element *elm, const G4Material *mat)
 
virtual G4double GetElementCrossSection (const G4DynamicParticle *, G4int Z, const G4Material *)
 
- Public Member Functions inherited from G4VCrossSectionDataSet
 G4VCrossSectionDataSet (const G4String &nam="")
 
virtual ~G4VCrossSectionDataSet ()
 
virtual G4bool IsElementApplicable (const G4DynamicParticle *, G4int Z, const G4Material *mat=nullptr)
 
virtual G4bool IsIsoApplicable (const G4DynamicParticle *, G4int Z, G4int A, const G4Element *elm=nullptr, const G4Material *mat=nullptr)
 
G4double GetCrossSection (const G4DynamicParticle *, const G4Element *, const G4Material *mat=nullptr)
 
G4double ComputeCrossSection (const G4DynamicParticle *, const G4Element *, const G4Material *mat=nullptr)
 
virtual G4double ComputeCrossSectionPerElement (G4double kinEnergy, G4double loge, const G4ParticleDefinition *, const G4Element *, const G4Material *mat=nullptr)
 
virtual G4double GetElementCrossSection (const G4DynamicParticle *, G4int Z, const G4Material *mat=nullptr)
 
virtual G4double GetIsoCrossSection (const G4DynamicParticle *, G4int Z, G4int A, const G4Isotope *iso=nullptr, const G4Element *elm=nullptr, const G4Material *mat=nullptr)
 
virtual G4double ComputeIsoCrossSection (G4double kinEnergy, G4double loge, const G4ParticleDefinition *, G4int Z, G4int A, const G4Isotope *iso=nullptr, const G4Element *elm=nullptr, const G4Material *mat=nullptr)
 
virtual const G4IsotopeSelectIsotope (const G4Element *, G4double kinEnergy, G4double logE)
 
virtual void BuildPhysicsTable (const G4ParticleDefinition &)
 
virtual void DumpPhysicsTable (const G4ParticleDefinition &)
 
virtual void CrossSectionDescription (std::ostream &) const
 
virtual void SetVerboseLevel (G4int value)
 
G4double GetMinKinEnergy () const
 
void SetMinKinEnergy (G4double value)
 
G4double GetMaxKinEnergy () const
 
void SetMaxKinEnergy (G4double value)
 
bool ForAllAtomsAndEnergies () const
 
void SetForAllAtomsAndEnergies (G4bool val)
 
const G4StringGetName () const
 
void SetName (const G4String &nam)
 
G4VCrossSectionDataSetoperator= (const G4VCrossSectionDataSet &right)=delete
 
 G4VCrossSectionDataSet (const G4VCrossSectionDataSet &)=delete
 

Static Public Member Functions

static const char * Default_Name ()
 

Additional Inherited Members

- Protected Attributes inherited from G4VCrossSectionDataSet
G4int verboseLevel
 
G4String name
 

Detailed Description

Definition at line 42 of file G4PhotoNuclearCrossSection.hh.

Constructor & Destructor Documentation

◆ G4PhotoNuclearCrossSection()

G4PhotoNuclearCrossSection::G4PhotoNuclearCrossSection ( )

Definition at line 1486 of file G4PhotoNuclearCrossSection.cc.

1490{
1492 nistmngr = G4NistManager::Instance();
1493
1494 GDR.resize(120, nullptr);
1495 HEN.resize(120, nullptr);
1496 spA.resize(120, 0.0);
1497 eTH.resize(120, 0.0);
1498}
static G4NistManager * Instance()
static G4double GetNuclearMass(const G4double A, const G4double Z)
void SetForAllAtomsAndEnergies(G4bool val)

◆ ~G4PhotoNuclearCrossSection()

G4PhotoNuclearCrossSection::~G4PhotoNuclearCrossSection ( )
virtual

Definition at line 1501 of file G4PhotoNuclearCrossSection.cc.

1502{
1503 for (auto & ptr : GDR) { delete [] ptr; }
1504 for (auto & ptr : HEN) { delete [] ptr; }
1505}

Member Function Documentation

◆ CrossSectionDescription()

void G4PhotoNuclearCrossSection::CrossSectionDescription ( std::ostream &  outFile) const
virtual

Reimplemented from G4VCrossSectionDataSet.

Definition at line 1509 of file G4PhotoNuclearCrossSection.cc.

1510{
1511 outFile << "G4PhotoNuclearCrossSection provides the total inelastic\n"
1512 << "cross section for photon interactions with nuclei. The\n"
1513 << "cross section is a parameterization of data which covers\n"
1514 << "all incident gamma energies.\n";
1515}

◆ Default_Name()

static const char * G4PhotoNuclearCrossSection::Default_Name ( )
inlinestatic

Definition at line 49 of file G4PhotoNuclearCrossSection.hh.

49{return "PhotoNuclearXS";}

Referenced by G4ElectroVDNuclearModel::G4ElectroVDNuclearModel().

◆ GetElementCrossSection()

G4double G4PhotoNuclearCrossSection::GetElementCrossSection ( const G4DynamicParticle aPart,
G4int  Z,
const G4Material  
)
virtual

Reimplemented from G4VCrossSectionDataSet.

Definition at line 1629 of file G4PhotoNuclearCrossSection.cc.

1631{
1632 const G4double Energy = aPart->GetKineticEnergy()/MeV;
1633
1634 if (Energy<THmin) return 0.;
1635 G4double sigma=0.;
1636
1637 if(ZZ!=lastZ) // Otherwise the set of parameters is ready
1638 {
1639 lastZ = ZZ; // The last Z of calculated nucleus
1640 if(GDR[ZZ]) // Calculated nuclei in DB
1641 {
1642 lastGDR=GDR[ZZ]; // Pointer to prepared GDR cross sections
1643 lastHEN=HEN[ZZ]; // Pointer to prepared High Energy cross sections
1644 lastTH =eTH[ZZ]; // Energy Threshold
1645 lastSP =spA[ZZ]; // Shadowing coefficient for UHE
1646 }
1647 else
1648 {
1649 G4double Aa = nistmngr->GetAtomicMassAmu(ZZ); // average A
1650 G4int N = static_cast<G4int>(Aa) - ZZ;
1651
1652 G4double lnA=G4Log(Aa); // The nucleus is not found in DB. It is new.
1653 if(Aa==1.) lastSP=1.; // The Reggeon shadowing (A=1)
1654 else lastSP=Aa*(1.-shc*lnA); // The Reggeon shadowing
1655 lastTH=ThresholdEnergy(ZZ, N); // Energy Threshold
1656 lastGDR = new G4double[nL]; // Allocate memory for the new
1657 // GDR cross sections
1658 lastHEN = new G4double[nH]; // Allocate memory for the new
1659 // HEN cross sections
1660 G4int er=GetFunctions(Aa,lastGDR,lastHEN); // new ZeroPosition and
1661 // filling of the functions
1662 if(er<1) G4cerr << "***G4PhotoNucCrossSection::GetCrossSection: A="
1663 << Aa << " failed" << G4endl;
1664
1665 GDR[ZZ]=lastGDR; // added GDR, found by AH 10/7/02
1666 HEN[ZZ]=lastHEN; // added HEN, found by AH 10/7/02
1667 eTH[ZZ]=lastTH; // Threshold Energy
1668 spA[ZZ]=lastSP; // Pomeron Shadowing
1669 } // End of creation of the new set of parameters
1670 }// End of parameters udate
1671
1672 //
1673 // =================== NOW the Magic Formula ===================
1674 //
1675 if (Energy<lastTH)
1676 {
1677 lastE=Energy;
1678 lastSig=0.;
1679 return 0.;
1680 }
1681 else if (Energy<Emin) // GDR region (approximated in E, not in lnE)
1682 {
1683 sigma=EquLinearFit(Energy,nL,THmin,dE,lastGDR);
1684 }
1685 else if (Energy<Emax) // High Energy region
1686 {
1687 G4double lE=G4Log(Energy);
1688 sigma=EquLinearFit(lE,nH,milE,dlE,lastHEN);
1689 }
1690 else // UHE region (calculation, but not so frequent)
1691 {
1692 G4double lE=G4Log(Energy);
1693 sigma=lastSP*(poc*(lE-pos)+shd*G4Exp(-reg*lE));
1694 }
1695 // End of "sigma" calculation
1696
1697 sigma = std::max(sigma, 0.);
1698 return sigma*millibarn;
1699}
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
Definition: G4Exp.hh:180
G4double G4Log(G4double x)
Definition: G4Log.hh:227
double G4double
Definition: G4Types.hh:83
int G4int
Definition: G4Types.hh:85
G4GLOB_DLL std::ostream G4cerr
#define G4endl
Definition: G4ios.hh:57
G4double GetKineticEnergy() const
G4double GetAtomicMassAmu(const G4String &symb) const
#define N
Definition: crc32.c:56

Referenced by GetIsoCrossSection().

◆ GetIsoCrossSection()

G4double G4PhotoNuclearCrossSection::GetIsoCrossSection ( const G4DynamicParticle dynPart,
G4int  Z,
G4int  A,
const G4Isotope ,
const G4Element elm,
const G4Material mat 
)
virtual

Reimplemented from G4VCrossSectionDataSet.

Definition at line 1542 of file G4PhotoNuclearCrossSection.cc.

1547{
1548 G4double Energy = aPart->GetKineticEnergy()/MeV;
1549 if (Energy < THmin) return 0.;
1550
1551 G4double sigma;
1552 G4double lE;
1553 if (Z == 1 && A == 2) {
1554 // init the XS table if need be
1555 if (deuteron_GDR == nullptr) {
1556 deuteron_TH = ThresholdEnergy(1,1); // threshold calculation is correct
1557 deuteron_GDR = new G4double[nL]; // direct copies
1558 for (G4int i = 0; i < nL; ++i) deuteron_GDR[i] = SL[0][i]; // A = 2 -> SL0
1559 deuteron_HR = new G4double[nH];
1560 for (G4int i = 0; i < nH; ++i) deuteron_HR[i] = SH[1][i]; // A = 2 -> SH1
1561 deuteron_SP = 1; // as would be assigned for proton
1562 }
1563 if (Energy < deuteron_TH) {
1564 sigma = 0.;
1565 } else if (Energy < Emin) { // GDR region (approximated in E, not in lnE)
1566 sigma = EquLinearFit(Energy,nL,THmin,dE,deuteron_GDR);
1567 } else if (Energy < Emax) { // High Energy region
1568 lE = G4Log(Energy);
1569 sigma = EquLinearFit(lE,nH,milE,dlE,deuteron_HR);
1570 } else { // Very high energy region
1571 lE = G4Log(Energy);
1572 sigma = deuteron_SP*(poc*(lE-pos)+shd*std::exp(-reg*lE));
1573 }
1574
1575 } else if (Z == 1 && A == 3) {
1576 if (triton_GDR == nullptr) {
1577 triton_TH = ThresholdEnergy(1,2);
1578 triton_GDR = new G4double[nL]; // same as for deuteron since no A = 3 entry
1579 for (G4int i = 0; i < nL; ++i) triton_GDR[i] = SL[0][i]; // A = 3 -> SL0
1580 triton_HR = new G4double[nH];
1581 for (G4int i = 0; i < nH; ++i) triton_HR[i] = SH[2][i]; // A = 3 -> SH2
1582 triton_SP = 1;
1583 }
1584 if (Energy < triton_TH) {
1585 sigma = 0.;
1586 } else if (Energy < Emin) { // GDR region
1587 sigma = EquLinearFit(Energy,nL,THmin,dE,triton_GDR);
1588 } else if (Energy < Emax) { // High Energy region
1589 lE = G4Log(Energy);
1590 sigma = EquLinearFit(lE,nH,milE,dlE,triton_HR);
1591 } else {
1592 lE = G4Log(Energy);
1593 sigma = triton_SP*(poc*(lE-pos)+shd*std::exp(-reg*lE));
1594 }
1595
1596 } else if (Z == 2 && A == 3) {
1597 if (he3_GDR == nullptr) {
1598 he3_TH = ThresholdEnergy(2,1);
1599 he3_GDR = new G4double[nL]; // same as for deuteron since no A = 3 entry
1600 for (G4int i = 0 ; i < nL ; ++i) he3_GDR[i] = SL[0][i]; // A = 3 -> SL0
1601 he3_HR = new G4double[nH];
1602 for (G4int i = 0 ; i < nH ; ++i) he3_HR[i] = SH[2][i]; // A = 3 -> SH2
1603 he3_SP = 2;
1604 }
1605 if (Energy < he3_TH) {
1606 sigma = 0.;
1607 } else if (Energy < Emin) { // GDR region
1608 sigma = EquLinearFit(Energy,nL,THmin,dE,he3_GDR);
1609 } else if (Energy < Emax) { // High Energy region
1610 lE = G4Log(Energy);
1611 sigma = EquLinearFit(lE,nH,milE,dlE,he3_HR);
1612 } else {
1613 lE = G4Log(Energy);
1614 sigma = he3_SP*(poc*(lE-pos)+shd*std::exp(-reg*lE));
1615 }
1616
1617 } else {
1618 return GetElementCrossSection(aPart, Z, mat);
1619 }
1620
1621 if(sigma < 0.) sigma = 0.;
1622 return sigma*millibarn;
1623}
const G4int Z[17]
const G4double A[17]
virtual G4double GetElementCrossSection(const G4DynamicParticle *, G4int Z, const G4Material *)

◆ IsElementApplicable()

G4bool G4PhotoNuclearCrossSection::IsElementApplicable ( const G4DynamicParticle particle,
G4int  Z,
const G4Material  
)
virtual

Reimplemented from G4VCrossSectionDataSet.

Definition at line 1533 of file G4PhotoNuclearCrossSection.cc.

1535{
1536 return true;
1537}

◆ IsIsoApplicable()

G4bool G4PhotoNuclearCrossSection::IsIsoApplicable ( const G4DynamicParticle particle,
G4int  Z,
G4int  A,
const G4Element elm = 0,
const G4Material mat = 0 
)
virtual

Reimplemented from G4VCrossSectionDataSet.

Definition at line 1520 of file G4PhotoNuclearCrossSection.cc.

1524{
1525 // explicitly allow deuterium and tritium
1526 if ((Z == 1 && A == 2) || (Z == 1 && A == 3) ||
1527 (Z == 2 && A == 3) ) return true;
1528 return false;
1529}

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