22 StatusCode AsgUnionSelectionAlg ::
28 return StatusCode::FAILURE;
37 return StatusCode::SUCCESS;
42 StatusCode AsgUnionSelectionAlg ::
45 std::vector<bool> selections;
53 if (selections.empty())
55 selections.resize(particles->size(),
false);
57 else if (selections.size() != particles->size())
59 ANA_MSG_ERROR(
"All input containers should have the same size.");
60 return StatusCode::FAILURE;
63 for (
size_t i{}; i < particles->size(); i++)
65 selections[i] = selections[i] ||
m_preselection.getBool (*particles->at(i), sys);
76 for (
size_t i{}; i < particles->size(); i++)
82 return StatusCode::SUCCESS;
SysReadSelectionHandle m_preselection
the preselection we apply to our input
Gaudi::Property< std::string > m_selectionDecoration
the decoration of the selection
std::unique_ptr< ISelectionWriteAccessor > m_selectionAccessor
the accessor for m_selectionDecoration
SysListHandle m_systematicsList
the systematics list we run and have containers
SysReadHandle< xAOD::IParticleContainer > m_particlesHandle
the particle continer we run on
Select isolated Photons, Electrons and Muons.
StatusCode makeSelectionWriteAccessor(const std::string &name, std::unique_ptr< ISelectionWriteAccessor > &accessor, bool defaultToChar)
Produces a simple ISelectionWriteAccessor accessing the given decoration.
DataVector< IParticle > IParticleContainer
Simple convenience declaration of IParticleContainer.