File indexing completed on 2026-10-15 08:25:53
0001 #include "DumpTpcCrossingDecisionContainer.h"
0002
0003 #include <phool/PHIODataNode.h>
0004
0005 #include <tpctrackreco/TpcCrossingDecision.h>
0006 #include <tpctrackreco/TpcCrossingDecisionContainer.h>
0007
0008 #include <ostream>
0009 #include <string>
0010
0011 using MyNode_t = PHIODataNode<TpcCrossingDecisionContainer>;
0012
0013 DumpTpcCrossingDecisionContainer::DumpTpcCrossingDecisionContainer(const std::string &NodeName)
0014 : DumpObject(NodeName)
0015 {
0016 }
0017
0018 int DumpTpcCrossingDecisionContainer::process_Node(PHNode *myNode)
0019 {
0020 TpcCrossingDecisionContainer *container{nullptr};
0021 MyNode_t *thisNode = static_cast<MyNode_t *>(myNode);
0022 if (thisNode)
0023 {
0024 container = thisNode->getData();
0025 }
0026 if (container)
0027 {
0028 unsigned int is = container->size();
0029 *fout << "size: " << is << std::endl;
0030 for (unsigned int i = 0; i < is; i++)
0031 {
0032 TpcCrossingDecision *dec = container->get_decision(i);
0033 *fout << "get_assembled_track_id(" << i << "): " << dec->get_assembled_track_id() << std::endl;
0034 *fout << "get_selected_crossing(" << i << "): " << dec->get_selected_crossing() << std::endl;
0035 *fout << "get_silicon_vertex_id(" << i << "): " << dec->get_silicon_vertex_id() << std::endl;
0036 *fout << "get_tpc_z0(" << i << "): " << dec->get_tpc_z0() << std::endl;
0037 *fout << "get_silicon_vertex_z(" << i << "): " << dec->get_silicon_vertex_z() << std::endl;
0038 *fout << "get_delta_z(" << i << "): " << dec->get_delta_z() << std::endl;
0039 *fout << "get_best_abs_delta_z(" << i << "): " << dec->get_best_abs_delta_z() << std::endl;
0040 *fout << "get_second_best_abs_delta_z(" << i << "): " << dec->get_second_best_abs_delta_z() << std::endl;
0041 *fout << "get_selected_tier(" << i << "): " << dec->get_selected_tier() << std::endl;
0042 *fout << "get_selected_score(" << i << "): " << dec->get_selected_score() << std::endl;
0043 *fout << "get_number_of_available_crossings(" << i << "): " << dec->get_number_of_available_crossings() << std::endl;
0044 *fout << "get_number_of_allowed_crossings(" << i << "): " << dec->get_number_of_allowed_crossings() << std::endl;
0045 *fout << "get_number_of_tested_crossings(" << i << "): " << dec->get_number_of_tested_crossings() << std::endl;
0046 *fout << "get_number_of_tpc_valid_crossings(" << i << "): " << dec->get_number_of_tpc_valid_crossings() << std::endl;
0047 *fout << "get_number_of_vertex_compatible_crossings(" << i << "): " << dec->get_number_of_vertex_compatible_crossings() << std::endl;
0048 unsigned int n = dec->get_number_of_candidates();
0049 *fout << "get_number_of_candidates(" << i << "): " << n << std::endl;
0050 for (unsigned int j = 0; j < n; j++)
0051 {
0052 const TpcCrossingCandidate *cand = dec->get_candidate(j);
0053 *fout << "crossing( " << j << "): " << cand->crossing << std::endl;
0054 }
0055 *fout << "get_status(" << i << "): " << dec->get_status() << std::endl;
0056 }
0057 }
0058 return 0;
0059 }