Commit fb17a500 authored by Lennart Huth's avatar Lennart Huth
Browse files

simplified kink calculation

parent 93414aff
......@@ -50,7 +50,6 @@ void Multiplet::calculateResiduals() {
void Multiplet::fit() {
// FIXME: Currently asking for direction of "". Should be the last detector plane -> Would enable using more generic
// tracks
m_positionAtScatterer = ((m_downstream->getIntercept(m_scattererPosition) -
(ROOT::Math::XYZPoint(0, 0, 0) - m_upstream->getIntercept(m_scattererPosition))) /
......@@ -58,11 +57,11 @@ void Multiplet::fit() {
m_offsetAtScatterer = m_downstream->getIntercept(m_scattererPosition) - m_upstream->getIntercept(m_scattererPosition);
// Calculate the angle
double slopeXup = m_upstream->getDirection("").X() / m_upstream->getDirection("").Z();
double slopeYup = m_upstream->getDirection("").Y() / m_upstream->getDirection("").Z();
double slopeXdown = m_downstream->getDirection("").X() / m_downstream->getDirection("").Z();
double slopeYdown = m_downstream->getDirection("").Y() / m_downstream->getDirection("").Z();
m_kinkAtScatterer = ROOT::Math::XYVector(slopeXdown - slopeXup, slopeYdown - slopeYup);
ROOT::Math::XYZVector slopeUp = m_upstream->getDirection(m_scattererPosition);
ROOT::Math::XYZVector slopeDown = m_upstream->getDirection(m_scattererPosition);
//
ROOT::Math::XYZVector kinks = (slopeUp /= slopeUp.z()) - (slopeDown /= slopeDown.z());
m_kinkAtScatterer = ROOT::Math::XYVector(kinks.x(), kinks.y());
this->calculateChi2();
this->calculateResiduals();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment