Import Geant4 10.7.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2020-06-26 10:23:25 +02:00
parent c02c370437
commit 67ba86d073
1871 changed files with 174422 additions and 131884 deletions
@@ -7,27 +7,31 @@
History file for Low Energy Parameterized Models
------------------------------------------------
This file should be used to summarize modifications introduced in the
This file should be used to summarize modifications introduced in the
code and to keep track of all tags.
---------------------------------------------------------------
* Please list in reverse chronological order (last date on top)
---------------------------------------------------------------
18 January 2019 - V.Ivanchenko (hadr-cohe-V10-05-12)
30 April 2020 - B. Morgan (hadr-cohe-V10-06-02)
---------------------------------------------------------------
- G4ElasticHadrNucleusHE - for pi- and Z>1 reuse data structure
computed for pi+ in order to reduce memory and CPU at
initialisation; fixed false positive Coverity report
- Remove obsolete GRANULAR_DEPENDENCIES entries
17 December 2019 - V.Ivanchenko (hadr-cohe-V10-05-11)
18 January 2019 - V.Ivanchenko (hadr-cohe-V10-06-01)
---------------------------------------------------------------
- G4ElasticHadrNucleusHE - for pi- and Z>1 reuse data structure
computed for pi+ in order to reduce memory and CPU at
initialisation; added new private methods to store/retrieve
data tables; fixed false positive Coverity report
17 December 2019 - V.Ivanchenko (hadr-cohe-V10-06-00)
---------------------------------------------------------------
- G4ElasticHadrNucleusHE - switch to parameterized model by
cut on kinetic energy and not momentum
cut on kinetic energy and not momentum
26 November 2019 - V.Ivanchenko (hadr-cohe-V10-05-10)
---------------------------------------------------------------
- G4HadronElastic : Added limit on number of warning printouts
- G4HadronElastic : Added limit on number of warning printouts
19 November 2019 - G. Folger (hadr-cohe-V10-05-09)
---------------------------------------------------------------
@@ -36,8 +40,8 @@ code and to keep track of all tags.
15 November 2019 - V.Ivanchenko (hadr-cohe-V10-05-08)
---------------------------------------------------------------
- G4HadronElastic : Change warning printout, in the case if sampled
t>tmax resample using simple algorithm, protect this warning
- G4HadronElastic : Change warning printout, in the case if sampled
t>tmax resample using simple algorithm, protect this warning
by G4VERBOSE, this is a partial fix of #2204
06 November 2019 - A.Ribon (hadr-cohe-V10-05-07)
@@ -76,29 +80,27 @@ code and to keep track of all tags.
29 April 2019 - V.Ivanchenko (hadr-cohe-V10-05-01)
--------------------------------------------------------
- G4HadronElastic - added protected variable pLocalTmax, added protection
- G4HadronElastic - added protected variable pLocalTmax, added protection
for zero energy primary;
G4ChargeExchange - updated interfaces, added protection for zero
G4ChargeExchange - updated interfaces, added protection for zero
energy primary
G4ElasticHadrNucleusHE - make all data shared between threads
G4AntiNuclElastic - do not compute trigonametric functions,
G4AntiNuclElastic - do not compute trigonametric functions,
which are not used
19 April 2019 - V.Ivanchenko (hadr-cohe-V10-05-00)
--------------------------------------------------------
- G4HadronElastic - removed tracking cut and use numerically safer
computation for very low-energy projectile; improved description
and comments; added C++11 keywords
- G4HadronElastic - improved description and comments; added C++11 keywords
05 November 2018 - V.Ivanchenko (hadr-cohe-V10-04-08)
--------------------------------------------------------
- G4HadronElastic - fixed numberical instability when
- G4HadronElastic - fixed numberical instability when
final kinetic energy of projectile is nearly zero
17 August 2018 - A.Ribon (hadr-cohe-V10-04-07)
--------------------------------------------------------
- G4DiffuseElastic, G4DiffuseElasticV2, G4NuclNuclDiffuseElastic : increased
the number of equal-sized logarithmic-energy bins (from 200 to 300) in
the number of equal-sized logarithmic-energy bins (from 200 to 300) in
order to have no larger bins up to 10 PeV.
- G4NuclNuclDiffuseElastic : replaced the high-energy limit of applicability
of the model from 1 TeV to the value specified in G4HadronicParameters.
@@ -112,7 +114,7 @@ code and to keep track of all tags.
--------------------------------------------------------
- G4HadronElastic, G4DiffuseElastic, G4DiffuseElasticV2, G4hhElastic,
G4ChargeExchange, G4NeutrinoElectronNcModel : replaced the explicit
high-energy limit of hadronic physics with the one from
high-energy limit of hadronic physics with the one from
G4HadronicParameters .
01 August 2018 - V.Ivanchenko (hadr-cohe-V10-04-03)
@@ -121,8 +123,8 @@ code and to keep track of all tags.
18 July 2018 - V.Ivanchenko (hadr-cohe-V10-04-02)
--------------------------------------------------------
- G4AntiNuclElastic - use cross section component from
G4CrossSectionDataSetRegistry and do not delete it end of run
- G4AntiNuclElastic - use cross section component from
G4CrossSectionDataSetRegistry and do not delete it end of run
20 Mar 2018 - A.Ribon (hadr-cohe-V10-04-01)
--------------------------------------------------------
@@ -160,7 +162,7 @@ original implementation. The approximation of small angles has been droped
23 Jun 2017 - Dennis Wright (hadr-cohe-V10-03-05)
--------------------------------------------------------
- G4NuclNuclDiffuseElastic ctor: variables fCofAlphaMax and fCofAlphaCoulomb
were first set to non-zero values (1.5 and 0.5, respectively), then zeroed
were first set to non-zero values (1.5 and 0.5, respectively), then zeroed
a few lines later. This caused a zero scattering angle and no elastically
scattered target particle. Fixed in response to bug report #1979.
@@ -226,7 +228,7 @@ original implementation. The approximation of small angles has been droped
08 September 2015 - A.Ribon (hadr-cohe-V10-01-14)
-----------------------------------------------------------------
- G4LMsdGenerator : fixed uninitialized variable which caused
- G4LMsdGenerator : fixed uninitialized variable which caused
non-reproducibility.
13 August 2015 - A.Ribon (hadr-cohe-V10-01-13)
@@ -290,7 +292,7 @@ original implementation. The approximation of small angles has been droped
06 February 2015 - V.Ivanchenko (hadr-cohe-V10-01-03)
-----------------------------------------------------------------
- G4DiffuseElastic : V.Grichine fixed rare numerical bug (sqrt of
- G4DiffuseElastic : V.Grichine fixed rare numerical bug (sqrt of
negative argument)
08 January 2015 - A.Ribon (hadr-cohe-V10-01-02)
@@ -307,7 +309,7 @@ original implementation. The approximation of small angles has been droped
05 December 2014 - V.Ivanchenko (hadr-cohe-V10-01-00)
-----------------------------------------------------------------
- G4DiffuseElastic - V.Grichine fixed low-energy neutrons
- G4NuclNuclDiffuseElastic - V.Grichine fixed problem #1691 for
- G4NuclNuclDiffuseElastic - V.Grichine fixed problem #1691 for
700 MeV Be-ions scattering in Be
24 November 2014 - V.Ivanchenko (hadr-cohe-V10-00-24)
@@ -340,11 +342,11 @@ original implementation. The approximation of small angles has been droped
07 November 2014 - V.Ivanchenko (hadr-cohe-V10-00-17)
-----------------------------------------------------------------
07 November 2014 V. Grichine fixed class G4LMsdGenerator
07 November 2014 V. Grichine fixed class G4LMsdGenerator
06 November 2014 - V.Ivanchenko (hadr-cohe-V10-00-16)
-----------------------------------------------------------------
06 November 2014 V. Grichine class G4LMsdGenerator was added for
06 November 2014 V. Grichine class G4LMsdGenerator was added for
low mass single diffraction dissociation
14 October 2014 - A.Ribon (hadr-cohe-V10-00-14)
@@ -365,8 +367,8 @@ original implementation. The approximation of small angles has been droped
27 June 2014 - V.Ivanchenko (hadr-cohe-V10-00-11)
-----------------------------------------------------------------
- G4LEppData, G4LEpp - removed data with Coulomb correction and
corresponding code due to reasons: not work properly, provides
- G4LEppData, G4LEpp - removed data with Coulomb correction and
corresponding code due to reasons: not work properly, provides
double counting with EM, code too complex.
18 June 2014 - A.Ribon (hadr-cohe-V10-00-10)
@@ -376,13 +378,13 @@ original implementation. The approximation of small angles has been droped
06 June 2014 - A.Ribon (hadr-cohe-V10-00-09)
-----------------------------------------------------------------
- G4DiffuseElastic : fixed deletion in destructor.
- G4NuclNuclDiffuseElastic : fixed deletion in destructor;
temporary fix of the nuclear radius (which was zero).
- G4NuclNuclDiffuseElastic : fixed deletion in destructor;
temporary fix of the nuclear radius (which was zero).
27 May 2014 - V.Ivanchenko (hadr-cohe-V10-00-08)
-----------------------------------------------------------------
- G4LEpp - fixed incorrect use data array, used GetInvariantT()
inside ApplyYourself
inside ApplyYourself
13 May 2014 - A.Ribon (hadr-cohe-V10-00-07)
-----------------------------------------------------------------
@@ -404,7 +406,7 @@ original implementation. The approximation of small angles has been droped
10 March 2014 - V.Ivanchenko (hadr-cohe-V10-00-02)
-----------------------------------------------------------------
- G4LEHadronProtonElastic, G4LEnp, G4LEpp - use const pointers
- G4LEHadronProtonElastic, G4LEnp, G4LEpp - use const pointers
to G4ParticleDefinition
31 January 2014 - V.Ivanchenko (V.Grichine) (hadr-cohe-V10-00-01)
@@ -426,7 +428,7 @@ original implementation. The approximation of small angles has been droped
------------------------------------------------------
- G4LEnp, G4LEpp, G4LEnpData, G4LEppData - removed G4ThreadLocal
declarations
- G4NuclNuclDiffuseElastic - moved long methods from inline to source
- G4NuclNuclDiffuseElastic - moved long methods from inline to source
13 December 2012 - A.Ribon (hadr-cohe-V09-06-01)
-------------------------------------------------
@@ -461,7 +463,7 @@ original implementation. The approximation of small angles has been droped
26 March 2012 - W.Pokorski (hadr-cohe-V09-05-06)
------------------------------------------------------
- added G4ChipsElasticModel class to use the extracted Chips XS classes from
- added G4ChipsElasticModel class to use the extracted Chips XS classes from
hardonic/cross_sections
6 May 2012, Gunter Folger ( ..trunk.. )
@@ -483,7 +485,7 @@ original implementation. The approximation of small angles has been droped
- G4ElasticHadrNucleusHE - fixed reproducibility violation due to
cashing of cross sections based on the target element, whereas
they depend also on the isotope. Rather than using the first
isotope encountered for an element, the natural average is used.
isotope encountered for an element, the natural average is used.
26 March 2012 - V.Ivanchenko (hadr-cohe-V09-05-01)
------------------------------------------------------
@@ -507,7 +509,7 @@ original implementation. The approximation of small angles has been droped
31 October 2011 - A.Galoyan (hadr-cohe-V09-04-19)
--------------------------------------------------------------
- G4AntiNuclElastic - antiProton-Proton elastic scattering is improved
- G4AntiNuclElastic - antiProton-Proton elastic scattering is improved
21 October 2011 - V.Ivanchenko (hadr-cohe-V09-04-18)
------------------------------------------------------
@@ -523,7 +525,7 @@ original implementation. The approximation of small angles has been droped
04 October 2011 - V.Ivanchenko (hadr-cohe-V09-04-16)
------------------------------------------------------
- G4AntiNuclElastic - removed internal low and high energy limits
- G4WHadronElasticProcess - added protection for very low primary enegry
- G4WHadronElasticProcess - added protection for very low primary enegry
after scattering
29 September 2011 - V.Ivanchenko (hadr-cohe-V09-04-15)
@@ -555,23 +557,23 @@ original implementation. The approximation of small angles has been droped
28 July 2011 - V.Ivanchenko (hadr-cohe-V09-04-09)
-------------------------------------------------
18 July 2011 - V. Grichine
- G4NuclNuclDiffuseElastic V.Grichine updated the class using G4HadronElastic
- G4NuclNuclDiffuseElastic V.Grichine updated the class using G4HadronElastic
as the base class and to follow its interface.
13 July 2011 - V.Ivanchenko (hadr-cohe-V09-04-08)
-------------------------------------------------
- G4DiffuseElastic V.Grichine updated the class using G4HadronElastic
- G4DiffuseElastic V.Grichine updated the class using G4HadronElastic
as the base class and to follow its interface.
- G4AntiNuclElastic, G4CHIPSElasticXS, G4ChargeExchange,
G4ChargeExchangeProcess, G4ElasticHadrNucleusHE - fixed Coverity tool
- G4AntiNuclElastic, G4CHIPSElasticXS, G4ChargeExchange,
G4ChargeExchangeProcess, G4ElasticHadrNucleusHE - fixed Coverity tool
warnings
- G4HadronElastic - added LowestEnergyLimit access method
- G4VHadronElastic - removed obsolete class
20 May 2011 - V.Ivanchenko (hadr-cohe-V09-04-07)
-------------------------------------------------
- G4AntiNuclElastic - fixed gcc-4.6.0 compillation warning
- G4AntiNuclElastic - fixed gcc-4.6.0 compillation warning
31 May 2011 - V. Uzhinsky (hadr-cohe-V09-04-06)
-------------------------------------------------
@@ -593,7 +595,7 @@ original implementation. The approximation of small angles has been droped
16 May 2011 - V.Ivanchenko (hadr-cohe-V09-04-03)
-------------------------------------------------
- G4AntiNuclElastic - added access method to cross section,
- G4AntiNuclElastic - added access method to cross section,
removed unused headers
- G4UHadronElasticProcess - removed as obsolete
- G4VHadronElastic is copied to G4HadronElastic (it will be the main interface)
@@ -605,7 +607,7 @@ original implementation. The approximation of small angles has been droped
3 May 2011 - A. Galoyan (hadr-cohe-V09-04-01)
-----------------------------------------------
- G4AntiNuclElastic - new class for simulation of elastic anti-A - A scattering
is added
is added
24 February 2011 - V.Ivanchenko (hadr-cohe-V09-04-00)
------------------------------------------------------
@@ -615,7 +617,7 @@ is added
19 November 2010 - V.Ivanchenko (hadr-cohe-V09-03-07)
------------------------------------------------------
- G4WHadronElasticProcess, G4VHadronElastic, G4HadronElastic,
G4ChargeExchange - fixed bug introduced in the previous tag -
G4ChargeExchange - fixed bug introduced in the previous tag -
use now GetA_asInt() method instead of GetN_asInt()
18 November 2010 - V.Ivanchenko (hadr-cohe-V09-03-06)
@@ -673,16 +675,16 @@ is added
GHEISHA model
G4ElasticHadrNucleusHE - capable to work with old and new interfaces
G4CHIPSElastic - model interface to CHIPS parameterization
G4HadronElastic - remove hand made NaN finder and G4cout at destructor
G4HadronElastic - remove hand made NaN finder and G4cout at destructor
02 March 2009 - D. Wright for V.Grichine (hadr-cohe-V09-02-00)
--------------------------------------------------------------
Model precise sampling and 'on the fly' table preparation in
Model precise sampling and 'on the fly' table preparation in
G4DiffuseElastic.hh, .cc
27 November 2008 - V.Ivanchenko (hadr-cohe-V09-01-08)
----------------------------------------------------
G4ChargeExchangeProcess - added high and low energy protections into
G4ChargeExchangeProcess - added high and low energy protections into
cross section
20 November 2008 - V.Ivanchenko (hadr-cohe-V09-01-07)
@@ -692,12 +694,12 @@ is added
22 August 2008 - V.Ivanchenko (hadr-cohe-V09-01-06)
----------------------------------------------------
- set process sub-types according to enumerator for G4UHadronElasticProcess
- set process sub-types according to enumerator for G4UHadronElasticProcess
and for G4ChargeExchangeProcess
05 August 2008 - V.Ivanchenko (hadr-cohe-V09-01-05)
----------------------------------------------------
G4HadronElastic - added protection inside LElastic model against rare
G4HadronElastic - added protection inside LElastic model against rare
unphysical values of sampled t
08 Jul 2008 - D.H. Wright (hadr-cohe-V09-01-04)
@@ -709,7 +711,7 @@ is added
------------------------------------------------
G4HadronElastic - added counts of abnornal sampling results and cout
at the destructor of the class
G4UHadronElasticProcess and G4ChargeExchangeProcess - added call to
G4UHadronElasticProcess and G4ChargeExchangeProcess - added call to
BuildPhysicsTable of the base class G4HadronicProcess
10 Apr 2008 - V.Ivanchenko (hadr-cohe-V09-01-02)
@@ -720,18 +722,18 @@ is added
29 Jan 2008 - V.Ivanchenko (hadr-cohe-V09-01-01)
-------------------------------------------------
G4UHadronElasticProcess - call to G4QElasticCrossSection with option
G4UHadronElasticProcess - call to G4QElasticCrossSection with option
"false", so parameters for sampling of
scattering are precalculated
G4HadronElastic - added extra protection - if sampled t out of the
G4HadronElastic - added extra protection - if sampled t out of the
physics range then no scattering
16 Jan 2008 - V.Ivanchenko (hadr-cohe-V09-01-00)
------------------------------------------------
G4DiffuseElastic - remove dependence on other elastic models
G4ElasticHadrNucleusHE - fixed non-reproducibility, removed commented
part of old code; add more formatting
G4HadronElastic - return back threshold to G4ElasticHadrNucleusHE
part of old code; add more formatting
G4HadronElastic - return back threshold to G4ElasticHadrNucleusHE
model 1 GeV
10 Dec 2007 - V.Ivanchenko (hadr-cohe-V09-00-07)
@@ -741,7 +743,7 @@ is added
15 Nov 2007 - V.Ivanchenko (hadr-cohe-V09-00-06)
------------------------------------------------
G4UHadronElasticProcess - introduced "ifdef VERBOSE" for verbosity
G4UHadronElasticProcess - introduced "ifdef VERBOSE" for verbosity
checks inside methods called at each step
14 Nov 2007 - V.Ivanchenko (hadr-cohe-V09-00-04)
@@ -751,30 +753,30 @@ is added
13 Nov 2007 - V.Ivanchenko (hadr-cohe-V09-00-03)
------------------------------------------------
G4ElasticHadrNucleusHE - (N.Starkov) updated:
- the difference in scattering off protons and
- the difference in scattering off protons and
neutrons is included;
- optized computation of the distribution function
(important for heavy targets);
- fixed model for scattering off hydrogen;
- tunned model parameters for better description
of total and elastic cross sections
of total and elastic cross sections
06 Nov 2007 - V.Ivanchenko (hadr-cohe-V09-00-02)
------------------------------------------------
G4DiffuseElastic - (V.Grichine) initialisation of the model for
each new target nucleus on-fly
G4DiffuseElastic - (V.Grichine) initialisation of the model for
each new target nucleus on-fly
05 Nov 2007 - V.Ivanchenko (hadr-cohe-V09-00-01)
------------------------------------------------
G4DiffuseElastic - (V.Grichine) initialisation of the model in
constructor with particle definition for the
G4DiffuseElastic - (V.Grichine) initialisation of the model in
constructor with particle definition for the
vector of available elements; tuning
at high energies.
at high energies.
17 Oct 2007 - V.Ivanchenko (hadr-cohe-V09-00-00)
------------------------------------------------
G4LEnp - removed erroneous code for identity
G4LEnp - removed erroneous code for identity
exchange of particles ( F.W. Jones)
G4DiffuseElastic - added Coulomb elastic scattering amplitude
@@ -787,7 +789,7 @@ is added
14 June 2007 - V.Ivanchenko (hadr-cohe-V08-03-06)
-----------------------------------------------
G4ElasticHadrNucleusHE - fixed compilation nuclear parameters for heavy
G4ElasticHadrNucleusHE - fixed compilation nuclear parameters for heavy
nucleus
G4DiffuseElastic - new class
@@ -798,23 +800,23 @@ is added
31 May 2007 - V.Ivanchenko (hadr-cohe-V08-03-04)
-----------------------------------------------
G4ElasticHadrNucleusHE - fixed compilation problem at SUN
move static const out of switch
G4ElasticHadrNucleusHE - fixed compilation problem at SUN
move static const out of switch
25 May 2007 - D.H. Wright (hadr-cohe-V08-03-03)
-----------------------------------------------
add model names to constructors in G4LEnp, G4LEpp, G4ChargeExchange.cc,
add model names to constructors in G4LEnp, G4LEpp, G4ChargeExchange.cc,
G4HadronElastic, and G4ElasticHadrNucleusHE
24 May 2007 - V.Ivanchenko (hadr-cohe-V08-03-02)
-----------------------------------------------
G4ElasticHadrNucleusHE - optimised computation of tables
G4HadronElastic - use HElastic only for mesons
G4HadronElastic - use HElastic only for mesons
15 May 2007 - V.Ivanchenko (hadr-cohe-V08-03-01)
-----------------------------------------------
G4HadronElastic - use QElasticCrossSection for p, n incident for any energy
and any target; use HElastic for the rest
and any target; use HElastic for the rest
15 May 2007 - V.Ivanchenko (hadr-cohe-V08-03-00)
-----------------------------------------------
@@ -823,27 +825,27 @@ is added
5 May 2007 - V.Ivanchenko (hadr-cohe-V08-02-06)
-----------------------------------------------
G4HadronElastic - do not use HE model for hydrogen target to avoid NaN;
use QElasticCrossSection for p, n incident for any energy
use QElasticCrossSection for p, n incident for any energy
only for p, He targets
4 May 2007 - V.Ivanchenko (hadr-cohe-V08-02-05)
-----------------------------------------------
G4HadronElastic - do not use HE model for hydrogen target to avoid NaN;
use QElasticCrossSection for p, n incident for any energy
use QElasticCrossSection for p, n incident for any energy
2 May 2007 - V.Ivanchenko (hadr-cohe-V08-02-04)
-----------------------------------------------
G4ElasticHadrNucleusHE - scale sampled t as ptot^2
G4HadronElastic - use QElasticCrossSection for p, n < GeV and
G4HadronElastic - use QElasticCrossSection for p, n < GeV and
G4ElasticHadrNucleusHE model above
still use QElasticCrossSEction for H and He targets
still use QElasticCrossSEction for H and He targets
2 Apr 2007 - V.Ivanchenko (hadr-cohe-V08-02-03)
-----------------------------------------------
G4ElasticHadrNucleusHE - use iterator search on bin instead of
G4ElasticHadrNucleusHE - use iterator search on bin instead of
computing log
G4HadronElastic - use the most probable isotope for given Z to call
to HE model (CPU/memory more efficient)
G4HadronElastic - use the most probable isotope for given Z to call
to HE model (CPU/memory more efficient)
30 Jan 2007 - V.Ivanchenko (hadr-cohe-V08-02-02)
------------------------------------------------
@@ -852,13 +854,13 @@ is added
30 Jan 2007 - V.Ivanchenko (hadr-cohe-V08-02-01)
------------------------------------------------
G4UHadronElasticProcess, G4ChargeExchangeProcess - fix problem
G4UHadronElasticProcess, G4ChargeExchangeProcess - fix problem
for the case, when isotope vector is not defined
23 Jan 2007 - V.Ivanchenko (hadr-cohe-V08-02-00)
------------------------------------------------
G4UHadronElasticProcess - migrade to interface to cross section with Z and A
G4ChargeExchangeProcess - migrade to interface to cross section with Z and A
G4ChargeExchangeProcess - migrade to interface to cross section with Z and A
do not use QElastic total cross sections
23 Nov 2006 - V.Ivanchenko (hadr-cohe-V08-01-12)
@@ -866,11 +868,11 @@ is added
G4ElasticHadrNucleusHE - remove unused variables;
- set ONQ0=3 (instead of 5) as it was in the
tag 05 in order to have better CPU performance
- cleanup comments
- cleanup comments
22 Nov 2006 - V.Ivanchenko (hadr-cohe-V08-01-11)
------------------------------------------------
G4HadronElastic: set DBL_MAX low limit for the HE model
G4HadronElastic: set DBL_MAX low limit for the HE model
21 Nov 2006 - V.Ivanchenko (hadr-cohe-V08-01-10)
------------------------------------------------
@@ -878,12 +880,12 @@ is added
18 Nov 2006 - V.Ivanchenko (hadr-cohe-V08-01-09)
------------------------------------------------
N.Starkov: Fix problem of
N.Starkov: Fix problem of
17 Nov 2006 - V.Ivanchenko (hadr-cohe-V08-01-08)
------------------------------------------------
N.Starkov: Fix problem of initialization of tables,
Fix problem of CPU overhead
N.Starkov: Fix problem of initialization of tables,
Fix problem of CPU overhead
17 Nov 2006 - V.Ivanchenko (hadr-cohe-V08-01-07)
------------------------------------------------
@@ -912,7 +914,7 @@ is added
10 August 2006 - V.Ivanchenko (hadr-cohe-V08-01-03)
---------------------------------------------------
Introduce NaN check inside G4HadronElastic, G4ChargeExchange,
and G4UHadronElasticProcess;
and G4UHadronElasticProcess;
24 July 2006 - V.Ivanchenko (hadr-cohe-V08-01-02)
-----------------------------------------------
@@ -921,34 +923,34 @@ is added
13 July 2006 - V.Ivanchenko (hadr-cohe-V08-01-01)
-----------------------------------------------
Fix bug: remove 1 keV limit from G4UHadronElasticProcess
Fix bug: remove 1 keV limit from G4UHadronElasticProcess
07 July 2006 - V.Ivanchenko (hadr-cohe-V08-01-00)
-----------------------------------------------
Fix bug: the rotation of final state need to be done in PostStep of
the process, not on the model level (V.Ivanchenko)
the process, not on the model level (V.Ivanchenko)
21 June 2006 - V.Ivanchenko (hadr-cohe-V08-00-09)
-----------------------------------------------
Fix - remove nan values n scattering on deuteron (V.Ivanchenko)
Fix - remove nan values n scattering on deuteron (V.Ivanchenko)
17 June 2006 - V.Ivanchenko (ghad-cohe-V08-00-08)
-----------------------------------------------
Use sampling of final state for n, p scattering on deuteron
and alpha from LElastic (V.Ivanchenko)
and alpha from LElastic (V.Ivanchenko)
7 June 2006 - V.Ivanchenko (ghad-cohe-V08-00-07)
-----------------------------------------------
Fix complilation warnings at WINDOWS (V.Ivanchenko)
Fix complilation warnings at WINDOWS (V.Ivanchenko)
2 June 2006 - V.Ivanchenko (ghad-cohe-V08-00-06)
-----------------------------------------------
Fix complilation warnings at SUN (V.Ivanchenko)
Fix complilation warnings at SUN (V.Ivanchenko)
1 June 2006 - V.Ivanchenko (ghad-cohe-V08-00-05)
-----------------------------------------------
Add regime of HElastic which is not using data files (N.Starkov)
Cleanup (V.Ivanchenko)
Cleanup (V.Ivanchenko)
30 May 2006 - V.Ivanchenko (ghad-cohe-V08-00-04)
-----------------------------------------------
@@ -961,15 +963,15 @@ is added
25 April 2006 - V.Ivanchenko (ghad-cohe-V08-00-02)
-------------------------------------------------
G4UHadronElasticProcess and G4LElasticB: use np scattering from CHIPS,
fix run time warnings
fix run time warnings
Rename G4LElasticB by G4HadronElastic
24 April 2006 - V.Ivanchenko (ghad-cohe-V08-00-01)
-------------------------------------------------
G4UHadronElasticProcess - new process allows to use G4Isotopes composition
of elements defined by user and uses cross sections from
CHIPS and HP models when appropriate
CHIPS and HP models when appropriate
13 April 2006 - V.Ivanchenko (ghad-cohe-V08-00-00)
-------------------------------------------------
@@ -977,7 +979,7 @@ is added
exchange option, remove low limit on primary momentum;
add limit on secondary kinetic energy; add only s-wave
regime for low momentum scattering
GNUmakfile - introduce dependence on chips
GNUmakfile - introduce dependence on chips
28 Nov 2005 - G. Cosmo (hadr-cohe-V07-01-05)
---------------------------------------------
@@ -990,9 +992,9 @@ is added
25 Nov 2005 - D. Wright (hadr-cohe-V07-01-03)
---------------------------------------------
Add detailed comments of N. Starkov from previous tags to History
Add detailed comments of N. Starkov from previous tags to History
file:
G4DiffElasticHadrNucleus.hh, .cc :
G4DiffElasticHadrNucleus.hh, .cc :
add high energy elastic scattering on protons
add new method HadronProtonDiffCrSec
@@ -1005,7 +1007,7 @@ is added
From V. Ivantchenko: fixed memory leaks
4-momentum balance fixed, tested OK
fixed compiler warnings
25 Nov 2005 - V.Ivanchenko (ghad-cohe-V07-01-03)
------------------------------------------------
Integration of recent development of the subpackage
@@ -42,6 +42,8 @@
#define G4ElasticHadrNucleusHE_h 1
#include <vector>
#include <iostream>
#include <fstream>
#include "globals.hh"
#include "G4ParticleDefinition.hh"
@@ -131,6 +133,14 @@ private:
void FillData(const G4ParticleDefinition* p, G4int idx, G4int Z);
void InFileName(std::ostringstream&, const G4ParticleDefinition* p, G4int Z);
void OutFileName(std::ostringstream&, const G4ParticleDefinition* p, G4int Z);
G4bool ReadLine(std::ifstream&, std::vector<G4double>&);
void WriteLine(std::ofstream&, std::vector<G4double>&);
inline G4double LineInterpol(G4double p0, G4double p2,
G4double c1, G4double c2, G4double p);
@@ -148,6 +158,9 @@ private:
static const G4int fHadronType[NHADRONS];
static const G4int fHadronType1[NHADRONS];
static G4bool fStoreToFile;
static G4bool fRetrieveFromFile;
// momemtum limits
G4double ekinLowLimit;
G4double dQ2;
@@ -182,6 +195,8 @@ private:
static G4ElasticData* fElasticData[NHADRONS][ZMAX];
G4NistManager* nistManager;
char* fDirectory;
G4bool isMaster;
#ifdef G4MULTITHREADED
@@ -89,7 +89,6 @@ GEANT4_DEFINE_MODULE(NAME G4hadronic_coherent_elastic
G4geometrymng
G4globman
G4had_mod_man
G4had_neu_hp
G4hadronic_mgt
G4hadronic_util
G4hadronic_xsect
@@ -85,6 +85,9 @@ G4ElasticHadrNucleusHE::fElasticData[NHADRONS][ZMAX] = {{nullptr}};
G4Mutex G4ElasticHadrNucleusHE::elasticMutex = G4MUTEX_INITIALIZER;
#endif
G4bool G4ElasticHadrNucleusHE::fStoreToFile = false;
G4bool G4ElasticHadrNucleusHE::fRetrieveFromFile = false;
const G4double invGeV = 1.0/CLHEP::GeV;
const G4double MbToGeV2 = 2.568;
const G4double GeV2 = CLHEP::GeV*CLHEP::GeV;
@@ -239,7 +242,7 @@ void G4ElasticData::DefineNucleusParameters(G4int A)
////////////////////////////////////////////////////////////////////
G4ElasticHadrNucleusHE::G4ElasticHadrNucleusHE(const G4String& name)
: G4HadronElastic(name), isMaster(false)
: G4HadronElastic(name), fDirectory(nullptr), isMaster(false)
{
dQ2 = hMass = hMass2 = hLabMomentum = hLabMomentum2 = HadrEnergy
= R1 = R2 = Pnucl = Aeff = HadrTot = HadrSlope = HadrReIm = TotP = DDSect2
@@ -324,6 +327,8 @@ G4ElasticHadrNucleusHE::~G4ElasticHadrNucleusHE()
}
}
}
delete fDirectory;
fDirectory = nullptr;
}
}
@@ -442,7 +447,20 @@ void G4ElasticHadrNucleusHE::FillData(const G4ParticleDefinition* p,
#endif
G4int A = G4lrint(nistManager->GetAtomicMassAmu(Z));
G4ElasticData* pElD = new G4ElasticData(p, Z, A, fEnergy);
if(fRetrieveFromFile) {
std::ostringstream ss;
InFileName(ss, p, Z);
std::ifstream infile(ss.str(), std::ios::in);
for(G4int i=0; i<NENERGY; ++i) {
if(ReadLine(infile, pElD->fCumProb[i])) {
continue;
} else {
fRetrieveFromFile = false;
break;
}
}
infile.close();
}
R1 = pElD->R1;
R2 = pElD->R2;
Aeff = pElD->Aeff;
@@ -456,31 +474,44 @@ void G4ElasticHadrNucleusHE::FillData(const G4ParticleDefinition* p,
<<" Pnucl= " << Pnucl << G4endl;
}
for(G4int i=0; i<NENERGY; ++i) {
G4double T = fEnergy[i];
hLabMomentum2 = T*(T + 2.*hMass);
hLabMomentum = std::sqrt(hLabMomentum2);
HadrEnergy = hMass + T;
DefineHadronValues(Z);
Q2max = pElD->maxQ2[i];
if(!fRetrieveFromFile) {
for(G4int i=0; i<NENERGY; ++i) {
G4double T = fEnergy[i];
hLabMomentum2 = T*(T + 2.*hMass);
hLabMomentum = std::sqrt(hLabMomentum2);
HadrEnergy = hMass + T;
DefineHadronValues(Z);
Q2max = pElD->maxQ2[i];
G4int length = FillFq2(A);
(pElD->fCumProb[i]).reserve(length);
G4double norm = 1.0/fLineF[length-1];
G4int length = FillFq2(A);
(pElD->fCumProb[i]).reserve(length);
G4double norm = 1.0/fLineF[length-1];
if(verboseLevel > 0) {
G4cout << "### i= " << i << " Z= " << Z << " A= " << A
<< " length= " << length << " Q2max= " << Q2max << G4endl;
}
(pElD->fCumProb[i]).push_back(0.0);
for(G4int ii=1; ii<length-1; ++ii) {
(pElD->fCumProb[i]).push_back(fLineF[ii]*norm);
if(verboseLevel > 2) {
G4cout << " ii= " << ii << " val= " << (pElD->fCumProb[i])[ii] << G4endl;
if(verboseLevel > 0) {
G4cout << "### i= " << i << " Z= " << Z << " A= " << A
<< " length= " << length << " Q2max= " << Q2max << G4endl;
}
(pElD->fCumProb[i]).push_back(0.0);
for(G4int ii=1; ii<length-1; ++ii) {
(pElD->fCumProb[i]).push_back(fLineF[ii]*norm);
if(verboseLevel > 2) {
G4cout << " ii= " << ii << " val= "
<< (pElD->fCumProb[i])[ii] << G4endl;
}
}
(pElD->fCumProb[i]).push_back(1.0);
}
(pElD->fCumProb[i]).push_back(1.0);
}
if(fStoreToFile) {
std::ostringstream ss;
OutFileName(ss, p, Z);
std::ofstream fileout(ss.str());
for(G4int i=0; i<NENERGY; ++i) {
WriteLine(fileout, pElD->fCumProb[i]);
}
fileout.close();
}
if(verboseLevel > 0) {
@@ -489,6 +520,7 @@ void G4ElasticHadrNucleusHE::FillData(const G4ParticleDefinition* p,
<< " A= " << A << G4endl;
}
fElasticData[idx][Z] = pElD;
#ifdef G4MULTITHREADED
}
G4MUTEXUNLOCK(&elasticMutex);
@@ -1347,3 +1379,63 @@ void G4ElasticHadrNucleusHE::Binom()
///////////////////////////////////////////////////////////
void
G4ElasticHadrNucleusHE::InFileName(std::ostringstream& ss,
const G4ParticleDefinition* p, G4int Z)
{
if(!fDirectory) {
fDirectory = std::getenv("G4LEDATA");
if (fDirectory) {
ss << fDirectory << "/";
}
}
OutFileName(ss, p, Z);
}
///////////////////////////////////////////////////////////
void
G4ElasticHadrNucleusHE::OutFileName(std::ostringstream& ss,
const G4ParticleDefinition* p, G4int Z)
{
ss << "hedata/" << p->GetParticleName() << Z << ".dat";
}
///////////////////////////////////////////////////////////
G4bool G4ElasticHadrNucleusHE::ReadLine(std::ifstream& infile,
std::vector<G4double>& v)
{
G4int n(0);
infile >> n;
if (infile.fail()) { return false; }
if(n > 0) {
v.reserve(n);
G4double x(0.0);
for(G4int i=0; i<n; ++i) {
infile >> x;
if (infile.fail()) { return false; }
v.emplace_back(x);
}
}
return true;
}
///////////////////////////////////////////////////////////
void G4ElasticHadrNucleusHE::WriteLine(std::ofstream& outfile,
std::vector<G4double>& v)
{
G4int n = v.size();
outfile << n << G4endl;
if(n > 0) {
for(G4int i=0; i<n; ++i) {
outfile << v[i] << " ";
}
outfile << G4endl;
}
}
///////////////////////////////////////////////////////////