EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHActsVertexFinder.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PHActsVertexFinder.h
1 #ifndef TRACKRECO_PHACTSVERTEXFINDER_H
2 #define TRACKRECO_PHACTSVERTEXFINDER_H
3 
4 #include "PHInitVertexing.h"
6 
7 #include <trackbase/TrkrDefs.h>
8 
11 
13 
14 class PHCompositeNode;
15 class SvtxTrack;
16 class SvtxTrackMap;
17 class SvtxVertexMap;
18 class SvtxVertex;
19 
20 namespace Acts
21 {
22  class TrackParameters;
23 }
24 
26 using VertexVector = std::vector<Acts::Vertex<Acts::BoundTrackParameters>>;
27 using TrackPtrVector = std::vector<const Acts::BoundTrackParameters*>;
28 using VertexMap = std::map<unsigned int,
30 
31 using KeyMap = std::map<const Acts::BoundTrackParameters*, const unsigned int>;
32 
38 {
39 
40  public:
41  PHActsVertexFinder(const std::string &name = "PHActsVertexFinder");
42 
43  ~PHActsVertexFinder() override {}
44 
45  void setMaxVertices(int maxVertices)
46  { m_maxVertices = maxVertices; }
47 
48  void setFieldMap(const std::string& fieldMap)
49  { m_fieldMap = fieldMap; }
50 
51  protected:
52  int Setup(PHCompositeNode *topNode) override;
53  int Process(PHCompositeNode *topNode) override;
54  int ResetEvent(PHCompositeNode *topNode) override;
55  int End(PHCompositeNode *topNode) override;
56 
57  private:
58 
59  int createNodes(PHCompositeNode *topNode);
60  int getNodes(PHCompositeNode *topNode);
61 
64 
67 
69  void fillVertexMap(VertexVector& vertices,
70  KeyMap& keyMap);
71 
72  void updateTrackDCA(const unsigned int trackKey,
73  const Acts::Vector3D vertex);
74 
76 
79 
80  int m_event = 0;
83  int m_maxVertices = 20;
84 
85  int m_goodFits = 0;
86  int m_totalFits = 0;
87  std::string m_fieldMap = "";
88 
93  std::map<const unsigned int, Trajectory> *m_trajectories = nullptr;
94 };
95 
96 #endif // TRACKRECO_PHACTSVERTEXFINDER_H