ATLAS Offline Software
Loading...
Searching...
No Matches
CP::ParticleLevelOverlapRemovalAlg Class Reference

#include <ParticleLevelOverlapRemovalAlg.h>

Inheritance diagram for CP::ParticleLevelOverlapRemovalAlg:
Collaboration diagram for CP::ParticleLevelOverlapRemovalAlg:

Public Member Functions

virtual StatusCode initialize () final
virtual StatusCode execute (const EventContext &ctx) const final
 AnaReentrantAlgorithm (const std::string &name, ISvcLocator *pSvcLocator)
 constructor with parameters
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
virtual bool filterPassed (const EventContext &ctx) const
 Get filter decision:
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 Set filter decision:
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Protected Member Functions

virtual::StatusCode finalize ()
 finalize this algorithm
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

typedef ServiceHandle< StoreGateSvc > StoreGateSvc_t

Private Member Functions

float dressedDeltaR (const xAOD::Jet *jet, double rapidityOrEta, double phi) const
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

SG::ReadHandleKey< xAOD::JetContainer > m_jetsKey
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_electronsKey
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_muonsKey
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_photonsKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decORjet
SG::WriteDecorHandleKey< xAOD::TruthParticleContainer > m_decORelectron
SG::WriteDecorHandleKey< xAOD::TruthParticleContainer > m_decORmuon
SG::WriteDecorHandleKey< xAOD::TruthParticleContainer > m_decORphoton
SG::ReadDecorHandleKey< xAOD::TruthParticleContainer > m_ptDressedElectronKey
SG::ReadDecorHandleKey< xAOD::TruthParticleContainer > m_etaDressedElectronKey
SG::ReadDecorHandleKey< xAOD::TruthParticleContainer > m_phiDressedElectronKey
SG::ReadDecorHandleKey< xAOD::TruthParticleContainer > m_eDressedElectronKey
SG::ReadDecorHandleKey< xAOD::TruthParticleContainer > m_ptDressedMuonKey
SG::ReadDecorHandleKey< xAOD::TruthParticleContainer > m_etaDressedMuonKey
SG::ReadDecorHandleKey< xAOD::TruthParticleContainer > m_phiDressedMuonKey
SG::ReadDecorHandleKey< xAOD::TruthParticleContainer > m_eDressedMuonKey
CP::SelectionReadHandle m_jetSelection
CP::SelectionReadHandle m_electronSelection
CP::SelectionReadHandle m_muonSelection
CP::SelectionReadHandle m_photonSelection
Gaudi::Property< bool > m_useRapidity
Gaudi::Property< bool > m_useDressedProperties
Gaudi::Property< bool > m_doJetElectronOR
Gaudi::Property< bool > m_doJetMuonOR
Gaudi::Property< bool > m_doJetPhotonOR
Gaudi::Property< std::string > m_decLabelOR
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default).
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default).
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Definition at line 20 of file ParticleLevelOverlapRemovalAlg.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 376 of file AthCommonDataStore.h.

Member Function Documentation

◆ AnaReentrantAlgorithm()

EL::AnaReentrantAlgorithm::AnaReentrantAlgorithm ( const std::string & name,
ISvcLocator * pSvcLocator )

constructor with parameters

This matches the Athena algorithm constructor (for dual-use purposes). Within EventLoop the pSvcLocator will always be nullptr (unless we ever have dual-use services).

Guarantee
strong
Failures
out of memory II

Definition at line 67 of file AnaReentrantAlgorithm.cxx.

32 : AsgComponent (name)
33#else
34 : AthReentrantAlgorithm (name, pSvcLocator)
35#endif
36 {
37 ANA_MSG_DEBUG ("AnaReentrantAlgorithm: " << name);
38 }
#define ANA_MSG_DEBUG(xmsg,...)
Macro printing debug messages.

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ dressedDeltaR()

float CP::ParticleLevelOverlapRemovalAlg::dressedDeltaR ( const xAOD::Jet * jet,
double rapidityOrEta,
double phi ) const
private

Definition at line 74 of file ParticleLevelOverlapRemovalAlg.cxx.

76 {
77 if (m_useRapidity)
78 return xAOD::P4Helpers::deltaR(jet->rapidity(), jet->phi(), rapidityOrEta,
79 phi);
80 else
81 return xAOD::P4Helpers::deltaR(jet->eta(), jet->phi(), rapidityOrEta, phi);
82}
double deltaR(double rapidity1, double phi1, double rapidity2, double phi2)
from bare bare rapidity,phi

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode CP::ParticleLevelOverlapRemovalAlg::execute ( const EventContext & ctx) const
finalvirtual

Definition at line 84 of file ParticleLevelOverlapRemovalAlg.cxx.

84 {
85 SG::ReadHandle<xAOD::TruthParticleContainer> electrons, muons, photons;
88 if (m_doJetMuonOR)
89 muons = SG::makeHandle(m_muonsKey, ctx);
91 photons = SG::makeHandle(m_photonsKey, ctx);
92 SG::ReadHandle<xAOD::JetContainer> jets(m_jetsKey, ctx);
93
94 // the lepton/photon decoration handles only exist if the respective OR is
95 // enabled (their keys are empty otherwise)
96 std::optional<SG::WriteDecorHandle<xAOD::TruthParticleContainer, char>>
97 dec_electrons_OR, dec_muons_OR, dec_photons_OR;
99 dec_electrons_OR.emplace(m_decORelectron, ctx);
100 if (m_doJetMuonOR)
101 dec_muons_OR.emplace(m_decORmuon, ctx);
102 if (m_doJetPhotonOR)
103 dec_photons_OR.emplace(m_decORphoton, ctx);
104 SG::WriteDecorHandle<xAOD::JetContainer, char> dec_jets_OR(m_decORjet, ctx);
105
106 // accessors for the dressed lepton kinematics (only bound when needed)
107 std::optional<SG::ReadDecorHandle<xAOD::TruthParticleContainer, float>>
108 acc_pt_dressed_e, acc_eta_dressed_e, acc_phi_dressed_e, acc_e_dressed_e;
110 acc_pt_dressed_e.emplace(m_ptDressedElectronKey, ctx);
111 acc_eta_dressed_e.emplace(m_etaDressedElectronKey, ctx);
112 acc_phi_dressed_e.emplace(m_phiDressedElectronKey, ctx);
113 acc_e_dressed_e.emplace(m_eDressedElectronKey, ctx);
114 }
115 std::optional<SG::ReadDecorHandle<xAOD::TruthParticleContainer, float>>
116 acc_pt_dressed_m, acc_eta_dressed_m, acc_phi_dressed_m, acc_e_dressed_m;
118 acc_pt_dressed_m.emplace(m_ptDressedMuonKey, ctx);
119 acc_eta_dressed_m.emplace(m_etaDressedMuonKey, ctx);
120 acc_phi_dressed_m.emplace(m_phiDressedMuonKey, ctx);
121 acc_e_dressed_m.emplace(m_eDressedMuonKey, ctx);
122 }
123
124 // dressed (rapidity or eta, phi) of a lepton, used for the DeltaR
125 auto dressedRapidityOrEtaPhi =
126 [&](const xAOD::TruthParticle& lepton,
127 const SG::ReadDecorHandle<xAOD::TruthParticleContainer, float>& acc_pt,
128 const SG::ReadDecorHandle<xAOD::TruthParticleContainer, float>& acc_eta,
129 const SG::ReadDecorHandle<xAOD::TruthParticleContainer, float>& acc_phi,
130 const SG::ReadDecorHandle<xAOD::TruthParticleContainer, float>& acc_e) {
131 TLorentzVector dressed;
132 dressed.SetPtEtaPhiE(acc_pt(lepton), acc_eta(lepton), acc_phi(lepton),
133 acc_e(lepton));
134 return std::pair<double, double>{
135 m_useRapidity ? dressed.Rapidity() : dressed.Eta(), dressed.Phi()};
136 };
137 // per-lepton dressed kinematics, indexed by position in the container
138 // (only filled for selected leptons when using dressed properties)
139 std::vector<std::pair<double, double>> dressed_electrons, dressed_muons;
140
141 // Default decorations: all objects pass!
142 for (const auto* jet : *jets) {
143 if (m_jetSelection)
144 dec_jets_OR(*jet) = m_jetSelection.getBool(*jet);
145 else
146 dec_jets_OR(*jet) = true;
147 }
148 if (m_doJetElectronOR) {
149 dressed_electrons.resize(electrons->size());
150 for (std::size_t i = 0; i < electrons->size(); ++i) {
151 const auto* electron = (*electrons)[i];
153 (*dec_electrons_OR)(*electron) = m_electronSelection.getBool(*electron);
154 else
155 (*dec_electrons_OR)(*electron) = true;
156 if (m_useDressedProperties && (*dec_electrons_OR)(*electron))
157 dressed_electrons[i] = dressedRapidityOrEtaPhi(
158 *electron, *acc_pt_dressed_e, *acc_eta_dressed_e,
159 *acc_phi_dressed_e, *acc_e_dressed_e);
160 }
161 }
162 if (m_doJetMuonOR) {
163 dressed_muons.resize(muons->size());
164 for (std::size_t i = 0; i < muons->size(); ++i) {
165 const auto* muon = (*muons)[i];
166 if (m_muonSelection)
167 (*dec_muons_OR)(*muon) = m_muonSelection.getBool(*muon);
168 else
169 (*dec_muons_OR)(*muon) = true;
170 if (m_useDressedProperties && (*dec_muons_OR)(*muon))
171 dressed_muons[i] = dressedRapidityOrEtaPhi(
172 *muon, *acc_pt_dressed_m, *acc_eta_dressed_m, *acc_phi_dressed_m,
173 *acc_e_dressed_m);
174 }
175 }
176 if (m_doJetPhotonOR) {
177 for (const auto* photon : *photons) {
179 (*dec_photons_OR)(*photon) = m_photonSelection.getBool(*photon);
180 else
181 (*dec_photons_OR)(*photon) = true;
182 }
183 }
184
185 // ----------------------
186 // OVERLAP REMOVAL
187 // ----------------------
188 // Removal Steps:
189 // 1. Jets & Muons:
190 // Remove Muons with dR < 0.4
191 // 2. Jets & Electrons:
192 // Remove Electrons with dR < 0.4
193 // 3. Photons & Jets:
194 // Remove Jets with dR < 0.4
195 // The steps are interleaved per jet (not run sequentially over all jets),
196 // and the lepton removal uses all selected jets, regardless of whether
197 // the jet itself is removed by the photon-jet overlap removal.
198
199 for (const auto* jet : *jets) {
200 if (m_jetSelection && !m_jetSelection.getBool(*jet))
201 continue;
202 if (m_doJetMuonOR) {
203 for (std::size_t i = 0; i < muons->size(); ++i) {
204 const auto* muon = (*muons)[i];
205 if ((*dec_muons_OR)(*muon)) {
207 const auto& [rapidityOrEta, phi] = dressed_muons[i];
208 if (dressedDeltaR(jet, rapidityOrEta, phi) < 0.4)
209 (*dec_muons_OR)(*muon) = false;
210 } else {
212 (*dec_muons_OR)(*muon) = false;
213 }
214 }
215 }
216 }
217 if (m_doJetElectronOR) {
218 for (std::size_t i = 0; i < electrons->size(); ++i) {
219 const auto* electron = (*electrons)[i];
220 if ((*dec_electrons_OR)(*electron)) {
222 const auto& [rapidityOrEta, phi] = dressed_electrons[i];
223 if (dressedDeltaR(jet, rapidityOrEta, phi) < 0.4)
224 (*dec_electrons_OR)(*electron) = false;
225 } else {
227 (*dec_electrons_OR)(*electron) = false;
228 }
229 }
230 }
231 }
232 if (m_doJetPhotonOR) {
233 for (const auto* photon : *photons) {
234 if ((*dec_photons_OR)(*photon)) {
236 dec_jets_OR(*jet) = false;
237 break;
238 }
239 }
240 }
241 }
242 }
243
244 return StatusCode::SUCCESS;
245}
SG::ReadDecorHandleKey< xAOD::TruthParticleContainer > m_phiDressedMuonKey
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_photonsKey
SG::WriteDecorHandleKey< xAOD::TruthParticleContainer > m_decORmuon
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_muonsKey
SG::ReadDecorHandleKey< xAOD::TruthParticleContainer > m_eDressedElectronKey
SG::ReadHandleKey< xAOD::JetContainer > m_jetsKey
SG::WriteDecorHandleKey< xAOD::TruthParticleContainer > m_decORphoton
SG::ReadDecorHandleKey< xAOD::TruthParticleContainer > m_ptDressedElectronKey
SG::ReadDecorHandleKey< xAOD::TruthParticleContainer > m_ptDressedMuonKey
SG::WriteDecorHandleKey< xAOD::TruthParticleContainer > m_decORelectron
SG::ReadDecorHandleKey< xAOD::TruthParticleContainer > m_etaDressedMuonKey
SG::ReadDecorHandleKey< xAOD::TruthParticleContainer > m_phiDressedElectronKey
SG::ReadDecorHandleKey< xAOD::TruthParticleContainer > m_eDressedMuonKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_decORjet
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_electronsKey
float dressedDeltaR(const xAOD::Jet *jet, double rapidityOrEta, double phi) const
SG::ReadDecorHandleKey< xAOD::TruthParticleContainer > m_etaDressedElectronKey
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
TruthParticle_v1 TruthParticle
Typedef to implementation.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ extraOutputDeps()

const DataObjIDColl & AthCommonAlgorithm< Gaudi::Algorithm >::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 89 of file AthCommonAlgorithm.cxx.

54{
55 // If we didn't find any symlinks to add, just return the collection
56 // from the base class. Otherwise, return the extended collection.
57 if (!m_extendedExtraObjects.empty()) {
59 }
61}
Common base class for algorithms.

◆ filterPassed()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext & ctx) const
inlinevirtualinherited

Get filter decision:

Definition at line 93 of file AthCommonAlgorithm.h.

93 {
94 return execState( ctx ).filterPassed();
95 }
virtual bool filterPassed(const EventContext &ctx) const
Get filter decision:

◆ finalize()

StatusCode EL::AnaReentrantAlgorithm::finalize ( )
protectedinherited

finalize this algorithm

This gets called after event processing has finished. The last event may no longer be in memory, and the code should not try to access it.

Definition at line 96 of file AnaReentrantAlgorithm.cxx.

98 {
99 return StatusCode::SUCCESS;
100 }

◆ initialize()

StatusCode CP::ParticleLevelOverlapRemovalAlg::initialize ( )
finalvirtual

Definition at line 21 of file ParticleLevelOverlapRemovalAlg.cxx.

21 {
22
23 if (m_doJetElectronOR.value() == m_electronsKey.empty()) {
24 ANA_MSG_ERROR("doJetElectronOR is " << (m_doJetElectronOR.value() ? "true" : "false")
25 << " but the input container is "
26 << (m_electronsKey.empty() ? "empty" : "set"));
27 return StatusCode::FAILURE;
28 }
29 if (m_doJetMuonOR.value() == m_muonsKey.empty()) {
30 ANA_MSG_ERROR("doJetMuonOR is " << (m_doJetMuonOR.value() ? "true" : "false")
31 << " but the input container is "
32 << (m_muonsKey.empty() ? "empty" : "set"));
33 return StatusCode::FAILURE;
34 }
35 if (m_doJetPhotonOR.value() == m_photonsKey.empty()) {
36 ANA_MSG_ERROR("doJetPhotonOR is " << (m_doJetPhotonOR.value() ? "true" : "false")
37 << " but the input container is "
38 << (m_photonsKey.empty() ? "empty" : "set"));
39 return StatusCode::FAILURE;
40 }
41
42 ANA_CHECK(m_jetsKey.initialize());
46
50 ANA_CHECK(m_decORjet.initialize());
51
56
61
62 if (!m_jetSelection.empty())
63 ANA_CHECK(m_jetSelection.initialize());
64 if (!m_electronSelection.empty())
65 ANA_CHECK(m_electronSelection.initialize());
66 if (!m_muonSelection.empty())
67 ANA_CHECK(m_muonSelection.initialize());
68 if (!m_photonSelection.empty())
69 ANA_CHECK(m_photonSelection.initialize());
70
71 return StatusCode::SUCCESS;
72}
#define ANA_MSG_ERROR(xmsg,...)
Macro printing error messages.
#define ANA_CHECK(EXP)
check whether the given expression was successful

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ isClonable()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::isClonable ( ) const
inlineoverridevirtualinherited

Specify if the algorithm is clonable.

Only relevant for non-reentrant algorithms. Actual number of clones needs to be set via the "Cardinality" property.

Reimplemented in AFP_DigiTop, AlgB, AlgT, BCM_Digitization, CscDigitBuilder, CscDigitToCscRDO, G4AtlasAlg, G4RunAlg, HGTD_Digitization, HiveAlgBase, InDet::GNNSeedingTrackMaker, InDet::SCT_Clusterization, InDet::SiSPGNNTrackMaker, InDet::SiSPSeededTrackFinder, InDet::SiTrackerSpacePointFinder, ISF::SimKernelMT, ITk::StripDigitization, ITkPixelCablingAlg, ITkStripCablingAlg, LArHitEMapMaker, LArTTL1Maker, LUCID_DigiTop, LVL1::L1TopoSimulation, MergeCalibHits, MergeGenericMuonSimHitColl, MergeHijingPars, MergeMcEventCollection, MergeTrackRecordCollection, MergeTruthJets, MergeTruthParticles, MuonDigitizer, PileUpMTAlg, PixelDigitization, RoIBResultToxAOD, SCT_ByteStreamErrorsTestAlg, SCT_CablingCondAlgFromCoraCool, SCT_CablingCondAlgFromText, SCT_ConditionsParameterTestAlg, SCT_ConditionsSummaryTestAlg, SCT_ConfigurationConditionsTestAlg, SCT_Digitization, SCT_FlaggedConditionTestAlg, SCT_LinkMaskingTestAlg, SCT_MajorityConditionsTestAlg, SCT_ModuleVetoTestAlg, SCT_MonitorConditionsTestAlg, SCT_PrepDataToxAOD, SCT_RawDataToxAOD, SCT_ReadCalibChipDataTestAlg, SCT_ReadCalibDataTestAlg, SCT_RODVetoTestAlg, SCT_SensorsTestAlg, SCT_SiliconConditionsTestAlg, SCT_StripVetoTestAlg, SCT_TdaqEnabledTestAlg, SCT_TestCablingAlg, SCTEventFlagWriter, SCTRawDataProvider, SCTSiLorentzAngleTestAlg, SCTSiPropertiesTestAlg, SGInputLoader, Simulation::BeamEffectsAlg, TileHitVecToCnt, TileMuonFitter, TilePulseForTileMuonReceiver, TileRawChannelMaker, TRTDigitization, and ZDC_DigiTop.

Definition at line 68 of file AthCommonAlgorithm.h.

68 {
69 return true;
70 }

◆ msg()

MsgStream & AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< Gaudi::Algorithm >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 368 of file AthCommonDataStore.h.

369 {
370 h.renounce();
372 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 352 of file AthCommonDataStore.h.

352 {
354 }

◆ setFilterPassed()

virtual void AthCommonAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Set filter decision:

Definition at line 99 of file AthCommonAlgorithm.h.

99 {
101 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const
Set filter decision:

◆ sysExecute()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::sysExecute ( const EventContext & ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Reimplemented in AthAnalysisAlgorithm.

Definition at line 80 of file AthCommonAlgorithm.cxx.

41{
42 return BaseAlg::sysExecute (ctx);
43}

◆ sysInitialize()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthHistogramAlgorithm, HypoBase, InputMakerBase, and PyAthena::Alg.

Definition at line 60 of file AthCommonAlgorithm.cxx.

71 {
73
74 if (sc.isFailure()) {
75 return sc;
76 }
77
78 ServiceHandle<ICondSvc> cs("CondSvc",name());
79 for (auto h : outputHandles()) {
80 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
81 // do this inside the loop so we don't create the CondSvc until needed
82 if ( cs.retrieve().isFailure() ) {
83 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
85 }
86 if (cs->regHandle(this,*h).isFailure()) {
88 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
89 << " with CondSvc");
90 }
91 }
92 }
93 return sc;
94}
#define ATH_MSG_ERROR(x,...)
#define ATH_MSG_WARNING(x,...)
virtual StatusCode sysInitialize() override
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 298 of file AthCommonDataStore.h.

298 {
299 for (auto &a : m_vhka) {
301 for (auto k : keys) {
302 k->setOwner(this);
303 }
304 }
305 }

Member Data Documentation

◆ m_decLabelOR

Gaudi::Property<std::string> CP::ParticleLevelOverlapRemovalAlg::m_decLabelOR
private
Initial value:
{
this, "labelOR", "passesOR",
"decoration to apply to all particles for overlap removal"}

Definition at line 114 of file ParticleLevelOverlapRemovalAlg.h.

114 {
115 this, "labelOR", "passesOR",
116 "decoration to apply to all particles for overlap removal"};

◆ m_decORelectron

SG::WriteDecorHandleKey<xAOD::TruthParticleContainer> CP::ParticleLevelOverlapRemovalAlg::m_decORelectron
private
Initial value:
{
this, "decORelectron", "",
"the electron overlap-removal decoration; set by the config block "
"from the electron container name and labelOR, do not set directly"}

Definition at line 39 of file ParticleLevelOverlapRemovalAlg.h.

39 {
40 this, "decORelectron", "",
41 "the electron overlap-removal decoration; set by the config block "
42 "from the electron container name and labelOR, do not set directly"};

◆ m_decORjet

SG::WriteDecorHandleKey<xAOD::JetContainer> CP::ParticleLevelOverlapRemovalAlg::m_decORjet
private
Initial value:
{
this, "decORjet", "",
"the jet overlap-removal decoration; set by the config block from the "
"jet container name and labelOR, do not set directly"}

Definition at line 35 of file ParticleLevelOverlapRemovalAlg.h.

35 {
36 this, "decORjet", "",
37 "the jet overlap-removal decoration; set by the config block from the "
38 "jet container name and labelOR, do not set directly"};

◆ m_decORmuon

SG::WriteDecorHandleKey<xAOD::TruthParticleContainer> CP::ParticleLevelOverlapRemovalAlg::m_decORmuon
private
Initial value:
{
this, "decORmuon", "",
"the muon overlap-removal decoration; set by the config block from "
"the muon container name and labelOR, do not set directly"}

Definition at line 43 of file ParticleLevelOverlapRemovalAlg.h.

43 {
44 this, "decORmuon", "",
45 "the muon overlap-removal decoration; set by the config block from "
46 "the muon container name and labelOR, do not set directly"};

◆ m_decORphoton

SG::WriteDecorHandleKey<xAOD::TruthParticleContainer> CP::ParticleLevelOverlapRemovalAlg::m_decORphoton
private
Initial value:
{
this, "decORphoton", "",
"the photon overlap-removal decoration; set by the config block from "
"the photon container name and labelOR, do not set directly"}

Definition at line 47 of file ParticleLevelOverlapRemovalAlg.h.

47 {
48 this, "decORphoton", "",
49 "the photon overlap-removal decoration; set by the config block from "
50 "the photon container name and labelOR, do not set directly"};

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default).

Definition at line 381 of file AthCommonDataStore.h.

◆ m_doJetElectronOR

Gaudi::Property<bool> CP::ParticleLevelOverlapRemovalAlg::m_doJetElectronOR
private
Initial value:
{
this, "doJetElectronOR", false,
"whether to perform jet-electron overlap removal"}

Definition at line 105 of file ParticleLevelOverlapRemovalAlg.h.

105 {
106 this, "doJetElectronOR", false,
107 "whether to perform jet-electron overlap removal"};

◆ m_doJetMuonOR

Gaudi::Property<bool> CP::ParticleLevelOverlapRemovalAlg::m_doJetMuonOR
private
Initial value:
{
this, "doJetMuonOR", false,
"whether to perform jet-muon overlap removal"}

Definition at line 108 of file ParticleLevelOverlapRemovalAlg.h.

108 {
109 this, "doJetMuonOR", false,
110 "whether to perform jet-muon overlap removal"};

◆ m_doJetPhotonOR

Gaudi::Property<bool> CP::ParticleLevelOverlapRemovalAlg::m_doJetPhotonOR
private
Initial value:
{
this, "doJetPhotonOR", false,
"whether to perform jet-photon overlap removal"}

Definition at line 111 of file ParticleLevelOverlapRemovalAlg.h.

111 {
112 this, "doJetPhotonOR", false,
113 "whether to perform jet-photon overlap removal"};

◆ m_eDressedElectronKey

SG::ReadDecorHandleKey<xAOD::TruthParticleContainer> CP::ParticleLevelOverlapRemovalAlg::m_eDressedElectronKey
private
Initial value:
{
this, "eDressedElectron", "",
"dressed electron energy decoration used for the DeltaR calculation; "
"set by the config block from the electron container name, do not "
"set directly"}

Definition at line 66 of file ParticleLevelOverlapRemovalAlg.h.

66 {
67 this, "eDressedElectron", "",
68 "dressed electron energy decoration used for the DeltaR calculation; "
69 "set by the config block from the electron container name, do not "
70 "set directly"};

◆ m_eDressedMuonKey

SG::ReadDecorHandleKey<xAOD::TruthParticleContainer> CP::ParticleLevelOverlapRemovalAlg::m_eDressedMuonKey
private
Initial value:
{
this, "eDressedMuon", "",
"dressed muon energy decoration used for the DeltaR calculation; set "
"by the config block from the muon container name, do not set "
"directly"}

Definition at line 83 of file ParticleLevelOverlapRemovalAlg.h.

83 {
84 this, "eDressedMuon", "",
85 "dressed muon energy decoration used for the DeltaR calculation; set "
86 "by the config block from the muon container name, do not set "
87 "directly"};

◆ m_electronSelection

CP::SelectionReadHandle CP::ParticleLevelOverlapRemovalAlg::m_electronSelection
private
Initial value:
{
this, "electronSelection", "",
"the selection on the input truth electrons"}

Definition at line 90 of file ParticleLevelOverlapRemovalAlg.h.

90 {
91 this, "electronSelection", "",
92 "the selection on the input truth electrons"};

◆ m_electronsKey

SG::ReadHandleKey<xAOD::TruthParticleContainer> CP::ParticleLevelOverlapRemovalAlg::m_electronsKey
private
Initial value:
{
this, "electrons", "", "the name of the input truth electrons container"}

Definition at line 29 of file ParticleLevelOverlapRemovalAlg.h.

29 {
30 this, "electrons", "", "the name of the input truth electrons container"};

◆ m_etaDressedElectronKey

SG::ReadDecorHandleKey<xAOD::TruthParticleContainer> CP::ParticleLevelOverlapRemovalAlg::m_etaDressedElectronKey
private
Initial value:
{
this, "etaDressedElectron", "",
"dressed electron eta decoration used for the DeltaR calculation; set "
"by the config block from the electron container name, do not set "
"directly"}

Definition at line 56 of file ParticleLevelOverlapRemovalAlg.h.

56 {
57 this, "etaDressedElectron", "",
58 "dressed electron eta decoration used for the DeltaR calculation; set "
59 "by the config block from the electron container name, do not set "
60 "directly"};

◆ m_etaDressedMuonKey

SG::ReadDecorHandleKey<xAOD::TruthParticleContainer> CP::ParticleLevelOverlapRemovalAlg::m_etaDressedMuonKey
private
Initial value:
{
this, "etaDressedMuon", "",
"dressed muon eta decoration used for the DeltaR calculation; set by "
"the config block from the muon container name, do not set directly"}

Definition at line 75 of file ParticleLevelOverlapRemovalAlg.h.

75 {
76 this, "etaDressedMuon", "",
77 "dressed muon eta decoration used for the DeltaR calculation; set by "
78 "the config block from the muon container name, do not set directly"};

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default).

Definition at line 378 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthCommonAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 108 of file AthCommonAlgorithm.h.

◆ m_jetSelection

CP::SelectionReadHandle CP::ParticleLevelOverlapRemovalAlg::m_jetSelection
private
Initial value:
{
this, "jetSelection", "", "the selection on the input truth jets"}

Definition at line 88 of file ParticleLevelOverlapRemovalAlg.h.

88 {
89 this, "jetSelection", "", "the selection on the input truth jets"};

◆ m_jetsKey

SG::ReadHandleKey<xAOD::JetContainer> CP::ParticleLevelOverlapRemovalAlg::m_jetsKey
private
Initial value:
{
this, "jets", "", "the name of the input truth jet container"}

Definition at line 27 of file ParticleLevelOverlapRemovalAlg.h.

27 {
28 this, "jets", "", "the name of the input truth jet container"};

◆ m_muonSelection

CP::SelectionReadHandle CP::ParticleLevelOverlapRemovalAlg::m_muonSelection
private
Initial value:
{
this, "muonSelection", "", "the selection on the input truth muons"}

Definition at line 93 of file ParticleLevelOverlapRemovalAlg.h.

93 {
94 this, "muonSelection", "", "the selection on the input truth muons"};

◆ m_muonsKey

SG::ReadHandleKey<xAOD::TruthParticleContainer> CP::ParticleLevelOverlapRemovalAlg::m_muonsKey
private
Initial value:
{
this, "muons", "", "the name of the input truth muons container"}

Definition at line 31 of file ParticleLevelOverlapRemovalAlg.h.

31 {
32 this, "muons", "", "the name of the input truth muons container"};

◆ m_phiDressedElectronKey

SG::ReadDecorHandleKey<xAOD::TruthParticleContainer> CP::ParticleLevelOverlapRemovalAlg::m_phiDressedElectronKey
private
Initial value:
{
this, "phiDressedElectron", "",
"dressed electron phi decoration used for the DeltaR calculation; set "
"by the config block from the electron container name, do not set "
"directly"}

Definition at line 61 of file ParticleLevelOverlapRemovalAlg.h.

61 {
62 this, "phiDressedElectron", "",
63 "dressed electron phi decoration used for the DeltaR calculation; set "
64 "by the config block from the electron container name, do not set "
65 "directly"};

◆ m_phiDressedMuonKey

SG::ReadDecorHandleKey<xAOD::TruthParticleContainer> CP::ParticleLevelOverlapRemovalAlg::m_phiDressedMuonKey
private
Initial value:
{
this, "phiDressedMuon", "",
"dressed muon phi decoration used for the DeltaR calculation; set by "
"the config block from the muon container name, do not set directly"}

Definition at line 79 of file ParticleLevelOverlapRemovalAlg.h.

79 {
80 this, "phiDressedMuon", "",
81 "dressed muon phi decoration used for the DeltaR calculation; set by "
82 "the config block from the muon container name, do not set directly"};

◆ m_photonSelection

CP::SelectionReadHandle CP::ParticleLevelOverlapRemovalAlg::m_photonSelection
private
Initial value:
{
this, "photonSelection", "", "the selection on the input truth photons"}

Definition at line 95 of file ParticleLevelOverlapRemovalAlg.h.

95 {
96 this, "photonSelection", "", "the selection on the input truth photons"};

◆ m_photonsKey

SG::ReadHandleKey<xAOD::TruthParticleContainer> CP::ParticleLevelOverlapRemovalAlg::m_photonsKey
private
Initial value:
{
this, "photons", "", "the name of the input truth photons container"}

Definition at line 33 of file ParticleLevelOverlapRemovalAlg.h.

33 {
34 this, "photons", "", "the name of the input truth photons container"};

◆ m_ptDressedElectronKey

SG::ReadDecorHandleKey<xAOD::TruthParticleContainer> CP::ParticleLevelOverlapRemovalAlg::m_ptDressedElectronKey
private
Initial value:
{
this, "ptDressedElectron", "",
"dressed electron pt decoration used for the DeltaR calculation; set "
"by the config block from the electron container name, do not set "
"directly"}

Definition at line 51 of file ParticleLevelOverlapRemovalAlg.h.

51 {
52 this, "ptDressedElectron", "",
53 "dressed electron pt decoration used for the DeltaR calculation; set "
54 "by the config block from the electron container name, do not set "
55 "directly"};

◆ m_ptDressedMuonKey

SG::ReadDecorHandleKey<xAOD::TruthParticleContainer> CP::ParticleLevelOverlapRemovalAlg::m_ptDressedMuonKey
private
Initial value:
{
this, "ptDressedMuon", "",
"dressed muon pt decoration used for the DeltaR calculation; set by "
"the config block from the muon container name, do not set directly"}

Definition at line 71 of file ParticleLevelOverlapRemovalAlg.h.

71 {
72 this, "ptDressedMuon", "",
73 "dressed muon pt decoration used for the DeltaR calculation; set by "
74 "the config block from the muon container name, do not set directly"};

◆ m_useDressedProperties

Gaudi::Property<bool> CP::ParticleLevelOverlapRemovalAlg::m_useDressedProperties
private
Initial value:
{
this, "useDressedProperties", true,
"whether to use dressed electron and muon kinematics rather than simple "
"P4 kinematics"}

Definition at line 101 of file ParticleLevelOverlapRemovalAlg.h.

101 {
102 this, "useDressedProperties", true,
103 "whether to use dressed electron and muon kinematics rather than simple "
104 "P4 kinematics"};

◆ m_useRapidity

Gaudi::Property<bool> CP::ParticleLevelOverlapRemovalAlg::m_useRapidity
private
Initial value:
{
this, "useRapidityForDeltaR", true,
"whether to use rapidity instead of pseudo-rapidity for the calculation "
"of DeltaR"}

Definition at line 97 of file ParticleLevelOverlapRemovalAlg.h.

97 {
98 this, "useRapidityForDeltaR", true,
99 "whether to use rapidity instead of pseudo-rapidity for the calculation "
100 "of DeltaR"};

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 387 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
privateinherited

Definition at line 386 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files: