Pandora
Pandora source code navigator
Loading...
Searching...
No Matches
ParticleIdPlugin.h
Go to the documentation of this file.
1
8#ifndef PANDORA_PARTICLE_ID_PLUGIN_H
9#define PANDORA_PARTICLE_ID_PLUGIN_H 1
10
12#include "Pandora/Process.h"
13
14namespace pandora
15{
16
21{
22public:
30 virtual bool IsMatch(const Cluster *const pCluster) const = 0;
31
39 virtual bool IsMatch(const ParticleFlowObject *const pPfo) const = 0;
40
41protected:
42 friend class ParticleId;
43};
44
45//------------------------------------------------------------------------------------------------------------------------------------------
46
51{
52public:
60 template <typename T>
61 bool IsEmShower(const T *const pT) const;
62
70 template <typename T>
71 bool IsPhoton(const T *const pT) const;
72
80 template <typename T>
81 bool IsElectron(const T *const pT) const;
82
90 template <typename T>
91 bool IsMuon(const T *const pT) const;
92
93private:
99 ParticleId(const Pandora *const pPandora);
100
104 ~ParticleId();
105
112 StatusCode RegisterPlugin(const std::string &pluginName, ParticleIdPlugin *const pParticleIdPlugin);
113
119 StatusCode InitializePlugins(const TiXmlHandle *const pXmlHandle);
120
128 StatusCode InitializePlugin(const TiXmlHandle *const pXmlHandle, const std::string &xmlTagName, ParticleIdPlugin *&pParticleIdPlugin);
129
134
135 const Pandora *const m_pPandora;
140
141 typedef std::map<std::string, ParticleIdPlugin *> ParticleIdPluginMap;
143
144 friend class PandoraApiImpl;
145 friend class PluginManager;
146};
147
148} // namespace pandora
149
150#endif // #ifndef PANDORA_PARTICLE_ID_HELPER_H
Header file defining relevant internal typedefs, sort and string conversion functions.
Header file for the process class.
Cluster class.
Definition Cluster.h:31
PandoraApiImpl class.
Pandora class.
Definition Pandora.h:40
ParticleFlowObject class.
ParticleId class.
bool IsElectron(const T *const pT) const
Provide identification of whether a cluster or pfo is an electron.
ParticleIdPlugin * m_pElectronPlugin
The electron id plugin pointer.
ParticleIdPlugin * m_pEmShowerPlugin
The electromagnetic shower id plugin pointer.
bool IsEmShower(const T *const pT) const
Provide identification of whether a cluster or pfo is an electromagnetic shower.
StatusCode ResetForNextEvent()
Call the reset callback in all managed plugins.
ParticleIdPlugin * m_pPhotonPlugin
The photon id plugin pointer.
bool IsMuon(const T *const pT) const
Provide identification of whether a cluster or pfo is a muon.
ParticleIdPluginMap m_particleIdPluginMap
The particle id plugin map.
bool IsPhoton(const T *const pT) const
Provide identification of whether a cluster or pfo is a photon.
std::map< std::string, ParticleIdPlugin * > ParticleIdPluginMap
ParticleIdPlugin * m_pMuonPlugin
The muon id plugin pointer.
const Pandora *const m_pPandora
Address of the associated pandora instance.
StatusCode RegisterPlugin(const std::string &pluginName, ParticleIdPlugin *const pParticleIdPlugin)
Register a particle id plugin.
StatusCode InitializePlugin(const TiXmlHandle *const pXmlHandle, const std::string &xmlTagName, ParticleIdPlugin *&pParticleIdPlugin)
Read requested plugin name/label from a specified xml tag and attempt to assign the plugin pointer as...
StatusCode InitializePlugins(const TiXmlHandle *const pXmlHandle)
Initialize plugins.
ParticleIdPlugin class.
virtual bool IsMatch(const ParticleFlowObject *const pPfo) const =0
Whether the pfo matches the specific particle hypothesis.
virtual bool IsMatch(const Cluster *const pCluster) const =0
Whether the cluster matches the specific particle hypothesis.
PluginManager class.
Process class.
Definition Process.h:27
StatusCode
The StatusCode enum.