Import Geant4 10.7.0 source tree

This commit is contained in:
Gabriele Cosmo
2020-12-04 12:30:43 +01:00
parent 67ba86d073
commit dab42d2018
3770 changed files with 226369 additions and 286486 deletions
@@ -86,7 +86,7 @@ private:
std::vector<G4double*>* LEN; // Vector of pointers to LowEnProtonCrossSection
std::vector<G4double*>* HEN; // Vector of pointers to HighEnProtonCrossSection
G4int j; // A#0f Z/N-records already tested in AMDB
G4int j=0; // A#0f Z/N-records already tested in AMDB
std::vector <G4int> colN; // Vector of N for calculated nuclei (isotops)
std::vector <G4int> colZ; // Vector of Z for calculated nuclei (isotops)
std::vector <G4double> colP; // Vector of last momenta for the reaction
@@ -88,7 +88,7 @@ private:
std::vector<G4double*>* LEN; // Vector of pointers to LowEnProtonCrossSection
std::vector<G4double*>* HEN; // Vector of pointers to HighEnProtonCrossSection
G4int j; // A#0f Z/N-records already tested in AMDB
G4int j=0; // A#0f Z/N-records already tested in AMDB
std::vector <G4int> colN; // Vector of N for calculated nuclei (isotops)
std::vector <G4int> colZ; // Vector of Z for calculated nuclei (isotops)
std::vector <G4double> colP; // Vector of last momenta for the reaction
@@ -89,7 +89,7 @@ private:
std::vector<G4double*>* LEN; // Vector of pointers to LowEnProtonCrossSection
std::vector<G4double*>* HEN; // Vector of pointers to HighEnProtonCrossSection
//
G4int j; // A#0f Z/N-records already tested in AMDB
G4int j=0; // A#0f Z/N-records already tested in AMDB
std::vector <G4int> colN; // Vector of N for calculated nuclei (isotops)
std::vector <G4int> colZ; // Vector of Z for calculated nuclei (isotops)
std::vector <G4double> colP; // Vector of last momenta for the reaction
@@ -81,11 +81,11 @@ private:
G4double EquLinearFit(G4double X, G4int N, G4double X0, G4double DX, G4double* Y);
// Body
private:
G4double lastSig; // Last value of the Cross Section
G4double lastSig=0.; // Last value of the Cross Section
G4double* lastLEN; // Pointer to the last array of LowEnergy cross sections
G4double* lastHEN; // Pointer to the last array of HighEnergy cross sections
G4double lastE; // Last used in the cross section Energy
G4int lastPDG; // The last projectile PDG
G4double lastE=0.; // Last used in the cross section Energy
G4int lastPDG=0; // The last projectile PDG
G4int lastN; // The last N of calculated nucleus
G4int lastZ; // The last Z of calculated nucleus
G4double lastP; // Last used in the cross section Momentum
@@ -95,7 +95,7 @@ private:
std::vector<G4double*>* LEN; // Vector of pointers to LowEnProtonCrossSection
std::vector<G4double*>* HEN; // Vector of pointers to HighEnProtonCrossSection
G4int j; // A#0f Z/N-records already tested in AMDB
G4int j=0; // A#0f Z/N-records already tested in AMDB
std::vector <G4int> colN; // Vector of N for calculated nuclei (isotops)
std::vector <G4int> colZ; // Vector of Z for calculated nuclei (isotops)
std::vector <G4double> colP; // Vector of last momenta for the reaction
@@ -93,7 +93,7 @@ private:
std::vector<G4double*>* LEN; // Vector of pointers to LowEnNeutronCrossSection
std::vector<G4double*>* HEN; // Vector of pointers to HighEnNeutronCrossSection
G4int j; // A#0f Z/N-records already tested in AMDB
G4int j=0; // A#0f Z/N-records already tested in AMDB
std::vector <G4int> colN; // Vector of N for calculated nuclei (isotops)
std::vector <G4int> colZ; // Vector of Z for calculated nuclei (isotops)
std::vector <G4double> colP; // Vector of last momenta for the reaction
@@ -80,11 +80,11 @@ private:
G4double EquLinearFit(G4double X, G4int N, G4double X0, G4double DX, G4double* Y);
// Body
private:
G4double lastSig; // Last value of the Cross Section
G4double lastSig=0.; // Last value of the Cross Section
G4double* lastLEN; // Pointer to the last array of LowEnergy cross sections
G4double* lastHEN; // Pointer to the last array of HighEnergy cross sections
G4double lastE; // Last used in the cross section Energy
G4int lastPDG; // The last projectile PDG
G4double lastE=0.; // Last used in the cross section Energy
G4int lastPDG=0; // The last projectile PDG
G4int lastN; // The last N of calculated nucleus
G4int lastZ; // The last Z of calculated nucleus
G4double lastP; // Last used in the cross section Momentum
@@ -94,7 +94,7 @@ private:
std::vector<G4double*>* LEN; // Vector of pointers to LowEnProtonCrossSection
std::vector<G4double*>* HEN; // Vector of pointers to HighEnProtonCrossSection
G4int j; // A#0f Z/N-records already tested in AMDB
G4int j=0; // A#0f Z/N-records already tested in AMDB
std::vector <G4int> colN; // Vector of N for calculated nuclei (isotops)
std::vector <G4int> colZ; // Vector of Z for calculated nuclei (isotops)
std::vector <G4double> colP; // Vector of last momenta for the reaction
@@ -82,11 +82,11 @@ private:
G4double EquLinearFit(G4double X, G4int N, G4double X0, G4double DX, G4double* Y);
// Body
private:
G4double lastSig; // Last value of the Cross Section
G4double lastSig=0.; // Last value of the Cross Section
G4double* lastLEN; // Pointer to the last array of LowEnergy cross sections
G4double* lastHEN; // Pointer to the last array of HighEnergy cross sections
G4double lastE; // Last used in the cross section Energy
G4int lastPDG; // The last projectile PDG
G4double lastE=0.; // Last used in the cross section Energy
G4int lastPDG=0; // The last projectile PDG
G4int lastN; // The last N of calculated nucleus
G4int lastZ; // The last Z of calculated nucleus
G4double lastP; // Last used in the cross section Momentum
@@ -96,7 +96,7 @@ private:
std::vector<G4double*>* LEN; // Vector of pointers to LowEnProtonCrossSection
std::vector<G4double*>* HEN; // Vector of pointers to HighEnProtonCrossSection
G4int j; // A#0f Z/N-records already tested in AMDB
G4int j=0; // A#0f Z/N-records already tested in AMDB
std::vector <G4int> colN; // Vector of N for calculated nuclei (isotops)
std::vector <G4int> colZ; // Vector of Z for calculated nuclei (isotops)
std::vector <G4double> colP; // Vector of last momenta for the reaction
@@ -88,7 +88,7 @@ private:
std::vector<G4double*>* LEN; // Vector of pointers to LowEnProtonCrossSection
std::vector<G4double*>* HEN; // Vector of pointers to HighEnProtonCrossSection
G4int j; // A#0f Z/N-records already tested in AMDB
G4int j=0; // A#0f Z/N-records already tested in AMDB
std::vector <G4int> colN; // Vector of N for calculated nuclei (isotops)
std::vector <G4int> colZ; // Vector of Z for calculated nuclei (isotops)
std::vector <G4double> colP; // Vector of last momenta for the reaction
@@ -0,0 +1,122 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
// -------------------------------------------------------------------
//
// GEANT4 Class header file
//
//
// File name: G4GammaNuclearXS
//
// Author V.Ivantchenko, Geant4, 22 October 2020
//
// Class Description:
// This is a base class for gamma-nuclear cross section based on
// data files from G4PARTICLEXSDATA data set
// Class Description - End
#ifndef G4GammaNuclearXS_h
#define G4GammaNuclearXS_h 1
#include "G4VCrossSectionDataSet.hh"
#include "globals.hh"
#include "G4PhysicsVector.hh"
#include "G4Threading.hh"
#include <vector>
const G4int MAXZEL = 93;
class G4DynamicParticle;
class G4ParticleDefinition;
class G4Element;
class G4GammaNuclearXS final : public G4VCrossSectionDataSet
{
public:
explicit G4GammaNuclearXS();
~G4GammaNuclearXS() final;
static const char* Default_Name() {return "G4GammaNuclearXS";}
G4bool IsElementApplicable(const G4DynamicParticle*,
G4int Z, const G4Material*) final;
G4bool IsIsoApplicable(const G4DynamicParticle*, G4int Z, G4int A,
const G4Element*, const G4Material* mat) final;
G4double GetElementCrossSection(const G4DynamicParticle*,
G4int Z, const G4Material* mat) final;
G4double GetIsoCrossSection(const G4DynamicParticle*, G4int Z, G4int A,
const G4Isotope* iso,
const G4Element* elm,
const G4Material* mat) final;
const G4Isotope* SelectIsotope(const G4Element*,
G4double kinEnergy, G4double logE) final;
void BuildPhysicsTable(const G4ParticleDefinition&) final;
void CrossSectionDescription(std::ostream&) const final;
G4GammaNuclearXS & operator=(const G4GammaNuclearXS &right) = delete;
G4GammaNuclearXS(const G4GammaNuclearXS&) = delete;
private:
void Initialise(G4int Z);
void InitialiseOnFly(G4int Z);
const G4String& FindDirectoryPath();
inline G4PhysicsVector* GetPhysicsVector(G4int Z);
G4VCrossSectionDataSet* ggXsection;
const G4ParticleDefinition* gamma;
static G4PhysicsVector* data[MAXZEL];
static G4double coeff[MAXZEL];
static G4String gDataDirectory;
G4bool isMaster;
#ifdef G4MULTITHREADED
static G4Mutex gNuclearXSMutex;
#endif
};
inline
G4PhysicsVector* G4GammaNuclearXS::GetPhysicsVector(G4int Z)
{
if(nullptr == data[Z]) { InitialiseOnFly(Z); }
return data[Z];
}
#endif
@@ -58,31 +58,49 @@ class G4IonProtonCrossSection : public G4VCrossSectionDataSet
{
public:
G4IonProtonCrossSection();
explicit G4IonProtonCrossSection();
virtual ~G4IonProtonCrossSection();
~G4IonProtonCrossSection() override;
G4double GetProtonCrossSection(G4double kinEnergy, G4int Z);
G4double GetProtonCrossSection(const G4DynamicParticle*, G4int Z);
G4double GetDeuteronCrossSection(const G4DynamicParticle*, G4int Z);
G4double GetTritonCrossSection(const G4DynamicParticle*, G4int Z);
G4double GetHe3CrossSection(const G4DynamicParticle*, G4int Z);
G4double GetAlphaCrossSection(const G4DynamicParticle*, G4int Z);
virtual
G4bool IsElementApplicable(const G4DynamicParticle* aPart, G4int Z,
const G4Material*);
const G4Material*) override;
G4bool IsIsoApplicable(const G4DynamicParticle*, G4int Z, G4int A,
const G4Element* elm = nullptr,
const G4Material* mat = nullptr) override;
virtual
G4double GetElementCrossSection(const G4DynamicParticle* aPart,
G4int Z, const G4Material*);
G4int Z, const G4Material*) override;
virtual
void BuildPhysicsTable(const G4ParticleDefinition&);
G4double GetIsoCrossSection(const G4DynamicParticle*, G4int Z, G4int A,
const G4Isotope* iso = nullptr,
const G4Element* elm = nullptr,
const G4Material* mat = nullptr) override;
virtual void CrossSectionDescription(std::ostream&) const;
void BuildPhysicsTable(const G4ParticleDefinition&) override;
void CrossSectionDescription(std::ostream&) const override;
private: // Without Description
G4IonProtonCrossSection & operator=(const G4IonProtonCrossSection &right);
G4IonProtonCrossSection(const G4IonProtonCrossSection&);
G4ParticleInelasticXS* theForward;
G4ParticleInelasticXS* xsProton;
G4ParticleInelasticXS* xsDeuteron;
G4ParticleInelasticXS* xsTriton;
G4ParticleInelasticXS* xsHe3;
G4ParticleInelasticXS* xsAlpha;
};
@@ -0,0 +1,78 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// -------------------------------------------------------------------
//
// GEANT4 Class header file
//
//
// File name: G4IsotopeList
//
// Author V. Ivantchenko, 22 October 2020
//
#ifndef G4IsotopeList_h
#define G4IsotopeList_h 1
static const G4int amin[] = {
0,
1, 3, 6, 9, 10, 12, 14, 16, 19, 20, //1-10
23, 24, 27, 28, 31, 32, 35, 36, 39, 40, //11-20
45, 46, 50, 50, 55, 54, 59, 58, 63, 64, //21-30
69, 70, 75, 0, 0, 78, 0, 0, 89, 90, //31-40
0, 92, 0, 0, 0, 102, 107, 106, 113, 112, //41-50
0, 0, 127, 0, 133, 130, 0, 0, 0, 0, //51-60
0, 0, 0, 152, 0, 0, 0, 0, 0, 168, //61-70
0, 0, 180, 180, 0, 0, 0, 190, 197, 0, //71-80
203, 204, 209, 0, 0, 0, 0, 0, 0, 0, //81-90
0, 234};
static const G4int amax[] = {
0,
3, 4, 7, 9, 11, 13, 15, 18, 19, 22, //1-10
23, 26, 27, 30, 31, 36, 37, 40, 41, 48, //11-20
45, 50, 51, 54, 55, 58, 59, 64, 65, 70, //21-30
71, 76, 75, 0, 0, 86, 0, 0, 89, 96, //31-40
0, 100, 0, 0, 0, 110, 109, 116, 115, 124, //41-50
0, 0, 127, 0, 133, 138, 0, 0, 0, 0, //51-60
0, 0, 0, 160, 0, 0, 0, 0, 0, 176, //61-70
0, 0, 181, 186, 0, 0, 0, 198, 197, 0, //71-80
205, 208, 209, 0, 0, 0, 0, 0, 0, 0, //81-90
0, 238};
static const G4double aeff[] = {
0.,
1.00794, 4.00264, 6.94003, 9.01218, 10.811, 12.0107, 14.0068, 15.9994, 18.9984, 20.18, //1-10
22.9898, 24.305, 26.9815, 28.0854, 30.9738, 32.0661, 35.4526, 39.9477, 39.0983, 40.078, //11-20
44.9559, 47.8667, 50.9415, 51.9961, 54.938, 55.8451, 58.9332, 58.6933, 63.5456, 65.3955, //21-30
69.7231, 72.6128, 74.9216, 78.9594, 79.9035, 83.7993, 85.4677, 87.6166, 88.9058, 91.2236, //31-40
92.9064, 95.9313, 97.9072, 101.065, 102.906, 106.415, 107.868, 112.411, 114.818, 118.71, //41-50
121.76, 127.603, 126.904, 131.292, 132.905, 137.327, 138.905, 140.115, 140.908, 144.236, //51-60
144.913, 150.366, 151.964, 157.252, 158.925, 162.497, 164.93, 167.256, 168.934, 173.038, //61-70
174.967, 178.485, 180.948, 183.842, 186.207, 190.225, 192.216, 195.078, 196.967, 200.599, //71-80
204.383, 207.217, 208.98, 208.982, 209.987, 222.018, 223.02, 226.025, 227.028, 232.038, //81-90
231.036, 238.029};
#endif
@@ -46,6 +46,7 @@
#include "G4VCrossSectionDataSet.hh"
#include "globals.hh"
#include "G4ElementData.hh"
#include "G4PhysicsVector.hh"
#include "G4Threading.hh"
#include <vector>
#include <iostream>
@@ -55,7 +56,6 @@ const G4int MAXZCAPTURE = 93;
class G4DynamicParticle;
class G4ParticleDefinition;
class G4Element;
class G4PhysicsVector;
class G4NeutronCaptureXS final : public G4VCrossSectionDataSet
{
@@ -88,6 +88,11 @@ public:
void CrossSectionDescription(std::ostream&) const final;
G4double IsoCrossSection(G4double ekin, G4double logekin, G4int Z, G4int A);
G4NeutronCaptureXS & operator=(const G4NeutronCaptureXS &right) = delete;
G4NeutronCaptureXS(const G4NeutronCaptureXS&) = delete;
private:
void Initialise(G4int Z);
@@ -96,15 +101,10 @@ private:
const G4String& FindDirectoryPath();
const G4PhysicsVector* GetPhysicsVector(G4int Z);
inline const G4PhysicsVector* GetPhysicsVector(G4int Z);
G4PhysicsVector* RetrieveVector(std::ostringstream& in, G4bool warn);
G4double IsoCrossSection(G4double ekin, G4double logekin, G4int Z, G4int A);
G4NeutronCaptureXS & operator=(const G4NeutronCaptureXS &right);
G4NeutronCaptureXS(const G4NeutronCaptureXS&);
G4double emax;
G4double elimit;
G4double logElimit;
@@ -114,8 +114,6 @@ private:
G4bool isMaster;
static G4ElementData* data;
static const G4int amin[MAXZCAPTURE];
static const G4int amax[MAXZCAPTURE];
static G4String gDataDirectory;
#ifdef G4MULTITHREADED
@@ -123,4 +121,15 @@ private:
#endif
};
inline
const G4PhysicsVector* G4NeutronCaptureXS::GetPhysicsVector(G4int Z)
{
const G4PhysicsVector* pv = data->GetElementData(Z);
if(pv == nullptr) {
InitialiseOnFly(Z);
pv = data->GetElementData(Z);
}
return pv;
}
#endif
@@ -44,6 +44,7 @@
#include "G4VCrossSectionDataSet.hh"
#include "globals.hh"
#include "G4PhysicsVector.hh"
#include "G4Threading.hh"
#include <vector>
@@ -52,9 +53,7 @@ const G4int MAXZEL = 93;
class G4DynamicParticle;
class G4ParticleDefinition;
class G4Element;
class G4PhysicsVector;
class G4ComponentGGHadronNucleusXsc;
class G4NistManager;
class G4VComponentCrossSection;
class G4NeutronElasticXS final : public G4VCrossSectionDataSet
{
@@ -87,8 +86,9 @@ public:
void CrossSectionDescription(std::ostream&) const final;
G4double IsoCrossSection(G4double ekin, G4double logE, G4int Z, G4int A);
G4NeutronElasticXS & operator=(const G4NeutronElasticXS &right) = delete;
G4NeutronElasticXS(const G4NeutronElasticXS&) = delete;
private:
void Initialise(G4int Z);
@@ -97,20 +97,13 @@ private:
const G4String& FindDirectoryPath();
G4PhysicsVector* GetPhysicsVector(G4int Z);
inline G4PhysicsVector* GetPhysicsVector(G4int Z);
G4NeutronElasticXS & operator=(const G4NeutronElasticXS &right);
G4NeutronElasticXS(const G4NeutronElasticXS&);
G4NistManager* nist;
G4ComponentGGHadronNucleusXsc* ggXsection;
G4VComponentCrossSection* ggXsection;
const G4ParticleDefinition* neutron;
std::vector<G4double> temp;
static G4PhysicsVector* data[MAXZEL];
static G4double coeff[MAXZEL];
static G4double aeff[MAXZEL];
static G4String gDataDirectory;
G4bool isMaster;
@@ -120,4 +113,11 @@ private:
#endif
};
inline
G4PhysicsVector* G4NeutronElasticXS::GetPhysicsVector(G4int Z)
{
if(nullptr == data[Z]) { InitialiseOnFly(Z); }
return data[Z];
}
#endif
@@ -44,6 +44,7 @@
#include "G4VCrossSectionDataSet.hh"
#include "globals.hh"
#include "G4ElementData.hh"
#include "G4PhysicsVector.hh"
#include "G4Threading.hh"
#include <vector>
@@ -52,9 +53,7 @@ const G4int MAXZINEL = 93;
class G4DynamicParticle;
class G4ParticleDefinition;
class G4Element;
class G4PhysicsVector;
class G4ComponentGGHadronNucleusXsc;
class G4NistManager;
class G4VComponentCrossSection;
class G4NeutronInelasticXS final : public G4VCrossSectionDataSet
{
@@ -87,6 +86,11 @@ public:
void CrossSectionDescription(std::ostream&) const final;
G4double IsoCrossSection(G4double ekin, G4double logekin, G4int Z, G4int A);
G4NeutronInelasticXS & operator=(const G4NeutronInelasticXS &right) = delete;
G4NeutronInelasticXS(const G4NeutronInelasticXS&) = delete;
private:
void Initialise(G4int Z);
@@ -95,17 +99,11 @@ private:
const G4String& FindDirectoryPath();
const G4PhysicsVector* GetPhysicsVector(G4int Z);
inline const G4PhysicsVector* GetPhysicsVector(G4int Z);
G4PhysicsVector* RetrieveVector(std::ostringstream& in, G4bool warn);
G4double IsoCrossSection(G4double ekin, G4double logekin, G4int Z, G4int A);
G4NeutronInelasticXS & operator=(const G4NeutronInelasticXS &right);
G4NeutronInelasticXS(const G4NeutronInelasticXS&);
G4ComponentGGHadronNucleusXsc* ggXsection;
G4NistManager* nist;
G4VComponentCrossSection* ggXsection;
const G4ParticleDefinition* neutron;
@@ -114,10 +112,7 @@ private:
G4bool isMaster;
static G4ElementData* data;
static G4double coeff[MAXZINEL];
static G4double aeff[MAXZINEL];
static const G4int amin[MAXZINEL];
static const G4int amax[MAXZINEL];
static G4double coeff[MAXZINEL];
static G4String gDataDirectory;
#ifdef G4MULTITHREADED
@@ -125,4 +120,15 @@ private:
#endif
};
inline
const G4PhysicsVector* G4NeutronInelasticXS::GetPhysicsVector(G4int Z)
{
const G4PhysicsVector* pv = data->GetElementData(Z);
if(pv == nullptr) {
InitialiseOnFly(Z);
pv = data->GetElementData(Z);
}
return pv;
}
#endif
@@ -45,6 +45,7 @@
#include "G4VCrossSectionDataSet.hh"
#include "globals.hh"
#include "G4ElementData.hh"
#include "G4PhysicsVector.hh"
#include "G4Threading.hh"
#include <vector>
@@ -53,10 +54,7 @@ const G4int MAXZINELP = 93;
class G4DynamicParticle;
class G4ParticleDefinition;
class G4Element;
class G4PhysicsVector;
class G4ComponentGGHadronNucleusXsc;
class G4ComponentGGNuclNuclXsc;
class G4NistManager;
class G4VComponentCrossSection;
class G4ParticleInelasticXS final : public G4VCrossSectionDataSet
{
@@ -67,18 +65,19 @@ public:
~G4ParticleInelasticXS() final;
G4bool IsElementApplicable(const G4DynamicParticle*, G4int Z,
const G4Material*) final;
const G4Material* mat = nullptr) final;
G4bool IsIsoApplicable(const G4DynamicParticle*, G4int Z, G4int A,
const G4Element*, const G4Material*) final;
const G4Element* elm = nullptr,
const G4Material* mat = nullptr) final;
G4double GetElementCrossSection(const G4DynamicParticle*,
G4int Z, const G4Material* mat) final;
G4double GetElementCrossSection(const G4DynamicParticle*, G4int Z,
const G4Material* mat = nullptr) final;
G4double GetIsoCrossSection(const G4DynamicParticle*, G4int Z, G4int A,
const G4Isotope* iso,
const G4Element* elm,
const G4Material* mat) final;
const G4Isotope* iso = nullptr,
const G4Element* elm = nullptr,
const G4Material* mat = nullptr) final;
const G4Isotope* SelectIsotope(const G4Element*,
G4double kinEnergy, G4double logE) final;
@@ -89,6 +88,10 @@ public:
G4double IsoCrossSection(G4double ekin, G4double logE, G4int Z, G4int A);
G4ParticleInelasticXS & operator=
(const G4ParticleInelasticXS &right) = delete;
G4ParticleInelasticXS(const G4ParticleInelasticXS&) = delete;
private:
void Initialise(G4int Z);
@@ -97,34 +100,37 @@ private:
const G4String& FindDirectoryPath();
const G4PhysicsVector* GetPhysicsVector(G4int Z);
inline const G4PhysicsVector* GetPhysicsVector(G4int Z);
G4PhysicsVector* RetrieveVector(std::ostringstream& in, G4bool warn);
G4ParticleInelasticXS & operator=(const G4ParticleInelasticXS &right);
G4ParticleInelasticXS(const G4ParticleInelasticXS&);
G4ComponentGGHadronNucleusXsc* ggXsection;
G4ComponentGGNuclNuclXsc* nnXsection;
G4NistManager* fNist;
G4VComponentCrossSection* highEnergyXsection;
const G4ParticleDefinition* particle;
const G4ParticleDefinition* proton;
std::vector<G4double> temp;
G4bool isMaster;
G4int index;
G4bool isMaster;
static G4ElementData* data;
static G4double coeff[MAXZINELP];
static G4double aeff[MAXZINELP];
static const G4int amin[MAXZINELP];
static const G4int amax[MAXZINELP];
static G4String gDataDirectory;
static G4ElementData* data[5];
static G4double coeff[MAXZINELP][5];
static G4String gDataDirectory[5];
#ifdef G4MULTITHREADED
static G4Mutex particleInelasticXSMutex;
#endif
};
inline
const G4PhysicsVector* G4ParticleInelasticXS::GetPhysicsVector(G4int Z)
{
const G4PhysicsVector* pv = data[index]->GetElementData(Z);
if(pv == nullptr) {
InitialiseOnFly(Z);
pv = data[index]->GetElementData(Z);
}
return pv;
}
#endif
@@ -1,208 +0,0 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
#ifndef G4ProjectileFragmentCrossSection_h
#define G4ProjectileFragmentCrossSection_h 1
#include <cmath>
#include <iostream>
#include "G4Exp.hh"
#include "G4Log.hh"
#include "G4Pow.hh"
// Implements Physical Review C61, 034607 (2000)
// Rewrite starting from EPAX Version 2
class G4ProjectileFragmentCrossSection
{
public:
G4ProjectileFragmentCrossSection()
{
p_S[1] = -2.38; // scale factor for xsect in barn
p_S[2] = 0.27;
p_P[1] = -2.5840E+00; // slope of mass yield curve
p_P[2] = -7.5700E-03;
p_Delta[1] = -1.0870E+00; // centroid rel. to beta-stability
p_Delta[2] = +3.0470E-02;
p_Delta[3] = +2.1353E-04;
p_Delta[4] = +7.1350E+01;
p_R[1] = +0.885E+00; // width parameter R
p_R[2] = -9.8160E-03;
p_Un[1] = 1.65; // slope par. n-rich ride of Z distr.
p_Up[1] = 1.7880; // slope par. p-rich ride of Z distr.
p_Up[2] = +4.7210E-03;
p_Up[3] = -1.3030E-05;
p_mn[1] = 0.400; // memory effect n-rich projectiles
p_mn[2] = 0.600;
p_mp[1] = -10.25; // memory effect p-rich projectiles
p_mp[2] = +10.1;
corr_d[1] = -25.0; // correction close to proj.: centroid dzp
corr_d[2] = 0.800;
corr_r[1] = +20.0; // correction close to proj.: width R
corr_r[2] = 0.820;
corr_y[1] = 200.0; // correction close to proj.: Yield_a
corr_y[2] = 0.90;
}
inline G4double doit(G4double Ap, G4double Zp, G4double At, G4double Zt, G4double A, G4double Z)
{
// calculate mass yield
G4double Ap13 = G4Pow::GetInstance()->powA(Ap, 1./3.);
G4double At13 = G4Pow::GetInstance()->powA(At, 1./3.);
G4double S = p_S[2] * (At13 + Ap13 + p_S[1]);
// std::cout << "debug0 "<<S<<" "<<At13<<" "<<Ap13<<" "<<p_S[1]<<" "<<p_S[2]<<std::endl;
G4double p = G4Exp(p_P[2]*Ap + p_P[1]);
G4double yield_a = p * S * G4Exp(-p * (Ap - A));
// std::cout << "debug1 "<<yield_a<<std::endl;
// modification close to projectile
G4double f_mod_y=1.0;
if (A/Ap > corr_y[2])
{
f_mod_y=corr_y[1]*G4Pow::GetInstance()->powN(A/Ap-corr_y[2], 2) + 1.0;
}
yield_a= yield_a * f_mod_y;
// std::cout << "debug1 "<<yield_a<<std::endl;
// calculate maximum of charge dispersion zprob
G4double zbeta = A/(1.98+0.0155*G4Pow::GetInstance()->powA(A, (2./3.)));
G4double zbeta_p = Ap/(1.98+0.0155*G4Pow::GetInstance()->powA(Ap, (2./3.)));
G4double delta;
if(A > p_Delta[4])
{
delta = p_Delta[1] + p_Delta[2]*A;
}
else
{
delta = p_Delta[3]*A*A;
}
// modification close to projectile
G4double f_mod=1.0;
if(A/Ap > corr_d[2])
{
f_mod = corr_d[1]*G4Pow::GetInstance()->powN(A/Ap-corr_d[2], 2) + 1.0;
}
delta = delta*f_mod;
G4double zprob = zbeta+delta;
// correction for proton- and neutron-rich projectiles
G4double dq;
if((Zp-zbeta_p)>0)
{
dq = G4Exp(p_mp[1] + G4double(A)/G4double(Ap)*p_mp[2]);
// std::cout << "dq "<<A<<" "<<Ap<<" "<<p_mp[1]
// <<" "<<p_mp[2]<<" "<<dq<<" "<<p_mp[1] + A/Ap*p_mp[2]<<std::endl;
}
else
{
dq = p_mn[1]*G4Pow::GetInstance()->powN(A/Ap, 2) + p_mn[2]*G4Pow::GetInstance()->powN(A/Ap, 4);
}
zprob = zprob + dq * (Zp-zbeta_p);
// small corr. since Xe-129 and Pb-208 are not on Z_beta line
zprob = zprob + 0.0020*A;
// std::cout <<"zprob "<<A<<" "<<dq<<" "<<Zp<<" "<<zbeta_p
// <<" "<<zbeta<<" "<<delta<<std::endl;
// calculate width parameter R
G4double r = G4Exp(p_R[1] + p_R[2]*A);
// modification close to projectile
f_mod=1.0;
if (A/Ap > corr_r[2])
{
f_mod = corr_r[1]*Ap*G4Pow::GetInstance()->powN(A/Ap-corr_r[2], 4)+1.0;
}
r = r*f_mod;
// change width according to dev. from beta-stability
if ((Zp-zbeta_p) < 0.0)
{
r=r*(1.0-0.0833*std::abs(Zp-zbeta_p));
}
// calculate slope parameters u_n, u_p
G4double u_n = p_Un[1];
G4double u_p = p_Up[1] + p_Up[2]*A + p_Up[3]*A*A;
// calculate charge dispersion
G4double expo, fract;
if((zprob-Z) > 0)
{
// neutron-rich
expo = -r*G4Pow::GetInstance()->powA(std::abs(zprob-Z), u_n);
fract = G4Exp(expo)*std::sqrt(r/3.14159);
}
else
{
// proton-rich
expo = -r*G4Pow::GetInstance()->powA(std::abs(zprob-Z), u_p);
fract = G4Exp(expo)*std::sqrt(r/3.14159);
// std::cout << "1 "<<expo<<" "<<r<<" "<<zprob<<" "<<Z<<" "<<u_p<<std::endl;
// go to exponential slope
G4double dfdz = 1.2 + 0.647*G4Pow::GetInstance()->powA(A/2.,0.3);
G4double z_exp = zprob + dfdz * G4Log(10.) / (2.*r);
if( Z>z_exp )
{
expo = -r*G4Pow::GetInstance()->powA(std::abs(zprob-z_exp), u_p);
fract = G4Exp(expo)*std::sqrt(r/3.14159)
/ G4Pow::GetInstance()->powA(G4Pow::GetInstance()->powA(10, dfdz), Z-z_exp);
}
}
// std::cout << "debug "<<fract<<" "<<yield_a<<std::endl;
G4double epaxv2=fract*yield_a;
return epaxv2;
}
void testMe()
{
G4ProjectileFragmentCrossSection i;
// std::cout << i.doit(58, 28, 9, 4, 49, 28) << std::endl;
// Sigma = 9.800163E-13 b
}
private:
G4double p_S[3];
G4double p_P[3];
G4double p_Delta[5];
G4double p_R[3];
G4double p_Un[2];
G4double p_Up[4];
G4double p_mn[3];
G4double p_mp[3];
G4double corr_d[3];
G4double corr_r[3];
G4double corr_y[3];
};
#endif
@@ -39,7 +39,7 @@
//
// Class Description:
//
// An artificial cross section data set which always replys zero
// An artificial cross section data set which always replies zero
//
// -------------------------------------------------------------------
//