Import Geant4 10.6.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2019-06-28 11:59:04 +02:00
parent 28a70706e0
commit d0f911957d
1056 changed files with 95168 additions and 78160 deletions
@@ -137,7 +137,7 @@ G4HadFinalState * G4LENDCapture::ApplyYourself(const G4HadProjectile& aTrack, G4
G4FragmentVector* products_from_PE = photonEvaporation.BreakItUp(nucleus);
G4FragmentVector::iterator it;
for ( it = products_from_PE->begin(); it != products_from_PE->end(); it++)
for (it = products_from_PE->begin(); it != products_from_PE->end(); it++)
{
if ( (*it)->GetZ_asInt() == iZ + ipZ && (*it)->GetA_asInt() == iA + ipA ) needResidual = false;
G4DynamicParticle* theSec = new G4DynamicParticle;
@@ -152,6 +152,7 @@ G4HadFinalState * G4LENDCapture::ApplyYourself(const G4HadProjectile& aTrack, G4
}
theResult->AddSecondary( theSec );
}
delete products_from_PE;
}
//if necessary, generate residual nucleus
@@ -56,6 +56,15 @@ void GIDI_settings_flux_order::initialize( int order, int length, double const *
/*
=========================================================
*/
GIDI_settings_flux_order& GIDI_settings_flux_order::operator=( const GIDI_settings_flux_order &fluxOrder ) {
if ( this != &fluxOrder ) {
initialize( fluxOrder.mOrder, fluxOrder.size(), &(fluxOrder.mEnergies[0]), &(fluxOrder.mFluxes[0]) );
}
return *this;
}
/*
=========================================================
*/
GIDI_settings_flux_order::~GIDI_settings_flux_order( ) {
}
@@ -111,6 +120,17 @@ GIDI_settings_flux::GIDI_settings_flux( GIDI_settings_flux const &flux ) {
/*
=========================================================
*/
GIDI_settings_flux& GIDI_settings_flux::operator=( const GIDI_settings_flux &flux ) {
if ( this != &flux ) {
mLabel = flux.getLabel();
mTemperature = flux.mTemperature;
for( std::vector<GIDI_settings_flux_order>::const_iterator iter = flux.mFluxOrders.begin( ); iter < flux.mFluxOrders.end( ); ++iter ) addFluxOrder( *iter );
}
return *this;
}
/*
=========================================================
*/
GIDI_settings_flux::~GIDI_settings_flux( ) {
}
@@ -54,6 +54,15 @@ void GIDI_settings_group::initialize( std::string const &label, int size1, int l
/*
=========================================================
*/
GIDI_settings_group& GIDI_settings_group::operator=( const GIDI_settings_group &group ) {
if ( this != &group ) {
initialize( group.mLabel, group.size(), group.size(), &(group.mBoundaries[0]) );
}
return *this;
}
/*
=========================================================
*/
GIDI_settings_group::~GIDI_settings_group( ) {
}
@@ -167,6 +167,33 @@ GIDI_settings_processedFlux::GIDI_settings_processedFlux( GIDI_settings_processe
}
return;
err:
for( std::vector<ptwXYPoints *>::iterator iter = mFluxXY.begin( ); iter != mFluxXY.end( ); ++iter ) ptwXY_free( *iter );
for( std::vector<ptwXPoints *>::iterator iter = mGroupedFlux.begin( ); iter != mGroupedFlux.end( ); ++iter ) ptwX_free( *iter );
throw 1;
}
/*
=========================================================
*/
GIDI_settings_processedFlux& GIDI_settings_processedFlux::operator=( const GIDI_settings_processedFlux &flux ) {
if ( this != &flux ) {
// Clean-up existing things
for( std::vector<ptwXYPoints *>::iterator iter = mFluxXY.begin( ); iter != mFluxXY.end( ); ++iter ) ptwXY_free( *iter );
for( std::vector<ptwXPoints *>::iterator iter = mGroupedFlux.begin( ); iter != mGroupedFlux.end( ); ++iter ) ptwX_free( *iter );
// Now assign
mFlux = flux.mFlux;
nfu_status status_nf;
ptwXYPoints *fluxXY;
ptwXPoints *fluxX;
for( int order = 0; order < (int) mFlux.size( ); ++order ) {
if( ( fluxXY = ptwXY_clone( flux.mFluxXY[order], &status_nf ) ) == NULL ) goto err;
mFluxXY.push_back( fluxXY );
if( ( fluxX = ptwX_clone( flux.mGroupedFlux[order], &status_nf ) ) == NULL ) goto err;
mGroupedFlux.push_back( fluxX );
}
}
return *this;
err:
for( std::vector<ptwXYPoints *>::iterator iter = mFluxXY.begin( ); iter != mFluxXY.end( ); ++iter ) ptwXY_free( *iter );
for( std::vector<ptwXPoints *>::iterator iter = mGroupedFlux.begin( ); iter != mGroupedFlux.end( ); ++iter ) ptwX_free( *iter );