11#ifndef EVENTUTILS_PARTICLESELECTIONALG_H
12#define EVENTUTILS_PARTICLESELECTIONALG_H 1
15#include "GaudiKernel/ToolHandle.h"
52 virtual StatusCode
start()
override;
55 virtual StatusCode
execute()
override;
58 virtual StatusCode
finalize()
override;
62 template<
class CONT,
class AUXCONT>
64 const std::vector<int>& resultVec)
const;
75 Gaudi::Property<std::string>
m_evtInfoName{
this,
"EventInfo",
"EventInfo",
"Input container name"};
78 Gaudi::Property<std::string>
m_inCollKey{
this,
"InputContainer",
"",
"Input container name"};
81 Gaudi::Property<std::string>
m_outCollKey{
this,
"OutputContainer",
"",
"The name of the output container with the deep copy of selected xAOD::IParticles"};
84 Gaudi::Property<bool>
m_writeSplitAux{
this,
"WriteSplitOutputContainer",
true,
"Decide if we want to write a fully-split AuxContainer such that we can remove any variables"};
87 Gaudi::Property<std::string>
m_outOwnPolicyName{
this,
"OutputContainerOwnershipPolicy",
"VIEW_ELEMENTS",
"Defines the ownership policy of the output container"};
91 Gaudi::Property<std::string>
m_selection{
this,
"Selection",
"",
"The selection string that defines which xAOD::IParticles to select from the container"};
95 Gaudi::Property<bool>
m_doCutFlow{
this,
"DoCutBookkeeping",
false,
"If true, do the bookkeeping of how many particles passed which selection cuts"};
99 Gaudi::Property<std::string>
m_cutBKCName{
this,
"CutBookkeeperContainer", name(),
"The name of the resulting xAOD::CutBookkeeperContainer"};
ExpressionParserUser(Args &&...args)
virtual StatusCode execute() override
Athena algorithm's execute hook.
virtual StatusCode start() override
Athena algorithm's beginRun hook (called once before running over the events, after initialize)
Gaudi::Property< std::string > m_outOwnPolicyName
Defines the ownership policy of the output container.
contType_t m_contType
The variable that holds the value that we find for the input container.
ToolHandleArray< IAsgSelectionTool > m_selTools
The list of IAsgSelectionTools.
Gaudi::Property< std::string > m_evtInfoName
Name of the EventInfo object.
std::size_t m_idxSelParster
Store the index of the CutBookKeeper in the CutBookkeeperContainer for the selection using the Expres...
SG::OwnershipPolicy m_outOwnPolicy
The internally used translation for the ownership policy.
virtual StatusCode finalize() override
Athena algorithm's finalize hook.
std::vector< std::size_t > m_selToolIdxOffset
The list of pairs of the tool index of the AsgSelectionTools and the starting index of the correspond...
virtual StatusCode initialize() override
Athena algorithm's initalize hook.
contType_t
An enumaration for the actual container type.
Gaudi::Property< std::string > m_selection
The selection string that will select which xAOD::IParticles to keep from an xAOD::IParticleContainer...
Gaudi::Property< std::string > m_inCollKey
Input container name.
Gaudi::Property< bool > m_doCutFlow
If true (default: false), do the bookkeeping of how many particles passed which selection cuts.
Gaudi::Property< std::string > m_outCollKey
Output collection name (deep copies of the original ones)
ParticleSelectionAlg(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
unsigned long m_nEventsProcessed
Internal event counter.
Gaudi::Property< std::string > m_cutBKCName
The name of the resulting xAOD::CutBookkeeperContainer.
std::size_t m_cutBKStartIdx
The starting index of where in the CutBookkeeperContainer our new CutBookkeepers start.
virtual ~ParticleSelectionAlg()
Destructor:
StatusCode selectParticles(const xAOD::IParticleContainer *inContainer, const std::vector< int > &resultVec) const
Private function to perform the actualy work.
Gaudi::Property< bool > m_writeSplitAux
Decide if we want to write a fully-split AuxContainer such that we can remove any variables.
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
DataVector< IParticle > IParticleContainer
Simple convenience declaration of IParticleContainer.