Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TrackingIterationCounter.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file TrackingIterationCounter.cc
2 
4 #include <trackbase/TrkrDefs.h>
5 
9 
11 #include <phool/PHCompositeNode.h>
12 #include <phool/PHDataNode.h>
13 #include <phool/PHNode.h>
14 #include <phool/PHNodeIterator.h>
15 #include <phool/PHObject.h>
16 #include <phool/PHTimer.h>
17 #include <phool/getClass.h>
18 #include <phool/phool.h>
19 //____________________________________________________________________________..
21  : SubsysReco(name)
22 {
23 }
24 
25 //____________________________________________________________________________..
27 {
28 }
29 
30 //____________________________________________________________________________..
32 {
34 }
35 
36 //____________________________________________________________________________..
38 {
39  int val = getNodes(topNode);
41  {
43  }
44 
45  val = createNodes(topNode);
46  return val;
47 }
48 
49 //____________________________________________________________________________..
51 {
52  for (const auto &[key, track] : *m_trackMap)
53  {
54  auto silseed = track->get_silicon_seed();
55  auto tpcseed = track->get_tpc_seed();
56  if(silseed)
57  {
59  }
60  if(tpcseed)
61  {
63  }
64  }
65 
67 }
68 
70 {
71  for (auto clusIter = seed->begin_cluster_keys();
72  clusIter != seed->end_cluster_keys();
73  ++clusIter)
74  {
75  TrkrDefs::cluskey key = *clusIter;
77  }
78 }
79 
80 //____________________________________________________________________________..
82 {
84 }
86 {
87  PHNodeIterator iter(topNode);
88 
89  PHCompositeNode *dstNode = dynamic_cast<PHCompositeNode *>(iter.findFirst("PHCompositeNode", "DST"));
90 
91  if (!dstNode)
92  {
93  std::cerr << "DST node is missing, quitting" << std::endl;
94  throw std::runtime_error("Failed to find DST node in PHActsTrkFitter::createNodes");
95  }
96 
97  PHNodeIterator dstIter(topNode);
98  PHCompositeNode *svtxNode = dynamic_cast<PHCompositeNode *>(dstIter.findFirst("PHCompositeNode", "SVTX"));
99 
100  if (!svtxNode)
101  {
102  svtxNode = new PHCompositeNode("SVTX");
103  dstNode->addNode(svtxNode);
104  }
105 
106  m_iterMap = findNode::getClass<TrkrClusterIterationMap>(topNode, "TrkrClusterIterationMap");
107  if (!m_iterMap)
108  {
110  auto node =
111  new PHIODataNode<PHObject>(m_iterMap, "TrkrClusterIterationMap", "PHObject");
112  svtxNode->addNode(node);
113  }
114 
116 }
118 {
119  m_trackMap = findNode::getClass<SvtxTrackMap>(topNode, "SvtxTrackMap");
120  if (!m_trackMap)
121  {
122  std::cout << PHWHERE << "No track map, bailing. " << std::endl;
124  }
125 
127 }