Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:20:37

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 #ifndef MVTX_P2_CLUSTERIZER_H
0004 #define MVTX_P2_CLUSTERIZER_H
0005 
0006 #include <fun4all/SubsysReco.h>
0007 #include <utility>
0008 #include <trackbase/TrkrDefs.h>
0009 
0010 class TrkrHit;
0011 class TrkrHitSetContainer;
0012 class TrkrClusterContainer;
0013 class TrkrClusterHitAssoc;
0014 
0015 /**
0016  * @brief Clusterizer for the MVTX
0017  */
0018 class MvtxPrototype2Clusterizer : public SubsysReco
0019 {
0020  public:
0021   typedef std::pair<unsigned int, unsigned int> pixel;
0022 
0023   MvtxPrototype2Clusterizer(const std::string &name = "MvtxPrototype2Clusterizer");
0024   virtual ~MvtxPrototype2Clusterizer() {}
0025 
0026   //! module initialization
0027   int Init(PHCompositeNode *topNode) { return 0; }
0028 
0029   //! run initialization
0030   int InitRun(PHCompositeNode *topNode);
0031 
0032   //! event processing
0033   int process_event(PHCompositeNode *topNode);
0034 
0035   //! end of process
0036   int End(PHCompositeNode *topNode) { return 0; }
0037 
0038   //! option to turn off z-dimension clustering
0039   void SetZClustering(const bool make_z_clustering)
0040   {
0041     m_makeZClustering = make_z_clustering;
0042   }
0043   bool GetZClustering() const
0044   {
0045     return m_makeZClustering;
0046   }
0047 
0048  private:
0049   //bool are_adjacent(const pixel lhs, const pixel rhs);
0050   bool are_adjacent(const std::pair<TrkrDefs::hitkey, TrkrHit*> &lhs, const std::pair<TrkrDefs::hitkey, TrkrHit*> &rhs);
0051 
0052   void ClusterMvtx(PHCompositeNode *topNode);
0053 
0054   void PrintClusters(PHCompositeNode *topNode);
0055 
0056   // node tree storage pointers
0057   TrkrHitSetContainer *m_hits;
0058   TrkrClusterContainer *m_clusterlist;
0059   TrkrClusterHitAssoc *m_clusterhitassoc;
0060 
0061   // settings
0062   bool m_makeZClustering;  // z_clustering_option
0063 };
0064 
0065 #endif  // MVTX_MVTXCLUSTERIZER_H