From 4eb7668711f247f2d2ae8a9a9a552fa93f95a28f Mon Sep 17 00:00:00 2001
From: Javier Cervantes Villanueva <javier.cervantes.villanueva@cern.ch>
Date: Mon, 26 Mar 2018 15:09:14 +0200
Subject: [PATCH] Use magFromXYZ instead of radiusFromXYZ to calculate
 Pseudorapidity of a vector

---
 DDCore/include/DDSegmentation/SegmentationUtil.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/DDCore/include/DDSegmentation/SegmentationUtil.h b/DDCore/include/DDSegmentation/SegmentationUtil.h
index 8785ef4ce..665528b43 100644
--- a/DDCore/include/DDSegmentation/SegmentationUtil.h
+++ b/DDCore/include/DDSegmentation/SegmentationUtil.h
@@ -40,7 +40,7 @@ inline double radiusFromXYZ(const Vector3D& position) {
 
 /// Calculates cosine of the polar angle theat from Cartesian coodinates
 inline double cosThetaFromXYZ(const Vector3D& position) {
-	return position.Z / radiusFromXYZ(position);
+	return position.Z / magFromXYZ(position);
 }
 
 /// calculates the polar angle theta from Cartesian coordinates
-- 
GitLab