Detector::rotation() is broken
...and only works for orientation_mode = "xyz"
, because the returned vector is interpreted exactly as that in the alignment modules where it is used:
git grep "rotation()" src/ src/core/detector/Detector.hpp: XYZVector rotation() const { return alignment_->orientation(); };
src/modules/AlignmentDUTResidual/AlignmentDUTResidual.cpp: << Units::display(m_detector->rotation(), {"deg"});
src/modules/AlignmentDUTResidual/AlignmentDUTResidual.cpp: residualFitter->SetParameter(3, (name + "_rotationX").c_str(), m_detector->rotation().X(), 0.001, -6.30, 6.30);
src/modules/AlignmentDUTResidual/AlignmentDUTResidual.cpp: residualFitter->SetParameter(3, (name + "_rotationX").c_str(), m_detector->rotation().X(), 0, -6.30, 6.30);
src/modules/AlignmentDUTResidual/AlignmentDUTResidual.cpp: residualFitter->SetParameter(4, (name + "_rotationY").c_str(), m_detector->rotation().Y(), 0.001, -6.30, 6.30);
src/modules/AlignmentDUTResidual/AlignmentDUTResidual.cpp: residualFitter->SetParameter(4, (name + "_rotationY").c_str(), m_detector->rotation().Y(), 0, -6.30, 6.30);
src/modules/AlignmentDUTResidual/AlignmentDUTResidual.cpp: residualFitter->SetParameter(5, (name + "_rotationZ").c_str(), m_detector->rotation().Z(), 0.001, -6.30, 6.30);
src/modules/AlignmentDUTResidual/AlignmentDUTResidual.cpp: residualFitter->SetParameter(5, (name + "_rotationZ").c_str(), m_detector->rotation().Z(), 0, -6.30, 6.30);
Furthermore, histograms in global coordinates (such as AnalysisEfficiency/globalEfficiency) currently do not have rotations applied to the detector, so if rotated by 90deg in the testbeam, parts of the detector are cut off. Rotations should be applied to the Detector::getSize()
results to transform to global coordinates.