|
|
|||
File indexing completed on 2026-09-27 09:20:27
0001 /** 0002 * @file PandoraSDK/include/Plugins/ParticleIdPlugin.h 0003 * 0004 * @brief Header file for the particle id plugin class. 0005 * 0006 * $Log: $ 0007 */ 0008 #ifndef PANDORA_PARTICLE_ID_PLUGIN_H 0009 #define PANDORA_PARTICLE_ID_PLUGIN_H 1 0010 0011 #include "Pandora/PandoraInternal.h" 0012 #include "Pandora/Process.h" 0013 0014 namespace pandora 0015 { 0016 0017 /** 0018 * @brief ParticleIdPlugin class 0019 */ 0020 class ParticleIdPlugin : public Process 0021 { 0022 public: 0023 /** 0024 * @brief Whether the cluster matches the specific particle hypothesis 0025 * 0026 * @param pCluster address of the cluster 0027 * 0028 * @return boolean 0029 */ 0030 virtual bool IsMatch(const Cluster *const pCluster) const = 0; 0031 0032 /** 0033 * @brief Whether the pfo matches the specific particle hypothesis 0034 * 0035 * @param pPfo address of the cluster 0036 * 0037 * @return boolean 0038 */ 0039 virtual bool IsMatch(const ParticleFlowObject *const pPfo) const = 0; 0040 0041 protected: 0042 friend class ParticleId; 0043 }; 0044 0045 //------------------------------------------------------------------------------------------------------------------------------------------ 0046 0047 /** 0048 * @brief ParticleId class 0049 */ 0050 class ParticleId 0051 { 0052 public: 0053 /** 0054 * @brief Provide identification of whether a cluster or pfo is an electromagnetic shower 0055 * 0056 * @param pT address of the cluster or pfo 0057 * 0058 * @return boolean 0059 */ 0060 template <typename T> 0061 bool IsEmShower(const T *const pT) const; 0062 0063 /** 0064 * @brief Provide identification of whether a cluster or pfo is a photon 0065 * 0066 * @param pT address of the cluster or pfo 0067 * 0068 * @return boolean 0069 */ 0070 template <typename T> 0071 bool IsPhoton(const T *const pT) const; 0072 0073 /** 0074 * @brief Provide identification of whether a cluster or pfo is an electron 0075 * 0076 * @param pT address of the cluster or pfo 0077 * 0078 * @return boolean 0079 */ 0080 template <typename T> 0081 bool IsElectron(const T *const pT) const; 0082 0083 /** 0084 * @brief Provide identification of whether a cluster or pfo is a muon 0085 * 0086 * @param pT address of the cluster or pfo 0087 * 0088 * @return boolean 0089 */ 0090 template <typename T> 0091 bool IsMuon(const T *const pT) const; 0092 0093 private: 0094 /** 0095 * @brief Default constructor 0096 * 0097 * @param pPandora address of the associated pandora instance 0098 */ 0099 ParticleId(const Pandora *const pPandora); 0100 0101 /** 0102 * @brief Destructor 0103 */ 0104 ~ParticleId(); 0105 0106 /** 0107 * @brief Register a particle id plugin 0108 * 0109 * @param pluginName the name/label associated with the particle id plugin 0110 * @param particleIdPlugin pointer to a particle id plugin 0111 */ 0112 StatusCode RegisterPlugin(const std::string &pluginName, ParticleIdPlugin *const pParticleIdPlugin); 0113 0114 /** 0115 * @brief Initialize plugins 0116 * 0117 * @param pXmlHandle address of the relevant xml handle 0118 */ 0119 StatusCode InitializePlugins(const TiXmlHandle *const pXmlHandle); 0120 0121 /** 0122 * @brief Read requested plugin name/label from a specified xml tag and attempt to assign the plugin pointer as requested 0123 * 0124 * @param pXmlHandle address of the relevant xml handle 0125 * @param xmlTagName the xml tag name for a given particle id "slot" 0126 * @param pParticleIdPlugin to receive the address of the particle id plugin 0127 */ 0128 StatusCode InitializePlugin(const TiXmlHandle *const pXmlHandle, const std::string &xmlTagName, ParticleIdPlugin *&pParticleIdPlugin); 0129 0130 /** 0131 * @brief Call the reset callback in all managed plugins 0132 */ 0133 StatusCode ResetForNextEvent(); 0134 0135 const Pandora *const m_pPandora; ///< Address of the associated pandora instance 0136 ParticleIdPlugin *m_pEmShowerPlugin; ///< The electromagnetic shower id plugin pointer 0137 ParticleIdPlugin *m_pPhotonPlugin; ///< The photon id plugin pointer 0138 ParticleIdPlugin *m_pElectronPlugin; ///< The electron id plugin pointer 0139 ParticleIdPlugin *m_pMuonPlugin; ///< The muon id plugin pointer 0140 0141 typedef std::map<std::string, ParticleIdPlugin *> ParticleIdPluginMap; 0142 ParticleIdPluginMap m_particleIdPluginMap; ///< The particle id plugin map 0143 0144 friend class PandoraApiImpl; 0145 friend class PluginManager; 0146 }; 0147 0148 } // namespace pandora 0149 0150 #endif // #ifndef PANDORA_PARTICLE_ID_HELPER_H
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|