Commit 31238dd3 authored by Simon Spannagel's avatar Simon Spannagel
Browse files

AnalysisDUT: calculate residual in local coordinates

This fixes #155
parent 2db58de7
Pipeline #3288439 passed with stages
in 15 minutes and 10 seconds
......@@ -722,10 +722,11 @@ StatusCode AnalysisDUT::run(const std::shared_ptr<Clipboard>& clipboard) {
has_associated_cluster = true;
hTrackZPosDUT->Fill(track->getState(m_detector->getName()).z());
// Check distance between track and cluster
ROOT::Math::XYZPoint intercept = track->getIntercept(assoc_cluster->global().z());
double xdistance = intercept.X() - assoc_cluster->global().x();
double ydistance = intercept.Y() - assoc_cluster->global().y();
// Check distance between track and cluster in local coordinates
ROOT::Math::XYZPoint intercept = m_detector->getLocalIntercept(track.get());
double xdistance = intercept.X() - assoc_cluster->local().x();
double ydistance = intercept.Y() - assoc_cluster->local().y();
double xdistance_um = xdistance * 1000.;
double ydistance_um = ydistance * 1000.;
......
Markdown is supported
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