Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions
G4PhotoNuclearCrossSection Class Reference

#include <G4PhotoNuclearCrossSection.hh>

Inheritance diagram for G4PhotoNuclearCrossSection:
G4VCrossSectionDataSet

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 G4IsotopeSelectIsotope (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 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 ( )

Definition at line 1492 of file G4PhotoNuclearCrossSection.cc.

References G4NistManager::Instance().

1493 : G4VCrossSectionDataSet(Default_Name()), lastZ(0), lastSig(0), lastGDR(0), lastHEN(0), lastE(0), lastTH(0), lastSP(0),
1495 {
1496  nistmngr = G4NistManager::Instance();
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()
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

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 }
std::ofstream outFile
Definition: GammaRayTel.cc:68
static const char* G4PhotoNuclearCrossSection::Default_Name ( )
inlinestatic

Definition at line 49 of file G4PhotoNuclearCrossSection.hh.

Referenced by G4ElectroVDNuclearModel::G4ElectroVDNuclearModel().

49 {return "PhotoNuclearXS";}
G4double G4PhotoNuclearCrossSection::GetElementCrossSection ( const G4DynamicParticle aPart,
G4int  Z,
const G4Material  
)
virtual

Reimplemented from G4VCrossSectionDataSet.

Definition at line 1537 of file G4PhotoNuclearCrossSection.cc.

References G4cerr, G4endl, G4NistManager::GetAtomicMassAmu(), G4DynamicParticle::GetKineticEnergy(), python.hepunit::MeV, python.hepunit::millibarn, and N.

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=std::log(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=std::log(Energy);
1596  sigma=EquLinearFit(lE,nH,milE,dlE,lastHEN);
1597  }
1598  else // UHE region (calculation, but not so frequent)
1599  {
1600  G4double lE=std::log(Energy);
1601  sigma=lastSP*(poc*(lE-pos)+shd*std::exp(-reg*lE));
1602  }
1603  // End of "sigma" calculation
1604 
1605  if(sigma<0.) return 0.;
1606  return sigma*millibarn;
1607 }
G4double GetKineticEnergy() const
int G4int
Definition: G4Types.hh:78
int millibarn
Definition: hepunit.py:40
G4double GetAtomicMassAmu(const G4String &symb) const
#define G4endl
Definition: G4ios.hh:61
**D E S C R I P T I O N
double G4double
Definition: G4Types.hh:76
G4GLOB_DLL std::ostream G4cerr
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 }

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