File indexing completed on 2025-08-06 08:21:59
0001 #ifndef __PHG4SVTXCLUSTERIZER_H__
0002 #define __PHG4SVTXCLUSTERIZER_H__
0003
0004 #include <fun4all/SubsysReco.h>
0005 #include <phool/PHTimeServer.h>
0006 #include <map>
0007 #include <limits.h>
0008
0009 #include <mvtx/MvtxHitSetv1.h>
0010
0011 class TrkrHitSetContainer;
0012 class TrkrClusterContainer;
0013
0014 class MvtxClusterizer : public SubsysReco {
0015
0016 public:
0017
0018 typedef std::pair<unsigned int, unsigned int> pixel;
0019
0020 MvtxClusterizer(const std::string &name = "MvtxClusterizer");
0021 virtual ~MvtxClusterizer(){}
0022
0023
0024 int Init(PHCompositeNode *topNode){return 0;}
0025
0026
0027 int InitRun(PHCompositeNode *topNode);
0028
0029
0030 int process_event(PHCompositeNode *topNode);
0031
0032
0033 int End(PHCompositeNode *topNode){return 0;}
0034
0035
0036 void SetZClustering(const bool make_z_clustering) {
0037 make_z_clustering_ = make_z_clustering;
0038 }
0039 bool GetZClustering() const {
0040 return make_z_clustering_;
0041 }
0042
0043 private:
0044
0045 bool are_adjacent(const pixel lhs, const pixel rhs );
0046
0047 void ClusterMvtx(PHCompositeNode *topNode);
0048
0049 void PrintClusters(PHCompositeNode *topNode);
0050
0051
0052 TrkrHitSetContainer* hits_;
0053 TrkrClusterContainer* clusterlist_;
0054
0055
0056 bool make_z_clustering_;
0057
0058 PHTimeServer::timer _timer;
0059 };
0060
0061 #endif