Geant4  10.02.p03
G4PhotoNuclearCrossSection Class Reference

#include <G4PhotoNuclearCrossSection.hh>

Inheritance diagram for G4PhotoNuclearCrossSection:
Collaboration diagram for G4PhotoNuclearCrossSection:

Public Member Functions

 G4PhotoNuclearCrossSection ()
 
virtual ~G4PhotoNuclearCrossSection ()
 
virtual void CrossSectionDescription (std::ostream &) const
 
virtual G4bool IsElementApplicable (const G4DynamicParticle *particle, G4int Z, const G4Material *)
 
virtual G4double GetElementCrossSection (const G4DynamicParticle *, G4int Z, const G4Material *)
 
- Public Member Functions inherited from G4VCrossSectionDataSet
 G4VCrossSectionDataSet (const G4String &nam="")
 
virtual ~G4VCrossSectionDataSet ()
 
virtual G4bool IsIsoApplicable (const G4DynamicParticle *, G4int Z, G4int A, const G4Element *elm=0, 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 GetIsoCrossSection (const G4DynamicParticle *, G4int Z, G4int A, const G4Isotope *iso=0, const G4Element *elm=0, const G4Material *mat=0)
 
virtual G4Isotope * SelectIsotope (const G4Element *, G4double kinEnergy)
 
virtual void BuildPhysicsTable (const G4ParticleDefinition &)
 
virtual void DumpPhysicsTable (const G4ParticleDefinition &)
 
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
 

Static Public Member Functions

static const char * Default_Name ()
 

Private Member Functions

G4int GetFunctions (G4double a, G4double *y, G4double *z)
 
G4double EquLinearFit (G4double X, G4int N, const G4double X0, const G4double XD, const G4double *Y)
 
G4double ThresholdEnergy (G4int Z, G4int N)
 

Private Attributes

G4int lastZ
 
G4double lastSig
 
G4double * lastGDR
 
G4double * lastHEN
 
G4double lastE
 
G4double lastTH
 
G4double lastSP
 
std::vector< G4double * > GDR
 
std::vector< G4double * > HEN
 
std::vector< G4double > spA
 
std::vector< G4double > eTH
 
G4NistManager * nistmngr
 
G4double mNeut
 
G4double mProt
 

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

1495 {
1497 
1498  for (G4int i=0;i<120;i++)
1499  {
1500  GDR.push_back(0);
1501  HEN.push_back(0);
1502  spA.push_back(0);
1503  eTH.push_back(0);
1504  }
1505 }
static G4double GetNuclearMass(const G4double A, const G4double Z)
G4VCrossSectionDataSet(const G4String &nam="")
int G4int
Definition: G4Types.hh:78
static G4NistManager * Instance()
Here is the call graph for this function:

◆ ~G4PhotoNuclearCrossSection()

G4PhotoNuclearCrossSection::~G4PhotoNuclearCrossSection ( )
virtual

Definition at line 1507 of file G4PhotoNuclearCrossSection.cc.

1508 {
1509  std::vector<G4double*>::iterator posi;
1510  for(posi=GDR.begin(); posi<GDR.end(); posi++)
1511  { delete [] *posi; }
1512  GDR.clear();
1513  for(posi=HEN.begin(); posi<HEN.end(); posi++)
1514  { delete [] *posi; }
1515  HEN.clear();
1516 }

Member Function Documentation

◆ CrossSectionDescription()

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

Reimplemented from G4VCrossSectionDataSet.

Definition at line 1519 of file G4PhotoNuclearCrossSection.cc.

1520 {
1521  outFile << "G4PhotoNuclearCrossSection provides the total inelastic\n"
1522  << "cross section for photon interactions with nuclei. The\n"
1523  << "cross section is a parameterization of data which covers\n"
1524  << "all incident gamma energies.\n";
1525 }
Here is the caller graph for this function:

◆ Default_Name()

static const char* G4PhotoNuclearCrossSection::Default_Name ( )
inlinestatic

Definition at line 49 of file G4PhotoNuclearCrossSection.hh.

49 {return "PhotoNuclearXS";}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ EquLinearFit()

G4double G4PhotoNuclearCrossSection::EquLinearFit ( G4double  X,
G4int  N,
const G4double  X0,
const G4double  XD,
const G4double *  Y 
)
private

Definition at line 1646 of file G4PhotoNuclearCrossSection.cc.

1649 {
1650  if(DX<=0. || N<2)
1651  {
1652  G4cout<<"***G4PhotoNuclearCrossSection::EquLinearFit: DX="<<DX<<", N="<<N<<G4endl;
1653  return Y[0];
1654  }
1655  G4int N2=N-2;
1656  G4double d=(X-X0)/DX;
1657  G4int j=static_cast<int>(d);
1658  if (j<0) j=0;
1659  else if(j>N2) j=N2;
1660  d-=j; // excess
1661  G4double yi=Y[j];
1662  G4double sigma=yi+(Y[j+1]-yi)*d;
1663  return sigma;
1664 }
Float_t d
Float_t Y
int G4int
Definition: G4Types.hh:78
Float_t X
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
**D E S C R I P T I O N
double G4double
Definition: G4Types.hh:76
Here is the caller graph for this function:

◆ GetElementCrossSection()

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

Reimplemented from G4VCrossSectionDataSet.

Definition at line 1537 of file G4PhotoNuclearCrossSection.cc.

1539 {
1540  const G4double Energy = aPart->GetKineticEnergy()/MeV;
1541 
1542  if (Energy<THmin) return 0.;
1543  G4double sigma=0.;
1544 
1545  if(ZZ!=lastZ) // Otherwise the set of parameters is ready
1546  {
1547  lastZ = ZZ; // The last Z of calculated nucleus
1548  if(GDR[ZZ]) // Calculated nuclei in DB
1549  {
1550  lastGDR=GDR[ZZ]; // Pointer to prepared GDR cross sections
1551  lastHEN=HEN[ZZ]; // Pointer to prepared High Energy cross sections
1552  lastTH =eTH[ZZ]; // Energy Threshold
1553  lastSP =spA[ZZ]; // Shadowing coefficient for UHE
1554  }
1555  else
1556  {
1557  G4double Aa = nistmngr->GetAtomicMassAmu(ZZ); // average A
1558  G4int N = (G4int)Aa - ZZ;
1559 
1560  G4double lnA=G4Log(Aa); // The nucleus is not found in DB. It is new.
1561  if(Aa==1.) lastSP=1.; // The Reggeon shadowing (A=1)
1562  else lastSP=Aa*(1.-shc*lnA); // The Reggeon shadowing
1563  lastTH=ThresholdEnergy(ZZ, N); // Energy Threshold
1564  lastGDR = new G4double[nL]; // Allocate memory for the new
1565  // GDR cross sections
1566  lastHEN = new G4double[nH]; // Allocate memory for the new
1567  // HEN cross sections
1568  G4int er=GetFunctions(Aa,lastGDR,lastHEN); // new ZeroPosition and
1569  // filling of the functions
1570  if(er<1) G4cerr << "***G4PhotoNucCrossSection::GetCrossSection: A="
1571  << Aa << " failed" << G4endl;
1572 
1573  GDR[ZZ]=lastGDR; // added GDR, found by AH 10/7/02
1574  HEN[ZZ]=lastHEN; // added HEN, found by AH 10/7/02
1575  eTH[ZZ]=lastTH; // Threshold Energy
1576  spA[ZZ]=lastSP; // Pomeron Shadowing
1577  } // End of creation of the new set of parameters
1578  }// End of parameters udate
1579 
1580  //
1581  // =================== NOW the Magic Formula ===================
1582  //
1583  if (Energy<lastTH)
1584  {
1585  lastE=Energy;
1586  lastSig=0.;
1587  return 0.;
1588  }
1589  else if (Energy<Emin) // GDR region (approximated in E, not in lnE)
1590  {
1591  sigma=EquLinearFit(Energy,nL,THmin,dE,lastGDR);
1592  }
1593  else if (Energy<Emax) // High Energy region
1594  {
1595  G4double lE=G4Log(Energy);
1596  sigma=EquLinearFit(lE,nH,milE,dlE,lastHEN);
1597  }
1598  else // UHE region (calculation, but not so frequent)
1599  {
1600  G4double lE=G4Log(Energy);
1601  sigma=lastSP*(poc*(lE-pos)+shd*G4Exp(-reg*lE));
1602  }
1603  // End of "sigma" calculation
1604 
1605  if(sigma<0.) return 0.;
1606  return sigma*millibarn;
1607 }
static const G4double pos
static const double MeV
Definition: G4SIunits.hh:211
static const G4double shc
static const G4double reg
static const G4int nH
G4int GetFunctions(G4double a, G4double *y, G4double *z)
G4double EquLinearFit(G4double X, G4int N, const G4double X0, const G4double XD, const G4double *Y)
static const G4int nL
int G4int
Definition: G4Types.hh:78
static const G4double dE
G4double GetKineticEnergy() const
static const G4double shd
G4double G4Log(G4double x)
Definition: G4Log.hh:230
static const G4double milE
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
Definition: G4Exp.hh:183
static const G4double dlE
static const double millibarn
Definition: G4SIunits.hh:105
G4double ThresholdEnergy(G4int Z, G4int N)
static const G4double Emin
static const G4double Emax
#define G4endl
Definition: G4ios.hh:61
**D E S C R I P T I O N
double G4double
Definition: G4Types.hh:76
G4double GetAtomicMassAmu(const G4String &symb) const
static const G4double THmin
static const G4double poc
G4GLOB_DLL std::ostream G4cerr
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetFunctions()

G4int G4PhotoNuclearCrossSection::GetFunctions ( G4double  a,
G4double *  y,
G4double *  z 
)
private

Definition at line 1669 of file G4PhotoNuclearCrossSection.cc.

1670 {
1671 
1672  if(a<=.9)
1673  {
1674  G4cout << "***G4PhotoNuclearCS::GetFunctions: A=" << a
1675  << "(?). No CS returned!" << G4endl;
1676  return -1;
1677  }
1678  G4int r=0; // Low channel for GDR (filling-flag for GDR)
1679  for(G4int i=0; i<nLA; i++) if(std::abs(a-LA[i])<.0005)
1680  {
1681  for(G4int k=0; k<nL; k++) y[k]=SL[i][k];
1682  r=1; // Flag of filled GDR part
1683  }
1684  G4int h=0;
1685  for(G4int j=0; j<nHA; j++) if(std::abs(a-HA[j])<.0005)
1686  {
1687  for(G4int k=0; k<nH; k++) z[k]=SH[j][k];
1688  h=1; // Flag of filled GDR part
1689  }
1690  if(!r) // GDR part is not filled
1691  {
1692  G4int k=0; // !! To be good for different compilers !!
1693  for(k=1; k<nLA; k++) if(a<LA[k]) break;
1694  if(k<1) k=1; // Extrapolation from the first bin (D/He)
1695  if(k>=nLA) k=nLA-1; // Extrapolation from the last bin (U)
1696  G4int k1=k-1;
1697  G4double xi=LA[k1];
1698  G4double b=(a-xi)/(LA[k]-xi);
1699  for(G4int q=0; q<nL; q++)
1700  {
1701  if(a>1.5)
1702  {
1703  G4double yi=SL[k1][q];
1704  y[q]=yi+(SL[k][q]-yi)*b;
1705  }
1706  else y[q]=0.;
1707  }
1708  r=1;
1709  }
1710  if(!h) // High Energy part is not filled
1711  {
1712  G4int k=0;
1713  for(k=1; k<nHA; k++) if(a<HA[k]) break;
1714  if(k<1) k=1; // Extrapolation from the first bin (D/He)
1715  if(k>=nHA) k=nHA-1; // Extrapolation from the last bin (Pu)
1716  G4int k1=k-1;
1717  G4double xi=HA[k1];
1718  G4double b=(a-xi)/(HA[k]-xi);
1719  for(G4int q=0; q<nH; q++)
1720  {
1721  G4double zi=SH[k1][q];
1722  z[q]=zi+(SH[k][q]-zi)*b;
1723  }
1724  h=1;
1725  }
1726  return r*h;
1727 }
static const G4double HA[nHA]
static const G4int nH
static const G4int nL
int G4int
Definition: G4Types.hh:78
static const G4double LA[nLA]
static const G4double * SH[nHA]
Double_t y
G4GLOB_DLL std::ostream G4cout
static const G4int nLA
static const G4int nHA
static const G4double * SL[nLA]
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
Here is the caller graph for this function:

◆ IsElementApplicable()

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

Reimplemented from G4VCrossSectionDataSet.

Definition at line 1528 of file G4PhotoNuclearCrossSection.cc.

1530 {
1531  return true;
1532 }
Here is the caller graph for this function:

◆ ThresholdEnergy()

G4double G4PhotoNuclearCrossSection::ThresholdEnergy ( G4int  Z,
G4int  N 
)
private

Definition at line 1610 of file G4PhotoNuclearCrossSection.cc.

1611 {
1612  // ---------
1613 
1614  G4int A=Z+N;
1615  if(A<1) return infEn;
1616  else if(A==1) return 134.9766; // Pi0 threshold for the nucleon
1617 
1618  G4double mT= 0.;
1621  else
1622  {
1623  return infEn;
1624  }
1625  // ---------
1626  G4double mP= infEn;
1627 
1629  {
1631  }
1632  G4double mN= infEn;
1635 
1636  G4double dP= mP+mProt-mT;
1637  G4double dN= mN+mNeut-mT;
1638  if(dP<dN)dN=dP;
1639  return dN;
1640 }
static G4double GetNuclearMass(const G4double A, const G4double Z)
int G4int
Definition: G4Types.hh:78
double A(double temperature)
Float_t Z
static bool IsInStableTable(const G4double A, const G4double Z)
static const G4double infEn
**D E S C R I P T I O N
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ eTH

std::vector<G4double> G4PhotoNuclearCrossSection::eTH
private

Definition at line 86 of file G4PhotoNuclearCrossSection.hh.

◆ GDR

std::vector<G4double*> G4PhotoNuclearCrossSection::GDR
private

Definition at line 80 of file G4PhotoNuclearCrossSection.hh.

◆ HEN

std::vector<G4double*> G4PhotoNuclearCrossSection::HEN
private

Definition at line 83 of file G4PhotoNuclearCrossSection.hh.

◆ lastE

G4double G4PhotoNuclearCrossSection::lastE
private

Definition at line 75 of file G4PhotoNuclearCrossSection.hh.

◆ lastGDR

G4double* G4PhotoNuclearCrossSection::lastGDR
private

Definition at line 73 of file G4PhotoNuclearCrossSection.hh.

◆ lastHEN

G4double* G4PhotoNuclearCrossSection::lastHEN
private

Definition at line 74 of file G4PhotoNuclearCrossSection.hh.

◆ lastSig

G4double G4PhotoNuclearCrossSection::lastSig
private

Definition at line 72 of file G4PhotoNuclearCrossSection.hh.

◆ lastSP

G4double G4PhotoNuclearCrossSection::lastSP
private

Definition at line 77 of file G4PhotoNuclearCrossSection.hh.

◆ lastTH

G4double G4PhotoNuclearCrossSection::lastTH
private

Definition at line 76 of file G4PhotoNuclearCrossSection.hh.

◆ lastZ

G4int G4PhotoNuclearCrossSection::lastZ
private

Definition at line 71 of file G4PhotoNuclearCrossSection.hh.

◆ mNeut

G4double G4PhotoNuclearCrossSection::mNeut
private

Definition at line 90 of file G4PhotoNuclearCrossSection.hh.

◆ mProt

G4double G4PhotoNuclearCrossSection::mProt
private

Definition at line 91 of file G4PhotoNuclearCrossSection.hh.

◆ nistmngr

G4NistManager* G4PhotoNuclearCrossSection::nistmngr
private

Definition at line 88 of file G4PhotoNuclearCrossSection.hh.

◆ spA

std::vector<G4double> G4PhotoNuclearCrossSection::spA
private

Definition at line 85 of file G4PhotoNuclearCrossSection.hh.


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