Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TrkrClusterIsMatcher.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file TrkrClusterIsMatcher.h
1 #ifndef TRKRCLUSTERISMATCHER__H
2 #define TRKRCLUSTERISMATCHER__H
3 // Principle use:
4 // Does comparison of two clusters
5 // For now, does comparison by relative separation in T and RxPhi space
6 // Option to compare by a relative number of bins|pixels, or by relative
7 // overall size of the clusters (using the largest clustersize).
8 //
9 
10 #include <string>
11 #include <array>
12 
13 #include <trackbase/TrkrDefs.h>
14 
15 class ActsGeometry;
16 class TrkrCluster;
17 class PHCompositeNode;
19 class TrackClusEvaluator;
20 
22  public:
24 
26 
27  int init(PHCompositeNode* topNode,
28  const std::string& name_truth_clusters="TRKR_TRUTHCLUSTERCONTAINER",
29  const std::string& name_reco_clusters="TRKR_CLUSTER");
30 
31  void set_tol_phi_MVTX (float _val);
32  void set_tol_phi_INTT (float _val);
33  void set_tol_phi_TPC (float _val);
34 
35  void set_tol_z_MVTX (float _val);
36  void set_tol_t_TPC (float _val);
37 
38  // options for if tolerance is multipled by width of one pixel|bin, or by total number of pixel|bin's
39  // in the larger of two clusters compared
40  bool single_pixel_phi_MVTX { false }; // default to pitch*max(N_pixels_M,N_pixels_T)*tol_MVTX
41  bool single_pixel_phi_INTT { false }; // ... same as for MVTX
42  bool single_bin_phi_TPC { true }; // default to pitch*tol_TPC
43 
44  bool single_pixel_z_MVTX { false }; // default to pitch*max(N_pixels_M,N_pixels_T)*tol_MVTX
45  bool single_pixel_z_INTT { false }; // ... same as for MVTX
46  bool single_bin_t_TPC { true }; // default to pitch*tol_TPC
47 
48  // For efficiency and convenience, hang on to minimal information about most recent comparison:
49  // --------------------------------------------------------------------------------------------
50  TrkrCluster* clus_T { nullptr }; // _T for truth cluster
51  TrkrCluster* clus_R { nullptr }; // _R for reco cluster
52  int layer {0};
53  int det_0123 {0};
54  bool is_match {false}; // also the return value of operator()
55  float dphi {0.};
56 
57  //multipliers for pixels and bins to cm and times
58  std::array<float, 56> pitch_phi {0.}; // the phistep squared
59  float pitch_z_MVTX {0.}; // pixel width for MVTX
60  float step_t_TPC {0.}; // time bin width for PTC
61 
62  std::array<float, 56> tol_pitch_phi {0.}; // pitched times tol_phi_{MVTX,INTT,TPC}
63  float tol_pitch_z_MVTX {0.}; // tol * pixel width for MVTX
64  float tol_step_t_TPC {0.}; // tol * time bin width for PTC
65 
66  // containers to get the clusters from
70 
71  /* public: */
72  /* TrkrClusterContainer* get_TruthClusters() { return m_TruthClusters; }; */
73  /* TrkrClusterContainer* get_RecoClusters () { return m_RecoClusters; }; */
74  /* ActsGeometry* get_ActsGeometry () { return m_ActsGeometry; }; */
75  /* private: */
76 
77  // tolerances for comparison in MVTX, INTT, TPC, and TPOT
78  float tol_phi_MVTX {0.5};
79  float tol_phi_INTT {0.5};
80  float tol_phi_TPC {1.0};
81 
82  float tol_z_MVTX {0.5};
83  float tol_t_TPC {1.0};
84 
85 };
86 
87 #endif