IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 1bd50092 authored by Maximilian Reininghaus's avatar Maximilian Reininghaus :vulcan:
Browse files

COMBoost

parent 522e37cc
No related branches found
No related tags found
1 merge request!59Resolve "implement ElasticModel"
......@@ -26,10 +26,13 @@ COMBoost<FourVector>::COMBoost(const FourVector& Pprojectile, const HEPMassType
auto const a = (pProjectile / pProjNorm).GetComponents().eVector;
if (a(0) == 0 && a(1) == 0) {
// if pProjectile ~ (0, 0, -1), the standard formula for the rotation matrix breaks
// down but we can easily define a suitable rotation manually. We just need some SO(3)
// matrix that reverses the z-axis and I like this one:
fRotation << 1, 0, 0, 0, -1, 0, 0, 0, -1;
if (a(2) < 0) {
// if pProjectile ~ (0, 0, -1), the standard formula for the rotation matrix breaks
// down but we can easily define a suitable rotation manually. We just need some
// SO(3) matrix that reverses the z-axis and I like this one:
fRotation << 1, 0, 0, 0, -1, 0, 0, 0, -1;
}
} else {
Eigen::Vector3d const b{0, 0, 1};
auto const v = a.cross(b);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment