Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:18:22

0001 #ifndef TRACKRECO_ACTSALIGNMENTSTATES_H
0002 #define TRACKRECO_ACTSALIGNMENTSTATES_H
0003 
0004 #include <trackbase/TrkrDefs.h>
0005 
0006 #include <Acts/Definitions/Algebra.hpp>
0007 
0008 #include <ActsExamples/EventData/Trajectories.hpp>
0009 
0010 #include <trackbase/ActsGeometry.h>
0011 #include <trackbase/ActsTrackFittingAlgorithm.h>
0012 #include <trackbase/ClusterErrorPara.h>
0013 #include <trackbase_historic/SvtxAlignmentState.h>
0014 
0015 #include <tpc/TpcGlobalPositionWrapper.h>
0016 
0017 #include <string>
0018 
0019 class PHCompositeNode;
0020 class SvtxTrack;
0021 class SvtxAlignmentStateMap;
0022 class ActsGeometry;
0023 class TrkrClusterContainer;
0024 /*
0025  * Helper class that contains functionality to fill alignment state
0026  * map from Acts track fitter
0027  */
0028 class ActsAlignmentStates
0029 {
0030  public:
0031   using Trajectory = ActsExamples::Trajectories;
0032 
0033   explicit ActsAlignmentStates() = default;
0034 
0035   void fillAlignmentStateMap(const ActsTrackFittingAlgorithm::TrackContainer& tracks,
0036     const std::vector<Acts::MultiTrajectoryTraits::IndexType>& tips,
0037     SvtxTrack* track,
0038     const ActsTrackFittingAlgorithm::MeasurementContainer& measurements);
0039 
0040   //! load all relevant nodes
0041   void loadNodes( PHCompositeNode* /*topNode*/);
0042 
0043   //! verbosity
0044   void verbosity(const int verb)
0045   { m_verbosity = verb; }
0046 
0047   //! field map string
0048   void fieldMap(std::string& fieldmap)
0049   {m_fieldMap = fieldmap; }
0050 
0051   //! alignment states map
0052   void alignmentStateMap (std::string const& name)
0053   {m_alignmentStateMapName = name;}
0054 
0055  private:
0056 
0057   std::pair<Acts::Vector3, Acts::Vector3> get_projectionXY(const Acts::Surface& surface, const Acts::Vector3& tangent);
0058 
0059   SvtxAlignmentState::GlobalMatrix makeGlobalDerivatives(const Acts::Vector3& OM, const std::pair<Acts::Vector3, Acts::Vector3>& projxy);
0060 
0061   //! verbosity
0062   int m_verbosity = 0;
0063 
0064   //! global position wrapper
0065   TpcGlobalPositionWrapper m_globalPositionWrapper;
0066 
0067   //! alignment state map
0068   SvtxAlignmentStateMap* m_alignmentStateMap = nullptr;
0069   std::string m_alignmentStateMapName = "SvtxAlignmentStateMap";
0070 
0071 
0072   //! cluster map
0073   TrkrClusterContainer* m_clusterMap = nullptr;
0074 
0075   //! acts geometry
0076   ActsGeometry* m_tGeometry = nullptr;
0077 
0078   //! field map
0079   std::string m_fieldMap;
0080 };
0081 
0082 #endif