Skip to content

Commit 71a6a27

Browse files
authored
Fixed bug in scaling vector (#313)
1 parent f2ea3f5 commit 71a6a27

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

PWGJE/TableProducer/emcalCorrectionTask.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ struct EmcalCorrectionTask {
177177
auto pos = cluster.getGlobalPosition();
178178
pos = pos - math_utils::Point3D<float>{collision.posX(), collision.posY(), collision.posZ()};
179179
// Normalize the vector and rescale by energy.
180-
pos /= (cluster.E() / std::sqrt(pos.Mag2()));
180+
pos *= (cluster.E() / std::sqrt(pos.Mag2()));
181181

182182
// We have our necessary properties. Now we store outputs
183183
//LOG(debug) << "Cluster E: " << cluster.E();

0 commit comments

Comments
 (0)