File indexing completed on 2025-08-06 08:17:54
0001
0002
0003
0004
0005
0006
0007 #ifndef MVTX_MVTXCLUSTERIZER_H
0008 #define MVTX_MVTXCLUSTERIZER_H
0009
0010 #include <fun4all/SubsysReco.h>
0011 #include <trackbase/TrkrCluster.h>
0012 #include <trackbase/TrkrDefs.h>
0013
0014 #include <string> // for string
0015 #include <utility>
0016
0017 class ClusHitsVerbose;
0018 class PHCompositeNode;
0019 class TrkrHit;
0020 class TrkrHitSetContainer;
0021 class TrkrClusterContainer;
0022 class TrkrClusterHitAssoc;
0023 class RawHit;
0024 class RawHitSet;
0025 class RawHitSetContainer;
0026
0027
0028
0029
0030 class MvtxClusterizer : public SubsysReco
0031 {
0032 public:
0033 typedef std::pair<unsigned int, unsigned int> pixel;
0034
0035 MvtxClusterizer(const std::string &name = "MvtxClusterizer");
0036 ~MvtxClusterizer() override {}
0037
0038
0039 int Init(PHCompositeNode * ) override { return 0; }
0040
0041
0042 int InitRun(PHCompositeNode *topNode) override;
0043
0044
0045 int process_event(PHCompositeNode *topNode) override;
0046
0047
0048 int End(PHCompositeNode * ) override { return 0; }
0049
0050
0051 void SetZClustering(const bool make_z_clustering)
0052 {
0053 m_makeZClustering = make_z_clustering;
0054 }
0055 bool GetZClustering() const
0056 {
0057 return m_makeZClustering;
0058 }
0059
0060 void set_do_hit_association(bool do_assoc) { do_hit_assoc = do_assoc; }
0061 void set_read_raw(bool read_raw) { do_read_raw = read_raw; }
0062 void set_ClusHitsVerbose(bool set = true) { record_ClusHitsVerbose = set; };
0063 ClusHitsVerbose *mClusHitsVerbose{nullptr};
0064
0065 private:
0066
0067 bool record_ClusHitsVerbose{false};
0068 bool are_adjacent(const std::pair<TrkrDefs::hitkey, TrkrHit *> &lhs, const std::pair<TrkrDefs::hitkey, TrkrHit *> &rhs);
0069 bool are_adjacent(RawHit *lhs, RawHit *rhs);
0070
0071 void ClusterMvtx(PHCompositeNode *topNode);
0072 void ClusterMvtxRaw(PHCompositeNode *topNode);
0073 void PrintClusters(PHCompositeNode *topNode);
0074
0075
0076 TrkrHitSetContainer *m_hits {nullptr};
0077 RawHitSetContainer *m_rawhits {nullptr};
0078 TrkrClusterContainer *m_clusterlist {nullptr};
0079
0080 TrkrClusterHitAssoc *m_clusterhitassoc {nullptr};
0081
0082
0083 bool m_makeZClustering {true};
0084 bool do_hit_assoc {true};
0085 bool do_read_raw {false};
0086 };
0087
0088 #endif