ATLAS Offline Software
Loading...
Searching...
No Matches
ParticleRemoverAlg.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef EVENTUTILS_PARTICLEREMOVERALG_H
6#define EVENTUTILS_PARTICLEREMOVERALG_H 1
7
9
11
12
13
15 public:
17 ParticleRemoverAlg( const std::string& name, ISvcLocator* pSvcLocator );
18
20 virtual ~ParticleRemoverAlg();
21
23 virtual StatusCode initialize();
24
26 virtual StatusCode execute();
27
29 virtual StatusCode finalize();
30
31 private:
33 template<class CONT>
34 StatusCode removeParticles( const std::vector<bool>& keepParticleVec,
35 const EventContext& ctx );
36
37 private:
38
41
43 Gaudi::Property<std::string> m_inCont{this, "Input", "", "Input container name"};
44
46 Gaudi::Property<std::string> m_separator{this, "Separator", "___", "The string separator between the output container name and the sytematic variation"};
47
49 Gaudi::Property<std::string> m_outCont{this, "Output", "", "The name of the output container with the deep copy of input objects"};
50
52 Gaudi::Property<std::vector<std::string>> m_suffixes{this, "Suffixes", {}, "The names of all suffixes for the input and output container names"};
53
55 Gaudi::Property<std::vector<std::string>> m_viewContNames{this, "SelectedViewContainers", {}, "The names of all view containers that contain particles that we want to retain"};
56
58 Gaudi::Property<bool> m_resetViewConts{this, "RemapViewContainers", true, "Boolean to decide if the existing view containers should be re-mapped"};
59
61 Gaudi::Property<std::string> m_outPrefix{this, "OutputViewContainerPrefix", "", "Prefix to be used for all created output view containers"};
62
64
65
68
70 std::vector<std::string> m_inContNameList;
71
73 std::vector<std::string> m_outContNameList;
74
76 std::vector< const xAOD::IParticleContainer* > m_inContList;
77
79 std::vector< xAOD::IParticleContainer* > m_outContList;
80
82 std::vector< std::vector<std::string> > m_inViewContNameListList;
83
85 std::vector< std::vector<std::string> > m_outViewContNameListList;
86
87
104
107
109
110};
111
112// Include the templated code here. This must be done from this header file.
113#include "ParticleRemoverAlg.icc"
114
115#endif //> !EVENTUTILS_PARTICLEREMOVERALG_H
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Gaudi::Property< std::vector< std::string > > m_suffixes
The names of all suffixes for the input and output container names.
std::vector< std::vector< std::string > > m_inViewContNameListList
Vector of all input view container names.
std::vector< std::vector< std::string > > m_outViewContNameListList
Vector of all output view container names.
Gaudi::Property< bool > m_resetViewConts
Boolean to decide if the existing view containers should be re-mapped (default: true)
std::vector< xAOD::IParticleContainer * > m_outContList
Vector of all output containers.
virtual StatusCode initialize()
Standard Gaudi initialize method called once before the event loop.
std::vector< std::string > m_outContNameList
Vector of all output container names.
ParticleRemoverAlg(const std::string &name, ISvcLocator *pSvcLocator)
Standard constructor.
Gaudi::Property< std::string > m_separator
The string separator between the output container name and the sytematic variation (default="___")
virtual StatusCode execute()
Standard Gaudi execute method called once for every event.
virtual StatusCode finalize()
Standard Gaudi finalize method called once after the event loop.
virtual ~ParticleRemoverAlg()
Standard destructor.
Gaudi::Property< std::vector< std::string > > m_viewContNames
The names of all view containers that contain particles that we want to retain.
std::vector< std::string > m_inContNameList
Vector of all input container names.
contType_t
An enumaration for the actual container type.
contType_t m_contType
The variable that holds the value that we find for the input container.
std::vector< const xAOD::IParticleContainer * > m_inContList
Vector of all input containers.
Gaudi::Property< std::string > m_outCont
The output container name.
Gaudi::Property< std::string > m_outPrefix
Prefix to be used for all created output view containers.
Gaudi::Property< std::string > m_inCont
The input container name.
StatusCode removeParticles(const std::vector< bool > &keepParticleVec, const EventContext &ctx)
Private function to perform the actual work.