EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHMicromegasTpcTrackMatching.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PHMicromegasTpcTrackMatching.h
1 // Tell emacs that this is a C++ source
2 // -*- C++ -*-.
3 #ifndef PHMICROMEGASTPCTRACKMATCHING_H
4 #define PHMICROMEGASTPCTRACKMATCHING_H
5 
6 #include <fun4all/SubsysReco.h>
9 
10 #include <array>
11 #include <string>
12 #include <vector>
13 
16 class SvtxTrackMap;
17 class AssocInfoContainer;
18 class PHCompositeNode;
20 class SvtxTrack;
21 class TrkrCluster;
22 class TF1;
23 class TH1;
25 
27 {
28 
29  public:
30  PHMicromegasTpcTrackMatching(const std::string &name = "PHMicromegasTpcTrackMatching");
31  ~PHMicromegasTpcTrackMatching() override = default;
32 
33  void set_rphi_search_window_lyr1(const double win){_rphi_search_win[0] = win;}
34  void set_z_search_window_lyr1(const double win){_z_search_win[0] = win;}
35  void set_rphi_search_window_lyr2(const double win){_rphi_search_win[1] = win;}
36  void set_z_search_window_lyr2(const double win){_z_search_win[1] = win;}
37  void set_min_tpc_layer(const unsigned int layer){_min_tpc_layer = layer;}
38  void set_test_windows_printout(const bool test){_test_windows = test;}
39  void set_sc_calib_mode(const bool mode){_sc_calib_mode = mode;}
40  void set_collision_rate(const double rate){_collision_rate = rate;}
41  void SetIteration(int iter){_n_iteration = iter;}
42  void set_track_map_name(const std::string &map_name) { _track_map_name = map_name; }
43 
44  int InitRun(PHCompositeNode* topNode) override;
45  int process_event(PHCompositeNode*) override;
46  int End(PHCompositeNode*) override;
47 
48  private:
49 
51  int GetNodes(PHCompositeNode* topNode);
52 
54 
56  static constexpr unsigned int _n_mm_layers = 2;
57 
58  bool _use_truth_clusters = false;
61 
64 
66  std::array<double,_n_mm_layers> _rphi_search_win = {0.25, 13.0};
67 
69  std::array<double,_n_mm_layers> _z_search_win = {26.0, 0.25};
70 
71  // range of TPC layers to use in projection to micromegas
72  unsigned int _min_tpc_layer = 38;
73 
75 
76  unsigned int _min_mm_layer = 55;
77 
79  bool _sc_calib_mode = false;
80 
82  double _collision_rate = 50e3;
83 
85  double _reference_collision_rate = 50e3;
86 
88  int _event = -1;
89 
93  int _n_iteration = 0;
94  std::string _track_map_name = "SvtxTrackMap";
95 
98 
100  TF1 *fdrphi{nullptr};
101  double _par0 = -0.36619;
102  double _par1 = 0.00375714;
103 
105  bool _test_windows = false;
106 
107 };
108 
109 #endif // PHMICROMEGASTPCTRACKMATCHING_H