ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHTrackFitting.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PHTrackFitting.cc
1 #include "PHTrackFitting.h"
2 
3 #include "AssocInfoContainer.h"
4 
7 
9 #include <trackbase/TrkrHitSet.h>
11 #include <trackbase/TrkrDefs.h>
12 
14 #include <fun4all/SubsysReco.h> // for SubsysReco
15 
16 #include <phool/getClass.h>
17 #include <phool/phool.h> // for PHWHERE
18 
19 #include <iostream> // for operator<<, basic_ostream
20 
21 using namespace std;
22 
24  : SubsysReco(name)
25  , _cluster_map(nullptr)
26  , _hitsets(nullptr)
27  , _vertex_map(nullptr)
28  , _track_map(nullptr)
29  , _assoc_container(nullptr)
30  , _track_map_name("SvtxTrackMap")
31 {
32 }
33 
35 {
37 }
38 
40 {
41  return Setup(topNode);
42 }
43 
45 {
46  return Process();
47 }
48 
50 {
51  int ret = GetNodes(topNode);
52  if (ret != Fun4AllReturnCodes::EVENT_OK) return ret;
53 
55 }
56 
58 {
59  //---------------------------------
60  // Get Objects off of the Node Tree
61  //---------------------------------
62 
63  //_cluster_map = findNode::getClass<SvtxClusterMap>(topNode, "SvtxClusterMap");
64  _cluster_map = findNode::getClass<TrkrClusterContainer>(topNode, "TRKR_CLUSTER");
65  if (!_cluster_map)
66  {
67  cout << PHWHERE << " ERROR: Can't find node TRKR_CLUSTER" << endl;
69  }
70  _hitsets = findNode::getClass<TrkrHitSetContainer>(topNode, "TRKR_HITSET");
71  if(!_hitsets)
72  {
73  std::cout << PHWHERE << "No hitset container on node tree. Bailing."
74  << std::endl;
76  }
77 
78  _vertex_map = findNode::getClass<SvtxVertexMap>(topNode, "SvtxVertexMap");
79  if (!_vertex_map)
80  {
81  cout << PHWHERE << " ERROR: Can't find SvtxVertexMap." << endl;
83  }
84 
85  _track_map = findNode::getClass<SvtxTrackMap>(topNode, _track_map_name);
86  if (!_track_map)
87  {
88  cout << PHWHERE << " ERROR: Can't find SvtxTrackMap." << endl;
90  }
91 
92  _assoc_container = findNode::getClass<AssocInfoContainer>(topNode, "AssocInfoContainer");
93  if (!_assoc_container)
94  {
95  cout << PHWHERE << " ERROR: Can't find AssocInfoContainer." << endl;
97  }
98 
100 }