Import Geant4 10.7.0 source tree
This commit is contained in:
@@ -24,8 +24,10 @@ CPPFLAGS += -I$(G4BASE)/global/management/include \
|
||||
-I$(G4BASE)/particles/hadrons/mesons/include \
|
||||
-I$(G4BASE)/particles/hadrons/barions/include \
|
||||
-I$(G4BASE)/particles/hadrons/ions/include \
|
||||
-I$(G4BASE)/processes/electromagnetic/utils/include \
|
||||
-I$(G4BASE)/processes/hadronic/cross_sections/include \
|
||||
-I$(G4BASE)/processes/hadronic/management/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/de_excitation/management/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/management/include \
|
||||
-I$(G4BASE)/processes/hadronic/util/include \
|
||||
-I$(G4BASE)/processes/management/include \
|
||||
|
||||
@@ -12,6 +12,44 @@ introduced in the code and keeptrack of all tags.
|
||||
----------------------------------------------------------
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
09-October-2020, Gabriele Cosmo (phys-util-V10-06-10)
|
||||
- Added new dependencies to "processes/electromagnetic/utils" and
|
||||
"processes/hadronic/models/de_excitation/management" modules in
|
||||
GNUMakefile.
|
||||
|
||||
07-October-2020, Vladimir Ivanchenko (phys-util-V10-06-09)
|
||||
- G4PhysListUtil - added utility method InitialiseParameters()
|
||||
|
||||
22-August-2020, Vladimir Ivanchenko (phys-util-V10-06-08)
|
||||
- G4HadProcesses - added optional GG nucl-nucl cross section
|
||||
|
||||
21-August-2020, Vladimir Ivanchenko (phys-util-V10-06-07)
|
||||
- G4HadProcesses - use G4PhysListUtil to access processes
|
||||
- G4PhysListUtil - added method to access elastic x-section
|
||||
|
||||
24-July-2020, Alberto Ribon (phys-util-V10-06-06)
|
||||
- G4HadParticles : removed eta and eta_prime from the list of
|
||||
charmed and bottom hadrons; removed the short-lived hadrons
|
||||
(Sigma0, etac, JPsi, SigmaC++, SigmaC+, SigmaC0, Upsilon,
|
||||
SigmaB+, SigmaB0, SigmaB-) whose hadronic interactions can be
|
||||
neglected (consistently with what is done currently in Geant4
|
||||
for pi0 and Sigma0) because they decay too quickly.
|
||||
|
||||
19-July-2020, Vladimir Ivanchenko (phys-util-V10-06-05)
|
||||
- G4HadParticles - subdivide for different methods hyperons and
|
||||
anti-hyperons
|
||||
|
||||
11-July-2020, Vladimir Ivanchenko (phys-util-V10-06-04)
|
||||
- G4HadProcesses - new utility class providing access to hadronic
|
||||
processes and addition of a cross section per particle type
|
||||
and hadronic process; Using this class it is possible to
|
||||
customise hadronic cross sections
|
||||
|
||||
01-July-2020, Vladimir Ivanchenko (phys-util-V10-06-03)
|
||||
- G4HadParticles - separated light anti-particles to the extra
|
||||
vector and added extra access method
|
||||
|
||||
28-May-2020 Ben Morgan (phys-util-V10-06-02)
|
||||
- Remove obsolete GRANULAR_DEPENDENCIES entries
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
//
|
||||
// Author V.Ivanchenko 09.05.2020
|
||||
//
|
||||
// Collections of pahadrons
|
||||
// Collections of hadrons pdg codes
|
||||
//
|
||||
|
||||
#ifndef G4HadParticles_h
|
||||
@@ -44,9 +44,11 @@ public:
|
||||
// several vectors of PDG codes for hadron physics
|
||||
static const std::vector<G4int>& GetLightHadrons();
|
||||
static const std::vector<G4int>& GetHyperons();
|
||||
static const std::vector<G4int>& GetAntiHyperons();
|
||||
static const std::vector<G4int>& GetKaons();
|
||||
static const std::vector<G4int>& GetBCHadrons();
|
||||
static const std::vector<G4int>& GetLightIons();
|
||||
static const std::vector<G4int>& GetLightAntiIons();
|
||||
|
||||
// several vectors of PDG codes for EM physics
|
||||
static const std::vector<G4int>& GetHeavyChargedParticles();
|
||||
@@ -56,9 +58,11 @@ private:
|
||||
|
||||
static const std::vector<G4int> sLightHadrons;
|
||||
static const std::vector<G4int> sHyperons;
|
||||
static const std::vector<G4int> sAntiHyperons;
|
||||
static const std::vector<G4int> sKaons;
|
||||
static const std::vector<G4int> sBCHadrons;
|
||||
static const std::vector<G4int> sLightIons;
|
||||
static const std::vector<G4int> sLightAntiIons;
|
||||
static const std::vector<G4int> sHeavyChargedPart;
|
||||
static const std::vector<G4int> sBCChargedHadrons;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// ClassName: G4HadProcesses
|
||||
//
|
||||
// Author: 8 July 2020 V.Ivanchenko
|
||||
//
|
||||
// Modified:
|
||||
//
|
||||
// Description: access to hadronic processes via particle name or pointer
|
||||
// access or addition of hadronic cross sections
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
#ifndef G4HadProcesses_h
|
||||
#define G4HadProcesses_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4HadronicProcess.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4CrossSectionInelastic.hh"
|
||||
#include "G4CrossSectionElastic.hh"
|
||||
|
||||
class G4VCrossSectionDataSet;
|
||||
|
||||
class G4HadProcesses
|
||||
{
|
||||
public:
|
||||
|
||||
// convert name to pointer
|
||||
static const G4ParticleDefinition* FindParticle(const G4String&);
|
||||
|
||||
// access to a process
|
||||
static G4HadronicProcess* FindInelasticProcess(const G4ParticleDefinition*);
|
||||
static G4HadronicProcess* FindInelasticProcess(const G4String&);
|
||||
|
||||
static G4HadronicProcess* FindElasticProcess(const G4ParticleDefinition*);
|
||||
static G4HadronicProcess* FindElasticProcess(const G4String&);
|
||||
|
||||
static G4HadronicProcess* FindCaptureProcess();
|
||||
|
||||
static G4HadronicProcess* FindFissionProcess();
|
||||
|
||||
// access to cross section by the component name
|
||||
static G4CrossSectionInelastic* InelasticXS(const G4String& componentName);
|
||||
static G4CrossSectionElastic* ElasticXS(const G4String& componentName);
|
||||
|
||||
// add extra data set to a particle
|
||||
static G4bool AddInelasticCrossSection(const G4ParticleDefinition*, G4VCrossSectionDataSet*);
|
||||
static G4bool AddInelasticCrossSection(const G4String&, G4VCrossSectionDataSet*);
|
||||
|
||||
static G4bool AddElasticCrossSection(const G4ParticleDefinition*, G4VCrossSectionDataSet*);
|
||||
static G4bool AddElasticCrossSection(const G4String&, G4VCrossSectionDataSet*);
|
||||
|
||||
static G4bool AddCaptureCrossSection(G4VCrossSectionDataSet*);
|
||||
|
||||
static G4bool AddFissionCrossSection(G4VCrossSectionDataSet*);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -47,8 +47,12 @@ class G4PhysListUtil
|
||||
{
|
||||
public:
|
||||
|
||||
static void InitialiseParameters();
|
||||
|
||||
static G4HadronicProcess* FindInelasticProcess(const G4ParticleDefinition*);
|
||||
|
||||
static G4HadronicProcess* FindElasticProcess(const G4ParticleDefinition*);
|
||||
|
||||
static G4HadronicProcess* FindCaptureProcess(const G4ParticleDefinition*);
|
||||
|
||||
static G4HadronicProcess* FindFissionProcess(const G4ParticleDefinition*);
|
||||
|
||||
@@ -14,93 +14,19 @@
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# List external includes needed.
|
||||
include_directories(${CLHEP_INCLUDE_DIRS})
|
||||
include_directories(${EXPAT_INCLUDE_DIRS})
|
||||
|
||||
# List internal includes needed.
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/digits_hits/digits/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/digits_hits/hits/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/event/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/magneticfield/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/navigation/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/volumes/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPGeometry/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPRandom/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/intercoms/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/materials/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/bosons/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/hadrons/barions/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/hadrons/ions/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/hadrons/mesons/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/leptons/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/shortlived/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/physics_lists/builders/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/cuts/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/decay/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/highenergy/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/lowenergy/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/muons/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/standard/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/utils/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/electromagnetic/xrays/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/cross_sections/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/binary_cascade/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/cascade/cascade/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/coherent_elastic/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/de_excitation/evaporation/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/de_excitation/fermi_breakup/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/de_excitation/fission/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/de_excitation/gem_evaporation/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/de_excitation/handler/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/de_excitation/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/de_excitation/multifragmentation/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/de_excitation/photon_evaporation/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/de_excitation/util/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/im_r_matrix/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/inclxx/utils/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/inclxx/incl_physics/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/inclxx/interface/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/lend/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/lepto_nuclear/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/particle_hp/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/parton_string/diffraction/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/parton_string/hadronization/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/parton_string/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/parton_string/qgsm/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/pre_equilibrium/exciton_model/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/radioactive_decay/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/theo_high_energy/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/models/util/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/processes/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/stopping/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/util/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/hadronic/util/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/optical/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/transportation/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/run/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/track/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/tracking/include)
|
||||
|
||||
#
|
||||
# Define the Geant4 Module.
|
||||
#
|
||||
include(Geant4MacroDefineModule)
|
||||
GEANT4_DEFINE_MODULE(NAME G4physlist_util
|
||||
HEADERS
|
||||
CompileTimeConstraints.hh
|
||||
G4HadParticles.hh
|
||||
G4HadProcesses.hh
|
||||
G4PhysListUtil.hh
|
||||
G4WarnPLStatus.hh
|
||||
SOURCES
|
||||
G4HadParticles.cc
|
||||
G4HadProcesses.cc
|
||||
G4PhysListUtil.cc
|
||||
G4WarnPLStatus.cc
|
||||
GRANULAR_DEPENDENCIES
|
||||
@@ -159,7 +85,6 @@ GEANT4_DEFINE_MODULE(NAME G4physlist_util
|
||||
G4navigation
|
||||
G4optical
|
||||
G4partman
|
||||
G4phys_builders
|
||||
G4procman
|
||||
G4run
|
||||
G4shortlived
|
||||
|
||||
@@ -31,15 +31,21 @@
|
||||
|
||||
#include "G4HadParticles.hh"
|
||||
|
||||
// p, n, pi+, pi-, pbar, nbar
|
||||
// p, n, pi+, pi-
|
||||
const std::vector<G4int> G4HadParticles::sLightHadrons = {
|
||||
2212, 2112, 211, -211, -2212, -2112
|
||||
2212, 2112, 211, -211
|
||||
};
|
||||
|
||||
// Lambda, Sigma+, Sigma0, Sigma-, Xi0, Xi-, Omega-, anti_hyperons
|
||||
// Lambda, Sigma+, Sigma-, Xi0, Xi-, Omega-
|
||||
// (note that Sigma0 has not been included because it decays very quickly)
|
||||
const std::vector<G4int> G4HadParticles::sHyperons = {
|
||||
3122, 3222, 3212, 3112, 3322, 3312, 3334,
|
||||
-3122, -3222, -3212, -3112, -3322, -3312, -3334
|
||||
3122, 3222, 3112, 3322, 3312, 3334
|
||||
};
|
||||
|
||||
// anti_Lambda, anti_Sigma+, anti_Sigma-, anti_Xi0, anti_Xi-, anti_Omega-
|
||||
// (note that anti_Sigma0 has not been included because it decays very quickly)
|
||||
const std::vector<G4int> G4HadParticles::sAntiHyperons = {
|
||||
-3122, -3222, -3112, -3322, -3312, -3334
|
||||
};
|
||||
|
||||
// K+, K-, KS, KL
|
||||
@@ -47,26 +53,32 @@ const std::vector<G4int> G4HadParticles::sKaons = {
|
||||
321, -321, 310, 130
|
||||
};
|
||||
|
||||
// Note: etac, JPsi, SigmaC++, SigmaC+, SigmaC0, Upsilon,
|
||||
// SigmaB+, SigmaB0, SigmaB- are not included because
|
||||
// they decay very quickly (therefore, their hadronic
|
||||
// interactions can be neglected, as for pi0 and Sigma0).
|
||||
const std::vector<G4int> G4HadParticles::sBCHadrons = {
|
||||
// D+, D0, D-, D0bar, Ds+, Ds-
|
||||
411, 421, -411, -421, 431, -431,
|
||||
// B+, B0, B-, B0bar, Bs0, Bs0bar, Bc+, Bc-,
|
||||
521, 511, -521, -511, 531, -531, 541, -541,
|
||||
// eta, eta', etaC, JPsi, Upsilon
|
||||
221, 331, 441, 443, 553,
|
||||
// LambdaC+, SigmaC++, SigmaC+, SigmaC0, XiC+, XiC0, OmegaC0
|
||||
4122, 4222, 4212, 4112, 4232, 4132, 4332,
|
||||
// LambdaB, SigmaB+, SigmaB0, SigmaB-, XiB0, XiB-, OmegaB-
|
||||
5122, 5222, 5212, 5112, 5232, 5132, 5332,
|
||||
// anti_baryons
|
||||
-4122, -4222, -4212, -4112, -4232, -4132, -4332,
|
||||
-5122, -5222, -5212, -5112, -5232, -5132, -5332
|
||||
// LambdaC+, XiC+, XiC0, OmegaC0
|
||||
4122, 4232, 4132, 4332,
|
||||
// LambdaB, XiB0, XiB-, OmegaB-
|
||||
5122, 5232, 5132, 5332,
|
||||
// corresponding anti_baryons
|
||||
-4122, -4232, -4132, -4332,
|
||||
-5122, -5232, -5132, -5332
|
||||
};
|
||||
|
||||
// d, t, He3, alpha, anti-ions
|
||||
// d, t, He3, alpha
|
||||
const std::vector<G4int> G4HadParticles::sLightIons = {
|
||||
1000010020, 1000010030, 1000020030, 1000020040,
|
||||
-1000010020, -1000010030, -1000020030, -1000020040,
|
||||
1000010020, 1000010030, 1000020030, 1000020040
|
||||
};
|
||||
|
||||
// pbar, nbar, light anti-ions
|
||||
const std::vector<G4int> G4HadParticles::sLightAntiIons = {
|
||||
-2212, -2112, -1000010020, -1000010030, -1000020030, -1000020040
|
||||
};
|
||||
|
||||
// charged particles for EM physics
|
||||
@@ -102,6 +114,11 @@ const std::vector<G4int>& G4HadParticles::GetHyperons()
|
||||
return sHyperons;
|
||||
}
|
||||
|
||||
const std::vector<G4int>& G4HadParticles::GetAntiHyperons()
|
||||
{
|
||||
return sAntiHyperons;
|
||||
}
|
||||
|
||||
const std::vector<G4int>& G4HadParticles::GetKaons()
|
||||
{
|
||||
return sKaons;
|
||||
@@ -117,6 +134,11 @@ const std::vector<G4int>& G4HadParticles::GetLightIons()
|
||||
return sLightIons;
|
||||
}
|
||||
|
||||
const std::vector<G4int>& G4HadParticles::GetLightAntiIons()
|
||||
{
|
||||
return sLightAntiIons;
|
||||
}
|
||||
|
||||
const std::vector<G4int>& G4HadParticles::GetHeavyChargedParticles()
|
||||
{
|
||||
return sHeavyChargedPart;
|
||||
|
||||
@@ -0,0 +1,172 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// ClassName: G4HadProcesses
|
||||
//
|
||||
// Author: 8 July 2020 V.Ivanchenko
|
||||
//
|
||||
// Modified:
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
|
||||
#include "G4HadProcesses.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4PhysListUtil.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "G4Neutron.hh"
|
||||
#include "G4CrossSectionDataSetRegistry.hh"
|
||||
#include "G4VCrossSectionDataSet.hh"
|
||||
#include "G4ComponentGGHadronNucleusXsc.hh"
|
||||
#include "G4ComponentGGNuclNuclXsc.hh"
|
||||
#include "G4ComponentAntiNuclNuclearXS.hh"
|
||||
|
||||
const G4ParticleDefinition* G4HadProcesses::FindParticle(const G4String& pname)
|
||||
{
|
||||
return G4ParticleTable::GetParticleTable()->FindParticle(pname);
|
||||
}
|
||||
|
||||
G4HadronicProcess* G4HadProcesses::FindInelasticProcess(const G4ParticleDefinition* ptr)
|
||||
{
|
||||
return G4PhysListUtil::FindInelasticProcess(ptr);
|
||||
}
|
||||
|
||||
G4HadronicProcess* G4HadProcesses::FindInelasticProcess(const G4String& pname)
|
||||
{
|
||||
return FindInelasticProcess( FindParticle(pname) );
|
||||
}
|
||||
|
||||
G4HadronicProcess* G4HadProcesses::FindElasticProcess(const G4ParticleDefinition* ptr)
|
||||
{
|
||||
return G4PhysListUtil::FindElasticProcess(ptr);
|
||||
}
|
||||
|
||||
G4HadronicProcess* G4HadProcesses::FindElasticProcess(const G4String& pname)
|
||||
{
|
||||
return FindElasticProcess( FindParticle(pname) );
|
||||
}
|
||||
|
||||
G4HadronicProcess* G4HadProcesses::FindCaptureProcess()
|
||||
{
|
||||
return G4PhysListUtil::FindCaptureProcess(G4Neutron::Neutron());
|
||||
}
|
||||
|
||||
G4HadronicProcess* G4HadProcesses::FindFissionProcess()
|
||||
{
|
||||
return G4PhysListUtil::FindFissionProcess(G4Neutron::Neutron());
|
||||
}
|
||||
|
||||
G4CrossSectionInelastic* G4HadProcesses::InelasticXS(const G4String& compName)
|
||||
{
|
||||
G4CrossSectionInelastic* xs = nullptr;
|
||||
auto comp = G4CrossSectionDataSetRegistry::Instance()->GetComponentCrossSection(compName);
|
||||
if( comp != nullptr ) {
|
||||
xs = new G4CrossSectionInelastic(comp);
|
||||
} else if( "Glauber-Gribov" == compName ) {
|
||||
xs = new G4CrossSectionInelastic(new G4ComponentGGHadronNucleusXsc());
|
||||
} else if( "Glauber-Gribov Nucl-nucl" == compName ) {
|
||||
xs = new G4CrossSectionInelastic(new G4ComponentGGNuclNuclXsc());
|
||||
} else if( "AntiAGlauber" == compName ) {
|
||||
xs = new G4CrossSectionInelastic(new G4ComponentAntiNuclNuclearXS());
|
||||
}
|
||||
return xs;
|
||||
}
|
||||
|
||||
G4CrossSectionElastic* G4HadProcesses::ElasticXS(const G4String& compName)
|
||||
{
|
||||
G4CrossSectionElastic* xs = nullptr;
|
||||
auto comp = G4CrossSectionDataSetRegistry::Instance()->GetComponentCrossSection(compName);
|
||||
if( comp != nullptr ) {
|
||||
xs = new G4CrossSectionElastic(comp);
|
||||
} else if( "Glauber-Gribov" == compName ) {
|
||||
xs = new G4CrossSectionElastic(new G4ComponentGGHadronNucleusXsc());
|
||||
} else if( "Glauber-Gribov Nucl-nucl" == compName ) {
|
||||
xs = new G4CrossSectionElastic(new G4ComponentGGNuclNuclXsc());
|
||||
} else if( "AntiAGlauber" == compName ) {
|
||||
xs = new G4CrossSectionElastic(new G4ComponentAntiNuclNuclearXS());
|
||||
}
|
||||
return xs;
|
||||
}
|
||||
|
||||
G4bool G4HadProcesses::AddInelasticCrossSection(const G4ParticleDefinition* ptr,
|
||||
G4VCrossSectionDataSet* xs)
|
||||
{
|
||||
G4bool isOK(false);
|
||||
if( ptr != nullptr ) {
|
||||
G4HadronicProcess* had = FindInelasticProcess( ptr );
|
||||
if( had != nullptr ) {
|
||||
isOK = true;
|
||||
had->AddDataSet( xs );
|
||||
}
|
||||
}
|
||||
return isOK;
|
||||
}
|
||||
|
||||
G4bool G4HadProcesses::AddInelasticCrossSection(const G4String& pname, G4VCrossSectionDataSet* xs)
|
||||
{
|
||||
return AddInelasticCrossSection( FindParticle(pname), xs );
|
||||
}
|
||||
|
||||
G4bool G4HadProcesses::AddElasticCrossSection(const G4ParticleDefinition* ptr, G4VCrossSectionDataSet* xs)
|
||||
{
|
||||
G4bool isOK(false);
|
||||
if( ptr != nullptr ) {
|
||||
G4HadronicProcess* had = FindElasticProcess( ptr );
|
||||
if( had != nullptr ) {
|
||||
isOK = true;
|
||||
had->AddDataSet( xs );
|
||||
}
|
||||
}
|
||||
return isOK;
|
||||
}
|
||||
|
||||
G4bool G4HadProcesses::AddElasticCrossSection(const G4String& pname, G4VCrossSectionDataSet* xs)
|
||||
{
|
||||
return AddElasticCrossSection( FindParticle(pname), xs );
|
||||
}
|
||||
|
||||
G4bool G4HadProcesses::AddCaptureCrossSection(G4VCrossSectionDataSet* xs)
|
||||
{
|
||||
G4bool isOK(false);
|
||||
G4HadronicProcess* had = FindCaptureProcess();
|
||||
if( had != nullptr ) {
|
||||
isOK = true;
|
||||
had->AddDataSet( xs );
|
||||
}
|
||||
return isOK;
|
||||
}
|
||||
|
||||
G4bool G4HadProcesses::AddFissionCrossSection(G4VCrossSectionDataSet* xs)
|
||||
{
|
||||
G4bool isOK(false);
|
||||
G4HadronicProcess* had = FindFissionProcess();
|
||||
if( had != nullptr ) {
|
||||
isOK = true;
|
||||
had->AddDataSet( xs );
|
||||
}
|
||||
return isOK;
|
||||
}
|
||||
@@ -32,6 +32,7 @@
|
||||
// Author: 2007 Gunter Folger
|
||||
//
|
||||
// Modified:
|
||||
// 07.10.2020 V.Ivanchenko added InitialiseParameters method
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
@@ -40,6 +41,18 @@
|
||||
|
||||
#include "G4ProcessManager.hh"
|
||||
#include "G4ProcessVector.hh"
|
||||
#include "G4NistManager.hh"
|
||||
#include "G4EmParameters.hh"
|
||||
#include "G4HadronicParameters.hh"
|
||||
#include "G4NuclearLevelData.hh"
|
||||
|
||||
void G4PhysListUtil::InitialiseParameters()
|
||||
{
|
||||
G4NistManager::Instance();
|
||||
G4EmParameters::Instance()->SetDefaults();
|
||||
G4HadronicParameters::Instance();
|
||||
G4NuclearLevelData::GetInstance();
|
||||
}
|
||||
|
||||
G4HadronicProcess*
|
||||
G4PhysListUtil::FindInelasticProcess(const G4ParticleDefinition* p)
|
||||
@@ -49,8 +62,27 @@ G4PhysListUtil::FindInelasticProcess(const G4ParticleDefinition* p)
|
||||
G4ProcessVector* pvec = p->GetProcessManager()->GetProcessList();
|
||||
size_t n = pvec->size();
|
||||
for(size_t i=0; i<n; ++i) {
|
||||
if(fHadronInelastic == ((*pvec)[i])->GetProcessSubType()) {
|
||||
had = static_cast<G4HadronicProcess*>((*pvec)[i]);
|
||||
auto proc = (*pvec)[i];
|
||||
if(proc != nullptr && fHadronInelastic == proc->GetProcessSubType()) {
|
||||
had = static_cast<G4HadronicProcess*>(proc);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return had;
|
||||
}
|
||||
|
||||
G4HadronicProcess*
|
||||
G4PhysListUtil::FindElasticProcess(const G4ParticleDefinition* p)
|
||||
{
|
||||
G4HadronicProcess* had = nullptr;
|
||||
if(p) {
|
||||
G4ProcessVector* pvec = p->GetProcessManager()->GetProcessList();
|
||||
size_t n = pvec->size();
|
||||
for(size_t i=0; i<n; ++i) {
|
||||
auto proc = (*pvec)[i];
|
||||
if(proc != nullptr && fHadronElastic == proc->GetProcessSubType()) {
|
||||
had = static_cast<G4HadronicProcess*>(proc);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -66,8 +98,9 @@ G4PhysListUtil::FindCaptureProcess(const G4ParticleDefinition* p)
|
||||
G4ProcessVector* pvec = p->GetProcessManager()->GetProcessList();
|
||||
size_t n = pvec->size();
|
||||
for(size_t i=0; i<n; ++i) {
|
||||
if(fCapture == ((*pvec)[i])->GetProcessSubType()) {
|
||||
had = static_cast<G4HadronicProcess*>((*pvec)[i]);
|
||||
auto proc = (*pvec)[i];
|
||||
if(proc != nullptr && fCapture == proc->GetProcessSubType()) {
|
||||
had = static_cast<G4HadronicProcess*>(proc);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -83,8 +116,9 @@ G4PhysListUtil::FindFissionProcess(const G4ParticleDefinition* p)
|
||||
G4ProcessVector* pvec = p->GetProcessManager()->GetProcessList();
|
||||
size_t n = pvec->size();
|
||||
for(size_t i=0; i<n; ++i) {
|
||||
if(fFission == ((*pvec)[i])->GetProcessSubType()) {
|
||||
had = static_cast<G4HadronicProcess*>((*pvec)[i]);
|
||||
auto proc = (*pvec)[i];
|
||||
if(proc != nullptr && fFission == proc->GetProcessSubType()) {
|
||||
had = static_cast<G4HadronicProcess*>(proc);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user