Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-12-17 09:20:45

0001 /*
0002  * SvtxTrack_FastSim_v1.C
0003  *
0004  *  Created on: Jul 28, 2016
0005  *      Author: yuhw
0006  */
0007 
0008 #include "SvtxTrack_FastSim_v1.h"
0009 
0010 #include "SvtxTrack.h"  // for SvtxTrack::ConstClusterIter, SvtxTrack
0011 
0012 #include <climits>
0013 #include <map>      // for _Rb_tree_const_iterator
0014 #include <ostream>  // for operator<<, basic_ostream, basic_ostream<>::_...
0015 
0016 SvtxTrack_FastSim_v1::SvtxTrack_FastSim_v1(const SvtxTrack& source)
0017 {
0018   SvtxTrack_FastSim_v1::CopyFrom(source);
0019 }
0020 
0021 void SvtxTrack_FastSim_v1::CopyFrom(const SvtxTrack& source)
0022 {
0023   // do nothing if copying onto oneself
0024   if (this == &source)
0025   {
0026     return;
0027   }
0028 
0029   // parent class method
0030   SvtxTrack_FastSim::CopyFrom(source);
0031 
0032   // additional members
0033   _g4hit_ids = source.g4hit_ids();
0034 }
0035 
0036 void SvtxTrack_FastSim_v1::identify(std::ostream& os) const
0037 {
0038   SvtxTrack_FastSim::identify(os);
0039 
0040   os << "SvtxTrack_FastSim_v1 Object ";
0041   os << "G4Hit IDs:" << std::endl;
0042   for (const auto& pair : _g4hit_ids)
0043   {
0044     os << "\thit container ID" << pair.first << " with hits: ";
0045     for (const auto& hitid : pair.second)
0046     {
0047       os << hitid << " ";
0048     }
0049     os << std::endl;
0050   }
0051   return;
0052 }
0053 
0054 int SvtxTrack_FastSim_v1::isValid() const
0055 {
0056   return 1;
0057 }