Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 
0004 /*!
0005  *  \file         PHTrackCleaner
0006  *  \brief      Class for deciding which track based on a given TPC seed is the best one
0007  *  \author  Tony Frawley <afrawley@fsu.edu>
0008  */
0009 
0010 #ifndef PHTRACKSELECTOR_H
0011 #define PHTRACKSELECTOR_H
0012 
0013 #include <fun4all/SubsysReco.h>
0014 
0015 #include <string>
0016 #include <vector>
0017 #include <map>
0018 
0019 class PHCompositeNode;
0020 class SvtxTrack;
0021 class SvtxTrackMap;
0022 class TrkrCluster;
0023 class TrkrClusterIterationMapv1;
0024 
0025 class PHTrackSelector : public SubsysReco
0026 {
0027  public:
0028 
0029   PHTrackSelector(const std::string &name = "PHTrackSelector");
0030 
0031   ~PHTrackSelector() override;
0032 
0033   int InitRun(PHCompositeNode *topNode) override;
0034   int process_event(PHCompositeNode *topNode) override;
0035   int End(PHCompositeNode *topNode) override;
0036 
0037   void SetMinTPCClusters(int nhits) {min_tpc_clusters = nhits;}
0038   void SetMinINTTHits(int nhits) {min_intt_hits = nhits;}
0039   void SetMinMVTXHits(int nhits) {min_mvtx_hits = nhits;}
0040   void SetChi2NDFHits(float max) {max_chi2_ndf = max;}
0041   void SetIteration(int iter) {_n_iter = iter;}
0042 
0043   void SetTrackMapName(const std::string &map_name) { _track_map_name = map_name; }
0044 
0045  private:
0046 
0047   int GetNodes(PHCompositeNode* topNode);
0048 
0049   std::string _track_map_name;
0050   SvtxTrackMap *_track_map{nullptr};
0051   SvtxTrack *_track{nullptr};
0052   TrkrClusterIterationMapv1* _iteration_map = nullptr;
0053 
0054   int _n_iter = 1;
0055   unsigned int min_tpc_clusters = 35;
0056   unsigned int min_mvtx_hits = 2;
0057   unsigned int min_intt_hits = 1;
0058   float max_chi2_ndf = 30;
0059 
0060 };
0061 
0062 #endif // PHTRACKSELECTOR_H