Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 #ifndef PHACTSTRACKPROPAGATOR_H
0004 #define PHACTSTRACKPROPAGATOR_H
0005 
0006 #include "ActsPropagator.h"
0007 
0008 #include <fun4all/SubsysReco.h>
0009 #include <trackbase/TrkrDefs.h>
0010 #include <trackbase_historic/SvtxTrack.h>
0011 
0012 #include <trackbase/ActsGeometry.h>
0013 
0014 #include <Acts/Definitions/Algebra.hpp>
0015 #include <Acts/EventData/TrackParameters.hpp>
0016 #include <Acts/Utilities/Result.hpp>
0017 
0018 #include <ActsExamples/EventData/Trajectories.hpp>
0019 
0020 #include <string>
0021 
0022 class PHCompositeNode;
0023 class SvtxTrackMap;
0024 class ActsGeometry;
0025 class SvtxVertexMap;
0026 
0027 class PHActsTrackPropagator : public SubsysReco
0028 {
0029  public:
0030   using BoundTrackParam =
0031       const Acts::BoundTrackParameters;
0032   using BoundTrackParamResult = ActsPropagator::BTPPairResult;
0033   using SurfacePtr = std::shared_ptr<const Acts::Surface>;
0034   using Trajectory = ActsExamples::Trajectories;
0035 
0036   PHActsTrackPropagator(const std::string &name = "PHActsTrackPropagator");
0037 
0038   ~PHActsTrackPropagator() override;
0039 
0040   int Init(PHCompositeNode *topNode) override;
0041   int InitRun(PHCompositeNode *topNode) override;
0042 
0043   int process_event(PHCompositeNode *topNode) override;
0044 
0045   int End(PHCompositeNode *topNode) override;
0046 
0047   void Print(const std::string &what = "ALL") const override;
0048   void setPropagationLayer(unsigned int layer) { m_sphenixLayer = layer; }
0049 
0050  private:
0051   int getNodes(PHCompositeNode *topNode);
0052   BoundTrackParamResult propagateTrack(
0053       const Acts::BoundTrackParameters &params);
0054   void convertsPHENIXLayerToActsLayer(unsigned int &actsvolume,
0055                                       unsigned int &actslayer);
0056   void addTrackState(BoundTrackParamResult &params,
0057                      SvtxTrack *svtxTrack);
0058 
0059   /// Objects containing the Acts track fit results
0060   ActsGeometry *m_tGeometry = nullptr;
0061   SvtxTrackMap *m_trackMap = nullptr;
0062   SvtxVertexMap *m_vertexMap = nullptr;
0063 
0064   unsigned int m_sphenixLayer = std::numeric_limits<unsigned int>::max();
0065 };
0066 
0067 #endif  // PHACTSTRACKPROPAGATOR_H