From adc45dd8cdb25f591cdf6f23b28d72a250afbecc Mon Sep 17 00:00:00 2001 From: Hangyi Wu Date: Thu, 20 Jun 2024 04:36:22 +0200 Subject: [PATCH 1/9] feat: add qmt test for UTTrackResidualMonitor pre-commit fixes patch generated by https://gitlab.cern.ch/lhcb/Moore/-/jobs/51252554 --- Hlt/RecoConf/options/UT_unbiased_residual.py | 54 +++++++++++++++++++ .../performance.qms/UT_unbiased_residual.qmt | 32 +++++++++++ 2 files changed, 86 insertions(+) create mode 100644 Hlt/RecoConf/options/UT_unbiased_residual.py create mode 100644 Hlt/RecoConf/tests/qmtest/performance.qms/UT_unbiased_residual.qmt diff --git a/Hlt/RecoConf/options/UT_unbiased_residual.py b/Hlt/RecoConf/options/UT_unbiased_residual.py new file mode 100644 index 00000000000..d7fa068f723 --- /dev/null +++ b/Hlt/RecoConf/options/UT_unbiased_residual.py @@ -0,0 +1,54 @@ +############################################################################### +# (c) Copyright 2022 CERN for the benefit of the LHCb Collaboration # +# # +# This software is distributed under the terms of the GNU General Public # +# Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". # +# # +# In applying this licence, CERN does not waive the privileges and immunities # +# granted to it by virtue of its status as an Intergovernmental Organization # +# or submit itself to any jurisdiction. # +############################################################################### + +from Moore import options +from PyConf.Algorithms import ( + PrKalmanFilter, + UTTrackResidualMonitor_PrKalman, + VeloRetinaClusterTrackingSIMD, +) +from RecoConf.config import Reconstruction, run_reconstruction +from RecoConf.hlt2_global_reco import make_light_reco_pr_kf +from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction +from RecoConf.legacy_rec_hlt1_tracking import ( + get_default_ut_clusters, + make_PatPV3DFuture_pvs, + make_PrStorePrUTHits_hits, + make_reco_pvs, + make_VeloClusterTrackingSIMD, +) + +options.histo_file = options.getProp("histo_file") or "hlt2_UT_unbiased_residual.root" + + +def ut_unbiased_residual(): + with ( + PrKalmanFilter.bind(FillFitResult=True), + make_VeloClusterTrackingSIMD.bind(algorithm=VeloRetinaClusterTrackingSIMD), + make_reco_pvs.bind(make_pvs_from_velo_tracks=make_PatPV3DFuture_pvs), + ): + reco = hlt2_reconstruction(make_reconstruction=make_light_reco_pr_kf) + + all_UT_pr_hits = make_PrStorePrUTHits_hits() + + monitorList = [] + mon_hit_on_track = UTTrackResidualMonitor_PrKalman( + name="UTTrackResidualMonitor_HitOnTrack", + TracksInContainer=reco["AllTrackHandles"]["BestLong"]["v1"], + UTHitsLocation=all_UT_pr_hits, + TrueUnbiased=False, # set to True will use hits which are not on track + FullDetail=True, + ) + monitorList.append(mon_hit_on_track) + return Reconstruction("ut_unbiased_residual", monitorList, []) + + +run_reconstruction(options, ut_unbiased_residual) diff --git a/Hlt/RecoConf/tests/qmtest/performance.qms/UT_unbiased_residual.qmt b/Hlt/RecoConf/tests/qmtest/performance.qms/UT_unbiased_residual.qmt new file mode 100644 index 00000000000..13633f49f85 --- /dev/null +++ b/Hlt/RecoConf/tests/qmtest/performance.qms/UT_unbiased_residual.qmt @@ -0,0 +1,32 @@ + + + +gaudirun.py +true +1200 + +$MOOREROOT/tests/options/default_input_and_conds_hlt2.py +$RECOCONFROOT/options/UT_unbiased_residual.py + +../refs/UT_unbiased_residual.ref +../refs/empty.ref + + +from Moore.qmtest.exclusions import ref_preprocessor +validateWithReference(preproc = ref_preprocessor) + +from Moore.qmtest.exclusions import remove_known_warnings +countErrorLines({"FATAL": 0, "ERROR": 0, "WARNING": 0}, + stdout=remove_known_warnings(stdout)) + + + -- GitLab From 573f18e13078b77ed875535a26cd893ef3dec0a8 Mon Sep 17 00:00:00 2001 From: Hangyi Wu Date: Wed, 19 Feb 2025 04:15:53 +0000 Subject: [PATCH 2/9] Apply 1 suggestion(s) to 1 file(s) Co-authored-by: Miroslav Saur --- .../tests/qmtest/performance.qms/UT_unbiased_residual.qmt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Hlt/RecoConf/tests/qmtest/performance.qms/UT_unbiased_residual.qmt b/Hlt/RecoConf/tests/qmtest/performance.qms/UT_unbiased_residual.qmt index 13633f49f85..b7d059bb86f 100644 --- a/Hlt/RecoConf/tests/qmtest/performance.qms/UT_unbiased_residual.qmt +++ b/Hlt/RecoConf/tests/qmtest/performance.qms/UT_unbiased_residual.qmt @@ -1,6 +1,6 @@