File indexing completed on 2025-08-06 08:18:30
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef PHGHOSTREJECTION_H
0011 #define PHGHOSTREJECTION_H
0012
0013 #include <fun4all/SubsysReco.h>
0014 #include <trackbase/ActsSurfaceMaps.h>
0015 #include <trackbase/ActsTrackingGeometry.h>
0016 #include <trackbase_historic/TrackSeed_v2.h>
0017
0018
0019 #include <map>
0020 #include <string>
0021 #include <vector>
0022
0023 class PHCompositeNode;
0024 class TrackSeedContainer;
0025 class TrkrCluster;
0026 class TrkrClusterContainer;
0027
0028 class PHGhostRejection
0029 {
0030 public:
0031
0032 PHGhostRejection(unsigned int verbosity, const std::vector<TrackSeed_v2>& _seeds)
0033 : m_verbosity { verbosity }
0034 , seeds { _seeds }
0035 , m_rejected { std::vector<bool> (seeds.size(), false) }
0036 {};
0037
0038
0039 void verbosity(int verb) { m_verbosity = verb; }
0040
0041
0042
0043 bool cut_from_clusters(int itrack);
0044
0045
0046
0047 void find_ghosts(const std::vector<float>& trackChi2);
0048 bool is_rejected(int itrack) const { return m_rejected[itrack]; };
0049
0050 bool checkClusterSharing(const TrackSeed& tr1, const TrackSeed& tr2) const;
0051
0052 void set_min_pt_cut(float _ptmin) { _min_pt= _ptmin; }
0053 void set_must_span_sectors(bool _setting) { _must_span_sectors = _setting; }
0054 void set_min_clusters (int _val) { _min_clusters = _val; }
0055 void set_phi_cut(double d) { _phi_cut = d; }
0056 void set_eta_cut(double d) { _eta_cut = d; }
0057 void set_x_cut(double d) { _x_cut = d; }
0058 void set_y_cut(double d) { _y_cut = d; }
0059 void set_z_cut(double d) { _z_cut = d; }
0060
0061 private:
0062 unsigned int m_verbosity;
0063 const std::vector<TrackSeed_v2>& seeds;
0064 std::vector<bool> m_rejected {};
0065 double _phi_cut = std::numeric_limits<double>::max();
0066 double _eta_cut = std::numeric_limits<double>::max();
0067 double _x_cut = std::numeric_limits<double>::max();
0068 double _y_cut = std::numeric_limits<double>::max();
0069 double _z_cut = std::numeric_limits<double>::max();
0070
0071
0072
0073 double _min_pt = 0.0;
0074 bool _must_span_sectors = false;
0075 size_t _min_clusters = 3;
0076
0077
0078
0079
0080
0081 };
0082
0083 #endif