Import Geant4 10.3.0.beta source tree
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# $Id: History 94484 2015-11-19 08:29:12Z gcosmo $
|
||||
# $Id: History 96401 2016-04-12 07:27:44Z gcosmo $
|
||||
# -----------------------------------------------------------
|
||||
|
||||
==================================================
|
||||
@@ -15,6 +15,23 @@ code and to keep track of all tags.
|
||||
* Please list in reverse chronological order (last date on top)
|
||||
---------------------------------------------------------------
|
||||
|
||||
11 April 2016 Tatsumi Koi (hadr-lend-V10-02-03)
|
||||
-----------------------------------------------
|
||||
-Fix problem on setting birth time of delayed neutrons
|
||||
|
||||
15 January 2016 Tatsumi Koi (hadr-lend-V10-02-02)
|
||||
-----------------------------------------------
|
||||
-Fix problem in production of residual neutrons
|
||||
|
||||
8 January 2016 Tatsumi Koi (hadr-lend-V10-02-01)
|
||||
-----------------------------------------------
|
||||
-Fix for Coverity #63079 and 63081
|
||||
|
||||
17 December 2015 Gabriele Cosmo (hadr-lend-V10-02-00)
|
||||
-----------------------------------------------
|
||||
-Corrected use of isnan() in nf_utilities.cc to std::isnan() for
|
||||
compilers different than Windows/VC++.
|
||||
|
||||
18 November 2015 Tatsumi Koi (hadr-lend-V10-01-14)
|
||||
-----------------------------------------------
|
||||
-Fix of problem introduced at hadr-lend-V10-01-12
|
||||
|
||||
@@ -52,6 +52,7 @@ struct crossSectionData_s {
|
||||
struct G4GIDI_Product_s {
|
||||
int A, Z, m;
|
||||
double kineticEnergy, px, py, pz;
|
||||
double birthTimeSec;
|
||||
};
|
||||
|
||||
class G4GIDI_target {
|
||||
|
||||
@@ -440,6 +440,7 @@ vector<G4GIDI_Product> *G4GIDI_target::getFinalState( int nIndices, int *indices
|
||||
(*products)[i].px = productData->px_vx;
|
||||
(*products)[i].py = productData->py_vy;
|
||||
(*products)[i].pz = productData->pz_vz;
|
||||
(*products)[i].birthTimeSec = productData->birthTimeSec;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,6 +63,7 @@ G4HadFinalState * G4LENDFission::ApplyYourself(const G4HadProjectile& aTrack, G4
|
||||
// << ", px = " << (*products)[j].px
|
||||
// << ", py = " << (*products)[j].py
|
||||
// << ", pz = " << (*products)[j].pz
|
||||
// << ", birthTimeSec = " << (*products)[j].birthTimeSec << " [second]"
|
||||
// << G4endl;
|
||||
|
||||
G4DynamicParticle* theSec = new G4DynamicParticle;
|
||||
@@ -83,6 +84,12 @@ G4HadFinalState * G4LENDFission::ApplyYourself(const G4HadProjectile& aTrack, G4
|
||||
theSec->SetMomentum( G4ThreeVector( (*products)[j].px*MeV , (*products)[j].py*MeV , (*products)[j].pz*MeV ) );
|
||||
//G4cout << theSec->GetDefinition()->GetParticleName() << G4endl;
|
||||
theResult->AddSecondary( theSec );
|
||||
//Set time for delayed neutrons
|
||||
//Current implementation is a little tricky,
|
||||
if ( (*products)[j].birthTimeSec != 0 ) {
|
||||
G4double time = (*products)[j].birthTimeSec*second + aTrack.GetGlobalTime();
|
||||
theResult->GetSecondary(theResult->GetNumberOfSecondaries()-1)->SetTime(time);
|
||||
}
|
||||
}
|
||||
}
|
||||
delete products;
|
||||
|
||||
@@ -142,23 +142,30 @@ G4HadFinalState * G4LENDInelastic::ApplyYourself(const G4HadProjectile& aTrack,
|
||||
|
||||
if ( !( iTotZ == 0 && iTotA == 0 ) ) {
|
||||
|
||||
if ( iTotZ >= 0 && iTotA > 0 ) {
|
||||
if ( needResidual ) {
|
||||
G4DynamicParticle* residual = new G4DynamicParticle;
|
||||
residual->SetDefinition( G4IonTable::GetIonTable()->GetIon( iTotZ , iTotA ) );
|
||||
residual->SetMomentum( proj_p - psum );
|
||||
theResult->AddSecondary( residual );
|
||||
} else {
|
||||
//G4cout << "Charge or Baryon Number Error #1 iTotZ = " << iTotZ << ", iTotA = " << iTotA << G4endl;
|
||||
;
|
||||
}
|
||||
} else {
|
||||
if ( iTotZ >= 0 && iTotA > 0 ) {
|
||||
if ( needResidual ) {
|
||||
G4DynamicParticle* residual = new G4DynamicParticle;
|
||||
if ( iTotZ > 0 ) {
|
||||
residual->SetDefinition( G4IonTable::GetIonTable()->GetIon( iTotZ , iTotA ) );
|
||||
} else if ( iTotA == 1 ) {
|
||||
residual->SetDefinition( G4Neutron::Neutron() );
|
||||
} else {
|
||||
//G4cout << "Charge or Baryon Number Error #3 iTotZ = " << iTotZ << ", iTotA = " << iTotA << G4endl;
|
||||
;
|
||||
}
|
||||
residual->SetMomentum( proj_p - psum );
|
||||
theResult->AddSecondary( residual );
|
||||
} else {
|
||||
//G4cout << "Charge or Baryon Number Error #1 iTotZ = " << iTotZ << ", iTotA = " << iTotA << G4endl;
|
||||
;
|
||||
}
|
||||
} else {
|
||||
|
||||
if ( needResidual ) {
|
||||
//G4cout << "Charge or Baryon Number Error #2 iTotZ = " << iTotZ << ", iTotA = " << iTotA << G4endl;
|
||||
;
|
||||
if ( needResidual ) {
|
||||
//G4cout << "Charge or Baryon Number Error #2 iTotZ = " << iTotZ << ", iTotA = " << iTotA << G4endl;
|
||||
;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -11,9 +11,11 @@
|
||||
|
||||
#ifdef WIN32
|
||||
#include <float.h>
|
||||
#define isnan(a) _isnan(a)
|
||||
#define is_nan(a) _isnan(a)
|
||||
/*#define INFINITY (DBL_MAX+DBL_MAX)*/
|
||||
/*#define NAN (INFINITY-INFINITY)*/
|
||||
#else
|
||||
#define is_nan(a) std::isnan(a)
|
||||
#endif
|
||||
|
||||
#if defined __cplusplus
|
||||
@@ -58,7 +60,7 @@ double nfu_getNAN( void ) {
|
||||
*/
|
||||
int nfu_isNAN( double d ) {
|
||||
|
||||
return( isnan( d ) );
|
||||
return( is_nan( d ) );
|
||||
}
|
||||
/*
|
||||
************************************************************
|
||||
|
||||
@@ -999,10 +999,14 @@ static nfu_status ptwXY_mergeFrom( ptwXYPoints *ptwXY, int /*incY*/, int length,
|
||||
if( length == 0 ) return( nfu_Okay );
|
||||
if( ( status = ptwXY_simpleCoalescePoints( ptwXY ) ) != nfu_Okay ) return( status );
|
||||
|
||||
if( ( sortedXs = (double *) nfu_malloc( length * sizeof( double * ) ) ) == NULL ) return( nfu_mallocError );
|
||||
//if( ( sortedXs = (double *) nfu_malloc( length * sizeof( double * ) ) ) == NULL ) return( nfu_mallocError );
|
||||
//TK fixed for Coverity 63081
|
||||
if( ( sortedXs = (double *) nfu_malloc( length * sizeof( double ) ) ) == NULL ) return( nfu_mallocError );
|
||||
|
||||
for( i = 0, p1 = sortedXs, p2 = xs; i < length; i++, p1++, p2++ ) *p1 = *p2;
|
||||
qsort( sortedXs, length, sizeof( double * ), ptwXY_mergeCompareFunction );
|
||||
//qsort( sortedXs, length, sizeof( double * ), ptwXY_mergeCompareFunction );
|
||||
//TK fixed for Coverity 63079
|
||||
qsort( sortedXs, length, sizeof( double ), ptwXY_mergeCompareFunction );
|
||||
|
||||
for( i = 0, p1 = sortedXs, j = 0, n = 0; i < length; i++, p1++, n++ ) {
|
||||
for( ; j < ptwXY->length; j++, n++ ) {
|
||||
|
||||
Reference in New Issue
Block a user