Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHTrackSetCopyMerging.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PHTrackSetCopyMerging.cc
2 
8 
10 #include <fun4all/SubsysReco.h> // for SubsysReco
11 
12 #include <phool/PHCompositeNode.h>
13 #include <phool/PHIODataNode.h>
14 #include <phool/PHNode.h> // for PHNode
15 #include <phool/PHNodeIterator.h>
16 #include <phool/PHObject.h> // for PHObject
17 #include <phool/getClass.h>
18 #include <phool/phool.h> // for PHWHERE
19 
20 #include <iostream> // for operator<<, basic_os...
21 
22 using namespace std;
23 
25  : PHTrackSetMerging(name)
26 {
27 }
28 
29 
31 {
32 
33  if (!_track_map_in1){
34  cerr << PHWHERE << " ERROR: Can't find " << _track_map_name_in1 << endl;
36  }
37  if (!_track_map_in2){
38  cerr << PHWHERE << " ERROR: Can't find " << _track_map_name_in2 << endl;
40  }
41  //copy track map 1 to output track map
42  /*
43  // make a list of tracks that did not make the keep list
44  for(auto track_it = _track_map_in1->begin(); track_it != _track_map_in1->end(); ++track_it)
45  {
46  // auto id = track_it->first;
47  SvtxTrack *_track = track_it->second;
48 
49  _track_map_out->insert(_track);
50  */
51  //copy track map 2 to output track map
52  for(auto track_it = _track_map_in2->begin(); track_it != _track_map_in2->end(); ++track_it)
53  {
54  //auto id = track_it->first;
55  SvtxTrack *_track = track_it->second;
56 
57  // _track_map_out->insert(_track);
58  _track_map_in1->insert(_track);
59  }
60 
62 }
63 /*
64 int PHTrackSetCopyMerging::Setup(PHCompositeNode* topNode)
65 {
66  int ret = CreateNodes(topNode);
67  if (ret != Fun4AllReturnCodes::EVENT_OK) return ret;
68 
69  ret = GetNodes(topNode);
70  if (ret != Fun4AllReturnCodes::EVENT_OK) return ret;
71 
72  return Fun4AllReturnCodes::EVENT_OK;
73 }
74 
75 int PHTrackSetMerging::End(PHCompositeNode* topNode)
76 {
77  return Fun4AllReturnCodes::EVENT_OK;
78 }
79 */