 |
ATLAS Offline Software
|
Go to the documentation of this file.
11 #ifndef EVENTUTILS_PARTICLESELECTIONALG_H
12 #define EVENTUTILS_PARTICLESELECTIONALG_H 1
15 #include "GaudiKernel/ToolHandle.h"
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"};
151 #endif //> !EVENTUTILS_PARTICLESELECTIONALG_H
Gaudi::Property< std::string > m_outOwnPolicyName
Defines the ownership policy of the output container.
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...
Gaudi::Property< bool > m_writeSplitAux
Decide if we want to write a fully-split AuxContainer such that we can remove any variables.
ParticleSelectionAlg(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
unsigned long m_nEventsProcessed
Internal event counter.
contType_t m_contType
The variable that holds the value that we find for the input container.
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_evtInfoName
Name of the EventInfo object.
Gaudi::Property< std::string > m_cutBKCName
The name of the resulting xAOD::CutBookkeeperContainer.
ToolHandleArray< IAsgSelectionTool > m_selTools
The list of IAsgSelectionTools.
StatusCode selectParticles(const xAOD::IParticleContainer *inContainer, const std::vector< int > &resultVec) const
Private function to perform the actualy work.
virtual StatusCode execute() override
Athena algorithm's execute hook.
OwnershipPolicy
describes the possible element ownership policies (see e.g. DataVector)
SG::OwnershipPolicy m_outOwnPolicy
The internally used translation for the ownership policy.
::StatusCode StatusCode
StatusCode definition for legacy code.
Gaudi::Property< std::string > m_outCollKey
Output collection name (deep copies of the original ones)
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.
virtual StatusCode start() override
Athena algorithm's beginRun hook (called once before running over the events, after initialize)
virtual ~ParticleSelectionAlg()
Destructor:
virtual StatusCode initialize() override
Athena algorithm's initalize hook.
contType_t
An enumaration for the actual container type.
std::size_t m_idxSelParster
Store the index of the CutBookKeeper in the CutBookkeeperContainer for the selection using the Expres...
virtual StatusCode finalize() override
Athena algorithm's finalize hook.
std::size_t m_cutBKStartIdx
The starting index of where in the CutBookkeeperContainer our new CutBookkeepers start.