Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HGCal] Fix thread safety issue in layer clustering density map filling #26470

Merged
merged 4 commits into from Apr 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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