Pandora
Pandora source code navigator
Loading...
Searching...
No Matches
ParticleFlowObject.h
Go to the documentation of this file.
1
8#ifndef PANDORA_PARTICLE_FLOW_OBJECT_H
9#define PANDORA_PARTICLE_FLOW_OBJECT_H 1
10
12#include "Pandora/StatusCodes.h"
13
14namespace pandora
15{
16
17template<typename T> class AlgorithmObjectManager;
18template<typename T, typename S> class PandoraObjectFactory;
19
20//------------------------------------------------------------------------------------------------------------------------------------------
21
26{
27public:
33 int GetParticleId() const;
34
40 int GetCharge() const;
41
47 float GetMass() const;
48
54 float GetEnergy() const;
55
61 const CartesianVector &GetMomentum() const;
62
68 const TrackList &GetTrackList() const;
69
75 const ClusterList &GetClusterList() const;
76
82 const VertexList &GetVertexList() const;
83
90
97
103 unsigned int GetNTracks() const;
104
110 unsigned int GetNClusters() const;
111
117 const PfoList &GetParentPfoList() const;
118
124 const PfoList &GetDaughterPfoList() const;
125
131 unsigned int GetNParentPfos() const;
132
138 unsigned int GetNDaughterPfos() const;
139
145 const PropertiesMap &GetPropertiesMap() const;
146
147protected:
154
158 virtual ~ParticleFlowObject();
159
166
172 template <typename T>
173 StatusCode AddToPfo(const T *const pT);
174
180 template <typename T>
181 StatusCode RemoveFromPfo(const T *const pT);
182
188 StatusCode AddParent(const ParticleFlowObject *const pPfo);
189
195 StatusCode AddDaughter(const ParticleFlowObject *const pPfo);
196
202 StatusCode RemoveParent(const ParticleFlowObject *const pPfo);
203
210
217
220 float m_mass;
221 float m_energy;
229
232 friend class PandoraObjectFactory<object_creation::ParticleFlowObject::Parameters, object_creation::ParticleFlowObject::Object>;
233};
234
236
237//------------------------------------------------------------------------------------------------------------------------------------------
238
240{
241 return m_particleId;
242}
243
244//------------------------------------------------------------------------------------------------------------------------------------------
245
247{
248 return m_charge;
249}
250
251//------------------------------------------------------------------------------------------------------------------------------------------
252
253inline float ParticleFlowObject::GetMass() const
254{
255 return m_mass;
256}
257
258//------------------------------------------------------------------------------------------------------------------------------------------
259
261{
262 return m_energy;
263}
264
265//------------------------------------------------------------------------------------------------------------------------------------------
266
268{
269 return m_momentum;
270}
271
272//------------------------------------------------------------------------------------------------------------------------------------------
273
275{
276 return m_trackList;
277}
278
279//------------------------------------------------------------------------------------------------------------------------------------------
280
282{
283 return m_clusterList;
284}
285
286//------------------------------------------------------------------------------------------------------------------------------------------
287
289{
290 return m_vertexList;
291}
292
293//------------------------------------------------------------------------------------------------------------------------------------------
294
295inline unsigned int ParticleFlowObject::GetNTracks() const
296{
297 return m_trackList.size();
298}
299
300//------------------------------------------------------------------------------------------------------------------------------------------
301
302inline unsigned int ParticleFlowObject::GetNClusters() const
303{
304 return m_clusterList.size();
305}
306
307//------------------------------------------------------------------------------------------------------------------------------------------
308
310{
311 return m_parentPfoList;
312}
313
314//------------------------------------------------------------------------------------------------------------------------------------------
315
317{
318 return m_daughterPfoList;
319}
320
321//------------------------------------------------------------------------------------------------------------------------------------------
322
323inline unsigned int ParticleFlowObject::GetNParentPfos() const
324{
325 return m_parentPfoList.size();
326}
327
328//------------------------------------------------------------------------------------------------------------------------------------------
329
330inline unsigned int ParticleFlowObject::GetNDaughterPfos() const
331{
332 return m_daughterPfoList.size();
333}
334
335//------------------------------------------------------------------------------------------------------------------------------------------
336
338{
339 return m_propertiesMap;
340}
341
342} // namespace pandora
343
344#endif // #ifndef PANDORA_PARTICLE_FLOW_OBJECT_H
Header file for pandora object creation classes.
Header file defining status codes and relevant preprocessor macros.
AlgorithmObjectManager class.
CartesianVector class.
PandoraObjectFactory class.
ParticleFlowObject class.
float GetEnergy() const
Get the particle flow object energy.
virtual ~ParticleFlowObject()
Destructor.
int m_charge
The particle flow object charge.
StatusCode RemoveDaughter(const ParticleFlowObject *const pPfo)
Remove a daughter pfo from the daughter pfo list.
const PropertiesMap & GetPropertiesMap() const
Get the map from registered property name to floating point property value.
StatusCode RemoveParent(const ParticleFlowObject *const pPfo)
Remove a parent pfo from the parent pfo list.
const PfoList & GetDaughterPfoList() const
Get the daughter pfo list.
StatusCode UpdatePropertiesMap(const object_creation::ParticleFlowObject::Metadata &metadata)
Update the properties map.
ClusterList m_clusterList
The cluster list.
const ClusterList & GetClusterList() const
Get the cluster list.
unsigned int GetNParentPfos() const
Get the number of parent pfos.
StatusCode AddDaughter(const ParticleFlowObject *const pPfo)
Add a daughter pfo to the daughter pfo list.
const PfoList & GetParentPfoList() const
Get the parent pfo list.
const VertexList & GetVertexList() const
Get the vertex list.
StatusCode RemoveFromPfo(const T *const pT)
Remove an object from the particle flow object.
StatusCode AlterMetadata(const object_creation::ParticleFlowObject::Metadata &metadata)
Alter particle flow object metadata parameters.
TrackAddressList GetTrackAddressList() const
Get track address list.
PfoList m_daughterPfoList
The list of daughter pfos.
float GetMass() const
Get particle flow object mass.
float m_mass
The particle flow object mass.
TrackList m_trackList
The track list.
StatusCode AddToPfo(const T *const pT)
Add an object to the particle flow object.
int GetCharge() const
Get particle flow object charge.
int GetParticleId() const
Get the particle flow object id (PDG code)
float m_energy
The particle flow object energy.
CartesianVector m_momentum
The particle flow object momentum.
StatusCode AddParent(const ParticleFlowObject *const pPfo)
Add a parent pfo to the parent pfo list.
unsigned int GetNDaughterPfos() const
Get the number of daughter pfos.
const TrackList & GetTrackList() const
Get the track list.
int m_particleId
The particle flow object id (PDG code)
VertexList m_vertexList
The vertex list.
PropertiesMap m_propertiesMap
The map from registered property name to floating point property value.
const CartesianVector & GetMomentum() const
Get particle flow object momentum vector.
ClusterAddressList GetClusterAddressList() const
Get the cluster address list.
PfoList m_parentPfoList
The list of parent pfos.
unsigned int GetNClusters() const
Get the number of clusters in the particle flow object.
unsigned int GetNTracks() const
Get the number of tracks in the particle flow object.
ParticleFlowObjectManager class.
MANAGED_CONTAINER< const Cluster * > ClusterList
std::vector< const void * > TrackAddressList
std::vector< CaloHitAddressList > ClusterAddressList
MANAGED_CONTAINER< const Track * > TrackList
MANAGED_CONTAINER< const Vertex * > VertexList
std::map< std::string, float > PropertiesMap
StatusCode
The StatusCode enum.
MANAGED_CONTAINER< const ParticleFlowObject * > PfoList