|
32 | 32 | #include "ITStracking/Tracklet.h" |
33 | 33 | #include "ITStracking/Cluster.h" |
34 | 34 | #include "ITStracking/Cell.h" |
35 | | -#include "ITStracking/TrackFollower.h" |
36 | 35 | #include "ITStracking/TrackHelpers.h" |
| 36 | +#include "ITStracking/TrackFollower.h" |
37 | 37 | #include "DataFormatsITS/TrackITS.h" |
38 | 38 | #include "ITStrackingGPU/TrackingKernels.h" |
39 | 39 | #include "ITStrackingGPU/Utils.h" |
@@ -86,23 +86,6 @@ struct is_valid_pair { |
86 | 86 | } |
87 | 87 | }; |
88 | 88 |
|
89 | | -template <int NLayers> |
90 | | -struct seed_selector { |
91 | | - float mMaxQ2Pt; |
92 | | - float mMaxChi2; |
93 | | - int mMaxHoles; |
94 | | - int mMinTrackLength; |
95 | | - LayerMask mHoleLayerMask; |
96 | | - |
97 | | - GPUhd() seed_selector(float maxQ2Pt, float maxChi2, int maxHoles, int minTrackLength, LayerMask holeLayerMask) : mMaxQ2Pt(maxQ2Pt), mMaxChi2(maxChi2), mMaxHoles(maxHoles), mMinTrackLength(minTrackLength), mHoleLayerMask(holeLayerMask) {} |
98 | | - GPUhd() bool operator()(const TrackSeed<NLayers>& seed) const |
99 | | - { |
100 | | - return !(seed.getQ2Pt() > mMaxQ2Pt || seed.getChi2() > mMaxChi2) && |
101 | | - seed.getHitLayerMask().length() >= mMinTrackLength && |
102 | | - seed.getHitLayerMask().isAllowed(mMaxHoles, mHoleLayerMask); |
103 | | - } |
104 | | -}; |
105 | | - |
106 | 89 | struct compare_track_chi2 { |
107 | 90 | GPUhd() bool operator()(const TrackITSExt& a, const TrackITSExt& b) const |
108 | 91 | { |
@@ -975,8 +958,9 @@ void processNeighboursHandler(const int startLevel, |
975 | 958 | const float maxChi2ClusterAttachment, |
976 | 959 | const float maxChi2NDF, |
977 | 960 | const int maxHoles, |
978 | | - const int minTrackLength, |
| 961 | + const int minSeedingClusters, |
979 | 962 | const LayerMask holeLayerMask, |
| 963 | + const LayerMask nonSeedingLayerMask, |
980 | 964 | const std::vector<float>& layerxX0Host, |
981 | 965 | const o2::base::Propagator* propagator, |
982 | 966 | const o2::base::PropagatorF::MatCorrType matCorrType, |
@@ -1110,7 +1094,7 @@ void processNeighboursHandler(const int startLevel, |
1110 | 1094 | } |
1111 | 1095 | GPUChkErrS(cudaStreamSynchronize(gpu::Stream::DefaultStream)); |
1112 | 1096 | thrust::device_vector<TrackSeed<NLayers>, gpu::TypedAllocator<TrackSeed<NLayers>>> outSeeds(updatedCellSeed.size(), allocTrackSeed); |
1113 | | - auto end = thrust::copy_if(nosync_policy, updatedCellSeed.begin(), updatedCellSeed.end(), outSeeds.begin(), gpu::seed_selector<NLayers>(1.e3, maxChi2NDF * ((startLevel + 2) * 2 - 5), maxHoles, minTrackLength, holeLayerMask)); |
| 1097 | + auto end = thrust::copy_if(nosync_policy, updatedCellSeed.begin(), updatedCellSeed.end(), outSeeds.begin(), track::TrackSeedSelector<NLayers>{constants::MaxTrackSeedQ2Pt, maxChi2NDF, startLevel, maxHoles, minSeedingClusters, holeLayerMask, nonSeedingLayerMask}); |
1114 | 1098 | auto s{end - outSeeds.begin()}; |
1115 | 1099 | seedsHost.reserve(seedsHost.size() + s); |
1116 | 1100 | thrust::copy(outSeeds.begin(), outSeeds.begin() + s, std::back_inserter(seedsHost)); |
@@ -1380,8 +1364,9 @@ template void processNeighboursHandler<7>(const int startLevel, |
1380 | 1364 | const float maxChi2ClusterAttachment, |
1381 | 1365 | const float maxChi2NDF, |
1382 | 1366 | const int maxHoles, |
1383 | | - const int minTrackLength, |
| 1367 | + const int minSeedingClusters, |
1384 | 1368 | const LayerMask holeLayerMask, |
| 1369 | + const LayerMask nonSeedingLayerMask, |
1385 | 1370 | const std::vector<float>& layerxX0Host, |
1386 | 1371 | const o2::base::Propagator* propagator, |
1387 | 1372 | const o2::base::PropagatorF::MatCorrType matCorrType, |
@@ -1580,8 +1565,9 @@ template void processNeighboursHandler<11>(const int startLevel, |
1580 | 1565 | const float maxChi2ClusterAttachment, |
1581 | 1566 | const float maxChi2NDF, |
1582 | 1567 | const int maxHoles, |
1583 | | - const int minTrackLength, |
| 1568 | + const int minSeedingClusters, |
1584 | 1569 | const LayerMask holeLayerMask, |
| 1570 | + const LayerMask nonSeedingLayerMask, |
1585 | 1571 | const std::vector<float>& layerxX0Host, |
1586 | 1572 | const o2::base::Propagator* propagator, |
1587 | 1573 | const o2::base::PropagatorF::MatCorrType matCorrType, |
|
0 commit comments