Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MvtxClusterizer.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file MvtxClusterizer.h
1 
7 #ifndef MVTX_MVTXCLUSTERIZER_H
8 #define MVTX_MVTXCLUSTERIZER_H
9 
10 #include <fun4all/SubsysReco.h>
11 #include <trackbase/TrkrDefs.h>
12 #include <trackbase/TrkrCluster.h>
13 
14 #include <string> // for string
15 #include <utility>
16 
17 class ClusHitsVerbose;
18 class PHCompositeNode;
19 class TrkrHit;
23 class RawHit;
24 class RawHitSet;
25 class RawHitSetContainer;
26 
31 {
32  public:
33  typedef std::pair<unsigned int, unsigned int> pixel;
34 
35  MvtxClusterizer(const std::string &name = "MvtxClusterizer");
36  ~MvtxClusterizer() override {}
37 
39  int Init(PHCompositeNode */*topNode*/) override { return 0; }
40 
42  int InitRun(PHCompositeNode *topNode) override;
43 
45  int process_event(PHCompositeNode *topNode) override;
46 
48  int End(PHCompositeNode */*topNode*/) override { return 0; }
49 
51  void SetZClustering(const bool make_z_clustering)
52  {
53  m_makeZClustering = make_z_clustering;
54  }
55  bool GetZClustering() const
56  {
57  return m_makeZClustering;
58  }
59 
60  void set_do_hit_association(bool do_assoc){do_hit_assoc = do_assoc;}
61  void set_read_raw(bool read_raw){ do_read_raw = read_raw;}
62  void set_ClusHitsVerbose(bool set=true) { record_ClusHitsVerbose = set; };
64 
65  private:
66  //bool are_adjacent(const pixel lhs, const pixel rhs);
67  bool record_ClusHitsVerbose { false };
68  bool are_adjacent(const std::pair<TrkrDefs::hitkey, TrkrHit*> &lhs, const std::pair<TrkrDefs::hitkey, TrkrHit*> &rhs);
69  bool are_adjacent(RawHit* lhs, RawHit* rhs);
70 
71  void ClusterMvtx(PHCompositeNode *topNode);
72  void ClusterMvtxRaw(PHCompositeNode *topNode);
73  void PrintClusters(PHCompositeNode *topNode);
74 
75  // node tree storage pointers
79 
81 
82  // settings
83  bool m_makeZClustering; // z_clustering_option
84  bool do_hit_assoc = true;
85  bool do_read_raw = false;
86 };
87 
88 #endif // MVTX_MVTXCLUSTERIZER_H