12 #include "../PHTpcTracker/externals/kdfinder.hpp"
13 #include "../PHTpcTracker/PHTpcTrackerUtil.h"
45 #include <Eigen/Dense>
54 #include <unordered_set>
62 #define LogDebug(exp) std::cout << "DEBUG: " << __FILE__ << ": " << __LINE__ << ": " << exp
64 #define LogDebug(exp) (void)0
67 #define LogError(exp) std::cout << "ERROR: " << __FILE__ << ": " << __LINE__ << ": " << exp
68 #define LogWarning(exp) std::cout << "WARNING: " << __FILE__ << ": " << __LINE__ << ": " << exp
72 typedef std::vector<TrkrDefs::cluskey>
keylist;
79 double search_radius1,
81 size_t min_track_size1,
82 double search_radius2,
84 size_t min_track_size2,
88 , _max_sin_phi(maxSinPhi)
90 , _search_radius1(search_radius1)
91 , _search_angle1(search_angle1)
92 , _min_track_size1(min_track_size1)
93 , _search_radius2(search_radius2)
94 , _search_angle2(search_angle2)
95 , _min_track_size2(min_track_size2)
111 map<double, int> radius_layer_map;
122 layeriter != layerrange.second; ++layeriter)
124 radius_layer_map.insert(
125 make_pair(layeriter->second->get_radius(),
126 layeriter->second->get_layer()));
133 laddergeos->get_begin_end();
136 layeriter != layerrange.second; ++layeriter)
138 radius_layer_map.insert(
139 make_pair(layeriter->second->get_radius(),
140 layeriter->second->get_layer()));
147 mapsladdergeos->get_begin_end();
150 layeriter != layerrange.second; ++layeriter)
152 radius_layer_map.insert(
153 make_pair(layeriter->second->get_radius(),
154 layeriter->second->get_layer()));
157 for (map<double, int>::iterator iter = radius_layer_map.begin();
158 iter != radius_layer_map.end(); ++iter)
174 for (; miter != begin_end.second; ++miter)
191 laddergeos->get_begin_end();
193 for (; miter != begin_end.second; ++miter)
209 mapsladdergeos->get_begin_end();
211 for (; miter != begin_end.second; ++miter)
261 vector<vector<double> > unused_hits;
262 vector<vector<vector<double> > > kdtracks;
266 kdtracks = kdfinder::find_tracks_iterative<double>(kdhits, unused_hits,
276 if(
Verbosity()>0) cout <<
"n_kdtracks: " << kdtracks.size() <<
"\n";
277 vector<keylist> clusterLists;
278 for(
auto track : kdtracks)
281 for(
auto kdhit :
track)
284 k.push_back(*((int64_t*)&kdhit[3]));
286 clusterLists.push_back(k);
288 for(
auto& clist : clusterLists)
296 if(
Verbosity()>1) cout <<
"final layer order:\n";
299 for(
auto clist : clusterLists)
307 vector<SvtxTrack_v2> seeds =
fitter->ALICEKalmanFilter(clusterLists,
false);
308 if(
Verbosity()>0) cout <<
"nseeds: " << seeds.size() <<
"\n";
315 for(
size_t i=0;i<seeds.size();i++)
323 if(
Verbosity()>0) cout <<
"Called Setup" << endl;
324 if(
Verbosity()>0) cout <<
"topNode:" << topNode << endl;
327 _vertex_map = findNode::getClass<SvtxVertexMap>(topNode,
"SvtxVertexMap");
330 cerr <<
PHWHERE <<
" ERROR: Can't find SvtxVertexMap." << endl;
334 auto surfmaps = findNode::getClass<ActsSurfaceMaps>(topNode,
"ActsSurfaceMaps");
337 std::cout <<
"No Acts surface maps, bailing." << std::endl;
341 auto tGeometry = findNode::getClass<ActsTrackingGeometry>(topNode,
"ActsTrackingGeometry");
344 std::cout <<
"No Acts tracking geometry, exiting." << std::endl;
356 if(
Verbosity()>0) cout <<
"Called End " << endl;