|
|
|||
File indexing completed on 2026-09-27 09:12:21
0001 /** 0002 * @file PandoraSDK/include/Geometry/SubDetector.h 0003 * 0004 * @brief Header file for the sub detector class. 0005 * 0006 * $Log: $ 0007 */ 0008 #ifndef PANDORA_SUB_DETECTOR_H 0009 #define PANDORA_SUB_DETECTOR_H 1 0010 0011 #include "Pandora/ObjectCreation.h" 0012 0013 #include <string> 0014 0015 namespace pandora 0016 { 0017 0018 template<typename T, typename S> class PandoraObjectFactory; 0019 0020 //------------------------------------------------------------------------------------------------------------------------------------------ 0021 0022 /** 0023 * @brief SubDetector class 0024 */ 0025 class SubDetector 0026 { 0027 public: 0028 /** 0029 * @brief SubDetectorLayer class 0030 */ 0031 class SubDetectorLayer 0032 { 0033 public: 0034 /** 0035 * @brief Constructor 0036 * 0037 * @param closestDistanceToIp the closest distance of the layer from the interaction point, units mm 0038 * @param nRadiationLengths the absorber material in front of layer, units radiation lengths 0039 * @param nInteractionLengths the absorber material in front of layer, units interaction lengths 0040 */ 0041 SubDetectorLayer(const float closestDistanceToIp, const float nRadiationLengths, const float nInteractionLengths); 0042 0043 /** 0044 * @brief Get the closest distance of the layer from the interaction point, units mm 0045 * 0046 * @return the closest distance of the layer from the interaction point 0047 */ 0048 float GetClosestDistanceToIp() const; 0049 0050 /** 0051 * @brief Get the absorber material in front of layer, units radiation lengths 0052 * 0053 * @return the absorber material in front of layer 0054 */ 0055 float GetNRadiationLengths() const; 0056 0057 /** 0058 * @brief Get the absorber material in front of layer, units interaction lengths 0059 * 0060 * @return the absorber material in front of layer 0061 */ 0062 float GetNInteractionLengths() const; 0063 0064 private: 0065 float m_closestDistanceToIp; ///< Closest distance of the layer from the interaction point, units mm 0066 float m_nRadiationLengths; ///< Absorber material in front of layer, units radiation lengths 0067 float m_nInteractionLengths; ///< Absorber material in front of layer, units interaction lengths 0068 }; 0069 0070 typedef std::vector<SubDetectorLayer> SubDetectorLayerVector; 0071 0072 /** 0073 * @brief Get the sub detector name, uniquely specifying the sub detector 0074 * 0075 * @return The sub detector name 0076 */ 0077 const std::string &GetSubDetectorName() const; 0078 0079 /** 0080 * @brief Get the sub detector type, e.g. ECAL_BARREL, HCAL_ENDCAP, TPC, etc. 0081 * 0082 * @return The sub detector type 0083 */ 0084 SubDetectorType GetSubDetectorType() const; 0085 0086 /** 0087 * @brief Get the inner cylindrical polar r coordinate, origin interaction point, units mm 0088 * 0089 * @return The inner cylindrical polar r coordinate 0090 */ 0091 float GetInnerRCoordinate() const; 0092 0093 /** 0094 * @brief Get the inner cylindrical polar z coordinate, origin interaction point, units mm 0095 * 0096 * @return The inner cylindrical polar z coordinate 0097 */ 0098 float GetInnerZCoordinate() const; 0099 0100 /** 0101 * @brief Get the inner cylindrical polar phi coordinate (angle wrt cartesian x axis) 0102 * 0103 * @return The inner cylindrical polar phi coordinate 0104 */ 0105 float GetInnerPhiCoordinate() const; 0106 0107 /** 0108 * @brief Get the order of symmetry of the innermost edge of subdetector 0109 * 0110 * @return The order of symmetry of the innermost edge of subdetector 0111 */ 0112 unsigned int GetInnerSymmetryOrder() const; 0113 0114 /** 0115 * @brief Get the outer cylindrical polar r coordinate, origin interaction point, units mm 0116 * 0117 * @return The outer cylindrical polar r coordinate 0118 */ 0119 float GetOuterRCoordinate() const; 0120 0121 /** 0122 * @brief Get the outer cylindrical polar z coordinate, origin interaction point, units mm 0123 * 0124 * @return The outer cylindrical polar z coordinate 0125 */ 0126 float GetOuterZCoordinate() const; 0127 0128 /** 0129 * @brief Get the outer cylindrical polar phi coordinate (angle wrt cartesian x axis) 0130 * 0131 * @return The outer cylindrical polar phi coordinate 0132 */ 0133 float GetOuterPhiCoordinate() const; 0134 0135 /** 0136 * @brief Get the order of symmetry of the outermost edge of sub detector 0137 * 0138 * @return The order of symmetry of the outermost edge of sub detector 0139 */ 0140 unsigned int GetOuterSymmetryOrder() const; 0141 0142 /** 0143 * @brief Whether a second sub detector exists, equivalent to a reflection in z=0 plane 0144 * 0145 * @return boolean 0146 */ 0147 bool IsMirroredInZ() const; 0148 0149 /** 0150 * @brief Get the number of layers in the sub detector 0151 * 0152 * @return The number of layers in the sub detector 0153 */ 0154 unsigned int GetNLayers() const; 0155 0156 /** 0157 * @brief Get the vector of layer parameters for the sub detector 0158 * 0159 * @return The vector of layer parameters for the sub detector 0160 */ 0161 const SubDetectorLayerVector &GetSubDetectorLayerVector() const; 0162 0163 protected: 0164 /** 0165 * @brief Constructor 0166 * 0167 * @param inputParameters the input sub detector parameters 0168 */ 0169 SubDetector(const object_creation::Geometry::SubDetector::Parameters &inputParameters); 0170 0171 /** 0172 * @brief Destructor 0173 */ 0174 virtual ~SubDetector(); 0175 0176 std::string m_subDetectorName; ///< The sub detector name, must uniquely specify a single sub detector 0177 SubDetectorType m_subDetectorType; ///< The sub detector type, e.g. ECAL_BARREL, HCAL_ENDCAP, TPC, etc. 0178 float m_innerRCoordinate; ///< Inner cylindrical polar r coordinate, origin interaction point, units mm 0179 float m_innerZCoordinate; ///< Inner cylindrical polar z coordinate, origin interaction point, units mm 0180 float m_innerPhiCoordinate; ///< Inner cylindrical polar phi coordinate (angle wrt cartesian x axis) 0181 unsigned int m_innerSymmetryOrder; ///< Order of symmetry of the innermost edge of sub detector 0182 float m_outerRCoordinate; ///< Outer cylindrical polar r coordinate, origin interaction point, units mm 0183 float m_outerZCoordinate; ///< Outer cylindrical polar z coordinate, origin interaction point, units mm 0184 float m_outerPhiCoordinate; ///< Outer cylindrical polar phi coordinate (angle wrt cartesian x axis) 0185 unsigned int m_outerSymmetryOrder; ///< Order of symmetry of the outermost edge of sub detector 0186 bool m_isMirroredInZ; ///< Whether a second sub detector exists, equivalent to a reflection in z=0 plane 0187 unsigned int m_nLayers; ///< The number of layers in the sub detector section 0188 SubDetectorLayerVector m_subDetectorLayerVector; ///< The vector of layer parameters for the sub detector section 0189 0190 friend class GeometryManager; 0191 friend class PandoraObjectFactory<object_creation::Geometry::SubDetector::Parameters, object_creation::Geometry::SubDetector::Object>; 0192 }; 0193 0194 //------------------------------------------------------------------------------------------------------------------------------------------ 0195 0196 inline SubDetector::SubDetectorLayer::SubDetectorLayer(const float closestDistanceToIp, const float nRadiationLengths, const float nInteractionLengths) : 0197 m_closestDistanceToIp(closestDistanceToIp), 0198 m_nRadiationLengths(nRadiationLengths), 0199 m_nInteractionLengths(nInteractionLengths) 0200 { 0201 } 0202 0203 //------------------------------------------------------------------------------------------------------------------------------------------ 0204 0205 inline float SubDetector::SubDetectorLayer::GetClosestDistanceToIp() const 0206 { 0207 return m_closestDistanceToIp; 0208 } 0209 0210 //------------------------------------------------------------------------------------------------------------------------------------------ 0211 0212 inline float SubDetector::SubDetectorLayer::GetNRadiationLengths() const 0213 { 0214 return m_nRadiationLengths; 0215 } 0216 0217 //------------------------------------------------------------------------------------------------------------------------------------------ 0218 0219 inline float SubDetector::SubDetectorLayer::GetNInteractionLengths() const 0220 { 0221 return m_nInteractionLengths; 0222 } 0223 0224 //------------------------------------------------------------------------------------------------------------------------------------------ 0225 //------------------------------------------------------------------------------------------------------------------------------------------ 0226 0227 inline const std::string &SubDetector::GetSubDetectorName() const 0228 { 0229 return m_subDetectorName; 0230 } 0231 0232 //------------------------------------------------------------------------------------------------------------------------------------------ 0233 0234 inline SubDetectorType SubDetector::GetSubDetectorType() const 0235 { 0236 return m_subDetectorType; 0237 } 0238 0239 //------------------------------------------------------------------------------------------------------------------------------------------ 0240 0241 inline float SubDetector::GetInnerRCoordinate() const 0242 { 0243 return m_innerRCoordinate; 0244 } 0245 0246 //------------------------------------------------------------------------------------------------------------------------------------------ 0247 0248 inline float SubDetector::GetInnerZCoordinate() const 0249 { 0250 return m_innerZCoordinate; 0251 } 0252 0253 //------------------------------------------------------------------------------------------------------------------------------------------ 0254 0255 inline float SubDetector::GetInnerPhiCoordinate() const 0256 { 0257 return m_innerPhiCoordinate; 0258 } 0259 0260 //------------------------------------------------------------------------------------------------------------------------------------------ 0261 0262 inline unsigned int SubDetector::GetInnerSymmetryOrder() const 0263 { 0264 return m_innerSymmetryOrder; 0265 } 0266 0267 //------------------------------------------------------------------------------------------------------------------------------------------ 0268 0269 inline float SubDetector::GetOuterRCoordinate() const 0270 { 0271 return m_outerRCoordinate; 0272 } 0273 0274 //------------------------------------------------------------------------------------------------------------------------------------------ 0275 0276 inline float SubDetector::GetOuterZCoordinate() const 0277 { 0278 return m_outerZCoordinate; 0279 } 0280 0281 //------------------------------------------------------------------------------------------------------------------------------------------ 0282 0283 inline float SubDetector::GetOuterPhiCoordinate() const 0284 { 0285 return m_outerPhiCoordinate; 0286 } 0287 0288 //------------------------------------------------------------------------------------------------------------------------------------------ 0289 0290 inline unsigned int SubDetector::GetOuterSymmetryOrder() const 0291 { 0292 return m_outerSymmetryOrder; 0293 } 0294 0295 //------------------------------------------------------------------------------------------------------------------------------------------ 0296 0297 inline bool SubDetector::IsMirroredInZ() const 0298 { 0299 return m_isMirroredInZ; 0300 } 0301 0302 //------------------------------------------------------------------------------------------------------------------------------------------ 0303 0304 inline unsigned int SubDetector::GetNLayers() const 0305 { 0306 return m_nLayers; 0307 } 0308 0309 //------------------------------------------------------------------------------------------------------------------------------------------ 0310 0311 inline const SubDetector::SubDetectorLayerVector &SubDetector::GetSubDetectorLayerVector() const 0312 { 0313 return m_subDetectorLayerVector; 0314 } 0315 0316 } // namespace pandora 0317 0318 #endif // #ifndef PANDORA_SUB_DETECTOR_H
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|