ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HelixHoughBin_v1.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file HelixHoughBin_v1.h
1 #ifndef G4HOUGH_HELIXHOUGHBINV1_H
2 #define G4HOUGH_HELIXHOUGHBINV1_H
3 
4 #include "HelixHoughBin.h"
5 #include "HelixHoughSpace.h"
6 
7 #include <stddef.h> // for size_t
8 #include <iostream> // for cout, ostream
9 
10 class PHObject;
11 
13 {
14  public:
15  HelixHoughBin_v1(unsigned int bin);
16  ~HelixHoughBin_v1() override {}
17 
18  // The "standard PHObject response" functions...
19  void identify(std::ostream& os = std::cout) const override;
20  void Reset() override{};
21  int isValid() const override { return 1; }
22  PHObject* CloneMe() const override { return new HelixHoughBin_v1(*this); }
23 
24  void init() override;
25 
26  // get_cluster_IDs() {}
27  void add_cluster_ID(unsigned int cluster_ID) override { _cluster_IDs.insert(cluster_ID); }
28  unsigned int get_count() const override { return _cluster_IDs.size(); }
29  void clear_clusters() override { _cluster_IDs.clear(); }
30  bool empty_clusters() override { return _cluster_IDs.empty(); }
31  size_t erase_cluster(unsigned int cluster_id) override { return _cluster_IDs.erase(cluster_id); }
32 
33  ConstClusterIter begin_clusters() const override { return _cluster_IDs.begin(); }
34  ConstClusterIter find_cluster(unsigned int cluster_id) const override { return _cluster_IDs.find(cluster_id); }
35  ConstClusterIter end_clusters() const override { return _cluster_IDs.end(); }
36  ClusterIter begin_clusters() override { return _cluster_IDs.begin(); }
37  ClusterIter find_cluster(unsigned int cluster_id) override { return _cluster_IDs.find(cluster_id); }
38  ClusterIter end_clusters() override { return _cluster_IDs.end(); }
39 
40  unsigned int get_bin(unsigned int zoomlevel) const override { return _bin[zoomlevel]; }
41  void set_bin(unsigned int zoomlevel, unsigned int bin) override { _bin[zoomlevel] = bin; }
42 
43  unsigned int get_zoomlevel() const override { return _zoomlevel; }
44  void set_zoomlevel(unsigned int zoomlevel) override { _zoomlevel = zoomlevel; }
45 
46  unsigned int get_kappa_bin(unsigned int zoomlevel) const override { return _kappa_bins[zoomlevel]; }
47  void set_kappa_bin(unsigned int zoomlevel, unsigned int kappa_bin) override { _kappa_bins[zoomlevel] = kappa_bin; }
48  unsigned int get_phi_bin(unsigned int zoomlevel) const override { return _phi_bins[zoomlevel]; }
49  void set_phi_bin(unsigned int zoomlevel, unsigned int phi_bin) override { _phi_bins[zoomlevel] = phi_bin; }
50  unsigned int get_phi_high_bin(unsigned int zoomlevel) const override { return _phi_high_bins[zoomlevel]; }
51  void set_phi_high_bin(unsigned int zoomlevel, unsigned int phi_high_bin) override { _phi_high_bins[zoomlevel] = phi_high_bin; }
52  unsigned int get_phi_low_bin(unsigned int zoomlevel) const override { return _phi_low_bins[zoomlevel]; }
53  void set_phi_low_bin(unsigned int zoomlevel, unsigned int phi_low_bin) override { _phi_low_bins[zoomlevel] = phi_low_bin; }
54  unsigned int get_d_bin(unsigned int zoomlevel) const override { return _d_bins[zoomlevel]; }
55  void set_d_bin(unsigned int zoomlevel, unsigned int d_bin) override { _d_bins[zoomlevel] = d_bin; }
56  unsigned int get_dzdl_bin(unsigned int zoomlevel) const override { return _dzdl_bins[zoomlevel]; }
57  void set_dzdl_bin(unsigned int zoomlevel, unsigned int dzdl_bin) override { _dzdl_bins[zoomlevel] = dzdl_bin; }
58  unsigned int get_dzdl_high_bin(unsigned int zoomlevel) const override { return _dzdl_high_bins[zoomlevel]; }
59  void set_dzdl_high_bin(unsigned int zoomlevel, unsigned int dzdl_high_bin) override { _dzdl_high_bins[zoomlevel] = dzdl_high_bin; }
60  unsigned int get_dzdl_low_bin(unsigned int zoomlevel) const override { return _dzdl_low_bins[zoomlevel]; }
61  void set_dzdl_low_bin(unsigned int zoomlevel, unsigned int dzdl_low_bin) override { _dzdl_low_bins[zoomlevel] = dzdl_low_bin; }
62  unsigned int get_z0_bin(unsigned int zoomlevel) const override { return _z0_bins[zoomlevel]; }
63  void set_z0_bin(unsigned int zoomlevel, unsigned int z0_bin) override { _z0_bins[zoomlevel] = z0_bin; }
64 
65  void set_hough_space(HelixHoughSpace* hough_space) override;
66  void set_bins(unsigned int zoomlevel, unsigned int bin) override;
67 
68  unsigned int get_global_bin(unsigned int zoomlevel) override;
69  void set_global_bin(unsigned int zoomlevel) override;
70  unsigned int get_neighbors_global_bin(unsigned int zoomlevel, unsigned int var, unsigned int bit_sign) override;
71 
72  float get_kappa_center(unsigned int zoomlevel) override;
73  float get_phi_center(unsigned int zoomlevel) override;
74  float get_d_center(unsigned int zoomlevel) override;
75  float get_dzdl_center(unsigned int zoomlevel) override;
76  float get_z0_center(unsigned int zoomlevel) override;
77 
78  private:
79  ClusterSet _cluster_IDs; // hits who voted for this bin
80 
81  unsigned int _global_bin;
82  unsigned int _bin[ZOOMLEVEL_MAX];
83  unsigned int _kappa_bins[ZOOMLEVEL_MAX]; //={3,2,4} 3rd in most coarse bins, 4th in the narrowest bins
84  unsigned int _phi_bins[ZOOMLEVEL_MAX];
87  unsigned int _d_bins[ZOOMLEVEL_MAX];
88  unsigned int _dzdl_bins[ZOOMLEVEL_MAX];
91  unsigned int _z0_bins[ZOOMLEVEL_MAX];
92  unsigned int _zoomlevel;
93 
95 
97 };
98 
99 #endif