diff --git a/Hlt/RecoConf/python/RecoConf/hlt2_muonid.py b/Hlt/RecoConf/python/RecoConf/hlt2_muonid.py new file mode 100644 index 0000000000000000000000000000000000000000..38401ddf0703b6756383fc94651287da537cbdb6 --- /dev/null +++ b/Hlt/RecoConf/python/RecoConf/hlt2_muonid.py @@ -0,0 +1,21 @@ +############################################################################### +# (c) Copyright 2020 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 PyConf import configurable +from PyConf.Algorithms import MuonIDAlgHLT2 +from Configurables import MVATool +from .hlt1_muonid import make_muon_hits + + +@configurable +def make_muon_id_hlt2(tracks): + MVATool().RunTMVA = False + return MuonIDAlgHLT2( + TracksLocations=tracks, HitHandler=make_muon_hits()).MuonIDLocation diff --git a/Hlt/RecoConf/python/RecoConf/standalone.py b/Hlt/RecoConf/python/RecoConf/standalone.py index 14be61152ea041b0b639983f3c7a777d8b21fdf0..99b73468af98d87e6c785c1bd55f7836b5c3a142 100644 --- a/Hlt/RecoConf/python/RecoConf/standalone.py +++ b/Hlt/RecoConf/python/RecoConf/standalone.py @@ -17,6 +17,7 @@ from .hlt1_tracking import ( make_TrackEventFitter_fitted_tracks, make_hlt1_fitted_tracks) from RecoConf.hlt1_muonmatch import make_tracks_with_muonmatch_ipcut from .hlt1_muonid import make_muon_id, make_tracks_with_muon_id +from .hlt2_muonid import make_muon_id_hlt2 from .hlt2_tracking import make_hlt2_tracks, make_TrackBestTrackCreator_tracks from .calorimeter_reconstruction import (make_calo, make_calo_resolution_gamma, make_calo_resolution_pi0) @@ -170,6 +171,10 @@ def standalone_hlt2_reco(do_mc_checking=False, do_data_monitoring=False): do_mc_checking=do_mc_checking, do_data_monitoring=do_data_monitoring) + # Add MuID + muon_ids = make_muon_id_hlt2(hlt2_tracks["Best"]["v1"]) + data += [muon_ids] + # Add monitoring if do_data_monitoring: data += monitor_calo_clusters(calo) diff --git a/Hlt/RecoConf/tests/refs/hlt2_reco_brunelesque.ref b/Hlt/RecoConf/tests/refs/hlt2_reco_brunelesque.ref index 6ede08064e722307ee90184ec84c6f1986c0af9f..c00c116781c39ad225ab5d3fd1ccee6fc90202b4 100644 --- a/Hlt/RecoConf/tests/refs/hlt2_reco_brunelesque.ref +++ b/Hlt/RecoConf/tests/refs/hlt2_reco_brunelesque.ref @@ -211,6 +211,17 @@ FutureClusChi22ID SUCCESS Number of counters : 2 | Counter | # | sum | mean/eff^* | rms/err^* | min | max | | "#links in table" | 50 | 7911 | 158.22 | 61.316 | 52.000 | 296.00 | | "#total tracks" | 50 | 20187 | 403.74 | 141.37 | 147.00 | 771.00 | +MuonIDAlgHLT2 SUCCESS Number of counters : 9 + | Counter | # | sum | mean/eff^* | rms/err^* | min | max | + | "muonMVA2Stat" | 755 | -366.3258 | -0.48520 | 1.0953 | -3.0385 | 4.5001 | + | "nGoodOffline" | 5146 | + | "nInAcceptance" | 4438 | + | "nIsMuon" | 755 | + | "nIsMuonLoose" | 1259 | + | "nIsMuonTight" | 340 | + | "nMomentumCut" | 4590 | + | "nMuonPIDs" | 4438 | + | "nPreSelTrack" | 4257 | CaloFutureMergedPi0.EcalCovariance SUCCESS Number of counters : 1 | Counter | # | sum | mean/eff^* | rms/err^* | min | max | | "parameter updated" | 2 |