Import Geant4 6.0.0 source tree
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# $Id: GNUmakefile,v 1.3 2003/06/03 10:16:32 jwellisc Exp $
|
||||
# $Id: GNUmakefile,v 1.4 2003/11/01 16:18:27 hpw Exp $
|
||||
# ----------------------------------------------------------------
|
||||
# GNUmakefile for hadronic management library. G.Folger 10-Dec-97
|
||||
# ----------------------------------------------------------------
|
||||
@@ -24,6 +24,7 @@ CPPFLAGS += -I$(G4BASE)/global/management/include \
|
||||
-I$(G4BASE)/particles/hadrons/barions/include \
|
||||
-I$(G4BASE)/particles/hadrons/ions/include \
|
||||
-I$(G4BASE)/processes/management/include \
|
||||
-I$(G4BASE)/processes/hadronic/util/include \
|
||||
-I$(G4BASE)/materials/include
|
||||
|
||||
include $(G4INSTALL)/config/common.gmk
|
||||
|
||||
@@ -21,13 +21,12 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ElectroNuclearCrossSection.hh,v 1.10 2003/06/16 17:03:00 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
// GEANT4 tag $Name: geant4-06-00 $
|
||||
//
|
||||
//
|
||||
// GEANT4 physics class: G4ElectroNuclearCrossSection -- header file
|
||||
// M.V. Kossov, ITEP(Moscow), 24-OCT-01
|
||||
// The last update: M.V. Kossov, CERN/ITEP (Moscow) 17-May-02
|
||||
// The last update: M.V. Kossov, CERN/ITEP (Moscow) 25-Sept-03
|
||||
//
|
||||
|
||||
#ifndef G4ElectroNuclearCrossSection_h
|
||||
@@ -139,27 +138,25 @@ inline G4double G4ElectroNuclearCrossSection::ThresholdEnergy(G4int Z, G4int N)
|
||||
return dN;
|
||||
}
|
||||
|
||||
inline G4double G4ElectroNuclearCrossSection::DFun(G4double /* x */) // Original PhoNuc cross section
|
||||
inline G4double G4ElectroNuclearCrossSection::DFun(G4double x)// Parametrization of the PhotoNucCS
|
||||
{
|
||||
static const G4double shd=1.0734; // HE PomShadowing(D)
|
||||
static const G4double poc=0.0375; // HE Pomeron coefficient
|
||||
static const G4double pos=16.5; // HE Pomeron shift
|
||||
static const G4double reg=.11; // HE Reggeon slope
|
||||
static const G4double mel=0.5109989; // Mass of electron in MeV
|
||||
static const G4double lmel=log(mel); // Log of electron mass
|
||||
G4double lE=lastG+lmel;
|
||||
return poc*(lE-pos)+shd*exp(-reg*lE);
|
||||
static const G4double mel=0.5109989; // Mass of an electron in MeV
|
||||
static const G4double lmel=log(mel); // Log of an electron mass
|
||||
G4double y=exp(x-lastG-lmel); // y for the x
|
||||
G4double flux=lastG*(2.-y*(2.-y))-1.; // flux factor
|
||||
return (poc*(x-pos)+shd*exp(-reg*x))*flux;
|
||||
}
|
||||
|
||||
inline G4double G4ElectroNuclearCrossSection::Fun(G4double /* x */) // Integrated PhoNuc cross section
|
||||
inline G4double G4ElectroNuclearCrossSection::Fun(G4double x) // Integrated PhoNuc cross section
|
||||
{
|
||||
static const G4double mel=0.5109989; // Mass of electron in MeV
|
||||
static const G4double lmel=log(mel); // Log of electron mass
|
||||
G4double dlg1=lastG+lastG-1.;
|
||||
G4double lgoe=lastG/lastE;
|
||||
G4double lE=lastG+lmel;
|
||||
G4double HE2=HighEnergyJ2(lE);
|
||||
return dlg1*HighEnergyJ1(lE)-lgoe*(HE2+HE2-HighEnergyJ3(lE)/lastE);
|
||||
G4double HE2=HighEnergyJ2(x);
|
||||
return dlg1*HighEnergyJ1(x)-lgoe*(HE2+HE2-HighEnergyJ3(x)/lastE);
|
||||
}
|
||||
|
||||
inline G4double G4ElectroNuclearCrossSection::HighEnergyJ1(G4double lEn)
|
||||
@@ -185,7 +182,8 @@ inline G4double G4ElectroNuclearCrossSection::HighEnergyJ2(G4double lEn)
|
||||
static const G4double d=1.-0.11; // 1-d
|
||||
static const G4double cd=1.0734/d; // c/(1-d)
|
||||
static const G4double ele=exp(d*le); // E0^(1-d)
|
||||
return a*((lEn-1.)*lastE-le1)-ab*(lastE-e)+cd*(exp(d*lEn)-ele);
|
||||
G4double En=exp(lEn);
|
||||
return a*((lEn-1.)*En-le1)-ab*(En-e)+cd*(exp(d*lEn)-ele);
|
||||
}
|
||||
|
||||
inline G4double G4ElectroNuclearCrossSection::HighEnergyJ3(G4double lEn)
|
||||
@@ -199,7 +197,7 @@ inline G4double G4ElectroNuclearCrossSection::HighEnergyJ3(G4double lEn)
|
||||
static const G4double d=2.-.11; // 2-d
|
||||
static const G4double cd=1.0734/d; // c/(2-d)
|
||||
static const G4double ele=exp(d*le); // E0^(2-d)
|
||||
G4double lastE2=lastE*lastE;
|
||||
G4double lastE2=exp(lEn+lEn);
|
||||
return ha*((lEn-.5)*lastE2-leh)-hab*(lastE2-e2)+cd*(exp(d*lEn)-ele);
|
||||
}
|
||||
|
||||
|
||||
@@ -21,8 +21,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4HadronCrossSections.hh,v 1.9 2003/06/03 09:21:38 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
// GEANT4 tag $Name: geant4-06-00 $
|
||||
//
|
||||
//
|
||||
// GEANT4 Hadron physics class -- header file
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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 *
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
#ifndef G4IonsKoxCrossSection_h
|
||||
#define G4IonsKoxCrossSection_h
|
||||
//
|
||||
// Class Description
|
||||
// Implementation of Kox formulas
|
||||
// Kox et al. Phys. Rev. C 35 1678 (1987);
|
||||
// Total Reaction Cross Section for Nucleus-nucles reactions.
|
||||
//
|
||||
// Class Description - End
|
||||
// 18-Sep-2003 First version is written by T. Koi
|
||||
// 12-Nov-2003 Set upper limit at 10 GeV/n
|
||||
// 12-Nov-2003 Insted of the lower limit,
|
||||
// 0 is returned to a partilce with energy lowae than 10 MeV/n
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4Proton.hh"
|
||||
|
||||
#include "G4VCrossSectionDataSet.hh"
|
||||
|
||||
class G4IonsKoxCrossSection : public G4VCrossSectionDataSet
|
||||
{
|
||||
public:
|
||||
G4IonsKoxCrossSection():
|
||||
upperLimit ( 10 * GeV ),
|
||||
lowerLimit ( 10 * MeV ),
|
||||
r0 ( 1.1 * fermi ),
|
||||
rc ( 1.3 * fermi )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
virtual
|
||||
G4bool IsApplicable(const G4DynamicParticle* aDP, const G4Element*)
|
||||
{
|
||||
G4int baryonNumber = aDP->GetDefinition()->GetBaryonNumber();
|
||||
G4double kineticEnergy = aDP->GetKineticEnergy();
|
||||
if ( kineticEnergy / baryonNumber <= upperLimit )
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual
|
||||
G4double GetCrossSection(const G4DynamicParticle*,
|
||||
const G4Element*, G4double aTemperature);
|
||||
|
||||
virtual
|
||||
void BuildPhysicsTable(const G4ParticleDefinition&)
|
||||
{}
|
||||
|
||||
virtual
|
||||
void DumpPhysicsTable(const G4ParticleDefinition&)
|
||||
{G4cout << "G4IonsKoxCrossSection: uses Kox formula"<<G4endl;}
|
||||
|
||||
private:
|
||||
const G4double upperLimit;
|
||||
const G4double lowerLimit;
|
||||
const G4double r0;
|
||||
const G4double rc;
|
||||
|
||||
G4double calEcm ( G4double , G4double , G4double );
|
||||
G4double calCeValue ( G4double );
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,84 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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 *
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
|
||||
#ifndef G4IonsShenCrossSection_h
|
||||
#define G4IonsShenCrossSection_h
|
||||
//
|
||||
// Class Description
|
||||
// Implementation of formulas
|
||||
// Shen et al. Nuc. Phys. A 491 130 (1989);
|
||||
// Total Reaction Cross Section for Heavy-Ion Collisions
|
||||
//
|
||||
// Class Description - End
|
||||
// 18-Sep-2003 First version is written by T. Koi
|
||||
// 12-Nov-2003 Set upper limit at 10 GeV/n
|
||||
// 12-Nov-2003 Insted of the lower limit,
|
||||
// 0 is returned to a partilce with energy lowae than 10 MeV/n
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4Proton.hh"
|
||||
|
||||
#include "G4VCrossSectionDataSet.hh"
|
||||
|
||||
class G4IonsShenCrossSection : public G4VCrossSectionDataSet
|
||||
{
|
||||
public:
|
||||
G4IonsShenCrossSection ():
|
||||
upperLimit ( 10 * GeV ),
|
||||
lowerLimit ( 10 * MeV ),
|
||||
r0 ( 1.1 )
|
||||
{
|
||||
}
|
||||
|
||||
virtual
|
||||
G4bool IsApplicable(const G4DynamicParticle* aDP, const G4Element*)
|
||||
{
|
||||
G4int baryonNumber = aDP->GetDefinition()->GetBaryonNumber();
|
||||
G4double kineticEnergy = aDP->GetKineticEnergy();
|
||||
if ( kineticEnergy / baryonNumber <= upperLimit )
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual
|
||||
G4double GetCrossSection(const G4DynamicParticle*,
|
||||
const G4Element*, G4double aTemperature);
|
||||
|
||||
virtual
|
||||
void BuildPhysicsTable(const G4ParticleDefinition&)
|
||||
{}
|
||||
|
||||
virtual
|
||||
void DumpPhysicsTable(const G4ParticleDefinition&)
|
||||
{G4cout << "G4IonsShenCrossSection: uses Shen formula"<<G4endl;}
|
||||
|
||||
private:
|
||||
const G4double upperLimit;
|
||||
const G4double lowerLimit;
|
||||
const G4double r0;
|
||||
|
||||
G4double calEcmValue ( const G4double , const G4double , const G4double );
|
||||
G4double calCeValue ( const G4double );
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,75 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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 *
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
#ifndef G4IonsSihverCrossSection_h
|
||||
#define G4IonsSihverCrossSection_h
|
||||
//
|
||||
// Class Description
|
||||
// Implementation of formulas
|
||||
// Sihver et al. Phys. Rev. C 47 1225 (1993);
|
||||
// Total Reaction Cross Section for Nucleus-nucles reactions.
|
||||
// Energy independent
|
||||
// Valid for 100>MeV/nucleon
|
||||
// Class Description - End
|
||||
//
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4Proton.hh"
|
||||
|
||||
#include "G4VCrossSectionDataSet.hh"
|
||||
|
||||
class G4IonsSihverCrossSection : public G4VCrossSectionDataSet
|
||||
{
|
||||
public:
|
||||
G4IonsSihverCrossSection ():
|
||||
square_r0 ( ( 1.36 * fermi ) * ( 1.36 * fermi ) )
|
||||
{
|
||||
}
|
||||
|
||||
virtual
|
||||
G4bool IsApplicable(const G4DynamicParticle* aDP, const G4Element*)
|
||||
{
|
||||
G4int BaryonNumber = aDP->GetDefinition()->GetBaryonNumber();
|
||||
G4double KineticEnergy = aDP->GetKineticEnergy();
|
||||
if ( KineticEnergy / BaryonNumber >= 100*MeV && BaryonNumber > 1 )
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual
|
||||
G4double GetCrossSection(const G4DynamicParticle*,
|
||||
const G4Element*, G4double aTemperature);
|
||||
|
||||
virtual
|
||||
void BuildPhysicsTable(const G4ParticleDefinition&)
|
||||
{}
|
||||
|
||||
virtual
|
||||
void DumpPhysicsTable(const G4ParticleDefinition&)
|
||||
{G4cout << "tG4GIonCrossSection: uses formula"<<G4endl;}
|
||||
|
||||
private:
|
||||
const G4double square_r0;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -21,8 +21,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PhotoNuclearCrossSection.hh,v 1.9 2003/06/16 17:03:01 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
// GEANT4 tag $Name: geant4-06-00 $
|
||||
//
|
||||
//
|
||||
// GEANT4 physics class: G4PhotoNuclearCrossSection -- header file
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// by J.P Wellisch, Sun Sep 15 2002.
|
||||
|
||||
#ifndef G4PiData_h
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
#ifndef G4PiNuclearCrossSection_h
|
||||
#define G4PiNuclearCrossSection_h
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
//
|
||||
|
||||
#include "G4CrossSectionDataStore.hh"
|
||||
#include "G4HadronicException.hh"
|
||||
|
||||
|
||||
G4double
|
||||
@@ -34,16 +35,19 @@ G4CrossSectionDataStore::GetCrossSection(const G4DynamicParticle* aParticle,
|
||||
const G4Element* anElement,
|
||||
G4double aTemperature)
|
||||
{
|
||||
if (NDataSetList == 0) {
|
||||
G4Exception("G4CrossSectionDataStore: no data sets registered");
|
||||
if (NDataSetList == 0)
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__,
|
||||
"G4CrossSectionDataStore: no data sets registered");
|
||||
return DBL_MIN;
|
||||
}
|
||||
for (G4int i = NDataSetList-1; i >= 0; i--) {
|
||||
if (DataSetList[i]->IsApplicable(aParticle, anElement))
|
||||
return DataSetList[i]->GetCrossSection(aParticle, anElement, aTemperature);
|
||||
}
|
||||
G4Exception("G4CrossSectionDataStore: no applicable data set found "
|
||||
"for particle/element");
|
||||
throw G4HadronicException(__FILE__, __LINE__,
|
||||
"G4CrossSectionDataStore: no applicable data set found "
|
||||
"for particle/element");
|
||||
return DBL_MIN;
|
||||
}
|
||||
|
||||
@@ -52,8 +56,9 @@ void
|
||||
G4CrossSectionDataStore::AddDataSet(G4VCrossSectionDataSet* aDataSet)
|
||||
{
|
||||
if (NDataSetList == NDataSetMax) {
|
||||
G4Exception("G4CrossSectionDataStore::AddDataSet: "
|
||||
"reached maximum number of data sets");
|
||||
G4cout << "WARNING: G4CrossSectionDataStore::AddDataSet: "<<G4endl;
|
||||
G4cout << " reached maximum number of data sets";
|
||||
G4cout << " data set not added !!!!!!!!!!!!!!!!";
|
||||
return;
|
||||
}
|
||||
DataSetList[NDataSetList] = aDataSet;
|
||||
@@ -65,9 +70,11 @@ void
|
||||
G4CrossSectionDataStore::
|
||||
BuildPhysicsTable(const G4ParticleDefinition& aParticleType)
|
||||
{
|
||||
if (NDataSetList == 0) {
|
||||
G4Exception("G4CrossSectionDataStore: no data sets registered");
|
||||
return;
|
||||
if (NDataSetList == 0)
|
||||
{
|
||||
G4Exception("G4CrossSectionDataStore", "007", FatalException,
|
||||
"BuildPhysicsTable: no data sets registered");
|
||||
return;
|
||||
}
|
||||
for (G4int i = NDataSetList-1; i >= 0; i--) {
|
||||
DataSetList[i]->BuildPhysicsTable(aParticleType);
|
||||
@@ -80,7 +87,7 @@ G4CrossSectionDataStore::
|
||||
DumpPhysicsTable(const G4ParticleDefinition& aParticleType)
|
||||
{
|
||||
if (NDataSetList == 0) {
|
||||
G4Exception("G4CrossSectionDataStore: no data sets registered");
|
||||
G4cout << "WARNING - G4CrossSectionDataStore::DumpPhysicsTable: no data sets registered"<<G4endl;
|
||||
return;
|
||||
}
|
||||
for (G4int i = NDataSetList-1; i >= 0; i--) {
|
||||
|
||||
@@ -21,17 +21,17 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ElectroNuclearCrossSection.cc,v 1.18 2003/06/16 17:03:04 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
// $Id: G4ElectroNuclearCrossSection.cc,v 1.22 2003/11/19 11:08:40 mkossov Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00 $
|
||||
//
|
||||
//
|
||||
// G4 Physics class: G4ElectroNuclearCrossSection for gamma+A cross sections
|
||||
// Created: M.V. Kossov, CERN/ITEP(Moscow), 10-OCT-01
|
||||
// The last update: M.V. Kossov, CERN/ITEP (Moscow) 17-May-02
|
||||
// The last update: M.V. Kossov, CERN/ITEP (Moscow) 17-Oct-03
|
||||
//
|
||||
//===============================================================================================
|
||||
|
||||
//#define debug
|
||||
///#define debug
|
||||
#define edebug
|
||||
//#define pdebug
|
||||
//#define ppdebug
|
||||
@@ -60,28 +60,28 @@ G4double G4ElectroNuclearCrossSection::GetCrossSection(const G4DynamicParticle*
|
||||
{
|
||||
static const G4int nE=336; // !! If you change this, change it in GetFunctions() (*.hh) !!
|
||||
static const G4int mL=nE-1;
|
||||
static const G4double EMi=2.0612; // Minimum Energy
|
||||
static const G4double EMa=50000.; // Maximum Energy
|
||||
static const G4double lEMi=log(EMi); // Minimum logarithmic Energy
|
||||
static const G4double lEMa=log(EMa); // Maximum logarithmic Energy
|
||||
static const G4double dlnE=(lEMa-lEMi)/mL; // Logarithmic step in Energy
|
||||
static const G4double alop=1./137.036/3.14159265; //for the calculated functions (E>50000.)
|
||||
static const G4double mel=0.5109989; // Mass of electron in MeV
|
||||
static const G4double lmel=log(mel); // Log of electron mass
|
||||
// Associative memory for acceleration
|
||||
static std::vector <G4int> colN; // Vector of N for calculated nucleus
|
||||
static std::vector <G4int> colZ; // Vector of Z for calculated nucleus
|
||||
static std::vector <G4int> colF; // Vector of LastZeroPosition in the J-functions
|
||||
static std::vector <G4double> colTH; // Vector of energy thresholds
|
||||
static std::vector <G4double> colH; // Vector of high energy coefficient
|
||||
static std::vector <G4double*> J1; // Vector of pointers to the J1 functions
|
||||
static std::vector <G4double*> J2; // Vector of pointers to the J2 functions
|
||||
static std::vector <G4double*> J3; // Vector of pointers to the J3 functions
|
||||
static const G4double EMi=2.0612; // Minimum tabulated Energy of the Electron
|
||||
static const G4double EMa=50000.; // Maximum tabulated Energy of the Electron
|
||||
static const G4double lEMi=log(EMi); // Minimum tabulated logarithmic Energy of the Electron
|
||||
static const G4double lEMa=log(EMa); // Maximum tabulated logarithmic Energy of the Electron
|
||||
static const G4double dlnE=(lEMa-lEMi)/mL; // Logarithmic step in the table for the electron Energy
|
||||
static const G4double alop=1./137.036/3.14159265; //coef. for the calculated functions (Ee>50000.)
|
||||
static const G4double mel=0.5109989; // Mass of the electron in MeV
|
||||
static const G4double lmel=log(mel); // Log of the electron mass
|
||||
// *** Begin of the Associative memory for acceleration of the cross section calculations
|
||||
static std::vector <G4int> colN; // Vector of N for calculated nucleus (isotop)
|
||||
static std::vector <G4int> colZ; // Vector of Z for calculated nucleus (isotop)
|
||||
static std::vector <G4int> colF; // Vector of Last StartPosition in the Ji-function tables
|
||||
static std::vector <G4double> colTH; // Vector of the energy thresholds for the eA->eX reactions
|
||||
static std::vector <G4double> colH; // Vector of HighEnergyCoefficients (functional calculations)
|
||||
static std::vector <G4double*> J1; // Vector of pointers to the J1 tabulated functions
|
||||
static std::vector <G4double*> J2; // Vector of pointers to the J2 tabulated functions
|
||||
static std::vector <G4double*> J3; // Vector of pointers to the J3 tabulated functions
|
||||
// *** End of Static Definitions (Associative Memory) ***
|
||||
const G4double Energy = aPart->GetKineticEnergy()/MeV; // Energy of the electron
|
||||
const G4int targetAtomicNumber = static_cast<int>(anEle->GetN()+.499); //@@ Nat mixture (?!)
|
||||
const G4int targZ = static_cast<int>(anEle->GetZ());
|
||||
const G4int targN = targetAtomicNumber-targZ; // @@ Get minimum isotop (can change initial A)
|
||||
const G4int targZ = static_cast<int>(anEle->GetZ()+.001);
|
||||
const G4int targN = targetAtomicNumber-targZ; // @@ Get isotops (can change initial A)
|
||||
if (Energy<=EMi) return 0.; // Energy is below the minimum energy in the table
|
||||
G4int PDG=aPart->GetDefinition()->GetPDGEncoding();
|
||||
if( PDG == 11 || PDG == -11) // @@ Now only for electrons, but can be fo muons
|
||||
@@ -89,8 +89,8 @@ G4double G4ElectroNuclearCrossSection::GetCrossSection(const G4DynamicParticle*
|
||||
G4double A=targN+targZ; // New A (can differ from G4double targetAtomicNumber)
|
||||
if(targN!=lastN || targZ!=lastZ) // This nucleus was not the last used isotop
|
||||
{
|
||||
lastE = 0.; // New history in Energy
|
||||
lastG = 0.; // New history in Energy
|
||||
lastE = 0.; // New history in the electron Energy
|
||||
lastG = 0.; // New history in the photon Energy
|
||||
lastN = targN; // The last N of calculated nucleus
|
||||
lastZ = targZ; // The last Z of calculated nucleus
|
||||
G4int n=colN.size(); // Size of the Associative Memory DB in the heap
|
||||
@@ -105,7 +105,7 @@ G4double G4ElectroNuclearCrossSection::GetCrossSection(const G4DynamicParticle*
|
||||
lastJ2 =J2[i]; // Pointer to the prepared J2 function
|
||||
lastJ3 =J3[i]; // Pointer to the prepared J3 function
|
||||
}
|
||||
if(!in) // This nucleus have not been calculated previously
|
||||
if(!in) // This nucleus has not been calculated previously
|
||||
{
|
||||
lastJ1 = new G4double[nE]; // Allocate memory for the new J1 function
|
||||
lastJ2 = new G4double[nE]; // Allocate memory for the new J2 function
|
||||
@@ -114,7 +114,7 @@ G4double G4ElectroNuclearCrossSection::GetCrossSection(const G4DynamicParticle*
|
||||
lastH = alop*A*(1.-.072*log(A));// corresponds to lastSP from G4PhotonuclearCrossSection
|
||||
lastTH = ThresholdEnergy(targZ, targN); // The last Threshold Energy
|
||||
#ifdef pdebug
|
||||
G4cout<<"lastH="<<lastH<<",A="<<A<<",lnA="<<lnA<<G4endl;
|
||||
G4cout<<"G4ElNucCS::GetCrossSection: lastH="<<lastH<<",A="<<A<<G4endl;
|
||||
#endif
|
||||
colN.push_back(targN);
|
||||
colZ.push_back(targZ);
|
||||
@@ -128,17 +128,17 @@ G4double G4ElectroNuclearCrossSection::GetCrossSection(const G4DynamicParticle*
|
||||
} // End of parameters udate
|
||||
else if(abs((lastE-Energy)/Energy)<.001) return lastSig*millibarn; // Don't calc. same CS twice
|
||||
// ============================== NOW Calculate the Cross Section ==========================
|
||||
lastE=Energy;
|
||||
if (Energy<=lastTH)
|
||||
lastE=Energy; // lastE - the electron energy
|
||||
if (Energy<=lastTH) // Once more check that the eE is higher than the ThreshE
|
||||
{
|
||||
lastSig=0.;
|
||||
return 0.;
|
||||
}
|
||||
G4double lE=log(Energy); // It is necessary at this point for the fit
|
||||
lastG=lE-lmel;
|
||||
G4double lE=log(Energy); // log(eE) (it is necessary at this point for the fit)
|
||||
lastG=lE-lmel; // Gamma of the electron (used to recover log(eE))
|
||||
G4double dlg1=lastG+lastG-1.;
|
||||
G4double lgoe=lastG/lastE;
|
||||
if(lE<lEMa) // Linear fit is done explicitly to fix the last bin for the randomization
|
||||
if(lE<lEMa) // Linear fit is made explicitly to fix the last bin for the randomization
|
||||
{
|
||||
G4double shift=(lE-lEMi)/dlnE;
|
||||
G4int blast=static_cast<int>(shift);
|
||||
@@ -150,7 +150,10 @@ G4double G4ElectroNuclearCrossSection::GetCrossSection(const G4DynamicParticle*
|
||||
G4double YNj=dlg1*lastJ1[lastL]-lgoe*(lastJ2[lastL]+lastJ2[lastL]-lastJ3[lastL]/lastE);
|
||||
lastSig= YNi+shift*(YNj-YNi);
|
||||
if(lastSig>YNj)lastSig=YNj;
|
||||
//G4cout<<"S="<<lastSig<<",E="<<lE<<",Xj="<<Xj<<",Yj="<<YNj<<",Y1="<<YN1<<",M="<<lEMa<<G4endl;
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4ElNucCS::GetCS:S="<<lastSig<<",E="<<lE<<",Yi="<<YNi<<",Yj="<<YNj<<",M="<<lEMa<<G4endl;
|
||||
G4cout<<"G4EN::GCS:s="<<shift<<",Jb="<<lastJ1[blast]<<",J="<<lastJ1[lastL]<<",b="<<blast<<G4endl;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -159,8 +162,10 @@ G4double G4ElectroNuclearCrossSection::GetCrossSection(const G4DynamicParticle*
|
||||
G4double term2=lastJ2[mL]+lastH*HighEnergyJ2(lE);
|
||||
G4double term3=lastJ3[mL]+lastH*HighEnergyJ3(lE);
|
||||
lastSig=dlg1*term1-lgoe*(term2+term2-term3/lastE);
|
||||
//G4cout<<"S="<<lastSig<<",lE="<<lE<<",Pm="<<lastJ1[mL]<<",J1="<<lastH*HighEnergyJ1(lE)
|
||||
// <<",Fm="<<lastJ2[mL]<<",Fh="<<lastH*HighEnergyJ2(lE)<<",EM="<<lEMa<<G4endl;
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4ElNucCS::GetCrossSec:S="<<lastSig<<",lE="<<lE<<",J1="<<lastH*HighEnergyJ1(lE)<<",Pm="
|
||||
<<lastJ1[mL]<<",Fm="<<lastJ2[mL]<<",Fh="<<lastH*HighEnergyJ2(lE)<<",EM="<<lEMa<<G4endl;
|
||||
#endif
|
||||
}
|
||||
} // End of "sigma" calculation
|
||||
else return 0.;
|
||||
@@ -195,8 +200,7 @@ G4int G4ElectroNuclearCrossSection::GetFunctions(G4double a, G4double* x, G4doub
|
||||
static const G4int nE=336; // !! If you change this, change it in GetCrossSection() (*.cc) !!
|
||||
static G4int L[nN]={138, 2, 32, 75, 26, 41, 0, 67, 58, 46, 41, 38, 39, 36};
|
||||
// !! @@ Change it from ln(A) to A approximation !!
|
||||
static G4double A[nN]={1.,2.,3.,4.,6.,7.,9.,
|
||||
12.,16.,27.,63.546,118.71,207.2,238.472};
|
||||
static G4double A[nN]={1.,2.,3.,4.,6.,7.,9.,12.,16.,27.,63.546,118.71,207.2,238.472};
|
||||
static const G4double P00[nE]={
|
||||
0.000000e+00,0.000000e+00,0.000000e+00,0.000000e+00,0.000000e+00,0.000000e+00,0.000000e+00,
|
||||
0.000000e+00,0.000000e+00,0.000000e+00,0.000000e+00,0.000000e+00,0.000000e+00,0.000000e+00,
|
||||
@@ -2259,42 +2263,48 @@ G4int G4ElectroNuclearCrossSection::GetFunctions(G4double a, G4double* x, G4doub
|
||||
static const G4double* P1[nN]={P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P110,P111,P112,P113};
|
||||
static const G4double* P2[nN]={P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P210,P211,P212,P213};
|
||||
// --------------------------------
|
||||
G4int r=-1; // Low channel for J-functions
|
||||
if(a<=.9)
|
||||
G4int r=-1; // Low channel for J-functions
|
||||
if(a<=.9999 || a>238.49) // Plutonium 244 is forbidden
|
||||
{
|
||||
G4cout<<"***G4ElectroNuclearCrossSection::GetFunctions: A="<<a<<"(?). No CS returned!"<<G4endl;
|
||||
return r;
|
||||
}
|
||||
for(G4int i=0; i<nN; i++) if(abs(a-A[i])<.0005)
|
||||
G4int iA=static_cast<G4int>(a+.499); // Make the round integer of the atomic number
|
||||
G4double ai=iA;
|
||||
if(a!=ai) a=ai;
|
||||
for(G4int i=0; i<nN; i++)
|
||||
{
|
||||
for(G4int k=0; k<nE; k++)
|
||||
if(abs(a-A[i])<.0005) // A coincide with one of the basic A's -> get from Tab
|
||||
{
|
||||
x[k]=P0[i][k];
|
||||
y[k]=P1[i][k];
|
||||
z[k]=P2[i][k];
|
||||
}
|
||||
r=L[i]; // Low channel for J-functions
|
||||
}
|
||||
if(r<0) // Not a basic isotop is not filled
|
||||
{
|
||||
G4int k=0; // !! To be good for different compilers !!
|
||||
for(k=1; k<nN; k++) if(a<A[k]) break;
|
||||
if(k<1) k=1; // Extrapolation from the first bin (D/He)
|
||||
if(k>=nN) k=nN-1; // Extrapolation from the last bin (U)
|
||||
G4int k1=k-1;
|
||||
G4double xi=A[k1];
|
||||
G4double b=(a-xi)/(A[k]-xi);
|
||||
for(G4int m=0; m<nE; m++)
|
||||
for(G4int k=0; k<nE; k++)
|
||||
{
|
||||
x[k]=P0[i][k]; // J0
|
||||
y[k]=P1[i][k]; // J1
|
||||
z[k]=P2[i][k]; // J2
|
||||
}
|
||||
r=L[i]; // Low channel for the J-functions
|
||||
}
|
||||
if(r<0) // Not the basic A-value -> must be calculated
|
||||
{
|
||||
G4int k=0; // !! To be good for different compilers !!
|
||||
for(k=1; k<nN; k++)if(a<A[k]) break;// Find the top basic A-value
|
||||
if(k<1) k=1; // Extrapolation from the first bin (D)
|
||||
if(k>=nN) k=nN-1; // Extrapolation from the last bin (U)
|
||||
G4int k1=k-1;
|
||||
G4double xi=A[k1];
|
||||
G4double b=(a-xi)/(A[k]-xi);
|
||||
for(G4int m=0; m<nE; m++)
|
||||
{
|
||||
G4double xi=P0[k1][m];
|
||||
x[m]=xi+(P0[k][m]-xi)*b;
|
||||
G4double yi=P1[k1][m];
|
||||
y[m]=yi+(P1[k][m]-yi)*b;
|
||||
G4double zi=P2[k1][m];
|
||||
z[m]=zi+(P2[k][m]-zi)*b;
|
||||
}
|
||||
r=L[k];
|
||||
if(L[k1]<r) r=L[k1];
|
||||
}
|
||||
r=L[k];
|
||||
if(L[k1]<r) r=L[k1];
|
||||
}
|
||||
}
|
||||
return r;
|
||||
}
|
||||
@@ -2317,7 +2327,7 @@ G4double G4ElectroNuclearCrossSection::GetEquivalentPhotonEnergy()
|
||||
G4cout<<"G4ElectroNuclearCrossSection::GetEguPhotE:B="<<lastF<<",l="<<lastL<<",J1="<<lastJ1[lastL]
|
||||
<<",J2="<<lastJ2[lastL]<<",J3="<<lastJ3[lastL]<<",S="<<lastSig<<",E="<<lastE<<G4endl;
|
||||
#endif
|
||||
G4double lastLE=lastG+lmel;
|
||||
G4double lastLE=lastG+lmel; // recover log(eE) from the gamma (lastG)
|
||||
G4double dlg1=lastG+lastG-1.;
|
||||
G4double lgoe=lastG/lastE;
|
||||
for(G4int i=lastF;i<=lastL;i++) Y[i]=dlg1*lastJ1[i]-lgoe*(lastJ2[i]+lastJ2[i]-lastJ3[i]/lastE);
|
||||
@@ -2327,7 +2337,7 @@ G4double G4ElectroNuclearCrossSection::GetEquivalentPhotonEnergy()
|
||||
G4cerr<<"*HP*G4ElNucCS::GetEqPhotE:S="<<lastSig<<">"<<Y[lastL]<<",l="<<lastL<<">"<<mL<<G4endl;
|
||||
return 3.0*MeV; // quick and dirty workaround @@@ HP. (now can be not necessary M.K.)
|
||||
}
|
||||
G4double ris=lastSig*G4UniformRand(); // Sig can be > Y[lastL=mL], then it is in the func. region
|
||||
G4double ris=lastSig*G4UniformRand(); // Sig can be > Y[lastL=mL], then it is in the funct. region
|
||||
#ifdef debug
|
||||
G4cout<<"G4ElectroNuclearCrossSection::GetEquivalentPhotonEnergy: "<<ris<<",Y="<<Y[lastL]<<G4endl;
|
||||
#endif
|
||||
@@ -2344,23 +2354,28 @@ G4double G4ElectroNuclearCrossSection::GetEquivalentPhotonEnergy()
|
||||
G4double Yi=Y[j1]; // Low value
|
||||
phLE=lEMi+(j1+(ris-Yi)/(Yj-Yi))*dlnE;
|
||||
#ifdef debug
|
||||
G4cout<<"G4ElN::lE="<<phLE<<",li="<<lEMi<<",j="<<j<<",ris="<<ris<<",Yi="<<Yi<<",Y="<<Yj<<G4endl;
|
||||
G4cout<<"G4EleNucCS::E="<<phLE<<",l="<<lEMi<<",j="<<j<<",ris="<<ris<<",Yi="<<Yi<<",Y="<<Yj<<G4endl;
|
||||
#endif
|
||||
}
|
||||
else // Search with the function
|
||||
{
|
||||
if(lastL<mL)G4cerr<<"**G4EleNucCS::GetEfPhE:L="<<lastL<<",S="<<lastSig<<",Y="<<Y[lastL]<<G4endl;
|
||||
G4double f=(ris-Y[lastL])/lastH; // The scaled residual value
|
||||
G4double f=(ris-Y[lastL])/lastH; // The scaled residual value of the cross-section integral
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4EleNucCS::GetEfPhE:HighEnergy f="<<f<<",ris="<<ris<<",lastH="<<lastH<<G4endl;
|
||||
#endif
|
||||
phLE=SolveTheEquation(f);
|
||||
phLE=SolveTheEquation(f); // Solve the equation to find theLog(phE) (compare with lastLE)
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4EleNucCS::GetEfPhE:HighEnergy lphE="<<phLE<<G4endl;
|
||||
#endif
|
||||
}
|
||||
if(phLE>lastLE)G4cerr<<"***G4ElectroNuclearCrossSection::GetEquPhotE:"<<phLE<<">"<<lastLE<<",S="
|
||||
<<lastSig<<",ris="<<ris<<",B="<<lastF<<",E="<<lastL<<",Y="<<Y[lastL]<<G4endl;
|
||||
if(phLE>lastLE)
|
||||
{
|
||||
G4cerr<<"***G4ElectroNuclearCS::GetEquPhotE:N="<<lastN<<",Z="<<lastZ<<", lpE"<<phLE<<">leE"<<lastLE
|
||||
<<",Sig="<<lastSig<<",rndSig="<<ris<<",Beg="<<lastF<<",End="<<lastL<<",Y="<<Y[lastL]<<G4endl;
|
||||
if(lastLE<7.2) phLE=log(exp(lastLE)-.511);
|
||||
else phLE=7.;
|
||||
}
|
||||
return exp(phLE);
|
||||
}
|
||||
|
||||
@@ -2375,23 +2390,36 @@ G4double G4ElectroNuclearCrossSection::SolveTheEquation(G4double f)
|
||||
static const G4double mel=0.5109989; // Mass of electron in MeV
|
||||
static const G4double lmel=log(mel); // Log of electron mass
|
||||
static const G4double z=log(EMa); // Initial argument
|
||||
static const G4double p=poc*(z-pos)+shd*exp(-reg*z); // Initial function
|
||||
static const G4int imax=7; // Not more than "imax" steps to find the solution
|
||||
static const G4double p=poc*(z-pos)+shd*exp(-reg*z); // CrossX on theHighTableEdge (small change)
|
||||
static const G4int imax=27; // Not more than "imax" steps to find the solution
|
||||
static const G4double eps=0.001; // Accuracy which satisfies the search
|
||||
G4double x=z+f/p/(lastG+lmel-z); // First guess
|
||||
G4double lastLE=lastG+lmel; // recover log(eE) from the gamma (lastG)
|
||||
G4double topLim=lastLE-.001; // maximum log(phE) for equivalent photons
|
||||
G4double rE=EMa/exp(lastLE); // r=EMa/Eel to make the firs guess
|
||||
G4double x=z+f/p/(lastG*(2.-rE*(2.-rE))-1.); // First guess (the first step from the edge)
|
||||
#ifdef pdebug
|
||||
G4cout<<"SolveTheEq: e="<<eps<<",f="<<f<<",z="<<z<<",p="<<p<<",lastG="<<lastG<<",x="<<x<<G4endl;
|
||||
#endif
|
||||
if(x>topLim) x=topLim;
|
||||
for(G4int i=0; i<imax; i++)
|
||||
{
|
||||
G4double fx=Fun(x);
|
||||
G4double df=DFun(x);
|
||||
G4double d=(fx-f)/df;
|
||||
G4double d=(f-fx)/df;
|
||||
x=x+d;
|
||||
#ifdef pdebug
|
||||
G4cout<<"SolveTheEq: i="<<i<<",d="<<d<<",x="<<x<<",fx="<<fx<<",df="<<df<<G4endl;
|
||||
G4cout<<"G4ElNucCS::SolveTheEq: i="<<i<<",d="<<d<<",x="<<x<<",fx="<<fx<<",df="<<df<<G4endl;
|
||||
#endif
|
||||
if(x>=lastLE)
|
||||
{
|
||||
G4cerr<<"*G4ElNCS::SolveTheEq:*Correction*"<<i<<",d="<<d<<",x="<<x<<">lE="<<lastLE<<",f="<<f
|
||||
<<",fx="<<fx<<",df="<<df<<",A(Z="<<lastZ<<",N="<<lastN<<")"<<G4endl;
|
||||
x=topLim;
|
||||
if(i)G4Exception("G4ElectroNuclearCrossSection::SolveTheEquation()","009",FatalException,"E>eE");
|
||||
}
|
||||
if(abs(d)<eps) break;
|
||||
if(i+1>=imax) G4cerr<<"*G4ElNucCS::SolveTheEq:"<<i+2<<">"<<imax<<"->Use bigger max. ln(eE)="
|
||||
<<lastLE<<",Z="<<lastZ<<", N="<<lastN<<G4endl;
|
||||
}
|
||||
return x;
|
||||
}
|
||||
@@ -2421,8 +2449,17 @@ G4double G4ElectroNuclearCrossSection::GetEquivalentPhotonQ2(G4double nu)
|
||||
return 0.;
|
||||
}
|
||||
G4double LyQa2=log(Fy+fr); // L(y,Q2max) function
|
||||
G4double R=G4UniformRand(); // Random number (0,1)
|
||||
G4double Q2=Qi2*(ePy+1./(exp(R*LyQa2-(1.-R)*Uy)-Fy));
|
||||
G4bool cond=true;
|
||||
G4int maxTry=3;
|
||||
G4int cntTry=0;
|
||||
G4double Q2=Qi2;
|
||||
while(cond&&cntTry<maxTry) // The loop to avoid x>1.
|
||||
{
|
||||
G4double R=G4UniformRand(); // Random number (0,1)
|
||||
Q2=Qi2*(ePy+1./(exp(R*LyQa2-(1.-R)*Uy)-Fy));
|
||||
cntTry++;
|
||||
cond = Q2>1878.*nu;
|
||||
}
|
||||
if(Q2<Qi2)
|
||||
{
|
||||
#ifdef edebug
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4HadronCaptureDataSet.cc,v 1.5 2002/12/12 19:16:50 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
// $Id: G4HadronCaptureDataSet.cc,v 1.6 2003/07/01 15:08:46 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00 $
|
||||
//
|
||||
//
|
||||
// G4 Physics class: HadronCaptureDataSet for cross sections
|
||||
|
||||
@@ -21,8 +21,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4HadronCrossSections.cc,v 1.11 2003/06/16 17:03:06 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
// GEANT4 tag $Name: geant4-06-00 $
|
||||
//
|
||||
//
|
||||
// G4 Hadron Physics class G4HadronCrossSections
|
||||
@@ -1606,7 +1605,8 @@ G4HadronCrossSections::GetParticleCode(const G4DynamicParticle* aParticle)
|
||||
else if (aParticleType == G4OmegaMinus::OmegaMinus()) ipart = 33;
|
||||
else if (aParticleType == G4AntiOmegaMinus::AntiOmegaMinus()) ipart = 34;
|
||||
else {
|
||||
G4Exception("G4HadronCrossSections: unsupported particle");
|
||||
G4Exception("G4HadronCrossSections", "007", FatalException,
|
||||
"GetParticleCode: unsupported particle");
|
||||
return 0;
|
||||
}
|
||||
return ipart;
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4HadronElasticDataSet.cc,v 1.5 2002/12/12 19:16:51 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
// $Id: G4HadronElasticDataSet.cc,v 1.6 2003/07/01 15:08:46 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00 $
|
||||
//
|
||||
//
|
||||
// G4 Physics class: HadronElasticDataSet for cross sections
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4HadronFissionDataSet.cc,v 1.5 2002/12/12 19:16:51 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
// $Id: G4HadronFissionDataSet.cc,v 1.6 2003/07/01 15:08:46 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00 $
|
||||
//
|
||||
//
|
||||
// G4 Physics class: HadronFissionDataSet for cross sections
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4HadronInelasticDataSet.cc,v 1.5 2002/12/12 19:16:52 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
// $Id: G4HadronInelasticDataSet.cc,v 1.6 2003/07/01 15:08:46 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00 $
|
||||
//
|
||||
//
|
||||
// G4 Physics class: HadronInelasticDataSet for cross sections
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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 *
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// 18-Sep-2003 First version is written by T. Koi
|
||||
// 10-Nov-2003 Bug fix at Cal. ke_per_n and D T. Koi
|
||||
// 12-Nov-2003 Add energy check at lower side T. Koi
|
||||
|
||||
#include "G4IonsKoxCrossSection.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "G4IonTable.hh"
|
||||
|
||||
G4double G4IonsKoxCrossSection::
|
||||
GetCrossSection(const G4DynamicParticle* aParticle,
|
||||
const G4Element* anElement, G4double )
|
||||
{
|
||||
G4double xsection = 0.0;
|
||||
|
||||
G4int Ap = aParticle->GetDefinition()->GetBaryonNumber();
|
||||
G4int Zp = int ( aParticle->GetDefinition()->GetPDGCharge() / eplus + 0.5);
|
||||
G4double ke_per_N = aParticle->GetKineticEnergy() / Ap;
|
||||
|
||||
// Apply energy check, if less than lower limit then 0 value is returned
|
||||
if ( ke_per_N < lowerLimit )
|
||||
return xsection;
|
||||
|
||||
G4int At = int ( anElement->GetN() + 0.5 );
|
||||
G4int Zt = int ( anElement->GetZ() + 0.5 );
|
||||
|
||||
G4double one_third = 1.0 / 3.0;
|
||||
|
||||
G4double cubicrAt = pow ( G4double(At) , G4double(one_third) );
|
||||
G4double cubicrAp = pow ( G4double(Ap) , G4double(one_third) );
|
||||
|
||||
|
||||
G4double Bc = Zt * Zp / ( ( rc / fermi ) * ( cubicrAp + cubicrAt ) ); // rc divide fermi
|
||||
|
||||
G4double Rvol = r0 * ( cubicrAp + cubicrAt );
|
||||
|
||||
// G4double ke_per_N = aParticle->GetKineticEnergy() / Ap;
|
||||
G4double c = calCeValue ( ke_per_N / MeV );
|
||||
|
||||
G4double a = 1.85;
|
||||
G4double Rsurf = r0 * ( a * cubicrAp * cubicrAt / ( cubicrAp + cubicrAt ) - c);
|
||||
G4double D = 5.0 * ( At - 2 * Zt ) * Zp / ( Ap * At );
|
||||
Rsurf = Rsurf + D * fermi; // multiply D by fermi
|
||||
|
||||
G4double Rint = Rvol + Rsurf;
|
||||
|
||||
G4double targ_mass = G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass( Zt , At );
|
||||
G4double proj_mass = aParticle->GetMass();
|
||||
G4double proj_momentum = aParticle->GetMomentum().mag();
|
||||
|
||||
G4double Ecm = calEcm ( proj_mass , targ_mass , proj_momentum );
|
||||
|
||||
xsection = pi * Rint * Rint * ( 1 - Bc / ( Ecm / MeV ) );
|
||||
|
||||
return xsection;
|
||||
}
|
||||
|
||||
G4double G4IonsKoxCrossSection::calEcm ( G4double mp , G4double mt , G4double Plab )
|
||||
{
|
||||
G4double Elab = sqrt ( mp * mp + Plab * Plab );
|
||||
G4double Ecm = sqrt ( mp * mp + mt * mt + 2 * Elab * mt );
|
||||
G4double Pcm = Plab * mt / Ecm;
|
||||
G4double KEcm = sqrt ( Pcm * Pcm + mp * mp ) - mp;
|
||||
return KEcm;
|
||||
}
|
||||
|
||||
G4double G4IonsKoxCrossSection::calCeValue( const G4double ke )
|
||||
{
|
||||
// Calculate c value
|
||||
// This value is indepenent from projectile and target particle
|
||||
// ke is projectile kinetic energy per nucleon in the Lab system with MeV unit
|
||||
// fitting function is made by T. Koi
|
||||
// There are no data below 30 MeV/n in Kox et al.,
|
||||
|
||||
G4double Ce;
|
||||
G4double log10_ke = log10 ( ke );
|
||||
if ( log10_ke > 1.5 )
|
||||
{
|
||||
Ce = - 10.0 / pow ( G4double(log10_ke) , G4double(5) ) + 2.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
Ce = ( - 10.0 / pow ( G4double(1.5) , G4double(5) ) + 2.0 ) / pow ( G4double(1.5) , G4double(3) ) * pow ( G4double(log10_ke) , G4double(3) );
|
||||
|
||||
}
|
||||
return Ce;
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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 *
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// 18-Sep-2003 First version is written by T. Koi
|
||||
// 12-Nov-2003 Add energy check at lower side T. Koi
|
||||
|
||||
#include "G4IonsShenCrossSection.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "G4IonTable.hh"
|
||||
|
||||
|
||||
G4double G4IonsShenCrossSection::
|
||||
GetCrossSection(const G4DynamicParticle* aParticle, const G4Element* anElement, G4double )
|
||||
{
|
||||
G4double xsection = 0.0;
|
||||
|
||||
G4int Ap = aParticle->GetDefinition()->GetBaryonNumber();
|
||||
G4int Zp = int ( aParticle->GetDefinition()->GetPDGCharge() / eplus + 0.5 );
|
||||
G4double ke_per_N = aParticle->GetKineticEnergy() / Ap;
|
||||
|
||||
// Apply energy check, if less than lower limit then 0 value is returned
|
||||
if ( ke_per_N < lowerLimit )
|
||||
return xsection;
|
||||
|
||||
G4int At = int ( anElement->GetN() + 0.5 );
|
||||
G4int Zt = int ( anElement->GetZ() + 0.5 );
|
||||
|
||||
|
||||
G4double one_third = 1.0 / 3.0;
|
||||
|
||||
G4double cubicrAt = pow ( G4double(At) , G4double(one_third) );
|
||||
G4double cubicrAp = pow ( G4double(Ap) , G4double(one_third) );
|
||||
|
||||
G4double Rt = 1.12 * cubicrAt - 0.94 * ( 1.0 / cubicrAt );
|
||||
G4double Rp = 1.12 * cubicrAp - 0.94 * ( 1.0 / cubicrAp );
|
||||
|
||||
G4double r = Rt + Rp + 3.2; // in fm
|
||||
G4double b = 1.0; // in MeV/fm
|
||||
|
||||
G4double B = 1.44 * Zt * Zp / r - b * Rt * Rp / ( Rt + Rp );
|
||||
|
||||
//G4double ke_per_N = aParticle->GetKineticEnergy() / Ap;
|
||||
|
||||
G4double c = calCeValue ( ke_per_N / MeV );
|
||||
|
||||
G4double R1 = r0 * ( cubicrAt + cubicrAp + 1.85 * cubicrAt * cubicrAp / ( cubicrAt + cubicrAp ) - c);
|
||||
|
||||
G4double R2 = 1.0 * ( At - 2 * Zt ) * Zp / ( Ap * At );
|
||||
|
||||
G4double targ_mass = G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass( Zt , At );
|
||||
G4double proj_mass = aParticle->GetMass();
|
||||
G4double proj_momentum = aParticle->GetMomentum().mag();
|
||||
|
||||
G4double Ecm = calEcmValue ( proj_mass , targ_mass , proj_momentum );
|
||||
|
||||
G4double R3 = 0.176 / pow ( G4double(Ecm) , G4double(one_third) ) * cubicrAt * cubicrAp / ( cubicrAt + cubicrAp );
|
||||
|
||||
G4double R = R1 + R2 + R3;
|
||||
|
||||
xsection = 10 * pi * R * R * ( 1 - B / Ecm );
|
||||
xsection = xsection * millibarn; // mulitply xsection by millibarn
|
||||
|
||||
return xsection;
|
||||
}
|
||||
|
||||
|
||||
|
||||
G4double G4IonsShenCrossSection::calEcmValue( const G4double mp , const G4double mt , const G4double Plab )
|
||||
{
|
||||
G4double Elab = sqrt ( mp * mp + Plab * Plab );
|
||||
G4double Ecm = sqrt ( mp * mp + mt * mt + 2 * Elab * mt );
|
||||
G4double Pcm = Plab * mt / Ecm;
|
||||
G4double KEcm = sqrt ( Pcm * Pcm + mp * mp ) - mp;
|
||||
return KEcm;
|
||||
}
|
||||
|
||||
|
||||
G4double G4IonsShenCrossSection::calCeValue( const G4double ke )
|
||||
{
|
||||
// Calculate c value
|
||||
// This value is indepenent from projectile and target particle
|
||||
// ke is projectile kinetic energy per nucleon in the Lab system with MeV unit
|
||||
// fitting function is made by T. Koi
|
||||
// There are no data below 30 MeV/n in Kox et al.,
|
||||
|
||||
G4double Ce;
|
||||
G4double log10_ke = log10 ( ke );
|
||||
if ( log10_ke > 1.5 )
|
||||
{
|
||||
Ce = - 10.0 / pow ( G4double(log10_ke) , G4double(5) ) + 2.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
Ce = ( - 10.0 / pow ( G4double(1.5) , G4double(5) ) + 2.0 ) / pow ( G4double(1.5) , G4double(3) ) * pow ( G4double(log10_ke) , G4double(3) );
|
||||
}
|
||||
return Ce;
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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 *
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// 18-Sep-2003 First version is written by T. Koi
|
||||
|
||||
#include "G4IonsSihverCrossSection.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "G4IonTable.hh"
|
||||
|
||||
G4double G4IonsSihverCrossSection::
|
||||
GetCrossSection(const G4DynamicParticle* aParticle,
|
||||
const G4Element* anElement, G4double )
|
||||
{
|
||||
G4double xsection = 0.0;
|
||||
|
||||
G4int At = int ( anElement->GetN() + 0.5 );
|
||||
//Zt = int ( anElement->GetZ() + 0.5 ); // not used
|
||||
|
||||
G4int Ap = aParticle->GetDefinition()->GetBaryonNumber();
|
||||
//Zp = aParticle->GetDefinition()->GetPDGCharge(); // not used
|
||||
|
||||
G4double one_third = 1.0 / 3.0;
|
||||
|
||||
G4double cubicrAt = pow ( G4double(At) , G4double(one_third) );
|
||||
G4double cubicrAp = pow ( G4double(Ap) , G4double(one_third) );
|
||||
|
||||
G4double b0 = 1.581 - 0.876 * ( 1.0 / cubicrAp + 1.0 / cubicrAt );
|
||||
|
||||
xsection = pi * square_r0
|
||||
* pow ( G4double(cubicrAp + cubicrAt - b0 * ( 1.0 / cubicrAp + 1.0 / cubicrAt ) ), G4double(2) );
|
||||
|
||||
return xsection;
|
||||
}
|
||||
@@ -21,9 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PhotoNuclearCrossSection.cc,v 1.11 2003/06/16 17:03:07 gunter Exp $
|
||||
// The lust update: M.V. Kossov, CERN/ITEP(Moscow) 17-June-02
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
// GEANT4 tag $Name: geant4-06-00 $
|
||||
//
|
||||
//
|
||||
// G4 Physics class: G4PhotoNuclearCrossSection for gamma+A cross sections
|
||||
|
||||
@@ -20,8 +20,7 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4PiData.cc,v 1.6 2003/06/16 17:03:08 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02 $
|
||||
// GEANT4 tag $Name: geant4-06-00 $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
// by J.P Wellisch, Sun Sep 15 2002.
|
||||
@@ -58,7 +57,11 @@ ReactionXSection(G4double kineticEnergy)
|
||||
G4double result = 0;
|
||||
G4PiData::iterator it=begin();
|
||||
while(it!=end()&&kineticEnergy>(*it).first) {it++;}
|
||||
if(it==end()) G4Exception("G4PiData used outside validity range");
|
||||
if(it==end())
|
||||
{
|
||||
G4Exception("G4PiData", "007", FatalException,
|
||||
"ReactionXSection used outside validity range");
|
||||
}
|
||||
if(it==begin()) it++;
|
||||
G4double x1,x2,e1,e2;
|
||||
e1=(*(it-1)).first;
|
||||
@@ -75,7 +78,11 @@ ElasticXSection(G4double kineticEnergy)
|
||||
G4double result = 0;
|
||||
G4PiData::iterator it=begin();
|
||||
while(it!=end()&&kineticEnergy>(*it).first) {it++;}
|
||||
if(it==end()) G4Exception("G4PiData used outside validity range");
|
||||
if(it==end())
|
||||
{
|
||||
G4Exception("G4PiData", "007", FatalException,
|
||||
"ElasticXSection used outside validity range");
|
||||
}
|
||||
if(it==begin()) it++;
|
||||
G4double x1,x2,e1,e2;
|
||||
e1=(*(it-1)).first;
|
||||
|
||||
@@ -19,7 +19,9 @@
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
#include "G4PiNuclearCrossSection.hh"
|
||||
#include "G4HadronicException.hh"
|
||||
|
||||
// by J.P Wellisch, Sun Sep 15 2002.
|
||||
// Implements P2-90-158;
|
||||
@@ -168,7 +170,11 @@ GetCrossSection(const G4DynamicParticle* aParticle,
|
||||
G4bool ok = false;
|
||||
if(aParticle->GetDefinition() == G4PionMinus::PionMinus()) ok=true;
|
||||
if(aParticle->GetDefinition() == G4PionPlus::PionPlus()) ok=true;
|
||||
if(!ok) G4Exception("Call to G4PiNuclearCrossSection failed.");
|
||||
if(!ok)
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__,
|
||||
"Call to G4PiNuclearCrossSection failed.");
|
||||
}
|
||||
G4double charge = aParticle->GetDefinition()->GetPDGCharge();
|
||||
G4double kineticEnergy = aParticle->GetKineticEnergy();
|
||||
|
||||
@@ -179,7 +185,8 @@ GetCrossSection(const G4DynamicParticle* aParticle,
|
||||
while(it<theZ.size() && Z>theZ[it]) it++;
|
||||
if(Z > theZ[it])
|
||||
{
|
||||
G4Exception("Error: Calling G4PiNuclearCrossSection outside parametrization");
|
||||
throw G4HadronicException(__FILE__, __LINE__,
|
||||
"Called G4PiNuclearCrossSection outside parametrization");
|
||||
}
|
||||
G4int Z1, Z2;
|
||||
G4double x1, x2;
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "G4TripathiCrossSection.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "G4IonTable.hh"
|
||||
#include "G4HadTmpUtil.hh"
|
||||
|
||||
G4double G4TripathiCrossSection::
|
||||
GetCrossSection(const G4DynamicParticle* aPart,
|
||||
@@ -45,7 +46,7 @@ GetCrossSection(const G4DynamicParticle* aPart,
|
||||
// needs target mass
|
||||
G4double targetMass = G4ParticleTable::GetParticleTable()
|
||||
->GetIonTable()
|
||||
->GetIonMass(static_cast<G4int>(nTargetProtons), static_cast<G4int>(targetAtomicNumber));
|
||||
->GetIonMass(G4lrint(nTargetProtons), G4lrint(targetAtomicNumber));
|
||||
G4LorentzVector pTarget(0,0,0,targetMass);
|
||||
G4LorentzVector pProjectile(aPart->Get4Momentum());
|
||||
pTarget = pTarget+pProjectile;
|
||||
|
||||
Reference in New Issue
Block a user