File indexing completed on 2026-10-15 08:25:53
0001 #include "DumpTpc_AssembledTrackContainer.h"
0002
0003 #include <phool/PHIODataNode.h>
0004
0005 #include <tpctrackreco/Tpc_AssembledTrack.h>
0006 #include <tpctrackreco/Tpc_AssembledTrackContainer.h>
0007
0008 #include <map>
0009 #include <ostream>
0010 #include <string>
0011 #include <utility>
0012
0013 using MyNode_t = PHIODataNode<Tpc_AssembledTrackContainer>;
0014
0015 DumpTpc_AssembledTrackContainer::DumpTpc_AssembledTrackContainer(const std::string &NodeName)
0016 : DumpObject(NodeName)
0017 {
0018 return;
0019 }
0020
0021 int DumpTpc_AssembledTrackContainer::process_Node(PHNode *myNode)
0022 {
0023 Tpc_AssembledTrackContainer *assembledtrack_container = nullptr;
0024 MyNode_t *thisNode = static_cast<MyNode_t *>(myNode);
0025 if (thisNode)
0026 {
0027 assembledtrack_container = thisNode->getData();
0028 }
0029 if (assembledtrack_container)
0030 {
0031 *fout << "size: " << assembledtrack_container->size() << std::endl;
0032 for (unsigned int i = 0; i < assembledtrack_container->size(); i++)
0033 {
0034 Tpc_AssembledTrack *track = assembledtrack_container->get_track(i);
0035 *fout << "get_event(" << i << "): " << track->get_event() << std::endl;
0036 *fout << "get_track_id(" << i << "): " << track->get_track_id() << std::endl;
0037 *fout << "get_side(" << i << "): " << track->get_side() << std::endl;
0038
0039
0040 *fout << "get_nsegments(" << i << "): " << track->get_nsegments() << std::endl;
0041 *fout << "get_nblobs(" << i << "): " << track->get_nblobs() << std::endl;
0042 *fout << "get_nrawhits(" << i << "): " << track->get_nrawhits() << std::endl;
0043 *fout << "get_first_layer(" << i << "): " << track->get_first_layer() << std::endl;
0044 *fout << "get_last_layer(" << i << "): " << track->get_last_layer() << std::endl;
0045 *fout << "get_first_sector(" << i << "): " << track->get_first_sector() << std::endl;
0046 *fout << "get_last_sector(" << i << "): " << track->get_last_sector() << std::endl;
0047 *fout << "get_first_region(" << i << "): " << track->get_first_region() << std::endl;
0048 *fout << "get_last_region(" << i << "): " << track->get_last_region() << std::endl;
0049
0050
0051
0052
0053 *fout << "get_phi_slope(" << i << "): " << track->get_phi_slope() << std::endl;
0054 *fout << "get_phi_intercept(" << i << "): " << track->get_phi_intercept() << std::endl;
0055 *fout << "get_tbin_slope(" << i << "): " << track->get_tbin_slope() << std::endl;
0056 *fout << "get_tbin_intercept(" << i << "): " << track->get_tbin_intercept() << std::endl;
0057 *fout << "get_chi2_phi(" << i << "): " << track->get_chi2_phi() << std::endl;
0058 *fout << "get_chi2_tbin(" << i << "): " << track->get_chi2_tbin() << std::endl;
0059 *fout << "get_ndof_phi(" << i << "): " << track->get_ndof_phi() << std::endl;
0060 *fout << "get_ndof_tbin(" << i << "): " << track->get_ndof_tbin() << std::endl;
0061 *fout << "get_vertex_valid(" << i << "): " << track->get_vertex_valid() << std::endl;
0062 *fout << "get_vertex_x(" << i << "): " << track->get_vertex_x() << std::endl;
0063 *fout << "get_vertex_y(" << i << "): " << track->get_vertex_y() << std::endl;
0064 *fout << "get_vertex_r(" << i << "): " << track->get_vertex_r() << std::endl;
0065 *fout << "get_vertex_phi(" << i << "): " << track->get_vertex_phi() << std::endl;
0066 *fout << "get_vertex_tbin(" << i << "): " << track->get_vertex_tbin() << std::endl;
0067 *fout << "get_vertex_npairs(" << i << "): " << track->get_vertex_npairs() << std::endl;
0068 *fout << "get_vertex_quality(" << i << "): " << track->get_vertex_quality() << std::endl;
0069 *fout << "get_seed_valid(" << i << "): " << track->get_seed_valid() << std::endl;
0070 *fout << "get_seed_x(" << i << "): " << track->get_seed_x() << std::endl;
0071 *fout << "get_seed_y(" << i << "): " << track->get_seed_y() << std::endl;
0072 *fout << "get_seed_z(" << i << "): " << track->get_seed_z() << std::endl;
0073 *fout << "get_seed_px(" << i << "): " << track->get_seed_px() << std::endl;
0074 *fout << "get_seed_py(" << i << "): " << track->get_seed_py() << std::endl;
0075 *fout << "get_seed_pz(" << i << "): " << track->get_seed_pz() << std::endl;
0076 for (unsigned int j = 0; j < 6; j++)
0077 {
0078 for (unsigned int k = 0; k < 6; k++)
0079 {
0080 *fout << "trk " << i << " get_seed_cov(" << j << "," << k << "): " << track->get_seed_cov(j, k) << std::endl;
0081 }
0082 }
0083 *fout << "size_source_tracks(" << i << "): " << track->size_source_tracks() << std::endl;
0084 for (unsigned int j = 0; j < track->size_source_tracks(); j++)
0085 {
0086 *fout << "get_source_track_id(" << i << "," << j << "): " << track->get_source_track_id(j) << std::endl;
0087 *fout << "get_source_region(" << i << "," << j << "): " << track->get_source_region(j) << std::endl;
0088 *fout << "get_source_sector(" << i << "," << j << "): " << track->get_source_sector(j) << std::endl;
0089 }
0090 *fout << "size_hit_indices(" << i << "): " << track->size_hit_indices() << std::endl;
0091 auto hitindices = track->get_hit_indices();
0092 for (auto iter : hitindices)
0093 {
0094 *fout << std::hex << "hitsetkey 0x" << iter.first << ", hitkey 0x" << iter.second << std::dec << std::endl;
0095 }
0096 }
0097 }
0098 return 0;
0099 }