|
|
|||
File indexing completed on 2026-09-27 09:20:10
0001 /** 0002 * @file PandoraSDK/include/Pandora/PandoraSettings.h 0003 * 0004 * @brief Header file for the pandora settings class. 0005 * 0006 * $Log: $ 0007 */ 0008 #ifndef PANDORA_SETTINGS_H 0009 #define PANDORA_SETTINGS_H 1 0010 0011 #include "Pandora/StatusCodes.h" 0012 0013 namespace pandora 0014 { 0015 0016 class Pandora; 0017 class TiXmlHandle; 0018 0019 //------------------------------------------------------------------------------------------------------------------------------------------ 0020 0021 /** 0022 * @brief PandoraSettings class 0023 */ 0024 class PandoraSettings 0025 { 0026 public: 0027 /** 0028 * @brief Constructor 0029 * 0030 * @param pPandora address of the associated pandora object 0031 */ 0032 PandoraSettings(const Pandora *const pPandora); 0033 0034 /** 0035 * @brief Destructor 0036 */ 0037 ~PandoraSettings(); 0038 0039 /** 0040 * @brief Whether monitoring is enabled 0041 * 0042 * @return boolean 0043 */ 0044 bool IsMonitoringEnabled() const; 0045 0046 /** 0047 * @brief Whether to display algorithm information during processing 0048 * 0049 * @return boolean 0050 */ 0051 bool ShouldDisplayAlgorithmInfo() const; 0052 0053 /** 0054 * @brief Whether to allow only single hit types in individual clusters 0055 * 0056 * @return boolean 0057 */ 0058 bool SingleHitTypeClusteringMode() const; 0059 0060 /** 0061 * @brief Whether to collapse mc particle decay chains down to just the pfo target 0062 * 0063 * @return boolean 0064 */ 0065 bool ShouldCollapseMCParticlesToPfoTarget() const; 0066 0067 /** 0068 * @brief Whether to allow only single mc particle association to objects (largest weight) 0069 * 0070 * @return boolean 0071 */ 0072 bool UseSingleMCParticleAssociation() const; 0073 0074 /** 0075 * @brief Get the electromagnetic energy resolution as a fraction, X, such that sigmaE = ( X * E / sqrt(E) ) 0076 * 0077 * @return The electromagnetic energy resolution 0078 */ 0079 float GetElectromagneticEnergyResolution() const; 0080 0081 /** 0082 * @brief Get the hadronic energy resolution as a fraction, X, such that sigmaE = ( X * E / sqrt(E) ) 0083 * 0084 * @return The hadronic energy resolution 0085 */ 0086 float GetHadronicEnergyResolution() const; 0087 0088 /** 0089 * @brief Get the radius used to select the pfo target from a mc particle decay chain, units mm 0090 * 0091 * @return The pfo selection radius 0092 */ 0093 float GetMCPfoSelectionRadius() const; 0094 0095 /** 0096 * @brief Get the momentum magnitude used to select the pfo target from a mc particle decay chain, units GeV 0097 * 0098 * @return The pfo selection momentum magnitude 0099 */ 0100 float GetMCPfoSelectionMomentum() const; 0101 0102 /** 0103 * @brief Get the low energy cut-off for selection of protons/neutrons as mc pfos 0104 * 0105 * @return The low energy cut-off for selection of protons/neutrons as mc pfos 0106 */ 0107 float GetMCPfoSelectionLowEnergyNeutronProtonCutOff() const; 0108 0109 /** 0110 * @brief Get the tolerance allowed when declaring a point to be "in" a gap region, units mm 0111 * 0112 * @return the tolerance allowed when declaring a point to be "in" a gap region, units mm 0113 */ 0114 float GetGapTolerance() const; 0115 0116 private: 0117 /** 0118 * @brief Initialize pandora settings 0119 * 0120 * @param pXmlHandle address of the relevant xml handle 0121 */ 0122 StatusCode Initialize(const TiXmlHandle *const pXmlHandle); 0123 0124 /** 0125 * @brief Read global pandora settings 0126 * 0127 * @param pXmlHandle address of the relevant xml handle 0128 */ 0129 StatusCode ReadGlobalSettings(const TiXmlHandle *const pXmlHandle); 0130 0131 bool m_isMonitoringEnabled; ///< Whether monitoring is enabled 0132 bool m_shouldDisplayAlgorithmInfo; ///< Whether to display algorithm information during processing 0133 bool m_singleHitTypeClusteringMode; ///< Whether to allow only single hit types in individual clusters 0134 bool m_shouldCollapseMCParticlesToPfoTarget; ///< Whether to collapse mc particle decay chains down to just the pfo target 0135 bool m_useSingleMCParticleAssociation; ///< Whether to allow only single mc particle association to objects (largest weight) 0136 0137 float m_electromagneticEnergyResolution; ///< Electromagnetic energy resolution, X, such that sigmaE = ( X * E / sqrt(E) ) 0138 float m_hadronicEnergyResolution; ///< Hadronic energy resolution, X, such that sigmaE = ( X * E / sqrt(E) ) 0139 float m_mcPfoSelectionRadius; ///< Radius used to select pfo target from a mc decay chain, units mm 0140 float m_mcPfoSelectionMomentum; ///< Momentum magnitude used to select pfo target from a mc decay chain, units GeV/c 0141 float m_mcPfoSelectionLowEnergyNPCutOff; ///< Low energy cut-off for selection of protons/neutrons as MCPFOs 0142 0143 float m_gapTolerance; ///< Tolerance allowed when declaring a point to be "in" a gap region, units mm 0144 0145 const Pandora *const m_pPandora; ///< The associated pandora object 0146 0147 friend class PandoraApiImpl; 0148 friend class PandoraImpl; 0149 }; 0150 0151 //------------------------------------------------------------------------------------------------------------------------------------------ 0152 0153 inline bool PandoraSettings::IsMonitoringEnabled() const 0154 { 0155 return m_isMonitoringEnabled; 0156 } 0157 0158 //------------------------------------------------------------------------------------------------------------------------------------------ 0159 0160 inline bool PandoraSettings::ShouldDisplayAlgorithmInfo() const 0161 { 0162 return m_shouldDisplayAlgorithmInfo; 0163 } 0164 0165 //------------------------------------------------------------------------------------------------------------------------------------------ 0166 0167 inline bool PandoraSettings::SingleHitTypeClusteringMode() const 0168 { 0169 return m_singleHitTypeClusteringMode; 0170 } 0171 0172 //------------------------------------------------------------------------------------------------------------------------------------------ 0173 0174 inline bool PandoraSettings::ShouldCollapseMCParticlesToPfoTarget() const 0175 { 0176 return m_shouldCollapseMCParticlesToPfoTarget; 0177 } 0178 0179 //------------------------------------------------------------------------------------------------------------------------------------------ 0180 0181 inline bool PandoraSettings::UseSingleMCParticleAssociation() const 0182 { 0183 return m_useSingleMCParticleAssociation; 0184 } 0185 0186 //------------------------------------------------------------------------------------------------------------------------------------------ 0187 0188 inline float PandoraSettings::GetElectromagneticEnergyResolution() const 0189 { 0190 return m_electromagneticEnergyResolution; 0191 } 0192 0193 //------------------------------------------------------------------------------------------------------------------------------------------ 0194 0195 inline float PandoraSettings::GetHadronicEnergyResolution() const 0196 { 0197 return m_hadronicEnergyResolution; 0198 } 0199 0200 //------------------------------------------------------------------------------------------------------------------------------------------ 0201 0202 inline float PandoraSettings::GetMCPfoSelectionRadius() const 0203 { 0204 return m_mcPfoSelectionRadius; 0205 } 0206 0207 //------------------------------------------------------------------------------------------------------------------------------------------ 0208 0209 inline float PandoraSettings::GetMCPfoSelectionMomentum() const 0210 { 0211 return m_mcPfoSelectionMomentum; 0212 } 0213 0214 //------------------------------------------------------------------------------------------------------------------------------------------ 0215 0216 inline float PandoraSettings::GetMCPfoSelectionLowEnergyNeutronProtonCutOff() const 0217 { 0218 return m_mcPfoSelectionLowEnergyNPCutOff; 0219 } 0220 0221 //------------------------------------------------------------------------------------------------------------------------------------------ 0222 0223 inline float PandoraSettings::GetGapTolerance() const 0224 { 0225 return m_gapTolerance; 0226 } 0227 0228 } // namespace pandora 0229 0230 #endif // #ifndef PANDORA_SETTINGS_H
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|