diff --git a/PwaUtils/KinUtils.hh b/PwaUtils/KinUtils.hh index 86b991cba9d1aa88b77b89534aa88fe9c09e8484..6a2b70defeadda3d57725813ba25fb22cca0e0ad 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; } +