Import Geant4 10.4.0.beta source tree
This commit is contained in:
@@ -53,7 +53,10 @@ char *G4GIDI_Misc_Z_A_m_ToName( int iZ, int iA, int im ) {
|
||||
else {
|
||||
sprintf( S, "%s%d", Z, iA );
|
||||
if( im != 0 ) {
|
||||
sprintf( mS, "_m%d", im );
|
||||
//sprintf( mS, "_m%d", im );
|
||||
//TK 170509
|
||||
//Fix inconsistency of name of excited isomer between data and code
|
||||
sprintf( mS, "m%d", im );
|
||||
strcat( S, mS );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -297,7 +297,7 @@ void G4LENDCrossSection::create_used_target_map()
|
||||
G4int iIsomer = anElement->GetIsotope( i_iso )->Getm();
|
||||
|
||||
//G4LENDUsedTarget* aTarget = new G4LENDUsedTarget ( G4Neutron::Neutron() , default_evaluation , iZ , iA );
|
||||
G4LENDUsedTarget* aTarget = new G4LENDUsedTarget ( proj , default_evaluation , iZ , iA );
|
||||
G4LENDUsedTarget* aTarget = new G4LENDUsedTarget ( proj , default_evaluation , iZ , iA , iIsomer );
|
||||
if ( allow_nat == true ) aTarget->AllowNat();
|
||||
if ( allow_any == true ) aTarget->AllowAny();
|
||||
usedTarget_map.insert( std::pair< G4int , G4LENDUsedTarget* > ( lend_manager->GetNucleusEncoding( iZ , iA , iIsomer ) , aTarget ) );
|
||||
|
||||
@@ -67,12 +67,16 @@ G4HadFinalState * G4LENDElastic::ApplyYourself(const G4HadProjectile& aTrack, G4
|
||||
theNeutron.SetMomentum( aTrack.Get4Momentum().vect() );
|
||||
theNeutron.SetKineticEnergy( ke );
|
||||
|
||||
//G4cout << "iZ " << iZ << " iA " << iA << G4endl;
|
||||
//G4ParticleDefinition* pd = G4IonTable::GetIonTable()->GetIon( iZ , iA , iM );
|
||||
//TK 170509 Fix for the case of excited isomer target
|
||||
G4double EE = 0.0;
|
||||
if ( iM != 0 ) {
|
||||
G4LENDManager::GetInstance()->GetExcitationEnergyOfExcitedIsomer( iZ , iA , iM );
|
||||
}
|
||||
G4ParticleDefinition* target_pd = G4IonTable::GetIonTable()->GetIon( iZ , iA , EE );
|
||||
G4ReactionProduct theTarget( target_pd );
|
||||
|
||||
G4ParticleDefinition* pd = G4IonTable::GetIonTable()->GetIon( iZ , iA , iM );
|
||||
G4ReactionProduct theTarget( pd );
|
||||
|
||||
G4double mass = pd->GetPDGMass();
|
||||
G4double mass = target_pd->GetPDGMass();
|
||||
|
||||
// add Thermal motion
|
||||
G4double kT = k_Boltzmann*temp;
|
||||
@@ -138,8 +142,7 @@ G4HadFinalState * G4LENDElastic::ApplyYourself(const G4HadProjectile& aTrack, G4
|
||||
theResult->SetMomentumChange(theNeutron.GetMomentum().unit());
|
||||
G4DynamicParticle* theRecoil = new G4DynamicParticle;
|
||||
|
||||
// theRecoil->SetDefinition( ionTable->GetIon( iZ , iA ) );
|
||||
theRecoil->SetDefinition( G4IonTable::GetIonTable()->GetIon( iZ, iA , iM ));
|
||||
theRecoil->SetDefinition( target_pd );
|
||||
theRecoil->SetMomentum( theTarget.GetMomentum() );
|
||||
|
||||
theResult->AddSecondary( theRecoil );
|
||||
|
||||
@@ -143,6 +143,40 @@ G4LENDManager::G4LENDManager()
|
||||
ionTable = G4ParticleTable::GetParticleTable()->GetIonTable();
|
||||
nistElementBuilder = new G4NistElementBuilder( 0 );
|
||||
|
||||
//Prepare table of excitation energy of excited isomers
|
||||
G4int pdgCode;
|
||||
// iZ iA iM ->Co58m1
|
||||
pdgCode= 10000 * 27 + 10 * 58 + 1;
|
||||
pdgCode = GetNucleusEncoding( 27 , 58 , 1 );
|
||||
mExcitationEnergy.insert(std::pair<G4int,G4double>( pdgCode, 24890 *CLHEP::eV));
|
||||
pdgCode= 10000 * 47 + 10 * 110 + 1;
|
||||
pdgCode = GetNucleusEncoding( 47 , 110 , 1 );
|
||||
mExcitationEnergy.insert(std::pair<G4int,G4double>( pdgCode, 117590 *CLHEP::eV));
|
||||
pdgCode= 10000 * 48 + 10 * 115 + 1;
|
||||
pdgCode = GetNucleusEncoding( 48 , 115 , 1 );
|
||||
mExcitationEnergy.insert(std::pair<G4int,G4double>( pdgCode, 181000 *CLHEP::eV));
|
||||
pdgCode= 10000 * 52 + 10 * 127 + 1;
|
||||
pdgCode = GetNucleusEncoding( 52 , 127 , 1 );
|
||||
mExcitationEnergy.insert(std::pair<G4int,G4double>( pdgCode, 88260 *CLHEP::eV));
|
||||
pdgCode= 10000 * 52 + 10 * 129 + 1;
|
||||
pdgCode = GetNucleusEncoding( 52 , 129 , 1 );
|
||||
mExcitationEnergy.insert(std::pair<G4int,G4double>( pdgCode, 105280 *CLHEP::eV));
|
||||
pdgCode= 10000 * 61 + 10 * 148 + 1;
|
||||
pdgCode = GetNucleusEncoding( 61 , 148 , 1 );
|
||||
mExcitationEnergy.insert(std::pair<G4int,G4double>( pdgCode, 137900 *CLHEP::eV));
|
||||
pdgCode= 10000 * 67 + 10 * 166 + 1;
|
||||
pdgCode = GetNucleusEncoding( 67 , 166 , 1 );
|
||||
mExcitationEnergy.insert(std::pair<G4int,G4double>( pdgCode, 5985 *CLHEP::eV));
|
||||
pdgCode= 10000 * 95 + 10 * 242 + 1;
|
||||
pdgCode = GetNucleusEncoding( 95 , 242 , 1 );
|
||||
mExcitationEnergy.insert(std::pair<G4int,G4double>( pdgCode, 48600 *CLHEP::eV));
|
||||
pdgCode= 10000 * 95 + 10 * 244 + 1;
|
||||
pdgCode = GetNucleusEncoding( 95 , 244 , 1 );
|
||||
mExcitationEnergy.insert(std::pair<G4int,G4double>( pdgCode, 87999.9*CLHEP::eV));
|
||||
pdgCode= 10000 * 99 + 10 * 254 + 1;
|
||||
pdgCode = GetNucleusEncoding( 99 , 254 , 1 );
|
||||
mExcitationEnergy.insert(std::pair<G4int,G4double>( pdgCode, 84200 *CLHEP::eV));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -369,3 +403,20 @@ G4bool G4LENDManager::RequestChangeOfVerboseLevel( G4int newValue )
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
G4double G4LENDManager::GetExcitationEnergyOfExcitedIsomer( G4int iZ , G4int iA , G4int iM )
|
||||
{
|
||||
G4double EE = 0.0;
|
||||
G4int nucCode = GetNucleusEncoding( iZ , iA , iM );
|
||||
auto it = mExcitationEnergy.find( nucCode );
|
||||
if ( it != mExcitationEnergy.end() ) {
|
||||
EE = it->second;
|
||||
} else {
|
||||
if ( iM == 0 ) {
|
||||
G4cout << "G4LENDManager::GetExcitationEnergyOfExcitedIsomer is called for ground state (iM=0) nucleus" << G4endl;
|
||||
} else {
|
||||
G4cout << "Can not find excitation energy for Z = " << iZ << ", A = " << iA << ", M = " << iM << " and the energy set to 0." << G4endl;
|
||||
}
|
||||
}
|
||||
return EE;
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ void G4LENDModel::create_used_target_map()
|
||||
G4int iA = anElement->GetIsotope( i_iso )->GetN();
|
||||
G4int iIsomer = anElement->GetIsotope( i_iso )->Getm();
|
||||
|
||||
G4LENDUsedTarget* aTarget = new G4LENDUsedTarget ( proj , default_evaluation , iZ , iA );
|
||||
G4LENDUsedTarget* aTarget = new G4LENDUsedTarget ( proj , default_evaluation , iZ , iA , iIsomer );
|
||||
if ( allow_nat == true ) aTarget->AllowNat();
|
||||
if ( allow_any == true ) aTarget->AllowAny();
|
||||
usedTarget_map.insert( std::pair< G4int , G4LENDUsedTarget* > ( lend_manager->GetNucleusEncoding( iZ , iA , iIsomer ) , aTarget ) );
|
||||
|
||||
@@ -280,12 +280,16 @@ int MCGIDI_outputChannel_sampleProductsAtE( statusMessageReporting *smr, MCGIDI_
|
||||
break;
|
||||
case MCGIDI_channelGenre_undefined_e :
|
||||
printf( "Channel is undefined\n" );
|
||||
break;
|
||||
case MCGIDI_channelGenre_twoBodyDecay_e :
|
||||
printf( "Channel is twoBodyDecay\n" );
|
||||
break;
|
||||
case MCGIDI_channelGenre_uncorrelatedDecay_e :
|
||||
printf( "Channel is uncorrelatedDecay\n" );
|
||||
break;
|
||||
default :
|
||||
printf( "Unsupported channel genre = %d\n", outputChannel->genre );
|
||||
break;
|
||||
}
|
||||
if( !smr_isOk( smr ) ) return( -1 );
|
||||
if( !secondTwoBody ) {
|
||||
|
||||
@@ -182,7 +182,8 @@ int lPoPs_addParticleIfNeeded( statusMessageReporting *smr, char const *name, ch
|
||||
*/
|
||||
static char const *lPoPs_ZSymbol( int Z ) {
|
||||
|
||||
if( ( Z < 0 ) || ( Z > nZs ) ) return( NULL );
|
||||
//Coverity #63066
|
||||
if( ( Z < 0 ) || ( Z >= nZs ) ) return( NULL );
|
||||
return( Zs[Z].Symbol );
|
||||
}
|
||||
|
||||
|
||||
@@ -142,7 +142,9 @@ static double w6j0( int i, int *x ) {
|
||||
case 1: if ( ( x[0] != x[2] ) || ( x[3] != x[5] ) ) return( 0.0 );
|
||||
x[5] = x[4]; break;
|
||||
case 2: if ( ( x[0] != x[1] ) || ( x[3] != x[4] ) ) return( 0.0 );
|
||||
if ( x[3] != x[4] ) break;
|
||||
break;
|
||||
//TK fix bug and add comment on 17-05-23
|
||||
//This is the case of 6.3.2 of A. R. Edmonds, Angular Momentum in Quantum Mechanics, Princeton University Press 1974.
|
||||
case 3: if ( ( x[1] != x[5] ) || ( x[2] != x[4] ) ) return( 0.0 );
|
||||
x[5] = x[0]; x[0] = x[4]; x[3] = x[1]; break;
|
||||
case 4: if ( ( x[0] != x[5] ) || ( x[2] != x[3] ) ) return( 0.0 );
|
||||
|
||||
@@ -116,6 +116,9 @@ static nfu_status ptwXY_createFromFunctionBisect( ptwXYPoints *ptwXY, double x1,
|
||||
static nfu_status ptwXY_createFromFunctionZeroCrossing( ptwXYPoints *ptwXY, double x1, double y1, double x2, double y2,
|
||||
ptwXY_createFromFunction_callback func, void *argList, double eps ) {
|
||||
|
||||
//For coverity #63077
|
||||
if ( y2 == y1 ) return ( nfu_badInput );
|
||||
|
||||
int i;
|
||||
double x, y;
|
||||
nfu_status status;
|
||||
@@ -203,6 +206,9 @@ static nfu_status ptwXY_applyFunctionZeroCrossing( ptwXYPoints *ptwXY1, double y
|
||||
ptwXYPoint p;
|
||||
nfu_status status;
|
||||
|
||||
//For coverity #63074
|
||||
if ( nY2 == nY1 ) return ( nfu_badInput );
|
||||
|
||||
for( i = 0; i < 6; i++ ) {
|
||||
if( nY2 == nY1 ) break;
|
||||
p.x = ( nY2 * x1 - nY1 * x2 ) / ( nY2 - nY1 );
|
||||
|
||||
Reference in New Issue
Block a user