Skip to content

Commit

Permalink
Updating createReactions tests for photatomic data
Browse files Browse the repository at this point in the history
  • Loading branch information
whaeck committed Aug 13, 2024
1 parent f7703ce commit 04c487c
Show file tree
Hide file tree
Showing 3 changed files with 382 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/dryad/format/endf/ReactionIdentifiers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace endf {
};
inline static const std::unordered_set< int > summation_ = {

1, 3, 4, 27, 101, 501, 522, 526
1, 3, 4, 27, 101, 501, 516, 522, 526
};
inline static const std::unordered_set< int > primary_ = {

Expand All @@ -45,11 +45,11 @@ namespace endf {
176, 177, 178, 179, 180, 181, 182, 183, 184, 185,
186, 187, 188, 189, 190, 191, 192, 193, 194, 195,
196, 197, 198, 199, 200, 502, 504, 505, 506, 515,
516, 517, 523, 525, 527, 528, 534, 535, 536, 537,
538, 539, 540, 541, 542, 543, 544, 545, 546, 547,
548, 549, 550, 551, 552, 553, 554, 555, 556, 557,
558, 559, 560, 561, 562, 563, 564, 565, 566, 567,
568, 569, 570, 571, 572,
517, 523, 525, 527, 528, 534, 535, 536, 537, 538,
539, 540, 541, 542, 543, 544, 545, 546, 547, 548,
549, 550, 551, 552, 553, 554, 555, 556, 557, 558,
559, 560, 561, 562, 563, 564, 565, 566, 567, 568,
569, 570, 571, 572,
600, 601, 602, 603, 604, 605, 606, 607, 608, 609,
610, 611, 612, 613, 614, 615, 616, 617, 618, 619,
620, 621, 622, 623, 624, 625, 626, 627, 628, 629,
Expand Down
39 changes: 39 additions & 0 deletions src/dryad/format/endf/test/createReaction.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,43 @@ SCENARIO( "createReaction" ) {
} // THEN
} // WHEN
} // GIVEN

GIVEN( "ENDF materials - photo-atomic" ) {

auto tape = njoy::ENDFtk::tree::fromFile( "photoat-001_H_000.endf" );
auto material = tape.materials().front();

WHEN( "a single ENDF material and MT number is given" ) {

THEN( "a Reaction can be created" ) {

id::ParticleID projectile( "g" );
id::ParticleID target( "H" );

Reaction total = format::endf::createReaction( projectile, target, material, 501 );
verifyPhotonTotalReaction( total );

Reaction coherent = format::endf::createReaction( projectile, target, material, 502 );
verifyPhotonCoherentReaction( coherent );

Reaction incoherent = format::endf::createReaction( projectile, target, material, 504 );
verifyPhotonIncoherentReaction( incoherent );

Reaction epairproduction = format::endf::createReaction( projectile, target, material, 515 );
verifyPhotonElectronFieldPairProductionReaction( epairproduction );

Reaction npairproduction = format::endf::createReaction( projectile, target, material, 517 );
verifyPhotonNuclearFieldPairProductionReaction( npairproduction );

Reaction tpairproduction = format::endf::createReaction( projectile, target, material, 516 );
verifyPhotonTotalPairProductionReaction( tpairproduction );

Reaction ionisation = format::endf::createReaction( projectile, target, material, 534 );
verifyPhotonIonisationReaction( ionisation );

Reaction tionisation = format::endf::createReaction( projectile, target, material, 522 );
verifyPhotonTotalIonisationReaction( tionisation );
} // THEN
} // WHEN
} // GIVEN
} // SCENARIO
Loading

0 comments on commit 04c487c

Please sign in to comment.