Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:17:23

0001 /*!
0002  *  \file         PHTrackSeeding.h
0003  *  \brief      Base class for track seeding
0004  *  \author     Haiwang Yu <yuhw@nmsu.edu>
0005  */
0006 
0007 #ifndef TRACKRECO_PHTRACKSEEDING_H
0008 #define TRACKRECO_PHTRACKSEEDING_H
0009 
0010 // PHENIX includes
0011 #include <fun4all/SubsysReco.h>
0012 
0013 // STL includes
0014 #include <string>
0015 
0016 // forward declarations
0017 class PHCompositeNode;
0018 
0019 //class SvtxClusterMap;
0020 class TrkrClusterContainer;
0021 class TrkrClusterHitAssoc;
0022 class TrkrHitSetContainer;
0023 class TrkrClusterIterationMapv1;
0024 class SvtxVertexMap;
0025 class TrackSeedContainer;
0026 
0027 
0028 /// \class PHTrackSeeding
0029 ///
0030 /// \brief Base class for track seeding
0031 ///
0032 class PHTrackSeeding : public SubsysReco
0033 {
0034  public:
0035   PHTrackSeeding(const std::string &name = "PHTrackSeeding");
0036   ~PHTrackSeeding() override {}
0037 
0038   int InitRun(PHCompositeNode *topNode) override;
0039   int process_event(PHCompositeNode *topNode) override;
0040   int End(PHCompositeNode *topNode) override;
0041   void set_track_map_name(const std::string &map_name) { _track_map_name = map_name; }
0042   void set_do_hit_association(bool do_assoc){do_hit_assoc = do_assoc;}
0043   void SetUseTruthClusters(bool setit){_use_truth_clusters = setit;}
0044   void SetIteration(int iter){_n_iteration = iter;}
0045  protected:
0046   /// setup interface for trackers, called in InitRun, setup things like pointers to nodes.
0047   /// overrided in derived classes
0048   virtual int Setup(PHCompositeNode *topNode);
0049 
0050   /// process event interface for trackers, called in process_event.
0051   /// implemented in derived classes
0052   virtual int Process(PHCompositeNode *topNode) = 0;
0053 
0054   /// Called in SubsysReco::End
0055   virtual int End() = 0;
0056 
0057   TrkrClusterContainer *_cluster_map = nullptr;
0058   TrkrClusterHitAssoc *_cluster_hit_map = nullptr;
0059   TrkrClusterIterationMapv1* _iteration_map;
0060   int _n_iteration;
0061   bool do_hit_assoc = false;
0062   SvtxVertexMap *_vertex_map = nullptr;
0063   TrackSeedContainer *_track_map = nullptr;
0064   TrkrHitSetContainer  *_hitsets = nullptr;
0065 
0066   std::string _track_map_name = "TpcTrackSeedContainer";
0067 
0068   bool _use_truth_clusters = false;
0069 
0070  private:
0071 
0072   /// create new node output pointers
0073   int CreateNodes(PHCompositeNode *topNode);
0074 
0075   /// fetch node pointers
0076   int GetNodes(PHCompositeNode *topNode);
0077 };
0078 
0079 #endif