Skip to content

Commit

Permalink
Merge pull request #26470 from felicepantaleo/fixThreadSafeDensityMap
Browse files Browse the repository at this point in the history
[HGCal] Fix thread safety issue in layer clustering density map filling
  • Loading branch information
cmsbuild committed Apr 17, 2019
2 parents 88a88db + 75b42c3 commit 7f05de1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions RecoLocalCalo/HGCalRecProducers/plugins/HGCalCLUEAlgo.cc
Expand Up @@ -95,15 +95,15 @@ void HGCalCLUEAlgo::makeClusters() {
double maxdensity = calculateLocalDensity(points_[i], hit_kdtree,
actualLayer); // also stores rho (energy
// density) for each point (node)
//Now that we have the density per point we can store it
setDensity(points_[i]);
// calculate distance to nearest point with higher density storing
// distance (delta) and point's index
calculateDistanceToHigher(points_[i]);
findAndAssignClusters(points_[i], hit_kdtree, maxdensity, bounds, actualLayer,
layerClustersPerLayer_[i]);
});
});
//Now that we have the density per point we can store it
for(auto const& p: points_) { setDensity(p); }
}

std::vector<reco::BasicCluster> HGCalCLUEAlgo::getClusters(bool) {
Expand Down
4 changes: 2 additions & 2 deletions RecoLocalCalo/HGCalRecProducers/plugins/HGCalImagingAlgo.cc
Expand Up @@ -100,15 +100,15 @@ void HGCalImagingAlgo::makeClusters() {
double maxdensity = calculateLocalDensity(
points_[i], hit_kdtree, actualLayer); // also stores rho (energy
// density) for each point (node)
//Now that we have the density per point we can store it
setDensity(points_[i]);
// calculate distance to nearest point with higher density storing
// distance (delta) and point's index
calculateDistanceToHigher(points_[i]);
findAndAssignClusters(points_[i], hit_kdtree, maxdensity, bounds,
actualLayer, layerClustersPerLayer_[i]);
});
});
//Now that we have the density per point we can store it
for(auto const& p: points_) { setDensity(p); }
}

std::vector<reco::BasicCluster> HGCalImagingAlgo::getClusters(bool doSharing) {
Expand Down

0 comments on commit 7f05de1

Please sign in to comment.