Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 #include "PHTrackSetCopyMerging.h"
0002 
0003 #include <trackbase_historic/SvtxTrackMap.h>
0004 #include <trackbase_historic/SvtxTrackMap_v1.h>
0005 #include <globalvertex/SvtxVertexMap.h>
0006 #include <trackbase_historic/SvtxTrack.h>
0007 #include <trackbase/TrkrClusterContainer.h>
0008 
0009 #include <fun4all/Fun4AllReturnCodes.h>
0010 #include <fun4all/SubsysReco.h>                  // for SubsysReco
0011 
0012 #include <phool/PHCompositeNode.h>
0013 #include <phool/PHIODataNode.h>
0014 #include <phool/PHNode.h>                        // for PHNode
0015 #include <phool/PHNodeIterator.h>
0016 #include <phool/PHObject.h>                      // for PHObject
0017 #include <phool/getClass.h>
0018 #include <phool/phool.h>                         // for PHWHERE
0019 
0020 #include <iostream>                              // for operator<<, basic_os...
0021 
0022 using namespace std;
0023 
0024 PHTrackSetCopyMerging::PHTrackSetCopyMerging(const std::string& name)
0025   : PHTrackSetMerging(name)
0026 {
0027 }
0028 
0029 
0030 int PHTrackSetCopyMerging::Process(PHCompositeNode* /*topNode*/)
0031 {
0032 
0033   if (!_track_map_in1){
0034     cerr << PHWHERE << " ERROR: Can't find " << _track_map_name_in1  << endl;
0035     return Fun4AllReturnCodes::ABORTEVENT;
0036   }
0037   if (!_track_map_in2){
0038     cerr << PHWHERE << " ERROR: Can't find " << _track_map_name_in2  << endl;
0039     return Fun4AllReturnCodes::ABORTEVENT;
0040   }
0041   //copy track map 1 to output track map
0042   /*
0043   // make a list of tracks that did not make the keep list
0044   for(auto track_it = _track_map_in1->begin(); track_it != _track_map_in1->end(); ++track_it)
0045     {
0046       // auto id = track_it->first;
0047       SvtxTrack *_track = track_it->second;
0048 
0049       _track_map_out->insert(_track);
0050   */
0051   //copy track map 2 to output track map
0052   for(auto track_it = _track_map_in2->begin(); track_it != _track_map_in2->end(); ++track_it)
0053     {
0054       //auto id = track_it->first;
0055       SvtxTrack *_track = track_it->second;
0056 
0057       //      _track_map_out->insert(_track);
0058       _track_map_in1->insert(_track);
0059     }
0060 
0061   return Fun4AllReturnCodes::EVENT_OK;
0062 }
0063 /*
0064 int PHTrackSetCopyMerging::Setup(PHCompositeNode* topNode)
0065 {
0066   int ret = CreateNodes(topNode);
0067   if (ret != Fun4AllReturnCodes::EVENT_OK) return ret;
0068 
0069   ret = GetNodes(topNode);
0070   if (ret != Fun4AllReturnCodes::EVENT_OK) return ret;
0071 
0072   return Fun4AllReturnCodes::EVENT_OK;
0073 }
0074 
0075 int PHTrackSetMerging::End(PHCompositeNode* topNode)
0076 {
0077   return Fun4AllReturnCodes::EVENT_OK;
0078 }
0079 */