From 571340f7527dcde2a4b340ab826c3e03ff9ddc7c Mon Sep 17 00:00:00 2001
From: Marc Pelizaeus <marc@pc24.ep1.rub.de>
Date: Fri, 25 Jan 2013 13:50:37 +0100
Subject: [PATCH] Inverser transformation for helicity vector

---
 PwaUtils/KinUtils.hh | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/PwaUtils/KinUtils.hh b/PwaUtils/KinUtils.hh
index 86b991cb..6a2b70de 100644
--- a/PwaUtils/KinUtils.hh
+++ b/PwaUtils/KinUtils.hh
@@ -19,9 +19,37 @@ Vector4<T> helicityVec(const Vector4<T>& cm, const Vector4<T>& mother,
   
   result.Boost(mother_cm_rot);
 
+  return result;
+}  
+
+template<typename T>
+Vector4<T> helicityVecInverse(const Vector4<T>& cm, const Vector4<T>& mother, 
+		       const Vector4<T>& helicityVec) {
+  Vector4<T> mother_cm(mother);
+  mother_cm.Boost(cm);
+  
+  Vector4<T> mother_cm_rot(mother_cm);
+  mother_cm_rot.RotateZ(-mother_cm.Phi());
+  mother_cm_rot.RotateY(-mother_cm.Theta()); 
+
+  Vector4<T> result(helicityVec);
+  result.Boost(-1.* mother_cm_rot);
+  
+  result.RotateY(mother_cm.Theta()); 
+  result.RotateZ(mother_cm.Phi());
+
+  
+  result.Boost(-1.* cm);
+  
   return result;
 }
 
+
+
+
+
+
+
 template<typename T>
 T costDecHeli(const Vector4<T>& parent,const Vector4<T>& resonance,
 	      const Vector4<T>& daughter) {
@@ -36,3 +64,4 @@ T costDecHeli(const Vector4<T>& parent,const Vector4<T>& resonance,
 
   return cost;
 }
+
-- 
GitLab