Geant4 11.2.2
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 ()
 
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 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 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)
G4VCrossSectionDataSet(const G4String &nam="")
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
1506 delete [] deuteron_GDR;
1507 delete [] deuteron_HR;
1508 delete [] triton_GDR;
1509 delete [] triton_HR;
1510 delete [] he3_GDR;
1511 delete [] he3_HR;
1512}

Member Function Documentation

◆ CrossSectionDescription()

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

Reimplemented from G4VCrossSectionDataSet.

Definition at line 1516 of file G4PhotoNuclearCrossSection.cc.

1517{
1518 outFile << "G4PhotoNuclearCrossSection provides the total inelastic\n"
1519 << "cross section for photon interactions with nuclei. The\n"
1520 << "cross section is a parameterization of data which covers\n"
1521 << "all incident gamma energies.\n";
1522}

◆ 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 1636 of file G4PhotoNuclearCrossSection.cc.

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

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 1549 of file G4PhotoNuclearCrossSection.cc.

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

1542{
1543 return true;
1544}

◆ 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 1527 of file G4PhotoNuclearCrossSection.cc.

1531{
1532 // explicitly allow deuterium and tritium
1533 if ((Z == 1 && A == 2) || (Z == 1 && A == 3) ||
1534 (Z == 2 && A == 3) ) return true;
1535 return false;
1536}

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