Skip to content

Commit

Permalink
Finishing test for createReactionProduct
Browse files Browse the repository at this point in the history
  • Loading branch information
whaeck committed Aug 7, 2024
1 parent c859314 commit 5a4b833
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions src/dryad/format/endf/createReactionProduct.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ namespace endf {
*/
ReactionProduct
createReactionProduct( const id::ParticleID& projectile, const id::ParticleID& target,
const ENDFtk::section::Type< 26 >::ReactionProduct& product ) {
const ENDFtk::section::Type< 26 >::ReactionProduct& product,
int mt ) {

id::ParticleID id = createProductIdentifier( product.productIdentifier(), 0, false );
Log::info( "Reading reaction product data for \'{}\'", id );
Expand All @@ -64,8 +65,8 @@ namespace endf {

case 1 : {

// ENDF/B-VIII.0 erroneously uses 11 for the gamma identifier
if ( id == "e-" ) {
// ENDF/B-VIII.0 erroneously uses 11 for the gamma identifier in MF26 MT527
if ( ( mt == 527 ) && ( id == "e-" ) ) {

id = createProductIdentifier( 0, 0, false );
Log::warning( "Reaction product identifier changed from \'e-\' to \'g\'" );
Expand Down
6 changes: 3 additions & 3 deletions src/dryad/format/endf/createReactionProducts.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ namespace endf {
else {

//! @todo handle P(nu) case
Log::info( "Skipping P(nu) and P(nu_g) in MF6" );
Log::warning( "Skipping P(nu) and P(nu_g) in MF6" );
}
}
}
Expand All @@ -57,12 +57,12 @@ namespace endf {
auto section = material.section( 26, mt ).parse< 26 >();
for ( const auto& product : section.reactionProducts() ) {

products.emplace_back( createReactionProduct( projectile, target, product ) );
products.emplace_back( createReactionProduct( projectile, target, product, mt ) );
}
}
else if ( material.hasSection( 27, mt ) ) {

Log::info( "Reading scattering functions and form factors for photons is not implemented yet" );
Log::warning( "Reading scattering functions and form factors for photons is not implemented yet" );
}
else {

Expand Down

0 comments on commit 5a4b833

Please sign in to comment.