Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DSTTrackInfoReader.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file DSTTrackInfoReader.cc
1 
6 #include "DSTTrackInfoReader.h"
8 #include <g4main/PHG4Hit.h>
10 #include <g4main/PHG4Particle.h>
12 #include <intt/InttClusterizer.h>
14 #include <phool/PHCompositeNode.h>
15 #include <phool/PHNodeIterator.h>
16 #include <phool/getClass.h>
17 #include <trackbase/InttDefs.h>
18 #include <trackbase/MvtxDefs.h>
19 #include <trackbase/TpcDefs.h>
20 #include <trackbase/TrkrDefs.h>
25 #include <trackbase/TrkrHit.h>
26 #include <trackbase/TrkrHitSet.h>
35 
36 
37 #include <algorithm>
38 #include <bitset>
39 #include <cassert>
40 #include <iostream>
41 #include <numeric>
42 
43 //_____________________________________________________________________
44 
45 //_____________________________________________________________________
47  : SubsysReco(name)
48 {
49 }
50 
51 //_____________________________________________________________________
53 {
54  // make a clusterContainer node and a trackmap node
55  // assume writing macro removed them
56  // evalNode->addNode(newNode);
57 
58  // auto newNode = new PHIODataNode<PHObject>( new DSTContainerv3, "DSTContainer","PHObject");
59  // evalNode->addNode(newNode);
60 
61  // TrackInfo container
62  m_track_info_container = findNode::getClass<TrackInfoContainer_v1>(topNode, "TrackInfoContainer");
63 
64  // m_container = findNode::getClass<DSTContainer>(topNode, "DSTContainer");
65 
66  // svtxtrackmap constructer is protected
67  // auto svtxNode = dynamic_cast<PHCompositeNode*>(iter.findFirst("PHCompositeNode", "SVTX"));
68  // auto newNode = new PHIODataNode<PHObject>( new SvtxTrackMap, "SvtxTrackMap_2","PHObject");
69  // svtxNode->addNode(newNode);
70 
72 }
73 
74 //_____________________________________________________________________
76 {
77  // Init(topNode);
78  // load nodes
79  auto res = load_nodes(topNode);
80  // std::cout <<"This is before I fill cluster map" << std::endl;
81  // m_cluster_map->identify();
83  {
84  return res;
85  }
87 
89 
91 }
92 
93 //_____________________________________________________________________
95 {
96  // get necessary nodes
97  // m_track_map = findNode::getClass<SvtxTrackMap>(topNode, "SvtxTrackMap");
98 
99  m_track_info_container = findNode::getClass<TrackInfoContainer_v1>(topNode, "TrackInfoContainer");
100 
102 }
103 
105 {
106  if (Verbosity() > 1)
107  {
108  for (int iTrk = 0; iTrk < (int) m_track_info_container->size(); iTrk++)
109  {
110  std::cout << "size: " << m_track_info_container->size() << std::endl;
111  std::cout << "hitbitmap: " << (m_track_info_container->get_trackinfo(iTrk))->get_hitbitmap() << std::endl;
112  std::cout << "crossing: " << (m_track_info_container->get_trackinfo(iTrk))->get_crossing() << std::endl;
113  std::cout << "chi^2: " << (m_track_info_container->get_trackinfo(iTrk))->get_chisq() << std::endl;
114  std::cout << "NDF: " << unsigned((m_track_info_container->get_trackinfo(iTrk))->get_ndf()) << std::endl;
115  }
116  }
117 }