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

#include <IsoCloseByCorrectionAlg.h>

Inheritance diagram for CP::IsoCloseByCorrectionAlg:
Collaboration diagram for CP::IsoCloseByCorrectionAlg:

Public Member Functions

 IsoCloseByCorrectionAlg (const std::string &name, ISvcLocator *svcLoc)
StatusCode execute (const EventContext &ctx) const override
StatusCode initialize () override
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.
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
virtual void setFilterPassed (bool state, const EventContext &ctx) const
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

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< StoreGateSvcStoreGateSvc_t

Private Member Functions

StatusCode applySelection (const EventContext &ctx, const xAOD::Electron *elec, const SG::Decorator< char > &isOK) const
StatusCode applySelection (const EventContext &ctx, const xAOD::Photon *phot, const SG::Decorator< char > &isOK) const
StatusCode applySelection (const EventContext &ctx, const xAOD::Muon *muon, const SG::Decorator< char > &isOK) const
template<class CONT_TYPE>
StatusCode selectLeptonsAndPhotons (const EventContext &ctx, CONT_TYPE particles, const SG::Decorator< char > &isOK) const
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

SG::ReadHandleKeyArray< xAOD::IParticleContainerm_contKeys {this, "ParticleContainerKeys", {} }
 Input containers to retrieve from the storegate.
SG::ReadDecorHandleKey< xAOD::MuonContainerm_muonSelKey {this, "MuonSelectionKey", ""}
 For lepton/photon selection, normally one uses either a decorator xxxSelKey, or a tool xxxSelTool, but logic allows both to be required:
SG::ReadDecorHandleKey< xAOD::ElectronContainerm_elecSelKey {this, "ElecSelectionKey", ""}
SG::ReadDecorHandleKey< xAOD::PhotonContainerm_photSelKey {this, "PhotSelectionKey", ""}
ToolHandle< CP::IMuonSelectionToolm_muonSelTool {this, "MuonSelectionTool", ""}
 tools for selection of incoming particles
ToolHandle< IAsgElectronLikelihoodToolm_elecSelTool {this, "ElectronSelectionTool", ""}
ToolHandle< IAsgPhotonIsEMSelectorm_photSelTool {this, "PhotonSelectionTool", ""}
ToolHandle< CP::IIsolationCloseByCorrectionToolm_closeByCorrTool
 The closeBy isolation correction tool.
Gaudi::Property< floatm_minElecPt
 Kinematic cuts - if needed.
Gaudi::Property< floatm_minMuonPt
Gaudi::Property< floatm_minPhotPt
Gaudi::Property< std::string > m_quality_name
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 29 of file IsoCloseByCorrectionAlg.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ IsoCloseByCorrectionAlg()

CP::IsoCloseByCorrectionAlg::IsoCloseByCorrectionAlg ( const std::string & name,
ISvcLocator * svcLoc )

Definition at line 19 of file IsoCloseByCorrectionAlg.cxx.

19 :
20 AthReentrantAlgorithm(name, svcLoc) {}

Member Function Documentation

◆ applySelection() [1/3]

StatusCode CP::IsoCloseByCorrectionAlg::applySelection ( const EventContext & ctx,
const xAOD::Electron * elec,
const SG::Decorator< char > & isOK ) const
private

Definition at line 170 of file IsoCloseByCorrectionAlg.cxx.

173 {
174
175 // Check incoming selection decorator
176 if (!m_elecSelKey.empty()) {
177 SG::ReadDecorHandle<xAOD::ElectronContainer, char> decor{m_elecSelKey, ctx};
178 if (!decor(*elec)) {
179 ATH_MSG_VERBOSE("applySelection: electron fails " << m_elecSelKey.key());
180 isOK(*elec) = false;
181 return StatusCode::SUCCESS;
182 }
183 }
184 // Check incoming selection tool
185 if (!m_elecSelTool.empty()) {
186 if (!m_elecSelTool->accept(ctx, elec)) {
187 ATH_MSG_VERBOSE("applySelection: electron fails VeryLooseLH cut");
188 isOK(*elec) = false;
189 return StatusCode::SUCCESS;
190 }
191 }
192 // Check pt
193 if (elec->pt() < m_minElecPt) {
194 ATH_MSG_VERBOSE("applySelection: electron fails pt cut: " << elec->pt() << ", " << m_minElecPt);
195 isOK(*elec) = false;
196 return StatusCode::SUCCESS;
197 }
198 isOK(*elec) = true;
199
200 ATH_MSG_VERBOSE("applySelection: " << elec->type() << ", " << elec->pt() << ", " << elec->eta() << ", " << elec->phi() << ", " << (int)isOK(*elec));
201
202 return StatusCode::SUCCESS;
203 }
#define ATH_MSG_VERBOSE(x)
Gaudi::Property< float > m_minElecPt
Kinematic cuts - if needed.
SG::ReadDecorHandleKey< xAOD::ElectronContainer > m_elecSelKey
ToolHandle< IAsgElectronLikelihoodTool > m_elecSelTool
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Definition Egamma_v1.cxx:66
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Definition Egamma_v1.cxx:71
virtual double phi() const override final
The azimuthal angle ( ) of the particle.
Definition Egamma_v1.cxx:76
virtual Type::ObjectType type() const override final
The type of the object as a simple enumeration.

◆ applySelection() [2/3]

StatusCode CP::IsoCloseByCorrectionAlg::applySelection ( const EventContext & ctx,
const xAOD::Muon * muon,
const SG::Decorator< char > & isOK ) const
private

Definition at line 134 of file IsoCloseByCorrectionAlg.cxx.

137 {
138
139 // Check incoming selection decorator
140 if (!m_muonSelKey.empty()) {
141 SG::ReadDecorHandle<xAOD::MuonContainer, char> decor{m_muonSelKey, ctx};
142 if (!decor(*muon)) {
143 ATH_MSG_VERBOSE("applySelection: muon fails " << m_muonSelKey.key());
144 isOK(*muon) = false;
145 return StatusCode::SUCCESS;
146 }
147 }
148
149 // Check incoming selection tool
150 if (!m_muonSelTool.empty()) {
151 if (!m_muonSelTool->accept(*muon)) {
152 ATH_MSG_VERBOSE("applySelection: muon fails Loose cut");
153 isOK(*muon) = false;
154 return StatusCode::SUCCESS;
155 }
156 }
157 // Check pt
158 if (muon->pt() < m_minMuonPt) {
159 ATH_MSG_VERBOSE("applySelection: muon fails pt cut: " << muon->pt() << ", " << m_minMuonPt);
160 isOK(*muon) = false;
161 return StatusCode::SUCCESS;
162 }
163
164 isOK(*muon) = true;
165 ATH_MSG_VERBOSE("applySelection: " << muon->type() << ", " << muon->pt() << ", " << muon->eta() << ", " << muon->phi() << ", " << (int)isOK(*muon));
166
167 return StatusCode::SUCCESS;
168 }
SG::ReadDecorHandleKey< xAOD::MuonContainer > m_muonSelKey
For lepton/photon selection, normally one uses either a decorator xxxSelKey, or a tool xxxSelTool,...
ToolHandle< CP::IMuonSelectionTool > m_muonSelTool
tools for selection of incoming particles
Gaudi::Property< float > m_minMuonPt

◆ applySelection() [3/3]

StatusCode CP::IsoCloseByCorrectionAlg::applySelection ( const EventContext & ctx,
const xAOD::Photon * phot,
const SG::Decorator< char > & isOK ) const
private

Definition at line 205 of file IsoCloseByCorrectionAlg.cxx.

208 {
209
210 // Check incoming selection decorator
211 if (!m_photSelKey.empty()) {
212 SG::ReadDecorHandle<xAOD::PhotonContainer, char> decor{m_photSelKey, ctx};
213 if (!decor(*phot)) {
214 ATH_MSG_VERBOSE("applySelection: photon fails " << m_photSelKey.key());
215 isOK(*phot) = false;
216 return StatusCode::SUCCESS;
217 }
218 }
219
220 // Check incoming selection tool
221 if (!m_photSelTool.empty()) {
222 if (!m_photSelTool->accept(ctx, phot)) {
223 ATH_MSG_VERBOSE("applySelection: photon fails IsEMLoose cut");
224 isOK(*phot) = false;
225 return StatusCode::SUCCESS;
226 }
227 }
228
229 // Check pt
230 if (phot->pt() < m_minPhotPt) {
231 ATH_MSG_VERBOSE("applySelection: photon fails pt cut: " << phot->pt() << ", " << m_minPhotPt);
232 isOK(*phot) = false;
233 return StatusCode::SUCCESS;
234 }
235
236 isOK(*phot) = true;
237
238 ATH_MSG_VERBOSE("applySelection: " << phot->type() << ", " << phot->pt() << ", " << phot->eta() << ", " << phot->phi() << ", " << (int)isOK(*phot));
239
240 return StatusCode::SUCCESS;
241 }
Gaudi::Property< float > m_minPhotPt
ToolHandle< IAsgPhotonIsEMSelector > m_photSelTool
SG::ReadDecorHandleKey< xAOD::PhotonContainer > m_photSelKey
virtual Type::ObjectType type() const override final
The type of the object as a simple enumeration.
Definition Photon_v1.cxx:37

◆ cardinality()

unsigned int AthCommonReentrantAlgorithm< Gaudi::Algorithm >::cardinality ( ) const
overridevirtualinherited

Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.

Override this to return 0 for reentrant algorithms.

Definition at line 75 of file AthCommonReentrantAlgorithm.cxx.

64{
65 return 0;
66}

◆ 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.

◆ 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::IsoCloseByCorrectionAlg::execute ( const EventContext & ctx) const
override

Apply selection to muons, electrons and photons - setting selection decorator

Now apply correction to close by leptons and photons

Definition at line 46 of file IsoCloseByCorrectionAlg.cxx.

46 {
47
48 ATH_MSG_DEBUG("execute: entering " );
49
50 // Loop over input IParticleContainer, and fill different ConstDataVectors for muons, electrons and photons.
51 // There may be more than one container for each.
52 // Then apply selections of objects, decorating with "isoSelIsOK" for the IsoCloseByTool, and then pass the ConstDataVectors to the tool.
53
54 ConstDataVector<xAOD::MuonContainer> muons{SG::VIEW_ELEMENTS};
55 ConstDataVector<xAOD::ElectronContainer> electrons{SG::VIEW_ELEMENTS};
56 ConstDataVector<xAOD::PhotonContainer> photons{SG::VIEW_ELEMENTS};
57
58 const SG::Decorator<char> isOK(m_quality_name);
59
60 for (const SG::ReadHandleKey<xAOD::IParticleContainer>& contKey : m_contKeys) {
61 SG::ReadHandle<xAOD::IParticleContainer> parts (contKey, ctx);
62 for ( const xAOD::IParticle* part : *parts ) {
63
64 // Check type of container and apply selection as appropriate
65 if (part->type() == xAOD::Type::Muon) {
66 // cast to muon container
67 const xAOD::Muon* muon = static_cast<const xAOD::Muon*>(part);
68 muons.push_back(muon);
69 }
70 else if (part->type() == xAOD::Type::Electron) {
71 // cast to electron container
72 const xAOD::Electron* electron = static_cast<const xAOD::Electron*>(part);
73 electrons.push_back(electron);
74 }
75 else if (part->type() == xAOD::Type::Photon) {
76 // cast to photon container
77 const xAOD::Photon* photon = static_cast<const xAOD::Photon*>(part);
78 photons.push_back(photon);
79 }
80 }
81 }
82
83 ATH_MSG_DEBUG("execute: apply selections " );
84
86 ATH_CHECK(selectLeptonsAndPhotons(ctx, muons, isOK));
87 ATH_CHECK(selectLeptonsAndPhotons(ctx, electrons, isOK));
88 ATH_CHECK(selectLeptonsAndPhotons(ctx, photons, isOK));
89
90 ATH_MSG_DEBUG("execute: apply closeBy correction " );
91
93 if (m_closeByCorrTool->getCloseByIsoCorrection(ctx, electrons.asDataVector(), muons.asDataVector(), photons.asDataVector()) == CorrectionCode::Error) {
94 ATH_MSG_FATAL("Failed to do close by iso correction ");
95 return StatusCode::FAILURE;
96 }
97
98 // Make sure the isoSelIsOK decorations get locked.
99 // Unfortunately, we can't use decoration handles because we may
100 // be configured with view containers as input.
102 for (const SG::ReadHandleKey<xAOD::IParticleContainer>& contKey : m_contKeys) {
103 SG::ReadHandle<xAOD::IParticleContainer> parts (contKey, ctx);
104 for ( const xAOD::IParticle* part : *parts ) {
105 const SG::AuxVectorData* c = part->container();
106 if (conts.insert(c).second) {
107 SG::AuxVectorData* c_nc ATLAS_THREAD_SAFE =
108 const_cast<SG::AuxVectorData*> (c);
109 c_nc->lockDecoration (isOK.auxid());
110 }
111 }
112 }
113
114 ATH_MSG_DEBUG("execute: after closeBy correction " );
115
116 return StatusCode::SUCCESS;
117 }
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_FATAL(x)
#define ATH_MSG_DEBUG(x)
#define ATLAS_THREAD_SAFE
@ Error
Some error happened during the object correction.
SG::ReadHandleKeyArray< xAOD::IParticleContainer > m_contKeys
Input containers to retrieve from the storegate.
Gaudi::Property< std::string > m_quality_name
StatusCode selectLeptonsAndPhotons(const EventContext &ctx, CONT_TYPE particles, const SG::Decorator< char > &isOK) const
ToolHandle< CP::IIsolationCloseByCorrectionTool > m_closeByCorrTool
The closeBy isolation correction tool.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
const DV * asDataVector() const
Return a pointer to this object, as a const DataVector.
std::unordered_set< const SG::AuxVectorData * > UnorderedContainerSet
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
@ Photon
The object is a photon.
Definition ObjectType.h:47
@ Muon
The object is a muon.
Definition ObjectType.h:48
@ Electron
The object is an electron.
Definition ObjectType.h:46
Muon_v1 Muon
Reference the current persistent version:
Photon_v1 Photon
Definition of the current "egamma version".
Electron_v1 Electron
Definition of the current "egamma version".

◆ 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 & AthCommonReentrantAlgorithm< 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 94 of file AthCommonReentrantAlgorithm.cxx.

90{
91 // If we didn't find any symlinks to add, just return the collection
92 // from the base class. Otherwise, return the extended collection.
93 if (!m_extendedExtraObjects.empty()) {
95 }
97}
An algorithm that can be simultaneously executed in multiple threads.

◆ filterPassed()

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

Definition at line 96 of file AthCommonReentrantAlgorithm.h.

96 {
97 return execState( ctx ).filterPassed();
98 }
virtual bool filterPassed(const EventContext &ctx) const

◆ initialize()

StatusCode CP::IsoCloseByCorrectionAlg::initialize ( )
override

Definition at line 21 of file IsoCloseByCorrectionAlg.cxx.

21 {
22
23 ATH_MSG_INFO("Initialize IsoCloseByCorrectionAlg " );
24
25
26 for (const SG::ReadHandleKey<xAOD::IParticleContainer>& contKey : m_contKeys) {
27 ATH_MSG_INFO("Initialize " << contKey.key());
28 }
29 if (!m_muonSelKey.empty()) ATH_MSG_INFO("Initialize muon sel " << m_muonSelKey.key() << ", " << m_muonSelKey.isEventStore() );
30 if (!m_elecSelKey.empty()) ATH_MSG_INFO("Initialize elec sel " << m_elecSelKey.key() << ", " << m_elecSelKey.isEventStore() );
31 if (!m_photSelKey.empty()) ATH_MSG_INFO("Initialize phot sel " << m_photSelKey.key() << ", " << m_photSelKey.isEventStore() );
32 ATH_MSG_INFO("Initialize MinMuonPt " << m_minMuonPt.value());
33 ATH_MSG_INFO("Initialize MinElecPt " << m_minElecPt.value());
34 ATH_MSG_INFO("Initialize MinPhotPt " << m_minPhotPt.value());
35 if (m_muonSelTool.isEnabled()) ATH_MSG_INFO("Initialize muon sel tool " << m_muonSelTool.name());
36 if (m_elecSelTool.isEnabled()) ATH_MSG_INFO("Initialize elec sel tool " << m_elecSelTool.name());
37 if (m_photSelTool.isEnabled()) ATH_MSG_INFO("Initialize phot sel tool " << m_photSelTool.name());
38
39 ATH_CHECK(m_contKeys.initialize(!m_contKeys.empty()));
40 ATH_CHECK(m_muonSelKey.initialize(!m_muonSelKey.empty()));
41 ATH_CHECK(m_elecSelKey.initialize(!m_elecSelKey.empty()));
42 ATH_CHECK(m_photSelKey.initialize(!m_photSelKey.empty()));
43 return StatusCode::SUCCESS;
44 }
#define ATH_MSG_INFO(x)

◆ 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()

◆ 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 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
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 364 of file AthCommonDataStore.h.

364 {
366 }

◆ selectLeptonsAndPhotons()

template<class CONT_TYPE>
StatusCode CP::IsoCloseByCorrectionAlg::selectLeptonsAndPhotons ( const EventContext & ctx,
CONT_TYPE particles,
const SG::Decorator< char > & isOK ) const
private

Definition at line 120 of file IsoCloseByCorrectionAlg.cxx.

123 {
124
125 ATH_MSG_DEBUG("selectLeptonsAndPhotons: entering" );
126
127 for ( auto particle : particles ) {
128 ATH_MSG_DEBUG("selectLeptonsAndPhotons: pt, eta, ph " << particle->pt()/1000. << ", " << particle->eta() << ", " << particle->phi() );
129 ATH_CHECK(applySelection(ctx, particle, isOK));
130 }
131 return StatusCode::SUCCESS;
132 }
StatusCode applySelection(const EventContext &ctx, const xAOD::Electron *elec, const SG::Decorator< char > &isOK) const
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses

◆ setFilterPassed()

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

Definition at line 100 of file AthCommonReentrantAlgorithm.h.

100 {
102 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const

◆ sysExecute()

StatusCode AthCommonReentrantAlgorithm< 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.

Definition at line 85 of file AthCommonReentrantAlgorithm.cxx.

77{
78 return BaseAlg::sysExecute (ctx);
79}

◆ sysInitialize()

StatusCode AthCommonReentrantAlgorithm< 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 HypoBase, and InputMakerBase.

Definition at line 61 of file AthCommonReentrantAlgorithm.cxx.

107 {
109
110 if (sc.isFailure()) {
111 return sc;
112 }
113
114 ServiceHandle<ICondSvc> cs("CondSvc",name());
115 for (auto h : outputHandles()) {
116 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
117 // do this inside the loop so we don't create the CondSvc until needed
118 if ( cs.retrieve().isFailure() ) {
119 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
120 return StatusCode::SUCCESS;
121 }
122 if (cs->regHandle(this,*h).isFailure()) {
124 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
125 << " with CondSvc");
126 }
127 }
128 }
129 return sc;
130}
#define ATH_MSG_ERROR(x)
#define ATH_MSG_WARNING(x)
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 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }

Member Data Documentation

◆ m_closeByCorrTool

ToolHandle<CP::IIsolationCloseByCorrectionTool> CP::IsoCloseByCorrectionAlg::m_closeByCorrTool
private
Initial value:
{this, "IsoCloseByCorrectionTool", "",
"The isolation close by correction tool."}

The closeBy isolation correction tool.

Definition at line 66 of file IsoCloseByCorrectionAlg.h.

66 {this, "IsoCloseByCorrectionTool", "",
67 "The isolation close by correction tool."};

◆ m_contKeys

SG::ReadHandleKeyArray<xAOD::IParticleContainer> CP::IsoCloseByCorrectionAlg::m_contKeys {this, "ParticleContainerKeys", {} }
private

Input containers to retrieve from the storegate.

Definition at line 50 of file IsoCloseByCorrectionAlg.h.

50{this, "ParticleContainerKeys", {} };

◆ m_detStore

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

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_elecSelKey

SG::ReadDecorHandleKey<xAOD::ElectronContainer> CP::IsoCloseByCorrectionAlg::m_elecSelKey {this, "ElecSelectionKey", ""}
private

Definition at line 57 of file IsoCloseByCorrectionAlg.h.

57{this, "ElecSelectionKey", ""};

◆ m_elecSelTool

ToolHandle<IAsgElectronLikelihoodTool> CP::IsoCloseByCorrectionAlg::m_elecSelTool {this, "ElectronSelectionTool", ""}
private

Definition at line 62 of file IsoCloseByCorrectionAlg.h.

62{this, "ElectronSelectionTool", ""};

◆ m_evtStore

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

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

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

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

Empty if no symlinks were found.

Definition at line 114 of file AthCommonReentrantAlgorithm.h.

◆ m_minElecPt

Gaudi::Property<float> CP::IsoCloseByCorrectionAlg::m_minElecPt
private
Initial value:
{this, "MinElecPt", 0,
"Minimum pt cut that the electron needs to pass in order to be selected"}

Kinematic cuts - if needed.

Definition at line 70 of file IsoCloseByCorrectionAlg.h.

70 {this, "MinElecPt", 0,
71 "Minimum pt cut that the electron needs to pass in order to be selected"};

◆ m_minMuonPt

Gaudi::Property<float> CP::IsoCloseByCorrectionAlg::m_minMuonPt
private
Initial value:
{this, "MinMuonPt", 0,
"Minimum pt cut that the muon needs to pass in order to be selected"}

Definition at line 72 of file IsoCloseByCorrectionAlg.h.

72 {this, "MinMuonPt", 0,
73 "Minimum pt cut that the muon needs to pass in order to be selected"};

◆ m_minPhotPt

Gaudi::Property<float> CP::IsoCloseByCorrectionAlg::m_minPhotPt
private
Initial value:
{this, "MinPhotPt", 0,
"Minimum pt cut that the photon needs to pass in order to be selected"}

Definition at line 74 of file IsoCloseByCorrectionAlg.h.

74 {this, "MinPhotPt", 0,
75 "Minimum pt cut that the photon needs to pass in order to be selected"};

◆ m_muonSelKey

SG::ReadDecorHandleKey<xAOD::MuonContainer> CP::IsoCloseByCorrectionAlg::m_muonSelKey {this, "MuonSelectionKey", ""}
private

For lepton/photon selection, normally one uses either a decorator xxxSelKey, or a tool xxxSelTool, but logic allows both to be required:

read decorators for selection of incoming particles

Definition at line 56 of file IsoCloseByCorrectionAlg.h.

56{this, "MuonSelectionKey", ""};

◆ m_muonSelTool

ToolHandle<CP::IMuonSelectionTool> CP::IsoCloseByCorrectionAlg::m_muonSelTool {this, "MuonSelectionTool", ""}
private

tools for selection of incoming particles

Definition at line 61 of file IsoCloseByCorrectionAlg.h.

61{this, "MuonSelectionTool", ""};

◆ m_photSelKey

SG::ReadDecorHandleKey<xAOD::PhotonContainer> CP::IsoCloseByCorrectionAlg::m_photSelKey {this, "PhotSelectionKey", ""}
private

Definition at line 58 of file IsoCloseByCorrectionAlg.h.

58{this, "PhotSelectionKey", ""};

◆ m_photSelTool

ToolHandle<IAsgPhotonIsEMSelector> CP::IsoCloseByCorrectionAlg::m_photSelTool {this, "PhotonSelectionTool", ""}
private

Definition at line 63 of file IsoCloseByCorrectionAlg.h.

63{this, "PhotonSelectionTool", ""};

◆ m_quality_name

Gaudi::Property<std::string> CP::IsoCloseByCorrectionAlg::m_quality_name
private
Initial value:
{
this, "SelectionDecorator", "isoSelIsOK",
"Name of the char auxdata defining whether the particle shall be considered for iso correction"}

Definition at line 78 of file IsoCloseByCorrectionAlg.h.

78 {
79 this, "SelectionDecorator", "isoSelIsOK",
80 "Name of the char auxdata defining whether the particle shall be considered for iso correction"};

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


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