Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHHybridSeeding.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PHHybridSeeding.h
1 #ifndef TRACKRECO_PHHYBRIDSEEDING_H
2 #define TRACKRECO_PHHYBRIDSEEDING_H
3 
10 //begin
11 
12 #include "PHTrackSeeding.h" // for PHTrackSeeding
13 #include "ALICEKF.h"
14 
15 #include <trackbase/TrkrDefs.h> // for cluskey
16 #include <trackbase/TrkrCluster.h>
18 
19 #include <Eigen/Core>
20 #include <Eigen/Dense>
21 
22 #include <cmath> // for M_PI
23 #include <map> // for map
24 #include <cstdint> // for uint64_t
25 #include <string> // for string
26 #include <utility> // for pair
27 #include <vector> // for vector
28 #include <memory>
29 
30 
31 class PHCompositeNode; // lines 196-196
32 class SvtxClusterMap; // lines 202-202
33 class SvtxHitMap; // lines 211-211
34 class SvtxTrackMap; // lines 204-204
35 class SvtxVertex;
36 class SvtxVertexMap; // lines 206-206
37 
38 //end
39 
41 {
42  public:
44  const std::string &name = "PHHybridSeeding",
45  double max_sin_phi = 1000.,
46  double fieldDir = 1,
47  double search_radius1 = 3.,
48  double search_angle1 = M_PI/8.,
49  size_t min_track_size1 = 10,
50  double search_radius2 = 6.,
51  double search_angle2 = M_PI/8.,
52  size_t min_track_size2 = 5,
53  size_t nthreads = 1
54  );
55 
56  ~PHHybridSeeding() override
57  {
58  }
59 
60  void set_field_dir(const double rescale)
61  {
62 
63  if(rescale > 0)
64  _fieldDir = -1;
65  else
66  {
67  _fieldDir = 1;
68  //_Bz = -1*_Bz;
69  }
70 
71  }
72  void setSearchRadius(double r1, double r2) {_search_radius1 = r1; _search_radius2 = r2;}
73  void setSearchAngle(double a1, double a2) {_search_angle1 = a1; _search_angle2 = a2;}
74  void setMinTrackSize(size_t n1, size_t n2) {_min_track_size1 = n1; _min_track_size2 = n2;}
75  void setNThreads(size_t n) {_nthreads = n;}
77 
78  protected:
79  int Setup(PHCompositeNode *topNode) override;
80  int Process(PHCompositeNode *topNode) override;
81  int InitializeGeometry(PHCompositeNode *topNode);
82  int End() override;
83 
84  private:
86 
87  // node pointers
88  //nodes to get norm vector
89 
90  std::vector<double> _radii_all;
91 
92  std::vector<double> _vertex_ids;
93  std::vector<double> _vertex_x;
94  std::vector<double> _vertex_y;
95  std::vector<double> _vertex_z;
96  std::vector<double> _vertex_xerr;
97  std::vector<double> _vertex_yerr;
98  std::vector<double> _vertex_zerr;
99 
100  std::map<int, unsigned int> _layer_ilayer_map_all;
101  std::map<int, unsigned int> _layer_ilayer_map;
102 
103  void publishSeeds(std::vector<SvtxTrack_v3> seeds);
104 
105  double _max_sin_phi;
106  double _fieldDir;
113  size_t _nthreads;
115  std::shared_ptr<ALICEKF> fitter;
116 };
117 
118 #endif