Skip to content
Snippets Groups Projects
Commit 35755c43 authored by Sebastien Ponce's avatar Sebastien Ponce Committed by Marco Clemencic
Browse files

Fixed float comparisons in EvtCollectionSelector.cpp

parent 66271792
No related branches found
No related tags found
1 merge request!1490Fixed unsafe floating point comparisons
......@@ -103,7 +103,9 @@ namespace Gaudi {
std::cout << std::endl << System::typeinfoName( typeid( *this ) ) << "\t -> Momenta(Fix): ";
for ( int i = 0; i < std::min( 5, n ); ++i ) { std::cout << "[" << i << "]=" << m_trkMomFixed[i] << " "; }
for ( int i = 5; i < 99; ++i ) {
if ( m_trkMomFixed[i] != 0.f ) { std::cout << "[" << i << "]= Error in Fixed momentum" << std::endl; }
if ( abs( m_trkMomFixed[i] ) > std::numeric_limits<float>::epsilon() ) {
std::cout << "[" << i << "]= Error in Fixed momentum" << std::endl;
}
}
#endif
std::cout << std::endl;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment