14 #include <log4cpp/CategoryStream.hh>
21 return (
int(var * 100.0) / 100.0);
26 , mTripletAngle1(
M_PI / 8)
29 , mTripletAngle2(
M_PI / 8)
32 , mRemoveLoopers(
false)
33 , mMinLooperRadius(10.0)
34 , mMaxLooperRadius(70.0)
40 LOG_WARN_IF(
"tracking.PHTpcSeedFnder.findSeeds", !cluster_map) << __FILE__ <<
"," << __LINE__ <<
" Can't find node TRKR_CLUSTER";
41 std::vector<kdfinder::TrackCandidate<double>*> result;
46 LOG_WARN_IF(
"tracking.PHTpcSeedFnder.findSeeds", !hitsets) << __FILE__ <<
"," << __LINE__ <<
" Can't find node TRKR_HITSET";
54 LOG_DEBUG(
"tracking.PHTpcSeedFinder.findSeeds") <<
"imported " << kdhits.size() <<
" clusters";
57 std::vector<std::vector<double> > unused_hits;
58 std::vector<std::vector<std::vector<double> > > kdtracks;
60 kdtracks = kdfinder::find_tracks_iterative<double>(kdhits, unused_hits,
66 LOG_DEBUG(
"tracking.PHTpcSeedFinder.findSeeds") <<
"kdtracks: " << kdtracks.size();
69 result = kdfinder::get_track_candidates<double>(kdtracks,
B);
70 LOG_DEBUG(
"tracking.PHTpcSeedFinder.findSeeds") <<
"initial kdtrack candidates: " << result.size();
73 for (
auto it = result.begin();
it != result.end();)
75 if (!(*it)->isFitted() || (*it)->Pt() < 0.025 || (*it)->Pt() > 200.0)
79 it = result.erase(
it);
86 LOG_DEBUG(
"tracking.PHTpcSeedFinder.findSeeds") <<
"kdtrack candidates after filtering: " << result.size();
91 for (
auto it = result.begin();
it != result.end();)
94 double x = c->
a,
y = c->
b,
r = c->
r, xyr = std::sqrt(x * x +
y *
y);
99 it = result.erase(
it);