Skip to content

DCMathSegmentMaker - Supress warning in the angular difference check

In !44761 (merged), I optimized the parallelity check between the two elements by using the linearity of sin(x) for small x

        double diff_phi = roaddir2.phi() - gdir.phi();
        double diff_prec = linephi - segLocDir.angleYZ();
        if (std::abs(sin(diff_phi)) > 1.e-3 || std::abs(sin(diff_prec)) > 1.e-3) {

to

        const double diff_phi = xAOD::P4Helpers::deltaPhi(roaddir2.phi(), gdir.phi());
        const double diff_prec = xAOD::P4Helpers::deltaPhi(linephi, segLocDir.angleYZ());
        /// Use linearity of the sin at leading order
        if (std::abs(diff_phi) > 1.e-3 || std::abs(diff_prec) > 1.e-3) {

However, my approach misses the anti-colinear cases which then, in turn, fires the false WARNING

RAWtoALL 09:31:33 MuonSegmentMaker.MuonSegmentF...DCMathSegmentMaker WARNING  ALARM updated angles wrong: diff phi -3.14159  prec -0 phi rdir -1.88496 gdir 1.25664 lphi 1.57484 seg 1.57484

These cases are taken also into account in this MR to suppress the message.

Relates to ATLASRECTS-4875

Edited by Johannes Junggeburth

Merge request reports

Loading