Import Geant4 11.3.2 source tree
This commit is contained in:
Vendored
+4
@@ -6,6 +6,10 @@ It must **not** be used as a substitute for writing good git commit messages!
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
## 2025-04-07 Gabriele Cosmo (g4tools-V11-02-06)
|
||||
- Fixed compilation errors on Windows in glarea header, triggered when enabling
|
||||
GL WIN32 support, as reported in problem report #2599.
|
||||
|
||||
## 2024-10-24 Guy Barrand (g4tools-V11-02-05)
|
||||
- wroot/file: in compress_buffer(): to fix bugzilla-2625: arrange to have a greater
|
||||
output buffer size when using deflate(), and check at end, that in case of some
|
||||
|
||||
+4
-4
@@ -50,8 +50,8 @@ class glarea {
|
||||
wc.hIcon = LoadIcon(NULL,IDI_APPLICATION);
|
||||
wc.hCursor = LoadCursor(NULL,IDC_ARROW);
|
||||
wc.hbrBackground = GetSysColorBrush(COLOR_BTNFACE);
|
||||
wc.lpszMenuName = s_class().c_str();
|
||||
wc.lpszClassName = s_class().c_str();
|
||||
wc.lpszMenuName = (PTSTR)s_class().c_str();
|
||||
wc.lpszClassName = (PTSTR)s_class().c_str();
|
||||
::RegisterClass(&wc);
|
||||
s_done = true;
|
||||
}
|
||||
@@ -79,7 +79,7 @@ public:
|
||||
::GetClientRect(m_parent,&rect);
|
||||
//printf("debug : glarea : ca : %d %d\n",rect.right-rect.left,rect.bottom-rect.top);
|
||||
//toolx::log_file::get().writef("debug : glarea : ca : %d %d\n",rect.right-rect.left,rect.bottom-rect.top);
|
||||
m_hwnd = ::CreateWindow(s_class().c_str(),
|
||||
m_hwnd = ::CreateWindow((PTSTR)s_class().c_str(),
|
||||
NULL,
|
||||
WS_CHILD | WS_VISIBLE,
|
||||
0,0,
|
||||
@@ -135,7 +135,7 @@ protected:
|
||||
register_class();
|
||||
RECT rect;
|
||||
::GetClientRect(m_parent,&rect);
|
||||
m_hwnd = ::CreateWindow(s_class().c_str(),
|
||||
m_hwnd = ::CreateWindow((PTSTR)s_class().c_str(),
|
||||
NULL,
|
||||
WS_CHILD | WS_VISIBLE,
|
||||
0,0,
|
||||
|
||||
Vendored
+8
-2
@@ -1,8 +1,14 @@
|
||||
# Category zlib History
|
||||
|
||||
See `CONTRIBUTING.rst` for details of **required** info/format for each entry,
|
||||
which **must** added in reverse chronological order (newest at the top). It must **not**
|
||||
be used as a substitute for writing good git commit messages!
|
||||
which **must** added in reverse chronological order (newest at the top).
|
||||
It must **not** be used as a substitute for writing good git commit messages!
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
## 2025-04-01 Gabriele Cosmo (zlib-V11-02-00)
|
||||
- Fix in zutil.h to remove redundant block on macOS and allow for porting
|
||||
on macOS-15.4 and clang-17.0.0.
|
||||
|
||||
## 2023-06-15 Ben Morgan (zlib-V11-01-00)
|
||||
- Import zlib 1.2.13 sources, retaining prior Geant4 patches.
|
||||
|
||||
-13
@@ -137,19 +137,6 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(MACOS) || defined(TARGET_OS_MAC)
|
||||
# define OS_CODE 7
|
||||
# ifndef Z_SOLO
|
||||
# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
|
||||
# include <unix.h> /* for fdopen */
|
||||
# else
|
||||
# ifndef fdopen
|
||||
# define fdopen(fd,mode) NULL /* No fdopen() */
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef __acorn
|
||||
# define OS_CODE 13
|
||||
#endif
|
||||
|
||||
@@ -6,6 +6,10 @@ It must **not** be used as a substitute for writing good git commit messages!
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
## 2025-03-29 Gabriele Cosmo (geommng-V11-02-08)
|
||||
- In G4GeometryManager, removed redundant declaration of method
|
||||
ChooseSequentialOptimisation().
|
||||
|
||||
## 2025-03-05 Gabriele Cosmo (geommng-V11-02-07)
|
||||
- Applied clang-tidy to G4GeometryManager and some code cleanup.
|
||||
Moved additional checks/warnings under verbosity level.
|
||||
|
||||
@@ -94,9 +94,6 @@ class G4GeometryManager
|
||||
// Detailed method for user to request parallel Optimisation
|
||||
// (if verbosity is required). Calling this is enough to ask for it.
|
||||
// It will be used if Geant4 is built with MT/tasks.
|
||||
|
||||
void ChooseSequentialOptimisation(G4bool verbose = false);
|
||||
// Simple way to avoid parallel optimisation.
|
||||
|
||||
G4bool IsParallelOptimisationConfigured();
|
||||
// Check whether parallel optimisation was requested.
|
||||
|
||||
@@ -195,15 +195,6 @@ G4GeometryManager* G4GeometryManager::GetInstanceIfExist()
|
||||
return fgInstance;
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
// Simplest user method to request parallel optimisation.
|
||||
// ***************************************************************************
|
||||
//
|
||||
void G4GeometryManager::OptimiseInParallel( G4bool val )
|
||||
{
|
||||
RequestParallelOptimisation(val);
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
// Report about Voxel(isation) of a logical volume.
|
||||
// ***************************************************************************
|
||||
@@ -476,6 +467,15 @@ void G4GeometryManager::RequestParallelOptimisation(G4bool flag, G4bool verbose)
|
||||
}
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
// Simplest user method to request parallel optimisation.
|
||||
// ***************************************************************************
|
||||
//
|
||||
void G4GeometryManager::OptimiseInParallel( G4bool val )
|
||||
{
|
||||
RequestParallelOptimisation(val);
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
// Setup up state to enable parallel optimisation by workers.
|
||||
// ***************************************************************************
|
||||
|
||||
@@ -6,6 +6,13 @@ It must **not** be used as a substitute for writing good git commit messages!
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
## 2025-04-09 Gabriele Cosmo (global-V11-02-28)
|
||||
- Updated tag IDs for geant4-11-03-patch-02.
|
||||
|
||||
## 2025-04-06 Alvaro Tolosa-Delgado
|
||||
- Add Scintillation, Cherenkov, Transition Radiation and Synchrotron Radiation
|
||||
processes to G4PhysicsModelCatalog::Initialize()
|
||||
|
||||
## 2025-03-21 Gabriele Cosmo (global-V11-02-27)
|
||||
- Updated tag IDs for geant4-11-03-patch-01.
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
/// |--> patch number (single digit)
|
||||
///
|
||||
#ifndef G4VERSION_NUMBER
|
||||
#define G4VERSION_NUMBER 1131
|
||||
#define G4VERSION_NUMBER 1132
|
||||
#endif
|
||||
|
||||
/// @def G4VERSION_REFERENCE_TAG
|
||||
@@ -59,7 +59,7 @@
|
||||
#endif
|
||||
|
||||
#ifndef G4VERSION_TAG
|
||||
#define G4VERSION_TAG "$Name: geant4-11-03-patch-01 $"
|
||||
#define G4VERSION_TAG "$Name: geant4-11-03-patch-02 $"
|
||||
#endif
|
||||
|
||||
// as variables
|
||||
@@ -68,10 +68,10 @@
|
||||
#include "G4Types.hh"
|
||||
|
||||
#ifdef G4MULTITHREADED
|
||||
static const G4String G4Version = "$Name: geant4-11-03-patch-01 [MT]$";
|
||||
static const G4String G4Version = "$Name: geant4-11-03-patch-02 [MT]$";
|
||||
#else
|
||||
static const G4String G4Version = "$Name: geant4-11-03-patch-01 $";
|
||||
static const G4String G4Version = "$Name: geant4-11-03-patch-02 $";
|
||||
#endif
|
||||
static const G4String G4Date = "(21-March-2025)";
|
||||
static const G4String G4Date = "(25-April-2025)";
|
||||
|
||||
#endif
|
||||
|
||||
@@ -602,6 +602,14 @@ void G4PhysicsModelCatalog::Initialize() {
|
||||
// Class: G4NuDEXNeutronCapture
|
||||
InsertModel( 25300, "model_nuDEX_neutronCapture" );
|
||||
|
||||
// Optical processes
|
||||
InsertModel( 12020, "model_Cerenkov" );
|
||||
InsertModel( 12030, "model_Scintillation" );
|
||||
InsertModel( 12040, "model_SynRad" );
|
||||
InsertModel( 12050, "model_SynchrotronRadiation" );
|
||||
InsertModel( 12060, "model_XTRenergyLoss" );
|
||||
InsertModel( 12070, "model_XrayTR" );
|
||||
|
||||
// ...
|
||||
|
||||
SanityCheck();
|
||||
|
||||
@@ -6,6 +6,11 @@ It must **not** be used as a substitute for writing good git commit messages!
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
## 2025-04-06 Dmitri Konstantinov (fastsimchanneling-V11-02-05)
|
||||
- In G4VChannelingFastSimCrystalData::IonizationLosses(), fixed bug
|
||||
in the electron ionization loss correction formula.
|
||||
Issue was spotted by PVS-Studio static analysis.
|
||||
|
||||
## 2024-11-11 Gabriele Cosmo (fastsimchanneling-V11-02-04)
|
||||
- Fixed compilation warnings on macOS/XCode for implicit type conversions
|
||||
in G4CoherentPairProduction.
|
||||
|
||||
@@ -530,7 +530,7 @@ G4double G4VChannelingFastSimCrystalData::IonizationLosses(G4double dz,
|
||||
{
|
||||
loge+=(-G4Log(2.) + 1
|
||||
-(2*fGamma - 1)/fGamma/fGamma*G4Log(2.) +
|
||||
1/8*((fGamma - 1)/fGamma)*((fGamma - 1)/fGamma));
|
||||
1./8.*((fGamma - 1)/fGamma)*((fGamma - 1)/fGamma));
|
||||
}
|
||||
else if(fParticleName=="e+")
|
||||
{
|
||||
|
||||
@@ -6,6 +6,18 @@ It must **not** be used as a substitute for writing good git commit messages!
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
## 2024-04-23 Alberto Ribon (phys-list-V11-02-04)
|
||||
- FTFP_BERT_ATL : removed the special FTF tune for ATLAS (introduced in
|
||||
phys-lists-V11-01-05 to overcome the problem of too optimistic (i.e. narrow)
|
||||
pion shower energy resolution).
|
||||
In this way, FTFP_BERT_ATL will use the default FTF parameters, as all other
|
||||
reference physics lists.
|
||||
In order to enable the special FTF tune for ATLAS, one can either use the
|
||||
following C++ call in user code:
|
||||
G4FTFTunings::Instance()->SetTuneApplicabilityState( 4, 1 );
|
||||
or the UI command (before run-initialization):
|
||||
/process/had/models/ftf/selectTuneByIndex 4
|
||||
|
||||
## 2024-11-04 Vladimir Ivantchenko (phys-list-V11-02-03)
|
||||
- G4PhysListFactory - use std::size_t
|
||||
|
||||
|
||||
@@ -65,11 +65,6 @@ FTFP_BERT_ATL::FTFP_BERT_ATL(G4int ver)
|
||||
defaultCutValue = 0.7*CLHEP::mm;
|
||||
SetVerboseLevel(ver);
|
||||
|
||||
// Use the 4th tunes of Fritiof (FTF) string model, meant to to overcome
|
||||
// the problem of too optimistic (i.e. narrow) pion shower energy resolutions
|
||||
// in ATLAS calorimeters with respect to test-beam data.
|
||||
G4FTFTunings::Instance()->SetTuneApplicabilityState( 4, 1 );
|
||||
|
||||
// EM Physics
|
||||
RegisterPhysics( new G4EmStandardPhysics(ver));
|
||||
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
# Category decay History
|
||||
|
||||
See `CONTRIBUTING.rst` for details of **required** info/format for each entry,
|
||||
which **must** added in reverse chronological order (newest at the top). It must **not**
|
||||
be used as a substitute for writing good git commit messages!
|
||||
which **must** added in reverse chronological order (newest at the top).
|
||||
It must **not** be used as a substitute for writing good git commit messages!
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
## 2025-04-03 Alvaro Tolosa-Delgado (decay-V11-02-00)
|
||||
- Remove approximation in calculation of G4Decay path length, fix issue #2645
|
||||
|
||||
## 2021-12-10 Ben Morgan (decay-V11-00-00)
|
||||
- Change to new Markdown History format
|
||||
|
||||
@@ -166,8 +166,6 @@ class G4Decay : public G4VRestDiscreteProcess
|
||||
// 2: More
|
||||
|
||||
protected:
|
||||
// HighestValue.
|
||||
const G4double HighestValue;
|
||||
|
||||
// Remainder of life time at rest
|
||||
G4double fRemainderLifeTime;
|
||||
|
||||
@@ -62,7 +62,6 @@
|
||||
G4Decay::G4Decay(const G4String& processName)
|
||||
:G4VRestDiscreteProcess(processName, fDecay),
|
||||
verboseLevel(1),
|
||||
HighestValue(20.0),
|
||||
fRemainderLifeTime(-1.0),
|
||||
pExtDecayer(nullptr)
|
||||
{
|
||||
@@ -151,10 +150,7 @@ G4double G4Decay::GetMeanFreePath(const G4Track& aTrack,G4double, G4ForceConditi
|
||||
//calculate the mean free path
|
||||
// by using normalized kinetic energy (= Ekin/mass)
|
||||
G4double rKineticEnergy = aParticle->GetKineticEnergy()/aMass;
|
||||
if ( rKineticEnergy > HighestValue) {
|
||||
// gamma >> 1
|
||||
pathlength = ( rKineticEnergy + 1.0)* aCtau;
|
||||
} else if ( rKineticEnergy < DBL_MIN ) {
|
||||
if ( rKineticEnergy < DBL_MIN ) {
|
||||
// too slow particle
|
||||
#ifdef G4VERBOSE
|
||||
if (GetVerboseLevel()>1) {
|
||||
|
||||
@@ -6,6 +6,13 @@ It must **not** be used as a substitute for writing good git commit messages!
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
## 2025-04-04 G.Cosmo (emutils-V11-02-21)
|
||||
- Fix in G4EmTableType header to make self-consistent.
|
||||
Reported in [GitHub PR#85](https://github.com/Geant4/geant4/pull/85).
|
||||
|
||||
## 2025-03-27 V.Ivanchenko
|
||||
- G4VAtomDeexcitation - fixed problem #2650 - allowed to simulate PIXE
|
||||
|
||||
## 2024-10-31 V.Ivanchenko (emutils-V11-02-20)
|
||||
- G4EmCalculator - fixed Coverity warning
|
||||
|
||||
|
||||
@@ -39,10 +39,11 @@
|
||||
// 06.04.21 Removed two types (V.Ivanchenko)
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
#ifndef G4EmTableType_h
|
||||
#define G4EmTableType_h 1
|
||||
|
||||
#include "G4Types.hh"
|
||||
|
||||
enum G4EmTableType
|
||||
{
|
||||
fTotal = 0,
|
||||
@@ -60,7 +61,8 @@ enum G4CrossSectionType
|
||||
fEmTwoPeaks
|
||||
};
|
||||
|
||||
struct G4TwoPeaksXS {
|
||||
struct G4TwoPeaksXS
|
||||
{
|
||||
G4double e1peak;
|
||||
G4double e1deep;
|
||||
G4double e2peak;
|
||||
|
||||
@@ -262,9 +262,9 @@ G4VAtomDeexcitation::AlongStepDeexcitation(std::vector<G4Track*>& tracks,
|
||||
G4double& eLossMax,
|
||||
G4int coupleIndex)
|
||||
{
|
||||
if (!activePIXEMedia[coupleIndex] || eLossMax <= 0.0) { return; }
|
||||
G4double truelength = step.GetStepLength();
|
||||
if(!flagPIXE && !activePIXEMedia[coupleIndex]) { return; }
|
||||
if(eLossMax <= 0.0 || truelength <= 0.0) { return; }
|
||||
if (truelength <= 0.0) { return; }
|
||||
|
||||
// step parameters
|
||||
const G4StepPoint* preStep = step.GetPreStepPoint();
|
||||
|
||||
@@ -6,6 +6,23 @@ It must **not** be used as a substitute for writing good git commit messages!
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
## 2025-04-22 Alberto Ribon (hadr-casc-V11-02-05)
|
||||
- G4CascadeFinalStateAlgorithm, G4NucleiModel : introduced the possibility to
|
||||
retrieve either the behavior of these classes as in Geant4 version 11.3
|
||||
(default) or as in 11.2 according to the value of boolean flags in
|
||||
G4HadronicParameters.
|
||||
In the case that the behavior of the class G4CascadeFinalStateAlgorithm
|
||||
is chosen as in Geant4 version 11.2, the change introduced in
|
||||
hadr-casc-V11-02-02 is skipped; similarly, but independently, if the
|
||||
behavior of the class G4NucleiModel is chosen as in Geant4 version 11.2,
|
||||
the change introduced in hadr-casc-V11-02-00 is skipped.
|
||||
( Note that the changes introduced in the two above classes in
|
||||
hadr-casc-V11-02-02 and hadr-casc-V11-02-00 can be considered as real
|
||||
improvements of the Bertini model, some degradation of thin-target data -
|
||||
in particular for the pion production in HARP data - are observed.
|
||||
This is likely due to the fact that a complete retuning of the parameters
|
||||
of the Bertini model would have been necessary after these changes. )
|
||||
|
||||
## 2024-08-21 Gabriele Cosmo (hadr-casc-V11-02-04)
|
||||
- Fixed reported Coverity defect in G4NucleiModel for use of std::move().
|
||||
|
||||
|
||||
+37
-8
@@ -53,6 +53,7 @@
|
||||
#include "G4TwoBodyAngularDist.hh"
|
||||
#include "G4VMultiBodyMomDst.hh"
|
||||
#include "G4VTwoBodyAngDst.hh"
|
||||
#include "G4HadronicParameters.hh"
|
||||
#include "Randomize.hh"
|
||||
#include <vector>
|
||||
#include <numeric>
|
||||
@@ -60,7 +61,6 @@
|
||||
|
||||
using namespace G4InuclSpecialFunctions;
|
||||
|
||||
|
||||
// Cut-offs and iteration limits for generation
|
||||
|
||||
const G4double G4CascadeFinalStateAlgorithm::maxCosTheta = 0.9999;
|
||||
@@ -420,14 +420,43 @@ GenerateCosTheta(G4int ptype, G4double pmod) const {
|
||||
}
|
||||
|
||||
// Throw multi-body distribution
|
||||
if ( G4HadronicParameters::Instance()->IsBertiniAngularEmissionsAs11_2() ) {
|
||||
|
||||
G4double p0 = ptype<3 ? 0.36 : 0.25; // Nucleon vs. everything else
|
||||
G4double alf = 1.0 / p0 / (p0 - (pmod+p0)*G4Exp(-pmod / p0));
|
||||
G4double sinth = 2.0;
|
||||
G4int itry1 = -1; /* Loop checking 08.06.2015 MHK */
|
||||
while (std::fabs(sinth) > maxCosTheta && ++itry1 < itry_max) {
|
||||
G4double s1 = pmod * G4UniformRand();
|
||||
G4double s2 = alf * oneOverE * p0 * G4UniformRand();
|
||||
G4double salf = s1 * alf * G4Exp(-s1 / p0);
|
||||
if (GetVerboseLevel() > 3) {
|
||||
G4cout << " s1 * alf * G4Exp(-s1 / p0) " << salf
|
||||
<< " s2 " << s2 << G4endl;
|
||||
}
|
||||
if (salf > s2) sinth = s1 / pmod;
|
||||
}
|
||||
if (GetVerboseLevel() > 3) G4cout << " itry1 " << itry1 << " sinth " << sinth << G4endl;
|
||||
if (itry1 == itry_max) {
|
||||
if (GetVerboseLevel() > 2) G4cout << " high energy angles generation: itry1 " << itry1 << G4endl;
|
||||
sinth = 0.5 * G4UniformRand();
|
||||
}
|
||||
// Convert generated sin(theta) to cos(theta) with random sign
|
||||
G4double costh = std::sqrt(1.0 - sinth * sinth);
|
||||
if (G4UniformRand() > 0.5) costh = -costh;
|
||||
return costh;
|
||||
|
||||
} else {
|
||||
|
||||
// Sample costheta directly from exp(-a*pmod*(1 - costheta) )
|
||||
// Previous method sampled from a*sintheta*exp(-a*sintheta),
|
||||
// converted to costheta and (incorrectly) reflected around 180 degrees
|
||||
//
|
||||
G4double p0 = ptype < 3 ? 0.36 : 0.25; // 0.36 for nucleon, 0.25 for all others
|
||||
G4double alf = 3.*pmod/p0;
|
||||
return G4Log(G4UniformRand()*(G4Exp(2.*alf) - 1.) + 1.)/alf - 1.;
|
||||
// Sample costheta directly from exp(-a*pmod*(1 - costheta) )
|
||||
// Previous method sampled from a*sintheta*exp(-a*sintheta),
|
||||
// converted to costheta and (incorrectly) reflected around 180 degrees
|
||||
//
|
||||
G4double p0 = ptype < 3 ? 0.36 : 0.25; // 0.36 for nucleon, 0.25 for all others
|
||||
G4double alf = 3.*pmod/p0;
|
||||
return G4Log(G4UniformRand()*(G4Exp(2.*alf) - 1.) + 1.)/alf - 1.;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -183,6 +183,7 @@
|
||||
#include "G4PhysicalConstants.hh"
|
||||
#include "G4Proton.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4HadronicParameters.hh"
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
@@ -379,7 +380,7 @@ void G4NucleiModel::generateModel(G4int a, G4int z) {
|
||||
zone_potentials.push_back(std::move(kp));
|
||||
zone_potentials.push_back(std::move(hp));
|
||||
|
||||
setDinucleonDensityScale();
|
||||
if ( ! G4HadronicParameters::Instance()->IsBertiniNucleiModelAs11_2() ) setDinucleonDensityScale();
|
||||
|
||||
nuclei_radius = zone_radii.back();
|
||||
nuclei_volume = std::accumulate(zone_volumes.begin(),zone_volumes.end(),0.);
|
||||
@@ -1439,8 +1440,8 @@ void G4NucleiModel::setDinucleonDensityScale() {
|
||||
|
||||
G4double G4NucleiModel::getCurrentDensity(G4int ip, G4int izone) const {
|
||||
// const G4double pn_spec = 1.0; // Scale factor for pn vs. pp/nn
|
||||
const G4double combinatoric_factor = 0.5;
|
||||
|
||||
const G4double combinatoric_factor =
|
||||
( G4HadronicParameters::Instance()->IsBertiniNucleiModelAs11_2() ? 1.0 : 0.5 );
|
||||
G4double dens = 0.;
|
||||
|
||||
if (ip < 100) dens = getDensity(ip,izone);
|
||||
|
||||
@@ -7,6 +7,10 @@ It must **not** be used as a substitute for writing good git commit messages!
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
## 2025-04-22 Alberto Ribon (hadr-util-V11-02-07)
|
||||
- G4HadronicDeveloperParameters : introduced Getter/Setter for selecting the
|
||||
Bertini model behavior as Geant4 version 11.3 (default) or 11.2.
|
||||
|
||||
## 2025-03-05 Vladimir Ivanchenko (hadr-util-V11-02-06)
|
||||
- G4HadronicDeveloperParameters - added limitation of warning printout on
|
||||
change of parameters (NA64 request).
|
||||
|
||||
@@ -181,6 +181,29 @@ class G4HadronicParameters {
|
||||
// Getter/Setter for the time threshold of radioactive decays
|
||||
// (i.e. radioactive decays that happen later than this value are ignored).
|
||||
|
||||
inline G4bool IsBertiniAs11_2() const;
|
||||
void SetBertiniAs11_2( G4bool val );
|
||||
inline G4bool IsBertiniAngularEmissionsAs11_2() const;
|
||||
void SetBertiniAngularEmissionsAs11_2( G4bool val );
|
||||
inline G4bool IsBertiniNucleiModelAs11_2() const;
|
||||
void SetBertiniNucleiModelAs11_2( G4bool val );
|
||||
// Getter/Setter for the Bertini model behavior with respect to the
|
||||
// Geant4 version 11.2.
|
||||
// The first two methods "*BertiniAs11_2" refer to the overall behavior
|
||||
// of the Bertini model - the one which should matter the most for the
|
||||
// majority of applications.
|
||||
// The methods "*BertiniAngularEmissionsAs11_2" refer to the angular
|
||||
// distributions of the >= 4-body final state emissions.
|
||||
// The last two methods "*BertiniNucleiModelAs11_2" refer to the
|
||||
// modelling of nuclei.
|
||||
// The overall behavior of Bertini with respect to the version Geant4
|
||||
// version 11.2 depends on both the angular distributios of the
|
||||
// >= 4-body final state emissions, and the modelling of nuclei.
|
||||
// "True" in these methods means that the corresponding behavior of
|
||||
// the Geant4 version 11.2 is retrieved;
|
||||
// "False" means that the corresponding behavior of the Geant4 version
|
||||
// 11.3 is retrieved.
|
||||
|
||||
private:
|
||||
|
||||
G4HadronicParameters();
|
||||
@@ -226,6 +249,8 @@ class G4HadronicParameters {
|
||||
G4bool fNeutronGeneral = false;
|
||||
G4bool fChargeExchange = false;
|
||||
G4bool fBinaryDebug = false;
|
||||
G4bool fBertiniAngularEmissionsAs11_2 = false; // Keep the new G4 11.3 behavior
|
||||
G4bool fBertiniNucleiModelAs11_2 = false; // Keep the new G4 11.3 behavior
|
||||
|
||||
G4String fTypeTablePT = "";
|
||||
G4String fDirPARTICLEXS = "";
|
||||
@@ -258,7 +283,6 @@ inline G4double G4HadronicParameters::GetMinEnergyINCLXX_Pbar() const {
|
||||
inline G4double G4HadronicParameters::GetMaxEnergyINCLXX_Pbar() const {
|
||||
return fMaxEnergyINCLXX_Pbar;
|
||||
}
|
||||
|
||||
|
||||
inline G4double G4HadronicParameters::EnergyThresholdForHeavyHadrons() const {
|
||||
return fEnergyThresholdForHeavyHadrons;
|
||||
@@ -360,13 +384,11 @@ inline const G4String& G4HadronicParameters::GetDirPARTICLEXS() const {
|
||||
return fDirPARTICLEXS;
|
||||
}
|
||||
|
||||
inline const G4String& G4HadronicParameters::GetPhysListDocDir() const
|
||||
{
|
||||
inline const G4String& G4HadronicParameters::GetPhysListDocDir() const {
|
||||
return fPhysListDocDir;
|
||||
}
|
||||
|
||||
inline const G4String& G4HadronicParameters::GetPhysListName() const
|
||||
{
|
||||
inline const G4String& G4HadronicParameters::GetPhysListName() const {
|
||||
return fPhysListName;
|
||||
}
|
||||
|
||||
@@ -378,4 +400,16 @@ inline G4double G4HadronicParameters::GetTimeThresholdForRadioactiveDecay() cons
|
||||
return fTimeThresholdForRadioactiveDecays;
|
||||
}
|
||||
|
||||
inline G4bool G4HadronicParameters::IsBertiniAs11_2() const {
|
||||
return ( fBertiniAngularEmissionsAs11_2 && fBertiniNucleiModelAs11_2 );
|
||||
}
|
||||
|
||||
inline G4bool G4HadronicParameters::IsBertiniAngularEmissionsAs11_2() const {
|
||||
return fBertiniAngularEmissionsAs11_2;
|
||||
}
|
||||
|
||||
inline G4bool G4HadronicParameters::IsBertiniNucleiModelAs11_2() const {
|
||||
return fBertiniNucleiModelAs11_2;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -46,11 +46,11 @@
|
||||
|
||||
G4HadronicParameters* G4HadronicParameters::sInstance = nullptr;
|
||||
|
||||
namespace
|
||||
{
|
||||
namespace {
|
||||
G4Mutex paramMutex = G4MUTEX_INITIALIZER;
|
||||
}
|
||||
|
||||
|
||||
G4HadronicParameters* G4HadronicParameters::Instance() {
|
||||
if ( sInstance == nullptr ) {
|
||||
G4AutoLock l(¶mMutex);
|
||||
@@ -140,12 +140,14 @@ void G4HadronicParameters::SetMinEnergyTransitionQGS_FTF( const G4double val ) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void G4HadronicParameters::SetMaxEnergyTransitionQGS_FTF( const G4double val ) {
|
||||
if ( ! IsLocked() && val > fMinEnergyTransitionQGS_FTF ) {
|
||||
fMaxEnergyTransitionQGS_FTF = val;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void G4HadronicParameters::SetMinEnergyINCLXX_Pbar( const G4double val ) {
|
||||
if ( ! IsLocked() && val >= 0.0 ) {
|
||||
fMinEnergyINCLXX_Pbar = val;
|
||||
@@ -159,6 +161,7 @@ void G4HadronicParameters::SetMaxEnergyINCLXX_Pbar( const G4double val ) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void G4HadronicParameters::SetEnableBCParticles( G4bool val ) {
|
||||
if ( ! IsLocked() ) fEnableBC = val;
|
||||
}
|
||||
@@ -291,3 +294,21 @@ void G4HadronicParameters::SetTypeTablePT( const G4String& typeTablePT ) {
|
||||
void G4HadronicParameters::SetEnableCoherentChargeExchange( G4bool val ) {
|
||||
if ( ! IsLocked() ) fChargeExchange = val;
|
||||
}
|
||||
|
||||
|
||||
void G4HadronicParameters::SetBertiniAs11_2( G4bool val ) {
|
||||
if ( ! IsLocked() ) {
|
||||
fBertiniAngularEmissionsAs11_2 = val;
|
||||
fBertiniNucleiModelAs11_2 = val;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void G4HadronicParameters::SetBertiniAngularEmissionsAs11_2( G4bool val ) {
|
||||
if ( ! IsLocked() ) fBertiniAngularEmissionsAs11_2 = val;
|
||||
}
|
||||
|
||||
|
||||
void G4HadronicParameters::SetBertiniNucleiModelAs11_2( G4bool val ) {
|
||||
if ( ! IsLocked() ) fBertiniNucleiModelAs11_2 = val;
|
||||
}
|
||||
|
||||
@@ -6,6 +6,10 @@ It must **not** be used as a substitute for writing good git commit messages!
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
## 2025-04-07 Gabriele Cosmo (opengl-V11-02-10)
|
||||
- Fixed compilation errors on Windows in G4OpenGLWin32Viewer, triggered when
|
||||
enabling GL WIN32 support, as reported in problem report #2599.
|
||||
|
||||
## 2024-09-13 John Allison (opengl-V11-02-09)
|
||||
- G4OpenGLStoredQtSceneHandler.cc:
|
||||
- G4OpenGLStoredQtSceneHandler::ClearStore():
|
||||
|
||||
@@ -108,8 +108,8 @@ void G4OpenGLWin32Viewer::CreateMainWindow (
|
||||
wc.hIcon = LoadIcon (NULL, IDI_APPLICATION);
|
||||
wc.hCursor = LoadCursor(NULL,IDC_CROSS);
|
||||
wc.hbrBackground = NULL;
|
||||
wc.lpszMenuName = className;
|
||||
wc.lpszClassName = className;
|
||||
wc.lpszMenuName = (PTSTR)className;
|
||||
wc.lpszClassName = (PTSTR)className;
|
||||
::RegisterClass(&wc);
|
||||
done = true;
|
||||
}
|
||||
@@ -120,7 +120,7 @@ void G4OpenGLWin32Viewer::CreateMainWindow (
|
||||
G4int y_res=GetSystemMetrics(SM_CYSCREEN);
|
||||
|
||||
//FIXME : NOT tested !
|
||||
fWindow = ::CreateWindowEx(0, className,fName.c_str(),
|
||||
fWindow = ::CreateWindowEx(0, (PTSTR)className, (PTSTR)fName.c_str(),
|
||||
WS_OVERLAPPEDWINDOW,
|
||||
//WS_CHILD | WS_VISIBLE,
|
||||
// 0,0,
|
||||
|
||||
@@ -6,6 +6,10 @@ It must **not** be used as a substitute for writing good git commit messages!
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
## 2025-04-12 John Allison (raytracer-V11-02-00)
|
||||
- G4RayTracerXViewer.cc:
|
||||
- Use G4TheMTRayTracer.
|
||||
|
||||
## 2023-03-22 Ben Morgan (raytracer-V11-01-01)
|
||||
- Export public compile definitions to indicate availablity of specific drivers. Moves to
|
||||
"use on link" model.
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
#include "G4VSceneHandler.hh"
|
||||
#include "G4Scene.hh"
|
||||
#include "G4TheRayTracer.hh"
|
||||
#include "G4TheMTRayTracer.hh"
|
||||
#include "G4RTJpegMaker.hh"
|
||||
#include "G4RTXScanner.hh"
|
||||
#include "G4UImanager.hh"
|
||||
@@ -40,7 +40,7 @@ G4RayTracerXViewer::G4RayTracerXViewer
|
||||
(G4VSceneHandler& sceneHandler, const G4String& name):
|
||||
G4RayTracerViewer(sceneHandler,
|
||||
name,
|
||||
new G4TheRayTracer(new G4RTJpegMaker, new G4RTXScanner))
|
||||
G4TheMTRayTracer::Instance(new G4RTJpegMaker, new G4RTXScanner))
|
||||
{}
|
||||
|
||||
G4RayTracerXViewer::~G4RayTracerXViewer() {}
|
||||
|
||||
Reference in New Issue
Block a user