Skip to content

Commit 4f4555d

Browse files
committed
fixing an error in the creation of particle pairs
1 parent cde850c commit 4f4555d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/dryad/format/endf/resonances/lrf7/createParticlePairs.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,16 @@ namespace lrf7 {
4343
: dryad::id::ParticleID::photon();
4444
dryad::resonances::Particle a( id,
4545
endfPairs.massParticleA()[i] * constants::neutron_mass,
46-
endfPairs.spinParticleA()[i],
46+
std::abs( endfPairs.spinParticleA()[i] ),
4747
endfPairs.spinParticleA()[i] == 0.
4848
? endfPairs.parityParticleA()[i] >= 0 ? +1 : -1
49-
: endfPairs.spinParticleA()[i] > 0 ? +1 : -1 );
49+
: endfPairs.spinParticleA()[i] >= 0 ? +1 : -1 );
5050
dryad::resonances::Particle b( reactions[i].residual().value(),
5151
endfPairs.massParticleB()[i] * constants::neutron_mass,
52-
endfPairs.spinParticleB()[i],
52+
std::abs( endfPairs.spinParticleB()[i] ),
5353
endfPairs.spinParticleB()[i] == 0.
5454
? endfPairs.parityParticleB()[i] >= 0 ? +1 : -1
55-
: endfPairs.spinParticleB()[i] > 0 ? +1 : -1 );
55+
: endfPairs.spinParticleB()[i] >= 0 ? +1 : -1 );
5656
pairs.emplace_back( dryad::resonances::ParticlePair( std::move( a ), std::move( b ) ) );
5757

5858
//! @todo compare spins and parity to particle database to detect errors

0 commit comments

Comments
 (0)