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,38 +7,54 @@
History file for High Precision Neutron model
---------------------------------------------
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)
---------------------------------------------------------------
28 May 2020 Ben Morgan (hadr-hpp-V10-06-06)
---------------------------------------------------
- Remove obsolete GRANULAR_DEPENDENCIES entries
- Use add_definitions to set PHP_AS_HP when required
05 May 2020 Gunter Folger (hadr-hpp-V10-05-10)
19 May 2020 Alberto Ribon (hadr-hpp-V10-06-05)
-----------------------------------------------
- G4ParticleHPNames, G4ParticleHPProduct, G4ParticleHPInelastic,
G4ParticleHPInelasticData, G4ParticleHPElasticData,
G4ParticleHPCaptureData, G4ParticleHPFissionData : allowed the
printout only if the global hadronic verbosity level is not zero.
05 May 2020 Gunter Folger (hadr-hpp-V10-06-04)
-------------------------------------------------
- fix for clang10: Correct copy ctor in G4ParticleHPDataPoint.hh
using default implementation
18 February 2020 Dennis Wright
18 February 2020 Dennis Wright (hadr-hpp-V10-06-03)
----------------------------------------------------
- fix (from Artem Zontikov) bug 1838:
G4ParticleHPInelasticBaseFS.cc,
G4ParticleHPInelasticBaseFS.cc,
lines 412-413, 599-600: use QI[0]-QI[it] for excitation
line 442: add particle definition protection to iLevel calculation
13 February 2020 Dennis Wright
13 February 2020 Dennis Wright (hadr-hpp-V10-06-02)
----------------------------------------------------
- fix (from Artem Zontikov) bug 1824:
change line 166 of G4ParticleHPInelasticBaseFS.cc to
theFinalStatePhotons->InitPartials(theData, theXsection);
- fix (from Artem Zontikov) bug 1824:
change line 166 of G4ParticleHPInelasticBaseFS.cc to
theFinalStatePhotons->InitPartials(theData, theXsection);
change line 182 of G4ParticleHPInelasticCompFS.cc to
change line 182 of G4ParticleHPInelasticCompFS.cc to
theFinalStatePhotons[it]->InitPartials(theData, theXsection[50]);
remove line delete [] theReactionXsec; in ~G4ParticleHPPhotonDist() as memory
remove line delete [] theReactionXsec; in ~G4ParticleHPPhotonDist() as memory
allocation does not take place in this class
15 January 2020 Dennis Wright
17 January 2020 Alberto Ribon (hadr-hpp-V10-06-01)
----------------------------------------------------
- G4ParticleHPHash, G4ParticleHPCaptureFS : taken into account the difference
between 'size_t' and 'G4int' to avoid warnings (seen on Windows).
15 January 2020 Dennis Wright (hadr-hpp-V10-06-00)
---------------------------------------------------
- G4ParticleHPThermalScvattering::create_E_isoAng_from_energy :
add fatal exception for case when pointers panEPM_T_EL or panEPM_T_EH
@@ -50,7 +66,7 @@ code and to keep track of all tags.
result in the method Sample.
- G4ParticleHPKallbachMannSyst : added the possibility of tritium and He3
projectiles in the "A" method, taking in this case (arbitrarily) an
intermediate value between the two already considered cases
intermediate value between the two already considered cases
(proton-neutron-deuteron and alpha).
Note: these two fixes are needed to avoid crashes seen only with the physics
list QGSP_BIC_AllHP. They should be checked and confirmed by experts.
@@ -73,26 +89,26 @@ Two more corrections from Emilio:
Add Emilio Mendoza's improvements and bug fixes:
- G4ParticleHPChannel, G4ParticleHPNames: allow using an incomplete data
library name if the environment variable G4NEUTRONHP_SKIP_MISSING_ISOTOPES
is set. The missing cross sections are then set to 0.
- G4ParticleHPContAngularPar: redefine residual mass to consider incident
is set. The missing cross sections are then set to 0.
- G4ParticleHPContAngularPar: redefine residual mass to consider incident
particles other than neutrons.
- G4ParticleHPInelasticBaseFS: add protection against residual with Z<0 or A<Z,
do not apply adjust_final_state when data is in MF=6 format (no correlated
particle emission),
particle emission),
bug correction (add Q value info to G4ParticleHPNBodyPhaseSpace)
- G4ParticleHPInelasticCompFS: re-build method two_body_reaction() to be used by
- G4ParticleHPInelasticCompFS: re-build method two_body_reaction() to be used by
incident charged particles (now isotropic emission in the CMS).
Also restrict nresp use below 20 MeV.
Add photon emission when no data available.
Also restrict nresp use below 20 MeV.
Add photon emission when no data available.
- G4ParticleHPEnAngCorrelation: delete part of code trying to preserve baryon
number - one has to assume that it is not preserved when using ENDF-6 data.
- G4ParticleHPKallbachMannSyst: bug fixes
25 June 2019 Dennis Wright (hadr-hpp-V10-05-05)
------------------------------------------------
- G4ParticleHPInelasticCompFS.cc : adopt fix of bug #2166 (A. Zontikov) to
avoid arbitrary number of target nuclei being generated and slowing down
multithreaded operation.
avoid arbitrary number of target nuclei being generated and slowing down
multithreaded operation.
24 June 2019 Alberto Ribon (hadr-hpp-V10-05-04)
------------------------------------------------
@@ -106,30 +122,30 @@ Add Emilio Mendoza's improvements and bug fixes:
------------------------------------------------
- fix of bug report 2167
Adopted fix of Artem Zontikov to deal with un-incremented index of photons
in G4ParticleHPPhotonDist::GetPhotons. Also clean up dead code in that class.
in G4ParticleHPPhotonDist::GetPhotons. Also clean up dead code in that class.
8 May 2019 Dennis Wright (hadr-hpp-V10-05-02)
----------------------------------------------
- fix of bug report 1838
Adopted fix of Artem Zontikov to deal with incorrect excitation energy
Adopted fix of Artem Zontikov to deal with incorrect excitation energy
when charged particles are emitted during neutron reaction
G4ParticleHPInelasticCompFS.cc : method CompositeApply(), for very small
excitation, change level index from -1 to 0 only if incident and outgoing
G4ParticleHPInelasticCompFS.cc : method CompositeApply(), for very small
excitation, change level index from -1 to 0 only if incident and outgoing
particles are the same.
11 April 2019 Dennis Wright (hadr-hpp-V10-05-01)
-------------------------------------------------
- fix of bug report #1824
- fix of bug report #1824
Adopoted fix of Artem Zontikov to make sure production cross section is
not ignored when sampling discrete gamma emission.
G4ParticleHPPhotonDist.hh : added reaction cross section data member
G4ParticleHPPhotonDist::GetPhotons() modified to statistically suppress
G4ParticleHPPhotonDist::GetPhotons() modified to statistically suppress
gammas when reaction cross section is non-zero.
G4ParticleHPPhotonDist::InitPartials() modified to take cross section
argument
G4ParticleHPInelasticBaseFS.cc and G4ParticleHPInelasticCompFS.cc
modified to change calls to InitPartials to take cross section argument
G4ParticleHPInelasticBaseFS.cc and G4ParticleHPInelasticCompFS.cc
modified to change calls to InitPartials to take cross section argument
6 February 2019 Alberto Ribon (hadr-hpp-V10-05-00)
---------------------------------------------------
@@ -157,12 +173,12 @@ Add Emilio Mendoza's improvements and bug fixes:
- G4ParticleHPElasticFS::ApplyYourself(): use correct reference frames for
calculation of projectile and target momenta. Correction made for cases
when cos(Theta) is given in lab frame and in center of momentum frame.
Partial fix of momentum non-conservation bug report #1918.
Partial fix of momentum non-conservation bug report #1918.
22 October 2018 Dennis Wright (hadr-hpp-V10-04-08)
---------------------------------------------------
- G4ParticleHPCaptureFS::ApplyYourself(): Lorentz boost of neutron into target
frane was backwards - reverse it. Also replace SetDefinition() with
frane was backwards - reverse it. Also replace SetDefinition() with
SetDefinitionAndUpdateE() in line 75. Fixes bug report #1919.
11 October 2018 Gabriele Cosmo (hadr-hpp-V10-04-07)
@@ -176,19 +192,19 @@ Add Emilio Mendoza's improvements and bug fixes:
4 September 2018 Dennis Wright (hadr-hpp-V10-04-06)
----------------------------------------------------
- Bug 2026: Fix provided by Artem Zontikov.
Solves memory leaks in G4ParticleHPContEnergyAngular::Sample() and
G4ParticleHPContAngularPar::cacheInit()
- Bug 2026: Fix provided by Artem Zontikov.
Solves memory leaks in G4ParticleHPContEnergyAngular::Sample() and
G4ParticleHPContAngularPar::cacheInit()
24 August 2018 Dennis Wright (hadr-hpp-V10-04-05)
--------------------------------------------------
- Fix bug 1789: gamma level mismatch in G4ParticleHPInelasticCompFS.cc
Not a complete fix because gamma data comes from ENSDF and does not
necessarily match excitations in ENDF.
necessarily match excitations in ENDF.
24 August 2018 Dennis Wright (hadr-hpp-V10-04-04)
--------------------------------------------------
- Fix bug 1745: incorrect sampling of isotropic distribution in
- Fix bug 1745: incorrect sampling of isotropic distribution in
G4ParticleHPPhotonDist.cc
G4ParticleHPCaptureFS.cc
G4ParticleHPFissionFS.cc
@@ -219,9 +235,9 @@ Add Emilio Mendoza's improvements and bug fixes:
29 November 2017 Tatsumi Koi (hadr-hpp-V10-03-09)
---------------------------------------------------
- Change tolerance value and implementation in calculation of KallbachZero.
- Change tolerance value and implementation in calculation of KallbachZero.
FPE errors occurred on several platforms in previous implementations
-Apply some codes cleanup
-Apply some codes cleanup
3 November 2017 Tatsumi Koi (hadr-hpp-V10-03-08)
@@ -231,18 +247,18 @@ Add Emilio Mendoza's improvements and bug fixes:
5 Oct 2017 Tatsumi Koi (hadr-hpp-V10-03-07)
---------------------------------------------------
- Fix bug in coherent elastic scattering
- Fix bug in coherent elastic scattering
Contribution from N. H. TRAN@CEA
16 Aug 2017 Tatsumi Koi (hadr-hpp-V10-03-06)
---------------------------------------------------
- Remove test codes for the problem mac1011
- Remove test codes for the problem mac1011
11 Aug 2017 Tatsumi Koi (hadr-hpp-V10-03-05)
---------------------------------------------------
- A test for mac1011 problem on CDash
- A test for mac1011 problem on CDash
18 July 2017 Tatsumi Koi (hadr-hpp-V10-03-04)
@@ -258,8 +274,8 @@ Add Emilio Mendoza's improvements and bug fixes:
27 April 2017 Andrea Dotti (hadr-hpp-V10-03-02)
--------------------------------------------------
- Fix in destructor of processes to protect agains concurrent
deletion
- Fix in destructor of processes to protect agains concurrent
deletion
24 April 2017 Tatsumi Koi (hadr-hpp-V10-03-01)
@@ -274,7 +290,7 @@ Add Emilio Mendoza's improvements and bug fixes:
15 November 2016 Tatsumi Koi (hadr-hpp-V10-02-35)
---------------------------------------------------
-Fix Coverity 82426
-Fix Coverity 82426
-Fix Coverity 58745
@@ -302,8 +318,8 @@ Add Emilio Mendoza's improvements and bug fixes:
4 November 2016 Tatsumi Koi (hadr-hpp-V10-02-30)
---------------------------------------------------
-Fix problem of uninitilaization of cache in "G4ParticleHPContAngularPar", which happens in "DO_NOT_SET_PHP_AS_HP" enviroment
-Fix problem of divide by zero error in "G4ParticleHPContAngularPar::BuildByInterpolation", which happens in "DO_NOT_SET_PHP_AS_HP" enviroment
-Fix problem of uninitilaization of cache in "G4ParticleHPContAngularPar", which happens in "DO_NOT_SET_PHP_AS_HP" enviroment
-Fix problem of divide by zero error in "G4ParticleHPContAngularPar::BuildByInterpolation", which happens in "DO_NOT_SET_PHP_AS_HP" enviroment
-Fix wrong residual in case of He3 projectile Bugzilla #1906
@@ -379,7 +395,7 @@ and GetIsoCrossSection is called multiple time in calculation of element which i
2 June 2016 Tatsumi Koi (hadr-hpp-V10-02-16)
---------------------------------------------------
- Bug fix usage of G4Nucleus::GetBiassedThermalNucleus
- Bug fix usage of G4Nucleus::GetBiassedThermalNucleus
- Bug fix for calculation residual A and Z (Bugzilla 1815)
- Both of them effects results only in charged particle projectiles
- Bug fix in sampling of kinematic energy of scattered particle in DiscreteTwoBody (Bugzilla 1815)
@@ -395,7 +411,7 @@ and GetIsoCrossSection is called multiple time in calculation of element which i
30 May 2016 Tatsumi Koi (hadr-hpp-V10-02-14)
---------------------------------------------------
- Fix coverity issues 58644
- Round2 Fix coverity issues 58648
- Round2 Fix coverity issues 58648
- Fix warning message in previous tag
@@ -417,8 +433,8 @@ and GetIsoCrossSection is called multiple time in calculation of element which i
30 March 2016 Tatsumi Koi (hadr-hpp-V10-02-09)
---------------------------------------------------
-A message about a behavior under the activation of fission fragment production
was modified reflecting hyper news comment.
-A message about a behavior under the activation of fission fragment production
was modified reflecting hyper news comment.
4 March 2016 Tatsumi Koi (hadr-hpp-V10-02-08)
@@ -469,7 +485,7 @@ charged particle hp
20 November 2015 Tatsumi Koi (hadr-hpp-V10-01-31)
---------------------------------------------------
- Fix for solving reproducibility problem
- Fix for solving reproducibility problem
11 November 2015 Tatsumi Koi (hadr-hpp-V10-01-30)
@@ -490,7 +506,7 @@ charged particle hp
4 November 2015 Tatsumi Koi (hadr-hpp-V10-01-27)
---------------------------------------------------
- Fix problem on previous tag
- Fix problem on previous tag
4 November 2015 Tatsumi Koi (hadr-hpp-V10-01-26)
@@ -505,7 +521,7 @@ Fix problem on include/G4InterpolationIterator.hh
3 November 2015 Tatsumi Koi (hadr-hpp-V10-01-24)
---------------------------------------------------
Move header files from NeutronHP for keeping backward compatibility
Move header files from NeutronHP for keeping backward compatibility
Add NeutronHP.History which is a copy of History in neutron_hp
Add FissFragGen.History which is a copy of FissFragHistory in neutron_hp
@@ -543,7 +559,7 @@ Enable to use dynamically generated materials
1 July 2015 Tatsumi Koi (hadr-hpp-V10-01-17)
---------------------------------------------------
Fix problem on UI commands defined in ParticleHPMessenger
Add UI command for changing verbose level
Add UI command for changing verbose level
29 June 2015 Tatsumi Koi (hadr-hpp-V10-01-16)
@@ -554,7 +570,7 @@ Fix reproducibility problem on multithreading mode
16 June 2015 Tatsumi Koi (hadr-hpp-V10-01-15)
---------------------------------------------------
Fix out of bound array error
Fix out of bound array error
11 June 2015 Tatsumi Koi (hadr-hpp-V10-01-14)
@@ -575,7 +591,7 @@ Fix problem on photon distribution Bugzilla #1745
4 June 2015 Tatsumi Koi (hadr-hpp-V10-01-11)
---------------------------------------------------
-Fix warning in previous tag
-Fix warning in previous tag
3 June 2015 Tatsumi Koi (hadr-hpp-V10-01-10)
@@ -596,7 +612,7 @@ Fix problem on photon distribution Bugzilla #1745
21 May 2015 Tatsumi Koi (hadr-hpp-V10-01-07)
---------------------------------------------------
-Fix warning in previous tag
-Fix warning in previous tag
12 May 2015 Tatsumi Koi (hadr-hpp-V10-01-06)
@@ -675,7 +691,7 @@ hadr-hpn-V10-00-17
src/G4ParticleHPInelasticData.cc
10 June 2014 Tatsumi Koi
10 June 2014 Tatsumi Koi
for Pedro Arce and Emilio Mendoza of CIEMAT (hadr-hpp-V10-00-00)
---------------------------------------------------
- Regenerate particle_hp codes from hadr-hpn-V10-00-12
@@ -432,7 +432,6 @@ GEANT4_DEFINE_MODULE(NAME G4had_par_hp
G4globman
G4had_mod_man
G4had_mod_util
G4hadronic_LE
G4hadronic_deex_management
G4hadronic_deex_photon_evaporation
G4hadronic_deex_util
@@ -469,10 +468,7 @@ GEANT4_DEFINE_MODULE(NAME G4had_par_hp
# List any source specific properties here
if("$ENV{PHP_AS_HP}")
set_source_files_properties(
${G4had_par_hp_SOURCES}
PROPERTIES COMPILE_DEFINITIONS PHP_AS_HP
)
add_definitions(-DPHP_AS_HP)
endif()
@@ -45,6 +45,7 @@
#include "G4ParticleHPData.hh"
#include "G4ParticleHPManager.hh"
#include "G4Threading.hh"
#include "G4HadronicParameters.hh"
#include "G4Pow.hh"
G4ParticleHPCaptureData::G4ParticleHPCaptureData()
@@ -125,9 +126,13 @@ void G4ParticleHPCaptureData::BuildPhysicsTable(const G4ParticleDefinition& aP)
//080428
if ( G4ParticleHPManager::GetInstance()->GetNeglectDoppler() )
{
G4cout << "Find a flag of \"G4NEUTRONHP_NEGLECT_DOPPLER\"." << G4endl;
G4cout << "On the fly Doppler broadening will be neglect in the cross section calculation of capture reaction of neutrons (<20MeV)." << G4endl;
onFlightDB = false;
#ifdef G4VERBOSE
if ( G4HadronicParameters::Instance()->GetVerboseLevel() > 0 ) {
G4cout << "Find a flag of \"G4NEUTRONHP_NEGLECT_DOPPLER\"." << G4endl;
G4cout << "On the fly Doppler broadening will be neglect in the cross section calculation of capture reaction of neutrons (<20MeV)." << G4endl;
}
#endif
}
if ( G4Threading::IsWorkerThread() ) {
@@ -149,11 +154,13 @@ void G4ParticleHPCaptureData::BuildPhysicsTable(const G4ParticleDefinition& aP)
static G4ThreadLocal G4ElementTable *theElementTable = 0 ; if (!theElementTable) theElementTable= G4Element::GetElementTable();
for( size_t i=0; i<numberOfElements; ++i )
{
#ifdef G4VERBOSE
if(std::getenv("CaptureDataIndexDebug"))
{
G4int index_debug = ((*theElementTable)[i])->GetIndex();
G4cout << "IndexDebug "<< i <<" "<<index_debug<<G4endl;
if ( G4HadronicParameters::Instance()->GetVerboseLevel() > 0 ) G4cout << "IndexDebug "<< i <<" "<<index_debug<<G4endl;
}
#endif
G4PhysicsVector* physVec = G4ParticleHPData::
Instance(G4Neutron::Neutron())->MakePhysicsVector((*theElementTable)[i], this);
theCrossSections->push_back(physVec);
@@ -165,8 +172,11 @@ void G4ParticleHPCaptureData::BuildPhysicsTable(const G4ParticleDefinition& aP)
void G4ParticleHPCaptureData::DumpPhysicsTable(const G4ParticleDefinition& aP)
{
if(&aP!=G4Neutron::Neutron())
throw G4HadronicException(__FILE__, __LINE__, "Attempt to use NeutronHP data for particles other than neutrons!!!");
throw G4HadronicException(__FILE__, __LINE__, "Attempt to use NeutronHP data for particles other than neutrons!!!");
#ifdef G4VERBOSE
if ( G4HadronicParameters::Instance()->GetVerboseLevel() == 0 ) return;
//
// Dump element based cross section
// range 10e-5 eV to 20 MeV
@@ -208,8 +218,8 @@ void G4ParticleHPCaptureData::DumpPhysicsTable(const G4ParticleDefinition& aP)
G4cout << G4endl;
}
// G4cout << "G4ParticleHPCaptureData::DumpPhysicsTable still to be implemented"<<G4endl;
//G4cout << "G4ParticleHPCaptureData::DumpPhysicsTable still to be implemented"<<G4endl;
#endif
}
#include "G4NucleiProperties.hh"
@@ -224,7 +224,7 @@
G4bool residual = false;
G4ParticleDefinition * aRecoil = G4IonTable::GetIonTable()
->GetIon(static_cast<G4int>(theBaseZ), static_cast<G4int>(theBaseA+1), 0);
for ( G4int j = 0 ; j != theResult.Get()->GetNumberOfSecondaries() ; j++ )
for ( std::size_t j = 0 ; j != theResult.Get()->GetNumberOfSecondaries() ; j++ )
{
if ( theResult.Get()->GetSecondary(j)->GetParticle()->GetDefinition() == aRecoil ) residual = true;
}
@@ -233,7 +233,7 @@
{
G4int nNonZero = 0;
G4LorentzVector p_photons(0,0,0,0);
for ( G4int j = 0 ; j != theResult.Get()->GetNumberOfSecondaries() ; j++ )
for ( std::size_t j = 0 ; j != theResult.Get()->GetNumberOfSecondaries() ; j++ )
{
p_photons += theResult.Get()->GetSecondary(j)->GetParticle()->Get4Momentum();
// To many 0 momentum photons -> Check PhotonDist
@@ -44,6 +44,7 @@
#include "G4ElementTable.hh"
#include "G4ParticleHPData.hh"
#include "G4ParticleHPManager.hh"
#include "G4HadronicParameters.hh"
#include "G4Pow.hh"
G4ParticleHPElasticData::G4ParticleHPElasticData()
@@ -123,9 +124,13 @@ void G4ParticleHPElasticData::BuildPhysicsTable(const G4ParticleDefinition& aP)
//080428
if ( G4ParticleHPManager::GetInstance()->GetNeglectDoppler() )
{
G4cout << "Find a flag of \"G4NEUTRONHP_NEGLECT_DOPPLER\"." << G4endl;
G4cout << "On the fly Doppler broadening will be neglect in the cross section calculation of elastic scattering of neutrons (<20MeV)." << G4endl;
onFlightDB = false;
#ifdef G4VERBOSE
if ( G4HadronicParameters::Instance()->GetVerboseLevel() > 0 ) {
G4cout << "Find a flag of \"G4NEUTRONHP_NEGLECT_DOPPLER\"." << G4endl;
G4cout << "On the fly Doppler broadening will be neglect in the cross section calculation of elastic scattering of neutrons (<20MeV)." << G4endl;
}
#endif
}
if ( G4Threading::IsWorkerThread() ) {
@@ -159,6 +164,9 @@ void G4ParticleHPElasticData::DumpPhysicsTable(const G4ParticleDefinition& aP)
if(&aP!=G4Neutron::Neutron())
throw G4HadronicException(__FILE__, __LINE__, "Attempt to use NeutronHP data for particles other than neutrons!!!");
#ifdef G4VERBOSE
if ( G4HadronicParameters::Instance()->GetVerboseLevel() == 0 ) return;
//
// Dump element based cross section
// range 10e-5 eV to 20 MeV
@@ -200,8 +208,8 @@ void G4ParticleHPElasticData::DumpPhysicsTable(const G4ParticleDefinition& aP)
G4cout << G4endl;
}
// G4cout << "G4ParticleHPElasticData::DumpPhysicsTable still to be implemented"<<G4endl;
//G4cout << "G4ParticleHPElasticData::DumpPhysicsTable still to be implemented"<<G4endl;
#endif
}
#include "G4Nucleus.hh"
@@ -42,6 +42,7 @@
#include "G4ElementTable.hh"
#include "G4ParticleHPData.hh"
#include "G4ParticleHPManager.hh"
#include "G4HadronicParameters.hh"
#include "G4Pow.hh"
G4ParticleHPFissionData::G4ParticleHPFissionData()
@@ -115,9 +116,13 @@ void G4ParticleHPFissionData::BuildPhysicsTable(const G4ParticleDefinition& aP)
{
if ( G4ParticleHPManager::GetInstance()->GetNeglectDoppler() ) {
G4cout << "Find a flag of \"G4NEUTRONHP_NEGLECT_DOPPLER\"." << G4endl;
G4cout << "On the fly Doppler broadening will be neglect in the cross section calculation of fission reaction of neutrons (<20MeV)." << G4endl;
onFlightDB = false;
#ifdef G4VERBOSE
if ( G4HadronicParameters::Instance()->GetVerboseLevel() > 0 ) {
G4cout << "Find a flag of \"G4NEUTRONHP_NEGLECT_DOPPLER\"." << G4endl;
G4cout << "On the fly Doppler broadening will be neglect in the cross section calculation of fission reaction of neutrons (<20MeV)." << G4endl;
}
#endif
}
if(&aP!=G4Neutron::Neutron())
@@ -153,8 +158,11 @@ void G4ParticleHPFissionData::BuildPhysicsTable(const G4ParticleDefinition& aP)
void G4ParticleHPFissionData::DumpPhysicsTable(const G4ParticleDefinition& aP)
{
if(&aP!=G4Neutron::Neutron())
throw G4HadronicException(__FILE__, __LINE__, "Attempt to use NeutronHP data for particles other than neutrons!!!");
throw G4HadronicException(__FILE__, __LINE__, "Attempt to use NeutronHP data for particles other than neutrons!!!");
#ifdef G4VERBOSE
if ( G4HadronicParameters::Instance()->GetVerboseLevel() == 0 ) return;
//
// Dump element based cross section
// range 10e-5 eV to 20 MeV
@@ -204,6 +212,7 @@ void G4ParticleHPFissionData::DumpPhysicsTable(const G4ParticleDefinition& aP)
}
//G4cout << "G4ParticleHPFissionData::DumpPhysicsTable still to be implemented"<<G4endl;
#endif
}
#include "G4NucleiProperties.hh"
@@ -41,6 +41,7 @@
#include "G4ParticleHPInelastic.hh"
#include "G4SystemOfUnits.hh"
#include "G4ParticleHPManager.hh"
#include "G4HadronicParameters.hh"
#include "G4Threading.hh"
G4ParticleHPInelastic::G4ParticleHPInelastic(G4ParticleDefinition* projectile, const char* name )
@@ -49,54 +50,60 @@ G4ParticleHPInelastic::G4ParticleHPInelastic(G4ParticleDefinition* projectile, c
,numEle(0)
,theProjectile(projectile)
{
G4String baseName;
if ( std::getenv("G4PARTICLEHPDATA") ) {
baseName = std::getenv( "G4PARTICLEHPDATA" );
}
//const char* dataDirVariable;
G4String particleName;
if( theProjectile == G4Neutron::Neutron() ) {
dataDirVariable = "G4NEUTRONHPDATA";
}else if( theProjectile == G4Proton::Proton() ) {
dataDirVariable = "G4PROTONHPDATA";
particleName = "Proton";
}else if( theProjectile == G4Deuteron::Deuteron() ) {
dataDirVariable = "G4DEUTERONHPDATA";
particleName = "Deuteron";
}else if( theProjectile == G4Triton::Triton() ) {
dataDirVariable = "G4TRITONHPDATA";
particleName = "Triton";
}else if( theProjectile == G4He3::He3() ) {
dataDirVariable = "G4HE3HPDATA";
particleName = "He3";
}else if( theProjectile == G4Alpha::Alpha() ) {
dataDirVariable = "G4ALPHAHPDATA";
particleName = "Alpha";
} else {
G4String message("G4ParticleHPInelastic may only be called for neutron, proton, deuteron, triton, He3 or alpha, while it is called for " + theProjectile->GetParticleName());
throw G4HadronicException(__FILE__, __LINE__,message.c_str());
}
G4String baseName;
if ( std::getenv("G4PARTICLEHPDATA") ) {
baseName = std::getenv( "G4PARTICLEHPDATA" );
}
//const char* dataDirVariable;
G4String particleName;
if ( theProjectile == G4Neutron::Neutron() ) {
dataDirVariable = "G4NEUTRONHPDATA";
} else if( theProjectile == G4Proton::Proton() ) {
dataDirVariable = "G4PROTONHPDATA";
particleName = "Proton";
} else if( theProjectile == G4Deuteron::Deuteron() ) {
dataDirVariable = "G4DEUTERONHPDATA";
particleName = "Deuteron";
} else if( theProjectile == G4Triton::Triton() ) {
dataDirVariable = "G4TRITONHPDATA";
particleName = "Triton";
} else if( theProjectile == G4He3::He3() ) {
dataDirVariable = "G4HE3HPDATA";
particleName = "He3";
} else if( theProjectile == G4Alpha::Alpha() ) {
dataDirVariable = "G4ALPHAHPDATA";
particleName = "Alpha";
} else {
G4String message("G4ParticleHPInelastic may only be called for neutron, proton, deuteron, triton, He3 or alpha, while it is called for " + theProjectile->GetParticleName());
throw G4HadronicException(__FILE__, __LINE__,message.c_str());
}
SetMinEnergy( 0.0 );
SetMaxEnergy( 20.*MeV );
// G4cout << " entering G4ParticleHPInelastic constructor"<<G4endl;
if ( !std::getenv("G4PARTICLEHPDATA") && !std::getenv(dataDirVariable) ) {
G4String message( "Please set the environement variable " + G4String(dataDirVariable) + " to point to the " + theProjectile->GetParticleName() + " cross-section files." );
throw G4HadronicException(__FILE__, __LINE__,message.c_str());
}
if ( std::getenv(dataDirVariable) ) {
dirName = std::getenv(dataDirVariable);
} else {
dirName = baseName + "/" + particleName;
}
G4cout << dirName << G4endl;
//G4cout << " entering G4ParticleHPInelastic constructor"<<G4endl;
if ( !std::getenv("G4PARTICLEHPDATA") && !std::getenv(dataDirVariable) ) {
G4String message( "Please set the environement variable " + G4String(dataDirVariable) + " to point to the " + theProjectile->GetParticleName() + " cross-section files." );
throw G4HadronicException(__FILE__, __LINE__,message.c_str());
}
if ( std::getenv(dataDirVariable) ) {
dirName = std::getenv(dataDirVariable);
} else {
dirName = baseName + "/" + particleName;
}
#ifdef G4VERBOSE
if ( G4HadronicParameters::Instance()->GetVerboseLevel() > 0 ) G4cout << dirName << G4endl;
#endif
G4String tString = "/Inelastic";
dirName = dirName + tString;
//numEle = G4Element::GetNumberOfElements();
G4cout << "@@@ G4ParticleHPInelastic instantiated for particle " << theProjectile->GetParticleName() << " data directory variable is " << dataDirVariable << " pointing to " << dirName << G4endl;
#ifdef G4VERBOSE
if ( G4HadronicParameters::Instance()->GetVerboseLevel() > 0 )
G4cout << "@@@ G4ParticleHPInelastic instantiated for particle " << theProjectile->GetParticleName() << " data directory variable is " << dataDirVariable << " pointing to " << dirName << G4endl;
#endif
/*
theInelastic = new G4ParticleHPChannelList[numEle];
@@ -276,7 +283,10 @@ throw G4HadronicException(__FILE__, __LINE__, "Channel: Do not know what to do w
xSec[i] *= rWeight;
sum+=xSec[i];
#ifdef G4PHPDEBUG
if( std::getenv("G4ParticleHPDebug") ) G4cout << " G4ParticleHPInelastic XSEC ELEM " << i << " = " << xSec[i] << G4endl;
#ifdef G4VERBOSE
if( std::getenv("G4ParticleHPDebug") && G4HadronicParameters::Instance()->GetVerboseLevel() > 0 )
G4cout << " G4ParticleHPInelastic XSEC ELEM " << i << " = " << xSec[i] << G4endl;
#endif
#endif
}
@@ -294,7 +304,10 @@ throw G4HadronicException(__FILE__, __LINE__, "Channel: Do not know what to do w
}
#ifdef G4PHPDEBUG
if( std::getenv("G4ParticleHPDebug") ) G4cout << " G4ParticleHPInelastic SELECTED ELEM " << it << " = " << theMaterial->GetElement(it)->GetName() << " FROM MATERIAL " << theMaterial->GetName() << G4endl;
#ifdef G4VERBOSE
if( std::getenv("G4ParticleHPDebug") && G4HadronicParameters::Instance()->GetVerboseLevel() > 0 )
G4cout << " G4ParticleHPInelastic SELECTED ELEM " << it << " = " << theMaterial->GetElement(it)->GetName() << " FROM MATERIAL " << theMaterial->GetName() << G4endl;
#endif
#endif
//return theInelastic[index].ApplyYourself(theMaterial->GetElement(it), aTrack);
G4HadFinalState* result = ((*theInelastic)[index])->ApplyYourself(theMaterial->GetElement(it), aTrack);
@@ -319,7 +332,10 @@ throw G4HadronicException(__FILE__, __LINE__, "Channel: Do not know what to do w
G4HadSecondary* seco = result->GetSecondary(0);
if(seco) {
G4ThreeVector secoMom = seco->GetParticle()->GetMomentum();
G4cout << " G4ParticleHPinelastic COS THETA " << std::cos(secoMom.theta()) <<" " << secoMom << G4endl;
#ifdef G4VERBOSE
if ( G4HadronicParameters::Instance()->GetVerboseLevel() > 0 )
G4cout << " G4ParticleHPinelastic COS THETA " << std::cos(secoMom.theta()) <<" " << secoMom << G4endl;
#endif
}
}
@@ -495,7 +511,10 @@ void G4ParticleHPInelastic::BuildPhysicsTable(const G4ParticleDefinition& projec
dirName = dirName + tString;
*/
G4cout << "@@@ G4ParticleHPInelastic instantiated for particle " << projectile.GetParticleName() << " data directory variable is " << dataDirVariable << " pointing to " << dirName << G4endl;
#ifdef G4VERBOSE
if ( G4HadronicParameters::Instance()->GetVerboseLevel() > 0 )
G4cout << "@@@ G4ParticleHPInelastic instantiated for particle " << projectile.GetParticleName() << " data directory variable is " << dataDirVariable << " pointing to " << dirName << G4endl;
#endif
for (G4int i = numEle ; i < (G4int)G4Element::GetNumberOfElements(); i++)
{
theInelastic->push_back( new G4ParticleHPChannelList );
@@ -558,7 +577,9 @@ void G4ParticleHPInelastic::BuildPhysicsTable(const G4ParticleDefinition& projec
throw G4HadronicException(__FILE__, __LINE__, "Channel: Do not know what to do with this element");
}
*/
if ( G4ParticleHPManager::GetInstance()->GetVerboseLevel() > 1 ) {
#ifdef G4VERBOSE
if ( G4ParticleHPManager::GetInstance()->GetVerboseLevel() > 1 &&
G4HadronicParameters::Instance()->GetVerboseLevel() > 0 ) {
G4cout << "ParticleHP::Inelastic for " << projectile.GetParticleName() << ". Do not know what to do with element of \"" << (*(G4Element::GetElementTable()))[i]->GetName() << "\"." << G4endl;
G4cout << "The components of the element are" << G4endl;
//G4cout << "TKDB dataDirVariable = " << dataDirVariable << G4endl;
@@ -567,6 +588,7 @@ void G4ParticleHPInelastic::BuildPhysicsTable(const G4ParticleDefinition& projec
}
G4cout << "No possible final state data of the element is found in " << dataDirVariable << "." << G4endl;
}
#endif
}
}
hpmanager->RegisterInelasticFinalStates( &projectile , theInelastic );
@@ -41,6 +41,7 @@
#include "G4Neutron.hh"
#include "G4ElementTable.hh"
#include "G4ParticleHPData.hh"
#include "G4HadronicParameters.hh"
#include "G4Pow.hh"
G4ParticleHPInelasticData::G4ParticleHPInelasticData(G4ParticleDefinition* projectile)
@@ -86,7 +87,11 @@ G4ParticleHPInelasticData::G4ParticleHPInelasticData(G4ParticleDefinition* proje
G4String baseName = std::getenv( "G4PARTICLEHPDATA" );
dirName = baseName + "/" + particleName;
}
G4cout << "@@@ G4ParticleHPInelasticData instantiated for particle " << projectile->GetParticleName() << " data directory variable is " << dataDirVariable << " pointing to " << dirName << G4endl;
#ifdef G4VERBOSE
if ( G4HadronicParameters::Instance()->GetVerboseLevel() > 0 ) {
G4cout << "@@@ G4ParticleHPInelasticData instantiated for particle " << projectile->GetParticleName() << " data directory variable is " << dataDirVariable << " pointing to " << dirName << G4endl;
}
#endif
SetMinKinEnergy( 0*CLHEP::MeV );
SetMaxKinEnergy( 20*CLHEP::MeV );
@@ -169,9 +174,13 @@ void G4ParticleHPInelasticData::BuildPhysicsTable( const G4ParticleDefinition& p
//080428
if ( G4ParticleHPManager::GetInstance()->GetNeglectDoppler() )
{
G4cout << "Find a flag of \"G4PHP_NEGLECT_DOPPLER\"." << G4endl;
G4cout << "On the fly Doppler broadening will be neglect in the cross section calculation of inelastic scattering of neutrons (<20MeV)." << G4endl;
onFlightDB = false;
onFlightDB = false;
#ifdef G4VERBOSE
if ( G4HadronicParameters::Instance()->GetVerboseLevel() > 0 ) {
G4cout << "Find a flag of \"G4PHP_NEGLECT_DOPPLER\"." << G4endl;
G4cout << "On the fly Doppler broadening will be neglect in the cross section calculation of inelastic scattering of neutrons (<20MeV)." << G4endl;
}
#endif
}
if ( G4Threading::IsWorkerThread() ) {
@@ -215,6 +224,8 @@ void G4ParticleHPInelasticData::DumpPhysicsTable(const G4ParticleDefinition& pro
if(&projectile!=theProjectile)
throw G4HadronicException(__FILE__, __LINE__, "Attempt to use ParticleHP data for a wrong projectile!!!");
#ifdef G4VERBOSE
if ( G4HadronicParameters::Instance()->GetVerboseLevel() == 0 ) return;
//
// Dump element based cross section
// range 10e-5 eV to 20 MeV
@@ -258,6 +269,7 @@ void G4ParticleHPInelasticData::DumpPhysicsTable(const G4ParticleDefinition& pro
}
//G4cout << "G4ParticleHPInelasticData::DumpPhysicsTable still to be implemented"<<G4endl;
#endif
}
#include "G4NucleiProperties.hh"
@@ -43,6 +43,7 @@
#include "G4ParticleHPManager.hh"
#include "G4SandiaTable.hh"
#include "G4HadronicException.hh"
#include "G4HadronicParameters.hh"
#include <fstream>
const G4String G4ParticleHPNames::theString[100] = {"Hydrogen", "Helium",
@@ -64,12 +65,13 @@
"Einsteinium","Fermium"};
G4String G4ParticleHPNames::GetName(G4int i) { return theString[i]; }
G4String G4ParticleHPNames::GetName(G4int i) { return theString[i]; }
//G4ParticleHPDataUsed G4ParticleHPNames::GetName(G4int A, G4int Z, G4String base, G4String rest, G4bool & aFlag)
G4ParticleHPDataUsed G4ParticleHPNames::GetName(G4int A, G4int Z, G4int M, G4String base, G4String rest, G4bool & aFlag)
{
#ifdef G4VERBOSE
G4int verboseLevel = G4ParticleHPManager::GetInstance()->GetVerboseLevel();
#endif
//G4cout << Z << " " << A << " " << M << " " << base << " " << rest << G4endl;
@@ -85,15 +87,19 @@ G4ParticleHPDataUsed G4ParticleHPNames::GetName(G4int A, G4int Z, G4int M, G4Str
G4ParticleHPDataUsed result;
aFlag = true;
if (std::getenv("NeutronHPNames") ) G4cout << "Names::GetName entered for Z = " << Z << ", A = " << A <<G4endl;
#ifdef G4VERBOSE
if (std::getenv("NeutronHPNames") && G4HadronicParameters::Instance()->GetVerboseLevel() > 0)
G4cout << "Names::GetName entered for Z = " << Z << ", A = " << A <<G4endl;
#endif
G4int myA = A;
G4int myZ = Z;
G4String * theName = 0;
G4String theFileName("");
// G4int inc = 1;
//G4int inc = 1;
G4int flip_Z = 1;
G4int delta_Z = 0;
@@ -101,10 +107,14 @@ G4ParticleHPDataUsed G4ParticleHPNames::GetName(G4int A, G4int Z, G4int M, G4Str
G4int flip_A = 1;
G4int delta_A = 0;
//std::ifstream * check = new std::ifstream(".dummy");
//std::ifstream * check = new std::ifstream(".dummy");
std::istringstream* check = NULL;
G4bool first = true;
if (std::getenv("NeutronHPNames")) G4cout << "entered GetName!!!"<<G4endl;
#ifdef G4VERBOSE
if (std::getenv("NeutronHPNames") && G4HadronicParameters::Instance()->GetVerboseLevel() > 0)
G4cout << "entered GetName!!!"<<G4endl;
#endif
do
{
@@ -118,13 +128,13 @@ G4ParticleHPDataUsed G4ParticleHPNames::GetName(G4int A, G4int Z, G4int M, G4Str
result.SetA(myA);
result.SetZ(myZ);
result.SetM(M);
if(std::getenv("NeutronHPNames")) G4cout <<"HPWD 1 "<<*theName<<G4endl;
//if(std::getenv("NeutronHPNames")) G4cout <<"HPWD 1 "<<*theName<<G4endl;
// T.K. debug for memory leak
if ( check != NULL ) {
//check->close();
delete check;
}
// T.K. debug for memory leak
if ( check != NULL ) {
//check->close();
delete check;
}
//check = new std::ifstream(*theName);
check = new std::istringstream(std::ios::in);
@@ -143,7 +153,7 @@ if(std::getenv("NeutronHPNames")) G4cout <<"HPWD 1 "<<*theName<<G4endl;
*biff = base+"/CrossSection/"+itoa(myZ)+"_"+"nat"+"_"+theString[myZ-1];
delete theName;
theName = biff;
if(std::getenv("NeutronHPNames")) G4cout <<"HPWD 2 "<<*theName<<G4endl;
//if(std::getenv("NeutronHPNames")) G4cout <<"HPWD 2 "<<*theName<<G4endl;
result.SetName(*theName);
G4double natA = myZ/G4SandiaTable::GetZtoA(myZ);
result.SetA(natA);
@@ -166,7 +176,7 @@ if(std::getenv("NeutronHPNames")) G4cout <<"HPWD 2 "<<*theName<<G4endl;
if ( rest=="/CrossSection" ) *biff = base+rest+"/"+itoa(myZ)+"_"+"nat"+"_"+theString[myZ-1];
delete theName;
theName = biff;
if(std::getenv("NeutronHPNames")) G4cout <<"HPWD 3 "<<*theName<<G4endl;
//if(std::getenv("NeutronHPNames")) G4cout <<"HPWD 3 "<<*theName<<G4endl;
result.SetName(*theName);
natA = myZ/G4SandiaTable::GetZtoA(myZ);
result.SetA(natA);
@@ -178,17 +188,17 @@ if(std::getenv("NeutronHPNames")) G4cout <<"HPWD 3 "<<*theName<<G4endl;
}
else
{
// 070706 T. Koi Modified
/*
// 070706 T. Koi Modified
/*
biff = new G4String(); // delete here as theName
*biff = base+"/"+rest+itoa(myZ)+"_"+itoa(myA)+"_"+theString[myZ-1];
if(theName!=0) delete theName;
theName = biff;
if(std::getenv("NeutronHPNames")) G4cout <<"HPWD 4 "<<*theName<<G4endl;
if(std::getenv("NeutronHPNames")) G4cout <<"HPWD 4 "<<*theName<<G4endl;
result.SetName(*theName);
result.SetA(myA);
result.SetZ(myZ);
*/
*/
G4double tmpA = myA;
//std::ifstream* file = NULL;
@@ -198,68 +208,72 @@ if(std::getenv("NeutronHPNames")) G4cout <<"HPWD 4 "<<*theName<<G4endl;
if ( rest == "/CrossSection" )
{
//fileName = base+"/"+rest+"/"+itoa(myZ)+"_"+itoa(myA)+sM+"_"+theString[myZ-1];
fileName = base+rest+"/"+itoa(myZ)+"_"+itoa(myA)+sM+"_"+theString[myZ-1];
if(std::getenv("NeutronHPNames")) G4cout <<"HPWD 4a "<<*theName<<G4endl;
//fileName = base+"/"+rest+"/"+itoa(myZ)+"_"+itoa(myA)+sM+"_"+theString[myZ-1];
fileName = base+rest+"/"+itoa(myZ)+"_"+itoa(myA)+sM+"_"+theString[myZ-1];
//if(std::getenv("NeutronHPNames")) G4cout <<"HPWD 4a "<<*theName<<G4endl;
} else {
} else {
// For FS
fileName = base+"/"+rest+"/"+itoa(myZ)+"_"+itoa(myA)+sM+"_"+theString[myZ-1];
file = new std::istringstream(std::ios::in);
G4ParticleHPManager::GetInstance()->GetDataStream2(fileName,*file);
// For FS
fileName = base+"/"+rest+"/"+itoa(myZ)+"_"+itoa(myA)+sM+"_"+theString[myZ-1];
file = new std::istringstream(std::ios::in);
G4ParticleHPManager::GetInstance()->GetDataStream2(fileName,*file);
if (*file) {
if (*file) {
// isotope FS
if(std::getenv("NeutronHPNames")) G4cout <<"HPWD 4b1 "<<*theName<<G4endl;
} else {
// isotope FS
//if(std::getenv("NeutronHPNames")) G4cout <<"HPWD 4b1 "<<*theName<<G4endl;
} else {
// _nat_ FS
fileName = base+"/"+rest+"/"+itoa(myZ)+"_"+"nat"+"_"+theString[myZ-1];
// _nat_ FS
fileName = base+"/"+rest+"/"+itoa(myZ)+"_"+"nat"+"_"+theString[myZ-1];
delete file;
//file = new std::ifstream(fileName);
file = new std::istringstream(std::ios::in);
G4ParticleHPManager::GetInstance()->GetDataStream2(fileName,*file);
if (*file) {
delete file;
//file = new std::ifstream(fileName);
file = new std::istringstream(std::ios::in);
G4ParticleHPManager::GetInstance()->GetDataStream2(fileName,*file);
if (*file) {
// FS neither isotope nor _nat_
if(std::getenv("NeutronHPNames")) G4cout <<"HPWD 4b2a "<<*theName<<G4endl;
G4double natA = myZ/G4SandiaTable::GetZtoA(myZ);
tmpA = natA;
} else {
if(std::getenv("NeutronHPNames")) G4cout <<"HPWD 4b2c "<<*theName<<G4endl;
fileName="INVALID";
}
}
// FS neither isotope nor _nat_
//if(std::getenv("NeutronHPNames")) G4cout <<"HPWD 4b2a "<<*theName<<G4endl;
G4double natA = myZ/G4SandiaTable::GetZtoA(myZ);
tmpA = natA;
} else {
//if(std::getenv("NeutronHPNames")) G4cout <<"HPWD 4b2c "<<*theName<<G4endl;
fileName="INVALID";
}
}
delete file;
}
delete file;
}
result.SetName(fileName);
result.SetA(tmpA);
result.SetZ(myZ);
result.SetM(M);
result.SetName(fileName);
result.SetA(tmpA);
result.SetZ(myZ);
result.SetM(M);
}
do
{
if (delta_Z > theMaxOffSet) {
if (!G4ParticleHPManager::GetInstance()->GetSkipMissingIsotopes() ) {
G4cout << "G4ParticleHPNames: There are no data available for some isotopes in this material " << G4endl;
G4cout << "G4ParticleHPNames: nor are there data for nearby isotopes." << G4endl;
G4cout << "G4ParticleHPNames: Please make sure G4NEUTRONHPDATA points to the directory " << G4endl;
G4cout << "G4ParticleHPNames: in which the neutron scattering data are located." << G4endl;
G4cout << "G4ParticleHPNames: The material was A = " << A << ", Z = " << Z << G4endl;
throw G4HadronicException(__FILE__, __LINE__, "In case the data sets are at present not available in the neutron data library, please contact Hadron Group Coordinator");
if (!G4ParticleHPManager::GetInstance()->GetSkipMissingIsotopes()) {
#ifdef G4VERBOSE
if ( G4HadronicParameters::Instance()->GetVerboseLevel() > 0 ) {
G4cout << "G4ParticleHPNames: There are no data available for some isotopes in this material " << G4endl;
G4cout << "G4ParticleHPNames: nor are there data for nearby isotopes." << G4endl;
G4cout << "G4ParticleHPNames: Please make sure G4NEUTRONHPDATA points to the directory " << G4endl;
G4cout << "G4ParticleHPNames: in which the neutron scattering data are located." << G4endl;
G4cout << "G4ParticleHPNames: The material was A = " << A << ", Z = " << Z << G4endl;
}
#endif
throw G4HadronicException(__FILE__, __LINE__, "In case the data sets are at present not available in the neutron data library, please contact Hadron Group Coordinator");
} else {
check = new std::istringstream(std::ios::in);
break;
}
}
//if ( std::abs( myA - A ) > theMaxOffSet )
//if ( std::abs( myA - A ) > theMaxOffSet )
if (delta_A > 2*theMaxOffSet) {
delta_A = 0;
flip_A = 1;
@@ -283,7 +297,7 @@ if(std::getenv("NeutronHPNames")) G4cout <<"HPWD 4b2c "<<*theName<<G4endl;
myZ = 1;
}
// myZ += inc;
//myZ += inc;
} else {
if ( flip_A > 0 )
{
@@ -297,7 +311,7 @@ if(std::getenv("NeutronHPNames")) G4cout <<"HPWD 4b2c "<<*theName<<G4endl;
myA = 1;
}
// myA += inc;
//myA += inc;
}
}
@@ -306,13 +320,16 @@ if(std::getenv("NeutronHPNames")) G4cout <<"HPWD 4b2c "<<*theName<<G4endl;
}
while((!check) || (!(*check))); // Loop checking, 11.05.2015, T. Koi
if(std::getenv("NeutronHPNamesLogging") || std::getenv("NeutronHPNames"))
#ifdef G4VERBOSE
if( (std::getenv("NeutronHPNamesLogging") || std::getenv("NeutronHPNames")) &&
G4HadronicParameters::Instance()->GetVerboseLevel() > 0 )
{
G4cout << "Names::GetName: last theName proposal = "<< G4endl;
G4cout << *theName <<" "<<A<<" "<<Z<<" "<<result.GetName()<<G4endl;
}
// administration and anouncement for lacking of exact data in NDL
#endif
// administration and anouncement for lacking of exact data in NDL
if ( Z != result.GetZ() || A != result.GetA() )
{
if ( rest == "/CrossSection" )
@@ -322,9 +339,11 @@ if(std::getenv("NeutronHPNames")) G4cout <<"HPWD 4b2c "<<*theName<<G4endl;
reac.erase ( 0 , dir.length() );
if ( G4ParticleHPManager::GetInstance()->GetSkipMissingIsotopes() && !( Z == result.GetZ() && result.IsThisNaturalAbundance() ) )
{
if ( verboseLevel > 0 ) {
#ifdef G4VERBOSE
if ( verboseLevel > 0 && G4HadronicParameters::Instance()->GetVerboseLevel() > 0 ) {
G4cout << "NeutronHP: " << reac << " file for Z = " << Z << ", A = " << A << " is not found and CrossSection set to 0." << G4endl;
}
#endif
G4String new_name = base+"/"+rest+"/"+"0_0_Zero";
result.SetName( new_name );
}
@@ -342,9 +361,11 @@ if(std::getenv("NeutronHPNames")) G4cout <<"HPWD 4b2c "<<*theName<<G4endl;
}
else
{
if ( verboseLevel > 0 ) {
#ifdef G4VERBOSE
if ( verboseLevel > 0 && G4HadronicParameters::Instance()->GetVerboseLevel() > 0 ) {
G4cout << "NeutronHP: " << reac << " file for Z = " << Z << ", A = " << A << " is not found and NeutronHP will use " << result.GetName() << G4endl;
}
#endif
}
}
}
@@ -358,4 +379,4 @@ if(std::getenv("NeutronHPNames")) G4cout <<"HPWD 4b2c "<<*theName<<G4endl;
check = NULL;
}
return result;
}
}
@@ -40,6 +40,7 @@
#include "G4ParticleHPProduct.hh"
#include "G4Poisson.hh"
#include "G4Proton.hh"
#include "G4HadronicParameters.hh"
G4int G4ParticleHPProduct::GetMultiplicity(G4double anEnergy )
{
@@ -78,8 +79,11 @@ G4int G4ParticleHPProduct::GetMultiplicity(G4double anEnergy )
multi = G4Poisson ( mean );
#else
if( theMultiplicityMethod == G4HPMultiPoisson ) {
multi = G4Poisson ( mean );
if( std::getenv("G4PHPTEST") ) G4cout << " MULTIPLICITY MULTIPLIED " << multi << " " << theMassCode << G4endl;
multi = G4Poisson ( mean );
#ifdef G4VERBOSE
if( std::getenv("G4PHPTEST") && G4HadronicParameters::Instance()->GetVerboseLevel() > 0 )
G4cout << " MULTIPLICITY MULTIPLIED " << multi << " " << theMassCode << G4endl;
#endif
} else { // if( theMultiplicityMethod == G4HPMultiBetweenInts ) {
G4double radnf = CLHEP::RandFlat::shoot();
G4int imulti = G4int(mean);
@@ -92,7 +96,10 @@ G4int G4ParticleHPProduct::GetMultiplicity(G4double anEnergy )
// if( CLHEP::RandFlat::shoot() > mean-multi ) multi++;
}
#ifdef G4PHPDEBUG
if( std::getenv("G4ParticleHPDebug") ) G4cout << "G4ParticleHPProduct::GetMultiplicity " << theMassCode << " " << theMass << " multi " << multi << " mean " << mean << G4endl;
#ifdef G4VERBOSE
if( std::getenv("G4ParticleHPDebug") && G4HadronicParameters::Instance()->GetVerboseLevel() > 0 )
G4cout << "G4ParticleHPProduct::GetMultiplicity " << theMassCode << " " << theMass << " multi " << multi << " mean " << mean << G4endl;
#endif
#endif
}
@@ -119,12 +126,18 @@ G4ReactionProductVector * G4ParticleHPProduct::Sample(G4double anEnergy, G4int m
{
#ifdef G4PHPDEBUG
if( std::getenv("G4PHPTEST") )
if( std::getenv("G4ParticleHPDebug") && tmp != 0 ) G4cout << multi << " " << i << " @@@ G4ParticleHPProduct::Sample " << anEnergy << " Mass " << theMassCode << " " << theMass << G4endl;
#ifdef G4VERBOSE
if( std::getenv("G4ParticleHPDebug") && tmp != 0 && G4HadronicParameters::Instance()->GetVerboseLevel() > 0 )
G4cout << multi << " " << i << " @@@ G4ParticleHPProduct::Sample " << anEnergy << " Mass " << theMassCode << " " << theMass << G4endl;
#endif
#endif
tmp = theDist->Sample(anEnergy, theMassCode, theMass);
if(tmp != 0) { result->push_back(tmp); }
#ifndef G4PHPDEBUG //GDEB
if( std::getenv("G4ParticleHPDebug") && tmp != 0 ) G4cout << multi << " " << i << " @@@ G4ParticleHPProduct::Sample " << tmp->GetDefinition()->GetParticleName() << " E= " << tmp->GetKineticEnergy() << G4endl;
#ifdef G4VERBOSE
if( std::getenv("G4ParticleHPDebug") && tmp != 0 && G4HadronicParameters::Instance()->GetVerboseLevel() > 0 )
G4cout << multi << " " << i << " @@@ G4ParticleHPProduct::Sample " << tmp->GetDefinition()->GetParticleName() << " E= " << tmp->GetKineticEnergy() << G4endl;
#endif
#endif
}
if(multi == 0)