From 0220a4930090cc2a0bfaaee18a7ea826f29c0003 Mon Sep 17 00:00:00 2001 From: mcoquet642 Date: Sat, 11 Jan 2025 09:30:39 +0100 Subject: [PATCH] Adding option to save multiple MFT-MUON matching candidates --- MC/bin/o2dpg_sim_config.py | 3 +++ MC/bin/o2dpg_sim_workflow.py | 1 + 2 files changed, 4 insertions(+) diff --git a/MC/bin/o2dpg_sim_config.py b/MC/bin/o2dpg_sim_config.py index d1a18f4fb..0a0a34b12 100755 --- a/MC/bin/o2dpg_sim_config.py +++ b/MC/bin/o2dpg_sim_config.py @@ -80,6 +80,9 @@ def add(cfg, flatconfig): add(config, {"FwdMatching.matchFcn" : "matchsXYPhiTanl"}) if args.fwdmatching_cut_4_param == True: add(config, {"FwdMatching.cutFcn" : "cut3SigmaXYAngles"}) + if int(args.fwdmatchingNcandidates) > 0: + add(config, {"FwdMatching.saveMode" : 3}) + add(config, {"FwdMatching.nCandidates" : int(args.fwdmatchingNcandidates)}) # deal with larger combinatorics if args.col == "PbPb" or (args.embedding and args.colBkg == "PbPb"): diff --git a/MC/bin/o2dpg_sim_workflow.py b/MC/bin/o2dpg_sim_workflow.py index 9f0011889..66cdf4ace 100755 --- a/MC/bin/o2dpg_sim_workflow.py +++ b/MC/bin/o2dpg_sim_workflow.py @@ -151,6 +151,7 @@ # Matching training for machine learning parser.add_argument('--fwdmatching-save-trainingdata', action='store_true', help='enables saving parameters at plane for matching training with machine learning') +parser.add_argument('--fwdmatchingNcandidates', type=int, help='enables saving provided number of matching candidates', default=0) args = parser.parse_args() print (args)