Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DumpSvtxTrackMap.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file DumpSvtxTrackMap.cc
1 #include "DumpSvtxTrackMap.h"
2 
3 #include <phool/PHIODataNode.h>
4 
8 
9 #include <map>
10 #include <ostream>
11 #include <string>
12 #include <utility>
13 
15 
17  : DumpObject(NodeName)
18 {
19  return;
20 }
21 
23 {
24  SvtxTrackMap *svtxtrackmap = nullptr;
25  MyNode_t *thisNode = static_cast<MyNode_t *>(myNode);
26  if (thisNode)
27  {
28  svtxtrackmap = thisNode->getData();
29  }
30  if (svtxtrackmap)
31  {
33  *fout << "size: " << svtxtrackmap->size() << std::endl;
34  for (hiter = svtxtrackmap->begin(); hiter != svtxtrackmap->end(); hiter++)
35  {
36  *fout << "id: 0x" << std::hex << hiter->second->get_id() << std::dec << std::endl;
37  *fout << "positive_charge: " << hiter->second->get_positive_charge() << std::endl;
38  *fout << "charge: " << hiter->second->get_charge() << std::endl;
39  *fout << "chisq: " << hiter->second->get_chisq() << std::endl;
40  *fout << "ndf: " << hiter->second->get_ndf() << std::endl;
41  *fout << "dca: " << hiter->second->get_dca() << std::endl;
42  *fout << "dca2d: " << hiter->second->get_dca2d() << std::endl;
43  *fout << "dca2d_error: " << hiter->second->get_dca2d_error() << std::endl;
44  *fout << "x: " << hiter->second->get_x() << std::endl;
45  *fout << "y: " << hiter->second->get_y() << std::endl;
46  *fout << "z: " << hiter->second->get_z() << std::endl;
47  *fout << "px: " << hiter->second->get_px() << std::endl;
48  *fout << "py: " << hiter->second->get_py() << std::endl;
49  *fout << "pz: " << hiter->second->get_pz() << std::endl;
50  for (SvtxTrack::ConstStateIter trkstates = hiter->second->begin_states();
51  trkstates != hiter->second->end_states();
52  ++trkstates)
53  {
54  *fout << "trackstate path length: " << trkstates->first << std::endl;
55  *fout << "trackstate name: " << trkstates->second->get_name() << std::endl;
56  *fout << "trackstate x: " << trkstates->second->get_x() << std::endl;
57  *fout << "trackstate y: " << trkstates->second->get_y() << std::endl;
58  *fout << "trackstate z: " << trkstates->second->get_z() << std::endl;
59  *fout << "trackstate px: " << trkstates->second->get_px() << std::endl;
60  *fout << "trackstate py: " << trkstates->second->get_py() << std::endl;
61  *fout << "trackstate pz: " << trkstates->second->get_pz() << std::endl;
62  for (int i = 0; i < 6; i++)
63  {
64  for (int j = 0; j < 6; j++)
65  {
66  *fout << "trkstate covar[" << i << ", " << j << "]: "
67  << trkstates->second->get_error(i, j) << std::endl;
68  }
69  }
70  }
71  }
72  }
73  return 0;
74 }