Import Geant4 9.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 15:58:43 +02:00
parent 96c8bcd0af
commit b79225fb37
7544 changed files with 245407 additions and 91099 deletions
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4BGGNucleonElasticXS.hh,v 1.1 2007/03/13 15:19:30 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4BGGNucleonElasticXS.hh,v 1.2 2008/12/01 16:50:23 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -59,6 +59,7 @@
class G4GlauberGribovCrossSection;
class G4NucleonNuclearCrossSection;
class G4HadronNucleonXsc;
class G4BGGNucleonElasticXS : public G4VCrossSectionDataSet
{
@@ -92,30 +93,39 @@ private:
void Initialise();
G4double thEnergy; // threshold of Glauber model
G4double theFac[93];
G4double CoulombFactor(G4double kinEnergy, G4double A);
G4double fGlauberEnergy;
G4double fLowEnergy;
G4double theGlauberFac[93];
G4double theCoulombFac[93];
const G4ParticleDefinition* particle;
G4GlauberGribovCrossSection* fGlauber;
G4NucleonNuclearCrossSection* fNucleon;
G4HadronNucleonXsc* fHadron;
G4bool isProton;
G4bool isInitialized;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
G4bool G4BGGNucleonElasticXS::IsApplicable(const G4DynamicParticle* dp,
const G4Element* elm)
G4bool G4BGGNucleonElasticXS::IsApplicable(const G4DynamicParticle*,
const G4Element*)
{
return IsZAApplicable(dp, elm->GetZ(), elm->GetN());
return true;
// return IsZAApplicable(dp, elm->GetZ(), elm->GetN());
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
G4bool G4BGGNucleonElasticXS::IsZAApplicable(const G4DynamicParticle* dp,
G4double Z, G4double/* A*/)
G4bool G4BGGNucleonElasticXS::IsZAApplicable(const G4DynamicParticle*,
G4double /*Z*/, G4double/* A*/)
{
return (dp->GetDefinition() == particle && Z > 1.5);
return true;
// return (dp->GetDefinition() == particle);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4BGGNucleonInelasticXS.hh,v 1.1 2007/03/13 15:19:30 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4BGGNucleonInelasticXS.hh,v 1.2 2008/12/01 16:50:23 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -59,6 +59,7 @@
class G4GlauberGribovCrossSection;
class G4NucleonNuclearCrossSection;
class G4HadronNucleonXsc;
class G4BGGNucleonInelasticXS : public G4VCrossSectionDataSet
{
@@ -92,30 +93,39 @@ private:
void Initialise();
G4double thEnergy; // threshold of Glauber model
G4double theFac[93];
G4double CoulombFactor(G4double kinEnergy, G4double A);
G4double fGlauberEnergy;
G4double fLowEnergy;
G4double theGlauberFac[93];
G4double theCoulombFac[93];
const G4ParticleDefinition* particle;
G4GlauberGribovCrossSection* fGlauber;
G4NucleonNuclearCrossSection* fNucleon;
G4HadronNucleonXsc* fHadron;
G4bool isProton;
G4bool isInitialized;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
G4bool G4BGGNucleonInelasticXS::IsApplicable(const G4DynamicParticle* dp,
const G4Element* elm)
G4bool G4BGGNucleonInelasticXS::IsApplicable(const G4DynamicParticle*,
const G4Element*)
{
return IsZAApplicable(dp, elm->GetZ(), elm->GetN());
return true;
// return IsZAApplicable(dp, elm->GetZ(), elm->GetN());
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
G4bool G4BGGNucleonInelasticXS::IsZAApplicable(const G4DynamicParticle* dp,
G4double Z, G4double/* A*/)
G4bool G4BGGNucleonInelasticXS::IsZAApplicable(const G4DynamicParticle*,
G4double /*Z*/, G4double/* A*/)
{
return (dp->GetDefinition() == particle && Z > 1.5);
return true;
// return (dp->GetDefinition() == particle);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4BGGPionElasticXS.hh,v 1.1 2007/03/13 15:19:30 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4BGGPionElasticXS.hh,v 1.2 2008/12/01 16:50:23 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -59,6 +59,7 @@
class G4GlauberGribovCrossSection;
class G4UPiNuclearCrossSection;
class G4HadronNucleonXsc;
class G4BGGPionElasticXS : public G4VCrossSectionDataSet
{
@@ -92,30 +93,39 @@ private:
void Initialise();
G4double thEnergy; // threshold of Glauber model
G4double theFac[93];
G4double CoulombFactor(G4double kinEnergy, G4double A);
G4double fGlauberEnergy;
G4double fLowEnergy;
G4double theGlauberFac[93];
G4double theCoulombFac[93];
const G4ParticleDefinition* particle;
G4GlauberGribovCrossSection* fGlauber;
G4UPiNuclearCrossSection* fPion;
G4HadronNucleonXsc* fHadron;
G4bool isPiplus;
G4bool isInitialized;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
G4bool G4BGGPionElasticXS::IsApplicable(const G4DynamicParticle* dp,
const G4Element* elm)
G4bool G4BGGPionElasticXS::IsApplicable(const G4DynamicParticle*,
const G4Element*)
{
return IsZAApplicable(dp, elm->GetZ(), elm->GetN());
return true;
//return IsZAApplicable(dp, elm->GetZ(), elm->GetN());
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
G4bool G4BGGPionElasticXS::IsZAApplicable(const G4DynamicParticle* dp,
G4double Z, G4double/* A*/)
G4bool G4BGGPionElasticXS::IsZAApplicable(const G4DynamicParticle*,
G4double /*Z*/, G4double/* A*/)
{
return (dp->GetDefinition() == particle && Z > 1.5);
return true;
// return (dp->GetDefinition() == particle);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4BGGPionInelasticXS.hh,v 1.1 2007/03/13 15:19:30 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4BGGPionInelasticXS.hh,v 1.2 2008/12/01 16:50:23 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -59,6 +59,7 @@
class G4GlauberGribovCrossSection;
class G4UPiNuclearCrossSection;
class G4HadronNucleonXsc;
class G4BGGPionInelasticXS : public G4VCrossSectionDataSet
{
@@ -92,38 +93,47 @@ private:
void Initialise();
G4double thEnergy; // threshold of Glauber model
G4double theFac[93];
G4double CoulombFactor(G4double kinEnergy, G4double A);
G4double fGlauberEnergy;
G4double fLowEnergy;
G4double theGlauberFac[93];
G4double theCoulombFac[93];
const G4ParticleDefinition* particle;
G4GlauberGribovCrossSection* fGlauber;
G4UPiNuclearCrossSection* fPion;
G4HadronNucleonXsc* fHadron;
G4bool isPiplus;
G4bool isInitialized;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
G4bool G4BGGPionInelasticXS::IsApplicable(const G4DynamicParticle* dp,
const G4Element* elm)
G4bool G4BGGPionInelasticXS::IsApplicable(const G4DynamicParticle*,
const G4Element*)
{
return IsZAApplicable(dp, elm->GetZ(), elm->GetN());
return true;
// return IsZAApplicable(dp, elm->GetZ(), elm->GetN());
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
G4bool G4BGGPionInelasticXS::IsZAApplicable(const G4DynamicParticle* dp,
G4double Z, G4double/* A*/)
G4bool G4BGGPionInelasticXS::IsZAApplicable(const G4DynamicParticle*,
G4double /*Z*/, G4double/* A*/)
{
return (dp->GetDefinition() == particle && Z > 1.5);
return true;
// return (dp->GetDefinition() == particle);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
G4double G4BGGPionInelasticXS::GetCrossSection(const G4DynamicParticle* dp,
const G4Element* elm,
G4double temp)
const G4Element* elm,
G4double temp)
{
return GetIsoZACrossSection(dp, elm->GetZ(), elm->GetN(), temp);
}
@@ -40,6 +40,7 @@
#include "G4Material.hh"
#include "G4VCrossSectionDataSet.hh"
class G4Nucleus;
class G4CrossSectionDataStore
{
@@ -67,6 +68,9 @@ public:
std::pair<G4double/*Z*/, G4double/*A*/>
SelectRandomIsotope(const G4DynamicParticle*, const G4Material*);
G4Element* SampleZandA(const G4DynamicParticle*, const G4Material*,
G4Nucleus& target);
void AddDataSet(G4VCrossSectionDataSet*);
void BuildPhysicsTable(const G4ParticleDefinition&);
@@ -85,6 +89,10 @@ public:
private:
G4VCrossSectionDataSet* whichDataSetInCharge(const G4DynamicParticle*,
const G4Element*);
enum { NDataSetMax = 100 };
G4VCrossSectionDataSet* DataSetList[NDataSetMax];
G4int NDataSetList;
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
//
// GEANT4 physics class: G4ElectroNuclearCrossSection -- header file
@@ -40,7 +40,6 @@
#include "G4Element.hh"
#include "G4ParticleTable.hh"
#include "G4NucleiProperties.hh"
#include "G4NucleiPropertiesTable.hh"
#include <vector>
#include "Randomize.hh"
#include "G4Electron.hh"
@@ -51,7 +50,7 @@ class G4ElectroNuclearCrossSection : public G4VCrossSectionDataSet
public:
G4ElectroNuclearCrossSection();
~G4ElectroNuclearCrossSection();
virtual ~G4ElectroNuclearCrossSection();
G4bool IsApplicable(const G4DynamicParticle* aParticle, const G4Element* )
{
@@ -116,40 +115,6 @@ private:
static std::vector <G4double*> J3; // Vector of pointers to the J3 tabulated functions
};
// 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)// Parametrization of the PhotoNucCS
{
static const G4double shd=1.0734; // HE PomShadowing(D)
@@ -0,0 +1,178 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// Calculation of the nucleus-nucleus total, inelastic, production,
// elastic and quasi-elastic cross-sections
// based on parametrisations of nucleon-nucleon
// cross-sections in
// the framework of simplified Glauber-Gribov approach
//
//
//
//
//
// 24.11.08 V. Grichine - first implementation based on G4GlauberGribovCrossSection
//
//
#ifndef G4GGNuclNuclCrossSection_h
#define G4GGNuclNuclCrossSection_h
#include "globals.hh"
#include "G4Proton.hh"
#include "G4Nucleus.hh"
#include "G4VCrossSectionDataSet.hh"
class G4ParticleDefinition;
class G4GGNuclNuclCrossSection : public G4VCrossSectionDataSet
{
public:
G4GGNuclNuclCrossSection ();
virtual ~G4GGNuclNuclCrossSection ();
virtual
G4bool IsApplicable(const G4DynamicParticle* aDP, const G4Element*);
virtual
G4bool IsZAApplicable(const G4DynamicParticle* aDP, G4double Z, G4double A);
virtual
G4double GetCrossSection(const G4DynamicParticle*,
const G4Element*,
G4double aTemperature = 0.0);
virtual
G4double GetIsoZACrossSection(const G4DynamicParticle*,
G4double Z, G4double A,
G4double aTemperature = 0.0);
virtual
void BuildPhysicsTable(const G4ParticleDefinition&)
{}
virtual
void DumpPhysicsTable(const G4ParticleDefinition&)
{G4cout << "G4NuclNuclCrossSection: uses Glauber-Gribov formula"<<G4endl;}
G4double GetRatioSD(const G4DynamicParticle*, G4double At, G4double Zt);
G4double GetRatioQE(const G4DynamicParticle*, G4double At, G4double Zt);
G4double GetHadronNucleonXsc(const G4DynamicParticle*, const G4Element*);
G4double GetHadronNucleonXsc(const G4DynamicParticle*, G4double At, G4double Zt);
G4double GetHadronNucleonXscPDG(const G4DynamicParticle*, const G4Element*);
G4double GetHadronNucleonXscPDG(const G4DynamicParticle*, G4double At, G4double Zt);
// G4double GetHadronNucleonXscNS(const G4DynamicParticle*, const G4Element*);
// G4double GetHadronNucleonXscNS(const G4DynamicParticle*,G4double At, G4double Zt);
G4double GetHadronNucleonXscNS(G4ParticleDefinition*,G4double pTkin, G4ParticleDefinition*);
// G4double GetHNinelasticXsc(const G4DynamicParticle*, const G4Element*);
// G4double GetHNinelasticXsc(const G4DynamicParticle*, G4double At, G4double Zt);
G4double GetHNinelasticXscVU(const G4DynamicParticle*, G4double At, G4double Zt);
G4double GetHadronNucleonXscMK(G4ParticleDefinition* pParticle, G4double pTkin,
G4ParticleDefinition* nucleon );
G4double CalculateEcmValue ( const G4double , const G4double , const G4double );
G4double CalcMandelstamS( const G4double , const G4double , const G4double );
G4double GetElasticGlauberGribov(const G4DynamicParticle*,G4double Z, G4double A);
G4double GetInelasticGlauberGribov(const G4DynamicParticle*,G4double Z, G4double A);
G4double GetTotalGlauberGribovXsc() { return fTotalXsc; };
G4double GetElasticGlauberGribovXsc() { return fElasticXsc; };
G4double GetInelasticGlauberGribovXsc(){ return fInelasticXsc; };
G4double GetProductionGlauberGribovXsc(){ return fProductionXsc; };
G4double GetDiffractionGlauberGribovXsc(){ return fDiffractionXsc; };
G4double GetRadiusConst() { return fRadiusConst; };
G4double GetNucleusRadius(const G4DynamicParticle*, const G4Element*);
G4double GetNucleusRadius(G4double At);
G4double GetNucleusRadiusGG(G4double At);
G4double GetNucleusRadiusDE(G4double At);
inline void SetEnergyLowerLimit(G4double E ){fLowerLimit=E;};
private:
const G4double fUpperLimit;
G4double fLowerLimit;
const G4double fRadiusConst;
G4double fTotalXsc, fElasticXsc, fInelasticXsc, fProductionXsc, fDiffractionXsc;
G4double fHadronNucleonXsc;
G4ParticleDefinition* theProton;
G4ParticleDefinition* theNeutron;
};
////////////////////////////////////////////////////////////////
//
// Inlines
inline
G4double G4GGNuclNuclCrossSection::GetElasticGlauberGribov(
const G4DynamicParticle* dp, G4double Z, G4double A)
{
GetIsoZACrossSection(dp, Z, A);
return fElasticXsc;
}
/////////////////////////////////////////////////////////////////
inline
G4double G4GGNuclNuclCrossSection::GetInelasticGlauberGribov(
const G4DynamicParticle* dp, G4double Z, G4double A)
{
GetIsoZACrossSection(dp, Z, A);
return fInelasticXsc;
}
#endif
@@ -117,12 +117,29 @@ public:
G4double GetNucleusRadius(const G4DynamicParticle*, const G4Element*);
G4double GetNucleusRadius(G4double At);
inline G4double GetParticleBarCorTot( const G4ParticleDefinition* theParticle, G4double Z );
inline G4double GetParticleBarCorIn( const G4ParticleDefinition* theParticle, G4double Z );
inline void SetEnergyLowerLimit(G4double E ){fLowerLimit=E;};
private:
const G4double fUpperLimit;
const G4double fLowerLimit;
G4double fLowerLimit;
const G4double fRadiusConst;
static const G4double fNeutronBarCorrectionTot[93];
static const G4double fNeutronBarCorrectionIn[93];
static const G4double fProtonBarCorrectionTot[93];
static const G4double fProtonBarCorrectionIn[93];
static const G4double fPionPlusBarCorrectionTot[93];
static const G4double fPionPlusBarCorrectionIn[93];
static const G4double fPionMinusBarCorrectionTot[93];
static const G4double fPionMinusBarCorrectionIn[93];
G4double fTotalXsc, fElasticXsc, fInelasticXsc, fProductionXsc, fDiffractionXsc;
G4double fHadronNucleonXsc;
@@ -159,6 +176,10 @@ private:
};
////////////////////////////////////////////////////////////////
//
// Inlines
inline
G4double G4GlauberGribovCrossSection::GetElasticGlauberGribov(
const G4DynamicParticle* dp, G4double Z, G4double A)
@@ -167,6 +188,8 @@ G4double G4GlauberGribovCrossSection::GetElasticGlauberGribov(
return fElasticXsc;
}
/////////////////////////////////////////////////////////////////
inline
G4double G4GlauberGribovCrossSection::GetInelasticGlauberGribov(
const G4DynamicParticle* dp, G4double Z, G4double A)
@@ -175,4 +198,48 @@ G4double G4GlauberGribovCrossSection::GetInelasticGlauberGribov(
return fInelasticXsc;
}
/////////////////////////////////////////////////////////////////////
//
// return correction at Tkin = 90*GeV GG -> Barashenkov tot xsc, when it
// is available, else return 1.0
inline G4double G4GlauberGribovCrossSection::GetParticleBarCorTot(
const G4ParticleDefinition* theParticle, G4double Z )
{
G4int iZ = G4int(Z);
if( iZ >= 2 && iZ <= 92)
{
if( theParticle == theProton ) return fProtonBarCorrectionTot[iZ];
else if( theParticle == theNeutron) return fNeutronBarCorrectionTot[iZ];
else if( theParticle == thePiPlus ) return fPionPlusBarCorrectionTot[iZ];
else if( theParticle == thePiMinus) return fPionMinusBarCorrectionTot[iZ];
else return 1.0;
}
else return 1.0;
}
/////////////////////////////////////////////////////////////////////
//
// return correction at Tkin = 90*GeV GG -> Barashenkov in xsc, when it
// is available, else return 1.0
inline G4double G4GlauberGribovCrossSection::GetParticleBarCorIn(
const G4ParticleDefinition* theParticle, G4double Z )
{
G4int iZ = G4int(Z);
if( iZ >= 2 && iZ <= 92)
{
if( theParticle == theProton ) return fProtonBarCorrectionIn[iZ];
else if( theParticle == theNeutron) return fNeutronBarCorrectionIn[iZ];
else if( theParticle == thePiPlus ) return fPionPlusBarCorrectionIn[iZ];
else if( theParticle == thePiMinus) return fPionMinusBarCorrectionIn[iZ];
else return 1.0;
}
else return 1.0;
}
#endif
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
//
// GEANT4 Hadron physics class -- header file
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
//
// GEANT4 physics class: G4PhotoNuclearCrossSection -- header file
@@ -36,13 +36,10 @@
#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 <vector>
class G4PhotoNuclearCrossSection : public G4VCrossSectionDataSet
@@ -50,7 +47,7 @@ class G4PhotoNuclearCrossSection : public G4VCrossSectionDataSet
public:
G4PhotoNuclearCrossSection();
~G4PhotoNuclearCrossSection();
virtual ~G4PhotoNuclearCrossSection();
G4bool IsApplicable(const G4DynamicParticle* particle, const G4Element* )
@@ -81,7 +78,6 @@ public:
private:
G4int GetFunctions(G4double a, G4double* y, G4double* z);
//G4double LinearFit(G4double X, G4int N, const G4double* XN, const G4double* YN);
G4double EquLinearFit(G4double X, G4int N,const G4double X0,const G4double XD, const G4double* Y);
G4double ThresholdEnergy(G4int Z, G4int N);
@@ -99,56 +95,6 @@ private:
static std::vector <G4double*> GDR; // Vector of pointers to the GDRPhotonuclearCrossSection
static std::vector <G4double*> HEN; // Vector of pointers to the HighEnPhotonuclearCrossSect
//G4HadronCrossSections* theHadronCrossSections;
};
// 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
{
G4cerr<<"G4PhotoNucCrossSect.hh::ThreshEn:Z="<<Z<<",A="<<A<<" element isn't in G4NucPr"<<G4endl;
return 0.; // If it is not in the Table of Stable Nuclei, then the Threshold=inf
}
// ---------
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
{
G4cerr << "G4PhotoNucCrossSect.hh::ThrEn:Z=" << Z-1 << ",A="
<< A-1 << " element isn't in G4NucP" << G4endl;
}
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
{
G4cerr<<"G4PhotoNucCrossSect.hh::ThreshEn:Z="<<Z<<",A="<<A-1<<" element isn't in G4NuP"<<G4endl;
}
G4double dP= mP+mProt-mT;
G4double dN= mN+mNeut-mT;
if(dP<dN)dN=dP;
return dN;
}
#endif
@@ -104,6 +104,7 @@ private:
G4double aPower;
G4double elow;
G4double elowest;
G4double APower[92];
const G4ParticleDefinition* piPlus;
const G4ParticleDefinition* piMinus;