Import Geant4 4.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 16:18:25 +02:00
parent 36c080dca6
commit 921d3b1cda
3990 changed files with 185376 additions and 82884 deletions
@@ -14,7 +14,7 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * authors in the GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
@@ -0,0 +1,186 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * authors in the GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4ElectroNuclearCrossSection.hh,v 1.6 2001/11/30 14:58:04 stesting Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// GEANT4 physics class: G4ElectroNuclearCrossSection -- header file
// M.V. Kossov, ITEP(Moscow), 24-OCT-01
//
#ifndef G4ElectroNuclearCrossSection_h
#define G4ElectroNuclearCrossSection_h 1
#include "G4VCrossSectionDataSet.hh"
#include "G4DynamicParticle.hh"
#include "G4Element.hh"
#include "G4ParticleTable.hh"
#include "G4NucleiProperties.hh"
#include "G4NucleiPropertiesTable.hh"
#include "g4std/vector"
#include "Randomize.hh"
#include "G4Electron.hh"
#include "G4Positron.hh"
class G4ElectroNuclearCrossSection : public G4VCrossSectionDataSet
{
public:
G4ElectroNuclearCrossSection() // Constructor @@??
{
//theHadronCrossSections = G4HadronCrossSections::Instance();
}
~G4ElectroNuclearCrossSection() {}
G4bool IsApplicable(const G4DynamicParticle* aParticle, const G4Element* anElement)
{
//return theHadronCrossSections->IsApplicable(aParticle, anElement);
// Possible prototype
G4bool result = false;
if( aParticle->GetDefinition()==G4Electron::ElectronDefinition()) result = true;
if( aParticle->GetDefinition()==G4Positron::PositronDefinition()) result = true;
return result;
}
G4double GetCrossSection(const G4DynamicParticle* aParticle, const G4Element* anElement,
G4double temperature=0.);
G4double GetEffectivePhotonEnergy();
void BuildPhysicsTable(const G4ParticleDefinition&) {}
void DumpPhysicsTable(const G4ParticleDefinition&) {}
private:
G4int GetFunctions(G4double a, G4double* y, G4double* z);
G4double LinearFit(G4double X, G4int N, const G4double* XN, const G4double* YN);
G4double ThresholdEnergy(G4int Z, G4int N);
G4double HighEnergyPhi(G4double lE);
G4double HighEnergyFun(G4double lE);
G4double SolveTheEquation(G4double f);
G4double Fun(G4double x);
G4double DFun(G4double x);
// Body
private:
static G4int lastF; // Last used in the cross section TheFirstBin
static G4double* lastPhi; // Pointer to the last array of the Phi function
static G4double* lastFun; // Pointer to the last array of the Fun function
static G4int lastL; // Last used in the cross section TheLastBin
static G4double lastLE; // Last used in the cross section TheLogE
static G4double lastSig; // Last value of the Cross Section
static G4double lastH; // Last value of the High energy A-dependence
};
// Gives the threshold energy for different nuclei (min of p- and n-threshold)
inline G4double G4ElectroNuclearCrossSection::ThresholdEnergy(G4int Z, G4int N)
{
// CHIPS - Direct GEANT
//static const G4double mNeut = G4QPDGCode(2112).GetMass();
//static const G4double mProt = G4QPDGCode(2212).GetMass();
static const G4double mNeut = G4NucleiProperties::GetNuclearMass(1,0);
static const G4double mProt = G4NucleiProperties::GetNuclearMass(1,1);
// ---------
static const G4double infEn = 9.e27;
G4int A=Z+N;
if(A<1) return infEn;
else if(A==1) return 134.9766; // Pi0 threshold for the nucleon
// CHIPS - Direct GEANT
//G4double mT= G4QPDGCode(111).GetNuclMass(Z,N,0);
G4double mT= 0.;
if(G4NucleiPropertiesTable::IsInTable(Z,A)) mT=G4NucleiProperties::GetNuclearMass(A,Z);
else return 0.; // If it is not in the Table of Stable Nuclei, then the Threshold=0
// ---------
G4double mP= infEn;
//if(Z) mP= G4QPDGCode(111).GetNuclMass(Z-1,N,0);
if(Z&&G4NucleiPropertiesTable::IsInTable(Z-1,A-1)) mP=G4NucleiProperties::GetNuclearMass(A-1,Z-1);
else return infEn;
G4double mN= infEn;
//if(N) mN= G4QPDGCode(111).GetNuclMass(Z,N-1,0);
if(N&&G4NucleiPropertiesTable::IsInTable(Z,A-1)) mN=G4NucleiProperties::GetNuclearMass(A-1,Z);
else return infEn;
G4double dP= mP+mProt-mT;
G4double dN= mN+mNeut-mT;
if(dP<dN)dN=dP;
return dN;
}
inline G4double G4ElectroNuclearCrossSection::DFun(G4double x)
{
static const G4double f21=.75;
static const G4double f22=.78;
static const G4double f23=.9;
G4double f2=1.;
if (lastH<.005) f2=f21;
else if(lastH<0.01) f2=f22;
else if(lastH<0.07) f2=f23;
return (lastLE-x)*(0.0116*exp(0.16*x)+f2*exp(-0.26*x));
}
inline G4double G4ElectroNuclearCrossSection::Fun(G4double x)
{return (lastLE*HighEnergyPhi(x)-HighEnergyFun(x));}
inline G4double G4ElectroNuclearCrossSection::HighEnergyPhi(G4double lEn)
{
static const G4double le=log(2000.);
static const G4double c1=0.16;
static const G4double f1=.0116/c1;
static const G4double e1=exp(c1*le);
static const G4double c2=-0.26;
static const G4double f21=.75/c2;
static const G4double f22=.78/c2;
static const G4double f23=.9/c2;
static const G4double f24=1./c2;
static const G4double e2=exp(c2*le);
G4double f2=f24;
if (lastH<.005) f2=f21;
else if(lastH<0.01) f2=f22;
else if(lastH<0.07) f2=f23;
return f1*(exp(c1*lEn)-e1)+f2*(exp(c2*lEn)-e2);
}
inline G4double G4ElectroNuclearCrossSection::HighEnergyFun(G4double lEn)
{
static const G4double le=log(2000.);
static const G4double c1=0.16;
static const G4double f1=.0116/c1/c1;
static const G4double e1=(c1*le-1.)*exp(c1*le);
static const G4double c2=-0.26;
static const G4double f21=.75/c2/c2;
static const G4double f22=.78/c2/c2;
static const G4double f23=.9/c2/c2;
static const G4double f24=1./c2/c2;
static const G4double e2=(c2*le-1.)*exp(c2*le);
G4double f2=f24;
if (lastH<.005) f2=f21;
else if(lastH<0.01) f2=f22;
else if(lastH<0.07) f2=f23;
G4double h1=c1*lEn;
G4double h2=c2*lEn;
return f1*((h1-1.)*exp(h1)-e1)+f2*((h2-1.)*exp(h2)-e2);
}
#endif
@@ -14,7 +14,7 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * authors in the GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
@@ -14,15 +14,15 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * authors in the GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4HadronCrossSections.hh,v 1.4.6.1 2001/06/28 19:12:52 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4HadronCrossSections.hh,v 1.7 2001/10/04 20:00:18 hpw Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// GEANT4 Hadron physics class -- header file
@@ -90,7 +90,7 @@ class G4HadronCrossSections
{
public:
G4HadronCrossSections() : verboseLevel(0), prevParticleDefinition(0)
G4HadronCrossSections() : prevParticleDefinition(0), verboseLevel(0)
{
}
@@ -14,7 +14,7 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * authors in the GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
@@ -14,7 +14,7 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * authors in the GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
@@ -14,7 +14,7 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * authors in the GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
@@ -14,7 +14,7 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * authors in the GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
@@ -14,7 +14,7 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * authors in the GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
@@ -0,0 +1,295 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * authors in the GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4PhotoNuclearCrossSection.hh,v 1.5 2001/11/26 22:04:34 stesting Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// GEANT4 physics class: G4PhotoNuclearCrossSection -- header file
// M.V. Kossov, ITEP(Moscow), 24-OCT-01
//
#ifndef G4PhotoNuclearCrossSection_h
#define G4PhotoNuclearCrossSection_h 1
#include "G4VCrossSectionDataSet.hh"
/////////#include "G4HadronCrossSections.hh"
#include "G4DynamicParticle.hh"
#include "G4Element.hh"
//#include "G4QPDGCode.hh"
#include "G4ParticleTable.hh"
#include "G4NucleiProperties.hh"
#include "G4NucleiPropertiesTable.hh"
#include "g4std/vector"
class G4PhotoNuclearCrossSection : public G4VCrossSectionDataSet
{
public:
G4PhotoNuclearCrossSection() // Constructor @@??
{
//theHadronCrossSections = G4HadronCrossSections::Instance();
}
~G4PhotoNuclearCrossSection() {}
G4bool IsApplicable(const G4DynamicParticle* aParticle, const G4Element* anElement)
{
//return theHadronCrossSections->IsApplicable(aParticle, anElement);
// Possible prototype
G4bool result = false;
if( aParticle->GetDefinition()->GetPDGEncoding()==22) result = true;
return result;
}
G4double GetCrossSection(const G4DynamicParticle* aParticle, const G4Element* anElement,
G4double temperature=0.);
//{
// return theHadronCrossSections->GetInelasticCrossSection(aParticle,
// anElement);
//}
void BuildPhysicsTable(const G4ParticleDefinition&) {}
void DumpPhysicsTable(const G4ParticleDefinition&) {}
private:
G4double GetGDRc1(G4int Z, G4int N);
G4double GetGDRp1(G4int Z, G4int N);
G4double GetGDRt1(G4int Z, G4int N);
G4double GetGDRs1(G4int Z, G4int N);
G4double GetGDRc2(G4int Z, G4int N);
G4double GetGDRp2(G4int Z, G4int N);
G4double GetGDRt2(G4int Z, G4int N);
G4double GetGDRs2(G4int Z, G4int N);
G4double GetQDAmp(G4int Z, G4int N);
G4double GetDelAm(G4int Z, G4int N);
G4double GetDelWd(G4int Z, G4int N);
G4double GetDelPs(G4int Z, G4int N);
G4double GetDelTh(G4int Z, G4int N);
G4double GetDelSl(G4int Z, G4int N);
G4double GetRopAm(G4int Z, G4int N);
G4double GetRopWd(G4int Z, G4int N);
G4double GetRopPs(G4int Z, G4int N);
G4double LinearFit(G4double X, G4int N, const G4double* XN, const G4double* YN);
G4double ThresholdEnergy(G4int Z, G4int N);
// Body
//private:
//G4HadronCrossSections* theHadronCrossSections;
};
// Calculate the logAmplitude of the 1-st GDR maximum
inline G4double G4PhotoNuclearCrossSection::GetGDRc1(G4int Z, G4int N)
{
static const G4int nN=13;
static G4double X[nN]={0.693,1.386,1.792,1.946,2.197,2.485,2.773,3.296,3.689,4.152,4.777,5.334,
5.472};
static G4double Y[nN]={4.2,13.9,13.9,13.6,20.5,28.2,28.7,28.5,29.,28.4,28.15,27.8,25.9};
return LinearFit(log(G4double(Z+N)), nN, X, Y);
}
// Calculate the A-power of the 1-st GDR maximum
inline G4double G4PhotoNuclearCrossSection::GetGDRp1(G4int Z, G4int N)
{
G4double p=8.;
G4int A=Z+N;
if(A<12) p=6.;
if(A< 8) p=4.;
if(A< 4) p=2.;
return p;
}
// Calculate the Threshold of the 1-st GDR maximum
inline G4double G4PhotoNuclearCrossSection::GetGDRt1(G4int Z, G4int N)
{
static const G4int nN=13;
static G4double X[nN]={0.693,1.386,1.792,1.946,2.197,2.485,2.773,3.296,3.689,4.152,4.777,5.334,
5.472};
static G4double Y[nN]={1.4,3.13,3.08,2.9,3.09,3.09,3.09,3.02,2.98,2.9,2.745,2.585,2.42};
return LinearFit(log(G4double(Z+N)), nN, X, Y);
}
// Calculate the Slope of the 1-st GDR maximum
inline G4double G4PhotoNuclearCrossSection::GetGDRs1(G4int Z, G4int N)
{
static const G4int nN=13;
static G4double X[nN]={0.693,1.386,1.792,1.946,2.197,2.485,2.773,3.296,3.689,4.152,4.777,5.334,
5.472};
static G4double Y[nN]={.12,.12,.12,.12,.06,.03,.03,.06,.05,.065,.06,.059,.061};
return LinearFit(log(G4double(Z+N)), nN, X, Y);
}
// Calculate the logAmplitude of the 2-nd GDR maximum
inline G4double G4PhotoNuclearCrossSection::GetGDRc2(G4int Z, G4int N)
{
static const G4int nN=13;
static G4double X[nN]={0.693,1.386,1.792,1.946,2.197,2.485,2.773,3.296,3.689,4.152,4.777,5.334,
5.472};
static G4double Y[nN]={1.85,7.5,6.3,8.2,12.35,15.8,16.1,16.2,16.8,17.1,16.1,15.5,16.6};
return LinearFit(log(G4double(Z+N)), nN, X, Y);
}
// Calculate the A-power of the 2-nd GDR maximum
inline G4double G4PhotoNuclearCrossSection::GetGDRp2(G4int Z, G4int N)
{
G4double p=4.;
G4int A=Z+N;
if(A<12) p=3.;
if(A< 8) p=2.;
if(A< 4) p=1.;
return p;
}
// Calculate the Threshold of the 2-nd GDR maximum
inline G4double G4PhotoNuclearCrossSection::GetGDRt2(G4int Z, G4int N)
{
static const G4int nN=13;
static G4double X[nN]={0.693,1.386,1.792,1.946,2.197,2.485,2.773,3.296,3.689,4.152,4.777,5.334,
5.472};
static G4double Y[nN]={1.4,3.22,3.11,3.39,3.48,3.34,3.46,3.35,3.4,3.22,3.09,3.05,2.6};
return LinearFit(log(G4double(Z+N)), nN, X, Y);
}
// Calculate the Slope of the 2-nd GDR maximum
inline G4double G4PhotoNuclearCrossSection::GetGDRs2(G4int Z, G4int N)
{
static const G4int nN=13;
static G4double X[nN]={0.693,1.386,1.792,1.946,2.197,2.485,2.773,3.296,3.689,4.152,4.777,5.334,
5.472};
static G4double Y[nN]={.12,.094,.09,.088,.14,.082,.079,.074,.071,.065,.061,.058,.05};
return LinearFit(log(G4double(Z+N)), nN, X, Y);
}
// Calculate the Amplitude of the QuasiDeuteron region [exp/(1+exp)]
inline G4double G4PhotoNuclearCrossSection::GetQDAmp(G4int Z, G4int N)
{
G4double A=Z+N;
G4double lnA=log(A);
return exp(-1.7+lnA*0.84)/(1.+exp(7*(2.38-lnA)));
}
// Calculate the Amplitude of the Delta Resonance [.41*(Z+N)]
inline G4double G4PhotoNuclearCrossSection::GetDelAm(G4int Z, G4int N)
{
G4double A=Z+N;
return .41*A;
}
// Calculate the Width of the Delta Resonance [11.9-ln(A)*1.24]
inline G4double G4PhotoNuclearCrossSection::GetDelWd(G4int Z, G4int N)
{
G4double A=Z+N;
G4double lnA=log(A);
return 11.9-lnA*1.24;
}
// Calculate the Position of the Delta Resonance [5.84-.09/(1+.003*A*A)]
inline G4double G4PhotoNuclearCrossSection::GetDelPs(G4int Z, G4int N)
{
G4double A=Z+N;
return 5.84-.09/(1+.003*A*A);
}
// Calculate the Threshold of the Delta Resonance [5.13-.00075*A]
inline G4double G4PhotoNuclearCrossSection::GetDelTh(G4int Z, G4int N)
{
G4double A=Z+N;
return 5.13-0.00075*A;
}
// Calculate the Threshold of the Delta Resonance [.04->.09]
inline G4double G4PhotoNuclearCrossSection::GetDelSl(G4int Z, G4int N)
{
G4double A=Z+N;
if(A<7) return .04;
return .09;
}
// Calculate the Amplitude of the Roper Resonance [-2.+ln(A)*0.84]
inline G4double G4PhotoNuclearCrossSection::GetRopAm(G4int Z, G4int N)
{
G4double A=Z+N;
G4double lnA=log(A);
return exp(-2.+lnA*0.84);
}
// Calculate the Width of the Roper Resonance [.1+1.65*ln(A)]
inline G4double G4PhotoNuclearCrossSection::GetRopWd(G4int Z, G4int N)
{
G4double A=Z+N;
G4double lnA=log(A);
return .1+1.65*lnA;
}
// Calculate the Position of the Roper Resonance [6.46+.061*ln(A)]
inline G4double G4PhotoNuclearCrossSection::GetRopPs(G4int Z, G4int N)
{
G4double A=Z+N;
G4double lnA=log(A);
return 6.46+.061*lnA;
}
// Gives the threshold energy for different nuclei (min of p- and n-threshold)
inline G4double G4PhotoNuclearCrossSection::ThresholdEnergy(G4int Z, G4int N)
{
// CHIPS - Direct GEANT
//static const G4double mNeut = G4QPDGCode(2112).GetMass();
//static const G4double mProt = G4QPDGCode(2212).GetMass();
static const G4double mNeut = G4NucleiProperties::GetNuclearMass(1,0);
static const G4double mProt = G4NucleiProperties::GetNuclearMass(1,1);
// ---------
static const G4double infEn = 9.e27;
G4int A=Z+N;
if(A<1) return infEn;
else if(A==1) return 134.9766; // Pi0 threshold for the nucleon
// CHIPS - Direct GEANT
//G4double mT= G4QPDGCode(111).GetNuclMass(Z,N,0);
G4double mT= 0.;
if(G4NucleiPropertiesTable::IsInTable(Z,A)) mT=G4NucleiProperties::GetNuclearMass(A,Z);
else return 0.; // If it is not in the Table of Stable Nuclei, then the Threshold=0
// ---------
G4double mP= infEn;
//if(Z) mP= G4QPDGCode(111).GetNuclMass(Z-1,N,0);
if(Z&&G4NucleiPropertiesTable::IsInTable(Z-1,A-1)) mP=G4NucleiProperties::GetNuclearMass(A-1,Z-1);
else return infEn;
G4double mN= infEn;
//if(N) mN= G4QPDGCode(111).GetNuclMass(Z,N-1,0);
if(N&&G4NucleiPropertiesTable::IsInTable(Z,A-1)) mN=G4NucleiProperties::GetNuclearMass(A-1,Z);
else return infEn;
G4double dP= mP+mProt-mT;
G4double dN= mN+mNeut-mT;
if(dP<dN)dN=dP;
return dN;
}
#endif
@@ -14,7 +14,7 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * authors in the GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
@@ -14,7 +14,7 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * authors in the GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
@@ -14,7 +14,7 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * authors in the GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
@@ -14,7 +14,7 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * authors in the GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
File diff suppressed because it is too large Load Diff
@@ -14,15 +14,15 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * authors in the GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4HadronCaptureDataSet.cc,v 1.2.8.1 2001/06/28 19:12:53 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4HadronCaptureDataSet.cc,v 1.4 2001/08/01 17:03:14 hpw Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// G4 Physics class: HadronCaptureDataSet for cross sections
File diff suppressed because it is too large Load Diff
@@ -14,15 +14,15 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * authors in the GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4HadronElasticDataSet.cc,v 1.2.8.1 2001/06/28 19:12:54 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4HadronElasticDataSet.cc,v 1.4 2001/08/01 17:03:16 hpw Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// G4 Physics class: HadronElasticDataSet for cross sections
@@ -14,15 +14,15 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * authors in the GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4HadronFissionDataSet.cc,v 1.2.8.1 2001/06/28 19:12:54 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4HadronFissionDataSet.cc,v 1.4 2001/08/01 17:03:16 hpw Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// G4 Physics class: HadronFissionDataSet for cross sections
@@ -14,15 +14,15 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * authors in the GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4HadronInelasticDataSet.cc,v 1.2.8.1 2001/06/28 19:12:54 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4HadronInelasticDataSet.cc,v 1.4 2001/08/01 17:03:17 hpw Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// G4 Physics class: HadronInelasticDataSet for cross sections
@@ -14,7 +14,7 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * authors in the GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
@@ -0,0 +1,233 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * authors in the GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4PhotoNuclearCrossSection.cc,v 1.4 2001/11/09 15:59:49 mkossov Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// G4 Physics class: PhotoNuclearCrossSection for gamma+A cross sections
// M.V. Kossov, ITEP(Moscow), 10-OCT-01
//
#include "G4PhotoNuclearCrossSection.hh"
// The main member function giving the gamma-A cross section (E in GeV, CS in mb)
G4double G4PhotoNuclearCrossSection::GetCrossSection(const G4DynamicParticle* aPart, const G4Element* anEle, G4double T)
{
const G4double kinEnergy = aPart->GetKineticEnergy()/MeV;
const G4double lE=log(kinEnergy);
const G4int targetAtomicNumber = static_cast<int>(anEle->GetN()+.499); //@@ Nat mixture
const G4int targZ = static_cast<int>(anEle->GetZ());
const G4int targN = targetAtomicNumber-targZ;
if (kinEnergy<ThresholdEnergy(targZ, targN))
{
return 0.;
}
// Associative memory for acceleration
static G4int lastN; // The last N of calculated nucleus
static G4int lastZ; // The last Z of calculated nucleus
static G4double lastHighE; // The last High Energy A-dependence
static G4double lastGDRc1; // The last logAmplitude of the 1-st GDR maximum
static G4double lastGDRp1; // The last A-power of the 1-st GDR maximum
static G4double lastGDRt1; // The last Threshold of the 1-st GDR maximum
static G4double lastGDRs1; // The last Slope of the 1-st GDR maximum
static G4double lastGDRc2; // The last logAmplitude of the 2-nd GDR maximum
static G4double lastGDRp2; // The last A-power of the 2-nd GDR maximum
static G4double lastGDRt2; // The last Threshold of the 2-nd GDR maximum
static G4double lastGDRs2; // The last Slope of the 2-nd GDR maximum
static G4double lastQDAmp; // The last Amplitude of the QuasiDeuteron region [exp/(1+exp)]
static G4double lastQDWid; // The last Width of the QuasiDeuteron region [.4] or SecRes (H1,H2)
static G4double lastQDPos; // The last Position of the QuasiDeuteron region [3.8] or SecRs (H1,H2)
static G4double lastDelAm; // The last Amplitude of the Delta Resonance [.41*(Z+N)]
static G4double lastDelWd; // The last Width of the Delta Resonance [11.9-ln(A)*1.24]
static G4double lastDelPs; // The last Position of the Delta Resonance [5.84-.09/(1+.003*A^2)]
static G4double lastDelTh; // The last Threshold of the Delta Resonance [5.13-.00075*A]
static G4double lastDelSl; // The last Slope of the Delta Resonance [0.04->0.09]
static G4double lastRopAm; // The last Amplitude of the Roper Resonance [-2.+ln(A)*0.84]
static G4double lastRopWd; // The last Width of the Roper Resonance [.1+1.65*ln(A)]
static G4double lastRopPs; // The last Position of the Roper Resonance [6.46+.061*ln(A)]
static G4std::vector <G4int> colN; // N of calculated nucleus
static G4std::vector <G4int> colZ; // Z of calculated nucleus
static G4std::vector <G4double> HighE; // High Energy A-dependence
static G4std::vector <G4double> GDRc1; // logAmplitude of the 1-st GDR maximum
static G4std::vector <G4double> GDRp1; // A-power of the 1-st GDR maximum
static G4std::vector <G4double> GDRt1; // Threshold of the 1-st GDR maximum
static G4std::vector <G4double> GDRs1; // Slope of the 1-st GDR maximum
static G4std::vector <G4double> GDRc2; // logAmplitude of the 2-nd GDR maximum
static G4std::vector <G4double> GDRp2; // A-power of the 2-nd GDR maximum
static G4std::vector <G4double> GDRt2; // Threshold of the 2-nd GDR maximum
static G4std::vector <G4double> GDRs2; // Slope of the 2-nd GDR maximum
static G4std::vector <G4double> QDAmp; // Amplitude of the QuasiDeuteron region [exp/(1+exp)]
static G4std::vector <G4double> QDWid; // Width of the QuasiDeuteron region [.4] or R(H1,H2)
static G4std::vector <G4double> QDPos; // Position of the QuasiDeuteron region [3.7] or R(H1,H2)
static G4std::vector <G4double> DelAm; // Amplitude of the Delta Resonance [.41*(Z+N)]
static G4std::vector <G4double> DelWd; // Width of the Delta Resonance [11.9-ln(A)*1.24]
static G4std::vector <G4double> DelPs; // Position of the Delta Resonance [5.84-.09/(1+.003*A2)]
static G4std::vector <G4double> DelTh; // Threshold of the Delta Resonance [5.13-.00075*A]
static G4std::vector <G4double> DelSl; // Slope of the Delta Resonance [0.04->0.09]
static G4std::vector <G4double> RopAm; // Amplitude of the Roper Resonance [-2.+ln(A)*0.84]
static G4std::vector <G4double> RopWd; // Width of the Roper Resonance [.1+1.65*ln(A)]
static G4std::vector <G4double> RopPs; // Position of the Roper Resonance [6.46+.061*ln(A)]
G4double sigma=0.;
if( aPart->GetDefinition()->GetPDGEncoding() == 22 )
{
G4double A=targN+targZ;
if(targN!=lastN || targZ!=lastZ) // Otherwise the set of parameters is ready
{
lastN = targN; // The last N of calculated nucleus
lastZ = targZ; // The last Z of calculated nucleus
G4int n=colN.size();
G4bool in=false;
if(n) for(G4int i=0; i<n; i++) if(colN[i]==targN && colZ[i]==targZ) // Calculated nucleus
{ // @@ Parameters can be combined in a type (structure) to accelerate the retrieve process
in=true;
lastHighE=HighE[i]; // High Energy A-dependence
lastGDRc1=GDRc1[i]; // logAmplitude of the 1-st GDR maximum
lastGDRp1=GDRp1[i]; // A-power of the 1-st GDR maximum
lastGDRt1=GDRt1[i]; // Threshold of the 1-st GDR maximum
lastGDRs1=GDRs1[i]; // Slope of the 1-st GDR maximum
lastGDRc2=GDRc2[i]; // logAmplitude of the 2-nd GDR maximum
lastGDRp2=GDRp2[i]; // A-power of the 2-nd GDR maximum
lastGDRt2=GDRt2[i]; // Threshold of the 2-nd GDR maximum
lastGDRs2=GDRs2[i]; // Slope of the 2-nd GDR maximum
lastQDAmp=QDAmp[i]; // Amplitude of the QuasiDeuteron region
lastQDWid=QDWid[i]; // Width of the QuasiDeuteron region or SecR(H1,H2)
lastQDPos=QDPos[i]; // Position of the QuasiDeuteron region or SecR(H1,H2)
lastDelAm=DelAm[i]; // Amplitude of the Delta Resonance
lastDelWd=DelWd[i]; // Width of the Delta Resonance
lastDelPs=DelPs[i]; // Position of the Delta Resonance
lastDelTh=DelTh[i]; // Threshold of the Delta Resonance
lastDelSl=DelSl[i]; // Slope of the Delta Resonance
lastRopAm=RopAm[i]; // Amplitude of the Roper Resonance
lastRopWd=RopWd[i]; // Width of the Roper Resonance
lastRopPs=RopPs[i]; // Position of the Roper Resonance
}
if(!in) // Fill the new set of parameters for the new nucleus
{
G4double lnA=log(A);
if(A==1)
{
lastHighE=1.; // High Energy A-dependence
lastDelAm=.55; // The last Amplitude of the Delta Resonance (not .41)
lastQDAmp=.08; // The last Amplitude of the Third Resonance (like H2)
lastQDWid=90.; // The last Width of the Third Resonance (like H2)
lastQDPos=6.93; // The last Position of the Third Resonance (like H2)
lastDelWd=18.; // The last Width of the Delta Resonance (not 11.9)
lastRopAm=.22; // The last Amplitude of the Roper Resonance (not .14)
lastRopWd=20.; // The last Width of the Roper Resonance (close to H2)
lastRopPs=6.57; // The last Position of the Roper Resonance (like H2)
}
else
{
lastHighE=exp(-lnA*(.115-.0048*lnA))*A; // High Energy A-dependence
lastGDRc1=GetGDRc1(targZ, targN); // The last logAmplitude of the 1-st GDR maximum
lastGDRp1=GetGDRp1(targZ, targN); // The last A-power of the 1-st GDR maximum
lastGDRt1=GetGDRt1(targZ, targN); // The last Threshold of the 1-st GDR maximum
lastGDRs1=GetGDRs1(targZ, targN); // The last Slope of the 1-st GDR maximum
lastGDRc2=GetGDRc2(targZ, targN); // The last logAmplitude of the 2-nd GDR maximum
lastGDRp2=GetGDRp2(targZ, targN); // The last A-power of the 2-nd GDR maximum
lastGDRt2=GetGDRt2(targZ, targN); // The last Threshold of the 2-nd GDR maximum
lastGDRs2=GetGDRs2(targZ, targN); // The last Slope of the 2-nd GDR maximum
lastDelWd=GetDelWd(targZ, targN); // The last Width of the Delta Resonance
if(A==2)
{
lastDelAm=.88; // The last Amplitude of the Delta Resonance (not .82)
lastQDAmp=.078; // The last Amplitude of the Third Resonance
lastQDWid=90.; // The last Width of the Third Resonance (like H1)
lastQDPos=6.93; // The last Position of the Third Resonance (like H1)
lastRopAm=.34; // The last Amplitude of the Roper Resonance (not .14)
lastRopWd=15.; // The last Width of the Roper Resonance (close to H1)
lastRopPs=6.57; // The last Position of the Roper Resonance (like H1)
}
else
{
lastDelAm=GetDelAm(targZ, targN); // The last Amplitude of the Delta Resonance
lastQDAmp=GetQDAmp(targZ, targN); // The last Amplitude of the QuasiDeuteron region
lastQDWid=.4; // The last Width of the QuasiDeuteron region
lastQDPos=3.7; // The last Position of the QuasiDeuteron region
lastRopAm=GetRopAm(targZ, targN); // The last Amplitude of the Roper Resonance
lastRopWd=GetRopWd(targZ, targN); // The last Width of the Roper Resonance
lastRopPs=GetRopPs(targZ, targN); // The last Position of the Roper Resonance
}
}
lastDelPs=GetDelPs(targZ, targN); // The last Position of the Delta Resonance
lastDelTh=GetDelTh(targZ, targN); // The last Threshold of the Delta Resonance
lastDelSl=GetDelSl(targZ, targN); // The last Slope of the Delta Resonance
colN.push_back(targN);
colZ.push_back(targZ);
HighE.push_back(lastHighE);
GDRc1.push_back(lastGDRc1);
GDRp1.push_back(lastGDRp1);
GDRt1.push_back(lastGDRt1);
GDRs1.push_back(lastGDRs1);
GDRc2.push_back(lastGDRc2);
GDRp2.push_back(lastGDRp2);
GDRt2.push_back(lastGDRt2);
GDRs2.push_back(lastGDRs2);
QDAmp.push_back(lastQDAmp);
QDWid.push_back(lastQDWid);
QDPos.push_back(lastQDPos);
DelAm.push_back(lastDelAm);
DelWd.push_back(lastDelWd);
DelPs.push_back(lastDelPs);
DelTh.push_back(lastDelTh);
DelSl.push_back(lastDelSl);
RopAm.push_back(lastRopAm);
RopWd.push_back(lastRopWd);
RopPs.push_back(lastRopPs);
} // End of creation of the new set of parameters
} // End of parameters udate
// ============================== NOW the Magic Formula =================================
G4double qdeut=lE-lastQDPos;
G4double delta=lE-lastDelPs;
G4double roper=lE-lastRopPs;
if(A>1) sigma+=exp(lastGDRc1-lE*lastGDRp1)/(1.+exp((lastGDRt1-lE)/lastGDRs1))+ // 1-st GDR
exp(lastGDRc2-lE*lastGDRp2)/(1.+exp((lastGDRt2-lE)/lastGDRs2)); // 2-nd GDR
sigma+=lastQDAmp/(1.+lastQDWid*qdeut*qdeut) + lastRopAm/(1.+lastRopWd*roper*roper)+ // QD+Roper
lastDelAm/(1.+lastDelWd*delta*delta)/(1.+exp((lastDelTh-lE)/lastDelSl))+ // Delta
lastHighE*(0.0116*exp(lE*0.16)+.4*exp(-lE*0.2))/(1.+exp((7.-lE)/0.2)); // High E
} // End of "sigma" calculation
else return 0.;
return sigma*millibarn;
}
// Correction function for Be,C @@ Move to header
G4double G4PhotoNuclearCrossSection::LinearFit(G4double X, G4int N, const G4double* XN,
const G4double* YN)
{
G4double Xj=XN[0];
G4double Xh=XN[N-1];
if(X<=Xj) return YN[0]; //-------+
else if(X>=Xh) return YN[N-1];//-|
G4double Xp=0.; // |
G4int j=0; // |
while (X>Xj && j<N)//<-----------+
{
j++;
Xp=Xj;
Xj=XN[j];
}
return YN[j]-(Xj-X)*(YN[j]-YN[j-1])/(Xj-Xp);
}
@@ -14,7 +14,7 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * authors in the GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
@@ -14,7 +14,7 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * authors in the GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
@@ -34,12 +34,10 @@ GetCrossSection(const G4DynamicParticle* aPart,
const G4double targetAtomicNumber = anEle->GetN();
const G4double nTargetProtons = anEle->GetZ();
const G4double nTargetNeutrons = targetAtomicNumber-nTargetProtons;
const G4double kineticEnergy = aPart->GetKineticEnergy()/MeV;
const G4double nProjProtons = aPart->GetDefinition()->GetPDGCharge();
const G4double projectileAtomicNumber = aPart->GetDefinition()->GetBaryonNumber();
const G4double nProjNeutrons = projectileAtomicNumber-nProjProtons;
const G4double nuleonRadius=1.1E-15;
const G4double myNuleonRadius=1.36E-15;
@@ -14,15 +14,15 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * authors in the GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4VCrossSectionDataSet.cc,v 1.2.8.1 2001/06/28 19:12:54 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4VCrossSectionDataSet.cc,v 1.4 2001/08/01 17:03:18 hpw Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// GEANT4 physics abstract class: G4VCrossSectionDataSet