ATLAS Offline Software
Loading...
Searching...
No Matches
ParticleRemoverAlg.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 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
36 private:
37
40
42 Gaudi::Property<std::string> m_inCont{this, "Input", "", "Input container name"};
43
45 Gaudi::Property<std::string> m_separator{this, "Separator", "___", "The string separator between the output container name and the sytematic variation"};
46
48 Gaudi::Property<std::string> m_outCont{this, "Output", "", "The name of the output container with the deep copy of input objects"};
49
51 Gaudi::Property<std::vector<std::string>> m_suffixes{this, "Suffixes", {}, "The names of all suffixes for the input and output container names"};
52
54 Gaudi::Property<std::vector<std::string>> m_viewContNames{this, "SelectedViewContainers", {}, "The names of all view containers that contain particles that we want to retain"};
55
57 Gaudi::Property<bool> m_resetViewConts{this, "RemapViewContainers", true, "Boolean to decide if the existing view containers should be re-mapped"};
58
60 Gaudi::Property<std::string> m_outPrefix{this, "OutputViewContainerPrefix", "", "Prefix to be used for all created output view containers"};
61
63
64
67
69 std::vector<std::string> m_inContNameList;
70
72 std::vector<std::string> m_outContNameList;
73
75 std::vector< const xAOD::IParticleContainer* > m_inContList;
76
78 std::vector< xAOD::IParticleContainer* > m_outContList;
79
81 std::vector< std::vector<std::string> > m_inViewContNameListList;
82
84 std::vector< std::vector<std::string> > m_outViewContNameListList;
85
86
103
106
108
109};
110
111// Include the templated code here. This must be done from this header file.
112#include "ParticleRemoverAlg.icc"
113
114#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.
StatusCode removeParticles(const std::vector< bool > &keepParticleVec)
Private function to perform the actualy work.
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.