IAP GITLAB

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

COMBoost

parent 2bdfcc4f
No related branches found
No related tags found
1 merge request!59Resolve "implement ElasticModel"
Pipeline #216 passed
...@@ -22,10 +22,13 @@ COMBoost::COMBoost(HEPEnergyType eProjectile, COMBoost::MomentumVector const& pP ...@@ -22,10 +22,13 @@ COMBoost::COMBoost(HEPEnergyType eProjectile, COMBoost::MomentumVector const& pP
auto const a = (pProjectile / pProjNorm).GetComponents().eVector; auto const a = (pProjectile / pProjNorm).GetComponents().eVector;
if (a(0) == 0 && a(1) == 0) { if (a(0) == 0 && a(1) == 0) {
// if pProjectile ~ (0, 0, -1), the standard formula for the rotation matrix breaks if (a(2) < 0) {
// down but we can easily define a suitable rotation manually. We just need some SO(3) // if pProjectile ~ (0, 0, -1), the standard formula for the rotation matrix breaks
// matrix that reverses the z-axis and I like this one: // down but we can easily define a suitable rotation manually. We just need some
fRotation << 1, 0, 0, 0, -1, 0, 0, 0, -1; // SO(3) matrix that reverses the z-axis and I like this one:
fRotation << 1, 0, 0, 0, -1, 0, 0, 0, -1;
}
} else { } else {
Eigen::Vector3d const b{0, 0, 1}; Eigen::Vector3d const b{0, 0, 1};
auto const v = a.cross(b); 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