Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:18:16

0001 #include "TrackSeed_FastSim_v2.h"
0002 
0003 #include <iostream>
0004 #include <map>
0005 
0006 TrackSeed_FastSim_v2::TrackSeed_FastSim_v2(const TrackSeed& source)
0007 {
0008   TrackSeed_FastSim_v2::CopyFrom(source);
0009 }
0010 
0011 void TrackSeed_FastSim_v2::CopyFrom(const TrackSeed& source)
0012 {
0013   // do nothing if copying onto oneself
0014   if (this == &source)
0015   {
0016     return;
0017   }
0018 
0019   // parent class method
0020   TrackSeed_v2::CopyFrom(source);
0021 
0022   // additional members
0023   m_truth_track_id = source.get_truth_track_id();
0024   m_nmeas = source.get_num_measurements();
0025   m_g4hit_ids = source.g4hit_ids();
0026 }
0027 
0028 void TrackSeed_FastSim_v2::identify(std::ostream& os) const
0029 {
0030   TrackSeed_v2::identify(os);
0031 
0032   os << "TrackSeed_FastSim_v2 Object ";
0033   os << "m_truth_Track_id: " << m_truth_track_id << std::endl;
0034   os << "m_nmeas: " << m_nmeas << std::endl;
0035 
0036   os << "G4Hit IDs:" << std::endl;
0037   for (const auto& pair : m_g4hit_ids)
0038   {
0039     os << "\thit container ID" << pair.first << " with hits: ";
0040     for (const auto& hitid : pair.second)
0041     {
0042       os << hitid << " ";
0043     }
0044     os << std::endl;
0045   }
0046   return;
0047 }
0048