12#include "CLHEP/Geometry/Point3D.h"
29 return StatusCode::SUCCESS;
37 return StatusCode::SUCCESS;
46 auto vtxIt = ge.vertices().begin();
47 auto vtxEnd = ge.vertices().end();
48 for( ; vtxIt != vtxEnd; ++vtxIt) {
53 allOK &= std::isfinite( curPos.x() );
54 allOK &= std::isfinite( curPos.y() );
55 allOK &= std::isfinite( curPos.z() );
57 allOK &= std::isfinite( curPos.t() ) || !
m_checkTime;
61 ATH_MSG_DEBUG(
"All vertices in the given GenEvent are valid.");
62 return StatusCode::SUCCESS;
65 ATH_MSG_ERROR(
"At least one vertex in the given GenEvent has an invalid position value (NaN or inf).");
66 return StatusCode::FAILURE;
#define ATH_MSG_VERBOSE(x)
Gaudi::Property< bool > m_checkTime
check the time dimension value for validity
StatusCode initialize() override final
Athena algtool's Hooks.
GenEventValidityChecker(const std::string &t, const std::string &n, const IInterface *p)
Constructor with parameters.
StatusCode finalize() override final
Athena algtool's Hooks.
StatusCode manipulate(HepMC::GenEvent &ge, const EventContext &ctx) const override final
checks the the validity of the given GenEvent
HepMC3::FourVector FourVector
HepMC3::GenEvent GenEvent