ATLAS Offline Software
Loading...
Searching...
No Matches
SystObjectUnioniserAlg.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
4 SystObjectUnioniserAlg:
5 This alg takes a set of systematic variation containers which have
6 been filtered, then using the links set by SystObjectLinkerAlg
7 constructs new containers holding the objects that are in any
8 of the filtered variation containers.
9
10 This is templated to support recording the union containers as
11 the concrete type, not least because xAOD::IParticleContainer has
12 no CollectionProxy to support writing with AsgxAODNTupleMakerAlg.
13
14*/
15
17
18
19// Always protect against multiple includes!
20#ifndef CP_SYSTUNIONISERALG
21#define CP_SYSTUNIONISERALG
22
23
24
31#ifdef XAOD_STANDALONE
33#endif
34
38#include <xAODJet/Jet.h>
40#include <xAODEgamma/Electron.h>
42#include <xAODEgamma/Photon.h>
44#include <xAODMuon/Muon.h>
46#include <xAODTau/TauJet.h>
48#include <xAODTau/DiTauJet.h>
50
51#include <vector>
52#include <unordered_map>
53#include <utility>
54#include <memory>
55
56class EventContext;
57
58namespace CP
59{
61
62 // We need separate template parameters for the object type
63 // and container, as DataVector<xAOD::Blah_v1> does not have
64 // a classID, where BlahContainer does.
65 template<class T, class C>
67 {
69public:
71
74 StatusCode initialize() override;
76 StatusCode execute(const EventContext& ctx) const override;
78
79private:
80
81 // Members for configurable properties
82
85
88 m_inputHandle{ this, "input", "", "Container to read" };
89
92 m_outputHandle{this, "output", "", "Collection holding all objects passing any systematic"};
93
95 Gaudi::Property<std::string> m_syst_decor_pattern
96 { this, "systVarLink_template", "systVarLink_%SYS%", "Pattern to be substituted with systematics names"};
97
99 std::unordered_map<size_t,SG::ConstAccessor<iplink_t> >
101 };
102
103 // The following classes are instantiated concretely for source code
104 // configuration in Root/SystObjectUnioniserAlg.cxx.
111
112 // Trivial subclassing for more convenient python configuration
113 // Otherwise genConf creates a horribly mangled templated name
114 // even if typedef'ed
116 {
117 public:
118 SystJetUnioniserAlg(const std::string &name,ISvcLocator *pSvcLocator)
119 : SystObjectUnioniserAlg<xAOD::Jet,xAOD::JetContainer>(name, pSvcLocator) {};
120 };
121
123 {
124 public:
125 SystElectronUnioniserAlg(const std::string &name,ISvcLocator *pSvcLocator)
127 };
128
130 {
131 public:
132 SystPhotonUnioniserAlg(const std::string &name,ISvcLocator *pSvcLocator)
134 };
135
137 {
138 public:
139 SystMuonUnioniserAlg(const std::string &name,ISvcLocator *pSvcLocator)
141 };
142
144 {
145 public:
146 SystTauUnioniserAlg(const std::string &name,ISvcLocator *pSvcLocator)
148 };
149
151 {
152 public:
153 SystDiTauUnioniserAlg(const std::string &name,ISvcLocator *pSvcLocator)
155 };
156
157}
158
160
161#endif
DataVector adapter that acts like it holds const pointers.
An STL vector of pointers that by default owns its pointed-to elements.
a class managing the property to configure the list of systematics to process
a data handle for reading systematics varied input data
a data handle for writing systematics varied input data
SystDiTauUnioniserAlg(const std::string &name, ISvcLocator *pSvcLocator)
SystElectronUnioniserAlg(const std::string &name, ISvcLocator *pSvcLocator)
SystJetUnioniserAlg(const std::string &name, ISvcLocator *pSvcLocator)
SystMuonUnioniserAlg(const std::string &name, ISvcLocator *pSvcLocator)
CP::SysListHandle m_systematicsList
We use default finalize() – this is for cleanup, and we don't do any.
StatusCode initialize() override
Initialisation method, for setting up tools and other persistent configs.
StatusCode execute(const EventContext &ctx) const override
Execute method, for actions to be taken in the event loop.
CP::SysWriteHandle< ConstDataVector< C > > m_outputHandle
Setup syst-aware output container handles, templated to generate appropriate type.
Gaudi::Property< std::string > m_syst_decor_pattern
The systematics link decoration name template.
CP::SysReadHandle< C > m_inputHandle
Setup syst-aware input container handles.
std::unordered_map< size_t, SG::ConstAccessor< iplink_t > > m_syst_link_acc
Build a map of syst hash to ConstAccessors to read the systematics links.
SystPhotonUnioniserAlg(const std::string &name, ISvcLocator *pSvcLocator)
SystTauUnioniserAlg(const std::string &name, ISvcLocator *pSvcLocator)
the base class for EventLoop reentrant algorithms
AnaReentrantAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
constructor with parameters
Select isolated Photons, Electrons and Muons.
ElementLink< xAOD::IParticleContainer > iplink_t
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Jet_v1 Jet
Definition of the current "jet version".
PhotonContainer_v1 PhotonContainer
Definition of the current "photon container version".
ElectronContainer_v1 ElectronContainer
Definition of the current "electron container version".
DiTauJetContainer_v1 DiTauJetContainer
Definition of the current DiTauJet container version.
TauJet_v3 TauJet
Definition of the current "tau version".
Definition TauJet.h:17
Photon_v1 Photon
Definition of the current "egamma version".
Definition Photon.h:17
DiTauJet_v1 DiTauJet
Definition of the current version.
Definition DiTauJet.h:17
JetContainer_v1 JetContainer
Definition of the current "jet container version".
TauJetContainer_v3 TauJetContainer
Definition of the current "taujet container version".
MuonContainer_v1 MuonContainer
Definition of the current "Muon container version".
Electron_v1 Electron
Definition of the current "egamma version".
Definition Electron.h:17