Skip to content
Snippets Groups Projects

FIND_DECAY and FIND_MCDECAY functor

Merged Tommaso Fulghesu requested to merge tfulghes-finddecay-functor into master
1 file
+ 4
4
Compare changes
  • Side-by-side
  • Inline
@@ -29,12 +29,12 @@ namespace Functors::Decay {
void bind( TopLevelInfo& top_level ) { m_find_decay.emplace( m_tool_name, top_level.algorithm() ); }
auto prepare( EventContext const&, TopLevelInfo const& ) const {
// assert( m_find_decay.has_value() );
assert( m_find_decay.has_value() );
if ( !m_find_decay->get() ) m_find_decay->retrieve().ignore();
return [dd = m_decay_desc, tool = m_find_decay->get()]( const auto& in ) {
return [dd = m_decay_desc, tool = m_find_decay->get()]( auto mask, const auto& in ) {
LHCb::Particle::ConstVector out;
auto res = tool->findDecay( dd, in, out );
return res.isSuccess() ? Functors::Optional{out} : std::nullopt;
mask = mask && tool->findDecay( dd, in, out ).isSuccess();
return mask ? Functors::Optional{out} : std::nullopt;
};
}
Loading