Analysis Software
Documentation for sPHENIX simulation 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 
5 
7 #include <trackbase/TrkrHitSet.h>
9 #include <trackbase/TrkrDefs.h>
10 
12 #include <fun4all/SubsysReco.h> // for SubsysReco
13 
14 #include <phool/getClass.h>
15 #include <phool/phool.h> // for PHWHERE
16 
17 #include <iostream> // for operator<<, basic_ostream
18 
19 using namespace std;
20 
22  : SubsysReco(name)
23  , _cluster_map(nullptr)
24  , _hitsets(nullptr)
25  , _vertex_map(nullptr)
26  , _track_map(nullptr)
27  , _track_map_name("SvtxTrackMap")
28 {
29 }
30 
32 {
34 }
35 
37 {
38  return Setup(topNode);
39 }
40 
42 {
43  return Process();
44 }
45 
47 {
48  int ret = GetNodes(topNode);
49  if (ret != Fun4AllReturnCodes::EVENT_OK) return ret;
50 
52 }
53 
55 {
56  //---------------------------------
57  // Get Objects off of the Node Tree
58  //---------------------------------
59 
60  //_cluster_map = findNode::getClass<SvtxClusterMap>(topNode, "SvtxClusterMap");
61  _cluster_map = findNode::getClass<TrkrClusterContainer>(topNode, "TRKR_CLUSTER");
62  if (!_cluster_map)
63  {
64  cout << PHWHERE << " ERROR: Can't find node TRKR_CLUSTER" << endl;
66  }
67  _hitsets = findNode::getClass<TrkrHitSetContainer>(topNode, "TRKR_HITSET");
68  if(!_hitsets)
69  {
70  std::cout << PHWHERE << "No hitset container on node tree. Bailing."
71  << std::endl;
73  }
74 
75  _vertex_map = findNode::getClass<SvtxVertexMap>(topNode, "SvtxVertexMap");
76  if (!_vertex_map)
77  {
78  cout << PHWHERE << " ERROR: Can't find SvtxVertexMap." << endl;
80  }
81 
82  _track_map = findNode::getClass<SvtxTrackMap>(topNode, _track_map_name);
83  if (!_track_map)
84  {
85  cout << PHWHERE << " ERROR: Can't find SvtxTrackMap." << endl;
87  }
88 
90 }