Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:16:53

0001 #ifndef TPC_TPCGLOBALPOSITIONWRAPPER_H
0002 #define TPC_TPCGLOBALPOSITIONWRAPPER_H
0003 
0004 /*
0005  * \file TpcGlobalPositionWrapper.h
0006  * \brief provides the tpc 3d global position with all distortion and crossing corrections applied
0007  * \author Joe Osborn <josborn1@bnl.gov>, Hugo Pereira Da Costa <hugo.pereira-da-costa@lanl.gov>
0008  */
0009 #include "TpcDistortionCorrection.h"
0010 
0011 #include <trackbase/TrkrDefs.h>
0012 
0013 
0014 class ActsGeometry;
0015 class PHCompositeNode;
0016 class TpcDistortionCorrectionContainer;
0017 class TrkrCluster;
0018 
0019 class TpcGlobalPositionWrapper
0020 {
0021   public:
0022 
0023   //! constructor
0024   explicit TpcGlobalPositionWrapper() = default;
0025 
0026   //! verbosity
0027   void set_verbosity(int value)
0028   {
0029     m_verbosity = value;
0030   }
0031   
0032   void set_suppressCrossing(bool value)
0033   {
0034     m_suppressCrossing = value;
0035   }
0036 
0037   //! verbosity
0038   int verbosity() const
0039   {
0040     return m_verbosity;
0041   }
0042 
0043   //! load relevant nodes from tree
0044   void loadNodes(PHCompositeNode* /*topnode*/);
0045 
0046   void set_enable_module_edge_corr(bool flag) { m_enable_module_edge_corr = flag; }
0047   void set_enable_static_corr(bool flag) { m_enable_static_corr = flag; }
0048   void set_enable_average_corr(bool flag) { m_enable_average_corr = flag; }
0049   void set_enable_fluctuation_corr(bool flag) { m_enable_fluctuation_corr = flag; }
0050 
0051   //! apply all loaded distortion corrections to a given position
0052   Acts::Vector3 applyDistortionCorrections( Acts::Vector3 /*source*/ ) const;
0053 
0054   //! get distortion corrected global position from cluster
0055   /**
0056    * first converts cluster position local coordinate to global coordinates
0057    * then, for TPC clusters only, applies crossing correction, and distortion corrections
0058    */
0059   Acts::Vector3 getGlobalPositionDistortionCorrected(const TrkrDefs::cluskey&, TrkrCluster*, short int /*crossing*/ ) const;
0060 
0061   private:
0062 
0063   //! verbosity
0064   unsigned int m_verbosity = 0;
0065 
0066   bool m_suppressCrossing = false;
0067 
0068   //! distortion correction interface
0069   TpcDistortionCorrection m_distortionCorrection;
0070 
0071   //! acts geometry
0072   ActsGeometry* m_tGeometry = nullptr;
0073 
0074   //! module edge distortion correction container
0075   TpcDistortionCorrectionContainer* m_dcc_module_edge{nullptr};
0076   bool m_enable_module_edge_corr = true;
0077 
0078   //! static distortion correction container
0079   TpcDistortionCorrectionContainer* m_dcc_static{nullptr};
0080   bool m_enable_static_corr = true;
0081 
0082   //! average distortion correction container
0083   TpcDistortionCorrectionContainer* m_dcc_average{nullptr};
0084   bool m_enable_average_corr = true;
0085 
0086   //! fluctuation distortion container
0087   TpcDistortionCorrectionContainer* m_dcc_fluctuation{nullptr};
0088   bool m_enable_fluctuation_corr = true;
0089 
0090 };
0091 
0092 #endif