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 // Define the following classes concretely for source code configuration.
110
111 // Trivial subclassing for more convenient python configuration
112 // Otherwise genConf creates a horribly mangled templated name
113 // even if typedef'ed
115 {
116 public:
117 SystJetUnioniserAlg(const std::string &name,ISvcLocator *pSvcLocator)
118 : SystObjectUnioniserAlg<xAOD::Jet,xAOD::JetContainer>(name, pSvcLocator) {};
119 };
120
122 {
123 public:
124 SystElectronUnioniserAlg(const std::string &name,ISvcLocator *pSvcLocator)
126 };
127
129 {
130 public:
131 SystPhotonUnioniserAlg(const std::string &name,ISvcLocator *pSvcLocator)
133 };
134
136 {
137 public:
138 SystMuonUnioniserAlg(const std::string &name,ISvcLocator *pSvcLocator)
140 };
141
143 {
144 public:
145 SystTauUnioniserAlg(const std::string &name,ISvcLocator *pSvcLocator)
147 };
148
150 {
151 public:
152 SystDiTauUnioniserAlg(const std::string &name,ISvcLocator *pSvcLocator)
154 };
155
156}
157
159
160#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".
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".