Geant4  10.02.p03
G4ElectroNuclearCrossSection Class Reference

#include <G4ElectroNuclearCrossSection.hh>

Inheritance diagram for G4ElectroNuclearCrossSection:
Collaboration diagram for G4ElectroNuclearCrossSection:

Public Member Functions

 G4ElectroNuclearCrossSection ()
 
virtual ~G4ElectroNuclearCrossSection ()
 
virtual void CrossSectionDescription (std::ostream &) const
 
virtual G4bool IsElementApplicable (const G4DynamicParticle *, G4int Z, const G4Material *)
 
virtual G4double GetElementCrossSection (const G4DynamicParticle *, G4int Z, const G4Material *mat)
 
G4double GetEquivalentPhotonEnergy ()
 
G4double GetVirtualFactor (G4double nu, G4double Q2)
 
G4double GetEquivalentPhotonQ2 (G4double nu)
 
- 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 ()
 

Private Member Functions

G4int GetFunctions (G4double a, G4double *x, G4double *y, G4double *z)
 
G4double ThresholdEnergy (G4int Z, G4int N)
 
G4double SolveTheEquation (G4double f)
 
G4double Fun (G4double x)
 
G4double DFun (G4double x)
 
G4double HighEnergyJ1 (G4double lE)
 
G4double HighEnergyJ2 (G4double lE, G4double E)
 
G4double HighEnergyJ3 (G4double lE, G4double E2)
 

Private Attributes

G4int currentN
 
G4int currentZ
 
G4int lastZ
 
std::vector< cacheEl_t * > cache
 
cacheEl_tlastUsedCacheEl
 
G4NistManagernistmngr
 
G4double lastE
 
G4double lastSig
 
G4double lastG
 
G4int lastL
 
const G4double mNeut
 
const 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 58 of file G4ElectroNuclearCrossSection.hh.

Constructor & Destructor Documentation

◆ G4ElectroNuclearCrossSection()

G4ElectroNuclearCrossSection::G4ElectroNuclearCrossSection ( )

Definition at line 2180 of file G4ElectroNuclearCrossSection.cc.

2181 currentN(0), currentZ(0), lastZ(0),
2183 {
2184  //Initialize caches
2185  lastUsedCacheEl = new cacheEl_t;
2187 
2188  for (G4int i=0;i<120;i++)
2189  {
2190  cache.push_back(0);
2191  }
2192 
2193 }
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:

◆ ~G4ElectroNuclearCrossSection()

G4ElectroNuclearCrossSection::~G4ElectroNuclearCrossSection ( )
virtual

Definition at line 2195 of file G4ElectroNuclearCrossSection.cc.

2196 {
2197  std::vector<cacheEl_t*>::iterator it = cache.begin();
2198  while ( it != cache.end() )
2199  {
2200  if ( *it ) {
2201  delete[] (*it)->J1; (*it)->J1 = 0;
2202  delete[] (*it)->J2; (*it)->J2 = 0;
2203  delete[] (*it)->J3; (*it)->J3 = 0;
2204  }
2205  ++it;
2206  }
2207  cache.clear();
2208  delete lastUsedCacheEl;
2209 }

Member Function Documentation

◆ CrossSectionDescription()

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

Reimplemented from G4VCrossSectionDataSet.

Definition at line 2243 of file G4ElectroNuclearCrossSection.cc.

2244 {
2245  outFile << "G4ElectroNuclearCrossSection provides the total inelastic\n"
2246  << "cross section for e- and e+ interactions with nuclei. The\n"
2247  << "cross sections are retrieved from a table which is\n"
2248  << "generated using the equivalent photon approximation. In\n"
2249  << "this approximation real gammas are produced from the virtual\n"
2250  << "ones generated at the electromagnetic vertex. This cross\n"
2251  << "section set is valid for incident electrons and positrons at\n"
2252  << "all energies.\n";
2253 }

◆ Default_Name()

static const char* G4ElectroNuclearCrossSection::Default_Name ( )
inlinestatic

Definition at line 65 of file G4ElectroNuclearCrossSection.hh.

65 {return "ElectroNuclearXS";}
Here is the caller graph for this function:

◆ DFun()

G4double G4ElectroNuclearCrossSection::DFun ( G4double  x)
private

Definition at line 2226 of file G4ElectroNuclearCrossSection.cc.

2227 {
2228  G4double y=G4Exp(x-lastG-lmel); // y for the x
2229  G4double flux=lastG*(2.-y*(2.-y))-1.; // flux factor
2230  return (poc*(x-pos)+shd*G4Exp(-reg*x))*flux;
2231 }
static const G4double reg
Double_t y
static const G4double shd
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
Definition: G4Exp.hh:183
double G4double
Definition: G4Types.hh:76
static const G4double poc
static const G4double pos
static const G4double lmel
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Fun()

G4double G4ElectroNuclearCrossSection::Fun ( G4double  x)
private

Definition at line 2233 of file G4ElectroNuclearCrossSection.cc.

2234 {
2235  // Integrated PhoNuc cross section
2236  G4double dlg1=lastG+lastG-1.;
2237  G4double lgoe=lastG/lastE;
2238  G4double HE2=HighEnergyJ2(x, G4Exp(x));
2239  return dlg1*HighEnergyJ1(x)-lgoe*(HE2+HE2-HighEnergyJ3(x, G4Exp(2*x))/lastE);
2240 }
G4double HighEnergyJ2(G4double lE, G4double E)
G4double HighEnergyJ3(G4double lE, G4double E2)
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
Definition: G4Exp.hh:183
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetElementCrossSection()

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

Reimplemented from G4VCrossSectionDataSet.

Definition at line 2261 of file G4ElectroNuclearCrossSection.cc.

2262 {
2263  const G4double Energy = aPart->GetKineticEnergy()/MeV; // Energy of the electron
2264 
2265  if (Energy<=EMi) return 0.; // Energy is below the minimum energy in the table
2266 
2267  if(ZZ!=lastZ) // This nucleus was not the last used element
2268  {
2269  lastE = 0.; // New history in the electron Energy
2270  lastG = 0.; // New history in the photon Energy
2271  lastZ = ZZ;
2272 
2273  //key to search in cache
2274  if(!cache[ZZ]){
2275  lastUsedCacheEl->J1 = new G4double[nE]; // Allocate memory for the new J1 function
2276  lastUsedCacheEl->J2 = new G4double[nE]; // Allocate memory for the new J2 function
2277  lastUsedCacheEl->J3 = new G4double[nE]; // Allocate memory for the new J3 function
2278  G4double Aa = nistmngr->GetAtomicMassAmu(ZZ); // average A
2279  G4int N = (G4int)Aa - ZZ;
2280  lastUsedCacheEl->F = GetFunctions(Aa,lastUsedCacheEl->J1,lastUsedCacheEl->J2,lastUsedCacheEl->J3); // new ZeroPos and filling of J-functions
2281  lastUsedCacheEl->H = alop*Aa*(1.-.072*G4Log(Aa));// corresponds to lastSP from G4PhotonuclearCrossSection
2282  lastUsedCacheEl->TH = ThresholdEnergy(ZZ, N); // The last Threshold Energy
2283  cacheEl_t* new_el = new cacheEl_t(*lastUsedCacheEl);
2284  cache[ZZ] = new_el;
2285  }
2286  else
2287  { //found in cache
2288  const cacheEl_t& el = *(cache[ZZ]);
2289  lastUsedCacheEl->F = el.F;
2290  lastUsedCacheEl->TH = el.TH;
2291  lastUsedCacheEl->H = el.H;
2292  lastUsedCacheEl->J1 = el.J1;
2293  lastUsedCacheEl->J2 = el.J2;
2294  lastUsedCacheEl->J3 = el.J3;
2295  }
2296  }
2297  else
2298  { //current isotope is the same as previous one
2299  if ( lastE == Energy ) return lastSig*millibarn; // Don't calc. same CS twice
2300  }
2301  //End of optimization: now lastUsedCacheEl structure contains the correct data for this isotope
2302 
2303  // ============================== NOW Calculate the Cross Section ==========================
2304  lastE=Energy; // lastE - the electron energy
2305 
2306  if ( Energy <= lastUsedCacheEl->TH ) // check that the eE is higher than the ThreshE
2307  {
2308  lastSig=0.;
2309  return 0.;
2310  }
2311 
2312  G4double lE=G4Log(Energy); // G4Log(eE) (it is necessary at this point for the fit)
2313 
2314  lastG=lE-lmel; // Gamma of the electron (used to recover G4Log(eE))
2315  G4double dlg1=lastG+lastG-1.;
2316  G4double lgoe=lastG/lastE;
2317  if(lE<lEMa) // Linear fit is made explicitly to fix the last bin for the randomization
2318  {
2319  G4double shift=(lE-lEMi)/dlnE;
2320  G4int blast=static_cast<int>(shift);
2321  if(blast<0) blast=0;
2322  if(blast>=mLL) blast=mLL-1;
2323  shift-=blast;
2324  lastL=blast+1;
2325  G4double YNi=dlg1*lastUsedCacheEl->J1[blast]-lgoe*(lastUsedCacheEl->J2[blast]+lastUsedCacheEl->J2[blast]-lastUsedCacheEl->J3[blast]/lastE);
2327  lastSig= YNi+shift*(YNj-YNi);
2328  if(lastSig>YNj)lastSig=YNj;
2329  }
2330  else
2331  {
2332  lastL=mLL;
2333 
2335 
2337 
2338  G4double En2 = Energy*Energy;
2340 
2341  lastSig=dlg1*term1-lgoe*(term2+term2-term3/lastE);
2342  }
2343 
2344  if(lastSig<0.) lastSig = 0.;
2345 
2346  return lastSig*millibarn;
2347 }
static const double MeV
Definition: G4SIunits.hh:211
static const G4double alop
G4double HighEnergyJ2(G4double lE, G4double E)
static const G4int mLL
int G4int
Definition: G4Types.hh:78
static const G4double lEMa
static const G4int nE
G4double GetKineticEnergy() const
G4double HighEnergyJ3(G4double lE, G4double E2)
static const G4double dlnE
static const G4double EMi
G4int GetFunctions(G4double a, G4double *x, G4double *y, G4double *z)
static const G4double lEMi
G4double G4Log(G4double x)
Definition: G4Log.hh:230
static const double millibarn
Definition: G4SIunits.hh:105
**D E S C R I P T I O N
G4double ThresholdEnergy(G4int Z, G4int N)
double G4double
Definition: G4Types.hh:76
G4double GetAtomicMassAmu(const G4String &symb) const
static const G4double lmel
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetEquivalentPhotonEnergy()

G4double G4ElectroNuclearCrossSection::GetEquivalentPhotonEnergy ( )

Definition at line 2428 of file G4ElectroNuclearCrossSection.cc.

2429 {
2430  if(lastSig <= 0.0) { return 0.0; } // VI
2431  G4double phLE = 0.; // Prototype of the G4Log(nu=E_gamma)
2432  G4double Y[nE] = {0.0}; // Prepare the array for randomization
2433 
2434  G4double lastLE=lastG+lmel; // recover G4Log(eE) from the gamma (lastG)
2435  G4double dlg1=lastG+lastG-1.;
2436  G4double lgoe=lastG/lastE;
2437  for (G4int i=lastUsedCacheEl->F;i<=lastL;i++) {
2438  Y[i] = dlg1*lastUsedCacheEl->J1[i]-lgoe*(lastUsedCacheEl->J2[i]+lastUsedCacheEl->J2[i]-lastUsedCacheEl->J3[i]/lastE);
2439  if(Y[i] < 0.0) { Y[i] = 0.0; }
2440  }
2441  // Tempory IF of H.P.: delete it if the *HP* err message does not
2442  // show up M.K.
2443  if(lastSig>0.99*Y[lastL] && lastL<mLL && Y[lastL]<1.E-30)
2444  {
2445  G4cerr << "*HP*G4ElNucCS::GetEqPhotE:S=" << lastSig <<">" << Y[lastL]
2446  << ",l=" << lastL << ">" << mLL << G4endl;
2447  if(lastSig <= 0.0) { return 0.0; } // VI
2448  }
2449  G4double ris = lastSig*G4UniformRand(); // Sig can be > Y[lastL = mLL], then it
2450  // is in the funct. region
2451 
2452  if (ris < Y[lastL]) { // Search the table
2453  G4int j = lastUsedCacheEl->F;
2454  G4double Yj = Y[j]; // It must be 0 (sometimes just very small)
2455  while (ris > Yj && j < lastL) { // Associative search
2456  j++;
2457  Yj = Y[j]; // Yj is first value above ris
2458  }
2459  G4int j1 = j-1;
2460  G4double Yi = Y[j1]; // Previous value is below ris
2461  phLE = lEMi + (j1 + (ris-Yi)/(Yj-Yi) )*dlnE;
2462  } else { // Search with the function
2463  if (lastL < mLL) G4cerr << "**G4EleNucCS::GetEfPhE:L=" << lastL << ",S="
2464  << lastSig << ",Y=" << Y[lastL] << G4endl;
2465  G4double f = (ris-Y[lastL])/lastUsedCacheEl->H; // The scaled residual value of the cross-section integral
2466  phLE=SolveTheEquation(f); // Solve the equation to find theLog(phE) (compare with lastLE)
2467  }
2468 
2469  if (phLE>lastLE) {
2470  G4cerr << "***G4ElectroNuclearCS::GetEquPhotE:N=" << currentN << ",Z="
2471  << currentZ << ", lpE" << phLE << ">leE" << lastLE << ",Sig="
2472  << lastSig << ",rndSig=" << ris << ",Beg=" << lastUsedCacheEl->F << ",End="
2473  << lastL << ",Y=" << Y[lastL] << G4endl;
2474  if(lastLE<7.2) phLE=G4Log(G4Exp(lastLE)-.511);
2475  else phLE=7.;
2476  }
2477  return G4Exp(phLE);
2478 }
Float_t Y
static const G4int mLL
int G4int
Definition: G4Types.hh:78
static const G4int nE
#define G4UniformRand()
Definition: Randomize.hh:97
static const G4double dlnE
static const G4double lEMi
G4double G4Log(G4double x)
Definition: G4Log.hh:230
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
Definition: G4Exp.hh:183
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
static const G4double lmel
G4GLOB_DLL std::ostream G4cerr
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetEquivalentPhotonQ2()

G4double G4ElectroNuclearCrossSection::GetEquivalentPhotonQ2 ( G4double  nu)

Definition at line 2507 of file G4ElectroNuclearCrossSection.cc.

2508 {
2509  if(lastG <= 0.0 || lastE <= 0.0) { return 0.; } // VI
2510  if(lastSig <= 0.0) { return 0.0; } // VI
2511  G4double y=nu/lastE; // Part of energy carried by the equivalent pfoton
2512  if(y>=1.-1./(lastG+lastG)) return 0.; // The region where the method does not work
2513  G4double y2=y*y; // Squared photonic part of energy
2514  G4double ye=1.-y; // Part of energy carried by the secondary electron
2515  G4double Qi2=mel2*y2/ye; // Minimum Q2
2516  G4double Qa2=4*lastE*lastE*ye; // Maximum Q2
2517  G4double iar=Qi2/Qa2; // Q2min/Q2max ratio
2518  G4double Dy=ye+.5*y2; // D(y) function
2519  G4double Py=ye/Dy; // P(y) function
2520  G4double ePy=1.-G4Exp(Py); // 1-std::exp(P(y)) part
2521  G4double Uy=Py*(1.-iar); // U(y) function
2522  G4double Fy=(ye+ye)*(1.+ye)*iar/y2; // F(y) function
2523  G4double fr=iar/(1.-ePy*iar); // Q-fraction
2524  if(Fy<=-fr)
2525  {
2526  return 0.;
2527  }
2528  G4double LyQa2=G4Log(Fy+fr); // L(y,Q2max) function
2529  G4bool cond=true;
2530  G4int maxTry=3;
2531  G4int cntTry=0;
2532  G4double Q2=Qi2;
2533  while(cond&&cntTry<maxTry) // The loop to avoid x>1.
2534  {
2535  G4double R=G4UniformRand(); // Random number (0,1)
2536  Q2=Qi2*(ePy+1./(G4Exp(R*LyQa2-(1.-R)*Uy)-Fy));
2537  cntTry++;
2538  cond = Q2>1878.*nu;
2539  }
2540  if(Q2<Qi2)
2541  {
2542  return Qi2;
2543  }
2544  if(Q2>Qa2)
2545  {
2546  return Qa2;
2547  }
2548  return Q2;
2549 }
Double_t y2[nxs]
static const G4double mel2
int G4int
Definition: G4Types.hh:78
Double_t y
#define G4UniformRand()
Definition: Randomize.hh:97
bool G4bool
Definition: G4Types.hh:79
G4double G4Log(G4double x)
Definition: G4Log.hh:230
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
Definition: G4Exp.hh:183
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetFunctions()

G4int G4ElectroNuclearCrossSection::GetFunctions ( G4double  a,
G4double x,
G4double y,
G4double z 
)
private

Definition at line 2379 of file G4ElectroNuclearCrossSection.cc.

2380 {
2381  // --------------------------------
2382  G4int r=-1; // Low channel for J-functions
2383  if(a<=.9999 || a>238.49) // Plutonium 244 is forbidden
2384  {
2385  G4cout<<"***G4ElectroNuclearCrossSection::GetFunctions: A="<<a<<"(?). No CS returned!"<<G4endl;
2386  return r;
2387  }
2388  G4int iA=static_cast<G4int>(a+.499); // Make the round integer of the atomic number
2389  G4double ai=iA;
2390  if(a!=ai) a=ai;
2391  for(G4int i=0; i<nN; i++)
2392  {
2393  if(std::abs(a-A[i])<.0005) // A coincide with one of the basic A's -> get from Tab
2394  {
2395  for(G4int k=0; k<nE; k++)
2396  {
2397  xx[k]=P0[i][k]; // J0
2398  yy[k]=P1[i][k]; // J1
2399  zz[k]=P2[i][k]; // J2
2400  }
2401  r=LL[i]; // Low channel for the J-functions
2402  }
2403  if(r<0) // Not the basic A-value -> must be calculated
2404  {
2405  G4int k=0; // !! To be good for different compilers !!
2406  for(k=1; k<nN; k++)if(a<A[k]) break;// Find the top basic A-value
2407  if(k<1) k=1; // Extrapolation from the first bin (D)
2408  if(k>=nN) k=nN-1; // Extrapolation from the last bin (U)
2409  G4int k1=k-1;
2410  G4double xi=A[k1];
2411  G4double b=(a-xi)/(A[k]-xi);
2412  for(G4int q=0; q<nE; q++)
2413  {
2414  xi=P0[k1][q];
2415  xx[q]=xi+(P0[k][q]-xi)*b;
2416  G4double yi=P1[k1][q];
2417  yy[q]=yi+(P1[k][q]-yi)*b;
2418  G4double zi=P2[k1][q];
2419  zz[q]=zi+(P2[k][q]-zi)*b;
2420  }
2421  r=LL[k];
2422  if(LL[k1]<r) r=LL[k1];
2423  }
2424  }
2425  return r;
2426 }
Double_t yy
static const G4double * P1[nN]
Double_t xx
int G4int
Definition: G4Types.hh:78
static const G4double * P0[nN]
static const G4int nE
G4GLOB_DLL std::ostream G4cout
static const G4double A[nN]
Double_t zz
static const G4int LL[nN]
static const G4double * P2[nN]
#define G4endl
Definition: G4ios.hh:61
static const G4int nN
double G4double
Definition: G4Types.hh:76
Here is the caller graph for this function:

◆ GetVirtualFactor()

G4double G4ElectroNuclearCrossSection::GetVirtualFactor ( G4double  nu,
G4double  Q2 
)

Definition at line 2551 of file G4ElectroNuclearCrossSection.cc.

2552 {
2553  if(nu <= 0.0 || Q2 <= 0.0) { return 0.0; }
2554  //G4double x=Q2/dM/nu; // Direct x definition
2555  G4double K=nu-Q2/dM; // K=nu*(1-x)
2556  if(K <= 0.) // VI
2557  {
2558  return 0.;
2559  }
2560  G4double lK=G4Log(K); // ln(K)
2561  G4double x=1.-K/nu; // This definitin saves one div.
2562  G4double GD=1.+Q2/Q02; // Reversed nucleonic form-factor
2563  G4double b=G4Exp(bp*(lK-blK0)); // b-factor
2564  G4double c=G4Exp(cp*(lK-clK0)); // c-factor
2565  G4double r=.5*G4Log(Q2+nu*nu)-lK; // r=.5*G4Log((Q^2+nu^2)/K^2)
2566  G4double ef=G4Exp(r*(b-c*r*r)); // exponential factor
2567  return (1.-x)*ef/GD/GD;
2568 }
static const G4double dM
static const G4double clK0
static const G4double blK0
G4double G4Log(G4double x)
Definition: G4Log.hh:230
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
Definition: G4Exp.hh:183
static const G4double Q02
static const G4double bp
double G4double
Definition: G4Types.hh:76
static const G4double cp
Here is the call graph for this function:
Here is the caller graph for this function:

◆ HighEnergyJ1()

G4double G4ElectroNuclearCrossSection::HighEnergyJ1 ( G4double  lE)
private

Definition at line 2211 of file G4ElectroNuclearCrossSection.cc.

2212 {
2213  return ha*(lE*lE-lEMa2)-ab*(lE-lEMa)-cd*(G4Exp(-reg*lE)-ele);
2214 }
static const G4double ha
static const G4double cd
static const G4double lEMa
static const G4double reg
static const G4double lEMa2
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
Definition: G4Exp.hh:183
static const G4double ab
static const G4double ele
Here is the call graph for this function:
Here is the caller graph for this function:

◆ HighEnergyJ2()

G4double G4ElectroNuclearCrossSection::HighEnergyJ2 ( G4double  lE,
G4double  E 
)
private

Definition at line 2216 of file G4ElectroNuclearCrossSection.cc.

2217 {
2218  return poc*((lE-1.)*E-le1)-ab*(E-EMa)+cd1*(G4Exp(d1*lE)-ele1);
2219 }
static const G4double le1
static const G4double cd1
static const G4double ele1
static const G4double EMa
static const G4double d1
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
Definition: G4Exp.hh:183
static const G4double ab
static const G4double poc
Here is the call graph for this function:
Here is the caller graph for this function:

◆ HighEnergyJ3()

G4double G4ElectroNuclearCrossSection::HighEnergyJ3 ( G4double  lE,
G4double  E2 
)
private

Definition at line 2221 of file G4ElectroNuclearCrossSection.cc.

2222 {
2223  return ha*((lE-.5)*E2-leh)-hab*(E2-EMa2)+cd2*(G4Exp(d2*lE)-ele2);
2224 }
static const G4double ha
static const G4double hab
static const G4double EMa2
static const G4double d2
static const G4double leh
static const G4double cd2
static const G4double ele2
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
Definition: G4Exp.hh:183
Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsElementApplicable()

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

Reimplemented from G4VCrossSectionDataSet.

Definition at line 2255 of file G4ElectroNuclearCrossSection.cc.

2256 {
2257  return true;
2258 }

◆ SolveTheEquation()

G4double G4ElectroNuclearCrossSection::SolveTheEquation ( G4double  f)
private

Definition at line 2481 of file G4ElectroNuclearCrossSection.cc.

2482 {
2483  G4double lastLE=lastG+lmel; // recover G4Log(eE) from the gamma (lastG)
2484  G4double topLim=lastLE-.001; // maximum G4Log(phE) for equivalent photons
2485  G4double rE=EMa/G4Exp(lastLE); // r=EMa/Eel to make the firs guess
2486  G4double x=lEMa+f/phte/(lastG*(2.-rE*(2.-rE))-1.); // First guess (the first step from the edge)
2487  if(x>topLim) x=topLim;
2488  for(G4int i=0; i<imax; i++)
2489  {
2490  G4double fx=Fun(x);
2491  G4double df=DFun(x);
2492  G4double d=(f-fx)/df;
2493  x=x+d;
2494  if(x>=lastLE)
2495  {
2496  G4cerr<<"*G4ElNCS::SolveTheEq:*Correction*"<<i<<",d="<<d<<",x="<<x<<">lE="<<lastLE<<",f="<<f
2497  <<",fx="<<fx<<",df="<<df<<",A(Z="<<currentZ<<",N="<<currentN<<")"<<G4endl;
2498  x=topLim;
2499  }
2500  if(std::abs(d)<eps) break;
2501  if(i+1>=imax) G4cerr<<"*G4ElNucCS::SolveTheEq:"<<i+2<<">"<<imax<<"->Use bigger max. ln(eE)="
2502  <<lastLE<<",Z="<<currentZ<<", N="<<currentN<<G4endl;
2503  }
2504  return x;
2505 }
Float_t d
static const G4double eps
int G4int
Definition: G4Types.hh:78
static const G4double lEMa
static const G4double phte
static const G4double EMa
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
Definition: G4Exp.hh:183
#define G4endl
Definition: G4ios.hh:61
static const G4int imax
double G4double
Definition: G4Types.hh:76
static const G4double lmel
G4GLOB_DLL std::ostream G4cerr
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ThresholdEnergy()

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

Definition at line 2350 of file G4ElectroNuclearCrossSection.cc.

2351 {
2352  // ---------
2353 
2354  G4int Aa=Z+N;
2355  if(Aa<1) return infEn;
2356  else if(Aa==1) return 134.9766; // Pi0 threshold for the nucleon
2357 
2358  G4double mT= 0.;
2360  // If it is not in the Table of Stable Nuclei, then the Threshold=inf
2361  else return infEn;
2362  // ---------
2363  G4double mP= infEn;
2364  //if(Z) mP= G4QPDGCode(111).GetNuclMass(Z-1,N,0);
2366  else return infEn;
2367  G4double mN= infEn;
2368  //if(N) mN= G4QPDGCode(111).GetNuclMass(Z,N-1,0);
2370  else return infEn;
2371  G4double dP= mP+mProt-mT;
2372  G4double dN= mN+mNeut-mT;
2373  if(dP<dN)dN=dP;
2374  return dN;
2375 }
static G4double GetNuclearMass(const G4double A, const G4double Z)
int G4int
Definition: G4Types.hh:78
static const G4double infEn
Float_t Z
static bool IsInStableTable(const G4double A, const G4double Z)
**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

◆ cache

std::vector<cacheEl_t*> G4ElectroNuclearCrossSection::cache
private

Definition at line 99 of file G4ElectroNuclearCrossSection.hh.

◆ currentN

G4int G4ElectroNuclearCrossSection::currentN
private

Definition at line 94 of file G4ElectroNuclearCrossSection.hh.

◆ currentZ

G4int G4ElectroNuclearCrossSection::currentZ
private

Definition at line 95 of file G4ElectroNuclearCrossSection.hh.

◆ lastE

G4double G4ElectroNuclearCrossSection::lastE
private

Definition at line 104 of file G4ElectroNuclearCrossSection.hh.

◆ lastG

G4double G4ElectroNuclearCrossSection::lastG
private

Definition at line 106 of file G4ElectroNuclearCrossSection.hh.

◆ lastL

G4int G4ElectroNuclearCrossSection::lastL
private

Definition at line 107 of file G4ElectroNuclearCrossSection.hh.

◆ lastSig

G4double G4ElectroNuclearCrossSection::lastSig
private

Definition at line 105 of file G4ElectroNuclearCrossSection.hh.

◆ lastUsedCacheEl

cacheEl_t* G4ElectroNuclearCrossSection::lastUsedCacheEl
private

Definition at line 100 of file G4ElectroNuclearCrossSection.hh.

◆ lastZ

G4int G4ElectroNuclearCrossSection::lastZ
private

Definition at line 98 of file G4ElectroNuclearCrossSection.hh.

◆ mNeut

const G4double G4ElectroNuclearCrossSection::mNeut
private

Definition at line 109 of file G4ElectroNuclearCrossSection.hh.

◆ mProt

const G4double G4ElectroNuclearCrossSection::mProt
private

Definition at line 110 of file G4ElectroNuclearCrossSection.hh.

◆ nistmngr

G4NistManager* G4ElectroNuclearCrossSection::nistmngr
private

Definition at line 101 of file G4ElectroNuclearCrossSection.hh.


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