From 9e19b2c5809680ce000fe9de4da5c2111d93e7a6 Mon Sep 17 00:00:00 2001
From: Alessandro Bertolin <alessandro.bertolin@pd.infn.it>
Date: Wed, 26 Jul 2023 10:49:05 +0200
Subject: [PATCH] B2OC: add a filter on Hlt2 topo. lines to all Spruce lines

---
 .../Hlt2Conf/lines/b_to_open_charm/spruce_b2oc.py      | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/b_to_open_charm/spruce_b2oc.py b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/b_to_open_charm/spruce_b2oc.py
index da3d685a785..d49d6a8098d 100644
--- a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/b_to_open_charm/spruce_b2oc.py
+++ b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/b_to_open_charm/spruce_b2oc.py
@@ -96,6 +96,11 @@ update_makers(line_makers, bbaryon_to_lightbaryon_dh)
 update_makers(line_makers, bbaryon_to_lightbaryon_dd)
 update_makers(line_makers, bbaryon_to_lightbaryon_ddh)
 
+###################################
+# List of Hlt2 lines to filter on #
+###################################
+topo_lines = ['Hlt2Topo2BodyDecision', 'Hlt2Topo3BodyDecision']
+
 ############################################
 # Define functions for line booking        #
 # Make it possible to register lines       #
@@ -118,6 +123,7 @@ def make_default_sprucing_lines(line_dict=sprucing_lines,
             return SpruceLine(
                 name=name,
                 prescale=prescale,
+                hlt2_filter_code=topo_lines,
                 algs=prefilters.b2oc_prefilters() + [line_alg])
 
 
@@ -136,6 +142,7 @@ def make_prescaled_sprucing_lines(line_dict=sprucing_lines,
             return SpruceLine(
                 name=name,
                 prescale=prescale,
+                hlt2_filter_code=topo_lines,
                 algs=prefilters.b2oc_prefilters() + [line_alg])
 
 
@@ -161,6 +168,7 @@ def make_flavor_tagging_sprucing_lines(line_dict=sprucing_lines,
             return SpruceLine(
                 name=name,
                 prescale=prescale,
+                hlt2_filter_code=topo_lines,
                 algs=prefilters.b2oc_prefilters() + [line_alg],
                 extra_outputs=[('LongTaggingParticles', longTaggingParticles)])
 
@@ -180,6 +188,7 @@ def make_isolation_sprucing_lines(line_dict=sprucing_lines,
             return SpruceLine(
                 name=name,
                 prescale=prescale,
+                hlt2_filter_code=topo_lines,
                 algs=prefilters.b2oc_prefilters() + [line_alg])
 
 
@@ -199,6 +208,7 @@ def make_mva_filtered_sprucing_lines(line_dict=sprucing_lines,
             return SpruceLine(
                 name=name,
                 prescale=prescale,
+                hlt2_filter_code=topo_lines,
                 algs=prefilters.b2oc_prefilters() + [line_alg])
 
 
-- 
GitLab