Import Geant4 9.6.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 17:01:34 +02:00
parent b1eb5424d2
commit e2d2f9810a
10384 changed files with 698580 additions and 628834 deletions
@@ -17,6 +17,9 @@ CPPFLAGS += -DG4HADRONIC_ALLOC_EXPORT
ifeq ($(G4SYSTEM), WIN32-VC)
CPPFLAGS += -I$(G4BASE)/externals/expat/include
endif
ifdef G4LIB_BUILD_EXPAT
CPPFLAGS += -I$(G4BASE)/externals/expat/include
endif
CPPFLAGS += -I$(G4BASE)/global/management/include \
-I$(G4BASE)/global/HEPRandom/include \
@@ -15,7 +15,39 @@ code and to keep track of all tags.
* Please list in reverse chronological order (last date on top)
---------------------------------------------------------------
6 November 2012 Gabriele Cosmo (hadr-lend-V09-05-04)
----------------------------------------------
Fix for porting on AIX in statusMessageReporting source code.
26 September 2012 Gabriele Cosmo (hadr-lend-V09-05-03)
----------------------------------------------
Explicitly use inclusion of headers for system of units and physical
constants, in plan to remove implicit inclusion from globals.hh.
7 August 2012 Gabriele Cosmo (hadr-lend-V09-05-02)
----------------------------------------------
Fixed GNUmakefile for use of internal expat library, if explicitely chosen.
13 June 2012 Tatsumi Koi (hadr-lend-V09-05-01)
----------------------------------------------
Fix shadowing compiler warnings
include/G4LENDCrossSection.hh
src/G4LENDModel.cc
src/G4LENDFission.cc
src/G4LENDCrossSection.cc
12 January 2012 Tatsumi Koi (hadr-lend-V09-05-00)
----------------------------------------------
Fix compiler worming message, proper header names, Delete unnecessary header files
src/tpia_misc.cc
src/tpia_channel.cc
src/G4GIDI_target.cc
src/tpia_angularEnergy.cc
src/tpia_kinetics.cc
src/xDataMisc.cc
30 September 2011 Tatsumi Koi (hadr-lend-V09-04-24)
----------------------------------------------
fix problem, after setting changes
include/G4LENDModel.hh
@@ -91,7 +91,7 @@ class G4LENDCrossSection : public G4VCrossSectionDataSet
//G4double GetCrossSection(const G4DynamicParticle*, G4int , const G4Material* );
void ChangeDefaultEvaluation( G4String name ){ default_evaluation = name; };
void ChangeDefaultEvaluation( G4String name_tmp ){ default_evaluation = name_tmp; };
void AllowNaturalAbundanceTarget(){ allow_nat = true; };
void AllowAnyCandidateTarget(){ allow_any = true; };
@@ -61,7 +61,6 @@
#include <iostream>
#include <stdlib.h>
#include <math.h>
#include "G4GIDI_target.hh"
#include "G4GIDI_mass.hh"
@@ -25,7 +25,7 @@
//
#include "G4LENDCapture.hh"
#include "G4SystemOfUnits.hh"
#include "G4Nucleus.hh"
#include "G4ParticleTable.hh"
@@ -24,6 +24,7 @@
// ********************************************************************
//
#include "G4LENDCaptureCrossSection.hh"
#include "G4SystemOfUnits.hh"
G4double G4LENDCaptureCrossSection::getLENDCrossSection( G4GIDI_target* target , G4double ke , G4double temperature )
{
@@ -38,7 +38,7 @@
// 101118 Name modifications for release T. Koi (SLAC/PPA)
#include "G4LENDCrossSection.hh"
#include "G4SystemOfUnits.hh"
#include "G4ElementTable.hh"
#include "G4HadronicException.hh"
@@ -304,12 +304,12 @@ void G4LENDCrossSection::create_used_target_map()
//G4cout << nistElementBuild->GetNumberOfNistIsotopes( int ( anElement->GetZ() ) ) << G4endl;
G4int numberOfNistIso = nistElementBuild->GetNumberOfNistIsotopes( int ( anElement->GetZ() ) );
for ( G4int i = 0 ; i < numberOfNistIso ; i++ )
for ( G4int ii = 0 ; ii < numberOfNistIso ; ii++ )
{
//G4cout << nistElementBuild->GetIsotopeAbundance( iZ , nistElementBuild->GetNistFirstIsotopeN( iZ ) + i ) << G4endl;
if ( nistElementBuild->GetIsotopeAbundance( iZ , nistElementBuild->GetNistFirstIsotopeN( iZ ) + i ) > 0 )
if ( nistElementBuild->GetIsotopeAbundance( iZ , nistElementBuild->GetNistFirstIsotopeN( iZ ) + ii ) > 0 )
{
G4int iMass = nistElementBuild->GetNistFirstIsotopeN( iZ ) + i;
G4int iMass = nistElementBuild->GetNistFirstIsotopeN( iZ ) + ii;
//G4cout << iZ << " " << nistElementBuild->GetNistFirstIsotopeN( iZ ) + i << " " << nistElementBuild->GetIsotopeAbundance ( iZ , iMass ) << G4endl;
G4LENDUsedTarget* aTarget = new G4LENDUsedTarget ( proj , default_evaluation , iZ , iMass );
@@ -25,7 +25,8 @@
//
#include "G4LENDElastic.hh"
#include "G4PhysicalConstants.hh"
#include "G4SystemOfUnits.hh"
#include "G4Nucleus.hh"
#include "G4ParticleTable.hh"
@@ -24,6 +24,7 @@
// ********************************************************************
//
#include "G4LENDElasticCrossSection.hh"
#include "G4SystemOfUnits.hh"
G4double G4LENDElasticCrossSection::getLENDCrossSection( G4GIDI_target* target , G4double ke , G4double temperature )
{
@@ -24,7 +24,7 @@
// ********************************************************************
//
#include "G4LENDFission.hh"
#include "G4SystemOfUnits.hh"
#include "G4Nucleus.hh"
#include "G4ParticleTable.hh"
@@ -33,8 +33,6 @@ G4HadFinalState * G4LENDFission::ApplyYourself(const G4HadProjectile& aTrack, G4
G4double temp = aTrack.GetMaterial()->GetTemperature();
//G4int iZ = int ( aTarg.GetZ() );
//G4int iA = int ( aTarg.GetN() );
//migrate to integer A and Z (GetN_asInt returns number of neutrons in the nucleus since this)
G4int iZ = aTarg.GetZ_asInt();
G4int iA = aTarg.GetA_asInt();
@@ -50,8 +48,8 @@ G4HadFinalState * G4LENDFission::ApplyYourself(const G4HadProjectile& aTrack, G4
{
for ( G4int j = 0; j < int( products->size() ); j++ )
{
G4int iZ = (*products)[j].Z;
G4int iA = (*products)[j].A;
G4int jZ = (*products)[j].Z;
G4int jA = (*products)[j].A;
//G4cout << "Z = " << (*products)[j].Z
// << ", A = " << (*products)[j].A
@@ -63,12 +61,12 @@ G4HadFinalState * G4LENDFission::ApplyYourself(const G4HadProjectile& aTrack, G4
G4DynamicParticle* theSec = new G4DynamicParticle;
if ( iZ > 0 )
if ( jZ > 0 )
{
//Ex j?
theSec->SetDefinition( G4ParticleTable::GetParticleTable()->FindIon( iZ, iA , 0, 0 ) );
theSec->SetDefinition( G4ParticleTable::GetParticleTable()->FindIon( jZ, jA , 0, 0 ) );
}
else if ( iA == 1 && iZ == 0 )
else if ( jA == 1 && jZ == 0 )
{
theSec->SetDefinition( G4Neutron::Neutron() );
}
@@ -24,6 +24,7 @@
// ********************************************************************
//
#include "G4LENDFissionCrossSection.hh"
#include "G4SystemOfUnits.hh"
G4double G4LENDFissionCrossSection::getLENDCrossSection( G4GIDI_target* target , G4double ke , G4double temperature )
{
@@ -24,7 +24,7 @@
// ********************************************************************
//
#include "G4LENDInelastic.hh"
#include "G4SystemOfUnits.hh"
#include "G4Nucleus.hh"
#include "G4ParticleTable.hh"
@@ -25,6 +25,7 @@
//
#include "G4LENDInelasticCrossSection.hh"
#include "G4SystemOfUnits.hh"
G4double G4LENDInelasticCrossSection::getLENDCrossSection( G4GIDI_target* target , G4double ke , G4double temperature )
{
@@ -38,6 +38,8 @@
// 101118 Name modifications for release T. Koi (SLAC/PPA)
#include "G4LENDModel.hh"
#include "G4PhysicalConstants.hh"
#include "G4SystemOfUnits.hh"
#include "G4NistManager.hh"
G4LENDModel::G4LENDModel( G4String name )
@@ -117,12 +119,12 @@ void G4LENDModel::create_used_target_map()
//G4cout << nistElementBuild->GetNumberOfNistIsotopes( int ( anElement->GetZ() ) ) << G4endl;
G4int numberOfNistIso = nistElementBuild->GetNumberOfNistIsotopes( int ( anElement->GetZ() ) );
for ( G4int i = 0 ; i < numberOfNistIso ; i++ )
for ( G4int ii = 0 ; ii < numberOfNistIso ; ii++ )
{
//G4cout << nistElementBuild->GetIsotopeAbundance( iZ , nistElementBuild->GetNistFirstIsotopeN( iZ ) + i ) << G4endl;
if ( nistElementBuild->GetIsotopeAbundance( iZ , nistElementBuild->GetNistFirstIsotopeN( iZ ) + i ) > 0 )
if ( nistElementBuild->GetIsotopeAbundance( iZ , nistElementBuild->GetNistFirstIsotopeN( iZ ) + ii ) > 0 )
{
G4int iMass = nistElementBuild->GetNistFirstIsotopeN( iZ ) + i;
G4int iMass = nistElementBuild->GetNistFirstIsotopeN( iZ ) + ii;
//G4cout << iZ << " " << nistElementBuild->GetNistFirstIsotopeN( iZ ) + i << " " << nistElementBuild->GetIsotopeAbundance ( iZ , iMass ) << G4endl;
G4LENDUsedTarget* aTarget = new G4LENDUsedTarget ( proj , default_evaluation , iZ , iMass );
@@ -140,11 +140,12 @@ char *smr_vallocateFormatMessage( const char *fmt, va_list *args ) {
while( 1 ) {
if( ( message = (char *) realloc( message, size ) ) == NULL ) return( NULL );
//TK110426
#ifndef WIN32
__va_copy( args_, *args );
#endif
#ifdef WIN32
#if defined WIN32
args_ = *args;
#elif defined __IBMCPP__
va_copy( args_, *args );
#else
__va_copy( args_, *args );
#endif
n = vsnprintf( message, size, fmt, args_ );
va_end( args_ );
@@ -34,7 +34,6 @@
# <<END-copyright>>
*/
#include <string.h>
#include <math.h>
#include <tpia_target.h>
#include <tpia_misc.h>
@@ -34,7 +34,6 @@
# <<END-copyright>>
*/
#include <string.h>
#include <math.h>
#include <tpia_target.h>
#include <tpia_misc.h>
@@ -79,7 +79,7 @@ int tpia_kinetics_COMKineticEnergy2LabEnergyAndMomentum( statusMessageReporting
/*
* beta the velocity/speedOflight of the com frame relative to the lab frame.
* e_kinetic_com Total kinetic energy (K1 + K2) in the COM frame.
* mu cos( theta ) in the COM frame.
* mu std::cos( theta ) in the COM frame.
*/
double x, v_p, p, pp3, pp4, px3, py3, pz3, pz4, pz, p_perp2, E3, E4, gamma, m3cc2 = m3cc * m3cc, m4cc2 = m4cc * m4cc;
@@ -39,7 +39,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <cmath>
#include <tpia_target.h>
#include <tpia_misc.h>
@@ -114,10 +114,12 @@ char *xDataMisc_getAbsPath( statusMessageReporting *smr, const char *fileName )
* User must free returned string.
*/
int n = strlen( fileName ) + 1, nCwd = 0;
char *absPath, cwd[4 * 1024] = "", *p, *needle;
//char *absPath, cwd[4 * 1024] = "", *p, *needle;
char *absPath, cwd[4 * 1024 + 1] = "", *p, *needle;
if( fileName[0] != '/' ) {
if( getcwd( cwd, sizeof( cwd ) + 1 ) == NULL ) {
//if( getcwd( cwd, sizeof( cwd ) + 1 ) == NULL ) {
if( getcwd( cwd, sizeof( cwd ) ) == NULL ) {
smr_setMessageError( smr, NULL, __FILE__, __LINE__, -1, "hardwired cwd too small" );
return( NULL );
}