Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SvtxTrack_FastSim_v2.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file SvtxTrack_FastSim_v2.cc
1 /*
2  * SvtxTrack_FastSim_v2.C
3  *
4  * Created on: Jul 28, 2016
5  * Author: yuhw
6  */
7 
8 #include "SvtxTrack_FastSim_v2.h"
9 
10 #include "SvtxTrack.h" // for SvtxTrack::ConstClusterIter, SvtxTrack
11 
12 #include <map> // for _Rb_tree_const_iterator
13 #include <ostream> // for operator<<, basic_ostream, basic_ostream<>::_...
14 
16 { SvtxTrack_FastSim_v2::CopyFrom( source ); }
17 
19 {
20  // do nothing if copying onto oneself
21  if( this == &source ) return;
22 
23  // parent class method
24  SvtxTrack_v2::CopyFrom( source );
25 
26  // additional members
28  _nmeas = source.get_num_measurements();
29  _g4hit_ids = source.g4hit_ids();
30 }
31 
32 void SvtxTrack_FastSim_v2::identify(std::ostream& os) const
33 {
35 
36  os << "SvtxTrack_FastSim_v2 Object ";
37  os << "_truth_Track_id: " << _truth_track_id << std::endl;
38  os << "_nmeas: " << _nmeas << std::endl;
39 
40  os << "G4Hit IDs:" << std::endl;
41  for( const auto& pair:_g4hit_ids )
42  {
43  os << "\thit container ID" << pair.first << " with hits: ";
44  for( const auto& hitid:pair.second )
45  { os << hitid << " "; }
46  os << std::endl;
47  }
48  return;
49 }
50 
52 {
53  return 1;
54 }