Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TrackSeed_FastSim_v1.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file TrackSeed_FastSim_v1.cc
1 #include "TrackSeed_FastSim_v1.h"
2 
3 #include <iostream>
4 #include <map>
5 
8 
10 {
11  // do nothing if copying onto oneself
12  if( this == &source ) return;
13 
14  // parent class method
15  TrackSeed_v1::CopyFrom( source );
16 
17  // additional members
19  m_nmeas = source.get_num_measurements();
20  m_g4hit_ids = source.g4hit_ids();
21 }
22 
23 void TrackSeed_FastSim_v1::identify(std::ostream& os) const
24 {
26 
27  os << "TrackSeed_FastSim_v1 Object ";
28  os << "m_truth_Track_id: " << m_truth_track_id << std::endl;
29  os << "m_nmeas: " << m_nmeas << std::endl;
30 
31  os << "G4Hit IDs:" << std::endl;
32  for( const auto& pair : m_g4hit_ids )
33  {
34  os << "\thit container ID" << pair.first << " with hits: ";
35  for( const auto& hitid : pair.second )
36  { os << hitid << " "; }
37  os << std::endl;
38  }
39  return;
40 }
42  ActsGeometry *tGeometry) const
43 {
44  const auto [x,y] = findRoot();
45  return std::atan2(-1* (TrackSeed_v1::get_X0()-x), (TrackSeed_v1::get_Y0()-y));
46 }