Geant4 10.7.0
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 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 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 G4int GetVerboseLevel () 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
 

Static Public Member Functions

static const char * Default_Name ()
 

Additional Inherited Members

- Protected Member Functions inherited from G4VCrossSectionDataSet
void SetName (const G4String &)
 
- Protected Attributes inherited from G4VCrossSectionDataSet
G4int verboseLevel
 

Detailed Description

Definition at line 42 of file G4PhotoNuclearCrossSection.hh.

Constructor & Destructor Documentation

◆ G4PhotoNuclearCrossSection()

G4PhotoNuclearCrossSection::G4PhotoNuclearCrossSection ( )

Definition at line 1494 of file G4PhotoNuclearCrossSection.cc.

1495 : G4VCrossSectionDataSet(Default_Name()), lastZ(0), lastSig(0), lastGDR(0),
1496 lastHEN(0), lastE(0), lastTH(0), lastSP(0),
1497 deuteron_GDR(0), deuteron_HR(0), deuteron_TH(0), deuteron_SP(0),
1498 triton_GDR(0), triton_HR(0), triton_TH(0), triton_SP(0),
1499 he3_GDR(0), he3_HR(0), he3_TH(0), he3_SP(0),
1502{
1504 nistmngr = G4NistManager::Instance();
1505
1506 for (G4int i = 0; i < 120; i++) {
1507 GDR.push_back(0);
1508 HEN.push_back(0);
1509 spA.push_back(0);
1510 eTH.push_back(0);
1511 }
1512}
int G4int
Definition: G4Types.hh:85
static G4NistManager * Instance()
static G4double GetNuclearMass(const G4double A, const G4double Z)
void SetForAllAtomsAndEnergies(G4bool val)

◆ ~G4PhotoNuclearCrossSection()

G4PhotoNuclearCrossSection::~G4PhotoNuclearCrossSection ( )
virtual

Definition at line 1515 of file G4PhotoNuclearCrossSection.cc.

1516{
1517 std::vector<G4double*>::iterator posi;
1518 for (posi = GDR.begin(); posi < GDR.end(); posi++)
1519 { delete [] *posi; }
1520 GDR.clear();
1521 for (posi = HEN.begin(); posi < HEN.end(); posi++)
1522 { delete [] *posi; }
1523 HEN.clear();
1524}

Member Function Documentation

◆ CrossSectionDescription()

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

Reimplemented from G4VCrossSectionDataSet.

Definition at line 1528 of file G4PhotoNuclearCrossSection.cc.

1529{
1530 outFile << "G4PhotoNuclearCrossSection provides the total inelastic\n"
1531 << "cross section for photon interactions with nuclei. The\n"
1532 << "cross section is a parameterization of data which covers\n"
1533 << "all incident gamma energies.\n";
1534}

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

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

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

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

1555{
1556 return true;
1557}

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

1543{
1544 // explicitly allow deuterium and tritium
1545// if (Z == 1 && (A == 2 || A == 3) ) return true;
1546 if ((Z == 1 && A == 2) || (Z == 1 && A == 3) ||
1547 (Z == 2 && A == 3) ) return true;
1548 return false;
1549}

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