Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-27 09:12:21

0001 /**
0002  *  @file   PandoraSDK/include/Geometry/LArTPC.h
0003  *
0004  *  @brief  Header file for the lar tpc class.
0005  *
0006  *  $Log: $
0007  */
0008 #ifndef PANDORA_LAR_TPC_H
0009 #define PANDORA_LAR_TPC_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  LArTPC class
0024  */
0025 class LArTPC
0026 {
0027 public:
0028     /**
0029      *  @brief  Get the lar volume id, uniquely specifying the lar tpc
0030      *
0031      *  @return the lar tpc volume id
0032      */
0033     unsigned int GetLArTPCVolumeId() const;
0034 
0035     /**
0036      *  @brief  Get center in x, units mm
0037      *
0038      *  @return the center in x
0039      */
0040     float GetCenterX() const;
0041 
0042     /**
0043      *  @brief  Get center in y, units mm
0044      *
0045      *  @return the center in y
0046      */
0047     float GetCenterY() const;
0048 
0049     /**
0050      *  @brief  Get center in z, units mm
0051      *
0052      *  @return the center in z
0053      */
0054     float GetCenterZ() const;
0055 
0056     /**
0057      *  @brief  Get the width in x, units mm
0058      *
0059      *  @return the width in x
0060      */
0061     float GetWidthX() const;
0062 
0063     /**
0064      *  @brief  Get the width in y, units mm
0065      *
0066      *  @return the width in y
0067      */
0068     float GetWidthY() const;
0069 
0070     /**
0071      *  @brief  Get the width in z, units mm
0072      *
0073      *  @return the width in z
0074      */
0075     float GetWidthZ() const;
0076 
0077     /**
0078      *  @brief  Get the u wire pitch, units mm
0079      *
0080      *  @return the u wire pitch
0081      */
0082     float GetWirePitchU() const;
0083 
0084     /**
0085      *  @brief  Get the v wire pitch, units mm
0086      *
0087      *  @return the v wire pitch
0088      */
0089     float GetWirePitchV() const;
0090 
0091     /**
0092      *  @brief  Get the w wire pitch, units mm
0093      *
0094      *  @return the w wire pitch
0095      */
0096     float GetWirePitchW() const;
0097 
0098     /**
0099      *  @brief  Get the u wire angle to the vertical, units radians
0100      *
0101      *  @return the u wire angle to the vertical
0102      */
0103     float GetWireAngleU() const;
0104 
0105     /**
0106      *  @brief  Get the v wire angle to the vertical, units radians
0107      *
0108      *  @return the v wire angle to the vertical
0109      */
0110     float GetWireAngleV() const;
0111 
0112     /**
0113      *  @brief  Get the w wire angle to the vertical, units radians
0114      *
0115      *  @return the w wire angle to the vertical
0116      */
0117     float GetWireAngleW() const;
0118 
0119     /**
0120      *  @brief  Get the u, v, w resolution, units mm
0121      *
0122      *  @return the u, v, w resolution
0123      */
0124     float GetSigmaUVW() const;
0125 
0126     /**
0127      *  @brief  Whether the electron drift is in the positive x direction
0128      *
0129      *  @return boolean
0130      */
0131     bool IsDriftInPositiveX() const;
0132 
0133 protected:
0134     /**
0135      *  @brief  Constructor
0136      *
0137      *  @param  inputParameters the input lar tpc parameters
0138      */
0139     LArTPC(const object_creation::Geometry::LArTPC::Parameters &inputParameters);
0140 
0141     /**
0142      *  @brief  Destructor
0143      */
0144     virtual ~LArTPC();
0145 
0146     unsigned int    m_larTPCVolumeId;           ///< The lar tpc volume id, must uniquely specify a single lar tpc
0147     float           m_centerX;                  ///< The center in x, units mm
0148     float           m_centerY;                  ///< The center in y, units mm
0149     float           m_centerZ;                  ///< The center in z, units mm
0150     float           m_widthX;                   ///< The width in x, units mm
0151     float           m_widthY;                   ///< The width in y, units mm
0152     float           m_widthZ;                   ///< The width in z, units mm
0153     float           m_wirePitchU;               ///< The u wire pitch, units mm
0154     float           m_wirePitchV;               ///< The v wire pitch, units mm
0155     float           m_wirePitchW;               ///< The w wire pitch, units mm
0156     float           m_wireAngleU;               ///< The u wire angle to the vertical, units radians
0157     float           m_wireAngleV;               ///< The v wire angle to the vertical, units radians
0158     float           m_wireAngleW;               ///< The w wire angle to the vertical, units radians
0159     float           m_sigmaUVW;                 ///< The u, v, w resolution, units mm
0160     bool            m_isDriftInPositiveX;       ///< Whether the electron drift is in the positive x direction
0161 
0162     friend class GeometryManager;
0163     friend class PandoraObjectFactory<object_creation::Geometry::LArTPC::Parameters, object_creation::Geometry::LArTPC::Object>;
0164 };
0165 
0166 //------------------------------------------------------------------------------------------------------------------------------------------
0167 
0168 inline unsigned int LArTPC::GetLArTPCVolumeId() const
0169 {
0170     return m_larTPCVolumeId;
0171 }
0172 
0173 //------------------------------------------------------------------------------------------------------------------------------------------
0174 
0175 inline float LArTPC::GetCenterX() const
0176 {
0177     return m_centerX;
0178 }
0179 
0180 //------------------------------------------------------------------------------------------------------------------------------------------
0181 
0182 inline float LArTPC::GetCenterY() const
0183 {
0184     return m_centerY;
0185 }
0186 
0187 //------------------------------------------------------------------------------------------------------------------------------------------
0188 
0189 inline float LArTPC::GetCenterZ() const
0190 {
0191     return m_centerZ;
0192 }
0193 
0194 //------------------------------------------------------------------------------------------------------------------------------------------
0195 
0196 inline float LArTPC::GetWidthX() const
0197 {
0198     return m_widthX;
0199 }
0200 
0201 //------------------------------------------------------------------------------------------------------------------------------------------
0202 
0203 inline float LArTPC::GetWidthY() const
0204 {
0205     return m_widthY;
0206 }
0207 
0208 //------------------------------------------------------------------------------------------------------------------------------------------
0209 
0210 inline float LArTPC::GetWidthZ() const
0211 {
0212     return m_widthZ;
0213 }
0214 
0215 //------------------------------------------------------------------------------------------------------------------------------------------
0216 
0217 inline float LArTPC::GetWirePitchU() const
0218 {
0219     return m_wirePitchU;
0220 }
0221 
0222 //------------------------------------------------------------------------------------------------------------------------------------------
0223 
0224 inline float LArTPC::GetWirePitchV() const
0225 {
0226     return m_wirePitchV;
0227 }
0228 
0229 //------------------------------------------------------------------------------------------------------------------------------------------
0230 
0231 inline float LArTPC::GetWirePitchW() const
0232 {
0233     return m_wirePitchW;
0234 }
0235 
0236 //------------------------------------------------------------------------------------------------------------------------------------------
0237 
0238 inline float LArTPC::GetWireAngleU() const
0239 {
0240     return m_wireAngleU;
0241 }
0242 
0243 //------------------------------------------------------------------------------------------------------------------------------------------
0244 
0245 inline float LArTPC::GetWireAngleV() const
0246 {
0247     return m_wireAngleV;
0248 }
0249 
0250 //------------------------------------------------------------------------------------------------------------------------------------------
0251 
0252 inline float LArTPC::GetWireAngleW() const
0253 {
0254     return m_wireAngleW;
0255 }
0256 
0257 //------------------------------------------------------------------------------------------------------------------------------------------
0258 
0259 inline float LArTPC::GetSigmaUVW() const
0260 {
0261     return m_sigmaUVW;
0262 }
0263 
0264 //------------------------------------------------------------------------------------------------------------------------------------------
0265 
0266 inline bool LArTPC::IsDriftInPositiveX() const
0267 {
0268     return m_isDriftInPositiveX;
0269 }
0270 
0271 } // namespace pandora
0272 
0273 #endif // #ifndef PANDORA_LAR_TPC_H