Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:17:56

0001 #include "DumpTrackSeedContainer.h"
0002 
0003 #include <phool/PHIODataNode.h>
0004 
0005 #include <trackbase_historic/TrackSeed.h>
0006 #include <trackbase_historic/TrackSeedContainer.h>
0007 #include <trackbase_historic/TrackSeedHelper.h>
0008 
0009 #include <map>
0010 #include <ostream>
0011 #include <string>
0012 #include <utility>
0013 
0014 using MyNode_t = PHIODataNode<TrackSeedContainer>;
0015 
0016 DumpTrackSeedContainer::DumpTrackSeedContainer(const std::string &NodeName)
0017   : DumpObject(NodeName)
0018 {
0019   return;
0020 }
0021 
0022 int DumpTrackSeedContainer::process_Node(PHNode *myNode)
0023 {
0024   TrackSeedContainer *trackseedcontainer = nullptr;
0025   MyNode_t *thisNode = static_cast<MyNode_t *>(myNode);  // NOLINT(cppcoreguidelines-pro-type-static-cast-downcast)
0026   if (thisNode)
0027   {
0028     trackseedcontainer = thisNode->getData();
0029   }
0030   if (trackseedcontainer)
0031   {
0032     TrackSeedContainer::ConstIter hiter;
0033     *fout << "size: " << trackseedcontainer->size() << std::endl;
0034     for (hiter = trackseedcontainer->begin(); hiter != trackseedcontainer->end(); ++hiter)
0035     {
0036       if (!*hiter)
0037       {
0038         continue;
0039       }
0040 
0041       const auto position = TrackSeedHelper::get_xyz(*hiter);
0042 
0043       *fout << "get_pz(): " << (*hiter)->get_pz() << std::endl;
0044       *fout << "get_x(): " << position.x() << std::endl;
0045       *fout << "get_y(): " << position.y() << std::endl;
0046       *fout << "get_z(): " << position.z() << std::endl;
0047       *fout << "get_qOverR(): " << (*hiter)->get_qOverR() << std::endl;
0048       *fout << "get_X0(): " << (*hiter)->get_X0() << std::endl;
0049       *fout << "get_Y0(): " << (*hiter)->get_Y0() << std::endl;
0050       *fout << "get_slope(): " << (*hiter)->get_slope() << std::endl;
0051       *fout << "get_Z0(): " << (*hiter)->get_Z0() << std::endl;
0052       *fout << "get_eta(): " << (*hiter)->get_eta() << std::endl;
0053       *fout << "get_theta(): " << (*hiter)->get_theta() << std::endl;
0054       *fout << "get_pt(): " << (*hiter)->get_pt() << std::endl;
0055       *fout << "get_p(): " << (*hiter)->get_p() << std::endl;
0056       *fout << "get_crossing(): " << (*hiter)->get_crossing() << std::endl;
0057       *fout << "size_cluster_keys(): " << (*hiter)->size_cluster_keys() << std::endl;
0058       for (TrackSeed::ConstClusterKeyIter citer = (*hiter)->begin_cluster_keys(); citer != (*hiter)->end_cluster_keys(); ++citer)
0059       {
0060         *fout << "keyid: " << *citer << std::endl;
0061       }
0062     }
0063   }
0064   return 0;
0065 }