ATLAS Offline Software
Loading...
Searching...
No Matches
PFEGamFlowElementAssoc Class Reference

This is the algorithm, which inherits from AthReentrantAlgorithm, that adds element links between particle flow objects (Flow Elements) and Egamma objects. More...

#include <PFEGamFlowElementAssoc.h>

Inheritance diagram for PFEGamFlowElementAssoc:
Collaboration diagram for PFEGamFlowElementAssoc:

Public Member Functions

 PFEGamFlowElementAssoc (const std::string &name, ISvcLocator *pSvcLocator)
virtual ~PFEGamFlowElementAssoc ()
virtual StatusCode initialize ()
virtual StatusCode execute (const EventContext &ctx) const
 This algorithm does the following: 1) Read the Input containers for Flow Elements, Electrons and Photons 2) Match the Clusters in the flow elements to the relevant E/Photon clusters (Neutral) or match tracks to relevant Electron/Photon tracks (Charged) 3) Link them 4) output the Electron/Photon containers with the linkers to the Flow element containers.
virtual StatusCode finalize ()
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

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::ElectronContainerm_electronReadHandleKey {this,"ElectronContainer","Electrons","ReadHandleKey for ElectronContainer"}
SG::ReadHandleKey< xAOD::PhotonContainerm_photonReadHandleKey {this,"PhotonContainer","Photons","ReadHandleKey for PhotonContainer"}
SG::ReadHandleKey< xAOD::FlowElementContainerm_neutralFEReadHandleKey {this,"JetEtMissNeutralFlowElementContainer","JetETMissNeutralParticleFlowObjects","ReadHandleKey for neutral FlowElements"}
SG::ReadHandleKey< xAOD::FlowElementContainerm_chargedFEReadHandleKey {this,"JetEtMissChargedFlowElementContainer","JetETMissChargedParticleFlowObjects","ReadHandleKey for charged FlowElements"}
SG::WriteDecorHandleKey< xAOD::ElectronContainerm_electronNeutralFEWriteDecorKey {this,"ElectronNeutralFEDecorKey",m_electronReadHandleKey,"neutralFELinks","Output key for electron link to neutral FE"}
 The write key for adding Neutral Flow Element element link decorations to electrons.
SG::WriteDecorHandleKey< xAOD::ElectronContainerm_electronChargedFEWriteDecorKey {this,"ElectronChargedFEDecorKey",m_electronReadHandleKey,"chargedFELinks","Output key for electron link to charged FE"}
 The write key for adding Charged Flow Element element link decorations to electrons.
SG::WriteDecorHandleKey< xAOD::FlowElementContainerm_neutralFEElectronWriteDecorKey {this,"NeutralFEElectronDecorKey",m_neutralFEReadHandleKey,"FE_ElectronLinks","Output key for link from charged FE to electron"}
 The write key for adding electron element link decorations to Neutral Flow Elements.
SG::WriteDecorHandleKey< xAOD::FlowElementContainerm_chargedFEElectronWriteDecorKey {this,"ChargedFEElectronDecorKey",m_chargedFEReadHandleKey,"FE_ElectronLinks","Output key for link from charged FE to electron"}
 The write key for adding electron element link decorations to Charged Flow Elements.
SG::WriteDecorHandleKey< xAOD::PhotonContainerm_photonNeutralFEWriteDecorKey {this,"PhotonNeutralFEDecorKey",m_photonReadHandleKey,"neutralFELinks","Output key for photon link to neutral FE"}
 The write key for adding Neutral Flow Element element link decorations to photons.
SG::WriteDecorHandleKey< xAOD::PhotonContainerm_photonChargedFEWriteDecorKey {this,"PhotonChargedFEDecorKey",m_photonReadHandleKey,"chargedFELinks","Output key for photon link to charged FE"}
 The write key for adding Charged Flow Element element link decorations to photons.
SG::WriteDecorHandleKey< xAOD::FlowElementContainerm_neutralFEPhotonWriteDecorKey {this,"NeutralFEPhotonDecorKey",m_neutralFEReadHandleKey,"FE_PhotonLinks","Output key for link from neutral FE to photon"}
 The write key for adding photon element link decorations to Neutral Flow Elements.
SG::WriteDecorHandleKey< xAOD::FlowElementContainerm_chargedFEPhotonWriteDecorKey {this,"ChargedFEPhotonDecorKey",m_chargedFEReadHandleKey,"FE_PhotonLinks","Output key for link from charged FE to photon"}
 The write key for adding photon element link decorations to Charged Flow Elements.
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

This is the algorithm, which inherits from AthReentrantAlgorithm, that adds element links between particle flow objects (Flow Elements) and Egamma objects.

The algorithm associates charged (c) Flow Elements to all electron and converted photon tracks, and neutral (n) Flow Elements to all electron and photon clusters.

This is done by adding decorations to the "Electron" and "Photon" container, for charged Charged Flow Elements and Neutral Flow Elements separately, in the form of vectors of element links to the associated Flow Elements. The algorithm also adds decorations to the "JetETMissNeutralFlowElements" and "JetETMissChargedParticleFlowElements" containers, in the form of vectors of element links to the associated electrons and photons.

Definition at line 34 of file PFEGamFlowElementAssoc.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

◆ PFEGamFlowElementAssoc()

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

Definition at line 23 of file PFEGamFlowElementAssoc.cxx.

26 :
27 AthReentrantAlgorithm(name,pSvcLocator)
28{
29}

◆ ~PFEGamFlowElementAssoc()

PFEGamFlowElementAssoc::~PFEGamFlowElementAssoc ( )
virtualdefault

Member Function Documentation

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

This algorithm does the following: 1) Read the Input containers for Flow Elements, Electrons and Photons 2) Match the Clusters in the flow elements to the relevant E/Photon clusters (Neutral) or match tracks to relevant Electron/Photon tracks (Charged) 3) Link them 4) output the Electron/Photon containers with the linkers to the Flow element containers.

Definition at line 68 of file PFEGamFlowElementAssoc.cxx.

69{
70 // write decoration handles for the electron, photon and FE containers -- these are the OUTPUT handles
71 //Electron Write Handle
72 ATH_MSG_VERBOSE("Exec start");
73 SG::WriteDecorHandle<xAOD::ElectronContainer, std::vector<FlowElementLink_t> > electronNeutralFEWriteDecorHandle (m_electronNeutralFEWriteDecorKey,ctx);
74 SG::WriteDecorHandle<xAOD::ElectronContainer, std::vector<FlowElementLink_t> > electronChargedFEWriteDecorHandle (m_electronChargedFEWriteDecorKey,ctx);
75 SG::WriteDecorHandle<xAOD::FlowElementContainer, std::vector<ElectronLink_t> > neutralFEElectronWriteDecorHandle (m_neutralFEElectronWriteDecorKey,ctx);
76 SG::WriteDecorHandle<xAOD::FlowElementContainer, std::vector<ElectronLink_t> > chargedFEElectronWriteDecorHandle (m_chargedFEElectronWriteDecorKey,ctx);
77 ATH_MSG_VERBOSE("Defined Electron writehandles");
78 //Photon Write Handle
79 SG::WriteDecorHandle<xAOD::PhotonContainer, std::vector<FlowElementLink_t> > photonNeutralFEWriteDecorHandle (m_photonNeutralFEWriteDecorKey,ctx);
80 SG::WriteDecorHandle<xAOD::PhotonContainer, std::vector<FlowElementLink_t> > photonChargedFEWriteDecorHandle (m_photonChargedFEWriteDecorKey,ctx);
81 SG::WriteDecorHandle<xAOD::FlowElementContainer, std::vector<PhotonLink_t> > neutralFEPhotonWriteDecorHandle (m_neutralFEPhotonWriteDecorKey,ctx);
82 SG::WriteDecorHandle<xAOD::FlowElementContainer, std::vector<PhotonLink_t> > chargedFEPhotonWriteDecorHandle (m_chargedFEPhotonWriteDecorKey,ctx);
83 ATH_MSG_VERBOSE("Defined Photon WriteHandles");
84
85 // This is the READ handles (so the input containers for electron, photon, FE)
86
87 SG::ReadHandle<xAOD::ElectronContainer>electronReadHandle (m_electronReadHandleKey,ctx);
88 SG::ReadHandle<xAOD::PhotonContainer> photonReadHandle (m_photonReadHandleKey,ctx);
89
90 // Charged and Neutral PFlow "Flow elements"
91 SG::ReadHandle<xAOD::FlowElementContainer> neutralFEReadHandle (m_neutralFEReadHandleKey,ctx);
92 SG::ReadHandle<xAOD::FlowElementContainer> chargedFEReadHandle (m_chargedFEReadHandleKey,ctx);
93 ATH_MSG_VERBOSE("Defined ReadHandles");
94 // now initialise some Flow element link containers
95 std::vector<std::vector<FlowElementLink_t>> electronNeutralFEVec(electronReadHandle->size());
96 std::vector<std::vector<FlowElementLink_t>> electronChargedFEVec(electronReadHandle->size());
97
98 std::vector<std::vector<FlowElementLink_t>> photonNeutralFEVec(photonReadHandle->size());
99 std::vector<std::vector<FlowElementLink_t>> photonChargedFEVec(photonReadHandle->size());
100 ATH_MSG_VERBOSE("Finished runtime init");
104
105
107 // Loop over neutral flow elements (FEs)
109 for (const xAOD::FlowElement* FE: *neutralFEElectronWriteDecorHandle){
110 // init the links
111 std::vector<ElectronLink_t> FEElectronLinks;
112 std::vector<PhotonLink_t> FEPhotonLinks;
113
114 //nullptr catch for removed NFE clusters - only comes up if using AOD where the alg might have some skimmed components
115 if(FE->otherObjects().empty() || FE->otherObjects().at(0)==nullptr){
116 neutralFEElectronWriteDecorHandle(*FE)=FEElectronLinks;
117 neutralFEPhotonWriteDecorHandle(*FE)=FEPhotonLinks;
118 continue;
119 }
120
121 //Obtain the index of the FE calo-cluster
122 size_t FEClusterIndex=FE->otherObjects().at(0)->index();
123 double FE_cluster_E=FE->otherObjects().at(0)->p4().E();
124 bool neg_E_cluster=(FE_cluster_E<0);
125
126 //Loop over electrons:
127
128 for (const xAOD::Electron* electron: *electronNeutralFEWriteDecorHandle){
129 // get the calo clusters from the electron
130 ATH_MSG_VERBOSE("NFE: start el loop");
131 const std::vector<const xAOD::CaloCluster*> electronTopoClusters = xAOD::EgammaHelpers::getAssociatedTopoClusters(electron->caloCluster());
132 ATH_MSG_VERBOSE("NFE: got calo clusters");
133
134 for(const xAOD::CaloCluster* cluster : electronTopoClusters){
135 // obtain the index of the electron seed topocluster
136 size_t electronClusterIndex=cluster->index();
137 //match the indices: Cluster match between Flow Element (FE) and electron
138 if(electronClusterIndex==FEClusterIndex){
139 FEElectronLinks.emplace_back(*electronReadHandle,electron->index() );
140 //Add Flow Element (FE) link to a vector
141 //index() is the unique index of the Flow Element in the container
142 electronNeutralFEVec.at(electron->index()).emplace_back(*neutralFEReadHandle, FE->index() );
143 if(neg_E_cluster){
144 ATH_MSG_ERROR("Negative energy cluster found and matched to electron");
145 ATH_MSG_ERROR("Cluster Energy: "<<FE_cluster_E<<"");
146 }
147 }// end of matching block
148
149 } // end loop over cluster
150
151 } // end Electron loop
152 ATH_MSG_VERBOSE("NFE: Electron loop finished");
153 // now loop over photons
154 for (const xAOD::Photon* photon: *photonNeutralFEWriteDecorHandle){
155 // retrieve clusters from the photon container
156 const std::vector<const xAOD::CaloCluster*> photonTopoClusters = xAOD::EgammaHelpers::getAssociatedTopoClusters(photon->caloCluster());
157 //loop over clusters, and do the matching
158 for (const xAOD::CaloCluster* cluster: photonTopoClusters){
159 //retrieve index of the cluster
160 size_t photonClusterIndex=cluster->index();
161 //do the matching
162 if(photonClusterIndex==FEClusterIndex){
163 // Add flow element (FE) links to photon
164 FEPhotonLinks.emplace_back(*photonReadHandle,photon->index() );
165 //Add Flow Element (FE) link to a vector
166 //index() is the unique index of the Flow Element in the container
167 photonNeutralFEVec.at(photon->index()).emplace_back(*neutralFEReadHandle, FE->index() );
168
169 if(neg_E_cluster){
170 ATH_MSG_ERROR("Negative energy cluster found and matched to photon");
171 ATH_MSG_ERROR("Cluster Energy: "<<FE_cluster_E<<"");
172 }
173 }// end of matching block
174 } // end of neutral loop
175
176
177 }// end of photon loop
178 ATH_MSG_VERBOSE("NFE: Photon Loop complete");
179 //Add vector of electron element links as decoration to FlowElement container
180 neutralFEElectronWriteDecorHandle(*FE)=FEElectronLinks;
181 neutralFEPhotonWriteDecorHandle(*FE)=FEPhotonLinks;
182 ATH_MSG_VERBOSE("NFE::WriteHandle mapping");
183 } // end neutral FE loop
184 ATH_MSG_VERBOSE("NFE: Loop finished");
186 // Loop over charged Flow Elements (FEs)
188 for (const xAOD::FlowElement* FE: *chargedFEElectronWriteDecorHandle){
189 // Initialise a vector of element links to electrons/Photons
190 std::vector<ElectronLink_t> FEElectronLinks;
191 std::vector<PhotonLink_t> FEPhotonLinks;
192
193 // Charged Flow Element catch for a case where there are removed tracks - should only apply if running from AOD
194 if(FE->chargedObjects().empty() || FE->chargedObjects().at(0)==nullptr){
195 chargedFEElectronWriteDecorHandle (*FE) = FEElectronLinks;
196 chargedFEPhotonWriteDecorHandle (*FE) = FEPhotonLinks;
197 continue;
198 }
199 // retrieve the track from the Flow element
200 size_t FETrackIndex=FE->chargedObjects().at(0)->index();
201
202 //loop over electrons
203 for (const xAOD::Electron* electron: *electronChargedFEWriteDecorHandle){
204 //obtain the clusters
205 const std::vector<const xAOD::TrackParticle*> electronTrackParticles = xAOD::EgammaHelpers::getTrackParticlesVec(electron, true, true); // useBremAssoc = true (get original non-GSF track), allParticles = true (include all track particles)
206 // loop over tracks
207 for (const xAOD::TrackParticle* electronTrack: electronTrackParticles){
208 size_t electronTrackIndex = electronTrack->index();
209
210 //link to FE if track indices match
211 if(electronTrackIndex==FETrackIndex){
212 // Add electron element link to a vector
213 // index() is the unique index of the electron in the electron container
214 FEElectronLinks.emplace_back(*electronReadHandle, electron->index() );
215 // Add FE element link to a vector
216 // index() is the unique index of the cFE in the cFE container
217 electronChargedFEVec.at(electron->index()).emplace_back(*chargedFEReadHandle, FE->index() );
218 }//end of matching block
219
220 }//end of loop on clusters
221 } // end of loop on electrons
222
223 for(const xAOD::Photon* photon: *photonChargedFEWriteDecorHandle){
224 //obtain indices of the converted photon's original tracks
225 const std::set<const xAOD::TrackParticle*> photonTrackParticles = xAOD::EgammaHelpers::getTrackParticles(photon, true);
226 // loop over the tracks
227 for (const xAOD::TrackParticle* photonTrack: photonTrackParticles){
228 size_t photonTrackIndex=photonTrack->index();
229
230 // Link the photon to the Flow Element (FE) if the track indices match
231 if (photonTrackIndex==FETrackIndex){
232 // Add photon element link to a vector
233 // index() is the unique index of the photon in the photon container
234 FEPhotonLinks.emplace_back(*photonReadHandle, photon->index() );
235 // Add FE element link to a vector
236 // index() is the unique index of the cFE in the cFE container
237 photonChargedFEVec.at(photon->index()).emplace_back(*chargedFEReadHandle, FE->index() );
238 }// end of matching block
239
240 }// end of loop on tracks
241
242 }//end of loop on photons
243
244
245 // Add vector of electron element links as decoration to FE container
246 chargedFEElectronWriteDecorHandle (*FE) = FEElectronLinks;
247 // Add vector of photon element links as decoration to FE container
248 chargedFEPhotonWriteDecorHandle (*FE) = FEPhotonLinks;
249
250 } // end of charged FE loop
251
252
253
255 // WRITE OUTPUT: ADD HANDLES TO EL/PHOT CONTAINERS
257 // Add the vectors of the Flow Element (FE) Links as decorations to the electron container
258 for (const xAOD::Electron* electron : *electronNeutralFEWriteDecorHandle){
259 electronNeutralFEWriteDecorHandle (*electron) = electronNeutralFEVec.at(electron->index());
260 electronChargedFEWriteDecorHandle (*electron) = electronChargedFEVec.at(electron->index());
261 } //end of photon loop
262 // Add the vectors of the Flow Element (FE) Links as decorations to the photon container
263 for (const xAOD::Photon* photon: *photonNeutralFEWriteDecorHandle){
264 photonNeutralFEWriteDecorHandle (*photon) = photonNeutralFEVec.at(photon->index());
265 photonChargedFEWriteDecorHandle (*photon) = photonChargedFEVec.at(photon->index());
266 } // end of loop on photons
267
268 ATH_MSG_VERBOSE("Execute completed successfully");
269
270 return StatusCode::SUCCESS;
271}
#define ATH_MSG_ERROR(x)
#define ATH_MSG_VERBOSE(x)
SG::WriteDecorHandleKey< xAOD::FlowElementContainer > m_chargedFEElectronWriteDecorKey
The write key for adding electron element link decorations to Charged Flow Elements.
SG::WriteDecorHandleKey< xAOD::PhotonContainer > m_photonNeutralFEWriteDecorKey
The write key for adding Neutral Flow Element element link decorations to photons.
SG::ReadHandleKey< xAOD::ElectronContainer > m_electronReadHandleKey
SG::WriteDecorHandleKey< xAOD::PhotonContainer > m_photonChargedFEWriteDecorKey
The write key for adding Charged Flow Element element link decorations to photons.
SG::ReadHandleKey< xAOD::PhotonContainer > m_photonReadHandleKey
SG::WriteDecorHandleKey< xAOD::FlowElementContainer > m_neutralFEPhotonWriteDecorKey
The write key for adding photon element link decorations to Neutral Flow Elements.
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_electronChargedFEWriteDecorKey
The write key for adding Charged Flow Element element link decorations to electrons.
SG::WriteDecorHandleKey< xAOD::FlowElementContainer > m_chargedFEPhotonWriteDecorKey
The write key for adding photon element link decorations to Charged Flow Elements.
SG::ReadHandleKey< xAOD::FlowElementContainer > m_neutralFEReadHandleKey
SG::WriteDecorHandleKey< xAOD::FlowElementContainer > m_neutralFEElectronWriteDecorKey
The write key for adding electron element link decorations to Neutral Flow Elements.
SG::ReadHandleKey< xAOD::FlowElementContainer > m_chargedFEReadHandleKey
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_electronNeutralFEWriteDecorKey
The write key for adding Neutral Flow Element element link decorations to electrons.
std::vector< const xAOD::TrackParticle * > getTrackParticlesVec(const xAOD::Egamma *eg, bool useBremAssoc=true, bool allParticles=true)
Return a list of all or only the best TrackParticle associated to the object.
std::set< const xAOD::TrackParticle * > getTrackParticles(const xAOD::Egamma *eg, bool useBremAssoc=true, bool allParticles=true)
Return a list of all or only the best TrackParticle associated to the object.
std::vector< const xAOD::CaloCluster * > getAssociatedTopoClusters(const xAOD::CaloCluster *cluster)
Return a vector of all the topo clusters associated with the egamma cluster.
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
FlowElement_v1 FlowElement
Definition of the current "pfo version".
Definition FlowElement.h:16
TrackParticle_v1 TrackParticle
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

◆ finalize()

StatusCode PFEGamFlowElementAssoc::finalize ( )
virtual

Definition at line 58 of file PFEGamFlowElementAssoc.cxx.

58 {
59 return StatusCode::SUCCESS;
60}

◆ initialize()

StatusCode PFEGamFlowElementAssoc::initialize ( )
virtual

Definition at line 34 of file PFEGamFlowElementAssoc.cxx.

35{
36 ATH_MSG_VERBOSE("Initializing "<<name() << "...");
41
46
47 //Init ReadHandleKeys
48 ATH_CHECK(m_photonReadHandleKey.initialize());
52
53 ATH_MSG_VERBOSE("Initialization completed successfully");
54
55 return StatusCode::SUCCESS;
56}
#define ATH_CHECK
Evaluate an expression and check for errors.

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

◆ 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_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_chargedFEElectronWriteDecorKey

SG::WriteDecorHandleKey<xAOD::FlowElementContainer> PFEGamFlowElementAssoc::m_chargedFEElectronWriteDecorKey {this,"ChargedFEElectronDecorKey",m_chargedFEReadHandleKey,"FE_ElectronLinks","Output key for link from charged FE to electron"}
private

The write key for adding electron element link decorations to Charged Flow Elements.

Definition at line 69 of file PFEGamFlowElementAssoc.h.

69{this,"ChargedFEElectronDecorKey",m_chargedFEReadHandleKey,"FE_ElectronLinks","Output key for link from charged FE to electron"};

◆ m_chargedFEPhotonWriteDecorKey

SG::WriteDecorHandleKey<xAOD::FlowElementContainer> PFEGamFlowElementAssoc::m_chargedFEPhotonWriteDecorKey {this,"ChargedFEPhotonDecorKey",m_chargedFEReadHandleKey,"FE_PhotonLinks","Output key for link from charged FE to photon"}
private

The write key for adding photon element link decorations to Charged Flow Elements.

Definition at line 79 of file PFEGamFlowElementAssoc.h.

79{this,"ChargedFEPhotonDecorKey",m_chargedFEReadHandleKey,"FE_PhotonLinks","Output key for link from charged FE to photon"};

◆ m_chargedFEReadHandleKey

SG::ReadHandleKey<xAOD::FlowElementContainer> PFEGamFlowElementAssoc::m_chargedFEReadHandleKey {this,"JetEtMissChargedFlowElementContainer","JetETMissChargedParticleFlowObjects","ReadHandleKey for charged FlowElements"}
private

Definition at line 56 of file PFEGamFlowElementAssoc.h.

56{this,"JetEtMissChargedFlowElementContainer","JetETMissChargedParticleFlowObjects","ReadHandleKey for charged FlowElements"};

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

SG::WriteDecorHandleKey<xAOD::ElectronContainer> PFEGamFlowElementAssoc::m_electronChargedFEWriteDecorKey {this,"ElectronChargedFEDecorKey",m_electronReadHandleKey,"chargedFELinks","Output key for electron link to charged FE"}
private

The write key for adding Charged Flow Element element link decorations to electrons.

Definition at line 62 of file PFEGamFlowElementAssoc.h.

62{this,"ElectronChargedFEDecorKey",m_electronReadHandleKey,"chargedFELinks","Output key for electron link to charged FE"};

◆ m_electronNeutralFEWriteDecorKey

SG::WriteDecorHandleKey<xAOD::ElectronContainer> PFEGamFlowElementAssoc::m_electronNeutralFEWriteDecorKey {this,"ElectronNeutralFEDecorKey",m_electronReadHandleKey,"neutralFELinks","Output key for electron link to neutral FE"}
private

The write key for adding Neutral Flow Element element link decorations to electrons.

Definition at line 60 of file PFEGamFlowElementAssoc.h.

60{this,"ElectronNeutralFEDecorKey",m_electronReadHandleKey,"neutralFELinks","Output key for electron link to neutral FE"};

◆ m_electronReadHandleKey

SG::ReadHandleKey<xAOD::ElectronContainer> PFEGamFlowElementAssoc::m_electronReadHandleKey {this,"ElectronContainer","Electrons","ReadHandleKey for ElectronContainer"}
private

Definition at line 49 of file PFEGamFlowElementAssoc.h.

49{this,"ElectronContainer","Electrons","ReadHandleKey for ElectronContainer"};

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

SG::WriteDecorHandleKey<xAOD::FlowElementContainer> PFEGamFlowElementAssoc::m_neutralFEElectronWriteDecorKey {this,"NeutralFEElectronDecorKey",m_neutralFEReadHandleKey,"FE_ElectronLinks","Output key for link from charged FE to electron"}
private

The write key for adding electron element link decorations to Neutral Flow Elements.

Definition at line 66 of file PFEGamFlowElementAssoc.h.

66{this,"NeutralFEElectronDecorKey",m_neutralFEReadHandleKey,"FE_ElectronLinks","Output key for link from charged FE to electron"};

◆ m_neutralFEPhotonWriteDecorKey

SG::WriteDecorHandleKey<xAOD::FlowElementContainer> PFEGamFlowElementAssoc::m_neutralFEPhotonWriteDecorKey {this,"NeutralFEPhotonDecorKey",m_neutralFEReadHandleKey,"FE_PhotonLinks","Output key for link from neutral FE to photon"}
private

The write key for adding photon element link decorations to Neutral Flow Elements.

Definition at line 77 of file PFEGamFlowElementAssoc.h.

77{this,"NeutralFEPhotonDecorKey",m_neutralFEReadHandleKey,"FE_PhotonLinks","Output key for link from neutral FE to photon"};

◆ m_neutralFEReadHandleKey

SG::ReadHandleKey<xAOD::FlowElementContainer> PFEGamFlowElementAssoc::m_neutralFEReadHandleKey {this,"JetEtMissNeutralFlowElementContainer","JetETMissNeutralParticleFlowObjects","ReadHandleKey for neutral FlowElements"}
private

Definition at line 54 of file PFEGamFlowElementAssoc.h.

54{this,"JetEtMissNeutralFlowElementContainer","JetETMissNeutralParticleFlowObjects","ReadHandleKey for neutral FlowElements"};

◆ m_photonChargedFEWriteDecorKey

SG::WriteDecorHandleKey<xAOD::PhotonContainer> PFEGamFlowElementAssoc::m_photonChargedFEWriteDecorKey {this,"PhotonChargedFEDecorKey",m_photonReadHandleKey,"chargedFELinks","Output key for photon link to charged FE"}
private

The write key for adding Charged Flow Element element link decorations to photons.

Definition at line 75 of file PFEGamFlowElementAssoc.h.

75{this,"PhotonChargedFEDecorKey",m_photonReadHandleKey,"chargedFELinks","Output key for photon link to charged FE"};

◆ m_photonNeutralFEWriteDecorKey

SG::WriteDecorHandleKey<xAOD::PhotonContainer> PFEGamFlowElementAssoc::m_photonNeutralFEWriteDecorKey {this,"PhotonNeutralFEDecorKey",m_photonReadHandleKey,"neutralFELinks","Output key for photon link to neutral FE"}
private

The write key for adding Neutral Flow Element element link decorations to photons.

Definition at line 73 of file PFEGamFlowElementAssoc.h.

73{this,"PhotonNeutralFEDecorKey",m_photonReadHandleKey,"neutralFELinks","Output key for photon link to neutral FE"};

◆ m_photonReadHandleKey

SG::ReadHandleKey<xAOD::PhotonContainer> PFEGamFlowElementAssoc::m_photonReadHandleKey {this,"PhotonContainer","Photons","ReadHandleKey for PhotonContainer"}
private

Definition at line 51 of file PFEGamFlowElementAssoc.h.

51{this,"PhotonContainer","Photons","ReadHandleKey for PhotonContainer"};

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