From 9ac038739dc60d4319df6aad6ecdc873684ea5d6 Mon Sep 17 00:00:00 2001
From: Serena Maccolini <serena.maccolini@cern.ch>
Date: Mon, 15 Jul 2024 16:51:28 +0200
Subject: [PATCH 01/51] new AP on MC Hlt1noUT + HLT2withUT

---
 BnoC_3body_Lines_2024/README.md               |  26 --
 BnoC_3body_Lines_2024/bnoc_utils.py           | 269 ------------------
 BnoC_3body_Lines_2024/decay_factory.py        | 237 ---------------
 BnoC_3body_Lines_2024/info.yaml               |  36 ---
 BnoC_3body_Lines_2024/threebodylines.py       |  76 -----
 BnoC_3body_Lines_2024/tuple_maker.py          | 102 -------
 Charm_2024validation/info.yaml                | 123 ++++++--
 .../{info_MC.yaml => info_MC_noUT.yaml}       |   0
 Charm_2024validation/info_data.yaml           |   7 +-
 .../{#info.yaml# => info_data_noUT.yaml}      |   1 -
 Charm_2024validation/main_d_to_hhh.py         |  13 +
 Charm_2024validation/options/d_to_hhh.py      | 202 +++++++++++++
 Charm_2024validation/options/d_to_hhh_MC.py   |  28 ++
 Charm_2024validation/options/dst_to_dee.py    |   1 -
 .../options/hlt2/dst_to_dee.py                |   9 +
 Charm_2024validation/options/hlt2/hlt2.py     |   6 +-
 .../options/hlt2/hlt2_d0_to_hh.py             |   6 +-
 .../options/hlt2/hlt2_d0_to_hhhh.py           |   7 +-
 .../options/hlt2/hlt2_d0_to_hhpi0.py          |   7 +-
 .../options/hlt2/hlt2_d0_to_kshh.py           |   7 +-
 .../options/hlt2/hlt2_d0_to_ksks.py           |   7 +-
 .../options/hlt2/hlt2_d_to_hhh.py             |   7 +-
 .../options/hlt2/hlt2_d_to_ksh.py             |   7 +-
 .../options/hlt2/hlt2_dst_to_dee.py           |  41 +++
 .../options/hlt2/hlt2_rare_charm.py           |   7 +-
 Charm_2024validation/options/hlt2/hlt2noUT.py |  32 +++
 .../options/hlt2/make_hlt2_decay.sh           |   1 +
 Charm_2024validation/options/tupling.py       |  67 +++++
 Charm_2024validation/tmp.yaml                 |  12 +
 29 files changed, 533 insertions(+), 811 deletions(-)
 delete mode 100644 BnoC_3body_Lines_2024/README.md
 delete mode 100644 BnoC_3body_Lines_2024/bnoc_utils.py
 delete mode 100644 BnoC_3body_Lines_2024/decay_factory.py
 delete mode 100644 BnoC_3body_Lines_2024/info.yaml
 delete mode 100644 BnoC_3body_Lines_2024/threebodylines.py
 delete mode 100644 BnoC_3body_Lines_2024/tuple_maker.py
 rename Charm_2024validation/{info_MC.yaml => info_MC_noUT.yaml} (100%)
 rename Charm_2024validation/{#info.yaml# => info_data_noUT.yaml} (98%)
 create mode 100644 Charm_2024validation/options/hlt2/dst_to_dee.py
 create mode 100644 Charm_2024validation/options/hlt2/hlt2_dst_to_dee.py
 create mode 100644 Charm_2024validation/options/hlt2/hlt2noUT.py
 create mode 100644 Charm_2024validation/tmp.yaml

diff --git a/BnoC_3body_Lines_2024/README.md b/BnoC_3body_Lines_2024/README.md
deleted file mode 100644
index 2b726f18eb..0000000000
--- a/BnoC_3body_Lines_2024/README.md
+++ /dev/null
@@ -1,26 +0,0 @@
-# Information
-
-## Version 3 for UT included in MagDown
-
-This analysis production is to process BnoC HLT2 lines for the following decay families:
-* $B^0_{d,s} \rightarrow K^0_S h^+ h^-$
-* $\Lambda^0_b \rightarrow K^0_S p^+ h^-$
-* $\Lambda^0_b \rightarrow \Lambda^0 h^+ h^-$
-* $\Xi^-_b \rightarrow p^+ h^- h^-$
-
-The full list of lines in this production is:
-* $B^0_{d,s} \rightarrow K^0_S \pi^+ \pi^-$, with the $K^0_S$ being reconstructed from Long tracks
-* $B^0_{d,s} \rightarrow K^0_S K^\pm \pi^\mp$, with the $K^0_S$ being reconstructed from Long tracks
-* $B^0_{d,s} \rightarrow K^0_S K^+ K^-$, with the $K^0_S$ being reconstructed from Long tracks
-* $\Lambda^0_b \rightarrow K^0_S p^+ \pi^-$, with the $K^0_S$ being reconstructed from Long tracks
-* $\Lambda^0_b \rightarrow K^0_S p^+ K^-$, with the $K^0_S$ being reconstructed from Long tracks
-* $\Lambda^0_b \rightarrow \Lambda^0 K^+ K^-$, with the $\Lambda^0$ being reconstructed from Long tracks
-* $\Lambda^0_b \rightarrow \Lambda^0 K^+ \pi^-$, with the $\Lambda^0$ being reconstructed from Long tracks
-* $\Lambda^0_b \rightarrow \Lambda^0 K^- \pi^+$, with the $\Lambda^0$ being reconstructed from Long tracks
-* $\Lambda^0_b \rightarrow \Lambda^0 \pi^+ \pi^-$, with the $\Lambda^0$ being reconstructed from Long tracks
-* $\Xi^-_b \rightarrow p^+ K^- K^-$
-* $\Xi^-_b \rightarrow p^+ K^- \pi^-$
-* $\Xi^-_b \rightarrow p^+ \pi^- \pi^-$
-
-The code is an update of the BnoC Collision23 production found [here](https://gitlab.cern.ch/lhcb-datapkg/AnalysisProductions/-/tree/v0r0p6702223/BnoC_Run3_3body_Lines_Check).
-
diff --git a/BnoC_3body_Lines_2024/bnoc_utils.py b/BnoC_3body_Lines_2024/bnoc_utils.py
deleted file mode 100644
index 119ca25271..0000000000
--- a/BnoC_3body_Lines_2024/bnoc_utils.py
+++ /dev/null
@@ -1,269 +0,0 @@
-from FunTuple import FunctorCollection, FunTuple_Particles as FunTuple
-import FunTuple.functorcollections as FC
-import Functors as F
-from PyConf.reading import get_pvs
-from RecoConf.event_filters import require_pvs
-
-def particle_line_name( particle_symbol ):
-    particles = {
-            'p+' : 'Pp',
-            'p-' : 'Pm',
-            'K+' : 'Kp',
-            'K-' : 'Km',
-            'pi+' : 'Pip',
-            'pi-' : 'Pim',
-            }
-    return particles[ particle_symbol ]
-
-def make_require_pvs():
-    pvs = get_pvs()
-    return require_pvs(pvs)
-
-Hlt1_decisions = [
-    # main hadronic triggers for TOS
-    "Hlt1TrackMVA",
-    "Hlt1TwoTrackMVA",
-    "Hlt1TwoTrackMVACharmXSec",
-    "Hlt1TwoTrackKs",
-    "Hlt1KsToPiPi",
-    "Hlt1GECPassthrough"
-    # additional triggers for checking TIS signal
-    "Hlt1D2KK",
-    "Hlt1D2KPi",
-    "Hlt1D2PiPi",
-    "Hlt1DiMuonHighMass",
-    "Hlt1DiMuonLowMass",
-    "Hlt1DiMuonSoft",
-    "Hlt1LowPtMuon",
-    "Hlt1LowPtDiMuon",
-    "Hlt1SingleHighPtMuon",
-    "Hlt1TrackMuonMVA",
-]
-
-def make_tistos_hlt1(input_data):
-    return FC.HltTisTos(
-        selection_type="Hlt1",
-        trigger_lines=[
-            f"{x}Decision" for x in Hlt1_decisions if "GECPassthrough" not in x
-        ],
-        data=input_data,
-    )
-
-def make_composite_variables(input_data, doca_indices = []):
-    pvs = get_pvs()
-
-    variables = FunctorCollection(
-        {
-            # PDG ID and charge
-            "ID": F.PARTICLE_ID,
-            "Q": F.CHARGE,
-            # angles
-            "ETA": F.ETA,
-            "PHI": F.PHI,
-            # vtx chisq
-            "VTXCHI2NDOF": F.CHI2DOF,
-            # endvertex position
-            "END_VX": F.END_VX,
-            "END_VY": F.END_VY,
-            "END_VZ": F.END_VZ,
-            # best PV position
-            "OWNPV_X": F.OWNPVX,
-            "OWNPV_Y": F.OWNPVY,
-            "OWNPV_Z": F.OWNPVZ,
-            # quantities wrt best PV: DIRA, FD (chisq), IP (chisq), lifetime
-            "OWNPV_DIRA": F.OWNPVDIRA,
-            "OWNPV_FDCHI2": F.OWNPVFDCHI2,
-            "OWNPV_FD": F.OWNPVFD,
-            "OWNPV_VDRHO": F.OWNPVVDRHO,
-            "OWNPV_VDZ": F.OWNPVVDZ,
-            "OWNPV_IPCHI2": F.OWNPVIPCHI2,
-            "OWNPV_IP": F.OWNPVIP,
-            "OWNPV_LTIME": F.OWNPVLTIME,
-            "OWNPV_DLS": F.OWNPVDLS,
-            # max, min and sum of child quantities: PT, P, IP chisq
-            "MAX_PT": F.MAX(F.PT),
-            "MIN_PT": F.MIN(F.PT),
-            "SUM_PT": F.SUM(F.PT),
-            "MAX_P": F.MAX(F.P),
-            "MIN_P": F.MIN(F.P),
-            "SUM_P": F.SUM(F.P),
-            "MAX_OWNPVIPCHI2": F.MAX(F.OWNPVIPCHI2),
-            "MIN_OWNPVIPCHI2": F.MIN(F.OWNPVIPCHI2),
-            "SUM_OWNPVIPCHI2": F.SUM(F.OWNPVIPCHI2),
-            # DOCA of children
-            "MAXDOCACHI2": F.MAXDOCACHI2,
-            "MAXDOCA": F.MAXDOCA,
-            "MAXSDOCACHI2": F.MAXSDOCACHI2,
-            "MAXSDOCA": F.MAXSDOCA,
-            # Corrected masses of composites
-            "OWNPV_CORRM": F.OWNPVCORRM,
-            "OWNPV_CORRMERR": F.OWNPVCORRMERR,
-        }
-    )
-
-    # add DOCA and DOCA chisq variables for specified pairs of children
-    doca_vars = {}
-    docachi2_vars = {}
-    for indexpair in doca_indices :
-        doca_vars    [ f"DOCA{indexpair[0]}{indexpair[1]}"      ] = F.DOCA(indexpair[0],indexpair[1])
-        doca_vars    [ f"SDOCA{indexpair[0]}{indexpair[1]}"     ] = F.SDOCA(indexpair[0],indexpair[1])
-        docachi2_vars[ f"DOCA{indexpair[0]}{indexpair[1]}CHI2"  ] = F.DOCACHI2(indexpair[0],indexpair[1])
-        docachi2_vars[ f"SDOCA{indexpair[0]}{indexpair[1]}CHI2" ] = F.SDOCACHI2(indexpair[0],indexpair[1])
-
-    variables += FunctorCollection( doca_vars )
-    variables += FunctorCollection( docachi2_vars )
-
-    kin = FC.Kinematics()
-    #kin.pop(['PX', 'PY', 'PZ', 'ENERGY'])
-    variables += kin
-
-    variables += make_tistos_hlt1(input_data)
-
-    return variables
-
-
-def make_basic_variables(input_data):
-    pvs = get_pvs()
-
-    variables = FunctorCollection(
-        {
-            # PDG ID and charge
-            "ID": F.PARTICLE_ID,
-            "Q": F.CHARGE,
-            # Angles
-            "ETA": F.ETA,
-            "PHI": F.PHI,
-            # track chisq and ghost prob
-            "TRGHOSTPROB": F.GHOSTPROB,
-            "TRCHI2DOF": F.CHI2DOF,
-            # some track-related variables
-            "TRNDOF": F.VALUE_OR(-1) @ F.NDOF @ F.TRACK,
-            "NHITS": F.VALUE_OR(-1) @ F.NHITS @ F.TRACK,
-            "NVPHITS": F.VALUE_OR(-1) @ F.NVPHITS @ F.TRACK,
-            "NUTHITS": F.VALUE_OR(-1) @ F.NUTHITS @ F.TRACK,
-            "NFTHITS": F.VALUE_OR(-1) @ F.NFTHITS @ F.TRACK,
-            "TRACKHISTORY": F.VALUE_OR(-1) @ F.TRACKHISTORY @ F.TRACK,
-            "NDOF": F.VALUE_OR(-1) @ F.NDOF @ F.TRACK,
-
-            # IP and IP chisq
-            "OWNPVIPCHI2": F.OWNPVIPCHI2,
-            "OWNPVIP": F.OWNPVIP,
-            # DLLs
-            "PIDp": F.PID_P,
-            "PIDK": F.PID_K,
-            "PIDe": F.PID_E,
-            "PIDmu": F.PID_MU,
-            # ProbNNs
-            "PROBNN_pi": F.PROBNN_PI,
-            "PROBNN_p": F.PROBNN_P,
-            "PROBNN_K": F.PROBNN_K,
-            "PROBNN_e": F.PROBNN_E,
-            "PROBNN_mu": F.PROBNN_MU,
-            "PROBNN_d" : F.PROBNN_D,
-            "PROBNN_GHOST": F.PROBNN_GHOST,
-            # IsMuon
-            "ISMUON": F.ISMUON,
-            "INMUON": F.INMUON,
-        }
-    )
-
-    kin = FC.Kinematics()
-    #kin.pop(['PX', 'PY', 'PZ', 'ENERGY'])
-    variables += kin
-
-    variables += make_tistos_hlt1(input_data)
-
-    return variables
-
-
-def make_event_variables():
-    pvs = get_pvs()
-
-    evt_variables = FC.EventInfo()
-    evt_variables = FC.RecSummary()
-    evt_variables = FC.LHCInfo()
-
-    evt_variables += FunctorCollection(
-        {
-            "NPV": F.SIZE(pvs),
-            "ALLPVX[NPVs]": F.ALLPVX(pvs),
-            "ALLPVY[NPVs]": F.ALLPVY(pvs),
-            "ALLPVZ[NPVs]": F.ALLPVZ(pvs),
-        }
-    )
-    return evt_variables
-
-
-def DecayTreeFitter(data, pv_only_fit=True, mass_constraints=[], prefix="DTF"):
-    from DecayTreeFitter import DecayTreeFitter
-
-    pvs = get_pvs()
-
-    variables_origin = FunctorCollection()
-    variables_composite = FunctorCollection()
-    variables_basic = FunctorCollection()
-
-    if pv_only_fit:
-        DTF = DecayTreeFitter(
-            name="PV_Fit_{hash}",
-            input_particles=data,
-            input_pvs=pvs,
-        )
-
-        variables_origin += FC.DecayTreeFitterResults(
-            DTF=DTF,
-            prefix=prefix + "_PV_",
-            decay_origin=True,
-            with_lifetime=True,
-            with_kinematics=True,
-        )
-
-        variables_composite += FC.DecayTreeFitterResults(
-            DTF=DTF,
-            prefix=prefix + "_PV_",
-            decay_origin=False,
-            with_lifetime=True,
-            with_kinematics=True,
-        )
-
-        variables_basic += FC.DecayTreeFitterResults(
-            DTF=DTF,
-            prefix=prefix + "_PV_",
-            decay_origin=False,
-            with_lifetime=False,
-            with_kinematics=True,
-        )
-
-    if len(mass_constraints) > 0:
-        DTF_M = DecayTreeFitter(
-            name="PVandMass_Fit_{hash}",
-            input_particles=data,
-            input_pvs=pvs,
-            mass_constraints=mass_constraints,
-        )
-
-        variables_origin += FC.DecayTreeFitterResults(
-            DTF=DTF_M,
-            prefix=prefix + "_PVandMass_",
-            decay_origin=True,
-            with_lifetime=True,
-            with_kinematics=True,
-        )
-
-        variables_composite += FC.DecayTreeFitterResults(
-            DTF=DTF_M,
-            prefix=prefix + "_PVandMass_",
-            decay_origin=False,
-            with_lifetime=True,
-            with_kinematics=True,
-        )
-
-        variables_basic += FC.DecayTreeFitterResults(
-            DTF=DTF_M,
-            prefix=prefix + "_PVandMass_",
-            decay_origin=False,
-            with_lifetime=False,
-            with_kinematics=True,
-        )
-
-    return variables_origin, variables_composite, variables_basic
diff --git a/BnoC_3body_Lines_2024/decay_factory.py b/BnoC_3body_Lines_2024/decay_factory.py
deleted file mode 100644
index eeb9b7cdcd..0000000000
--- a/BnoC_3body_Lines_2024/decay_factory.py
+++ /dev/null
@@ -1,237 +0,0 @@
-from string import Template
-from typing import Any
-import re
-
-
-def _dict_append(user_dict: dict, user_key: Any, user_value: Any) -> dict:
-    """
-    Small utility function to either instantiate or add value(s) to a dictionary key
-    """
-    if user_key not in user_dict:
-        user_dict[user_key] = user_value
-    else:
-        user_dict[user_key] += user_value
-    return user_dict
-
-
-class DecayFactory:
-    """
-    Use to recover the Run 1/2 DaVinci functionality of templated decay descriptors.
-    E.g. instead of defining each branch and decay descriptor separately, do
-    something like:
-    >>> from .decay_factory import DecayFactory
-    >>> decay_desc = "${B}[B_s0 -> ${Kst}(K*(892)0 -> ${Kp}K+ ${pim}pi-) ${Kstb}(K*(892)~0 -> ${Km}K- ${pip}pi+)]CC"
-    >>> df = DecayFactory(decay_desc)
-    >>> fields = df.fields
-    >>> print(fields)
-    {"B": "[B_s0 -> (K*(892)0 -> K+ pi-) (K*(892)~0 -> K- pi+)]CC",
-    "Kst": "[B_s0 -> ^(K*(892)0 -> K+ pi-) (K*(892)~0 -> K- pi+)]CC",
-    "Kp": "[B_s0 -> (K*(892)0 -> ^K+ pi-) (K*(892)~0 -> K- pi+)]CC",
-    "pim": "[B_s0 -> (K*(892)0 -> K+ ^pi-) (K*(892)~0 -> K- pi+)]CC",
-    "Kstb": "[B_s0 -> (K*(892)0 -> K+ pi-) ^(K*(892)~0 -> K- pi+)]CC",
-    "Km": "[B_s0 -> (K*(892)0 -> K+ pi-) (K*(892)~0 -> ^K- pi+)]CC",
-    "pip": "[B_s0 -> (K*(892)0 -> K+ pi-) (K*(892)~0 -> K- ^pi+)]CC"}
-
-    Some additional functionality is added to try and automatically figure out which
-    paritlces are the `origin` (parent), `composite` particles (like `Kst` above) and
-    `basic` particles i.e. stable ones like `Kp`.
-    This is because often we have certain functor collections that we want include for
-    just the parent particle or intermediate resonances or stable particles etc.
-    Continuing from the above example:
-    >>> print(df.origin)
-    B
-    >>> print(df.composites)
-    ["Kst", "Kstb"]
-    >>> print(df.basics)
-    ["Kp", "pim", "Km", "pip"]
-
-    You can then also get the `variables` dict used in FunTuple with the
-    `add_variables` method. This takes optional arguments so that you can add functor
-    collections to any or all of the branches.
-    E.g.
-    >>> from FunTuple import functorcollections as FC
-    >>> from FunTuple import FunctorCollection
-    >>> from PyConf.reading import get_pvs
-    >>> kinematics = FC.Kinematics()
-    >>> pvs = get_pvs()
-    >>> ltime = FunctorCollection({"BPVLTIME": F.BPVLTIME(pvs)})
-
-    >>> df.add_variables(
-            origin_vars=kinematics+ltime,
-            composite_vars=kinematics,
-            basic_vars=kinematics
-        )
-    >>> variables = df.variables
-
-    The `df.add_variables(...)` is equivalent to:
-    >>> variables = {
-        "B": kinematics + ltime,
-        "Kst": kinematics,
-        "Kstb": kinematics,
-        "Kp": kinematics,
-        "Km": kinematics,
-        "pip": kinematics,
-        "pim": kinematics,
-    }
-
-    You can also use `add_variables` to add variables only to specific composite or
-    basic branches rather than all of them, using the `composite_branches` and/or
-    `basic_branches` arguments, e.g. as above:
-    >>> df.add_variables(
-            origin_vars=kinematics+ltime,
-            composite_vars=kinematics,
-            basic_vars=kinematics,
-            basic_branches=["Kp", "pim"]
-        )
-
-    will add the `kinematics` FunctorCollection only to the `Kp` and `pim` branches.
-    You can call `add_variables` multiple times to keep adding variables to the
-    `variables` dictionary.
-    """
-
-    def __init__(self, decay_desc: str) -> None:
-        self.decay_desc = decay_desc
-        # self.particle_map = self.get_particles()
-        self.fields, self.particles = self._get_fields()
-        self.origin, self.composites, self.basics = self._get_groups()
-        self.variables = {}
-
-    # Copy (almost) verbatim from Run 1/2 DaVinci:
-    # https://gitlab.cern.ch/lhcb/Analysis/-/blob/run2-patches/Phys/DecayTreeTuple/python/DecayTreeTuple/Configuration.py#L199
-    def _get_fields(self) -> tuple[dict, tuple[str]]:
-        template = self.decay_desc
-        # The argument 'template' is a Python string template
-        # e.g. "[${D}D0 -> ${kaon}K- ${pion}pi+]CC"
-        # Here ["D", "kaon", "pion"] are the branch names you want
-        dd = Template(template)
-
-        # This parses the temlate to get the list of branch names,
-        # i.e. ["D", "kaon", "pion"]
-        particles = [
-            y[1] if len(y[1]) else y[2]
-            for y in dd.pattern.findall(dd.template) if len(y[1]) or len(y[2])
-        ]
-
-        # To form the decay descriptor, we need to mark all the particles
-        # except for the top-level particle
-        mapping = {
-            p: '^' if particles.index(p) != 0 else ''
-            for p in particles
-        }
-        clean = dd.template.replace(' ', '')
-        for i, o in enumerate(re.findall("(\[\$|\$)", clean)):
-            if o == '[$':
-                mapping[particles[i]] = ''
-
-        # Now make the branches
-        branches = {}
-        for p in particles:
-            # Need a version of the descriptor where particle 'p' is marked but nothing
-            # else is.
-            # Use mapping to ensure the parent particle is never marked.
-            branches[p] = dd.substitute(
-                {q: mapping[p] if p == q else ''
-                 for q in particles})
-
-        return branches, particles
-
-    def _get_groups(self) -> tuple[str, tuple[str], tuple[str]]:
-        template = self.decay_desc
-        dd = Template(template)
-
-        particles = []
-        origin = ''
-        composites = []
-        basics = []
-        for i, match in enumerate(dd.pattern.finditer(dd.template)):
-            particle = [
-                y[1] if len(y[1]) else y[2]
-                for y in dd.pattern.findall(match.group())
-                if len(y[1]) or len(y[2])
-            ][0]
-            particles.append(particle)
-            if i == 0:
-                origin = particle
-            else:
-                next_char = dd.template[match.end()]
-                if next_char == '(':
-                    composites.append(particle)
-                else:
-                    basics.append(particle)
-        return origin, composites, basics
-
-    def add_variables(self,
-                      origin_vars: list = None,
-                      composite_vars: list = None,
-                      basic_vars: list = None,
-                      composite_branches: list = None,
-                      basic_branches: list = None) -> None:
-        """
-        You can get the `variables` dict used in FunTuple with the `add_variables`
-        method. This takes optional arguments so that you can add functor collections
-        to any or all of the branches.
-        E.g.
-        >>> from FunTuple import functorcollections as FC
-        >>> from FunTuple import FunctorCollection
-        >>> from PyConf.reading import get_pvs
-        >>> kinematics = FC.Kinematics()
-        >>> pvs = get_pvs()
-        >>> ltime = FunctorCollection({"BPVLTIME": F.BPVLTIME(pvs)})
-
-        >>> df.add_variables(
-                origin_vars=kinematics+ltime,
-                composite_vars=kinematics,
-                basic_vars=kinematics
-            )
-        >>> variables = df.variables
-
-        The `df.add_variables(...)` is equivalent to:
-        >>> variables = {
-            "B": kinematics + ltime,
-            "Kst": kinematics,
-            "Kstb": kinematics,
-            "Kp": kinematics,
-            "Km": kinematics,
-            "pip": kinematics,
-            "pim": kinematics,
-        }
-
-        You can also use `add_variables` to add variables only to specific composite or
-        basic branches rather than all of them, using the `composite_branches` and/or
-        `basic_branches` arguments, e.g. as above:
-        >>> df.add_variables(
-                origin_vars=kinematics+ltime,
-                composite_vars=kinematics,
-                basic_vars=kinematics,
-                basic_branches=["Kp", "pim"]
-            )
-
-        will add the `kinematics` FunctorCollection only to the `Kp` and `pim` branches.
-        You can call `add_variables` multiple times to keep adding variables to the
-        `variables` dictionary.
-        """
-        if origin_vars is not None:
-            self.variables = _dict_append(self.variables, self.origin,
-                                          origin_vars)
-        if composite_vars is not None:
-            to_add = composite_branches or self.composites
-            for composite in to_add:
-                if composite not in self.composites:
-                    print(
-                        f"Unexpected composite branch {composite} not in list of \
-                        composites: {self.composites}"
-                    )
-                    raise RuntimeError
-                self.variables = _dict_append(self.variables, composite,
-                                              composite_vars)
-        if basic_vars is not None:
-            to_add = basic_branches or self.basics
-            for basic in to_add:
-                if basic not in self.basics:
-                    print(
-                        f"Unexpected basic branch {basic} not in list of \
-                        basics: {self.basics}"
-                    )
-                    raise RuntimeError
-                self.variables = _dict_append(self.variables, basic,
-                                              basic_vars)
diff --git a/BnoC_3body_Lines_2024/info.yaml b/BnoC_3body_Lines_2024/info.yaml
deleted file mode 100644
index 8cc9cd7e94..0000000000
--- a/BnoC_3body_Lines_2024/info.yaml
+++ /dev/null
@@ -1,36 +0,0 @@
-checks:
-  tree_not_empty:
-    type: num_entries
-    count: 1
-
-defaults:
-  application: "DaVinci/v64r7"
-  wg: BnoC
-  inform:
-    - T.Latham@warwick.ac.uk
-    - George.Hallett@warwick.ac.uk
-    - Marion.Lehuraux@warwick.ac.uk
-  checks:
-    - tree_not_empty
-
-SprucePass24c2_MagDown_Validation:
-  input:
-    bk_query: "/LHCb/Collision24/Beam6800GeV-VeloClosed-MagDown/Real Data/Sprucing24c2/94000000/BNOC.DST"
-    dq_flags:
-      - OK
-      - UNCHECKED
-    keep_running: true
-  output: BNOC_3BODY_LINES_2024_UT.ROOT
-  options:
-    entrypoint: BnoC_3body_Lines_2024.tuple_maker:main
-    extra_options:
-      input_type: ROOT
-      input_process: "TurboPass"
-      input_stream: bnoc
-      input_raw_format: 0.5
-      simulation: False
-      lumi: True
-      write_fsr: False
-      geometry_version: run3/2024.Q1.2-v00.00
-      conditions_version: master
-      
diff --git a/BnoC_3body_Lines_2024/threebodylines.py b/BnoC_3body_Lines_2024/threebodylines.py
deleted file mode 100644
index 9dff392307..0000000000
--- a/BnoC_3body_Lines_2024/threebodylines.py
+++ /dev/null
@@ -1,76 +0,0 @@
-from .bnoc_utils import particle_line_name
-import itertools
-
-h_types = [ 'K-', 'pi-' ]
-hh_types = [ ('K+', 'K-'), ('K+', 'pi-'), ('K-', 'pi+'), ('pi+', 'pi-') ]
-ss_hh_types = [ ('K-', 'K-'), ('K-', 'pi-'), ('pi-', 'pi-') ]
-ks_types = [ 'LL', 'DD' ] # With UT in 2024
-#ks_types = [ 'LL' ] # no UT in 2023, so no downstream tracks
-lambda_types = [ 'LL', 'DD' ] # With UT in 2024
-#lambda_types = [ 'LL' ] # no UT in 2023, so no downstream tracks
-
-# B -> KS h+ h- lines
-KShh_lines = {}
-for ks_type, hh_type in itertools.product( ks_types, hh_types ) :
-    h1_type, h2_type = hh_type
-    h1_name = particle_line_name( h1_type )
-    h2_name = particle_line_name( h2_type )
-
-    line_name = f"BdsToKS{h1_name}{h2_name}_{ks_type}"
-
-    if h1_type[:-1] != h2_type[:-1] :
-        KShh_lines[ line_name ] = {
-            'decay_desc':
-            "${B}[B0 -> ${KS}(KS0 -> ${KS_pi1}pi+ ${KS_pi2}pi-) ${h1}" + h1_type + " ${h2}" + h2_type + "]CC",
-            'mass_constraints': ['B0', 'KS0'],
-        }
-    else :
-        KShh_lines[ line_name ] = {
-            'decay_desc':
-            "${B}B0 -> ${KS}(KS0 -> ${KS_pi1}pi+ ${KS_pi2}pi-) ${h1}" + h1_type + " ${h2}" + h2_type,
-            'mass_constraints': ['B0', 'KS0'],
-        }
-
-# Lb -> KS p+ h- lines
-KSph_lines = {}
-for ks_type, h_type in itertools.product( ks_types, h_types ) :
-    h_name = particle_line_name( h_type )
-
-    line_name = f"Lb0ToPpKS{h_name}_{ks_type}"
-
-    KSph_lines[ line_name ] = {
-        'decay_desc':
-        "${Lb}[Lambda_b0 -> ${KS}(KS0 -> ${KS_pi1}pi+ ${KS_pi2}pi-) ${p}p+ ${h}" + h_type + "]CC",
-        'mass_constraints': ['Lambda_b0', 'KS0'],
-    }
-
-# Lb -> L h+ h- lines
-Lhh_lines = {}
-for l_type, hh_type in itertools.product( lambda_types, hh_types ) :
-    h1_type, h2_type = hh_type
-    h1_name = particle_line_name( h1_type )
-    h2_name = particle_line_name( h2_type )
-
-    line_name = f"Lb0ToL0{h1_name}{h2_name}_{l_type}"
-
-    Lhh_lines[ line_name ] = {
-        'decay_desc':
-        "${Lb}[Lambda_b0 -> ${Lz}(Lambda0 -> ${p}p+ ${pi}pi-) ${h1}" + h1_type + " ${h2}" + h2_type + "]CC",
-        'mass_constraints': ['Lambda_b0', 'Lambda0'],
-    }
-
-# Xib -> p h- h- lines
-phh_lines = {}
-for hh_type in ss_hh_types :
-    h1_type, h2_type = hh_type
-    h1_name = particle_line_name( h1_type )
-    h2_name = particle_line_name( h2_type )
-
-    line_name = f"XibmToPp{h1_name}{h2_name}"
-
-    phh_lines[ line_name ] = {
-        'decay_desc':
-        "${Xib}[Xi_b- -> ${p}p+ ${h1}" + h1_type + " ${h2}" + h2_type + "]CC",
-        'mass_constraints': ['Xi_b-'],
-    }
-
diff --git a/BnoC_3body_Lines_2024/tuple_maker.py b/BnoC_3body_Lines_2024/tuple_maker.py
deleted file mode 100644
index 590a3c9197..0000000000
--- a/BnoC_3body_Lines_2024/tuple_maker.py
+++ /dev/null
@@ -1,102 +0,0 @@
-###############################################################################
-# (c) Copyright 2023 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 FunTuple import FunTuple_Particles as Funtuple
-from DaVinci import Options, make_config
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-
-from .bnoc_utils import (
-    make_require_pvs,
-    make_basic_variables,
-    make_composite_variables,
-    make_event_variables,
-    DecayTreeFitter,
-)
-from .decay_factory import DecayFactory
-from .threebodylines import (
-    KShh_lines,
-    KSph_lines,
-    Lhh_lines,
-    phh_lines,
-)
-
-###################################################
-
-def generic_tuple( lines ):
-    algs = {}
-
-    require_pvs = make_require_pvs()
-
-    for name, line_info in lines.items() :
-
-        line_name = f"Hlt2BnoC_{name}"
-        line_particles = get_particles(f"/Event/HLT2/{line_name}/Particles")
-        line_prefilter = create_lines_filter(name=f"PreFilter_{line_name}", lines=[line_name])
-
-        df = DecayFactory(line_info['decay_desc'])
-
-        evt_vars = make_event_variables()
-
-        dtf_vars_origin, dtf_vars_composite, dtf_vars_basic = DecayTreeFitter( line_particles, prefix="DTF", pv_only_fit=True, mass_constraints=line_info['mass_constraints'] )
-
-        df.add_variables(
-                origin_vars = make_composite_variables(line_particles, [(1,2), (1,3), (2,3)]) + dtf_vars_origin,
-                composite_vars = make_composite_variables(line_particles, [(1,2)]) + dtf_vars_composite,
-                basic_vars = make_basic_variables(line_particles) + dtf_vars_basic)
-
-        funtuple = Funtuple(
-                name=f"{line_name}_Tuple",
-                tuple_name="DecayTree",
-                inputs=line_particles,
-                fields=df.fields,
-                variables=df.variables,
-                event_variables=evt_vars,
-                store_multiple_cand_info=True
-        )
-
-        algs[line_name] = [line_prefilter, require_pvs, funtuple]
-
-    return algs
-
-def main_KShh(options: Options):
-    all_user_algorithms = {}
-    all_user_algorithms.update(generic_tuple(KShh_lines))
-
-    return make_config(options, all_user_algorithms)
-
-def main_KSph(options: Options):
-    all_user_algorithms = {}
-    all_user_algorithms.update(generic_tuple(KSph_lines))
-
-    return make_config(options, all_user_algorithms)
-
-def main_Lhh(options: Options):
-    all_user_algorithms = {}
-    all_user_algorithms.update(generic_tuple(Lhh_lines))
-
-    return make_config(options, all_user_algorithms)
-
-def main_phh(options: Options):
-    all_user_algorithms = {}
-    all_user_algorithms.update(generic_tuple(phh_lines))
-
-    return make_config(options, all_user_algorithms)
-
-def main(options: Options):
-    all_user_algorithms = {}
-    all_user_algorithms.update(generic_tuple(KShh_lines))
-    all_user_algorithms.update(generic_tuple(KSph_lines))
-    all_user_algorithms.update(generic_tuple(Lhh_lines))
-    all_user_algorithms.update(generic_tuple(phh_lines))
-
-    return make_config(options, all_user_algorithms)
diff --git a/Charm_2024validation/info.yaml b/Charm_2024validation/info.yaml
index cf3b7dcdf9..26de654976 100644
--- a/Charm_2024validation/info.yaml
+++ b/Charm_2024validation/info.yaml
@@ -7,47 +7,116 @@ defaults:
   "MagDown",
 ]%}
 
+{%- set evttype_subsample_nutext_nu_dir1_dir2_dddb = [
+( '27163102', 'd0_to_hh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163101', 'd0_to_hh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163100', 'd0_to_hh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '23103042', 'd_to_hhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '23263022', 'd_to_hhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '21263012', 'd_to_hhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163471', 'd0_to_hhpi0', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27165903', 'd0_to_kshh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27165071', 'd0_to_hhhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27265008', 'd0_to_hhhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27265009', 'd0_to_hhhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27165072', 'd0_to_hhhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '23103111', 'd_to_ksh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '21103101', 'd_to_ksh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '23173003', 'rare_charm', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
 
+( '27163102', 'd0_to_hh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163101', 'd0_to_hh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163100', 'd0_to_hh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '23103042', 'd_to_hhh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '23263022', 'd_to_hhh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '21263012', 'd_to_hhh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163471', 'd0_to_hhpi0', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '27165903', 'd0_to_kshh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '27165071', 'd0_to_hhhh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+
+( '27163102', 'd0_to_hh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163101', 'd0_to_hh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163100', 'd0_to_hh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '23103042', 'd_to_hhh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '23263022', 'd_to_hhh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '21263012', 'd_to_hhh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163471', 'd0_to_hhpi0', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '27165903', 'd0_to_kshh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '27165071', 'd0_to_hhhh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+
+( '27163102', 'd0_to_hh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163101', 'd0_to_hh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163100', 'd0_to_hh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '23103042', 'd_to_hhh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '23263022', 'd_to_hhh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '21263012', 'd_to_hhh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163471', 'd0_to_hhpi0', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27165903', 'd0_to_kshh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27165071', 'd0_to_hhhh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
 
-{%- set subsamples = [
-  "d0_to_hh",
-  "d_to_hhh",
-  "d_to_ksh",
-  "d0_to_hhpi0",
-  "d0_to_kshh",
-  "d0_to_ksks",
-  "d0_to_hhhh",
-  "rare_charm",
-  "detection_asymmetry",
-  "dst_to_dee",
 ]%}
 
-{% for id in subsamples %}
+
+
+{%- for evttype, id, nutext, nu, dir1, dir2, dddb in evttype_subsample_nutext_nu_dir1_dir2_dddb %}
+
 {% for polarity in conditions %}
 
-{{id}}_2024_{{ polarity }}:
-  application: "DaVinci/v64r7"
+{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1:
+  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
+  input:
+    bk_query: "/MC/{{dir1}}/Beam6800GeV-2024{{dir2}}-{{polarity}}-Nu{{nu}}-25ns-Pythia8/Sim10d/{{evttype}}/DIGI"
+    n_test_lfns: 3
+  output: HLT1.DST
+  options:
+    entrypoint: Charm_2024validation.options.hlt1:alg_config
+    extra_options:
+      input_raw_format: 0.5
+      conddb_tag: sim10-2024.Q1.2-v1.1-md100
+      dddb_tag: '{{dddb}}'
+      input_type: ROOT
+      output_type: ROOT
+      simulation: True
+      data_type: "Upgrade"
+      scheduler_legacy_mode: False
+      evt_max: 1000
+
+{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2:
+  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
   input:
-    bk_query: "/LHCb/Collision24/Beam6800GeV-VeloClosed-{{polarity}}/Real Data/Sprucing24c2/94000000/CHARM.DST"
+    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1
+  output: HLT2.DST
+  options:
+    entrypoint: Charm_2024validation.options.hlt2.hlt2_{{id}}:alg_config
+    extra_options:
+      conddb_tag: sim10-2024.Q1.2-v1.1-md100
+      dddb_tag: '{{dddb}}'
+      input_raw_format: 0.5
+      input_type: "ROOT"
+      output_type: "ROOT"
+      simulation: True
+      data_type: "Upgrade"
+      output_manifest_file: "HLT2.tck.json"
+      scheduler_legacy_mode: False
 
-    dq_flags:
-      - UNCHECKED
-      - OK
-    keep_running: true
-  output: DVTUPLE_{{id}}.ROOT
+MC_{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}:
+  application: "DaVinci/v64r7@x86_64_v3-el9-gcc13+detdesc-opt+g"
+  input:
+    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2
+  output: DVTUPLE.ROOT
   options:
     entrypoint: Charm_2024validation.main_{{id}}:main
     extra_options:
+      conddb_tag: sim10-2024.Q1.2-v1.1-md100
+      dddb_tag: '{{dddb}}'
       input_raw_format: 0.5
       input_type: ROOT
-      simulation: False
+      simulation: True
       data_type: "Upgrade"
       event_store: HiveWhiteBoard
-      geometry_version: run3/2024.Q1.2-v00.00
-      conditions_version: master
-      input_process: "TurboPass"
-      input_stream: "charm"
-      evt_max: -1
-
+      input_process: "Hlt2"
+      input_manifest_file: "HLT2.tck.json"
+      write_decoding_keys_to_git: false
+      
 {%- endfor %}
 {%- endfor %}
diff --git a/Charm_2024validation/info_MC.yaml b/Charm_2024validation/info_MC_noUT.yaml
similarity index 100%
rename from Charm_2024validation/info_MC.yaml
rename to Charm_2024validation/info_MC_noUT.yaml
diff --git a/Charm_2024validation/info_data.yaml b/Charm_2024validation/info_data.yaml
index 8c750c72d0..cf3b7dcdf9 100644
--- a/Charm_2024validation/info_data.yaml
+++ b/Charm_2024validation/info_data.yaml
@@ -19,15 +19,17 @@ defaults:
   "d0_to_hhhh",
   "rare_charm",
   "detection_asymmetry",
+  "dst_to_dee",
 ]%}
 
 {% for id in subsamples %}
 {% for polarity in conditions %}
 
 {{id}}_2024_{{ polarity }}:
-  application: "DaVinci/v64r5"
+  application: "DaVinci/v64r7"
   input:
-    bk_query: "/LHCb/Collision24/Beam6800GeV-VeloClosed-{{polarity}}-Excl-UT/Real Data/Sprucing24c1/94000000/CHARM.DST"
+    bk_query: "/LHCb/Collision24/Beam6800GeV-VeloClosed-{{polarity}}/Real Data/Sprucing24c2/94000000/CHARM.DST"
+
     dq_flags:
       - UNCHECKED
       - OK
@@ -45,6 +47,7 @@ defaults:
       conditions_version: master
       input_process: "TurboPass"
       input_stream: "charm"
+      evt_max: -1
 
 {%- endfor %}
 {%- endfor %}
diff --git a/Charm_2024validation/#info.yaml# b/Charm_2024validation/info_data_noUT.yaml
similarity index 98%
rename from Charm_2024validation/#info.yaml#
rename to Charm_2024validation/info_data_noUT.yaml
index 87b0093def..8c750c72d0 100644
--- a/Charm_2024validation/#info.yaml#
+++ b/Charm_2024validation/info_data_noUT.yaml
@@ -45,7 +45,6 @@ defaults:
       conditions_version: master
       input_process: "TurboPass"
       input_stream: "charm"
-      evt_max: 1
 
 {%- endfor %}
 {%- endfor %}
diff --git a/Charm_2024validation/main_d_to_hhh.py b/Charm_2024validation/main_d_to_hhh.py
index c78bb525ae..516e32b119 100644
--- a/Charm_2024validation/main_d_to_hhh.py
+++ b/Charm_2024validation/main_d_to_hhh.py
@@ -31,15 +31,28 @@ def main(options: Options):
         "Ds2KKpi_NoCuts" : maketuple_Ds2KKpi(options, pvs, rec_summary,True),
         "D2pipipi" : maketuple_D2pipipi(options, pvs, rec_summary),
         "D2pipipi_NoCuts" : maketuple_D2pipipi(options, pvs, rec_summary,True),
+        "D2pipiK" : maketuple_D2pipiK(options, pvs, rec_summary),
+        "D2pipiK_NoCuts" : maketuple_D2pipiK(options, pvs, rec_summary,True),
+        "D2KKK" : maketuple_D2KKK(options, pvs, rec_summary),
+        "D2KKK_NoCuts" : maketuple_D2KKK(options, pvs, rec_summary,True),
+        "D2piKK" : maketuple_D2piKK(options, pvs, rec_summary),
+        "D2piKK_NoCuts" : maketuple_D2piKK(options, pvs, rec_summary,True),
+        "B02Dpi_D2KKpi" : maketuple_B02Dpi_D2KKpi(options, pvs, rec_summary),
+        "B02Dpi_D2pipipi" : maketuple_B02Dpi_D2pipipi(options, pvs, rec_summary),
+        "Bs02Dspi_Ds2KKpi" : maketuple_Bs02Dspi_Ds2KKpi(options, pvs, rec_summary),
+        "Bs02Dspi_Ds2pipipi" : maketuple_Bs02Dspi_Ds2pipipi(options, pvs, rec_summary),
         #ADet
         "D2Kpipi_ADet" : maketuple_D2Kpipi_ADet(options, pvs, rec_summary),
         "D2pipipi_ADet" : maketuple_D2pipipi_ADet(options, pvs, rec_summary),
         "Ds2KKpi_ADet" : maketuple_Ds2KKpi_ADet(options, pvs, rec_summary),
+
+
     }
 
     MCtuples = {
         "MC_D2Kpipi" : maketuple_MC_D2Kpipi(options, pvs, rec_summary),
         "MC_Ds2KKpi" : maketuple_MC_Ds2KKpi(options, pvs, rec_summary)
+        "MC_Ds2KKK" : maketuple_MC_Ds2KKK(options, pvs, rec_summary)
     }
 
     if options.simulation:
diff --git a/Charm_2024validation/options/d_to_hhh.py b/Charm_2024validation/options/d_to_hhh.py
index 416d9bd53a..d10fa039f6 100644
--- a/Charm_2024validation/options/d_to_hhh.py
+++ b/Charm_2024validation/options/d_to_hhh.py
@@ -1,5 +1,6 @@
 from .tupling import (
     make_composite_variables_3body,
+    make_b_composite_variables,
     make_composite_variables,
     make_basic_variables,
     make_hlt2_event_variables,
@@ -299,3 +300,204 @@ def maketuple_D2Kpipi_Kpi(options, pvs, rec_summary):
     return [node]
     
     '''
+
+
+def maketuple_D2pipiK(options, pvs, rec_summary, _NoCuts=False):
+    name = "D2pipiK"
+    turbo_line = "Hlt2Charm_DpDspToKpPimPip"
+    if _NoCuts == True:
+        turbo_line += "_NoCuts"
+        name += "_NoCuts"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> pi- pi+ K+]CC",
+        "p1"   : "[D+ -> ^pi- pi+ K+]CC",
+        "p2"  : "[D+ -> pi- ^pi+ K+]CC",
+        "p3" : "[D+ -> pi- pi+ ^K+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
+        "p1"     : make_basic_variables(options, pvs, input_data),
+        "p2"    : make_basic_variables(options, pvs, input_data),
+        "p3"   : make_basic_variables(options, pvs, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2KKK(options, pvs, rec_summary, _NoCuts=False):
+    name = "D2KKK"
+    turbo_line = "Hlt2Charm_DpDspToKmKpKp"
+    if _NoCuts == True:
+        turbo_line += "_NoCuts"
+        name += "_NoCuts"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> K- K+ K+]CC",
+        "p1"   : "[D+ -> ^K- K+ K+]CC",
+        "p2"  : "[D+ -> K- ^K+ K+]CC",
+        "p3" : "[D+ -> K- K+ ^K+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
+        "p1"     : make_basic_variables(options, pvs, input_data),
+        "p2"    : make_basic_variables(options, pvs, input_data),
+        "p3"   : make_basic_variables(options, pvs, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2piKK(options, pvs, rec_summary, _NoCuts=False):
+    name = "D2piKK"
+    turbo_line = "Hlt2Charm_DpDspToKpKpPim"
+    if _NoCuts == True:
+        turbo_line += "_NoCuts"
+        name += "_NoCuts"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> pi- K+ K+]CC",
+        "p1"   : "[D+ -> ^pi- K+ K+]CC",
+        "p2"  : "[D+ -> pi- ^K+ K+]CC",
+        "p3" : "[D+ -> pi- K+ ^K+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
+        "p1"     : make_basic_variables(options, pvs, input_data),
+        "p2"    : make_basic_variables(options, pvs, input_data),
+        "p3"   : make_basic_variables(options, pvs, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+def maketuple_B02Dpi_D2KKpi(options, pvs, rec_summary):
+    name = "B02Dpi_D2KKpi"
+    turbo_line = "Hlt2Charm_B0ToDmPip_DmToKmKpPim"
+    
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+    
+    branches = {
+        "B0" : "[[B0]CC -> (D- -> K- K+ pi-) pi+]CC",
+        "pip" : "[[B0]CC -> (D- -> K- K+ pi-) ^pi+]CC",
+        "Dm" : "[[B0]CC -> ^(D- -> K- K+ pi-) pi+]CC",
+        "p1" : "[[B0]CC -> (D- -> ^K- K+ pi-) pi+]CC",
+        "p2" : "[[B0]CC -> (D- -> K- ^K+ pi-) pi+]CC",
+        "p3" : "[[B0]CC -> (D- -> K- K+ ^pi-) pi+]CC",
+    }
+    
+    variables = {
+        "B0" : make_b_composite_variables(options, pvs, input_data),
+        "pip" : make_basic_variables(options, pvs,input_data),
+        "Dm"   : make_composite_variables_3body(options, pvs, input_data),
+        "p1"     : make_basic_variables(options, pvs, input_data),
+        "p2"    : make_basic_variables(options, pvs, input_data),
+        "p3"   : make_basic_variables(options, pvs, input_data),        
+    }
+    
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+def maketuple_B02Dpi_D2pipipi(options, pvs, rec_summary, _NoCuts=False):    
+    name = "B02Dpi_D2pipipi"
+    turbo_line = "Hlt2Charm_B0ToDmPip_DmToPimPimPip"
+    
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+    
+    branches = {
+        "B0" : "[[B0]CC -> (D- -> pi- pi- pi+) pi+]CC",
+        "pip" : "[[B0]CC -> (D- -> pi- pi- pi+) ^pi+]CC",
+        "Dm" : "[[B0]CC -> ^(D- -> pi- pi- pi+) pi+]CC",
+        "p1" : "[[B0]CC -> (D- -> ^pi- pi- pi+) pi+]CC",
+        "p2" : "[[B0]CC -> (D- -> pi- ^pi- pi+) pi+]CC",
+        "p3" : "[[B0]CC -> (D- -> pi- pi- ^pi+) pi+]CC",
+    }
+    
+    variables = {
+        "B0" : make_b_composite_variables(options, pvs, input_data),
+        "pip" : make_basic_variables(options, pvs,input_data),
+        "Dm"   : make_composite_variables_3body(options, pvs, input_data),
+        "p1"     : make_basic_variables(options, pvs, input_data),
+        "p2"    : make_basic_variables(options, pvs, input_data),
+        "p3"   : make_basic_variables(options, pvs, input_data),        
+    }
+    
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+    
+def maketuple_Bs02Dspi_Ds2KKpi(options, pvs, rec_summary, _NoCuts=False):    
+    name = "Bs02Dspi_Ds2KKpi"
+    turbo_line = "Hlt2Charm_Bs0ToDsmPip_DsmToKmKpPim"
+    
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+    
+    branches = {
+        "Bs0" : "[[B_s0]CC -> (D_s- -> K- K+ pi-) pi+]CC",
+        "pip" : "[[B_s0]CC -> (D_s- -> K- K+ pi-) ^pi+]CC",
+        "Dsm" : "[[B_s0]CC -> ^(D_s- -> K- K+ pi-) pi+]CC",
+        "p1" : "[[B_s0]CC -> (D_s- -> ^K- K+ pi-) pi+]CC",
+        "p2" : "[[B_s0]CC -> (D_s- -> K- ^K+ pi-) pi+]CC",
+        "p3" : "[[B_s0]CC -> (D_s- -> K- K+ ^pi-) pi+]CC",
+    }
+    
+    variables = {
+        "Bs0" : make_b_composite_variables(options, pvs, input_data),
+        "pip" : make_basic_variables(options, pvs,input_data),
+        "Dsm"   : make_composite_variables_3body(options, pvs, input_data),
+        "p1"     : make_basic_variables(options, pvs, input_data),
+        "p2"    : make_basic_variables(options, pvs, input_data),
+        "p3"   : make_basic_variables(options, pvs, input_data),        
+    }
+    
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+    
+def maketuple_Bs02Dspi_Ds2pipipi(options, pvs, rec_summary, _NoCuts=False):
+    name = "Bs02Dspi_Ds2pipipi"
+    turbo_line = "Hlt2Charm_Bs0ToDsmPip_DsmToPimPimPip"
+    
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+    
+    branches = {
+        "Bs0" : "[[B_s0]CC -> (D_s- -> pi- pi- pi+) pi+]CC",
+        "pip" : "[[B_s0]CC -> (D_s- -> pi- pi- pi+) ^pi+]CC",
+        "Dsm" : "[[B_s0]CC -> ^(D_s- -> pi- pi- pi+) pi+]CC",
+        "p1" : "[[B_s0]CC -> (D_s- -> ^pi- pi- pi+) pi+]CC",
+        "p2" : "[[B_s0]CC -> (D_s- -> pi- ^pi- pi+) pi+]CC",
+        "p3" : "[[B_s0]CC -> (D_s- -> pi- pi- ^pi+) pi+]CC",
+    }
+    
+    variables = {
+        "Bs0" : make_b_composite_variables(options, pvs, input_data),
+        "pip" : make_basic_variables(options, pvs,input_data),
+        "Dsm"   : make_composite_variables_3body(options, pvs, input_data),
+        "p1"     : make_basic_variables(options, pvs, input_data),
+        "p2"    : make_basic_variables(options, pvs, input_data),
+        "p3"   : make_basic_variables(options, pvs, input_data),        
+    }
+    
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
diff --git a/Charm_2024validation/options/d_to_hhh_MC.py b/Charm_2024validation/options/d_to_hhh_MC.py
index c0297d3e9f..e666e5f3ce 100644
--- a/Charm_2024validation/options/d_to_hhh_MC.py
+++ b/Charm_2024validation/options/d_to_hhh_MC.py
@@ -62,3 +62,31 @@ def maketuple_MC_Ds2KKpi(options, pvs, rec_summary):
                           inputs=input_data)
 
     return [mytuple]
+
+def maketuple_MC_Ds2KKK(options, pvs, rec_summary):
+    name = "MC_Ds2KKK"
+    line = "/Event/MC/Particles"
+
+    input_data = get_mc_particles(f"{line}")
+
+    branches = {
+        "Dp" : "[D_s+ ==> K- K+ K+]CC",
+        "Km"   : "[D_s+ ==> ^K- K+ K+]CC",
+        "Kp1"  : "[D_s+ ==> K- ^K+ K+]CC",
+        "Kp2" : "[D_s+ ==> K- K+ ^K+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_MC_composite_variables(),
+        "Km"     : make_MC_basic_variables(),
+        "Kp1"    : make_MC_basic_variables(),
+        "Kp2"   : make_MC_basic_variables(),
+    }
+
+    mytuple  = FuntupleMC(name=name,
+                          tuple_name="MCDecayTree",
+                          fields=branches, variables = variables,
+                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
+                          inputs=input_data)
+
+    return [mytuple]
diff --git a/Charm_2024validation/options/dst_to_dee.py b/Charm_2024validation/options/dst_to_dee.py
index 60e286458f..11f42bae95 100644
--- a/Charm_2024validation/options/dst_to_dee.py
+++ b/Charm_2024validation/options/dst_to_dee.py
@@ -1,4 +1,3 @@
-
 import Functors as F
 from Functors.math import log
 from DaVinci import Options, make_config
diff --git a/Charm_2024validation/options/hlt2/dst_to_dee.py b/Charm_2024validation/options/hlt2/dst_to_dee.py
new file mode 100644
index 0000000000..4fd67becd7
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/dst_to_dee.py
@@ -0,0 +1,9 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.dst_to_dee import all_lines as dst_to_dee_lines
+
+def make_lines():
+    mylines = [builder() for builder in dst_to_dee_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+
diff --git a/Charm_2024validation/options/hlt2/hlt2.py b/Charm_2024validation/options/hlt2/hlt2.py
index 473127434b..c1560ce952 100644
--- a/Charm_2024validation/options/hlt2/hlt2.py
+++ b/Charm_2024validation/options/hlt2/hlt2.py
@@ -2,7 +2,7 @@ import Moore
 from Moore import Options, run_moore
 from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
 from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf_without_UT
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
 from RecoConf.hlt2_tracking import (
     make_TrackBestTrackCreator_tracks,
     make_PrKalmanFilter_noUT_tracks,
@@ -21,8 +21,8 @@ def alg_config(options: Options):
         stateProvider_with_simplified_geom(),
     ]
     # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf_without_UT),\
-         require_gec.bind(skipUT=True),\
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
          default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
          make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
          make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
diff --git a/Charm_2024validation/options/hlt2/hlt2_d0_to_hh.py b/Charm_2024validation/options/hlt2/hlt2_d0_to_hh.py
index 7896029d08..7c3a67ed03 100644
--- a/Charm_2024validation/options/hlt2/hlt2_d0_to_hh.py
+++ b/Charm_2024validation/options/hlt2/hlt2_d0_to_hh.py
@@ -11,7 +11,7 @@ import Moore
 from Moore import Options, run_moore
 from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
 from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf_without_UT
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
 from RecoConf.hlt2_tracking import (
     make_TrackBestTrackCreator_tracks,
     make_PrKalmanFilter_noUT_tracks,
@@ -30,8 +30,8 @@ def alg_config(options: Options):
         stateProvider_with_simplified_geom(),
     ]
     # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf_without_UT),\
-         require_gec.bind(skipUT=True),\
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
          default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
          make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
          make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
diff --git a/Charm_2024validation/options/hlt2/hlt2_d0_to_hhhh.py b/Charm_2024validation/options/hlt2/hlt2_d0_to_hhhh.py
index d0a489c1d4..d7d5dcbb90 100644
--- a/Charm_2024validation/options/hlt2/hlt2_d0_to_hhhh.py
+++ b/Charm_2024validation/options/hlt2/hlt2_d0_to_hhhh.py
@@ -6,12 +6,11 @@ def make_lines():
     mylines = [builder() for builder in hhhh_lines.values()]
     mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
     return mylines
-    
 import Moore
 from Moore import Options, run_moore
 from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
 from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf_without_UT
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
 from RecoConf.hlt2_tracking import (
     make_TrackBestTrackCreator_tracks,
     make_PrKalmanFilter_noUT_tracks,
@@ -30,8 +29,8 @@ def alg_config(options: Options):
         stateProvider_with_simplified_geom(),
     ]
     # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf_without_UT),\
-         require_gec.bind(skipUT=True),\
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
          default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
          make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
          make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
diff --git a/Charm_2024validation/options/hlt2/hlt2_d0_to_hhpi0.py b/Charm_2024validation/options/hlt2/hlt2_d0_to_hhpi0.py
index 6b9189a4ed..063eeb274a 100644
--- a/Charm_2024validation/options/hlt2/hlt2_d0_to_hhpi0.py
+++ b/Charm_2024validation/options/hlt2/hlt2_d0_to_hhpi0.py
@@ -6,12 +6,11 @@ def make_lines():
     mylines = [builder() for builder in hhpi0_lines.values()]
     mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
     return mylines
-    
 import Moore
 from Moore import Options, run_moore
 from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
 from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf_without_UT
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
 from RecoConf.hlt2_tracking import (
     make_TrackBestTrackCreator_tracks,
     make_PrKalmanFilter_noUT_tracks,
@@ -30,8 +29,8 @@ def alg_config(options: Options):
         stateProvider_with_simplified_geom(),
     ]
     # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf_without_UT),\
-         require_gec.bind(skipUT=True),\
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
          default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
          make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
          make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
diff --git a/Charm_2024validation/options/hlt2/hlt2_d0_to_kshh.py b/Charm_2024validation/options/hlt2/hlt2_d0_to_kshh.py
index 0256fb48e9..3e1996cdf0 100644
--- a/Charm_2024validation/options/hlt2/hlt2_d0_to_kshh.py
+++ b/Charm_2024validation/options/hlt2/hlt2_d0_to_kshh.py
@@ -6,12 +6,11 @@ def make_lines():
     mylines = [builder() for builder in kshh_lines.values()]
     mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
     return mylines
-    
 import Moore
 from Moore import Options, run_moore
 from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
 from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf_without_UT
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
 from RecoConf.hlt2_tracking import (
     make_TrackBestTrackCreator_tracks,
     make_PrKalmanFilter_noUT_tracks,
@@ -30,8 +29,8 @@ def alg_config(options: Options):
         stateProvider_with_simplified_geom(),
     ]
     # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf_without_UT),\
-         require_gec.bind(skipUT=True),\
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
          default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
          make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
          make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
diff --git a/Charm_2024validation/options/hlt2/hlt2_d0_to_ksks.py b/Charm_2024validation/options/hlt2/hlt2_d0_to_ksks.py
index 2d7d6b4fb6..e8d1052803 100644
--- a/Charm_2024validation/options/hlt2/hlt2_d0_to_ksks.py
+++ b/Charm_2024validation/options/hlt2/hlt2_d0_to_ksks.py
@@ -6,12 +6,11 @@ def make_lines():
     mylines = [builder() for builder in ksks_lines.values()]
     mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
     return mylines
-    
 import Moore
 from Moore import Options, run_moore
 from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
 from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf_without_UT
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
 from RecoConf.hlt2_tracking import (
     make_TrackBestTrackCreator_tracks,
     make_PrKalmanFilter_noUT_tracks,
@@ -30,8 +29,8 @@ def alg_config(options: Options):
         stateProvider_with_simplified_geom(),
     ]
     # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf_without_UT),\
-         require_gec.bind(skipUT=True),\
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
          default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
          make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
          make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
diff --git a/Charm_2024validation/options/hlt2/hlt2_d_to_hhh.py b/Charm_2024validation/options/hlt2/hlt2_d_to_hhh.py
index 79fe7aa34b..97965cb96e 100644
--- a/Charm_2024validation/options/hlt2/hlt2_d_to_hhh.py
+++ b/Charm_2024validation/options/hlt2/hlt2_d_to_hhh.py
@@ -8,12 +8,11 @@ def make_lines():
     mylines += [builder() for builder in det_asy_lines.values()]
     mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
     return mylines
-    
 import Moore
 from Moore import Options, run_moore
 from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
 from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf_without_UT
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
 from RecoConf.hlt2_tracking import (
     make_TrackBestTrackCreator_tracks,
     make_PrKalmanFilter_noUT_tracks,
@@ -32,8 +31,8 @@ def alg_config(options: Options):
         stateProvider_with_simplified_geom(),
     ]
     # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf_without_UT),\
-         require_gec.bind(skipUT=True),\
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
          default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
          make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
          make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
diff --git a/Charm_2024validation/options/hlt2/hlt2_d_to_ksh.py b/Charm_2024validation/options/hlt2/hlt2_d_to_ksh.py
index 7cdc3d2d57..d2593da6a9 100644
--- a/Charm_2024validation/options/hlt2/hlt2_d_to_ksh.py
+++ b/Charm_2024validation/options/hlt2/hlt2_d_to_ksh.py
@@ -8,12 +8,11 @@ def make_lines():
     mylines += [builder() for builder in det_asy_lines.values()]
     mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
     return mylines
-    
 import Moore
 from Moore import Options, run_moore
 from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
 from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf_without_UT
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
 from RecoConf.hlt2_tracking import (
     make_TrackBestTrackCreator_tracks,
     make_PrKalmanFilter_noUT_tracks,
@@ -32,8 +31,8 @@ def alg_config(options: Options):
         stateProvider_with_simplified_geom(),
     ]
     # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf_without_UT),\
-         require_gec.bind(skipUT=True),\
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
          default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
          make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
          make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
diff --git a/Charm_2024validation/options/hlt2/hlt2_dst_to_dee.py b/Charm_2024validation/options/hlt2/hlt2_dst_to_dee.py
new file mode 100644
index 0000000000..d43ecbcd65
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/hlt2_dst_to_dee.py
@@ -0,0 +1,41 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.dst_to_dee import all_lines as dst_to_dee_lines
+
+def make_lines():
+    mylines = [builder() for builder in dst_to_dee_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_rare_charm.py b/Charm_2024validation/options/hlt2/hlt2_rare_charm.py
index 30478ab9cb..cb9ac88a02 100644
--- a/Charm_2024validation/options/hlt2/hlt2_rare_charm.py
+++ b/Charm_2024validation/options/hlt2/hlt2_rare_charm.py
@@ -6,12 +6,11 @@ def make_lines():
     mylines = [builder() for builder in rare_charm_lines.values()]
     mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
     return mylines
-    
 import Moore
 from Moore import Options, run_moore
 from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
 from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf_without_UT
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
 from RecoConf.hlt2_tracking import (
     make_TrackBestTrackCreator_tracks,
     make_PrKalmanFilter_noUT_tracks,
@@ -30,8 +29,8 @@ def alg_config(options: Options):
         stateProvider_with_simplified_geom(),
     ]
     # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf_without_UT),\
-         require_gec.bind(skipUT=True),\
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
          default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
          make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
          make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
diff --git a/Charm_2024validation/options/hlt2/hlt2noUT.py b/Charm_2024validation/options/hlt2/hlt2noUT.py
new file mode 100644
index 0000000000..473127434b
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/hlt2noUT.py
@@ -0,0 +1,32 @@
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf_without_UT
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf_without_UT),\
+         require_gec.bind(skipUT=True),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/options/hlt2/make_hlt2_decay.sh b/Charm_2024validation/options/hlt2/make_hlt2_decay.sh
index f62f9ec33a..f127b86285 100644
--- a/Charm_2024validation/options/hlt2/make_hlt2_decay.sh
+++ b/Charm_2024validation/options/hlt2/make_hlt2_decay.sh
@@ -6,3 +6,4 @@ cat d0_to_ksks.py hlt2.py > hlt2_d0_to_ksks.py
 cat d_to_hhh.py hlt2.py > hlt2_d_to_hhh.py
 cat d_to_ksh.py hlt2.py > hlt2_d_to_ksh.py
 cat rare_charm.py hlt2.py > hlt2_rare_charm.py
+cat dst_to_dee.py hlt2.py > hlt2_dst_to_dee.py
diff --git a/Charm_2024validation/options/tupling.py b/Charm_2024validation/options/tupling.py
index b7bc1324cc..99de572726 100644
--- a/Charm_2024validation/options/tupling.py
+++ b/Charm_2024validation/options/tupling.py
@@ -14,6 +14,7 @@
 
 import Functors as F
 from Functors.math import log
+import Functors.math as fmath
 
 from FunTuple import FunctorCollection
 from FunTuple.functorcollections import (
@@ -377,6 +378,72 @@ def make_composite_variables_4body(options, pvs, data, add_truth=True):
     )
     return make_composite_variables_3body(options, pvs, data, add_truth)+variables #make_tistoscombinations already included
 
+def make_b_composite_variables(options, pvs, data, add_truth=True):
+    
+    # define helper functors
+    get_child = F.CHILD(1, F.FORWARDARG0) # change here the index of the child
+    get_SV =  F.ENDVERTEX @ F.FORWARDARG0
+    get_SV_pos = F.TOLINALG @ F.POSITION @ get_SV # only if composite (i.e. has vertex)
+    get_child_endvtx_pos = F.ENDVERTEX_POS  @ get_child
+    get_fdvec_child = get_child_endvtx_pos - get_SV_pos
+
+    # define observables
+    IP_wrt_SV = F.IP.bind(get_SV_pos , get_child)
+    IPCHI2_wrt_SV = F.IPCHI2.bind(get_SV , get_child) # only if child is composite (i.e. has vertex)
+    FD_wrt_SV = F.MAGNITUDE @ get_fdvec_child
+    FDCHI2_wrt_SV = F.VTX_FDCHI2.bind(get_SV, get_child)
+
+    
+    variables = FunctorCollection(
+        {       
+            "ID": F.PARTICLE_ID ,
+            "PT": F.PT,
+            "P": F.P,
+            "MASS": F.MASS,
+            "CHILD1_IPwrtSV": IP_wrt_SV,
+            "CHILD1_IPCHI2wrtSV": IPCHI2_wrt_SV,
+            "CHILD1_FDwrtSV": FD_wrt_SV,
+            "CHILD1_FDCHI2wrtSV": FDCHI2_wrt_SV,
+            "PX": F.PX,
+            "PY": F.PY,
+            "PZ": F.PZ,
+            "END_VCHI2DOF": F.CHI2DOF @ F.ENDVERTEX,
+            "BPVCHI2DOF": F.CHI2DOF @ F.BPV(pvs),
+            # B2OC generic B hadron NN Hlt2 algorithm,
+            # not planning to use it directly for B2OC EM
+            "MVA": F.MVA(
+                MVAType="SigmaNet",
+                Config={
+                    "File":
+                    "paramfile://data/Hlt2B2OC_B_SigmaNet_Run3-v1.json",
+                    "Name":
+                    "B2OC_SigmaNet_Generic",
+                    "Lambda":
+                    "2.0",
+                    "NLayers":
+                    "3",
+                    "InputSize":
+                    "6",
+                    "Monotone_Constraints":
+                    "[1,-1,-1,-1,-1,-1]",
+                    "Variables":
+                    "log_B_PT,B_ETA,log_B_DIRA,log_B_ENDVERTEX_CHI2,log_B_IPCHI2_OWNPV,log_B_IP_OWNPV",
+                },
+                Inputs={
+                    "log_B_PT": fmath.log(F.PT),
+                    "B_ETA": F.ETA,
+                    "log_B_DIRA": fmath.log(1. - F.BPVDIRA(pvs)),
+                    "log_B_ENDVERTEX_CHI2": fmath.log(F.CHI2DOF),
+                    "log_B_IPCHI2_OWNPV": fmath.log(F.BPVIPCHI2(pvs)),
+                    "log_B_IP_OWNPV": fmath.log(F.BPVIP(pvs)),
+                }),
+            #'SSPionBDT_Mistag': F.SSPionBDT_Mistag(sspionTagging.OutputFlavourTags),
+            #'SSPionBDT_Decision': F.SSPionBDT_Decision(sspionTagging.OutputFlavourTags),
+
+        }
+    )
+    return make_composite_variables(options, pvs, data, add_truth)+make_tistoscombinations(options, pvs, data)+variables
+
 def make_DeltaM_variable(options):
     return FunctorCollection({"DM": F.MASS - F.CHILD(1, F.MASS)})
 
diff --git a/Charm_2024validation/tmp.yaml b/Charm_2024validation/tmp.yaml
new file mode 100644
index 0000000000..c871485c24
--- /dev/null
+++ b/Charm_2024validation/tmp.yaml
@@ -0,0 +1,12 @@
+( '27186011', 'dst_to_dee', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27185021', 'dst_to_dee', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27184011', 'dst_to_dee', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27186011', 'dst_to_dee', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '27185021', 'dst_to_dee', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '27184011', 'dst_to_dee', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '27186011', 'dst_to_dee', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '27185021', 'dst_to_dee', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '27184011', 'dst_to_dee', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '27186011', 'dst_to_dee', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27185021', 'dst_to_dee', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27184011', 'dst_to_dee', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-- 
GitLab


From bf90432c8e23e45cf26c2769c03527195609b8fb Mon Sep 17 00:00:00 2001
From: Serena Maccolini <serena.maccolini@cern.ch>
Date: Mon, 15 Jul 2024 16:59:34 +0200
Subject: [PATCH 02/51] cleaning up

---
 Charm_2024validation/README.md                |   68 -
 Charm_2024validation/dummy.yaml               |   16 -
 Charm_2024validation/info.yaml                |  122 --
 Charm_2024validation/info_MC_4localtest.yaml  |  122 --
 Charm_2024validation/info_MC_noUT.yaml        |  121 --
 Charm_2024validation/info_data.yaml           |   53 -
 Charm_2024validation/info_data_noUT.yaml      |   50 -
 Charm_2024validation/main_d0_to_hh.py         |   58 -
 Charm_2024validation/main_d0_to_hhhh.py       |   40 -
 Charm_2024validation/main_d0_to_hhpi0.py      |   43 -
 Charm_2024validation/main_d0_to_kshh.py       |   75 -
 Charm_2024validation/main_d0_to_ksks.py       |   59 -
 Charm_2024validation/main_d_to_hhh.py         |   63 -
 Charm_2024validation/main_d_to_ksh.py         |   48 -
 .../main_detection_asymmetry.py               |   31 -
 Charm_2024validation/main_dst_to_dee.py       |   42 -
 Charm_2024validation/main_rare_charm.py       |   41 -
 Charm_2024validation/options/d0_to_hh.py      |  432 -----
 Charm_2024validation/options/d0_to_hh_MC.py   |   99 -
 Charm_2024validation/options/d0_to_hhhh.py    |  247 ---
 Charm_2024validation/options/d0_to_hhhh_MC.py |   43 -
 Charm_2024validation/options/d0_to_hhpi0.py   |  359 ----
 .../options/d0_to_hhpi0_MC.py                 |   44 -
 Charm_2024validation/options/d0_to_kshh.py    | 1585 -----------------
 Charm_2024validation/options/d0_to_kshh_MC.py |   44 -
 Charm_2024validation/options/d0_to_ksks.py    | 1049 -----------
 Charm_2024validation/options/d0_to_ksks_MC.py |   46 -
 Charm_2024validation/options/d_to_hhh.py      |  503 ------
 Charm_2024validation/options/d_to_hhh_MC.py   |   92 -
 Charm_2024validation/options/d_to_ksh.py      |  313 ----
 Charm_2024validation/options/d_to_ksh_MC.py   |   68 -
 .../options/detection_asymmetry.py            |  191 --
 Charm_2024validation/options/dst_to_dee.py    |  296 ---
 Charm_2024validation/options/hlt1.py          |   33 -
 Charm_2024validation/options/hlt2/d0_to_hh.py |    9 -
 .../options/hlt2/d0_to_hhhh.py                |    8 -
 .../options/hlt2/d0_to_hhpi0.py               |    8 -
 .../options/hlt2/d0_to_kshh.py                |    8 -
 .../options/hlt2/d0_to_ksks.py                |    8 -
 Charm_2024validation/options/hlt2/d_to_hhh.py |   10 -
 Charm_2024validation/options/hlt2/d_to_ksh.py |   10 -
 .../options/hlt2/dst_to_dee.py                |    9 -
 Charm_2024validation/options/hlt2/hlt2.py     |   32 -
 .../options/hlt2/hlt2_d0_to_hh.py             |   41 -
 .../options/hlt2/hlt2_d0_to_hhhh.py           |   40 -
 .../options/hlt2/hlt2_d0_to_hhpi0.py          |   40 -
 .../options/hlt2/hlt2_d0_to_kshh.py           |   40 -
 .../options/hlt2/hlt2_d0_to_ksks.py           |   40 -
 .../options/hlt2/hlt2_d_to_hhh.py             |   42 -
 .../options/hlt2/hlt2_d_to_ksh.py             |   42 -
 .../options/hlt2/hlt2_dst_to_dee.py           |   41 -
 .../options/hlt2/hlt2_rare_charm.py           |   40 -
 Charm_2024validation/options/hlt2/hlt2noUT.py |   32 -
 .../options/hlt2/make_hlt2_decay.sh           |    9 -
 .../options/hlt2/rare_charm.py                |    8 -
 Charm_2024validation/options/rare_charm.py    |  496 ------
 Charm_2024validation/options/tupling.py       |  986 ----------
 Charm_2024validation/tmp.yaml                 |   12 -
 58 files changed, 8507 deletions(-)
 delete mode 100644 Charm_2024validation/README.md
 delete mode 100644 Charm_2024validation/dummy.yaml
 delete mode 100644 Charm_2024validation/info.yaml
 delete mode 100644 Charm_2024validation/info_MC_4localtest.yaml
 delete mode 100644 Charm_2024validation/info_MC_noUT.yaml
 delete mode 100644 Charm_2024validation/info_data.yaml
 delete mode 100644 Charm_2024validation/info_data_noUT.yaml
 delete mode 100644 Charm_2024validation/main_d0_to_hh.py
 delete mode 100644 Charm_2024validation/main_d0_to_hhhh.py
 delete mode 100644 Charm_2024validation/main_d0_to_hhpi0.py
 delete mode 100644 Charm_2024validation/main_d0_to_kshh.py
 delete mode 100644 Charm_2024validation/main_d0_to_ksks.py
 delete mode 100644 Charm_2024validation/main_d_to_hhh.py
 delete mode 100644 Charm_2024validation/main_d_to_ksh.py
 delete mode 100644 Charm_2024validation/main_detection_asymmetry.py
 delete mode 100644 Charm_2024validation/main_dst_to_dee.py
 delete mode 100644 Charm_2024validation/main_rare_charm.py
 delete mode 100644 Charm_2024validation/options/d0_to_hh.py
 delete mode 100644 Charm_2024validation/options/d0_to_hh_MC.py
 delete mode 100644 Charm_2024validation/options/d0_to_hhhh.py
 delete mode 100644 Charm_2024validation/options/d0_to_hhhh_MC.py
 delete mode 100644 Charm_2024validation/options/d0_to_hhpi0.py
 delete mode 100644 Charm_2024validation/options/d0_to_hhpi0_MC.py
 delete mode 100644 Charm_2024validation/options/d0_to_kshh.py
 delete mode 100644 Charm_2024validation/options/d0_to_kshh_MC.py
 delete mode 100644 Charm_2024validation/options/d0_to_ksks.py
 delete mode 100644 Charm_2024validation/options/d0_to_ksks_MC.py
 delete mode 100644 Charm_2024validation/options/d_to_hhh.py
 delete mode 100644 Charm_2024validation/options/d_to_hhh_MC.py
 delete mode 100644 Charm_2024validation/options/d_to_ksh.py
 delete mode 100644 Charm_2024validation/options/d_to_ksh_MC.py
 delete mode 100644 Charm_2024validation/options/detection_asymmetry.py
 delete mode 100644 Charm_2024validation/options/dst_to_dee.py
 delete mode 100644 Charm_2024validation/options/hlt1.py
 delete mode 100644 Charm_2024validation/options/hlt2/d0_to_hh.py
 delete mode 100644 Charm_2024validation/options/hlt2/d0_to_hhhh.py
 delete mode 100644 Charm_2024validation/options/hlt2/d0_to_hhpi0.py
 delete mode 100644 Charm_2024validation/options/hlt2/d0_to_kshh.py
 delete mode 100644 Charm_2024validation/options/hlt2/d0_to_ksks.py
 delete mode 100644 Charm_2024validation/options/hlt2/d_to_hhh.py
 delete mode 100644 Charm_2024validation/options/hlt2/d_to_ksh.py
 delete mode 100644 Charm_2024validation/options/hlt2/dst_to_dee.py
 delete mode 100644 Charm_2024validation/options/hlt2/hlt2.py
 delete mode 100644 Charm_2024validation/options/hlt2/hlt2_d0_to_hh.py
 delete mode 100644 Charm_2024validation/options/hlt2/hlt2_d0_to_hhhh.py
 delete mode 100644 Charm_2024validation/options/hlt2/hlt2_d0_to_hhpi0.py
 delete mode 100644 Charm_2024validation/options/hlt2/hlt2_d0_to_kshh.py
 delete mode 100644 Charm_2024validation/options/hlt2/hlt2_d0_to_ksks.py
 delete mode 100644 Charm_2024validation/options/hlt2/hlt2_d_to_hhh.py
 delete mode 100644 Charm_2024validation/options/hlt2/hlt2_d_to_ksh.py
 delete mode 100644 Charm_2024validation/options/hlt2/hlt2_dst_to_dee.py
 delete mode 100644 Charm_2024validation/options/hlt2/hlt2_rare_charm.py
 delete mode 100644 Charm_2024validation/options/hlt2/hlt2noUT.py
 delete mode 100644 Charm_2024validation/options/hlt2/make_hlt2_decay.sh
 delete mode 100644 Charm_2024validation/options/hlt2/rare_charm.py
 delete mode 100644 Charm_2024validation/options/rare_charm.py
 delete mode 100644 Charm_2024validation/options/tupling.py
 delete mode 100644 Charm_2024validation/tmp.yaml

diff --git a/Charm_2024validation/README.md b/Charm_2024validation/README.md
deleted file mode 100644
index f061ea162c..0000000000
--- a/Charm_2024validation/README.md
+++ /dev/null
@@ -1,68 +0,0 @@
-Analysis production for 2024 data validation within the Charm WG.
-
-For easy tests, eg. on `d_to_hhh` subset:
-```sh
-lb-run DaVinci/v64r2 lbexec Charm_2024validation.main_d_to_hhh:main Charm_2024validation/dummy.yaml
-```
-
-Decays and Hlt2 lines considered are:
-- `d0_to_hh.py`:
-  - Dst2D0pi_D02Kpi_RS     "Hlt2Charm_DstpToD0Pip_D0ToKmPip"
-  - Dst2D0pi_D02Kpi_WS     "Hlt2Charm_DstpToD0Pip_D0ToKpPim"
-  - Dst2D0pi_D02KK     "Hlt2Charm_DstpToD0Pip_D0ToKmKp"
-  - Dst2D0pi_D02pipi     "Hlt2Charm_DstpToD0Pip_D0ToPimPip"
-  - D02Kpi     "Hlt2Charm_D0ToKmPip"
-  - D02KK     "Hlt2Charm_D0ToKmKp"
-  - D02pipi     "Hlt2Charm_D0ToPimPip"
-  - Dst2D0pi_D02Kpi_RS_LowBias     "Hlt2Charm_DstpToD0Pip_D0ToKmPip_LowBias"
-  - Dst2D0pi_D02Kpi_WS_LowBias     "Hlt2Charm_DstpToD0Pip_D0ToKpPim_LowBias"
-  - Dst2D0pi_D02KK_LowBias     "Hlt2Charm_DstpToD0Pip_D0ToKmKp_LowBias"
-  - Dst2D0pi_D02pipi_LowBias     "Hlt2Charm_DstpToD0Pip_D0ToPimPip_LowBias"
-  - D02Kpi_LowBias     "Hlt2Charm_D0ToKmPip_LowBias"
-  - D02KK_LowBias     "Hlt2Charm_D0ToKmKp_LowBias"
-  - D02pipi_LowBias     "Hlt2Charm_D0ToPimPip_LowBias"
-- `d_to_ksh.py`:
-  - D2KSpi_LL     "Hlt2Charm_DpDspToKsPip_LL"
-  - D2KSpi_LD     "Hlt2Charm_DpDspToKsPip_LD"
-  - D2KSpi_DD     "Hlt2Charm_DpDspToKsPip_DD"
-  - D2KSK_LL     "Hlt2Charm_DpDspToKsKp_LL"
-  - D2KSK_LD     "Hlt2Charm_DpDspToKsKp_LD"
-  - D2KSK_DD     "Hlt2Charm_DpDspToKsKp_DD"
-- `d_to_hhh.py`:
-  - D2Kpipi     "Hlt2Charm_DpDspToKmPipPip"
-  - D2Kpipi_NoCuts     "Hlt2Charm_DpDspToKmPipPip_NoCuts"
-  - Ds2KKpi     "Hlt2Charm_DspToKmKpPip"
-  - Ds2KKpi_NoCuts     "Hlt2Charm_DspToKmKpPip_NoCuts"
-  - D2pipipi     "Hlt2Charm_DpDspToPimPipPip"
-  - D2pipipi_NoCuts     "Hlt2Charm_DpDspToPimPipPip_NoCuts"
-- `d0_to_hhpi0.py`:
-  - Dst2D0pi_D02Kpipi0 "Hlt2Charm_DstpToD0Pip_D0ToKmPipPi0_{M,R}"
-  - Dst2D0pi_D02KKpi0 "Hlt2Charm_DstpToD0Pip_D0ToKmKpPi0_{M,R}"
-  - Dst2D0pi_D02pipipi0 "Hlt2Charm_DstpToD0Pip_D0ToPimPipPi0_{M,R}"
-- `detection_asymmetry.py`:
-  - D2Kpipi_ADet "Hlt2Charm_DpToKmPipPip_ADet"
-  - D2KSK_LL_ADet "Hlt2Charm_DspToKsKp_LL_ADet"
-  - D2KSpi_LL_ADet "Hlt2Charm_DpToKsPip_LL_ADet"
-  - D2pipipi_ADet "Hlt2Charm_DspToPimPipPip_ADet"
-  - Ds2KKpi_ADet "Hlt2Charm_DspToKmKpPip_ADet"
-  - Lc2KSp_LL_ADet "Hlt2Charm_LcpToPpKs_LL_ADet"
-  - Lc2pKpi_ADet "Hlt2Charm_LcpToPpKmPip_ADet"
-- `rare_charm.py`:
-  - D2pimumu "Hlt2Charm_DpDspToPipMumMup"
-  - D2pimumu_WS "Hlt2Charm_DpDspToPipMupMup_RareCharmControl"
-  - Dst2D0pi_D02Kpimumu_RS "Hlt2Charm_DstpToD0Pip_D0ToKmPipMumMup"
-- `d0_to_kshh.py`:
-- `d0_to_ksks.py`:
-- `dst_to_dee.py`:
-  -  Dst02D0EmEp_D02KmPip_OS    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS',
-  -  Dst02D0EmEp_D02KmPip_SS 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS',
-  -  Dst02D0EmEp_D02KmPip_OS_MVA 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS_MVA',
-  -  Dst02D0EmEp_D02KmPip_SS_MVA 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS_MVA',
-  -  Dst02D0EmEp_D02KmPimPipPip_OS 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS',
-  -  Dst02D0EmEp_D02KmPimPipPip_SS 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS',
-  -  Dst02D0EmEp_D02KmPimPipPip_OS_MVA 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS_MVA',
-  -  Dst02D0EmEp_D02KmPimPipPip_SS_MVA 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS_MVA',
-  -  Dstp2DpDspEmEp_DpDsp2KmKpPip_OS 'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS',
-  -  Dstp2DpDspEmEp_DpDsp2KmKpPip_SS 'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS',
-  -  Dstp2DpDspEmEp_DpDsp2KmKpPip_OS_MVA 'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS_MVA',
-  -  Dstp2DpDspEmEp_DpDsp2KmKpPip_SS_MVA'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS_MVA',
diff --git a/Charm_2024validation/dummy.yaml b/Charm_2024validation/dummy.yaml
deleted file mode 100644
index 5bebae4ac3..0000000000
--- a/Charm_2024validation/dummy.yaml
+++ /dev/null
@@ -1,16 +0,0 @@
-input_files:
-- root://myProxy@lhcbxrootd-kit.gridka.de//pnfs/gridka.de/lhcb/LHCb-Disk/lhcb/LHCb/Collision23/CHARM.DST/00198130/0000/00198130_00000552_1.charm.dst
-input_raw_format: 0.5
-input_type: ROOT
-output_type: ROOT
-event_store: HiveWhiteBoard
-simulation: False
-data_type: "Upgrade"
-geometry_version: run3/trunk
-conditions_version: Alignment2023_HLT2Processing_26_8_2023
-scheduler_legacy_mode: False
-input_process: "TurboPass"
-input_stream: "charm"
-histo_file: CHARM_HISTO.ROOT
-ntuple_file: CHARM.ROOT
-evt_max: 1000
diff --git a/Charm_2024validation/info.yaml b/Charm_2024validation/info.yaml
deleted file mode 100644
index 26de654976..0000000000
--- a/Charm_2024validation/info.yaml
+++ /dev/null
@@ -1,122 +0,0 @@
-defaults:
-  inform:
-    - serena.maccolini@cern.ch
-  wg: Charm
-
-{%- set conditions = [
-  "MagDown",
-]%}
-
-{%- set evttype_subsample_nutext_nu_dir1_dir2_dddb = [
-( '27163102', 'd0_to_hh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163101', 'd0_to_hh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163100', 'd0_to_hh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '23103042', 'd_to_hhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '23263022', 'd_to_hhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '21263012', 'd_to_hhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163471', 'd0_to_hhpi0', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27165903', 'd0_to_kshh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27165071', 'd0_to_hhhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27265008', 'd0_to_hhhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27265009', 'd0_to_hhhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27165072', 'd0_to_hhhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '23103111', 'd_to_ksh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '21103101', 'd_to_ksh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '23173003', 'rare_charm', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-
-( '27163102', 'd0_to_hh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163101', 'd0_to_hh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163100', 'd0_to_hh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '23103042', 'd_to_hhh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '23263022', 'd_to_hhh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '21263012', 'd_to_hhh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163471', 'd0_to_hhpi0', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '27165903', 'd0_to_kshh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '27165071', 'd0_to_hhhh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-
-( '27163102', 'd0_to_hh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163101', 'd0_to_hh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163100', 'd0_to_hh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '23103042', 'd_to_hhh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '23263022', 'd_to_hhh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '21263012', 'd_to_hhh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163471', 'd0_to_hhpi0', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '27165903', 'd0_to_kshh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '27165071', 'd0_to_hhhh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-
-( '27163102', 'd0_to_hh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163101', 'd0_to_hh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163100', 'd0_to_hh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '23103042', 'd_to_hhh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '23263022', 'd_to_hhh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '21263012', 'd_to_hhh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163471', 'd0_to_hhpi0', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27165903', 'd0_to_kshh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27165071', 'd0_to_hhhh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-
-]%}
-
-
-
-{%- for evttype, id, nutext, nu, dir1, dir2, dddb in evttype_subsample_nutext_nu_dir1_dir2_dddb %}
-
-{% for polarity in conditions %}
-
-{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1:
-  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
-  input:
-    bk_query: "/MC/{{dir1}}/Beam6800GeV-2024{{dir2}}-{{polarity}}-Nu{{nu}}-25ns-Pythia8/Sim10d/{{evttype}}/DIGI"
-    n_test_lfns: 3
-  output: HLT1.DST
-  options:
-    entrypoint: Charm_2024validation.options.hlt1:alg_config
-    extra_options:
-      input_raw_format: 0.5
-      conddb_tag: sim10-2024.Q1.2-v1.1-md100
-      dddb_tag: '{{dddb}}'
-      input_type: ROOT
-      output_type: ROOT
-      simulation: True
-      data_type: "Upgrade"
-      scheduler_legacy_mode: False
-      evt_max: 1000
-
-{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2:
-  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
-  input:
-    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1
-  output: HLT2.DST
-  options:
-    entrypoint: Charm_2024validation.options.hlt2.hlt2_{{id}}:alg_config
-    extra_options:
-      conddb_tag: sim10-2024.Q1.2-v1.1-md100
-      dddb_tag: '{{dddb}}'
-      input_raw_format: 0.5
-      input_type: "ROOT"
-      output_type: "ROOT"
-      simulation: True
-      data_type: "Upgrade"
-      output_manifest_file: "HLT2.tck.json"
-      scheduler_legacy_mode: False
-
-MC_{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}:
-  application: "DaVinci/v64r7@x86_64_v3-el9-gcc13+detdesc-opt+g"
-  input:
-    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2
-  output: DVTUPLE.ROOT
-  options:
-    entrypoint: Charm_2024validation.main_{{id}}:main
-    extra_options:
-      conddb_tag: sim10-2024.Q1.2-v1.1-md100
-      dddb_tag: '{{dddb}}'
-      input_raw_format: 0.5
-      input_type: ROOT
-      simulation: True
-      data_type: "Upgrade"
-      event_store: HiveWhiteBoard
-      input_process: "Hlt2"
-      input_manifest_file: "HLT2.tck.json"
-      write_decoding_keys_to_git: false
-      
-{%- endfor %}
-{%- endfor %}
diff --git a/Charm_2024validation/info_MC_4localtest.yaml b/Charm_2024validation/info_MC_4localtest.yaml
deleted file mode 100644
index 3d18e13274..0000000000
--- a/Charm_2024validation/info_MC_4localtest.yaml
+++ /dev/null
@@ -1,122 +0,0 @@
-defaults:
-  inform:
-    - serena.maccolini@cern.ch
-  wg: Charm
-
-{%- set conditions = [
-  "MagDown",
-]%}
-
-{%- set evttype_subsample_nutext_nu_dir1_dir2_dddb_geometry = [
-( '27163102', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163101', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163100', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23103042', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23263022', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '21263012', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163471', 'd0_to_hhpi0', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165903', 'd0_to_kshh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165071', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27265008', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27265009', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165072', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23103111', 'd_to_ksh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '21103101', 'd_to_ksh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23173003', 'rare_charm', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163102', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163101', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163100', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23103042', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23263022', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '21263012', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163471', 'd0_to_hhpi0', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165903', 'd0_to_kshh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165071', 'd0_to_hhhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163102', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163101', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163100', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23103042', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23263022', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '21263012', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163471', 'd0_to_hhpi0', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165903', 'd0_to_kshh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165071', 'd0_to_hhhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163102', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163101', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163100', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23103042', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23263022', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '21263012', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163471', 'd0_to_hhpi0', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165903', 'd0_to_kshh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165071', 'd0_to_hhhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165901', 'd0_to_ksks', '7p6', '7.6', 'Dev', '', 'dddb-20231017', 'run3/trunk'),
-]%}
-
-
-
-{%- for evttype, id, nutext, nu, dir1, dir2, dddb, geometry in evttype_subsample_nutext_nu_dir1_dir2_dddb_geometry %}
-
-{% for polarity in conditions %}
-
-{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1:
-  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
-  input:
-    bk_query: "/MC/{{dir1}}/Beam6800GeV-expected-2024{{dir2}}-{{polarity}}-Nu{{nu}}-25ns-Pythia8/Sim10c/{{evttype}}/DIGI"
-    n_test_lfns: 3
-  output: HLT1.DST
-  options:
-    entrypoint: Charm_2024validation.options.hlt1:alg_config
-    extra_options:
-      input_raw_format: 0.5
-      conddb_tag: sim-20231017-vc-md100
-      dddb_tag: '{{dddb}}'
-      input_type: ROOT
-      output_type: ROOT
-      simulation: True
-      data_type: "Upgrade"
-      scheduler_legacy_mode: False
-      geometry_version: "{{geometry}}"
-      evt_max: 1000
-
-{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2:
-  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
-  input:
-    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1
-  output: HLT2.DST
-  options:
-    entrypoint: Charm_2024validation.options.hlt2.hlt2_{{id}}:alg_config
-    extra_options:
-      conddb_tag: sim-20231017-vc-md100
-      dddb_tag: '{{dddb}}'
-      input_raw_format: 0.5
-      input_type: "ROOT"
-      output_type: "ROOT"
-      simulation: True
-      data_type: "Upgrade"
-      output_manifest_file: "HLT2.tck.json"
-      scheduler_legacy_mode: False
-      geometry_version: "{{geometry}}"
-
-MC_{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}:
-  application: "DaVinci/v64r3@x86_64_v3-el9-gcc13+detdesc-opt+g"
-  input:
-    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2
-  output: DVTUPLE.ROOT
-  options:
-    entrypoint: Charm_2024validation.main_{{id}}:main
-    extra_options:
-      conddb_tag: sim-20231017-vc-md100
-      dddb_tag: '{{dddb}}'
-      input_raw_format: 0.5
-      input_type: ROOT
-      simulation: True
-      data_type: "Upgrade"
-      event_store: HiveWhiteBoard
-      geometry_version: "{{geometry}}"
-      input_process: "Hlt2"
-      input_manifest_file: "HLT2.tck.json"
-      write_decoding_keys_to_git: false
-
-{%- endfor %}
-{%- endfor %}
diff --git a/Charm_2024validation/info_MC_noUT.yaml b/Charm_2024validation/info_MC_noUT.yaml
deleted file mode 100644
index 52df9e4e96..0000000000
--- a/Charm_2024validation/info_MC_noUT.yaml
+++ /dev/null
@@ -1,121 +0,0 @@
-defaults:
-  inform:
-    - serena.maccolini@cern.ch
-  wg: Charm
-
-{%- set conditions = [
-  "MagDown",
-]%}
-
-{%- set evttype_subsample_nutext_nu_dir1_dir2_dddb_geometry = [
-( '27163102', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163101', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163100', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23103042', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23263022', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '21263012', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163471', 'd0_to_hhpi0', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165903', 'd0_to_kshh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165071', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27265008', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27265009', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165072', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23103111', 'd_to_ksh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '21103101', 'd_to_ksh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23173003', 'rare_charm', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163102', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163101', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163100', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23103042', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23263022', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '21263012', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163471', 'd0_to_hhpi0', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165903', 'd0_to_kshh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165071', 'd0_to_hhhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163102', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163101', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163100', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23103042', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23263022', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '21263012', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163471', 'd0_to_hhpi0', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165903', 'd0_to_kshh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165071', 'd0_to_hhhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163102', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163101', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163100', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23103042', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23263022', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '21263012', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163471', 'd0_to_hhpi0', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165903', 'd0_to_kshh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165071', 'd0_to_hhhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165901', 'd0_to_ksks', '7p6', '7.6', 'Dev', '', 'dddb-20231017', 'run3/trunk'),
-]%}
-
-
-
-{%- for evttype, id, nutext, nu, dir1, dir2, dddb, geometry in evttype_subsample_nutext_nu_dir1_dir2_dddb_geometry %}
-
-{% for polarity in conditions %}
-
-{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1:
-  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
-  input:
-    bk_query: "/MC/{{dir1}}/Beam6800GeV-expected-2024{{dir2}}-{{polarity}}-Nu{{nu}}-25ns-Pythia8/Sim10c/{{evttype}}/DIGI"
-    n_test_lfns: 3
-  output: HLT1.DST
-  options:
-    entrypoint: Charm_2024validation.options.hlt1:alg_config
-    extra_options:
-      input_raw_format: 0.5
-      conddb_tag: sim-20231017-vc-md100
-      dddb_tag: '{{dddb}}'
-      input_type: ROOT
-      output_type: ROOT
-      simulation: True
-      data_type: "Upgrade"
-      scheduler_legacy_mode: False
-      geometry_version: "{{geometry}}"
-      evt_max: -1
-
-{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2:
-  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
-  input:
-    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1
-  output: HLT2.DST
-  options:
-    entrypoint: Charm_2024validation.options.hlt2.hlt2_{{id}}:alg_config
-    extra_options:
-      conddb_tag: sim-20231017-vc-md100
-      dddb_tag: '{{dddb}}'
-      input_raw_format: 0.5
-      input_type: "ROOT"
-      output_type: "ROOT"
-      simulation: True
-      data_type: "Upgrade"
-      output_manifest_file: "HLT2.tck.json"
-      scheduler_legacy_mode: False
-      geometry_version: "{{geometry}}"
-
-MC_{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}:
-  application: "DaVinci/v64r3@x86_64_v3-el9-gcc13+detdesc-opt+g"
-  input:
-    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2
-  output: DVTUPLE.ROOT
-  options:
-    entrypoint: Charm_2024validation.main_{{id}}:main
-    extra_options:
-      conddb_tag: sim-20231017-vc-md100
-      dddb_tag: '{{dddb}}'
-      input_raw_format: 0.5
-      input_type: ROOT
-      simulation: True
-      data_type: "Upgrade"
-      event_store: HiveWhiteBoard
-      geometry_version: "{{geometry}}"
-      input_process: "Hlt2"
-      input_manifest_file: "HLT2.tck.json"
-
-{%- endfor %}
-{%- endfor %}
diff --git a/Charm_2024validation/info_data.yaml b/Charm_2024validation/info_data.yaml
deleted file mode 100644
index cf3b7dcdf9..0000000000
--- a/Charm_2024validation/info_data.yaml
+++ /dev/null
@@ -1,53 +0,0 @@
-defaults:
-  inform:
-    - serena.maccolini@cern.ch
-  wg: Charm
-
-{%- set conditions = [
-  "MagDown",
-]%}
-
-
-
-{%- set subsamples = [
-  "d0_to_hh",
-  "d_to_hhh",
-  "d_to_ksh",
-  "d0_to_hhpi0",
-  "d0_to_kshh",
-  "d0_to_ksks",
-  "d0_to_hhhh",
-  "rare_charm",
-  "detection_asymmetry",
-  "dst_to_dee",
-]%}
-
-{% for id in subsamples %}
-{% for polarity in conditions %}
-
-{{id}}_2024_{{ polarity }}:
-  application: "DaVinci/v64r7"
-  input:
-    bk_query: "/LHCb/Collision24/Beam6800GeV-VeloClosed-{{polarity}}/Real Data/Sprucing24c2/94000000/CHARM.DST"
-
-    dq_flags:
-      - UNCHECKED
-      - OK
-    keep_running: true
-  output: DVTUPLE_{{id}}.ROOT
-  options:
-    entrypoint: Charm_2024validation.main_{{id}}:main
-    extra_options:
-      input_raw_format: 0.5
-      input_type: ROOT
-      simulation: False
-      data_type: "Upgrade"
-      event_store: HiveWhiteBoard
-      geometry_version: run3/2024.Q1.2-v00.00
-      conditions_version: master
-      input_process: "TurboPass"
-      input_stream: "charm"
-      evt_max: -1
-
-{%- endfor %}
-{%- endfor %}
diff --git a/Charm_2024validation/info_data_noUT.yaml b/Charm_2024validation/info_data_noUT.yaml
deleted file mode 100644
index 8c750c72d0..0000000000
--- a/Charm_2024validation/info_data_noUT.yaml
+++ /dev/null
@@ -1,50 +0,0 @@
-defaults:
-  inform:
-    - serena.maccolini@cern.ch
-  wg: Charm
-
-{%- set conditions = [
-  "MagDown",
-]%}
-
-
-
-{%- set subsamples = [
-  "d0_to_hh",
-  "d_to_hhh",
-  "d_to_ksh",
-  "d0_to_hhpi0",
-  "d0_to_kshh",
-  "d0_to_ksks",
-  "d0_to_hhhh",
-  "rare_charm",
-  "detection_asymmetry",
-]%}
-
-{% for id in subsamples %}
-{% for polarity in conditions %}
-
-{{id}}_2024_{{ polarity }}:
-  application: "DaVinci/v64r5"
-  input:
-    bk_query: "/LHCb/Collision24/Beam6800GeV-VeloClosed-{{polarity}}-Excl-UT/Real Data/Sprucing24c1/94000000/CHARM.DST"
-    dq_flags:
-      - UNCHECKED
-      - OK
-    keep_running: true
-  output: DVTUPLE_{{id}}.ROOT
-  options:
-    entrypoint: Charm_2024validation.main_{{id}}:main
-    extra_options:
-      input_raw_format: 0.5
-      input_type: ROOT
-      simulation: False
-      data_type: "Upgrade"
-      event_store: HiveWhiteBoard
-      geometry_version: run3/2024.Q1.2-v00.00
-      conditions_version: master
-      input_process: "TurboPass"
-      input_stream: "charm"
-
-{%- endfor %}
-{%- endfor %}
diff --git a/Charm_2024validation/main_d0_to_hh.py b/Charm_2024validation/main_d0_to_hh.py
deleted file mode 100644
index 12eea15463..0000000000
--- a/Charm_2024validation/main_d0_to_hh.py
+++ /dev/null
@@ -1,58 +0,0 @@
-###############################################################################
-# (c) Copyright 2021-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 .options.d0_to_hh import *
-from .options.d0_to_hh_MC import *
-
-from DaVinci import Options, make_config
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-        #D02hh
-        "D02Kpi" : maketuple_D02Kpi(options, pvs, rec_summary),
-        "D02KK" : maketuple_D02KK(options, pvs, rec_summary),
-        "D02pipi" : maketuple_D02pipi(options, pvs, rec_summary),
-        #Dst2D0pi_D02hh
-        "Dst2D0pi_D02Kpi_RS" : maketuple_Dst2D0pi_D02Kpi_RS(options, pvs, rec_summary),
-        "Dst2D0pi_D02Kpi_WS" : maketuple_Dst2D0pi_D02Kpi_WS(options, pvs, rec_summary),
-        "Dst2D0pi_D02KK" : maketuple_Dst2D0pi_D02KK(options, pvs, rec_summary),
-        "Dst2D0pi_D02pipi" : maketuple_Dst2D0pi_D02pipi(options, pvs, rec_summary),
-
-        ##LowBias
-        #D02hh
-        "D02Kpi_LowBias" : maketuple_D02Kpi_LowBias(options, pvs, rec_summary),
-        "D02KK_LowBias" : maketuple_D02KK_LowBias(options, pvs, rec_summary),
-        "D02pipi_LowBias" : maketuple_D02pipi_LowBias(options, pvs, rec_summary),
-        #Dst2D0pi_D02hh
-        "Dst2D0pi_D02Kpi_RS_LowBias" : maketuple_Dst2D0pi_D02Kpi_RS_LowBias(options, pvs, rec_summary),
-        "Dst2D0pi_D02Kpi_WS_LowBias" : maketuple_Dst2D0pi_D02Kpi_WS_LowBias(options, pvs, rec_summary),
-        "Dst2D0pi_D02KK_LowBias" : maketuple_Dst2D0pi_D02KK_LowBias(options, pvs, rec_summary),
-        "Dst2D0pi_D02pipi_LowBias" : maketuple_Dst2D0pi_D02pipi_LowBias(options, pvs, rec_summary),
-    }
-
-    MCtuples = {
-        "MC_Dst2D0pi_D02Kpi_RS" : maketuple_MC_Dst2D0pi_D02Kpi_RS(options, pvs, rec_summary),
-        "MC_Dst2D0pi_D02KK_RS" : maketuple_MC_Dst2D0pi_D02KK(options, pvs, rec_summary),
-        "MC_Dst2D0pi_D02pipi" : maketuple_MC_Dst2D0pi_D02pipi(options, pvs, rec_summary),
-    }
-
-    if options.simulation:
-        tuples = tuples | MCtuples
-
-    config = make_config(options, tuples)
-
-    return config
diff --git a/Charm_2024validation/main_d0_to_hhhh.py b/Charm_2024validation/main_d0_to_hhhh.py
deleted file mode 100644
index 5fb555ccfd..0000000000
--- a/Charm_2024validation/main_d0_to_hhhh.py
+++ /dev/null
@@ -1,40 +0,0 @@
-###############################################################################
-# (c) Copyright 2021-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 .options.d0_to_hhhh import *
-from .options.d0_to_hhhh_MC import *
-
-from DaVinci import Options, make_config
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-        
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-        "DstToD0pi_D0ToKKPiPi" : maketuple_DstToD0pi_D0ToKKPiPi(options, pvs, rec_summary),
-        "DstToD0pi_D0ToKPiPiPi" : maketuple_DstToD0pi_D0ToKPiPiPi(options, pvs, rec_summary),
-        "DstToD0pi_D0ToPiKPiPi" : maketuple_DstToD0pi_D0ToPiKPiPi(options, pvs, rec_summary),
-        "DstToD0pi_D0ToPiPiPiPi" : maketuple_DstToD0pi_D0ToPiPiPiPi(options, pvs, rec_summary),
-    }
-
-    MCtuples = {
-        "MC_DstToD0pi_D0ToKPiPiPi" : maketuple_MC_DstToD0pi_D0ToKPiPiPi(options, pvs, rec_summary),
-    }
-    
-    if options.simulation:
-        tuples = tuples | MCtuples
-        
-    config = make_config(options, tuples)
-
-    return config
diff --git a/Charm_2024validation/main_d0_to_hhpi0.py b/Charm_2024validation/main_d0_to_hhpi0.py
deleted file mode 100644
index ac59dc71d9..0000000000
--- a/Charm_2024validation/main_d0_to_hhpi0.py
+++ /dev/null
@@ -1,43 +0,0 @@
-###############################################################################
-# (c) Copyright 2021-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 .options.d0_to_hhpi0 import *
-from .options.d0_to_hhpi0_MC import *
-
-from DaVinci import Options, make_config
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-        
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-        #Dst2D0pi_D02hhpi0
-        "Dst2D0pi_D02Kpipi0_M" : maketuple_Dst2D0pi_D02Kpipi0_M(options, pvs, rec_summary),
-        "Dst2D0pi_D02KKpi0_M" : maketuple_Dst2D0pi_D02KKpi0_M(options, pvs, rec_summary),
-        "Dst2D0pi_D02pipipi0_M" : maketuple_Dst2D0pi_D02pipipi0_M(options, pvs, rec_summary),
-        "Dst2D0pi_D02Kpipi0_R" : maketuple_Dst2D0pi_D02Kpipi0_R(options, pvs, rec_summary),
-        "Dst2D0pi_D02KKpi0_R" : maketuple_Dst2D0pi_D02KKpi0_R(options, pvs, rec_summary),
-        "Dst2D0pi_D02pipipi0_R" : maketuple_Dst2D0pi_D02pipipi0_R(options, pvs, rec_summary),
-    }
-
-    MCtuples = {
-        "MC_Dst2D0pi_D02Kpipi0" : maketuple_MC_Dst2D0pi_D02Kpipi0(options, pvs, rec_summary),
-    }
-    
-    if options.simulation:
-        tuples = tuples | MCtuples
-        
-    config = make_config(options, tuples)
-
-    return config
diff --git a/Charm_2024validation/main_d0_to_kshh.py b/Charm_2024validation/main_d0_to_kshh.py
deleted file mode 100644
index f9cfbd58e2..0000000000
--- a/Charm_2024validation/main_d0_to_kshh.py
+++ /dev/null
@@ -1,75 +0,0 @@
-###############################################################################
-# (c) Copyright 2021-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 .options.d0_to_kshh import *
-from .options.d0_to_kshh_MC import *
-
-from DaVinci import Options, make_config
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-        #D02kshh
-        "D0ToKsPimPip_LL" : maketuple_D0ToKsPimPip_LL(options, pvs, rec_summary),
-        "D0ToKsPimPip_DD" : maketuple_D0ToKsPimPip_DD(options, pvs, rec_summary),
-        "D0ToKsKmPip_LL" : maketuple_D0ToKsKmPip_LL(options, pvs, rec_summary),
-        "D0ToKsKmPip_DD" : maketuple_D0ToKsKmPip_DD(options, pvs, rec_summary),
-        "D0ToKsKpPim_LL" : maketuple_D0ToKsKmPip_LL(options, pvs, rec_summary),
-        "D0ToKsKpPim_DD" : maketuple_D0ToKsKmPip_DD(options, pvs, rec_summary),
-        "D0ToKsKmKp_LL" : maketuple_D0ToKsKmKp_LL(options, pvs, rec_summary),
-        "D0ToKsKmKp_DD" : maketuple_D0ToKsKmKp_DD(options, pvs, rec_summary),
-        #Dst2D0pi_D02kshh
-        "DstpToD0Pip_D0ToKsPimPip_LL" : maketuple_DstpToD0Pip_D0ToKsPimPip_LL(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsPimPip_DD" : maketuple_DstpToD0Pip_D0ToKsPimPip_DD(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKmPip_LL" : maketuple_DstpToD0Pip_D0ToKsKmPip_LL(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKmPip_DD" : maketuple_DstpToD0Pip_D0ToKsKmPip_DD(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKpPim_LL" : maketuple_DstpToD0Pip_D0ToKsKmPip_LL(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKpPim_DD" : maketuple_DstpToD0Pip_D0ToKsKmPip_DD(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKmKp_LL" : maketuple_DstpToD0Pip_D0ToKsKmKp_LL(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKmKp_DD" : maketuple_DstpToD0Pip_D0ToKsKmKp_DD(options, pvs, rec_summary),
-
-        ##LowBias
-        #D02kshh
-        "D0ToKsPimPip_LL_LowBias" : maketuple_D0ToKsPimPip_LL_LowBias(options, pvs, rec_summary),
-        "D0ToKsPimPip_DD_LowBias" : maketuple_D0ToKsPimPip_DD_LowBias(options, pvs, rec_summary),
-        "D0ToKsKmPip_LL_LowBias" : maketuple_D0ToKsKmPip_LL_LowBias(options, pvs, rec_summary),
-        "D0ToKsKmPip_DD_LowBias" : maketuple_D0ToKsKmPip_DD_LowBias(options, pvs, rec_summary),
-        "D0ToKsKpPim_LL_LowBias" : maketuple_D0ToKsKmPip_LL_LowBias(options, pvs, rec_summary),
-        "D0ToKsKpPim_DD_LowBias" : maketuple_D0ToKsKmPip_DD_LowBias(options, pvs, rec_summary),
-        "D0ToKsKmKp_LL_LowBias" : maketuple_D0ToKsKmKp_LL_LowBias(options, pvs, rec_summary),
-        "D0ToKsKmKp_DD_LowBias" : maketuple_D0ToKsKmKp_DD_LowBias(options, pvs, rec_summary),
-        #Dst2D0pi_D02kshh
-        "DstpToD0Pip_D0ToKsPimPip_LL_LowBias" : maketuple_DstpToD0Pip_D0ToKsPimPip_LL_LowBias(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsPimPip_DD_LowBias" : maketuple_DstpToD0Pip_D0ToKsPimPip_DD_LowBias(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKmPip_LL_LowBias" : maketuple_DstpToD0Pip_D0ToKsKmPip_LL_LowBias(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKmPip_DD_LowBias" : maketuple_DstpToD0Pip_D0ToKsKmPip_DD_LowBias(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKpPim_LL_LowBias" : maketuple_DstpToD0Pip_D0ToKsKmPip_LL_LowBias(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKpPim_DD_LowBias" : maketuple_DstpToD0Pip_D0ToKsKmPip_DD_LowBias(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKmKp_LL_LowBias" : maketuple_DstpToD0Pip_D0ToKsKmKp_LL_LowBias(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKmKp_DD_LowBias" : maketuple_DstpToD0Pip_D0ToKsKmKp_DD_LowBias(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsPimPip_DD_NoBias" : maketuple_DstpToD0Pip_D0ToKsPimPip_LL_NoBias(options, pvs, rec_summary),
-    }
-
-    MCtuples = {
-        "MC_DstpToD0Pip_D0ToKsPimPip" : maketuple_MC_DstpToD0Pip_D0ToKsPimPip(options, pvs, rec_summary),
-    }
-
-    if options.simulation:
-        tuples = tuples | MCtuples
-
-    config = make_config(options, tuples)
-
-    return config
diff --git a/Charm_2024validation/main_d0_to_ksks.py b/Charm_2024validation/main_d0_to_ksks.py
deleted file mode 100644
index cb69552d78..0000000000
--- a/Charm_2024validation/main_d0_to_ksks.py
+++ /dev/null
@@ -1,59 +0,0 @@
-###############################################################################
-# (c) Copyright 2021-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.                                       #
-###############################################################################
-import Functors as F
-from Functors.math import log
-from DaVinci import Options, make_config
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunctorCollection
-import FunTuple.functorcollections as FC
-from FunTuple import FunTuple_Particles as Funtuple
-
-#D02KSKS
-from .options.d0_to_ksks import *
-from .options.d0_to_ksks_MC import *
-
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-        #D02KSKS
-        "Dst2D0pi_D02KSKS_LLLL" : maketuple_Dst2D0pi_D02KSKS_LLLL(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_LLLL_Tight" : maketuple_Dst2D0pi_D02KSKS_LLLL_Tight(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_LLDD" : maketuple_Dst2D0pi_D02KSKS_LLDD(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_LLDD_Tight" : maketuple_Dst2D0pi_D02KSKS_LLDD_Tight(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_DDDD" : maketuple_Dst2D0pi_D02KSKS_DDDD(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_DDDD_Tight" : maketuple_Dst2D0pi_D02KSKS_DDDD_Tight(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_ULLL" : maketuple_Dst2D0pi_D02KSKS_ULLL(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_ULLL_Tight" : maketuple_Dst2D0pi_D02KSKS_ULLL_Tight(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_ULDD" : maketuple_Dst2D0pi_D02KSKS_ULDD(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_ULDD_Tight" : maketuple_Dst2D0pi_D02KSKS_ULDD_Tight(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_LLLD" : maketuple_Dst2D0pi_D02KSKS_LLLD(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_LLLD_Tight" : maketuple_Dst2D0pi_D02KSKS_LLLD_Tight(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_DDLD" : maketuple_Dst2D0pi_D02KSKS_DDLD(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_DDLD_Tight" : maketuple_Dst2D0pi_D02KSKS_DDLD_Tight(options, pvs, rec_summary),
-    }
-
-    MCtuples = {
-        "MC_Dst2D0pi_D02KSKS_LLLL" : maketuple_MC_Dst2D0pi_D02KSKS_LLLL(options, pvs, rec_summary)
-    }
-
-    if options.simulation:
-        tuples = tuples | MCtuples
-        
-    config = make_config(options, tuples)
-
-    return config
diff --git a/Charm_2024validation/main_d_to_hhh.py b/Charm_2024validation/main_d_to_hhh.py
deleted file mode 100644
index 516e32b119..0000000000
--- a/Charm_2024validation/main_d_to_hhh.py
+++ /dev/null
@@ -1,63 +0,0 @@
-###############################################################################
-# (c) Copyright 2021-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 .options.d_to_hhh import *
-from .options.d_to_hhh_MC import *
-from .options.detection_asymmetry import *
-
-from DaVinci import Options, make_config
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-        #D2hhh
-        "D2Kpipi" : maketuple_D2Kpipi(options, pvs, rec_summary),
-        "D2Kpipi_NoCuts" : maketuple_D2Kpipi(options, pvs, rec_summary,True),
-        #"D2Kpipi_Kpi" : maketuple_D2Kpipi_Kpi(options, pvs, rec_summary), #subcomb of 2 out of 3 daughters
-        "Ds2KKpi" : maketuple_Ds2KKpi(options, pvs, rec_summary),
-        "Ds2KKpi_NoCuts" : maketuple_Ds2KKpi(options, pvs, rec_summary,True),
-        "D2pipipi" : maketuple_D2pipipi(options, pvs, rec_summary),
-        "D2pipipi_NoCuts" : maketuple_D2pipipi(options, pvs, rec_summary,True),
-        "D2pipiK" : maketuple_D2pipiK(options, pvs, rec_summary),
-        "D2pipiK_NoCuts" : maketuple_D2pipiK(options, pvs, rec_summary,True),
-        "D2KKK" : maketuple_D2KKK(options, pvs, rec_summary),
-        "D2KKK_NoCuts" : maketuple_D2KKK(options, pvs, rec_summary,True),
-        "D2piKK" : maketuple_D2piKK(options, pvs, rec_summary),
-        "D2piKK_NoCuts" : maketuple_D2piKK(options, pvs, rec_summary,True),
-        "B02Dpi_D2KKpi" : maketuple_B02Dpi_D2KKpi(options, pvs, rec_summary),
-        "B02Dpi_D2pipipi" : maketuple_B02Dpi_D2pipipi(options, pvs, rec_summary),
-        "Bs02Dspi_Ds2KKpi" : maketuple_Bs02Dspi_Ds2KKpi(options, pvs, rec_summary),
-        "Bs02Dspi_Ds2pipipi" : maketuple_Bs02Dspi_Ds2pipipi(options, pvs, rec_summary),
-        #ADet
-        "D2Kpipi_ADet" : maketuple_D2Kpipi_ADet(options, pvs, rec_summary),
-        "D2pipipi_ADet" : maketuple_D2pipipi_ADet(options, pvs, rec_summary),
-        "Ds2KKpi_ADet" : maketuple_Ds2KKpi_ADet(options, pvs, rec_summary),
-
-
-    }
-
-    MCtuples = {
-        "MC_D2Kpipi" : maketuple_MC_D2Kpipi(options, pvs, rec_summary),
-        "MC_Ds2KKpi" : maketuple_MC_Ds2KKpi(options, pvs, rec_summary)
-        "MC_Ds2KKK" : maketuple_MC_Ds2KKK(options, pvs, rec_summary)
-    }
-
-    if options.simulation:
-        tuples = tuples | MCtuples
-
-    config = make_config(options, tuples)
-
-    return config
diff --git a/Charm_2024validation/main_d_to_ksh.py b/Charm_2024validation/main_d_to_ksh.py
deleted file mode 100644
index 00ddc66093..0000000000
--- a/Charm_2024validation/main_d_to_ksh.py
+++ /dev/null
@@ -1,48 +0,0 @@
-###############################################################################
-# (c) Copyright 2021-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 .options.d_to_ksh import *
-from .options.d_to_ksh_MC import *
-from .options.detection_asymmetry import *
-
-from DaVinci import Options, make_config
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-        #D2KSh
-        "D2KSpi_LL" : maketuple_D2KSpi_LL(options, pvs, rec_summary),
-        "D2KSK_LL" : maketuple_D2KSK_LL(options, pvs, rec_summary),
-        "D2KSpi_LD" : maketuple_D2KSpi_LD(options, pvs, rec_summary),
-        "D2KSK_LD" : maketuple_D2KSK_LD(options, pvs, rec_summary),
-        "D2KSpi_DD" : maketuple_D2KSpi_DD(options, pvs, rec_summary),
-        "D2KSK_DD" : maketuple_D2KSK_DD(options, pvs, rec_summary),
-        #ADet
-        "D2KSK_LL_ADet" : maketuple_D2KSK_LL_ADet(options, pvs, rec_summary),
-        "D2KSpi_LL_ADet" : maketuple_D2KSpi_LL_ADet(options, pvs, rec_summary),
-    }
-
-    MCtuples = {
-        "MC_D2KSK" : maketuple_MC_D2KSK(options, pvs, rec_summary),
-        "MC_D2KSpi" : maketuple_MC_D2KSpi(options, pvs, rec_summary),
-    }
-
-    if options.simulation:
-        tuples = tuples | MCtuples
-        
-    config = make_config(options, tuples)
-
-    return config
diff --git a/Charm_2024validation/main_detection_asymmetry.py b/Charm_2024validation/main_detection_asymmetry.py
deleted file mode 100644
index 1ededecf77..0000000000
--- a/Charm_2024validation/main_detection_asymmetry.py
+++ /dev/null
@@ -1,31 +0,0 @@
-###############################################################################
-# (c) Copyright 2021-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 .options.detection_asymmetry import *
-
-from DaVinci import Options, make_config
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-        
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-        #ADet
-        "Lc2KSp_LL_ADet" : maketuple_Lc2KSp_LL_ADet(options, pvs, rec_summary),
-        "Lc2pKpi_ADet" : maketuple_Lc2pKpi_ADet(options, pvs, rec_summary),
-    }
-        
-    config = make_config(options, tuples)
-
-    return config
diff --git a/Charm_2024validation/main_dst_to_dee.py b/Charm_2024validation/main_dst_to_dee.py
deleted file mode 100644
index 3084abe4e7..0000000000
--- a/Charm_2024validation/main_dst_to_dee.py
+++ /dev/null
@@ -1,42 +0,0 @@
-###############################################################################
-# (c) Copyright 2021-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 .options.dst_to_dee import *
-
-from DaVinci import Options, make_config
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS':             make_Dst0ToD0EmEp_D0ToKmPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS", pvs, rec_summary, 'dst_kpi_os'),
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS':             make_Dst0ToD0EmEp_D0ToKmPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS", pvs, rec_summary, 'dst_kpi_ss'),
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS_MVA':         make_Dst0ToD0EmEp_D0ToKmPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS_MVA", pvs, rec_summary, 'dst_kpi_os'),
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS_MVA':         make_Dst0ToD0EmEp_D0ToKmPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS_MVA", pvs, rec_summary, 'dst_kpi_ss'),
-
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS':       make_Dst0ToD0EmEp_D0ToKmPimPipPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS", pvs, rec_summary,'dst_k3pi_os' ),
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS':       make_Dst0ToD0EmEp_D0ToKmPimPipPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS", pvs, rec_summary, 'dst_k3pi_ss'),
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS_MVA':   make_Dst0ToD0EmEp_D0ToKmPimPipPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS_MVA", pvs, rec_summary, 'dst_k3pi_os'),
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS_MVA':   make_Dst0ToD0EmEp_D0ToKmPimPipPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS_MVA", pvs, rec_summary, 'dst_k3pi_ss'),
-
-    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS':     make_DstpToDpDspEmEp_DpDspToKmKpPip_tuple(options, "Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS", pvs, rec_summary, "dsstp_2kpi_os"),
-    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS':     make_DstpToDpDspEmEp_DpDspToKmKpPip_tuple(options, "Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS", pvs, rec_summary, "dsstp_2kpi_ss"),
-    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS_MVA': make_DstpToDpDspEmEp_DpDspToKmKpPip_tuple(options, "Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS_MVA", pvs, rec_summary, "dsstp_2kpi_os"),
-    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS_MVA': make_DstpToDpDspEmEp_DpDspToKmKpPip_tuple(options, "Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS_MVA", pvs, rec_summary, "dsstp_2kpi_ss"),
-    }
-
-    config = make_config(options, tuples)
-
-    return config
\ No newline at end of file
diff --git a/Charm_2024validation/main_rare_charm.py b/Charm_2024validation/main_rare_charm.py
deleted file mode 100644
index d38574262b..0000000000
--- a/Charm_2024validation/main_rare_charm.py
+++ /dev/null
@@ -1,41 +0,0 @@
-###############################################################################
-# (c) Copyright 2021-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 .options.rare_charm import *
-#from .options.rare_charm_MC import *
-
-from DaVinci import Options, make_config
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-        
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-        "D2pimumu" : maketuple_D2pimumu(options, pvs, rec_summary),
-        "D2pimumu_WS" : maketuple_D2pimumu_WS(options, pvs, rec_summary),
-        "CharmRD_D2pipipi" : maketuple_D2pipipi(options, pvs, rec_summary),
-        "D2piee" : maketuple_D2piee(options, pvs, rec_summary),
-        "Lc2pmumu" : maketuple_Lc2pmumu(options, pvs, rec_summary),
-        "Dst2D0pi_D02Kpimumu_RS" : maketuple_Dst2D0pi_D02Kpimumu_RS(options, pvs, rec_summary),
-    }
-
-    MCtuples = {
-    }
-    
-    if options.simulation:
-        tuples = tuples | MCtuples
-        
-    config = make_config(options, tuples)
-
-    return config
diff --git a/Charm_2024validation/options/d0_to_hh.py b/Charm_2024validation/options/d0_to_hh.py
deleted file mode 100644
index 80a3cdcec2..0000000000
--- a/Charm_2024validation/options/d0_to_hh.py
+++ /dev/null
@@ -1,432 +0,0 @@
-from .tupling import (
-    make_composite_variables,
-    make_basic_variables,
-    make_hlt2_event_variables,
-    make_DeltaM_variable,
-    make_composite_dtf_variables,
-    make_basic_dtf_variables,
-)
-
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunTuple_Particles as Funtuple
-
-
-def make_dtf_variables(options, pvs, input_data, ptype):
-
-    if ptype not in ["basic", "composite"]:
-        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
-
-    from DecayTreeFitter import DecayTreeFitter
-    
-    DTF = DecayTreeFitter(
-        name=f'DTF_{{hash}}',
-        input_particles=input_data)
-
-    DTFvtx = DecayTreeFitter(
-        name=f'DTFvtx_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    DTFmass = DecayTreeFitter(
-        name=f'DTFmass_{{hash}}',
-        input_particles=input_data,
-        mass_constraints=["D0"])
-
-    DTFvtxmass = DecayTreeFitter(
-        name=f'DTFvtxmass_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0"])
-
-    if ptype == "basic":
-        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmass,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="D0")
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmass,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="D0")
-        return dtf_vars
-
-    if ptype == "composite":
-        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmass,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="D0")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmass,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="D0")
-        return dtf_vars
-
-def maketuple_D02KK_LowBias(options, pvs, rec_summary):
-    name = "D02KK_LowBias"
-    turbo_line = "Hlt2Charm_D0ToKmKp_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> K- K+]CC",
-        "Km"   : "[D0 -> ^K- K+]CC",
-        "Kp"  : "[D0 -> K- ^K+]CC",
-    }
-
-    variables = {
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D02KK(options, pvs, rec_summary):
-    name = "D02KK"
-    turbo_line = "Hlt2Charm_D0ToKmKp"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> K- K+]CC",
-        "Km"   : "[D0 -> ^K- K+]CC",
-        "Kp"  : "[D0 -> K- ^K+]CC",
-    }
-
-    variables = {
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D02Kpi_LowBias(options, pvs, rec_summary):
-    name = "D02Kpi_LowBias"
-    turbo_line = "Hlt2Charm_D0ToKmPip_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> K- pi+]CC",
-        "Km"   : "[D0 -> ^K- pi+]CC",
-        "pip"  : "[D0 -> K- ^pi+]CC",
-    }
-
-    variables = {
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D02Kpi(options, pvs, rec_summary):
-    name = "D02Kpi"
-    turbo_line = "Hlt2Charm_D0ToKmPip"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> K- pi+]CC",
-        "Km"   : "[D0 -> ^K- pi+]CC",
-        "pip"  : "[D0 -> K- ^pi+]CC",
-    }
-
-    variables = {
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D02pipi_LowBias(options, pvs, rec_summary):
-    name = "D02pipi_LowBias"
-    turbo_line = "Hlt2Charm_D0ToPimPip_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> pi- pi+]CC",
-        "pim"   : "[D0 -> ^pi- pi+]CC",
-        "pip"  : "[D0 -> pi- ^pi+]CC",
-    }
-
-    variables = {
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D02pipi(options, pvs, rec_summary):
-    name = "D02pipi"
-    turbo_line = "Hlt2Charm_D0ToPimPip"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> pi- pi+]CC",
-        "pim"   : "[D0 -> ^pi- pi+]CC",
-        "pip"  : "[D0 -> pi- ^pi+]CC",
-    }
-
-    variables = {
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02KK_LowBias(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02KK_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmKp_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> ([D0]CC -> K- K+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> K- K+) pi+]CC",
-        "Km"   : "[D*(2010)+ -> ([D0]CC -> ^K- K+) pi+]CC",
-        "Kp"  : "[D*(2010)+ -> ([D0]CC -> K- ^K+) pi+]CC",
-        "spip" : "[D*(2010)+ -> ([D0]CC -> K- K+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02KK(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02KK"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmKp"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> ([D0]CC -> K- K+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> K- K+) pi+]CC",
-        "Km"   : "[D*(2010)+ -> ([D0]CC -> ^K- K+) pi+]CC",
-        "Kp"  : "[D*(2010)+ -> ([D0]CC -> K- ^K+) pi+]CC",
-        "spip" : "[D*(2010)+ -> ([D0]CC -> K- K+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02Kpi_RS_LowBias(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02Kpi_RS_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPip_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> (D0 -> K- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^(D0 -> K- pi+) pi+]CC",
-        "Km"   : "[D*(2010)+ -> (D0 -> ^K- pi+) pi+]CC",
-        "pip"  : "[D*(2010)+ -> (D0 -> K- ^pi+) pi+]CC",
-        "spip" : "[D*(2010)+ -> (D0 -> K- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02Kpi_RS(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02Kpi_RS"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPip"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> (D0 -> K- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^(D0 -> K- pi+) pi+]CC",
-        "Km"   : "[D*(2010)+ -> (D0 -> ^K- pi+) pi+]CC",
-        "pip"  : "[D*(2010)+ -> (D0 -> K- ^pi+) pi+]CC",
-        "spip" : "[D*(2010)+ -> (D0 -> K- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02Kpi_WS_LowBias(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02Kpi_WS_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKpPim_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> (D0 -> K+ pi-) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^(D0 -> K+ pi-) pi+]CC",
-        "Kp"   : "[D*(2010)+ -> (D0 -> ^K+ pi-) pi+]CC",
-        "pim"  : "[D*(2010)+ -> (D0 -> K+ ^pi-) pi+]CC",
-        "spip" : "[D*(2010)+ -> (D0 -> K+ pi-) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Kp"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pim"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02Kpi_WS(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02Kpi_WS"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKpPim"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> (D0 -> K+ pi-) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^(D0 -> K+ pi-) pi+]CC",
-        "Kp"   : "[D*(2010)+ -> (D0 -> ^K+ pi-) pi+]CC",
-        "pim"  : "[D*(2010)+ -> (D0 -> K+ ^pi-) pi+]CC",
-        "spip" : "[D*(2010)+ -> (D0 -> K+ pi-) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Kp"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pim"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02pipi_LowBias(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02pipi_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimPip_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> ([D0]CC -> pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> pi- pi+) pi+]CC",
-        "pim"   : "[D*(2010)+ -> ([D0]CC -> ^pi- pi+) pi+]CC",
-        "pip"  : "[D*(2010)+ -> ([D0]CC -> pi- ^pi+) pi+]CC",
-        "spip" : "[D*(2010)+ -> ([D0]CC -> pi- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02pipi(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02pipi"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimPip"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> ([D0]CC -> pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> pi- pi+) pi+]CC",
-        "pim"   : "[D*(2010)+ -> ([D0]CC -> ^pi- pi+) pi+]CC",
-        "pip"  : "[D*(2010)+ -> ([D0]CC -> pi- ^pi+) pi+]CC",
-        "spip" : "[D*(2010)+ -> ([D0]CC -> pi- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
diff --git a/Charm_2024validation/options/d0_to_hh_MC.py b/Charm_2024validation/options/d0_to_hh_MC.py
deleted file mode 100644
index aaae05665d..0000000000
--- a/Charm_2024validation/options/d0_to_hh_MC.py
+++ /dev/null
@@ -1,99 +0,0 @@
-from .tupling import (
-    make_MC_composite_variables,
-    make_MC_basic_variables,
-    make_MC_event_variables,
-)
-
-from PyConf.reading import get_mc_particles, get_mc_header
-from FunTuple import FunTuple_MCParticles as FuntupleMC
-
-def maketuple_MC_Dst2D0pi_D02Kpi_RS(options, pvs, rec_summary):
-    name = "MC_Dst2D0pi_D02Kpi_RS"
-    line = "/Event/MC/Particles"
-
-    input_data = get_mc_particles(f"{line}")
-
-    branches = {
-        "Dst" : "[D*(2010)+ ==> (D0 ==> K- pi+ ) pi+]CC",
-        "D0"  : "[D*(2010)+ ==> ^(D0 ==> K- pi+ ) pi+]CC",
-        "Km"   : "[D*(2010)+ ==> (D0 ==> ^K- pi+ ) pi+]CC",
-        "pip"  : "[D*(2010)+ ==> (D0 ==> K- ^pi+ ) pi+]CC",
-        "spip" : "[D*(2010)+ ==> (D0 ==> K- pi+ ) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_MC_composite_variables(),
-        "D0"    : make_MC_composite_variables(),
-        "Km"     : make_MC_basic_variables(),
-        "pip"    : make_MC_basic_variables(),
-        "spip"   : make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                          tuple_name="MCDecayTree",
-                          fields=branches, variables = variables,
-                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
-                          inputs=input_data)
-
-    return [mytuple]
-
-def maketuple_MC_Dst2D0pi_D02KK(options, pvs, rec_summary):
-    name = "MC_Dst2D0pi_D02KK"
-    line = "/Event/MC/Particles"
-
-    input_data = get_mc_particles(f"{line}")
-
-    branches = {
-        "Dst" : "[D*(2010)+ ==> ([D0]CC ==> K- K+) pi+]CC",
-        "D0"  : "[D*(2010)+ ==> ^([D0]CC ==> K- K+) pi+]CC",
-        "Km"   : "[D*(2010)+ ==> ([D0]CC ==> ^K- K+) pi+]CC",
-        "Kp"  : "[D*(2010)+ ==> ([D0]CC ==> K- ^K+) pi+]CC",
-        "spip" : "[D*(2010)+ ==> ([D0]CC ==> K- K+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_MC_composite_variables(),
-        "D0"    : make_MC_composite_variables(),
-        "Km"     : make_MC_basic_variables(),
-        "Kp"    : make_MC_basic_variables(),
-        "spip"   : make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                        tuple_name="MCDecayTree",
-                        fields=branches, variables = variables,
-                        event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
-                        inputs=input_data)
-
-    return [mytuple]
-
-
-def maketuple_MC_Dst2D0pi_D02pipi(options, pvs, rec_summary):
-    name = "MC_Dst2D0pi_D02pipi"
-    line = "/Event/MC/Particles"
-
-    input_data = get_mc_particles(f"{line}")
-
-    branches = {
-        "Dst" : "[D*(2010)+ ==> ([D0]CC ==> pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ ==> ^([D0]CC ==> pi- pi+) pi+]CC",
-        "pim"   : "[D*(2010)+ ==> ([D0]CC ==> ^pi- pi+) pi+]CC",
-        "pip"  : "[D*(2010)+ ==> ([D0]CC ==> pi- ^pi+) pi+]CC",
-        "spip" : "[D*(2010)+ ==> ([D0]CC ==> pi- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_MC_composite_variables(),
-        "D0"    : make_MC_composite_variables(),
-        "pim"     : make_MC_basic_variables(),
-        "pip"    : make_MC_basic_variables(),
-        "spip"   : make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                        tuple_name="MCDecayTree",
-                        fields=branches, variables = variables,
-                        event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
-                        inputs=input_data)
-
-    return [mytuple]
diff --git a/Charm_2024validation/options/d0_to_hhhh.py b/Charm_2024validation/options/d0_to_hhhh.py
deleted file mode 100644
index 0277430fb9..0000000000
--- a/Charm_2024validation/options/d0_to_hhhh.py
+++ /dev/null
@@ -1,247 +0,0 @@
-from .tupling import (
-    make_composite_variables,
-    make_composite_variables_4body,
-    make_composite_variables_3body,
-    make_basic_variables,
-    make_hlt2_event_variables,
-    make_DeltaM_variable,
-    make_basic_dtf_variables,
-    make_composite_dtf_variables
-)
-
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunTuple_Particles as Funtuple
-from DecayTreeFitter import DecayTreeFitter
-
-# I can't get make_composite_variables_4body to work for some reason...
-import Functors as F
-from FunTuple import FunctorCollection
-variables_4body = (
-    FunctorCollection(
-        {
-            #14
-            "M14": F.SUBCOMB(Functor=F.MASS, Indices=(1, 4)),
-            "SDOCA14"     : F.SDOCA(Child1=1,Child2=4),
-            "SDOCACHI214" : F.SDOCACHI2(Child1=1,Child2=4),
-            "DOCA14"      : F.DOCA(Child1=1,Child2=4),
-            "DOCACHI214"  : F.DOCACHI2(Child1=1,Child2=4),
-            "COS14": F.ALV(1, 4),
-            #24
-            "M24": F.SUBCOMB(Functor=F.MASS, Indices=(2, 4)),
-            "SDOCA24"     : F.SDOCA(Child1=2,Child2=4),
-            "SDOCACHI224" : F.SDOCACHI2(Child1=2,Child2=4),
-            "DOCA24"      : F.DOCA(Child1=2,Child2=4),
-            "DOCACHI224"  : F.DOCACHI2(Child1=2,Child2=4),
-            "COS24": F.ALV(2, 4),
-            #34
-            "M34": F.SUBCOMB(Functor=F.MASS, Indices=(3, 4)),
-            "SDOCA34"     : F.SDOCA(Child1=3,Child2=4),
-            "SDOCACHI234" : F.SDOCACHI2(Child1=3,Child2=4),
-            "DOCA34"      : F.DOCA(Child1=3,Child2=4),
-            "DOCACHI234"  : F.DOCACHI2(Child1=3,Child2=4),
-            "COS34": F.ALV(3, 4),
-        }
-    )
-)
-
-
-def maketuple_DstToD0pi_D0ToKKPiPi(options, pvs, rec_summary):
-    name = "DstToD0pi_D0ToKKPiPi"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmKpPimPip"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> ([D0]CC -> K+ K- pi+ pi-) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> K+ K- pi+ pi-) pi+]CC",
-        "h1"  : "[D*(2010)+ -> ([D0]CC -> ^K+ K- pi+ pi-) pi+]CC",
-        "h2"  : "[D*(2010)+ -> ([D0]CC -> K+ ^K- pi+ pi-) pi+]CC",
-        "h3"  : "[D*(2010)+ -> ([D0]CC -> K+ K- ^pi+ pi-) pi+]CC",
-        "h4"  : "[D*(2010)+ -> ([D0]CC -> K+ K- pi+ ^pi-) pi+]CC",
-        "pis" : "[D*(2010)+ -> ([D0]CC -> K+ K- pi+ pi-) ^pi+]CC",
-    }
-
-    DTF_PV = DecayTreeFitter(
-        name='DTF_D0ToKKPiPi_PV',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    basic_variables = make_basic_variables(options, pvs, input_data) +\
-        make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)
-
-    composite_dtf_variables = make_composite_dtf_variables(options,
-                                                           pvs,
-                                                           input_data,
-                                                           DTF=DTF_PV,
-                                                           pv_constraint=True)
-
-    composite_variables = make_composite_variables(options, pvs, input_data) + composite_dtf_variables
-        
-
-    composite_variables_4body = make_composite_variables_3body(options, pvs, input_data) + composite_dtf_variables + variables_4body
-
-    variables = {
-        "Dst"   : composite_variables+make_DeltaM_variable(options),
-        "D0"    : composite_variables_4body,
-        "h1"    : basic_variables,
-        "h2"    : basic_variables,
-        "h3"    : basic_variables,
-        "h4"    : basic_variables,
-        "pis"   : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstToD0pi_D0ToKPiPiPi(options, pvs, rec_summary):
-    name = "DstToD0pi_D0ToKPiPiPi"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPimPipPip"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> (D0 -> K- pi+ pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^(D0 -> K- pi+ pi- pi+) pi+]CC",
-        "h1"   : "[D*(2010)+ -> (D0 -> ^K- pi+ pi- pi+) pi+]CC",
-        "h2"  : "[D*(2010)+ -> (D0 -> K- ^pi+ pi- pi+) pi+]CC",
-        "h3"   : "[D*(2010)+ -> (D0 -> K- pi+ ^pi- pi+) pi+]CC",
-        "h4"  : "[D*(2010)+ -> (D0 -> K- pi+ pi- ^pi+) pi+]CC",
-        "pis" : "[D*(2010)+ -> (D0 -> K- pi+ pi- pi+) ^pi+]CC",
-    }
-
-    DTF_PV = DecayTreeFitter(
-        name='DTF_D0ToKPiPiPi_PV',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    basic_variables = make_basic_variables(options, pvs, input_data) +\
-        make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True, mass_constraint=False)
-
-    composite_dtf_variables = make_composite_dtf_variables(options,
-                                                           pvs,
-                                                           input_data,
-                                                           DTF=DTF_PV,
-                                                           pv_constraint=True)
-
-    composite_variables = make_composite_variables(options, pvs, input_data) + composite_dtf_variables
-        
-
-    composite_variables_4body = make_composite_variables_3body(options, pvs, input_data) + composite_dtf_variables + variables_4body
-
-    variables = {
-        "Dst"   : composite_variables+make_DeltaM_variable(options),
-        "D0"    : composite_variables_4body,
-        "h1"    : basic_variables,
-        "h2"    : basic_variables,
-        "h3"    : basic_variables,
-        "h4"    : basic_variables,
-        "pis"   : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstToD0pi_D0ToPiKPiPi(options, pvs, rec_summary):
-    name = "DstToD0pi_D0ToPiKPiPi"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKpPimPimPip"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> (D0 -> pi- K+ pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^(D0 -> pi- K+ pi- pi+) pi+]CC",
-        "h1"   : "[D*(2010)+ -> (D0 -> ^pi- K+ pi- pi+) pi+]CC",
-        "h2"  : "[D*(2010)+ -> (D0 -> pi- ^K+ pi- pi+) pi+]CC",
-        "h3"   : "[D*(2010)+ -> (D0 -> pi- K+ ^pi- pi+) pi+]CC",
-        "h4"  : "[D*(2010)+ -> (D0 -> pi- K+ pi- ^pi+) pi+]CC",
-        "pis" : "[D*(2010)+ -> (D0 -> pi- K+ pi- pi+) ^pi+]CC",
-    }
-
-    DTF_PV = DecayTreeFitter(
-        name='DTF_D0ToPiKPiPi_PV',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    basic_variables = make_basic_variables(options, pvs, input_data) +\
-        make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True, mass_constraint=False)
-
-    composite_dtf_variables = make_composite_dtf_variables(options,
-                                                           pvs,
-                                                           input_data,
-                                                           DTF=DTF_PV,
-                                                           pv_constraint=True)
-
-    composite_variables = make_composite_variables(options, pvs, input_data) + composite_dtf_variables
-        
-
-    composite_variables_4body = make_composite_variables_3body(options, pvs, input_data) + composite_dtf_variables + variables_4body
-
-    variables = {
-        "Dst"   : composite_variables+make_DeltaM_variable(options),
-        "D0"    : composite_variables_4body,
-        "h1"    : basic_variables,
-        "h2"    : basic_variables,
-        "h3"    : basic_variables,
-        "h4"    : basic_variables,
-        "pis"   : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstToD0pi_D0ToPiPiPiPi(options, pvs, rec_summary):
-    name = "DstToD0pi_D0ToPiPiPiPi"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimPimPipPip"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> ([D0]CC -> pi+ pi- pi+ pi-) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> pi+ pi- pi+ pi-) pi+]CC",
-        "h1"  : "[D*(2010)+ -> ([D0]CC -> ^pi+ pi- pi+ pi-) pi+]CC",
-        "h2"  : "[D*(2010)+ -> ([D0]CC -> pi+ ^pi- pi+ pi-) pi+]CC",
-        "h3"  : "[D*(2010)+ -> ([D0]CC -> pi+ pi- ^pi+ pi-) pi+]CC",
-        "h4"  : "[D*(2010)+ -> ([D0]CC -> pi+ pi- pi+ ^pi-) pi+]CC",
-        "pis" : "[D*(2010)+ -> ([D0]CC -> pi+ pi- pi+ pi-) ^pi+]CC",
-    }
-
-    DTF_PV = DecayTreeFitter(
-        name='DTF_D0ToPiPiPiPi_PV',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    basic_variables = make_basic_variables(options, pvs, input_data) +\
-        make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True, mass_constraint=False)
-
-    composite_dtf_variables = make_composite_dtf_variables(options,
-                                                           pvs,
-                                                           input_data,
-                                                           DTF=DTF_PV,
-                                                           pv_constraint=True)
-
-    composite_variables = make_composite_variables(options, pvs, input_data) + composite_dtf_variables
-        
-
-    composite_variables_4body = make_composite_variables_3body(options, pvs, input_data) + composite_dtf_variables + variables_4body
-
-    variables = {
-        "Dst"   : composite_variables+make_DeltaM_variable(options),
-        "D0"    : composite_variables_4body,
-        "h1"    : basic_variables,
-        "h2"    : basic_variables,
-        "h3"    : basic_variables,
-        "h4"    : basic_variables,
-        "pis"   : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
diff --git a/Charm_2024validation/options/d0_to_hhhh_MC.py b/Charm_2024validation/options/d0_to_hhhh_MC.py
deleted file mode 100644
index 2dbe198fa9..0000000000
--- a/Charm_2024validation/options/d0_to_hhhh_MC.py
+++ /dev/null
@@ -1,43 +0,0 @@
-from .tupling import (
-    make_MC_composite_variables,
-    make_MC_basic_variables,
-    make_MC_event_variables,
-)
-
-from PyConf.reading import get_mc_particles, get_mc_header
-from FunTuple import FunTuple_MCParticles as FuntupleMC
-
-def maketuple_MC_DstToD0pi_D0ToKPiPiPi(options, pvs, rec_summary):
-    name = "MC_DstToD0pi_D0ToKPiPiPi"
-
-    line = "/Event/MC/Particles"
-    
-    input_data = get_mc_particles(f"{line}")
-
-    branches = {
-        "Dst" : "[D*(2010)+ ==> (D0 ==> K- pi+ pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ ==> ^(D0 ==> K- pi+ pi- pi+) pi+]CC",
-        "h1"   : "[D*(2010)+ ==> (D0 ==> ^K- pi+ pi- pi+) pi+]CC",
-        "h2"  : "[D*(2010)+ ==> (D0 ==> K- ^pi+ pi- pi+) pi+]CC",
-        "h3"   : "[D*(2010)+ ==> (D0 ==> K- pi+ ^pi- pi+) pi+]CC",
-        "h4"  : "[D*(2010)+ ==> (D0 ==> K- pi+ pi- ^pi+) pi+]CC",
-        "pis" : "[D*(2010)+ ==> (D0 ==> K- pi+ pi- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_MC_composite_variables(),
-        "D0"    : make_MC_composite_variables(),
-        "h1"     : make_MC_basic_variables(),
-        "h2"    : make_MC_basic_variables(),
-        "h3"    : make_MC_basic_variables(),
-        "h4"    : make_MC_basic_variables(),
-        "pis"   : make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                          tuple_name="MCDecayTree",
-                          fields=branches, variables = variables,  
-                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])), 
-                          inputs=input_data)
-
-    return [mytuple]
diff --git a/Charm_2024validation/options/d0_to_hhpi0.py b/Charm_2024validation/options/d0_to_hhpi0.py
deleted file mode 100644
index cf3c3ba59f..0000000000
--- a/Charm_2024validation/options/d0_to_hhpi0.py
+++ /dev/null
@@ -1,359 +0,0 @@
-from .tupling import (
-    make_composite_variables,
-    make_DeltaM_variable,
-    make_basic_variables,
-    make_hlt2_event_variables,
-    make_top_isolation_variables,
-    make_basic_isolation_variables,
-    make_intermediate_isolation_variables,
-    make_composite_dtf_variables,
-    make_basic_dtf_variables,
-)
-
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunTuple_Particles as Funtuple
-
-iso_vars_locations = ["LongTrackIso", "NeutralIso", "PizIso"]
-
-def make_dtf_variables(options, pvs, input_data, ptype):
-
-    if ptype not in ["basic", "composite"]:
-        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
-
-    from DecayTreeFitter import DecayTreeFitter
-    
-    DTF = DecayTreeFitter(
-        name=f'DTF_{{hash}}',
-        input_particles=input_data)
-
-    DTFvtx = DecayTreeFitter(
-        name=f'DTFvtx_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    DTFmass = DecayTreeFitter(
-        name=f'DTFmass_{{hash}}',
-        input_particles=input_data,
-        mass_constraints=["D0"])
-
-    DTFvtxmass = DecayTreeFitter(
-        name=f'DTFvtxmass_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0"])
-
-    if ptype == "basic":
-        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmass,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="D0")
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmass,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="D0")
-        return dtf_vars
-
-    if ptype == "composite":
-        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmass,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="D0")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmass,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="D0")
-        return dtf_vars
-
-
-def maketuple_Dst2D0pi_D02KKpi0_M(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02KKpi0_M"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmKpPi0_M"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) pi0) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (phi(1020) -> K- K+) pi0) pi+]CC",
-        "phi"   : "[D*(2010)+ -> ([D0]CC -> ^(phi(1020) -> K- K+) pi0) pi+]CC",
-        "Km"   : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> ^K- K+) pi0) pi+]CC",
-        "Kp"  : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- ^K+) pi0) pi+]CC",
-        "pi0"  : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) ^pi0) pi+]CC",
-        "spip" : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) pi0) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "phi"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation:
-
-        variables = {
-            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="D0"),
-            "phi"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="phi(1020)"),
-            "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02KKpi0_R(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02KKpi0_R"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmKpPi0_R"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) (pi0 -> gamma gamma) ) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (phi(1020) -> K- K+) (pi0 -> gamma gamma) ) pi+]CC",
-        "phi"   : "[D*(2010)+ -> ([D0]CC -> ^(phi(1020) -> K- K+) (pi0 -> gamma gamma) ) pi+]CC",
-        "Km"   : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> ^K- K+) (pi0 -> gamma gamma) ) pi+]CC",
-        "Kp"  : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- ^K+) (pi0 -> gamma gamma) ) pi+]CC",
-        "pi0"  : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) ^(pi0 -> gamma gamma) ) pi+]CC",
-        "gamma1"  : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) (pi0 -> ^gamma gamma) ) pi+]CC",
-        "gamma2"  : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) (pi0 -> gamma ^gamma) ) pi+]CC",
-        "spip" : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) (pi0 -> gamma gamma) ) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "phi"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "gamma1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "gamma2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation:
-
-        variables = {
-            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="D0"),
-            "phi"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="phi(1020)"),
-            "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="pi0"),
-            "gamma1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "gamma2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02Kpipi0_M(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02Kpipi0_M"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPipPi0_M"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) pi0) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^(D0 -> (K*(892)~0 -> K- pi+) pi0) pi+]CC",
-        "Kst"   : "[D*(2010)+ -> (D0 -> ^(K*(892)~0 -> K- pi+) pi0) pi+]CC",
-        "Km"   : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> ^K- pi+) pi0) pi+]CC",
-        "pip"  : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- ^pi+) pi0) pi+]CC",
-        "pi0"  : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) ^pi0) pi+]CC",
-        "spip" : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) pi0) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Kst"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation:
-
-        variables = {
-            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="D0"),
-            "Kst"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="K*(892)~0"),
-            "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02Kpipi0_R(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02Kpipi0_R"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPipPi0_R"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) (pi0 -> gamma gamma) ) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^(D0 -> (K*(892)~0 -> K- pi+) (pi0 -> gamma gamma) ) pi+]CC",
-        "Kst"   : "[D*(2010)+ -> (D0 -> ^(K*(892)~0 -> K- pi+) (pi0 -> gamma gamma) ) pi+]CC",
-        "Km"   : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> ^K- pi+) (pi0 -> gamma gamma) ) pi+]CC",
-        "pip"  : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- ^pi+) (pi0 -> gamma gamma) ) pi+]CC",
-        "pi0"  : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) ^(pi0 -> gamma gamma) ) pi+]CC",
-        "gamma1"  : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) (pi0 -> ^gamma gamma) ) pi+]CC",
-        "gamma2"  : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) (pi0 -> gamma ^gamma) ) pi+]CC",
-        "spip" : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) (pi0 -> gamma gamma) ) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Kst"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "gamma1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "gamma2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation:
-
-        variables = {
-            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="D0"),
-            "Kst"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="K*(892)~0"),
-            "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="pi0"),
-            "gamma1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "gamma2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02pipipi0_M(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02pipipi0_M"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimPipPi0_M"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) pi0) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (rho(770)0 -> pi- pi+) pi0) pi+]CC",
-        "rho"   : "[D*(2010)+ -> ([D0]CC -> ^(rho(770)0 -> pi- pi+) pi0) pi+]CC",
-        "pim"   : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> ^pi- pi+) pi0) pi+]CC",
-        "pip"  : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- ^pi+) pi0) pi+]CC",
-        "pi0"  : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) ^pi0) pi+]CC",
-        "spip" : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) pi0) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "rho"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation:
-
-        variables = {
-            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="D0"),
-            "rho"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="rho(770)0"),
-            "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02pipipi0_R(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02pipipi0_R"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimPipPi0_R"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) (pi0 -> gamma gamma) ) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (rho(770)0 -> pi- pi+) (pi0 -> gamma gamma) ) pi+]CC",
-        "rho"   : "[D*(2010)+ -> ([D0]CC -> ^(rho(770)0 -> pi- pi+) (pi0 -> gamma gamma) ) pi+]CC",
-        "pim"   : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> ^pi- pi+) (pi0 -> gamma gamma) ) pi+]CC",
-        "pip"  : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- ^pi+) (pi0 -> gamma gamma) ) pi+]CC",
-        "pi0"  : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) ^(pi0 -> gamma gamma) ) pi+]CC",
-        "gamma1"  : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) (pi0 -> ^gamma gamma) ) pi+]CC",
-        "gamma2"  : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) (pi0 -> gamma ^gamma) ) pi+]CC",
-        "spip" : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) (pi0 -> gamma gamma) ) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "rho"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "gamma1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "gamma2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation:
-
-        variables = {
-            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="D0"),
-            "rho"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="rho(770)0"),
-            "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="pi0"),
-            "gamma1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "gamma2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
diff --git a/Charm_2024validation/options/d0_to_hhpi0_MC.py b/Charm_2024validation/options/d0_to_hhpi0_MC.py
deleted file mode 100644
index 84648f4e71..0000000000
--- a/Charm_2024validation/options/d0_to_hhpi0_MC.py
+++ /dev/null
@@ -1,44 +0,0 @@
-from .tupling import (
-    make_MC_composite_variables,
-    make_MC_basic_variables,
-    make_MC_event_variables,
-)
-
-from PyConf.reading import get_mc_particles, get_mc_header
-from FunTuple import FunTuple_MCParticles as FuntupleMC
-
-def maketuple_MC_Dst2D0pi_D02Kpipi0(options, pvs, rec_summary):
-    name = "MC_Dst2D0pi_D02Kpipi0"
-    line = "/Event/MC/Particles"
-    
-    input_data = get_mc_particles(f"{line}")
-
-    branches = {
-        "Dst" : "[D*(2010)+ ==> (D0 ==> K- pi+ (pi0 ==> gamma gamma) ) pi+]CC",
-        "D0"  : "[D*(2010)+ ==> ^(D0 ==> K- pi+ (pi0 ==> gamma gamma) ) pi+]CC",
-        "Km"   : "[D*(2010)+ ==> (D0 ==> ^K- pi+ (pi0 ==> gamma gamma) ) pi+]CC",
-        "pip"  : "[D*(2010)+ ==> (D0 ==> K- ^pi+ (pi0 ==> gamma gamma) ) pi+]CC",
-        "pi0"  : "[D*(2010)+ ==> (D0 ==> K- pi+ ^(pi0 ==> gamma gamma) ) pi+]CC",
-        "gamma1"  : "[D*(2010)+ ==> (D0 ==> K- pi+ (pi0 ==> ^gamma gamma) ) pi+]CC",
-        "gamma2"  : "[D*(2010)+ ==> (D0 ==> K- pi+ (pi0 ==> gamma ^gamma) ) pi+]CC",
-        "spip" : "[D*(2010)+ ==> (D0 ==> K- pi+ (pi0 ==> gamma gamma) ) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_MC_composite_variables(),
-        "D0"    : make_MC_composite_variables(),
-        "Km"     : make_MC_basic_variables(),
-        "pip"    : make_MC_basic_variables(),
-        "pi0"    : make_MC_basic_variables(),
-        "gamma1"    : make_MC_basic_variables(),
-        "gamma2"    : make_MC_basic_variables(),
-        "spip"   : make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                          tuple_name="MCDecayTree",
-                          fields=branches, variables = variables,  
-                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])), 
-                          inputs=input_data)
-
-    return [mytuple]
diff --git a/Charm_2024validation/options/d0_to_kshh.py b/Charm_2024validation/options/d0_to_kshh.py
deleted file mode 100644
index dad027529f..0000000000
--- a/Charm_2024validation/options/d0_to_kshh.py
+++ /dev/null
@@ -1,1585 +0,0 @@
-from .tupling import (
-    make_composite_variables,
-    make_composite_variables_3body,
-    make_basic_variables,
-    make_hlt2_event_variables,
-    make_DeltaM_variable,
-    make_basic_dtf_variables,
-    make_composite_dtf_variables,
-    make_composite_dtf_variables_3body,
-)
-
-import Functors as F
-from Functors.math import log
-from DaVinci import Options, make_config
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunctorCollection
-from PyConf.reading import get_particles
-import FunTuple.functorcollections as FC
-from FunTuple import FunTuple_Particles as Funtuple
-from DecayTreeFitter import DecayTreeFitter
-
-# define helper functors
-get_SV =  F.ENDVERTEX @ F.FORWARDARG0
-get_SV_pos = F.TOLINALG @ F.POSITION @ get_SV
-# only if composite (i.e. has vertex)

-get_child_1 = F.CHILD(1, F.FORWARDARG0) # change here the index of the child.
-get_child_endvtx_pos_1 = F.ENDVERTEX_POS  @ get_child_1
-get_fdvec_child_1 = get_child_endvtx_pos_1 - get_SV_pos
-
-# define observables
-IP_wrt_SV_KS0 = F.IP.bind(get_SV_pos , get_child_1)
-IPCHI2_wrt_SV_KS0 = F.IPCHI2.bind(get_SV , get_child_1)
-# only if child is composite (i.e. has vertex)
-FD_wrt_SV_KS0 = F.MAGNITUDE @ get_fdvec_child_1
-FDCHI2_wrt_SV_KS0 = F.VTX_FDCHI2.bind(get_SV, get_child_1)
-# Note: Apply the functors to the head of the node of decay tree e.g. B
-# Functor collection for SV related info
-topo_sv_var = FunctorCollection(
-    {
-        "ORIVXIP_CHILD1": IP_wrt_SV_KS0,
-        "ORIVXIPCHI2_CHILD1": IPCHI2_wrt_SV_KS0,
-        "ORIVXFD_CHILD1": FD_wrt_SV_KS0,
-        "ORIVXFDCHI2_CHILD1": FDCHI2_wrt_SV_KS0,
-    }
-)
-
-"""
- D0->KSππ LL, DD x LowBias x Dstar
- D0->KSK-Ï€+ LL, DD x LowBias x Dstar
- D0->KSK+Ï€- LL, DD x LowBias x Dstar
- D0->KSKK LL, DD x LowBias x Dstar
- nb: https://gitlab.cern.ch/lhcb/Moore/-/blob/master/Hlt/Hlt2Conf/python/Hlt2Conf/lines/charm/d0_to_kshh.py?ref_type=heads
-
- """
-
-# D0->KSππ
-def maketuple_DstpToD0Pip_D0ToKsPimPip_LL_LowBias(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsPimPip_LL_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_LL_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) pi- pi+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^pi- pi+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- ^pi+) pi+]CC",
-        "pis" :   "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D02KSPiPi_LL_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D02KSPiPi_LL_lowbias_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0") + topo_sv_var,
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsPimPip_DD_LowBias(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsPimPip_DD_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_DD_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) pi- pi+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^pi- pi+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- ^pi+) pi+]CC",
-        "pis" :   "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D02KSPiPi_DD_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D02KSPiPi_DD_lowbias_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0") + topo_sv_var,
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsPimPip_LL(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsPimPip_LL"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_LL"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) pi- pi+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^pi- pi+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- ^pi+) pi+]CC",
-        "pis" :   "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D02KSPiPi_LL_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D02KSPiPi_LL_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF= DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF= DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF= DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF= DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF= DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF= DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0") + topo_sv_var,
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsPimPip_DD(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsPimPip_DD"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_DD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) pi- pi+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^pi- pi+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- ^pi+) pi+]CC",
-        "pis" :   "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D02KSPiPi_DD_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D02KSPiPi_DD_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0") + topo_sv_var,
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsPimPip_LL_LowBias(options, pvs, rec_summary):
-    name = "D0ToKsPimPip_LL_LowBias"
-    turbo_line = "Hlt2Charm_D0ToKsPimPip_LL_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) pi- pi+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) pi- pi+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) pi- pi+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) pi- pi+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^pi- pi+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) pi- ^pi+]CC",
-    }
-
-    DTF_D0ToKsPimPip_LL_LB_MASS = DecayTreeFitter(
-        name='DTF_D02KSPiPi_LL_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsPimPip_DD_LowBias(options, pvs, rec_summary):
-    name = "D0ToKsPimPip_DD_LowBias"
-    turbo_line = "Hlt2Charm_D0ToKsPimPip_DD_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) pi- pi+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) pi- pi+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) pi- pi+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) pi- pi+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^pi- pi+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) pi- ^pi+]CC",
-    }
-
-    DTF_D0ToKsPimPip_DD_LB_MASS = DecayTreeFitter(
-        name='DTF_D02KSPiPi_DD_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsPimPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsPimPip_LL(options, pvs, rec_summary):
-    name = "D0ToKsPimPip_LL"
-    turbo_line = "Hlt2Charm_D0ToKsPimPip_LL"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) pi- pi+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) pi- pi+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) pi- pi+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) pi- pi+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^pi- pi+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) pi- ^pi+]CC",
-    }
-
-    DTF_D0ToKsPimPip_LL_MASS = DecayTreeFitter(
-        name='DTF_D02KSPiPi_LL_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsPimPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsPimPip_DD(options, pvs, rec_summary):
-    name = "D0ToKsPimPip_DD"
-    turbo_line = "Hlt2Charm_D0ToKsPimPip_DD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) pi- pi+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) pi- pi+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) pi- pi+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) pi- pi+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^pi- pi+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) pi- ^pi+]CC",
-    }
-
-    DTF_D0ToKsPimPip_DD_MASS = DecayTreeFitter(
-        name='DTF_D02KSPiPi_DD_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsPimPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-# D0->KSK-Ï€+
-def maketuple_DstpToD0Pip_D0ToKsKmPip_LL_LowBias(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKmPip_LL_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_LL_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- pi+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- pi+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- pi+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^pi+) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKmPip_LL_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKmPip_LL_lowbias_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsKmPip_DD_LowBias(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKmPip_DD_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_DD_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- pi+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- pi+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- pi+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^pi+) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKmPip_DD_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKmPip_DD_lowbias_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsKmPip_LL(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKmPip_LL"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_LL"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- pi+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- pi+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- pi+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^pi+) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKmPip_LL_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKmPip_LL_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsKmPip_DD(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKmPip_DD"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_DD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- pi+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- pi+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- pi+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^pi+) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKmPip_DD_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKmPip_DD_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKmPip_LL_LowBias(options, pvs, rec_summary):
-    name = "D0ToKsKmPip_LL_LowBias"
-    turbo_line = "Hlt2Charm_D0ToKsKmPip_LL_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- pi+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- pi+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- pi+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- pi+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- pi+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^pi+]CC",
-    }
-
-    DTF_D0ToKsKmPip_LL_LB_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKmPip_LL_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKmPip_DD_LowBias(options, pvs, rec_summary):
-    name = "D0ToKsKmPip_DD_LowBias"
-    turbo_line = "Hlt2Charm_D0ToKsKmPip_DD_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- pi+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- pi+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- pi+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- pi+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- pi+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^pi+]CC",
-    }
-
-    DTF_D0ToKsKmPip_DD_LB_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKmPip_DD_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKmPip_LL(options, pvs, rec_summary):
-    name = "D0ToKsKmPip_LL"
-    turbo_line = "Hlt2Charm_D0ToKsKmPip_LL"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- pi+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- pi+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- pi+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- pi+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- pi+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^pi+]CC",
-    }
-
-    DTF_D0ToKsKmPip_LL_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKmPip_LL_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKmPip_DD(options, pvs, rec_summary):
-    name = "D0ToKsKmPip_DD"
-    turbo_line = "Hlt2Charm_D0ToKsKmPip_DD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- pi+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- pi+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- pi+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- pi+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- pi+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^pi+]CC",
-    }
-
-    DTF_D0ToKsKmPip_DD_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKmPip_DD_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-# D0->KSK+Ï€-
-def maketuple_DstpToD0Pip_D0ToKsKpPim_LL_LowBias(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKpPim_LL_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_LL_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K+ pi-) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K+ pi-) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ ^pi-) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K+ pi-) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKpPim_LL_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKpPim_LL_lowbias_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsKpPim_DD_LowBias(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKpPim_DD_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_DD_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K+ pi-) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K+ pi-) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ ^pi-) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K+ pi-) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKpPim_DD_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKpPim_DD_lowbias_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsKpPim_LL(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKpPim_LL"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_LL"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K+ pi-) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K+ pi-) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ ^pi-) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K+ pi-) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKpPim_LL_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKpPim_LL_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsKpPim_DD(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKpPim_DD"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_DD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K+ pi-) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K+ pi-) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ ^pi-) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K+ pi-) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKpPim_DD_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKpPim_DD_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKpPim_LL_LowBias(options, pvs, rec_summary):
-    name = "D0ToKsKpPim_LL_LowBias"
-    turbo_line = "Hlt2Charm_D0ToKsKpPim_LL_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K+ pi-]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K+ pi-]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K+ pi-]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K+ pi-]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) K+ ^pi-]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) ^K+ pi-]CC",
-    }
-
-    DTF_D0ToKsKpPim_LL_LB_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKpPim_LL_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKpPim_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKpPim_DD_LowBias(options, pvs, rec_summary):
-    name = "D0ToKsKpPim_DD_LowBias"
-    turbo_line = "Hlt2Charm_D0ToKsKpPim_DD_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K+ pi-]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K+ pi-]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K+ pi-]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K+ pi-]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) K+ ^pi-]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) ^K+ pi-]CC",
-    }
-
-    DTF_D0ToKsKpPim_DD_LB_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKpPim_DD_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKpPim_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKpPim_LL(options, pvs, rec_summary):
-    name = "D0ToKsKpPim_LL"
-    turbo_line = "Hlt2Charm_D0ToKsKpPim_LL"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K+ pi-]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K+ pi-]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K+ pi-]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K+ pi-]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) K+ ^pi-]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) ^K+ pi-]CC",
-    }
-
-    DTF_D0ToKsKpPim_LL_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKpPim_LL_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKpPim_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKpPim_DD(options, pvs, rec_summary):
-    name = "D0ToKsKpPim_DD"
-    turbo_line = "Hlt2Charm_D0ToKsKpPim_DD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K+ pi-]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K+ pi-]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K+ pi-]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K+ pi-]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) K+ ^pi-]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) ^K+ pi-]CC",
-    }
-
-    DTF_D0ToKsKpPim_DD_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKpPim_DD_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKpPim_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-# D0->KSK-K+
-def maketuple_DstpToD0Pip_D0ToKsKmKp_LL_LowBias(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKmKp_LL_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_LL_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- K+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- K+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- K+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- K+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^K+) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKmKp_LL_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKmKp_LL_lowbias_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsKmKp_DD_LowBias(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKmKp_DD_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_DD_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- K+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- K+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- K+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- K+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^K+) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKmKp_DD_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKmKp_DD_lowbias_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsKmKp_LL(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKmKp_LL"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_LL"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- K+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- K+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- K+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- K+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^K+) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKmKp_LL_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKmKp_LL_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsKmKp_DD(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKmKp_DD"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_DD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- K+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- K+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- K+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- K+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^K+) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKmKp_DD_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKmKp_DD_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKmKp_LL_LowBias(options, pvs, rec_summary):
-    name = "D0ToKsKmKp_LL_LowBias"
-    turbo_line = "Hlt2Charm_D0ToKsKmKp_LL_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- K+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- K+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- K+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- K+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- K+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^K+]CC",
-    }
-
-    DTF_D0ToKsKmKp_LL_LB_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKmKp_LL_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmKp_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKmKp_DD_LowBias(options, pvs, rec_summary):
-    name = "D0ToKsKmKp_DD_LowBias"
-    turbo_line = "Hlt2Charm_D0ToKsKmKp_DD_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- K+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- K+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- K+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- K+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- K+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^K+]CC",
-    }
-
-    DTF_D0ToKsKmKp_DD_LB_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKmKp_DD_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmKp_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsPimPip_LL_NoBias(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsPimPip_LL_NoBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_LL_NoBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) pi- pi+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^pi- pi+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- ^pi+) pi+]CC",
-        "pis" :   "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D02KSPiPi_LL_nobias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D02KSPiPi_LL_nobias_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0") + topo_sv_var,
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKmKp_LL(options, pvs, rec_summary):
-    name = "D0ToKsKmKp_LL"
-    turbo_line = "Hlt2Charm_D0ToKsKmKp_LL"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- K+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- K+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- K+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- K+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- K+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^K+]CC",
-    }
-
-    DTF_D0ToKsKmKp_LL_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKmKp_LL_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmKp_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKmKp_DD(options, pvs, rec_summary):
-    name = "D0ToKsKmKp_DD"
-    turbo_line = "Hlt2Charm_D0ToKsKmKp_DD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- K+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- K+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- K+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- K+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- K+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^K+]CC",
-    }
-
-    DTF_D0ToKsKmKp_DD_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKmKp_DD_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmKp_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-# ########################################
diff --git a/Charm_2024validation/options/d0_to_kshh_MC.py b/Charm_2024validation/options/d0_to_kshh_MC.py
deleted file mode 100644
index 9fa138f8ef..0000000000
--- a/Charm_2024validation/options/d0_to_kshh_MC.py
+++ /dev/null
@@ -1,44 +0,0 @@
-from .tupling import (
-    make_MC_composite_variables,
-    make_MC_basic_variables,
-    make_MC_event_variables,
-)
-
-from PyConf.reading import get_mc_particles, get_mc_header
-from FunTuple import FunTuple_MCParticles as FuntupleMC
-
-def maketuple_MC_DstpToD0Pip_D0ToKsPimPip(options, pvs, rec_summary):
-    name = "MC_DstpToD0Pip_D0ToKsPimPip"
-    line = "/Event/MC/Particles"
-    
-    input_data = get_mc_particles(f"{line}")
-
-    branches = {
-       "Dst" : "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi- pi+) pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ ==> ^([D0]CC ==> (KS0 ==> pi- pi+) pi- pi+) pi+]CC",
-        "KS0"  : "[D*(2010)+ ==> ([D0]CC ==> ^(KS0 ==> pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> ^pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi- ^pi+) pi- pi+) pi+]CC",
-        "hm"   : "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi- pi+) ^pi- pi+) pi+]CC",
-        "hp"  :  "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi- pi+) pi- ^pi+) pi+]CC",
-        "pis" :  "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi- pi+) pi- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_MC_composite_variables(),
-        "D0"    : make_MC_composite_variables(),
-        "KS0"    : make_MC_composite_variables(),
-        "KS0_pim"     : make_MC_basic_variables(),
-        "KS0_pip"     : make_MC_basic_variables(),
-        "hm"    : make_MC_basic_variables(),
-        "hp"    : make_MC_basic_variables(),
-        "pis"   : make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                          tuple_name="MCDecayTree",
-                          fields=branches, variables = variables,  
-                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])), 
-                          inputs=input_data)
-
-    return [mytuple]
diff --git a/Charm_2024validation/options/d0_to_ksks.py b/Charm_2024validation/options/d0_to_ksks.py
deleted file mode 100644
index d47253aa14..0000000000
--- a/Charm_2024validation/options/d0_to_ksks.py
+++ /dev/null
@@ -1,1049 +0,0 @@
-import Functors as F
-from Functors.math import log
-from DaVinci import Options, make_config
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunctorCollection
-from PyConf.reading import get_particles, get_pvs
-import FunTuple.functorcollections as FC
-from FunTuple import FunTuple_Particles as Funtuple
-from DecayTreeFitter import DecayTreeFitter
-
-from .tupling import (
-    make_basic_variables,
-    make_composite_variables,
-    make_hlt2_event_variables,
-    make_basic_dtf_variables,
-    make_composite_dtf_variables,
-    Hlt1_lines
-)
-
-# define helper functors
-get_SV =  F.ENDVERTEX @ F.FORWARDARG0
-get_SV_pos = F.TOLINALG @ F.POSITION @ get_SV
-# only if composite (i.e. has vertex)

-get_child_1 = F.CHILD(1, F.FORWARDARG0) # change here the index of the child.
-get_child_endvtx_pos_1 = F.ENDVERTEX_POS  @ get_child_1
-get_fdvec_child_1 = get_child_endvtx_pos_1 - get_SV_pos
-get_child_2 = F.CHILD(2, F.FORWARDARG0) # change here the index of the child.
-get_child_endvtx_pos_2 = F.ENDVERTEX_POS  @ get_child_2
-get_fdvec_child_2 = get_child_endvtx_pos_2 - get_SV_pos
-
-# define observables
-IP_wrt_SV_KS1 = F.IP.bind(get_SV_pos , get_child_1)
-IP_wrt_SV_KS2 = F.IP.bind(get_SV_pos , get_child_2)
-IPCHI2_wrt_SV_KS1 = F.IPCHI2.bind(get_SV , get_child_1)
-IPCHI2_wrt_SV_KS2 = F.IPCHI2.bind(get_SV , get_child_2)
-# only if child is composite (i.e. has vertex)
-FD_wrt_SV_KS1 = F.MAGNITUDE @ get_fdvec_child_1
-FD_wrt_SV_KS2 = F.MAGNITUDE @ get_fdvec_child_2
-FDCHI2_wrt_SV_KS1 = F.VTX_FDCHI2.bind(get_SV, get_child_1)
-FDCHI2_wrt_SV_KS2 = F.VTX_FDCHI2.bind(get_SV, get_child_2)
-# Note: Apply the functors to the head of the node of decay tree e.g. B
-# Functor collection for SV related info
-topo_sv_var = FunctorCollection(
-    {
-        "ORIVXIP_CHILD1": IP_wrt_SV_KS1,
-        "ORIVXIP_CHILD2": IP_wrt_SV_KS2,
-        "ORIVXIPCHI2_CHILD1": IPCHI2_wrt_SV_KS1,
-        "ORIVXIPCHI2_CHILD2": IPCHI2_wrt_SV_KS2,
-        "ORIVXFD_CHILD1": FD_wrt_SV_KS1,
-        "ORIVXFD_CHILD2": FD_wrt_SV_KS2,
-        "ORIVXFDCHI2_CHILD1": FDCHI2_wrt_SV_KS1,
-        "ORIVXFDCHI2_CHILD2": FDCHI2_wrt_SV_KS2,
-    }
-)
-
-############################# LLLL #############################
-def maketuple_Dst2D0pi_D02KSKS_LLLL(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLL"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_LLLL = DecayTreeFitter(
-    #     name='DTF_LLLL',
-    #     input_particles=input_data)
-    #
-    # DTF_LLLL_PV = DecayTreeFitter(
-    #     name='DTF_LLLL_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_LLLL_MASS = DecayTreeFitter(
-        name='DTF_LLLL_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_LLLL_MASS_PV = DecayTreeFitter(
-        'DTF_LLLL_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_LLLL",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# LLLL Tight #############################
-def maketuple_Dst2D0pi_D02KSKS_LLLL_Tight(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLL_Tight"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_LLLL_Tight = DecayTreeFitter(
-    #     name='DTF_LLLL_Tight',
-    #     input_particles=input_data)
-    #
-    # DTF_LLLL_Tight_PV = DecayTreeFitter(
-    #     name='DTF_LLLL_Tight_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_LLLL_Tight_MASS = DecayTreeFitter(
-        name='DTF_LLLL_Tight_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_LLLL_Tight_MASS_PV = DecayTreeFitter(
-        'DTF_LLLL_Tight_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_LLLL_Tight",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# LLDD #############################
-def maketuple_Dst2D0pi_D02KSKS_LLDD(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLDD"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_LLDD = DecayTreeFitter(
-    #     name='DTF_LLDD',
-    #     input_particles=input_data)
-    #
-    # DTF_LLDD_PV = DecayTreeFitter(
-    #     name='DTF_LLDD_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_LLDD_MASS = DecayTreeFitter(
-        name='DTF_LLDD_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_LLDD_MASS_PV = DecayTreeFitter(
-        'DTF_LLDD_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLDD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLDD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLDD, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLDD_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_LLDD",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# LLDD Tight #############################
-def maketuple_Dst2D0pi_D02KSKS_LLDD_Tight(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLDD_Tight"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_LLDD_Tight = DecayTreeFitter(
-    #     name='DTF_LLDD_Tight',
-    #     input_particles=input_data)
-    #
-    # DTF_LLDD_Tight_PV = DecayTreeFitter(
-    #     name='DTF_LLDD_Tight_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_LLDD_Tight_MASS = DecayTreeFitter(
-        name='DTF_LLDD_Tight_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_LLDD_Tight_MASS_PV = DecayTreeFitter(
-        'DTF_LLDD_Tight_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False, DTF=DTF_LLDD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False, DTF=DTF_LLDD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLDD_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLDD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_LLDD_Tight",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# DDDD #############################
-def maketuple_Dst2D0pi_D02KSKS_DDDD(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDDD"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_DDDD = DecayTreeFitter(
-    #     name='DTF_DDDD',
-    #     input_particles=input_data)
-    #
-    # DTF_DDDD_PV = DecayTreeFitter(
-    #     name='DTF_DDDD_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_DDDD_MASS = DecayTreeFitter(
-        name='DTF_DDDD_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_DDDD_MASS_PV = DecayTreeFitter(
-        'DTF_DDDD_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_DDDD",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# DDDD Tight #############################
-def maketuple_Dst2D0pi_D02KSKS_DDDD_Tight(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDDD_Tight"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_DDDD_Tight = DecayTreeFitter(
-    #     name='DTF_DDDD_Tight',
-    #     input_particles=input_data)
-    #
-    # DTF_DDDD_Tight_PV = DecayTreeFitter(
-    #     name='DTF_DDDD_Tight_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_DDDD_Tight_MASS = DecayTreeFitter(
-        name='DTF_DDDD_Tight_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_DDDD_Tight_MASS_PV = DecayTreeFitter(
-        'DTF_DDDD_Tight_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_DDDD_Tight",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# ULLL #############################
-def maketuple_Dst2D0pi_D02KSKS_ULLL(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULLL"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_ULLL = DecayTreeFitter(
-    #     name='DTF_ULLL',
-    #     input_particles=input_data)
-    #
-    # DTF_ULLL_PV = DecayTreeFitter(
-    #     name='DTF_ULLL_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_ULLL_MASS = DecayTreeFitter(
-        name='DTF_ULLL_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_ULLL_MASS_PV = DecayTreeFitter(
-        'DTF_ULLL_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_ULLL",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# ULLL Tight #############################
-def maketuple_Dst2D0pi_D02KSKS_ULLL_Tight(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULLL_Tight"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_ULLL_Tight = DecayTreeFitter(
-    #     name='DTF_ULLL_Tight',
-    #     input_particles=input_data)
-    #
-    # DTF_ULLL_Tight_PV = DecayTreeFitter(
-    #     name='DTF_ULLL_Tight_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_ULLL_Tight_MASS = DecayTreeFitter(
-        name='DTF_ULLL_Tight_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_ULLL_Tight_MASS_PV = DecayTreeFitter(
-        'DTF_ULLL_Tight_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_ULLL_Tight",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# ULDD #############################
-def maketuple_Dst2D0pi_D02KSKS_ULDD(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULDD"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_ULDD = DecayTreeFitter(
-    #     name='DTF_ULDD',
-    #     input_particles=input_data)
-    #
-    # DTF_ULDD_PV = DecayTreeFitter(
-    #     name='DTF_ULDD_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_ULDD_MASS = DecayTreeFitter(
-        name='DTF_ULDD_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_ULDD_MASS_PV = DecayTreeFitter(
-        'DTF_ULDD_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_ULDD",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# ULDD Tight #############################
-def maketuple_Dst2D0pi_D02KSKS_ULDD_Tight(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULDD_Tight"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_ULDD_Tight = DecayTreeFitter(
-    #     name='DTF_ULDD_Tight',
-    #     input_particles=input_data)
-    #
-    # DTF_ULDD_Tight_PV = DecayTreeFitter(
-    #     name='DTF_ULDD_Tight_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_ULDD_Tight_MASS = DecayTreeFitter(
-        name='DTF_ULDD_Tight_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_ULDD_Tight_MASS_PV = DecayTreeFitter(
-        'DTF_ULDD_Tight_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_ULDD_Tight",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# LLLD #############################
-def maketuple_Dst2D0pi_D02KSKS_LLLD(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLD"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_LLLD = DecayTreeFitter(
-    #     name='DTF_LLLD',
-    #     input_particles=input_data)
-    #
-    # DTF_LLLD_PV = DecayTreeFitter(
-    #     name='DTF_LLLD_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_LLLD_MASS = DecayTreeFitter(
-        name='DTF_LLLD_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_LLLD_MASS_PV = DecayTreeFitter(
-        'DTF_LLLD_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_LLLD",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# LLLD Tight #############################
-def maketuple_Dst2D0pi_D02KSKS_LLLD_Tight(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLD_Tight"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_LLLD_Tight = DecayTreeFitter(
-    #     name='DTF_LLLD_Tight',
-    #     input_particles=input_data)
-    #
-    # DTF_LLLD_Tight_PV = DecayTreeFitter(
-    #     name='DTF_LLLD_Tight_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_LLLD_Tight_MASS = DecayTreeFitter(
-        name='DTF_LLLD_Tight_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_LLLD_Tight_MASS_PV = DecayTreeFitter(
-        'DTF_LLLD_Tight_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_LLLD_Tight",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# DDLD #############################
-def maketuple_Dst2D0pi_D02KSKS_DDLD(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDLD"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_DDLD = DecayTreeFitter(
-    #     name='DTF_DDLD',
-    #     input_particles=input_data)
-    #
-    # DTF_DDLD_PV = DecayTreeFitter(
-    #     name='DTF_DDLD_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_DDLD_MASS = DecayTreeFitter(
-        name='DTF_DDLD_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_DDLD_MASS_PV = DecayTreeFitter(
-        'DTF_DDLD_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_DDLD",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# DDLD Tight #############################
-def maketuple_Dst2D0pi_D02KSKS_DDLD_Tight(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDLD_Tight"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_DDLD_Tight = DecayTreeFitter(
-    #     name='DTF_DDLD_Tight',
-    #     input_particles=input_data)
-    #
-    # DTF_DDLD_Tight_PV = DecayTreeFitter(
-    #     name='DTF_DDLD_Tight_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_DDLD_Tight_MASS = DecayTreeFitter(
-        name='DTF_DDLD_Tight_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_DDLD_Tight_MASS_PV = DecayTreeFitter(
-        'DTF_DDLD_Tight_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_DDLD_Tight",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
diff --git a/Charm_2024validation/options/d0_to_ksks_MC.py b/Charm_2024validation/options/d0_to_ksks_MC.py
deleted file mode 100644
index 06c1ac6139..0000000000
--- a/Charm_2024validation/options/d0_to_ksks_MC.py
+++ /dev/null
@@ -1,46 +0,0 @@
-from .tupling import (
-    make_MC_composite_variables,
-    make_MC_basic_variables,
-    make_MC_event_variables,
-)
-
-from PyConf.reading import get_mc_particles, get_mc_header
-from FunTuple import FunTuple_MCParticles as FuntupleMC
-
-############################# LLLL #############################
-def maketuple_MC_Dst2D0pi_D02KSKS_LLLL(options, pvs, rec_summary):
-    name = "MC_DstpToD0Pip_D0ToKsKs_LLLL"
-    line = "/Event/MC/Particles"
-
-    input_data = get_mc_particles(f"{line}")
-
-    fields = {
-        "Dst": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi+ pi-) (KS0 ==> pi+ pi-) ) pi+]CC",
-        "D0": "[D*(2010)+ ==> ^([D0]CC ==> (KS0 ==> pi+ pi-) (KS0 ==> pi+ pi-) ) pi+]CC",
-        "KS1": "[D*(2010)+ ==> ([D0]CC ==> ^(KS0 ==> pi+ pi-) (KS0 ==> pi+ pi-) ) pi+]CC",
-        "KS2": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi+ pi-) ^(KS0 ==> pi+ pi-) ) pi+]CC",
-        "pip1": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> ^pi+ pi-) (KS0 ==> pi+ pi-) ) pi+]CC",
-        "pim1": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi+ ^pi-) (KS0 ==> pi+ pi-) ) pi+]CC",
-        "pip2": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi+ pi-) (KS0 ==> ^pi+ pi-) ) pi+]CC",
-        "pim2": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi+ pi-) (KS0 ==> pi+ ^pi-) ) pi+]CC",
-        "pi_soft": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi+ pi-) (KS0 ==> pi+ pi-) ) ^pi+]CC",
-    }
-
-    variables = {"pip1":  make_MC_basic_variables(),
-                 "pim1":  make_MC_basic_variables(),
-                 "pip2":  make_MC_basic_variables(),
-                 "pim2":  make_MC_basic_variables(),
-                 "KS1": make_MC_composite_variables(),
-                 "KS2": make_MC_composite_variables(),
-                 "D0": make_MC_composite_variables(),
-                 "Dst": make_MC_composite_variables(),
-                 "pi_soft":  make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                          tuple_name="MCDecayTree",
-                          fields=fields, variables = variables,
-                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
-                          inputs=input_data)
-
-    return [mytuple]
diff --git a/Charm_2024validation/options/d_to_hhh.py b/Charm_2024validation/options/d_to_hhh.py
deleted file mode 100644
index d10fa039f6..0000000000
--- a/Charm_2024validation/options/d_to_hhh.py
+++ /dev/null
@@ -1,503 +0,0 @@
-from .tupling import (
-    make_composite_variables_3body,
-    make_b_composite_variables,
-    make_composite_variables,
-    make_basic_variables,
-    make_hlt2_event_variables,
-    make_composite_dtf_variables_3body,
-    make_basic_dtf_variables,
-)
-
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunTuple_Particles as Funtuple
-
-
-def make_dtf_variables(options, pvs, input_data, ptype):
-
-    if ptype not in ["basic", "composite"]:
-        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
-
-    from DecayTreeFitter import DecayTreeFitter
-    
-    DTF = DecayTreeFitter(
-        name=f'DTF_{{hash}}',
-        input_particles=input_data)
-
-    DTFvtx = DecayTreeFitter(
-        name=f'DTFvtx_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    DTFmassDp = DecayTreeFitter(
-        name=f'DTFmassDp_{{hash}}',
-        input_particles=input_data,
-        mass_constraints=["D+"])
-
-    DTFvtxmassDp = DecayTreeFitter(
-        name=f'DTFvtxmassDp_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D+"])
-
-    DTFmassDsp = DecayTreeFitter(
-        name=f'DTFmassDsp_{{hash}}',
-        input_particles=input_data,
-        substitutions = ['D+{{D_s+}}'],
-        mass_constraints=["D_s+"])
-
-    DTFvtxmassDsp = DecayTreeFitter(
-        name=f'DTFvtxmassDsp_{{hash}}',
-        input_particles=input_data,
-        substitutions = ['D+{{D_s+}}',"KS0{{KS0}}"],#trick
-        mass_constraints=["D_s+"],
-        input_pvs=pvs,
-    )
-
-    if ptype == "basic":
-        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassDp,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="Dp")
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassDp,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="Dp")
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassDsp,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="Dsp")
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassDsp,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="Dsp")
-        return dtf_vars
-
-    if ptype == "composite":
-        dtf_vars = make_composite_dtf_variables_3body(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
-                                             DTF=DTFmassDp,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="Dp")
-        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
-                                             DTF=DTFvtxmassDp,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="Dp")
-        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
-                                             DTF=DTFmassDsp,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="Dsp")
-        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
-                                             DTF=DTFvtxmassDsp,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="Dsp")
-        return dtf_vars
-
-
-def maketuple_D2Kpipi(options, pvs, rec_summary, _NoCuts=False):
-    name = "D2Kpipi"
-    turbo_line = "Hlt2Charm_DpDspToKmPipPip"
-    if _NoCuts == True:
-        turbo_line += "_NoCuts"
-        name += "_NoCuts"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> K- pi+ pi+]CC",
-        "Km"   : "[D+ -> ^K- pi+ pi+]CC",
-        "pip1"  : "[D+ -> K- ^pi+ pi+]CC",
-        "pip2" : "[D+ -> K- pi+ ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2pipipi(options, pvs, rec_summary, _NoCuts=False):
-    name = "D2pipipi"
-    turbo_line = "Hlt2Charm_DpDspToPimPipPip"
-    if _NoCuts == True:
-        turbo_line += "_NoCuts"
-        name += "_NoCuts"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> pi- pi+ pi+]CC",
-        "pim"   : "[D+ -> ^pi- pi+ pi+]CC",
-        "pip1"  : "[D+ -> pi- ^pi+ pi+]CC",
-        "pip2" : "[D+ -> pi- pi+ ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Ds2KKpi(options, pvs, rec_summary, _NoCuts=False):
-    name = "Ds2KKpi"
-    turbo_line = "Hlt2Charm_DpDspToKmKpPip"
-    if _NoCuts == True:
-        turbo_line += "_NoCuts"
-        name += "_NoCuts"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> K- K+ pi+]CC",
-        "Km"   : "[D+ -> ^K- K+ pi+]CC",
-        "Kp"  : "[D+ -> K- ^K+ pi+]CC",
-        "pip" : "[D+ -> K- K+ ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-    
-    return [myfilter, mytuple]
-
-def maketuple_D2Kpipi_Kpi(options, pvs, rec_summary):
-    name = "D2Kpipi_Kpi"
-    turbo_line = "Hlt2Charm_DpDspToKmPipPip"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (KS0 -> K- pi+) pi+]CC",
-        "Kst" : "[D+ -> ^(KS0 -> K- pi+) pi+]CC",
-        "Km"   : "[D+ -> (KS0 -> ^K- pi+) pi+]CC",
-        "pip"  : "[D+ -> (KS0 -> K- ^pi+) pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data),
-        "Kst"   : make_composite_variables(options, pvs, input_data),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, use_loki_decay_finder=True)
-
-    return [myfilter, mytuple]
-
-
-
-
-    '''
-    from PyConf.Algorithms import ThOrParticleSelection
-    import Functors as F
-    FILTER_TREE = lambda id: F.FILTER(F.IS_ABS_ID(id)) @ F.GET_ALL_DESCENDANTS()
-    Km_data = ThOrParticleSelection(
-    InputParticles=input_data, Functor=FILTER_TREE("[K-]CC")
-).OutputSelection
-    pip_data = ThOrParticleSelection(
-        InputParticles=input_data, Functor=FILTER_TREE("[pi+]CC")
-).OutputSelection
-    
-    
-    from PyConf.Algorithms import ChargedBasicsProducer, UniqueIDGeneratorAlg
-    from PyConf.Algorithms import ThOrCombiner__2ChargedBasics, ThOrCombiner__2Particle
-    # make unique_id_generator
-    unique_id_gen = UniqueIDGeneratorAlg()
-    '''
-    '''
-    # produce charged basic particles
-    produce_kaons = ChargedBasicsProducer(
-        InputUniqueIDGenerator=unique_id_gen, ParticleID="kaon")
-    produce_pions = ChargedBasicsProducer(
-        InputUniqueIDGenerator=unique_id_gen, ParticleID="pion")
-    produce_jpsi = ThOrCombiner__2ChargedBasics(
-    '''
-    '''
-    produce_jpsi = ThOrCombiner__2Particle(
-        InputUniqueIDGenerator=unique_id_gen,
-        DecayDescriptor="[J/psi(1S) -> K- pi+]cc",
-        #Input1=produce_kaons.Particles,
-        #Input2=produce_pions.Particles,
-        Input1=Km_data,
-        Input2=pip_data,
-    )
-    input_data = produce_jpsi.Output
-
-    branches = {
-        "Jpsi" : "[J/psi(1S) -> K- pi+]CC",
-    }
-
-    from FunTuple import FunctorCollection
-    import Functors as F
-    variables = {
-        #"Dp"   : make_composite_variables(options, pvs, input_data, False, False),
-        #"Jpsi"   : make_composite_variables(options, pvs, input_data, False, False),
-        "Jpsi"   : FunctorCollection({
-            "PX": F.PX,
-            "PY": F.PY,
-            "PZ": F.PZ,
-            "BPVDIRA": F.BPVDIRA(pvs),
-            "VCHI2DOF": F.CHI2DOF, #CHI2VXNDOF
-            "BPVIPCHI2": F.BPVIPCHI2(pvs),
-            "BPVIP": F.BPVIP(pvs),
-        }),
-        
-    }
-
-    from FunTuple import FunTuple_Composites as Funtuple
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables, inputs=input_data, store_multiple_cand_info=True)
-    ## add event_variables
-
-    
-    return [myfilter, mytuple]
-    '''
-    '''
-    from PyConf.control_flow import CompositeNode, NodeLogic
-    from PyConf.Algorithms import PrintDecayTree, PrintHeader
-    from RecoConf.reconstruction_objects import upfront_reconstruction
-    from DaVinci.common_particles import make_std_loose_jpsi2mum
-    jpsis = make_std_loose_jpsi2mumu()
-    pdt = PrintDecayTree(name="PrintJpsis", Input=jpsis)
-    algs = upfront_reconstruction() + [jpsis, pdt]
-
-    node = CompositeNode(
-    "PrintJpsiNode", children=algs, combine_logic=NodeLogic.NONLAZY_AND
-)
-    return [node]
-    
-    '''
-
-
-def maketuple_D2pipiK(options, pvs, rec_summary, _NoCuts=False):
-    name = "D2pipiK"
-    turbo_line = "Hlt2Charm_DpDspToKpPimPip"
-    if _NoCuts == True:
-        turbo_line += "_NoCuts"
-        name += "_NoCuts"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> pi- pi+ K+]CC",
-        "p1"   : "[D+ -> ^pi- pi+ K+]CC",
-        "p2"  : "[D+ -> pi- ^pi+ K+]CC",
-        "p3" : "[D+ -> pi- pi+ ^K+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
-        "p1"     : make_basic_variables(options, pvs, input_data),
-        "p2"    : make_basic_variables(options, pvs, input_data),
-        "p3"   : make_basic_variables(options, pvs, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2KKK(options, pvs, rec_summary, _NoCuts=False):
-    name = "D2KKK"
-    turbo_line = "Hlt2Charm_DpDspToKmKpKp"
-    if _NoCuts == True:
-        turbo_line += "_NoCuts"
-        name += "_NoCuts"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> K- K+ K+]CC",
-        "p1"   : "[D+ -> ^K- K+ K+]CC",
-        "p2"  : "[D+ -> K- ^K+ K+]CC",
-        "p3" : "[D+ -> K- K+ ^K+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
-        "p1"     : make_basic_variables(options, pvs, input_data),
-        "p2"    : make_basic_variables(options, pvs, input_data),
-        "p3"   : make_basic_variables(options, pvs, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2piKK(options, pvs, rec_summary, _NoCuts=False):
-    name = "D2piKK"
-    turbo_line = "Hlt2Charm_DpDspToKpKpPim"
-    if _NoCuts == True:
-        turbo_line += "_NoCuts"
-        name += "_NoCuts"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> pi- K+ K+]CC",
-        "p1"   : "[D+ -> ^pi- K+ K+]CC",
-        "p2"  : "[D+ -> pi- ^K+ K+]CC",
-        "p3" : "[D+ -> pi- K+ ^K+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
-        "p1"     : make_basic_variables(options, pvs, input_data),
-        "p2"    : make_basic_variables(options, pvs, input_data),
-        "p3"   : make_basic_variables(options, pvs, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-
-def maketuple_B02Dpi_D2KKpi(options, pvs, rec_summary):
-    name = "B02Dpi_D2KKpi"
-    turbo_line = "Hlt2Charm_B0ToDmPip_DmToKmKpPim"
-    
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-    
-    branches = {
-        "B0" : "[[B0]CC -> (D- -> K- K+ pi-) pi+]CC",
-        "pip" : "[[B0]CC -> (D- -> K- K+ pi-) ^pi+]CC",
-        "Dm" : "[[B0]CC -> ^(D- -> K- K+ pi-) pi+]CC",
-        "p1" : "[[B0]CC -> (D- -> ^K- K+ pi-) pi+]CC",
-        "p2" : "[[B0]CC -> (D- -> K- ^K+ pi-) pi+]CC",
-        "p3" : "[[B0]CC -> (D- -> K- K+ ^pi-) pi+]CC",
-    }
-    
-    variables = {
-        "B0" : make_b_composite_variables(options, pvs, input_data),
-        "pip" : make_basic_variables(options, pvs,input_data),
-        "Dm"   : make_composite_variables_3body(options, pvs, input_data),
-        "p1"     : make_basic_variables(options, pvs, input_data),
-        "p2"    : make_basic_variables(options, pvs, input_data),
-        "p3"   : make_basic_variables(options, pvs, input_data),        
-    }
-    
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-
-def maketuple_B02Dpi_D2pipipi(options, pvs, rec_summary, _NoCuts=False):    
-    name = "B02Dpi_D2pipipi"
-    turbo_line = "Hlt2Charm_B0ToDmPip_DmToPimPimPip"
-    
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-    
-    branches = {
-        "B0" : "[[B0]CC -> (D- -> pi- pi- pi+) pi+]CC",
-        "pip" : "[[B0]CC -> (D- -> pi- pi- pi+) ^pi+]CC",
-        "Dm" : "[[B0]CC -> ^(D- -> pi- pi- pi+) pi+]CC",
-        "p1" : "[[B0]CC -> (D- -> ^pi- pi- pi+) pi+]CC",
-        "p2" : "[[B0]CC -> (D- -> pi- ^pi- pi+) pi+]CC",
-        "p3" : "[[B0]CC -> (D- -> pi- pi- ^pi+) pi+]CC",
-    }
-    
-    variables = {
-        "B0" : make_b_composite_variables(options, pvs, input_data),
-        "pip" : make_basic_variables(options, pvs,input_data),
-        "Dm"   : make_composite_variables_3body(options, pvs, input_data),
-        "p1"     : make_basic_variables(options, pvs, input_data),
-        "p2"    : make_basic_variables(options, pvs, input_data),
-        "p3"   : make_basic_variables(options, pvs, input_data),        
-    }
-    
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-    
-def maketuple_Bs02Dspi_Ds2KKpi(options, pvs, rec_summary, _NoCuts=False):    
-    name = "Bs02Dspi_Ds2KKpi"
-    turbo_line = "Hlt2Charm_Bs0ToDsmPip_DsmToKmKpPim"
-    
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-    
-    branches = {
-        "Bs0" : "[[B_s0]CC -> (D_s- -> K- K+ pi-) pi+]CC",
-        "pip" : "[[B_s0]CC -> (D_s- -> K- K+ pi-) ^pi+]CC",
-        "Dsm" : "[[B_s0]CC -> ^(D_s- -> K- K+ pi-) pi+]CC",
-        "p1" : "[[B_s0]CC -> (D_s- -> ^K- K+ pi-) pi+]CC",
-        "p2" : "[[B_s0]CC -> (D_s- -> K- ^K+ pi-) pi+]CC",
-        "p3" : "[[B_s0]CC -> (D_s- -> K- K+ ^pi-) pi+]CC",
-    }
-    
-    variables = {
-        "Bs0" : make_b_composite_variables(options, pvs, input_data),
-        "pip" : make_basic_variables(options, pvs,input_data),
-        "Dsm"   : make_composite_variables_3body(options, pvs, input_data),
-        "p1"     : make_basic_variables(options, pvs, input_data),
-        "p2"    : make_basic_variables(options, pvs, input_data),
-        "p3"   : make_basic_variables(options, pvs, input_data),        
-    }
-    
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-    
-def maketuple_Bs02Dspi_Ds2pipipi(options, pvs, rec_summary, _NoCuts=False):
-    name = "Bs02Dspi_Ds2pipipi"
-    turbo_line = "Hlt2Charm_Bs0ToDsmPip_DsmToPimPimPip"
-    
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-    
-    branches = {
-        "Bs0" : "[[B_s0]CC -> (D_s- -> pi- pi- pi+) pi+]CC",
-        "pip" : "[[B_s0]CC -> (D_s- -> pi- pi- pi+) ^pi+]CC",
-        "Dsm" : "[[B_s0]CC -> ^(D_s- -> pi- pi- pi+) pi+]CC",
-        "p1" : "[[B_s0]CC -> (D_s- -> ^pi- pi- pi+) pi+]CC",
-        "p2" : "[[B_s0]CC -> (D_s- -> pi- ^pi- pi+) pi+]CC",
-        "p3" : "[[B_s0]CC -> (D_s- -> pi- pi- ^pi+) pi+]CC",
-    }
-    
-    variables = {
-        "Bs0" : make_b_composite_variables(options, pvs, input_data),
-        "pip" : make_basic_variables(options, pvs,input_data),
-        "Dsm"   : make_composite_variables_3body(options, pvs, input_data),
-        "p1"     : make_basic_variables(options, pvs, input_data),
-        "p2"    : make_basic_variables(options, pvs, input_data),
-        "p3"   : make_basic_variables(options, pvs, input_data),        
-    }
-    
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
diff --git a/Charm_2024validation/options/d_to_hhh_MC.py b/Charm_2024validation/options/d_to_hhh_MC.py
deleted file mode 100644
index e666e5f3ce..0000000000
--- a/Charm_2024validation/options/d_to_hhh_MC.py
+++ /dev/null
@@ -1,92 +0,0 @@
-from .tupling import (
-    make_MC_composite_variables,
-    make_MC_basic_variables,
-    make_MC_event_variables,
-)
-
-from PyConf.reading import get_mc_particles, get_mc_header
-from FunTuple import FunTuple_MCParticles as FuntupleMC
-
-def maketuple_MC_D2Kpipi(options, pvs, rec_summary):
-    name = "MC_D2Kpipi"
-    line = "/Event/MC/Particles"
-
-    input_data = get_mc_particles(f"{line}")
-
-    branches = {
-        "Dp" : "[D+ ==> K- pi+ pi+]CC",
-        "Km"   : "[D+ ==> ^K- pi+ pi+]CC",
-        "pip1"  : "[D+ ==> K- ^pi+ pi+]CC",
-        "pip2" : "[D+ ==> K- pi+ ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_MC_composite_variables(),
-        "Km"     : make_MC_basic_variables(),
-        "pip1"    : make_MC_basic_variables(),
-        "pip2"   : make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                          tuple_name="MCDecayTree",
-                          fields=branches, variables = variables,
-                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
-                          inputs=input_data)
-
-    return [mytuple]
-
-def maketuple_MC_Ds2KKpi(options, pvs, rec_summary):
-    name = "MC_Ds2KKpi"
-    line = "/Event/MC/Particles"
-
-    input_data = get_mc_particles(f"{line}")
-
-    branches = {
-        "Dp" : "[D_s+ ==> K- K+ pi+]CC",
-        "Km"   : "[D_s+ ==> ^K- K+ pi+]CC",
-        "Kp"  : "[D_s+ ==> K- ^K+ pi+]CC",
-        "pip" : "[D_s+ ==> K- K+ ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_MC_composite_variables(),
-        "Km"     : make_MC_basic_variables(),
-        "Kp"    : make_MC_basic_variables(),
-        "pip"   : make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                          tuple_name="MCDecayTree",
-                          fields=branches, variables = variables,
-                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
-                          inputs=input_data)
-
-    return [mytuple]
-
-def maketuple_MC_Ds2KKK(options, pvs, rec_summary):
-    name = "MC_Ds2KKK"
-    line = "/Event/MC/Particles"
-
-    input_data = get_mc_particles(f"{line}")
-
-    branches = {
-        "Dp" : "[D_s+ ==> K- K+ K+]CC",
-        "Km"   : "[D_s+ ==> ^K- K+ K+]CC",
-        "Kp1"  : "[D_s+ ==> K- ^K+ K+]CC",
-        "Kp2" : "[D_s+ ==> K- K+ ^K+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_MC_composite_variables(),
-        "Km"     : make_MC_basic_variables(),
-        "Kp1"    : make_MC_basic_variables(),
-        "Kp2"   : make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                          tuple_name="MCDecayTree",
-                          fields=branches, variables = variables,
-                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
-                          inputs=input_data)
-
-    return [mytuple]
diff --git a/Charm_2024validation/options/d_to_ksh.py b/Charm_2024validation/options/d_to_ksh.py
deleted file mode 100644
index df40aee746..0000000000
--- a/Charm_2024validation/options/d_to_ksh.py
+++ /dev/null
@@ -1,313 +0,0 @@
-from .tupling import (
-    make_composite_variables,
-    make_basic_variables,
-    make_hlt2_event_variables,
-    make_composite_dtf_variables,
-    make_basic_dtf_variables,
-)
-
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunTuple_Particles as Funtuple
-
-
-def make_dtf_variables(options, pvs, input_data, ptype, islong=False):
-
-    if ptype not in ["basic", "composite"]:
-        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
-
-    from DecayTreeFitter import DecayTreeFitter
-    
-    DTF = DecayTreeFitter(
-        name=f'DTF_{{hash}}',
-        input_particles=input_data)
-
-    DTFvtx = DecayTreeFitter(
-        name=f'DTFvtx_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    DTFmassKS = DecayTreeFitter(
-        name=f'DTFmassKS_{{hash}}',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTFvtxmassKS = DecayTreeFitter(
-        name=f'DTFvtxmassKS_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    DTFmassDpKS = DecayTreeFitter(
-        name=f'DTFmassDpKS_{{hash}}',
-        input_particles=input_data,
-        mass_constraints=["D+","KS0"])
-
-    DTFvtxmassDpKS = DecayTreeFitter(
-        name=f'DTFvtxmassDpKS_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D+","KS0"])
-
-    DTFmassDspKS = DecayTreeFitter(
-        name=f'DTFmassDspKS_{{hash}}',
-        input_particles=input_data,
-        substitutions = ['D+{{D_s+}}'],
-        mass_constraints=["D_s+","KS0"])
-
-    DTFvtxmassDspKS = DecayTreeFitter(
-        name=f'DTFvtxmassDspKS_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs,
-        substitutions = ['D+{{D_s+}}',"KS0{{KS0}}"],#trick
-        mass_constraints=["D_s+","KS0"],
-    )
-
-
-    if ptype == "basic":
-        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False,
-                                            islong=islong)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False,
-                                            islong=islong)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassKS,
-                                             pv_constraint=False,
-                                             mass_constraint=True, 
-                                             particle_name="KS",
-                                             islong=islong)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassKS,
-                                             pv_constraint=True,
-                                             mass_constraint=True, 
-                                             particle_name="KS",
-                                             islong=islong)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassDpKS,
-                                             pv_constraint=False,
-                                             mass_constraint=True, 
-                                             particle_name="DpKS",
-                                             islong=islong)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassDpKS,
-                                             pv_constraint=True,
-                                             mass_constraint=True, 
-                                             particle_name="DpKS",
-                                             islong=islong)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassDspKS,
-                                             pv_constraint=False,
-                                             mass_constraint=True, 
-                                             particle_name="DspKS",
-                                             islong=islong)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassDspKS,
-                                             pv_constraint=True,
-                                             mass_constraint=True, 
-                                             particle_name="DspKS",
-                                             islong=islong)
-        return dtf_vars
-
-    if ptype == "composite":
-        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassKS,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="KS")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassKS,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="KS")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassDpKS,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="DpKS")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassDpKS,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="DpKS")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassDspKS,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="DspKS")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassDspKS,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="DspKS")
-        return dtf_vars
-
-
-def maketuple_D2KSK_DD(options, pvs, rec_summary):
-    name = "D2KSK_DD"
-    turbo_line = "Hlt2Charm_DpDspToKsKp_DD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (KS0 -> pi- pi+) K+]CC",
-        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) K+]CC",
-        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) K+]CC",
-        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) K+]CC",
-        "hp" : "[D+ -> (KS0 -> pi- pi+) ^K+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2KSK_LD(options, pvs, rec_summary):
-    name = "D2KSK_LD"
-    turbo_line = "Hlt2Charm_DpDspToKsKp_LD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (KS0 -> pi- pi+) K+]CC",
-        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) K+]CC",
-        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) K+]CC",
-        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) K+]CC",
-        "hp" : "[D+ -> (KS0 -> pi- pi+) ^K+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-
-def maketuple_D2KSK_LL(options, pvs, rec_summary):
-    name = "D2KSK_LL"
-    turbo_line = "Hlt2Charm_DpDspToKsKp_LL"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (KS0 -> pi- pi+) K+]CC",
-        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) K+]CC",
-        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) K+]CC",
-        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) K+]CC",
-        "hp" : "[D+ -> (KS0 -> pi- pi+) ^K+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2KSpi_DD(options, pvs, rec_summary):
-    name = "D2KSpi_DD"
-    turbo_line = "Hlt2Charm_DpDspToKsPip_DD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (KS0 -> pi- pi+) pi+]CC",
-        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) pi+]CC",
-        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) pi+]CC",
-        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) pi+]CC",
-        "hp" : "[D+ -> (KS0 -> pi- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2KSpi_LD(options, pvs, rec_summary):
-    name = "D2KSpi_LD"
-    turbo_line = "Hlt2Charm_DpDspToKsPip_LD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (KS0 -> pi- pi+) pi+]CC",
-        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) pi+]CC",
-        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) pi+]CC",
-        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) pi+]CC",
-        "hp" : "[D+ -> (KS0 -> pi- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2KSpi_LL(options, pvs, rec_summary):
-    name = "D2KSpi_LL"
-    turbo_line = "Hlt2Charm_DpDspToKsPip_LL"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (KS0 -> pi- pi+) pi+]CC",
-        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) pi+]CC",
-        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) pi+]CC",
-        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) pi+]CC",
-        "hp" : "[D+ -> (KS0 -> pi- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
diff --git a/Charm_2024validation/options/d_to_ksh_MC.py b/Charm_2024validation/options/d_to_ksh_MC.py
deleted file mode 100644
index 38a2197998..0000000000
--- a/Charm_2024validation/options/d_to_ksh_MC.py
+++ /dev/null
@@ -1,68 +0,0 @@
-from .tupling import (
-    make_MC_composite_variables,
-    make_MC_basic_variables,
-    make_MC_event_variables,
-)
-
-from PyConf.reading import get_mc_particles, get_mc_header
-from FunTuple import FunTuple_MCParticles as FuntupleMC
-
-def maketuple_MC_D2KSK(options, pvs, rec_summary):
-    name = "MC_D2KSK"
-    line = "/Event/MC/Particles"
-
-    input_data = get_mc_particles(f"{line}")
-
-    branches = {
-        "Dp" : "[D_s+ ==> (KS0 ==> pi- pi+) K+]CC",
-        "KS0"  : "[D_s+ ==> ^(KS0 ==> pi- pi+) K+]CC",
-        "pim"   : "[D_s+ ==> (KS0 ==> ^pi- pi+) K+]CC",
-        "pip"  : "[D_s+ ==> (KS0 ==> pi- ^pi+) K+]CC",
-        "hp" : "[D_s+ ==> (KS0 ==> pi- pi+) ^K+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_MC_composite_variables(),
-        "KS0"    : make_MC_composite_variables(),
-        "pim"     : make_MC_basic_variables(),
-        "pip"    : make_MC_basic_variables(),
-        "hp"   : make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                        tuple_name="MCDecayTree",
-                        fields=branches, variables = variables,
-                        event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
-                        inputs=input_data)
-
-    return [mytuple]
-
-def maketuple_MC_D2KSpi(options, pvs, rec_summary):
-    name = "MC_D2KSpi"
-    line = "/Event/MC/Particles"
-
-    input_data = get_mc_particles(f"{line}")
-
-    branches = {
-        "Dp" : "[D+ ==> (KS0 ==> pi- pi+) pi+]CC",
-        "KS0"  : "[D+ ==> ^(KS0 ==> pi- pi+) pi+]CC",
-        "pim"   : "[D+ ==> (KS0 ==> ^pi- pi+) pi+]CC",
-        "pip"  : "[D+ ==> (KS0 ==> pi- ^pi+) pi+]CC",
-        "hp" : "[D+ ==> (KS0 ==> pi- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_MC_composite_variables(),
-        "KS0"    : make_MC_composite_variables(),
-        "pim"     : make_MC_basic_variables(),
-        "pip"    : make_MC_basic_variables(),
-        "hp"   : make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                        tuple_name="MCDecayTree",
-                        fields=branches, variables = variables,
-                        event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
-                        inputs=input_data)
-
-    return [mytuple]
diff --git a/Charm_2024validation/options/detection_asymmetry.py b/Charm_2024validation/options/detection_asymmetry.py
deleted file mode 100644
index 9769559e87..0000000000
--- a/Charm_2024validation/options/detection_asymmetry.py
+++ /dev/null
@@ -1,191 +0,0 @@
-from .tupling import (
-    make_composite_variables,
-    make_composite_variables_3body,
-    make_basic_variables,
-    make_hlt2_event_variables,
-)
-
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunTuple_Particles as Funtuple
-
-def maketuple_D2Kpipi_ADet(options, pvs, rec_summary):
-    name = "D2Kpipi_ADet"
-    turbo_line = "Hlt2Charm_DpToKmPipPip_ADet"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> K- pi+ pi+]CC",
-        "Km"   : "[D+ -> ^K- pi+ pi+]CC",
-        "pip1"  : "[D+ -> K- ^pi+ pi+]CC",
-        "pip2" : "[D+ -> K- pi+ ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
-        "Km"     : make_basic_variables(options, pvs, input_data),
-        "pip1"    : make_basic_variables(options, pvs, input_data),
-        "pip2"   : make_basic_variables(options, pvs, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2pipipi_ADet(options, pvs, rec_summary):
-    name = "D2pipipi_ADet"
-    turbo_line = "Hlt2Charm_DspToPimPipPip_ADet"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D_s+ -> pi- pi+ pi+]CC",
-        "pim"   : "[D_s+ -> ^pi- pi+ pi+]CC",
-        "pip1"  : "[D_s+ -> pi- ^pi+ pi+]CC",
-        "pip2" : "[D_s+ -> pi- pi+ ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
-        "pim"     : make_basic_variables(options, pvs, input_data),
-        "pip1"    : make_basic_variables(options, pvs, input_data),
-        "pip2"   : make_basic_variables(options, pvs, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Ds2KKpi_ADet(options, pvs, rec_summary):
-    name = "Ds2KKpi_ADet"
-    turbo_line = "Hlt2Charm_DspToKmKpPip_ADet"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D_s+ -> K- K+ pi+]CC",
-        "Km"   : "[D_s+ -> ^K- K+ pi+]CC",
-        "Kp"  : "[D_s+ -> K- ^K+ pi+]CC",
-        "pip" : "[D_s+ -> K- K+ ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
-        "Km"     : make_basic_variables(options, pvs, input_data),
-        "Kp"    : make_basic_variables(options, pvs, input_data),
-        "pip"   : make_basic_variables(options, pvs, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-    
-    return [myfilter, mytuple]
-        
-def maketuple_Lc2KSp_LL_ADet(options, pvs, rec_summary):
-    name = "Lc2KSp_LL_ADet"
-    turbo_line = "Hlt2Charm_LcpToPpKs_LL_ADet"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Lc" : "[Lambda_c+ -> (KS0 -> pi- pi+) p+]CC",
-        "KS0"  : "[Lambda_c+ -> ^(KS0 -> pi- pi+) p+]CC",
-        "pim"   : "[Lambda_c+ -> (KS0 -> ^pi- pi+) p+]CC",
-        "pip"  : "[Lambda_c+ -> (KS0 -> pi- ^pi+) p+]CC",
-        "pp" : "[Lambda_c+ -> (KS0 -> pi- pi+) ^p+]CC",
-    }
-
-    variables = {
-        "Lc"   : make_composite_variables(options, pvs, input_data),
-        "KS0"    : make_composite_variables(options, pvs, input_data),
-        "pim"     : make_basic_variables(options, pvs, input_data),
-        "pip"    : make_basic_variables(options, pvs, input_data),
-        "pp"   : make_basic_variables(options, pvs, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Lc2pKpi_ADet(options, pvs, rec_summary):
-    name = "Lc2pKpi_ADet"
-    turbo_line = "Hlt2Charm_LcpToPpKmPip_ADet"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Lc" : "[Lambda_c+ -> K- pi+ p+]CC",
-        "Km"   : "[Lambda_c+ -> ^K- pi+ p+]CC",
-        "pip"  : "[Lambda_c+ -> K- ^pi+ p+]CC",
-        "pp" : "[Lambda_c+ -> K- pi+ ^p+]CC",
-    }
-
-    variables = {
-        "Lc"   : make_composite_variables_3body(options, pvs, input_data),
-        "Km"     : make_basic_variables(options, pvs, input_data),
-        "pip"    : make_basic_variables(options, pvs, input_data),
-        "pp"   : make_basic_variables(options, pvs, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2KSK_LL_ADet(options, pvs, rec_summary):
-    name = "D2KSK_LL_ADet"
-    turbo_line = "Hlt2Charm_DspToKsKp_LL_ADet"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D_s+ -> (KS0 -> pi- pi+) K+]CC",
-        "KS0"  : "[D_s+ -> ^(KS0 -> pi- pi+) K+]CC",
-        "pim"   : "[D_s+ -> (KS0 -> ^pi- pi+) K+]CC",
-        "pip"  : "[D_s+ -> (KS0 -> pi- ^pi+) K+]CC",
-        "hp" : "[D_s+ -> (KS0 -> pi- pi+) ^K+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data),
-        "KS0"    : make_composite_variables(options, pvs, input_data),
-        "pim"     : make_basic_variables(options, pvs, input_data),
-        "pip"    : make_basic_variables(options, pvs, input_data),
-        "hp"   : make_basic_variables(options, pvs, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2KSpi_LL_ADet(options, pvs, rec_summary):
-    name = "D2KSpi_LL_ADet"
-    turbo_line = "Hlt2Charm_DpToKsPip_LL_ADet"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (KS0 -> pi- pi+) pi+]CC",
-        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) pi+]CC",
-        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) pi+]CC",
-        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) pi+]CC",
-        "hp" : "[D+ -> (KS0 -> pi- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data),
-        "KS0"    : make_composite_variables(options, pvs, input_data),
-        "pim"     : make_basic_variables(options, pvs, input_data),
-        "pip"    : make_basic_variables(options, pvs, input_data),
-        "hp"   : make_basic_variables(options, pvs, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
diff --git a/Charm_2024validation/options/dst_to_dee.py b/Charm_2024validation/options/dst_to_dee.py
deleted file mode 100644
index 11f42bae95..0000000000
--- a/Charm_2024validation/options/dst_to_dee.py
+++ /dev/null
@@ -1,296 +0,0 @@
-import Functors as F
-from Functors.math import log
-from DaVinci import Options, make_config
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunctorCollection
-from PyConf.reading import get_particles, get_pvs
-import FunTuple.functorcollections as FC
-from FunTuple import FunTuple_Particles as Funtuple
-from DecayTreeFitter import DecayTreeFitter
-from Hlt2Conf.lines.charm.dst_to_dee_makers import (dst_BDT_functor)
-from .tupling import (
-    make_DeltaM_variable,
-    make_basic_variables,
-    make_composite_variables,
-    make_composite_variables_3body,
-    make_composite_variables_4body,
-    make_hlt2_event_variables,
-    make_basic_dtf_variables,
-    make_composite_dtf_variables,
-    make_composite_dtf_variables_3body,
-    make_composite_dtf_variables_4body,
-    Hlt1_lines
-)
-extra_brem_variables= (FunctorCollection(
-            {
-                "BREMHYPODELTAX": F.BREMHYPODELTAX,
-                "BREMHYPOENERGY": F.BREMHYPOENERGY,
-                "BREMHYPOID": F.BREMHYPOID,
-                "BREMHYPOMATCH_CHI2": F.BREMHYPOMATCH_CHI2,
-                "BREMPIDE": F.BREMPIDE,
-                "INBREM": F.INBREM,
-                "MASS_WITH_BREM": F.MASS_WITH_BREM,
-                "PT_WITH_BREM": F.PT_WITH_BREM,
-                "P_WITH_BREM": F.P_WITH_BREM,
-                "ECALPIDE": F.ECALPIDE,
-                "HCALPIDE": F.HCALPIDE,
-                "ELECTRONSHOWEREOP": F.ELECTRONSHOWEREOP,
-                "CLUSTERMATCH_CHI2": F.CLUSTERMATCH_CHI2,
-                "ELECTRONMATCH_CHI2": F.ELECTRONMATCH_CHI2,
-                "ELECTRONENERGY": F.ELECTRONENERGY,
-                "ELECTRONID": F.ELECTRONID,
-                "HCALEOP": F.HCALEOP,
-                "CALO_NEUTRAL_SHOWER_SHAPE": F.CALO_NEUTRAL_SHOWER_SHAPE,
-                "RICH_DLL_E": F.VALUE_OR(F.NaN)@F.RICH_DLL_E,
-            })
-    )
-
-decay_descriptor = {
-    'dst_kpi_os' : {
-        "Dst0":   "[ D*(2007)0 ->  (D0 ->  K-  pi+)  (gamma ->  e+  e-)]CC",
-        "D0":     "[ D*(2007)0 -> ^(D0 ->  K-  pi+)  (gamma ->  e+  e-)]CC",
-        "Kminus": "[ D*(2007)0 ->  (D0 -> ^K-  pi+)  (gamma ->  e+  e-)]CC",
-        "piplus": "[ D*(2007)0 ->  (D0 ->  K- ^pi+)  (gamma ->  e+  e-)]CC",
-        "gamma":  "[ D*(2007)0 ->  (D0 ->  K-  pi+) ^(gamma ->  e+  e-)]CC",
-        "eplus":  "[ D*(2007)0 ->  (D0 ->  K-  pi+)  (gamma -> ^e+  e-)]CC",
-        "eminus": "[ D*(2007)0 ->  (D0 ->  K-  pi+)  (gamma ->  e+ ^e-)]CC",
-    },
-
-    'dst_kpi_ss' : {
-        "Dst0":   "[ D*(2007)0 ->  (D0 ->  K-  pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "D0":     "[ D*(2007)0 -> ^(D0 ->  K-  pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "Kminus": "[ D*(2007)0 ->  (D0 -> ^K-  pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "piplus": "[ D*(2007)0 ->  (D0 ->  K- ^pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "gamma":  "[ D*(2007)0 ->  (D0 ->  K-  pi+) ^([gamma ->  e+  e+]CC)]CC",
-        "eplus":  "[ D*(2007)0 ->  (D0 ->  K-  pi+)  ([gamma -> ^e+  e+]CC)]CC",
-        "eminus": "[ D*(2007)0 ->  (D0 ->  K-  pi+)  ([gamma ->  e+ ^e+]CC)]CC",
-    },
-
-    'dst_k3pi_os' :  {
-        "Dst0":    "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)  (gamma ->  e+  e-)]CC",
-        "D0":      "[ D*(2007)0 -> ^(D0 -> K- pi- pi+ pi+)  (gamma ->  e+  e-)]CC",
-        "Kminus":  "[ D*(2007)0 ->  (D0 -> ^K- pi- pi+ pi+) (gamma ->  e+  e-)]CC",
-        "piminus": "[ D*(2007)0 ->  (D0 -> K- ^pi- pi+ pi+) (gamma ->  e+  e-)]CC",
-        "piplus1": "[ D*(2007)0 ->  (D0 -> K- pi- ^pi+ pi+) (gamma ->  e+  e-)]CC",
-        "piplus2": "[ D*(2007)0 ->  (D0 -> K- pi- pi+ ^pi+) (gamma ->  e+  e-)]CC",
-        "gamma":   "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+) ^(gamma ->  e+  e-)]CC",
-        "eplus":   "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)  (gamma -> ^e+  e-)]CC",
-        "eminus":  "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)  (gamma ->  e+ ^e-)]CC",
-    },
-
-    'dst_k3pi_ss' :  {
-        "Dst0":    "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)   ([gamma ->  e+  e+]CC)]CC",
-        "D0":      "[ D*(2007)0 -> ^(D0 -> K- pi- pi+ pi+)   ([gamma ->  e+  e+]CC)]CC",
-        "Kminus":  "[ D*(2007)0 ->  (D0 -> ^K- pi- pi+ pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "piminus": "[ D*(2007)0 ->  (D0 -> K- ^pi- pi+ pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "piplus1": "[ D*(2007)0 ->  (D0 -> K- pi- ^pi+ pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "piplus2": "[ D*(2007)0 ->  (D0 -> K- pi- pi+ ^pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "gamma":   "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)  ^([gamma ->  e+  e+]CC)]CC",
-        "eplus":   "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)   ([gamma -> ^e+  e+]CC)]CC",
-        "eminus":  "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)   ([gamma ->  e+ ^e+]CC)]CC",
-    },
-
-    'dsstp_2kpi_os' : {
-        "Dstp":   "[ D*_s+ ->  (D_s+ -> K- K+ pi+)  (gamma ->  e+  e-)]CC",
-        "DpDs":   "[ D*_s+ -> ^(D_s+ -> K- K+ pi+)  (gamma ->  e+  e-)]CC",
-        "Kminus": "[ D*_s+ ->  (D_s+ -> ^K- K+ pi+) (gamma ->  e+  e-)]CC",
-        "Kplus":  "[ D*_s+ ->  (D_s+ -> K- ^K+ pi+) (gamma ->  e+  e-)]CC",
-        "piplus": "[ D*_s+ ->  (D_s+ -> K- K+ ^pi+) (gamma ->  e+  e-)]CC",
-        "gamma":  "[ D*_s+ ->  (D_s+ -> K- K+ pi+) ^(gamma ->  e+  e-)]CC",
-        "eplus":  "[ D*_s+ ->  (D_s+ -> K- K+ pi+)  (gamma -> ^e+  e-)]CC",
-        "eminus": "[ D*_s+ ->  (D_s+ -> K- K+ pi+)  (gamma ->  e+ ^e-)]CC",
-    },
-    'dsstp_2kpi_ss' : {
-        "Dstp":   "[ D*_s+ ->  (D_s+ -> K- K+ pi+)   ([gamma ->  e+  e+]CC)]CC",
-        "DpDs":   "[ D*_s+ -> ^(D_s+ -> K- K+ pi+)   ([gamma ->  e+  e+]CC)]CC",
-        "Kminus": "[ D*_s+ ->  (D_s+ -> ^K- K+ pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "Kplus":  "[ D*_s+ ->  (D_s+ -> K- ^K+ pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "piplus": "[ D*_s+ ->  (D_s+ -> K- K+ ^pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "gamma":  "[ D*_s+ ->  (D_s+ -> K- K+ pi+)  ^([gamma ->  e+  e+]CC)]CC",
-        "eplus":  "[ D*_s+ ->  (D_s+ -> K- K+ pi+)   ([gamma -> ^e+  e+]CC)]CC",
-        "eminus": "[ D*_s+ ->  (D_s+ -> K- K+ pi+)   ([gamma ->  e+ ^e+]CC)]CC",
-    },
-
-}
-
-def MVA_dst_variables(line, pvs):
-    return (FunctorCollection( { "MVA": dst_BDT_functor(pvs, line=line)}))
-#make_dtf_variables(options,  input_data, ptype):
-def make_dtf_variables(options, input_data,  pvs, ptype="basic",  mass_constrain = ["D*(2007)0", "D0" ], nparticles=2):
-    
-    DTF = DecayTreeFitter(
-        name="DTF_{hash}",
-        input_particles=input_data,
-    )
-
-    DTF_DMass_BestPV = DecayTreeFitter(
-        name="DTF_DMass_BestPV_{hash}",
-        input_particles=input_data,
-        mass_constraints=mass_constrain,
-        input_pvs=pvs,
-        fit_all_pvs=False,
-    )
-    DTF_Mass_BestPV = DecayTreeFitter(
-        name="DTF_Mass_BestPV_{hash}",
-        input_particles=input_data,
-        mass_constraints=[mass_constrain[1]],
-        input_pvs=pvs,
-        fit_all_pvs=False,
-    )
-
-    DTF_BestPV = DecayTreeFitter(
-        name="DTF_BestPV_{hash}",
-        input_particles=input_data,
-        #mass_constraints=["D*(2007)0", "D0" ],
-        input_pvs=pvs,
-        fit_all_pvs=False,
-    )
-
-    DTF_DMass = DecayTreeFitter(
-        name="DTF_DMass_{hash}",
-        input_particles=input_data,
-        mass_constraints=mass_constrain,
-        output_level=3,
-    )
-    DTF_Mass = DecayTreeFitter(
-        name="DTF_Mass_{hash}",
-        input_particles=input_data,
-        mass_constraints=[mass_constrain[1]],
-        output_level=3,
-    )
-    
-    if ptype == "basic":
-        dtf_variables =  make_basic_dtf_variables
-    elif ptype == "composite":
-        if nparticles == 2:
-            dtf_variables = make_composite_dtf_variables 
-        elif nparticles == 3:
-            dtf_variables = make_composite_dtf_variables_3body
-        elif nparticles == 4:
-            dtf_variables = make_composite_dtf_variables_4body 
-
-    dtf_vars = dtf_variables(options, pvs, input_data,
-                                        DTF=DTF,
-                                        pv_constraint=False,
-                                        mass_constraint=False)
-    dtf_vars += dtf_variables(options, pvs, input_data,
-                                        DTF=DTF_BestPV,
-                                        pv_constraint=True,
-                                        mass_constraint=False)
-    dtf_vars += dtf_variables(options, pvs, input_data,
-                                        DTF=DTF_Mass,
-                                        pv_constraint=False,
-                                        mass_constraint=True, particle_name="D")
-    dtf_vars += dtf_variables(options, pvs, input_data,
-                                        DTF=DTF_Mass_BestPV,
-                                        pv_constraint=True,
-                                        mass_constraint=True, particle_name="D")
-    dtf_vars += dtf_variables(options, pvs, input_data,
-                                        DTF=DTF_DMass,
-                                        pv_constraint=False,
-                                        mass_constraint=True, particle_name="DstD")
-    dtf_vars += dtf_variables(options, pvs, input_data,
-                                        DTF=DTF_DMass_BestPV,
-                                        pv_constraint=True,
-                                        mass_constraint=True, particle_name="DstD")
-
-    return dtf_vars
-
-
-def make_Dst0ToD0EmEp_D0ToKmPip_tuple(options, line, pvs , rec_summary, dd='dst_kpi_os'):
-
-    input_data=get_particles(f"/Event/HLT2/{line}/Particles")
-    my_filter = create_lines_filter(f"LineFilter_{line}_{{hash}}",[line],)
-
-    fields = decay_descriptor[dd]
-    
-    composite_tuple_variables = {
-        "Dst0"   :  make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs,  "composite") +\
-             MVA_dst_variables("Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip", pvs) + make_DeltaM_variable(options), 
-        "D0"     :  make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs,  "composite"),
-        "gamma"  :  make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs,  "composite")
-    }
-    basic_tuple_variables = { 
-        "Kminus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"),
-        "piplus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"),
-        "eplus"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic") + extra_brem_variables,
-        "eminus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic") + extra_brem_variables,
-    }
-
-    my_tuple = Funtuple(
-        name=f"Tuple_{line}_{dd}",
-        tuple_name="DecayTree",
-        fields=fields,
-        variables= {**composite_tuple_variables, **basic_tuple_variables},
-        event_variables=make_hlt2_event_variables(options, pvs, rec_summary), 
-        inputs=input_data,
-        store_multiple_cand_info=True
-    )
-    return [ my_filter, my_tuple]
-
-def make_Dst0ToD0EmEp_D0ToKmPimPipPip_tuple(options, line, pvs, rec_summary, dd='dst_k3pi_os'):
-
-    input_data=get_particles(f"/Event/HLT2/{line}/Particles")
-    my_filter = create_lines_filter(f"LineFilter_{line}_{{hash}}",[line],)
-
-    fields = decay_descriptor[dd]
-    
-    composite_tuple_variables = {
-        "Dst0"   : make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs, "composite") +\
-             MVA_dst_variables("Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip", pvs) + make_DeltaM_variable(options), 
-        "D0"     : make_composite_variables_4body(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs, "composite", nparticles=4),
-        "gamma"  : make_composite_variables(options, pvs, input_data) 
-    }
-    basic_tuple_variables = { 
-        "Kminus"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"),
-        "piminus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"),
-        "piplus1" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"),
-        "piplus2" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"), 
-        "eplus"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic") + extra_brem_variables,
-        "eminus"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic") + extra_brem_variables,
-    }
-
-    my_tuple = Funtuple(
-        name=f"Tuple_{line}_{dd}",
-        tuple_name="DecayTree",
-        fields=fields,
-        variables= {**composite_tuple_variables, **basic_tuple_variables},
-        event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data,
-        store_multiple_cand_info=True
-    )
-    return [ my_filter, my_tuple]
-
-
-def make_DstpToDpDspEmEp_DpDspToKmKpPip_tuple(options, line, pvs , rec_summary, dd='dsstp_2kpi_os'):
-
-    input_data=get_particles(f"/Event/HLT2/{line}/Particles")
-    my_filter = create_lines_filter(f"LineFilter_{line}_{{hash}}",[line],)
-
-    fields = decay_descriptor[dd]
-
-    composite_tuple_variables = {
-        "Dstp"   : make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs, "composite", mass_constrain = ["D*_s+", "D_s+"]) +\
-             MVA_dst_variables("Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip", pvs) + make_DeltaM_variable(options), 
-        "DpDs"   : make_composite_variables_3body(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs, "composite", mass_constrain = ["D*_s+", "D_s+"], nparticles=3),
-        "gamma"  : make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs, "composite", mass_constrain = ["D*_s+", "D_s+"]),
-    }
-    basic_tuple_variables = { 
-        "Kminus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic",  mass_constrain = ["D*_s+", "D_s+"]),
-        "Kplus"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic",  mass_constrain = ["D*_s+", "D_s+"]),
-        "piplus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic",  mass_constrain = ["D*_s+", "D_s+"]),
-        "eplus"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic",  mass_constrain = ["D*_s+", "D_s+"])+ extra_brem_variables,
-        "eminus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic",  mass_constrain = ["D*_s+", "D_s+"])+ extra_brem_variables,
-    }
-
-    my_tuple = Funtuple(
-        name=f"Tuple_{line}_{dd}",
-        tuple_name="DecayTree",
-        fields=fields,
-        variables= {**composite_tuple_variables, **basic_tuple_variables},
-        event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data,
-        store_multiple_cand_info=True
-    )
-    return [ my_filter, my_tuple]
diff --git a/Charm_2024validation/options/hlt1.py b/Charm_2024validation/options/hlt1.py
deleted file mode 100644
index b93aeb113c..0000000000
--- a/Charm_2024validation/options/hlt1.py
+++ /dev/null
@@ -1,33 +0,0 @@
-###############################################################################
-# (c) Copyright 2023 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.                                       #
-###############################################################################
-"""
-Configures running HLT1 via Moore.
-"""
-
-from Moore import Options
-from Moore.config import allen_control_flow
-from RecoConf.hlt1_allen import allen_gaudi_config, get_allen_line_names
-from AllenConf.hlt1_calibration_lines import make_passthrough_line
-from PyConf.application import configure_input, configure
-
-def alg_config(options: Options):
-    """
-    Configures algorithm running of HLT1 via Moore to be passed to Analysis Productions.
-    """
-
-    config = configure_input(options)
-    with allen_gaudi_config.bind(sequence="hlt1_pp_matching_no_ut_1000KHz"), make_passthrough_line.bind(pre_scaler=1):
-        line_names = get_allen_line_names()
-        allen_node = allen_control_flow(options)
-        config.update(configure(options, allen_node))
-
-    return config
-
diff --git a/Charm_2024validation/options/hlt2/d0_to_hh.py b/Charm_2024validation/options/hlt2/d0_to_hh.py
deleted file mode 100644
index 3c0b0d0086..0000000000
--- a/Charm_2024validation/options/hlt2/d0_to_hh.py
+++ /dev/null
@@ -1,9 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_hh import all_lines as hh_lines
-
-def make_lines():
-    mylines = [builder() for builder in hh_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-
diff --git a/Charm_2024validation/options/hlt2/d0_to_hhhh.py b/Charm_2024validation/options/hlt2/d0_to_hhhh.py
deleted file mode 100644
index 81fe4dce30..0000000000
--- a/Charm_2024validation/options/hlt2/d0_to_hhhh.py
+++ /dev/null
@@ -1,8 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_hhhh import all_lines as hhhh_lines
-
-def make_lines():
-    mylines = [builder() for builder in hhhh_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
diff --git a/Charm_2024validation/options/hlt2/d0_to_hhpi0.py b/Charm_2024validation/options/hlt2/d0_to_hhpi0.py
deleted file mode 100644
index 52f8433c11..0000000000
--- a/Charm_2024validation/options/hlt2/d0_to_hhpi0.py
+++ /dev/null
@@ -1,8 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_hhpi0 import all_lines as hhpi0_lines
-
-def make_lines():
-    mylines = [builder() for builder in hhpi0_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
diff --git a/Charm_2024validation/options/hlt2/d0_to_kshh.py b/Charm_2024validation/options/hlt2/d0_to_kshh.py
deleted file mode 100644
index 79df310ed8..0000000000
--- a/Charm_2024validation/options/hlt2/d0_to_kshh.py
+++ /dev/null
@@ -1,8 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_kshh import all_lines as kshh_lines
-
-def make_lines():
-    mylines = [builder() for builder in kshh_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
diff --git a/Charm_2024validation/options/hlt2/d0_to_ksks.py b/Charm_2024validation/options/hlt2/d0_to_ksks.py
deleted file mode 100644
index 71ab403fd9..0000000000
--- a/Charm_2024validation/options/hlt2/d0_to_ksks.py
+++ /dev/null
@@ -1,8 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_ksks import all_lines as ksks_lines
-
-def make_lines():
-    mylines = [builder() for builder in ksks_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
diff --git a/Charm_2024validation/options/hlt2/d_to_hhh.py b/Charm_2024validation/options/hlt2/d_to_hhh.py
deleted file mode 100644
index cd718f9b86..0000000000
--- a/Charm_2024validation/options/hlt2/d_to_hhh.py
+++ /dev/null
@@ -1,10 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d_to_hhh import all_lines as hhh_lines
-from Hlt2Conf.lines.charm.detection_asymmetry_lines import all_lines as det_asy_lines
-
-def make_lines():
-    mylines = [builder() for builder in hhh_lines.values()]
-    mylines += [builder() for builder in det_asy_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
diff --git a/Charm_2024validation/options/hlt2/d_to_ksh.py b/Charm_2024validation/options/hlt2/d_to_ksh.py
deleted file mode 100644
index 8c8b172dd0..0000000000
--- a/Charm_2024validation/options/hlt2/d_to_ksh.py
+++ /dev/null
@@ -1,10 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d_to_ksh import all_lines as ksh_lines
-from Hlt2Conf.lines.charm.detection_asymmetry_lines import all_lines as det_asy_lines
-
-def make_lines():
-    mylines = [builder() for builder in ksh_lines.values()]
-    mylines += [builder() for builder in det_asy_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
diff --git a/Charm_2024validation/options/hlt2/dst_to_dee.py b/Charm_2024validation/options/hlt2/dst_to_dee.py
deleted file mode 100644
index 4fd67becd7..0000000000
--- a/Charm_2024validation/options/hlt2/dst_to_dee.py
+++ /dev/null
@@ -1,9 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.dst_to_dee import all_lines as dst_to_dee_lines
-
-def make_lines():
-    mylines = [builder() for builder in dst_to_dee_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-
diff --git a/Charm_2024validation/options/hlt2/hlt2.py b/Charm_2024validation/options/hlt2/hlt2.py
deleted file mode 100644
index c1560ce952..0000000000
--- a/Charm_2024validation/options/hlt2/hlt2.py
+++ /dev/null
@@ -1,32 +0,0 @@
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_d0_to_hh.py b/Charm_2024validation/options/hlt2/hlt2_d0_to_hh.py
deleted file mode 100644
index 7c3a67ed03..0000000000
--- a/Charm_2024validation/options/hlt2/hlt2_d0_to_hh.py
+++ /dev/null
@@ -1,41 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_hh import all_lines as hh_lines
-
-def make_lines():
-    mylines = [builder() for builder in hh_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_d0_to_hhhh.py b/Charm_2024validation/options/hlt2/hlt2_d0_to_hhhh.py
deleted file mode 100644
index d7d5dcbb90..0000000000
--- a/Charm_2024validation/options/hlt2/hlt2_d0_to_hhhh.py
+++ /dev/null
@@ -1,40 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_hhhh import all_lines as hhhh_lines
-
-def make_lines():
-    mylines = [builder() for builder in hhhh_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_d0_to_hhpi0.py b/Charm_2024validation/options/hlt2/hlt2_d0_to_hhpi0.py
deleted file mode 100644
index 063eeb274a..0000000000
--- a/Charm_2024validation/options/hlt2/hlt2_d0_to_hhpi0.py
+++ /dev/null
@@ -1,40 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_hhpi0 import all_lines as hhpi0_lines
-
-def make_lines():
-    mylines = [builder() for builder in hhpi0_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_d0_to_kshh.py b/Charm_2024validation/options/hlt2/hlt2_d0_to_kshh.py
deleted file mode 100644
index 3e1996cdf0..0000000000
--- a/Charm_2024validation/options/hlt2/hlt2_d0_to_kshh.py
+++ /dev/null
@@ -1,40 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_kshh import all_lines as kshh_lines
-
-def make_lines():
-    mylines = [builder() for builder in kshh_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_d0_to_ksks.py b/Charm_2024validation/options/hlt2/hlt2_d0_to_ksks.py
deleted file mode 100644
index e8d1052803..0000000000
--- a/Charm_2024validation/options/hlt2/hlt2_d0_to_ksks.py
+++ /dev/null
@@ -1,40 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_ksks import all_lines as ksks_lines
-
-def make_lines():
-    mylines = [builder() for builder in ksks_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_d_to_hhh.py b/Charm_2024validation/options/hlt2/hlt2_d_to_hhh.py
deleted file mode 100644
index 97965cb96e..0000000000
--- a/Charm_2024validation/options/hlt2/hlt2_d_to_hhh.py
+++ /dev/null
@@ -1,42 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d_to_hhh import all_lines as hhh_lines
-from Hlt2Conf.lines.charm.detection_asymmetry_lines import all_lines as det_asy_lines
-
-def make_lines():
-    mylines = [builder() for builder in hhh_lines.values()]
-    mylines += [builder() for builder in det_asy_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_d_to_ksh.py b/Charm_2024validation/options/hlt2/hlt2_d_to_ksh.py
deleted file mode 100644
index d2593da6a9..0000000000
--- a/Charm_2024validation/options/hlt2/hlt2_d_to_ksh.py
+++ /dev/null
@@ -1,42 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d_to_ksh import all_lines as ksh_lines
-from Hlt2Conf.lines.charm.detection_asymmetry_lines import all_lines as det_asy_lines
-
-def make_lines():
-    mylines = [builder() for builder in ksh_lines.values()]
-    mylines += [builder() for builder in det_asy_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_dst_to_dee.py b/Charm_2024validation/options/hlt2/hlt2_dst_to_dee.py
deleted file mode 100644
index d43ecbcd65..0000000000
--- a/Charm_2024validation/options/hlt2/hlt2_dst_to_dee.py
+++ /dev/null
@@ -1,41 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.dst_to_dee import all_lines as dst_to_dee_lines
-
-def make_lines():
-    mylines = [builder() for builder in dst_to_dee_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_rare_charm.py b/Charm_2024validation/options/hlt2/hlt2_rare_charm.py
deleted file mode 100644
index cb9ac88a02..0000000000
--- a/Charm_2024validation/options/hlt2/hlt2_rare_charm.py
+++ /dev/null
@@ -1,40 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.rare_charm_lines import all_lines as rare_charm_lines
-
-def make_lines():
-    mylines = [builder() for builder in rare_charm_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2noUT.py b/Charm_2024validation/options/hlt2/hlt2noUT.py
deleted file mode 100644
index 473127434b..0000000000
--- a/Charm_2024validation/options/hlt2/hlt2noUT.py
+++ /dev/null
@@ -1,32 +0,0 @@
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf_without_UT
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf_without_UT),\
-         require_gec.bind(skipUT=True),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/options/hlt2/make_hlt2_decay.sh b/Charm_2024validation/options/hlt2/make_hlt2_decay.sh
deleted file mode 100644
index f127b86285..0000000000
--- a/Charm_2024validation/options/hlt2/make_hlt2_decay.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-cat d0_to_hh.py hlt2.py > hlt2_d0_to_hh.py
-cat d0_to_hhpi0.py hlt2.py > hlt2_d0_to_hhpi0.py
-cat d0_to_hhhh.py hlt2.py > hlt2_d0_to_hhhh.py
-cat d0_to_kshh.py hlt2.py > hlt2_d0_to_kshh.py
-cat d0_to_ksks.py hlt2.py > hlt2_d0_to_ksks.py
-cat d_to_hhh.py hlt2.py > hlt2_d_to_hhh.py
-cat d_to_ksh.py hlt2.py > hlt2_d_to_ksh.py
-cat rare_charm.py hlt2.py > hlt2_rare_charm.py
-cat dst_to_dee.py hlt2.py > hlt2_dst_to_dee.py
diff --git a/Charm_2024validation/options/hlt2/rare_charm.py b/Charm_2024validation/options/hlt2/rare_charm.py
deleted file mode 100644
index 39194555f0..0000000000
--- a/Charm_2024validation/options/hlt2/rare_charm.py
+++ /dev/null
@@ -1,8 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.rare_charm_lines import all_lines as rare_charm_lines
-
-def make_lines():
-    mylines = [builder() for builder in rare_charm_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
diff --git a/Charm_2024validation/options/rare_charm.py b/Charm_2024validation/options/rare_charm.py
deleted file mode 100644
index d4d4a5d83d..0000000000
--- a/Charm_2024validation/options/rare_charm.py
+++ /dev/null
@@ -1,496 +0,0 @@
-from .tupling import (
-    make_composite_variables,
-    make_composite_variables_3body,
-    make_DeltaM_variable,
-    make_basic_variables,
-    make_hlt2_event_variables,
-    make_top_isolation_variables,
-    make_basic_isolation_variables,
-    make_intermediate_isolation_variables,
-    make_composite_dtf_variables,
-    make_composite_dtf_variables_3body,
-    make_basic_dtf_variables,
-)
-
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunTuple_Particles as Funtuple
-
-def make_dtf_variables_hmumu(options, pvs, input_data, ptype):
-
-    if ptype not in ["basic", "composite"]:
-        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
-
-    from DecayTreeFitter import DecayTreeFitter
-    
-    DTF = DecayTreeFitter(
-        name=f'DTF_{{hash}}',
-        input_particles=input_data)
-
-    DTFvtx = DecayTreeFitter(
-        name=f'DTFvtx_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    DTFmassDp = DecayTreeFitter(
-        name=f'DTFmassDp_{{hash}}',
-        input_particles=input_data,
-        mass_constraints=["D+"])
-
-    DTFvtxmassDp = DecayTreeFitter(
-        name=f'DTFvtxmassDp_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D+"])
-
-    DTFmassDsp = DecayTreeFitter(
-        name=f'DTFmassDsp_{{hash}}',
-        input_particles=input_data,
-        substitutions = ['D+{{D_s+}}'],
-        mass_constraints=["D_s+"])
-
-    DTFvtxmassDsp = DecayTreeFitter(
-        name=f'DTFvtxmassDsp_{{hash}}',
-        input_particles=input_data,
-        substitutions = ['D+{{D_s+}}',"J/psi(1S){{J/psi(1S)}}"],#trick
-        mass_constraints=["D_s+"],
-        input_pvs=pvs,
-    )
-
-    if ptype == "basic":
-        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassDp,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="Dp")
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassDp,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="Dp")
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassDsp,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="Dsp")
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassDsp,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="Dsp")
-        return dtf_vars
-
-    if ptype == "composite":
-        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassDp,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="Dp")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassDp,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="Dp")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassDsp,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="Dsp")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassDsp,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="Dsp")
-        return dtf_vars
-
-
-def make_dtf_variables_pmumu(options, pvs, input_data, ptype):
-
-    if ptype not in ["basic", "composite"]:
-        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
-
-    from DecayTreeFitter import DecayTreeFitter
-    
-    DTF = DecayTreeFitter(
-        name=f'DTF_{{hash}}',
-        input_particles=input_data)
-
-    DTFvtx = DecayTreeFitter(
-        name=f'DTFvtx_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    DTFmass = DecayTreeFitter(
-        name=f'DTFmass_{{hash}}',
-        input_particles=input_data,
-        mass_constraints=["Lambda_c+"])
-
-    DTFvtxmass = DecayTreeFitter(
-        name=f'DTFvtxmass_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["Lambda_c+"])
-
-    if ptype == "basic":
-        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmass,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="Lc")
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmass,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="Lc")
-        return dtf_vars
-
-    if ptype == "composite":
-        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmass,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="D0")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmass,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="D0")
-        return dtf_vars
-
-def make_dtf_variables_hhmumu(options, pvs, input_data, ptype):
-
-    if ptype not in ["basic", "composite","composite3b"]:
-        Exception(f"I want \'basic\' or \'composite\' or \'composite3b\. Got {ptype}")
-
-    from DecayTreeFitter import DecayTreeFitter
-    
-    DTF = DecayTreeFitter(
-        name=f'DTF_{{hash}}',
-        input_particles=input_data)
-
-    DTFvtx = DecayTreeFitter(
-        name=f'DTFvtx_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    DTFmass = DecayTreeFitter(
-        name=f'DTFmass_{{hash}}',
-        input_particles=input_data,
-        mass_constraints=["D0"])
-
-    DTFvtxmass = DecayTreeFitter(
-        name=f'DTFvtxmass_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0"])
-
-    if ptype == "basic":
-        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmass,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="D0")
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmass,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="D0")
-        return dtf_vars
-
-    if ptype == "composite3b":
-        dtf_vars = make_composite_dtf_variables_3body(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
-                                             DTF=DTFmass,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="D0")
-        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
-                                             DTF=DTFvtxmass,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="D0")
-
-        return dtf_vars
-        
-    if ptype == "composite":
-        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmass,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="D0")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmass,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="D0")
-        return dtf_vars
-
-
-def maketuple_D2pimumu(options, pvs, rec_summary):
-    name = "D2pimumu"
-    turbo_line = "Hlt2Charm_DpDspToPipMumMup"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (J/psi(1S) -> mu- mu+) pi+]CC",
-        "Jpsi" : "[D+ -> ^(J/psi(1S) -> mu- mu+) pi+]CC",
-        "lm"   : "[D+ -> (J/psi(1S) -> ^mu- mu+) pi+]CC",
-        "lp"   : "[D+ -> (J/psi(1S) -> mu- ^mu+) pi+]CC",
-        "hp" : "[D+ -> (J/psi(1S) -> mu- mu+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
-        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation: 
-
-        variables = {
-            "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-            "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2pimumu_WS(options, pvs, rec_summary):
-    name = "D2pimumu_WS"
-    turbo_line = "Hlt2Charm_DpDspToPipMupMup_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (J/psi(1S) -> mu+ mu+) pi+]CC",
-        "Jpsi" : "[D+ -> (J/psi(1S) -> mu+ mu+) pi+]CC",
-        "lp1"   : "[D+ -> (J/psi(1S) -> ^mu+ mu+) pi+]CC",
-        "lp2"   : "[D+ -> (J/psi(1S) -> mu+ ^mu+) pi+]CC",
-        "hp" : "[D+ -> (J/psi(1S) -> mu+ mu+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
-        "lp1"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-        "lp2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation: 
-
-        variables = {
-            "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-            "lp1"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "lp2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2pipipi(options, pvs, rec_summary):
-    name = "CharmRD_D2pipipi"
-    turbo_line = "Hlt2Charm_DpDspToPipPimPip_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (J/psi(1S) -> pi- pi+) pi+]CC",
-        "Jpsi" : "[D+ -> (J/psi(1S) -> pi- pi+) pi+]CC",
-        "lm"   : "[D+ -> (J/psi(1S) -> ^pi- pi+) pi+]CC",
-        "lp"   : "[D+ -> (J/psi(1S) -> pi- ^pi+) pi+]CC",
-        "hp" : "[D+ -> (J/psi(1S) -> pi- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
-        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation: 
-
-        variables = {
-            "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-            "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2piee(options, pvs, rec_summary):
-    name = "D2piee"
-    turbo_line = "Hlt2Charm_DpDspToPipEmEp"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (J/psi(1S) -> e- e+) pi+]CC",
-        "Jpsi" : "[D+ -> ^(J/psi(1S) -> e- e+) pi+]CC",
-        "lm"   : "[D+ -> (J/psi(1S) -> ^e- e+) pi+]CC",
-        "lp"   : "[D+ -> (J/psi(1S) -> e- ^e+) pi+]CC",
-        "hp" : "[D+ -> (J/psi(1S) -> e- e+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
-        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation: 
-
-        variables = {
-            "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-            "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Lc2pmumu(options, pvs, rec_summary):
-    name = "Lc2pmumu"
-    turbo_line = "Hlt2Charm_LcpToPpMumMup"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Lc" : "[Lambda_c+ -> (J/psi(1S) -> mu- mu+) p+]CC",
-        "Jpsi" : "[Lambda_c+ -> ^(J/psi(1S) -> mu- mu+) p+]CC",
-        "lm"   : "[Lambda_c+ -> (J/psi(1S) -> ^mu- mu+) p+]CC",
-        "lp"  : "[Lambda_c+ -> (J/psi(1S) -> mu- ^mu+) p+]CC",
-        "pp" : "[Lambda_c+ -> (J/psi(1S) -> mu- mu+) ^p+]CC",
-    }
-
-    variables = {
-        "Lc"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "pp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation: 
-
-        variables = {
-            "Lc"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-            "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "pp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02Kpimumu_RS(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02Kpimumu_RS"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPipMumMup"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^(D0 -> K- pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
-        "Km"   : "[D*(2010)+ -> (D0 -> ^K- pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
-        "pip"  : "[D*(2010)+ -> (D0 -> K- ^pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
-        "Jpsi"  : "[D*(2010)+ -> (D0 -> K- pi+ ^(J/psi(1S) -> mu- mu+)) pi+]CC",
-        "lm"  : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> ^mu- mu+)) pi+]CC",
-        "lp"  : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> mu- ^mu+)) pi+]CC",
-        "spip" : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> mu- mu+)) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite"),
-        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation: 
-
-        variables = {
-            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
-            "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
-            "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-            "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
diff --git a/Charm_2024validation/options/tupling.py b/Charm_2024validation/options/tupling.py
deleted file mode 100644
index 99de572726..0000000000
--- a/Charm_2024validation/options/tupling.py
+++ /dev/null
@@ -1,986 +0,0 @@
-##############################################################################
-# (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.                                       #
-###############################################################################
-"""Common configuration functions
-
-"""
-
-import Functors as F
-from Functors.math import log
-import Functors.math as fmath
-
-from FunTuple import FunctorCollection
-from FunTuple.functorcollections import (
-    MCHierarchy,
-    MCPromptDecay,
-    Kinematics,
-    SelectionInfo,
-    HltTisTos,
-    MCVertexInfo,
-    MCKinematics,
-    ParticleID, #wrong variables PID_PI = 0, PROBNN_D = nan
-    EventInfo,
-    LHCInfo,
-    ParticleIsolation,
-    MCPrimaries,
-    MCReconstructed,
-    MCReconstructible,
-)
-
-from DaVinciMCTools import MCTruthAndBkgCat, MCReconstructed, MCReconstructible
-from PyConf.Algorithms import ParticleToSubcombinationsAlg
-from DecayTreeFitter import DecayTreeFitter
-
-Hlt1_global_lines = [
-    "Hlt1GECPassthroughDecision",
-    "Hlt1BeamGasDecision",
-    "Hlt1PassthroughDecision",
-    "Hlt1NoBeamDecision",
-    "Hlt1BeamOneDecision",
-    "Hlt1BeamTwoDecision",
-    "Hlt1BothBeamsDecision",
-    "Hlt1ODINLumiDecision",
-    "Hlt1ODINVeloOpenDecision",
-    "Hlt1ODINNoBiasDecision",
-    "Hlt1VeloMicroBiasDecision",
-    "Hlt1RICH1AlignmentDecision",
-    "Hlt1RICH2AlignmentDecision",
-    "Hlt1BeamGasDecision",
-    "Hlt1L02PPiDecision",
-    "Hlt1LowMassNoipDielectron_massSlice1_promptDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice1_promptDecision",
-    "Hlt1LowMassNoipDielectron_massSlice2_promptDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice2_promptDecision",
-    "Hlt1LowMassNoipDielectron_massSlice3_promptDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice3_promptDecision",
-    "Hlt1LowMassNoipDielectron_massSlice4_promptDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice4_promptDecision",
-    "Hlt1LowMassNoipDielectron_massSlice1_displacedDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice1_displacedDecision",
-    "Hlt1LowMassNoipDielectron_massSlice2_displacedDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice2_displacedDecision",
-    "Hlt1LowMassNoipDielectron_massSlice3_displacedDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice3_displacedDecision",
-    "Hlt1LowMassNoipDielectron_massSlice4_displacedDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice4_displacedDecision",
-]
-Hlt1_1track_lines = [
-    "Hlt1TrackMVADecision",
-    "Hlt1LowPtMuonDecision",
-    "Hlt1SingleHighPtMuonDecision",
-    "Hlt1SingleHighPtMuonNoMuIDDecision",
-    "Hlt1TrackMuonMVADecision",
-    "Hlt1OneMuonTrackLineDecision",
-    "Hlt1TrackElectronMVADecision",
-    "Hlt1SingleHighPtElectronDecision",
-    "Hlt1SingleHighEtDecision",
-]
-Hlt1_lines = Hlt1_1track_lines+[
-    "Hlt1TwoTrackMVACharmXSecDecision",
-    "Hlt1TwoTrackMVADecision",
-    "Hlt1TwoTrackKsDecision",
-    "Hlt1D2KPiDecision",
-    "Hlt1D2KKDecision",
-    "Hlt1D2PiPiDecision",
-    "Hlt1KsToPiPiDecision",
-    "Hlt1LowPtDiMuonDecision",#removed
-    "Hlt1DiMuonNoIPDecision",
-    "Hlt1DiMuonNoIP_ssDecision",
-    "Hlt1DiMuonHighMassDecision",
-    "Hlt1DiMuonLowMassDecision",#replaced by Hlt1DiMuonDisplacedDecision
-    "Hlt1DiMuonSoftDecision",
-    "Hlt1DiMuonDisplacedDecision",
-    "Hlt1TwoKsDecision",
-    "Hlt1D2KPiAlignmentDecision",
-    "Hlt1DiMuonHighMassAlignmentDecision",
-    "Hlt1DisplacedDiMuonAlignmentDecision",
-    "Hlt1DisplacedDielectronDecision",
-    "Hlt1DisplacedLeptonsDecision",#removed
-]
-
-
-Hlt2_lines = [
-    "Hlt2Charm_DstpToD0Pip_D0ToKmPip_XSec",
-    "Hlt2Charm_D0ToKmPip_XSec",
-    "Hlt2Charm_D0ToKmKp",
-    "Hlt2Charm_D0ToKmPip",
-    "Hlt2Charm_D0ToPimPip",
-    "Hlt2Charm_DpDspToKsKp_DD",
-    "Hlt2Charm_DpDspToKsKp_LD",
-    "Hlt2Charm_DpDspToKsKp_LL",
-    "Hlt2Charm_DpDspToKsPip_DD",
-    "Hlt2Charm_DpDspToKsPip_LD",
-    "Hlt2Charm_DpDspToKsPip_LL",
-    "Hlt2Charm_DpToKmPipPip",
-    "Hlt2Charm_DspToKmKpPip",
-    "Hlt2Charm_DpToKmPipPip_NoCuts",
-    "Hlt2Charm_DspToKmKpPip_NoCuts",
-    "Hlt2Charm_DpToKmPipPip_XSec",
-    "Hlt2Charm_DspToKmKpPip_XSec",
-    "Hlt2Charm_DstpToD0Pip_D0ToKmKp",
-    "Hlt2Charm_DstpToD0Pip_D0ToKmPip",
-    "Hlt2Charm_DstpToD0Pip_D0ToKpPim",
-    "Hlt2Charm_DstpToD0Pip_D0ToPimPip",
-    "Hlt2Charm_DstpToD0Pip_D0ToKmPip_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKpPim_LowBias",
-    "Hlt2Charm_D0ToKmPip_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKmKp_LowBias",
-    "Hlt2Charm_D0ToKmKp_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToPimPip_LowBias",
-    "Hlt2Charm_D0ToPimPip_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLL",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLL_Tight",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLDD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLDD_Tight",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDDD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDDD_Tight",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULLL",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULLL_Tight",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULDD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULDD_Tight",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLD_Tight",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDLD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDLD_Tight",
-    "Hlt2Charm_D0ToKsPimPip_LL",
-    "Hlt2Charm_D0ToKsPimPip_DD",
-    "Hlt2Charm_D0ToKsPimPip_LL_LowBias",
-    "Hlt2Charm_D0ToKsPimPip_LL_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_LL",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_DD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_LL_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_DD_LowBias",
-    "Hlt2Charm_D0ToKsKmPip_LL",
-    "Hlt2Charm_D0ToKsKmPip_DD",
-    "Hlt2Charm_D0ToKsKmPip_LL_LowBias",
-    "Hlt2Charm_D0ToKsKmPip_LL_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_LL",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_DD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_LL_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_DD_LowBias",
-    "Hlt2Charm_D0ToKsKpPim_LL",
-    "Hlt2Charm_D0ToKsKpPim_DD",
-    "Hlt2Charm_D0ToKsKpPim_LL_LowBias",
-    "Hlt2Charm_D0ToKsKpPim_DD_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_LL",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_DD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_LL_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_DD_LowBias",
-    "Hlt2Charm_D0ToKsKmKp_LL",
-    "Hlt2Charm_D0ToKsKmKp_DD",
-    "Hlt2Charm_D0ToKsKmKp_LL_LowBias",
-    "Hlt2Charm_D0ToKsKmKp_DD_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_LL",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_DD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_LL_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_DD_LowBias",
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS',
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS',
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS_MVA',
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS_MVA',
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS',
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS',
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS_MVA',
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS_MVA',
-    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS',
-    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS',
-    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS_MVA',
-    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS_MVA',
-]
-
-def make_composite_variables(options, pvs, data, add_truth=True, add_Hlt1TisTos=True):
-    if not options.simulation:
-        add_truth = False
-    variables = (
-        FunctorCollection(
-            {
-                "MAXPT": F.MAX(F.PT),
-                "MINPT": F.MIN(F.PT),
-                "SUMPT": F.SUM(F.PT),
-                "MAXP": F.MAX(F.P),
-                "MINP": F.MIN(F.P),
-                "BPVDIRA": F.BPVDIRA(pvs),
-                "VCHI2DOF": F.CHI2DOF,
-                #"VNDOF": F.NDOF,
-                "BPVFDCHI2": F.BPVFDCHI2(pvs),
-                "BPVFD": F.BPVFD(pvs),
-                "BPVVDRHO": F.BPVVDRHO(pvs),
-                "BPVVDZ": F.BPVVDZ(pvs),
-                "BPVIPCHI2": F.BPVIPCHI2(pvs),
-                "BPVIP": F.BPVIP(pvs),
-                "LOGBPVIPCHI2": log(F.BPVIPCHI2(pvs)),
-                "BPVLTIME": F.BPVLTIME(pvs),
-                "MAXBPVIPCHI2": F.MAX(F.BPVIPCHI2(pvs)),
-                "MINBPVIPCHI2": F.MIN(F.BPVIPCHI2(pvs)),
-                "MAXBPVIP": F.MAX(F.BPVIP(pvs)),
-                "MINBPVIP": F.MIN(F.BPVIP(pvs)),
-                "MAXDOCACHI2": F.MAXDOCACHI2,
-                "MAXDOCA": F.MAXDOCA,
-                "MAXSDOCACHI2": F.MAXSDOCACHI2,
-                "MAXSDOCA": F.MAXSDOCA,
-                "ETA": F.ETA,
-                "PHI": F.PHI,
-                "END_VX": F.END_VX,
-                "END_VY": F.END_VY,
-                "END_VZ": F.END_VZ,
-                "END_VX_ERR":F.SQRT @ F.CALL(0,0) @ F.POS_COV_MATRIX @ F.ENDVERTEX,
-                "END_VY_ERR":F.SQRT @ F.CALL(1,1) @ F.POS_COV_MATRIX @ F.ENDVERTEX,
-                "END_VZ_ERR":F.SQRT @ F.CALL(2,2) @ F.POS_COV_MATRIX @ F.ENDVERTEX,
-                "BPVX": F.BPVX(pvs),
-                "BPVY": F.BPVY(pvs),
-                "BPVZ": F.BPVZ(pvs),
-                "BPVX_ERR": F.SQRT @ F.CALL(0,0) @ F.POS_COV_MATRIX @ F.BPV(pvs),
-                "BPVY_ERR": F.SQRT @ F.CALL(1,1) @ F.POS_COV_MATRIX @ F.BPV(pvs),
-                "BPVZ_ERR": F.SQRT @ F.CALL(2,2) @ F.POS_COV_MATRIX @ F.BPV(pvs),
-                "ALLPVFD"     : F.ALLPV_FD(pvs),
-                "ALLPVIP"     : F.ALLPV_IP(pvs),
-                "OBJECT_KEY": F.OBJECT_KEY,
-            }
-        )
-        + Kinematics()
-        #+ ParticleID(extra_info=True) #only for daughters
-    )
-
-    if add_Hlt1TisTos:
-        variables += HltTisTos(
-            selection_type="Hlt1", trigger_lines=Hlt1_lines, data=data
-        )
-
-    if add_truth:
-        variables = add_truth_matching_functors(
-            options,
-            variables,
-            data,
-            hierarchy=True,
-            kinematics=True,
-            vertex_info=True,
-            bkgcat=True,
-        )
-
-    return variables
-
-def make_tistoscombinations(options, pvs, data):
-    algo_output = ParticleToSubcombinationsAlg( Input=data )
-    relations = algo_output.OutputRelations
-
-    tistos_variables_extra = HltTisTos(
-        selection_type="Hlt1", trigger_lines=["Hlt1TwoTrackMVADecision"], data=algo_output.OutputParticles
-    )
-    tistos_combinations = {}
-    for k,v in tistos_variables_extra.get_thor_functors().items():
-        tistos_combinations[k + "_SUBCOMB" ] = F.MAP_INPUT_ARRAY( v, relations )
-    tistos_combinations = FunctorCollection( tistos_combinations )
-
-    return tistos_combinations
-
-def make_composite_variables_3body(options, pvs, data, add_truth=True):
-
-    variables = (
-        FunctorCollection(
-            {
-                #12
-                "M12": F.SUBCOMB(Functor=F.MASS, Indices=(1, 2)),
-                "SDOCA12"     : F.SDOCA(Child1=1,Child2=2),
-                "SDOCACHI212" : F.SDOCACHI2(Child1=1,Child2=2),
-                "DOCA12"      : F.DOCA(Child1=1,Child2=2),
-                "DOCACHI212"  : F.DOCACHI2(Child1=1,Child2=2),
-                "COS12": F.ALV(1, 2),
-                #"ETA12": F.SUBCOMB(Functor=F.ETA, Indices=(1, 2)),
-                #"PT12": F.SUBCOMB(Functor=F.PT, Indices=(1, 2)),
-                #"VCHI212": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(1, 2)),
-                #"END_VZ12": F.SUBCOMB(Functor=F.END_VZ, Indices=(1, 2)),
-                #"BPVZ12": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(1, 2)),
-                #"BPVCORRM12": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(1, 2)),
-                #13
-                "M13": F.SUBCOMB(Functor=F.MASS, Indices=(1, 3)),
-                "SDOCA13"     : F.SDOCA(Child1=1,Child2=3),
-                "SDOCACHI213" : F.SDOCACHI2(Child1=1,Child2=3),
-                "DOCA13"      : F.DOCA(Child1=1,Child2=3),
-                "DOCACHI213"  : F.DOCACHI2(Child1=1,Child2=3),
-                "COS13": F.ALV(1, 3),
-                #"ETA13": F.SUBCOMB(Functor=F.ETA, Indices=(1, 3)),
-                #"PT13": F.SUBCOMB(Functor=F.PT, Indices=(1, 3)),
-                #"VCHI213": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(1, 3)),
-                #"END_VZ13": F.SUBCOMB(Functor=F.END_VZ, Indices=(1, 3)),
-                #"BPVZ13": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(1, 3)),
-                #"BPVCORRM13": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(1, 3)),
-                #23
-                "M23": F.SUBCOMB(Functor=F.MASS, Indices=(2, 3)),
-                "SDOCA23"     : F.SDOCA(Child1=2,Child2=3),
-                "SDOCACHI223" : F.SDOCACHI2(Child1=2,Child2=3),
-                "DOCA23"      : F.DOCA(Child1=2,Child2=3),
-                "DOCACHI223"  : F.DOCACHI2(Child1=2,Child2=3),
-                "COS23": F.ALV(2, 3),
-                #"ETA23": F.SUBCOMB(Functor=F.ETA, Indices=(2, 3)),
-                #"PT23": F.SUBCOMB(Functor=F.PT, Indices=(2, 3)),
-                #"VCHI223": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(2, 3)),
-                #"END_VZ23": F.SUBCOMB(Functor=F.END_VZ, Indices=(2, 3)),
-                #"BPVZ23": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(2, 3)),
-                #"BPVCORRM23": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(2, 3)),
-            }
-        )
-    )
-    return make_composite_variables(options, pvs, data, add_truth)+make_tistoscombinations(options, pvs, data)+variables
-
-def make_composite_variables_4body(options, pvs, data, add_truth=True):
-
-    variables = (
-        FunctorCollection(
-            {
-                #14
-                "M14": F.SUBCOMB(Functor=F.MASS, Indices=(1, 4)),
-                "SDOCA14"     : F.SDOCA(Child1=1,Child2=4),
-                "SDOCACHI214" : F.SDOCACHI2(Child1=1,Child2=4),
-                "DOCA14"      : F.DOCA(Child1=1,Child2=4),
-                "DOCACHI214"  : F.DOCACHI2(Child1=1,Child2=4),
-                "COS14": F.ALV(1, 4),
-                #"ETA14": F.SUBCOMB(Functor=F.ETA, Indices=(1, 4)),
-                #"PT14": F.SUBCOMB(Functor=F.PT, Indices=(1, 4)),
-                #"VCHI214": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(1, 4)),
-                #"END_VZ14": F.SUBCOMB(Functor=F.END_VZ, Indices=(1, 4)),
-                #"BPVZ14": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(1, 4)),
-                #"BPVCORRM14": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(1, 4)),
-                #24
-                "M24": F.SUBCOMB(Functor=F.MASS, Indices=(2, 4)),
-                "SDOCA24"     : F.SDOCA(Child1=2,Child2=4),
-                "SDOCACHI224" : F.SDOCACHI2(Child1=2,Child2=4),
-                "DOCA24"      : F.DOCA(Child1=2,Child2=4),
-                "DOCACHI224"  : F.DOCACHI2(Child1=2,Child2=4),
-                "COS24": F.ALV(2, 4),
-                #"ETA24": F.SUBCOMB(Functor=F.ETA, Indices=(2, 4)),
-                #"PT24": F.SUBCOMB(Functor=F.PT, Indices=(2, 4)),
-                #"VCHI224": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(2, 4)),
-                #"END_VZ24": F.SUBCOMB(Functor=F.END_VZ, Indices=(2, 4)),
-                #"BPVZ24": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(2, 4)),
-                #"BPVCORRM24": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(2, 4)),
-                #34
-                "M34": F.SUBCOMB(Functor=F.MASS, Indices=(3, 4)),
-                "SDOCA34"     : F.SDOCA(Child1=3,Child2=4),
-                "SDOCACHI234" : F.SDOCACHI2(Child1=3,Child2=4),
-                "DOCA34"      : F.DOCA(Child1=3,Child2=4),
-                "DOCACHI234"  : F.DOCACHI2(Child1=3,Child2=4),
-                "COS34": F.ALV(3, 4),
-                #"ETA34": F.SUBCOMB(Functor=F.ETA, Indices=(3, 4)),
-                #"PT34": F.SUBCOMB(Functor=F.PT, Indices=(3, 4)),
-                #"VCHI234": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(3, 4)),
-                #"END_VZ34": F.SUBCOMB(Functor=F.END_VZ, Indices=(3, 4)),
-                #"BPVZ34": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(3, 4)),
-                #"BPVCORRM34": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(3, 4)),
-            }
-        )
-    )
-    return make_composite_variables_3body(options, pvs, data, add_truth)+variables #make_tistoscombinations already included
-
-def make_b_composite_variables(options, pvs, data, add_truth=True):
-    
-    # define helper functors
-    get_child = F.CHILD(1, F.FORWARDARG0) # change here the index of the child
-    get_SV =  F.ENDVERTEX @ F.FORWARDARG0
-    get_SV_pos = F.TOLINALG @ F.POSITION @ get_SV # only if composite (i.e. has vertex)
-    get_child_endvtx_pos = F.ENDVERTEX_POS  @ get_child
-    get_fdvec_child = get_child_endvtx_pos - get_SV_pos
-
-    # define observables
-    IP_wrt_SV = F.IP.bind(get_SV_pos , get_child)
-    IPCHI2_wrt_SV = F.IPCHI2.bind(get_SV , get_child) # only if child is composite (i.e. has vertex)
-    FD_wrt_SV = F.MAGNITUDE @ get_fdvec_child
-    FDCHI2_wrt_SV = F.VTX_FDCHI2.bind(get_SV, get_child)
-
-    
-    variables = FunctorCollection(
-        {       
-            "ID": F.PARTICLE_ID ,
-            "PT": F.PT,
-            "P": F.P,
-            "MASS": F.MASS,
-            "CHILD1_IPwrtSV": IP_wrt_SV,
-            "CHILD1_IPCHI2wrtSV": IPCHI2_wrt_SV,
-            "CHILD1_FDwrtSV": FD_wrt_SV,
-            "CHILD1_FDCHI2wrtSV": FDCHI2_wrt_SV,
-            "PX": F.PX,
-            "PY": F.PY,
-            "PZ": F.PZ,
-            "END_VCHI2DOF": F.CHI2DOF @ F.ENDVERTEX,
-            "BPVCHI2DOF": F.CHI2DOF @ F.BPV(pvs),
-            # B2OC generic B hadron NN Hlt2 algorithm,
-            # not planning to use it directly for B2OC EM
-            "MVA": F.MVA(
-                MVAType="SigmaNet",
-                Config={
-                    "File":
-                    "paramfile://data/Hlt2B2OC_B_SigmaNet_Run3-v1.json",
-                    "Name":
-                    "B2OC_SigmaNet_Generic",
-                    "Lambda":
-                    "2.0",
-                    "NLayers":
-                    "3",
-                    "InputSize":
-                    "6",
-                    "Monotone_Constraints":
-                    "[1,-1,-1,-1,-1,-1]",
-                    "Variables":
-                    "log_B_PT,B_ETA,log_B_DIRA,log_B_ENDVERTEX_CHI2,log_B_IPCHI2_OWNPV,log_B_IP_OWNPV",
-                },
-                Inputs={
-                    "log_B_PT": fmath.log(F.PT),
-                    "B_ETA": F.ETA,
-                    "log_B_DIRA": fmath.log(1. - F.BPVDIRA(pvs)),
-                    "log_B_ENDVERTEX_CHI2": fmath.log(F.CHI2DOF),
-                    "log_B_IPCHI2_OWNPV": fmath.log(F.BPVIPCHI2(pvs)),
-                    "log_B_IP_OWNPV": fmath.log(F.BPVIP(pvs)),
-                }),
-            #'SSPionBDT_Mistag': F.SSPionBDT_Mistag(sspionTagging.OutputFlavourTags),
-            #'SSPionBDT_Decision': F.SSPionBDT_Decision(sspionTagging.OutputFlavourTags),
-
-        }
-    )
-    return make_composite_variables(options, pvs, data, add_truth)+make_tistoscombinations(options, pvs, data)+variables
-
-def make_DeltaM_variable(options):
-    return FunctorCollection({"DM": F.MASS - F.CHILD(1, F.MASS)})
-
-def make_basic_variables(options, pvs, data, add_truth=True, islong = True):
-    if not options.simulation:
-        add_truth = False
-    variables = (
-        FunctorCollection(
-            {
-                "TRCHI2DOF": F.CHI2DOF @ F.TRACK,
-                "ETA": F.ETA,
-                "PHI": F.PHI,
-                "TRGHOSTPROB": F.GHOSTPROB,
-                "BPVIPCHI2": F.BPVIPCHI2(pvs),
-                "BPVIP": F.BPVIP(pvs),
-                "BPVX": F.BPVX(pvs),
-                "BPVY": F.BPVY(pvs),
-                "BPVZ": F.BPVZ(pvs),
-                "TX"          : F.TX,
-                "TY"          : F.TY,
-                "MINIPCHI2"   : F.MINIPCHI2(pvs),
-                "MINIP"       : F.MINIP(pvs),
-                "KEY"         : F.VALUE_OR(-1) @ F.OBJECT_KEY @ F.TRACK,
-                "ISMUON"      : F.ISMUON,
-                "TRACKPT": F.TRACK_PT,
-                "TRACKHISTORY": F.VALUE_OR(-1) @ F.TRACKHISTORY @ F.TRACK,
-                "QOVERP": F.QOVERP @ F.TRACK,
-                "NDOF": F.VALUE_OR(-1) @ F.NDOF @ F.TRACK,
-                "NFTHITS": F.VALUE_OR(-1) @ F.NFTHITS @ F.TRACK,
-                "NHITS": F.VALUE_OR(-1) @ F.NHITS @ F.TRACK,
-                "NUTHITS": F.VALUE_OR(-1) @ F.NUTHITS @ F.TRACK,
-                "NVPHITS": F.VALUE_OR(-1) @ F.NVPHITS @ F.TRACK,
-                #"NMUONHITS": F.VALUE_OR(-1) @ F.NHITSMUONS @ F.TRACK, #https://gitlab.cern.ch/lhcb/Rec/-/merge_requests/3756
-                "TRACKHASVELO": F.VALUE_OR(-1) @ F.TRACKHASVELO @ F.TRACK,
-                "TRACKHASUT": F.VALUE_OR(-1) @ F.TRACKHASUT @ F.TRACK,
-                "OBJECT_KEY": F.OBJECT_KEY,
-                "HASBREM": F.HASBREM,
-                "BREMENERGY": F.BREMENERGY,
-                "BREMBENDCORR": F.BREMBENDCORR,
-            }
-        )
-        + Kinematics()
-        + ParticleID(extra_info=True)
-    )
-
-    if islong:
-        variables += FunctorCollection({"CTB": F.TRACK_POSVEC_CLOSESTTOBEAM})
-    
-    variables += HltTisTos(
-        selection_type="Hlt1", trigger_lines=Hlt1_1track_lines, data=data
-    )
-    
-    if add_truth:
-        variables = add_truth_matching_functors(
-            options,
-            variables,
-            data,
-            hierarchy=True,
-            kinematics=True,
-            vertex_info=True,
-            bkgcat=False,
-        )
-
-    return variables
-
-def make_hlt2_event_variables(options, pvs, rec_summary):
-    # define event level variables
-    evt_variables = EventInfo()
-    if not options.simulation:
-        evt_variables += LHCInfo() #FillNumber
-    evt_variables += SelectionInfo(selection_type="Hlt2", trigger_lines=Hlt2_lines)
-    evt_variables += SelectionInfo(selection_type="Hlt1", trigger_lines=Hlt1_global_lines)
-    evt_variables += FunctorCollection(
-        {
-            "ALLPVX": F.ALLPVX(pvs),
-            "ALLPVY": F.ALLPVY(pvs),
-            "ALLPVZ": F.ALLPVZ(pvs),
-            "ALLPVNDOF": F.MAP(F.VALUE_OR(F.NaN) @ F.NDOF) @ F.TES(pvs),
-            "ALLPVCHI2": F.MAP(F.VALUE_OR(F.NaN) @ F.CHI2) @ F.TES(pvs),
-            "nPVs": F.SIZE(pvs),
-            "nTracks": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nTracks"),
-            "nLongTracks": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nLongTracks"),
-            "nMuonTracks": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nMuonTracks"),
-            "nFTClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nFTClusters"),
-            "nVPClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nVPClusters"),
-            "nUTClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nUTClusters"),
-            "nSPDhits": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nSPDhits"),
-            "nEcalClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nEcalClusters"),
-            "nEcalClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nEcalClusters"),
-            "eCalTot": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "eCalTot"),
-            "hCalTot": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "hCalTot"),
-            "nRich1Hits": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nRich1Hits"),
-            "nRich2Hits": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nRich2Hits"),
-        }
-    )
-    return evt_variables
-
-def add_truth_matching_functors(
-    options,
-    variables,
-    data,
-    hierarchy=True,
-    kinematics=True,
-    vertex_info=True,
-    bkgcat=False,
-    prompt_info=True,
-):
-    """Add MC truth matching functors to an existing FunctorCollection.
-
-    Args:
-        options (DaVinci.Options): DaVinci options object.
-        variables (FunctorCollection): FunctorCollection to modify
-        data: data handle
-        hierarchy (bool): Add MCHierarchy info (default True)
-        kinematics (bool): Add MCKinematics info (default True)
-        vertex_info (bool): Add MCVertexInfo (default True)
-        bkgcat (bool): Add TRUEKEY and BKGCAT functors - intended for composite particles (default False)
-        prompt_info (bool): Add MCPromptDecay info (default True)
-
-    Returns:
-        FunctorCollection: modified FunctorCollection with truth matched variables.
-    """
-    assert (
-        options.simulation
-    ), "options.simulation is set to False - it doesn't make sense to add truth matching."
-
-    MCTRUTH = MCTruthAndBkgCat(data)
-
-    if bkgcat:
-        variables += FunctorCollection(
-            {
-                # Important note: specify an invalid value for integer functors if there exists no truth info.
-                #                 The invalid value for floating point functors is set to nan.
-                "TRUEKEY": F.VALUE_OR(-1) @ MCTRUTH(F.OBJECT_KEY),
-                "BKGCAT": MCTRUTH.BkgCat,
-            }
-        )
-    if hierarchy:
-        variables += MCHierarchy(mctruth_alg=MCTRUTH)  # likely to change again!!
-    if vertex_info:
-        variables += MCVertexInfo(mctruth_alg=MCTRUTH)  # likely to change again!!
-    if kinematics:
-        variables += MCKinematics(mctruth_alg=MCTRUTH)  # likely to change again!!
-    if prompt_info:
-        variables += MCPromptDecay(mctruth_alg=MCTRUTH)
-
-    return variables
-
-### DTF variables ###
-
-def make_basic_dtf_variables(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name="", islong=True):
-    variables = (
-        FunctorCollection(
-            {
-                "TRCHI2DOF": F.CHI2DOF @ F.TRACK,
-                "ETA": F.ETA,
-                "PHI": F.PHI,
-                "TRGHOSTPROB": F.GHOSTPROB,
-                "BPVIPCHI2": F.BPVIPCHI2(pvs),
-                "BPVIP": F.BPVIP(pvs),
-                "BPVX": F.BPVX(pvs),
-                "BPVY": F.BPVY(pvs),
-                "BPVZ": F.BPVZ(pvs),
-                "TX"          : F.TX,
-                "TY"          : F.TY,
-                "MINIPCHI2"   : F.MINIPCHI2(pvs),
-                "MINIP"       : F.MINIP(pvs),
-                "KEY"         : F.VALUE_OR(-1) @ F.OBJECT_KEY @ F.TRACK,
-                "TRACKPT": F.TRACK_PT,
-                "TRACKHISTORY": F.VALUE_OR(-1) @ F.TRACKHISTORY @ F.TRACK,
-                "QOVERP": F.QOVERP @ F.TRACK,
-                "NDOF": F.VALUE_OR(-1) @ F.NDOF @ F.TRACK,
-            }
-        )
-        + Kinematics()
-    )
-
-    if islong:
-        variables += FunctorCollection({"CTB": F.TRACK_POSVEC_CLOSESTTOBEAM})
-    
-    if(mass_constraint):
-        if(pv_constraint): # MASS + PV
-            dtf_variables_mass_pv = FunctorCollection({
-                        'DTF_PV_M'+ particle_name + '_' + k: DTF(v)
-                        for k, v in variables.get_thor_functors().items()
-                    })
-            return dtf_variables_mass_pv
-        else: # MASS
-            dtf_variables_mass = FunctorCollection(
-                {'DTF_M'+ particle_name + '_' + k: DTF(v)
-                 for k, v in variables.get_thor_functors().items()})
-        return dtf_variables_mass
-
-    elif(pv_constraint): # PV
-        dtf_variables_pv = FunctorCollection({
-                'DTF_PV_' + k: DTF(v)
-                for k, v in variables.get_thor_functors().items()
-            })
-        return dtf_variables_pv
-
-    else: # NO MASS/PV
-        dtf_variables = FunctorCollection(
-            {'DTF_' + k: DTF(v)
-             for k, v in variables.get_thor_functors().items()})
-        return dtf_variables
-
-def make_composite_dtf_variables(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name=""):
-    variables = (
-        FunctorCollection(
-            {
-                "MAXPT": F.MAX(F.PT),
-                "MINPT": F.MIN(F.PT),
-                "SUMPT": F.SUM(F.PT),
-                "MAXP": F.MAX(F.P),
-                "MINP": F.MIN(F.P),
-                "BPVDIRA": F.BPVDIRA(pvs),
-                "VCHI2DOF": F.CHI2DOF, #CHI2VXNDOF
-                "BPVFDCHI2": F.BPVFDCHI2(pvs),
-                "BPVFD": F.BPVFD(pvs),
-                "BPVVDRHO": F.BPVVDRHO(pvs),
-                "BPVVDZ": F.BPVVDZ(pvs),
-                "BPVIPCHI2": F.BPVIPCHI2(pvs),
-                "BPVIP": F.BPVIP(pvs),
-                "LOGBPVIPCHI2": log(F.BPVIPCHI2(pvs)),
-                "BPVLTIME": F.BPVLTIME(pvs),
-                "MAXBPVIPCHI2": F.MAX(F.BPVIPCHI2(pvs)), #MAX_
-                "MINBPVIPCHI2": F.MIN(F.BPVIPCHI2(pvs)),
-                "MAXBPVIP": F.MAX(F.BPVIP(pvs)),
-                "MINBPVIP": F.MIN(F.BPVIP(pvs)),
-                "ETA": F.ETA,
-                "PHI": F.PHI,
-                "END_VX": F.END_VX, #END_
-                "END_VY": F.END_VY,
-                "END_VZ": F.END_VZ,
-                "BPVX": F.BPVX(pvs),
-                "BPVY": F.BPVY(pvs),
-                "BPVZ": F.BPVZ(pvs),
-                "ALLPVFD"     : F.ALLPV_FD(pvs),
-                "ALLPVIP"     : F.ALLPV_IP(pvs),
-                
-            }
-        )
-        + Kinematics()
-    )
-
-    addstring = "DTF"
-    if(pv_constraint):
-            addstring += '_PV'
-    if(mass_constraint):
-            addstring += '_M'
-    addstring += particle_name
-
-    DTF_chi2ndof = FunctorCollection(
-            {
-                addstring+"_DTFCHI2": DTF.CHI2,
-                addstring+"_DTFNDOF": DTF.NDOF,
-                addstring+"_CTAU": DTF.CTAU,
-                addstring+"_CTAUERR": DTF.CTAUERR,
-                addstring+"_MERR": DTF.MASSERR,
-            }
-    )
-
-    if(mass_constraint):
-        if(pv_constraint): # MASS + PV
-            dtf_variables_mass_pv = FunctorCollection({
-                        'DTF_PV_M'+ particle_name + '_' + k: DTF(v)
-                        for k, v in variables.get_thor_functors().items()
-                    })
-            return dtf_variables_mass_pv+DTF_chi2ndof
-        else: # MASS
-            dtf_variables_mass = FunctorCollection(
-                {'DTF_M'+ particle_name + '_' + k: DTF(v)
-                 for k, v in variables.get_thor_functors().items()})
-        return dtf_variables_mass+DTF_chi2ndof
-
-    elif(pv_constraint): # PV
-        dtf_variables_pv = FunctorCollection({
-                'DTF_PV_' + k: DTF(v)
-                for k, v in variables.get_thor_functors().items()
-            })
-        return dtf_variables_pv+DTF_chi2ndof
-
-    else: # NO MASS/PV
-        dtf_variables = FunctorCollection(
-            {'DTF_' + k: DTF(v)
-             for k, v in variables.get_thor_functors().items()})
-        return dtf_variables+DTF_chi2ndof
-
-def make_composite_dtf_variables_3body(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name=""):
-    variables = (
-        FunctorCollection(
-            {
-                "M13": F.SUBCOMB(Functor=F.MASS, Indices=(1, 3)),
-                "M23": F.SUBCOMB(Functor=F.MASS, Indices=(2, 3)),
-            }
-        )
-    )
-
-    if(mass_constraint):
-        if(pv_constraint): # MASS + PV
-            dtf_variables_mass_pv = FunctorCollection({
-                        'DTF_PV_M'+ particle_name + '_' + k: DTF(v)
-                        for k, v in variables.get_thor_functors().items()
-                    })
-            return dtf_variables_mass_pv+make_composite_dtf_variables(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
-        else: # MASS
-            dtf_variables_mass = FunctorCollection(
-                {'DTF_M'+ particle_name + '_' + k: DTF(v)
-                 for k, v in variables.get_thor_functors().items()})
-        return dtf_variables_mass+make_composite_dtf_variables(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
-
-    elif(pv_constraint): # PV
-        dtf_variables_pv = FunctorCollection({
-                'DTF_PV_' + k: DTF(v)
-                for k, v in variables.get_thor_functors().items()
-            })
-        return dtf_variables_pv+make_composite_dtf_variables(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
-
-    else: # NO MASS/PV
-        dtf_variables = FunctorCollection(
-            {'DTF_' + k: DTF(v)
-             for k, v in variables.get_thor_functors().items()})
-
-    return dtf_variables+make_composite_dtf_variables(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
-
-def make_composite_dtf_variables_4body(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name=""):
-    variables = (
-        FunctorCollection(
-            {
-                "M14": F.SUBCOMB(Functor=F.MASS, Indices=(1, 4)),
-                "M24": F.SUBCOMB(Functor=F.MASS, Indices=(2, 4)),
-                "M34": F.SUBCOMB(Functor=F.MASS, Indices=(3, 4)),
-            }
-        )
-    )
-
-    if(mass_constraint):
-        if(pv_constraint): # MASS + PV
-            dtf_variables_mass_pv = FunctorCollection({
-                        'DTF_PV_M'+ particle_name + '_' + k: DTF(v)
-                        for k, v in variables.get_thor_functors().items()
-                    })
-            return dtf_variables_mass_pv+make_composite_dtf_variables_3body(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
-        else: # MASS
-            dtf_variables_mass = FunctorCollection(
-                {'DTF_M'+ particle_name + '_' + k: DTF(v)
-                 for k, v in variables.get_thor_functors().items()})
-        return dtf_variables_mass+make_composite_dtf_variables_3body(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
-
-    elif(pv_constraint): # PV
-        dtf_variables_pv = FunctorCollection({
-                'DTF_PV_' + k: DTF(v)
-                for k, v in variables.get_thor_functors().items()
-            })
-        return dtf_variables_pv+make_composite_dtf_variables_3body(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
-
-    else: # NO MASS/PV
-        dtf_variables = FunctorCollection(
-            {'DTF_' + k: DTF(v)
-             for k, v in variables.get_thor_functors().items()})
-    
-        return dtf_variables+make_composite_dtf_variables_3body(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
-
-
-def make_MC_basic_variables():
-    MC_MOTHER_ID = lambda gen: F.VALUE_OR(0) @ F.MC_MOTHER(gen, F.PARTICLE_ID)
-    MC_MOTHER_KEY = lambda gen: F.VALUE_OR(-1) @ F.MC_MOTHER(gen, F.OBJECT_KEY)
-
-    variables = (
-        FunctorCollection(
-            {
-                "OBJECT_KEY": F.OBJECT_KEY,
-                "ETA": F.ETA,
-                "PHI": F.PHI,
-                "ORIGIN_VX": F.ORIGIN_VX,
-                "ORIGIN_VY": F.ORIGIN_VY,
-                "ORIGIN_VZ": F.ORIGIN_VZ,
-                "FOURMOMENTUM": F.FOURMOMENTUM,
-                "TRUEID": F.PARTICLE_ID,
-                "MC_MOTHER_ID": MC_MOTHER_ID(1),
-                "MC_MOTHER_KEY": MC_MOTHER_KEY(1),
-                "MC_GD_MOTHER_ID": MC_MOTHER_ID(2),
-                "MC_GD_MOTHER_KEY": MC_MOTHER_KEY(2),
-                "MC_GD_GD_MOTHER_ID": MC_MOTHER_ID(3),
-                "MC_GD_GD_MOTHER_KEY": MC_MOTHER_KEY(3),
-            }
-        )
-        + Kinematics()
-    )
-
-
-    from PyConf.reading import get_mc_particles, get_pp2mcp_relations, get_mc_track_info
-    MC_data = get_mc_particles("/Event/HLT2/MC/Particles")
-    relations_charged = get_pp2mcp_relations("/Event/HLT2/Relations/ChargedPP2MCP")
-    relations_neutral = get_pp2mcp_relations("/Event/HLT2/Relations/NeutralPP2MCP")
-    mcreconstructed_all = MCReconstructed(
-        input_mcparticles=MC_data,
-        use_best_mcmatch=True,
-        relations_charged=relations_charged,
-        relations_neutral=relations_neutral,
-    )
-    mcreconstructible_all = MCReconstructible(
-        input_mctrackinfo=get_mc_track_info()
-    )
-    import FunTuple.functorcollections as FC
-    vars_reconstructed = FC.MCReconstructed(mcreconstructed_alg=mcreconstructed_all, extra_info=True)
-    vars_reconstructible = FC.MCReconstructible(mcreconstructible_alg=mcreconstructible_all, extra_info=True)
-
-
-    return variables+vars_reconstructed+vars_reconstructible
-
-def make_MC_composite_variables():
-    MC_MOTHER_ID = lambda gen: F.VALUE_OR(0) @ F.MC_MOTHER(gen, F.PARTICLE_ID)
-    MC_MOTHER_KEY = lambda gen: F.VALUE_OR(-1) @ F.MC_MOTHER(gen, F.OBJECT_KEY)
-
-    variables = (
-        FunctorCollection(
-            {
-                "END_VX": F.END_VX,
-                "END_VY": F.END_VY,
-                "END_VZ": F.END_VZ,
-                "LTIME": F.MC_LIFETIME,
-                "OBJECT_KEY": F.OBJECT_KEY,
-                "ETA": F.ETA,
-                "PHI": F.PHI,
-                "ORIGIN_VX": F.ORIGIN_VX,
-                "ORIGIN_VY": F.ORIGIN_VY,
-                "ORIGIN_VZ": F.ORIGIN_VZ,
-                "FOURMOMENTUM": F.FOURMOMENTUM,
-                "TRUEID": F.PARTICLE_ID,
-                "MC_MOTHER_ID": MC_MOTHER_ID(1),
-                "MC_MOTHER_KEY": MC_MOTHER_KEY(1),
-                "MC_GD_MOTHER_ID": MC_MOTHER_ID(2),
-                "MC_GD_MOTHER_KEY": MC_MOTHER_KEY(2),
-                "MC_GD_GD_MOTHER_ID": MC_MOTHER_ID(3),
-                "MC_GD_GD_MOTHER_KEY": MC_MOTHER_KEY(3),
-            }
-        )
-        + Kinematics()
-        + MCPromptDecay()
-        )
-
-    return variables
-
-def make_MC_event_variables(mc_header):
-    # define event level variables
-    evt_variables = EventInfo()
-    evt_variables += MCPrimaries(mc_header=mc_header)
-
-    return evt_variables
-
-def make_top_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"]):
-    from PyConf.reading import get_particles
-    from IsolationTools import VertexAndConeIsolation
-
-    possible_charm_locations = ["LongTrackIso", "TTrackIso", "DownstreamTrackIso", "UpstreamTrackIso", "NeutralIso", "PizIso"]
-    coneangles = [0.25,0.5,1.,1.5,2.]
-
-    count = 0
-    for location in locations:
-        extra_particles = get_particles(f"/Event/HLT2/{hlt2_line}/{location}/Particles")
-
-        for coneangle in coneangles:
-            top_RTAlg = VertexAndConeIsolation(
-                name=location+"_"+str(coneangle),
-                reference_particles=input_data,
-                related_particles=extra_particles,
-                cut=F.DR2<coneangle)
-
-            if count == 0:
-                top_iso_variables = ParticleIsolation(isolation_alg=top_RTAlg,array_indx_name='indx')
-            else:
-                top_iso_variables += ParticleIsolation(isolation_alg=top_RTAlg,array_indx_name='indx')
-            count += 1
-
-
-    return top_iso_variables
-
-def make_basic_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"]):
-    from PyConf.reading import get_particles
-    from IsolationTools import VertexAndConeIsolation
-    from PyConf.Algorithms import ThOrParticleSelection
-
-    basic_code = (F.FILTER(F.ALL) @ F.GET_ALL_BASICS())
-    basic_particles = ThOrParticleSelection(InputParticles=input_data, Functor=basic_code).OutputSelection
-
-    possible_charm_locations = ["LongTrackIso", "TTrackIso", "DownstreamTrackIso", "UpstreamTrackIso", "NeutralIso", "PizIso"]
-    coneangles = [0.25,0.5,1.,1.5,2.]
-
-    count = 0
-    for location in locations:
-        extra_particles = get_particles(f"/Event/HLT2/{hlt2_line}/{location}/Particles")
-
-        for coneangle in coneangles:
-            basic_RTAlg = VertexAndConeIsolation(
-                name=location+"_"+str(coneangle),
-                reference_particles=basic_particles,
-                related_particles=extra_particles,
-                cut=F.DR2<coneangle)
-
-            if count == 0:
-                basic_iso_variables = ParticleIsolation(isolation_alg=basic_RTAlg,array_indx_name='indx')
-            else:
-                basic_iso_variables += ParticleIsolation(isolation_alg=basic_RTAlg,array_indx_name='indx')
-            count += 1
-
-
-    return basic_iso_variables
-
-
-def make_intermediate_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"], composite_ID = "J/psi(1S)"):
-    from PyConf.reading import get_particles
-    from IsolationTools import VertexAndConeIsolation
-    from PyConf.Algorithms import ThOrParticleSelection
-
-    intermediate_code = F.FILTER(F.IS_ABS_ID(composite_ID)) @ F.GET_ALL_DESCENDANTS()
-    intermediate_particles = ThOrParticleSelection(InputParticles=input_data, Functor=intermediate_code).OutputSelection
-
-    possible_charm_locations = ["LongTrackIso", "TTrackIso", "DownstreamTrackIso", "UpstreamTrackIso", "NeutralIso", "PizIso"]
-    coneangles = [0.25,0.5,1.,1.5,2.]
-
-    count = 0
-    for location in locations:
-        extra_particles = get_particles(f"/Event/HLT2/{hlt2_line}/{location}/Particles")
-
-        for coneangle in coneangles:
-            intermediate_RTAlg = VertexAndConeIsolation(
-                name=location+"_"+str(coneangle),
-                reference_particles=intermediate_particles,
-                related_particles=extra_particles,
-                cut=F.DR2<coneangle)
-
-            if count == 0:
-                intermediate_iso_variables = ParticleIsolation(isolation_alg=intermediate_RTAlg,array_indx_name='indx')
-            else:
-                intermediate_iso_variables += ParticleIsolation(isolation_alg=intermediate_RTAlg,array_indx_name='indx')
-            count += 1
-
-
-    return intermediate_iso_variables
diff --git a/Charm_2024validation/tmp.yaml b/Charm_2024validation/tmp.yaml
deleted file mode 100644
index c871485c24..0000000000
--- a/Charm_2024validation/tmp.yaml
+++ /dev/null
@@ -1,12 +0,0 @@
-( '27186011', 'dst_to_dee', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27185021', 'dst_to_dee', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27184011', 'dst_to_dee', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27186011', 'dst_to_dee', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '27185021', 'dst_to_dee', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '27184011', 'dst_to_dee', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '27186011', 'dst_to_dee', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '27185021', 'dst_to_dee', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '27184011', 'dst_to_dee', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '27186011', 'dst_to_dee', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27185021', 'dst_to_dee', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27184011', 'dst_to_dee', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-- 
GitLab


From 49d51016be0b59ca7e810caef2c4d17fbc05fb13 Mon Sep 17 00:00:00 2001
From: Serena Maccolini <serena.maccolini@cern.ch>
Date: Mon, 15 Jul 2024 17:00:49 +0200
Subject: [PATCH 03/51] Revert "cleaning up"

This reverts commit bf90432c8e23e45cf26c2769c03527195609b8fb.
---
 Charm_2024validation/README.md                |   68 +
 Charm_2024validation/dummy.yaml               |   16 +
 Charm_2024validation/info.yaml                |  122 ++
 Charm_2024validation/info_MC_4localtest.yaml  |  122 ++
 Charm_2024validation/info_MC_noUT.yaml        |  121 ++
 Charm_2024validation/info_data.yaml           |   53 +
 Charm_2024validation/info_data_noUT.yaml      |   50 +
 Charm_2024validation/main_d0_to_hh.py         |   58 +
 Charm_2024validation/main_d0_to_hhhh.py       |   40 +
 Charm_2024validation/main_d0_to_hhpi0.py      |   43 +
 Charm_2024validation/main_d0_to_kshh.py       |   75 +
 Charm_2024validation/main_d0_to_ksks.py       |   59 +
 Charm_2024validation/main_d_to_hhh.py         |   63 +
 Charm_2024validation/main_d_to_ksh.py         |   48 +
 .../main_detection_asymmetry.py               |   31 +
 Charm_2024validation/main_dst_to_dee.py       |   42 +
 Charm_2024validation/main_rare_charm.py       |   41 +
 Charm_2024validation/options/d0_to_hh.py      |  432 +++++
 Charm_2024validation/options/d0_to_hh_MC.py   |   99 +
 Charm_2024validation/options/d0_to_hhhh.py    |  247 +++
 Charm_2024validation/options/d0_to_hhhh_MC.py |   43 +
 Charm_2024validation/options/d0_to_hhpi0.py   |  359 ++++
 .../options/d0_to_hhpi0_MC.py                 |   44 +
 Charm_2024validation/options/d0_to_kshh.py    | 1585 +++++++++++++++++
 Charm_2024validation/options/d0_to_kshh_MC.py |   44 +
 Charm_2024validation/options/d0_to_ksks.py    | 1049 +++++++++++
 Charm_2024validation/options/d0_to_ksks_MC.py |   46 +
 Charm_2024validation/options/d_to_hhh.py      |  503 ++++++
 Charm_2024validation/options/d_to_hhh_MC.py   |   92 +
 Charm_2024validation/options/d_to_ksh.py      |  313 ++++
 Charm_2024validation/options/d_to_ksh_MC.py   |   68 +
 .../options/detection_asymmetry.py            |  191 ++
 Charm_2024validation/options/dst_to_dee.py    |  296 +++
 Charm_2024validation/options/hlt1.py          |   33 +
 Charm_2024validation/options/hlt2/d0_to_hh.py |    9 +
 .../options/hlt2/d0_to_hhhh.py                |    8 +
 .../options/hlt2/d0_to_hhpi0.py               |    8 +
 .../options/hlt2/d0_to_kshh.py                |    8 +
 .../options/hlt2/d0_to_ksks.py                |    8 +
 Charm_2024validation/options/hlt2/d_to_hhh.py |   10 +
 Charm_2024validation/options/hlt2/d_to_ksh.py |   10 +
 .../options/hlt2/dst_to_dee.py                |    9 +
 Charm_2024validation/options/hlt2/hlt2.py     |   32 +
 .../options/hlt2/hlt2_d0_to_hh.py             |   41 +
 .../options/hlt2/hlt2_d0_to_hhhh.py           |   40 +
 .../options/hlt2/hlt2_d0_to_hhpi0.py          |   40 +
 .../options/hlt2/hlt2_d0_to_kshh.py           |   40 +
 .../options/hlt2/hlt2_d0_to_ksks.py           |   40 +
 .../options/hlt2/hlt2_d_to_hhh.py             |   42 +
 .../options/hlt2/hlt2_d_to_ksh.py             |   42 +
 .../options/hlt2/hlt2_dst_to_dee.py           |   41 +
 .../options/hlt2/hlt2_rare_charm.py           |   40 +
 Charm_2024validation/options/hlt2/hlt2noUT.py |   32 +
 .../options/hlt2/make_hlt2_decay.sh           |    9 +
 .../options/hlt2/rare_charm.py                |    8 +
 Charm_2024validation/options/rare_charm.py    |  496 ++++++
 Charm_2024validation/options/tupling.py       |  986 ++++++++++
 Charm_2024validation/tmp.yaml                 |   12 +
 58 files changed, 8507 insertions(+)
 create mode 100644 Charm_2024validation/README.md
 create mode 100644 Charm_2024validation/dummy.yaml
 create mode 100644 Charm_2024validation/info.yaml
 create mode 100644 Charm_2024validation/info_MC_4localtest.yaml
 create mode 100644 Charm_2024validation/info_MC_noUT.yaml
 create mode 100644 Charm_2024validation/info_data.yaml
 create mode 100644 Charm_2024validation/info_data_noUT.yaml
 create mode 100644 Charm_2024validation/main_d0_to_hh.py
 create mode 100644 Charm_2024validation/main_d0_to_hhhh.py
 create mode 100644 Charm_2024validation/main_d0_to_hhpi0.py
 create mode 100644 Charm_2024validation/main_d0_to_kshh.py
 create mode 100644 Charm_2024validation/main_d0_to_ksks.py
 create mode 100644 Charm_2024validation/main_d_to_hhh.py
 create mode 100644 Charm_2024validation/main_d_to_ksh.py
 create mode 100644 Charm_2024validation/main_detection_asymmetry.py
 create mode 100644 Charm_2024validation/main_dst_to_dee.py
 create mode 100644 Charm_2024validation/main_rare_charm.py
 create mode 100644 Charm_2024validation/options/d0_to_hh.py
 create mode 100644 Charm_2024validation/options/d0_to_hh_MC.py
 create mode 100644 Charm_2024validation/options/d0_to_hhhh.py
 create mode 100644 Charm_2024validation/options/d0_to_hhhh_MC.py
 create mode 100644 Charm_2024validation/options/d0_to_hhpi0.py
 create mode 100644 Charm_2024validation/options/d0_to_hhpi0_MC.py
 create mode 100644 Charm_2024validation/options/d0_to_kshh.py
 create mode 100644 Charm_2024validation/options/d0_to_kshh_MC.py
 create mode 100644 Charm_2024validation/options/d0_to_ksks.py
 create mode 100644 Charm_2024validation/options/d0_to_ksks_MC.py
 create mode 100644 Charm_2024validation/options/d_to_hhh.py
 create mode 100644 Charm_2024validation/options/d_to_hhh_MC.py
 create mode 100644 Charm_2024validation/options/d_to_ksh.py
 create mode 100644 Charm_2024validation/options/d_to_ksh_MC.py
 create mode 100644 Charm_2024validation/options/detection_asymmetry.py
 create mode 100644 Charm_2024validation/options/dst_to_dee.py
 create mode 100644 Charm_2024validation/options/hlt1.py
 create mode 100644 Charm_2024validation/options/hlt2/d0_to_hh.py
 create mode 100644 Charm_2024validation/options/hlt2/d0_to_hhhh.py
 create mode 100644 Charm_2024validation/options/hlt2/d0_to_hhpi0.py
 create mode 100644 Charm_2024validation/options/hlt2/d0_to_kshh.py
 create mode 100644 Charm_2024validation/options/hlt2/d0_to_ksks.py
 create mode 100644 Charm_2024validation/options/hlt2/d_to_hhh.py
 create mode 100644 Charm_2024validation/options/hlt2/d_to_ksh.py
 create mode 100644 Charm_2024validation/options/hlt2/dst_to_dee.py
 create mode 100644 Charm_2024validation/options/hlt2/hlt2.py
 create mode 100644 Charm_2024validation/options/hlt2/hlt2_d0_to_hh.py
 create mode 100644 Charm_2024validation/options/hlt2/hlt2_d0_to_hhhh.py
 create mode 100644 Charm_2024validation/options/hlt2/hlt2_d0_to_hhpi0.py
 create mode 100644 Charm_2024validation/options/hlt2/hlt2_d0_to_kshh.py
 create mode 100644 Charm_2024validation/options/hlt2/hlt2_d0_to_ksks.py
 create mode 100644 Charm_2024validation/options/hlt2/hlt2_d_to_hhh.py
 create mode 100644 Charm_2024validation/options/hlt2/hlt2_d_to_ksh.py
 create mode 100644 Charm_2024validation/options/hlt2/hlt2_dst_to_dee.py
 create mode 100644 Charm_2024validation/options/hlt2/hlt2_rare_charm.py
 create mode 100644 Charm_2024validation/options/hlt2/hlt2noUT.py
 create mode 100644 Charm_2024validation/options/hlt2/make_hlt2_decay.sh
 create mode 100644 Charm_2024validation/options/hlt2/rare_charm.py
 create mode 100644 Charm_2024validation/options/rare_charm.py
 create mode 100644 Charm_2024validation/options/tupling.py
 create mode 100644 Charm_2024validation/tmp.yaml

diff --git a/Charm_2024validation/README.md b/Charm_2024validation/README.md
new file mode 100644
index 0000000000..f061ea162c
--- /dev/null
+++ b/Charm_2024validation/README.md
@@ -0,0 +1,68 @@
+Analysis production for 2024 data validation within the Charm WG.
+
+For easy tests, eg. on `d_to_hhh` subset:
+```sh
+lb-run DaVinci/v64r2 lbexec Charm_2024validation.main_d_to_hhh:main Charm_2024validation/dummy.yaml
+```
+
+Decays and Hlt2 lines considered are:
+- `d0_to_hh.py`:
+  - Dst2D0pi_D02Kpi_RS     "Hlt2Charm_DstpToD0Pip_D0ToKmPip"
+  - Dst2D0pi_D02Kpi_WS     "Hlt2Charm_DstpToD0Pip_D0ToKpPim"
+  - Dst2D0pi_D02KK     "Hlt2Charm_DstpToD0Pip_D0ToKmKp"
+  - Dst2D0pi_D02pipi     "Hlt2Charm_DstpToD0Pip_D0ToPimPip"
+  - D02Kpi     "Hlt2Charm_D0ToKmPip"
+  - D02KK     "Hlt2Charm_D0ToKmKp"
+  - D02pipi     "Hlt2Charm_D0ToPimPip"
+  - Dst2D0pi_D02Kpi_RS_LowBias     "Hlt2Charm_DstpToD0Pip_D0ToKmPip_LowBias"
+  - Dst2D0pi_D02Kpi_WS_LowBias     "Hlt2Charm_DstpToD0Pip_D0ToKpPim_LowBias"
+  - Dst2D0pi_D02KK_LowBias     "Hlt2Charm_DstpToD0Pip_D0ToKmKp_LowBias"
+  - Dst2D0pi_D02pipi_LowBias     "Hlt2Charm_DstpToD0Pip_D0ToPimPip_LowBias"
+  - D02Kpi_LowBias     "Hlt2Charm_D0ToKmPip_LowBias"
+  - D02KK_LowBias     "Hlt2Charm_D0ToKmKp_LowBias"
+  - D02pipi_LowBias     "Hlt2Charm_D0ToPimPip_LowBias"
+- `d_to_ksh.py`:
+  - D2KSpi_LL     "Hlt2Charm_DpDspToKsPip_LL"
+  - D2KSpi_LD     "Hlt2Charm_DpDspToKsPip_LD"
+  - D2KSpi_DD     "Hlt2Charm_DpDspToKsPip_DD"
+  - D2KSK_LL     "Hlt2Charm_DpDspToKsKp_LL"
+  - D2KSK_LD     "Hlt2Charm_DpDspToKsKp_LD"
+  - D2KSK_DD     "Hlt2Charm_DpDspToKsKp_DD"
+- `d_to_hhh.py`:
+  - D2Kpipi     "Hlt2Charm_DpDspToKmPipPip"
+  - D2Kpipi_NoCuts     "Hlt2Charm_DpDspToKmPipPip_NoCuts"
+  - Ds2KKpi     "Hlt2Charm_DspToKmKpPip"
+  - Ds2KKpi_NoCuts     "Hlt2Charm_DspToKmKpPip_NoCuts"
+  - D2pipipi     "Hlt2Charm_DpDspToPimPipPip"
+  - D2pipipi_NoCuts     "Hlt2Charm_DpDspToPimPipPip_NoCuts"
+- `d0_to_hhpi0.py`:
+  - Dst2D0pi_D02Kpipi0 "Hlt2Charm_DstpToD0Pip_D0ToKmPipPi0_{M,R}"
+  - Dst2D0pi_D02KKpi0 "Hlt2Charm_DstpToD0Pip_D0ToKmKpPi0_{M,R}"
+  - Dst2D0pi_D02pipipi0 "Hlt2Charm_DstpToD0Pip_D0ToPimPipPi0_{M,R}"
+- `detection_asymmetry.py`:
+  - D2Kpipi_ADet "Hlt2Charm_DpToKmPipPip_ADet"
+  - D2KSK_LL_ADet "Hlt2Charm_DspToKsKp_LL_ADet"
+  - D2KSpi_LL_ADet "Hlt2Charm_DpToKsPip_LL_ADet"
+  - D2pipipi_ADet "Hlt2Charm_DspToPimPipPip_ADet"
+  - Ds2KKpi_ADet "Hlt2Charm_DspToKmKpPip_ADet"
+  - Lc2KSp_LL_ADet "Hlt2Charm_LcpToPpKs_LL_ADet"
+  - Lc2pKpi_ADet "Hlt2Charm_LcpToPpKmPip_ADet"
+- `rare_charm.py`:
+  - D2pimumu "Hlt2Charm_DpDspToPipMumMup"
+  - D2pimumu_WS "Hlt2Charm_DpDspToPipMupMup_RareCharmControl"
+  - Dst2D0pi_D02Kpimumu_RS "Hlt2Charm_DstpToD0Pip_D0ToKmPipMumMup"
+- `d0_to_kshh.py`:
+- `d0_to_ksks.py`:
+- `dst_to_dee.py`:
+  -  Dst02D0EmEp_D02KmPip_OS    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS',
+  -  Dst02D0EmEp_D02KmPip_SS 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS',
+  -  Dst02D0EmEp_D02KmPip_OS_MVA 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS_MVA',
+  -  Dst02D0EmEp_D02KmPip_SS_MVA 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS_MVA',
+  -  Dst02D0EmEp_D02KmPimPipPip_OS 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS',
+  -  Dst02D0EmEp_D02KmPimPipPip_SS 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS',
+  -  Dst02D0EmEp_D02KmPimPipPip_OS_MVA 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS_MVA',
+  -  Dst02D0EmEp_D02KmPimPipPip_SS_MVA 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS_MVA',
+  -  Dstp2DpDspEmEp_DpDsp2KmKpPip_OS 'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS',
+  -  Dstp2DpDspEmEp_DpDsp2KmKpPip_SS 'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS',
+  -  Dstp2DpDspEmEp_DpDsp2KmKpPip_OS_MVA 'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS_MVA',
+  -  Dstp2DpDspEmEp_DpDsp2KmKpPip_SS_MVA'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS_MVA',
diff --git a/Charm_2024validation/dummy.yaml b/Charm_2024validation/dummy.yaml
new file mode 100644
index 0000000000..5bebae4ac3
--- /dev/null
+++ b/Charm_2024validation/dummy.yaml
@@ -0,0 +1,16 @@
+input_files:
+- root://myProxy@lhcbxrootd-kit.gridka.de//pnfs/gridka.de/lhcb/LHCb-Disk/lhcb/LHCb/Collision23/CHARM.DST/00198130/0000/00198130_00000552_1.charm.dst
+input_raw_format: 0.5
+input_type: ROOT
+output_type: ROOT
+event_store: HiveWhiteBoard
+simulation: False
+data_type: "Upgrade"
+geometry_version: run3/trunk
+conditions_version: Alignment2023_HLT2Processing_26_8_2023
+scheduler_legacy_mode: False
+input_process: "TurboPass"
+input_stream: "charm"
+histo_file: CHARM_HISTO.ROOT
+ntuple_file: CHARM.ROOT
+evt_max: 1000
diff --git a/Charm_2024validation/info.yaml b/Charm_2024validation/info.yaml
new file mode 100644
index 0000000000..26de654976
--- /dev/null
+++ b/Charm_2024validation/info.yaml
@@ -0,0 +1,122 @@
+defaults:
+  inform:
+    - serena.maccolini@cern.ch
+  wg: Charm
+
+{%- set conditions = [
+  "MagDown",
+]%}
+
+{%- set evttype_subsample_nutext_nu_dir1_dir2_dddb = [
+( '27163102', 'd0_to_hh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163101', 'd0_to_hh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163100', 'd0_to_hh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '23103042', 'd_to_hhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '23263022', 'd_to_hhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '21263012', 'd_to_hhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163471', 'd0_to_hhpi0', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27165903', 'd0_to_kshh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27165071', 'd0_to_hhhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27265008', 'd0_to_hhhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27265009', 'd0_to_hhhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27165072', 'd0_to_hhhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '23103111', 'd_to_ksh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '21103101', 'd_to_ksh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '23173003', 'rare_charm', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+
+( '27163102', 'd0_to_hh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163101', 'd0_to_hh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163100', 'd0_to_hh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '23103042', 'd_to_hhh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '23263022', 'd_to_hhh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '21263012', 'd_to_hhh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163471', 'd0_to_hhpi0', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '27165903', 'd0_to_kshh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '27165071', 'd0_to_hhhh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+
+( '27163102', 'd0_to_hh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163101', 'd0_to_hh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163100', 'd0_to_hh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '23103042', 'd_to_hhh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '23263022', 'd_to_hhh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '21263012', 'd_to_hhh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163471', 'd0_to_hhpi0', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '27165903', 'd0_to_kshh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '27165071', 'd0_to_hhhh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+
+( '27163102', 'd0_to_hh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163101', 'd0_to_hh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163100', 'd0_to_hh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '23103042', 'd_to_hhh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '23263022', 'd_to_hhh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '21263012', 'd_to_hhh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163471', 'd0_to_hhpi0', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27165903', 'd0_to_kshh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27165071', 'd0_to_hhhh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+
+]%}
+
+
+
+{%- for evttype, id, nutext, nu, dir1, dir2, dddb in evttype_subsample_nutext_nu_dir1_dir2_dddb %}
+
+{% for polarity in conditions %}
+
+{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1:
+  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
+  input:
+    bk_query: "/MC/{{dir1}}/Beam6800GeV-2024{{dir2}}-{{polarity}}-Nu{{nu}}-25ns-Pythia8/Sim10d/{{evttype}}/DIGI"
+    n_test_lfns: 3
+  output: HLT1.DST
+  options:
+    entrypoint: Charm_2024validation.options.hlt1:alg_config
+    extra_options:
+      input_raw_format: 0.5
+      conddb_tag: sim10-2024.Q1.2-v1.1-md100
+      dddb_tag: '{{dddb}}'
+      input_type: ROOT
+      output_type: ROOT
+      simulation: True
+      data_type: "Upgrade"
+      scheduler_legacy_mode: False
+      evt_max: 1000
+
+{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2:
+  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
+  input:
+    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1
+  output: HLT2.DST
+  options:
+    entrypoint: Charm_2024validation.options.hlt2.hlt2_{{id}}:alg_config
+    extra_options:
+      conddb_tag: sim10-2024.Q1.2-v1.1-md100
+      dddb_tag: '{{dddb}}'
+      input_raw_format: 0.5
+      input_type: "ROOT"
+      output_type: "ROOT"
+      simulation: True
+      data_type: "Upgrade"
+      output_manifest_file: "HLT2.tck.json"
+      scheduler_legacy_mode: False
+
+MC_{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}:
+  application: "DaVinci/v64r7@x86_64_v3-el9-gcc13+detdesc-opt+g"
+  input:
+    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2
+  output: DVTUPLE.ROOT
+  options:
+    entrypoint: Charm_2024validation.main_{{id}}:main
+    extra_options:
+      conddb_tag: sim10-2024.Q1.2-v1.1-md100
+      dddb_tag: '{{dddb}}'
+      input_raw_format: 0.5
+      input_type: ROOT
+      simulation: True
+      data_type: "Upgrade"
+      event_store: HiveWhiteBoard
+      input_process: "Hlt2"
+      input_manifest_file: "HLT2.tck.json"
+      write_decoding_keys_to_git: false
+      
+{%- endfor %}
+{%- endfor %}
diff --git a/Charm_2024validation/info_MC_4localtest.yaml b/Charm_2024validation/info_MC_4localtest.yaml
new file mode 100644
index 0000000000..3d18e13274
--- /dev/null
+++ b/Charm_2024validation/info_MC_4localtest.yaml
@@ -0,0 +1,122 @@
+defaults:
+  inform:
+    - serena.maccolini@cern.ch
+  wg: Charm
+
+{%- set conditions = [
+  "MagDown",
+]%}
+
+{%- set evttype_subsample_nutext_nu_dir1_dir2_dddb_geometry = [
+( '27163102', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163101', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163100', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23103042', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23263022', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '21263012', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163471', 'd0_to_hhpi0', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165903', 'd0_to_kshh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165071', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27265008', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27265009', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165072', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23103111', 'd_to_ksh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '21103101', 'd_to_ksh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23173003', 'rare_charm', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163102', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163101', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163100', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23103042', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23263022', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '21263012', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163471', 'd0_to_hhpi0', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165903', 'd0_to_kshh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165071', 'd0_to_hhhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163102', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163101', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163100', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23103042', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23263022', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '21263012', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163471', 'd0_to_hhpi0', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165903', 'd0_to_kshh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165071', 'd0_to_hhhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163102', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163101', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163100', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23103042', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23263022', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '21263012', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163471', 'd0_to_hhpi0', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165903', 'd0_to_kshh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165071', 'd0_to_hhhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165901', 'd0_to_ksks', '7p6', '7.6', 'Dev', '', 'dddb-20231017', 'run3/trunk'),
+]%}
+
+
+
+{%- for evttype, id, nutext, nu, dir1, dir2, dddb, geometry in evttype_subsample_nutext_nu_dir1_dir2_dddb_geometry %}
+
+{% for polarity in conditions %}
+
+{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1:
+  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
+  input:
+    bk_query: "/MC/{{dir1}}/Beam6800GeV-expected-2024{{dir2}}-{{polarity}}-Nu{{nu}}-25ns-Pythia8/Sim10c/{{evttype}}/DIGI"
+    n_test_lfns: 3
+  output: HLT1.DST
+  options:
+    entrypoint: Charm_2024validation.options.hlt1:alg_config
+    extra_options:
+      input_raw_format: 0.5
+      conddb_tag: sim-20231017-vc-md100
+      dddb_tag: '{{dddb}}'
+      input_type: ROOT
+      output_type: ROOT
+      simulation: True
+      data_type: "Upgrade"
+      scheduler_legacy_mode: False
+      geometry_version: "{{geometry}}"
+      evt_max: 1000
+
+{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2:
+  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
+  input:
+    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1
+  output: HLT2.DST
+  options:
+    entrypoint: Charm_2024validation.options.hlt2.hlt2_{{id}}:alg_config
+    extra_options:
+      conddb_tag: sim-20231017-vc-md100
+      dddb_tag: '{{dddb}}'
+      input_raw_format: 0.5
+      input_type: "ROOT"
+      output_type: "ROOT"
+      simulation: True
+      data_type: "Upgrade"
+      output_manifest_file: "HLT2.tck.json"
+      scheduler_legacy_mode: False
+      geometry_version: "{{geometry}}"
+
+MC_{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}:
+  application: "DaVinci/v64r3@x86_64_v3-el9-gcc13+detdesc-opt+g"
+  input:
+    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2
+  output: DVTUPLE.ROOT
+  options:
+    entrypoint: Charm_2024validation.main_{{id}}:main
+    extra_options:
+      conddb_tag: sim-20231017-vc-md100
+      dddb_tag: '{{dddb}}'
+      input_raw_format: 0.5
+      input_type: ROOT
+      simulation: True
+      data_type: "Upgrade"
+      event_store: HiveWhiteBoard
+      geometry_version: "{{geometry}}"
+      input_process: "Hlt2"
+      input_manifest_file: "HLT2.tck.json"
+      write_decoding_keys_to_git: false
+
+{%- endfor %}
+{%- endfor %}
diff --git a/Charm_2024validation/info_MC_noUT.yaml b/Charm_2024validation/info_MC_noUT.yaml
new file mode 100644
index 0000000000..52df9e4e96
--- /dev/null
+++ b/Charm_2024validation/info_MC_noUT.yaml
@@ -0,0 +1,121 @@
+defaults:
+  inform:
+    - serena.maccolini@cern.ch
+  wg: Charm
+
+{%- set conditions = [
+  "MagDown",
+]%}
+
+{%- set evttype_subsample_nutext_nu_dir1_dir2_dddb_geometry = [
+( '27163102', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163101', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163100', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23103042', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23263022', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '21263012', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163471', 'd0_to_hhpi0', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165903', 'd0_to_kshh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165071', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27265008', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27265009', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165072', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23103111', 'd_to_ksh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '21103101', 'd_to_ksh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23173003', 'rare_charm', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163102', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163101', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163100', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23103042', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23263022', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '21263012', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163471', 'd0_to_hhpi0', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165903', 'd0_to_kshh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165071', 'd0_to_hhhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163102', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163101', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163100', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23103042', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23263022', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '21263012', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163471', 'd0_to_hhpi0', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165903', 'd0_to_kshh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165071', 'd0_to_hhhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163102', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163101', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163100', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23103042', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23263022', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '21263012', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163471', 'd0_to_hhpi0', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165903', 'd0_to_kshh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165071', 'd0_to_hhhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165901', 'd0_to_ksks', '7p6', '7.6', 'Dev', '', 'dddb-20231017', 'run3/trunk'),
+]%}
+
+
+
+{%- for evttype, id, nutext, nu, dir1, dir2, dddb, geometry in evttype_subsample_nutext_nu_dir1_dir2_dddb_geometry %}
+
+{% for polarity in conditions %}
+
+{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1:
+  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
+  input:
+    bk_query: "/MC/{{dir1}}/Beam6800GeV-expected-2024{{dir2}}-{{polarity}}-Nu{{nu}}-25ns-Pythia8/Sim10c/{{evttype}}/DIGI"
+    n_test_lfns: 3
+  output: HLT1.DST
+  options:
+    entrypoint: Charm_2024validation.options.hlt1:alg_config
+    extra_options:
+      input_raw_format: 0.5
+      conddb_tag: sim-20231017-vc-md100
+      dddb_tag: '{{dddb}}'
+      input_type: ROOT
+      output_type: ROOT
+      simulation: True
+      data_type: "Upgrade"
+      scheduler_legacy_mode: False
+      geometry_version: "{{geometry}}"
+      evt_max: -1
+
+{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2:
+  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
+  input:
+    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1
+  output: HLT2.DST
+  options:
+    entrypoint: Charm_2024validation.options.hlt2.hlt2_{{id}}:alg_config
+    extra_options:
+      conddb_tag: sim-20231017-vc-md100
+      dddb_tag: '{{dddb}}'
+      input_raw_format: 0.5
+      input_type: "ROOT"
+      output_type: "ROOT"
+      simulation: True
+      data_type: "Upgrade"
+      output_manifest_file: "HLT2.tck.json"
+      scheduler_legacy_mode: False
+      geometry_version: "{{geometry}}"
+
+MC_{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}:
+  application: "DaVinci/v64r3@x86_64_v3-el9-gcc13+detdesc-opt+g"
+  input:
+    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2
+  output: DVTUPLE.ROOT
+  options:
+    entrypoint: Charm_2024validation.main_{{id}}:main
+    extra_options:
+      conddb_tag: sim-20231017-vc-md100
+      dddb_tag: '{{dddb}}'
+      input_raw_format: 0.5
+      input_type: ROOT
+      simulation: True
+      data_type: "Upgrade"
+      event_store: HiveWhiteBoard
+      geometry_version: "{{geometry}}"
+      input_process: "Hlt2"
+      input_manifest_file: "HLT2.tck.json"
+
+{%- endfor %}
+{%- endfor %}
diff --git a/Charm_2024validation/info_data.yaml b/Charm_2024validation/info_data.yaml
new file mode 100644
index 0000000000..cf3b7dcdf9
--- /dev/null
+++ b/Charm_2024validation/info_data.yaml
@@ -0,0 +1,53 @@
+defaults:
+  inform:
+    - serena.maccolini@cern.ch
+  wg: Charm
+
+{%- set conditions = [
+  "MagDown",
+]%}
+
+
+
+{%- set subsamples = [
+  "d0_to_hh",
+  "d_to_hhh",
+  "d_to_ksh",
+  "d0_to_hhpi0",
+  "d0_to_kshh",
+  "d0_to_ksks",
+  "d0_to_hhhh",
+  "rare_charm",
+  "detection_asymmetry",
+  "dst_to_dee",
+]%}
+
+{% for id in subsamples %}
+{% for polarity in conditions %}
+
+{{id}}_2024_{{ polarity }}:
+  application: "DaVinci/v64r7"
+  input:
+    bk_query: "/LHCb/Collision24/Beam6800GeV-VeloClosed-{{polarity}}/Real Data/Sprucing24c2/94000000/CHARM.DST"
+
+    dq_flags:
+      - UNCHECKED
+      - OK
+    keep_running: true
+  output: DVTUPLE_{{id}}.ROOT
+  options:
+    entrypoint: Charm_2024validation.main_{{id}}:main
+    extra_options:
+      input_raw_format: 0.5
+      input_type: ROOT
+      simulation: False
+      data_type: "Upgrade"
+      event_store: HiveWhiteBoard
+      geometry_version: run3/2024.Q1.2-v00.00
+      conditions_version: master
+      input_process: "TurboPass"
+      input_stream: "charm"
+      evt_max: -1
+
+{%- endfor %}
+{%- endfor %}
diff --git a/Charm_2024validation/info_data_noUT.yaml b/Charm_2024validation/info_data_noUT.yaml
new file mode 100644
index 0000000000..8c750c72d0
--- /dev/null
+++ b/Charm_2024validation/info_data_noUT.yaml
@@ -0,0 +1,50 @@
+defaults:
+  inform:
+    - serena.maccolini@cern.ch
+  wg: Charm
+
+{%- set conditions = [
+  "MagDown",
+]%}
+
+
+
+{%- set subsamples = [
+  "d0_to_hh",
+  "d_to_hhh",
+  "d_to_ksh",
+  "d0_to_hhpi0",
+  "d0_to_kshh",
+  "d0_to_ksks",
+  "d0_to_hhhh",
+  "rare_charm",
+  "detection_asymmetry",
+]%}
+
+{% for id in subsamples %}
+{% for polarity in conditions %}
+
+{{id}}_2024_{{ polarity }}:
+  application: "DaVinci/v64r5"
+  input:
+    bk_query: "/LHCb/Collision24/Beam6800GeV-VeloClosed-{{polarity}}-Excl-UT/Real Data/Sprucing24c1/94000000/CHARM.DST"
+    dq_flags:
+      - UNCHECKED
+      - OK
+    keep_running: true
+  output: DVTUPLE_{{id}}.ROOT
+  options:
+    entrypoint: Charm_2024validation.main_{{id}}:main
+    extra_options:
+      input_raw_format: 0.5
+      input_type: ROOT
+      simulation: False
+      data_type: "Upgrade"
+      event_store: HiveWhiteBoard
+      geometry_version: run3/2024.Q1.2-v00.00
+      conditions_version: master
+      input_process: "TurboPass"
+      input_stream: "charm"
+
+{%- endfor %}
+{%- endfor %}
diff --git a/Charm_2024validation/main_d0_to_hh.py b/Charm_2024validation/main_d0_to_hh.py
new file mode 100644
index 0000000000..12eea15463
--- /dev/null
+++ b/Charm_2024validation/main_d0_to_hh.py
@@ -0,0 +1,58 @@
+###############################################################################
+# (c) Copyright 2021-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 .options.d0_to_hh import *
+from .options.d0_to_hh_MC import *
+
+from DaVinci import Options, make_config
+from PyConf.reading import get_pvs, get_rec_summary
+
+def main(options: Options):
+
+    # get ODIN and DecReports location
+    pvs = get_pvs()
+    rec_summary = get_rec_summary()
+
+    tuples = {
+        #D02hh
+        "D02Kpi" : maketuple_D02Kpi(options, pvs, rec_summary),
+        "D02KK" : maketuple_D02KK(options, pvs, rec_summary),
+        "D02pipi" : maketuple_D02pipi(options, pvs, rec_summary),
+        #Dst2D0pi_D02hh
+        "Dst2D0pi_D02Kpi_RS" : maketuple_Dst2D0pi_D02Kpi_RS(options, pvs, rec_summary),
+        "Dst2D0pi_D02Kpi_WS" : maketuple_Dst2D0pi_D02Kpi_WS(options, pvs, rec_summary),
+        "Dst2D0pi_D02KK" : maketuple_Dst2D0pi_D02KK(options, pvs, rec_summary),
+        "Dst2D0pi_D02pipi" : maketuple_Dst2D0pi_D02pipi(options, pvs, rec_summary),
+
+        ##LowBias
+        #D02hh
+        "D02Kpi_LowBias" : maketuple_D02Kpi_LowBias(options, pvs, rec_summary),
+        "D02KK_LowBias" : maketuple_D02KK_LowBias(options, pvs, rec_summary),
+        "D02pipi_LowBias" : maketuple_D02pipi_LowBias(options, pvs, rec_summary),
+        #Dst2D0pi_D02hh
+        "Dst2D0pi_D02Kpi_RS_LowBias" : maketuple_Dst2D0pi_D02Kpi_RS_LowBias(options, pvs, rec_summary),
+        "Dst2D0pi_D02Kpi_WS_LowBias" : maketuple_Dst2D0pi_D02Kpi_WS_LowBias(options, pvs, rec_summary),
+        "Dst2D0pi_D02KK_LowBias" : maketuple_Dst2D0pi_D02KK_LowBias(options, pvs, rec_summary),
+        "Dst2D0pi_D02pipi_LowBias" : maketuple_Dst2D0pi_D02pipi_LowBias(options, pvs, rec_summary),
+    }
+
+    MCtuples = {
+        "MC_Dst2D0pi_D02Kpi_RS" : maketuple_MC_Dst2D0pi_D02Kpi_RS(options, pvs, rec_summary),
+        "MC_Dst2D0pi_D02KK_RS" : maketuple_MC_Dst2D0pi_D02KK(options, pvs, rec_summary),
+        "MC_Dst2D0pi_D02pipi" : maketuple_MC_Dst2D0pi_D02pipi(options, pvs, rec_summary),
+    }
+
+    if options.simulation:
+        tuples = tuples | MCtuples
+
+    config = make_config(options, tuples)
+
+    return config
diff --git a/Charm_2024validation/main_d0_to_hhhh.py b/Charm_2024validation/main_d0_to_hhhh.py
new file mode 100644
index 0000000000..5fb555ccfd
--- /dev/null
+++ b/Charm_2024validation/main_d0_to_hhhh.py
@@ -0,0 +1,40 @@
+###############################################################################
+# (c) Copyright 2021-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 .options.d0_to_hhhh import *
+from .options.d0_to_hhhh_MC import *
+
+from DaVinci import Options, make_config
+from PyConf.reading import get_pvs, get_rec_summary
+
+def main(options: Options):
+        
+    # get ODIN and DecReports location
+    pvs = get_pvs()
+    rec_summary = get_rec_summary()
+
+    tuples = {
+        "DstToD0pi_D0ToKKPiPi" : maketuple_DstToD0pi_D0ToKKPiPi(options, pvs, rec_summary),
+        "DstToD0pi_D0ToKPiPiPi" : maketuple_DstToD0pi_D0ToKPiPiPi(options, pvs, rec_summary),
+        "DstToD0pi_D0ToPiKPiPi" : maketuple_DstToD0pi_D0ToPiKPiPi(options, pvs, rec_summary),
+        "DstToD0pi_D0ToPiPiPiPi" : maketuple_DstToD0pi_D0ToPiPiPiPi(options, pvs, rec_summary),
+    }
+
+    MCtuples = {
+        "MC_DstToD0pi_D0ToKPiPiPi" : maketuple_MC_DstToD0pi_D0ToKPiPiPi(options, pvs, rec_summary),
+    }
+    
+    if options.simulation:
+        tuples = tuples | MCtuples
+        
+    config = make_config(options, tuples)
+
+    return config
diff --git a/Charm_2024validation/main_d0_to_hhpi0.py b/Charm_2024validation/main_d0_to_hhpi0.py
new file mode 100644
index 0000000000..ac59dc71d9
--- /dev/null
+++ b/Charm_2024validation/main_d0_to_hhpi0.py
@@ -0,0 +1,43 @@
+###############################################################################
+# (c) Copyright 2021-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 .options.d0_to_hhpi0 import *
+from .options.d0_to_hhpi0_MC import *
+
+from DaVinci import Options, make_config
+from PyConf.reading import get_pvs, get_rec_summary
+
+def main(options: Options):
+        
+    # get ODIN and DecReports location
+    pvs = get_pvs()
+    rec_summary = get_rec_summary()
+
+    tuples = {
+        #Dst2D0pi_D02hhpi0
+        "Dst2D0pi_D02Kpipi0_M" : maketuple_Dst2D0pi_D02Kpipi0_M(options, pvs, rec_summary),
+        "Dst2D0pi_D02KKpi0_M" : maketuple_Dst2D0pi_D02KKpi0_M(options, pvs, rec_summary),
+        "Dst2D0pi_D02pipipi0_M" : maketuple_Dst2D0pi_D02pipipi0_M(options, pvs, rec_summary),
+        "Dst2D0pi_D02Kpipi0_R" : maketuple_Dst2D0pi_D02Kpipi0_R(options, pvs, rec_summary),
+        "Dst2D0pi_D02KKpi0_R" : maketuple_Dst2D0pi_D02KKpi0_R(options, pvs, rec_summary),
+        "Dst2D0pi_D02pipipi0_R" : maketuple_Dst2D0pi_D02pipipi0_R(options, pvs, rec_summary),
+    }
+
+    MCtuples = {
+        "MC_Dst2D0pi_D02Kpipi0" : maketuple_MC_Dst2D0pi_D02Kpipi0(options, pvs, rec_summary),
+    }
+    
+    if options.simulation:
+        tuples = tuples | MCtuples
+        
+    config = make_config(options, tuples)
+
+    return config
diff --git a/Charm_2024validation/main_d0_to_kshh.py b/Charm_2024validation/main_d0_to_kshh.py
new file mode 100644
index 0000000000..f9cfbd58e2
--- /dev/null
+++ b/Charm_2024validation/main_d0_to_kshh.py
@@ -0,0 +1,75 @@
+###############################################################################
+# (c) Copyright 2021-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 .options.d0_to_kshh import *
+from .options.d0_to_kshh_MC import *
+
+from DaVinci import Options, make_config
+from PyConf.reading import get_pvs, get_rec_summary
+
+def main(options: Options):
+
+    # get ODIN and DecReports location
+    pvs = get_pvs()
+    rec_summary = get_rec_summary()
+
+    tuples = {
+        #D02kshh
+        "D0ToKsPimPip_LL" : maketuple_D0ToKsPimPip_LL(options, pvs, rec_summary),
+        "D0ToKsPimPip_DD" : maketuple_D0ToKsPimPip_DD(options, pvs, rec_summary),
+        "D0ToKsKmPip_LL" : maketuple_D0ToKsKmPip_LL(options, pvs, rec_summary),
+        "D0ToKsKmPip_DD" : maketuple_D0ToKsKmPip_DD(options, pvs, rec_summary),
+        "D0ToKsKpPim_LL" : maketuple_D0ToKsKmPip_LL(options, pvs, rec_summary),
+        "D0ToKsKpPim_DD" : maketuple_D0ToKsKmPip_DD(options, pvs, rec_summary),
+        "D0ToKsKmKp_LL" : maketuple_D0ToKsKmKp_LL(options, pvs, rec_summary),
+        "D0ToKsKmKp_DD" : maketuple_D0ToKsKmKp_DD(options, pvs, rec_summary),
+        #Dst2D0pi_D02kshh
+        "DstpToD0Pip_D0ToKsPimPip_LL" : maketuple_DstpToD0Pip_D0ToKsPimPip_LL(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsPimPip_DD" : maketuple_DstpToD0Pip_D0ToKsPimPip_DD(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsKmPip_LL" : maketuple_DstpToD0Pip_D0ToKsKmPip_LL(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsKmPip_DD" : maketuple_DstpToD0Pip_D0ToKsKmPip_DD(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsKpPim_LL" : maketuple_DstpToD0Pip_D0ToKsKmPip_LL(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsKpPim_DD" : maketuple_DstpToD0Pip_D0ToKsKmPip_DD(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsKmKp_LL" : maketuple_DstpToD0Pip_D0ToKsKmKp_LL(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsKmKp_DD" : maketuple_DstpToD0Pip_D0ToKsKmKp_DD(options, pvs, rec_summary),
+
+        ##LowBias
+        #D02kshh
+        "D0ToKsPimPip_LL_LowBias" : maketuple_D0ToKsPimPip_LL_LowBias(options, pvs, rec_summary),
+        "D0ToKsPimPip_DD_LowBias" : maketuple_D0ToKsPimPip_DD_LowBias(options, pvs, rec_summary),
+        "D0ToKsKmPip_LL_LowBias" : maketuple_D0ToKsKmPip_LL_LowBias(options, pvs, rec_summary),
+        "D0ToKsKmPip_DD_LowBias" : maketuple_D0ToKsKmPip_DD_LowBias(options, pvs, rec_summary),
+        "D0ToKsKpPim_LL_LowBias" : maketuple_D0ToKsKmPip_LL_LowBias(options, pvs, rec_summary),
+        "D0ToKsKpPim_DD_LowBias" : maketuple_D0ToKsKmPip_DD_LowBias(options, pvs, rec_summary),
+        "D0ToKsKmKp_LL_LowBias" : maketuple_D0ToKsKmKp_LL_LowBias(options, pvs, rec_summary),
+        "D0ToKsKmKp_DD_LowBias" : maketuple_D0ToKsKmKp_DD_LowBias(options, pvs, rec_summary),
+        #Dst2D0pi_D02kshh
+        "DstpToD0Pip_D0ToKsPimPip_LL_LowBias" : maketuple_DstpToD0Pip_D0ToKsPimPip_LL_LowBias(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsPimPip_DD_LowBias" : maketuple_DstpToD0Pip_D0ToKsPimPip_DD_LowBias(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsKmPip_LL_LowBias" : maketuple_DstpToD0Pip_D0ToKsKmPip_LL_LowBias(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsKmPip_DD_LowBias" : maketuple_DstpToD0Pip_D0ToKsKmPip_DD_LowBias(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsKpPim_LL_LowBias" : maketuple_DstpToD0Pip_D0ToKsKmPip_LL_LowBias(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsKpPim_DD_LowBias" : maketuple_DstpToD0Pip_D0ToKsKmPip_DD_LowBias(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsKmKp_LL_LowBias" : maketuple_DstpToD0Pip_D0ToKsKmKp_LL_LowBias(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsKmKp_DD_LowBias" : maketuple_DstpToD0Pip_D0ToKsKmKp_DD_LowBias(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsPimPip_DD_NoBias" : maketuple_DstpToD0Pip_D0ToKsPimPip_LL_NoBias(options, pvs, rec_summary),
+    }
+
+    MCtuples = {
+        "MC_DstpToD0Pip_D0ToKsPimPip" : maketuple_MC_DstpToD0Pip_D0ToKsPimPip(options, pvs, rec_summary),
+    }
+
+    if options.simulation:
+        tuples = tuples | MCtuples
+
+    config = make_config(options, tuples)
+
+    return config
diff --git a/Charm_2024validation/main_d0_to_ksks.py b/Charm_2024validation/main_d0_to_ksks.py
new file mode 100644
index 0000000000..cb69552d78
--- /dev/null
+++ b/Charm_2024validation/main_d0_to_ksks.py
@@ -0,0 +1,59 @@
+###############################################################################
+# (c) Copyright 2021-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.                                       #
+###############################################################################
+import Functors as F
+from Functors.math import log
+from DaVinci import Options, make_config
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from FunTuple import FunctorCollection
+import FunTuple.functorcollections as FC
+from FunTuple import FunTuple_Particles as Funtuple
+
+#D02KSKS
+from .options.d0_to_ksks import *
+from .options.d0_to_ksks_MC import *
+
+from PyConf.reading import get_pvs, get_rec_summary
+
+def main(options: Options):
+
+    # get ODIN and DecReports location
+    pvs = get_pvs()
+    rec_summary = get_rec_summary()
+
+    tuples = {
+        #D02KSKS
+        "Dst2D0pi_D02KSKS_LLLL" : maketuple_Dst2D0pi_D02KSKS_LLLL(options, pvs, rec_summary),
+        "Dst2D0pi_D02KSKS_LLLL_Tight" : maketuple_Dst2D0pi_D02KSKS_LLLL_Tight(options, pvs, rec_summary),
+        "Dst2D0pi_D02KSKS_LLDD" : maketuple_Dst2D0pi_D02KSKS_LLDD(options, pvs, rec_summary),
+        "Dst2D0pi_D02KSKS_LLDD_Tight" : maketuple_Dst2D0pi_D02KSKS_LLDD_Tight(options, pvs, rec_summary),
+        "Dst2D0pi_D02KSKS_DDDD" : maketuple_Dst2D0pi_D02KSKS_DDDD(options, pvs, rec_summary),
+        "Dst2D0pi_D02KSKS_DDDD_Tight" : maketuple_Dst2D0pi_D02KSKS_DDDD_Tight(options, pvs, rec_summary),
+        "Dst2D0pi_D02KSKS_ULLL" : maketuple_Dst2D0pi_D02KSKS_ULLL(options, pvs, rec_summary),
+        "Dst2D0pi_D02KSKS_ULLL_Tight" : maketuple_Dst2D0pi_D02KSKS_ULLL_Tight(options, pvs, rec_summary),
+        "Dst2D0pi_D02KSKS_ULDD" : maketuple_Dst2D0pi_D02KSKS_ULDD(options, pvs, rec_summary),
+        "Dst2D0pi_D02KSKS_ULDD_Tight" : maketuple_Dst2D0pi_D02KSKS_ULDD_Tight(options, pvs, rec_summary),
+        "Dst2D0pi_D02KSKS_LLLD" : maketuple_Dst2D0pi_D02KSKS_LLLD(options, pvs, rec_summary),
+        "Dst2D0pi_D02KSKS_LLLD_Tight" : maketuple_Dst2D0pi_D02KSKS_LLLD_Tight(options, pvs, rec_summary),
+        "Dst2D0pi_D02KSKS_DDLD" : maketuple_Dst2D0pi_D02KSKS_DDLD(options, pvs, rec_summary),
+        "Dst2D0pi_D02KSKS_DDLD_Tight" : maketuple_Dst2D0pi_D02KSKS_DDLD_Tight(options, pvs, rec_summary),
+    }
+
+    MCtuples = {
+        "MC_Dst2D0pi_D02KSKS_LLLL" : maketuple_MC_Dst2D0pi_D02KSKS_LLLL(options, pvs, rec_summary)
+    }
+
+    if options.simulation:
+        tuples = tuples | MCtuples
+        
+    config = make_config(options, tuples)
+
+    return config
diff --git a/Charm_2024validation/main_d_to_hhh.py b/Charm_2024validation/main_d_to_hhh.py
new file mode 100644
index 0000000000..516e32b119
--- /dev/null
+++ b/Charm_2024validation/main_d_to_hhh.py
@@ -0,0 +1,63 @@
+###############################################################################
+# (c) Copyright 2021-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 .options.d_to_hhh import *
+from .options.d_to_hhh_MC import *
+from .options.detection_asymmetry import *
+
+from DaVinci import Options, make_config
+from PyConf.reading import get_pvs, get_rec_summary
+
+def main(options: Options):
+
+    # get ODIN and DecReports location
+    pvs = get_pvs()
+    rec_summary = get_rec_summary()
+
+    tuples = {
+        #D2hhh
+        "D2Kpipi" : maketuple_D2Kpipi(options, pvs, rec_summary),
+        "D2Kpipi_NoCuts" : maketuple_D2Kpipi(options, pvs, rec_summary,True),
+        #"D2Kpipi_Kpi" : maketuple_D2Kpipi_Kpi(options, pvs, rec_summary), #subcomb of 2 out of 3 daughters
+        "Ds2KKpi" : maketuple_Ds2KKpi(options, pvs, rec_summary),
+        "Ds2KKpi_NoCuts" : maketuple_Ds2KKpi(options, pvs, rec_summary,True),
+        "D2pipipi" : maketuple_D2pipipi(options, pvs, rec_summary),
+        "D2pipipi_NoCuts" : maketuple_D2pipipi(options, pvs, rec_summary,True),
+        "D2pipiK" : maketuple_D2pipiK(options, pvs, rec_summary),
+        "D2pipiK_NoCuts" : maketuple_D2pipiK(options, pvs, rec_summary,True),
+        "D2KKK" : maketuple_D2KKK(options, pvs, rec_summary),
+        "D2KKK_NoCuts" : maketuple_D2KKK(options, pvs, rec_summary,True),
+        "D2piKK" : maketuple_D2piKK(options, pvs, rec_summary),
+        "D2piKK_NoCuts" : maketuple_D2piKK(options, pvs, rec_summary,True),
+        "B02Dpi_D2KKpi" : maketuple_B02Dpi_D2KKpi(options, pvs, rec_summary),
+        "B02Dpi_D2pipipi" : maketuple_B02Dpi_D2pipipi(options, pvs, rec_summary),
+        "Bs02Dspi_Ds2KKpi" : maketuple_Bs02Dspi_Ds2KKpi(options, pvs, rec_summary),
+        "Bs02Dspi_Ds2pipipi" : maketuple_Bs02Dspi_Ds2pipipi(options, pvs, rec_summary),
+        #ADet
+        "D2Kpipi_ADet" : maketuple_D2Kpipi_ADet(options, pvs, rec_summary),
+        "D2pipipi_ADet" : maketuple_D2pipipi_ADet(options, pvs, rec_summary),
+        "Ds2KKpi_ADet" : maketuple_Ds2KKpi_ADet(options, pvs, rec_summary),
+
+
+    }
+
+    MCtuples = {
+        "MC_D2Kpipi" : maketuple_MC_D2Kpipi(options, pvs, rec_summary),
+        "MC_Ds2KKpi" : maketuple_MC_Ds2KKpi(options, pvs, rec_summary)
+        "MC_Ds2KKK" : maketuple_MC_Ds2KKK(options, pvs, rec_summary)
+    }
+
+    if options.simulation:
+        tuples = tuples | MCtuples
+
+    config = make_config(options, tuples)
+
+    return config
diff --git a/Charm_2024validation/main_d_to_ksh.py b/Charm_2024validation/main_d_to_ksh.py
new file mode 100644
index 0000000000..00ddc66093
--- /dev/null
+++ b/Charm_2024validation/main_d_to_ksh.py
@@ -0,0 +1,48 @@
+###############################################################################
+# (c) Copyright 2021-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 .options.d_to_ksh import *
+from .options.d_to_ksh_MC import *
+from .options.detection_asymmetry import *
+
+from DaVinci import Options, make_config
+from PyConf.reading import get_pvs, get_rec_summary
+
+def main(options: Options):
+
+    # get ODIN and DecReports location
+    pvs = get_pvs()
+    rec_summary = get_rec_summary()
+
+    tuples = {
+        #D2KSh
+        "D2KSpi_LL" : maketuple_D2KSpi_LL(options, pvs, rec_summary),
+        "D2KSK_LL" : maketuple_D2KSK_LL(options, pvs, rec_summary),
+        "D2KSpi_LD" : maketuple_D2KSpi_LD(options, pvs, rec_summary),
+        "D2KSK_LD" : maketuple_D2KSK_LD(options, pvs, rec_summary),
+        "D2KSpi_DD" : maketuple_D2KSpi_DD(options, pvs, rec_summary),
+        "D2KSK_DD" : maketuple_D2KSK_DD(options, pvs, rec_summary),
+        #ADet
+        "D2KSK_LL_ADet" : maketuple_D2KSK_LL_ADet(options, pvs, rec_summary),
+        "D2KSpi_LL_ADet" : maketuple_D2KSpi_LL_ADet(options, pvs, rec_summary),
+    }
+
+    MCtuples = {
+        "MC_D2KSK" : maketuple_MC_D2KSK(options, pvs, rec_summary),
+        "MC_D2KSpi" : maketuple_MC_D2KSpi(options, pvs, rec_summary),
+    }
+
+    if options.simulation:
+        tuples = tuples | MCtuples
+        
+    config = make_config(options, tuples)
+
+    return config
diff --git a/Charm_2024validation/main_detection_asymmetry.py b/Charm_2024validation/main_detection_asymmetry.py
new file mode 100644
index 0000000000..1ededecf77
--- /dev/null
+++ b/Charm_2024validation/main_detection_asymmetry.py
@@ -0,0 +1,31 @@
+###############################################################################
+# (c) Copyright 2021-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 .options.detection_asymmetry import *
+
+from DaVinci import Options, make_config
+from PyConf.reading import get_pvs, get_rec_summary
+
+def main(options: Options):
+        
+    # get ODIN and DecReports location
+    pvs = get_pvs()
+    rec_summary = get_rec_summary()
+
+    tuples = {
+        #ADet
+        "Lc2KSp_LL_ADet" : maketuple_Lc2KSp_LL_ADet(options, pvs, rec_summary),
+        "Lc2pKpi_ADet" : maketuple_Lc2pKpi_ADet(options, pvs, rec_summary),
+    }
+        
+    config = make_config(options, tuples)
+
+    return config
diff --git a/Charm_2024validation/main_dst_to_dee.py b/Charm_2024validation/main_dst_to_dee.py
new file mode 100644
index 0000000000..3084abe4e7
--- /dev/null
+++ b/Charm_2024validation/main_dst_to_dee.py
@@ -0,0 +1,42 @@
+###############################################################################
+# (c) Copyright 2021-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 .options.dst_to_dee import *
+
+from DaVinci import Options, make_config
+from PyConf.reading import get_pvs, get_rec_summary
+
+def main(options: Options):
+
+    # get ODIN and DecReports location
+    pvs = get_pvs()
+    rec_summary = get_rec_summary()
+
+    tuples = {
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS':             make_Dst0ToD0EmEp_D0ToKmPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS", pvs, rec_summary, 'dst_kpi_os'),
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS':             make_Dst0ToD0EmEp_D0ToKmPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS", pvs, rec_summary, 'dst_kpi_ss'),
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS_MVA':         make_Dst0ToD0EmEp_D0ToKmPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS_MVA", pvs, rec_summary, 'dst_kpi_os'),
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS_MVA':         make_Dst0ToD0EmEp_D0ToKmPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS_MVA", pvs, rec_summary, 'dst_kpi_ss'),
+
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS':       make_Dst0ToD0EmEp_D0ToKmPimPipPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS", pvs, rec_summary,'dst_k3pi_os' ),
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS':       make_Dst0ToD0EmEp_D0ToKmPimPipPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS", pvs, rec_summary, 'dst_k3pi_ss'),
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS_MVA':   make_Dst0ToD0EmEp_D0ToKmPimPipPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS_MVA", pvs, rec_summary, 'dst_k3pi_os'),
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS_MVA':   make_Dst0ToD0EmEp_D0ToKmPimPipPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS_MVA", pvs, rec_summary, 'dst_k3pi_ss'),
+
+    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS':     make_DstpToDpDspEmEp_DpDspToKmKpPip_tuple(options, "Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS", pvs, rec_summary, "dsstp_2kpi_os"),
+    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS':     make_DstpToDpDspEmEp_DpDspToKmKpPip_tuple(options, "Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS", pvs, rec_summary, "dsstp_2kpi_ss"),
+    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS_MVA': make_DstpToDpDspEmEp_DpDspToKmKpPip_tuple(options, "Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS_MVA", pvs, rec_summary, "dsstp_2kpi_os"),
+    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS_MVA': make_DstpToDpDspEmEp_DpDspToKmKpPip_tuple(options, "Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS_MVA", pvs, rec_summary, "dsstp_2kpi_ss"),
+    }
+
+    config = make_config(options, tuples)
+
+    return config
\ No newline at end of file
diff --git a/Charm_2024validation/main_rare_charm.py b/Charm_2024validation/main_rare_charm.py
new file mode 100644
index 0000000000..d38574262b
--- /dev/null
+++ b/Charm_2024validation/main_rare_charm.py
@@ -0,0 +1,41 @@
+###############################################################################
+# (c) Copyright 2021-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 .options.rare_charm import *
+#from .options.rare_charm_MC import *
+
+from DaVinci import Options, make_config
+from PyConf.reading import get_pvs, get_rec_summary
+
+def main(options: Options):
+        
+    # get ODIN and DecReports location
+    pvs = get_pvs()
+    rec_summary = get_rec_summary()
+
+    tuples = {
+        "D2pimumu" : maketuple_D2pimumu(options, pvs, rec_summary),
+        "D2pimumu_WS" : maketuple_D2pimumu_WS(options, pvs, rec_summary),
+        "CharmRD_D2pipipi" : maketuple_D2pipipi(options, pvs, rec_summary),
+        "D2piee" : maketuple_D2piee(options, pvs, rec_summary),
+        "Lc2pmumu" : maketuple_Lc2pmumu(options, pvs, rec_summary),
+        "Dst2D0pi_D02Kpimumu_RS" : maketuple_Dst2D0pi_D02Kpimumu_RS(options, pvs, rec_summary),
+    }
+
+    MCtuples = {
+    }
+    
+    if options.simulation:
+        tuples = tuples | MCtuples
+        
+    config = make_config(options, tuples)
+
+    return config
diff --git a/Charm_2024validation/options/d0_to_hh.py b/Charm_2024validation/options/d0_to_hh.py
new file mode 100644
index 0000000000..80a3cdcec2
--- /dev/null
+++ b/Charm_2024validation/options/d0_to_hh.py
@@ -0,0 +1,432 @@
+from .tupling import (
+    make_composite_variables,
+    make_basic_variables,
+    make_hlt2_event_variables,
+    make_DeltaM_variable,
+    make_composite_dtf_variables,
+    make_basic_dtf_variables,
+)
+
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from FunTuple import FunTuple_Particles as Funtuple
+
+
+def make_dtf_variables(options, pvs, input_data, ptype):
+
+    if ptype not in ["basic", "composite"]:
+        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
+
+    from DecayTreeFitter import DecayTreeFitter
+    
+    DTF = DecayTreeFitter(
+        name=f'DTF_{{hash}}',
+        input_particles=input_data)
+
+    DTFvtx = DecayTreeFitter(
+        name=f'DTFvtx_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    DTFmass = DecayTreeFitter(
+        name=f'DTFmass_{{hash}}',
+        input_particles=input_data,
+        mass_constraints=["D0"])
+
+    DTFvtxmass = DecayTreeFitter(
+        name=f'DTFvtxmass_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0"])
+
+    if ptype == "basic":
+        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmass,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="D0")
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmass,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="D0")
+        return dtf_vars
+
+    if ptype == "composite":
+        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmass,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="D0")
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmass,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="D0")
+        return dtf_vars
+
+def maketuple_D02KK_LowBias(options, pvs, rec_summary):
+    name = "D02KK_LowBias"
+    turbo_line = "Hlt2Charm_D0ToKmKp_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> K- K+]CC",
+        "Km"   : "[D0 -> ^K- K+]CC",
+        "Kp"  : "[D0 -> K- ^K+]CC",
+    }
+
+    variables = {
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D02KK(options, pvs, rec_summary):
+    name = "D02KK"
+    turbo_line = "Hlt2Charm_D0ToKmKp"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> K- K+]CC",
+        "Km"   : "[D0 -> ^K- K+]CC",
+        "Kp"  : "[D0 -> K- ^K+]CC",
+    }
+
+    variables = {
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D02Kpi_LowBias(options, pvs, rec_summary):
+    name = "D02Kpi_LowBias"
+    turbo_line = "Hlt2Charm_D0ToKmPip_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> K- pi+]CC",
+        "Km"   : "[D0 -> ^K- pi+]CC",
+        "pip"  : "[D0 -> K- ^pi+]CC",
+    }
+
+    variables = {
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D02Kpi(options, pvs, rec_summary):
+    name = "D02Kpi"
+    turbo_line = "Hlt2Charm_D0ToKmPip"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> K- pi+]CC",
+        "Km"   : "[D0 -> ^K- pi+]CC",
+        "pip"  : "[D0 -> K- ^pi+]CC",
+    }
+
+    variables = {
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D02pipi_LowBias(options, pvs, rec_summary):
+    name = "D02pipi_LowBias"
+    turbo_line = "Hlt2Charm_D0ToPimPip_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> pi- pi+]CC",
+        "pim"   : "[D0 -> ^pi- pi+]CC",
+        "pip"  : "[D0 -> pi- ^pi+]CC",
+    }
+
+    variables = {
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D02pipi(options, pvs, rec_summary):
+    name = "D02pipi"
+    turbo_line = "Hlt2Charm_D0ToPimPip"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> pi- pi+]CC",
+        "pim"   : "[D0 -> ^pi- pi+]CC",
+        "pip"  : "[D0 -> pi- ^pi+]CC",
+    }
+
+    variables = {
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02KK_LowBias(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02KK_LowBias"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmKp_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> ([D0]CC -> K- K+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> K- K+) pi+]CC",
+        "Km"   : "[D*(2010)+ -> ([D0]CC -> ^K- K+) pi+]CC",
+        "Kp"  : "[D*(2010)+ -> ([D0]CC -> K- ^K+) pi+]CC",
+        "spip" : "[D*(2010)+ -> ([D0]CC -> K- K+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02KK(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02KK"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmKp"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> ([D0]CC -> K- K+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> K- K+) pi+]CC",
+        "Km"   : "[D*(2010)+ -> ([D0]CC -> ^K- K+) pi+]CC",
+        "Kp"  : "[D*(2010)+ -> ([D0]CC -> K- ^K+) pi+]CC",
+        "spip" : "[D*(2010)+ -> ([D0]CC -> K- K+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02Kpi_RS_LowBias(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02Kpi_RS_LowBias"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPip_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> (D0 -> K- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^(D0 -> K- pi+) pi+]CC",
+        "Km"   : "[D*(2010)+ -> (D0 -> ^K- pi+) pi+]CC",
+        "pip"  : "[D*(2010)+ -> (D0 -> K- ^pi+) pi+]CC",
+        "spip" : "[D*(2010)+ -> (D0 -> K- pi+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02Kpi_RS(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02Kpi_RS"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPip"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> (D0 -> K- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^(D0 -> K- pi+) pi+]CC",
+        "Km"   : "[D*(2010)+ -> (D0 -> ^K- pi+) pi+]CC",
+        "pip"  : "[D*(2010)+ -> (D0 -> K- ^pi+) pi+]CC",
+        "spip" : "[D*(2010)+ -> (D0 -> K- pi+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02Kpi_WS_LowBias(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02Kpi_WS_LowBias"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKpPim_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> (D0 -> K+ pi-) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^(D0 -> K+ pi-) pi+]CC",
+        "Kp"   : "[D*(2010)+ -> (D0 -> ^K+ pi-) pi+]CC",
+        "pim"  : "[D*(2010)+ -> (D0 -> K+ ^pi-) pi+]CC",
+        "spip" : "[D*(2010)+ -> (D0 -> K+ pi-) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Kp"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pim"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02Kpi_WS(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02Kpi_WS"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKpPim"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> (D0 -> K+ pi-) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^(D0 -> K+ pi-) pi+]CC",
+        "Kp"   : "[D*(2010)+ -> (D0 -> ^K+ pi-) pi+]CC",
+        "pim"  : "[D*(2010)+ -> (D0 -> K+ ^pi-) pi+]CC",
+        "spip" : "[D*(2010)+ -> (D0 -> K+ pi-) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Kp"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pim"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02pipi_LowBias(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02pipi_LowBias"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimPip_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> ([D0]CC -> pi- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> pi- pi+) pi+]CC",
+        "pim"   : "[D*(2010)+ -> ([D0]CC -> ^pi- pi+) pi+]CC",
+        "pip"  : "[D*(2010)+ -> ([D0]CC -> pi- ^pi+) pi+]CC",
+        "spip" : "[D*(2010)+ -> ([D0]CC -> pi- pi+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02pipi(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02pipi"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimPip"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> ([D0]CC -> pi- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> pi- pi+) pi+]CC",
+        "pim"   : "[D*(2010)+ -> ([D0]CC -> ^pi- pi+) pi+]CC",
+        "pip"  : "[D*(2010)+ -> ([D0]CC -> pi- ^pi+) pi+]CC",
+        "spip" : "[D*(2010)+ -> ([D0]CC -> pi- pi+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
diff --git a/Charm_2024validation/options/d0_to_hh_MC.py b/Charm_2024validation/options/d0_to_hh_MC.py
new file mode 100644
index 0000000000..aaae05665d
--- /dev/null
+++ b/Charm_2024validation/options/d0_to_hh_MC.py
@@ -0,0 +1,99 @@
+from .tupling import (
+    make_MC_composite_variables,
+    make_MC_basic_variables,
+    make_MC_event_variables,
+)
+
+from PyConf.reading import get_mc_particles, get_mc_header
+from FunTuple import FunTuple_MCParticles as FuntupleMC
+
+def maketuple_MC_Dst2D0pi_D02Kpi_RS(options, pvs, rec_summary):
+    name = "MC_Dst2D0pi_D02Kpi_RS"
+    line = "/Event/MC/Particles"
+
+    input_data = get_mc_particles(f"{line}")
+
+    branches = {
+        "Dst" : "[D*(2010)+ ==> (D0 ==> K- pi+ ) pi+]CC",
+        "D0"  : "[D*(2010)+ ==> ^(D0 ==> K- pi+ ) pi+]CC",
+        "Km"   : "[D*(2010)+ ==> (D0 ==> ^K- pi+ ) pi+]CC",
+        "pip"  : "[D*(2010)+ ==> (D0 ==> K- ^pi+ ) pi+]CC",
+        "spip" : "[D*(2010)+ ==> (D0 ==> K- pi+ ) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_MC_composite_variables(),
+        "D0"    : make_MC_composite_variables(),
+        "Km"     : make_MC_basic_variables(),
+        "pip"    : make_MC_basic_variables(),
+        "spip"   : make_MC_basic_variables(),
+    }
+
+    mytuple  = FuntupleMC(name=name,
+                          tuple_name="MCDecayTree",
+                          fields=branches, variables = variables,
+                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
+                          inputs=input_data)
+
+    return [mytuple]
+
+def maketuple_MC_Dst2D0pi_D02KK(options, pvs, rec_summary):
+    name = "MC_Dst2D0pi_D02KK"
+    line = "/Event/MC/Particles"
+
+    input_data = get_mc_particles(f"{line}")
+
+    branches = {
+        "Dst" : "[D*(2010)+ ==> ([D0]CC ==> K- K+) pi+]CC",
+        "D0"  : "[D*(2010)+ ==> ^([D0]CC ==> K- K+) pi+]CC",
+        "Km"   : "[D*(2010)+ ==> ([D0]CC ==> ^K- K+) pi+]CC",
+        "Kp"  : "[D*(2010)+ ==> ([D0]CC ==> K- ^K+) pi+]CC",
+        "spip" : "[D*(2010)+ ==> ([D0]CC ==> K- K+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_MC_composite_variables(),
+        "D0"    : make_MC_composite_variables(),
+        "Km"     : make_MC_basic_variables(),
+        "Kp"    : make_MC_basic_variables(),
+        "spip"   : make_MC_basic_variables(),
+    }
+
+    mytuple  = FuntupleMC(name=name,
+                        tuple_name="MCDecayTree",
+                        fields=branches, variables = variables,
+                        event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
+                        inputs=input_data)
+
+    return [mytuple]
+
+
+def maketuple_MC_Dst2D0pi_D02pipi(options, pvs, rec_summary):
+    name = "MC_Dst2D0pi_D02pipi"
+    line = "/Event/MC/Particles"
+
+    input_data = get_mc_particles(f"{line}")
+
+    branches = {
+        "Dst" : "[D*(2010)+ ==> ([D0]CC ==> pi- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ ==> ^([D0]CC ==> pi- pi+) pi+]CC",
+        "pim"   : "[D*(2010)+ ==> ([D0]CC ==> ^pi- pi+) pi+]CC",
+        "pip"  : "[D*(2010)+ ==> ([D0]CC ==> pi- ^pi+) pi+]CC",
+        "spip" : "[D*(2010)+ ==> ([D0]CC ==> pi- pi+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_MC_composite_variables(),
+        "D0"    : make_MC_composite_variables(),
+        "pim"     : make_MC_basic_variables(),
+        "pip"    : make_MC_basic_variables(),
+        "spip"   : make_MC_basic_variables(),
+    }
+
+    mytuple  = FuntupleMC(name=name,
+                        tuple_name="MCDecayTree",
+                        fields=branches, variables = variables,
+                        event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
+                        inputs=input_data)
+
+    return [mytuple]
diff --git a/Charm_2024validation/options/d0_to_hhhh.py b/Charm_2024validation/options/d0_to_hhhh.py
new file mode 100644
index 0000000000..0277430fb9
--- /dev/null
+++ b/Charm_2024validation/options/d0_to_hhhh.py
@@ -0,0 +1,247 @@
+from .tupling import (
+    make_composite_variables,
+    make_composite_variables_4body,
+    make_composite_variables_3body,
+    make_basic_variables,
+    make_hlt2_event_variables,
+    make_DeltaM_variable,
+    make_basic_dtf_variables,
+    make_composite_dtf_variables
+)
+
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from FunTuple import FunTuple_Particles as Funtuple
+from DecayTreeFitter import DecayTreeFitter
+
+# I can't get make_composite_variables_4body to work for some reason...
+import Functors as F
+from FunTuple import FunctorCollection
+variables_4body = (
+    FunctorCollection(
+        {
+            #14
+            "M14": F.SUBCOMB(Functor=F.MASS, Indices=(1, 4)),
+            "SDOCA14"     : F.SDOCA(Child1=1,Child2=4),
+            "SDOCACHI214" : F.SDOCACHI2(Child1=1,Child2=4),
+            "DOCA14"      : F.DOCA(Child1=1,Child2=4),
+            "DOCACHI214"  : F.DOCACHI2(Child1=1,Child2=4),
+            "COS14": F.ALV(1, 4),
+            #24
+            "M24": F.SUBCOMB(Functor=F.MASS, Indices=(2, 4)),
+            "SDOCA24"     : F.SDOCA(Child1=2,Child2=4),
+            "SDOCACHI224" : F.SDOCACHI2(Child1=2,Child2=4),
+            "DOCA24"      : F.DOCA(Child1=2,Child2=4),
+            "DOCACHI224"  : F.DOCACHI2(Child1=2,Child2=4),
+            "COS24": F.ALV(2, 4),
+            #34
+            "M34": F.SUBCOMB(Functor=F.MASS, Indices=(3, 4)),
+            "SDOCA34"     : F.SDOCA(Child1=3,Child2=4),
+            "SDOCACHI234" : F.SDOCACHI2(Child1=3,Child2=4),
+            "DOCA34"      : F.DOCA(Child1=3,Child2=4),
+            "DOCACHI234"  : F.DOCACHI2(Child1=3,Child2=4),
+            "COS34": F.ALV(3, 4),
+        }
+    )
+)
+
+
+def maketuple_DstToD0pi_D0ToKKPiPi(options, pvs, rec_summary):
+    name = "DstToD0pi_D0ToKKPiPi"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmKpPimPip"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> ([D0]CC -> K+ K- pi+ pi-) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> K+ K- pi+ pi-) pi+]CC",
+        "h1"  : "[D*(2010)+ -> ([D0]CC -> ^K+ K- pi+ pi-) pi+]CC",
+        "h2"  : "[D*(2010)+ -> ([D0]CC -> K+ ^K- pi+ pi-) pi+]CC",
+        "h3"  : "[D*(2010)+ -> ([D0]CC -> K+ K- ^pi+ pi-) pi+]CC",
+        "h4"  : "[D*(2010)+ -> ([D0]CC -> K+ K- pi+ ^pi-) pi+]CC",
+        "pis" : "[D*(2010)+ -> ([D0]CC -> K+ K- pi+ pi-) ^pi+]CC",
+    }
+
+    DTF_PV = DecayTreeFitter(
+        name='DTF_D0ToKKPiPi_PV',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    basic_variables = make_basic_variables(options, pvs, input_data) +\
+        make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)
+
+    composite_dtf_variables = make_composite_dtf_variables(options,
+                                                           pvs,
+                                                           input_data,
+                                                           DTF=DTF_PV,
+                                                           pv_constraint=True)
+
+    composite_variables = make_composite_variables(options, pvs, input_data) + composite_dtf_variables
+        
+
+    composite_variables_4body = make_composite_variables_3body(options, pvs, input_data) + composite_dtf_variables + variables_4body
+
+    variables = {
+        "Dst"   : composite_variables+make_DeltaM_variable(options),
+        "D0"    : composite_variables_4body,
+        "h1"    : basic_variables,
+        "h2"    : basic_variables,
+        "h3"    : basic_variables,
+        "h4"    : basic_variables,
+        "pis"   : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstToD0pi_D0ToKPiPiPi(options, pvs, rec_summary):
+    name = "DstToD0pi_D0ToKPiPiPi"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPimPipPip"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> (D0 -> K- pi+ pi- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^(D0 -> K- pi+ pi- pi+) pi+]CC",
+        "h1"   : "[D*(2010)+ -> (D0 -> ^K- pi+ pi- pi+) pi+]CC",
+        "h2"  : "[D*(2010)+ -> (D0 -> K- ^pi+ pi- pi+) pi+]CC",
+        "h3"   : "[D*(2010)+ -> (D0 -> K- pi+ ^pi- pi+) pi+]CC",
+        "h4"  : "[D*(2010)+ -> (D0 -> K- pi+ pi- ^pi+) pi+]CC",
+        "pis" : "[D*(2010)+ -> (D0 -> K- pi+ pi- pi+) ^pi+]CC",
+    }
+
+    DTF_PV = DecayTreeFitter(
+        name='DTF_D0ToKPiPiPi_PV',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    basic_variables = make_basic_variables(options, pvs, input_data) +\
+        make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True, mass_constraint=False)
+
+    composite_dtf_variables = make_composite_dtf_variables(options,
+                                                           pvs,
+                                                           input_data,
+                                                           DTF=DTF_PV,
+                                                           pv_constraint=True)
+
+    composite_variables = make_composite_variables(options, pvs, input_data) + composite_dtf_variables
+        
+
+    composite_variables_4body = make_composite_variables_3body(options, pvs, input_data) + composite_dtf_variables + variables_4body
+
+    variables = {
+        "Dst"   : composite_variables+make_DeltaM_variable(options),
+        "D0"    : composite_variables_4body,
+        "h1"    : basic_variables,
+        "h2"    : basic_variables,
+        "h3"    : basic_variables,
+        "h4"    : basic_variables,
+        "pis"   : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstToD0pi_D0ToPiKPiPi(options, pvs, rec_summary):
+    name = "DstToD0pi_D0ToPiKPiPi"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKpPimPimPip"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> (D0 -> pi- K+ pi- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^(D0 -> pi- K+ pi- pi+) pi+]CC",
+        "h1"   : "[D*(2010)+ -> (D0 -> ^pi- K+ pi- pi+) pi+]CC",
+        "h2"  : "[D*(2010)+ -> (D0 -> pi- ^K+ pi- pi+) pi+]CC",
+        "h3"   : "[D*(2010)+ -> (D0 -> pi- K+ ^pi- pi+) pi+]CC",
+        "h4"  : "[D*(2010)+ -> (D0 -> pi- K+ pi- ^pi+) pi+]CC",
+        "pis" : "[D*(2010)+ -> (D0 -> pi- K+ pi- pi+) ^pi+]CC",
+    }
+
+    DTF_PV = DecayTreeFitter(
+        name='DTF_D0ToPiKPiPi_PV',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    basic_variables = make_basic_variables(options, pvs, input_data) +\
+        make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True, mass_constraint=False)
+
+    composite_dtf_variables = make_composite_dtf_variables(options,
+                                                           pvs,
+                                                           input_data,
+                                                           DTF=DTF_PV,
+                                                           pv_constraint=True)
+
+    composite_variables = make_composite_variables(options, pvs, input_data) + composite_dtf_variables
+        
+
+    composite_variables_4body = make_composite_variables_3body(options, pvs, input_data) + composite_dtf_variables + variables_4body
+
+    variables = {
+        "Dst"   : composite_variables+make_DeltaM_variable(options),
+        "D0"    : composite_variables_4body,
+        "h1"    : basic_variables,
+        "h2"    : basic_variables,
+        "h3"    : basic_variables,
+        "h4"    : basic_variables,
+        "pis"   : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstToD0pi_D0ToPiPiPiPi(options, pvs, rec_summary):
+    name = "DstToD0pi_D0ToPiPiPiPi"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimPimPipPip"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> ([D0]CC -> pi+ pi- pi+ pi-) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> pi+ pi- pi+ pi-) pi+]CC",
+        "h1"  : "[D*(2010)+ -> ([D0]CC -> ^pi+ pi- pi+ pi-) pi+]CC",
+        "h2"  : "[D*(2010)+ -> ([D0]CC -> pi+ ^pi- pi+ pi-) pi+]CC",
+        "h3"  : "[D*(2010)+ -> ([D0]CC -> pi+ pi- ^pi+ pi-) pi+]CC",
+        "h4"  : "[D*(2010)+ -> ([D0]CC -> pi+ pi- pi+ ^pi-) pi+]CC",
+        "pis" : "[D*(2010)+ -> ([D0]CC -> pi+ pi- pi+ pi-) ^pi+]CC",
+    }
+
+    DTF_PV = DecayTreeFitter(
+        name='DTF_D0ToPiPiPiPi_PV',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    basic_variables = make_basic_variables(options, pvs, input_data) +\
+        make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True, mass_constraint=False)
+
+    composite_dtf_variables = make_composite_dtf_variables(options,
+                                                           pvs,
+                                                           input_data,
+                                                           DTF=DTF_PV,
+                                                           pv_constraint=True)
+
+    composite_variables = make_composite_variables(options, pvs, input_data) + composite_dtf_variables
+        
+
+    composite_variables_4body = make_composite_variables_3body(options, pvs, input_data) + composite_dtf_variables + variables_4body
+
+    variables = {
+        "Dst"   : composite_variables+make_DeltaM_variable(options),
+        "D0"    : composite_variables_4body,
+        "h1"    : basic_variables,
+        "h2"    : basic_variables,
+        "h3"    : basic_variables,
+        "h4"    : basic_variables,
+        "pis"   : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
diff --git a/Charm_2024validation/options/d0_to_hhhh_MC.py b/Charm_2024validation/options/d0_to_hhhh_MC.py
new file mode 100644
index 0000000000..2dbe198fa9
--- /dev/null
+++ b/Charm_2024validation/options/d0_to_hhhh_MC.py
@@ -0,0 +1,43 @@
+from .tupling import (
+    make_MC_composite_variables,
+    make_MC_basic_variables,
+    make_MC_event_variables,
+)
+
+from PyConf.reading import get_mc_particles, get_mc_header
+from FunTuple import FunTuple_MCParticles as FuntupleMC
+
+def maketuple_MC_DstToD0pi_D0ToKPiPiPi(options, pvs, rec_summary):
+    name = "MC_DstToD0pi_D0ToKPiPiPi"
+
+    line = "/Event/MC/Particles"
+    
+    input_data = get_mc_particles(f"{line}")
+
+    branches = {
+        "Dst" : "[D*(2010)+ ==> (D0 ==> K- pi+ pi- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ ==> ^(D0 ==> K- pi+ pi- pi+) pi+]CC",
+        "h1"   : "[D*(2010)+ ==> (D0 ==> ^K- pi+ pi- pi+) pi+]CC",
+        "h2"  : "[D*(2010)+ ==> (D0 ==> K- ^pi+ pi- pi+) pi+]CC",
+        "h3"   : "[D*(2010)+ ==> (D0 ==> K- pi+ ^pi- pi+) pi+]CC",
+        "h4"  : "[D*(2010)+ ==> (D0 ==> K- pi+ pi- ^pi+) pi+]CC",
+        "pis" : "[D*(2010)+ ==> (D0 ==> K- pi+ pi- pi+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_MC_composite_variables(),
+        "D0"    : make_MC_composite_variables(),
+        "h1"     : make_MC_basic_variables(),
+        "h2"    : make_MC_basic_variables(),
+        "h3"    : make_MC_basic_variables(),
+        "h4"    : make_MC_basic_variables(),
+        "pis"   : make_MC_basic_variables(),
+    }
+
+    mytuple  = FuntupleMC(name=name,
+                          tuple_name="MCDecayTree",
+                          fields=branches, variables = variables,  
+                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])), 
+                          inputs=input_data)
+
+    return [mytuple]
diff --git a/Charm_2024validation/options/d0_to_hhpi0.py b/Charm_2024validation/options/d0_to_hhpi0.py
new file mode 100644
index 0000000000..cf3c3ba59f
--- /dev/null
+++ b/Charm_2024validation/options/d0_to_hhpi0.py
@@ -0,0 +1,359 @@
+from .tupling import (
+    make_composite_variables,
+    make_DeltaM_variable,
+    make_basic_variables,
+    make_hlt2_event_variables,
+    make_top_isolation_variables,
+    make_basic_isolation_variables,
+    make_intermediate_isolation_variables,
+    make_composite_dtf_variables,
+    make_basic_dtf_variables,
+)
+
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from FunTuple import FunTuple_Particles as Funtuple
+
+iso_vars_locations = ["LongTrackIso", "NeutralIso", "PizIso"]
+
+def make_dtf_variables(options, pvs, input_data, ptype):
+
+    if ptype not in ["basic", "composite"]:
+        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
+
+    from DecayTreeFitter import DecayTreeFitter
+    
+    DTF = DecayTreeFitter(
+        name=f'DTF_{{hash}}',
+        input_particles=input_data)
+
+    DTFvtx = DecayTreeFitter(
+        name=f'DTFvtx_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    DTFmass = DecayTreeFitter(
+        name=f'DTFmass_{{hash}}',
+        input_particles=input_data,
+        mass_constraints=["D0"])
+
+    DTFvtxmass = DecayTreeFitter(
+        name=f'DTFvtxmass_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0"])
+
+    if ptype == "basic":
+        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmass,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="D0")
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmass,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="D0")
+        return dtf_vars
+
+    if ptype == "composite":
+        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmass,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="D0")
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmass,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="D0")
+        return dtf_vars
+
+
+def maketuple_Dst2D0pi_D02KKpi0_M(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02KKpi0_M"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmKpPi0_M"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) pi0) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (phi(1020) -> K- K+) pi0) pi+]CC",
+        "phi"   : "[D*(2010)+ -> ([D0]CC -> ^(phi(1020) -> K- K+) pi0) pi+]CC",
+        "Km"   : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> ^K- K+) pi0) pi+]CC",
+        "Kp"  : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- ^K+) pi0) pi+]CC",
+        "pi0"  : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) ^pi0) pi+]CC",
+        "spip" : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) pi0) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "phi"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation:
+
+        variables = {
+            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="D0"),
+            "phi"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="phi(1020)"),
+            "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02KKpi0_R(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02KKpi0_R"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmKpPi0_R"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) (pi0 -> gamma gamma) ) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (phi(1020) -> K- K+) (pi0 -> gamma gamma) ) pi+]CC",
+        "phi"   : "[D*(2010)+ -> ([D0]CC -> ^(phi(1020) -> K- K+) (pi0 -> gamma gamma) ) pi+]CC",
+        "Km"   : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> ^K- K+) (pi0 -> gamma gamma) ) pi+]CC",
+        "Kp"  : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- ^K+) (pi0 -> gamma gamma) ) pi+]CC",
+        "pi0"  : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) ^(pi0 -> gamma gamma) ) pi+]CC",
+        "gamma1"  : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) (pi0 -> ^gamma gamma) ) pi+]CC",
+        "gamma2"  : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) (pi0 -> gamma ^gamma) ) pi+]CC",
+        "spip" : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) (pi0 -> gamma gamma) ) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "phi"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "gamma1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "gamma2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation:
+
+        variables = {
+            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="D0"),
+            "phi"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="phi(1020)"),
+            "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="pi0"),
+            "gamma1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "gamma2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02Kpipi0_M(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02Kpipi0_M"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPipPi0_M"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) pi0) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^(D0 -> (K*(892)~0 -> K- pi+) pi0) pi+]CC",
+        "Kst"   : "[D*(2010)+ -> (D0 -> ^(K*(892)~0 -> K- pi+) pi0) pi+]CC",
+        "Km"   : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> ^K- pi+) pi0) pi+]CC",
+        "pip"  : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- ^pi+) pi0) pi+]CC",
+        "pi0"  : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) ^pi0) pi+]CC",
+        "spip" : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) pi0) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Kst"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation:
+
+        variables = {
+            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="D0"),
+            "Kst"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="K*(892)~0"),
+            "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02Kpipi0_R(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02Kpipi0_R"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPipPi0_R"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) (pi0 -> gamma gamma) ) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^(D0 -> (K*(892)~0 -> K- pi+) (pi0 -> gamma gamma) ) pi+]CC",
+        "Kst"   : "[D*(2010)+ -> (D0 -> ^(K*(892)~0 -> K- pi+) (pi0 -> gamma gamma) ) pi+]CC",
+        "Km"   : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> ^K- pi+) (pi0 -> gamma gamma) ) pi+]CC",
+        "pip"  : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- ^pi+) (pi0 -> gamma gamma) ) pi+]CC",
+        "pi0"  : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) ^(pi0 -> gamma gamma) ) pi+]CC",
+        "gamma1"  : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) (pi0 -> ^gamma gamma) ) pi+]CC",
+        "gamma2"  : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) (pi0 -> gamma ^gamma) ) pi+]CC",
+        "spip" : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) (pi0 -> gamma gamma) ) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Kst"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "gamma1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "gamma2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation:
+
+        variables = {
+            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="D0"),
+            "Kst"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="K*(892)~0"),
+            "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="pi0"),
+            "gamma1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "gamma2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02pipipi0_M(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02pipipi0_M"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimPipPi0_M"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) pi0) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (rho(770)0 -> pi- pi+) pi0) pi+]CC",
+        "rho"   : "[D*(2010)+ -> ([D0]CC -> ^(rho(770)0 -> pi- pi+) pi0) pi+]CC",
+        "pim"   : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> ^pi- pi+) pi0) pi+]CC",
+        "pip"  : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- ^pi+) pi0) pi+]CC",
+        "pi0"  : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) ^pi0) pi+]CC",
+        "spip" : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) pi0) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "rho"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation:
+
+        variables = {
+            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="D0"),
+            "rho"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="rho(770)0"),
+            "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02pipipi0_R(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02pipipi0_R"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimPipPi0_R"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) (pi0 -> gamma gamma) ) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (rho(770)0 -> pi- pi+) (pi0 -> gamma gamma) ) pi+]CC",
+        "rho"   : "[D*(2010)+ -> ([D0]CC -> ^(rho(770)0 -> pi- pi+) (pi0 -> gamma gamma) ) pi+]CC",
+        "pim"   : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> ^pi- pi+) (pi0 -> gamma gamma) ) pi+]CC",
+        "pip"  : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- ^pi+) (pi0 -> gamma gamma) ) pi+]CC",
+        "pi0"  : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) ^(pi0 -> gamma gamma) ) pi+]CC",
+        "gamma1"  : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) (pi0 -> ^gamma gamma) ) pi+]CC",
+        "gamma2"  : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) (pi0 -> gamma ^gamma) ) pi+]CC",
+        "spip" : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) (pi0 -> gamma gamma) ) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "rho"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "gamma1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "gamma2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation:
+
+        variables = {
+            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="D0"),
+            "rho"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="rho(770)0"),
+            "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="pi0"),
+            "gamma1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "gamma2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
diff --git a/Charm_2024validation/options/d0_to_hhpi0_MC.py b/Charm_2024validation/options/d0_to_hhpi0_MC.py
new file mode 100644
index 0000000000..84648f4e71
--- /dev/null
+++ b/Charm_2024validation/options/d0_to_hhpi0_MC.py
@@ -0,0 +1,44 @@
+from .tupling import (
+    make_MC_composite_variables,
+    make_MC_basic_variables,
+    make_MC_event_variables,
+)
+
+from PyConf.reading import get_mc_particles, get_mc_header
+from FunTuple import FunTuple_MCParticles as FuntupleMC
+
+def maketuple_MC_Dst2D0pi_D02Kpipi0(options, pvs, rec_summary):
+    name = "MC_Dst2D0pi_D02Kpipi0"
+    line = "/Event/MC/Particles"
+    
+    input_data = get_mc_particles(f"{line}")
+
+    branches = {
+        "Dst" : "[D*(2010)+ ==> (D0 ==> K- pi+ (pi0 ==> gamma gamma) ) pi+]CC",
+        "D0"  : "[D*(2010)+ ==> ^(D0 ==> K- pi+ (pi0 ==> gamma gamma) ) pi+]CC",
+        "Km"   : "[D*(2010)+ ==> (D0 ==> ^K- pi+ (pi0 ==> gamma gamma) ) pi+]CC",
+        "pip"  : "[D*(2010)+ ==> (D0 ==> K- ^pi+ (pi0 ==> gamma gamma) ) pi+]CC",
+        "pi0"  : "[D*(2010)+ ==> (D0 ==> K- pi+ ^(pi0 ==> gamma gamma) ) pi+]CC",
+        "gamma1"  : "[D*(2010)+ ==> (D0 ==> K- pi+ (pi0 ==> ^gamma gamma) ) pi+]CC",
+        "gamma2"  : "[D*(2010)+ ==> (D0 ==> K- pi+ (pi0 ==> gamma ^gamma) ) pi+]CC",
+        "spip" : "[D*(2010)+ ==> (D0 ==> K- pi+ (pi0 ==> gamma gamma) ) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_MC_composite_variables(),
+        "D0"    : make_MC_composite_variables(),
+        "Km"     : make_MC_basic_variables(),
+        "pip"    : make_MC_basic_variables(),
+        "pi0"    : make_MC_basic_variables(),
+        "gamma1"    : make_MC_basic_variables(),
+        "gamma2"    : make_MC_basic_variables(),
+        "spip"   : make_MC_basic_variables(),
+    }
+
+    mytuple  = FuntupleMC(name=name,
+                          tuple_name="MCDecayTree",
+                          fields=branches, variables = variables,  
+                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])), 
+                          inputs=input_data)
+
+    return [mytuple]
diff --git a/Charm_2024validation/options/d0_to_kshh.py b/Charm_2024validation/options/d0_to_kshh.py
new file mode 100644
index 0000000000..dad027529f
--- /dev/null
+++ b/Charm_2024validation/options/d0_to_kshh.py
@@ -0,0 +1,1585 @@
+from .tupling import (
+    make_composite_variables,
+    make_composite_variables_3body,
+    make_basic_variables,
+    make_hlt2_event_variables,
+    make_DeltaM_variable,
+    make_basic_dtf_variables,
+    make_composite_dtf_variables,
+    make_composite_dtf_variables_3body,
+)
+
+import Functors as F
+from Functors.math import log
+from DaVinci import Options, make_config
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from FunTuple import FunctorCollection
+from PyConf.reading import get_particles
+import FunTuple.functorcollections as FC
+from FunTuple import FunTuple_Particles as Funtuple
+from DecayTreeFitter import DecayTreeFitter
+
+# define helper functors
+get_SV =  F.ENDVERTEX @ F.FORWARDARG0
+get_SV_pos = F.TOLINALG @ F.POSITION @ get_SV
+# only if composite (i.e. has vertex)

+get_child_1 = F.CHILD(1, F.FORWARDARG0) # change here the index of the child.
+get_child_endvtx_pos_1 = F.ENDVERTEX_POS  @ get_child_1
+get_fdvec_child_1 = get_child_endvtx_pos_1 - get_SV_pos
+
+# define observables
+IP_wrt_SV_KS0 = F.IP.bind(get_SV_pos , get_child_1)
+IPCHI2_wrt_SV_KS0 = F.IPCHI2.bind(get_SV , get_child_1)
+# only if child is composite (i.e. has vertex)
+FD_wrt_SV_KS0 = F.MAGNITUDE @ get_fdvec_child_1
+FDCHI2_wrt_SV_KS0 = F.VTX_FDCHI2.bind(get_SV, get_child_1)
+# Note: Apply the functors to the head of the node of decay tree e.g. B
+# Functor collection for SV related info
+topo_sv_var = FunctorCollection(
+    {
+        "ORIVXIP_CHILD1": IP_wrt_SV_KS0,
+        "ORIVXIPCHI2_CHILD1": IPCHI2_wrt_SV_KS0,
+        "ORIVXFD_CHILD1": FD_wrt_SV_KS0,
+        "ORIVXFDCHI2_CHILD1": FDCHI2_wrt_SV_KS0,
+    }
+)
+
+"""
+ D0->KSππ LL, DD x LowBias x Dstar
+ D0->KSK-Ï€+ LL, DD x LowBias x Dstar
+ D0->KSK+Ï€- LL, DD x LowBias x Dstar
+ D0->KSKK LL, DD x LowBias x Dstar
+ nb: https://gitlab.cern.ch/lhcb/Moore/-/blob/master/Hlt/Hlt2Conf/python/Hlt2Conf/lines/charm/d0_to_kshh.py?ref_type=heads
+
+ """
+
+# D0->KSππ
+def maketuple_DstpToD0Pip_D0ToKsPimPip_LL_LowBias(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsPimPip_LL_LowBias"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_LL_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) pi- pi+) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) pi- pi+) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^pi- pi+) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- ^pi+) pi+]CC",
+        "pis" :   "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D02KSPiPi_LL_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D02KSPiPi_LL_lowbias_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0") + topo_sv_var,
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstpToD0Pip_D0ToKsPimPip_DD_LowBias(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsPimPip_DD_LowBias"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_DD_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) pi- pi+) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) pi- pi+) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^pi- pi+) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- ^pi+) pi+]CC",
+        "pis" :   "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D02KSPiPi_DD_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D02KSPiPi_DD_lowbias_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0") + topo_sv_var,
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstpToD0Pip_D0ToKsPimPip_LL(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsPimPip_LL"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_LL"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) pi- pi+) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) pi- pi+) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^pi- pi+) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- ^pi+) pi+]CC",
+        "pis" :   "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D02KSPiPi_LL_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D02KSPiPi_LL_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF= DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF= DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF= DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF= DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF= DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF= DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0") + topo_sv_var,
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstpToD0Pip_D0ToKsPimPip_DD(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsPimPip_DD"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_DD"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) pi- pi+) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) pi- pi+) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^pi- pi+) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- ^pi+) pi+]CC",
+        "pis" :   "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D02KSPiPi_DD_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D02KSPiPi_DD_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0") + topo_sv_var,
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsPimPip_LL_LowBias(options, pvs, rec_summary):
+    name = "D0ToKsPimPip_LL_LowBias"
+    turbo_line = "Hlt2Charm_D0ToKsPimPip_LL_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) pi- pi+]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) pi- pi+]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) pi- pi+]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) pi- pi+]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^pi- pi+]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) pi- ^pi+]CC",
+    }
+
+    DTF_D0ToKsPimPip_LL_LB_MASS = DecayTreeFitter(
+        name='DTF_D02KSPiPi_LL_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsPimPip_DD_LowBias(options, pvs, rec_summary):
+    name = "D0ToKsPimPip_DD_LowBias"
+    turbo_line = "Hlt2Charm_D0ToKsPimPip_DD_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) pi- pi+]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) pi- pi+]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) pi- pi+]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) pi- pi+]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^pi- pi+]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) pi- ^pi+]CC",
+    }
+
+    DTF_D0ToKsPimPip_DD_LB_MASS = DecayTreeFitter(
+        name='DTF_D02KSPiPi_DD_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsPimPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsPimPip_LL(options, pvs, rec_summary):
+    name = "D0ToKsPimPip_LL"
+    turbo_line = "Hlt2Charm_D0ToKsPimPip_LL"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) pi- pi+]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) pi- pi+]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) pi- pi+]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) pi- pi+]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^pi- pi+]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) pi- ^pi+]CC",
+    }
+
+    DTF_D0ToKsPimPip_LL_MASS = DecayTreeFitter(
+        name='DTF_D02KSPiPi_LL_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsPimPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsPimPip_DD(options, pvs, rec_summary):
+    name = "D0ToKsPimPip_DD"
+    turbo_line = "Hlt2Charm_D0ToKsPimPip_DD"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) pi- pi+]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) pi- pi+]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) pi- pi+]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) pi- pi+]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^pi- pi+]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) pi- ^pi+]CC",
+    }
+
+    DTF_D0ToKsPimPip_DD_MASS = DecayTreeFitter(
+        name='DTF_D02KSPiPi_DD_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsPimPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+# D0->KSK-Ï€+
+def maketuple_DstpToD0Pip_D0ToKsKmPip_LL_LowBias(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsKmPip_LL_LowBias"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_LL_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- pi+) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- pi+) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- pi+) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- pi+) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^pi+) pi+]CC",
+        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D0ToKsKmPip_LL_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D0ToKsKmPip_LL_lowbias_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstpToD0Pip_D0ToKsKmPip_DD_LowBias(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsKmPip_DD_LowBias"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_DD_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- pi+) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- pi+) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- pi+) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- pi+) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^pi+) pi+]CC",
+        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D0ToKsKmPip_DD_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D0ToKsKmPip_DD_lowbias_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstpToD0Pip_D0ToKsKmPip_LL(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsKmPip_LL"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_LL"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- pi+) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- pi+) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- pi+) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- pi+) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^pi+) pi+]CC",
+        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D0ToKsKmPip_LL_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D0ToKsKmPip_LL_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstpToD0Pip_D0ToKsKmPip_DD(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsKmPip_DD"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_DD"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- pi+) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- pi+) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- pi+) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- pi+) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^pi+) pi+]CC",
+        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D0ToKsKmPip_DD_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D0ToKsKmPip_DD_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsKmPip_LL_LowBias(options, pvs, rec_summary):
+    name = "D0ToKsKmPip_LL_LowBias"
+    turbo_line = "Hlt2Charm_D0ToKsKmPip_LL_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- pi+]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- pi+]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- pi+]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- pi+]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- pi+]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^pi+]CC",
+    }
+
+    DTF_D0ToKsKmPip_LL_LB_MASS = DecayTreeFitter(
+        name='DTF_D0ToKsKmPip_LL_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsKmPip_DD_LowBias(options, pvs, rec_summary):
+    name = "D0ToKsKmPip_DD_LowBias"
+    turbo_line = "Hlt2Charm_D0ToKsKmPip_DD_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- pi+]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- pi+]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- pi+]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- pi+]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- pi+]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^pi+]CC",
+    }
+
+    DTF_D0ToKsKmPip_DD_LB_MASS = DecayTreeFitter(
+        name='DTF_D0ToKsKmPip_DD_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsKmPip_LL(options, pvs, rec_summary):
+    name = "D0ToKsKmPip_LL"
+    turbo_line = "Hlt2Charm_D0ToKsKmPip_LL"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- pi+]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- pi+]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- pi+]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- pi+]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- pi+]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^pi+]CC",
+    }
+
+    DTF_D0ToKsKmPip_LL_MASS = DecayTreeFitter(
+        name='DTF_D0ToKsKmPip_LL_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsKmPip_DD(options, pvs, rec_summary):
+    name = "D0ToKsKmPip_DD"
+    turbo_line = "Hlt2Charm_D0ToKsKmPip_DD"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- pi+]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- pi+]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- pi+]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- pi+]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- pi+]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^pi+]CC",
+    }
+
+    DTF_D0ToKsKmPip_DD_MASS = DecayTreeFitter(
+        name='DTF_D0ToKsKmPip_DD_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+# D0->KSK+Ï€-
+def maketuple_DstpToD0Pip_D0ToKsKpPim_LL_LowBias(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsKpPim_LL_LowBias"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_LL_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K+ pi-) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K+ pi-) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K+ pi-) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ ^pi-) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K+ pi-) pi+]CC",
+        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D0ToKsKpPim_LL_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D0ToKsKpPim_LL_lowbias_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstpToD0Pip_D0ToKsKpPim_DD_LowBias(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsKpPim_DD_LowBias"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_DD_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K+ pi-) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K+ pi-) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K+ pi-) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ ^pi-) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K+ pi-) pi+]CC",
+        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D0ToKsKpPim_DD_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D0ToKsKpPim_DD_lowbias_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstpToD0Pip_D0ToKsKpPim_LL(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsKpPim_LL"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_LL"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K+ pi-) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K+ pi-) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K+ pi-) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ ^pi-) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K+ pi-) pi+]CC",
+        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D0ToKsKpPim_LL_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D0ToKsKpPim_LL_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstpToD0Pip_D0ToKsKpPim_DD(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsKpPim_DD"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_DD"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K+ pi-) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K+ pi-) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K+ pi-) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ ^pi-) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K+ pi-) pi+]CC",
+        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D0ToKsKpPim_DD_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D0ToKsKpPim_DD_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsKpPim_LL_LowBias(options, pvs, rec_summary):
+    name = "D0ToKsKpPim_LL_LowBias"
+    turbo_line = "Hlt2Charm_D0ToKsKpPim_LL_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) K+ pi-]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K+ pi-]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K+ pi-]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K+ pi-]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) K+ ^pi-]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) ^K+ pi-]CC",
+    }
+
+    DTF_D0ToKsKpPim_LL_LB_MASS = DecayTreeFitter(
+        name='DTF_D0ToKsKpPim_LL_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKpPim_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsKpPim_DD_LowBias(options, pvs, rec_summary):
+    name = "D0ToKsKpPim_DD_LowBias"
+    turbo_line = "Hlt2Charm_D0ToKsKpPim_DD_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) K+ pi-]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K+ pi-]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K+ pi-]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K+ pi-]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) K+ ^pi-]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) ^K+ pi-]CC",
+    }
+
+    DTF_D0ToKsKpPim_DD_LB_MASS = DecayTreeFitter(
+        name='DTF_D0ToKsKpPim_DD_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKpPim_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsKpPim_LL(options, pvs, rec_summary):
+    name = "D0ToKsKpPim_LL"
+    turbo_line = "Hlt2Charm_D0ToKsKpPim_LL"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) K+ pi-]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K+ pi-]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K+ pi-]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K+ pi-]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) K+ ^pi-]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) ^K+ pi-]CC",
+    }
+
+    DTF_D0ToKsKpPim_LL_MASS = DecayTreeFitter(
+        name='DTF_D0ToKsKpPim_LL_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKpPim_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsKpPim_DD(options, pvs, rec_summary):
+    name = "D0ToKsKpPim_DD"
+    turbo_line = "Hlt2Charm_D0ToKsKpPim_DD"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) K+ pi-]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K+ pi-]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K+ pi-]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K+ pi-]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) K+ ^pi-]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) ^K+ pi-]CC",
+    }
+
+    DTF_D0ToKsKpPim_DD_MASS = DecayTreeFitter(
+        name='DTF_D0ToKsKpPim_DD_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKpPim_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+# D0->KSK-K+
+def maketuple_DstpToD0Pip_D0ToKsKmKp_LL_LowBias(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsKmKp_LL_LowBias"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_LL_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- K+) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- K+) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- K+) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- K+) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^K+) pi+]CC",
+        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D0ToKsKmKp_LL_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D0ToKsKmKp_LL_lowbias_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstpToD0Pip_D0ToKsKmKp_DD_LowBias(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsKmKp_DD_LowBias"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_DD_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- K+) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- K+) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- K+) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- K+) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^K+) pi+]CC",
+        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D0ToKsKmKp_DD_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D0ToKsKmKp_DD_lowbias_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstpToD0Pip_D0ToKsKmKp_LL(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsKmKp_LL"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_LL"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- K+) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- K+) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- K+) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- K+) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^K+) pi+]CC",
+        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D0ToKsKmKp_LL_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D0ToKsKmKp_LL_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstpToD0Pip_D0ToKsKmKp_DD(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsKmKp_DD"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_DD"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- K+) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- K+) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- K+) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- K+) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^K+) pi+]CC",
+        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D0ToKsKmKp_DD_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D0ToKsKmKp_DD_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsKmKp_LL_LowBias(options, pvs, rec_summary):
+    name = "D0ToKsKmKp_LL_LowBias"
+    turbo_line = "Hlt2Charm_D0ToKsKmKp_LL_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- K+]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- K+]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- K+]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- K+]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- K+]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^K+]CC",
+    }
+
+    DTF_D0ToKsKmKp_LL_LB_MASS = DecayTreeFitter(
+        name='DTF_D0ToKsKmKp_LL_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmKp_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsKmKp_DD_LowBias(options, pvs, rec_summary):
+    name = "D0ToKsKmKp_DD_LowBias"
+    turbo_line = "Hlt2Charm_D0ToKsKmKp_DD_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- K+]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- K+]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- K+]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- K+]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- K+]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^K+]CC",
+    }
+
+    DTF_D0ToKsKmKp_DD_LB_MASS = DecayTreeFitter(
+        name='DTF_D0ToKsKmKp_DD_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmKp_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstpToD0Pip_D0ToKsPimPip_LL_NoBias(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsPimPip_LL_NoBias"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_LL_NoBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) pi- pi+) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) pi- pi+) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^pi- pi+) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- ^pi+) pi+]CC",
+        "pis" :   "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D02KSPiPi_LL_nobias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D02KSPiPi_LL_nobias_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0") + topo_sv_var,
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsKmKp_LL(options, pvs, rec_summary):
+    name = "D0ToKsKmKp_LL"
+    turbo_line = "Hlt2Charm_D0ToKsKmKp_LL"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- K+]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- K+]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- K+]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- K+]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- K+]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^K+]CC",
+    }
+
+    DTF_D0ToKsKmKp_LL_MASS = DecayTreeFitter(
+        name='DTF_D0ToKsKmKp_LL_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmKp_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsKmKp_DD(options, pvs, rec_summary):
+    name = "D0ToKsKmKp_DD"
+    turbo_line = "Hlt2Charm_D0ToKsKmKp_DD"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- K+]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- K+]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- K+]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- K+]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- K+]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^K+]CC",
+    }
+
+    DTF_D0ToKsKmKp_DD_MASS = DecayTreeFitter(
+        name='DTF_D0ToKsKmKp_DD_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmKp_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+# ########################################
diff --git a/Charm_2024validation/options/d0_to_kshh_MC.py b/Charm_2024validation/options/d0_to_kshh_MC.py
new file mode 100644
index 0000000000..9fa138f8ef
--- /dev/null
+++ b/Charm_2024validation/options/d0_to_kshh_MC.py
@@ -0,0 +1,44 @@
+from .tupling import (
+    make_MC_composite_variables,
+    make_MC_basic_variables,
+    make_MC_event_variables,
+)
+
+from PyConf.reading import get_mc_particles, get_mc_header
+from FunTuple import FunTuple_MCParticles as FuntupleMC
+
+def maketuple_MC_DstpToD0Pip_D0ToKsPimPip(options, pvs, rec_summary):
+    name = "MC_DstpToD0Pip_D0ToKsPimPip"
+    line = "/Event/MC/Particles"
+    
+    input_data = get_mc_particles(f"{line}")
+
+    branches = {
+       "Dst" : "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi- pi+) pi- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ ==> ^([D0]CC ==> (KS0 ==> pi- pi+) pi- pi+) pi+]CC",
+        "KS0"  : "[D*(2010)+ ==> ([D0]CC ==> ^(KS0 ==> pi- pi+) pi- pi+) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> ^pi- pi+) pi- pi+) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi- ^pi+) pi- pi+) pi+]CC",
+        "hm"   : "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi- pi+) ^pi- pi+) pi+]CC",
+        "hp"  :  "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi- pi+) pi- ^pi+) pi+]CC",
+        "pis" :  "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi- pi+) pi- pi+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_MC_composite_variables(),
+        "D0"    : make_MC_composite_variables(),
+        "KS0"    : make_MC_composite_variables(),
+        "KS0_pim"     : make_MC_basic_variables(),
+        "KS0_pip"     : make_MC_basic_variables(),
+        "hm"    : make_MC_basic_variables(),
+        "hp"    : make_MC_basic_variables(),
+        "pis"   : make_MC_basic_variables(),
+    }
+
+    mytuple  = FuntupleMC(name=name,
+                          tuple_name="MCDecayTree",
+                          fields=branches, variables = variables,  
+                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])), 
+                          inputs=input_data)
+
+    return [mytuple]
diff --git a/Charm_2024validation/options/d0_to_ksks.py b/Charm_2024validation/options/d0_to_ksks.py
new file mode 100644
index 0000000000..d47253aa14
--- /dev/null
+++ b/Charm_2024validation/options/d0_to_ksks.py
@@ -0,0 +1,1049 @@
+import Functors as F
+from Functors.math import log
+from DaVinci import Options, make_config
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from FunTuple import FunctorCollection
+from PyConf.reading import get_particles, get_pvs
+import FunTuple.functorcollections as FC
+from FunTuple import FunTuple_Particles as Funtuple
+from DecayTreeFitter import DecayTreeFitter
+
+from .tupling import (
+    make_basic_variables,
+    make_composite_variables,
+    make_hlt2_event_variables,
+    make_basic_dtf_variables,
+    make_composite_dtf_variables,
+    Hlt1_lines
+)
+
+# define helper functors
+get_SV =  F.ENDVERTEX @ F.FORWARDARG0
+get_SV_pos = F.TOLINALG @ F.POSITION @ get_SV
+# only if composite (i.e. has vertex)

+get_child_1 = F.CHILD(1, F.FORWARDARG0) # change here the index of the child.
+get_child_endvtx_pos_1 = F.ENDVERTEX_POS  @ get_child_1
+get_fdvec_child_1 = get_child_endvtx_pos_1 - get_SV_pos
+get_child_2 = F.CHILD(2, F.FORWARDARG0) # change here the index of the child.
+get_child_endvtx_pos_2 = F.ENDVERTEX_POS  @ get_child_2
+get_fdvec_child_2 = get_child_endvtx_pos_2 - get_SV_pos
+
+# define observables
+IP_wrt_SV_KS1 = F.IP.bind(get_SV_pos , get_child_1)
+IP_wrt_SV_KS2 = F.IP.bind(get_SV_pos , get_child_2)
+IPCHI2_wrt_SV_KS1 = F.IPCHI2.bind(get_SV , get_child_1)
+IPCHI2_wrt_SV_KS2 = F.IPCHI2.bind(get_SV , get_child_2)
+# only if child is composite (i.e. has vertex)
+FD_wrt_SV_KS1 = F.MAGNITUDE @ get_fdvec_child_1
+FD_wrt_SV_KS2 = F.MAGNITUDE @ get_fdvec_child_2
+FDCHI2_wrt_SV_KS1 = F.VTX_FDCHI2.bind(get_SV, get_child_1)
+FDCHI2_wrt_SV_KS2 = F.VTX_FDCHI2.bind(get_SV, get_child_2)
+# Note: Apply the functors to the head of the node of decay tree e.g. B
+# Functor collection for SV related info
+topo_sv_var = FunctorCollection(
+    {
+        "ORIVXIP_CHILD1": IP_wrt_SV_KS1,
+        "ORIVXIP_CHILD2": IP_wrt_SV_KS2,
+        "ORIVXIPCHI2_CHILD1": IPCHI2_wrt_SV_KS1,
+        "ORIVXIPCHI2_CHILD2": IPCHI2_wrt_SV_KS2,
+        "ORIVXFD_CHILD1": FD_wrt_SV_KS1,
+        "ORIVXFD_CHILD2": FD_wrt_SV_KS2,
+        "ORIVXFDCHI2_CHILD1": FDCHI2_wrt_SV_KS1,
+        "ORIVXFDCHI2_CHILD2": FDCHI2_wrt_SV_KS2,
+    }
+)
+
+############################# LLLL #############################
+def maketuple_Dst2D0pi_D02KSKS_LLLL(options, pvs, rec_summary):
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLL"
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+
+    fields = {
+        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
+        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
+        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
+    }
+
+    # DTF_LLLL = DecayTreeFitter(
+    #     name='DTF_LLLL',
+    #     input_particles=input_data)
+    #
+    # DTF_LLLL_PV = DecayTreeFitter(
+    #     name='DTF_LLLL_PV',
+    #     input_particles=input_data,
+    #     input_pvs=pvs)
+
+    DTF_LLLL_MASS = DecayTreeFitter(
+        name='DTF_LLLL_mass',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTF_LLLL_MASS_PV = DecayTreeFitter(
+        'DTF_LLLL_MASS_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL, pv_constraint=False, mass_constraint=False) +\
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_PV, pv_constraint=True, mass_constraint=False) +\
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL, pv_constraint=False, mass_constraint=False) +\
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_PV, pv_constraint=True, mass_constraint=False) +\
+
+    variables = {"pip1": basic_variables,
+                 "pim1": basic_variables,
+                 "pip2": basic_variables,
+                 "pim2": basic_variables,
+                 "KS1": composite_variables,
+                 "KS2": composite_variables,
+                 "D0": composite_variables + topo_sv_var,
+                 "Dst": composite_variables,
+                 "pi_soft": basic_variables,
+    }
+
+    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    mytuple = Funtuple(
+        "DstToD0PiToKS0KS0_LLLL",
+        "Tuple",
+        fields=fields,
+        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data, store_multiple_cand_info=True)
+
+    return [my_filter, mytuple]
+
+############################# LLLL Tight #############################
+def maketuple_Dst2D0pi_D02KSKS_LLLL_Tight(options, pvs, rec_summary):
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLL_Tight"
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+
+    fields = {
+        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
+        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
+        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
+    }
+
+    # DTF_LLLL_Tight = DecayTreeFitter(
+    #     name='DTF_LLLL_Tight',
+    #     input_particles=input_data)
+    #
+    # DTF_LLLL_Tight_PV = DecayTreeFitter(
+    #     name='DTF_LLLL_Tight_PV',
+    #     input_particles=input_data,
+    #     input_pvs=pvs)
+
+    DTF_LLLL_Tight_MASS = DecayTreeFitter(
+        name='DTF_LLLL_Tight_mass',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTF_LLLL_Tight_MASS_PV = DecayTreeFitter(
+        'DTF_LLLL_Tight_MASS_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_Tight, pv_constraint=False, mass_constraint=False) +\
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_Tight_PV, pv_constraint=True, mass_constraint=False) +\
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_Tight, pv_constraint=False, mass_constraint=False) +\
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_Tight_PV, pv_constraint=True, mass_constraint=False) +\
+
+    variables = {"pip1": basic_variables,
+                 "pim1": basic_variables,
+                 "pip2": basic_variables,
+                 "pim2": basic_variables,
+                 "KS1": composite_variables,
+                 "KS2": composite_variables,
+                 "D0": composite_variables + topo_sv_var,
+                 "Dst": composite_variables,
+                 "pi_soft": basic_variables,
+    }
+
+    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    mytuple = Funtuple(
+        "DstToD0PiToKS0KS0_LLLL_Tight",
+        "Tuple",
+        fields=fields,
+        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data, store_multiple_cand_info=True)
+
+    return [my_filter, mytuple]
+
+############################# LLDD #############################
+def maketuple_Dst2D0pi_D02KSKS_LLDD(options, pvs, rec_summary):
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLDD"
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+
+    fields = {
+        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
+        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
+        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
+    }
+
+    # DTF_LLDD = DecayTreeFitter(
+    #     name='DTF_LLDD',
+    #     input_particles=input_data)
+    #
+    # DTF_LLDD_PV = DecayTreeFitter(
+    #     name='DTF_LLDD_PV',
+    #     input_particles=input_data,
+    #     input_pvs=pvs)
+
+    DTF_LLDD_MASS = DecayTreeFitter(
+        name='DTF_LLDD_mass',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTF_LLDD_MASS_PV = DecayTreeFitter(
+        'DTF_LLDD_MASS_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLDD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLDD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLDD, pv_constraint=False, mass_constraint=False) +\
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLDD_PV, pv_constraint=True, mass_constraint=False) +\
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD, pv_constraint=False, mass_constraint=False) +\
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_PV, pv_constraint=True, mass_constraint=False) +\
+
+    variables = {"pip1": basic_variables,
+                 "pim1": basic_variables,
+                 "pip2": basic_variables,
+                 "pim2": basic_variables,
+                 "KS1": composite_variables,
+                 "KS2": composite_variables,
+                 "D0": composite_variables + topo_sv_var,
+                 "Dst": composite_variables,
+                 "pi_soft": basic_variables,
+    }
+
+    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    mytuple = Funtuple(
+        "DstToD0PiToKS0KS0_LLDD",
+        "Tuple",
+        fields=fields,
+        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data, store_multiple_cand_info=True)
+
+    return [my_filter, mytuple]
+
+############################# LLDD Tight #############################
+def maketuple_Dst2D0pi_D02KSKS_LLDD_Tight(options, pvs, rec_summary):
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLDD_Tight"
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+
+    fields = {
+        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
+        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
+        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
+    }
+
+    # DTF_LLDD_Tight = DecayTreeFitter(
+    #     name='DTF_LLDD_Tight',
+    #     input_particles=input_data)
+    #
+    # DTF_LLDD_Tight_PV = DecayTreeFitter(
+    #     name='DTF_LLDD_Tight_PV',
+    #     input_particles=input_data,
+    #     input_pvs=pvs)
+
+    DTF_LLDD_Tight_MASS = DecayTreeFitter(
+        name='DTF_LLDD_Tight_mass',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTF_LLDD_Tight_MASS_PV = DecayTreeFitter(
+        'DTF_LLDD_Tight_MASS_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False, DTF=DTF_LLDD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False, DTF=DTF_LLDD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLDD_Tight, pv_constraint=False, mass_constraint=False) +\
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLDD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_Tight, pv_constraint=False, mass_constraint=False) +\
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
+
+    variables = {"pip1": basic_variables,
+                 "pim1": basic_variables,
+                 "pip2": basic_variables,
+                 "pim2": basic_variables,
+                 "KS1": composite_variables,
+                 "KS2": composite_variables,
+                 "D0": composite_variables + topo_sv_var,
+                 "Dst": composite_variables,
+                 "pi_soft": basic_variables,
+    }
+
+    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    mytuple = Funtuple(
+        "DstToD0PiToKS0KS0_LLDD_Tight",
+        "Tuple",
+        fields=fields,
+        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data, store_multiple_cand_info=True)
+
+    return [my_filter, mytuple]
+
+############################# DDDD #############################
+def maketuple_Dst2D0pi_D02KSKS_DDDD(options, pvs, rec_summary):
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDDD"
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+
+    fields = {
+        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
+        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
+        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
+    }
+
+    # DTF_DDDD = DecayTreeFitter(
+    #     name='DTF_DDDD',
+    #     input_particles=input_data)
+    #
+    # DTF_DDDD_PV = DecayTreeFitter(
+    #     name='DTF_DDDD_PV',
+    #     input_particles=input_data,
+    #     input_pvs=pvs)
+
+    DTF_DDDD_MASS = DecayTreeFitter(
+        name='DTF_DDDD_mass',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTF_DDDD_MASS_PV = DecayTreeFitter(
+        'DTF_DDDD_MASS_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD, pv_constraint=False, mass_constraint=False) +\
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_PV, pv_constraint=True, mass_constraint=False) +\
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD, pv_constraint=False, mass_constraint=False) +\
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_PV, pv_constraint=True, mass_constraint=False) +\
+
+    variables = {"pip1": basic_variables,
+                 "pim1": basic_variables,
+                 "pip2": basic_variables,
+                 "pim2": basic_variables,
+                 "KS1": composite_variables,
+                 "KS2": composite_variables,
+                 "D0": composite_variables + topo_sv_var,
+                 "Dst": composite_variables,
+                 "pi_soft": basic_variables,
+    }
+
+    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    mytuple = Funtuple(
+        "DstToD0PiToKS0KS0_DDDD",
+        "Tuple",
+        fields=fields,
+        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data, store_multiple_cand_info=True)
+
+    return [my_filter, mytuple]
+
+############################# DDDD Tight #############################
+def maketuple_Dst2D0pi_D02KSKS_DDDD_Tight(options, pvs, rec_summary):
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDDD_Tight"
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+
+    fields = {
+        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
+        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
+        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
+    }
+
+    # DTF_DDDD_Tight = DecayTreeFitter(
+    #     name='DTF_DDDD_Tight',
+    #     input_particles=input_data)
+    #
+    # DTF_DDDD_Tight_PV = DecayTreeFitter(
+    #     name='DTF_DDDD_Tight_PV',
+    #     input_particles=input_data,
+    #     input_pvs=pvs)
+
+    DTF_DDDD_Tight_MASS = DecayTreeFitter(
+        name='DTF_DDDD_Tight_mass',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTF_DDDD_Tight_MASS_PV = DecayTreeFitter(
+        'DTF_DDDD_Tight_MASS_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_Tight, pv_constraint=False, mass_constraint=False) +\
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_Tight, pv_constraint=False, mass_constraint=False) +\
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
+
+    variables = {"pip1": basic_variables,
+                 "pim1": basic_variables,
+                 "pip2": basic_variables,
+                 "pim2": basic_variables,
+                 "KS1": composite_variables,
+                 "KS2": composite_variables,
+                 "D0": composite_variables + topo_sv_var,
+                 "Dst": composite_variables,
+                 "pi_soft": basic_variables,
+    }
+
+    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    mytuple = Funtuple(
+        "DstToD0PiToKS0KS0_DDDD_Tight",
+        "Tuple",
+        fields=fields,
+        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data, store_multiple_cand_info=True)
+
+    return [my_filter, mytuple]
+
+############################# ULLL #############################
+def maketuple_Dst2D0pi_D02KSKS_ULLL(options, pvs, rec_summary):
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULLL"
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+
+    fields = {
+        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
+        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
+        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
+    }
+
+    # DTF_ULLL = DecayTreeFitter(
+    #     name='DTF_ULLL',
+    #     input_particles=input_data)
+    #
+    # DTF_ULLL_PV = DecayTreeFitter(
+    #     name='DTF_ULLL_PV',
+    #     input_particles=input_data,
+    #     input_pvs=pvs)
+
+    DTF_ULLL_MASS = DecayTreeFitter(
+        name='DTF_ULLL_mass',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTF_ULLL_MASS_PV = DecayTreeFitter(
+        'DTF_ULLL_MASS_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL, pv_constraint=False, mass_constraint=False) +\
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_PV, pv_constraint=True, mass_constraint=False) +\
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL, pv_constraint=False, mass_constraint=False) +\
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_PV, pv_constraint=True, mass_constraint=False) +\
+
+    variables = {"pip1": basic_variables,
+                 "pim1": basic_variables,
+                 "pip2": basic_variables,
+                 "pim2": basic_variables,
+                 "KS1": composite_variables,
+                 "KS2": composite_variables,
+                 "D0": composite_variables + topo_sv_var,
+                 "Dst": composite_variables,
+                 "pi_soft": basic_variables,
+    }
+
+    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    mytuple = Funtuple(
+        "DstToD0PiToKS0KS0_ULLL",
+        "Tuple",
+        fields=fields,
+        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data, store_multiple_cand_info=True)
+
+    return [my_filter, mytuple]
+
+############################# ULLL Tight #############################
+def maketuple_Dst2D0pi_D02KSKS_ULLL_Tight(options, pvs, rec_summary):
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULLL_Tight"
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+
+    fields = {
+        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
+        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
+        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
+    }
+
+    # DTF_ULLL_Tight = DecayTreeFitter(
+    #     name='DTF_ULLL_Tight',
+    #     input_particles=input_data)
+    #
+    # DTF_ULLL_Tight_PV = DecayTreeFitter(
+    #     name='DTF_ULLL_Tight_PV',
+    #     input_particles=input_data,
+    #     input_pvs=pvs)
+
+    DTF_ULLL_Tight_MASS = DecayTreeFitter(
+        name='DTF_ULLL_Tight_mass',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTF_ULLL_Tight_MASS_PV = DecayTreeFitter(
+        'DTF_ULLL_Tight_MASS_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_Tight, pv_constraint=False, mass_constraint=False) +\
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_Tight_PV, pv_constraint=True, mass_constraint=False) +\
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_Tight, pv_constraint=False, mass_constraint=False) +\
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_Tight_PV, pv_constraint=True, mass_constraint=False) +\
+
+    variables = {"pip1": basic_variables,
+                 "pim1": basic_variables,
+                 "pip2": basic_variables,
+                 "pim2": basic_variables,
+                 "KS1": composite_variables,
+                 "KS2": composite_variables,
+                 "D0": composite_variables + topo_sv_var,
+                 "Dst": composite_variables,
+                 "pi_soft": basic_variables,
+    }
+
+    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    mytuple = Funtuple(
+        "DstToD0PiToKS0KS0_ULLL_Tight",
+        "Tuple",
+        fields=fields,
+        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data, store_multiple_cand_info=True)
+
+    return [my_filter, mytuple]
+
+############################# ULDD #############################
+def maketuple_Dst2D0pi_D02KSKS_ULDD(options, pvs, rec_summary):
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULDD"
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+
+    fields = {
+        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
+        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
+        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
+    }
+
+    # DTF_ULDD = DecayTreeFitter(
+    #     name='DTF_ULDD',
+    #     input_particles=input_data)
+    #
+    # DTF_ULDD_PV = DecayTreeFitter(
+    #     name='DTF_ULDD_PV',
+    #     input_particles=input_data,
+    #     input_pvs=pvs)
+
+    DTF_ULDD_MASS = DecayTreeFitter(
+        name='DTF_ULDD_mass',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTF_ULDD_MASS_PV = DecayTreeFitter(
+        'DTF_ULDD_MASS_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD, pv_constraint=False, mass_constraint=False) +\
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_PV, pv_constraint=True, mass_constraint=False) +\
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD, pv_constraint=False, mass_constraint=False) +\
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_PV, pv_constraint=True, mass_constraint=False) +\
+
+    variables = {"pip1": basic_variables,
+                 "pim1": basic_variables,
+                 "pip2": basic_variables,
+                 "pim2": basic_variables,
+                 "KS1": composite_variables,
+                 "KS2": composite_variables,
+                 "D0": composite_variables + topo_sv_var,
+                 "Dst": composite_variables,
+                 "pi_soft": basic_variables,
+    }
+
+    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    mytuple = Funtuple(
+        "DstToD0PiToKS0KS0_ULDD",
+        "Tuple",
+        fields=fields,
+        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data, store_multiple_cand_info=True)
+
+    return [my_filter, mytuple]
+
+############################# ULDD Tight #############################
+def maketuple_Dst2D0pi_D02KSKS_ULDD_Tight(options, pvs, rec_summary):
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULDD_Tight"
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+
+    fields = {
+        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
+        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
+        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
+    }
+
+    # DTF_ULDD_Tight = DecayTreeFitter(
+    #     name='DTF_ULDD_Tight',
+    #     input_particles=input_data)
+    #
+    # DTF_ULDD_Tight_PV = DecayTreeFitter(
+    #     name='DTF_ULDD_Tight_PV',
+    #     input_particles=input_data,
+    #     input_pvs=pvs)
+
+    DTF_ULDD_Tight_MASS = DecayTreeFitter(
+        name='DTF_ULDD_Tight_mass',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTF_ULDD_Tight_MASS_PV = DecayTreeFitter(
+        'DTF_ULDD_Tight_MASS_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_Tight, pv_constraint=False, mass_constraint=False) +\
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_Tight, pv_constraint=False, mass_constraint=False) +\
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
+
+    variables = {"pip1": basic_variables,
+                 "pim1": basic_variables,
+                 "pip2": basic_variables,
+                 "pim2": basic_variables,
+                 "KS1": composite_variables,
+                 "KS2": composite_variables,
+                 "D0": composite_variables + topo_sv_var,
+                 "Dst": composite_variables,
+                 "pi_soft": basic_variables,
+    }
+
+    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    mytuple = Funtuple(
+        "DstToD0PiToKS0KS0_ULDD_Tight",
+        "Tuple",
+        fields=fields,
+        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data, store_multiple_cand_info=True)
+
+    return [my_filter, mytuple]
+
+############################# LLLD #############################
+def maketuple_Dst2D0pi_D02KSKS_LLLD(options, pvs, rec_summary):
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLD"
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+
+    fields = {
+        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
+        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
+        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
+    }
+
+    # DTF_LLLD = DecayTreeFitter(
+    #     name='DTF_LLLD',
+    #     input_particles=input_data)
+    #
+    # DTF_LLLD_PV = DecayTreeFitter(
+    #     name='DTF_LLLD_PV',
+    #     input_particles=input_data,
+    #     input_pvs=pvs)
+
+    DTF_LLLD_MASS = DecayTreeFitter(
+        name='DTF_LLLD_mass',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTF_LLLD_MASS_PV = DecayTreeFitter(
+        'DTF_LLLD_MASS_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD, pv_constraint=False, mass_constraint=False) +\
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_PV, pv_constraint=True, mass_constraint=False) +\
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD, pv_constraint=False, mass_constraint=False) +\
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_PV, pv_constraint=True, mass_constraint=False) +\
+
+    variables = {"pip1": basic_variables,
+                 "pim1": basic_variables,
+                 "pip2": basic_variables,
+                 "pim2": basic_variables,
+                 "KS1": composite_variables,
+                 "KS2": composite_variables,
+                 "D0": composite_variables + topo_sv_var,
+                 "Dst": composite_variables,
+                 "pi_soft": basic_variables,
+    }
+
+    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    mytuple = Funtuple(
+        "DstToD0PiToKS0KS0_LLLD",
+        "Tuple",
+        fields=fields,
+        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data, store_multiple_cand_info=True)
+
+    return [my_filter, mytuple]
+
+############################# LLLD Tight #############################
+def maketuple_Dst2D0pi_D02KSKS_LLLD_Tight(options, pvs, rec_summary):
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLD_Tight"
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+
+    fields = {
+        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
+        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
+        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
+    }
+
+    # DTF_LLLD_Tight = DecayTreeFitter(
+    #     name='DTF_LLLD_Tight',
+    #     input_particles=input_data)
+    #
+    # DTF_LLLD_Tight_PV = DecayTreeFitter(
+    #     name='DTF_LLLD_Tight_PV',
+    #     input_particles=input_data,
+    #     input_pvs=pvs)
+
+    DTF_LLLD_Tight_MASS = DecayTreeFitter(
+        name='DTF_LLLD_Tight_mass',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTF_LLLD_Tight_MASS_PV = DecayTreeFitter(
+        'DTF_LLLD_Tight_MASS_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_Tight, pv_constraint=False, mass_constraint=False) +\
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_Tight, pv_constraint=False, mass_constraint=False) +\
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
+
+    variables = {"pip1": basic_variables,
+                 "pim1": basic_variables,
+                 "pip2": basic_variables,
+                 "pim2": basic_variables,
+                 "KS1": composite_variables,
+                 "KS2": composite_variables,
+                 "D0": composite_variables + topo_sv_var,
+                 "Dst": composite_variables,
+                 "pi_soft": basic_variables,
+    }
+
+    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    mytuple = Funtuple(
+        "DstToD0PiToKS0KS0_LLLD_Tight",
+        "Tuple",
+        fields=fields,
+        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data, store_multiple_cand_info=True)
+
+    return [my_filter, mytuple]
+
+############################# DDLD #############################
+def maketuple_Dst2D0pi_D02KSKS_DDLD(options, pvs, rec_summary):
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDLD"
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+
+    fields = {
+        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
+        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
+        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
+    }
+
+    # DTF_DDLD = DecayTreeFitter(
+    #     name='DTF_DDLD',
+    #     input_particles=input_data)
+    #
+    # DTF_DDLD_PV = DecayTreeFitter(
+    #     name='DTF_DDLD_PV',
+    #     input_particles=input_data,
+    #     input_pvs=pvs)
+
+    DTF_DDLD_MASS = DecayTreeFitter(
+        name='DTF_DDLD_mass',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTF_DDLD_MASS_PV = DecayTreeFitter(
+        'DTF_DDLD_MASS_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD, pv_constraint=False, mass_constraint=False) +\
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_PV, pv_constraint=True, mass_constraint=False) +\
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD, pv_constraint=False, mass_constraint=False) +\
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_PV, pv_constraint=True, mass_constraint=False) +\
+
+    variables = {"pip1": basic_variables,
+                 "pim1": basic_variables,
+                 "pip2": basic_variables,
+                 "pim2": basic_variables,
+                 "KS1": composite_variables,
+                 "KS2": composite_variables,
+                 "D0": composite_variables + topo_sv_var,
+                 "Dst": composite_variables,
+                 "pi_soft": basic_variables,
+    }
+
+    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    mytuple = Funtuple(
+        "DstToD0PiToKS0KS0_DDLD",
+        "Tuple",
+        fields=fields,
+        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data, store_multiple_cand_info=True)
+
+    return [my_filter, mytuple]
+
+############################# DDLD Tight #############################
+def maketuple_Dst2D0pi_D02KSKS_DDLD_Tight(options, pvs, rec_summary):
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDLD_Tight"
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+
+    fields = {
+        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
+        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
+        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
+    }
+
+    # DTF_DDLD_Tight = DecayTreeFitter(
+    #     name='DTF_DDLD_Tight',
+    #     input_particles=input_data)
+    #
+    # DTF_DDLD_Tight_PV = DecayTreeFitter(
+    #     name='DTF_DDLD_Tight_PV',
+    #     input_particles=input_data,
+    #     input_pvs=pvs)
+
+    DTF_DDLD_Tight_MASS = DecayTreeFitter(
+        name='DTF_DDLD_Tight_mass',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTF_DDLD_Tight_MASS_PV = DecayTreeFitter(
+        'DTF_DDLD_Tight_MASS_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_Tight, pv_constraint=False, mass_constraint=False) +\
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_Tight, pv_constraint=False, mass_constraint=False) +\
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
+
+    variables = {"pip1": basic_variables,
+                 "pim1": basic_variables,
+                 "pip2": basic_variables,
+                 "pim2": basic_variables,
+                 "KS1": composite_variables,
+                 "KS2": composite_variables,
+                 "D0": composite_variables + topo_sv_var,
+                 "Dst": composite_variables,
+                 "pi_soft": basic_variables,
+    }
+
+    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    mytuple = Funtuple(
+        "DstToD0PiToKS0KS0_DDLD_Tight",
+        "Tuple",
+        fields=fields,
+        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data, store_multiple_cand_info=True)
+
+    return [my_filter, mytuple]
diff --git a/Charm_2024validation/options/d0_to_ksks_MC.py b/Charm_2024validation/options/d0_to_ksks_MC.py
new file mode 100644
index 0000000000..06c1ac6139
--- /dev/null
+++ b/Charm_2024validation/options/d0_to_ksks_MC.py
@@ -0,0 +1,46 @@
+from .tupling import (
+    make_MC_composite_variables,
+    make_MC_basic_variables,
+    make_MC_event_variables,
+)
+
+from PyConf.reading import get_mc_particles, get_mc_header
+from FunTuple import FunTuple_MCParticles as FuntupleMC
+
+############################# LLLL #############################
+def maketuple_MC_Dst2D0pi_D02KSKS_LLLL(options, pvs, rec_summary):
+    name = "MC_DstpToD0Pip_D0ToKsKs_LLLL"
+    line = "/Event/MC/Particles"
+
+    input_data = get_mc_particles(f"{line}")
+
+    fields = {
+        "Dst": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi+ pi-) (KS0 ==> pi+ pi-) ) pi+]CC",
+        "D0": "[D*(2010)+ ==> ^([D0]CC ==> (KS0 ==> pi+ pi-) (KS0 ==> pi+ pi-) ) pi+]CC",
+        "KS1": "[D*(2010)+ ==> ([D0]CC ==> ^(KS0 ==> pi+ pi-) (KS0 ==> pi+ pi-) ) pi+]CC",
+        "KS2": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi+ pi-) ^(KS0 ==> pi+ pi-) ) pi+]CC",
+        "pip1": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> ^pi+ pi-) (KS0 ==> pi+ pi-) ) pi+]CC",
+        "pim1": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi+ ^pi-) (KS0 ==> pi+ pi-) ) pi+]CC",
+        "pip2": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi+ pi-) (KS0 ==> ^pi+ pi-) ) pi+]CC",
+        "pim2": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi+ pi-) (KS0 ==> pi+ ^pi-) ) pi+]CC",
+        "pi_soft": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi+ pi-) (KS0 ==> pi+ pi-) ) ^pi+]CC",
+    }
+
+    variables = {"pip1":  make_MC_basic_variables(),
+                 "pim1":  make_MC_basic_variables(),
+                 "pip2":  make_MC_basic_variables(),
+                 "pim2":  make_MC_basic_variables(),
+                 "KS1": make_MC_composite_variables(),
+                 "KS2": make_MC_composite_variables(),
+                 "D0": make_MC_composite_variables(),
+                 "Dst": make_MC_composite_variables(),
+                 "pi_soft":  make_MC_basic_variables(),
+    }
+
+    mytuple  = FuntupleMC(name=name,
+                          tuple_name="MCDecayTree",
+                          fields=fields, variables = variables,
+                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
+                          inputs=input_data)
+
+    return [mytuple]
diff --git a/Charm_2024validation/options/d_to_hhh.py b/Charm_2024validation/options/d_to_hhh.py
new file mode 100644
index 0000000000..d10fa039f6
--- /dev/null
+++ b/Charm_2024validation/options/d_to_hhh.py
@@ -0,0 +1,503 @@
+from .tupling import (
+    make_composite_variables_3body,
+    make_b_composite_variables,
+    make_composite_variables,
+    make_basic_variables,
+    make_hlt2_event_variables,
+    make_composite_dtf_variables_3body,
+    make_basic_dtf_variables,
+)
+
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from FunTuple import FunTuple_Particles as Funtuple
+
+
+def make_dtf_variables(options, pvs, input_data, ptype):
+
+    if ptype not in ["basic", "composite"]:
+        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
+
+    from DecayTreeFitter import DecayTreeFitter
+    
+    DTF = DecayTreeFitter(
+        name=f'DTF_{{hash}}',
+        input_particles=input_data)
+
+    DTFvtx = DecayTreeFitter(
+        name=f'DTFvtx_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    DTFmassDp = DecayTreeFitter(
+        name=f'DTFmassDp_{{hash}}',
+        input_particles=input_data,
+        mass_constraints=["D+"])
+
+    DTFvtxmassDp = DecayTreeFitter(
+        name=f'DTFvtxmassDp_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D+"])
+
+    DTFmassDsp = DecayTreeFitter(
+        name=f'DTFmassDsp_{{hash}}',
+        input_particles=input_data,
+        substitutions = ['D+{{D_s+}}'],
+        mass_constraints=["D_s+"])
+
+    DTFvtxmassDsp = DecayTreeFitter(
+        name=f'DTFvtxmassDsp_{{hash}}',
+        input_particles=input_data,
+        substitutions = ['D+{{D_s+}}',"KS0{{KS0}}"],#trick
+        mass_constraints=["D_s+"],
+        input_pvs=pvs,
+    )
+
+    if ptype == "basic":
+        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassDp,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="Dp")
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassDp,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="Dp")
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassDsp,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="Dsp")
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassDsp,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="Dsp")
+        return dtf_vars
+
+    if ptype == "composite":
+        dtf_vars = make_composite_dtf_variables_3body(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
+                                             DTF=DTFmassDp,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="Dp")
+        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
+                                             DTF=DTFvtxmassDp,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="Dp")
+        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
+                                             DTF=DTFmassDsp,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="Dsp")
+        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
+                                             DTF=DTFvtxmassDsp,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="Dsp")
+        return dtf_vars
+
+
+def maketuple_D2Kpipi(options, pvs, rec_summary, _NoCuts=False):
+    name = "D2Kpipi"
+    turbo_line = "Hlt2Charm_DpDspToKmPipPip"
+    if _NoCuts == True:
+        turbo_line += "_NoCuts"
+        name += "_NoCuts"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> K- pi+ pi+]CC",
+        "Km"   : "[D+ -> ^K- pi+ pi+]CC",
+        "pip1"  : "[D+ -> K- ^pi+ pi+]CC",
+        "pip2" : "[D+ -> K- pi+ ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2pipipi(options, pvs, rec_summary, _NoCuts=False):
+    name = "D2pipipi"
+    turbo_line = "Hlt2Charm_DpDspToPimPipPip"
+    if _NoCuts == True:
+        turbo_line += "_NoCuts"
+        name += "_NoCuts"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> pi- pi+ pi+]CC",
+        "pim"   : "[D+ -> ^pi- pi+ pi+]CC",
+        "pip1"  : "[D+ -> pi- ^pi+ pi+]CC",
+        "pip2" : "[D+ -> pi- pi+ ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Ds2KKpi(options, pvs, rec_summary, _NoCuts=False):
+    name = "Ds2KKpi"
+    turbo_line = "Hlt2Charm_DpDspToKmKpPip"
+    if _NoCuts == True:
+        turbo_line += "_NoCuts"
+        name += "_NoCuts"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> K- K+ pi+]CC",
+        "Km"   : "[D+ -> ^K- K+ pi+]CC",
+        "Kp"  : "[D+ -> K- ^K+ pi+]CC",
+        "pip" : "[D+ -> K- K+ ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+    
+    return [myfilter, mytuple]
+
+def maketuple_D2Kpipi_Kpi(options, pvs, rec_summary):
+    name = "D2Kpipi_Kpi"
+    turbo_line = "Hlt2Charm_DpDspToKmPipPip"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> (KS0 -> K- pi+) pi+]CC",
+        "Kst" : "[D+ -> ^(KS0 -> K- pi+) pi+]CC",
+        "Km"   : "[D+ -> (KS0 -> ^K- pi+) pi+]CC",
+        "pip"  : "[D+ -> (KS0 -> K- ^pi+) pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data),
+        "Kst"   : make_composite_variables(options, pvs, input_data),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, use_loki_decay_finder=True)
+
+    return [myfilter, mytuple]
+
+
+
+
+    '''
+    from PyConf.Algorithms import ThOrParticleSelection
+    import Functors as F
+    FILTER_TREE = lambda id: F.FILTER(F.IS_ABS_ID(id)) @ F.GET_ALL_DESCENDANTS()
+    Km_data = ThOrParticleSelection(
+    InputParticles=input_data, Functor=FILTER_TREE("[K-]CC")
+).OutputSelection
+    pip_data = ThOrParticleSelection(
+        InputParticles=input_data, Functor=FILTER_TREE("[pi+]CC")
+).OutputSelection
+    
+    
+    from PyConf.Algorithms import ChargedBasicsProducer, UniqueIDGeneratorAlg
+    from PyConf.Algorithms import ThOrCombiner__2ChargedBasics, ThOrCombiner__2Particle
+    # make unique_id_generator
+    unique_id_gen = UniqueIDGeneratorAlg()
+    '''
+    '''
+    # produce charged basic particles
+    produce_kaons = ChargedBasicsProducer(
+        InputUniqueIDGenerator=unique_id_gen, ParticleID="kaon")
+    produce_pions = ChargedBasicsProducer(
+        InputUniqueIDGenerator=unique_id_gen, ParticleID="pion")
+    produce_jpsi = ThOrCombiner__2ChargedBasics(
+    '''
+    '''
+    produce_jpsi = ThOrCombiner__2Particle(
+        InputUniqueIDGenerator=unique_id_gen,
+        DecayDescriptor="[J/psi(1S) -> K- pi+]cc",
+        #Input1=produce_kaons.Particles,
+        #Input2=produce_pions.Particles,
+        Input1=Km_data,
+        Input2=pip_data,
+    )
+    input_data = produce_jpsi.Output
+
+    branches = {
+        "Jpsi" : "[J/psi(1S) -> K- pi+]CC",
+    }
+
+    from FunTuple import FunctorCollection
+    import Functors as F
+    variables = {
+        #"Dp"   : make_composite_variables(options, pvs, input_data, False, False),
+        #"Jpsi"   : make_composite_variables(options, pvs, input_data, False, False),
+        "Jpsi"   : FunctorCollection({
+            "PX": F.PX,
+            "PY": F.PY,
+            "PZ": F.PZ,
+            "BPVDIRA": F.BPVDIRA(pvs),
+            "VCHI2DOF": F.CHI2DOF, #CHI2VXNDOF
+            "BPVIPCHI2": F.BPVIPCHI2(pvs),
+            "BPVIP": F.BPVIP(pvs),
+        }),
+        
+    }
+
+    from FunTuple import FunTuple_Composites as Funtuple
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables, inputs=input_data, store_multiple_cand_info=True)
+    ## add event_variables
+
+    
+    return [myfilter, mytuple]
+    '''
+    '''
+    from PyConf.control_flow import CompositeNode, NodeLogic
+    from PyConf.Algorithms import PrintDecayTree, PrintHeader
+    from RecoConf.reconstruction_objects import upfront_reconstruction
+    from DaVinci.common_particles import make_std_loose_jpsi2mum
+    jpsis = make_std_loose_jpsi2mumu()
+    pdt = PrintDecayTree(name="PrintJpsis", Input=jpsis)
+    algs = upfront_reconstruction() + [jpsis, pdt]
+
+    node = CompositeNode(
+    "PrintJpsiNode", children=algs, combine_logic=NodeLogic.NONLAZY_AND
+)
+    return [node]
+    
+    '''
+
+
+def maketuple_D2pipiK(options, pvs, rec_summary, _NoCuts=False):
+    name = "D2pipiK"
+    turbo_line = "Hlt2Charm_DpDspToKpPimPip"
+    if _NoCuts == True:
+        turbo_line += "_NoCuts"
+        name += "_NoCuts"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> pi- pi+ K+]CC",
+        "p1"   : "[D+ -> ^pi- pi+ K+]CC",
+        "p2"  : "[D+ -> pi- ^pi+ K+]CC",
+        "p3" : "[D+ -> pi- pi+ ^K+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
+        "p1"     : make_basic_variables(options, pvs, input_data),
+        "p2"    : make_basic_variables(options, pvs, input_data),
+        "p3"   : make_basic_variables(options, pvs, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2KKK(options, pvs, rec_summary, _NoCuts=False):
+    name = "D2KKK"
+    turbo_line = "Hlt2Charm_DpDspToKmKpKp"
+    if _NoCuts == True:
+        turbo_line += "_NoCuts"
+        name += "_NoCuts"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> K- K+ K+]CC",
+        "p1"   : "[D+ -> ^K- K+ K+]CC",
+        "p2"  : "[D+ -> K- ^K+ K+]CC",
+        "p3" : "[D+ -> K- K+ ^K+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
+        "p1"     : make_basic_variables(options, pvs, input_data),
+        "p2"    : make_basic_variables(options, pvs, input_data),
+        "p3"   : make_basic_variables(options, pvs, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2piKK(options, pvs, rec_summary, _NoCuts=False):
+    name = "D2piKK"
+    turbo_line = "Hlt2Charm_DpDspToKpKpPim"
+    if _NoCuts == True:
+        turbo_line += "_NoCuts"
+        name += "_NoCuts"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> pi- K+ K+]CC",
+        "p1"   : "[D+ -> ^pi- K+ K+]CC",
+        "p2"  : "[D+ -> pi- ^K+ K+]CC",
+        "p3" : "[D+ -> pi- K+ ^K+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
+        "p1"     : make_basic_variables(options, pvs, input_data),
+        "p2"    : make_basic_variables(options, pvs, input_data),
+        "p3"   : make_basic_variables(options, pvs, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+def maketuple_B02Dpi_D2KKpi(options, pvs, rec_summary):
+    name = "B02Dpi_D2KKpi"
+    turbo_line = "Hlt2Charm_B0ToDmPip_DmToKmKpPim"
+    
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+    
+    branches = {
+        "B0" : "[[B0]CC -> (D- -> K- K+ pi-) pi+]CC",
+        "pip" : "[[B0]CC -> (D- -> K- K+ pi-) ^pi+]CC",
+        "Dm" : "[[B0]CC -> ^(D- -> K- K+ pi-) pi+]CC",
+        "p1" : "[[B0]CC -> (D- -> ^K- K+ pi-) pi+]CC",
+        "p2" : "[[B0]CC -> (D- -> K- ^K+ pi-) pi+]CC",
+        "p3" : "[[B0]CC -> (D- -> K- K+ ^pi-) pi+]CC",
+    }
+    
+    variables = {
+        "B0" : make_b_composite_variables(options, pvs, input_data),
+        "pip" : make_basic_variables(options, pvs,input_data),
+        "Dm"   : make_composite_variables_3body(options, pvs, input_data),
+        "p1"     : make_basic_variables(options, pvs, input_data),
+        "p2"    : make_basic_variables(options, pvs, input_data),
+        "p3"   : make_basic_variables(options, pvs, input_data),        
+    }
+    
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+def maketuple_B02Dpi_D2pipipi(options, pvs, rec_summary, _NoCuts=False):    
+    name = "B02Dpi_D2pipipi"
+    turbo_line = "Hlt2Charm_B0ToDmPip_DmToPimPimPip"
+    
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+    
+    branches = {
+        "B0" : "[[B0]CC -> (D- -> pi- pi- pi+) pi+]CC",
+        "pip" : "[[B0]CC -> (D- -> pi- pi- pi+) ^pi+]CC",
+        "Dm" : "[[B0]CC -> ^(D- -> pi- pi- pi+) pi+]CC",
+        "p1" : "[[B0]CC -> (D- -> ^pi- pi- pi+) pi+]CC",
+        "p2" : "[[B0]CC -> (D- -> pi- ^pi- pi+) pi+]CC",
+        "p3" : "[[B0]CC -> (D- -> pi- pi- ^pi+) pi+]CC",
+    }
+    
+    variables = {
+        "B0" : make_b_composite_variables(options, pvs, input_data),
+        "pip" : make_basic_variables(options, pvs,input_data),
+        "Dm"   : make_composite_variables_3body(options, pvs, input_data),
+        "p1"     : make_basic_variables(options, pvs, input_data),
+        "p2"    : make_basic_variables(options, pvs, input_data),
+        "p3"   : make_basic_variables(options, pvs, input_data),        
+    }
+    
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+    
+def maketuple_Bs02Dspi_Ds2KKpi(options, pvs, rec_summary, _NoCuts=False):    
+    name = "Bs02Dspi_Ds2KKpi"
+    turbo_line = "Hlt2Charm_Bs0ToDsmPip_DsmToKmKpPim"
+    
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+    
+    branches = {
+        "Bs0" : "[[B_s0]CC -> (D_s- -> K- K+ pi-) pi+]CC",
+        "pip" : "[[B_s0]CC -> (D_s- -> K- K+ pi-) ^pi+]CC",
+        "Dsm" : "[[B_s0]CC -> ^(D_s- -> K- K+ pi-) pi+]CC",
+        "p1" : "[[B_s0]CC -> (D_s- -> ^K- K+ pi-) pi+]CC",
+        "p2" : "[[B_s0]CC -> (D_s- -> K- ^K+ pi-) pi+]CC",
+        "p3" : "[[B_s0]CC -> (D_s- -> K- K+ ^pi-) pi+]CC",
+    }
+    
+    variables = {
+        "Bs0" : make_b_composite_variables(options, pvs, input_data),
+        "pip" : make_basic_variables(options, pvs,input_data),
+        "Dsm"   : make_composite_variables_3body(options, pvs, input_data),
+        "p1"     : make_basic_variables(options, pvs, input_data),
+        "p2"    : make_basic_variables(options, pvs, input_data),
+        "p3"   : make_basic_variables(options, pvs, input_data),        
+    }
+    
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+    
+def maketuple_Bs02Dspi_Ds2pipipi(options, pvs, rec_summary, _NoCuts=False):
+    name = "Bs02Dspi_Ds2pipipi"
+    turbo_line = "Hlt2Charm_Bs0ToDsmPip_DsmToPimPimPip"
+    
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+    
+    branches = {
+        "Bs0" : "[[B_s0]CC -> (D_s- -> pi- pi- pi+) pi+]CC",
+        "pip" : "[[B_s0]CC -> (D_s- -> pi- pi- pi+) ^pi+]CC",
+        "Dsm" : "[[B_s0]CC -> ^(D_s- -> pi- pi- pi+) pi+]CC",
+        "p1" : "[[B_s0]CC -> (D_s- -> ^pi- pi- pi+) pi+]CC",
+        "p2" : "[[B_s0]CC -> (D_s- -> pi- ^pi- pi+) pi+]CC",
+        "p3" : "[[B_s0]CC -> (D_s- -> pi- pi- ^pi+) pi+]CC",
+    }
+    
+    variables = {
+        "Bs0" : make_b_composite_variables(options, pvs, input_data),
+        "pip" : make_basic_variables(options, pvs,input_data),
+        "Dsm"   : make_composite_variables_3body(options, pvs, input_data),
+        "p1"     : make_basic_variables(options, pvs, input_data),
+        "p2"    : make_basic_variables(options, pvs, input_data),
+        "p3"   : make_basic_variables(options, pvs, input_data),        
+    }
+    
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
diff --git a/Charm_2024validation/options/d_to_hhh_MC.py b/Charm_2024validation/options/d_to_hhh_MC.py
new file mode 100644
index 0000000000..e666e5f3ce
--- /dev/null
+++ b/Charm_2024validation/options/d_to_hhh_MC.py
@@ -0,0 +1,92 @@
+from .tupling import (
+    make_MC_composite_variables,
+    make_MC_basic_variables,
+    make_MC_event_variables,
+)
+
+from PyConf.reading import get_mc_particles, get_mc_header
+from FunTuple import FunTuple_MCParticles as FuntupleMC
+
+def maketuple_MC_D2Kpipi(options, pvs, rec_summary):
+    name = "MC_D2Kpipi"
+    line = "/Event/MC/Particles"
+
+    input_data = get_mc_particles(f"{line}")
+
+    branches = {
+        "Dp" : "[D+ ==> K- pi+ pi+]CC",
+        "Km"   : "[D+ ==> ^K- pi+ pi+]CC",
+        "pip1"  : "[D+ ==> K- ^pi+ pi+]CC",
+        "pip2" : "[D+ ==> K- pi+ ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_MC_composite_variables(),
+        "Km"     : make_MC_basic_variables(),
+        "pip1"    : make_MC_basic_variables(),
+        "pip2"   : make_MC_basic_variables(),
+    }
+
+    mytuple  = FuntupleMC(name=name,
+                          tuple_name="MCDecayTree",
+                          fields=branches, variables = variables,
+                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
+                          inputs=input_data)
+
+    return [mytuple]
+
+def maketuple_MC_Ds2KKpi(options, pvs, rec_summary):
+    name = "MC_Ds2KKpi"
+    line = "/Event/MC/Particles"
+
+    input_data = get_mc_particles(f"{line}")
+
+    branches = {
+        "Dp" : "[D_s+ ==> K- K+ pi+]CC",
+        "Km"   : "[D_s+ ==> ^K- K+ pi+]CC",
+        "Kp"  : "[D_s+ ==> K- ^K+ pi+]CC",
+        "pip" : "[D_s+ ==> K- K+ ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_MC_composite_variables(),
+        "Km"     : make_MC_basic_variables(),
+        "Kp"    : make_MC_basic_variables(),
+        "pip"   : make_MC_basic_variables(),
+    }
+
+    mytuple  = FuntupleMC(name=name,
+                          tuple_name="MCDecayTree",
+                          fields=branches, variables = variables,
+                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
+                          inputs=input_data)
+
+    return [mytuple]
+
+def maketuple_MC_Ds2KKK(options, pvs, rec_summary):
+    name = "MC_Ds2KKK"
+    line = "/Event/MC/Particles"
+
+    input_data = get_mc_particles(f"{line}")
+
+    branches = {
+        "Dp" : "[D_s+ ==> K- K+ K+]CC",
+        "Km"   : "[D_s+ ==> ^K- K+ K+]CC",
+        "Kp1"  : "[D_s+ ==> K- ^K+ K+]CC",
+        "Kp2" : "[D_s+ ==> K- K+ ^K+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_MC_composite_variables(),
+        "Km"     : make_MC_basic_variables(),
+        "Kp1"    : make_MC_basic_variables(),
+        "Kp2"   : make_MC_basic_variables(),
+    }
+
+    mytuple  = FuntupleMC(name=name,
+                          tuple_name="MCDecayTree",
+                          fields=branches, variables = variables,
+                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
+                          inputs=input_data)
+
+    return [mytuple]
diff --git a/Charm_2024validation/options/d_to_ksh.py b/Charm_2024validation/options/d_to_ksh.py
new file mode 100644
index 0000000000..df40aee746
--- /dev/null
+++ b/Charm_2024validation/options/d_to_ksh.py
@@ -0,0 +1,313 @@
+from .tupling import (
+    make_composite_variables,
+    make_basic_variables,
+    make_hlt2_event_variables,
+    make_composite_dtf_variables,
+    make_basic_dtf_variables,
+)
+
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from FunTuple import FunTuple_Particles as Funtuple
+
+
+def make_dtf_variables(options, pvs, input_data, ptype, islong=False):
+
+    if ptype not in ["basic", "composite"]:
+        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
+
+    from DecayTreeFitter import DecayTreeFitter
+    
+    DTF = DecayTreeFitter(
+        name=f'DTF_{{hash}}',
+        input_particles=input_data)
+
+    DTFvtx = DecayTreeFitter(
+        name=f'DTFvtx_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    DTFmassKS = DecayTreeFitter(
+        name=f'DTFmassKS_{{hash}}',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTFvtxmassKS = DecayTreeFitter(
+        name=f'DTFvtxmassKS_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    DTFmassDpKS = DecayTreeFitter(
+        name=f'DTFmassDpKS_{{hash}}',
+        input_particles=input_data,
+        mass_constraints=["D+","KS0"])
+
+    DTFvtxmassDpKS = DecayTreeFitter(
+        name=f'DTFvtxmassDpKS_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D+","KS0"])
+
+    DTFmassDspKS = DecayTreeFitter(
+        name=f'DTFmassDspKS_{{hash}}',
+        input_particles=input_data,
+        substitutions = ['D+{{D_s+}}'],
+        mass_constraints=["D_s+","KS0"])
+
+    DTFvtxmassDspKS = DecayTreeFitter(
+        name=f'DTFvtxmassDspKS_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs,
+        substitutions = ['D+{{D_s+}}',"KS0{{KS0}}"],#trick
+        mass_constraints=["D_s+","KS0"],
+    )
+
+
+    if ptype == "basic":
+        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False,
+                                            islong=islong)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False,
+                                            islong=islong)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassKS,
+                                             pv_constraint=False,
+                                             mass_constraint=True, 
+                                             particle_name="KS",
+                                             islong=islong)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassKS,
+                                             pv_constraint=True,
+                                             mass_constraint=True, 
+                                             particle_name="KS",
+                                             islong=islong)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassDpKS,
+                                             pv_constraint=False,
+                                             mass_constraint=True, 
+                                             particle_name="DpKS",
+                                             islong=islong)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassDpKS,
+                                             pv_constraint=True,
+                                             mass_constraint=True, 
+                                             particle_name="DpKS",
+                                             islong=islong)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassDspKS,
+                                             pv_constraint=False,
+                                             mass_constraint=True, 
+                                             particle_name="DspKS",
+                                             islong=islong)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassDspKS,
+                                             pv_constraint=True,
+                                             mass_constraint=True, 
+                                             particle_name="DspKS",
+                                             islong=islong)
+        return dtf_vars
+
+    if ptype == "composite":
+        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassKS,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="KS")
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassKS,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="KS")
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassDpKS,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="DpKS")
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassDpKS,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="DpKS")
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassDspKS,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="DspKS")
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassDspKS,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="DspKS")
+        return dtf_vars
+
+
+def maketuple_D2KSK_DD(options, pvs, rec_summary):
+    name = "D2KSK_DD"
+    turbo_line = "Hlt2Charm_DpDspToKsKp_DD"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> (KS0 -> pi- pi+) K+]CC",
+        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) K+]CC",
+        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) K+]CC",
+        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) K+]CC",
+        "hp" : "[D+ -> (KS0 -> pi- pi+) ^K+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "hp"   : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2KSK_LD(options, pvs, rec_summary):
+    name = "D2KSK_LD"
+    turbo_line = "Hlt2Charm_DpDspToKsKp_LD"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> (KS0 -> pi- pi+) K+]CC",
+        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) K+]CC",
+        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) K+]CC",
+        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) K+]CC",
+        "hp" : "[D+ -> (KS0 -> pi- pi+) ^K+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "hp"   : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_D2KSK_LL(options, pvs, rec_summary):
+    name = "D2KSK_LL"
+    turbo_line = "Hlt2Charm_DpDspToKsKp_LL"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> (KS0 -> pi- pi+) K+]CC",
+        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) K+]CC",
+        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) K+]CC",
+        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) K+]CC",
+        "hp" : "[D+ -> (KS0 -> pi- pi+) ^K+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "hp"   : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2KSpi_DD(options, pvs, rec_summary):
+    name = "D2KSpi_DD"
+    turbo_line = "Hlt2Charm_DpDspToKsPip_DD"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> (KS0 -> pi- pi+) pi+]CC",
+        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) pi+]CC",
+        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) pi+]CC",
+        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) pi+]CC",
+        "hp" : "[D+ -> (KS0 -> pi- pi+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "hp"   : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2KSpi_LD(options, pvs, rec_summary):
+    name = "D2KSpi_LD"
+    turbo_line = "Hlt2Charm_DpDspToKsPip_LD"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> (KS0 -> pi- pi+) pi+]CC",
+        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) pi+]CC",
+        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) pi+]CC",
+        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) pi+]CC",
+        "hp" : "[D+ -> (KS0 -> pi- pi+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "hp"   : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2KSpi_LL(options, pvs, rec_summary):
+    name = "D2KSpi_LL"
+    turbo_line = "Hlt2Charm_DpDspToKsPip_LL"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> (KS0 -> pi- pi+) pi+]CC",
+        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) pi+]CC",
+        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) pi+]CC",
+        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) pi+]CC",
+        "hp" : "[D+ -> (KS0 -> pi- pi+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "hp"   : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
diff --git a/Charm_2024validation/options/d_to_ksh_MC.py b/Charm_2024validation/options/d_to_ksh_MC.py
new file mode 100644
index 0000000000..38a2197998
--- /dev/null
+++ b/Charm_2024validation/options/d_to_ksh_MC.py
@@ -0,0 +1,68 @@
+from .tupling import (
+    make_MC_composite_variables,
+    make_MC_basic_variables,
+    make_MC_event_variables,
+)
+
+from PyConf.reading import get_mc_particles, get_mc_header
+from FunTuple import FunTuple_MCParticles as FuntupleMC
+
+def maketuple_MC_D2KSK(options, pvs, rec_summary):
+    name = "MC_D2KSK"
+    line = "/Event/MC/Particles"
+
+    input_data = get_mc_particles(f"{line}")
+
+    branches = {
+        "Dp" : "[D_s+ ==> (KS0 ==> pi- pi+) K+]CC",
+        "KS0"  : "[D_s+ ==> ^(KS0 ==> pi- pi+) K+]CC",
+        "pim"   : "[D_s+ ==> (KS0 ==> ^pi- pi+) K+]CC",
+        "pip"  : "[D_s+ ==> (KS0 ==> pi- ^pi+) K+]CC",
+        "hp" : "[D_s+ ==> (KS0 ==> pi- pi+) ^K+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_MC_composite_variables(),
+        "KS0"    : make_MC_composite_variables(),
+        "pim"     : make_MC_basic_variables(),
+        "pip"    : make_MC_basic_variables(),
+        "hp"   : make_MC_basic_variables(),
+    }
+
+    mytuple  = FuntupleMC(name=name,
+                        tuple_name="MCDecayTree",
+                        fields=branches, variables = variables,
+                        event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
+                        inputs=input_data)
+
+    return [mytuple]
+
+def maketuple_MC_D2KSpi(options, pvs, rec_summary):
+    name = "MC_D2KSpi"
+    line = "/Event/MC/Particles"
+
+    input_data = get_mc_particles(f"{line}")
+
+    branches = {
+        "Dp" : "[D+ ==> (KS0 ==> pi- pi+) pi+]CC",
+        "KS0"  : "[D+ ==> ^(KS0 ==> pi- pi+) pi+]CC",
+        "pim"   : "[D+ ==> (KS0 ==> ^pi- pi+) pi+]CC",
+        "pip"  : "[D+ ==> (KS0 ==> pi- ^pi+) pi+]CC",
+        "hp" : "[D+ ==> (KS0 ==> pi- pi+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_MC_composite_variables(),
+        "KS0"    : make_MC_composite_variables(),
+        "pim"     : make_MC_basic_variables(),
+        "pip"    : make_MC_basic_variables(),
+        "hp"   : make_MC_basic_variables(),
+    }
+
+    mytuple  = FuntupleMC(name=name,
+                        tuple_name="MCDecayTree",
+                        fields=branches, variables = variables,
+                        event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
+                        inputs=input_data)
+
+    return [mytuple]
diff --git a/Charm_2024validation/options/detection_asymmetry.py b/Charm_2024validation/options/detection_asymmetry.py
new file mode 100644
index 0000000000..9769559e87
--- /dev/null
+++ b/Charm_2024validation/options/detection_asymmetry.py
@@ -0,0 +1,191 @@
+from .tupling import (
+    make_composite_variables,
+    make_composite_variables_3body,
+    make_basic_variables,
+    make_hlt2_event_variables,
+)
+
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from FunTuple import FunTuple_Particles as Funtuple
+
+def maketuple_D2Kpipi_ADet(options, pvs, rec_summary):
+    name = "D2Kpipi_ADet"
+    turbo_line = "Hlt2Charm_DpToKmPipPip_ADet"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> K- pi+ pi+]CC",
+        "Km"   : "[D+ -> ^K- pi+ pi+]CC",
+        "pip1"  : "[D+ -> K- ^pi+ pi+]CC",
+        "pip2" : "[D+ -> K- pi+ ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
+        "Km"     : make_basic_variables(options, pvs, input_data),
+        "pip1"    : make_basic_variables(options, pvs, input_data),
+        "pip2"   : make_basic_variables(options, pvs, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2pipipi_ADet(options, pvs, rec_summary):
+    name = "D2pipipi_ADet"
+    turbo_line = "Hlt2Charm_DspToPimPipPip_ADet"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D_s+ -> pi- pi+ pi+]CC",
+        "pim"   : "[D_s+ -> ^pi- pi+ pi+]CC",
+        "pip1"  : "[D_s+ -> pi- ^pi+ pi+]CC",
+        "pip2" : "[D_s+ -> pi- pi+ ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
+        "pim"     : make_basic_variables(options, pvs, input_data),
+        "pip1"    : make_basic_variables(options, pvs, input_data),
+        "pip2"   : make_basic_variables(options, pvs, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Ds2KKpi_ADet(options, pvs, rec_summary):
+    name = "Ds2KKpi_ADet"
+    turbo_line = "Hlt2Charm_DspToKmKpPip_ADet"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D_s+ -> K- K+ pi+]CC",
+        "Km"   : "[D_s+ -> ^K- K+ pi+]CC",
+        "Kp"  : "[D_s+ -> K- ^K+ pi+]CC",
+        "pip" : "[D_s+ -> K- K+ ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
+        "Km"     : make_basic_variables(options, pvs, input_data),
+        "Kp"    : make_basic_variables(options, pvs, input_data),
+        "pip"   : make_basic_variables(options, pvs, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+    
+    return [myfilter, mytuple]
+        
+def maketuple_Lc2KSp_LL_ADet(options, pvs, rec_summary):
+    name = "Lc2KSp_LL_ADet"
+    turbo_line = "Hlt2Charm_LcpToPpKs_LL_ADet"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Lc" : "[Lambda_c+ -> (KS0 -> pi- pi+) p+]CC",
+        "KS0"  : "[Lambda_c+ -> ^(KS0 -> pi- pi+) p+]CC",
+        "pim"   : "[Lambda_c+ -> (KS0 -> ^pi- pi+) p+]CC",
+        "pip"  : "[Lambda_c+ -> (KS0 -> pi- ^pi+) p+]CC",
+        "pp" : "[Lambda_c+ -> (KS0 -> pi- pi+) ^p+]CC",
+    }
+
+    variables = {
+        "Lc"   : make_composite_variables(options, pvs, input_data),
+        "KS0"    : make_composite_variables(options, pvs, input_data),
+        "pim"     : make_basic_variables(options, pvs, input_data),
+        "pip"    : make_basic_variables(options, pvs, input_data),
+        "pp"   : make_basic_variables(options, pvs, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Lc2pKpi_ADet(options, pvs, rec_summary):
+    name = "Lc2pKpi_ADet"
+    turbo_line = "Hlt2Charm_LcpToPpKmPip_ADet"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Lc" : "[Lambda_c+ -> K- pi+ p+]CC",
+        "Km"   : "[Lambda_c+ -> ^K- pi+ p+]CC",
+        "pip"  : "[Lambda_c+ -> K- ^pi+ p+]CC",
+        "pp" : "[Lambda_c+ -> K- pi+ ^p+]CC",
+    }
+
+    variables = {
+        "Lc"   : make_composite_variables_3body(options, pvs, input_data),
+        "Km"     : make_basic_variables(options, pvs, input_data),
+        "pip"    : make_basic_variables(options, pvs, input_data),
+        "pp"   : make_basic_variables(options, pvs, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2KSK_LL_ADet(options, pvs, rec_summary):
+    name = "D2KSK_LL_ADet"
+    turbo_line = "Hlt2Charm_DspToKsKp_LL_ADet"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D_s+ -> (KS0 -> pi- pi+) K+]CC",
+        "KS0"  : "[D_s+ -> ^(KS0 -> pi- pi+) K+]CC",
+        "pim"   : "[D_s+ -> (KS0 -> ^pi- pi+) K+]CC",
+        "pip"  : "[D_s+ -> (KS0 -> pi- ^pi+) K+]CC",
+        "hp" : "[D_s+ -> (KS0 -> pi- pi+) ^K+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data),
+        "KS0"    : make_composite_variables(options, pvs, input_data),
+        "pim"     : make_basic_variables(options, pvs, input_data),
+        "pip"    : make_basic_variables(options, pvs, input_data),
+        "hp"   : make_basic_variables(options, pvs, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2KSpi_LL_ADet(options, pvs, rec_summary):
+    name = "D2KSpi_LL_ADet"
+    turbo_line = "Hlt2Charm_DpToKsPip_LL_ADet"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> (KS0 -> pi- pi+) pi+]CC",
+        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) pi+]CC",
+        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) pi+]CC",
+        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) pi+]CC",
+        "hp" : "[D+ -> (KS0 -> pi- pi+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data),
+        "KS0"    : make_composite_variables(options, pvs, input_data),
+        "pim"     : make_basic_variables(options, pvs, input_data),
+        "pip"    : make_basic_variables(options, pvs, input_data),
+        "hp"   : make_basic_variables(options, pvs, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
diff --git a/Charm_2024validation/options/dst_to_dee.py b/Charm_2024validation/options/dst_to_dee.py
new file mode 100644
index 0000000000..11f42bae95
--- /dev/null
+++ b/Charm_2024validation/options/dst_to_dee.py
@@ -0,0 +1,296 @@
+import Functors as F
+from Functors.math import log
+from DaVinci import Options, make_config
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from FunTuple import FunctorCollection
+from PyConf.reading import get_particles, get_pvs
+import FunTuple.functorcollections as FC
+from FunTuple import FunTuple_Particles as Funtuple
+from DecayTreeFitter import DecayTreeFitter
+from Hlt2Conf.lines.charm.dst_to_dee_makers import (dst_BDT_functor)
+from .tupling import (
+    make_DeltaM_variable,
+    make_basic_variables,
+    make_composite_variables,
+    make_composite_variables_3body,
+    make_composite_variables_4body,
+    make_hlt2_event_variables,
+    make_basic_dtf_variables,
+    make_composite_dtf_variables,
+    make_composite_dtf_variables_3body,
+    make_composite_dtf_variables_4body,
+    Hlt1_lines
+)
+extra_brem_variables= (FunctorCollection(
+            {
+                "BREMHYPODELTAX": F.BREMHYPODELTAX,
+                "BREMHYPOENERGY": F.BREMHYPOENERGY,
+                "BREMHYPOID": F.BREMHYPOID,
+                "BREMHYPOMATCH_CHI2": F.BREMHYPOMATCH_CHI2,
+                "BREMPIDE": F.BREMPIDE,
+                "INBREM": F.INBREM,
+                "MASS_WITH_BREM": F.MASS_WITH_BREM,
+                "PT_WITH_BREM": F.PT_WITH_BREM,
+                "P_WITH_BREM": F.P_WITH_BREM,
+                "ECALPIDE": F.ECALPIDE,
+                "HCALPIDE": F.HCALPIDE,
+                "ELECTRONSHOWEREOP": F.ELECTRONSHOWEREOP,
+                "CLUSTERMATCH_CHI2": F.CLUSTERMATCH_CHI2,
+                "ELECTRONMATCH_CHI2": F.ELECTRONMATCH_CHI2,
+                "ELECTRONENERGY": F.ELECTRONENERGY,
+                "ELECTRONID": F.ELECTRONID,
+                "HCALEOP": F.HCALEOP,
+                "CALO_NEUTRAL_SHOWER_SHAPE": F.CALO_NEUTRAL_SHOWER_SHAPE,
+                "RICH_DLL_E": F.VALUE_OR(F.NaN)@F.RICH_DLL_E,
+            })
+    )
+
+decay_descriptor = {
+    'dst_kpi_os' : {
+        "Dst0":   "[ D*(2007)0 ->  (D0 ->  K-  pi+)  (gamma ->  e+  e-)]CC",
+        "D0":     "[ D*(2007)0 -> ^(D0 ->  K-  pi+)  (gamma ->  e+  e-)]CC",
+        "Kminus": "[ D*(2007)0 ->  (D0 -> ^K-  pi+)  (gamma ->  e+  e-)]CC",
+        "piplus": "[ D*(2007)0 ->  (D0 ->  K- ^pi+)  (gamma ->  e+  e-)]CC",
+        "gamma":  "[ D*(2007)0 ->  (D0 ->  K-  pi+) ^(gamma ->  e+  e-)]CC",
+        "eplus":  "[ D*(2007)0 ->  (D0 ->  K-  pi+)  (gamma -> ^e+  e-)]CC",
+        "eminus": "[ D*(2007)0 ->  (D0 ->  K-  pi+)  (gamma ->  e+ ^e-)]CC",
+    },
+
+    'dst_kpi_ss' : {
+        "Dst0":   "[ D*(2007)0 ->  (D0 ->  K-  pi+)  ([gamma ->  e+  e+]CC)]CC",
+        "D0":     "[ D*(2007)0 -> ^(D0 ->  K-  pi+)  ([gamma ->  e+  e+]CC)]CC",
+        "Kminus": "[ D*(2007)0 ->  (D0 -> ^K-  pi+)  ([gamma ->  e+  e+]CC)]CC",
+        "piplus": "[ D*(2007)0 ->  (D0 ->  K- ^pi+)  ([gamma ->  e+  e+]CC)]CC",
+        "gamma":  "[ D*(2007)0 ->  (D0 ->  K-  pi+) ^([gamma ->  e+  e+]CC)]CC",
+        "eplus":  "[ D*(2007)0 ->  (D0 ->  K-  pi+)  ([gamma -> ^e+  e+]CC)]CC",
+        "eminus": "[ D*(2007)0 ->  (D0 ->  K-  pi+)  ([gamma ->  e+ ^e+]CC)]CC",
+    },
+
+    'dst_k3pi_os' :  {
+        "Dst0":    "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)  (gamma ->  e+  e-)]CC",
+        "D0":      "[ D*(2007)0 -> ^(D0 -> K- pi- pi+ pi+)  (gamma ->  e+  e-)]CC",
+        "Kminus":  "[ D*(2007)0 ->  (D0 -> ^K- pi- pi+ pi+) (gamma ->  e+  e-)]CC",
+        "piminus": "[ D*(2007)0 ->  (D0 -> K- ^pi- pi+ pi+) (gamma ->  e+  e-)]CC",
+        "piplus1": "[ D*(2007)0 ->  (D0 -> K- pi- ^pi+ pi+) (gamma ->  e+  e-)]CC",
+        "piplus2": "[ D*(2007)0 ->  (D0 -> K- pi- pi+ ^pi+) (gamma ->  e+  e-)]CC",
+        "gamma":   "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+) ^(gamma ->  e+  e-)]CC",
+        "eplus":   "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)  (gamma -> ^e+  e-)]CC",
+        "eminus":  "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)  (gamma ->  e+ ^e-)]CC",
+    },
+
+    'dst_k3pi_ss' :  {
+        "Dst0":    "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)   ([gamma ->  e+  e+]CC)]CC",
+        "D0":      "[ D*(2007)0 -> ^(D0 -> K- pi- pi+ pi+)   ([gamma ->  e+  e+]CC)]CC",
+        "Kminus":  "[ D*(2007)0 ->  (D0 -> ^K- pi- pi+ pi+)  ([gamma ->  e+  e+]CC)]CC",
+        "piminus": "[ D*(2007)0 ->  (D0 -> K- ^pi- pi+ pi+)  ([gamma ->  e+  e+]CC)]CC",
+        "piplus1": "[ D*(2007)0 ->  (D0 -> K- pi- ^pi+ pi+)  ([gamma ->  e+  e+]CC)]CC",
+        "piplus2": "[ D*(2007)0 ->  (D0 -> K- pi- pi+ ^pi+)  ([gamma ->  e+  e+]CC)]CC",
+        "gamma":   "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)  ^([gamma ->  e+  e+]CC)]CC",
+        "eplus":   "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)   ([gamma -> ^e+  e+]CC)]CC",
+        "eminus":  "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)   ([gamma ->  e+ ^e+]CC)]CC",
+    },
+
+    'dsstp_2kpi_os' : {
+        "Dstp":   "[ D*_s+ ->  (D_s+ -> K- K+ pi+)  (gamma ->  e+  e-)]CC",
+        "DpDs":   "[ D*_s+ -> ^(D_s+ -> K- K+ pi+)  (gamma ->  e+  e-)]CC",
+        "Kminus": "[ D*_s+ ->  (D_s+ -> ^K- K+ pi+) (gamma ->  e+  e-)]CC",
+        "Kplus":  "[ D*_s+ ->  (D_s+ -> K- ^K+ pi+) (gamma ->  e+  e-)]CC",
+        "piplus": "[ D*_s+ ->  (D_s+ -> K- K+ ^pi+) (gamma ->  e+  e-)]CC",
+        "gamma":  "[ D*_s+ ->  (D_s+ -> K- K+ pi+) ^(gamma ->  e+  e-)]CC",
+        "eplus":  "[ D*_s+ ->  (D_s+ -> K- K+ pi+)  (gamma -> ^e+  e-)]CC",
+        "eminus": "[ D*_s+ ->  (D_s+ -> K- K+ pi+)  (gamma ->  e+ ^e-)]CC",
+    },
+    'dsstp_2kpi_ss' : {
+        "Dstp":   "[ D*_s+ ->  (D_s+ -> K- K+ pi+)   ([gamma ->  e+  e+]CC)]CC",
+        "DpDs":   "[ D*_s+ -> ^(D_s+ -> K- K+ pi+)   ([gamma ->  e+  e+]CC)]CC",
+        "Kminus": "[ D*_s+ ->  (D_s+ -> ^K- K+ pi+)  ([gamma ->  e+  e+]CC)]CC",
+        "Kplus":  "[ D*_s+ ->  (D_s+ -> K- ^K+ pi+)  ([gamma ->  e+  e+]CC)]CC",
+        "piplus": "[ D*_s+ ->  (D_s+ -> K- K+ ^pi+)  ([gamma ->  e+  e+]CC)]CC",
+        "gamma":  "[ D*_s+ ->  (D_s+ -> K- K+ pi+)  ^([gamma ->  e+  e+]CC)]CC",
+        "eplus":  "[ D*_s+ ->  (D_s+ -> K- K+ pi+)   ([gamma -> ^e+  e+]CC)]CC",
+        "eminus": "[ D*_s+ ->  (D_s+ -> K- K+ pi+)   ([gamma ->  e+ ^e+]CC)]CC",
+    },
+
+}
+
+def MVA_dst_variables(line, pvs):
+    return (FunctorCollection( { "MVA": dst_BDT_functor(pvs, line=line)}))
+#make_dtf_variables(options,  input_data, ptype):
+def make_dtf_variables(options, input_data,  pvs, ptype="basic",  mass_constrain = ["D*(2007)0", "D0" ], nparticles=2):
+    
+    DTF = DecayTreeFitter(
+        name="DTF_{hash}",
+        input_particles=input_data,
+    )
+
+    DTF_DMass_BestPV = DecayTreeFitter(
+        name="DTF_DMass_BestPV_{hash}",
+        input_particles=input_data,
+        mass_constraints=mass_constrain,
+        input_pvs=pvs,
+        fit_all_pvs=False,
+    )
+    DTF_Mass_BestPV = DecayTreeFitter(
+        name="DTF_Mass_BestPV_{hash}",
+        input_particles=input_data,
+        mass_constraints=[mass_constrain[1]],
+        input_pvs=pvs,
+        fit_all_pvs=False,
+    )
+
+    DTF_BestPV = DecayTreeFitter(
+        name="DTF_BestPV_{hash}",
+        input_particles=input_data,
+        #mass_constraints=["D*(2007)0", "D0" ],
+        input_pvs=pvs,
+        fit_all_pvs=False,
+    )
+
+    DTF_DMass = DecayTreeFitter(
+        name="DTF_DMass_{hash}",
+        input_particles=input_data,
+        mass_constraints=mass_constrain,
+        output_level=3,
+    )
+    DTF_Mass = DecayTreeFitter(
+        name="DTF_Mass_{hash}",
+        input_particles=input_data,
+        mass_constraints=[mass_constrain[1]],
+        output_level=3,
+    )
+    
+    if ptype == "basic":
+        dtf_variables =  make_basic_dtf_variables
+    elif ptype == "composite":
+        if nparticles == 2:
+            dtf_variables = make_composite_dtf_variables 
+        elif nparticles == 3:
+            dtf_variables = make_composite_dtf_variables_3body
+        elif nparticles == 4:
+            dtf_variables = make_composite_dtf_variables_4body 
+
+    dtf_vars = dtf_variables(options, pvs, input_data,
+                                        DTF=DTF,
+                                        pv_constraint=False,
+                                        mass_constraint=False)
+    dtf_vars += dtf_variables(options, pvs, input_data,
+                                        DTF=DTF_BestPV,
+                                        pv_constraint=True,
+                                        mass_constraint=False)
+    dtf_vars += dtf_variables(options, pvs, input_data,
+                                        DTF=DTF_Mass,
+                                        pv_constraint=False,
+                                        mass_constraint=True, particle_name="D")
+    dtf_vars += dtf_variables(options, pvs, input_data,
+                                        DTF=DTF_Mass_BestPV,
+                                        pv_constraint=True,
+                                        mass_constraint=True, particle_name="D")
+    dtf_vars += dtf_variables(options, pvs, input_data,
+                                        DTF=DTF_DMass,
+                                        pv_constraint=False,
+                                        mass_constraint=True, particle_name="DstD")
+    dtf_vars += dtf_variables(options, pvs, input_data,
+                                        DTF=DTF_DMass_BestPV,
+                                        pv_constraint=True,
+                                        mass_constraint=True, particle_name="DstD")
+
+    return dtf_vars
+
+
+def make_Dst0ToD0EmEp_D0ToKmPip_tuple(options, line, pvs , rec_summary, dd='dst_kpi_os'):
+
+    input_data=get_particles(f"/Event/HLT2/{line}/Particles")
+    my_filter = create_lines_filter(f"LineFilter_{line}_{{hash}}",[line],)
+
+    fields = decay_descriptor[dd]
+    
+    composite_tuple_variables = {
+        "Dst0"   :  make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs,  "composite") +\
+             MVA_dst_variables("Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip", pvs) + make_DeltaM_variable(options), 
+        "D0"     :  make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs,  "composite"),
+        "gamma"  :  make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs,  "composite")
+    }
+    basic_tuple_variables = { 
+        "Kminus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"),
+        "piplus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"),
+        "eplus"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic") + extra_brem_variables,
+        "eminus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic") + extra_brem_variables,
+    }
+
+    my_tuple = Funtuple(
+        name=f"Tuple_{line}_{dd}",
+        tuple_name="DecayTree",
+        fields=fields,
+        variables= {**composite_tuple_variables, **basic_tuple_variables},
+        event_variables=make_hlt2_event_variables(options, pvs, rec_summary), 
+        inputs=input_data,
+        store_multiple_cand_info=True
+    )
+    return [ my_filter, my_tuple]
+
+def make_Dst0ToD0EmEp_D0ToKmPimPipPip_tuple(options, line, pvs, rec_summary, dd='dst_k3pi_os'):
+
+    input_data=get_particles(f"/Event/HLT2/{line}/Particles")
+    my_filter = create_lines_filter(f"LineFilter_{line}_{{hash}}",[line],)
+
+    fields = decay_descriptor[dd]
+    
+    composite_tuple_variables = {
+        "Dst0"   : make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs, "composite") +\
+             MVA_dst_variables("Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip", pvs) + make_DeltaM_variable(options), 
+        "D0"     : make_composite_variables_4body(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs, "composite", nparticles=4),
+        "gamma"  : make_composite_variables(options, pvs, input_data) 
+    }
+    basic_tuple_variables = { 
+        "Kminus"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"),
+        "piminus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"),
+        "piplus1" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"),
+        "piplus2" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"), 
+        "eplus"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic") + extra_brem_variables,
+        "eminus"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic") + extra_brem_variables,
+    }
+
+    my_tuple = Funtuple(
+        name=f"Tuple_{line}_{dd}",
+        tuple_name="DecayTree",
+        fields=fields,
+        variables= {**composite_tuple_variables, **basic_tuple_variables},
+        event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data,
+        store_multiple_cand_info=True
+    )
+    return [ my_filter, my_tuple]
+
+
+def make_DstpToDpDspEmEp_DpDspToKmKpPip_tuple(options, line, pvs , rec_summary, dd='dsstp_2kpi_os'):
+
+    input_data=get_particles(f"/Event/HLT2/{line}/Particles")
+    my_filter = create_lines_filter(f"LineFilter_{line}_{{hash}}",[line],)
+
+    fields = decay_descriptor[dd]
+
+    composite_tuple_variables = {
+        "Dstp"   : make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs, "composite", mass_constrain = ["D*_s+", "D_s+"]) +\
+             MVA_dst_variables("Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip", pvs) + make_DeltaM_variable(options), 
+        "DpDs"   : make_composite_variables_3body(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs, "composite", mass_constrain = ["D*_s+", "D_s+"], nparticles=3),
+        "gamma"  : make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs, "composite", mass_constrain = ["D*_s+", "D_s+"]),
+    }
+    basic_tuple_variables = { 
+        "Kminus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic",  mass_constrain = ["D*_s+", "D_s+"]),
+        "Kplus"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic",  mass_constrain = ["D*_s+", "D_s+"]),
+        "piplus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic",  mass_constrain = ["D*_s+", "D_s+"]),
+        "eplus"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic",  mass_constrain = ["D*_s+", "D_s+"])+ extra_brem_variables,
+        "eminus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic",  mass_constrain = ["D*_s+", "D_s+"])+ extra_brem_variables,
+    }
+
+    my_tuple = Funtuple(
+        name=f"Tuple_{line}_{dd}",
+        tuple_name="DecayTree",
+        fields=fields,
+        variables= {**composite_tuple_variables, **basic_tuple_variables},
+        event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data,
+        store_multiple_cand_info=True
+    )
+    return [ my_filter, my_tuple]
diff --git a/Charm_2024validation/options/hlt1.py b/Charm_2024validation/options/hlt1.py
new file mode 100644
index 0000000000..b93aeb113c
--- /dev/null
+++ b/Charm_2024validation/options/hlt1.py
@@ -0,0 +1,33 @@
+###############################################################################
+# (c) Copyright 2023 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.                                       #
+###############################################################################
+"""
+Configures running HLT1 via Moore.
+"""
+
+from Moore import Options
+from Moore.config import allen_control_flow
+from RecoConf.hlt1_allen import allen_gaudi_config, get_allen_line_names
+from AllenConf.hlt1_calibration_lines import make_passthrough_line
+from PyConf.application import configure_input, configure
+
+def alg_config(options: Options):
+    """
+    Configures algorithm running of HLT1 via Moore to be passed to Analysis Productions.
+    """
+
+    config = configure_input(options)
+    with allen_gaudi_config.bind(sequence="hlt1_pp_matching_no_ut_1000KHz"), make_passthrough_line.bind(pre_scaler=1):
+        line_names = get_allen_line_names()
+        allen_node = allen_control_flow(options)
+        config.update(configure(options, allen_node))
+
+    return config
+
diff --git a/Charm_2024validation/options/hlt2/d0_to_hh.py b/Charm_2024validation/options/hlt2/d0_to_hh.py
new file mode 100644
index 0000000000..3c0b0d0086
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/d0_to_hh.py
@@ -0,0 +1,9 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d0_to_hh import all_lines as hh_lines
+
+def make_lines():
+    mylines = [builder() for builder in hh_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+
diff --git a/Charm_2024validation/options/hlt2/d0_to_hhhh.py b/Charm_2024validation/options/hlt2/d0_to_hhhh.py
new file mode 100644
index 0000000000..81fe4dce30
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/d0_to_hhhh.py
@@ -0,0 +1,8 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d0_to_hhhh import all_lines as hhhh_lines
+
+def make_lines():
+    mylines = [builder() for builder in hhhh_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
diff --git a/Charm_2024validation/options/hlt2/d0_to_hhpi0.py b/Charm_2024validation/options/hlt2/d0_to_hhpi0.py
new file mode 100644
index 0000000000..52f8433c11
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/d0_to_hhpi0.py
@@ -0,0 +1,8 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d0_to_hhpi0 import all_lines as hhpi0_lines
+
+def make_lines():
+    mylines = [builder() for builder in hhpi0_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
diff --git a/Charm_2024validation/options/hlt2/d0_to_kshh.py b/Charm_2024validation/options/hlt2/d0_to_kshh.py
new file mode 100644
index 0000000000..79df310ed8
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/d0_to_kshh.py
@@ -0,0 +1,8 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d0_to_kshh import all_lines as kshh_lines
+
+def make_lines():
+    mylines = [builder() for builder in kshh_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
diff --git a/Charm_2024validation/options/hlt2/d0_to_ksks.py b/Charm_2024validation/options/hlt2/d0_to_ksks.py
new file mode 100644
index 0000000000..71ab403fd9
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/d0_to_ksks.py
@@ -0,0 +1,8 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d0_to_ksks import all_lines as ksks_lines
+
+def make_lines():
+    mylines = [builder() for builder in ksks_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
diff --git a/Charm_2024validation/options/hlt2/d_to_hhh.py b/Charm_2024validation/options/hlt2/d_to_hhh.py
new file mode 100644
index 0000000000..cd718f9b86
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/d_to_hhh.py
@@ -0,0 +1,10 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d_to_hhh import all_lines as hhh_lines
+from Hlt2Conf.lines.charm.detection_asymmetry_lines import all_lines as det_asy_lines
+
+def make_lines():
+    mylines = [builder() for builder in hhh_lines.values()]
+    mylines += [builder() for builder in det_asy_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
diff --git a/Charm_2024validation/options/hlt2/d_to_ksh.py b/Charm_2024validation/options/hlt2/d_to_ksh.py
new file mode 100644
index 0000000000..8c8b172dd0
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/d_to_ksh.py
@@ -0,0 +1,10 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d_to_ksh import all_lines as ksh_lines
+from Hlt2Conf.lines.charm.detection_asymmetry_lines import all_lines as det_asy_lines
+
+def make_lines():
+    mylines = [builder() for builder in ksh_lines.values()]
+    mylines += [builder() for builder in det_asy_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
diff --git a/Charm_2024validation/options/hlt2/dst_to_dee.py b/Charm_2024validation/options/hlt2/dst_to_dee.py
new file mode 100644
index 0000000000..4fd67becd7
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/dst_to_dee.py
@@ -0,0 +1,9 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.dst_to_dee import all_lines as dst_to_dee_lines
+
+def make_lines():
+    mylines = [builder() for builder in dst_to_dee_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+
diff --git a/Charm_2024validation/options/hlt2/hlt2.py b/Charm_2024validation/options/hlt2/hlt2.py
new file mode 100644
index 0000000000..c1560ce952
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/hlt2.py
@@ -0,0 +1,32 @@
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_d0_to_hh.py b/Charm_2024validation/options/hlt2/hlt2_d0_to_hh.py
new file mode 100644
index 0000000000..7c3a67ed03
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/hlt2_d0_to_hh.py
@@ -0,0 +1,41 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d0_to_hh import all_lines as hh_lines
+
+def make_lines():
+    mylines = [builder() for builder in hh_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_d0_to_hhhh.py b/Charm_2024validation/options/hlt2/hlt2_d0_to_hhhh.py
new file mode 100644
index 0000000000..d7d5dcbb90
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/hlt2_d0_to_hhhh.py
@@ -0,0 +1,40 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d0_to_hhhh import all_lines as hhhh_lines
+
+def make_lines():
+    mylines = [builder() for builder in hhhh_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_d0_to_hhpi0.py b/Charm_2024validation/options/hlt2/hlt2_d0_to_hhpi0.py
new file mode 100644
index 0000000000..063eeb274a
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/hlt2_d0_to_hhpi0.py
@@ -0,0 +1,40 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d0_to_hhpi0 import all_lines as hhpi0_lines
+
+def make_lines():
+    mylines = [builder() for builder in hhpi0_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_d0_to_kshh.py b/Charm_2024validation/options/hlt2/hlt2_d0_to_kshh.py
new file mode 100644
index 0000000000..3e1996cdf0
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/hlt2_d0_to_kshh.py
@@ -0,0 +1,40 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d0_to_kshh import all_lines as kshh_lines
+
+def make_lines():
+    mylines = [builder() for builder in kshh_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_d0_to_ksks.py b/Charm_2024validation/options/hlt2/hlt2_d0_to_ksks.py
new file mode 100644
index 0000000000..e8d1052803
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/hlt2_d0_to_ksks.py
@@ -0,0 +1,40 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d0_to_ksks import all_lines as ksks_lines
+
+def make_lines():
+    mylines = [builder() for builder in ksks_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_d_to_hhh.py b/Charm_2024validation/options/hlt2/hlt2_d_to_hhh.py
new file mode 100644
index 0000000000..97965cb96e
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/hlt2_d_to_hhh.py
@@ -0,0 +1,42 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d_to_hhh import all_lines as hhh_lines
+from Hlt2Conf.lines.charm.detection_asymmetry_lines import all_lines as det_asy_lines
+
+def make_lines():
+    mylines = [builder() for builder in hhh_lines.values()]
+    mylines += [builder() for builder in det_asy_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_d_to_ksh.py b/Charm_2024validation/options/hlt2/hlt2_d_to_ksh.py
new file mode 100644
index 0000000000..d2593da6a9
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/hlt2_d_to_ksh.py
@@ -0,0 +1,42 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d_to_ksh import all_lines as ksh_lines
+from Hlt2Conf.lines.charm.detection_asymmetry_lines import all_lines as det_asy_lines
+
+def make_lines():
+    mylines = [builder() for builder in ksh_lines.values()]
+    mylines += [builder() for builder in det_asy_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_dst_to_dee.py b/Charm_2024validation/options/hlt2/hlt2_dst_to_dee.py
new file mode 100644
index 0000000000..d43ecbcd65
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/hlt2_dst_to_dee.py
@@ -0,0 +1,41 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.dst_to_dee import all_lines as dst_to_dee_lines
+
+def make_lines():
+    mylines = [builder() for builder in dst_to_dee_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_rare_charm.py b/Charm_2024validation/options/hlt2/hlt2_rare_charm.py
new file mode 100644
index 0000000000..cb9ac88a02
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/hlt2_rare_charm.py
@@ -0,0 +1,40 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.rare_charm_lines import all_lines as rare_charm_lines
+
+def make_lines():
+    mylines = [builder() for builder in rare_charm_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2noUT.py b/Charm_2024validation/options/hlt2/hlt2noUT.py
new file mode 100644
index 0000000000..473127434b
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/hlt2noUT.py
@@ -0,0 +1,32 @@
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf_without_UT
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf_without_UT),\
+         require_gec.bind(skipUT=True),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/options/hlt2/make_hlt2_decay.sh b/Charm_2024validation/options/hlt2/make_hlt2_decay.sh
new file mode 100644
index 0000000000..f127b86285
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/make_hlt2_decay.sh
@@ -0,0 +1,9 @@
+cat d0_to_hh.py hlt2.py > hlt2_d0_to_hh.py
+cat d0_to_hhpi0.py hlt2.py > hlt2_d0_to_hhpi0.py
+cat d0_to_hhhh.py hlt2.py > hlt2_d0_to_hhhh.py
+cat d0_to_kshh.py hlt2.py > hlt2_d0_to_kshh.py
+cat d0_to_ksks.py hlt2.py > hlt2_d0_to_ksks.py
+cat d_to_hhh.py hlt2.py > hlt2_d_to_hhh.py
+cat d_to_ksh.py hlt2.py > hlt2_d_to_ksh.py
+cat rare_charm.py hlt2.py > hlt2_rare_charm.py
+cat dst_to_dee.py hlt2.py > hlt2_dst_to_dee.py
diff --git a/Charm_2024validation/options/hlt2/rare_charm.py b/Charm_2024validation/options/hlt2/rare_charm.py
new file mode 100644
index 0000000000..39194555f0
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/rare_charm.py
@@ -0,0 +1,8 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.rare_charm_lines import all_lines as rare_charm_lines
+
+def make_lines():
+    mylines = [builder() for builder in rare_charm_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
diff --git a/Charm_2024validation/options/rare_charm.py b/Charm_2024validation/options/rare_charm.py
new file mode 100644
index 0000000000..d4d4a5d83d
--- /dev/null
+++ b/Charm_2024validation/options/rare_charm.py
@@ -0,0 +1,496 @@
+from .tupling import (
+    make_composite_variables,
+    make_composite_variables_3body,
+    make_DeltaM_variable,
+    make_basic_variables,
+    make_hlt2_event_variables,
+    make_top_isolation_variables,
+    make_basic_isolation_variables,
+    make_intermediate_isolation_variables,
+    make_composite_dtf_variables,
+    make_composite_dtf_variables_3body,
+    make_basic_dtf_variables,
+)
+
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from FunTuple import FunTuple_Particles as Funtuple
+
+def make_dtf_variables_hmumu(options, pvs, input_data, ptype):
+
+    if ptype not in ["basic", "composite"]:
+        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
+
+    from DecayTreeFitter import DecayTreeFitter
+    
+    DTF = DecayTreeFitter(
+        name=f'DTF_{{hash}}',
+        input_particles=input_data)
+
+    DTFvtx = DecayTreeFitter(
+        name=f'DTFvtx_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    DTFmassDp = DecayTreeFitter(
+        name=f'DTFmassDp_{{hash}}',
+        input_particles=input_data,
+        mass_constraints=["D+"])
+
+    DTFvtxmassDp = DecayTreeFitter(
+        name=f'DTFvtxmassDp_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D+"])
+
+    DTFmassDsp = DecayTreeFitter(
+        name=f'DTFmassDsp_{{hash}}',
+        input_particles=input_data,
+        substitutions = ['D+{{D_s+}}'],
+        mass_constraints=["D_s+"])
+
+    DTFvtxmassDsp = DecayTreeFitter(
+        name=f'DTFvtxmassDsp_{{hash}}',
+        input_particles=input_data,
+        substitutions = ['D+{{D_s+}}',"J/psi(1S){{J/psi(1S)}}"],#trick
+        mass_constraints=["D_s+"],
+        input_pvs=pvs,
+    )
+
+    if ptype == "basic":
+        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassDp,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="Dp")
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassDp,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="Dp")
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassDsp,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="Dsp")
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassDsp,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="Dsp")
+        return dtf_vars
+
+    if ptype == "composite":
+        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassDp,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="Dp")
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassDp,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="Dp")
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassDsp,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="Dsp")
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassDsp,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="Dsp")
+        return dtf_vars
+
+
+def make_dtf_variables_pmumu(options, pvs, input_data, ptype):
+
+    if ptype not in ["basic", "composite"]:
+        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
+
+    from DecayTreeFitter import DecayTreeFitter
+    
+    DTF = DecayTreeFitter(
+        name=f'DTF_{{hash}}',
+        input_particles=input_data)
+
+    DTFvtx = DecayTreeFitter(
+        name=f'DTFvtx_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    DTFmass = DecayTreeFitter(
+        name=f'DTFmass_{{hash}}',
+        input_particles=input_data,
+        mass_constraints=["Lambda_c+"])
+
+    DTFvtxmass = DecayTreeFitter(
+        name=f'DTFvtxmass_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["Lambda_c+"])
+
+    if ptype == "basic":
+        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmass,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="Lc")
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmass,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="Lc")
+        return dtf_vars
+
+    if ptype == "composite":
+        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmass,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="D0")
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmass,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="D0")
+        return dtf_vars
+
+def make_dtf_variables_hhmumu(options, pvs, input_data, ptype):
+
+    if ptype not in ["basic", "composite","composite3b"]:
+        Exception(f"I want \'basic\' or \'composite\' or \'composite3b\. Got {ptype}")
+
+    from DecayTreeFitter import DecayTreeFitter
+    
+    DTF = DecayTreeFitter(
+        name=f'DTF_{{hash}}',
+        input_particles=input_data)
+
+    DTFvtx = DecayTreeFitter(
+        name=f'DTFvtx_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    DTFmass = DecayTreeFitter(
+        name=f'DTFmass_{{hash}}',
+        input_particles=input_data,
+        mass_constraints=["D0"])
+
+    DTFvtxmass = DecayTreeFitter(
+        name=f'DTFvtxmass_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0"])
+
+    if ptype == "basic":
+        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmass,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="D0")
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmass,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="D0")
+        return dtf_vars
+
+    if ptype == "composite3b":
+        dtf_vars = make_composite_dtf_variables_3body(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
+                                             DTF=DTFmass,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="D0")
+        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
+                                             DTF=DTFvtxmass,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="D0")
+
+        return dtf_vars
+        
+    if ptype == "composite":
+        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmass,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="D0")
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmass,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="D0")
+        return dtf_vars
+
+
+def maketuple_D2pimumu(options, pvs, rec_summary):
+    name = "D2pimumu"
+    turbo_line = "Hlt2Charm_DpDspToPipMumMup"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> (J/psi(1S) -> mu- mu+) pi+]CC",
+        "Jpsi" : "[D+ -> ^(J/psi(1S) -> mu- mu+) pi+]CC",
+        "lm"   : "[D+ -> (J/psi(1S) -> ^mu- mu+) pi+]CC",
+        "lp"   : "[D+ -> (J/psi(1S) -> mu- ^mu+) pi+]CC",
+        "hp" : "[D+ -> (J/psi(1S) -> mu- mu+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
+        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation: 
+
+        variables = {
+            "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+            "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2pimumu_WS(options, pvs, rec_summary):
+    name = "D2pimumu_WS"
+    turbo_line = "Hlt2Charm_DpDspToPipMupMup_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> (J/psi(1S) -> mu+ mu+) pi+]CC",
+        "Jpsi" : "[D+ -> (J/psi(1S) -> mu+ mu+) pi+]CC",
+        "lp1"   : "[D+ -> (J/psi(1S) -> ^mu+ mu+) pi+]CC",
+        "lp2"   : "[D+ -> (J/psi(1S) -> mu+ ^mu+) pi+]CC",
+        "hp" : "[D+ -> (J/psi(1S) -> mu+ mu+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
+        "lp1"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+        "lp2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation: 
+
+        variables = {
+            "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+            "lp1"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "lp2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2pipipi(options, pvs, rec_summary):
+    name = "CharmRD_D2pipipi"
+    turbo_line = "Hlt2Charm_DpDspToPipPimPip_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> (J/psi(1S) -> pi- pi+) pi+]CC",
+        "Jpsi" : "[D+ -> (J/psi(1S) -> pi- pi+) pi+]CC",
+        "lm"   : "[D+ -> (J/psi(1S) -> ^pi- pi+) pi+]CC",
+        "lp"   : "[D+ -> (J/psi(1S) -> pi- ^pi+) pi+]CC",
+        "hp" : "[D+ -> (J/psi(1S) -> pi- pi+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
+        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation: 
+
+        variables = {
+            "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+            "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2piee(options, pvs, rec_summary):
+    name = "D2piee"
+    turbo_line = "Hlt2Charm_DpDspToPipEmEp"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> (J/psi(1S) -> e- e+) pi+]CC",
+        "Jpsi" : "[D+ -> ^(J/psi(1S) -> e- e+) pi+]CC",
+        "lm"   : "[D+ -> (J/psi(1S) -> ^e- e+) pi+]CC",
+        "lp"   : "[D+ -> (J/psi(1S) -> e- ^e+) pi+]CC",
+        "hp" : "[D+ -> (J/psi(1S) -> e- e+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
+        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation: 
+
+        variables = {
+            "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+            "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Lc2pmumu(options, pvs, rec_summary):
+    name = "Lc2pmumu"
+    turbo_line = "Hlt2Charm_LcpToPpMumMup"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Lc" : "[Lambda_c+ -> (J/psi(1S) -> mu- mu+) p+]CC",
+        "Jpsi" : "[Lambda_c+ -> ^(J/psi(1S) -> mu- mu+) p+]CC",
+        "lm"   : "[Lambda_c+ -> (J/psi(1S) -> ^mu- mu+) p+]CC",
+        "lp"  : "[Lambda_c+ -> (J/psi(1S) -> mu- ^mu+) p+]CC",
+        "pp" : "[Lambda_c+ -> (J/psi(1S) -> mu- mu+) ^p+]CC",
+    }
+
+    variables = {
+        "Lc"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "pp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation: 
+
+        variables = {
+            "Lc"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+            "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "pp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02Kpimumu_RS(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02Kpimumu_RS"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPipMumMup"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^(D0 -> K- pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
+        "Km"   : "[D*(2010)+ -> (D0 -> ^K- pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
+        "pip"  : "[D*(2010)+ -> (D0 -> K- ^pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
+        "Jpsi"  : "[D*(2010)+ -> (D0 -> K- pi+ ^(J/psi(1S) -> mu- mu+)) pi+]CC",
+        "lm"  : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> ^mu- mu+)) pi+]CC",
+        "lp"  : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> mu- ^mu+)) pi+]CC",
+        "spip" : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> mu- mu+)) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite"),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation: 
+
+        variables = {
+            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
+            "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
+            "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+            "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
diff --git a/Charm_2024validation/options/tupling.py b/Charm_2024validation/options/tupling.py
new file mode 100644
index 0000000000..99de572726
--- /dev/null
+++ b/Charm_2024validation/options/tupling.py
@@ -0,0 +1,986 @@
+##############################################################################
+# (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.                                       #
+###############################################################################
+"""Common configuration functions
+
+"""
+
+import Functors as F
+from Functors.math import log
+import Functors.math as fmath
+
+from FunTuple import FunctorCollection
+from FunTuple.functorcollections import (
+    MCHierarchy,
+    MCPromptDecay,
+    Kinematics,
+    SelectionInfo,
+    HltTisTos,
+    MCVertexInfo,
+    MCKinematics,
+    ParticleID, #wrong variables PID_PI = 0, PROBNN_D = nan
+    EventInfo,
+    LHCInfo,
+    ParticleIsolation,
+    MCPrimaries,
+    MCReconstructed,
+    MCReconstructible,
+)
+
+from DaVinciMCTools import MCTruthAndBkgCat, MCReconstructed, MCReconstructible
+from PyConf.Algorithms import ParticleToSubcombinationsAlg
+from DecayTreeFitter import DecayTreeFitter
+
+Hlt1_global_lines = [
+    "Hlt1GECPassthroughDecision",
+    "Hlt1BeamGasDecision",
+    "Hlt1PassthroughDecision",
+    "Hlt1NoBeamDecision",
+    "Hlt1BeamOneDecision",
+    "Hlt1BeamTwoDecision",
+    "Hlt1BothBeamsDecision",
+    "Hlt1ODINLumiDecision",
+    "Hlt1ODINVeloOpenDecision",
+    "Hlt1ODINNoBiasDecision",
+    "Hlt1VeloMicroBiasDecision",
+    "Hlt1RICH1AlignmentDecision",
+    "Hlt1RICH2AlignmentDecision",
+    "Hlt1BeamGasDecision",
+    "Hlt1L02PPiDecision",
+    "Hlt1LowMassNoipDielectron_massSlice1_promptDecision",
+    "Hlt1LowMassNoipDielectron_SS_massSlice1_promptDecision",
+    "Hlt1LowMassNoipDielectron_massSlice2_promptDecision",
+    "Hlt1LowMassNoipDielectron_SS_massSlice2_promptDecision",
+    "Hlt1LowMassNoipDielectron_massSlice3_promptDecision",
+    "Hlt1LowMassNoipDielectron_SS_massSlice3_promptDecision",
+    "Hlt1LowMassNoipDielectron_massSlice4_promptDecision",
+    "Hlt1LowMassNoipDielectron_SS_massSlice4_promptDecision",
+    "Hlt1LowMassNoipDielectron_massSlice1_displacedDecision",
+    "Hlt1LowMassNoipDielectron_SS_massSlice1_displacedDecision",
+    "Hlt1LowMassNoipDielectron_massSlice2_displacedDecision",
+    "Hlt1LowMassNoipDielectron_SS_massSlice2_displacedDecision",
+    "Hlt1LowMassNoipDielectron_massSlice3_displacedDecision",
+    "Hlt1LowMassNoipDielectron_SS_massSlice3_displacedDecision",
+    "Hlt1LowMassNoipDielectron_massSlice4_displacedDecision",
+    "Hlt1LowMassNoipDielectron_SS_massSlice4_displacedDecision",
+]
+Hlt1_1track_lines = [
+    "Hlt1TrackMVADecision",
+    "Hlt1LowPtMuonDecision",
+    "Hlt1SingleHighPtMuonDecision",
+    "Hlt1SingleHighPtMuonNoMuIDDecision",
+    "Hlt1TrackMuonMVADecision",
+    "Hlt1OneMuonTrackLineDecision",
+    "Hlt1TrackElectronMVADecision",
+    "Hlt1SingleHighPtElectronDecision",
+    "Hlt1SingleHighEtDecision",
+]
+Hlt1_lines = Hlt1_1track_lines+[
+    "Hlt1TwoTrackMVACharmXSecDecision",
+    "Hlt1TwoTrackMVADecision",
+    "Hlt1TwoTrackKsDecision",
+    "Hlt1D2KPiDecision",
+    "Hlt1D2KKDecision",
+    "Hlt1D2PiPiDecision",
+    "Hlt1KsToPiPiDecision",
+    "Hlt1LowPtDiMuonDecision",#removed
+    "Hlt1DiMuonNoIPDecision",
+    "Hlt1DiMuonNoIP_ssDecision",
+    "Hlt1DiMuonHighMassDecision",
+    "Hlt1DiMuonLowMassDecision",#replaced by Hlt1DiMuonDisplacedDecision
+    "Hlt1DiMuonSoftDecision",
+    "Hlt1DiMuonDisplacedDecision",
+    "Hlt1TwoKsDecision",
+    "Hlt1D2KPiAlignmentDecision",
+    "Hlt1DiMuonHighMassAlignmentDecision",
+    "Hlt1DisplacedDiMuonAlignmentDecision",
+    "Hlt1DisplacedDielectronDecision",
+    "Hlt1DisplacedLeptonsDecision",#removed
+]
+
+
+Hlt2_lines = [
+    "Hlt2Charm_DstpToD0Pip_D0ToKmPip_XSec",
+    "Hlt2Charm_D0ToKmPip_XSec",
+    "Hlt2Charm_D0ToKmKp",
+    "Hlt2Charm_D0ToKmPip",
+    "Hlt2Charm_D0ToPimPip",
+    "Hlt2Charm_DpDspToKsKp_DD",
+    "Hlt2Charm_DpDspToKsKp_LD",
+    "Hlt2Charm_DpDspToKsKp_LL",
+    "Hlt2Charm_DpDspToKsPip_DD",
+    "Hlt2Charm_DpDspToKsPip_LD",
+    "Hlt2Charm_DpDspToKsPip_LL",
+    "Hlt2Charm_DpToKmPipPip",
+    "Hlt2Charm_DspToKmKpPip",
+    "Hlt2Charm_DpToKmPipPip_NoCuts",
+    "Hlt2Charm_DspToKmKpPip_NoCuts",
+    "Hlt2Charm_DpToKmPipPip_XSec",
+    "Hlt2Charm_DspToKmKpPip_XSec",
+    "Hlt2Charm_DstpToD0Pip_D0ToKmKp",
+    "Hlt2Charm_DstpToD0Pip_D0ToKmPip",
+    "Hlt2Charm_DstpToD0Pip_D0ToKpPim",
+    "Hlt2Charm_DstpToD0Pip_D0ToPimPip",
+    "Hlt2Charm_DstpToD0Pip_D0ToKmPip_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKpPim_LowBias",
+    "Hlt2Charm_D0ToKmPip_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKmKp_LowBias",
+    "Hlt2Charm_D0ToKmKp_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToPimPip_LowBias",
+    "Hlt2Charm_D0ToPimPip_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLL",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLL_Tight",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLDD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLDD_Tight",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDDD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDDD_Tight",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULLL",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULLL_Tight",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULDD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULDD_Tight",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLD_Tight",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDLD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDLD_Tight",
+    "Hlt2Charm_D0ToKsPimPip_LL",
+    "Hlt2Charm_D0ToKsPimPip_DD",
+    "Hlt2Charm_D0ToKsPimPip_LL_LowBias",
+    "Hlt2Charm_D0ToKsPimPip_LL_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_LL",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_DD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_LL_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_DD_LowBias",
+    "Hlt2Charm_D0ToKsKmPip_LL",
+    "Hlt2Charm_D0ToKsKmPip_DD",
+    "Hlt2Charm_D0ToKsKmPip_LL_LowBias",
+    "Hlt2Charm_D0ToKsKmPip_LL_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_LL",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_DD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_LL_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_DD_LowBias",
+    "Hlt2Charm_D0ToKsKpPim_LL",
+    "Hlt2Charm_D0ToKsKpPim_DD",
+    "Hlt2Charm_D0ToKsKpPim_LL_LowBias",
+    "Hlt2Charm_D0ToKsKpPim_DD_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_LL",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_DD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_LL_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_DD_LowBias",
+    "Hlt2Charm_D0ToKsKmKp_LL",
+    "Hlt2Charm_D0ToKsKmKp_DD",
+    "Hlt2Charm_D0ToKsKmKp_LL_LowBias",
+    "Hlt2Charm_D0ToKsKmKp_DD_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_LL",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_DD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_LL_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_DD_LowBias",
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS',
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS',
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS_MVA',
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS_MVA',
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS',
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS',
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS_MVA',
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS_MVA',
+    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS',
+    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS',
+    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS_MVA',
+    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS_MVA',
+]
+
+def make_composite_variables(options, pvs, data, add_truth=True, add_Hlt1TisTos=True):
+    if not options.simulation:
+        add_truth = False
+    variables = (
+        FunctorCollection(
+            {
+                "MAXPT": F.MAX(F.PT),
+                "MINPT": F.MIN(F.PT),
+                "SUMPT": F.SUM(F.PT),
+                "MAXP": F.MAX(F.P),
+                "MINP": F.MIN(F.P),
+                "BPVDIRA": F.BPVDIRA(pvs),
+                "VCHI2DOF": F.CHI2DOF,
+                #"VNDOF": F.NDOF,
+                "BPVFDCHI2": F.BPVFDCHI2(pvs),
+                "BPVFD": F.BPVFD(pvs),
+                "BPVVDRHO": F.BPVVDRHO(pvs),
+                "BPVVDZ": F.BPVVDZ(pvs),
+                "BPVIPCHI2": F.BPVIPCHI2(pvs),
+                "BPVIP": F.BPVIP(pvs),
+                "LOGBPVIPCHI2": log(F.BPVIPCHI2(pvs)),
+                "BPVLTIME": F.BPVLTIME(pvs),
+                "MAXBPVIPCHI2": F.MAX(F.BPVIPCHI2(pvs)),
+                "MINBPVIPCHI2": F.MIN(F.BPVIPCHI2(pvs)),
+                "MAXBPVIP": F.MAX(F.BPVIP(pvs)),
+                "MINBPVIP": F.MIN(F.BPVIP(pvs)),
+                "MAXDOCACHI2": F.MAXDOCACHI2,
+                "MAXDOCA": F.MAXDOCA,
+                "MAXSDOCACHI2": F.MAXSDOCACHI2,
+                "MAXSDOCA": F.MAXSDOCA,
+                "ETA": F.ETA,
+                "PHI": F.PHI,
+                "END_VX": F.END_VX,
+                "END_VY": F.END_VY,
+                "END_VZ": F.END_VZ,
+                "END_VX_ERR":F.SQRT @ F.CALL(0,0) @ F.POS_COV_MATRIX @ F.ENDVERTEX,
+                "END_VY_ERR":F.SQRT @ F.CALL(1,1) @ F.POS_COV_MATRIX @ F.ENDVERTEX,
+                "END_VZ_ERR":F.SQRT @ F.CALL(2,2) @ F.POS_COV_MATRIX @ F.ENDVERTEX,
+                "BPVX": F.BPVX(pvs),
+                "BPVY": F.BPVY(pvs),
+                "BPVZ": F.BPVZ(pvs),
+                "BPVX_ERR": F.SQRT @ F.CALL(0,0) @ F.POS_COV_MATRIX @ F.BPV(pvs),
+                "BPVY_ERR": F.SQRT @ F.CALL(1,1) @ F.POS_COV_MATRIX @ F.BPV(pvs),
+                "BPVZ_ERR": F.SQRT @ F.CALL(2,2) @ F.POS_COV_MATRIX @ F.BPV(pvs),
+                "ALLPVFD"     : F.ALLPV_FD(pvs),
+                "ALLPVIP"     : F.ALLPV_IP(pvs),
+                "OBJECT_KEY": F.OBJECT_KEY,
+            }
+        )
+        + Kinematics()
+        #+ ParticleID(extra_info=True) #only for daughters
+    )
+
+    if add_Hlt1TisTos:
+        variables += HltTisTos(
+            selection_type="Hlt1", trigger_lines=Hlt1_lines, data=data
+        )
+
+    if add_truth:
+        variables = add_truth_matching_functors(
+            options,
+            variables,
+            data,
+            hierarchy=True,
+            kinematics=True,
+            vertex_info=True,
+            bkgcat=True,
+        )
+
+    return variables
+
+def make_tistoscombinations(options, pvs, data):
+    algo_output = ParticleToSubcombinationsAlg( Input=data )
+    relations = algo_output.OutputRelations
+
+    tistos_variables_extra = HltTisTos(
+        selection_type="Hlt1", trigger_lines=["Hlt1TwoTrackMVADecision"], data=algo_output.OutputParticles
+    )
+    tistos_combinations = {}
+    for k,v in tistos_variables_extra.get_thor_functors().items():
+        tistos_combinations[k + "_SUBCOMB" ] = F.MAP_INPUT_ARRAY( v, relations )
+    tistos_combinations = FunctorCollection( tistos_combinations )
+
+    return tistos_combinations
+
+def make_composite_variables_3body(options, pvs, data, add_truth=True):
+
+    variables = (
+        FunctorCollection(
+            {
+                #12
+                "M12": F.SUBCOMB(Functor=F.MASS, Indices=(1, 2)),
+                "SDOCA12"     : F.SDOCA(Child1=1,Child2=2),
+                "SDOCACHI212" : F.SDOCACHI2(Child1=1,Child2=2),
+                "DOCA12"      : F.DOCA(Child1=1,Child2=2),
+                "DOCACHI212"  : F.DOCACHI2(Child1=1,Child2=2),
+                "COS12": F.ALV(1, 2),
+                #"ETA12": F.SUBCOMB(Functor=F.ETA, Indices=(1, 2)),
+                #"PT12": F.SUBCOMB(Functor=F.PT, Indices=(1, 2)),
+                #"VCHI212": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(1, 2)),
+                #"END_VZ12": F.SUBCOMB(Functor=F.END_VZ, Indices=(1, 2)),
+                #"BPVZ12": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(1, 2)),
+                #"BPVCORRM12": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(1, 2)),
+                #13
+                "M13": F.SUBCOMB(Functor=F.MASS, Indices=(1, 3)),
+                "SDOCA13"     : F.SDOCA(Child1=1,Child2=3),
+                "SDOCACHI213" : F.SDOCACHI2(Child1=1,Child2=3),
+                "DOCA13"      : F.DOCA(Child1=1,Child2=3),
+                "DOCACHI213"  : F.DOCACHI2(Child1=1,Child2=3),
+                "COS13": F.ALV(1, 3),
+                #"ETA13": F.SUBCOMB(Functor=F.ETA, Indices=(1, 3)),
+                #"PT13": F.SUBCOMB(Functor=F.PT, Indices=(1, 3)),
+                #"VCHI213": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(1, 3)),
+                #"END_VZ13": F.SUBCOMB(Functor=F.END_VZ, Indices=(1, 3)),
+                #"BPVZ13": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(1, 3)),
+                #"BPVCORRM13": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(1, 3)),
+                #23
+                "M23": F.SUBCOMB(Functor=F.MASS, Indices=(2, 3)),
+                "SDOCA23"     : F.SDOCA(Child1=2,Child2=3),
+                "SDOCACHI223" : F.SDOCACHI2(Child1=2,Child2=3),
+                "DOCA23"      : F.DOCA(Child1=2,Child2=3),
+                "DOCACHI223"  : F.DOCACHI2(Child1=2,Child2=3),
+                "COS23": F.ALV(2, 3),
+                #"ETA23": F.SUBCOMB(Functor=F.ETA, Indices=(2, 3)),
+                #"PT23": F.SUBCOMB(Functor=F.PT, Indices=(2, 3)),
+                #"VCHI223": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(2, 3)),
+                #"END_VZ23": F.SUBCOMB(Functor=F.END_VZ, Indices=(2, 3)),
+                #"BPVZ23": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(2, 3)),
+                #"BPVCORRM23": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(2, 3)),
+            }
+        )
+    )
+    return make_composite_variables(options, pvs, data, add_truth)+make_tistoscombinations(options, pvs, data)+variables
+
+def make_composite_variables_4body(options, pvs, data, add_truth=True):
+
+    variables = (
+        FunctorCollection(
+            {
+                #14
+                "M14": F.SUBCOMB(Functor=F.MASS, Indices=(1, 4)),
+                "SDOCA14"     : F.SDOCA(Child1=1,Child2=4),
+                "SDOCACHI214" : F.SDOCACHI2(Child1=1,Child2=4),
+                "DOCA14"      : F.DOCA(Child1=1,Child2=4),
+                "DOCACHI214"  : F.DOCACHI2(Child1=1,Child2=4),
+                "COS14": F.ALV(1, 4),
+                #"ETA14": F.SUBCOMB(Functor=F.ETA, Indices=(1, 4)),
+                #"PT14": F.SUBCOMB(Functor=F.PT, Indices=(1, 4)),
+                #"VCHI214": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(1, 4)),
+                #"END_VZ14": F.SUBCOMB(Functor=F.END_VZ, Indices=(1, 4)),
+                #"BPVZ14": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(1, 4)),
+                #"BPVCORRM14": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(1, 4)),
+                #24
+                "M24": F.SUBCOMB(Functor=F.MASS, Indices=(2, 4)),
+                "SDOCA24"     : F.SDOCA(Child1=2,Child2=4),
+                "SDOCACHI224" : F.SDOCACHI2(Child1=2,Child2=4),
+                "DOCA24"      : F.DOCA(Child1=2,Child2=4),
+                "DOCACHI224"  : F.DOCACHI2(Child1=2,Child2=4),
+                "COS24": F.ALV(2, 4),
+                #"ETA24": F.SUBCOMB(Functor=F.ETA, Indices=(2, 4)),
+                #"PT24": F.SUBCOMB(Functor=F.PT, Indices=(2, 4)),
+                #"VCHI224": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(2, 4)),
+                #"END_VZ24": F.SUBCOMB(Functor=F.END_VZ, Indices=(2, 4)),
+                #"BPVZ24": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(2, 4)),
+                #"BPVCORRM24": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(2, 4)),
+                #34
+                "M34": F.SUBCOMB(Functor=F.MASS, Indices=(3, 4)),
+                "SDOCA34"     : F.SDOCA(Child1=3,Child2=4),
+                "SDOCACHI234" : F.SDOCACHI2(Child1=3,Child2=4),
+                "DOCA34"      : F.DOCA(Child1=3,Child2=4),
+                "DOCACHI234"  : F.DOCACHI2(Child1=3,Child2=4),
+                "COS34": F.ALV(3, 4),
+                #"ETA34": F.SUBCOMB(Functor=F.ETA, Indices=(3, 4)),
+                #"PT34": F.SUBCOMB(Functor=F.PT, Indices=(3, 4)),
+                #"VCHI234": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(3, 4)),
+                #"END_VZ34": F.SUBCOMB(Functor=F.END_VZ, Indices=(3, 4)),
+                #"BPVZ34": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(3, 4)),
+                #"BPVCORRM34": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(3, 4)),
+            }
+        )
+    )
+    return make_composite_variables_3body(options, pvs, data, add_truth)+variables #make_tistoscombinations already included
+
+def make_b_composite_variables(options, pvs, data, add_truth=True):
+    
+    # define helper functors
+    get_child = F.CHILD(1, F.FORWARDARG0) # change here the index of the child
+    get_SV =  F.ENDVERTEX @ F.FORWARDARG0
+    get_SV_pos = F.TOLINALG @ F.POSITION @ get_SV # only if composite (i.e. has vertex)
+    get_child_endvtx_pos = F.ENDVERTEX_POS  @ get_child
+    get_fdvec_child = get_child_endvtx_pos - get_SV_pos
+
+    # define observables
+    IP_wrt_SV = F.IP.bind(get_SV_pos , get_child)
+    IPCHI2_wrt_SV = F.IPCHI2.bind(get_SV , get_child) # only if child is composite (i.e. has vertex)
+    FD_wrt_SV = F.MAGNITUDE @ get_fdvec_child
+    FDCHI2_wrt_SV = F.VTX_FDCHI2.bind(get_SV, get_child)
+
+    
+    variables = FunctorCollection(
+        {       
+            "ID": F.PARTICLE_ID ,
+            "PT": F.PT,
+            "P": F.P,
+            "MASS": F.MASS,
+            "CHILD1_IPwrtSV": IP_wrt_SV,
+            "CHILD1_IPCHI2wrtSV": IPCHI2_wrt_SV,
+            "CHILD1_FDwrtSV": FD_wrt_SV,
+            "CHILD1_FDCHI2wrtSV": FDCHI2_wrt_SV,
+            "PX": F.PX,
+            "PY": F.PY,
+            "PZ": F.PZ,
+            "END_VCHI2DOF": F.CHI2DOF @ F.ENDVERTEX,
+            "BPVCHI2DOF": F.CHI2DOF @ F.BPV(pvs),
+            # B2OC generic B hadron NN Hlt2 algorithm,
+            # not planning to use it directly for B2OC EM
+            "MVA": F.MVA(
+                MVAType="SigmaNet",
+                Config={
+                    "File":
+                    "paramfile://data/Hlt2B2OC_B_SigmaNet_Run3-v1.json",
+                    "Name":
+                    "B2OC_SigmaNet_Generic",
+                    "Lambda":
+                    "2.0",
+                    "NLayers":
+                    "3",
+                    "InputSize":
+                    "6",
+                    "Monotone_Constraints":
+                    "[1,-1,-1,-1,-1,-1]",
+                    "Variables":
+                    "log_B_PT,B_ETA,log_B_DIRA,log_B_ENDVERTEX_CHI2,log_B_IPCHI2_OWNPV,log_B_IP_OWNPV",
+                },
+                Inputs={
+                    "log_B_PT": fmath.log(F.PT),
+                    "B_ETA": F.ETA,
+                    "log_B_DIRA": fmath.log(1. - F.BPVDIRA(pvs)),
+                    "log_B_ENDVERTEX_CHI2": fmath.log(F.CHI2DOF),
+                    "log_B_IPCHI2_OWNPV": fmath.log(F.BPVIPCHI2(pvs)),
+                    "log_B_IP_OWNPV": fmath.log(F.BPVIP(pvs)),
+                }),
+            #'SSPionBDT_Mistag': F.SSPionBDT_Mistag(sspionTagging.OutputFlavourTags),
+            #'SSPionBDT_Decision': F.SSPionBDT_Decision(sspionTagging.OutputFlavourTags),
+
+        }
+    )
+    return make_composite_variables(options, pvs, data, add_truth)+make_tistoscombinations(options, pvs, data)+variables
+
+def make_DeltaM_variable(options):
+    return FunctorCollection({"DM": F.MASS - F.CHILD(1, F.MASS)})
+
+def make_basic_variables(options, pvs, data, add_truth=True, islong = True):
+    if not options.simulation:
+        add_truth = False
+    variables = (
+        FunctorCollection(
+            {
+                "TRCHI2DOF": F.CHI2DOF @ F.TRACK,
+                "ETA": F.ETA,
+                "PHI": F.PHI,
+                "TRGHOSTPROB": F.GHOSTPROB,
+                "BPVIPCHI2": F.BPVIPCHI2(pvs),
+                "BPVIP": F.BPVIP(pvs),
+                "BPVX": F.BPVX(pvs),
+                "BPVY": F.BPVY(pvs),
+                "BPVZ": F.BPVZ(pvs),
+                "TX"          : F.TX,
+                "TY"          : F.TY,
+                "MINIPCHI2"   : F.MINIPCHI2(pvs),
+                "MINIP"       : F.MINIP(pvs),
+                "KEY"         : F.VALUE_OR(-1) @ F.OBJECT_KEY @ F.TRACK,
+                "ISMUON"      : F.ISMUON,
+                "TRACKPT": F.TRACK_PT,
+                "TRACKHISTORY": F.VALUE_OR(-1) @ F.TRACKHISTORY @ F.TRACK,
+                "QOVERP": F.QOVERP @ F.TRACK,
+                "NDOF": F.VALUE_OR(-1) @ F.NDOF @ F.TRACK,
+                "NFTHITS": F.VALUE_OR(-1) @ F.NFTHITS @ F.TRACK,
+                "NHITS": F.VALUE_OR(-1) @ F.NHITS @ F.TRACK,
+                "NUTHITS": F.VALUE_OR(-1) @ F.NUTHITS @ F.TRACK,
+                "NVPHITS": F.VALUE_OR(-1) @ F.NVPHITS @ F.TRACK,
+                #"NMUONHITS": F.VALUE_OR(-1) @ F.NHITSMUONS @ F.TRACK, #https://gitlab.cern.ch/lhcb/Rec/-/merge_requests/3756
+                "TRACKHASVELO": F.VALUE_OR(-1) @ F.TRACKHASVELO @ F.TRACK,
+                "TRACKHASUT": F.VALUE_OR(-1) @ F.TRACKHASUT @ F.TRACK,
+                "OBJECT_KEY": F.OBJECT_KEY,
+                "HASBREM": F.HASBREM,
+                "BREMENERGY": F.BREMENERGY,
+                "BREMBENDCORR": F.BREMBENDCORR,
+            }
+        )
+        + Kinematics()
+        + ParticleID(extra_info=True)
+    )
+
+    if islong:
+        variables += FunctorCollection({"CTB": F.TRACK_POSVEC_CLOSESTTOBEAM})
+    
+    variables += HltTisTos(
+        selection_type="Hlt1", trigger_lines=Hlt1_1track_lines, data=data
+    )
+    
+    if add_truth:
+        variables = add_truth_matching_functors(
+            options,
+            variables,
+            data,
+            hierarchy=True,
+            kinematics=True,
+            vertex_info=True,
+            bkgcat=False,
+        )
+
+    return variables
+
+def make_hlt2_event_variables(options, pvs, rec_summary):
+    # define event level variables
+    evt_variables = EventInfo()
+    if not options.simulation:
+        evt_variables += LHCInfo() #FillNumber
+    evt_variables += SelectionInfo(selection_type="Hlt2", trigger_lines=Hlt2_lines)
+    evt_variables += SelectionInfo(selection_type="Hlt1", trigger_lines=Hlt1_global_lines)
+    evt_variables += FunctorCollection(
+        {
+            "ALLPVX": F.ALLPVX(pvs),
+            "ALLPVY": F.ALLPVY(pvs),
+            "ALLPVZ": F.ALLPVZ(pvs),
+            "ALLPVNDOF": F.MAP(F.VALUE_OR(F.NaN) @ F.NDOF) @ F.TES(pvs),
+            "ALLPVCHI2": F.MAP(F.VALUE_OR(F.NaN) @ F.CHI2) @ F.TES(pvs),
+            "nPVs": F.SIZE(pvs),
+            "nTracks": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nTracks"),
+            "nLongTracks": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nLongTracks"),
+            "nMuonTracks": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nMuonTracks"),
+            "nFTClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nFTClusters"),
+            "nVPClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nVPClusters"),
+            "nUTClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nUTClusters"),
+            "nSPDhits": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nSPDhits"),
+            "nEcalClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nEcalClusters"),
+            "nEcalClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nEcalClusters"),
+            "eCalTot": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "eCalTot"),
+            "hCalTot": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "hCalTot"),
+            "nRich1Hits": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nRich1Hits"),
+            "nRich2Hits": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nRich2Hits"),
+        }
+    )
+    return evt_variables
+
+def add_truth_matching_functors(
+    options,
+    variables,
+    data,
+    hierarchy=True,
+    kinematics=True,
+    vertex_info=True,
+    bkgcat=False,
+    prompt_info=True,
+):
+    """Add MC truth matching functors to an existing FunctorCollection.
+
+    Args:
+        options (DaVinci.Options): DaVinci options object.
+        variables (FunctorCollection): FunctorCollection to modify
+        data: data handle
+        hierarchy (bool): Add MCHierarchy info (default True)
+        kinematics (bool): Add MCKinematics info (default True)
+        vertex_info (bool): Add MCVertexInfo (default True)
+        bkgcat (bool): Add TRUEKEY and BKGCAT functors - intended for composite particles (default False)
+        prompt_info (bool): Add MCPromptDecay info (default True)
+
+    Returns:
+        FunctorCollection: modified FunctorCollection with truth matched variables.
+    """
+    assert (
+        options.simulation
+    ), "options.simulation is set to False - it doesn't make sense to add truth matching."
+
+    MCTRUTH = MCTruthAndBkgCat(data)
+
+    if bkgcat:
+        variables += FunctorCollection(
+            {
+                # Important note: specify an invalid value for integer functors if there exists no truth info.
+                #                 The invalid value for floating point functors is set to nan.
+                "TRUEKEY": F.VALUE_OR(-1) @ MCTRUTH(F.OBJECT_KEY),
+                "BKGCAT": MCTRUTH.BkgCat,
+            }
+        )
+    if hierarchy:
+        variables += MCHierarchy(mctruth_alg=MCTRUTH)  # likely to change again!!
+    if vertex_info:
+        variables += MCVertexInfo(mctruth_alg=MCTRUTH)  # likely to change again!!
+    if kinematics:
+        variables += MCKinematics(mctruth_alg=MCTRUTH)  # likely to change again!!
+    if prompt_info:
+        variables += MCPromptDecay(mctruth_alg=MCTRUTH)
+
+    return variables
+
+### DTF variables ###
+
+def make_basic_dtf_variables(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name="", islong=True):
+    variables = (
+        FunctorCollection(
+            {
+                "TRCHI2DOF": F.CHI2DOF @ F.TRACK,
+                "ETA": F.ETA,
+                "PHI": F.PHI,
+                "TRGHOSTPROB": F.GHOSTPROB,
+                "BPVIPCHI2": F.BPVIPCHI2(pvs),
+                "BPVIP": F.BPVIP(pvs),
+                "BPVX": F.BPVX(pvs),
+                "BPVY": F.BPVY(pvs),
+                "BPVZ": F.BPVZ(pvs),
+                "TX"          : F.TX,
+                "TY"          : F.TY,
+                "MINIPCHI2"   : F.MINIPCHI2(pvs),
+                "MINIP"       : F.MINIP(pvs),
+                "KEY"         : F.VALUE_OR(-1) @ F.OBJECT_KEY @ F.TRACK,
+                "TRACKPT": F.TRACK_PT,
+                "TRACKHISTORY": F.VALUE_OR(-1) @ F.TRACKHISTORY @ F.TRACK,
+                "QOVERP": F.QOVERP @ F.TRACK,
+                "NDOF": F.VALUE_OR(-1) @ F.NDOF @ F.TRACK,
+            }
+        )
+        + Kinematics()
+    )
+
+    if islong:
+        variables += FunctorCollection({"CTB": F.TRACK_POSVEC_CLOSESTTOBEAM})
+    
+    if(mass_constraint):
+        if(pv_constraint): # MASS + PV
+            dtf_variables_mass_pv = FunctorCollection({
+                        'DTF_PV_M'+ particle_name + '_' + k: DTF(v)
+                        for k, v in variables.get_thor_functors().items()
+                    })
+            return dtf_variables_mass_pv
+        else: # MASS
+            dtf_variables_mass = FunctorCollection(
+                {'DTF_M'+ particle_name + '_' + k: DTF(v)
+                 for k, v in variables.get_thor_functors().items()})
+        return dtf_variables_mass
+
+    elif(pv_constraint): # PV
+        dtf_variables_pv = FunctorCollection({
+                'DTF_PV_' + k: DTF(v)
+                for k, v in variables.get_thor_functors().items()
+            })
+        return dtf_variables_pv
+
+    else: # NO MASS/PV
+        dtf_variables = FunctorCollection(
+            {'DTF_' + k: DTF(v)
+             for k, v in variables.get_thor_functors().items()})
+        return dtf_variables
+
+def make_composite_dtf_variables(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name=""):
+    variables = (
+        FunctorCollection(
+            {
+                "MAXPT": F.MAX(F.PT),
+                "MINPT": F.MIN(F.PT),
+                "SUMPT": F.SUM(F.PT),
+                "MAXP": F.MAX(F.P),
+                "MINP": F.MIN(F.P),
+                "BPVDIRA": F.BPVDIRA(pvs),
+                "VCHI2DOF": F.CHI2DOF, #CHI2VXNDOF
+                "BPVFDCHI2": F.BPVFDCHI2(pvs),
+                "BPVFD": F.BPVFD(pvs),
+                "BPVVDRHO": F.BPVVDRHO(pvs),
+                "BPVVDZ": F.BPVVDZ(pvs),
+                "BPVIPCHI2": F.BPVIPCHI2(pvs),
+                "BPVIP": F.BPVIP(pvs),
+                "LOGBPVIPCHI2": log(F.BPVIPCHI2(pvs)),
+                "BPVLTIME": F.BPVLTIME(pvs),
+                "MAXBPVIPCHI2": F.MAX(F.BPVIPCHI2(pvs)), #MAX_
+                "MINBPVIPCHI2": F.MIN(F.BPVIPCHI2(pvs)),
+                "MAXBPVIP": F.MAX(F.BPVIP(pvs)),
+                "MINBPVIP": F.MIN(F.BPVIP(pvs)),
+                "ETA": F.ETA,
+                "PHI": F.PHI,
+                "END_VX": F.END_VX, #END_
+                "END_VY": F.END_VY,
+                "END_VZ": F.END_VZ,
+                "BPVX": F.BPVX(pvs),
+                "BPVY": F.BPVY(pvs),
+                "BPVZ": F.BPVZ(pvs),
+                "ALLPVFD"     : F.ALLPV_FD(pvs),
+                "ALLPVIP"     : F.ALLPV_IP(pvs),
+                
+            }
+        )
+        + Kinematics()
+    )
+
+    addstring = "DTF"
+    if(pv_constraint):
+            addstring += '_PV'
+    if(mass_constraint):
+            addstring += '_M'
+    addstring += particle_name
+
+    DTF_chi2ndof = FunctorCollection(
+            {
+                addstring+"_DTFCHI2": DTF.CHI2,
+                addstring+"_DTFNDOF": DTF.NDOF,
+                addstring+"_CTAU": DTF.CTAU,
+                addstring+"_CTAUERR": DTF.CTAUERR,
+                addstring+"_MERR": DTF.MASSERR,
+            }
+    )
+
+    if(mass_constraint):
+        if(pv_constraint): # MASS + PV
+            dtf_variables_mass_pv = FunctorCollection({
+                        'DTF_PV_M'+ particle_name + '_' + k: DTF(v)
+                        for k, v in variables.get_thor_functors().items()
+                    })
+            return dtf_variables_mass_pv+DTF_chi2ndof
+        else: # MASS
+            dtf_variables_mass = FunctorCollection(
+                {'DTF_M'+ particle_name + '_' + k: DTF(v)
+                 for k, v in variables.get_thor_functors().items()})
+        return dtf_variables_mass+DTF_chi2ndof
+
+    elif(pv_constraint): # PV
+        dtf_variables_pv = FunctorCollection({
+                'DTF_PV_' + k: DTF(v)
+                for k, v in variables.get_thor_functors().items()
+            })
+        return dtf_variables_pv+DTF_chi2ndof
+
+    else: # NO MASS/PV
+        dtf_variables = FunctorCollection(
+            {'DTF_' + k: DTF(v)
+             for k, v in variables.get_thor_functors().items()})
+        return dtf_variables+DTF_chi2ndof
+
+def make_composite_dtf_variables_3body(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name=""):
+    variables = (
+        FunctorCollection(
+            {
+                "M13": F.SUBCOMB(Functor=F.MASS, Indices=(1, 3)),
+                "M23": F.SUBCOMB(Functor=F.MASS, Indices=(2, 3)),
+            }
+        )
+    )
+
+    if(mass_constraint):
+        if(pv_constraint): # MASS + PV
+            dtf_variables_mass_pv = FunctorCollection({
+                        'DTF_PV_M'+ particle_name + '_' + k: DTF(v)
+                        for k, v in variables.get_thor_functors().items()
+                    })
+            return dtf_variables_mass_pv+make_composite_dtf_variables(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
+        else: # MASS
+            dtf_variables_mass = FunctorCollection(
+                {'DTF_M'+ particle_name + '_' + k: DTF(v)
+                 for k, v in variables.get_thor_functors().items()})
+        return dtf_variables_mass+make_composite_dtf_variables(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
+
+    elif(pv_constraint): # PV
+        dtf_variables_pv = FunctorCollection({
+                'DTF_PV_' + k: DTF(v)
+                for k, v in variables.get_thor_functors().items()
+            })
+        return dtf_variables_pv+make_composite_dtf_variables(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
+
+    else: # NO MASS/PV
+        dtf_variables = FunctorCollection(
+            {'DTF_' + k: DTF(v)
+             for k, v in variables.get_thor_functors().items()})
+
+    return dtf_variables+make_composite_dtf_variables(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
+
+def make_composite_dtf_variables_4body(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name=""):
+    variables = (
+        FunctorCollection(
+            {
+                "M14": F.SUBCOMB(Functor=F.MASS, Indices=(1, 4)),
+                "M24": F.SUBCOMB(Functor=F.MASS, Indices=(2, 4)),
+                "M34": F.SUBCOMB(Functor=F.MASS, Indices=(3, 4)),
+            }
+        )
+    )
+
+    if(mass_constraint):
+        if(pv_constraint): # MASS + PV
+            dtf_variables_mass_pv = FunctorCollection({
+                        'DTF_PV_M'+ particle_name + '_' + k: DTF(v)
+                        for k, v in variables.get_thor_functors().items()
+                    })
+            return dtf_variables_mass_pv+make_composite_dtf_variables_3body(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
+        else: # MASS
+            dtf_variables_mass = FunctorCollection(
+                {'DTF_M'+ particle_name + '_' + k: DTF(v)
+                 for k, v in variables.get_thor_functors().items()})
+        return dtf_variables_mass+make_composite_dtf_variables_3body(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
+
+    elif(pv_constraint): # PV
+        dtf_variables_pv = FunctorCollection({
+                'DTF_PV_' + k: DTF(v)
+                for k, v in variables.get_thor_functors().items()
+            })
+        return dtf_variables_pv+make_composite_dtf_variables_3body(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
+
+    else: # NO MASS/PV
+        dtf_variables = FunctorCollection(
+            {'DTF_' + k: DTF(v)
+             for k, v in variables.get_thor_functors().items()})
+    
+        return dtf_variables+make_composite_dtf_variables_3body(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
+
+
+def make_MC_basic_variables():
+    MC_MOTHER_ID = lambda gen: F.VALUE_OR(0) @ F.MC_MOTHER(gen, F.PARTICLE_ID)
+    MC_MOTHER_KEY = lambda gen: F.VALUE_OR(-1) @ F.MC_MOTHER(gen, F.OBJECT_KEY)
+
+    variables = (
+        FunctorCollection(
+            {
+                "OBJECT_KEY": F.OBJECT_KEY,
+                "ETA": F.ETA,
+                "PHI": F.PHI,
+                "ORIGIN_VX": F.ORIGIN_VX,
+                "ORIGIN_VY": F.ORIGIN_VY,
+                "ORIGIN_VZ": F.ORIGIN_VZ,
+                "FOURMOMENTUM": F.FOURMOMENTUM,
+                "TRUEID": F.PARTICLE_ID,
+                "MC_MOTHER_ID": MC_MOTHER_ID(1),
+                "MC_MOTHER_KEY": MC_MOTHER_KEY(1),
+                "MC_GD_MOTHER_ID": MC_MOTHER_ID(2),
+                "MC_GD_MOTHER_KEY": MC_MOTHER_KEY(2),
+                "MC_GD_GD_MOTHER_ID": MC_MOTHER_ID(3),
+                "MC_GD_GD_MOTHER_KEY": MC_MOTHER_KEY(3),
+            }
+        )
+        + Kinematics()
+    )
+
+
+    from PyConf.reading import get_mc_particles, get_pp2mcp_relations, get_mc_track_info
+    MC_data = get_mc_particles("/Event/HLT2/MC/Particles")
+    relations_charged = get_pp2mcp_relations("/Event/HLT2/Relations/ChargedPP2MCP")
+    relations_neutral = get_pp2mcp_relations("/Event/HLT2/Relations/NeutralPP2MCP")
+    mcreconstructed_all = MCReconstructed(
+        input_mcparticles=MC_data,
+        use_best_mcmatch=True,
+        relations_charged=relations_charged,
+        relations_neutral=relations_neutral,
+    )
+    mcreconstructible_all = MCReconstructible(
+        input_mctrackinfo=get_mc_track_info()
+    )
+    import FunTuple.functorcollections as FC
+    vars_reconstructed = FC.MCReconstructed(mcreconstructed_alg=mcreconstructed_all, extra_info=True)
+    vars_reconstructible = FC.MCReconstructible(mcreconstructible_alg=mcreconstructible_all, extra_info=True)
+
+
+    return variables+vars_reconstructed+vars_reconstructible
+
+def make_MC_composite_variables():
+    MC_MOTHER_ID = lambda gen: F.VALUE_OR(0) @ F.MC_MOTHER(gen, F.PARTICLE_ID)
+    MC_MOTHER_KEY = lambda gen: F.VALUE_OR(-1) @ F.MC_MOTHER(gen, F.OBJECT_KEY)
+
+    variables = (
+        FunctorCollection(
+            {
+                "END_VX": F.END_VX,
+                "END_VY": F.END_VY,
+                "END_VZ": F.END_VZ,
+                "LTIME": F.MC_LIFETIME,
+                "OBJECT_KEY": F.OBJECT_KEY,
+                "ETA": F.ETA,
+                "PHI": F.PHI,
+                "ORIGIN_VX": F.ORIGIN_VX,
+                "ORIGIN_VY": F.ORIGIN_VY,
+                "ORIGIN_VZ": F.ORIGIN_VZ,
+                "FOURMOMENTUM": F.FOURMOMENTUM,
+                "TRUEID": F.PARTICLE_ID,
+                "MC_MOTHER_ID": MC_MOTHER_ID(1),
+                "MC_MOTHER_KEY": MC_MOTHER_KEY(1),
+                "MC_GD_MOTHER_ID": MC_MOTHER_ID(2),
+                "MC_GD_MOTHER_KEY": MC_MOTHER_KEY(2),
+                "MC_GD_GD_MOTHER_ID": MC_MOTHER_ID(3),
+                "MC_GD_GD_MOTHER_KEY": MC_MOTHER_KEY(3),
+            }
+        )
+        + Kinematics()
+        + MCPromptDecay()
+        )
+
+    return variables
+
+def make_MC_event_variables(mc_header):
+    # define event level variables
+    evt_variables = EventInfo()
+    evt_variables += MCPrimaries(mc_header=mc_header)
+
+    return evt_variables
+
+def make_top_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"]):
+    from PyConf.reading import get_particles
+    from IsolationTools import VertexAndConeIsolation
+
+    possible_charm_locations = ["LongTrackIso", "TTrackIso", "DownstreamTrackIso", "UpstreamTrackIso", "NeutralIso", "PizIso"]
+    coneangles = [0.25,0.5,1.,1.5,2.]
+
+    count = 0
+    for location in locations:
+        extra_particles = get_particles(f"/Event/HLT2/{hlt2_line}/{location}/Particles")
+
+        for coneangle in coneangles:
+            top_RTAlg = VertexAndConeIsolation(
+                name=location+"_"+str(coneangle),
+                reference_particles=input_data,
+                related_particles=extra_particles,
+                cut=F.DR2<coneangle)
+
+            if count == 0:
+                top_iso_variables = ParticleIsolation(isolation_alg=top_RTAlg,array_indx_name='indx')
+            else:
+                top_iso_variables += ParticleIsolation(isolation_alg=top_RTAlg,array_indx_name='indx')
+            count += 1
+
+
+    return top_iso_variables
+
+def make_basic_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"]):
+    from PyConf.reading import get_particles
+    from IsolationTools import VertexAndConeIsolation
+    from PyConf.Algorithms import ThOrParticleSelection
+
+    basic_code = (F.FILTER(F.ALL) @ F.GET_ALL_BASICS())
+    basic_particles = ThOrParticleSelection(InputParticles=input_data, Functor=basic_code).OutputSelection
+
+    possible_charm_locations = ["LongTrackIso", "TTrackIso", "DownstreamTrackIso", "UpstreamTrackIso", "NeutralIso", "PizIso"]
+    coneangles = [0.25,0.5,1.,1.5,2.]
+
+    count = 0
+    for location in locations:
+        extra_particles = get_particles(f"/Event/HLT2/{hlt2_line}/{location}/Particles")
+
+        for coneangle in coneangles:
+            basic_RTAlg = VertexAndConeIsolation(
+                name=location+"_"+str(coneangle),
+                reference_particles=basic_particles,
+                related_particles=extra_particles,
+                cut=F.DR2<coneangle)
+
+            if count == 0:
+                basic_iso_variables = ParticleIsolation(isolation_alg=basic_RTAlg,array_indx_name='indx')
+            else:
+                basic_iso_variables += ParticleIsolation(isolation_alg=basic_RTAlg,array_indx_name='indx')
+            count += 1
+
+
+    return basic_iso_variables
+
+
+def make_intermediate_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"], composite_ID = "J/psi(1S)"):
+    from PyConf.reading import get_particles
+    from IsolationTools import VertexAndConeIsolation
+    from PyConf.Algorithms import ThOrParticleSelection
+
+    intermediate_code = F.FILTER(F.IS_ABS_ID(composite_ID)) @ F.GET_ALL_DESCENDANTS()
+    intermediate_particles = ThOrParticleSelection(InputParticles=input_data, Functor=intermediate_code).OutputSelection
+
+    possible_charm_locations = ["LongTrackIso", "TTrackIso", "DownstreamTrackIso", "UpstreamTrackIso", "NeutralIso", "PizIso"]
+    coneangles = [0.25,0.5,1.,1.5,2.]
+
+    count = 0
+    for location in locations:
+        extra_particles = get_particles(f"/Event/HLT2/{hlt2_line}/{location}/Particles")
+
+        for coneangle in coneangles:
+            intermediate_RTAlg = VertexAndConeIsolation(
+                name=location+"_"+str(coneangle),
+                reference_particles=intermediate_particles,
+                related_particles=extra_particles,
+                cut=F.DR2<coneangle)
+
+            if count == 0:
+                intermediate_iso_variables = ParticleIsolation(isolation_alg=intermediate_RTAlg,array_indx_name='indx')
+            else:
+                intermediate_iso_variables += ParticleIsolation(isolation_alg=intermediate_RTAlg,array_indx_name='indx')
+            count += 1
+
+
+    return intermediate_iso_variables
diff --git a/Charm_2024validation/tmp.yaml b/Charm_2024validation/tmp.yaml
new file mode 100644
index 0000000000..c871485c24
--- /dev/null
+++ b/Charm_2024validation/tmp.yaml
@@ -0,0 +1,12 @@
+( '27186011', 'dst_to_dee', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27185021', 'dst_to_dee', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27184011', 'dst_to_dee', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27186011', 'dst_to_dee', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '27185021', 'dst_to_dee', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '27184011', 'dst_to_dee', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '27186011', 'dst_to_dee', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '27185021', 'dst_to_dee', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '27184011', 'dst_to_dee', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '27186011', 'dst_to_dee', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27185021', 'dst_to_dee', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27184011', 'dst_to_dee', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-- 
GitLab


From 1461a3acb7c05e751e37b96942283dee8ee14106 Mon Sep 17 00:00:00 2001
From: Serena Maccolini <serena.maccolini@cern.ch>
Date: Mon, 15 Jul 2024 17:24:41 +0200
Subject: [PATCH 04/51] adjust info.yaml

---
 Charm_2024validation/info.yaml | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/Charm_2024validation/info.yaml b/Charm_2024validation/info.yaml
index 26de654976..f49943e7e9 100644
--- a/Charm_2024validation/info.yaml
+++ b/Charm_2024validation/info.yaml
@@ -79,7 +79,7 @@ defaults:
       simulation: True
       data_type: "Upgrade"
       scheduler_legacy_mode: False
-      evt_max: 1000
+      evt_max: -1
 
 {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2:
   application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
@@ -116,7 +116,6 @@ MC_{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}:
       event_store: HiveWhiteBoard
       input_process: "Hlt2"
       input_manifest_file: "HLT2.tck.json"
-      write_decoding_keys_to_git: false
       
 {%- endfor %}
 {%- endfor %}
-- 
GitLab


From 5c486ab11e15aeb7215844b99d6e084a2225b3b6 Mon Sep 17 00:00:00 2001
From: Serena Maccolini <serena.maccolini@cern.ch>
Date: Mon, 15 Jul 2024 18:00:52 +0200
Subject: [PATCH 05/51] cleaning up

---
 Charm_2024validation/README.md                |   68 -
 Charm_2024validation/dummy.yaml               |   16 -
 Charm_2024validation/info.yaml                |  121 --
 Charm_2024validation/info_MC_4localtest.yaml  |  122 --
 Charm_2024validation/info_MC_noUT.yaml        |  121 --
 Charm_2024validation/info_data.yaml           |   53 -
 Charm_2024validation/info_data_noUT.yaml      |   50 -
 Charm_2024validation/main_d0_to_hh.py         |   58 -
 Charm_2024validation/main_d0_to_hhhh.py       |   40 -
 Charm_2024validation/main_d0_to_hhpi0.py      |   43 -
 Charm_2024validation/main_d0_to_kshh.py       |   75 -
 Charm_2024validation/main_d0_to_ksks.py       |   59 -
 Charm_2024validation/main_d_to_hhh.py         |   63 -
 Charm_2024validation/main_d_to_ksh.py         |   48 -
 .../main_detection_asymmetry.py               |   31 -
 Charm_2024validation/main_dst_to_dee.py       |   42 -
 Charm_2024validation/main_rare_charm.py       |   41 -
 Charm_2024validation/options/d0_to_hh.py      |  432 -----
 Charm_2024validation/options/d0_to_hh_MC.py   |   99 -
 Charm_2024validation/options/d0_to_hhhh.py    |  247 ---
 Charm_2024validation/options/d0_to_hhhh_MC.py |   43 -
 Charm_2024validation/options/d0_to_hhpi0.py   |  359 ----
 .../options/d0_to_hhpi0_MC.py                 |   44 -
 Charm_2024validation/options/d0_to_kshh.py    | 1585 -----------------
 Charm_2024validation/options/d0_to_kshh_MC.py |   44 -
 Charm_2024validation/options/d0_to_ksks.py    | 1049 -----------
 Charm_2024validation/options/d0_to_ksks_MC.py |   46 -
 Charm_2024validation/options/d_to_hhh.py      |  503 ------
 Charm_2024validation/options/d_to_hhh_MC.py   |   92 -
 Charm_2024validation/options/d_to_ksh.py      |  313 ----
 Charm_2024validation/options/d_to_ksh_MC.py   |   68 -
 .../options/detection_asymmetry.py            |  191 --
 Charm_2024validation/options/dst_to_dee.py    |  296 ---
 Charm_2024validation/options/hlt1.py          |   33 -
 Charm_2024validation/options/hlt2/d0_to_hh.py |    9 -
 .../options/hlt2/d0_to_hhhh.py                |    8 -
 .../options/hlt2/d0_to_hhpi0.py               |    8 -
 .../options/hlt2/d0_to_kshh.py                |    8 -
 .../options/hlt2/d0_to_ksks.py                |    8 -
 Charm_2024validation/options/hlt2/d_to_hhh.py |   10 -
 Charm_2024validation/options/hlt2/d_to_ksh.py |   10 -
 .../options/hlt2/dst_to_dee.py                |    9 -
 Charm_2024validation/options/hlt2/hlt2.py     |   32 -
 .../options/hlt2/hlt2_d0_to_hh.py             |   41 -
 .../options/hlt2/hlt2_d0_to_hhhh.py           |   40 -
 .../options/hlt2/hlt2_d0_to_hhpi0.py          |   40 -
 .../options/hlt2/hlt2_d0_to_kshh.py           |   40 -
 .../options/hlt2/hlt2_d0_to_ksks.py           |   40 -
 .../options/hlt2/hlt2_d_to_hhh.py             |   42 -
 .../options/hlt2/hlt2_d_to_ksh.py             |   42 -
 .../options/hlt2/hlt2_dst_to_dee.py           |   41 -
 .../options/hlt2/hlt2_rare_charm.py           |   40 -
 Charm_2024validation/options/hlt2/hlt2noUT.py |   32 -
 .../options/hlt2/make_hlt2_decay.sh           |    9 -
 .../options/hlt2/rare_charm.py                |    8 -
 Charm_2024validation/options/rare_charm.py    |  496 ------
 Charm_2024validation/options/tupling.py       |  986 ----------
 Charm_2024validation/tmp.yaml                 |   12 -
 58 files changed, 8506 deletions(-)
 delete mode 100644 Charm_2024validation/README.md
 delete mode 100644 Charm_2024validation/dummy.yaml
 delete mode 100644 Charm_2024validation/info.yaml
 delete mode 100644 Charm_2024validation/info_MC_4localtest.yaml
 delete mode 100644 Charm_2024validation/info_MC_noUT.yaml
 delete mode 100644 Charm_2024validation/info_data.yaml
 delete mode 100644 Charm_2024validation/info_data_noUT.yaml
 delete mode 100644 Charm_2024validation/main_d0_to_hh.py
 delete mode 100644 Charm_2024validation/main_d0_to_hhhh.py
 delete mode 100644 Charm_2024validation/main_d0_to_hhpi0.py
 delete mode 100644 Charm_2024validation/main_d0_to_kshh.py
 delete mode 100644 Charm_2024validation/main_d0_to_ksks.py
 delete mode 100644 Charm_2024validation/main_d_to_hhh.py
 delete mode 100644 Charm_2024validation/main_d_to_ksh.py
 delete mode 100644 Charm_2024validation/main_detection_asymmetry.py
 delete mode 100644 Charm_2024validation/main_dst_to_dee.py
 delete mode 100644 Charm_2024validation/main_rare_charm.py
 delete mode 100644 Charm_2024validation/options/d0_to_hh.py
 delete mode 100644 Charm_2024validation/options/d0_to_hh_MC.py
 delete mode 100644 Charm_2024validation/options/d0_to_hhhh.py
 delete mode 100644 Charm_2024validation/options/d0_to_hhhh_MC.py
 delete mode 100644 Charm_2024validation/options/d0_to_hhpi0.py
 delete mode 100644 Charm_2024validation/options/d0_to_hhpi0_MC.py
 delete mode 100644 Charm_2024validation/options/d0_to_kshh.py
 delete mode 100644 Charm_2024validation/options/d0_to_kshh_MC.py
 delete mode 100644 Charm_2024validation/options/d0_to_ksks.py
 delete mode 100644 Charm_2024validation/options/d0_to_ksks_MC.py
 delete mode 100644 Charm_2024validation/options/d_to_hhh.py
 delete mode 100644 Charm_2024validation/options/d_to_hhh_MC.py
 delete mode 100644 Charm_2024validation/options/d_to_ksh.py
 delete mode 100644 Charm_2024validation/options/d_to_ksh_MC.py
 delete mode 100644 Charm_2024validation/options/detection_asymmetry.py
 delete mode 100644 Charm_2024validation/options/dst_to_dee.py
 delete mode 100644 Charm_2024validation/options/hlt1.py
 delete mode 100644 Charm_2024validation/options/hlt2/d0_to_hh.py
 delete mode 100644 Charm_2024validation/options/hlt2/d0_to_hhhh.py
 delete mode 100644 Charm_2024validation/options/hlt2/d0_to_hhpi0.py
 delete mode 100644 Charm_2024validation/options/hlt2/d0_to_kshh.py
 delete mode 100644 Charm_2024validation/options/hlt2/d0_to_ksks.py
 delete mode 100644 Charm_2024validation/options/hlt2/d_to_hhh.py
 delete mode 100644 Charm_2024validation/options/hlt2/d_to_ksh.py
 delete mode 100644 Charm_2024validation/options/hlt2/dst_to_dee.py
 delete mode 100644 Charm_2024validation/options/hlt2/hlt2.py
 delete mode 100644 Charm_2024validation/options/hlt2/hlt2_d0_to_hh.py
 delete mode 100644 Charm_2024validation/options/hlt2/hlt2_d0_to_hhhh.py
 delete mode 100644 Charm_2024validation/options/hlt2/hlt2_d0_to_hhpi0.py
 delete mode 100644 Charm_2024validation/options/hlt2/hlt2_d0_to_kshh.py
 delete mode 100644 Charm_2024validation/options/hlt2/hlt2_d0_to_ksks.py
 delete mode 100644 Charm_2024validation/options/hlt2/hlt2_d_to_hhh.py
 delete mode 100644 Charm_2024validation/options/hlt2/hlt2_d_to_ksh.py
 delete mode 100644 Charm_2024validation/options/hlt2/hlt2_dst_to_dee.py
 delete mode 100644 Charm_2024validation/options/hlt2/hlt2_rare_charm.py
 delete mode 100644 Charm_2024validation/options/hlt2/hlt2noUT.py
 delete mode 100644 Charm_2024validation/options/hlt2/make_hlt2_decay.sh
 delete mode 100644 Charm_2024validation/options/hlt2/rare_charm.py
 delete mode 100644 Charm_2024validation/options/rare_charm.py
 delete mode 100644 Charm_2024validation/options/tupling.py
 delete mode 100644 Charm_2024validation/tmp.yaml

diff --git a/Charm_2024validation/README.md b/Charm_2024validation/README.md
deleted file mode 100644
index f061ea162c..0000000000
--- a/Charm_2024validation/README.md
+++ /dev/null
@@ -1,68 +0,0 @@
-Analysis production for 2024 data validation within the Charm WG.
-
-For easy tests, eg. on `d_to_hhh` subset:
-```sh
-lb-run DaVinci/v64r2 lbexec Charm_2024validation.main_d_to_hhh:main Charm_2024validation/dummy.yaml
-```
-
-Decays and Hlt2 lines considered are:
-- `d0_to_hh.py`:
-  - Dst2D0pi_D02Kpi_RS     "Hlt2Charm_DstpToD0Pip_D0ToKmPip"
-  - Dst2D0pi_D02Kpi_WS     "Hlt2Charm_DstpToD0Pip_D0ToKpPim"
-  - Dst2D0pi_D02KK     "Hlt2Charm_DstpToD0Pip_D0ToKmKp"
-  - Dst2D0pi_D02pipi     "Hlt2Charm_DstpToD0Pip_D0ToPimPip"
-  - D02Kpi     "Hlt2Charm_D0ToKmPip"
-  - D02KK     "Hlt2Charm_D0ToKmKp"
-  - D02pipi     "Hlt2Charm_D0ToPimPip"
-  - Dst2D0pi_D02Kpi_RS_LowBias     "Hlt2Charm_DstpToD0Pip_D0ToKmPip_LowBias"
-  - Dst2D0pi_D02Kpi_WS_LowBias     "Hlt2Charm_DstpToD0Pip_D0ToKpPim_LowBias"
-  - Dst2D0pi_D02KK_LowBias     "Hlt2Charm_DstpToD0Pip_D0ToKmKp_LowBias"
-  - Dst2D0pi_D02pipi_LowBias     "Hlt2Charm_DstpToD0Pip_D0ToPimPip_LowBias"
-  - D02Kpi_LowBias     "Hlt2Charm_D0ToKmPip_LowBias"
-  - D02KK_LowBias     "Hlt2Charm_D0ToKmKp_LowBias"
-  - D02pipi_LowBias     "Hlt2Charm_D0ToPimPip_LowBias"
-- `d_to_ksh.py`:
-  - D2KSpi_LL     "Hlt2Charm_DpDspToKsPip_LL"
-  - D2KSpi_LD     "Hlt2Charm_DpDspToKsPip_LD"
-  - D2KSpi_DD     "Hlt2Charm_DpDspToKsPip_DD"
-  - D2KSK_LL     "Hlt2Charm_DpDspToKsKp_LL"
-  - D2KSK_LD     "Hlt2Charm_DpDspToKsKp_LD"
-  - D2KSK_DD     "Hlt2Charm_DpDspToKsKp_DD"
-- `d_to_hhh.py`:
-  - D2Kpipi     "Hlt2Charm_DpDspToKmPipPip"
-  - D2Kpipi_NoCuts     "Hlt2Charm_DpDspToKmPipPip_NoCuts"
-  - Ds2KKpi     "Hlt2Charm_DspToKmKpPip"
-  - Ds2KKpi_NoCuts     "Hlt2Charm_DspToKmKpPip_NoCuts"
-  - D2pipipi     "Hlt2Charm_DpDspToPimPipPip"
-  - D2pipipi_NoCuts     "Hlt2Charm_DpDspToPimPipPip_NoCuts"
-- `d0_to_hhpi0.py`:
-  - Dst2D0pi_D02Kpipi0 "Hlt2Charm_DstpToD0Pip_D0ToKmPipPi0_{M,R}"
-  - Dst2D0pi_D02KKpi0 "Hlt2Charm_DstpToD0Pip_D0ToKmKpPi0_{M,R}"
-  - Dst2D0pi_D02pipipi0 "Hlt2Charm_DstpToD0Pip_D0ToPimPipPi0_{M,R}"
-- `detection_asymmetry.py`:
-  - D2Kpipi_ADet "Hlt2Charm_DpToKmPipPip_ADet"
-  - D2KSK_LL_ADet "Hlt2Charm_DspToKsKp_LL_ADet"
-  - D2KSpi_LL_ADet "Hlt2Charm_DpToKsPip_LL_ADet"
-  - D2pipipi_ADet "Hlt2Charm_DspToPimPipPip_ADet"
-  - Ds2KKpi_ADet "Hlt2Charm_DspToKmKpPip_ADet"
-  - Lc2KSp_LL_ADet "Hlt2Charm_LcpToPpKs_LL_ADet"
-  - Lc2pKpi_ADet "Hlt2Charm_LcpToPpKmPip_ADet"
-- `rare_charm.py`:
-  - D2pimumu "Hlt2Charm_DpDspToPipMumMup"
-  - D2pimumu_WS "Hlt2Charm_DpDspToPipMupMup_RareCharmControl"
-  - Dst2D0pi_D02Kpimumu_RS "Hlt2Charm_DstpToD0Pip_D0ToKmPipMumMup"
-- `d0_to_kshh.py`:
-- `d0_to_ksks.py`:
-- `dst_to_dee.py`:
-  -  Dst02D0EmEp_D02KmPip_OS    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS',
-  -  Dst02D0EmEp_D02KmPip_SS 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS',
-  -  Dst02D0EmEp_D02KmPip_OS_MVA 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS_MVA',
-  -  Dst02D0EmEp_D02KmPip_SS_MVA 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS_MVA',
-  -  Dst02D0EmEp_D02KmPimPipPip_OS 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS',
-  -  Dst02D0EmEp_D02KmPimPipPip_SS 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS',
-  -  Dst02D0EmEp_D02KmPimPipPip_OS_MVA 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS_MVA',
-  -  Dst02D0EmEp_D02KmPimPipPip_SS_MVA 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS_MVA',
-  -  Dstp2DpDspEmEp_DpDsp2KmKpPip_OS 'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS',
-  -  Dstp2DpDspEmEp_DpDsp2KmKpPip_SS 'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS',
-  -  Dstp2DpDspEmEp_DpDsp2KmKpPip_OS_MVA 'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS_MVA',
-  -  Dstp2DpDspEmEp_DpDsp2KmKpPip_SS_MVA'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS_MVA',
diff --git a/Charm_2024validation/dummy.yaml b/Charm_2024validation/dummy.yaml
deleted file mode 100644
index 5bebae4ac3..0000000000
--- a/Charm_2024validation/dummy.yaml
+++ /dev/null
@@ -1,16 +0,0 @@
-input_files:
-- root://myProxy@lhcbxrootd-kit.gridka.de//pnfs/gridka.de/lhcb/LHCb-Disk/lhcb/LHCb/Collision23/CHARM.DST/00198130/0000/00198130_00000552_1.charm.dst
-input_raw_format: 0.5
-input_type: ROOT
-output_type: ROOT
-event_store: HiveWhiteBoard
-simulation: False
-data_type: "Upgrade"
-geometry_version: run3/trunk
-conditions_version: Alignment2023_HLT2Processing_26_8_2023
-scheduler_legacy_mode: False
-input_process: "TurboPass"
-input_stream: "charm"
-histo_file: CHARM_HISTO.ROOT
-ntuple_file: CHARM.ROOT
-evt_max: 1000
diff --git a/Charm_2024validation/info.yaml b/Charm_2024validation/info.yaml
deleted file mode 100644
index f49943e7e9..0000000000
--- a/Charm_2024validation/info.yaml
+++ /dev/null
@@ -1,121 +0,0 @@
-defaults:
-  inform:
-    - serena.maccolini@cern.ch
-  wg: Charm
-
-{%- set conditions = [
-  "MagDown",
-]%}
-
-{%- set evttype_subsample_nutext_nu_dir1_dir2_dddb = [
-( '27163102', 'd0_to_hh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163101', 'd0_to_hh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163100', 'd0_to_hh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '23103042', 'd_to_hhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '23263022', 'd_to_hhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '21263012', 'd_to_hhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163471', 'd0_to_hhpi0', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27165903', 'd0_to_kshh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27165071', 'd0_to_hhhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27265008', 'd0_to_hhhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27265009', 'd0_to_hhhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27165072', 'd0_to_hhhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '23103111', 'd_to_ksh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '21103101', 'd_to_ksh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '23173003', 'rare_charm', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-
-( '27163102', 'd0_to_hh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163101', 'd0_to_hh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163100', 'd0_to_hh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '23103042', 'd_to_hhh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '23263022', 'd_to_hhh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '21263012', 'd_to_hhh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163471', 'd0_to_hhpi0', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '27165903', 'd0_to_kshh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '27165071', 'd0_to_hhhh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-
-( '27163102', 'd0_to_hh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163101', 'd0_to_hh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163100', 'd0_to_hh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '23103042', 'd_to_hhh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '23263022', 'd_to_hhh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '21263012', 'd_to_hhh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163471', 'd0_to_hhpi0', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '27165903', 'd0_to_kshh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '27165071', 'd0_to_hhhh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-
-( '27163102', 'd0_to_hh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163101', 'd0_to_hh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163100', 'd0_to_hh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '23103042', 'd_to_hhh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '23263022', 'd_to_hhh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '21263012', 'd_to_hhh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163471', 'd0_to_hhpi0', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27165903', 'd0_to_kshh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27165071', 'd0_to_hhhh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-
-]%}
-
-
-
-{%- for evttype, id, nutext, nu, dir1, dir2, dddb in evttype_subsample_nutext_nu_dir1_dir2_dddb %}
-
-{% for polarity in conditions %}
-
-{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1:
-  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
-  input:
-    bk_query: "/MC/{{dir1}}/Beam6800GeV-2024{{dir2}}-{{polarity}}-Nu{{nu}}-25ns-Pythia8/Sim10d/{{evttype}}/DIGI"
-    n_test_lfns: 3
-  output: HLT1.DST
-  options:
-    entrypoint: Charm_2024validation.options.hlt1:alg_config
-    extra_options:
-      input_raw_format: 0.5
-      conddb_tag: sim10-2024.Q1.2-v1.1-md100
-      dddb_tag: '{{dddb}}'
-      input_type: ROOT
-      output_type: ROOT
-      simulation: True
-      data_type: "Upgrade"
-      scheduler_legacy_mode: False
-      evt_max: -1
-
-{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2:
-  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
-  input:
-    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1
-  output: HLT2.DST
-  options:
-    entrypoint: Charm_2024validation.options.hlt2.hlt2_{{id}}:alg_config
-    extra_options:
-      conddb_tag: sim10-2024.Q1.2-v1.1-md100
-      dddb_tag: '{{dddb}}'
-      input_raw_format: 0.5
-      input_type: "ROOT"
-      output_type: "ROOT"
-      simulation: True
-      data_type: "Upgrade"
-      output_manifest_file: "HLT2.tck.json"
-      scheduler_legacy_mode: False
-
-MC_{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}:
-  application: "DaVinci/v64r7@x86_64_v3-el9-gcc13+detdesc-opt+g"
-  input:
-    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2
-  output: DVTUPLE.ROOT
-  options:
-    entrypoint: Charm_2024validation.main_{{id}}:main
-    extra_options:
-      conddb_tag: sim10-2024.Q1.2-v1.1-md100
-      dddb_tag: '{{dddb}}'
-      input_raw_format: 0.5
-      input_type: ROOT
-      simulation: True
-      data_type: "Upgrade"
-      event_store: HiveWhiteBoard
-      input_process: "Hlt2"
-      input_manifest_file: "HLT2.tck.json"
-      
-{%- endfor %}
-{%- endfor %}
diff --git a/Charm_2024validation/info_MC_4localtest.yaml b/Charm_2024validation/info_MC_4localtest.yaml
deleted file mode 100644
index 3d18e13274..0000000000
--- a/Charm_2024validation/info_MC_4localtest.yaml
+++ /dev/null
@@ -1,122 +0,0 @@
-defaults:
-  inform:
-    - serena.maccolini@cern.ch
-  wg: Charm
-
-{%- set conditions = [
-  "MagDown",
-]%}
-
-{%- set evttype_subsample_nutext_nu_dir1_dir2_dddb_geometry = [
-( '27163102', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163101', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163100', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23103042', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23263022', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '21263012', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163471', 'd0_to_hhpi0', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165903', 'd0_to_kshh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165071', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27265008', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27265009', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165072', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23103111', 'd_to_ksh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '21103101', 'd_to_ksh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23173003', 'rare_charm', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163102', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163101', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163100', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23103042', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23263022', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '21263012', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163471', 'd0_to_hhpi0', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165903', 'd0_to_kshh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165071', 'd0_to_hhhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163102', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163101', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163100', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23103042', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23263022', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '21263012', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163471', 'd0_to_hhpi0', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165903', 'd0_to_kshh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165071', 'd0_to_hhhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163102', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163101', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163100', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23103042', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23263022', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '21263012', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163471', 'd0_to_hhpi0', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165903', 'd0_to_kshh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165071', 'd0_to_hhhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165901', 'd0_to_ksks', '7p6', '7.6', 'Dev', '', 'dddb-20231017', 'run3/trunk'),
-]%}
-
-
-
-{%- for evttype, id, nutext, nu, dir1, dir2, dddb, geometry in evttype_subsample_nutext_nu_dir1_dir2_dddb_geometry %}
-
-{% for polarity in conditions %}
-
-{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1:
-  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
-  input:
-    bk_query: "/MC/{{dir1}}/Beam6800GeV-expected-2024{{dir2}}-{{polarity}}-Nu{{nu}}-25ns-Pythia8/Sim10c/{{evttype}}/DIGI"
-    n_test_lfns: 3
-  output: HLT1.DST
-  options:
-    entrypoint: Charm_2024validation.options.hlt1:alg_config
-    extra_options:
-      input_raw_format: 0.5
-      conddb_tag: sim-20231017-vc-md100
-      dddb_tag: '{{dddb}}'
-      input_type: ROOT
-      output_type: ROOT
-      simulation: True
-      data_type: "Upgrade"
-      scheduler_legacy_mode: False
-      geometry_version: "{{geometry}}"
-      evt_max: 1000
-
-{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2:
-  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
-  input:
-    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1
-  output: HLT2.DST
-  options:
-    entrypoint: Charm_2024validation.options.hlt2.hlt2_{{id}}:alg_config
-    extra_options:
-      conddb_tag: sim-20231017-vc-md100
-      dddb_tag: '{{dddb}}'
-      input_raw_format: 0.5
-      input_type: "ROOT"
-      output_type: "ROOT"
-      simulation: True
-      data_type: "Upgrade"
-      output_manifest_file: "HLT2.tck.json"
-      scheduler_legacy_mode: False
-      geometry_version: "{{geometry}}"
-
-MC_{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}:
-  application: "DaVinci/v64r3@x86_64_v3-el9-gcc13+detdesc-opt+g"
-  input:
-    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2
-  output: DVTUPLE.ROOT
-  options:
-    entrypoint: Charm_2024validation.main_{{id}}:main
-    extra_options:
-      conddb_tag: sim-20231017-vc-md100
-      dddb_tag: '{{dddb}}'
-      input_raw_format: 0.5
-      input_type: ROOT
-      simulation: True
-      data_type: "Upgrade"
-      event_store: HiveWhiteBoard
-      geometry_version: "{{geometry}}"
-      input_process: "Hlt2"
-      input_manifest_file: "HLT2.tck.json"
-      write_decoding_keys_to_git: false
-
-{%- endfor %}
-{%- endfor %}
diff --git a/Charm_2024validation/info_MC_noUT.yaml b/Charm_2024validation/info_MC_noUT.yaml
deleted file mode 100644
index 52df9e4e96..0000000000
--- a/Charm_2024validation/info_MC_noUT.yaml
+++ /dev/null
@@ -1,121 +0,0 @@
-defaults:
-  inform:
-    - serena.maccolini@cern.ch
-  wg: Charm
-
-{%- set conditions = [
-  "MagDown",
-]%}
-
-{%- set evttype_subsample_nutext_nu_dir1_dir2_dddb_geometry = [
-( '27163102', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163101', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163100', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23103042', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23263022', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '21263012', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163471', 'd0_to_hhpi0', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165903', 'd0_to_kshh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165071', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27265008', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27265009', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165072', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23103111', 'd_to_ksh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '21103101', 'd_to_ksh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23173003', 'rare_charm', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163102', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163101', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163100', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23103042', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23263022', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '21263012', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163471', 'd0_to_hhpi0', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165903', 'd0_to_kshh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165071', 'd0_to_hhhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163102', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163101', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163100', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23103042', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23263022', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '21263012', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163471', 'd0_to_hhpi0', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165903', 'd0_to_kshh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165071', 'd0_to_hhhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163102', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163101', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163100', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23103042', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23263022', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '21263012', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163471', 'd0_to_hhpi0', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165903', 'd0_to_kshh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165071', 'd0_to_hhhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165901', 'd0_to_ksks', '7p6', '7.6', 'Dev', '', 'dddb-20231017', 'run3/trunk'),
-]%}
-
-
-
-{%- for evttype, id, nutext, nu, dir1, dir2, dddb, geometry in evttype_subsample_nutext_nu_dir1_dir2_dddb_geometry %}
-
-{% for polarity in conditions %}
-
-{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1:
-  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
-  input:
-    bk_query: "/MC/{{dir1}}/Beam6800GeV-expected-2024{{dir2}}-{{polarity}}-Nu{{nu}}-25ns-Pythia8/Sim10c/{{evttype}}/DIGI"
-    n_test_lfns: 3
-  output: HLT1.DST
-  options:
-    entrypoint: Charm_2024validation.options.hlt1:alg_config
-    extra_options:
-      input_raw_format: 0.5
-      conddb_tag: sim-20231017-vc-md100
-      dddb_tag: '{{dddb}}'
-      input_type: ROOT
-      output_type: ROOT
-      simulation: True
-      data_type: "Upgrade"
-      scheduler_legacy_mode: False
-      geometry_version: "{{geometry}}"
-      evt_max: -1
-
-{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2:
-  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
-  input:
-    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1
-  output: HLT2.DST
-  options:
-    entrypoint: Charm_2024validation.options.hlt2.hlt2_{{id}}:alg_config
-    extra_options:
-      conddb_tag: sim-20231017-vc-md100
-      dddb_tag: '{{dddb}}'
-      input_raw_format: 0.5
-      input_type: "ROOT"
-      output_type: "ROOT"
-      simulation: True
-      data_type: "Upgrade"
-      output_manifest_file: "HLT2.tck.json"
-      scheduler_legacy_mode: False
-      geometry_version: "{{geometry}}"
-
-MC_{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}:
-  application: "DaVinci/v64r3@x86_64_v3-el9-gcc13+detdesc-opt+g"
-  input:
-    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2
-  output: DVTUPLE.ROOT
-  options:
-    entrypoint: Charm_2024validation.main_{{id}}:main
-    extra_options:
-      conddb_tag: sim-20231017-vc-md100
-      dddb_tag: '{{dddb}}'
-      input_raw_format: 0.5
-      input_type: ROOT
-      simulation: True
-      data_type: "Upgrade"
-      event_store: HiveWhiteBoard
-      geometry_version: "{{geometry}}"
-      input_process: "Hlt2"
-      input_manifest_file: "HLT2.tck.json"
-
-{%- endfor %}
-{%- endfor %}
diff --git a/Charm_2024validation/info_data.yaml b/Charm_2024validation/info_data.yaml
deleted file mode 100644
index cf3b7dcdf9..0000000000
--- a/Charm_2024validation/info_data.yaml
+++ /dev/null
@@ -1,53 +0,0 @@
-defaults:
-  inform:
-    - serena.maccolini@cern.ch
-  wg: Charm
-
-{%- set conditions = [
-  "MagDown",
-]%}
-
-
-
-{%- set subsamples = [
-  "d0_to_hh",
-  "d_to_hhh",
-  "d_to_ksh",
-  "d0_to_hhpi0",
-  "d0_to_kshh",
-  "d0_to_ksks",
-  "d0_to_hhhh",
-  "rare_charm",
-  "detection_asymmetry",
-  "dst_to_dee",
-]%}
-
-{% for id in subsamples %}
-{% for polarity in conditions %}
-
-{{id}}_2024_{{ polarity }}:
-  application: "DaVinci/v64r7"
-  input:
-    bk_query: "/LHCb/Collision24/Beam6800GeV-VeloClosed-{{polarity}}/Real Data/Sprucing24c2/94000000/CHARM.DST"
-
-    dq_flags:
-      - UNCHECKED
-      - OK
-    keep_running: true
-  output: DVTUPLE_{{id}}.ROOT
-  options:
-    entrypoint: Charm_2024validation.main_{{id}}:main
-    extra_options:
-      input_raw_format: 0.5
-      input_type: ROOT
-      simulation: False
-      data_type: "Upgrade"
-      event_store: HiveWhiteBoard
-      geometry_version: run3/2024.Q1.2-v00.00
-      conditions_version: master
-      input_process: "TurboPass"
-      input_stream: "charm"
-      evt_max: -1
-
-{%- endfor %}
-{%- endfor %}
diff --git a/Charm_2024validation/info_data_noUT.yaml b/Charm_2024validation/info_data_noUT.yaml
deleted file mode 100644
index 8c750c72d0..0000000000
--- a/Charm_2024validation/info_data_noUT.yaml
+++ /dev/null
@@ -1,50 +0,0 @@
-defaults:
-  inform:
-    - serena.maccolini@cern.ch
-  wg: Charm
-
-{%- set conditions = [
-  "MagDown",
-]%}
-
-
-
-{%- set subsamples = [
-  "d0_to_hh",
-  "d_to_hhh",
-  "d_to_ksh",
-  "d0_to_hhpi0",
-  "d0_to_kshh",
-  "d0_to_ksks",
-  "d0_to_hhhh",
-  "rare_charm",
-  "detection_asymmetry",
-]%}
-
-{% for id in subsamples %}
-{% for polarity in conditions %}
-
-{{id}}_2024_{{ polarity }}:
-  application: "DaVinci/v64r5"
-  input:
-    bk_query: "/LHCb/Collision24/Beam6800GeV-VeloClosed-{{polarity}}-Excl-UT/Real Data/Sprucing24c1/94000000/CHARM.DST"
-    dq_flags:
-      - UNCHECKED
-      - OK
-    keep_running: true
-  output: DVTUPLE_{{id}}.ROOT
-  options:
-    entrypoint: Charm_2024validation.main_{{id}}:main
-    extra_options:
-      input_raw_format: 0.5
-      input_type: ROOT
-      simulation: False
-      data_type: "Upgrade"
-      event_store: HiveWhiteBoard
-      geometry_version: run3/2024.Q1.2-v00.00
-      conditions_version: master
-      input_process: "TurboPass"
-      input_stream: "charm"
-
-{%- endfor %}
-{%- endfor %}
diff --git a/Charm_2024validation/main_d0_to_hh.py b/Charm_2024validation/main_d0_to_hh.py
deleted file mode 100644
index 12eea15463..0000000000
--- a/Charm_2024validation/main_d0_to_hh.py
+++ /dev/null
@@ -1,58 +0,0 @@
-###############################################################################
-# (c) Copyright 2021-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 .options.d0_to_hh import *
-from .options.d0_to_hh_MC import *
-
-from DaVinci import Options, make_config
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-        #D02hh
-        "D02Kpi" : maketuple_D02Kpi(options, pvs, rec_summary),
-        "D02KK" : maketuple_D02KK(options, pvs, rec_summary),
-        "D02pipi" : maketuple_D02pipi(options, pvs, rec_summary),
-        #Dst2D0pi_D02hh
-        "Dst2D0pi_D02Kpi_RS" : maketuple_Dst2D0pi_D02Kpi_RS(options, pvs, rec_summary),
-        "Dst2D0pi_D02Kpi_WS" : maketuple_Dst2D0pi_D02Kpi_WS(options, pvs, rec_summary),
-        "Dst2D0pi_D02KK" : maketuple_Dst2D0pi_D02KK(options, pvs, rec_summary),
-        "Dst2D0pi_D02pipi" : maketuple_Dst2D0pi_D02pipi(options, pvs, rec_summary),
-
-        ##LowBias
-        #D02hh
-        "D02Kpi_LowBias" : maketuple_D02Kpi_LowBias(options, pvs, rec_summary),
-        "D02KK_LowBias" : maketuple_D02KK_LowBias(options, pvs, rec_summary),
-        "D02pipi_LowBias" : maketuple_D02pipi_LowBias(options, pvs, rec_summary),
-        #Dst2D0pi_D02hh
-        "Dst2D0pi_D02Kpi_RS_LowBias" : maketuple_Dst2D0pi_D02Kpi_RS_LowBias(options, pvs, rec_summary),
-        "Dst2D0pi_D02Kpi_WS_LowBias" : maketuple_Dst2D0pi_D02Kpi_WS_LowBias(options, pvs, rec_summary),
-        "Dst2D0pi_D02KK_LowBias" : maketuple_Dst2D0pi_D02KK_LowBias(options, pvs, rec_summary),
-        "Dst2D0pi_D02pipi_LowBias" : maketuple_Dst2D0pi_D02pipi_LowBias(options, pvs, rec_summary),
-    }
-
-    MCtuples = {
-        "MC_Dst2D0pi_D02Kpi_RS" : maketuple_MC_Dst2D0pi_D02Kpi_RS(options, pvs, rec_summary),
-        "MC_Dst2D0pi_D02KK_RS" : maketuple_MC_Dst2D0pi_D02KK(options, pvs, rec_summary),
-        "MC_Dst2D0pi_D02pipi" : maketuple_MC_Dst2D0pi_D02pipi(options, pvs, rec_summary),
-    }
-
-    if options.simulation:
-        tuples = tuples | MCtuples
-
-    config = make_config(options, tuples)
-
-    return config
diff --git a/Charm_2024validation/main_d0_to_hhhh.py b/Charm_2024validation/main_d0_to_hhhh.py
deleted file mode 100644
index 5fb555ccfd..0000000000
--- a/Charm_2024validation/main_d0_to_hhhh.py
+++ /dev/null
@@ -1,40 +0,0 @@
-###############################################################################
-# (c) Copyright 2021-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 .options.d0_to_hhhh import *
-from .options.d0_to_hhhh_MC import *
-
-from DaVinci import Options, make_config
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-        
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-        "DstToD0pi_D0ToKKPiPi" : maketuple_DstToD0pi_D0ToKKPiPi(options, pvs, rec_summary),
-        "DstToD0pi_D0ToKPiPiPi" : maketuple_DstToD0pi_D0ToKPiPiPi(options, pvs, rec_summary),
-        "DstToD0pi_D0ToPiKPiPi" : maketuple_DstToD0pi_D0ToPiKPiPi(options, pvs, rec_summary),
-        "DstToD0pi_D0ToPiPiPiPi" : maketuple_DstToD0pi_D0ToPiPiPiPi(options, pvs, rec_summary),
-    }
-
-    MCtuples = {
-        "MC_DstToD0pi_D0ToKPiPiPi" : maketuple_MC_DstToD0pi_D0ToKPiPiPi(options, pvs, rec_summary),
-    }
-    
-    if options.simulation:
-        tuples = tuples | MCtuples
-        
-    config = make_config(options, tuples)
-
-    return config
diff --git a/Charm_2024validation/main_d0_to_hhpi0.py b/Charm_2024validation/main_d0_to_hhpi0.py
deleted file mode 100644
index ac59dc71d9..0000000000
--- a/Charm_2024validation/main_d0_to_hhpi0.py
+++ /dev/null
@@ -1,43 +0,0 @@
-###############################################################################
-# (c) Copyright 2021-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 .options.d0_to_hhpi0 import *
-from .options.d0_to_hhpi0_MC import *
-
-from DaVinci import Options, make_config
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-        
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-        #Dst2D0pi_D02hhpi0
-        "Dst2D0pi_D02Kpipi0_M" : maketuple_Dst2D0pi_D02Kpipi0_M(options, pvs, rec_summary),
-        "Dst2D0pi_D02KKpi0_M" : maketuple_Dst2D0pi_D02KKpi0_M(options, pvs, rec_summary),
-        "Dst2D0pi_D02pipipi0_M" : maketuple_Dst2D0pi_D02pipipi0_M(options, pvs, rec_summary),
-        "Dst2D0pi_D02Kpipi0_R" : maketuple_Dst2D0pi_D02Kpipi0_R(options, pvs, rec_summary),
-        "Dst2D0pi_D02KKpi0_R" : maketuple_Dst2D0pi_D02KKpi0_R(options, pvs, rec_summary),
-        "Dst2D0pi_D02pipipi0_R" : maketuple_Dst2D0pi_D02pipipi0_R(options, pvs, rec_summary),
-    }
-
-    MCtuples = {
-        "MC_Dst2D0pi_D02Kpipi0" : maketuple_MC_Dst2D0pi_D02Kpipi0(options, pvs, rec_summary),
-    }
-    
-    if options.simulation:
-        tuples = tuples | MCtuples
-        
-    config = make_config(options, tuples)
-
-    return config
diff --git a/Charm_2024validation/main_d0_to_kshh.py b/Charm_2024validation/main_d0_to_kshh.py
deleted file mode 100644
index f9cfbd58e2..0000000000
--- a/Charm_2024validation/main_d0_to_kshh.py
+++ /dev/null
@@ -1,75 +0,0 @@
-###############################################################################
-# (c) Copyright 2021-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 .options.d0_to_kshh import *
-from .options.d0_to_kshh_MC import *
-
-from DaVinci import Options, make_config
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-        #D02kshh
-        "D0ToKsPimPip_LL" : maketuple_D0ToKsPimPip_LL(options, pvs, rec_summary),
-        "D0ToKsPimPip_DD" : maketuple_D0ToKsPimPip_DD(options, pvs, rec_summary),
-        "D0ToKsKmPip_LL" : maketuple_D0ToKsKmPip_LL(options, pvs, rec_summary),
-        "D0ToKsKmPip_DD" : maketuple_D0ToKsKmPip_DD(options, pvs, rec_summary),
-        "D0ToKsKpPim_LL" : maketuple_D0ToKsKmPip_LL(options, pvs, rec_summary),
-        "D0ToKsKpPim_DD" : maketuple_D0ToKsKmPip_DD(options, pvs, rec_summary),
-        "D0ToKsKmKp_LL" : maketuple_D0ToKsKmKp_LL(options, pvs, rec_summary),
-        "D0ToKsKmKp_DD" : maketuple_D0ToKsKmKp_DD(options, pvs, rec_summary),
-        #Dst2D0pi_D02kshh
-        "DstpToD0Pip_D0ToKsPimPip_LL" : maketuple_DstpToD0Pip_D0ToKsPimPip_LL(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsPimPip_DD" : maketuple_DstpToD0Pip_D0ToKsPimPip_DD(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKmPip_LL" : maketuple_DstpToD0Pip_D0ToKsKmPip_LL(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKmPip_DD" : maketuple_DstpToD0Pip_D0ToKsKmPip_DD(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKpPim_LL" : maketuple_DstpToD0Pip_D0ToKsKmPip_LL(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKpPim_DD" : maketuple_DstpToD0Pip_D0ToKsKmPip_DD(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKmKp_LL" : maketuple_DstpToD0Pip_D0ToKsKmKp_LL(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKmKp_DD" : maketuple_DstpToD0Pip_D0ToKsKmKp_DD(options, pvs, rec_summary),
-
-        ##LowBias
-        #D02kshh
-        "D0ToKsPimPip_LL_LowBias" : maketuple_D0ToKsPimPip_LL_LowBias(options, pvs, rec_summary),
-        "D0ToKsPimPip_DD_LowBias" : maketuple_D0ToKsPimPip_DD_LowBias(options, pvs, rec_summary),
-        "D0ToKsKmPip_LL_LowBias" : maketuple_D0ToKsKmPip_LL_LowBias(options, pvs, rec_summary),
-        "D0ToKsKmPip_DD_LowBias" : maketuple_D0ToKsKmPip_DD_LowBias(options, pvs, rec_summary),
-        "D0ToKsKpPim_LL_LowBias" : maketuple_D0ToKsKmPip_LL_LowBias(options, pvs, rec_summary),
-        "D0ToKsKpPim_DD_LowBias" : maketuple_D0ToKsKmPip_DD_LowBias(options, pvs, rec_summary),
-        "D0ToKsKmKp_LL_LowBias" : maketuple_D0ToKsKmKp_LL_LowBias(options, pvs, rec_summary),
-        "D0ToKsKmKp_DD_LowBias" : maketuple_D0ToKsKmKp_DD_LowBias(options, pvs, rec_summary),
-        #Dst2D0pi_D02kshh
-        "DstpToD0Pip_D0ToKsPimPip_LL_LowBias" : maketuple_DstpToD0Pip_D0ToKsPimPip_LL_LowBias(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsPimPip_DD_LowBias" : maketuple_DstpToD0Pip_D0ToKsPimPip_DD_LowBias(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKmPip_LL_LowBias" : maketuple_DstpToD0Pip_D0ToKsKmPip_LL_LowBias(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKmPip_DD_LowBias" : maketuple_DstpToD0Pip_D0ToKsKmPip_DD_LowBias(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKpPim_LL_LowBias" : maketuple_DstpToD0Pip_D0ToKsKmPip_LL_LowBias(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKpPim_DD_LowBias" : maketuple_DstpToD0Pip_D0ToKsKmPip_DD_LowBias(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKmKp_LL_LowBias" : maketuple_DstpToD0Pip_D0ToKsKmKp_LL_LowBias(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKmKp_DD_LowBias" : maketuple_DstpToD0Pip_D0ToKsKmKp_DD_LowBias(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsPimPip_DD_NoBias" : maketuple_DstpToD0Pip_D0ToKsPimPip_LL_NoBias(options, pvs, rec_summary),
-    }
-
-    MCtuples = {
-        "MC_DstpToD0Pip_D0ToKsPimPip" : maketuple_MC_DstpToD0Pip_D0ToKsPimPip(options, pvs, rec_summary),
-    }
-
-    if options.simulation:
-        tuples = tuples | MCtuples
-
-    config = make_config(options, tuples)
-
-    return config
diff --git a/Charm_2024validation/main_d0_to_ksks.py b/Charm_2024validation/main_d0_to_ksks.py
deleted file mode 100644
index cb69552d78..0000000000
--- a/Charm_2024validation/main_d0_to_ksks.py
+++ /dev/null
@@ -1,59 +0,0 @@
-###############################################################################
-# (c) Copyright 2021-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.                                       #
-###############################################################################
-import Functors as F
-from Functors.math import log
-from DaVinci import Options, make_config
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunctorCollection
-import FunTuple.functorcollections as FC
-from FunTuple import FunTuple_Particles as Funtuple
-
-#D02KSKS
-from .options.d0_to_ksks import *
-from .options.d0_to_ksks_MC import *
-
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-        #D02KSKS
-        "Dst2D0pi_D02KSKS_LLLL" : maketuple_Dst2D0pi_D02KSKS_LLLL(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_LLLL_Tight" : maketuple_Dst2D0pi_D02KSKS_LLLL_Tight(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_LLDD" : maketuple_Dst2D0pi_D02KSKS_LLDD(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_LLDD_Tight" : maketuple_Dst2D0pi_D02KSKS_LLDD_Tight(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_DDDD" : maketuple_Dst2D0pi_D02KSKS_DDDD(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_DDDD_Tight" : maketuple_Dst2D0pi_D02KSKS_DDDD_Tight(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_ULLL" : maketuple_Dst2D0pi_D02KSKS_ULLL(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_ULLL_Tight" : maketuple_Dst2D0pi_D02KSKS_ULLL_Tight(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_ULDD" : maketuple_Dst2D0pi_D02KSKS_ULDD(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_ULDD_Tight" : maketuple_Dst2D0pi_D02KSKS_ULDD_Tight(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_LLLD" : maketuple_Dst2D0pi_D02KSKS_LLLD(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_LLLD_Tight" : maketuple_Dst2D0pi_D02KSKS_LLLD_Tight(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_DDLD" : maketuple_Dst2D0pi_D02KSKS_DDLD(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_DDLD_Tight" : maketuple_Dst2D0pi_D02KSKS_DDLD_Tight(options, pvs, rec_summary),
-    }
-
-    MCtuples = {
-        "MC_Dst2D0pi_D02KSKS_LLLL" : maketuple_MC_Dst2D0pi_D02KSKS_LLLL(options, pvs, rec_summary)
-    }
-
-    if options.simulation:
-        tuples = tuples | MCtuples
-        
-    config = make_config(options, tuples)
-
-    return config
diff --git a/Charm_2024validation/main_d_to_hhh.py b/Charm_2024validation/main_d_to_hhh.py
deleted file mode 100644
index 516e32b119..0000000000
--- a/Charm_2024validation/main_d_to_hhh.py
+++ /dev/null
@@ -1,63 +0,0 @@
-###############################################################################
-# (c) Copyright 2021-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 .options.d_to_hhh import *
-from .options.d_to_hhh_MC import *
-from .options.detection_asymmetry import *
-
-from DaVinci import Options, make_config
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-        #D2hhh
-        "D2Kpipi" : maketuple_D2Kpipi(options, pvs, rec_summary),
-        "D2Kpipi_NoCuts" : maketuple_D2Kpipi(options, pvs, rec_summary,True),
-        #"D2Kpipi_Kpi" : maketuple_D2Kpipi_Kpi(options, pvs, rec_summary), #subcomb of 2 out of 3 daughters
-        "Ds2KKpi" : maketuple_Ds2KKpi(options, pvs, rec_summary),
-        "Ds2KKpi_NoCuts" : maketuple_Ds2KKpi(options, pvs, rec_summary,True),
-        "D2pipipi" : maketuple_D2pipipi(options, pvs, rec_summary),
-        "D2pipipi_NoCuts" : maketuple_D2pipipi(options, pvs, rec_summary,True),
-        "D2pipiK" : maketuple_D2pipiK(options, pvs, rec_summary),
-        "D2pipiK_NoCuts" : maketuple_D2pipiK(options, pvs, rec_summary,True),
-        "D2KKK" : maketuple_D2KKK(options, pvs, rec_summary),
-        "D2KKK_NoCuts" : maketuple_D2KKK(options, pvs, rec_summary,True),
-        "D2piKK" : maketuple_D2piKK(options, pvs, rec_summary),
-        "D2piKK_NoCuts" : maketuple_D2piKK(options, pvs, rec_summary,True),
-        "B02Dpi_D2KKpi" : maketuple_B02Dpi_D2KKpi(options, pvs, rec_summary),
-        "B02Dpi_D2pipipi" : maketuple_B02Dpi_D2pipipi(options, pvs, rec_summary),
-        "Bs02Dspi_Ds2KKpi" : maketuple_Bs02Dspi_Ds2KKpi(options, pvs, rec_summary),
-        "Bs02Dspi_Ds2pipipi" : maketuple_Bs02Dspi_Ds2pipipi(options, pvs, rec_summary),
-        #ADet
-        "D2Kpipi_ADet" : maketuple_D2Kpipi_ADet(options, pvs, rec_summary),
-        "D2pipipi_ADet" : maketuple_D2pipipi_ADet(options, pvs, rec_summary),
-        "Ds2KKpi_ADet" : maketuple_Ds2KKpi_ADet(options, pvs, rec_summary),
-
-
-    }
-
-    MCtuples = {
-        "MC_D2Kpipi" : maketuple_MC_D2Kpipi(options, pvs, rec_summary),
-        "MC_Ds2KKpi" : maketuple_MC_Ds2KKpi(options, pvs, rec_summary)
-        "MC_Ds2KKK" : maketuple_MC_Ds2KKK(options, pvs, rec_summary)
-    }
-
-    if options.simulation:
-        tuples = tuples | MCtuples
-
-    config = make_config(options, tuples)
-
-    return config
diff --git a/Charm_2024validation/main_d_to_ksh.py b/Charm_2024validation/main_d_to_ksh.py
deleted file mode 100644
index 00ddc66093..0000000000
--- a/Charm_2024validation/main_d_to_ksh.py
+++ /dev/null
@@ -1,48 +0,0 @@
-###############################################################################
-# (c) Copyright 2021-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 .options.d_to_ksh import *
-from .options.d_to_ksh_MC import *
-from .options.detection_asymmetry import *
-
-from DaVinci import Options, make_config
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-        #D2KSh
-        "D2KSpi_LL" : maketuple_D2KSpi_LL(options, pvs, rec_summary),
-        "D2KSK_LL" : maketuple_D2KSK_LL(options, pvs, rec_summary),
-        "D2KSpi_LD" : maketuple_D2KSpi_LD(options, pvs, rec_summary),
-        "D2KSK_LD" : maketuple_D2KSK_LD(options, pvs, rec_summary),
-        "D2KSpi_DD" : maketuple_D2KSpi_DD(options, pvs, rec_summary),
-        "D2KSK_DD" : maketuple_D2KSK_DD(options, pvs, rec_summary),
-        #ADet
-        "D2KSK_LL_ADet" : maketuple_D2KSK_LL_ADet(options, pvs, rec_summary),
-        "D2KSpi_LL_ADet" : maketuple_D2KSpi_LL_ADet(options, pvs, rec_summary),
-    }
-
-    MCtuples = {
-        "MC_D2KSK" : maketuple_MC_D2KSK(options, pvs, rec_summary),
-        "MC_D2KSpi" : maketuple_MC_D2KSpi(options, pvs, rec_summary),
-    }
-
-    if options.simulation:
-        tuples = tuples | MCtuples
-        
-    config = make_config(options, tuples)
-
-    return config
diff --git a/Charm_2024validation/main_detection_asymmetry.py b/Charm_2024validation/main_detection_asymmetry.py
deleted file mode 100644
index 1ededecf77..0000000000
--- a/Charm_2024validation/main_detection_asymmetry.py
+++ /dev/null
@@ -1,31 +0,0 @@
-###############################################################################
-# (c) Copyright 2021-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 .options.detection_asymmetry import *
-
-from DaVinci import Options, make_config
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-        
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-        #ADet
-        "Lc2KSp_LL_ADet" : maketuple_Lc2KSp_LL_ADet(options, pvs, rec_summary),
-        "Lc2pKpi_ADet" : maketuple_Lc2pKpi_ADet(options, pvs, rec_summary),
-    }
-        
-    config = make_config(options, tuples)
-
-    return config
diff --git a/Charm_2024validation/main_dst_to_dee.py b/Charm_2024validation/main_dst_to_dee.py
deleted file mode 100644
index 3084abe4e7..0000000000
--- a/Charm_2024validation/main_dst_to_dee.py
+++ /dev/null
@@ -1,42 +0,0 @@
-###############################################################################
-# (c) Copyright 2021-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 .options.dst_to_dee import *
-
-from DaVinci import Options, make_config
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS':             make_Dst0ToD0EmEp_D0ToKmPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS", pvs, rec_summary, 'dst_kpi_os'),
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS':             make_Dst0ToD0EmEp_D0ToKmPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS", pvs, rec_summary, 'dst_kpi_ss'),
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS_MVA':         make_Dst0ToD0EmEp_D0ToKmPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS_MVA", pvs, rec_summary, 'dst_kpi_os'),
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS_MVA':         make_Dst0ToD0EmEp_D0ToKmPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS_MVA", pvs, rec_summary, 'dst_kpi_ss'),
-
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS':       make_Dst0ToD0EmEp_D0ToKmPimPipPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS", pvs, rec_summary,'dst_k3pi_os' ),
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS':       make_Dst0ToD0EmEp_D0ToKmPimPipPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS", pvs, rec_summary, 'dst_k3pi_ss'),
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS_MVA':   make_Dst0ToD0EmEp_D0ToKmPimPipPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS_MVA", pvs, rec_summary, 'dst_k3pi_os'),
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS_MVA':   make_Dst0ToD0EmEp_D0ToKmPimPipPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS_MVA", pvs, rec_summary, 'dst_k3pi_ss'),
-
-    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS':     make_DstpToDpDspEmEp_DpDspToKmKpPip_tuple(options, "Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS", pvs, rec_summary, "dsstp_2kpi_os"),
-    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS':     make_DstpToDpDspEmEp_DpDspToKmKpPip_tuple(options, "Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS", pvs, rec_summary, "dsstp_2kpi_ss"),
-    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS_MVA': make_DstpToDpDspEmEp_DpDspToKmKpPip_tuple(options, "Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS_MVA", pvs, rec_summary, "dsstp_2kpi_os"),
-    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS_MVA': make_DstpToDpDspEmEp_DpDspToKmKpPip_tuple(options, "Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS_MVA", pvs, rec_summary, "dsstp_2kpi_ss"),
-    }
-
-    config = make_config(options, tuples)
-
-    return config
\ No newline at end of file
diff --git a/Charm_2024validation/main_rare_charm.py b/Charm_2024validation/main_rare_charm.py
deleted file mode 100644
index d38574262b..0000000000
--- a/Charm_2024validation/main_rare_charm.py
+++ /dev/null
@@ -1,41 +0,0 @@
-###############################################################################
-# (c) Copyright 2021-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 .options.rare_charm import *
-#from .options.rare_charm_MC import *
-
-from DaVinci import Options, make_config
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-        
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-        "D2pimumu" : maketuple_D2pimumu(options, pvs, rec_summary),
-        "D2pimumu_WS" : maketuple_D2pimumu_WS(options, pvs, rec_summary),
-        "CharmRD_D2pipipi" : maketuple_D2pipipi(options, pvs, rec_summary),
-        "D2piee" : maketuple_D2piee(options, pvs, rec_summary),
-        "Lc2pmumu" : maketuple_Lc2pmumu(options, pvs, rec_summary),
-        "Dst2D0pi_D02Kpimumu_RS" : maketuple_Dst2D0pi_D02Kpimumu_RS(options, pvs, rec_summary),
-    }
-
-    MCtuples = {
-    }
-    
-    if options.simulation:
-        tuples = tuples | MCtuples
-        
-    config = make_config(options, tuples)
-
-    return config
diff --git a/Charm_2024validation/options/d0_to_hh.py b/Charm_2024validation/options/d0_to_hh.py
deleted file mode 100644
index 80a3cdcec2..0000000000
--- a/Charm_2024validation/options/d0_to_hh.py
+++ /dev/null
@@ -1,432 +0,0 @@
-from .tupling import (
-    make_composite_variables,
-    make_basic_variables,
-    make_hlt2_event_variables,
-    make_DeltaM_variable,
-    make_composite_dtf_variables,
-    make_basic_dtf_variables,
-)
-
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunTuple_Particles as Funtuple
-
-
-def make_dtf_variables(options, pvs, input_data, ptype):
-
-    if ptype not in ["basic", "composite"]:
-        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
-
-    from DecayTreeFitter import DecayTreeFitter
-    
-    DTF = DecayTreeFitter(
-        name=f'DTF_{{hash}}',
-        input_particles=input_data)
-
-    DTFvtx = DecayTreeFitter(
-        name=f'DTFvtx_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    DTFmass = DecayTreeFitter(
-        name=f'DTFmass_{{hash}}',
-        input_particles=input_data,
-        mass_constraints=["D0"])
-
-    DTFvtxmass = DecayTreeFitter(
-        name=f'DTFvtxmass_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0"])
-
-    if ptype == "basic":
-        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmass,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="D0")
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmass,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="D0")
-        return dtf_vars
-
-    if ptype == "composite":
-        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmass,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="D0")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmass,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="D0")
-        return dtf_vars
-
-def maketuple_D02KK_LowBias(options, pvs, rec_summary):
-    name = "D02KK_LowBias"
-    turbo_line = "Hlt2Charm_D0ToKmKp_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> K- K+]CC",
-        "Km"   : "[D0 -> ^K- K+]CC",
-        "Kp"  : "[D0 -> K- ^K+]CC",
-    }
-
-    variables = {
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D02KK(options, pvs, rec_summary):
-    name = "D02KK"
-    turbo_line = "Hlt2Charm_D0ToKmKp"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> K- K+]CC",
-        "Km"   : "[D0 -> ^K- K+]CC",
-        "Kp"  : "[D0 -> K- ^K+]CC",
-    }
-
-    variables = {
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D02Kpi_LowBias(options, pvs, rec_summary):
-    name = "D02Kpi_LowBias"
-    turbo_line = "Hlt2Charm_D0ToKmPip_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> K- pi+]CC",
-        "Km"   : "[D0 -> ^K- pi+]CC",
-        "pip"  : "[D0 -> K- ^pi+]CC",
-    }
-
-    variables = {
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D02Kpi(options, pvs, rec_summary):
-    name = "D02Kpi"
-    turbo_line = "Hlt2Charm_D0ToKmPip"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> K- pi+]CC",
-        "Km"   : "[D0 -> ^K- pi+]CC",
-        "pip"  : "[D0 -> K- ^pi+]CC",
-    }
-
-    variables = {
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D02pipi_LowBias(options, pvs, rec_summary):
-    name = "D02pipi_LowBias"
-    turbo_line = "Hlt2Charm_D0ToPimPip_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> pi- pi+]CC",
-        "pim"   : "[D0 -> ^pi- pi+]CC",
-        "pip"  : "[D0 -> pi- ^pi+]CC",
-    }
-
-    variables = {
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D02pipi(options, pvs, rec_summary):
-    name = "D02pipi"
-    turbo_line = "Hlt2Charm_D0ToPimPip"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> pi- pi+]CC",
-        "pim"   : "[D0 -> ^pi- pi+]CC",
-        "pip"  : "[D0 -> pi- ^pi+]CC",
-    }
-
-    variables = {
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02KK_LowBias(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02KK_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmKp_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> ([D0]CC -> K- K+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> K- K+) pi+]CC",
-        "Km"   : "[D*(2010)+ -> ([D0]CC -> ^K- K+) pi+]CC",
-        "Kp"  : "[D*(2010)+ -> ([D0]CC -> K- ^K+) pi+]CC",
-        "spip" : "[D*(2010)+ -> ([D0]CC -> K- K+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02KK(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02KK"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmKp"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> ([D0]CC -> K- K+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> K- K+) pi+]CC",
-        "Km"   : "[D*(2010)+ -> ([D0]CC -> ^K- K+) pi+]CC",
-        "Kp"  : "[D*(2010)+ -> ([D0]CC -> K- ^K+) pi+]CC",
-        "spip" : "[D*(2010)+ -> ([D0]CC -> K- K+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02Kpi_RS_LowBias(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02Kpi_RS_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPip_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> (D0 -> K- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^(D0 -> K- pi+) pi+]CC",
-        "Km"   : "[D*(2010)+ -> (D0 -> ^K- pi+) pi+]CC",
-        "pip"  : "[D*(2010)+ -> (D0 -> K- ^pi+) pi+]CC",
-        "spip" : "[D*(2010)+ -> (D0 -> K- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02Kpi_RS(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02Kpi_RS"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPip"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> (D0 -> K- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^(D0 -> K- pi+) pi+]CC",
-        "Km"   : "[D*(2010)+ -> (D0 -> ^K- pi+) pi+]CC",
-        "pip"  : "[D*(2010)+ -> (D0 -> K- ^pi+) pi+]CC",
-        "spip" : "[D*(2010)+ -> (D0 -> K- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02Kpi_WS_LowBias(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02Kpi_WS_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKpPim_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> (D0 -> K+ pi-) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^(D0 -> K+ pi-) pi+]CC",
-        "Kp"   : "[D*(2010)+ -> (D0 -> ^K+ pi-) pi+]CC",
-        "pim"  : "[D*(2010)+ -> (D0 -> K+ ^pi-) pi+]CC",
-        "spip" : "[D*(2010)+ -> (D0 -> K+ pi-) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Kp"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pim"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02Kpi_WS(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02Kpi_WS"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKpPim"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> (D0 -> K+ pi-) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^(D0 -> K+ pi-) pi+]CC",
-        "Kp"   : "[D*(2010)+ -> (D0 -> ^K+ pi-) pi+]CC",
-        "pim"  : "[D*(2010)+ -> (D0 -> K+ ^pi-) pi+]CC",
-        "spip" : "[D*(2010)+ -> (D0 -> K+ pi-) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Kp"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pim"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02pipi_LowBias(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02pipi_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimPip_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> ([D0]CC -> pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> pi- pi+) pi+]CC",
-        "pim"   : "[D*(2010)+ -> ([D0]CC -> ^pi- pi+) pi+]CC",
-        "pip"  : "[D*(2010)+ -> ([D0]CC -> pi- ^pi+) pi+]CC",
-        "spip" : "[D*(2010)+ -> ([D0]CC -> pi- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02pipi(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02pipi"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimPip"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> ([D0]CC -> pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> pi- pi+) pi+]CC",
-        "pim"   : "[D*(2010)+ -> ([D0]CC -> ^pi- pi+) pi+]CC",
-        "pip"  : "[D*(2010)+ -> ([D0]CC -> pi- ^pi+) pi+]CC",
-        "spip" : "[D*(2010)+ -> ([D0]CC -> pi- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
diff --git a/Charm_2024validation/options/d0_to_hh_MC.py b/Charm_2024validation/options/d0_to_hh_MC.py
deleted file mode 100644
index aaae05665d..0000000000
--- a/Charm_2024validation/options/d0_to_hh_MC.py
+++ /dev/null
@@ -1,99 +0,0 @@
-from .tupling import (
-    make_MC_composite_variables,
-    make_MC_basic_variables,
-    make_MC_event_variables,
-)
-
-from PyConf.reading import get_mc_particles, get_mc_header
-from FunTuple import FunTuple_MCParticles as FuntupleMC
-
-def maketuple_MC_Dst2D0pi_D02Kpi_RS(options, pvs, rec_summary):
-    name = "MC_Dst2D0pi_D02Kpi_RS"
-    line = "/Event/MC/Particles"
-
-    input_data = get_mc_particles(f"{line}")
-
-    branches = {
-        "Dst" : "[D*(2010)+ ==> (D0 ==> K- pi+ ) pi+]CC",
-        "D0"  : "[D*(2010)+ ==> ^(D0 ==> K- pi+ ) pi+]CC",
-        "Km"   : "[D*(2010)+ ==> (D0 ==> ^K- pi+ ) pi+]CC",
-        "pip"  : "[D*(2010)+ ==> (D0 ==> K- ^pi+ ) pi+]CC",
-        "spip" : "[D*(2010)+ ==> (D0 ==> K- pi+ ) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_MC_composite_variables(),
-        "D0"    : make_MC_composite_variables(),
-        "Km"     : make_MC_basic_variables(),
-        "pip"    : make_MC_basic_variables(),
-        "spip"   : make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                          tuple_name="MCDecayTree",
-                          fields=branches, variables = variables,
-                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
-                          inputs=input_data)
-
-    return [mytuple]
-
-def maketuple_MC_Dst2D0pi_D02KK(options, pvs, rec_summary):
-    name = "MC_Dst2D0pi_D02KK"
-    line = "/Event/MC/Particles"
-
-    input_data = get_mc_particles(f"{line}")
-
-    branches = {
-        "Dst" : "[D*(2010)+ ==> ([D0]CC ==> K- K+) pi+]CC",
-        "D0"  : "[D*(2010)+ ==> ^([D0]CC ==> K- K+) pi+]CC",
-        "Km"   : "[D*(2010)+ ==> ([D0]CC ==> ^K- K+) pi+]CC",
-        "Kp"  : "[D*(2010)+ ==> ([D0]CC ==> K- ^K+) pi+]CC",
-        "spip" : "[D*(2010)+ ==> ([D0]CC ==> K- K+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_MC_composite_variables(),
-        "D0"    : make_MC_composite_variables(),
-        "Km"     : make_MC_basic_variables(),
-        "Kp"    : make_MC_basic_variables(),
-        "spip"   : make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                        tuple_name="MCDecayTree",
-                        fields=branches, variables = variables,
-                        event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
-                        inputs=input_data)
-
-    return [mytuple]
-
-
-def maketuple_MC_Dst2D0pi_D02pipi(options, pvs, rec_summary):
-    name = "MC_Dst2D0pi_D02pipi"
-    line = "/Event/MC/Particles"
-
-    input_data = get_mc_particles(f"{line}")
-
-    branches = {
-        "Dst" : "[D*(2010)+ ==> ([D0]CC ==> pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ ==> ^([D0]CC ==> pi- pi+) pi+]CC",
-        "pim"   : "[D*(2010)+ ==> ([D0]CC ==> ^pi- pi+) pi+]CC",
-        "pip"  : "[D*(2010)+ ==> ([D0]CC ==> pi- ^pi+) pi+]CC",
-        "spip" : "[D*(2010)+ ==> ([D0]CC ==> pi- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_MC_composite_variables(),
-        "D0"    : make_MC_composite_variables(),
-        "pim"     : make_MC_basic_variables(),
-        "pip"    : make_MC_basic_variables(),
-        "spip"   : make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                        tuple_name="MCDecayTree",
-                        fields=branches, variables = variables,
-                        event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
-                        inputs=input_data)
-
-    return [mytuple]
diff --git a/Charm_2024validation/options/d0_to_hhhh.py b/Charm_2024validation/options/d0_to_hhhh.py
deleted file mode 100644
index 0277430fb9..0000000000
--- a/Charm_2024validation/options/d0_to_hhhh.py
+++ /dev/null
@@ -1,247 +0,0 @@
-from .tupling import (
-    make_composite_variables,
-    make_composite_variables_4body,
-    make_composite_variables_3body,
-    make_basic_variables,
-    make_hlt2_event_variables,
-    make_DeltaM_variable,
-    make_basic_dtf_variables,
-    make_composite_dtf_variables
-)
-
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunTuple_Particles as Funtuple
-from DecayTreeFitter import DecayTreeFitter
-
-# I can't get make_composite_variables_4body to work for some reason...
-import Functors as F
-from FunTuple import FunctorCollection
-variables_4body = (
-    FunctorCollection(
-        {
-            #14
-            "M14": F.SUBCOMB(Functor=F.MASS, Indices=(1, 4)),
-            "SDOCA14"     : F.SDOCA(Child1=1,Child2=4),
-            "SDOCACHI214" : F.SDOCACHI2(Child1=1,Child2=4),
-            "DOCA14"      : F.DOCA(Child1=1,Child2=4),
-            "DOCACHI214"  : F.DOCACHI2(Child1=1,Child2=4),
-            "COS14": F.ALV(1, 4),
-            #24
-            "M24": F.SUBCOMB(Functor=F.MASS, Indices=(2, 4)),
-            "SDOCA24"     : F.SDOCA(Child1=2,Child2=4),
-            "SDOCACHI224" : F.SDOCACHI2(Child1=2,Child2=4),
-            "DOCA24"      : F.DOCA(Child1=2,Child2=4),
-            "DOCACHI224"  : F.DOCACHI2(Child1=2,Child2=4),
-            "COS24": F.ALV(2, 4),
-            #34
-            "M34": F.SUBCOMB(Functor=F.MASS, Indices=(3, 4)),
-            "SDOCA34"     : F.SDOCA(Child1=3,Child2=4),
-            "SDOCACHI234" : F.SDOCACHI2(Child1=3,Child2=4),
-            "DOCA34"      : F.DOCA(Child1=3,Child2=4),
-            "DOCACHI234"  : F.DOCACHI2(Child1=3,Child2=4),
-            "COS34": F.ALV(3, 4),
-        }
-    )
-)
-
-
-def maketuple_DstToD0pi_D0ToKKPiPi(options, pvs, rec_summary):
-    name = "DstToD0pi_D0ToKKPiPi"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmKpPimPip"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> ([D0]CC -> K+ K- pi+ pi-) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> K+ K- pi+ pi-) pi+]CC",
-        "h1"  : "[D*(2010)+ -> ([D0]CC -> ^K+ K- pi+ pi-) pi+]CC",
-        "h2"  : "[D*(2010)+ -> ([D0]CC -> K+ ^K- pi+ pi-) pi+]CC",
-        "h3"  : "[D*(2010)+ -> ([D0]CC -> K+ K- ^pi+ pi-) pi+]CC",
-        "h4"  : "[D*(2010)+ -> ([D0]CC -> K+ K- pi+ ^pi-) pi+]CC",
-        "pis" : "[D*(2010)+ -> ([D0]CC -> K+ K- pi+ pi-) ^pi+]CC",
-    }
-
-    DTF_PV = DecayTreeFitter(
-        name='DTF_D0ToKKPiPi_PV',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    basic_variables = make_basic_variables(options, pvs, input_data) +\
-        make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)
-
-    composite_dtf_variables = make_composite_dtf_variables(options,
-                                                           pvs,
-                                                           input_data,
-                                                           DTF=DTF_PV,
-                                                           pv_constraint=True)
-
-    composite_variables = make_composite_variables(options, pvs, input_data) + composite_dtf_variables
-        
-
-    composite_variables_4body = make_composite_variables_3body(options, pvs, input_data) + composite_dtf_variables + variables_4body
-
-    variables = {
-        "Dst"   : composite_variables+make_DeltaM_variable(options),
-        "D0"    : composite_variables_4body,
-        "h1"    : basic_variables,
-        "h2"    : basic_variables,
-        "h3"    : basic_variables,
-        "h4"    : basic_variables,
-        "pis"   : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstToD0pi_D0ToKPiPiPi(options, pvs, rec_summary):
-    name = "DstToD0pi_D0ToKPiPiPi"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPimPipPip"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> (D0 -> K- pi+ pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^(D0 -> K- pi+ pi- pi+) pi+]CC",
-        "h1"   : "[D*(2010)+ -> (D0 -> ^K- pi+ pi- pi+) pi+]CC",
-        "h2"  : "[D*(2010)+ -> (D0 -> K- ^pi+ pi- pi+) pi+]CC",
-        "h3"   : "[D*(2010)+ -> (D0 -> K- pi+ ^pi- pi+) pi+]CC",
-        "h4"  : "[D*(2010)+ -> (D0 -> K- pi+ pi- ^pi+) pi+]CC",
-        "pis" : "[D*(2010)+ -> (D0 -> K- pi+ pi- pi+) ^pi+]CC",
-    }
-
-    DTF_PV = DecayTreeFitter(
-        name='DTF_D0ToKPiPiPi_PV',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    basic_variables = make_basic_variables(options, pvs, input_data) +\
-        make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True, mass_constraint=False)
-
-    composite_dtf_variables = make_composite_dtf_variables(options,
-                                                           pvs,
-                                                           input_data,
-                                                           DTF=DTF_PV,
-                                                           pv_constraint=True)
-
-    composite_variables = make_composite_variables(options, pvs, input_data) + composite_dtf_variables
-        
-
-    composite_variables_4body = make_composite_variables_3body(options, pvs, input_data) + composite_dtf_variables + variables_4body
-
-    variables = {
-        "Dst"   : composite_variables+make_DeltaM_variable(options),
-        "D0"    : composite_variables_4body,
-        "h1"    : basic_variables,
-        "h2"    : basic_variables,
-        "h3"    : basic_variables,
-        "h4"    : basic_variables,
-        "pis"   : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstToD0pi_D0ToPiKPiPi(options, pvs, rec_summary):
-    name = "DstToD0pi_D0ToPiKPiPi"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKpPimPimPip"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> (D0 -> pi- K+ pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^(D0 -> pi- K+ pi- pi+) pi+]CC",
-        "h1"   : "[D*(2010)+ -> (D0 -> ^pi- K+ pi- pi+) pi+]CC",
-        "h2"  : "[D*(2010)+ -> (D0 -> pi- ^K+ pi- pi+) pi+]CC",
-        "h3"   : "[D*(2010)+ -> (D0 -> pi- K+ ^pi- pi+) pi+]CC",
-        "h4"  : "[D*(2010)+ -> (D0 -> pi- K+ pi- ^pi+) pi+]CC",
-        "pis" : "[D*(2010)+ -> (D0 -> pi- K+ pi- pi+) ^pi+]CC",
-    }
-
-    DTF_PV = DecayTreeFitter(
-        name='DTF_D0ToPiKPiPi_PV',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    basic_variables = make_basic_variables(options, pvs, input_data) +\
-        make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True, mass_constraint=False)
-
-    composite_dtf_variables = make_composite_dtf_variables(options,
-                                                           pvs,
-                                                           input_data,
-                                                           DTF=DTF_PV,
-                                                           pv_constraint=True)
-
-    composite_variables = make_composite_variables(options, pvs, input_data) + composite_dtf_variables
-        
-
-    composite_variables_4body = make_composite_variables_3body(options, pvs, input_data) + composite_dtf_variables + variables_4body
-
-    variables = {
-        "Dst"   : composite_variables+make_DeltaM_variable(options),
-        "D0"    : composite_variables_4body,
-        "h1"    : basic_variables,
-        "h2"    : basic_variables,
-        "h3"    : basic_variables,
-        "h4"    : basic_variables,
-        "pis"   : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstToD0pi_D0ToPiPiPiPi(options, pvs, rec_summary):
-    name = "DstToD0pi_D0ToPiPiPiPi"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimPimPipPip"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> ([D0]CC -> pi+ pi- pi+ pi-) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> pi+ pi- pi+ pi-) pi+]CC",
-        "h1"  : "[D*(2010)+ -> ([D0]CC -> ^pi+ pi- pi+ pi-) pi+]CC",
-        "h2"  : "[D*(2010)+ -> ([D0]CC -> pi+ ^pi- pi+ pi-) pi+]CC",
-        "h3"  : "[D*(2010)+ -> ([D0]CC -> pi+ pi- ^pi+ pi-) pi+]CC",
-        "h4"  : "[D*(2010)+ -> ([D0]CC -> pi+ pi- pi+ ^pi-) pi+]CC",
-        "pis" : "[D*(2010)+ -> ([D0]CC -> pi+ pi- pi+ pi-) ^pi+]CC",
-    }
-
-    DTF_PV = DecayTreeFitter(
-        name='DTF_D0ToPiPiPiPi_PV',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    basic_variables = make_basic_variables(options, pvs, input_data) +\
-        make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True, mass_constraint=False)
-
-    composite_dtf_variables = make_composite_dtf_variables(options,
-                                                           pvs,
-                                                           input_data,
-                                                           DTF=DTF_PV,
-                                                           pv_constraint=True)
-
-    composite_variables = make_composite_variables(options, pvs, input_data) + composite_dtf_variables
-        
-
-    composite_variables_4body = make_composite_variables_3body(options, pvs, input_data) + composite_dtf_variables + variables_4body
-
-    variables = {
-        "Dst"   : composite_variables+make_DeltaM_variable(options),
-        "D0"    : composite_variables_4body,
-        "h1"    : basic_variables,
-        "h2"    : basic_variables,
-        "h3"    : basic_variables,
-        "h4"    : basic_variables,
-        "pis"   : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
diff --git a/Charm_2024validation/options/d0_to_hhhh_MC.py b/Charm_2024validation/options/d0_to_hhhh_MC.py
deleted file mode 100644
index 2dbe198fa9..0000000000
--- a/Charm_2024validation/options/d0_to_hhhh_MC.py
+++ /dev/null
@@ -1,43 +0,0 @@
-from .tupling import (
-    make_MC_composite_variables,
-    make_MC_basic_variables,
-    make_MC_event_variables,
-)
-
-from PyConf.reading import get_mc_particles, get_mc_header
-from FunTuple import FunTuple_MCParticles as FuntupleMC
-
-def maketuple_MC_DstToD0pi_D0ToKPiPiPi(options, pvs, rec_summary):
-    name = "MC_DstToD0pi_D0ToKPiPiPi"
-
-    line = "/Event/MC/Particles"
-    
-    input_data = get_mc_particles(f"{line}")
-
-    branches = {
-        "Dst" : "[D*(2010)+ ==> (D0 ==> K- pi+ pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ ==> ^(D0 ==> K- pi+ pi- pi+) pi+]CC",
-        "h1"   : "[D*(2010)+ ==> (D0 ==> ^K- pi+ pi- pi+) pi+]CC",
-        "h2"  : "[D*(2010)+ ==> (D0 ==> K- ^pi+ pi- pi+) pi+]CC",
-        "h3"   : "[D*(2010)+ ==> (D0 ==> K- pi+ ^pi- pi+) pi+]CC",
-        "h4"  : "[D*(2010)+ ==> (D0 ==> K- pi+ pi- ^pi+) pi+]CC",
-        "pis" : "[D*(2010)+ ==> (D0 ==> K- pi+ pi- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_MC_composite_variables(),
-        "D0"    : make_MC_composite_variables(),
-        "h1"     : make_MC_basic_variables(),
-        "h2"    : make_MC_basic_variables(),
-        "h3"    : make_MC_basic_variables(),
-        "h4"    : make_MC_basic_variables(),
-        "pis"   : make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                          tuple_name="MCDecayTree",
-                          fields=branches, variables = variables,  
-                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])), 
-                          inputs=input_data)
-
-    return [mytuple]
diff --git a/Charm_2024validation/options/d0_to_hhpi0.py b/Charm_2024validation/options/d0_to_hhpi0.py
deleted file mode 100644
index cf3c3ba59f..0000000000
--- a/Charm_2024validation/options/d0_to_hhpi0.py
+++ /dev/null
@@ -1,359 +0,0 @@
-from .tupling import (
-    make_composite_variables,
-    make_DeltaM_variable,
-    make_basic_variables,
-    make_hlt2_event_variables,
-    make_top_isolation_variables,
-    make_basic_isolation_variables,
-    make_intermediate_isolation_variables,
-    make_composite_dtf_variables,
-    make_basic_dtf_variables,
-)
-
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunTuple_Particles as Funtuple
-
-iso_vars_locations = ["LongTrackIso", "NeutralIso", "PizIso"]
-
-def make_dtf_variables(options, pvs, input_data, ptype):
-
-    if ptype not in ["basic", "composite"]:
-        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
-
-    from DecayTreeFitter import DecayTreeFitter
-    
-    DTF = DecayTreeFitter(
-        name=f'DTF_{{hash}}',
-        input_particles=input_data)
-
-    DTFvtx = DecayTreeFitter(
-        name=f'DTFvtx_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    DTFmass = DecayTreeFitter(
-        name=f'DTFmass_{{hash}}',
-        input_particles=input_data,
-        mass_constraints=["D0"])
-
-    DTFvtxmass = DecayTreeFitter(
-        name=f'DTFvtxmass_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0"])
-
-    if ptype == "basic":
-        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmass,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="D0")
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmass,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="D0")
-        return dtf_vars
-
-    if ptype == "composite":
-        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmass,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="D0")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmass,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="D0")
-        return dtf_vars
-
-
-def maketuple_Dst2D0pi_D02KKpi0_M(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02KKpi0_M"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmKpPi0_M"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) pi0) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (phi(1020) -> K- K+) pi0) pi+]CC",
-        "phi"   : "[D*(2010)+ -> ([D0]CC -> ^(phi(1020) -> K- K+) pi0) pi+]CC",
-        "Km"   : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> ^K- K+) pi0) pi+]CC",
-        "Kp"  : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- ^K+) pi0) pi+]CC",
-        "pi0"  : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) ^pi0) pi+]CC",
-        "spip" : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) pi0) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "phi"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation:
-
-        variables = {
-            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="D0"),
-            "phi"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="phi(1020)"),
-            "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02KKpi0_R(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02KKpi0_R"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmKpPi0_R"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) (pi0 -> gamma gamma) ) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (phi(1020) -> K- K+) (pi0 -> gamma gamma) ) pi+]CC",
-        "phi"   : "[D*(2010)+ -> ([D0]CC -> ^(phi(1020) -> K- K+) (pi0 -> gamma gamma) ) pi+]CC",
-        "Km"   : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> ^K- K+) (pi0 -> gamma gamma) ) pi+]CC",
-        "Kp"  : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- ^K+) (pi0 -> gamma gamma) ) pi+]CC",
-        "pi0"  : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) ^(pi0 -> gamma gamma) ) pi+]CC",
-        "gamma1"  : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) (pi0 -> ^gamma gamma) ) pi+]CC",
-        "gamma2"  : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) (pi0 -> gamma ^gamma) ) pi+]CC",
-        "spip" : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) (pi0 -> gamma gamma) ) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "phi"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "gamma1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "gamma2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation:
-
-        variables = {
-            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="D0"),
-            "phi"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="phi(1020)"),
-            "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="pi0"),
-            "gamma1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "gamma2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02Kpipi0_M(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02Kpipi0_M"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPipPi0_M"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) pi0) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^(D0 -> (K*(892)~0 -> K- pi+) pi0) pi+]CC",
-        "Kst"   : "[D*(2010)+ -> (D0 -> ^(K*(892)~0 -> K- pi+) pi0) pi+]CC",
-        "Km"   : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> ^K- pi+) pi0) pi+]CC",
-        "pip"  : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- ^pi+) pi0) pi+]CC",
-        "pi0"  : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) ^pi0) pi+]CC",
-        "spip" : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) pi0) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Kst"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation:
-
-        variables = {
-            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="D0"),
-            "Kst"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="K*(892)~0"),
-            "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02Kpipi0_R(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02Kpipi0_R"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPipPi0_R"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) (pi0 -> gamma gamma) ) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^(D0 -> (K*(892)~0 -> K- pi+) (pi0 -> gamma gamma) ) pi+]CC",
-        "Kst"   : "[D*(2010)+ -> (D0 -> ^(K*(892)~0 -> K- pi+) (pi0 -> gamma gamma) ) pi+]CC",
-        "Km"   : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> ^K- pi+) (pi0 -> gamma gamma) ) pi+]CC",
-        "pip"  : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- ^pi+) (pi0 -> gamma gamma) ) pi+]CC",
-        "pi0"  : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) ^(pi0 -> gamma gamma) ) pi+]CC",
-        "gamma1"  : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) (pi0 -> ^gamma gamma) ) pi+]CC",
-        "gamma2"  : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) (pi0 -> gamma ^gamma) ) pi+]CC",
-        "spip" : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) (pi0 -> gamma gamma) ) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Kst"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "gamma1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "gamma2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation:
-
-        variables = {
-            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="D0"),
-            "Kst"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="K*(892)~0"),
-            "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="pi0"),
-            "gamma1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "gamma2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02pipipi0_M(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02pipipi0_M"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimPipPi0_M"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) pi0) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (rho(770)0 -> pi- pi+) pi0) pi+]CC",
-        "rho"   : "[D*(2010)+ -> ([D0]CC -> ^(rho(770)0 -> pi- pi+) pi0) pi+]CC",
-        "pim"   : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> ^pi- pi+) pi0) pi+]CC",
-        "pip"  : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- ^pi+) pi0) pi+]CC",
-        "pi0"  : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) ^pi0) pi+]CC",
-        "spip" : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) pi0) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "rho"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation:
-
-        variables = {
-            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="D0"),
-            "rho"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="rho(770)0"),
-            "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02pipipi0_R(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02pipipi0_R"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimPipPi0_R"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) (pi0 -> gamma gamma) ) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (rho(770)0 -> pi- pi+) (pi0 -> gamma gamma) ) pi+]CC",
-        "rho"   : "[D*(2010)+ -> ([D0]CC -> ^(rho(770)0 -> pi- pi+) (pi0 -> gamma gamma) ) pi+]CC",
-        "pim"   : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> ^pi- pi+) (pi0 -> gamma gamma) ) pi+]CC",
-        "pip"  : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- ^pi+) (pi0 -> gamma gamma) ) pi+]CC",
-        "pi0"  : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) ^(pi0 -> gamma gamma) ) pi+]CC",
-        "gamma1"  : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) (pi0 -> ^gamma gamma) ) pi+]CC",
-        "gamma2"  : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) (pi0 -> gamma ^gamma) ) pi+]CC",
-        "spip" : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) (pi0 -> gamma gamma) ) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "rho"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "gamma1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "gamma2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation:
-
-        variables = {
-            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="D0"),
-            "rho"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="rho(770)0"),
-            "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="pi0"),
-            "gamma1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "gamma2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
diff --git a/Charm_2024validation/options/d0_to_hhpi0_MC.py b/Charm_2024validation/options/d0_to_hhpi0_MC.py
deleted file mode 100644
index 84648f4e71..0000000000
--- a/Charm_2024validation/options/d0_to_hhpi0_MC.py
+++ /dev/null
@@ -1,44 +0,0 @@
-from .tupling import (
-    make_MC_composite_variables,
-    make_MC_basic_variables,
-    make_MC_event_variables,
-)
-
-from PyConf.reading import get_mc_particles, get_mc_header
-from FunTuple import FunTuple_MCParticles as FuntupleMC
-
-def maketuple_MC_Dst2D0pi_D02Kpipi0(options, pvs, rec_summary):
-    name = "MC_Dst2D0pi_D02Kpipi0"
-    line = "/Event/MC/Particles"
-    
-    input_data = get_mc_particles(f"{line}")
-
-    branches = {
-        "Dst" : "[D*(2010)+ ==> (D0 ==> K- pi+ (pi0 ==> gamma gamma) ) pi+]CC",
-        "D0"  : "[D*(2010)+ ==> ^(D0 ==> K- pi+ (pi0 ==> gamma gamma) ) pi+]CC",
-        "Km"   : "[D*(2010)+ ==> (D0 ==> ^K- pi+ (pi0 ==> gamma gamma) ) pi+]CC",
-        "pip"  : "[D*(2010)+ ==> (D0 ==> K- ^pi+ (pi0 ==> gamma gamma) ) pi+]CC",
-        "pi0"  : "[D*(2010)+ ==> (D0 ==> K- pi+ ^(pi0 ==> gamma gamma) ) pi+]CC",
-        "gamma1"  : "[D*(2010)+ ==> (D0 ==> K- pi+ (pi0 ==> ^gamma gamma) ) pi+]CC",
-        "gamma2"  : "[D*(2010)+ ==> (D0 ==> K- pi+ (pi0 ==> gamma ^gamma) ) pi+]CC",
-        "spip" : "[D*(2010)+ ==> (D0 ==> K- pi+ (pi0 ==> gamma gamma) ) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_MC_composite_variables(),
-        "D0"    : make_MC_composite_variables(),
-        "Km"     : make_MC_basic_variables(),
-        "pip"    : make_MC_basic_variables(),
-        "pi0"    : make_MC_basic_variables(),
-        "gamma1"    : make_MC_basic_variables(),
-        "gamma2"    : make_MC_basic_variables(),
-        "spip"   : make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                          tuple_name="MCDecayTree",
-                          fields=branches, variables = variables,  
-                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])), 
-                          inputs=input_data)
-
-    return [mytuple]
diff --git a/Charm_2024validation/options/d0_to_kshh.py b/Charm_2024validation/options/d0_to_kshh.py
deleted file mode 100644
index dad027529f..0000000000
--- a/Charm_2024validation/options/d0_to_kshh.py
+++ /dev/null
@@ -1,1585 +0,0 @@
-from .tupling import (
-    make_composite_variables,
-    make_composite_variables_3body,
-    make_basic_variables,
-    make_hlt2_event_variables,
-    make_DeltaM_variable,
-    make_basic_dtf_variables,
-    make_composite_dtf_variables,
-    make_composite_dtf_variables_3body,
-)
-
-import Functors as F
-from Functors.math import log
-from DaVinci import Options, make_config
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunctorCollection
-from PyConf.reading import get_particles
-import FunTuple.functorcollections as FC
-from FunTuple import FunTuple_Particles as Funtuple
-from DecayTreeFitter import DecayTreeFitter
-
-# define helper functors
-get_SV =  F.ENDVERTEX @ F.FORWARDARG0
-get_SV_pos = F.TOLINALG @ F.POSITION @ get_SV
-# only if composite (i.e. has vertex)

-get_child_1 = F.CHILD(1, F.FORWARDARG0) # change here the index of the child.
-get_child_endvtx_pos_1 = F.ENDVERTEX_POS  @ get_child_1
-get_fdvec_child_1 = get_child_endvtx_pos_1 - get_SV_pos
-
-# define observables
-IP_wrt_SV_KS0 = F.IP.bind(get_SV_pos , get_child_1)
-IPCHI2_wrt_SV_KS0 = F.IPCHI2.bind(get_SV , get_child_1)
-# only if child is composite (i.e. has vertex)
-FD_wrt_SV_KS0 = F.MAGNITUDE @ get_fdvec_child_1
-FDCHI2_wrt_SV_KS0 = F.VTX_FDCHI2.bind(get_SV, get_child_1)
-# Note: Apply the functors to the head of the node of decay tree e.g. B
-# Functor collection for SV related info
-topo_sv_var = FunctorCollection(
-    {
-        "ORIVXIP_CHILD1": IP_wrt_SV_KS0,
-        "ORIVXIPCHI2_CHILD1": IPCHI2_wrt_SV_KS0,
-        "ORIVXFD_CHILD1": FD_wrt_SV_KS0,
-        "ORIVXFDCHI2_CHILD1": FDCHI2_wrt_SV_KS0,
-    }
-)
-
-"""
- D0->KSππ LL, DD x LowBias x Dstar
- D0->KSK-Ï€+ LL, DD x LowBias x Dstar
- D0->KSK+Ï€- LL, DD x LowBias x Dstar
- D0->KSKK LL, DD x LowBias x Dstar
- nb: https://gitlab.cern.ch/lhcb/Moore/-/blob/master/Hlt/Hlt2Conf/python/Hlt2Conf/lines/charm/d0_to_kshh.py?ref_type=heads
-
- """
-
-# D0->KSππ
-def maketuple_DstpToD0Pip_D0ToKsPimPip_LL_LowBias(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsPimPip_LL_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_LL_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) pi- pi+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^pi- pi+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- ^pi+) pi+]CC",
-        "pis" :   "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D02KSPiPi_LL_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D02KSPiPi_LL_lowbias_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0") + topo_sv_var,
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsPimPip_DD_LowBias(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsPimPip_DD_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_DD_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) pi- pi+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^pi- pi+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- ^pi+) pi+]CC",
-        "pis" :   "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D02KSPiPi_DD_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D02KSPiPi_DD_lowbias_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0") + topo_sv_var,
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsPimPip_LL(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsPimPip_LL"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_LL"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) pi- pi+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^pi- pi+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- ^pi+) pi+]CC",
-        "pis" :   "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D02KSPiPi_LL_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D02KSPiPi_LL_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF= DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF= DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF= DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF= DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF= DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF= DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0") + topo_sv_var,
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsPimPip_DD(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsPimPip_DD"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_DD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) pi- pi+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^pi- pi+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- ^pi+) pi+]CC",
-        "pis" :   "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D02KSPiPi_DD_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D02KSPiPi_DD_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0") + topo_sv_var,
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsPimPip_LL_LowBias(options, pvs, rec_summary):
-    name = "D0ToKsPimPip_LL_LowBias"
-    turbo_line = "Hlt2Charm_D0ToKsPimPip_LL_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) pi- pi+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) pi- pi+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) pi- pi+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) pi- pi+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^pi- pi+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) pi- ^pi+]CC",
-    }
-
-    DTF_D0ToKsPimPip_LL_LB_MASS = DecayTreeFitter(
-        name='DTF_D02KSPiPi_LL_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsPimPip_DD_LowBias(options, pvs, rec_summary):
-    name = "D0ToKsPimPip_DD_LowBias"
-    turbo_line = "Hlt2Charm_D0ToKsPimPip_DD_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) pi- pi+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) pi- pi+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) pi- pi+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) pi- pi+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^pi- pi+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) pi- ^pi+]CC",
-    }
-
-    DTF_D0ToKsPimPip_DD_LB_MASS = DecayTreeFitter(
-        name='DTF_D02KSPiPi_DD_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsPimPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsPimPip_LL(options, pvs, rec_summary):
-    name = "D0ToKsPimPip_LL"
-    turbo_line = "Hlt2Charm_D0ToKsPimPip_LL"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) pi- pi+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) pi- pi+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) pi- pi+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) pi- pi+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^pi- pi+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) pi- ^pi+]CC",
-    }
-
-    DTF_D0ToKsPimPip_LL_MASS = DecayTreeFitter(
-        name='DTF_D02KSPiPi_LL_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsPimPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsPimPip_DD(options, pvs, rec_summary):
-    name = "D0ToKsPimPip_DD"
-    turbo_line = "Hlt2Charm_D0ToKsPimPip_DD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) pi- pi+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) pi- pi+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) pi- pi+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) pi- pi+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^pi- pi+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) pi- ^pi+]CC",
-    }
-
-    DTF_D0ToKsPimPip_DD_MASS = DecayTreeFitter(
-        name='DTF_D02KSPiPi_DD_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsPimPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-# D0->KSK-Ï€+
-def maketuple_DstpToD0Pip_D0ToKsKmPip_LL_LowBias(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKmPip_LL_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_LL_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- pi+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- pi+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- pi+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^pi+) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKmPip_LL_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKmPip_LL_lowbias_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsKmPip_DD_LowBias(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKmPip_DD_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_DD_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- pi+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- pi+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- pi+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^pi+) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKmPip_DD_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKmPip_DD_lowbias_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsKmPip_LL(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKmPip_LL"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_LL"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- pi+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- pi+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- pi+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^pi+) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKmPip_LL_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKmPip_LL_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsKmPip_DD(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKmPip_DD"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_DD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- pi+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- pi+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- pi+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^pi+) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKmPip_DD_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKmPip_DD_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKmPip_LL_LowBias(options, pvs, rec_summary):
-    name = "D0ToKsKmPip_LL_LowBias"
-    turbo_line = "Hlt2Charm_D0ToKsKmPip_LL_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- pi+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- pi+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- pi+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- pi+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- pi+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^pi+]CC",
-    }
-
-    DTF_D0ToKsKmPip_LL_LB_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKmPip_LL_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKmPip_DD_LowBias(options, pvs, rec_summary):
-    name = "D0ToKsKmPip_DD_LowBias"
-    turbo_line = "Hlt2Charm_D0ToKsKmPip_DD_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- pi+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- pi+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- pi+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- pi+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- pi+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^pi+]CC",
-    }
-
-    DTF_D0ToKsKmPip_DD_LB_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKmPip_DD_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKmPip_LL(options, pvs, rec_summary):
-    name = "D0ToKsKmPip_LL"
-    turbo_line = "Hlt2Charm_D0ToKsKmPip_LL"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- pi+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- pi+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- pi+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- pi+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- pi+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^pi+]CC",
-    }
-
-    DTF_D0ToKsKmPip_LL_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKmPip_LL_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKmPip_DD(options, pvs, rec_summary):
-    name = "D0ToKsKmPip_DD"
-    turbo_line = "Hlt2Charm_D0ToKsKmPip_DD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- pi+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- pi+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- pi+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- pi+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- pi+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^pi+]CC",
-    }
-
-    DTF_D0ToKsKmPip_DD_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKmPip_DD_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-# D0->KSK+Ï€-
-def maketuple_DstpToD0Pip_D0ToKsKpPim_LL_LowBias(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKpPim_LL_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_LL_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K+ pi-) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K+ pi-) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ ^pi-) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K+ pi-) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKpPim_LL_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKpPim_LL_lowbias_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsKpPim_DD_LowBias(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKpPim_DD_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_DD_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K+ pi-) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K+ pi-) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ ^pi-) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K+ pi-) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKpPim_DD_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKpPim_DD_lowbias_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsKpPim_LL(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKpPim_LL"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_LL"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K+ pi-) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K+ pi-) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ ^pi-) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K+ pi-) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKpPim_LL_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKpPim_LL_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsKpPim_DD(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKpPim_DD"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_DD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K+ pi-) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K+ pi-) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ ^pi-) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K+ pi-) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKpPim_DD_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKpPim_DD_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKpPim_LL_LowBias(options, pvs, rec_summary):
-    name = "D0ToKsKpPim_LL_LowBias"
-    turbo_line = "Hlt2Charm_D0ToKsKpPim_LL_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K+ pi-]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K+ pi-]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K+ pi-]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K+ pi-]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) K+ ^pi-]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) ^K+ pi-]CC",
-    }
-
-    DTF_D0ToKsKpPim_LL_LB_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKpPim_LL_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKpPim_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKpPim_DD_LowBias(options, pvs, rec_summary):
-    name = "D0ToKsKpPim_DD_LowBias"
-    turbo_line = "Hlt2Charm_D0ToKsKpPim_DD_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K+ pi-]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K+ pi-]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K+ pi-]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K+ pi-]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) K+ ^pi-]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) ^K+ pi-]CC",
-    }
-
-    DTF_D0ToKsKpPim_DD_LB_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKpPim_DD_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKpPim_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKpPim_LL(options, pvs, rec_summary):
-    name = "D0ToKsKpPim_LL"
-    turbo_line = "Hlt2Charm_D0ToKsKpPim_LL"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K+ pi-]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K+ pi-]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K+ pi-]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K+ pi-]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) K+ ^pi-]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) ^K+ pi-]CC",
-    }
-
-    DTF_D0ToKsKpPim_LL_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKpPim_LL_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKpPim_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKpPim_DD(options, pvs, rec_summary):
-    name = "D0ToKsKpPim_DD"
-    turbo_line = "Hlt2Charm_D0ToKsKpPim_DD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K+ pi-]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K+ pi-]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K+ pi-]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K+ pi-]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) K+ ^pi-]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) ^K+ pi-]CC",
-    }
-
-    DTF_D0ToKsKpPim_DD_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKpPim_DD_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKpPim_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-# D0->KSK-K+
-def maketuple_DstpToD0Pip_D0ToKsKmKp_LL_LowBias(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKmKp_LL_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_LL_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- K+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- K+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- K+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- K+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^K+) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKmKp_LL_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKmKp_LL_lowbias_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsKmKp_DD_LowBias(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKmKp_DD_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_DD_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- K+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- K+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- K+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- K+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^K+) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKmKp_DD_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKmKp_DD_lowbias_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsKmKp_LL(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKmKp_LL"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_LL"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- K+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- K+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- K+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- K+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^K+) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKmKp_LL_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKmKp_LL_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsKmKp_DD(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKmKp_DD"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_DD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- K+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- K+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- K+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- K+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^K+) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKmKp_DD_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKmKp_DD_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKmKp_LL_LowBias(options, pvs, rec_summary):
-    name = "D0ToKsKmKp_LL_LowBias"
-    turbo_line = "Hlt2Charm_D0ToKsKmKp_LL_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- K+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- K+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- K+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- K+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- K+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^K+]CC",
-    }
-
-    DTF_D0ToKsKmKp_LL_LB_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKmKp_LL_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmKp_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKmKp_DD_LowBias(options, pvs, rec_summary):
-    name = "D0ToKsKmKp_DD_LowBias"
-    turbo_line = "Hlt2Charm_D0ToKsKmKp_DD_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- K+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- K+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- K+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- K+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- K+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^K+]CC",
-    }
-
-    DTF_D0ToKsKmKp_DD_LB_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKmKp_DD_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmKp_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsPimPip_LL_NoBias(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsPimPip_LL_NoBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_LL_NoBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) pi- pi+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^pi- pi+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- ^pi+) pi+]CC",
-        "pis" :   "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D02KSPiPi_LL_nobias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D02KSPiPi_LL_nobias_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0") + topo_sv_var,
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKmKp_LL(options, pvs, rec_summary):
-    name = "D0ToKsKmKp_LL"
-    turbo_line = "Hlt2Charm_D0ToKsKmKp_LL"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- K+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- K+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- K+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- K+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- K+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^K+]CC",
-    }
-
-    DTF_D0ToKsKmKp_LL_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKmKp_LL_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmKp_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKmKp_DD(options, pvs, rec_summary):
-    name = "D0ToKsKmKp_DD"
-    turbo_line = "Hlt2Charm_D0ToKsKmKp_DD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- K+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- K+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- K+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- K+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- K+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^K+]CC",
-    }
-
-    DTF_D0ToKsKmKp_DD_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKmKp_DD_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmKp_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-# ########################################
diff --git a/Charm_2024validation/options/d0_to_kshh_MC.py b/Charm_2024validation/options/d0_to_kshh_MC.py
deleted file mode 100644
index 9fa138f8ef..0000000000
--- a/Charm_2024validation/options/d0_to_kshh_MC.py
+++ /dev/null
@@ -1,44 +0,0 @@
-from .tupling import (
-    make_MC_composite_variables,
-    make_MC_basic_variables,
-    make_MC_event_variables,
-)
-
-from PyConf.reading import get_mc_particles, get_mc_header
-from FunTuple import FunTuple_MCParticles as FuntupleMC
-
-def maketuple_MC_DstpToD0Pip_D0ToKsPimPip(options, pvs, rec_summary):
-    name = "MC_DstpToD0Pip_D0ToKsPimPip"
-    line = "/Event/MC/Particles"
-    
-    input_data = get_mc_particles(f"{line}")
-
-    branches = {
-       "Dst" : "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi- pi+) pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ ==> ^([D0]CC ==> (KS0 ==> pi- pi+) pi- pi+) pi+]CC",
-        "KS0"  : "[D*(2010)+ ==> ([D0]CC ==> ^(KS0 ==> pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> ^pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi- ^pi+) pi- pi+) pi+]CC",
-        "hm"   : "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi- pi+) ^pi- pi+) pi+]CC",
-        "hp"  :  "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi- pi+) pi- ^pi+) pi+]CC",
-        "pis" :  "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi- pi+) pi- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_MC_composite_variables(),
-        "D0"    : make_MC_composite_variables(),
-        "KS0"    : make_MC_composite_variables(),
-        "KS0_pim"     : make_MC_basic_variables(),
-        "KS0_pip"     : make_MC_basic_variables(),
-        "hm"    : make_MC_basic_variables(),
-        "hp"    : make_MC_basic_variables(),
-        "pis"   : make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                          tuple_name="MCDecayTree",
-                          fields=branches, variables = variables,  
-                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])), 
-                          inputs=input_data)
-
-    return [mytuple]
diff --git a/Charm_2024validation/options/d0_to_ksks.py b/Charm_2024validation/options/d0_to_ksks.py
deleted file mode 100644
index d47253aa14..0000000000
--- a/Charm_2024validation/options/d0_to_ksks.py
+++ /dev/null
@@ -1,1049 +0,0 @@
-import Functors as F
-from Functors.math import log
-from DaVinci import Options, make_config
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunctorCollection
-from PyConf.reading import get_particles, get_pvs
-import FunTuple.functorcollections as FC
-from FunTuple import FunTuple_Particles as Funtuple
-from DecayTreeFitter import DecayTreeFitter
-
-from .tupling import (
-    make_basic_variables,
-    make_composite_variables,
-    make_hlt2_event_variables,
-    make_basic_dtf_variables,
-    make_composite_dtf_variables,
-    Hlt1_lines
-)
-
-# define helper functors
-get_SV =  F.ENDVERTEX @ F.FORWARDARG0
-get_SV_pos = F.TOLINALG @ F.POSITION @ get_SV
-# only if composite (i.e. has vertex)

-get_child_1 = F.CHILD(1, F.FORWARDARG0) # change here the index of the child.
-get_child_endvtx_pos_1 = F.ENDVERTEX_POS  @ get_child_1
-get_fdvec_child_1 = get_child_endvtx_pos_1 - get_SV_pos
-get_child_2 = F.CHILD(2, F.FORWARDARG0) # change here the index of the child.
-get_child_endvtx_pos_2 = F.ENDVERTEX_POS  @ get_child_2
-get_fdvec_child_2 = get_child_endvtx_pos_2 - get_SV_pos
-
-# define observables
-IP_wrt_SV_KS1 = F.IP.bind(get_SV_pos , get_child_1)
-IP_wrt_SV_KS2 = F.IP.bind(get_SV_pos , get_child_2)
-IPCHI2_wrt_SV_KS1 = F.IPCHI2.bind(get_SV , get_child_1)
-IPCHI2_wrt_SV_KS2 = F.IPCHI2.bind(get_SV , get_child_2)
-# only if child is composite (i.e. has vertex)
-FD_wrt_SV_KS1 = F.MAGNITUDE @ get_fdvec_child_1
-FD_wrt_SV_KS2 = F.MAGNITUDE @ get_fdvec_child_2
-FDCHI2_wrt_SV_KS1 = F.VTX_FDCHI2.bind(get_SV, get_child_1)
-FDCHI2_wrt_SV_KS2 = F.VTX_FDCHI2.bind(get_SV, get_child_2)
-# Note: Apply the functors to the head of the node of decay tree e.g. B
-# Functor collection for SV related info
-topo_sv_var = FunctorCollection(
-    {
-        "ORIVXIP_CHILD1": IP_wrt_SV_KS1,
-        "ORIVXIP_CHILD2": IP_wrt_SV_KS2,
-        "ORIVXIPCHI2_CHILD1": IPCHI2_wrt_SV_KS1,
-        "ORIVXIPCHI2_CHILD2": IPCHI2_wrt_SV_KS2,
-        "ORIVXFD_CHILD1": FD_wrt_SV_KS1,
-        "ORIVXFD_CHILD2": FD_wrt_SV_KS2,
-        "ORIVXFDCHI2_CHILD1": FDCHI2_wrt_SV_KS1,
-        "ORIVXFDCHI2_CHILD2": FDCHI2_wrt_SV_KS2,
-    }
-)
-
-############################# LLLL #############################
-def maketuple_Dst2D0pi_D02KSKS_LLLL(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLL"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_LLLL = DecayTreeFitter(
-    #     name='DTF_LLLL',
-    #     input_particles=input_data)
-    #
-    # DTF_LLLL_PV = DecayTreeFitter(
-    #     name='DTF_LLLL_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_LLLL_MASS = DecayTreeFitter(
-        name='DTF_LLLL_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_LLLL_MASS_PV = DecayTreeFitter(
-        'DTF_LLLL_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_LLLL",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# LLLL Tight #############################
-def maketuple_Dst2D0pi_D02KSKS_LLLL_Tight(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLL_Tight"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_LLLL_Tight = DecayTreeFitter(
-    #     name='DTF_LLLL_Tight',
-    #     input_particles=input_data)
-    #
-    # DTF_LLLL_Tight_PV = DecayTreeFitter(
-    #     name='DTF_LLLL_Tight_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_LLLL_Tight_MASS = DecayTreeFitter(
-        name='DTF_LLLL_Tight_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_LLLL_Tight_MASS_PV = DecayTreeFitter(
-        'DTF_LLLL_Tight_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_LLLL_Tight",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# LLDD #############################
-def maketuple_Dst2D0pi_D02KSKS_LLDD(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLDD"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_LLDD = DecayTreeFitter(
-    #     name='DTF_LLDD',
-    #     input_particles=input_data)
-    #
-    # DTF_LLDD_PV = DecayTreeFitter(
-    #     name='DTF_LLDD_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_LLDD_MASS = DecayTreeFitter(
-        name='DTF_LLDD_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_LLDD_MASS_PV = DecayTreeFitter(
-        'DTF_LLDD_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLDD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLDD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLDD, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLDD_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_LLDD",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# LLDD Tight #############################
-def maketuple_Dst2D0pi_D02KSKS_LLDD_Tight(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLDD_Tight"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_LLDD_Tight = DecayTreeFitter(
-    #     name='DTF_LLDD_Tight',
-    #     input_particles=input_data)
-    #
-    # DTF_LLDD_Tight_PV = DecayTreeFitter(
-    #     name='DTF_LLDD_Tight_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_LLDD_Tight_MASS = DecayTreeFitter(
-        name='DTF_LLDD_Tight_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_LLDD_Tight_MASS_PV = DecayTreeFitter(
-        'DTF_LLDD_Tight_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False, DTF=DTF_LLDD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False, DTF=DTF_LLDD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLDD_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLDD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_LLDD_Tight",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# DDDD #############################
-def maketuple_Dst2D0pi_D02KSKS_DDDD(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDDD"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_DDDD = DecayTreeFitter(
-    #     name='DTF_DDDD',
-    #     input_particles=input_data)
-    #
-    # DTF_DDDD_PV = DecayTreeFitter(
-    #     name='DTF_DDDD_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_DDDD_MASS = DecayTreeFitter(
-        name='DTF_DDDD_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_DDDD_MASS_PV = DecayTreeFitter(
-        'DTF_DDDD_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_DDDD",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# DDDD Tight #############################
-def maketuple_Dst2D0pi_D02KSKS_DDDD_Tight(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDDD_Tight"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_DDDD_Tight = DecayTreeFitter(
-    #     name='DTF_DDDD_Tight',
-    #     input_particles=input_data)
-    #
-    # DTF_DDDD_Tight_PV = DecayTreeFitter(
-    #     name='DTF_DDDD_Tight_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_DDDD_Tight_MASS = DecayTreeFitter(
-        name='DTF_DDDD_Tight_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_DDDD_Tight_MASS_PV = DecayTreeFitter(
-        'DTF_DDDD_Tight_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_DDDD_Tight",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# ULLL #############################
-def maketuple_Dst2D0pi_D02KSKS_ULLL(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULLL"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_ULLL = DecayTreeFitter(
-    #     name='DTF_ULLL',
-    #     input_particles=input_data)
-    #
-    # DTF_ULLL_PV = DecayTreeFitter(
-    #     name='DTF_ULLL_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_ULLL_MASS = DecayTreeFitter(
-        name='DTF_ULLL_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_ULLL_MASS_PV = DecayTreeFitter(
-        'DTF_ULLL_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_ULLL",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# ULLL Tight #############################
-def maketuple_Dst2D0pi_D02KSKS_ULLL_Tight(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULLL_Tight"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_ULLL_Tight = DecayTreeFitter(
-    #     name='DTF_ULLL_Tight',
-    #     input_particles=input_data)
-    #
-    # DTF_ULLL_Tight_PV = DecayTreeFitter(
-    #     name='DTF_ULLL_Tight_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_ULLL_Tight_MASS = DecayTreeFitter(
-        name='DTF_ULLL_Tight_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_ULLL_Tight_MASS_PV = DecayTreeFitter(
-        'DTF_ULLL_Tight_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_ULLL_Tight",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# ULDD #############################
-def maketuple_Dst2D0pi_D02KSKS_ULDD(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULDD"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_ULDD = DecayTreeFitter(
-    #     name='DTF_ULDD',
-    #     input_particles=input_data)
-    #
-    # DTF_ULDD_PV = DecayTreeFitter(
-    #     name='DTF_ULDD_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_ULDD_MASS = DecayTreeFitter(
-        name='DTF_ULDD_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_ULDD_MASS_PV = DecayTreeFitter(
-        'DTF_ULDD_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_ULDD",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# ULDD Tight #############################
-def maketuple_Dst2D0pi_D02KSKS_ULDD_Tight(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULDD_Tight"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_ULDD_Tight = DecayTreeFitter(
-    #     name='DTF_ULDD_Tight',
-    #     input_particles=input_data)
-    #
-    # DTF_ULDD_Tight_PV = DecayTreeFitter(
-    #     name='DTF_ULDD_Tight_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_ULDD_Tight_MASS = DecayTreeFitter(
-        name='DTF_ULDD_Tight_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_ULDD_Tight_MASS_PV = DecayTreeFitter(
-        'DTF_ULDD_Tight_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_ULDD_Tight",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# LLLD #############################
-def maketuple_Dst2D0pi_D02KSKS_LLLD(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLD"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_LLLD = DecayTreeFitter(
-    #     name='DTF_LLLD',
-    #     input_particles=input_data)
-    #
-    # DTF_LLLD_PV = DecayTreeFitter(
-    #     name='DTF_LLLD_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_LLLD_MASS = DecayTreeFitter(
-        name='DTF_LLLD_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_LLLD_MASS_PV = DecayTreeFitter(
-        'DTF_LLLD_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_LLLD",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# LLLD Tight #############################
-def maketuple_Dst2D0pi_D02KSKS_LLLD_Tight(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLD_Tight"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_LLLD_Tight = DecayTreeFitter(
-    #     name='DTF_LLLD_Tight',
-    #     input_particles=input_data)
-    #
-    # DTF_LLLD_Tight_PV = DecayTreeFitter(
-    #     name='DTF_LLLD_Tight_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_LLLD_Tight_MASS = DecayTreeFitter(
-        name='DTF_LLLD_Tight_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_LLLD_Tight_MASS_PV = DecayTreeFitter(
-        'DTF_LLLD_Tight_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_LLLD_Tight",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# DDLD #############################
-def maketuple_Dst2D0pi_D02KSKS_DDLD(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDLD"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_DDLD = DecayTreeFitter(
-    #     name='DTF_DDLD',
-    #     input_particles=input_data)
-    #
-    # DTF_DDLD_PV = DecayTreeFitter(
-    #     name='DTF_DDLD_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_DDLD_MASS = DecayTreeFitter(
-        name='DTF_DDLD_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_DDLD_MASS_PV = DecayTreeFitter(
-        'DTF_DDLD_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_DDLD",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# DDLD Tight #############################
-def maketuple_Dst2D0pi_D02KSKS_DDLD_Tight(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDLD_Tight"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_DDLD_Tight = DecayTreeFitter(
-    #     name='DTF_DDLD_Tight',
-    #     input_particles=input_data)
-    #
-    # DTF_DDLD_Tight_PV = DecayTreeFitter(
-    #     name='DTF_DDLD_Tight_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_DDLD_Tight_MASS = DecayTreeFitter(
-        name='DTF_DDLD_Tight_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_DDLD_Tight_MASS_PV = DecayTreeFitter(
-        'DTF_DDLD_Tight_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_DDLD_Tight",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
diff --git a/Charm_2024validation/options/d0_to_ksks_MC.py b/Charm_2024validation/options/d0_to_ksks_MC.py
deleted file mode 100644
index 06c1ac6139..0000000000
--- a/Charm_2024validation/options/d0_to_ksks_MC.py
+++ /dev/null
@@ -1,46 +0,0 @@
-from .tupling import (
-    make_MC_composite_variables,
-    make_MC_basic_variables,
-    make_MC_event_variables,
-)
-
-from PyConf.reading import get_mc_particles, get_mc_header
-from FunTuple import FunTuple_MCParticles as FuntupleMC
-
-############################# LLLL #############################
-def maketuple_MC_Dst2D0pi_D02KSKS_LLLL(options, pvs, rec_summary):
-    name = "MC_DstpToD0Pip_D0ToKsKs_LLLL"
-    line = "/Event/MC/Particles"
-
-    input_data = get_mc_particles(f"{line}")
-
-    fields = {
-        "Dst": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi+ pi-) (KS0 ==> pi+ pi-) ) pi+]CC",
-        "D0": "[D*(2010)+ ==> ^([D0]CC ==> (KS0 ==> pi+ pi-) (KS0 ==> pi+ pi-) ) pi+]CC",
-        "KS1": "[D*(2010)+ ==> ([D0]CC ==> ^(KS0 ==> pi+ pi-) (KS0 ==> pi+ pi-) ) pi+]CC",
-        "KS2": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi+ pi-) ^(KS0 ==> pi+ pi-) ) pi+]CC",
-        "pip1": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> ^pi+ pi-) (KS0 ==> pi+ pi-) ) pi+]CC",
-        "pim1": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi+ ^pi-) (KS0 ==> pi+ pi-) ) pi+]CC",
-        "pip2": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi+ pi-) (KS0 ==> ^pi+ pi-) ) pi+]CC",
-        "pim2": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi+ pi-) (KS0 ==> pi+ ^pi-) ) pi+]CC",
-        "pi_soft": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi+ pi-) (KS0 ==> pi+ pi-) ) ^pi+]CC",
-    }
-
-    variables = {"pip1":  make_MC_basic_variables(),
-                 "pim1":  make_MC_basic_variables(),
-                 "pip2":  make_MC_basic_variables(),
-                 "pim2":  make_MC_basic_variables(),
-                 "KS1": make_MC_composite_variables(),
-                 "KS2": make_MC_composite_variables(),
-                 "D0": make_MC_composite_variables(),
-                 "Dst": make_MC_composite_variables(),
-                 "pi_soft":  make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                          tuple_name="MCDecayTree",
-                          fields=fields, variables = variables,
-                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
-                          inputs=input_data)
-
-    return [mytuple]
diff --git a/Charm_2024validation/options/d_to_hhh.py b/Charm_2024validation/options/d_to_hhh.py
deleted file mode 100644
index d10fa039f6..0000000000
--- a/Charm_2024validation/options/d_to_hhh.py
+++ /dev/null
@@ -1,503 +0,0 @@
-from .tupling import (
-    make_composite_variables_3body,
-    make_b_composite_variables,
-    make_composite_variables,
-    make_basic_variables,
-    make_hlt2_event_variables,
-    make_composite_dtf_variables_3body,
-    make_basic_dtf_variables,
-)
-
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunTuple_Particles as Funtuple
-
-
-def make_dtf_variables(options, pvs, input_data, ptype):
-
-    if ptype not in ["basic", "composite"]:
-        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
-
-    from DecayTreeFitter import DecayTreeFitter
-    
-    DTF = DecayTreeFitter(
-        name=f'DTF_{{hash}}',
-        input_particles=input_data)
-
-    DTFvtx = DecayTreeFitter(
-        name=f'DTFvtx_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    DTFmassDp = DecayTreeFitter(
-        name=f'DTFmassDp_{{hash}}',
-        input_particles=input_data,
-        mass_constraints=["D+"])
-
-    DTFvtxmassDp = DecayTreeFitter(
-        name=f'DTFvtxmassDp_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D+"])
-
-    DTFmassDsp = DecayTreeFitter(
-        name=f'DTFmassDsp_{{hash}}',
-        input_particles=input_data,
-        substitutions = ['D+{{D_s+}}'],
-        mass_constraints=["D_s+"])
-
-    DTFvtxmassDsp = DecayTreeFitter(
-        name=f'DTFvtxmassDsp_{{hash}}',
-        input_particles=input_data,
-        substitutions = ['D+{{D_s+}}',"KS0{{KS0}}"],#trick
-        mass_constraints=["D_s+"],
-        input_pvs=pvs,
-    )
-
-    if ptype == "basic":
-        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassDp,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="Dp")
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassDp,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="Dp")
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassDsp,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="Dsp")
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassDsp,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="Dsp")
-        return dtf_vars
-
-    if ptype == "composite":
-        dtf_vars = make_composite_dtf_variables_3body(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
-                                             DTF=DTFmassDp,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="Dp")
-        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
-                                             DTF=DTFvtxmassDp,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="Dp")
-        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
-                                             DTF=DTFmassDsp,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="Dsp")
-        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
-                                             DTF=DTFvtxmassDsp,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="Dsp")
-        return dtf_vars
-
-
-def maketuple_D2Kpipi(options, pvs, rec_summary, _NoCuts=False):
-    name = "D2Kpipi"
-    turbo_line = "Hlt2Charm_DpDspToKmPipPip"
-    if _NoCuts == True:
-        turbo_line += "_NoCuts"
-        name += "_NoCuts"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> K- pi+ pi+]CC",
-        "Km"   : "[D+ -> ^K- pi+ pi+]CC",
-        "pip1"  : "[D+ -> K- ^pi+ pi+]CC",
-        "pip2" : "[D+ -> K- pi+ ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2pipipi(options, pvs, rec_summary, _NoCuts=False):
-    name = "D2pipipi"
-    turbo_line = "Hlt2Charm_DpDspToPimPipPip"
-    if _NoCuts == True:
-        turbo_line += "_NoCuts"
-        name += "_NoCuts"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> pi- pi+ pi+]CC",
-        "pim"   : "[D+ -> ^pi- pi+ pi+]CC",
-        "pip1"  : "[D+ -> pi- ^pi+ pi+]CC",
-        "pip2" : "[D+ -> pi- pi+ ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Ds2KKpi(options, pvs, rec_summary, _NoCuts=False):
-    name = "Ds2KKpi"
-    turbo_line = "Hlt2Charm_DpDspToKmKpPip"
-    if _NoCuts == True:
-        turbo_line += "_NoCuts"
-        name += "_NoCuts"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> K- K+ pi+]CC",
-        "Km"   : "[D+ -> ^K- K+ pi+]CC",
-        "Kp"  : "[D+ -> K- ^K+ pi+]CC",
-        "pip" : "[D+ -> K- K+ ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-    
-    return [myfilter, mytuple]
-
-def maketuple_D2Kpipi_Kpi(options, pvs, rec_summary):
-    name = "D2Kpipi_Kpi"
-    turbo_line = "Hlt2Charm_DpDspToKmPipPip"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (KS0 -> K- pi+) pi+]CC",
-        "Kst" : "[D+ -> ^(KS0 -> K- pi+) pi+]CC",
-        "Km"   : "[D+ -> (KS0 -> ^K- pi+) pi+]CC",
-        "pip"  : "[D+ -> (KS0 -> K- ^pi+) pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data),
-        "Kst"   : make_composite_variables(options, pvs, input_data),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, use_loki_decay_finder=True)
-
-    return [myfilter, mytuple]
-
-
-
-
-    '''
-    from PyConf.Algorithms import ThOrParticleSelection
-    import Functors as F
-    FILTER_TREE = lambda id: F.FILTER(F.IS_ABS_ID(id)) @ F.GET_ALL_DESCENDANTS()
-    Km_data = ThOrParticleSelection(
-    InputParticles=input_data, Functor=FILTER_TREE("[K-]CC")
-).OutputSelection
-    pip_data = ThOrParticleSelection(
-        InputParticles=input_data, Functor=FILTER_TREE("[pi+]CC")
-).OutputSelection
-    
-    
-    from PyConf.Algorithms import ChargedBasicsProducer, UniqueIDGeneratorAlg
-    from PyConf.Algorithms import ThOrCombiner__2ChargedBasics, ThOrCombiner__2Particle
-    # make unique_id_generator
-    unique_id_gen = UniqueIDGeneratorAlg()
-    '''
-    '''
-    # produce charged basic particles
-    produce_kaons = ChargedBasicsProducer(
-        InputUniqueIDGenerator=unique_id_gen, ParticleID="kaon")
-    produce_pions = ChargedBasicsProducer(
-        InputUniqueIDGenerator=unique_id_gen, ParticleID="pion")
-    produce_jpsi = ThOrCombiner__2ChargedBasics(
-    '''
-    '''
-    produce_jpsi = ThOrCombiner__2Particle(
-        InputUniqueIDGenerator=unique_id_gen,
-        DecayDescriptor="[J/psi(1S) -> K- pi+]cc",
-        #Input1=produce_kaons.Particles,
-        #Input2=produce_pions.Particles,
-        Input1=Km_data,
-        Input2=pip_data,
-    )
-    input_data = produce_jpsi.Output
-
-    branches = {
-        "Jpsi" : "[J/psi(1S) -> K- pi+]CC",
-    }
-
-    from FunTuple import FunctorCollection
-    import Functors as F
-    variables = {
-        #"Dp"   : make_composite_variables(options, pvs, input_data, False, False),
-        #"Jpsi"   : make_composite_variables(options, pvs, input_data, False, False),
-        "Jpsi"   : FunctorCollection({
-            "PX": F.PX,
-            "PY": F.PY,
-            "PZ": F.PZ,
-            "BPVDIRA": F.BPVDIRA(pvs),
-            "VCHI2DOF": F.CHI2DOF, #CHI2VXNDOF
-            "BPVIPCHI2": F.BPVIPCHI2(pvs),
-            "BPVIP": F.BPVIP(pvs),
-        }),
-        
-    }
-
-    from FunTuple import FunTuple_Composites as Funtuple
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables, inputs=input_data, store_multiple_cand_info=True)
-    ## add event_variables
-
-    
-    return [myfilter, mytuple]
-    '''
-    '''
-    from PyConf.control_flow import CompositeNode, NodeLogic
-    from PyConf.Algorithms import PrintDecayTree, PrintHeader
-    from RecoConf.reconstruction_objects import upfront_reconstruction
-    from DaVinci.common_particles import make_std_loose_jpsi2mum
-    jpsis = make_std_loose_jpsi2mumu()
-    pdt = PrintDecayTree(name="PrintJpsis", Input=jpsis)
-    algs = upfront_reconstruction() + [jpsis, pdt]
-
-    node = CompositeNode(
-    "PrintJpsiNode", children=algs, combine_logic=NodeLogic.NONLAZY_AND
-)
-    return [node]
-    
-    '''
-
-
-def maketuple_D2pipiK(options, pvs, rec_summary, _NoCuts=False):
-    name = "D2pipiK"
-    turbo_line = "Hlt2Charm_DpDspToKpPimPip"
-    if _NoCuts == True:
-        turbo_line += "_NoCuts"
-        name += "_NoCuts"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> pi- pi+ K+]CC",
-        "p1"   : "[D+ -> ^pi- pi+ K+]CC",
-        "p2"  : "[D+ -> pi- ^pi+ K+]CC",
-        "p3" : "[D+ -> pi- pi+ ^K+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
-        "p1"     : make_basic_variables(options, pvs, input_data),
-        "p2"    : make_basic_variables(options, pvs, input_data),
-        "p3"   : make_basic_variables(options, pvs, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2KKK(options, pvs, rec_summary, _NoCuts=False):
-    name = "D2KKK"
-    turbo_line = "Hlt2Charm_DpDspToKmKpKp"
-    if _NoCuts == True:
-        turbo_line += "_NoCuts"
-        name += "_NoCuts"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> K- K+ K+]CC",
-        "p1"   : "[D+ -> ^K- K+ K+]CC",
-        "p2"  : "[D+ -> K- ^K+ K+]CC",
-        "p3" : "[D+ -> K- K+ ^K+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
-        "p1"     : make_basic_variables(options, pvs, input_data),
-        "p2"    : make_basic_variables(options, pvs, input_data),
-        "p3"   : make_basic_variables(options, pvs, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2piKK(options, pvs, rec_summary, _NoCuts=False):
-    name = "D2piKK"
-    turbo_line = "Hlt2Charm_DpDspToKpKpPim"
-    if _NoCuts == True:
-        turbo_line += "_NoCuts"
-        name += "_NoCuts"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> pi- K+ K+]CC",
-        "p1"   : "[D+ -> ^pi- K+ K+]CC",
-        "p2"  : "[D+ -> pi- ^K+ K+]CC",
-        "p3" : "[D+ -> pi- K+ ^K+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
-        "p1"     : make_basic_variables(options, pvs, input_data),
-        "p2"    : make_basic_variables(options, pvs, input_data),
-        "p3"   : make_basic_variables(options, pvs, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-
-def maketuple_B02Dpi_D2KKpi(options, pvs, rec_summary):
-    name = "B02Dpi_D2KKpi"
-    turbo_line = "Hlt2Charm_B0ToDmPip_DmToKmKpPim"
-    
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-    
-    branches = {
-        "B0" : "[[B0]CC -> (D- -> K- K+ pi-) pi+]CC",
-        "pip" : "[[B0]CC -> (D- -> K- K+ pi-) ^pi+]CC",
-        "Dm" : "[[B0]CC -> ^(D- -> K- K+ pi-) pi+]CC",
-        "p1" : "[[B0]CC -> (D- -> ^K- K+ pi-) pi+]CC",
-        "p2" : "[[B0]CC -> (D- -> K- ^K+ pi-) pi+]CC",
-        "p3" : "[[B0]CC -> (D- -> K- K+ ^pi-) pi+]CC",
-    }
-    
-    variables = {
-        "B0" : make_b_composite_variables(options, pvs, input_data),
-        "pip" : make_basic_variables(options, pvs,input_data),
-        "Dm"   : make_composite_variables_3body(options, pvs, input_data),
-        "p1"     : make_basic_variables(options, pvs, input_data),
-        "p2"    : make_basic_variables(options, pvs, input_data),
-        "p3"   : make_basic_variables(options, pvs, input_data),        
-    }
-    
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-
-def maketuple_B02Dpi_D2pipipi(options, pvs, rec_summary, _NoCuts=False):    
-    name = "B02Dpi_D2pipipi"
-    turbo_line = "Hlt2Charm_B0ToDmPip_DmToPimPimPip"
-    
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-    
-    branches = {
-        "B0" : "[[B0]CC -> (D- -> pi- pi- pi+) pi+]CC",
-        "pip" : "[[B0]CC -> (D- -> pi- pi- pi+) ^pi+]CC",
-        "Dm" : "[[B0]CC -> ^(D- -> pi- pi- pi+) pi+]CC",
-        "p1" : "[[B0]CC -> (D- -> ^pi- pi- pi+) pi+]CC",
-        "p2" : "[[B0]CC -> (D- -> pi- ^pi- pi+) pi+]CC",
-        "p3" : "[[B0]CC -> (D- -> pi- pi- ^pi+) pi+]CC",
-    }
-    
-    variables = {
-        "B0" : make_b_composite_variables(options, pvs, input_data),
-        "pip" : make_basic_variables(options, pvs,input_data),
-        "Dm"   : make_composite_variables_3body(options, pvs, input_data),
-        "p1"     : make_basic_variables(options, pvs, input_data),
-        "p2"    : make_basic_variables(options, pvs, input_data),
-        "p3"   : make_basic_variables(options, pvs, input_data),        
-    }
-    
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-    
-def maketuple_Bs02Dspi_Ds2KKpi(options, pvs, rec_summary, _NoCuts=False):    
-    name = "Bs02Dspi_Ds2KKpi"
-    turbo_line = "Hlt2Charm_Bs0ToDsmPip_DsmToKmKpPim"
-    
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-    
-    branches = {
-        "Bs0" : "[[B_s0]CC -> (D_s- -> K- K+ pi-) pi+]CC",
-        "pip" : "[[B_s0]CC -> (D_s- -> K- K+ pi-) ^pi+]CC",
-        "Dsm" : "[[B_s0]CC -> ^(D_s- -> K- K+ pi-) pi+]CC",
-        "p1" : "[[B_s0]CC -> (D_s- -> ^K- K+ pi-) pi+]CC",
-        "p2" : "[[B_s0]CC -> (D_s- -> K- ^K+ pi-) pi+]CC",
-        "p3" : "[[B_s0]CC -> (D_s- -> K- K+ ^pi-) pi+]CC",
-    }
-    
-    variables = {
-        "Bs0" : make_b_composite_variables(options, pvs, input_data),
-        "pip" : make_basic_variables(options, pvs,input_data),
-        "Dsm"   : make_composite_variables_3body(options, pvs, input_data),
-        "p1"     : make_basic_variables(options, pvs, input_data),
-        "p2"    : make_basic_variables(options, pvs, input_data),
-        "p3"   : make_basic_variables(options, pvs, input_data),        
-    }
-    
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-    
-def maketuple_Bs02Dspi_Ds2pipipi(options, pvs, rec_summary, _NoCuts=False):
-    name = "Bs02Dspi_Ds2pipipi"
-    turbo_line = "Hlt2Charm_Bs0ToDsmPip_DsmToPimPimPip"
-    
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-    
-    branches = {
-        "Bs0" : "[[B_s0]CC -> (D_s- -> pi- pi- pi+) pi+]CC",
-        "pip" : "[[B_s0]CC -> (D_s- -> pi- pi- pi+) ^pi+]CC",
-        "Dsm" : "[[B_s0]CC -> ^(D_s- -> pi- pi- pi+) pi+]CC",
-        "p1" : "[[B_s0]CC -> (D_s- -> ^pi- pi- pi+) pi+]CC",
-        "p2" : "[[B_s0]CC -> (D_s- -> pi- ^pi- pi+) pi+]CC",
-        "p3" : "[[B_s0]CC -> (D_s- -> pi- pi- ^pi+) pi+]CC",
-    }
-    
-    variables = {
-        "Bs0" : make_b_composite_variables(options, pvs, input_data),
-        "pip" : make_basic_variables(options, pvs,input_data),
-        "Dsm"   : make_composite_variables_3body(options, pvs, input_data),
-        "p1"     : make_basic_variables(options, pvs, input_data),
-        "p2"    : make_basic_variables(options, pvs, input_data),
-        "p3"   : make_basic_variables(options, pvs, input_data),        
-    }
-    
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
diff --git a/Charm_2024validation/options/d_to_hhh_MC.py b/Charm_2024validation/options/d_to_hhh_MC.py
deleted file mode 100644
index e666e5f3ce..0000000000
--- a/Charm_2024validation/options/d_to_hhh_MC.py
+++ /dev/null
@@ -1,92 +0,0 @@
-from .tupling import (
-    make_MC_composite_variables,
-    make_MC_basic_variables,
-    make_MC_event_variables,
-)
-
-from PyConf.reading import get_mc_particles, get_mc_header
-from FunTuple import FunTuple_MCParticles as FuntupleMC
-
-def maketuple_MC_D2Kpipi(options, pvs, rec_summary):
-    name = "MC_D2Kpipi"
-    line = "/Event/MC/Particles"
-
-    input_data = get_mc_particles(f"{line}")
-
-    branches = {
-        "Dp" : "[D+ ==> K- pi+ pi+]CC",
-        "Km"   : "[D+ ==> ^K- pi+ pi+]CC",
-        "pip1"  : "[D+ ==> K- ^pi+ pi+]CC",
-        "pip2" : "[D+ ==> K- pi+ ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_MC_composite_variables(),
-        "Km"     : make_MC_basic_variables(),
-        "pip1"    : make_MC_basic_variables(),
-        "pip2"   : make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                          tuple_name="MCDecayTree",
-                          fields=branches, variables = variables,
-                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
-                          inputs=input_data)
-
-    return [mytuple]
-
-def maketuple_MC_Ds2KKpi(options, pvs, rec_summary):
-    name = "MC_Ds2KKpi"
-    line = "/Event/MC/Particles"
-
-    input_data = get_mc_particles(f"{line}")
-
-    branches = {
-        "Dp" : "[D_s+ ==> K- K+ pi+]CC",
-        "Km"   : "[D_s+ ==> ^K- K+ pi+]CC",
-        "Kp"  : "[D_s+ ==> K- ^K+ pi+]CC",
-        "pip" : "[D_s+ ==> K- K+ ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_MC_composite_variables(),
-        "Km"     : make_MC_basic_variables(),
-        "Kp"    : make_MC_basic_variables(),
-        "pip"   : make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                          tuple_name="MCDecayTree",
-                          fields=branches, variables = variables,
-                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
-                          inputs=input_data)
-
-    return [mytuple]
-
-def maketuple_MC_Ds2KKK(options, pvs, rec_summary):
-    name = "MC_Ds2KKK"
-    line = "/Event/MC/Particles"
-
-    input_data = get_mc_particles(f"{line}")
-
-    branches = {
-        "Dp" : "[D_s+ ==> K- K+ K+]CC",
-        "Km"   : "[D_s+ ==> ^K- K+ K+]CC",
-        "Kp1"  : "[D_s+ ==> K- ^K+ K+]CC",
-        "Kp2" : "[D_s+ ==> K- K+ ^K+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_MC_composite_variables(),
-        "Km"     : make_MC_basic_variables(),
-        "Kp1"    : make_MC_basic_variables(),
-        "Kp2"   : make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                          tuple_name="MCDecayTree",
-                          fields=branches, variables = variables,
-                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
-                          inputs=input_data)
-
-    return [mytuple]
diff --git a/Charm_2024validation/options/d_to_ksh.py b/Charm_2024validation/options/d_to_ksh.py
deleted file mode 100644
index df40aee746..0000000000
--- a/Charm_2024validation/options/d_to_ksh.py
+++ /dev/null
@@ -1,313 +0,0 @@
-from .tupling import (
-    make_composite_variables,
-    make_basic_variables,
-    make_hlt2_event_variables,
-    make_composite_dtf_variables,
-    make_basic_dtf_variables,
-)
-
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunTuple_Particles as Funtuple
-
-
-def make_dtf_variables(options, pvs, input_data, ptype, islong=False):
-
-    if ptype not in ["basic", "composite"]:
-        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
-
-    from DecayTreeFitter import DecayTreeFitter
-    
-    DTF = DecayTreeFitter(
-        name=f'DTF_{{hash}}',
-        input_particles=input_data)
-
-    DTFvtx = DecayTreeFitter(
-        name=f'DTFvtx_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    DTFmassKS = DecayTreeFitter(
-        name=f'DTFmassKS_{{hash}}',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTFvtxmassKS = DecayTreeFitter(
-        name=f'DTFvtxmassKS_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    DTFmassDpKS = DecayTreeFitter(
-        name=f'DTFmassDpKS_{{hash}}',
-        input_particles=input_data,
-        mass_constraints=["D+","KS0"])
-
-    DTFvtxmassDpKS = DecayTreeFitter(
-        name=f'DTFvtxmassDpKS_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D+","KS0"])
-
-    DTFmassDspKS = DecayTreeFitter(
-        name=f'DTFmassDspKS_{{hash}}',
-        input_particles=input_data,
-        substitutions = ['D+{{D_s+}}'],
-        mass_constraints=["D_s+","KS0"])
-
-    DTFvtxmassDspKS = DecayTreeFitter(
-        name=f'DTFvtxmassDspKS_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs,
-        substitutions = ['D+{{D_s+}}',"KS0{{KS0}}"],#trick
-        mass_constraints=["D_s+","KS0"],
-    )
-
-
-    if ptype == "basic":
-        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False,
-                                            islong=islong)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False,
-                                            islong=islong)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassKS,
-                                             pv_constraint=False,
-                                             mass_constraint=True, 
-                                             particle_name="KS",
-                                             islong=islong)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassKS,
-                                             pv_constraint=True,
-                                             mass_constraint=True, 
-                                             particle_name="KS",
-                                             islong=islong)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassDpKS,
-                                             pv_constraint=False,
-                                             mass_constraint=True, 
-                                             particle_name="DpKS",
-                                             islong=islong)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassDpKS,
-                                             pv_constraint=True,
-                                             mass_constraint=True, 
-                                             particle_name="DpKS",
-                                             islong=islong)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassDspKS,
-                                             pv_constraint=False,
-                                             mass_constraint=True, 
-                                             particle_name="DspKS",
-                                             islong=islong)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassDspKS,
-                                             pv_constraint=True,
-                                             mass_constraint=True, 
-                                             particle_name="DspKS",
-                                             islong=islong)
-        return dtf_vars
-
-    if ptype == "composite":
-        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassKS,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="KS")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassKS,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="KS")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassDpKS,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="DpKS")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassDpKS,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="DpKS")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassDspKS,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="DspKS")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassDspKS,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="DspKS")
-        return dtf_vars
-
-
-def maketuple_D2KSK_DD(options, pvs, rec_summary):
-    name = "D2KSK_DD"
-    turbo_line = "Hlt2Charm_DpDspToKsKp_DD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (KS0 -> pi- pi+) K+]CC",
-        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) K+]CC",
-        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) K+]CC",
-        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) K+]CC",
-        "hp" : "[D+ -> (KS0 -> pi- pi+) ^K+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2KSK_LD(options, pvs, rec_summary):
-    name = "D2KSK_LD"
-    turbo_line = "Hlt2Charm_DpDspToKsKp_LD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (KS0 -> pi- pi+) K+]CC",
-        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) K+]CC",
-        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) K+]CC",
-        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) K+]CC",
-        "hp" : "[D+ -> (KS0 -> pi- pi+) ^K+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-
-def maketuple_D2KSK_LL(options, pvs, rec_summary):
-    name = "D2KSK_LL"
-    turbo_line = "Hlt2Charm_DpDspToKsKp_LL"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (KS0 -> pi- pi+) K+]CC",
-        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) K+]CC",
-        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) K+]CC",
-        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) K+]CC",
-        "hp" : "[D+ -> (KS0 -> pi- pi+) ^K+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2KSpi_DD(options, pvs, rec_summary):
-    name = "D2KSpi_DD"
-    turbo_line = "Hlt2Charm_DpDspToKsPip_DD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (KS0 -> pi- pi+) pi+]CC",
-        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) pi+]CC",
-        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) pi+]CC",
-        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) pi+]CC",
-        "hp" : "[D+ -> (KS0 -> pi- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2KSpi_LD(options, pvs, rec_summary):
-    name = "D2KSpi_LD"
-    turbo_line = "Hlt2Charm_DpDspToKsPip_LD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (KS0 -> pi- pi+) pi+]CC",
-        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) pi+]CC",
-        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) pi+]CC",
-        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) pi+]CC",
-        "hp" : "[D+ -> (KS0 -> pi- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2KSpi_LL(options, pvs, rec_summary):
-    name = "D2KSpi_LL"
-    turbo_line = "Hlt2Charm_DpDspToKsPip_LL"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (KS0 -> pi- pi+) pi+]CC",
-        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) pi+]CC",
-        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) pi+]CC",
-        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) pi+]CC",
-        "hp" : "[D+ -> (KS0 -> pi- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
diff --git a/Charm_2024validation/options/d_to_ksh_MC.py b/Charm_2024validation/options/d_to_ksh_MC.py
deleted file mode 100644
index 38a2197998..0000000000
--- a/Charm_2024validation/options/d_to_ksh_MC.py
+++ /dev/null
@@ -1,68 +0,0 @@
-from .tupling import (
-    make_MC_composite_variables,
-    make_MC_basic_variables,
-    make_MC_event_variables,
-)
-
-from PyConf.reading import get_mc_particles, get_mc_header
-from FunTuple import FunTuple_MCParticles as FuntupleMC
-
-def maketuple_MC_D2KSK(options, pvs, rec_summary):
-    name = "MC_D2KSK"
-    line = "/Event/MC/Particles"
-
-    input_data = get_mc_particles(f"{line}")
-
-    branches = {
-        "Dp" : "[D_s+ ==> (KS0 ==> pi- pi+) K+]CC",
-        "KS0"  : "[D_s+ ==> ^(KS0 ==> pi- pi+) K+]CC",
-        "pim"   : "[D_s+ ==> (KS0 ==> ^pi- pi+) K+]CC",
-        "pip"  : "[D_s+ ==> (KS0 ==> pi- ^pi+) K+]CC",
-        "hp" : "[D_s+ ==> (KS0 ==> pi- pi+) ^K+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_MC_composite_variables(),
-        "KS0"    : make_MC_composite_variables(),
-        "pim"     : make_MC_basic_variables(),
-        "pip"    : make_MC_basic_variables(),
-        "hp"   : make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                        tuple_name="MCDecayTree",
-                        fields=branches, variables = variables,
-                        event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
-                        inputs=input_data)
-
-    return [mytuple]
-
-def maketuple_MC_D2KSpi(options, pvs, rec_summary):
-    name = "MC_D2KSpi"
-    line = "/Event/MC/Particles"
-
-    input_data = get_mc_particles(f"{line}")
-
-    branches = {
-        "Dp" : "[D+ ==> (KS0 ==> pi- pi+) pi+]CC",
-        "KS0"  : "[D+ ==> ^(KS0 ==> pi- pi+) pi+]CC",
-        "pim"   : "[D+ ==> (KS0 ==> ^pi- pi+) pi+]CC",
-        "pip"  : "[D+ ==> (KS0 ==> pi- ^pi+) pi+]CC",
-        "hp" : "[D+ ==> (KS0 ==> pi- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_MC_composite_variables(),
-        "KS0"    : make_MC_composite_variables(),
-        "pim"     : make_MC_basic_variables(),
-        "pip"    : make_MC_basic_variables(),
-        "hp"   : make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                        tuple_name="MCDecayTree",
-                        fields=branches, variables = variables,
-                        event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
-                        inputs=input_data)
-
-    return [mytuple]
diff --git a/Charm_2024validation/options/detection_asymmetry.py b/Charm_2024validation/options/detection_asymmetry.py
deleted file mode 100644
index 9769559e87..0000000000
--- a/Charm_2024validation/options/detection_asymmetry.py
+++ /dev/null
@@ -1,191 +0,0 @@
-from .tupling import (
-    make_composite_variables,
-    make_composite_variables_3body,
-    make_basic_variables,
-    make_hlt2_event_variables,
-)
-
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunTuple_Particles as Funtuple
-
-def maketuple_D2Kpipi_ADet(options, pvs, rec_summary):
-    name = "D2Kpipi_ADet"
-    turbo_line = "Hlt2Charm_DpToKmPipPip_ADet"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> K- pi+ pi+]CC",
-        "Km"   : "[D+ -> ^K- pi+ pi+]CC",
-        "pip1"  : "[D+ -> K- ^pi+ pi+]CC",
-        "pip2" : "[D+ -> K- pi+ ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
-        "Km"     : make_basic_variables(options, pvs, input_data),
-        "pip1"    : make_basic_variables(options, pvs, input_data),
-        "pip2"   : make_basic_variables(options, pvs, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2pipipi_ADet(options, pvs, rec_summary):
-    name = "D2pipipi_ADet"
-    turbo_line = "Hlt2Charm_DspToPimPipPip_ADet"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D_s+ -> pi- pi+ pi+]CC",
-        "pim"   : "[D_s+ -> ^pi- pi+ pi+]CC",
-        "pip1"  : "[D_s+ -> pi- ^pi+ pi+]CC",
-        "pip2" : "[D_s+ -> pi- pi+ ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
-        "pim"     : make_basic_variables(options, pvs, input_data),
-        "pip1"    : make_basic_variables(options, pvs, input_data),
-        "pip2"   : make_basic_variables(options, pvs, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Ds2KKpi_ADet(options, pvs, rec_summary):
-    name = "Ds2KKpi_ADet"
-    turbo_line = "Hlt2Charm_DspToKmKpPip_ADet"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D_s+ -> K- K+ pi+]CC",
-        "Km"   : "[D_s+ -> ^K- K+ pi+]CC",
-        "Kp"  : "[D_s+ -> K- ^K+ pi+]CC",
-        "pip" : "[D_s+ -> K- K+ ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
-        "Km"     : make_basic_variables(options, pvs, input_data),
-        "Kp"    : make_basic_variables(options, pvs, input_data),
-        "pip"   : make_basic_variables(options, pvs, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-    
-    return [myfilter, mytuple]
-        
-def maketuple_Lc2KSp_LL_ADet(options, pvs, rec_summary):
-    name = "Lc2KSp_LL_ADet"
-    turbo_line = "Hlt2Charm_LcpToPpKs_LL_ADet"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Lc" : "[Lambda_c+ -> (KS0 -> pi- pi+) p+]CC",
-        "KS0"  : "[Lambda_c+ -> ^(KS0 -> pi- pi+) p+]CC",
-        "pim"   : "[Lambda_c+ -> (KS0 -> ^pi- pi+) p+]CC",
-        "pip"  : "[Lambda_c+ -> (KS0 -> pi- ^pi+) p+]CC",
-        "pp" : "[Lambda_c+ -> (KS0 -> pi- pi+) ^p+]CC",
-    }
-
-    variables = {
-        "Lc"   : make_composite_variables(options, pvs, input_data),
-        "KS0"    : make_composite_variables(options, pvs, input_data),
-        "pim"     : make_basic_variables(options, pvs, input_data),
-        "pip"    : make_basic_variables(options, pvs, input_data),
-        "pp"   : make_basic_variables(options, pvs, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Lc2pKpi_ADet(options, pvs, rec_summary):
-    name = "Lc2pKpi_ADet"
-    turbo_line = "Hlt2Charm_LcpToPpKmPip_ADet"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Lc" : "[Lambda_c+ -> K- pi+ p+]CC",
-        "Km"   : "[Lambda_c+ -> ^K- pi+ p+]CC",
-        "pip"  : "[Lambda_c+ -> K- ^pi+ p+]CC",
-        "pp" : "[Lambda_c+ -> K- pi+ ^p+]CC",
-    }
-
-    variables = {
-        "Lc"   : make_composite_variables_3body(options, pvs, input_data),
-        "Km"     : make_basic_variables(options, pvs, input_data),
-        "pip"    : make_basic_variables(options, pvs, input_data),
-        "pp"   : make_basic_variables(options, pvs, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2KSK_LL_ADet(options, pvs, rec_summary):
-    name = "D2KSK_LL_ADet"
-    turbo_line = "Hlt2Charm_DspToKsKp_LL_ADet"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D_s+ -> (KS0 -> pi- pi+) K+]CC",
-        "KS0"  : "[D_s+ -> ^(KS0 -> pi- pi+) K+]CC",
-        "pim"   : "[D_s+ -> (KS0 -> ^pi- pi+) K+]CC",
-        "pip"  : "[D_s+ -> (KS0 -> pi- ^pi+) K+]CC",
-        "hp" : "[D_s+ -> (KS0 -> pi- pi+) ^K+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data),
-        "KS0"    : make_composite_variables(options, pvs, input_data),
-        "pim"     : make_basic_variables(options, pvs, input_data),
-        "pip"    : make_basic_variables(options, pvs, input_data),
-        "hp"   : make_basic_variables(options, pvs, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2KSpi_LL_ADet(options, pvs, rec_summary):
-    name = "D2KSpi_LL_ADet"
-    turbo_line = "Hlt2Charm_DpToKsPip_LL_ADet"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (KS0 -> pi- pi+) pi+]CC",
-        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) pi+]CC",
-        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) pi+]CC",
-        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) pi+]CC",
-        "hp" : "[D+ -> (KS0 -> pi- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data),
-        "KS0"    : make_composite_variables(options, pvs, input_data),
-        "pim"     : make_basic_variables(options, pvs, input_data),
-        "pip"    : make_basic_variables(options, pvs, input_data),
-        "hp"   : make_basic_variables(options, pvs, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
diff --git a/Charm_2024validation/options/dst_to_dee.py b/Charm_2024validation/options/dst_to_dee.py
deleted file mode 100644
index 11f42bae95..0000000000
--- a/Charm_2024validation/options/dst_to_dee.py
+++ /dev/null
@@ -1,296 +0,0 @@
-import Functors as F
-from Functors.math import log
-from DaVinci import Options, make_config
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunctorCollection
-from PyConf.reading import get_particles, get_pvs
-import FunTuple.functorcollections as FC
-from FunTuple import FunTuple_Particles as Funtuple
-from DecayTreeFitter import DecayTreeFitter
-from Hlt2Conf.lines.charm.dst_to_dee_makers import (dst_BDT_functor)
-from .tupling import (
-    make_DeltaM_variable,
-    make_basic_variables,
-    make_composite_variables,
-    make_composite_variables_3body,
-    make_composite_variables_4body,
-    make_hlt2_event_variables,
-    make_basic_dtf_variables,
-    make_composite_dtf_variables,
-    make_composite_dtf_variables_3body,
-    make_composite_dtf_variables_4body,
-    Hlt1_lines
-)
-extra_brem_variables= (FunctorCollection(
-            {
-                "BREMHYPODELTAX": F.BREMHYPODELTAX,
-                "BREMHYPOENERGY": F.BREMHYPOENERGY,
-                "BREMHYPOID": F.BREMHYPOID,
-                "BREMHYPOMATCH_CHI2": F.BREMHYPOMATCH_CHI2,
-                "BREMPIDE": F.BREMPIDE,
-                "INBREM": F.INBREM,
-                "MASS_WITH_BREM": F.MASS_WITH_BREM,
-                "PT_WITH_BREM": F.PT_WITH_BREM,
-                "P_WITH_BREM": F.P_WITH_BREM,
-                "ECALPIDE": F.ECALPIDE,
-                "HCALPIDE": F.HCALPIDE,
-                "ELECTRONSHOWEREOP": F.ELECTRONSHOWEREOP,
-                "CLUSTERMATCH_CHI2": F.CLUSTERMATCH_CHI2,
-                "ELECTRONMATCH_CHI2": F.ELECTRONMATCH_CHI2,
-                "ELECTRONENERGY": F.ELECTRONENERGY,
-                "ELECTRONID": F.ELECTRONID,
-                "HCALEOP": F.HCALEOP,
-                "CALO_NEUTRAL_SHOWER_SHAPE": F.CALO_NEUTRAL_SHOWER_SHAPE,
-                "RICH_DLL_E": F.VALUE_OR(F.NaN)@F.RICH_DLL_E,
-            })
-    )
-
-decay_descriptor = {
-    'dst_kpi_os' : {
-        "Dst0":   "[ D*(2007)0 ->  (D0 ->  K-  pi+)  (gamma ->  e+  e-)]CC",
-        "D0":     "[ D*(2007)0 -> ^(D0 ->  K-  pi+)  (gamma ->  e+  e-)]CC",
-        "Kminus": "[ D*(2007)0 ->  (D0 -> ^K-  pi+)  (gamma ->  e+  e-)]CC",
-        "piplus": "[ D*(2007)0 ->  (D0 ->  K- ^pi+)  (gamma ->  e+  e-)]CC",
-        "gamma":  "[ D*(2007)0 ->  (D0 ->  K-  pi+) ^(gamma ->  e+  e-)]CC",
-        "eplus":  "[ D*(2007)0 ->  (D0 ->  K-  pi+)  (gamma -> ^e+  e-)]CC",
-        "eminus": "[ D*(2007)0 ->  (D0 ->  K-  pi+)  (gamma ->  e+ ^e-)]CC",
-    },
-
-    'dst_kpi_ss' : {
-        "Dst0":   "[ D*(2007)0 ->  (D0 ->  K-  pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "D0":     "[ D*(2007)0 -> ^(D0 ->  K-  pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "Kminus": "[ D*(2007)0 ->  (D0 -> ^K-  pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "piplus": "[ D*(2007)0 ->  (D0 ->  K- ^pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "gamma":  "[ D*(2007)0 ->  (D0 ->  K-  pi+) ^([gamma ->  e+  e+]CC)]CC",
-        "eplus":  "[ D*(2007)0 ->  (D0 ->  K-  pi+)  ([gamma -> ^e+  e+]CC)]CC",
-        "eminus": "[ D*(2007)0 ->  (D0 ->  K-  pi+)  ([gamma ->  e+ ^e+]CC)]CC",
-    },
-
-    'dst_k3pi_os' :  {
-        "Dst0":    "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)  (gamma ->  e+  e-)]CC",
-        "D0":      "[ D*(2007)0 -> ^(D0 -> K- pi- pi+ pi+)  (gamma ->  e+  e-)]CC",
-        "Kminus":  "[ D*(2007)0 ->  (D0 -> ^K- pi- pi+ pi+) (gamma ->  e+  e-)]CC",
-        "piminus": "[ D*(2007)0 ->  (D0 -> K- ^pi- pi+ pi+) (gamma ->  e+  e-)]CC",
-        "piplus1": "[ D*(2007)0 ->  (D0 -> K- pi- ^pi+ pi+) (gamma ->  e+  e-)]CC",
-        "piplus2": "[ D*(2007)0 ->  (D0 -> K- pi- pi+ ^pi+) (gamma ->  e+  e-)]CC",
-        "gamma":   "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+) ^(gamma ->  e+  e-)]CC",
-        "eplus":   "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)  (gamma -> ^e+  e-)]CC",
-        "eminus":  "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)  (gamma ->  e+ ^e-)]CC",
-    },
-
-    'dst_k3pi_ss' :  {
-        "Dst0":    "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)   ([gamma ->  e+  e+]CC)]CC",
-        "D0":      "[ D*(2007)0 -> ^(D0 -> K- pi- pi+ pi+)   ([gamma ->  e+  e+]CC)]CC",
-        "Kminus":  "[ D*(2007)0 ->  (D0 -> ^K- pi- pi+ pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "piminus": "[ D*(2007)0 ->  (D0 -> K- ^pi- pi+ pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "piplus1": "[ D*(2007)0 ->  (D0 -> K- pi- ^pi+ pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "piplus2": "[ D*(2007)0 ->  (D0 -> K- pi- pi+ ^pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "gamma":   "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)  ^([gamma ->  e+  e+]CC)]CC",
-        "eplus":   "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)   ([gamma -> ^e+  e+]CC)]CC",
-        "eminus":  "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)   ([gamma ->  e+ ^e+]CC)]CC",
-    },
-
-    'dsstp_2kpi_os' : {
-        "Dstp":   "[ D*_s+ ->  (D_s+ -> K- K+ pi+)  (gamma ->  e+  e-)]CC",
-        "DpDs":   "[ D*_s+ -> ^(D_s+ -> K- K+ pi+)  (gamma ->  e+  e-)]CC",
-        "Kminus": "[ D*_s+ ->  (D_s+ -> ^K- K+ pi+) (gamma ->  e+  e-)]CC",
-        "Kplus":  "[ D*_s+ ->  (D_s+ -> K- ^K+ pi+) (gamma ->  e+  e-)]CC",
-        "piplus": "[ D*_s+ ->  (D_s+ -> K- K+ ^pi+) (gamma ->  e+  e-)]CC",
-        "gamma":  "[ D*_s+ ->  (D_s+ -> K- K+ pi+) ^(gamma ->  e+  e-)]CC",
-        "eplus":  "[ D*_s+ ->  (D_s+ -> K- K+ pi+)  (gamma -> ^e+  e-)]CC",
-        "eminus": "[ D*_s+ ->  (D_s+ -> K- K+ pi+)  (gamma ->  e+ ^e-)]CC",
-    },
-    'dsstp_2kpi_ss' : {
-        "Dstp":   "[ D*_s+ ->  (D_s+ -> K- K+ pi+)   ([gamma ->  e+  e+]CC)]CC",
-        "DpDs":   "[ D*_s+ -> ^(D_s+ -> K- K+ pi+)   ([gamma ->  e+  e+]CC)]CC",
-        "Kminus": "[ D*_s+ ->  (D_s+ -> ^K- K+ pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "Kplus":  "[ D*_s+ ->  (D_s+ -> K- ^K+ pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "piplus": "[ D*_s+ ->  (D_s+ -> K- K+ ^pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "gamma":  "[ D*_s+ ->  (D_s+ -> K- K+ pi+)  ^([gamma ->  e+  e+]CC)]CC",
-        "eplus":  "[ D*_s+ ->  (D_s+ -> K- K+ pi+)   ([gamma -> ^e+  e+]CC)]CC",
-        "eminus": "[ D*_s+ ->  (D_s+ -> K- K+ pi+)   ([gamma ->  e+ ^e+]CC)]CC",
-    },
-
-}
-
-def MVA_dst_variables(line, pvs):
-    return (FunctorCollection( { "MVA": dst_BDT_functor(pvs, line=line)}))
-#make_dtf_variables(options,  input_data, ptype):
-def make_dtf_variables(options, input_data,  pvs, ptype="basic",  mass_constrain = ["D*(2007)0", "D0" ], nparticles=2):
-    
-    DTF = DecayTreeFitter(
-        name="DTF_{hash}",
-        input_particles=input_data,
-    )
-
-    DTF_DMass_BestPV = DecayTreeFitter(
-        name="DTF_DMass_BestPV_{hash}",
-        input_particles=input_data,
-        mass_constraints=mass_constrain,
-        input_pvs=pvs,
-        fit_all_pvs=False,
-    )
-    DTF_Mass_BestPV = DecayTreeFitter(
-        name="DTF_Mass_BestPV_{hash}",
-        input_particles=input_data,
-        mass_constraints=[mass_constrain[1]],
-        input_pvs=pvs,
-        fit_all_pvs=False,
-    )
-
-    DTF_BestPV = DecayTreeFitter(
-        name="DTF_BestPV_{hash}",
-        input_particles=input_data,
-        #mass_constraints=["D*(2007)0", "D0" ],
-        input_pvs=pvs,
-        fit_all_pvs=False,
-    )
-
-    DTF_DMass = DecayTreeFitter(
-        name="DTF_DMass_{hash}",
-        input_particles=input_data,
-        mass_constraints=mass_constrain,
-        output_level=3,
-    )
-    DTF_Mass = DecayTreeFitter(
-        name="DTF_Mass_{hash}",
-        input_particles=input_data,
-        mass_constraints=[mass_constrain[1]],
-        output_level=3,
-    )
-    
-    if ptype == "basic":
-        dtf_variables =  make_basic_dtf_variables
-    elif ptype == "composite":
-        if nparticles == 2:
-            dtf_variables = make_composite_dtf_variables 
-        elif nparticles == 3:
-            dtf_variables = make_composite_dtf_variables_3body
-        elif nparticles == 4:
-            dtf_variables = make_composite_dtf_variables_4body 
-
-    dtf_vars = dtf_variables(options, pvs, input_data,
-                                        DTF=DTF,
-                                        pv_constraint=False,
-                                        mass_constraint=False)
-    dtf_vars += dtf_variables(options, pvs, input_data,
-                                        DTF=DTF_BestPV,
-                                        pv_constraint=True,
-                                        mass_constraint=False)
-    dtf_vars += dtf_variables(options, pvs, input_data,
-                                        DTF=DTF_Mass,
-                                        pv_constraint=False,
-                                        mass_constraint=True, particle_name="D")
-    dtf_vars += dtf_variables(options, pvs, input_data,
-                                        DTF=DTF_Mass_BestPV,
-                                        pv_constraint=True,
-                                        mass_constraint=True, particle_name="D")
-    dtf_vars += dtf_variables(options, pvs, input_data,
-                                        DTF=DTF_DMass,
-                                        pv_constraint=False,
-                                        mass_constraint=True, particle_name="DstD")
-    dtf_vars += dtf_variables(options, pvs, input_data,
-                                        DTF=DTF_DMass_BestPV,
-                                        pv_constraint=True,
-                                        mass_constraint=True, particle_name="DstD")
-
-    return dtf_vars
-
-
-def make_Dst0ToD0EmEp_D0ToKmPip_tuple(options, line, pvs , rec_summary, dd='dst_kpi_os'):
-
-    input_data=get_particles(f"/Event/HLT2/{line}/Particles")
-    my_filter = create_lines_filter(f"LineFilter_{line}_{{hash}}",[line],)
-
-    fields = decay_descriptor[dd]
-    
-    composite_tuple_variables = {
-        "Dst0"   :  make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs,  "composite") +\
-             MVA_dst_variables("Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip", pvs) + make_DeltaM_variable(options), 
-        "D0"     :  make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs,  "composite"),
-        "gamma"  :  make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs,  "composite")
-    }
-    basic_tuple_variables = { 
-        "Kminus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"),
-        "piplus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"),
-        "eplus"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic") + extra_brem_variables,
-        "eminus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic") + extra_brem_variables,
-    }
-
-    my_tuple = Funtuple(
-        name=f"Tuple_{line}_{dd}",
-        tuple_name="DecayTree",
-        fields=fields,
-        variables= {**composite_tuple_variables, **basic_tuple_variables},
-        event_variables=make_hlt2_event_variables(options, pvs, rec_summary), 
-        inputs=input_data,
-        store_multiple_cand_info=True
-    )
-    return [ my_filter, my_tuple]
-
-def make_Dst0ToD0EmEp_D0ToKmPimPipPip_tuple(options, line, pvs, rec_summary, dd='dst_k3pi_os'):
-
-    input_data=get_particles(f"/Event/HLT2/{line}/Particles")
-    my_filter = create_lines_filter(f"LineFilter_{line}_{{hash}}",[line],)
-
-    fields = decay_descriptor[dd]
-    
-    composite_tuple_variables = {
-        "Dst0"   : make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs, "composite") +\
-             MVA_dst_variables("Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip", pvs) + make_DeltaM_variable(options), 
-        "D0"     : make_composite_variables_4body(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs, "composite", nparticles=4),
-        "gamma"  : make_composite_variables(options, pvs, input_data) 
-    }
-    basic_tuple_variables = { 
-        "Kminus"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"),
-        "piminus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"),
-        "piplus1" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"),
-        "piplus2" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"), 
-        "eplus"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic") + extra_brem_variables,
-        "eminus"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic") + extra_brem_variables,
-    }
-
-    my_tuple = Funtuple(
-        name=f"Tuple_{line}_{dd}",
-        tuple_name="DecayTree",
-        fields=fields,
-        variables= {**composite_tuple_variables, **basic_tuple_variables},
-        event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data,
-        store_multiple_cand_info=True
-    )
-    return [ my_filter, my_tuple]
-
-
-def make_DstpToDpDspEmEp_DpDspToKmKpPip_tuple(options, line, pvs , rec_summary, dd='dsstp_2kpi_os'):
-
-    input_data=get_particles(f"/Event/HLT2/{line}/Particles")
-    my_filter = create_lines_filter(f"LineFilter_{line}_{{hash}}",[line],)
-
-    fields = decay_descriptor[dd]
-
-    composite_tuple_variables = {
-        "Dstp"   : make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs, "composite", mass_constrain = ["D*_s+", "D_s+"]) +\
-             MVA_dst_variables("Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip", pvs) + make_DeltaM_variable(options), 
-        "DpDs"   : make_composite_variables_3body(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs, "composite", mass_constrain = ["D*_s+", "D_s+"], nparticles=3),
-        "gamma"  : make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs, "composite", mass_constrain = ["D*_s+", "D_s+"]),
-    }
-    basic_tuple_variables = { 
-        "Kminus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic",  mass_constrain = ["D*_s+", "D_s+"]),
-        "Kplus"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic",  mass_constrain = ["D*_s+", "D_s+"]),
-        "piplus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic",  mass_constrain = ["D*_s+", "D_s+"]),
-        "eplus"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic",  mass_constrain = ["D*_s+", "D_s+"])+ extra_brem_variables,
-        "eminus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic",  mass_constrain = ["D*_s+", "D_s+"])+ extra_brem_variables,
-    }
-
-    my_tuple = Funtuple(
-        name=f"Tuple_{line}_{dd}",
-        tuple_name="DecayTree",
-        fields=fields,
-        variables= {**composite_tuple_variables, **basic_tuple_variables},
-        event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data,
-        store_multiple_cand_info=True
-    )
-    return [ my_filter, my_tuple]
diff --git a/Charm_2024validation/options/hlt1.py b/Charm_2024validation/options/hlt1.py
deleted file mode 100644
index b93aeb113c..0000000000
--- a/Charm_2024validation/options/hlt1.py
+++ /dev/null
@@ -1,33 +0,0 @@
-###############################################################################
-# (c) Copyright 2023 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.                                       #
-###############################################################################
-"""
-Configures running HLT1 via Moore.
-"""
-
-from Moore import Options
-from Moore.config import allen_control_flow
-from RecoConf.hlt1_allen import allen_gaudi_config, get_allen_line_names
-from AllenConf.hlt1_calibration_lines import make_passthrough_line
-from PyConf.application import configure_input, configure
-
-def alg_config(options: Options):
-    """
-    Configures algorithm running of HLT1 via Moore to be passed to Analysis Productions.
-    """
-
-    config = configure_input(options)
-    with allen_gaudi_config.bind(sequence="hlt1_pp_matching_no_ut_1000KHz"), make_passthrough_line.bind(pre_scaler=1):
-        line_names = get_allen_line_names()
-        allen_node = allen_control_flow(options)
-        config.update(configure(options, allen_node))
-
-    return config
-
diff --git a/Charm_2024validation/options/hlt2/d0_to_hh.py b/Charm_2024validation/options/hlt2/d0_to_hh.py
deleted file mode 100644
index 3c0b0d0086..0000000000
--- a/Charm_2024validation/options/hlt2/d0_to_hh.py
+++ /dev/null
@@ -1,9 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_hh import all_lines as hh_lines
-
-def make_lines():
-    mylines = [builder() for builder in hh_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-
diff --git a/Charm_2024validation/options/hlt2/d0_to_hhhh.py b/Charm_2024validation/options/hlt2/d0_to_hhhh.py
deleted file mode 100644
index 81fe4dce30..0000000000
--- a/Charm_2024validation/options/hlt2/d0_to_hhhh.py
+++ /dev/null
@@ -1,8 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_hhhh import all_lines as hhhh_lines
-
-def make_lines():
-    mylines = [builder() for builder in hhhh_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
diff --git a/Charm_2024validation/options/hlt2/d0_to_hhpi0.py b/Charm_2024validation/options/hlt2/d0_to_hhpi0.py
deleted file mode 100644
index 52f8433c11..0000000000
--- a/Charm_2024validation/options/hlt2/d0_to_hhpi0.py
+++ /dev/null
@@ -1,8 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_hhpi0 import all_lines as hhpi0_lines
-
-def make_lines():
-    mylines = [builder() for builder in hhpi0_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
diff --git a/Charm_2024validation/options/hlt2/d0_to_kshh.py b/Charm_2024validation/options/hlt2/d0_to_kshh.py
deleted file mode 100644
index 79df310ed8..0000000000
--- a/Charm_2024validation/options/hlt2/d0_to_kshh.py
+++ /dev/null
@@ -1,8 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_kshh import all_lines as kshh_lines
-
-def make_lines():
-    mylines = [builder() for builder in kshh_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
diff --git a/Charm_2024validation/options/hlt2/d0_to_ksks.py b/Charm_2024validation/options/hlt2/d0_to_ksks.py
deleted file mode 100644
index 71ab403fd9..0000000000
--- a/Charm_2024validation/options/hlt2/d0_to_ksks.py
+++ /dev/null
@@ -1,8 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_ksks import all_lines as ksks_lines
-
-def make_lines():
-    mylines = [builder() for builder in ksks_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
diff --git a/Charm_2024validation/options/hlt2/d_to_hhh.py b/Charm_2024validation/options/hlt2/d_to_hhh.py
deleted file mode 100644
index cd718f9b86..0000000000
--- a/Charm_2024validation/options/hlt2/d_to_hhh.py
+++ /dev/null
@@ -1,10 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d_to_hhh import all_lines as hhh_lines
-from Hlt2Conf.lines.charm.detection_asymmetry_lines import all_lines as det_asy_lines
-
-def make_lines():
-    mylines = [builder() for builder in hhh_lines.values()]
-    mylines += [builder() for builder in det_asy_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
diff --git a/Charm_2024validation/options/hlt2/d_to_ksh.py b/Charm_2024validation/options/hlt2/d_to_ksh.py
deleted file mode 100644
index 8c8b172dd0..0000000000
--- a/Charm_2024validation/options/hlt2/d_to_ksh.py
+++ /dev/null
@@ -1,10 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d_to_ksh import all_lines as ksh_lines
-from Hlt2Conf.lines.charm.detection_asymmetry_lines import all_lines as det_asy_lines
-
-def make_lines():
-    mylines = [builder() for builder in ksh_lines.values()]
-    mylines += [builder() for builder in det_asy_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
diff --git a/Charm_2024validation/options/hlt2/dst_to_dee.py b/Charm_2024validation/options/hlt2/dst_to_dee.py
deleted file mode 100644
index 4fd67becd7..0000000000
--- a/Charm_2024validation/options/hlt2/dst_to_dee.py
+++ /dev/null
@@ -1,9 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.dst_to_dee import all_lines as dst_to_dee_lines
-
-def make_lines():
-    mylines = [builder() for builder in dst_to_dee_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-
diff --git a/Charm_2024validation/options/hlt2/hlt2.py b/Charm_2024validation/options/hlt2/hlt2.py
deleted file mode 100644
index c1560ce952..0000000000
--- a/Charm_2024validation/options/hlt2/hlt2.py
+++ /dev/null
@@ -1,32 +0,0 @@
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_d0_to_hh.py b/Charm_2024validation/options/hlt2/hlt2_d0_to_hh.py
deleted file mode 100644
index 7c3a67ed03..0000000000
--- a/Charm_2024validation/options/hlt2/hlt2_d0_to_hh.py
+++ /dev/null
@@ -1,41 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_hh import all_lines as hh_lines
-
-def make_lines():
-    mylines = [builder() for builder in hh_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_d0_to_hhhh.py b/Charm_2024validation/options/hlt2/hlt2_d0_to_hhhh.py
deleted file mode 100644
index d7d5dcbb90..0000000000
--- a/Charm_2024validation/options/hlt2/hlt2_d0_to_hhhh.py
+++ /dev/null
@@ -1,40 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_hhhh import all_lines as hhhh_lines
-
-def make_lines():
-    mylines = [builder() for builder in hhhh_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_d0_to_hhpi0.py b/Charm_2024validation/options/hlt2/hlt2_d0_to_hhpi0.py
deleted file mode 100644
index 063eeb274a..0000000000
--- a/Charm_2024validation/options/hlt2/hlt2_d0_to_hhpi0.py
+++ /dev/null
@@ -1,40 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_hhpi0 import all_lines as hhpi0_lines
-
-def make_lines():
-    mylines = [builder() for builder in hhpi0_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_d0_to_kshh.py b/Charm_2024validation/options/hlt2/hlt2_d0_to_kshh.py
deleted file mode 100644
index 3e1996cdf0..0000000000
--- a/Charm_2024validation/options/hlt2/hlt2_d0_to_kshh.py
+++ /dev/null
@@ -1,40 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_kshh import all_lines as kshh_lines
-
-def make_lines():
-    mylines = [builder() for builder in kshh_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_d0_to_ksks.py b/Charm_2024validation/options/hlt2/hlt2_d0_to_ksks.py
deleted file mode 100644
index e8d1052803..0000000000
--- a/Charm_2024validation/options/hlt2/hlt2_d0_to_ksks.py
+++ /dev/null
@@ -1,40 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_ksks import all_lines as ksks_lines
-
-def make_lines():
-    mylines = [builder() for builder in ksks_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_d_to_hhh.py b/Charm_2024validation/options/hlt2/hlt2_d_to_hhh.py
deleted file mode 100644
index 97965cb96e..0000000000
--- a/Charm_2024validation/options/hlt2/hlt2_d_to_hhh.py
+++ /dev/null
@@ -1,42 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d_to_hhh import all_lines as hhh_lines
-from Hlt2Conf.lines.charm.detection_asymmetry_lines import all_lines as det_asy_lines
-
-def make_lines():
-    mylines = [builder() for builder in hhh_lines.values()]
-    mylines += [builder() for builder in det_asy_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_d_to_ksh.py b/Charm_2024validation/options/hlt2/hlt2_d_to_ksh.py
deleted file mode 100644
index d2593da6a9..0000000000
--- a/Charm_2024validation/options/hlt2/hlt2_d_to_ksh.py
+++ /dev/null
@@ -1,42 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d_to_ksh import all_lines as ksh_lines
-from Hlt2Conf.lines.charm.detection_asymmetry_lines import all_lines as det_asy_lines
-
-def make_lines():
-    mylines = [builder() for builder in ksh_lines.values()]
-    mylines += [builder() for builder in det_asy_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_dst_to_dee.py b/Charm_2024validation/options/hlt2/hlt2_dst_to_dee.py
deleted file mode 100644
index d43ecbcd65..0000000000
--- a/Charm_2024validation/options/hlt2/hlt2_dst_to_dee.py
+++ /dev/null
@@ -1,41 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.dst_to_dee import all_lines as dst_to_dee_lines
-
-def make_lines():
-    mylines = [builder() for builder in dst_to_dee_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_rare_charm.py b/Charm_2024validation/options/hlt2/hlt2_rare_charm.py
deleted file mode 100644
index cb9ac88a02..0000000000
--- a/Charm_2024validation/options/hlt2/hlt2_rare_charm.py
+++ /dev/null
@@ -1,40 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.rare_charm_lines import all_lines as rare_charm_lines
-
-def make_lines():
-    mylines = [builder() for builder in rare_charm_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2noUT.py b/Charm_2024validation/options/hlt2/hlt2noUT.py
deleted file mode 100644
index 473127434b..0000000000
--- a/Charm_2024validation/options/hlt2/hlt2noUT.py
+++ /dev/null
@@ -1,32 +0,0 @@
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf_without_UT
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf_without_UT),\
-         require_gec.bind(skipUT=True),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/options/hlt2/make_hlt2_decay.sh b/Charm_2024validation/options/hlt2/make_hlt2_decay.sh
deleted file mode 100644
index f127b86285..0000000000
--- a/Charm_2024validation/options/hlt2/make_hlt2_decay.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-cat d0_to_hh.py hlt2.py > hlt2_d0_to_hh.py
-cat d0_to_hhpi0.py hlt2.py > hlt2_d0_to_hhpi0.py
-cat d0_to_hhhh.py hlt2.py > hlt2_d0_to_hhhh.py
-cat d0_to_kshh.py hlt2.py > hlt2_d0_to_kshh.py
-cat d0_to_ksks.py hlt2.py > hlt2_d0_to_ksks.py
-cat d_to_hhh.py hlt2.py > hlt2_d_to_hhh.py
-cat d_to_ksh.py hlt2.py > hlt2_d_to_ksh.py
-cat rare_charm.py hlt2.py > hlt2_rare_charm.py
-cat dst_to_dee.py hlt2.py > hlt2_dst_to_dee.py
diff --git a/Charm_2024validation/options/hlt2/rare_charm.py b/Charm_2024validation/options/hlt2/rare_charm.py
deleted file mode 100644
index 39194555f0..0000000000
--- a/Charm_2024validation/options/hlt2/rare_charm.py
+++ /dev/null
@@ -1,8 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.rare_charm_lines import all_lines as rare_charm_lines
-
-def make_lines():
-    mylines = [builder() for builder in rare_charm_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
diff --git a/Charm_2024validation/options/rare_charm.py b/Charm_2024validation/options/rare_charm.py
deleted file mode 100644
index d4d4a5d83d..0000000000
--- a/Charm_2024validation/options/rare_charm.py
+++ /dev/null
@@ -1,496 +0,0 @@
-from .tupling import (
-    make_composite_variables,
-    make_composite_variables_3body,
-    make_DeltaM_variable,
-    make_basic_variables,
-    make_hlt2_event_variables,
-    make_top_isolation_variables,
-    make_basic_isolation_variables,
-    make_intermediate_isolation_variables,
-    make_composite_dtf_variables,
-    make_composite_dtf_variables_3body,
-    make_basic_dtf_variables,
-)
-
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunTuple_Particles as Funtuple
-
-def make_dtf_variables_hmumu(options, pvs, input_data, ptype):
-
-    if ptype not in ["basic", "composite"]:
-        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
-
-    from DecayTreeFitter import DecayTreeFitter
-    
-    DTF = DecayTreeFitter(
-        name=f'DTF_{{hash}}',
-        input_particles=input_data)
-
-    DTFvtx = DecayTreeFitter(
-        name=f'DTFvtx_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    DTFmassDp = DecayTreeFitter(
-        name=f'DTFmassDp_{{hash}}',
-        input_particles=input_data,
-        mass_constraints=["D+"])
-
-    DTFvtxmassDp = DecayTreeFitter(
-        name=f'DTFvtxmassDp_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D+"])
-
-    DTFmassDsp = DecayTreeFitter(
-        name=f'DTFmassDsp_{{hash}}',
-        input_particles=input_data,
-        substitutions = ['D+{{D_s+}}'],
-        mass_constraints=["D_s+"])
-
-    DTFvtxmassDsp = DecayTreeFitter(
-        name=f'DTFvtxmassDsp_{{hash}}',
-        input_particles=input_data,
-        substitutions = ['D+{{D_s+}}',"J/psi(1S){{J/psi(1S)}}"],#trick
-        mass_constraints=["D_s+"],
-        input_pvs=pvs,
-    )
-
-    if ptype == "basic":
-        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassDp,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="Dp")
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassDp,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="Dp")
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassDsp,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="Dsp")
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassDsp,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="Dsp")
-        return dtf_vars
-
-    if ptype == "composite":
-        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassDp,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="Dp")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassDp,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="Dp")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassDsp,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="Dsp")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassDsp,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="Dsp")
-        return dtf_vars
-
-
-def make_dtf_variables_pmumu(options, pvs, input_data, ptype):
-
-    if ptype not in ["basic", "composite"]:
-        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
-
-    from DecayTreeFitter import DecayTreeFitter
-    
-    DTF = DecayTreeFitter(
-        name=f'DTF_{{hash}}',
-        input_particles=input_data)
-
-    DTFvtx = DecayTreeFitter(
-        name=f'DTFvtx_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    DTFmass = DecayTreeFitter(
-        name=f'DTFmass_{{hash}}',
-        input_particles=input_data,
-        mass_constraints=["Lambda_c+"])
-
-    DTFvtxmass = DecayTreeFitter(
-        name=f'DTFvtxmass_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["Lambda_c+"])
-
-    if ptype == "basic":
-        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmass,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="Lc")
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmass,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="Lc")
-        return dtf_vars
-
-    if ptype == "composite":
-        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmass,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="D0")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmass,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="D0")
-        return dtf_vars
-
-def make_dtf_variables_hhmumu(options, pvs, input_data, ptype):
-
-    if ptype not in ["basic", "composite","composite3b"]:
-        Exception(f"I want \'basic\' or \'composite\' or \'composite3b\. Got {ptype}")
-
-    from DecayTreeFitter import DecayTreeFitter
-    
-    DTF = DecayTreeFitter(
-        name=f'DTF_{{hash}}',
-        input_particles=input_data)
-
-    DTFvtx = DecayTreeFitter(
-        name=f'DTFvtx_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    DTFmass = DecayTreeFitter(
-        name=f'DTFmass_{{hash}}',
-        input_particles=input_data,
-        mass_constraints=["D0"])
-
-    DTFvtxmass = DecayTreeFitter(
-        name=f'DTFvtxmass_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0"])
-
-    if ptype == "basic":
-        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmass,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="D0")
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmass,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="D0")
-        return dtf_vars
-
-    if ptype == "composite3b":
-        dtf_vars = make_composite_dtf_variables_3body(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
-                                             DTF=DTFmass,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="D0")
-        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
-                                             DTF=DTFvtxmass,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="D0")
-
-        return dtf_vars
-        
-    if ptype == "composite":
-        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmass,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="D0")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmass,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="D0")
-        return dtf_vars
-
-
-def maketuple_D2pimumu(options, pvs, rec_summary):
-    name = "D2pimumu"
-    turbo_line = "Hlt2Charm_DpDspToPipMumMup"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (J/psi(1S) -> mu- mu+) pi+]CC",
-        "Jpsi" : "[D+ -> ^(J/psi(1S) -> mu- mu+) pi+]CC",
-        "lm"   : "[D+ -> (J/psi(1S) -> ^mu- mu+) pi+]CC",
-        "lp"   : "[D+ -> (J/psi(1S) -> mu- ^mu+) pi+]CC",
-        "hp" : "[D+ -> (J/psi(1S) -> mu- mu+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
-        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation: 
-
-        variables = {
-            "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-            "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2pimumu_WS(options, pvs, rec_summary):
-    name = "D2pimumu_WS"
-    turbo_line = "Hlt2Charm_DpDspToPipMupMup_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (J/psi(1S) -> mu+ mu+) pi+]CC",
-        "Jpsi" : "[D+ -> (J/psi(1S) -> mu+ mu+) pi+]CC",
-        "lp1"   : "[D+ -> (J/psi(1S) -> ^mu+ mu+) pi+]CC",
-        "lp2"   : "[D+ -> (J/psi(1S) -> mu+ ^mu+) pi+]CC",
-        "hp" : "[D+ -> (J/psi(1S) -> mu+ mu+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
-        "lp1"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-        "lp2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation: 
-
-        variables = {
-            "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-            "lp1"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "lp2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2pipipi(options, pvs, rec_summary):
-    name = "CharmRD_D2pipipi"
-    turbo_line = "Hlt2Charm_DpDspToPipPimPip_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (J/psi(1S) -> pi- pi+) pi+]CC",
-        "Jpsi" : "[D+ -> (J/psi(1S) -> pi- pi+) pi+]CC",
-        "lm"   : "[D+ -> (J/psi(1S) -> ^pi- pi+) pi+]CC",
-        "lp"   : "[D+ -> (J/psi(1S) -> pi- ^pi+) pi+]CC",
-        "hp" : "[D+ -> (J/psi(1S) -> pi- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
-        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation: 
-
-        variables = {
-            "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-            "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2piee(options, pvs, rec_summary):
-    name = "D2piee"
-    turbo_line = "Hlt2Charm_DpDspToPipEmEp"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (J/psi(1S) -> e- e+) pi+]CC",
-        "Jpsi" : "[D+ -> ^(J/psi(1S) -> e- e+) pi+]CC",
-        "lm"   : "[D+ -> (J/psi(1S) -> ^e- e+) pi+]CC",
-        "lp"   : "[D+ -> (J/psi(1S) -> e- ^e+) pi+]CC",
-        "hp" : "[D+ -> (J/psi(1S) -> e- e+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
-        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation: 
-
-        variables = {
-            "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-            "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Lc2pmumu(options, pvs, rec_summary):
-    name = "Lc2pmumu"
-    turbo_line = "Hlt2Charm_LcpToPpMumMup"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Lc" : "[Lambda_c+ -> (J/psi(1S) -> mu- mu+) p+]CC",
-        "Jpsi" : "[Lambda_c+ -> ^(J/psi(1S) -> mu- mu+) p+]CC",
-        "lm"   : "[Lambda_c+ -> (J/psi(1S) -> ^mu- mu+) p+]CC",
-        "lp"  : "[Lambda_c+ -> (J/psi(1S) -> mu- ^mu+) p+]CC",
-        "pp" : "[Lambda_c+ -> (J/psi(1S) -> mu- mu+) ^p+]CC",
-    }
-
-    variables = {
-        "Lc"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "pp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation: 
-
-        variables = {
-            "Lc"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-            "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "pp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02Kpimumu_RS(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02Kpimumu_RS"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPipMumMup"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^(D0 -> K- pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
-        "Km"   : "[D*(2010)+ -> (D0 -> ^K- pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
-        "pip"  : "[D*(2010)+ -> (D0 -> K- ^pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
-        "Jpsi"  : "[D*(2010)+ -> (D0 -> K- pi+ ^(J/psi(1S) -> mu- mu+)) pi+]CC",
-        "lm"  : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> ^mu- mu+)) pi+]CC",
-        "lp"  : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> mu- ^mu+)) pi+]CC",
-        "spip" : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> mu- mu+)) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite"),
-        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation: 
-
-        variables = {
-            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
-            "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
-            "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-            "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
diff --git a/Charm_2024validation/options/tupling.py b/Charm_2024validation/options/tupling.py
deleted file mode 100644
index 99de572726..0000000000
--- a/Charm_2024validation/options/tupling.py
+++ /dev/null
@@ -1,986 +0,0 @@
-##############################################################################
-# (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.                                       #
-###############################################################################
-"""Common configuration functions
-
-"""
-
-import Functors as F
-from Functors.math import log
-import Functors.math as fmath
-
-from FunTuple import FunctorCollection
-from FunTuple.functorcollections import (
-    MCHierarchy,
-    MCPromptDecay,
-    Kinematics,
-    SelectionInfo,
-    HltTisTos,
-    MCVertexInfo,
-    MCKinematics,
-    ParticleID, #wrong variables PID_PI = 0, PROBNN_D = nan
-    EventInfo,
-    LHCInfo,
-    ParticleIsolation,
-    MCPrimaries,
-    MCReconstructed,
-    MCReconstructible,
-)
-
-from DaVinciMCTools import MCTruthAndBkgCat, MCReconstructed, MCReconstructible
-from PyConf.Algorithms import ParticleToSubcombinationsAlg
-from DecayTreeFitter import DecayTreeFitter
-
-Hlt1_global_lines = [
-    "Hlt1GECPassthroughDecision",
-    "Hlt1BeamGasDecision",
-    "Hlt1PassthroughDecision",
-    "Hlt1NoBeamDecision",
-    "Hlt1BeamOneDecision",
-    "Hlt1BeamTwoDecision",
-    "Hlt1BothBeamsDecision",
-    "Hlt1ODINLumiDecision",
-    "Hlt1ODINVeloOpenDecision",
-    "Hlt1ODINNoBiasDecision",
-    "Hlt1VeloMicroBiasDecision",
-    "Hlt1RICH1AlignmentDecision",
-    "Hlt1RICH2AlignmentDecision",
-    "Hlt1BeamGasDecision",
-    "Hlt1L02PPiDecision",
-    "Hlt1LowMassNoipDielectron_massSlice1_promptDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice1_promptDecision",
-    "Hlt1LowMassNoipDielectron_massSlice2_promptDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice2_promptDecision",
-    "Hlt1LowMassNoipDielectron_massSlice3_promptDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice3_promptDecision",
-    "Hlt1LowMassNoipDielectron_massSlice4_promptDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice4_promptDecision",
-    "Hlt1LowMassNoipDielectron_massSlice1_displacedDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice1_displacedDecision",
-    "Hlt1LowMassNoipDielectron_massSlice2_displacedDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice2_displacedDecision",
-    "Hlt1LowMassNoipDielectron_massSlice3_displacedDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice3_displacedDecision",
-    "Hlt1LowMassNoipDielectron_massSlice4_displacedDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice4_displacedDecision",
-]
-Hlt1_1track_lines = [
-    "Hlt1TrackMVADecision",
-    "Hlt1LowPtMuonDecision",
-    "Hlt1SingleHighPtMuonDecision",
-    "Hlt1SingleHighPtMuonNoMuIDDecision",
-    "Hlt1TrackMuonMVADecision",
-    "Hlt1OneMuonTrackLineDecision",
-    "Hlt1TrackElectronMVADecision",
-    "Hlt1SingleHighPtElectronDecision",
-    "Hlt1SingleHighEtDecision",
-]
-Hlt1_lines = Hlt1_1track_lines+[
-    "Hlt1TwoTrackMVACharmXSecDecision",
-    "Hlt1TwoTrackMVADecision",
-    "Hlt1TwoTrackKsDecision",
-    "Hlt1D2KPiDecision",
-    "Hlt1D2KKDecision",
-    "Hlt1D2PiPiDecision",
-    "Hlt1KsToPiPiDecision",
-    "Hlt1LowPtDiMuonDecision",#removed
-    "Hlt1DiMuonNoIPDecision",
-    "Hlt1DiMuonNoIP_ssDecision",
-    "Hlt1DiMuonHighMassDecision",
-    "Hlt1DiMuonLowMassDecision",#replaced by Hlt1DiMuonDisplacedDecision
-    "Hlt1DiMuonSoftDecision",
-    "Hlt1DiMuonDisplacedDecision",
-    "Hlt1TwoKsDecision",
-    "Hlt1D2KPiAlignmentDecision",
-    "Hlt1DiMuonHighMassAlignmentDecision",
-    "Hlt1DisplacedDiMuonAlignmentDecision",
-    "Hlt1DisplacedDielectronDecision",
-    "Hlt1DisplacedLeptonsDecision",#removed
-]
-
-
-Hlt2_lines = [
-    "Hlt2Charm_DstpToD0Pip_D0ToKmPip_XSec",
-    "Hlt2Charm_D0ToKmPip_XSec",
-    "Hlt2Charm_D0ToKmKp",
-    "Hlt2Charm_D0ToKmPip",
-    "Hlt2Charm_D0ToPimPip",
-    "Hlt2Charm_DpDspToKsKp_DD",
-    "Hlt2Charm_DpDspToKsKp_LD",
-    "Hlt2Charm_DpDspToKsKp_LL",
-    "Hlt2Charm_DpDspToKsPip_DD",
-    "Hlt2Charm_DpDspToKsPip_LD",
-    "Hlt2Charm_DpDspToKsPip_LL",
-    "Hlt2Charm_DpToKmPipPip",
-    "Hlt2Charm_DspToKmKpPip",
-    "Hlt2Charm_DpToKmPipPip_NoCuts",
-    "Hlt2Charm_DspToKmKpPip_NoCuts",
-    "Hlt2Charm_DpToKmPipPip_XSec",
-    "Hlt2Charm_DspToKmKpPip_XSec",
-    "Hlt2Charm_DstpToD0Pip_D0ToKmKp",
-    "Hlt2Charm_DstpToD0Pip_D0ToKmPip",
-    "Hlt2Charm_DstpToD0Pip_D0ToKpPim",
-    "Hlt2Charm_DstpToD0Pip_D0ToPimPip",
-    "Hlt2Charm_DstpToD0Pip_D0ToKmPip_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKpPim_LowBias",
-    "Hlt2Charm_D0ToKmPip_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKmKp_LowBias",
-    "Hlt2Charm_D0ToKmKp_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToPimPip_LowBias",
-    "Hlt2Charm_D0ToPimPip_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLL",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLL_Tight",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLDD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLDD_Tight",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDDD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDDD_Tight",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULLL",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULLL_Tight",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULDD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULDD_Tight",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLD_Tight",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDLD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDLD_Tight",
-    "Hlt2Charm_D0ToKsPimPip_LL",
-    "Hlt2Charm_D0ToKsPimPip_DD",
-    "Hlt2Charm_D0ToKsPimPip_LL_LowBias",
-    "Hlt2Charm_D0ToKsPimPip_LL_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_LL",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_DD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_LL_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_DD_LowBias",
-    "Hlt2Charm_D0ToKsKmPip_LL",
-    "Hlt2Charm_D0ToKsKmPip_DD",
-    "Hlt2Charm_D0ToKsKmPip_LL_LowBias",
-    "Hlt2Charm_D0ToKsKmPip_LL_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_LL",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_DD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_LL_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_DD_LowBias",
-    "Hlt2Charm_D0ToKsKpPim_LL",
-    "Hlt2Charm_D0ToKsKpPim_DD",
-    "Hlt2Charm_D0ToKsKpPim_LL_LowBias",
-    "Hlt2Charm_D0ToKsKpPim_DD_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_LL",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_DD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_LL_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_DD_LowBias",
-    "Hlt2Charm_D0ToKsKmKp_LL",
-    "Hlt2Charm_D0ToKsKmKp_DD",
-    "Hlt2Charm_D0ToKsKmKp_LL_LowBias",
-    "Hlt2Charm_D0ToKsKmKp_DD_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_LL",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_DD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_LL_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_DD_LowBias",
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS',
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS',
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS_MVA',
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS_MVA',
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS',
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS',
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS_MVA',
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS_MVA',
-    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS',
-    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS',
-    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS_MVA',
-    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS_MVA',
-]
-
-def make_composite_variables(options, pvs, data, add_truth=True, add_Hlt1TisTos=True):
-    if not options.simulation:
-        add_truth = False
-    variables = (
-        FunctorCollection(
-            {
-                "MAXPT": F.MAX(F.PT),
-                "MINPT": F.MIN(F.PT),
-                "SUMPT": F.SUM(F.PT),
-                "MAXP": F.MAX(F.P),
-                "MINP": F.MIN(F.P),
-                "BPVDIRA": F.BPVDIRA(pvs),
-                "VCHI2DOF": F.CHI2DOF,
-                #"VNDOF": F.NDOF,
-                "BPVFDCHI2": F.BPVFDCHI2(pvs),
-                "BPVFD": F.BPVFD(pvs),
-                "BPVVDRHO": F.BPVVDRHO(pvs),
-                "BPVVDZ": F.BPVVDZ(pvs),
-                "BPVIPCHI2": F.BPVIPCHI2(pvs),
-                "BPVIP": F.BPVIP(pvs),
-                "LOGBPVIPCHI2": log(F.BPVIPCHI2(pvs)),
-                "BPVLTIME": F.BPVLTIME(pvs),
-                "MAXBPVIPCHI2": F.MAX(F.BPVIPCHI2(pvs)),
-                "MINBPVIPCHI2": F.MIN(F.BPVIPCHI2(pvs)),
-                "MAXBPVIP": F.MAX(F.BPVIP(pvs)),
-                "MINBPVIP": F.MIN(F.BPVIP(pvs)),
-                "MAXDOCACHI2": F.MAXDOCACHI2,
-                "MAXDOCA": F.MAXDOCA,
-                "MAXSDOCACHI2": F.MAXSDOCACHI2,
-                "MAXSDOCA": F.MAXSDOCA,
-                "ETA": F.ETA,
-                "PHI": F.PHI,
-                "END_VX": F.END_VX,
-                "END_VY": F.END_VY,
-                "END_VZ": F.END_VZ,
-                "END_VX_ERR":F.SQRT @ F.CALL(0,0) @ F.POS_COV_MATRIX @ F.ENDVERTEX,
-                "END_VY_ERR":F.SQRT @ F.CALL(1,1) @ F.POS_COV_MATRIX @ F.ENDVERTEX,
-                "END_VZ_ERR":F.SQRT @ F.CALL(2,2) @ F.POS_COV_MATRIX @ F.ENDVERTEX,
-                "BPVX": F.BPVX(pvs),
-                "BPVY": F.BPVY(pvs),
-                "BPVZ": F.BPVZ(pvs),
-                "BPVX_ERR": F.SQRT @ F.CALL(0,0) @ F.POS_COV_MATRIX @ F.BPV(pvs),
-                "BPVY_ERR": F.SQRT @ F.CALL(1,1) @ F.POS_COV_MATRIX @ F.BPV(pvs),
-                "BPVZ_ERR": F.SQRT @ F.CALL(2,2) @ F.POS_COV_MATRIX @ F.BPV(pvs),
-                "ALLPVFD"     : F.ALLPV_FD(pvs),
-                "ALLPVIP"     : F.ALLPV_IP(pvs),
-                "OBJECT_KEY": F.OBJECT_KEY,
-            }
-        )
-        + Kinematics()
-        #+ ParticleID(extra_info=True) #only for daughters
-    )
-
-    if add_Hlt1TisTos:
-        variables += HltTisTos(
-            selection_type="Hlt1", trigger_lines=Hlt1_lines, data=data
-        )
-
-    if add_truth:
-        variables = add_truth_matching_functors(
-            options,
-            variables,
-            data,
-            hierarchy=True,
-            kinematics=True,
-            vertex_info=True,
-            bkgcat=True,
-        )
-
-    return variables
-
-def make_tistoscombinations(options, pvs, data):
-    algo_output = ParticleToSubcombinationsAlg( Input=data )
-    relations = algo_output.OutputRelations
-
-    tistos_variables_extra = HltTisTos(
-        selection_type="Hlt1", trigger_lines=["Hlt1TwoTrackMVADecision"], data=algo_output.OutputParticles
-    )
-    tistos_combinations = {}
-    for k,v in tistos_variables_extra.get_thor_functors().items():
-        tistos_combinations[k + "_SUBCOMB" ] = F.MAP_INPUT_ARRAY( v, relations )
-    tistos_combinations = FunctorCollection( tistos_combinations )
-
-    return tistos_combinations
-
-def make_composite_variables_3body(options, pvs, data, add_truth=True):
-
-    variables = (
-        FunctorCollection(
-            {
-                #12
-                "M12": F.SUBCOMB(Functor=F.MASS, Indices=(1, 2)),
-                "SDOCA12"     : F.SDOCA(Child1=1,Child2=2),
-                "SDOCACHI212" : F.SDOCACHI2(Child1=1,Child2=2),
-                "DOCA12"      : F.DOCA(Child1=1,Child2=2),
-                "DOCACHI212"  : F.DOCACHI2(Child1=1,Child2=2),
-                "COS12": F.ALV(1, 2),
-                #"ETA12": F.SUBCOMB(Functor=F.ETA, Indices=(1, 2)),
-                #"PT12": F.SUBCOMB(Functor=F.PT, Indices=(1, 2)),
-                #"VCHI212": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(1, 2)),
-                #"END_VZ12": F.SUBCOMB(Functor=F.END_VZ, Indices=(1, 2)),
-                #"BPVZ12": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(1, 2)),
-                #"BPVCORRM12": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(1, 2)),
-                #13
-                "M13": F.SUBCOMB(Functor=F.MASS, Indices=(1, 3)),
-                "SDOCA13"     : F.SDOCA(Child1=1,Child2=3),
-                "SDOCACHI213" : F.SDOCACHI2(Child1=1,Child2=3),
-                "DOCA13"      : F.DOCA(Child1=1,Child2=3),
-                "DOCACHI213"  : F.DOCACHI2(Child1=1,Child2=3),
-                "COS13": F.ALV(1, 3),
-                #"ETA13": F.SUBCOMB(Functor=F.ETA, Indices=(1, 3)),
-                #"PT13": F.SUBCOMB(Functor=F.PT, Indices=(1, 3)),
-                #"VCHI213": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(1, 3)),
-                #"END_VZ13": F.SUBCOMB(Functor=F.END_VZ, Indices=(1, 3)),
-                #"BPVZ13": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(1, 3)),
-                #"BPVCORRM13": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(1, 3)),
-                #23
-                "M23": F.SUBCOMB(Functor=F.MASS, Indices=(2, 3)),
-                "SDOCA23"     : F.SDOCA(Child1=2,Child2=3),
-                "SDOCACHI223" : F.SDOCACHI2(Child1=2,Child2=3),
-                "DOCA23"      : F.DOCA(Child1=2,Child2=3),
-                "DOCACHI223"  : F.DOCACHI2(Child1=2,Child2=3),
-                "COS23": F.ALV(2, 3),
-                #"ETA23": F.SUBCOMB(Functor=F.ETA, Indices=(2, 3)),
-                #"PT23": F.SUBCOMB(Functor=F.PT, Indices=(2, 3)),
-                #"VCHI223": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(2, 3)),
-                #"END_VZ23": F.SUBCOMB(Functor=F.END_VZ, Indices=(2, 3)),
-                #"BPVZ23": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(2, 3)),
-                #"BPVCORRM23": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(2, 3)),
-            }
-        )
-    )
-    return make_composite_variables(options, pvs, data, add_truth)+make_tistoscombinations(options, pvs, data)+variables
-
-def make_composite_variables_4body(options, pvs, data, add_truth=True):
-
-    variables = (
-        FunctorCollection(
-            {
-                #14
-                "M14": F.SUBCOMB(Functor=F.MASS, Indices=(1, 4)),
-                "SDOCA14"     : F.SDOCA(Child1=1,Child2=4),
-                "SDOCACHI214" : F.SDOCACHI2(Child1=1,Child2=4),
-                "DOCA14"      : F.DOCA(Child1=1,Child2=4),
-                "DOCACHI214"  : F.DOCACHI2(Child1=1,Child2=4),
-                "COS14": F.ALV(1, 4),
-                #"ETA14": F.SUBCOMB(Functor=F.ETA, Indices=(1, 4)),
-                #"PT14": F.SUBCOMB(Functor=F.PT, Indices=(1, 4)),
-                #"VCHI214": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(1, 4)),
-                #"END_VZ14": F.SUBCOMB(Functor=F.END_VZ, Indices=(1, 4)),
-                #"BPVZ14": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(1, 4)),
-                #"BPVCORRM14": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(1, 4)),
-                #24
-                "M24": F.SUBCOMB(Functor=F.MASS, Indices=(2, 4)),
-                "SDOCA24"     : F.SDOCA(Child1=2,Child2=4),
-                "SDOCACHI224" : F.SDOCACHI2(Child1=2,Child2=4),
-                "DOCA24"      : F.DOCA(Child1=2,Child2=4),
-                "DOCACHI224"  : F.DOCACHI2(Child1=2,Child2=4),
-                "COS24": F.ALV(2, 4),
-                #"ETA24": F.SUBCOMB(Functor=F.ETA, Indices=(2, 4)),
-                #"PT24": F.SUBCOMB(Functor=F.PT, Indices=(2, 4)),
-                #"VCHI224": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(2, 4)),
-                #"END_VZ24": F.SUBCOMB(Functor=F.END_VZ, Indices=(2, 4)),
-                #"BPVZ24": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(2, 4)),
-                #"BPVCORRM24": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(2, 4)),
-                #34
-                "M34": F.SUBCOMB(Functor=F.MASS, Indices=(3, 4)),
-                "SDOCA34"     : F.SDOCA(Child1=3,Child2=4),
-                "SDOCACHI234" : F.SDOCACHI2(Child1=3,Child2=4),
-                "DOCA34"      : F.DOCA(Child1=3,Child2=4),
-                "DOCACHI234"  : F.DOCACHI2(Child1=3,Child2=4),
-                "COS34": F.ALV(3, 4),
-                #"ETA34": F.SUBCOMB(Functor=F.ETA, Indices=(3, 4)),
-                #"PT34": F.SUBCOMB(Functor=F.PT, Indices=(3, 4)),
-                #"VCHI234": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(3, 4)),
-                #"END_VZ34": F.SUBCOMB(Functor=F.END_VZ, Indices=(3, 4)),
-                #"BPVZ34": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(3, 4)),
-                #"BPVCORRM34": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(3, 4)),
-            }
-        )
-    )
-    return make_composite_variables_3body(options, pvs, data, add_truth)+variables #make_tistoscombinations already included
-
-def make_b_composite_variables(options, pvs, data, add_truth=True):
-    
-    # define helper functors
-    get_child = F.CHILD(1, F.FORWARDARG0) # change here the index of the child
-    get_SV =  F.ENDVERTEX @ F.FORWARDARG0
-    get_SV_pos = F.TOLINALG @ F.POSITION @ get_SV # only if composite (i.e. has vertex)
-    get_child_endvtx_pos = F.ENDVERTEX_POS  @ get_child
-    get_fdvec_child = get_child_endvtx_pos - get_SV_pos
-
-    # define observables
-    IP_wrt_SV = F.IP.bind(get_SV_pos , get_child)
-    IPCHI2_wrt_SV = F.IPCHI2.bind(get_SV , get_child) # only if child is composite (i.e. has vertex)
-    FD_wrt_SV = F.MAGNITUDE @ get_fdvec_child
-    FDCHI2_wrt_SV = F.VTX_FDCHI2.bind(get_SV, get_child)
-
-    
-    variables = FunctorCollection(
-        {       
-            "ID": F.PARTICLE_ID ,
-            "PT": F.PT,
-            "P": F.P,
-            "MASS": F.MASS,
-            "CHILD1_IPwrtSV": IP_wrt_SV,
-            "CHILD1_IPCHI2wrtSV": IPCHI2_wrt_SV,
-            "CHILD1_FDwrtSV": FD_wrt_SV,
-            "CHILD1_FDCHI2wrtSV": FDCHI2_wrt_SV,
-            "PX": F.PX,
-            "PY": F.PY,
-            "PZ": F.PZ,
-            "END_VCHI2DOF": F.CHI2DOF @ F.ENDVERTEX,
-            "BPVCHI2DOF": F.CHI2DOF @ F.BPV(pvs),
-            # B2OC generic B hadron NN Hlt2 algorithm,
-            # not planning to use it directly for B2OC EM
-            "MVA": F.MVA(
-                MVAType="SigmaNet",
-                Config={
-                    "File":
-                    "paramfile://data/Hlt2B2OC_B_SigmaNet_Run3-v1.json",
-                    "Name":
-                    "B2OC_SigmaNet_Generic",
-                    "Lambda":
-                    "2.0",
-                    "NLayers":
-                    "3",
-                    "InputSize":
-                    "6",
-                    "Monotone_Constraints":
-                    "[1,-1,-1,-1,-1,-1]",
-                    "Variables":
-                    "log_B_PT,B_ETA,log_B_DIRA,log_B_ENDVERTEX_CHI2,log_B_IPCHI2_OWNPV,log_B_IP_OWNPV",
-                },
-                Inputs={
-                    "log_B_PT": fmath.log(F.PT),
-                    "B_ETA": F.ETA,
-                    "log_B_DIRA": fmath.log(1. - F.BPVDIRA(pvs)),
-                    "log_B_ENDVERTEX_CHI2": fmath.log(F.CHI2DOF),
-                    "log_B_IPCHI2_OWNPV": fmath.log(F.BPVIPCHI2(pvs)),
-                    "log_B_IP_OWNPV": fmath.log(F.BPVIP(pvs)),
-                }),
-            #'SSPionBDT_Mistag': F.SSPionBDT_Mistag(sspionTagging.OutputFlavourTags),
-            #'SSPionBDT_Decision': F.SSPionBDT_Decision(sspionTagging.OutputFlavourTags),
-
-        }
-    )
-    return make_composite_variables(options, pvs, data, add_truth)+make_tistoscombinations(options, pvs, data)+variables
-
-def make_DeltaM_variable(options):
-    return FunctorCollection({"DM": F.MASS - F.CHILD(1, F.MASS)})
-
-def make_basic_variables(options, pvs, data, add_truth=True, islong = True):
-    if not options.simulation:
-        add_truth = False
-    variables = (
-        FunctorCollection(
-            {
-                "TRCHI2DOF": F.CHI2DOF @ F.TRACK,
-                "ETA": F.ETA,
-                "PHI": F.PHI,
-                "TRGHOSTPROB": F.GHOSTPROB,
-                "BPVIPCHI2": F.BPVIPCHI2(pvs),
-                "BPVIP": F.BPVIP(pvs),
-                "BPVX": F.BPVX(pvs),
-                "BPVY": F.BPVY(pvs),
-                "BPVZ": F.BPVZ(pvs),
-                "TX"          : F.TX,
-                "TY"          : F.TY,
-                "MINIPCHI2"   : F.MINIPCHI2(pvs),
-                "MINIP"       : F.MINIP(pvs),
-                "KEY"         : F.VALUE_OR(-1) @ F.OBJECT_KEY @ F.TRACK,
-                "ISMUON"      : F.ISMUON,
-                "TRACKPT": F.TRACK_PT,
-                "TRACKHISTORY": F.VALUE_OR(-1) @ F.TRACKHISTORY @ F.TRACK,
-                "QOVERP": F.QOVERP @ F.TRACK,
-                "NDOF": F.VALUE_OR(-1) @ F.NDOF @ F.TRACK,
-                "NFTHITS": F.VALUE_OR(-1) @ F.NFTHITS @ F.TRACK,
-                "NHITS": F.VALUE_OR(-1) @ F.NHITS @ F.TRACK,
-                "NUTHITS": F.VALUE_OR(-1) @ F.NUTHITS @ F.TRACK,
-                "NVPHITS": F.VALUE_OR(-1) @ F.NVPHITS @ F.TRACK,
-                #"NMUONHITS": F.VALUE_OR(-1) @ F.NHITSMUONS @ F.TRACK, #https://gitlab.cern.ch/lhcb/Rec/-/merge_requests/3756
-                "TRACKHASVELO": F.VALUE_OR(-1) @ F.TRACKHASVELO @ F.TRACK,
-                "TRACKHASUT": F.VALUE_OR(-1) @ F.TRACKHASUT @ F.TRACK,
-                "OBJECT_KEY": F.OBJECT_KEY,
-                "HASBREM": F.HASBREM,
-                "BREMENERGY": F.BREMENERGY,
-                "BREMBENDCORR": F.BREMBENDCORR,
-            }
-        )
-        + Kinematics()
-        + ParticleID(extra_info=True)
-    )
-
-    if islong:
-        variables += FunctorCollection({"CTB": F.TRACK_POSVEC_CLOSESTTOBEAM})
-    
-    variables += HltTisTos(
-        selection_type="Hlt1", trigger_lines=Hlt1_1track_lines, data=data
-    )
-    
-    if add_truth:
-        variables = add_truth_matching_functors(
-            options,
-            variables,
-            data,
-            hierarchy=True,
-            kinematics=True,
-            vertex_info=True,
-            bkgcat=False,
-        )
-
-    return variables
-
-def make_hlt2_event_variables(options, pvs, rec_summary):
-    # define event level variables
-    evt_variables = EventInfo()
-    if not options.simulation:
-        evt_variables += LHCInfo() #FillNumber
-    evt_variables += SelectionInfo(selection_type="Hlt2", trigger_lines=Hlt2_lines)
-    evt_variables += SelectionInfo(selection_type="Hlt1", trigger_lines=Hlt1_global_lines)
-    evt_variables += FunctorCollection(
-        {
-            "ALLPVX": F.ALLPVX(pvs),
-            "ALLPVY": F.ALLPVY(pvs),
-            "ALLPVZ": F.ALLPVZ(pvs),
-            "ALLPVNDOF": F.MAP(F.VALUE_OR(F.NaN) @ F.NDOF) @ F.TES(pvs),
-            "ALLPVCHI2": F.MAP(F.VALUE_OR(F.NaN) @ F.CHI2) @ F.TES(pvs),
-            "nPVs": F.SIZE(pvs),
-            "nTracks": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nTracks"),
-            "nLongTracks": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nLongTracks"),
-            "nMuonTracks": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nMuonTracks"),
-            "nFTClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nFTClusters"),
-            "nVPClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nVPClusters"),
-            "nUTClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nUTClusters"),
-            "nSPDhits": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nSPDhits"),
-            "nEcalClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nEcalClusters"),
-            "nEcalClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nEcalClusters"),
-            "eCalTot": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "eCalTot"),
-            "hCalTot": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "hCalTot"),
-            "nRich1Hits": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nRich1Hits"),
-            "nRich2Hits": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nRich2Hits"),
-        }
-    )
-    return evt_variables
-
-def add_truth_matching_functors(
-    options,
-    variables,
-    data,
-    hierarchy=True,
-    kinematics=True,
-    vertex_info=True,
-    bkgcat=False,
-    prompt_info=True,
-):
-    """Add MC truth matching functors to an existing FunctorCollection.
-
-    Args:
-        options (DaVinci.Options): DaVinci options object.
-        variables (FunctorCollection): FunctorCollection to modify
-        data: data handle
-        hierarchy (bool): Add MCHierarchy info (default True)
-        kinematics (bool): Add MCKinematics info (default True)
-        vertex_info (bool): Add MCVertexInfo (default True)
-        bkgcat (bool): Add TRUEKEY and BKGCAT functors - intended for composite particles (default False)
-        prompt_info (bool): Add MCPromptDecay info (default True)
-
-    Returns:
-        FunctorCollection: modified FunctorCollection with truth matched variables.
-    """
-    assert (
-        options.simulation
-    ), "options.simulation is set to False - it doesn't make sense to add truth matching."
-
-    MCTRUTH = MCTruthAndBkgCat(data)
-
-    if bkgcat:
-        variables += FunctorCollection(
-            {
-                # Important note: specify an invalid value for integer functors if there exists no truth info.
-                #                 The invalid value for floating point functors is set to nan.
-                "TRUEKEY": F.VALUE_OR(-1) @ MCTRUTH(F.OBJECT_KEY),
-                "BKGCAT": MCTRUTH.BkgCat,
-            }
-        )
-    if hierarchy:
-        variables += MCHierarchy(mctruth_alg=MCTRUTH)  # likely to change again!!
-    if vertex_info:
-        variables += MCVertexInfo(mctruth_alg=MCTRUTH)  # likely to change again!!
-    if kinematics:
-        variables += MCKinematics(mctruth_alg=MCTRUTH)  # likely to change again!!
-    if prompt_info:
-        variables += MCPromptDecay(mctruth_alg=MCTRUTH)
-
-    return variables
-
-### DTF variables ###
-
-def make_basic_dtf_variables(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name="", islong=True):
-    variables = (
-        FunctorCollection(
-            {
-                "TRCHI2DOF": F.CHI2DOF @ F.TRACK,
-                "ETA": F.ETA,
-                "PHI": F.PHI,
-                "TRGHOSTPROB": F.GHOSTPROB,
-                "BPVIPCHI2": F.BPVIPCHI2(pvs),
-                "BPVIP": F.BPVIP(pvs),
-                "BPVX": F.BPVX(pvs),
-                "BPVY": F.BPVY(pvs),
-                "BPVZ": F.BPVZ(pvs),
-                "TX"          : F.TX,
-                "TY"          : F.TY,
-                "MINIPCHI2"   : F.MINIPCHI2(pvs),
-                "MINIP"       : F.MINIP(pvs),
-                "KEY"         : F.VALUE_OR(-1) @ F.OBJECT_KEY @ F.TRACK,
-                "TRACKPT": F.TRACK_PT,
-                "TRACKHISTORY": F.VALUE_OR(-1) @ F.TRACKHISTORY @ F.TRACK,
-                "QOVERP": F.QOVERP @ F.TRACK,
-                "NDOF": F.VALUE_OR(-1) @ F.NDOF @ F.TRACK,
-            }
-        )
-        + Kinematics()
-    )
-
-    if islong:
-        variables += FunctorCollection({"CTB": F.TRACK_POSVEC_CLOSESTTOBEAM})
-    
-    if(mass_constraint):
-        if(pv_constraint): # MASS + PV
-            dtf_variables_mass_pv = FunctorCollection({
-                        'DTF_PV_M'+ particle_name + '_' + k: DTF(v)
-                        for k, v in variables.get_thor_functors().items()
-                    })
-            return dtf_variables_mass_pv
-        else: # MASS
-            dtf_variables_mass = FunctorCollection(
-                {'DTF_M'+ particle_name + '_' + k: DTF(v)
-                 for k, v in variables.get_thor_functors().items()})
-        return dtf_variables_mass
-
-    elif(pv_constraint): # PV
-        dtf_variables_pv = FunctorCollection({
-                'DTF_PV_' + k: DTF(v)
-                for k, v in variables.get_thor_functors().items()
-            })
-        return dtf_variables_pv
-
-    else: # NO MASS/PV
-        dtf_variables = FunctorCollection(
-            {'DTF_' + k: DTF(v)
-             for k, v in variables.get_thor_functors().items()})
-        return dtf_variables
-
-def make_composite_dtf_variables(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name=""):
-    variables = (
-        FunctorCollection(
-            {
-                "MAXPT": F.MAX(F.PT),
-                "MINPT": F.MIN(F.PT),
-                "SUMPT": F.SUM(F.PT),
-                "MAXP": F.MAX(F.P),
-                "MINP": F.MIN(F.P),
-                "BPVDIRA": F.BPVDIRA(pvs),
-                "VCHI2DOF": F.CHI2DOF, #CHI2VXNDOF
-                "BPVFDCHI2": F.BPVFDCHI2(pvs),
-                "BPVFD": F.BPVFD(pvs),
-                "BPVVDRHO": F.BPVVDRHO(pvs),
-                "BPVVDZ": F.BPVVDZ(pvs),
-                "BPVIPCHI2": F.BPVIPCHI2(pvs),
-                "BPVIP": F.BPVIP(pvs),
-                "LOGBPVIPCHI2": log(F.BPVIPCHI2(pvs)),
-                "BPVLTIME": F.BPVLTIME(pvs),
-                "MAXBPVIPCHI2": F.MAX(F.BPVIPCHI2(pvs)), #MAX_
-                "MINBPVIPCHI2": F.MIN(F.BPVIPCHI2(pvs)),
-                "MAXBPVIP": F.MAX(F.BPVIP(pvs)),
-                "MINBPVIP": F.MIN(F.BPVIP(pvs)),
-                "ETA": F.ETA,
-                "PHI": F.PHI,
-                "END_VX": F.END_VX, #END_
-                "END_VY": F.END_VY,
-                "END_VZ": F.END_VZ,
-                "BPVX": F.BPVX(pvs),
-                "BPVY": F.BPVY(pvs),
-                "BPVZ": F.BPVZ(pvs),
-                "ALLPVFD"     : F.ALLPV_FD(pvs),
-                "ALLPVIP"     : F.ALLPV_IP(pvs),
-                
-            }
-        )
-        + Kinematics()
-    )
-
-    addstring = "DTF"
-    if(pv_constraint):
-            addstring += '_PV'
-    if(mass_constraint):
-            addstring += '_M'
-    addstring += particle_name
-
-    DTF_chi2ndof = FunctorCollection(
-            {
-                addstring+"_DTFCHI2": DTF.CHI2,
-                addstring+"_DTFNDOF": DTF.NDOF,
-                addstring+"_CTAU": DTF.CTAU,
-                addstring+"_CTAUERR": DTF.CTAUERR,
-                addstring+"_MERR": DTF.MASSERR,
-            }
-    )
-
-    if(mass_constraint):
-        if(pv_constraint): # MASS + PV
-            dtf_variables_mass_pv = FunctorCollection({
-                        'DTF_PV_M'+ particle_name + '_' + k: DTF(v)
-                        for k, v in variables.get_thor_functors().items()
-                    })
-            return dtf_variables_mass_pv+DTF_chi2ndof
-        else: # MASS
-            dtf_variables_mass = FunctorCollection(
-                {'DTF_M'+ particle_name + '_' + k: DTF(v)
-                 for k, v in variables.get_thor_functors().items()})
-        return dtf_variables_mass+DTF_chi2ndof
-
-    elif(pv_constraint): # PV
-        dtf_variables_pv = FunctorCollection({
-                'DTF_PV_' + k: DTF(v)
-                for k, v in variables.get_thor_functors().items()
-            })
-        return dtf_variables_pv+DTF_chi2ndof
-
-    else: # NO MASS/PV
-        dtf_variables = FunctorCollection(
-            {'DTF_' + k: DTF(v)
-             for k, v in variables.get_thor_functors().items()})
-        return dtf_variables+DTF_chi2ndof
-
-def make_composite_dtf_variables_3body(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name=""):
-    variables = (
-        FunctorCollection(
-            {
-                "M13": F.SUBCOMB(Functor=F.MASS, Indices=(1, 3)),
-                "M23": F.SUBCOMB(Functor=F.MASS, Indices=(2, 3)),
-            }
-        )
-    )
-
-    if(mass_constraint):
-        if(pv_constraint): # MASS + PV
-            dtf_variables_mass_pv = FunctorCollection({
-                        'DTF_PV_M'+ particle_name + '_' + k: DTF(v)
-                        for k, v in variables.get_thor_functors().items()
-                    })
-            return dtf_variables_mass_pv+make_composite_dtf_variables(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
-        else: # MASS
-            dtf_variables_mass = FunctorCollection(
-                {'DTF_M'+ particle_name + '_' + k: DTF(v)
-                 for k, v in variables.get_thor_functors().items()})
-        return dtf_variables_mass+make_composite_dtf_variables(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
-
-    elif(pv_constraint): # PV
-        dtf_variables_pv = FunctorCollection({
-                'DTF_PV_' + k: DTF(v)
-                for k, v in variables.get_thor_functors().items()
-            })
-        return dtf_variables_pv+make_composite_dtf_variables(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
-
-    else: # NO MASS/PV
-        dtf_variables = FunctorCollection(
-            {'DTF_' + k: DTF(v)
-             for k, v in variables.get_thor_functors().items()})
-
-    return dtf_variables+make_composite_dtf_variables(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
-
-def make_composite_dtf_variables_4body(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name=""):
-    variables = (
-        FunctorCollection(
-            {
-                "M14": F.SUBCOMB(Functor=F.MASS, Indices=(1, 4)),
-                "M24": F.SUBCOMB(Functor=F.MASS, Indices=(2, 4)),
-                "M34": F.SUBCOMB(Functor=F.MASS, Indices=(3, 4)),
-            }
-        )
-    )
-
-    if(mass_constraint):
-        if(pv_constraint): # MASS + PV
-            dtf_variables_mass_pv = FunctorCollection({
-                        'DTF_PV_M'+ particle_name + '_' + k: DTF(v)
-                        for k, v in variables.get_thor_functors().items()
-                    })
-            return dtf_variables_mass_pv+make_composite_dtf_variables_3body(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
-        else: # MASS
-            dtf_variables_mass = FunctorCollection(
-                {'DTF_M'+ particle_name + '_' + k: DTF(v)
-                 for k, v in variables.get_thor_functors().items()})
-        return dtf_variables_mass+make_composite_dtf_variables_3body(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
-
-    elif(pv_constraint): # PV
-        dtf_variables_pv = FunctorCollection({
-                'DTF_PV_' + k: DTF(v)
-                for k, v in variables.get_thor_functors().items()
-            })
-        return dtf_variables_pv+make_composite_dtf_variables_3body(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
-
-    else: # NO MASS/PV
-        dtf_variables = FunctorCollection(
-            {'DTF_' + k: DTF(v)
-             for k, v in variables.get_thor_functors().items()})
-    
-        return dtf_variables+make_composite_dtf_variables_3body(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
-
-
-def make_MC_basic_variables():
-    MC_MOTHER_ID = lambda gen: F.VALUE_OR(0) @ F.MC_MOTHER(gen, F.PARTICLE_ID)
-    MC_MOTHER_KEY = lambda gen: F.VALUE_OR(-1) @ F.MC_MOTHER(gen, F.OBJECT_KEY)
-
-    variables = (
-        FunctorCollection(
-            {
-                "OBJECT_KEY": F.OBJECT_KEY,
-                "ETA": F.ETA,
-                "PHI": F.PHI,
-                "ORIGIN_VX": F.ORIGIN_VX,
-                "ORIGIN_VY": F.ORIGIN_VY,
-                "ORIGIN_VZ": F.ORIGIN_VZ,
-                "FOURMOMENTUM": F.FOURMOMENTUM,
-                "TRUEID": F.PARTICLE_ID,
-                "MC_MOTHER_ID": MC_MOTHER_ID(1),
-                "MC_MOTHER_KEY": MC_MOTHER_KEY(1),
-                "MC_GD_MOTHER_ID": MC_MOTHER_ID(2),
-                "MC_GD_MOTHER_KEY": MC_MOTHER_KEY(2),
-                "MC_GD_GD_MOTHER_ID": MC_MOTHER_ID(3),
-                "MC_GD_GD_MOTHER_KEY": MC_MOTHER_KEY(3),
-            }
-        )
-        + Kinematics()
-    )
-
-
-    from PyConf.reading import get_mc_particles, get_pp2mcp_relations, get_mc_track_info
-    MC_data = get_mc_particles("/Event/HLT2/MC/Particles")
-    relations_charged = get_pp2mcp_relations("/Event/HLT2/Relations/ChargedPP2MCP")
-    relations_neutral = get_pp2mcp_relations("/Event/HLT2/Relations/NeutralPP2MCP")
-    mcreconstructed_all = MCReconstructed(
-        input_mcparticles=MC_data,
-        use_best_mcmatch=True,
-        relations_charged=relations_charged,
-        relations_neutral=relations_neutral,
-    )
-    mcreconstructible_all = MCReconstructible(
-        input_mctrackinfo=get_mc_track_info()
-    )
-    import FunTuple.functorcollections as FC
-    vars_reconstructed = FC.MCReconstructed(mcreconstructed_alg=mcreconstructed_all, extra_info=True)
-    vars_reconstructible = FC.MCReconstructible(mcreconstructible_alg=mcreconstructible_all, extra_info=True)
-
-
-    return variables+vars_reconstructed+vars_reconstructible
-
-def make_MC_composite_variables():
-    MC_MOTHER_ID = lambda gen: F.VALUE_OR(0) @ F.MC_MOTHER(gen, F.PARTICLE_ID)
-    MC_MOTHER_KEY = lambda gen: F.VALUE_OR(-1) @ F.MC_MOTHER(gen, F.OBJECT_KEY)
-
-    variables = (
-        FunctorCollection(
-            {
-                "END_VX": F.END_VX,
-                "END_VY": F.END_VY,
-                "END_VZ": F.END_VZ,
-                "LTIME": F.MC_LIFETIME,
-                "OBJECT_KEY": F.OBJECT_KEY,
-                "ETA": F.ETA,
-                "PHI": F.PHI,
-                "ORIGIN_VX": F.ORIGIN_VX,
-                "ORIGIN_VY": F.ORIGIN_VY,
-                "ORIGIN_VZ": F.ORIGIN_VZ,
-                "FOURMOMENTUM": F.FOURMOMENTUM,
-                "TRUEID": F.PARTICLE_ID,
-                "MC_MOTHER_ID": MC_MOTHER_ID(1),
-                "MC_MOTHER_KEY": MC_MOTHER_KEY(1),
-                "MC_GD_MOTHER_ID": MC_MOTHER_ID(2),
-                "MC_GD_MOTHER_KEY": MC_MOTHER_KEY(2),
-                "MC_GD_GD_MOTHER_ID": MC_MOTHER_ID(3),
-                "MC_GD_GD_MOTHER_KEY": MC_MOTHER_KEY(3),
-            }
-        )
-        + Kinematics()
-        + MCPromptDecay()
-        )
-
-    return variables
-
-def make_MC_event_variables(mc_header):
-    # define event level variables
-    evt_variables = EventInfo()
-    evt_variables += MCPrimaries(mc_header=mc_header)
-
-    return evt_variables
-
-def make_top_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"]):
-    from PyConf.reading import get_particles
-    from IsolationTools import VertexAndConeIsolation
-
-    possible_charm_locations = ["LongTrackIso", "TTrackIso", "DownstreamTrackIso", "UpstreamTrackIso", "NeutralIso", "PizIso"]
-    coneangles = [0.25,0.5,1.,1.5,2.]
-
-    count = 0
-    for location in locations:
-        extra_particles = get_particles(f"/Event/HLT2/{hlt2_line}/{location}/Particles")
-
-        for coneangle in coneangles:
-            top_RTAlg = VertexAndConeIsolation(
-                name=location+"_"+str(coneangle),
-                reference_particles=input_data,
-                related_particles=extra_particles,
-                cut=F.DR2<coneangle)
-
-            if count == 0:
-                top_iso_variables = ParticleIsolation(isolation_alg=top_RTAlg,array_indx_name='indx')
-            else:
-                top_iso_variables += ParticleIsolation(isolation_alg=top_RTAlg,array_indx_name='indx')
-            count += 1
-
-
-    return top_iso_variables
-
-def make_basic_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"]):
-    from PyConf.reading import get_particles
-    from IsolationTools import VertexAndConeIsolation
-    from PyConf.Algorithms import ThOrParticleSelection
-
-    basic_code = (F.FILTER(F.ALL) @ F.GET_ALL_BASICS())
-    basic_particles = ThOrParticleSelection(InputParticles=input_data, Functor=basic_code).OutputSelection
-
-    possible_charm_locations = ["LongTrackIso", "TTrackIso", "DownstreamTrackIso", "UpstreamTrackIso", "NeutralIso", "PizIso"]
-    coneangles = [0.25,0.5,1.,1.5,2.]
-
-    count = 0
-    for location in locations:
-        extra_particles = get_particles(f"/Event/HLT2/{hlt2_line}/{location}/Particles")
-
-        for coneangle in coneangles:
-            basic_RTAlg = VertexAndConeIsolation(
-                name=location+"_"+str(coneangle),
-                reference_particles=basic_particles,
-                related_particles=extra_particles,
-                cut=F.DR2<coneangle)
-
-            if count == 0:
-                basic_iso_variables = ParticleIsolation(isolation_alg=basic_RTAlg,array_indx_name='indx')
-            else:
-                basic_iso_variables += ParticleIsolation(isolation_alg=basic_RTAlg,array_indx_name='indx')
-            count += 1
-
-
-    return basic_iso_variables
-
-
-def make_intermediate_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"], composite_ID = "J/psi(1S)"):
-    from PyConf.reading import get_particles
-    from IsolationTools import VertexAndConeIsolation
-    from PyConf.Algorithms import ThOrParticleSelection
-
-    intermediate_code = F.FILTER(F.IS_ABS_ID(composite_ID)) @ F.GET_ALL_DESCENDANTS()
-    intermediate_particles = ThOrParticleSelection(InputParticles=input_data, Functor=intermediate_code).OutputSelection
-
-    possible_charm_locations = ["LongTrackIso", "TTrackIso", "DownstreamTrackIso", "UpstreamTrackIso", "NeutralIso", "PizIso"]
-    coneangles = [0.25,0.5,1.,1.5,2.]
-
-    count = 0
-    for location in locations:
-        extra_particles = get_particles(f"/Event/HLT2/{hlt2_line}/{location}/Particles")
-
-        for coneangle in coneangles:
-            intermediate_RTAlg = VertexAndConeIsolation(
-                name=location+"_"+str(coneangle),
-                reference_particles=intermediate_particles,
-                related_particles=extra_particles,
-                cut=F.DR2<coneangle)
-
-            if count == 0:
-                intermediate_iso_variables = ParticleIsolation(isolation_alg=intermediate_RTAlg,array_indx_name='indx')
-            else:
-                intermediate_iso_variables += ParticleIsolation(isolation_alg=intermediate_RTAlg,array_indx_name='indx')
-            count += 1
-
-
-    return intermediate_iso_variables
diff --git a/Charm_2024validation/tmp.yaml b/Charm_2024validation/tmp.yaml
deleted file mode 100644
index c871485c24..0000000000
--- a/Charm_2024validation/tmp.yaml
+++ /dev/null
@@ -1,12 +0,0 @@
-( '27186011', 'dst_to_dee', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27185021', 'dst_to_dee', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27184011', 'dst_to_dee', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27186011', 'dst_to_dee', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '27185021', 'dst_to_dee', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '27184011', 'dst_to_dee', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '27186011', 'dst_to_dee', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '27185021', 'dst_to_dee', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '27184011', 'dst_to_dee', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '27186011', 'dst_to_dee', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27185021', 'dst_to_dee', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27184011', 'dst_to_dee', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-- 
GitLab


From 541853c338ace6551e7fe42f5771abc47159527a Mon Sep 17 00:00:00 2001
From: Serena Maccolini <serena.maccolini@cern.ch>
Date: Mon, 15 Jul 2024 16:51:28 +0200
Subject: [PATCH 06/51] new AP on MC Hlt1noUT + HLT2withUT

---
 Charm_2024validation/info.yaml                | 122 +++
 Charm_2024validation/info_MC_noUT.yaml        | 121 +++
 Charm_2024validation/info_data.yaml           |  53 +
 Charm_2024validation/info_data_noUT.yaml      |  50 +
 Charm_2024validation/main_d_to_hhh.py         |  63 ++
 Charm_2024validation/options/d_to_hhh.py      | 503 +++++++++
 Charm_2024validation/options/d_to_hhh_MC.py   |  92 ++
 Charm_2024validation/options/dst_to_dee.py    | 296 ++++++
 .../options/hlt2/dst_to_dee.py                |   9 +
 Charm_2024validation/options/hlt2/hlt2.py     |  32 +
 .../options/hlt2/hlt2_d0_to_hh.py             |  41 +
 .../options/hlt2/hlt2_d0_to_hhhh.py           |  40 +
 .../options/hlt2/hlt2_d0_to_hhpi0.py          |  40 +
 .../options/hlt2/hlt2_d0_to_kshh.py           |  40 +
 .../options/hlt2/hlt2_d0_to_ksks.py           |  40 +
 .../options/hlt2/hlt2_d_to_hhh.py             |  42 +
 .../options/hlt2/hlt2_d_to_ksh.py             |  42 +
 .../options/hlt2/hlt2_dst_to_dee.py           |  41 +
 .../options/hlt2/hlt2_rare_charm.py           |  40 +
 Charm_2024validation/options/hlt2/hlt2noUT.py |  32 +
 .../options/hlt2/make_hlt2_decay.sh           |   9 +
 Charm_2024validation/options/tupling.py       | 986 ++++++++++++++++++
 Charm_2024validation/tmp.yaml                 |  12 +
 23 files changed, 2746 insertions(+)
 create mode 100644 Charm_2024validation/info.yaml
 create mode 100644 Charm_2024validation/info_MC_noUT.yaml
 create mode 100644 Charm_2024validation/info_data.yaml
 create mode 100644 Charm_2024validation/info_data_noUT.yaml
 create mode 100644 Charm_2024validation/main_d_to_hhh.py
 create mode 100644 Charm_2024validation/options/d_to_hhh.py
 create mode 100644 Charm_2024validation/options/d_to_hhh_MC.py
 create mode 100644 Charm_2024validation/options/dst_to_dee.py
 create mode 100644 Charm_2024validation/options/hlt2/dst_to_dee.py
 create mode 100644 Charm_2024validation/options/hlt2/hlt2.py
 create mode 100644 Charm_2024validation/options/hlt2/hlt2_d0_to_hh.py
 create mode 100644 Charm_2024validation/options/hlt2/hlt2_d0_to_hhhh.py
 create mode 100644 Charm_2024validation/options/hlt2/hlt2_d0_to_hhpi0.py
 create mode 100644 Charm_2024validation/options/hlt2/hlt2_d0_to_kshh.py
 create mode 100644 Charm_2024validation/options/hlt2/hlt2_d0_to_ksks.py
 create mode 100644 Charm_2024validation/options/hlt2/hlt2_d_to_hhh.py
 create mode 100644 Charm_2024validation/options/hlt2/hlt2_d_to_ksh.py
 create mode 100644 Charm_2024validation/options/hlt2/hlt2_dst_to_dee.py
 create mode 100644 Charm_2024validation/options/hlt2/hlt2_rare_charm.py
 create mode 100644 Charm_2024validation/options/hlt2/hlt2noUT.py
 create mode 100644 Charm_2024validation/options/hlt2/make_hlt2_decay.sh
 create mode 100644 Charm_2024validation/options/tupling.py
 create mode 100644 Charm_2024validation/tmp.yaml

diff --git a/Charm_2024validation/info.yaml b/Charm_2024validation/info.yaml
new file mode 100644
index 0000000000..26de654976
--- /dev/null
+++ b/Charm_2024validation/info.yaml
@@ -0,0 +1,122 @@
+defaults:
+  inform:
+    - serena.maccolini@cern.ch
+  wg: Charm
+
+{%- set conditions = [
+  "MagDown",
+]%}
+
+{%- set evttype_subsample_nutext_nu_dir1_dir2_dddb = [
+( '27163102', 'd0_to_hh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163101', 'd0_to_hh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163100', 'd0_to_hh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '23103042', 'd_to_hhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '23263022', 'd_to_hhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '21263012', 'd_to_hhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163471', 'd0_to_hhpi0', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27165903', 'd0_to_kshh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27165071', 'd0_to_hhhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27265008', 'd0_to_hhhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27265009', 'd0_to_hhhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27165072', 'd0_to_hhhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '23103111', 'd_to_ksh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '21103101', 'd_to_ksh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '23173003', 'rare_charm', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+
+( '27163102', 'd0_to_hh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163101', 'd0_to_hh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163100', 'd0_to_hh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '23103042', 'd_to_hhh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '23263022', 'd_to_hhh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '21263012', 'd_to_hhh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163471', 'd0_to_hhpi0', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '27165903', 'd0_to_kshh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '27165071', 'd0_to_hhhh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+
+( '27163102', 'd0_to_hh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163101', 'd0_to_hh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163100', 'd0_to_hh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '23103042', 'd_to_hhh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '23263022', 'd_to_hhh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '21263012', 'd_to_hhh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163471', 'd0_to_hhpi0', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '27165903', 'd0_to_kshh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '27165071', 'd0_to_hhhh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+
+( '27163102', 'd0_to_hh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163101', 'd0_to_hh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163100', 'd0_to_hh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '23103042', 'd_to_hhh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '23263022', 'd_to_hhh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '21263012', 'd_to_hhh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163471', 'd0_to_hhpi0', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27165903', 'd0_to_kshh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27165071', 'd0_to_hhhh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+
+]%}
+
+
+
+{%- for evttype, id, nutext, nu, dir1, dir2, dddb in evttype_subsample_nutext_nu_dir1_dir2_dddb %}
+
+{% for polarity in conditions %}
+
+{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1:
+  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
+  input:
+    bk_query: "/MC/{{dir1}}/Beam6800GeV-2024{{dir2}}-{{polarity}}-Nu{{nu}}-25ns-Pythia8/Sim10d/{{evttype}}/DIGI"
+    n_test_lfns: 3
+  output: HLT1.DST
+  options:
+    entrypoint: Charm_2024validation.options.hlt1:alg_config
+    extra_options:
+      input_raw_format: 0.5
+      conddb_tag: sim10-2024.Q1.2-v1.1-md100
+      dddb_tag: '{{dddb}}'
+      input_type: ROOT
+      output_type: ROOT
+      simulation: True
+      data_type: "Upgrade"
+      scheduler_legacy_mode: False
+      evt_max: 1000
+
+{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2:
+  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
+  input:
+    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1
+  output: HLT2.DST
+  options:
+    entrypoint: Charm_2024validation.options.hlt2.hlt2_{{id}}:alg_config
+    extra_options:
+      conddb_tag: sim10-2024.Q1.2-v1.1-md100
+      dddb_tag: '{{dddb}}'
+      input_raw_format: 0.5
+      input_type: "ROOT"
+      output_type: "ROOT"
+      simulation: True
+      data_type: "Upgrade"
+      output_manifest_file: "HLT2.tck.json"
+      scheduler_legacy_mode: False
+
+MC_{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}:
+  application: "DaVinci/v64r7@x86_64_v3-el9-gcc13+detdesc-opt+g"
+  input:
+    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2
+  output: DVTUPLE.ROOT
+  options:
+    entrypoint: Charm_2024validation.main_{{id}}:main
+    extra_options:
+      conddb_tag: sim10-2024.Q1.2-v1.1-md100
+      dddb_tag: '{{dddb}}'
+      input_raw_format: 0.5
+      input_type: ROOT
+      simulation: True
+      data_type: "Upgrade"
+      event_store: HiveWhiteBoard
+      input_process: "Hlt2"
+      input_manifest_file: "HLT2.tck.json"
+      write_decoding_keys_to_git: false
+      
+{%- endfor %}
+{%- endfor %}
diff --git a/Charm_2024validation/info_MC_noUT.yaml b/Charm_2024validation/info_MC_noUT.yaml
new file mode 100644
index 0000000000..52df9e4e96
--- /dev/null
+++ b/Charm_2024validation/info_MC_noUT.yaml
@@ -0,0 +1,121 @@
+defaults:
+  inform:
+    - serena.maccolini@cern.ch
+  wg: Charm
+
+{%- set conditions = [
+  "MagDown",
+]%}
+
+{%- set evttype_subsample_nutext_nu_dir1_dir2_dddb_geometry = [
+( '27163102', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163101', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163100', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23103042', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23263022', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '21263012', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163471', 'd0_to_hhpi0', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165903', 'd0_to_kshh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165071', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27265008', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27265009', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165072', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23103111', 'd_to_ksh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '21103101', 'd_to_ksh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23173003', 'rare_charm', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163102', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163101', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163100', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23103042', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23263022', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '21263012', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163471', 'd0_to_hhpi0', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165903', 'd0_to_kshh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165071', 'd0_to_hhhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163102', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163101', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163100', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23103042', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23263022', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '21263012', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163471', 'd0_to_hhpi0', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165903', 'd0_to_kshh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165071', 'd0_to_hhhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163102', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163101', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163100', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23103042', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23263022', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '21263012', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163471', 'd0_to_hhpi0', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165903', 'd0_to_kshh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165071', 'd0_to_hhhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165901', 'd0_to_ksks', '7p6', '7.6', 'Dev', '', 'dddb-20231017', 'run3/trunk'),
+]%}
+
+
+
+{%- for evttype, id, nutext, nu, dir1, dir2, dddb, geometry in evttype_subsample_nutext_nu_dir1_dir2_dddb_geometry %}
+
+{% for polarity in conditions %}
+
+{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1:
+  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
+  input:
+    bk_query: "/MC/{{dir1}}/Beam6800GeV-expected-2024{{dir2}}-{{polarity}}-Nu{{nu}}-25ns-Pythia8/Sim10c/{{evttype}}/DIGI"
+    n_test_lfns: 3
+  output: HLT1.DST
+  options:
+    entrypoint: Charm_2024validation.options.hlt1:alg_config
+    extra_options:
+      input_raw_format: 0.5
+      conddb_tag: sim-20231017-vc-md100
+      dddb_tag: '{{dddb}}'
+      input_type: ROOT
+      output_type: ROOT
+      simulation: True
+      data_type: "Upgrade"
+      scheduler_legacy_mode: False
+      geometry_version: "{{geometry}}"
+      evt_max: -1
+
+{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2:
+  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
+  input:
+    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1
+  output: HLT2.DST
+  options:
+    entrypoint: Charm_2024validation.options.hlt2.hlt2_{{id}}:alg_config
+    extra_options:
+      conddb_tag: sim-20231017-vc-md100
+      dddb_tag: '{{dddb}}'
+      input_raw_format: 0.5
+      input_type: "ROOT"
+      output_type: "ROOT"
+      simulation: True
+      data_type: "Upgrade"
+      output_manifest_file: "HLT2.tck.json"
+      scheduler_legacy_mode: False
+      geometry_version: "{{geometry}}"
+
+MC_{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}:
+  application: "DaVinci/v64r3@x86_64_v3-el9-gcc13+detdesc-opt+g"
+  input:
+    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2
+  output: DVTUPLE.ROOT
+  options:
+    entrypoint: Charm_2024validation.main_{{id}}:main
+    extra_options:
+      conddb_tag: sim-20231017-vc-md100
+      dddb_tag: '{{dddb}}'
+      input_raw_format: 0.5
+      input_type: ROOT
+      simulation: True
+      data_type: "Upgrade"
+      event_store: HiveWhiteBoard
+      geometry_version: "{{geometry}}"
+      input_process: "Hlt2"
+      input_manifest_file: "HLT2.tck.json"
+
+{%- endfor %}
+{%- endfor %}
diff --git a/Charm_2024validation/info_data.yaml b/Charm_2024validation/info_data.yaml
new file mode 100644
index 0000000000..cf3b7dcdf9
--- /dev/null
+++ b/Charm_2024validation/info_data.yaml
@@ -0,0 +1,53 @@
+defaults:
+  inform:
+    - serena.maccolini@cern.ch
+  wg: Charm
+
+{%- set conditions = [
+  "MagDown",
+]%}
+
+
+
+{%- set subsamples = [
+  "d0_to_hh",
+  "d_to_hhh",
+  "d_to_ksh",
+  "d0_to_hhpi0",
+  "d0_to_kshh",
+  "d0_to_ksks",
+  "d0_to_hhhh",
+  "rare_charm",
+  "detection_asymmetry",
+  "dst_to_dee",
+]%}
+
+{% for id in subsamples %}
+{% for polarity in conditions %}
+
+{{id}}_2024_{{ polarity }}:
+  application: "DaVinci/v64r7"
+  input:
+    bk_query: "/LHCb/Collision24/Beam6800GeV-VeloClosed-{{polarity}}/Real Data/Sprucing24c2/94000000/CHARM.DST"
+
+    dq_flags:
+      - UNCHECKED
+      - OK
+    keep_running: true
+  output: DVTUPLE_{{id}}.ROOT
+  options:
+    entrypoint: Charm_2024validation.main_{{id}}:main
+    extra_options:
+      input_raw_format: 0.5
+      input_type: ROOT
+      simulation: False
+      data_type: "Upgrade"
+      event_store: HiveWhiteBoard
+      geometry_version: run3/2024.Q1.2-v00.00
+      conditions_version: master
+      input_process: "TurboPass"
+      input_stream: "charm"
+      evt_max: -1
+
+{%- endfor %}
+{%- endfor %}
diff --git a/Charm_2024validation/info_data_noUT.yaml b/Charm_2024validation/info_data_noUT.yaml
new file mode 100644
index 0000000000..8c750c72d0
--- /dev/null
+++ b/Charm_2024validation/info_data_noUT.yaml
@@ -0,0 +1,50 @@
+defaults:
+  inform:
+    - serena.maccolini@cern.ch
+  wg: Charm
+
+{%- set conditions = [
+  "MagDown",
+]%}
+
+
+
+{%- set subsamples = [
+  "d0_to_hh",
+  "d_to_hhh",
+  "d_to_ksh",
+  "d0_to_hhpi0",
+  "d0_to_kshh",
+  "d0_to_ksks",
+  "d0_to_hhhh",
+  "rare_charm",
+  "detection_asymmetry",
+]%}
+
+{% for id in subsamples %}
+{% for polarity in conditions %}
+
+{{id}}_2024_{{ polarity }}:
+  application: "DaVinci/v64r5"
+  input:
+    bk_query: "/LHCb/Collision24/Beam6800GeV-VeloClosed-{{polarity}}-Excl-UT/Real Data/Sprucing24c1/94000000/CHARM.DST"
+    dq_flags:
+      - UNCHECKED
+      - OK
+    keep_running: true
+  output: DVTUPLE_{{id}}.ROOT
+  options:
+    entrypoint: Charm_2024validation.main_{{id}}:main
+    extra_options:
+      input_raw_format: 0.5
+      input_type: ROOT
+      simulation: False
+      data_type: "Upgrade"
+      event_store: HiveWhiteBoard
+      geometry_version: run3/2024.Q1.2-v00.00
+      conditions_version: master
+      input_process: "TurboPass"
+      input_stream: "charm"
+
+{%- endfor %}
+{%- endfor %}
diff --git a/Charm_2024validation/main_d_to_hhh.py b/Charm_2024validation/main_d_to_hhh.py
new file mode 100644
index 0000000000..516e32b119
--- /dev/null
+++ b/Charm_2024validation/main_d_to_hhh.py
@@ -0,0 +1,63 @@
+###############################################################################
+# (c) Copyright 2021-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 .options.d_to_hhh import *
+from .options.d_to_hhh_MC import *
+from .options.detection_asymmetry import *
+
+from DaVinci import Options, make_config
+from PyConf.reading import get_pvs, get_rec_summary
+
+def main(options: Options):
+
+    # get ODIN and DecReports location
+    pvs = get_pvs()
+    rec_summary = get_rec_summary()
+
+    tuples = {
+        #D2hhh
+        "D2Kpipi" : maketuple_D2Kpipi(options, pvs, rec_summary),
+        "D2Kpipi_NoCuts" : maketuple_D2Kpipi(options, pvs, rec_summary,True),
+        #"D2Kpipi_Kpi" : maketuple_D2Kpipi_Kpi(options, pvs, rec_summary), #subcomb of 2 out of 3 daughters
+        "Ds2KKpi" : maketuple_Ds2KKpi(options, pvs, rec_summary),
+        "Ds2KKpi_NoCuts" : maketuple_Ds2KKpi(options, pvs, rec_summary,True),
+        "D2pipipi" : maketuple_D2pipipi(options, pvs, rec_summary),
+        "D2pipipi_NoCuts" : maketuple_D2pipipi(options, pvs, rec_summary,True),
+        "D2pipiK" : maketuple_D2pipiK(options, pvs, rec_summary),
+        "D2pipiK_NoCuts" : maketuple_D2pipiK(options, pvs, rec_summary,True),
+        "D2KKK" : maketuple_D2KKK(options, pvs, rec_summary),
+        "D2KKK_NoCuts" : maketuple_D2KKK(options, pvs, rec_summary,True),
+        "D2piKK" : maketuple_D2piKK(options, pvs, rec_summary),
+        "D2piKK_NoCuts" : maketuple_D2piKK(options, pvs, rec_summary,True),
+        "B02Dpi_D2KKpi" : maketuple_B02Dpi_D2KKpi(options, pvs, rec_summary),
+        "B02Dpi_D2pipipi" : maketuple_B02Dpi_D2pipipi(options, pvs, rec_summary),
+        "Bs02Dspi_Ds2KKpi" : maketuple_Bs02Dspi_Ds2KKpi(options, pvs, rec_summary),
+        "Bs02Dspi_Ds2pipipi" : maketuple_Bs02Dspi_Ds2pipipi(options, pvs, rec_summary),
+        #ADet
+        "D2Kpipi_ADet" : maketuple_D2Kpipi_ADet(options, pvs, rec_summary),
+        "D2pipipi_ADet" : maketuple_D2pipipi_ADet(options, pvs, rec_summary),
+        "Ds2KKpi_ADet" : maketuple_Ds2KKpi_ADet(options, pvs, rec_summary),
+
+
+    }
+
+    MCtuples = {
+        "MC_D2Kpipi" : maketuple_MC_D2Kpipi(options, pvs, rec_summary),
+        "MC_Ds2KKpi" : maketuple_MC_Ds2KKpi(options, pvs, rec_summary)
+        "MC_Ds2KKK" : maketuple_MC_Ds2KKK(options, pvs, rec_summary)
+    }
+
+    if options.simulation:
+        tuples = tuples | MCtuples
+
+    config = make_config(options, tuples)
+
+    return config
diff --git a/Charm_2024validation/options/d_to_hhh.py b/Charm_2024validation/options/d_to_hhh.py
new file mode 100644
index 0000000000..d10fa039f6
--- /dev/null
+++ b/Charm_2024validation/options/d_to_hhh.py
@@ -0,0 +1,503 @@
+from .tupling import (
+    make_composite_variables_3body,
+    make_b_composite_variables,
+    make_composite_variables,
+    make_basic_variables,
+    make_hlt2_event_variables,
+    make_composite_dtf_variables_3body,
+    make_basic_dtf_variables,
+)
+
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from FunTuple import FunTuple_Particles as Funtuple
+
+
+def make_dtf_variables(options, pvs, input_data, ptype):
+
+    if ptype not in ["basic", "composite"]:
+        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
+
+    from DecayTreeFitter import DecayTreeFitter
+    
+    DTF = DecayTreeFitter(
+        name=f'DTF_{{hash}}',
+        input_particles=input_data)
+
+    DTFvtx = DecayTreeFitter(
+        name=f'DTFvtx_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    DTFmassDp = DecayTreeFitter(
+        name=f'DTFmassDp_{{hash}}',
+        input_particles=input_data,
+        mass_constraints=["D+"])
+
+    DTFvtxmassDp = DecayTreeFitter(
+        name=f'DTFvtxmassDp_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D+"])
+
+    DTFmassDsp = DecayTreeFitter(
+        name=f'DTFmassDsp_{{hash}}',
+        input_particles=input_data,
+        substitutions = ['D+{{D_s+}}'],
+        mass_constraints=["D_s+"])
+
+    DTFvtxmassDsp = DecayTreeFitter(
+        name=f'DTFvtxmassDsp_{{hash}}',
+        input_particles=input_data,
+        substitutions = ['D+{{D_s+}}',"KS0{{KS0}}"],#trick
+        mass_constraints=["D_s+"],
+        input_pvs=pvs,
+    )
+
+    if ptype == "basic":
+        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassDp,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="Dp")
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassDp,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="Dp")
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassDsp,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="Dsp")
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassDsp,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="Dsp")
+        return dtf_vars
+
+    if ptype == "composite":
+        dtf_vars = make_composite_dtf_variables_3body(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
+                                             DTF=DTFmassDp,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="Dp")
+        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
+                                             DTF=DTFvtxmassDp,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="Dp")
+        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
+                                             DTF=DTFmassDsp,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="Dsp")
+        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
+                                             DTF=DTFvtxmassDsp,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="Dsp")
+        return dtf_vars
+
+
+def maketuple_D2Kpipi(options, pvs, rec_summary, _NoCuts=False):
+    name = "D2Kpipi"
+    turbo_line = "Hlt2Charm_DpDspToKmPipPip"
+    if _NoCuts == True:
+        turbo_line += "_NoCuts"
+        name += "_NoCuts"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> K- pi+ pi+]CC",
+        "Km"   : "[D+ -> ^K- pi+ pi+]CC",
+        "pip1"  : "[D+ -> K- ^pi+ pi+]CC",
+        "pip2" : "[D+ -> K- pi+ ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2pipipi(options, pvs, rec_summary, _NoCuts=False):
+    name = "D2pipipi"
+    turbo_line = "Hlt2Charm_DpDspToPimPipPip"
+    if _NoCuts == True:
+        turbo_line += "_NoCuts"
+        name += "_NoCuts"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> pi- pi+ pi+]CC",
+        "pim"   : "[D+ -> ^pi- pi+ pi+]CC",
+        "pip1"  : "[D+ -> pi- ^pi+ pi+]CC",
+        "pip2" : "[D+ -> pi- pi+ ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Ds2KKpi(options, pvs, rec_summary, _NoCuts=False):
+    name = "Ds2KKpi"
+    turbo_line = "Hlt2Charm_DpDspToKmKpPip"
+    if _NoCuts == True:
+        turbo_line += "_NoCuts"
+        name += "_NoCuts"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> K- K+ pi+]CC",
+        "Km"   : "[D+ -> ^K- K+ pi+]CC",
+        "Kp"  : "[D+ -> K- ^K+ pi+]CC",
+        "pip" : "[D+ -> K- K+ ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+    
+    return [myfilter, mytuple]
+
+def maketuple_D2Kpipi_Kpi(options, pvs, rec_summary):
+    name = "D2Kpipi_Kpi"
+    turbo_line = "Hlt2Charm_DpDspToKmPipPip"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> (KS0 -> K- pi+) pi+]CC",
+        "Kst" : "[D+ -> ^(KS0 -> K- pi+) pi+]CC",
+        "Km"   : "[D+ -> (KS0 -> ^K- pi+) pi+]CC",
+        "pip"  : "[D+ -> (KS0 -> K- ^pi+) pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data),
+        "Kst"   : make_composite_variables(options, pvs, input_data),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, use_loki_decay_finder=True)
+
+    return [myfilter, mytuple]
+
+
+
+
+    '''
+    from PyConf.Algorithms import ThOrParticleSelection
+    import Functors as F
+    FILTER_TREE = lambda id: F.FILTER(F.IS_ABS_ID(id)) @ F.GET_ALL_DESCENDANTS()
+    Km_data = ThOrParticleSelection(
+    InputParticles=input_data, Functor=FILTER_TREE("[K-]CC")
+).OutputSelection
+    pip_data = ThOrParticleSelection(
+        InputParticles=input_data, Functor=FILTER_TREE("[pi+]CC")
+).OutputSelection
+    
+    
+    from PyConf.Algorithms import ChargedBasicsProducer, UniqueIDGeneratorAlg
+    from PyConf.Algorithms import ThOrCombiner__2ChargedBasics, ThOrCombiner__2Particle
+    # make unique_id_generator
+    unique_id_gen = UniqueIDGeneratorAlg()
+    '''
+    '''
+    # produce charged basic particles
+    produce_kaons = ChargedBasicsProducer(
+        InputUniqueIDGenerator=unique_id_gen, ParticleID="kaon")
+    produce_pions = ChargedBasicsProducer(
+        InputUniqueIDGenerator=unique_id_gen, ParticleID="pion")
+    produce_jpsi = ThOrCombiner__2ChargedBasics(
+    '''
+    '''
+    produce_jpsi = ThOrCombiner__2Particle(
+        InputUniqueIDGenerator=unique_id_gen,
+        DecayDescriptor="[J/psi(1S) -> K- pi+]cc",
+        #Input1=produce_kaons.Particles,
+        #Input2=produce_pions.Particles,
+        Input1=Km_data,
+        Input2=pip_data,
+    )
+    input_data = produce_jpsi.Output
+
+    branches = {
+        "Jpsi" : "[J/psi(1S) -> K- pi+]CC",
+    }
+
+    from FunTuple import FunctorCollection
+    import Functors as F
+    variables = {
+        #"Dp"   : make_composite_variables(options, pvs, input_data, False, False),
+        #"Jpsi"   : make_composite_variables(options, pvs, input_data, False, False),
+        "Jpsi"   : FunctorCollection({
+            "PX": F.PX,
+            "PY": F.PY,
+            "PZ": F.PZ,
+            "BPVDIRA": F.BPVDIRA(pvs),
+            "VCHI2DOF": F.CHI2DOF, #CHI2VXNDOF
+            "BPVIPCHI2": F.BPVIPCHI2(pvs),
+            "BPVIP": F.BPVIP(pvs),
+        }),
+        
+    }
+
+    from FunTuple import FunTuple_Composites as Funtuple
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables, inputs=input_data, store_multiple_cand_info=True)
+    ## add event_variables
+
+    
+    return [myfilter, mytuple]
+    '''
+    '''
+    from PyConf.control_flow import CompositeNode, NodeLogic
+    from PyConf.Algorithms import PrintDecayTree, PrintHeader
+    from RecoConf.reconstruction_objects import upfront_reconstruction
+    from DaVinci.common_particles import make_std_loose_jpsi2mum
+    jpsis = make_std_loose_jpsi2mumu()
+    pdt = PrintDecayTree(name="PrintJpsis", Input=jpsis)
+    algs = upfront_reconstruction() + [jpsis, pdt]
+
+    node = CompositeNode(
+    "PrintJpsiNode", children=algs, combine_logic=NodeLogic.NONLAZY_AND
+)
+    return [node]
+    
+    '''
+
+
+def maketuple_D2pipiK(options, pvs, rec_summary, _NoCuts=False):
+    name = "D2pipiK"
+    turbo_line = "Hlt2Charm_DpDspToKpPimPip"
+    if _NoCuts == True:
+        turbo_line += "_NoCuts"
+        name += "_NoCuts"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> pi- pi+ K+]CC",
+        "p1"   : "[D+ -> ^pi- pi+ K+]CC",
+        "p2"  : "[D+ -> pi- ^pi+ K+]CC",
+        "p3" : "[D+ -> pi- pi+ ^K+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
+        "p1"     : make_basic_variables(options, pvs, input_data),
+        "p2"    : make_basic_variables(options, pvs, input_data),
+        "p3"   : make_basic_variables(options, pvs, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2KKK(options, pvs, rec_summary, _NoCuts=False):
+    name = "D2KKK"
+    turbo_line = "Hlt2Charm_DpDspToKmKpKp"
+    if _NoCuts == True:
+        turbo_line += "_NoCuts"
+        name += "_NoCuts"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> K- K+ K+]CC",
+        "p1"   : "[D+ -> ^K- K+ K+]CC",
+        "p2"  : "[D+ -> K- ^K+ K+]CC",
+        "p3" : "[D+ -> K- K+ ^K+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
+        "p1"     : make_basic_variables(options, pvs, input_data),
+        "p2"    : make_basic_variables(options, pvs, input_data),
+        "p3"   : make_basic_variables(options, pvs, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2piKK(options, pvs, rec_summary, _NoCuts=False):
+    name = "D2piKK"
+    turbo_line = "Hlt2Charm_DpDspToKpKpPim"
+    if _NoCuts == True:
+        turbo_line += "_NoCuts"
+        name += "_NoCuts"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> pi- K+ K+]CC",
+        "p1"   : "[D+ -> ^pi- K+ K+]CC",
+        "p2"  : "[D+ -> pi- ^K+ K+]CC",
+        "p3" : "[D+ -> pi- K+ ^K+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
+        "p1"     : make_basic_variables(options, pvs, input_data),
+        "p2"    : make_basic_variables(options, pvs, input_data),
+        "p3"   : make_basic_variables(options, pvs, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+def maketuple_B02Dpi_D2KKpi(options, pvs, rec_summary):
+    name = "B02Dpi_D2KKpi"
+    turbo_line = "Hlt2Charm_B0ToDmPip_DmToKmKpPim"
+    
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+    
+    branches = {
+        "B0" : "[[B0]CC -> (D- -> K- K+ pi-) pi+]CC",
+        "pip" : "[[B0]CC -> (D- -> K- K+ pi-) ^pi+]CC",
+        "Dm" : "[[B0]CC -> ^(D- -> K- K+ pi-) pi+]CC",
+        "p1" : "[[B0]CC -> (D- -> ^K- K+ pi-) pi+]CC",
+        "p2" : "[[B0]CC -> (D- -> K- ^K+ pi-) pi+]CC",
+        "p3" : "[[B0]CC -> (D- -> K- K+ ^pi-) pi+]CC",
+    }
+    
+    variables = {
+        "B0" : make_b_composite_variables(options, pvs, input_data),
+        "pip" : make_basic_variables(options, pvs,input_data),
+        "Dm"   : make_composite_variables_3body(options, pvs, input_data),
+        "p1"     : make_basic_variables(options, pvs, input_data),
+        "p2"    : make_basic_variables(options, pvs, input_data),
+        "p3"   : make_basic_variables(options, pvs, input_data),        
+    }
+    
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+def maketuple_B02Dpi_D2pipipi(options, pvs, rec_summary, _NoCuts=False):    
+    name = "B02Dpi_D2pipipi"
+    turbo_line = "Hlt2Charm_B0ToDmPip_DmToPimPimPip"
+    
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+    
+    branches = {
+        "B0" : "[[B0]CC -> (D- -> pi- pi- pi+) pi+]CC",
+        "pip" : "[[B0]CC -> (D- -> pi- pi- pi+) ^pi+]CC",
+        "Dm" : "[[B0]CC -> ^(D- -> pi- pi- pi+) pi+]CC",
+        "p1" : "[[B0]CC -> (D- -> ^pi- pi- pi+) pi+]CC",
+        "p2" : "[[B0]CC -> (D- -> pi- ^pi- pi+) pi+]CC",
+        "p3" : "[[B0]CC -> (D- -> pi- pi- ^pi+) pi+]CC",
+    }
+    
+    variables = {
+        "B0" : make_b_composite_variables(options, pvs, input_data),
+        "pip" : make_basic_variables(options, pvs,input_data),
+        "Dm"   : make_composite_variables_3body(options, pvs, input_data),
+        "p1"     : make_basic_variables(options, pvs, input_data),
+        "p2"    : make_basic_variables(options, pvs, input_data),
+        "p3"   : make_basic_variables(options, pvs, input_data),        
+    }
+    
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+    
+def maketuple_Bs02Dspi_Ds2KKpi(options, pvs, rec_summary, _NoCuts=False):    
+    name = "Bs02Dspi_Ds2KKpi"
+    turbo_line = "Hlt2Charm_Bs0ToDsmPip_DsmToKmKpPim"
+    
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+    
+    branches = {
+        "Bs0" : "[[B_s0]CC -> (D_s- -> K- K+ pi-) pi+]CC",
+        "pip" : "[[B_s0]CC -> (D_s- -> K- K+ pi-) ^pi+]CC",
+        "Dsm" : "[[B_s0]CC -> ^(D_s- -> K- K+ pi-) pi+]CC",
+        "p1" : "[[B_s0]CC -> (D_s- -> ^K- K+ pi-) pi+]CC",
+        "p2" : "[[B_s0]CC -> (D_s- -> K- ^K+ pi-) pi+]CC",
+        "p3" : "[[B_s0]CC -> (D_s- -> K- K+ ^pi-) pi+]CC",
+    }
+    
+    variables = {
+        "Bs0" : make_b_composite_variables(options, pvs, input_data),
+        "pip" : make_basic_variables(options, pvs,input_data),
+        "Dsm"   : make_composite_variables_3body(options, pvs, input_data),
+        "p1"     : make_basic_variables(options, pvs, input_data),
+        "p2"    : make_basic_variables(options, pvs, input_data),
+        "p3"   : make_basic_variables(options, pvs, input_data),        
+    }
+    
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+    
+def maketuple_Bs02Dspi_Ds2pipipi(options, pvs, rec_summary, _NoCuts=False):
+    name = "Bs02Dspi_Ds2pipipi"
+    turbo_line = "Hlt2Charm_Bs0ToDsmPip_DsmToPimPimPip"
+    
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+    
+    branches = {
+        "Bs0" : "[[B_s0]CC -> (D_s- -> pi- pi- pi+) pi+]CC",
+        "pip" : "[[B_s0]CC -> (D_s- -> pi- pi- pi+) ^pi+]CC",
+        "Dsm" : "[[B_s0]CC -> ^(D_s- -> pi- pi- pi+) pi+]CC",
+        "p1" : "[[B_s0]CC -> (D_s- -> ^pi- pi- pi+) pi+]CC",
+        "p2" : "[[B_s0]CC -> (D_s- -> pi- ^pi- pi+) pi+]CC",
+        "p3" : "[[B_s0]CC -> (D_s- -> pi- pi- ^pi+) pi+]CC",
+    }
+    
+    variables = {
+        "Bs0" : make_b_composite_variables(options, pvs, input_data),
+        "pip" : make_basic_variables(options, pvs,input_data),
+        "Dsm"   : make_composite_variables_3body(options, pvs, input_data),
+        "p1"     : make_basic_variables(options, pvs, input_data),
+        "p2"    : make_basic_variables(options, pvs, input_data),
+        "p3"   : make_basic_variables(options, pvs, input_data),        
+    }
+    
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
diff --git a/Charm_2024validation/options/d_to_hhh_MC.py b/Charm_2024validation/options/d_to_hhh_MC.py
new file mode 100644
index 0000000000..e666e5f3ce
--- /dev/null
+++ b/Charm_2024validation/options/d_to_hhh_MC.py
@@ -0,0 +1,92 @@
+from .tupling import (
+    make_MC_composite_variables,
+    make_MC_basic_variables,
+    make_MC_event_variables,
+)
+
+from PyConf.reading import get_mc_particles, get_mc_header
+from FunTuple import FunTuple_MCParticles as FuntupleMC
+
+def maketuple_MC_D2Kpipi(options, pvs, rec_summary):
+    name = "MC_D2Kpipi"
+    line = "/Event/MC/Particles"
+
+    input_data = get_mc_particles(f"{line}")
+
+    branches = {
+        "Dp" : "[D+ ==> K- pi+ pi+]CC",
+        "Km"   : "[D+ ==> ^K- pi+ pi+]CC",
+        "pip1"  : "[D+ ==> K- ^pi+ pi+]CC",
+        "pip2" : "[D+ ==> K- pi+ ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_MC_composite_variables(),
+        "Km"     : make_MC_basic_variables(),
+        "pip1"    : make_MC_basic_variables(),
+        "pip2"   : make_MC_basic_variables(),
+    }
+
+    mytuple  = FuntupleMC(name=name,
+                          tuple_name="MCDecayTree",
+                          fields=branches, variables = variables,
+                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
+                          inputs=input_data)
+
+    return [mytuple]
+
+def maketuple_MC_Ds2KKpi(options, pvs, rec_summary):
+    name = "MC_Ds2KKpi"
+    line = "/Event/MC/Particles"
+
+    input_data = get_mc_particles(f"{line}")
+
+    branches = {
+        "Dp" : "[D_s+ ==> K- K+ pi+]CC",
+        "Km"   : "[D_s+ ==> ^K- K+ pi+]CC",
+        "Kp"  : "[D_s+ ==> K- ^K+ pi+]CC",
+        "pip" : "[D_s+ ==> K- K+ ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_MC_composite_variables(),
+        "Km"     : make_MC_basic_variables(),
+        "Kp"    : make_MC_basic_variables(),
+        "pip"   : make_MC_basic_variables(),
+    }
+
+    mytuple  = FuntupleMC(name=name,
+                          tuple_name="MCDecayTree",
+                          fields=branches, variables = variables,
+                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
+                          inputs=input_data)
+
+    return [mytuple]
+
+def maketuple_MC_Ds2KKK(options, pvs, rec_summary):
+    name = "MC_Ds2KKK"
+    line = "/Event/MC/Particles"
+
+    input_data = get_mc_particles(f"{line}")
+
+    branches = {
+        "Dp" : "[D_s+ ==> K- K+ K+]CC",
+        "Km"   : "[D_s+ ==> ^K- K+ K+]CC",
+        "Kp1"  : "[D_s+ ==> K- ^K+ K+]CC",
+        "Kp2" : "[D_s+ ==> K- K+ ^K+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_MC_composite_variables(),
+        "Km"     : make_MC_basic_variables(),
+        "Kp1"    : make_MC_basic_variables(),
+        "Kp2"   : make_MC_basic_variables(),
+    }
+
+    mytuple  = FuntupleMC(name=name,
+                          tuple_name="MCDecayTree",
+                          fields=branches, variables = variables,
+                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
+                          inputs=input_data)
+
+    return [mytuple]
diff --git a/Charm_2024validation/options/dst_to_dee.py b/Charm_2024validation/options/dst_to_dee.py
new file mode 100644
index 0000000000..11f42bae95
--- /dev/null
+++ b/Charm_2024validation/options/dst_to_dee.py
@@ -0,0 +1,296 @@
+import Functors as F
+from Functors.math import log
+from DaVinci import Options, make_config
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from FunTuple import FunctorCollection
+from PyConf.reading import get_particles, get_pvs
+import FunTuple.functorcollections as FC
+from FunTuple import FunTuple_Particles as Funtuple
+from DecayTreeFitter import DecayTreeFitter
+from Hlt2Conf.lines.charm.dst_to_dee_makers import (dst_BDT_functor)
+from .tupling import (
+    make_DeltaM_variable,
+    make_basic_variables,
+    make_composite_variables,
+    make_composite_variables_3body,
+    make_composite_variables_4body,
+    make_hlt2_event_variables,
+    make_basic_dtf_variables,
+    make_composite_dtf_variables,
+    make_composite_dtf_variables_3body,
+    make_composite_dtf_variables_4body,
+    Hlt1_lines
+)
+extra_brem_variables= (FunctorCollection(
+            {
+                "BREMHYPODELTAX": F.BREMHYPODELTAX,
+                "BREMHYPOENERGY": F.BREMHYPOENERGY,
+                "BREMHYPOID": F.BREMHYPOID,
+                "BREMHYPOMATCH_CHI2": F.BREMHYPOMATCH_CHI2,
+                "BREMPIDE": F.BREMPIDE,
+                "INBREM": F.INBREM,
+                "MASS_WITH_BREM": F.MASS_WITH_BREM,
+                "PT_WITH_BREM": F.PT_WITH_BREM,
+                "P_WITH_BREM": F.P_WITH_BREM,
+                "ECALPIDE": F.ECALPIDE,
+                "HCALPIDE": F.HCALPIDE,
+                "ELECTRONSHOWEREOP": F.ELECTRONSHOWEREOP,
+                "CLUSTERMATCH_CHI2": F.CLUSTERMATCH_CHI2,
+                "ELECTRONMATCH_CHI2": F.ELECTRONMATCH_CHI2,
+                "ELECTRONENERGY": F.ELECTRONENERGY,
+                "ELECTRONID": F.ELECTRONID,
+                "HCALEOP": F.HCALEOP,
+                "CALO_NEUTRAL_SHOWER_SHAPE": F.CALO_NEUTRAL_SHOWER_SHAPE,
+                "RICH_DLL_E": F.VALUE_OR(F.NaN)@F.RICH_DLL_E,
+            })
+    )
+
+decay_descriptor = {
+    'dst_kpi_os' : {
+        "Dst0":   "[ D*(2007)0 ->  (D0 ->  K-  pi+)  (gamma ->  e+  e-)]CC",
+        "D0":     "[ D*(2007)0 -> ^(D0 ->  K-  pi+)  (gamma ->  e+  e-)]CC",
+        "Kminus": "[ D*(2007)0 ->  (D0 -> ^K-  pi+)  (gamma ->  e+  e-)]CC",
+        "piplus": "[ D*(2007)0 ->  (D0 ->  K- ^pi+)  (gamma ->  e+  e-)]CC",
+        "gamma":  "[ D*(2007)0 ->  (D0 ->  K-  pi+) ^(gamma ->  e+  e-)]CC",
+        "eplus":  "[ D*(2007)0 ->  (D0 ->  K-  pi+)  (gamma -> ^e+  e-)]CC",
+        "eminus": "[ D*(2007)0 ->  (D0 ->  K-  pi+)  (gamma ->  e+ ^e-)]CC",
+    },
+
+    'dst_kpi_ss' : {
+        "Dst0":   "[ D*(2007)0 ->  (D0 ->  K-  pi+)  ([gamma ->  e+  e+]CC)]CC",
+        "D0":     "[ D*(2007)0 -> ^(D0 ->  K-  pi+)  ([gamma ->  e+  e+]CC)]CC",
+        "Kminus": "[ D*(2007)0 ->  (D0 -> ^K-  pi+)  ([gamma ->  e+  e+]CC)]CC",
+        "piplus": "[ D*(2007)0 ->  (D0 ->  K- ^pi+)  ([gamma ->  e+  e+]CC)]CC",
+        "gamma":  "[ D*(2007)0 ->  (D0 ->  K-  pi+) ^([gamma ->  e+  e+]CC)]CC",
+        "eplus":  "[ D*(2007)0 ->  (D0 ->  K-  pi+)  ([gamma -> ^e+  e+]CC)]CC",
+        "eminus": "[ D*(2007)0 ->  (D0 ->  K-  pi+)  ([gamma ->  e+ ^e+]CC)]CC",
+    },
+
+    'dst_k3pi_os' :  {
+        "Dst0":    "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)  (gamma ->  e+  e-)]CC",
+        "D0":      "[ D*(2007)0 -> ^(D0 -> K- pi- pi+ pi+)  (gamma ->  e+  e-)]CC",
+        "Kminus":  "[ D*(2007)0 ->  (D0 -> ^K- pi- pi+ pi+) (gamma ->  e+  e-)]CC",
+        "piminus": "[ D*(2007)0 ->  (D0 -> K- ^pi- pi+ pi+) (gamma ->  e+  e-)]CC",
+        "piplus1": "[ D*(2007)0 ->  (D0 -> K- pi- ^pi+ pi+) (gamma ->  e+  e-)]CC",
+        "piplus2": "[ D*(2007)0 ->  (D0 -> K- pi- pi+ ^pi+) (gamma ->  e+  e-)]CC",
+        "gamma":   "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+) ^(gamma ->  e+  e-)]CC",
+        "eplus":   "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)  (gamma -> ^e+  e-)]CC",
+        "eminus":  "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)  (gamma ->  e+ ^e-)]CC",
+    },
+
+    'dst_k3pi_ss' :  {
+        "Dst0":    "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)   ([gamma ->  e+  e+]CC)]CC",
+        "D0":      "[ D*(2007)0 -> ^(D0 -> K- pi- pi+ pi+)   ([gamma ->  e+  e+]CC)]CC",
+        "Kminus":  "[ D*(2007)0 ->  (D0 -> ^K- pi- pi+ pi+)  ([gamma ->  e+  e+]CC)]CC",
+        "piminus": "[ D*(2007)0 ->  (D0 -> K- ^pi- pi+ pi+)  ([gamma ->  e+  e+]CC)]CC",
+        "piplus1": "[ D*(2007)0 ->  (D0 -> K- pi- ^pi+ pi+)  ([gamma ->  e+  e+]CC)]CC",
+        "piplus2": "[ D*(2007)0 ->  (D0 -> K- pi- pi+ ^pi+)  ([gamma ->  e+  e+]CC)]CC",
+        "gamma":   "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)  ^([gamma ->  e+  e+]CC)]CC",
+        "eplus":   "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)   ([gamma -> ^e+  e+]CC)]CC",
+        "eminus":  "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)   ([gamma ->  e+ ^e+]CC)]CC",
+    },
+
+    'dsstp_2kpi_os' : {
+        "Dstp":   "[ D*_s+ ->  (D_s+ -> K- K+ pi+)  (gamma ->  e+  e-)]CC",
+        "DpDs":   "[ D*_s+ -> ^(D_s+ -> K- K+ pi+)  (gamma ->  e+  e-)]CC",
+        "Kminus": "[ D*_s+ ->  (D_s+ -> ^K- K+ pi+) (gamma ->  e+  e-)]CC",
+        "Kplus":  "[ D*_s+ ->  (D_s+ -> K- ^K+ pi+) (gamma ->  e+  e-)]CC",
+        "piplus": "[ D*_s+ ->  (D_s+ -> K- K+ ^pi+) (gamma ->  e+  e-)]CC",
+        "gamma":  "[ D*_s+ ->  (D_s+ -> K- K+ pi+) ^(gamma ->  e+  e-)]CC",
+        "eplus":  "[ D*_s+ ->  (D_s+ -> K- K+ pi+)  (gamma -> ^e+  e-)]CC",
+        "eminus": "[ D*_s+ ->  (D_s+ -> K- K+ pi+)  (gamma ->  e+ ^e-)]CC",
+    },
+    'dsstp_2kpi_ss' : {
+        "Dstp":   "[ D*_s+ ->  (D_s+ -> K- K+ pi+)   ([gamma ->  e+  e+]CC)]CC",
+        "DpDs":   "[ D*_s+ -> ^(D_s+ -> K- K+ pi+)   ([gamma ->  e+  e+]CC)]CC",
+        "Kminus": "[ D*_s+ ->  (D_s+ -> ^K- K+ pi+)  ([gamma ->  e+  e+]CC)]CC",
+        "Kplus":  "[ D*_s+ ->  (D_s+ -> K- ^K+ pi+)  ([gamma ->  e+  e+]CC)]CC",
+        "piplus": "[ D*_s+ ->  (D_s+ -> K- K+ ^pi+)  ([gamma ->  e+  e+]CC)]CC",
+        "gamma":  "[ D*_s+ ->  (D_s+ -> K- K+ pi+)  ^([gamma ->  e+  e+]CC)]CC",
+        "eplus":  "[ D*_s+ ->  (D_s+ -> K- K+ pi+)   ([gamma -> ^e+  e+]CC)]CC",
+        "eminus": "[ D*_s+ ->  (D_s+ -> K- K+ pi+)   ([gamma ->  e+ ^e+]CC)]CC",
+    },
+
+}
+
+def MVA_dst_variables(line, pvs):
+    return (FunctorCollection( { "MVA": dst_BDT_functor(pvs, line=line)}))
+#make_dtf_variables(options,  input_data, ptype):
+def make_dtf_variables(options, input_data,  pvs, ptype="basic",  mass_constrain = ["D*(2007)0", "D0" ], nparticles=2):
+    
+    DTF = DecayTreeFitter(
+        name="DTF_{hash}",
+        input_particles=input_data,
+    )
+
+    DTF_DMass_BestPV = DecayTreeFitter(
+        name="DTF_DMass_BestPV_{hash}",
+        input_particles=input_data,
+        mass_constraints=mass_constrain,
+        input_pvs=pvs,
+        fit_all_pvs=False,
+    )
+    DTF_Mass_BestPV = DecayTreeFitter(
+        name="DTF_Mass_BestPV_{hash}",
+        input_particles=input_data,
+        mass_constraints=[mass_constrain[1]],
+        input_pvs=pvs,
+        fit_all_pvs=False,
+    )
+
+    DTF_BestPV = DecayTreeFitter(
+        name="DTF_BestPV_{hash}",
+        input_particles=input_data,
+        #mass_constraints=["D*(2007)0", "D0" ],
+        input_pvs=pvs,
+        fit_all_pvs=False,
+    )
+
+    DTF_DMass = DecayTreeFitter(
+        name="DTF_DMass_{hash}",
+        input_particles=input_data,
+        mass_constraints=mass_constrain,
+        output_level=3,
+    )
+    DTF_Mass = DecayTreeFitter(
+        name="DTF_Mass_{hash}",
+        input_particles=input_data,
+        mass_constraints=[mass_constrain[1]],
+        output_level=3,
+    )
+    
+    if ptype == "basic":
+        dtf_variables =  make_basic_dtf_variables
+    elif ptype == "composite":
+        if nparticles == 2:
+            dtf_variables = make_composite_dtf_variables 
+        elif nparticles == 3:
+            dtf_variables = make_composite_dtf_variables_3body
+        elif nparticles == 4:
+            dtf_variables = make_composite_dtf_variables_4body 
+
+    dtf_vars = dtf_variables(options, pvs, input_data,
+                                        DTF=DTF,
+                                        pv_constraint=False,
+                                        mass_constraint=False)
+    dtf_vars += dtf_variables(options, pvs, input_data,
+                                        DTF=DTF_BestPV,
+                                        pv_constraint=True,
+                                        mass_constraint=False)
+    dtf_vars += dtf_variables(options, pvs, input_data,
+                                        DTF=DTF_Mass,
+                                        pv_constraint=False,
+                                        mass_constraint=True, particle_name="D")
+    dtf_vars += dtf_variables(options, pvs, input_data,
+                                        DTF=DTF_Mass_BestPV,
+                                        pv_constraint=True,
+                                        mass_constraint=True, particle_name="D")
+    dtf_vars += dtf_variables(options, pvs, input_data,
+                                        DTF=DTF_DMass,
+                                        pv_constraint=False,
+                                        mass_constraint=True, particle_name="DstD")
+    dtf_vars += dtf_variables(options, pvs, input_data,
+                                        DTF=DTF_DMass_BestPV,
+                                        pv_constraint=True,
+                                        mass_constraint=True, particle_name="DstD")
+
+    return dtf_vars
+
+
+def make_Dst0ToD0EmEp_D0ToKmPip_tuple(options, line, pvs , rec_summary, dd='dst_kpi_os'):
+
+    input_data=get_particles(f"/Event/HLT2/{line}/Particles")
+    my_filter = create_lines_filter(f"LineFilter_{line}_{{hash}}",[line],)
+
+    fields = decay_descriptor[dd]
+    
+    composite_tuple_variables = {
+        "Dst0"   :  make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs,  "composite") +\
+             MVA_dst_variables("Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip", pvs) + make_DeltaM_variable(options), 
+        "D0"     :  make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs,  "composite"),
+        "gamma"  :  make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs,  "composite")
+    }
+    basic_tuple_variables = { 
+        "Kminus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"),
+        "piplus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"),
+        "eplus"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic") + extra_brem_variables,
+        "eminus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic") + extra_brem_variables,
+    }
+
+    my_tuple = Funtuple(
+        name=f"Tuple_{line}_{dd}",
+        tuple_name="DecayTree",
+        fields=fields,
+        variables= {**composite_tuple_variables, **basic_tuple_variables},
+        event_variables=make_hlt2_event_variables(options, pvs, rec_summary), 
+        inputs=input_data,
+        store_multiple_cand_info=True
+    )
+    return [ my_filter, my_tuple]
+
+def make_Dst0ToD0EmEp_D0ToKmPimPipPip_tuple(options, line, pvs, rec_summary, dd='dst_k3pi_os'):
+
+    input_data=get_particles(f"/Event/HLT2/{line}/Particles")
+    my_filter = create_lines_filter(f"LineFilter_{line}_{{hash}}",[line],)
+
+    fields = decay_descriptor[dd]
+    
+    composite_tuple_variables = {
+        "Dst0"   : make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs, "composite") +\
+             MVA_dst_variables("Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip", pvs) + make_DeltaM_variable(options), 
+        "D0"     : make_composite_variables_4body(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs, "composite", nparticles=4),
+        "gamma"  : make_composite_variables(options, pvs, input_data) 
+    }
+    basic_tuple_variables = { 
+        "Kminus"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"),
+        "piminus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"),
+        "piplus1" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"),
+        "piplus2" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"), 
+        "eplus"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic") + extra_brem_variables,
+        "eminus"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic") + extra_brem_variables,
+    }
+
+    my_tuple = Funtuple(
+        name=f"Tuple_{line}_{dd}",
+        tuple_name="DecayTree",
+        fields=fields,
+        variables= {**composite_tuple_variables, **basic_tuple_variables},
+        event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data,
+        store_multiple_cand_info=True
+    )
+    return [ my_filter, my_tuple]
+
+
+def make_DstpToDpDspEmEp_DpDspToKmKpPip_tuple(options, line, pvs , rec_summary, dd='dsstp_2kpi_os'):
+
+    input_data=get_particles(f"/Event/HLT2/{line}/Particles")
+    my_filter = create_lines_filter(f"LineFilter_{line}_{{hash}}",[line],)
+
+    fields = decay_descriptor[dd]
+
+    composite_tuple_variables = {
+        "Dstp"   : make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs, "composite", mass_constrain = ["D*_s+", "D_s+"]) +\
+             MVA_dst_variables("Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip", pvs) + make_DeltaM_variable(options), 
+        "DpDs"   : make_composite_variables_3body(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs, "composite", mass_constrain = ["D*_s+", "D_s+"], nparticles=3),
+        "gamma"  : make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs, "composite", mass_constrain = ["D*_s+", "D_s+"]),
+    }
+    basic_tuple_variables = { 
+        "Kminus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic",  mass_constrain = ["D*_s+", "D_s+"]),
+        "Kplus"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic",  mass_constrain = ["D*_s+", "D_s+"]),
+        "piplus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic",  mass_constrain = ["D*_s+", "D_s+"]),
+        "eplus"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic",  mass_constrain = ["D*_s+", "D_s+"])+ extra_brem_variables,
+        "eminus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic",  mass_constrain = ["D*_s+", "D_s+"])+ extra_brem_variables,
+    }
+
+    my_tuple = Funtuple(
+        name=f"Tuple_{line}_{dd}",
+        tuple_name="DecayTree",
+        fields=fields,
+        variables= {**composite_tuple_variables, **basic_tuple_variables},
+        event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data,
+        store_multiple_cand_info=True
+    )
+    return [ my_filter, my_tuple]
diff --git a/Charm_2024validation/options/hlt2/dst_to_dee.py b/Charm_2024validation/options/hlt2/dst_to_dee.py
new file mode 100644
index 0000000000..4fd67becd7
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/dst_to_dee.py
@@ -0,0 +1,9 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.dst_to_dee import all_lines as dst_to_dee_lines
+
+def make_lines():
+    mylines = [builder() for builder in dst_to_dee_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+
diff --git a/Charm_2024validation/options/hlt2/hlt2.py b/Charm_2024validation/options/hlt2/hlt2.py
new file mode 100644
index 0000000000..c1560ce952
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/hlt2.py
@@ -0,0 +1,32 @@
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_d0_to_hh.py b/Charm_2024validation/options/hlt2/hlt2_d0_to_hh.py
new file mode 100644
index 0000000000..7c3a67ed03
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/hlt2_d0_to_hh.py
@@ -0,0 +1,41 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d0_to_hh import all_lines as hh_lines
+
+def make_lines():
+    mylines = [builder() for builder in hh_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_d0_to_hhhh.py b/Charm_2024validation/options/hlt2/hlt2_d0_to_hhhh.py
new file mode 100644
index 0000000000..d7d5dcbb90
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/hlt2_d0_to_hhhh.py
@@ -0,0 +1,40 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d0_to_hhhh import all_lines as hhhh_lines
+
+def make_lines():
+    mylines = [builder() for builder in hhhh_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_d0_to_hhpi0.py b/Charm_2024validation/options/hlt2/hlt2_d0_to_hhpi0.py
new file mode 100644
index 0000000000..063eeb274a
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/hlt2_d0_to_hhpi0.py
@@ -0,0 +1,40 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d0_to_hhpi0 import all_lines as hhpi0_lines
+
+def make_lines():
+    mylines = [builder() for builder in hhpi0_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_d0_to_kshh.py b/Charm_2024validation/options/hlt2/hlt2_d0_to_kshh.py
new file mode 100644
index 0000000000..3e1996cdf0
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/hlt2_d0_to_kshh.py
@@ -0,0 +1,40 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d0_to_kshh import all_lines as kshh_lines
+
+def make_lines():
+    mylines = [builder() for builder in kshh_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_d0_to_ksks.py b/Charm_2024validation/options/hlt2/hlt2_d0_to_ksks.py
new file mode 100644
index 0000000000..e8d1052803
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/hlt2_d0_to_ksks.py
@@ -0,0 +1,40 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d0_to_ksks import all_lines as ksks_lines
+
+def make_lines():
+    mylines = [builder() for builder in ksks_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_d_to_hhh.py b/Charm_2024validation/options/hlt2/hlt2_d_to_hhh.py
new file mode 100644
index 0000000000..97965cb96e
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/hlt2_d_to_hhh.py
@@ -0,0 +1,42 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d_to_hhh import all_lines as hhh_lines
+from Hlt2Conf.lines.charm.detection_asymmetry_lines import all_lines as det_asy_lines
+
+def make_lines():
+    mylines = [builder() for builder in hhh_lines.values()]
+    mylines += [builder() for builder in det_asy_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_d_to_ksh.py b/Charm_2024validation/options/hlt2/hlt2_d_to_ksh.py
new file mode 100644
index 0000000000..d2593da6a9
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/hlt2_d_to_ksh.py
@@ -0,0 +1,42 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d_to_ksh import all_lines as ksh_lines
+from Hlt2Conf.lines.charm.detection_asymmetry_lines import all_lines as det_asy_lines
+
+def make_lines():
+    mylines = [builder() for builder in ksh_lines.values()]
+    mylines += [builder() for builder in det_asy_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_dst_to_dee.py b/Charm_2024validation/options/hlt2/hlt2_dst_to_dee.py
new file mode 100644
index 0000000000..d43ecbcd65
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/hlt2_dst_to_dee.py
@@ -0,0 +1,41 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.dst_to_dee import all_lines as dst_to_dee_lines
+
+def make_lines():
+    mylines = [builder() for builder in dst_to_dee_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_rare_charm.py b/Charm_2024validation/options/hlt2/hlt2_rare_charm.py
new file mode 100644
index 0000000000..cb9ac88a02
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/hlt2_rare_charm.py
@@ -0,0 +1,40 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.rare_charm_lines import all_lines as rare_charm_lines
+
+def make_lines():
+    mylines = [builder() for builder in rare_charm_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2noUT.py b/Charm_2024validation/options/hlt2/hlt2noUT.py
new file mode 100644
index 0000000000..473127434b
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/hlt2noUT.py
@@ -0,0 +1,32 @@
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf_without_UT
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf_without_UT),\
+         require_gec.bind(skipUT=True),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/options/hlt2/make_hlt2_decay.sh b/Charm_2024validation/options/hlt2/make_hlt2_decay.sh
new file mode 100644
index 0000000000..f127b86285
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/make_hlt2_decay.sh
@@ -0,0 +1,9 @@
+cat d0_to_hh.py hlt2.py > hlt2_d0_to_hh.py
+cat d0_to_hhpi0.py hlt2.py > hlt2_d0_to_hhpi0.py
+cat d0_to_hhhh.py hlt2.py > hlt2_d0_to_hhhh.py
+cat d0_to_kshh.py hlt2.py > hlt2_d0_to_kshh.py
+cat d0_to_ksks.py hlt2.py > hlt2_d0_to_ksks.py
+cat d_to_hhh.py hlt2.py > hlt2_d_to_hhh.py
+cat d_to_ksh.py hlt2.py > hlt2_d_to_ksh.py
+cat rare_charm.py hlt2.py > hlt2_rare_charm.py
+cat dst_to_dee.py hlt2.py > hlt2_dst_to_dee.py
diff --git a/Charm_2024validation/options/tupling.py b/Charm_2024validation/options/tupling.py
new file mode 100644
index 0000000000..99de572726
--- /dev/null
+++ b/Charm_2024validation/options/tupling.py
@@ -0,0 +1,986 @@
+##############################################################################
+# (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.                                       #
+###############################################################################
+"""Common configuration functions
+
+"""
+
+import Functors as F
+from Functors.math import log
+import Functors.math as fmath
+
+from FunTuple import FunctorCollection
+from FunTuple.functorcollections import (
+    MCHierarchy,
+    MCPromptDecay,
+    Kinematics,
+    SelectionInfo,
+    HltTisTos,
+    MCVertexInfo,
+    MCKinematics,
+    ParticleID, #wrong variables PID_PI = 0, PROBNN_D = nan
+    EventInfo,
+    LHCInfo,
+    ParticleIsolation,
+    MCPrimaries,
+    MCReconstructed,
+    MCReconstructible,
+)
+
+from DaVinciMCTools import MCTruthAndBkgCat, MCReconstructed, MCReconstructible
+from PyConf.Algorithms import ParticleToSubcombinationsAlg
+from DecayTreeFitter import DecayTreeFitter
+
+Hlt1_global_lines = [
+    "Hlt1GECPassthroughDecision",
+    "Hlt1BeamGasDecision",
+    "Hlt1PassthroughDecision",
+    "Hlt1NoBeamDecision",
+    "Hlt1BeamOneDecision",
+    "Hlt1BeamTwoDecision",
+    "Hlt1BothBeamsDecision",
+    "Hlt1ODINLumiDecision",
+    "Hlt1ODINVeloOpenDecision",
+    "Hlt1ODINNoBiasDecision",
+    "Hlt1VeloMicroBiasDecision",
+    "Hlt1RICH1AlignmentDecision",
+    "Hlt1RICH2AlignmentDecision",
+    "Hlt1BeamGasDecision",
+    "Hlt1L02PPiDecision",
+    "Hlt1LowMassNoipDielectron_massSlice1_promptDecision",
+    "Hlt1LowMassNoipDielectron_SS_massSlice1_promptDecision",
+    "Hlt1LowMassNoipDielectron_massSlice2_promptDecision",
+    "Hlt1LowMassNoipDielectron_SS_massSlice2_promptDecision",
+    "Hlt1LowMassNoipDielectron_massSlice3_promptDecision",
+    "Hlt1LowMassNoipDielectron_SS_massSlice3_promptDecision",
+    "Hlt1LowMassNoipDielectron_massSlice4_promptDecision",
+    "Hlt1LowMassNoipDielectron_SS_massSlice4_promptDecision",
+    "Hlt1LowMassNoipDielectron_massSlice1_displacedDecision",
+    "Hlt1LowMassNoipDielectron_SS_massSlice1_displacedDecision",
+    "Hlt1LowMassNoipDielectron_massSlice2_displacedDecision",
+    "Hlt1LowMassNoipDielectron_SS_massSlice2_displacedDecision",
+    "Hlt1LowMassNoipDielectron_massSlice3_displacedDecision",
+    "Hlt1LowMassNoipDielectron_SS_massSlice3_displacedDecision",
+    "Hlt1LowMassNoipDielectron_massSlice4_displacedDecision",
+    "Hlt1LowMassNoipDielectron_SS_massSlice4_displacedDecision",
+]
+Hlt1_1track_lines = [
+    "Hlt1TrackMVADecision",
+    "Hlt1LowPtMuonDecision",
+    "Hlt1SingleHighPtMuonDecision",
+    "Hlt1SingleHighPtMuonNoMuIDDecision",
+    "Hlt1TrackMuonMVADecision",
+    "Hlt1OneMuonTrackLineDecision",
+    "Hlt1TrackElectronMVADecision",
+    "Hlt1SingleHighPtElectronDecision",
+    "Hlt1SingleHighEtDecision",
+]
+Hlt1_lines = Hlt1_1track_lines+[
+    "Hlt1TwoTrackMVACharmXSecDecision",
+    "Hlt1TwoTrackMVADecision",
+    "Hlt1TwoTrackKsDecision",
+    "Hlt1D2KPiDecision",
+    "Hlt1D2KKDecision",
+    "Hlt1D2PiPiDecision",
+    "Hlt1KsToPiPiDecision",
+    "Hlt1LowPtDiMuonDecision",#removed
+    "Hlt1DiMuonNoIPDecision",
+    "Hlt1DiMuonNoIP_ssDecision",
+    "Hlt1DiMuonHighMassDecision",
+    "Hlt1DiMuonLowMassDecision",#replaced by Hlt1DiMuonDisplacedDecision
+    "Hlt1DiMuonSoftDecision",
+    "Hlt1DiMuonDisplacedDecision",
+    "Hlt1TwoKsDecision",
+    "Hlt1D2KPiAlignmentDecision",
+    "Hlt1DiMuonHighMassAlignmentDecision",
+    "Hlt1DisplacedDiMuonAlignmentDecision",
+    "Hlt1DisplacedDielectronDecision",
+    "Hlt1DisplacedLeptonsDecision",#removed
+]
+
+
+Hlt2_lines = [
+    "Hlt2Charm_DstpToD0Pip_D0ToKmPip_XSec",
+    "Hlt2Charm_D0ToKmPip_XSec",
+    "Hlt2Charm_D0ToKmKp",
+    "Hlt2Charm_D0ToKmPip",
+    "Hlt2Charm_D0ToPimPip",
+    "Hlt2Charm_DpDspToKsKp_DD",
+    "Hlt2Charm_DpDspToKsKp_LD",
+    "Hlt2Charm_DpDspToKsKp_LL",
+    "Hlt2Charm_DpDspToKsPip_DD",
+    "Hlt2Charm_DpDspToKsPip_LD",
+    "Hlt2Charm_DpDspToKsPip_LL",
+    "Hlt2Charm_DpToKmPipPip",
+    "Hlt2Charm_DspToKmKpPip",
+    "Hlt2Charm_DpToKmPipPip_NoCuts",
+    "Hlt2Charm_DspToKmKpPip_NoCuts",
+    "Hlt2Charm_DpToKmPipPip_XSec",
+    "Hlt2Charm_DspToKmKpPip_XSec",
+    "Hlt2Charm_DstpToD0Pip_D0ToKmKp",
+    "Hlt2Charm_DstpToD0Pip_D0ToKmPip",
+    "Hlt2Charm_DstpToD0Pip_D0ToKpPim",
+    "Hlt2Charm_DstpToD0Pip_D0ToPimPip",
+    "Hlt2Charm_DstpToD0Pip_D0ToKmPip_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKpPim_LowBias",
+    "Hlt2Charm_D0ToKmPip_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKmKp_LowBias",
+    "Hlt2Charm_D0ToKmKp_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToPimPip_LowBias",
+    "Hlt2Charm_D0ToPimPip_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLL",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLL_Tight",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLDD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLDD_Tight",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDDD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDDD_Tight",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULLL",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULLL_Tight",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULDD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULDD_Tight",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLD_Tight",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDLD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDLD_Tight",
+    "Hlt2Charm_D0ToKsPimPip_LL",
+    "Hlt2Charm_D0ToKsPimPip_DD",
+    "Hlt2Charm_D0ToKsPimPip_LL_LowBias",
+    "Hlt2Charm_D0ToKsPimPip_LL_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_LL",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_DD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_LL_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_DD_LowBias",
+    "Hlt2Charm_D0ToKsKmPip_LL",
+    "Hlt2Charm_D0ToKsKmPip_DD",
+    "Hlt2Charm_D0ToKsKmPip_LL_LowBias",
+    "Hlt2Charm_D0ToKsKmPip_LL_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_LL",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_DD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_LL_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_DD_LowBias",
+    "Hlt2Charm_D0ToKsKpPim_LL",
+    "Hlt2Charm_D0ToKsKpPim_DD",
+    "Hlt2Charm_D0ToKsKpPim_LL_LowBias",
+    "Hlt2Charm_D0ToKsKpPim_DD_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_LL",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_DD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_LL_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_DD_LowBias",
+    "Hlt2Charm_D0ToKsKmKp_LL",
+    "Hlt2Charm_D0ToKsKmKp_DD",
+    "Hlt2Charm_D0ToKsKmKp_LL_LowBias",
+    "Hlt2Charm_D0ToKsKmKp_DD_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_LL",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_DD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_LL_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_DD_LowBias",
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS',
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS',
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS_MVA',
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS_MVA',
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS',
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS',
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS_MVA',
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS_MVA',
+    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS',
+    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS',
+    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS_MVA',
+    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS_MVA',
+]
+
+def make_composite_variables(options, pvs, data, add_truth=True, add_Hlt1TisTos=True):
+    if not options.simulation:
+        add_truth = False
+    variables = (
+        FunctorCollection(
+            {
+                "MAXPT": F.MAX(F.PT),
+                "MINPT": F.MIN(F.PT),
+                "SUMPT": F.SUM(F.PT),
+                "MAXP": F.MAX(F.P),
+                "MINP": F.MIN(F.P),
+                "BPVDIRA": F.BPVDIRA(pvs),
+                "VCHI2DOF": F.CHI2DOF,
+                #"VNDOF": F.NDOF,
+                "BPVFDCHI2": F.BPVFDCHI2(pvs),
+                "BPVFD": F.BPVFD(pvs),
+                "BPVVDRHO": F.BPVVDRHO(pvs),
+                "BPVVDZ": F.BPVVDZ(pvs),
+                "BPVIPCHI2": F.BPVIPCHI2(pvs),
+                "BPVIP": F.BPVIP(pvs),
+                "LOGBPVIPCHI2": log(F.BPVIPCHI2(pvs)),
+                "BPVLTIME": F.BPVLTIME(pvs),
+                "MAXBPVIPCHI2": F.MAX(F.BPVIPCHI2(pvs)),
+                "MINBPVIPCHI2": F.MIN(F.BPVIPCHI2(pvs)),
+                "MAXBPVIP": F.MAX(F.BPVIP(pvs)),
+                "MINBPVIP": F.MIN(F.BPVIP(pvs)),
+                "MAXDOCACHI2": F.MAXDOCACHI2,
+                "MAXDOCA": F.MAXDOCA,
+                "MAXSDOCACHI2": F.MAXSDOCACHI2,
+                "MAXSDOCA": F.MAXSDOCA,
+                "ETA": F.ETA,
+                "PHI": F.PHI,
+                "END_VX": F.END_VX,
+                "END_VY": F.END_VY,
+                "END_VZ": F.END_VZ,
+                "END_VX_ERR":F.SQRT @ F.CALL(0,0) @ F.POS_COV_MATRIX @ F.ENDVERTEX,
+                "END_VY_ERR":F.SQRT @ F.CALL(1,1) @ F.POS_COV_MATRIX @ F.ENDVERTEX,
+                "END_VZ_ERR":F.SQRT @ F.CALL(2,2) @ F.POS_COV_MATRIX @ F.ENDVERTEX,
+                "BPVX": F.BPVX(pvs),
+                "BPVY": F.BPVY(pvs),
+                "BPVZ": F.BPVZ(pvs),
+                "BPVX_ERR": F.SQRT @ F.CALL(0,0) @ F.POS_COV_MATRIX @ F.BPV(pvs),
+                "BPVY_ERR": F.SQRT @ F.CALL(1,1) @ F.POS_COV_MATRIX @ F.BPV(pvs),
+                "BPVZ_ERR": F.SQRT @ F.CALL(2,2) @ F.POS_COV_MATRIX @ F.BPV(pvs),
+                "ALLPVFD"     : F.ALLPV_FD(pvs),
+                "ALLPVIP"     : F.ALLPV_IP(pvs),
+                "OBJECT_KEY": F.OBJECT_KEY,
+            }
+        )
+        + Kinematics()
+        #+ ParticleID(extra_info=True) #only for daughters
+    )
+
+    if add_Hlt1TisTos:
+        variables += HltTisTos(
+            selection_type="Hlt1", trigger_lines=Hlt1_lines, data=data
+        )
+
+    if add_truth:
+        variables = add_truth_matching_functors(
+            options,
+            variables,
+            data,
+            hierarchy=True,
+            kinematics=True,
+            vertex_info=True,
+            bkgcat=True,
+        )
+
+    return variables
+
+def make_tistoscombinations(options, pvs, data):
+    algo_output = ParticleToSubcombinationsAlg( Input=data )
+    relations = algo_output.OutputRelations
+
+    tistos_variables_extra = HltTisTos(
+        selection_type="Hlt1", trigger_lines=["Hlt1TwoTrackMVADecision"], data=algo_output.OutputParticles
+    )
+    tistos_combinations = {}
+    for k,v in tistos_variables_extra.get_thor_functors().items():
+        tistos_combinations[k + "_SUBCOMB" ] = F.MAP_INPUT_ARRAY( v, relations )
+    tistos_combinations = FunctorCollection( tistos_combinations )
+
+    return tistos_combinations
+
+def make_composite_variables_3body(options, pvs, data, add_truth=True):
+
+    variables = (
+        FunctorCollection(
+            {
+                #12
+                "M12": F.SUBCOMB(Functor=F.MASS, Indices=(1, 2)),
+                "SDOCA12"     : F.SDOCA(Child1=1,Child2=2),
+                "SDOCACHI212" : F.SDOCACHI2(Child1=1,Child2=2),
+                "DOCA12"      : F.DOCA(Child1=1,Child2=2),
+                "DOCACHI212"  : F.DOCACHI2(Child1=1,Child2=2),
+                "COS12": F.ALV(1, 2),
+                #"ETA12": F.SUBCOMB(Functor=F.ETA, Indices=(1, 2)),
+                #"PT12": F.SUBCOMB(Functor=F.PT, Indices=(1, 2)),
+                #"VCHI212": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(1, 2)),
+                #"END_VZ12": F.SUBCOMB(Functor=F.END_VZ, Indices=(1, 2)),
+                #"BPVZ12": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(1, 2)),
+                #"BPVCORRM12": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(1, 2)),
+                #13
+                "M13": F.SUBCOMB(Functor=F.MASS, Indices=(1, 3)),
+                "SDOCA13"     : F.SDOCA(Child1=1,Child2=3),
+                "SDOCACHI213" : F.SDOCACHI2(Child1=1,Child2=3),
+                "DOCA13"      : F.DOCA(Child1=1,Child2=3),
+                "DOCACHI213"  : F.DOCACHI2(Child1=1,Child2=3),
+                "COS13": F.ALV(1, 3),
+                #"ETA13": F.SUBCOMB(Functor=F.ETA, Indices=(1, 3)),
+                #"PT13": F.SUBCOMB(Functor=F.PT, Indices=(1, 3)),
+                #"VCHI213": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(1, 3)),
+                #"END_VZ13": F.SUBCOMB(Functor=F.END_VZ, Indices=(1, 3)),
+                #"BPVZ13": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(1, 3)),
+                #"BPVCORRM13": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(1, 3)),
+                #23
+                "M23": F.SUBCOMB(Functor=F.MASS, Indices=(2, 3)),
+                "SDOCA23"     : F.SDOCA(Child1=2,Child2=3),
+                "SDOCACHI223" : F.SDOCACHI2(Child1=2,Child2=3),
+                "DOCA23"      : F.DOCA(Child1=2,Child2=3),
+                "DOCACHI223"  : F.DOCACHI2(Child1=2,Child2=3),
+                "COS23": F.ALV(2, 3),
+                #"ETA23": F.SUBCOMB(Functor=F.ETA, Indices=(2, 3)),
+                #"PT23": F.SUBCOMB(Functor=F.PT, Indices=(2, 3)),
+                #"VCHI223": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(2, 3)),
+                #"END_VZ23": F.SUBCOMB(Functor=F.END_VZ, Indices=(2, 3)),
+                #"BPVZ23": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(2, 3)),
+                #"BPVCORRM23": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(2, 3)),
+            }
+        )
+    )
+    return make_composite_variables(options, pvs, data, add_truth)+make_tistoscombinations(options, pvs, data)+variables
+
+def make_composite_variables_4body(options, pvs, data, add_truth=True):
+
+    variables = (
+        FunctorCollection(
+            {
+                #14
+                "M14": F.SUBCOMB(Functor=F.MASS, Indices=(1, 4)),
+                "SDOCA14"     : F.SDOCA(Child1=1,Child2=4),
+                "SDOCACHI214" : F.SDOCACHI2(Child1=1,Child2=4),
+                "DOCA14"      : F.DOCA(Child1=1,Child2=4),
+                "DOCACHI214"  : F.DOCACHI2(Child1=1,Child2=4),
+                "COS14": F.ALV(1, 4),
+                #"ETA14": F.SUBCOMB(Functor=F.ETA, Indices=(1, 4)),
+                #"PT14": F.SUBCOMB(Functor=F.PT, Indices=(1, 4)),
+                #"VCHI214": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(1, 4)),
+                #"END_VZ14": F.SUBCOMB(Functor=F.END_VZ, Indices=(1, 4)),
+                #"BPVZ14": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(1, 4)),
+                #"BPVCORRM14": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(1, 4)),
+                #24
+                "M24": F.SUBCOMB(Functor=F.MASS, Indices=(2, 4)),
+                "SDOCA24"     : F.SDOCA(Child1=2,Child2=4),
+                "SDOCACHI224" : F.SDOCACHI2(Child1=2,Child2=4),
+                "DOCA24"      : F.DOCA(Child1=2,Child2=4),
+                "DOCACHI224"  : F.DOCACHI2(Child1=2,Child2=4),
+                "COS24": F.ALV(2, 4),
+                #"ETA24": F.SUBCOMB(Functor=F.ETA, Indices=(2, 4)),
+                #"PT24": F.SUBCOMB(Functor=F.PT, Indices=(2, 4)),
+                #"VCHI224": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(2, 4)),
+                #"END_VZ24": F.SUBCOMB(Functor=F.END_VZ, Indices=(2, 4)),
+                #"BPVZ24": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(2, 4)),
+                #"BPVCORRM24": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(2, 4)),
+                #34
+                "M34": F.SUBCOMB(Functor=F.MASS, Indices=(3, 4)),
+                "SDOCA34"     : F.SDOCA(Child1=3,Child2=4),
+                "SDOCACHI234" : F.SDOCACHI2(Child1=3,Child2=4),
+                "DOCA34"      : F.DOCA(Child1=3,Child2=4),
+                "DOCACHI234"  : F.DOCACHI2(Child1=3,Child2=4),
+                "COS34": F.ALV(3, 4),
+                #"ETA34": F.SUBCOMB(Functor=F.ETA, Indices=(3, 4)),
+                #"PT34": F.SUBCOMB(Functor=F.PT, Indices=(3, 4)),
+                #"VCHI234": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(3, 4)),
+                #"END_VZ34": F.SUBCOMB(Functor=F.END_VZ, Indices=(3, 4)),
+                #"BPVZ34": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(3, 4)),
+                #"BPVCORRM34": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(3, 4)),
+            }
+        )
+    )
+    return make_composite_variables_3body(options, pvs, data, add_truth)+variables #make_tistoscombinations already included
+
+def make_b_composite_variables(options, pvs, data, add_truth=True):
+    
+    # define helper functors
+    get_child = F.CHILD(1, F.FORWARDARG0) # change here the index of the child
+    get_SV =  F.ENDVERTEX @ F.FORWARDARG0
+    get_SV_pos = F.TOLINALG @ F.POSITION @ get_SV # only if composite (i.e. has vertex)
+    get_child_endvtx_pos = F.ENDVERTEX_POS  @ get_child
+    get_fdvec_child = get_child_endvtx_pos - get_SV_pos
+
+    # define observables
+    IP_wrt_SV = F.IP.bind(get_SV_pos , get_child)
+    IPCHI2_wrt_SV = F.IPCHI2.bind(get_SV , get_child) # only if child is composite (i.e. has vertex)
+    FD_wrt_SV = F.MAGNITUDE @ get_fdvec_child
+    FDCHI2_wrt_SV = F.VTX_FDCHI2.bind(get_SV, get_child)
+
+    
+    variables = FunctorCollection(
+        {       
+            "ID": F.PARTICLE_ID ,
+            "PT": F.PT,
+            "P": F.P,
+            "MASS": F.MASS,
+            "CHILD1_IPwrtSV": IP_wrt_SV,
+            "CHILD1_IPCHI2wrtSV": IPCHI2_wrt_SV,
+            "CHILD1_FDwrtSV": FD_wrt_SV,
+            "CHILD1_FDCHI2wrtSV": FDCHI2_wrt_SV,
+            "PX": F.PX,
+            "PY": F.PY,
+            "PZ": F.PZ,
+            "END_VCHI2DOF": F.CHI2DOF @ F.ENDVERTEX,
+            "BPVCHI2DOF": F.CHI2DOF @ F.BPV(pvs),
+            # B2OC generic B hadron NN Hlt2 algorithm,
+            # not planning to use it directly for B2OC EM
+            "MVA": F.MVA(
+                MVAType="SigmaNet",
+                Config={
+                    "File":
+                    "paramfile://data/Hlt2B2OC_B_SigmaNet_Run3-v1.json",
+                    "Name":
+                    "B2OC_SigmaNet_Generic",
+                    "Lambda":
+                    "2.0",
+                    "NLayers":
+                    "3",
+                    "InputSize":
+                    "6",
+                    "Monotone_Constraints":
+                    "[1,-1,-1,-1,-1,-1]",
+                    "Variables":
+                    "log_B_PT,B_ETA,log_B_DIRA,log_B_ENDVERTEX_CHI2,log_B_IPCHI2_OWNPV,log_B_IP_OWNPV",
+                },
+                Inputs={
+                    "log_B_PT": fmath.log(F.PT),
+                    "B_ETA": F.ETA,
+                    "log_B_DIRA": fmath.log(1. - F.BPVDIRA(pvs)),
+                    "log_B_ENDVERTEX_CHI2": fmath.log(F.CHI2DOF),
+                    "log_B_IPCHI2_OWNPV": fmath.log(F.BPVIPCHI2(pvs)),
+                    "log_B_IP_OWNPV": fmath.log(F.BPVIP(pvs)),
+                }),
+            #'SSPionBDT_Mistag': F.SSPionBDT_Mistag(sspionTagging.OutputFlavourTags),
+            #'SSPionBDT_Decision': F.SSPionBDT_Decision(sspionTagging.OutputFlavourTags),
+
+        }
+    )
+    return make_composite_variables(options, pvs, data, add_truth)+make_tistoscombinations(options, pvs, data)+variables
+
+def make_DeltaM_variable(options):
+    return FunctorCollection({"DM": F.MASS - F.CHILD(1, F.MASS)})
+
+def make_basic_variables(options, pvs, data, add_truth=True, islong = True):
+    if not options.simulation:
+        add_truth = False
+    variables = (
+        FunctorCollection(
+            {
+                "TRCHI2DOF": F.CHI2DOF @ F.TRACK,
+                "ETA": F.ETA,
+                "PHI": F.PHI,
+                "TRGHOSTPROB": F.GHOSTPROB,
+                "BPVIPCHI2": F.BPVIPCHI2(pvs),
+                "BPVIP": F.BPVIP(pvs),
+                "BPVX": F.BPVX(pvs),
+                "BPVY": F.BPVY(pvs),
+                "BPVZ": F.BPVZ(pvs),
+                "TX"          : F.TX,
+                "TY"          : F.TY,
+                "MINIPCHI2"   : F.MINIPCHI2(pvs),
+                "MINIP"       : F.MINIP(pvs),
+                "KEY"         : F.VALUE_OR(-1) @ F.OBJECT_KEY @ F.TRACK,
+                "ISMUON"      : F.ISMUON,
+                "TRACKPT": F.TRACK_PT,
+                "TRACKHISTORY": F.VALUE_OR(-1) @ F.TRACKHISTORY @ F.TRACK,
+                "QOVERP": F.QOVERP @ F.TRACK,
+                "NDOF": F.VALUE_OR(-1) @ F.NDOF @ F.TRACK,
+                "NFTHITS": F.VALUE_OR(-1) @ F.NFTHITS @ F.TRACK,
+                "NHITS": F.VALUE_OR(-1) @ F.NHITS @ F.TRACK,
+                "NUTHITS": F.VALUE_OR(-1) @ F.NUTHITS @ F.TRACK,
+                "NVPHITS": F.VALUE_OR(-1) @ F.NVPHITS @ F.TRACK,
+                #"NMUONHITS": F.VALUE_OR(-1) @ F.NHITSMUONS @ F.TRACK, #https://gitlab.cern.ch/lhcb/Rec/-/merge_requests/3756
+                "TRACKHASVELO": F.VALUE_OR(-1) @ F.TRACKHASVELO @ F.TRACK,
+                "TRACKHASUT": F.VALUE_OR(-1) @ F.TRACKHASUT @ F.TRACK,
+                "OBJECT_KEY": F.OBJECT_KEY,
+                "HASBREM": F.HASBREM,
+                "BREMENERGY": F.BREMENERGY,
+                "BREMBENDCORR": F.BREMBENDCORR,
+            }
+        )
+        + Kinematics()
+        + ParticleID(extra_info=True)
+    )
+
+    if islong:
+        variables += FunctorCollection({"CTB": F.TRACK_POSVEC_CLOSESTTOBEAM})
+    
+    variables += HltTisTos(
+        selection_type="Hlt1", trigger_lines=Hlt1_1track_lines, data=data
+    )
+    
+    if add_truth:
+        variables = add_truth_matching_functors(
+            options,
+            variables,
+            data,
+            hierarchy=True,
+            kinematics=True,
+            vertex_info=True,
+            bkgcat=False,
+        )
+
+    return variables
+
+def make_hlt2_event_variables(options, pvs, rec_summary):
+    # define event level variables
+    evt_variables = EventInfo()
+    if not options.simulation:
+        evt_variables += LHCInfo() #FillNumber
+    evt_variables += SelectionInfo(selection_type="Hlt2", trigger_lines=Hlt2_lines)
+    evt_variables += SelectionInfo(selection_type="Hlt1", trigger_lines=Hlt1_global_lines)
+    evt_variables += FunctorCollection(
+        {
+            "ALLPVX": F.ALLPVX(pvs),
+            "ALLPVY": F.ALLPVY(pvs),
+            "ALLPVZ": F.ALLPVZ(pvs),
+            "ALLPVNDOF": F.MAP(F.VALUE_OR(F.NaN) @ F.NDOF) @ F.TES(pvs),
+            "ALLPVCHI2": F.MAP(F.VALUE_OR(F.NaN) @ F.CHI2) @ F.TES(pvs),
+            "nPVs": F.SIZE(pvs),
+            "nTracks": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nTracks"),
+            "nLongTracks": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nLongTracks"),
+            "nMuonTracks": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nMuonTracks"),
+            "nFTClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nFTClusters"),
+            "nVPClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nVPClusters"),
+            "nUTClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nUTClusters"),
+            "nSPDhits": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nSPDhits"),
+            "nEcalClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nEcalClusters"),
+            "nEcalClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nEcalClusters"),
+            "eCalTot": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "eCalTot"),
+            "hCalTot": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "hCalTot"),
+            "nRich1Hits": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nRich1Hits"),
+            "nRich2Hits": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nRich2Hits"),
+        }
+    )
+    return evt_variables
+
+def add_truth_matching_functors(
+    options,
+    variables,
+    data,
+    hierarchy=True,
+    kinematics=True,
+    vertex_info=True,
+    bkgcat=False,
+    prompt_info=True,
+):
+    """Add MC truth matching functors to an existing FunctorCollection.
+
+    Args:
+        options (DaVinci.Options): DaVinci options object.
+        variables (FunctorCollection): FunctorCollection to modify
+        data: data handle
+        hierarchy (bool): Add MCHierarchy info (default True)
+        kinematics (bool): Add MCKinematics info (default True)
+        vertex_info (bool): Add MCVertexInfo (default True)
+        bkgcat (bool): Add TRUEKEY and BKGCAT functors - intended for composite particles (default False)
+        prompt_info (bool): Add MCPromptDecay info (default True)
+
+    Returns:
+        FunctorCollection: modified FunctorCollection with truth matched variables.
+    """
+    assert (
+        options.simulation
+    ), "options.simulation is set to False - it doesn't make sense to add truth matching."
+
+    MCTRUTH = MCTruthAndBkgCat(data)
+
+    if bkgcat:
+        variables += FunctorCollection(
+            {
+                # Important note: specify an invalid value for integer functors if there exists no truth info.
+                #                 The invalid value for floating point functors is set to nan.
+                "TRUEKEY": F.VALUE_OR(-1) @ MCTRUTH(F.OBJECT_KEY),
+                "BKGCAT": MCTRUTH.BkgCat,
+            }
+        )
+    if hierarchy:
+        variables += MCHierarchy(mctruth_alg=MCTRUTH)  # likely to change again!!
+    if vertex_info:
+        variables += MCVertexInfo(mctruth_alg=MCTRUTH)  # likely to change again!!
+    if kinematics:
+        variables += MCKinematics(mctruth_alg=MCTRUTH)  # likely to change again!!
+    if prompt_info:
+        variables += MCPromptDecay(mctruth_alg=MCTRUTH)
+
+    return variables
+
+### DTF variables ###
+
+def make_basic_dtf_variables(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name="", islong=True):
+    variables = (
+        FunctorCollection(
+            {
+                "TRCHI2DOF": F.CHI2DOF @ F.TRACK,
+                "ETA": F.ETA,
+                "PHI": F.PHI,
+                "TRGHOSTPROB": F.GHOSTPROB,
+                "BPVIPCHI2": F.BPVIPCHI2(pvs),
+                "BPVIP": F.BPVIP(pvs),
+                "BPVX": F.BPVX(pvs),
+                "BPVY": F.BPVY(pvs),
+                "BPVZ": F.BPVZ(pvs),
+                "TX"          : F.TX,
+                "TY"          : F.TY,
+                "MINIPCHI2"   : F.MINIPCHI2(pvs),
+                "MINIP"       : F.MINIP(pvs),
+                "KEY"         : F.VALUE_OR(-1) @ F.OBJECT_KEY @ F.TRACK,
+                "TRACKPT": F.TRACK_PT,
+                "TRACKHISTORY": F.VALUE_OR(-1) @ F.TRACKHISTORY @ F.TRACK,
+                "QOVERP": F.QOVERP @ F.TRACK,
+                "NDOF": F.VALUE_OR(-1) @ F.NDOF @ F.TRACK,
+            }
+        )
+        + Kinematics()
+    )
+
+    if islong:
+        variables += FunctorCollection({"CTB": F.TRACK_POSVEC_CLOSESTTOBEAM})
+    
+    if(mass_constraint):
+        if(pv_constraint): # MASS + PV
+            dtf_variables_mass_pv = FunctorCollection({
+                        'DTF_PV_M'+ particle_name + '_' + k: DTF(v)
+                        for k, v in variables.get_thor_functors().items()
+                    })
+            return dtf_variables_mass_pv
+        else: # MASS
+            dtf_variables_mass = FunctorCollection(
+                {'DTF_M'+ particle_name + '_' + k: DTF(v)
+                 for k, v in variables.get_thor_functors().items()})
+        return dtf_variables_mass
+
+    elif(pv_constraint): # PV
+        dtf_variables_pv = FunctorCollection({
+                'DTF_PV_' + k: DTF(v)
+                for k, v in variables.get_thor_functors().items()
+            })
+        return dtf_variables_pv
+
+    else: # NO MASS/PV
+        dtf_variables = FunctorCollection(
+            {'DTF_' + k: DTF(v)
+             for k, v in variables.get_thor_functors().items()})
+        return dtf_variables
+
+def make_composite_dtf_variables(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name=""):
+    variables = (
+        FunctorCollection(
+            {
+                "MAXPT": F.MAX(F.PT),
+                "MINPT": F.MIN(F.PT),
+                "SUMPT": F.SUM(F.PT),
+                "MAXP": F.MAX(F.P),
+                "MINP": F.MIN(F.P),
+                "BPVDIRA": F.BPVDIRA(pvs),
+                "VCHI2DOF": F.CHI2DOF, #CHI2VXNDOF
+                "BPVFDCHI2": F.BPVFDCHI2(pvs),
+                "BPVFD": F.BPVFD(pvs),
+                "BPVVDRHO": F.BPVVDRHO(pvs),
+                "BPVVDZ": F.BPVVDZ(pvs),
+                "BPVIPCHI2": F.BPVIPCHI2(pvs),
+                "BPVIP": F.BPVIP(pvs),
+                "LOGBPVIPCHI2": log(F.BPVIPCHI2(pvs)),
+                "BPVLTIME": F.BPVLTIME(pvs),
+                "MAXBPVIPCHI2": F.MAX(F.BPVIPCHI2(pvs)), #MAX_
+                "MINBPVIPCHI2": F.MIN(F.BPVIPCHI2(pvs)),
+                "MAXBPVIP": F.MAX(F.BPVIP(pvs)),
+                "MINBPVIP": F.MIN(F.BPVIP(pvs)),
+                "ETA": F.ETA,
+                "PHI": F.PHI,
+                "END_VX": F.END_VX, #END_
+                "END_VY": F.END_VY,
+                "END_VZ": F.END_VZ,
+                "BPVX": F.BPVX(pvs),
+                "BPVY": F.BPVY(pvs),
+                "BPVZ": F.BPVZ(pvs),
+                "ALLPVFD"     : F.ALLPV_FD(pvs),
+                "ALLPVIP"     : F.ALLPV_IP(pvs),
+                
+            }
+        )
+        + Kinematics()
+    )
+
+    addstring = "DTF"
+    if(pv_constraint):
+            addstring += '_PV'
+    if(mass_constraint):
+            addstring += '_M'
+    addstring += particle_name
+
+    DTF_chi2ndof = FunctorCollection(
+            {
+                addstring+"_DTFCHI2": DTF.CHI2,
+                addstring+"_DTFNDOF": DTF.NDOF,
+                addstring+"_CTAU": DTF.CTAU,
+                addstring+"_CTAUERR": DTF.CTAUERR,
+                addstring+"_MERR": DTF.MASSERR,
+            }
+    )
+
+    if(mass_constraint):
+        if(pv_constraint): # MASS + PV
+            dtf_variables_mass_pv = FunctorCollection({
+                        'DTF_PV_M'+ particle_name + '_' + k: DTF(v)
+                        for k, v in variables.get_thor_functors().items()
+                    })
+            return dtf_variables_mass_pv+DTF_chi2ndof
+        else: # MASS
+            dtf_variables_mass = FunctorCollection(
+                {'DTF_M'+ particle_name + '_' + k: DTF(v)
+                 for k, v in variables.get_thor_functors().items()})
+        return dtf_variables_mass+DTF_chi2ndof
+
+    elif(pv_constraint): # PV
+        dtf_variables_pv = FunctorCollection({
+                'DTF_PV_' + k: DTF(v)
+                for k, v in variables.get_thor_functors().items()
+            })
+        return dtf_variables_pv+DTF_chi2ndof
+
+    else: # NO MASS/PV
+        dtf_variables = FunctorCollection(
+            {'DTF_' + k: DTF(v)
+             for k, v in variables.get_thor_functors().items()})
+        return dtf_variables+DTF_chi2ndof
+
+def make_composite_dtf_variables_3body(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name=""):
+    variables = (
+        FunctorCollection(
+            {
+                "M13": F.SUBCOMB(Functor=F.MASS, Indices=(1, 3)),
+                "M23": F.SUBCOMB(Functor=F.MASS, Indices=(2, 3)),
+            }
+        )
+    )
+
+    if(mass_constraint):
+        if(pv_constraint): # MASS + PV
+            dtf_variables_mass_pv = FunctorCollection({
+                        'DTF_PV_M'+ particle_name + '_' + k: DTF(v)
+                        for k, v in variables.get_thor_functors().items()
+                    })
+            return dtf_variables_mass_pv+make_composite_dtf_variables(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
+        else: # MASS
+            dtf_variables_mass = FunctorCollection(
+                {'DTF_M'+ particle_name + '_' + k: DTF(v)
+                 for k, v in variables.get_thor_functors().items()})
+        return dtf_variables_mass+make_composite_dtf_variables(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
+
+    elif(pv_constraint): # PV
+        dtf_variables_pv = FunctorCollection({
+                'DTF_PV_' + k: DTF(v)
+                for k, v in variables.get_thor_functors().items()
+            })
+        return dtf_variables_pv+make_composite_dtf_variables(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
+
+    else: # NO MASS/PV
+        dtf_variables = FunctorCollection(
+            {'DTF_' + k: DTF(v)
+             for k, v in variables.get_thor_functors().items()})
+
+    return dtf_variables+make_composite_dtf_variables(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
+
+def make_composite_dtf_variables_4body(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name=""):
+    variables = (
+        FunctorCollection(
+            {
+                "M14": F.SUBCOMB(Functor=F.MASS, Indices=(1, 4)),
+                "M24": F.SUBCOMB(Functor=F.MASS, Indices=(2, 4)),
+                "M34": F.SUBCOMB(Functor=F.MASS, Indices=(3, 4)),
+            }
+        )
+    )
+
+    if(mass_constraint):
+        if(pv_constraint): # MASS + PV
+            dtf_variables_mass_pv = FunctorCollection({
+                        'DTF_PV_M'+ particle_name + '_' + k: DTF(v)
+                        for k, v in variables.get_thor_functors().items()
+                    })
+            return dtf_variables_mass_pv+make_composite_dtf_variables_3body(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
+        else: # MASS
+            dtf_variables_mass = FunctorCollection(
+                {'DTF_M'+ particle_name + '_' + k: DTF(v)
+                 for k, v in variables.get_thor_functors().items()})
+        return dtf_variables_mass+make_composite_dtf_variables_3body(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
+
+    elif(pv_constraint): # PV
+        dtf_variables_pv = FunctorCollection({
+                'DTF_PV_' + k: DTF(v)
+                for k, v in variables.get_thor_functors().items()
+            })
+        return dtf_variables_pv+make_composite_dtf_variables_3body(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
+
+    else: # NO MASS/PV
+        dtf_variables = FunctorCollection(
+            {'DTF_' + k: DTF(v)
+             for k, v in variables.get_thor_functors().items()})
+    
+        return dtf_variables+make_composite_dtf_variables_3body(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
+
+
+def make_MC_basic_variables():
+    MC_MOTHER_ID = lambda gen: F.VALUE_OR(0) @ F.MC_MOTHER(gen, F.PARTICLE_ID)
+    MC_MOTHER_KEY = lambda gen: F.VALUE_OR(-1) @ F.MC_MOTHER(gen, F.OBJECT_KEY)
+
+    variables = (
+        FunctorCollection(
+            {
+                "OBJECT_KEY": F.OBJECT_KEY,
+                "ETA": F.ETA,
+                "PHI": F.PHI,
+                "ORIGIN_VX": F.ORIGIN_VX,
+                "ORIGIN_VY": F.ORIGIN_VY,
+                "ORIGIN_VZ": F.ORIGIN_VZ,
+                "FOURMOMENTUM": F.FOURMOMENTUM,
+                "TRUEID": F.PARTICLE_ID,
+                "MC_MOTHER_ID": MC_MOTHER_ID(1),
+                "MC_MOTHER_KEY": MC_MOTHER_KEY(1),
+                "MC_GD_MOTHER_ID": MC_MOTHER_ID(2),
+                "MC_GD_MOTHER_KEY": MC_MOTHER_KEY(2),
+                "MC_GD_GD_MOTHER_ID": MC_MOTHER_ID(3),
+                "MC_GD_GD_MOTHER_KEY": MC_MOTHER_KEY(3),
+            }
+        )
+        + Kinematics()
+    )
+
+
+    from PyConf.reading import get_mc_particles, get_pp2mcp_relations, get_mc_track_info
+    MC_data = get_mc_particles("/Event/HLT2/MC/Particles")
+    relations_charged = get_pp2mcp_relations("/Event/HLT2/Relations/ChargedPP2MCP")
+    relations_neutral = get_pp2mcp_relations("/Event/HLT2/Relations/NeutralPP2MCP")
+    mcreconstructed_all = MCReconstructed(
+        input_mcparticles=MC_data,
+        use_best_mcmatch=True,
+        relations_charged=relations_charged,
+        relations_neutral=relations_neutral,
+    )
+    mcreconstructible_all = MCReconstructible(
+        input_mctrackinfo=get_mc_track_info()
+    )
+    import FunTuple.functorcollections as FC
+    vars_reconstructed = FC.MCReconstructed(mcreconstructed_alg=mcreconstructed_all, extra_info=True)
+    vars_reconstructible = FC.MCReconstructible(mcreconstructible_alg=mcreconstructible_all, extra_info=True)
+
+
+    return variables+vars_reconstructed+vars_reconstructible
+
+def make_MC_composite_variables():
+    MC_MOTHER_ID = lambda gen: F.VALUE_OR(0) @ F.MC_MOTHER(gen, F.PARTICLE_ID)
+    MC_MOTHER_KEY = lambda gen: F.VALUE_OR(-1) @ F.MC_MOTHER(gen, F.OBJECT_KEY)
+
+    variables = (
+        FunctorCollection(
+            {
+                "END_VX": F.END_VX,
+                "END_VY": F.END_VY,
+                "END_VZ": F.END_VZ,
+                "LTIME": F.MC_LIFETIME,
+                "OBJECT_KEY": F.OBJECT_KEY,
+                "ETA": F.ETA,
+                "PHI": F.PHI,
+                "ORIGIN_VX": F.ORIGIN_VX,
+                "ORIGIN_VY": F.ORIGIN_VY,
+                "ORIGIN_VZ": F.ORIGIN_VZ,
+                "FOURMOMENTUM": F.FOURMOMENTUM,
+                "TRUEID": F.PARTICLE_ID,
+                "MC_MOTHER_ID": MC_MOTHER_ID(1),
+                "MC_MOTHER_KEY": MC_MOTHER_KEY(1),
+                "MC_GD_MOTHER_ID": MC_MOTHER_ID(2),
+                "MC_GD_MOTHER_KEY": MC_MOTHER_KEY(2),
+                "MC_GD_GD_MOTHER_ID": MC_MOTHER_ID(3),
+                "MC_GD_GD_MOTHER_KEY": MC_MOTHER_KEY(3),
+            }
+        )
+        + Kinematics()
+        + MCPromptDecay()
+        )
+
+    return variables
+
+def make_MC_event_variables(mc_header):
+    # define event level variables
+    evt_variables = EventInfo()
+    evt_variables += MCPrimaries(mc_header=mc_header)
+
+    return evt_variables
+
+def make_top_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"]):
+    from PyConf.reading import get_particles
+    from IsolationTools import VertexAndConeIsolation
+
+    possible_charm_locations = ["LongTrackIso", "TTrackIso", "DownstreamTrackIso", "UpstreamTrackIso", "NeutralIso", "PizIso"]
+    coneangles = [0.25,0.5,1.,1.5,2.]
+
+    count = 0
+    for location in locations:
+        extra_particles = get_particles(f"/Event/HLT2/{hlt2_line}/{location}/Particles")
+
+        for coneangle in coneangles:
+            top_RTAlg = VertexAndConeIsolation(
+                name=location+"_"+str(coneangle),
+                reference_particles=input_data,
+                related_particles=extra_particles,
+                cut=F.DR2<coneangle)
+
+            if count == 0:
+                top_iso_variables = ParticleIsolation(isolation_alg=top_RTAlg,array_indx_name='indx')
+            else:
+                top_iso_variables += ParticleIsolation(isolation_alg=top_RTAlg,array_indx_name='indx')
+            count += 1
+
+
+    return top_iso_variables
+
+def make_basic_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"]):
+    from PyConf.reading import get_particles
+    from IsolationTools import VertexAndConeIsolation
+    from PyConf.Algorithms import ThOrParticleSelection
+
+    basic_code = (F.FILTER(F.ALL) @ F.GET_ALL_BASICS())
+    basic_particles = ThOrParticleSelection(InputParticles=input_data, Functor=basic_code).OutputSelection
+
+    possible_charm_locations = ["LongTrackIso", "TTrackIso", "DownstreamTrackIso", "UpstreamTrackIso", "NeutralIso", "PizIso"]
+    coneangles = [0.25,0.5,1.,1.5,2.]
+
+    count = 0
+    for location in locations:
+        extra_particles = get_particles(f"/Event/HLT2/{hlt2_line}/{location}/Particles")
+
+        for coneangle in coneangles:
+            basic_RTAlg = VertexAndConeIsolation(
+                name=location+"_"+str(coneangle),
+                reference_particles=basic_particles,
+                related_particles=extra_particles,
+                cut=F.DR2<coneangle)
+
+            if count == 0:
+                basic_iso_variables = ParticleIsolation(isolation_alg=basic_RTAlg,array_indx_name='indx')
+            else:
+                basic_iso_variables += ParticleIsolation(isolation_alg=basic_RTAlg,array_indx_name='indx')
+            count += 1
+
+
+    return basic_iso_variables
+
+
+def make_intermediate_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"], composite_ID = "J/psi(1S)"):
+    from PyConf.reading import get_particles
+    from IsolationTools import VertexAndConeIsolation
+    from PyConf.Algorithms import ThOrParticleSelection
+
+    intermediate_code = F.FILTER(F.IS_ABS_ID(composite_ID)) @ F.GET_ALL_DESCENDANTS()
+    intermediate_particles = ThOrParticleSelection(InputParticles=input_data, Functor=intermediate_code).OutputSelection
+
+    possible_charm_locations = ["LongTrackIso", "TTrackIso", "DownstreamTrackIso", "UpstreamTrackIso", "NeutralIso", "PizIso"]
+    coneangles = [0.25,0.5,1.,1.5,2.]
+
+    count = 0
+    for location in locations:
+        extra_particles = get_particles(f"/Event/HLT2/{hlt2_line}/{location}/Particles")
+
+        for coneangle in coneangles:
+            intermediate_RTAlg = VertexAndConeIsolation(
+                name=location+"_"+str(coneangle),
+                reference_particles=intermediate_particles,
+                related_particles=extra_particles,
+                cut=F.DR2<coneangle)
+
+            if count == 0:
+                intermediate_iso_variables = ParticleIsolation(isolation_alg=intermediate_RTAlg,array_indx_name='indx')
+            else:
+                intermediate_iso_variables += ParticleIsolation(isolation_alg=intermediate_RTAlg,array_indx_name='indx')
+            count += 1
+
+
+    return intermediate_iso_variables
diff --git a/Charm_2024validation/tmp.yaml b/Charm_2024validation/tmp.yaml
new file mode 100644
index 0000000000..c871485c24
--- /dev/null
+++ b/Charm_2024validation/tmp.yaml
@@ -0,0 +1,12 @@
+( '27186011', 'dst_to_dee', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27185021', 'dst_to_dee', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27184011', 'dst_to_dee', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27186011', 'dst_to_dee', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '27185021', 'dst_to_dee', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '27184011', 'dst_to_dee', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '27186011', 'dst_to_dee', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '27185021', 'dst_to_dee', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '27184011', 'dst_to_dee', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '27186011', 'dst_to_dee', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27185021', 'dst_to_dee', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27184011', 'dst_to_dee', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-- 
GitLab


From 112725846e007f0cb80b3b394a79f1320c1a95f2 Mon Sep 17 00:00:00 2001
From: Serena Maccolini <serena.maccolini@cern.ch>
Date: Mon, 15 Jul 2024 16:59:34 +0200
Subject: [PATCH 07/51] cleaning up

---
 Charm_2024validation/info.yaml                | 122 ---
 Charm_2024validation/info_MC_noUT.yaml        | 121 ---
 Charm_2024validation/info_data.yaml           |  53 -
 Charm_2024validation/info_data_noUT.yaml      |  50 -
 Charm_2024validation/main_d_to_hhh.py         |  63 --
 Charm_2024validation/options/d_to_hhh.py      | 503 ---------
 Charm_2024validation/options/d_to_hhh_MC.py   |  92 --
 Charm_2024validation/options/dst_to_dee.py    | 296 ------
 .../options/hlt2/dst_to_dee.py                |   9 -
 Charm_2024validation/options/hlt2/hlt2.py     |  32 -
 .../options/hlt2/hlt2_d0_to_hh.py             |  41 -
 .../options/hlt2/hlt2_d0_to_hhhh.py           |  40 -
 .../options/hlt2/hlt2_d0_to_hhpi0.py          |  40 -
 .../options/hlt2/hlt2_d0_to_kshh.py           |  40 -
 .../options/hlt2/hlt2_d0_to_ksks.py           |  40 -
 .../options/hlt2/hlt2_d_to_hhh.py             |  42 -
 .../options/hlt2/hlt2_d_to_ksh.py             |  42 -
 .../options/hlt2/hlt2_dst_to_dee.py           |  41 -
 .../options/hlt2/hlt2_rare_charm.py           |  40 -
 Charm_2024validation/options/hlt2/hlt2noUT.py |  32 -
 .../options/hlt2/make_hlt2_decay.sh           |   9 -
 Charm_2024validation/options/tupling.py       | 986 ------------------
 Charm_2024validation/tmp.yaml                 |  12 -
 23 files changed, 2746 deletions(-)
 delete mode 100644 Charm_2024validation/info.yaml
 delete mode 100644 Charm_2024validation/info_MC_noUT.yaml
 delete mode 100644 Charm_2024validation/info_data.yaml
 delete mode 100644 Charm_2024validation/info_data_noUT.yaml
 delete mode 100644 Charm_2024validation/main_d_to_hhh.py
 delete mode 100644 Charm_2024validation/options/d_to_hhh.py
 delete mode 100644 Charm_2024validation/options/d_to_hhh_MC.py
 delete mode 100644 Charm_2024validation/options/dst_to_dee.py
 delete mode 100644 Charm_2024validation/options/hlt2/dst_to_dee.py
 delete mode 100644 Charm_2024validation/options/hlt2/hlt2.py
 delete mode 100644 Charm_2024validation/options/hlt2/hlt2_d0_to_hh.py
 delete mode 100644 Charm_2024validation/options/hlt2/hlt2_d0_to_hhhh.py
 delete mode 100644 Charm_2024validation/options/hlt2/hlt2_d0_to_hhpi0.py
 delete mode 100644 Charm_2024validation/options/hlt2/hlt2_d0_to_kshh.py
 delete mode 100644 Charm_2024validation/options/hlt2/hlt2_d0_to_ksks.py
 delete mode 100644 Charm_2024validation/options/hlt2/hlt2_d_to_hhh.py
 delete mode 100644 Charm_2024validation/options/hlt2/hlt2_d_to_ksh.py
 delete mode 100644 Charm_2024validation/options/hlt2/hlt2_dst_to_dee.py
 delete mode 100644 Charm_2024validation/options/hlt2/hlt2_rare_charm.py
 delete mode 100644 Charm_2024validation/options/hlt2/hlt2noUT.py
 delete mode 100644 Charm_2024validation/options/hlt2/make_hlt2_decay.sh
 delete mode 100644 Charm_2024validation/options/tupling.py
 delete mode 100644 Charm_2024validation/tmp.yaml

diff --git a/Charm_2024validation/info.yaml b/Charm_2024validation/info.yaml
deleted file mode 100644
index 26de654976..0000000000
--- a/Charm_2024validation/info.yaml
+++ /dev/null
@@ -1,122 +0,0 @@
-defaults:
-  inform:
-    - serena.maccolini@cern.ch
-  wg: Charm
-
-{%- set conditions = [
-  "MagDown",
-]%}
-
-{%- set evttype_subsample_nutext_nu_dir1_dir2_dddb = [
-( '27163102', 'd0_to_hh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163101', 'd0_to_hh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163100', 'd0_to_hh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '23103042', 'd_to_hhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '23263022', 'd_to_hhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '21263012', 'd_to_hhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163471', 'd0_to_hhpi0', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27165903', 'd0_to_kshh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27165071', 'd0_to_hhhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27265008', 'd0_to_hhhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27265009', 'd0_to_hhhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27165072', 'd0_to_hhhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '23103111', 'd_to_ksh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '21103101', 'd_to_ksh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '23173003', 'rare_charm', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-
-( '27163102', 'd0_to_hh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163101', 'd0_to_hh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163100', 'd0_to_hh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '23103042', 'd_to_hhh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '23263022', 'd_to_hhh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '21263012', 'd_to_hhh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163471', 'd0_to_hhpi0', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '27165903', 'd0_to_kshh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '27165071', 'd0_to_hhhh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-
-( '27163102', 'd0_to_hh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163101', 'd0_to_hh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163100', 'd0_to_hh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '23103042', 'd_to_hhh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '23263022', 'd_to_hhh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '21263012', 'd_to_hhh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163471', 'd0_to_hhpi0', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '27165903', 'd0_to_kshh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '27165071', 'd0_to_hhhh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-
-( '27163102', 'd0_to_hh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163101', 'd0_to_hh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163100', 'd0_to_hh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '23103042', 'd_to_hhh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '23263022', 'd_to_hhh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '21263012', 'd_to_hhh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163471', 'd0_to_hhpi0', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27165903', 'd0_to_kshh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27165071', 'd0_to_hhhh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-
-]%}
-
-
-
-{%- for evttype, id, nutext, nu, dir1, dir2, dddb in evttype_subsample_nutext_nu_dir1_dir2_dddb %}
-
-{% for polarity in conditions %}
-
-{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1:
-  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
-  input:
-    bk_query: "/MC/{{dir1}}/Beam6800GeV-2024{{dir2}}-{{polarity}}-Nu{{nu}}-25ns-Pythia8/Sim10d/{{evttype}}/DIGI"
-    n_test_lfns: 3
-  output: HLT1.DST
-  options:
-    entrypoint: Charm_2024validation.options.hlt1:alg_config
-    extra_options:
-      input_raw_format: 0.5
-      conddb_tag: sim10-2024.Q1.2-v1.1-md100
-      dddb_tag: '{{dddb}}'
-      input_type: ROOT
-      output_type: ROOT
-      simulation: True
-      data_type: "Upgrade"
-      scheduler_legacy_mode: False
-      evt_max: 1000
-
-{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2:
-  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
-  input:
-    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1
-  output: HLT2.DST
-  options:
-    entrypoint: Charm_2024validation.options.hlt2.hlt2_{{id}}:alg_config
-    extra_options:
-      conddb_tag: sim10-2024.Q1.2-v1.1-md100
-      dddb_tag: '{{dddb}}'
-      input_raw_format: 0.5
-      input_type: "ROOT"
-      output_type: "ROOT"
-      simulation: True
-      data_type: "Upgrade"
-      output_manifest_file: "HLT2.tck.json"
-      scheduler_legacy_mode: False
-
-MC_{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}:
-  application: "DaVinci/v64r7@x86_64_v3-el9-gcc13+detdesc-opt+g"
-  input:
-    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2
-  output: DVTUPLE.ROOT
-  options:
-    entrypoint: Charm_2024validation.main_{{id}}:main
-    extra_options:
-      conddb_tag: sim10-2024.Q1.2-v1.1-md100
-      dddb_tag: '{{dddb}}'
-      input_raw_format: 0.5
-      input_type: ROOT
-      simulation: True
-      data_type: "Upgrade"
-      event_store: HiveWhiteBoard
-      input_process: "Hlt2"
-      input_manifest_file: "HLT2.tck.json"
-      write_decoding_keys_to_git: false
-      
-{%- endfor %}
-{%- endfor %}
diff --git a/Charm_2024validation/info_MC_noUT.yaml b/Charm_2024validation/info_MC_noUT.yaml
deleted file mode 100644
index 52df9e4e96..0000000000
--- a/Charm_2024validation/info_MC_noUT.yaml
+++ /dev/null
@@ -1,121 +0,0 @@
-defaults:
-  inform:
-    - serena.maccolini@cern.ch
-  wg: Charm
-
-{%- set conditions = [
-  "MagDown",
-]%}
-
-{%- set evttype_subsample_nutext_nu_dir1_dir2_dddb_geometry = [
-( '27163102', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163101', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163100', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23103042', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23263022', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '21263012', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163471', 'd0_to_hhpi0', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165903', 'd0_to_kshh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165071', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27265008', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27265009', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165072', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23103111', 'd_to_ksh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '21103101', 'd_to_ksh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23173003', 'rare_charm', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163102', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163101', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163100', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23103042', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23263022', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '21263012', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163471', 'd0_to_hhpi0', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165903', 'd0_to_kshh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165071', 'd0_to_hhhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163102', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163101', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163100', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23103042', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23263022', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '21263012', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163471', 'd0_to_hhpi0', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165903', 'd0_to_kshh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165071', 'd0_to_hhhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163102', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163101', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163100', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23103042', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23263022', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '21263012', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163471', 'd0_to_hhpi0', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165903', 'd0_to_kshh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165071', 'd0_to_hhhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165901', 'd0_to_ksks', '7p6', '7.6', 'Dev', '', 'dddb-20231017', 'run3/trunk'),
-]%}
-
-
-
-{%- for evttype, id, nutext, nu, dir1, dir2, dddb, geometry in evttype_subsample_nutext_nu_dir1_dir2_dddb_geometry %}
-
-{% for polarity in conditions %}
-
-{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1:
-  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
-  input:
-    bk_query: "/MC/{{dir1}}/Beam6800GeV-expected-2024{{dir2}}-{{polarity}}-Nu{{nu}}-25ns-Pythia8/Sim10c/{{evttype}}/DIGI"
-    n_test_lfns: 3
-  output: HLT1.DST
-  options:
-    entrypoint: Charm_2024validation.options.hlt1:alg_config
-    extra_options:
-      input_raw_format: 0.5
-      conddb_tag: sim-20231017-vc-md100
-      dddb_tag: '{{dddb}}'
-      input_type: ROOT
-      output_type: ROOT
-      simulation: True
-      data_type: "Upgrade"
-      scheduler_legacy_mode: False
-      geometry_version: "{{geometry}}"
-      evt_max: -1
-
-{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2:
-  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
-  input:
-    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1
-  output: HLT2.DST
-  options:
-    entrypoint: Charm_2024validation.options.hlt2.hlt2_{{id}}:alg_config
-    extra_options:
-      conddb_tag: sim-20231017-vc-md100
-      dddb_tag: '{{dddb}}'
-      input_raw_format: 0.5
-      input_type: "ROOT"
-      output_type: "ROOT"
-      simulation: True
-      data_type: "Upgrade"
-      output_manifest_file: "HLT2.tck.json"
-      scheduler_legacy_mode: False
-      geometry_version: "{{geometry}}"
-
-MC_{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}:
-  application: "DaVinci/v64r3@x86_64_v3-el9-gcc13+detdesc-opt+g"
-  input:
-    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2
-  output: DVTUPLE.ROOT
-  options:
-    entrypoint: Charm_2024validation.main_{{id}}:main
-    extra_options:
-      conddb_tag: sim-20231017-vc-md100
-      dddb_tag: '{{dddb}}'
-      input_raw_format: 0.5
-      input_type: ROOT
-      simulation: True
-      data_type: "Upgrade"
-      event_store: HiveWhiteBoard
-      geometry_version: "{{geometry}}"
-      input_process: "Hlt2"
-      input_manifest_file: "HLT2.tck.json"
-
-{%- endfor %}
-{%- endfor %}
diff --git a/Charm_2024validation/info_data.yaml b/Charm_2024validation/info_data.yaml
deleted file mode 100644
index cf3b7dcdf9..0000000000
--- a/Charm_2024validation/info_data.yaml
+++ /dev/null
@@ -1,53 +0,0 @@
-defaults:
-  inform:
-    - serena.maccolini@cern.ch
-  wg: Charm
-
-{%- set conditions = [
-  "MagDown",
-]%}
-
-
-
-{%- set subsamples = [
-  "d0_to_hh",
-  "d_to_hhh",
-  "d_to_ksh",
-  "d0_to_hhpi0",
-  "d0_to_kshh",
-  "d0_to_ksks",
-  "d0_to_hhhh",
-  "rare_charm",
-  "detection_asymmetry",
-  "dst_to_dee",
-]%}
-
-{% for id in subsamples %}
-{% for polarity in conditions %}
-
-{{id}}_2024_{{ polarity }}:
-  application: "DaVinci/v64r7"
-  input:
-    bk_query: "/LHCb/Collision24/Beam6800GeV-VeloClosed-{{polarity}}/Real Data/Sprucing24c2/94000000/CHARM.DST"
-
-    dq_flags:
-      - UNCHECKED
-      - OK
-    keep_running: true
-  output: DVTUPLE_{{id}}.ROOT
-  options:
-    entrypoint: Charm_2024validation.main_{{id}}:main
-    extra_options:
-      input_raw_format: 0.5
-      input_type: ROOT
-      simulation: False
-      data_type: "Upgrade"
-      event_store: HiveWhiteBoard
-      geometry_version: run3/2024.Q1.2-v00.00
-      conditions_version: master
-      input_process: "TurboPass"
-      input_stream: "charm"
-      evt_max: -1
-
-{%- endfor %}
-{%- endfor %}
diff --git a/Charm_2024validation/info_data_noUT.yaml b/Charm_2024validation/info_data_noUT.yaml
deleted file mode 100644
index 8c750c72d0..0000000000
--- a/Charm_2024validation/info_data_noUT.yaml
+++ /dev/null
@@ -1,50 +0,0 @@
-defaults:
-  inform:
-    - serena.maccolini@cern.ch
-  wg: Charm
-
-{%- set conditions = [
-  "MagDown",
-]%}
-
-
-
-{%- set subsamples = [
-  "d0_to_hh",
-  "d_to_hhh",
-  "d_to_ksh",
-  "d0_to_hhpi0",
-  "d0_to_kshh",
-  "d0_to_ksks",
-  "d0_to_hhhh",
-  "rare_charm",
-  "detection_asymmetry",
-]%}
-
-{% for id in subsamples %}
-{% for polarity in conditions %}
-
-{{id}}_2024_{{ polarity }}:
-  application: "DaVinci/v64r5"
-  input:
-    bk_query: "/LHCb/Collision24/Beam6800GeV-VeloClosed-{{polarity}}-Excl-UT/Real Data/Sprucing24c1/94000000/CHARM.DST"
-    dq_flags:
-      - UNCHECKED
-      - OK
-    keep_running: true
-  output: DVTUPLE_{{id}}.ROOT
-  options:
-    entrypoint: Charm_2024validation.main_{{id}}:main
-    extra_options:
-      input_raw_format: 0.5
-      input_type: ROOT
-      simulation: False
-      data_type: "Upgrade"
-      event_store: HiveWhiteBoard
-      geometry_version: run3/2024.Q1.2-v00.00
-      conditions_version: master
-      input_process: "TurboPass"
-      input_stream: "charm"
-
-{%- endfor %}
-{%- endfor %}
diff --git a/Charm_2024validation/main_d_to_hhh.py b/Charm_2024validation/main_d_to_hhh.py
deleted file mode 100644
index 516e32b119..0000000000
--- a/Charm_2024validation/main_d_to_hhh.py
+++ /dev/null
@@ -1,63 +0,0 @@
-###############################################################################
-# (c) Copyright 2021-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 .options.d_to_hhh import *
-from .options.d_to_hhh_MC import *
-from .options.detection_asymmetry import *
-
-from DaVinci import Options, make_config
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-        #D2hhh
-        "D2Kpipi" : maketuple_D2Kpipi(options, pvs, rec_summary),
-        "D2Kpipi_NoCuts" : maketuple_D2Kpipi(options, pvs, rec_summary,True),
-        #"D2Kpipi_Kpi" : maketuple_D2Kpipi_Kpi(options, pvs, rec_summary), #subcomb of 2 out of 3 daughters
-        "Ds2KKpi" : maketuple_Ds2KKpi(options, pvs, rec_summary),
-        "Ds2KKpi_NoCuts" : maketuple_Ds2KKpi(options, pvs, rec_summary,True),
-        "D2pipipi" : maketuple_D2pipipi(options, pvs, rec_summary),
-        "D2pipipi_NoCuts" : maketuple_D2pipipi(options, pvs, rec_summary,True),
-        "D2pipiK" : maketuple_D2pipiK(options, pvs, rec_summary),
-        "D2pipiK_NoCuts" : maketuple_D2pipiK(options, pvs, rec_summary,True),
-        "D2KKK" : maketuple_D2KKK(options, pvs, rec_summary),
-        "D2KKK_NoCuts" : maketuple_D2KKK(options, pvs, rec_summary,True),
-        "D2piKK" : maketuple_D2piKK(options, pvs, rec_summary),
-        "D2piKK_NoCuts" : maketuple_D2piKK(options, pvs, rec_summary,True),
-        "B02Dpi_D2KKpi" : maketuple_B02Dpi_D2KKpi(options, pvs, rec_summary),
-        "B02Dpi_D2pipipi" : maketuple_B02Dpi_D2pipipi(options, pvs, rec_summary),
-        "Bs02Dspi_Ds2KKpi" : maketuple_Bs02Dspi_Ds2KKpi(options, pvs, rec_summary),
-        "Bs02Dspi_Ds2pipipi" : maketuple_Bs02Dspi_Ds2pipipi(options, pvs, rec_summary),
-        #ADet
-        "D2Kpipi_ADet" : maketuple_D2Kpipi_ADet(options, pvs, rec_summary),
-        "D2pipipi_ADet" : maketuple_D2pipipi_ADet(options, pvs, rec_summary),
-        "Ds2KKpi_ADet" : maketuple_Ds2KKpi_ADet(options, pvs, rec_summary),
-
-
-    }
-
-    MCtuples = {
-        "MC_D2Kpipi" : maketuple_MC_D2Kpipi(options, pvs, rec_summary),
-        "MC_Ds2KKpi" : maketuple_MC_Ds2KKpi(options, pvs, rec_summary)
-        "MC_Ds2KKK" : maketuple_MC_Ds2KKK(options, pvs, rec_summary)
-    }
-
-    if options.simulation:
-        tuples = tuples | MCtuples
-
-    config = make_config(options, tuples)
-
-    return config
diff --git a/Charm_2024validation/options/d_to_hhh.py b/Charm_2024validation/options/d_to_hhh.py
deleted file mode 100644
index d10fa039f6..0000000000
--- a/Charm_2024validation/options/d_to_hhh.py
+++ /dev/null
@@ -1,503 +0,0 @@
-from .tupling import (
-    make_composite_variables_3body,
-    make_b_composite_variables,
-    make_composite_variables,
-    make_basic_variables,
-    make_hlt2_event_variables,
-    make_composite_dtf_variables_3body,
-    make_basic_dtf_variables,
-)
-
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunTuple_Particles as Funtuple
-
-
-def make_dtf_variables(options, pvs, input_data, ptype):
-
-    if ptype not in ["basic", "composite"]:
-        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
-
-    from DecayTreeFitter import DecayTreeFitter
-    
-    DTF = DecayTreeFitter(
-        name=f'DTF_{{hash}}',
-        input_particles=input_data)
-
-    DTFvtx = DecayTreeFitter(
-        name=f'DTFvtx_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    DTFmassDp = DecayTreeFitter(
-        name=f'DTFmassDp_{{hash}}',
-        input_particles=input_data,
-        mass_constraints=["D+"])
-
-    DTFvtxmassDp = DecayTreeFitter(
-        name=f'DTFvtxmassDp_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D+"])
-
-    DTFmassDsp = DecayTreeFitter(
-        name=f'DTFmassDsp_{{hash}}',
-        input_particles=input_data,
-        substitutions = ['D+{{D_s+}}'],
-        mass_constraints=["D_s+"])
-
-    DTFvtxmassDsp = DecayTreeFitter(
-        name=f'DTFvtxmassDsp_{{hash}}',
-        input_particles=input_data,
-        substitutions = ['D+{{D_s+}}',"KS0{{KS0}}"],#trick
-        mass_constraints=["D_s+"],
-        input_pvs=pvs,
-    )
-
-    if ptype == "basic":
-        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassDp,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="Dp")
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassDp,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="Dp")
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassDsp,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="Dsp")
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassDsp,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="Dsp")
-        return dtf_vars
-
-    if ptype == "composite":
-        dtf_vars = make_composite_dtf_variables_3body(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
-                                             DTF=DTFmassDp,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="Dp")
-        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
-                                             DTF=DTFvtxmassDp,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="Dp")
-        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
-                                             DTF=DTFmassDsp,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="Dsp")
-        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
-                                             DTF=DTFvtxmassDsp,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="Dsp")
-        return dtf_vars
-
-
-def maketuple_D2Kpipi(options, pvs, rec_summary, _NoCuts=False):
-    name = "D2Kpipi"
-    turbo_line = "Hlt2Charm_DpDspToKmPipPip"
-    if _NoCuts == True:
-        turbo_line += "_NoCuts"
-        name += "_NoCuts"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> K- pi+ pi+]CC",
-        "Km"   : "[D+ -> ^K- pi+ pi+]CC",
-        "pip1"  : "[D+ -> K- ^pi+ pi+]CC",
-        "pip2" : "[D+ -> K- pi+ ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2pipipi(options, pvs, rec_summary, _NoCuts=False):
-    name = "D2pipipi"
-    turbo_line = "Hlt2Charm_DpDspToPimPipPip"
-    if _NoCuts == True:
-        turbo_line += "_NoCuts"
-        name += "_NoCuts"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> pi- pi+ pi+]CC",
-        "pim"   : "[D+ -> ^pi- pi+ pi+]CC",
-        "pip1"  : "[D+ -> pi- ^pi+ pi+]CC",
-        "pip2" : "[D+ -> pi- pi+ ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Ds2KKpi(options, pvs, rec_summary, _NoCuts=False):
-    name = "Ds2KKpi"
-    turbo_line = "Hlt2Charm_DpDspToKmKpPip"
-    if _NoCuts == True:
-        turbo_line += "_NoCuts"
-        name += "_NoCuts"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> K- K+ pi+]CC",
-        "Km"   : "[D+ -> ^K- K+ pi+]CC",
-        "Kp"  : "[D+ -> K- ^K+ pi+]CC",
-        "pip" : "[D+ -> K- K+ ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-    
-    return [myfilter, mytuple]
-
-def maketuple_D2Kpipi_Kpi(options, pvs, rec_summary):
-    name = "D2Kpipi_Kpi"
-    turbo_line = "Hlt2Charm_DpDspToKmPipPip"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (KS0 -> K- pi+) pi+]CC",
-        "Kst" : "[D+ -> ^(KS0 -> K- pi+) pi+]CC",
-        "Km"   : "[D+ -> (KS0 -> ^K- pi+) pi+]CC",
-        "pip"  : "[D+ -> (KS0 -> K- ^pi+) pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data),
-        "Kst"   : make_composite_variables(options, pvs, input_data),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, use_loki_decay_finder=True)
-
-    return [myfilter, mytuple]
-
-
-
-
-    '''
-    from PyConf.Algorithms import ThOrParticleSelection
-    import Functors as F
-    FILTER_TREE = lambda id: F.FILTER(F.IS_ABS_ID(id)) @ F.GET_ALL_DESCENDANTS()
-    Km_data = ThOrParticleSelection(
-    InputParticles=input_data, Functor=FILTER_TREE("[K-]CC")
-).OutputSelection
-    pip_data = ThOrParticleSelection(
-        InputParticles=input_data, Functor=FILTER_TREE("[pi+]CC")
-).OutputSelection
-    
-    
-    from PyConf.Algorithms import ChargedBasicsProducer, UniqueIDGeneratorAlg
-    from PyConf.Algorithms import ThOrCombiner__2ChargedBasics, ThOrCombiner__2Particle
-    # make unique_id_generator
-    unique_id_gen = UniqueIDGeneratorAlg()
-    '''
-    '''
-    # produce charged basic particles
-    produce_kaons = ChargedBasicsProducer(
-        InputUniqueIDGenerator=unique_id_gen, ParticleID="kaon")
-    produce_pions = ChargedBasicsProducer(
-        InputUniqueIDGenerator=unique_id_gen, ParticleID="pion")
-    produce_jpsi = ThOrCombiner__2ChargedBasics(
-    '''
-    '''
-    produce_jpsi = ThOrCombiner__2Particle(
-        InputUniqueIDGenerator=unique_id_gen,
-        DecayDescriptor="[J/psi(1S) -> K- pi+]cc",
-        #Input1=produce_kaons.Particles,
-        #Input2=produce_pions.Particles,
-        Input1=Km_data,
-        Input2=pip_data,
-    )
-    input_data = produce_jpsi.Output
-
-    branches = {
-        "Jpsi" : "[J/psi(1S) -> K- pi+]CC",
-    }
-
-    from FunTuple import FunctorCollection
-    import Functors as F
-    variables = {
-        #"Dp"   : make_composite_variables(options, pvs, input_data, False, False),
-        #"Jpsi"   : make_composite_variables(options, pvs, input_data, False, False),
-        "Jpsi"   : FunctorCollection({
-            "PX": F.PX,
-            "PY": F.PY,
-            "PZ": F.PZ,
-            "BPVDIRA": F.BPVDIRA(pvs),
-            "VCHI2DOF": F.CHI2DOF, #CHI2VXNDOF
-            "BPVIPCHI2": F.BPVIPCHI2(pvs),
-            "BPVIP": F.BPVIP(pvs),
-        }),
-        
-    }
-
-    from FunTuple import FunTuple_Composites as Funtuple
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables, inputs=input_data, store_multiple_cand_info=True)
-    ## add event_variables
-
-    
-    return [myfilter, mytuple]
-    '''
-    '''
-    from PyConf.control_flow import CompositeNode, NodeLogic
-    from PyConf.Algorithms import PrintDecayTree, PrintHeader
-    from RecoConf.reconstruction_objects import upfront_reconstruction
-    from DaVinci.common_particles import make_std_loose_jpsi2mum
-    jpsis = make_std_loose_jpsi2mumu()
-    pdt = PrintDecayTree(name="PrintJpsis", Input=jpsis)
-    algs = upfront_reconstruction() + [jpsis, pdt]
-
-    node = CompositeNode(
-    "PrintJpsiNode", children=algs, combine_logic=NodeLogic.NONLAZY_AND
-)
-    return [node]
-    
-    '''
-
-
-def maketuple_D2pipiK(options, pvs, rec_summary, _NoCuts=False):
-    name = "D2pipiK"
-    turbo_line = "Hlt2Charm_DpDspToKpPimPip"
-    if _NoCuts == True:
-        turbo_line += "_NoCuts"
-        name += "_NoCuts"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> pi- pi+ K+]CC",
-        "p1"   : "[D+ -> ^pi- pi+ K+]CC",
-        "p2"  : "[D+ -> pi- ^pi+ K+]CC",
-        "p3" : "[D+ -> pi- pi+ ^K+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
-        "p1"     : make_basic_variables(options, pvs, input_data),
-        "p2"    : make_basic_variables(options, pvs, input_data),
-        "p3"   : make_basic_variables(options, pvs, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2KKK(options, pvs, rec_summary, _NoCuts=False):
-    name = "D2KKK"
-    turbo_line = "Hlt2Charm_DpDspToKmKpKp"
-    if _NoCuts == True:
-        turbo_line += "_NoCuts"
-        name += "_NoCuts"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> K- K+ K+]CC",
-        "p1"   : "[D+ -> ^K- K+ K+]CC",
-        "p2"  : "[D+ -> K- ^K+ K+]CC",
-        "p3" : "[D+ -> K- K+ ^K+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
-        "p1"     : make_basic_variables(options, pvs, input_data),
-        "p2"    : make_basic_variables(options, pvs, input_data),
-        "p3"   : make_basic_variables(options, pvs, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2piKK(options, pvs, rec_summary, _NoCuts=False):
-    name = "D2piKK"
-    turbo_line = "Hlt2Charm_DpDspToKpKpPim"
-    if _NoCuts == True:
-        turbo_line += "_NoCuts"
-        name += "_NoCuts"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> pi- K+ K+]CC",
-        "p1"   : "[D+ -> ^pi- K+ K+]CC",
-        "p2"  : "[D+ -> pi- ^K+ K+]CC",
-        "p3" : "[D+ -> pi- K+ ^K+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
-        "p1"     : make_basic_variables(options, pvs, input_data),
-        "p2"    : make_basic_variables(options, pvs, input_data),
-        "p3"   : make_basic_variables(options, pvs, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-
-def maketuple_B02Dpi_D2KKpi(options, pvs, rec_summary):
-    name = "B02Dpi_D2KKpi"
-    turbo_line = "Hlt2Charm_B0ToDmPip_DmToKmKpPim"
-    
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-    
-    branches = {
-        "B0" : "[[B0]CC -> (D- -> K- K+ pi-) pi+]CC",
-        "pip" : "[[B0]CC -> (D- -> K- K+ pi-) ^pi+]CC",
-        "Dm" : "[[B0]CC -> ^(D- -> K- K+ pi-) pi+]CC",
-        "p1" : "[[B0]CC -> (D- -> ^K- K+ pi-) pi+]CC",
-        "p2" : "[[B0]CC -> (D- -> K- ^K+ pi-) pi+]CC",
-        "p3" : "[[B0]CC -> (D- -> K- K+ ^pi-) pi+]CC",
-    }
-    
-    variables = {
-        "B0" : make_b_composite_variables(options, pvs, input_data),
-        "pip" : make_basic_variables(options, pvs,input_data),
-        "Dm"   : make_composite_variables_3body(options, pvs, input_data),
-        "p1"     : make_basic_variables(options, pvs, input_data),
-        "p2"    : make_basic_variables(options, pvs, input_data),
-        "p3"   : make_basic_variables(options, pvs, input_data),        
-    }
-    
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-
-def maketuple_B02Dpi_D2pipipi(options, pvs, rec_summary, _NoCuts=False):    
-    name = "B02Dpi_D2pipipi"
-    turbo_line = "Hlt2Charm_B0ToDmPip_DmToPimPimPip"
-    
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-    
-    branches = {
-        "B0" : "[[B0]CC -> (D- -> pi- pi- pi+) pi+]CC",
-        "pip" : "[[B0]CC -> (D- -> pi- pi- pi+) ^pi+]CC",
-        "Dm" : "[[B0]CC -> ^(D- -> pi- pi- pi+) pi+]CC",
-        "p1" : "[[B0]CC -> (D- -> ^pi- pi- pi+) pi+]CC",
-        "p2" : "[[B0]CC -> (D- -> pi- ^pi- pi+) pi+]CC",
-        "p3" : "[[B0]CC -> (D- -> pi- pi- ^pi+) pi+]CC",
-    }
-    
-    variables = {
-        "B0" : make_b_composite_variables(options, pvs, input_data),
-        "pip" : make_basic_variables(options, pvs,input_data),
-        "Dm"   : make_composite_variables_3body(options, pvs, input_data),
-        "p1"     : make_basic_variables(options, pvs, input_data),
-        "p2"    : make_basic_variables(options, pvs, input_data),
-        "p3"   : make_basic_variables(options, pvs, input_data),        
-    }
-    
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-    
-def maketuple_Bs02Dspi_Ds2KKpi(options, pvs, rec_summary, _NoCuts=False):    
-    name = "Bs02Dspi_Ds2KKpi"
-    turbo_line = "Hlt2Charm_Bs0ToDsmPip_DsmToKmKpPim"
-    
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-    
-    branches = {
-        "Bs0" : "[[B_s0]CC -> (D_s- -> K- K+ pi-) pi+]CC",
-        "pip" : "[[B_s0]CC -> (D_s- -> K- K+ pi-) ^pi+]CC",
-        "Dsm" : "[[B_s0]CC -> ^(D_s- -> K- K+ pi-) pi+]CC",
-        "p1" : "[[B_s0]CC -> (D_s- -> ^K- K+ pi-) pi+]CC",
-        "p2" : "[[B_s0]CC -> (D_s- -> K- ^K+ pi-) pi+]CC",
-        "p3" : "[[B_s0]CC -> (D_s- -> K- K+ ^pi-) pi+]CC",
-    }
-    
-    variables = {
-        "Bs0" : make_b_composite_variables(options, pvs, input_data),
-        "pip" : make_basic_variables(options, pvs,input_data),
-        "Dsm"   : make_composite_variables_3body(options, pvs, input_data),
-        "p1"     : make_basic_variables(options, pvs, input_data),
-        "p2"    : make_basic_variables(options, pvs, input_data),
-        "p3"   : make_basic_variables(options, pvs, input_data),        
-    }
-    
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-    
-def maketuple_Bs02Dspi_Ds2pipipi(options, pvs, rec_summary, _NoCuts=False):
-    name = "Bs02Dspi_Ds2pipipi"
-    turbo_line = "Hlt2Charm_Bs0ToDsmPip_DsmToPimPimPip"
-    
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-    
-    branches = {
-        "Bs0" : "[[B_s0]CC -> (D_s- -> pi- pi- pi+) pi+]CC",
-        "pip" : "[[B_s0]CC -> (D_s- -> pi- pi- pi+) ^pi+]CC",
-        "Dsm" : "[[B_s0]CC -> ^(D_s- -> pi- pi- pi+) pi+]CC",
-        "p1" : "[[B_s0]CC -> (D_s- -> ^pi- pi- pi+) pi+]CC",
-        "p2" : "[[B_s0]CC -> (D_s- -> pi- ^pi- pi+) pi+]CC",
-        "p3" : "[[B_s0]CC -> (D_s- -> pi- pi- ^pi+) pi+]CC",
-    }
-    
-    variables = {
-        "Bs0" : make_b_composite_variables(options, pvs, input_data),
-        "pip" : make_basic_variables(options, pvs,input_data),
-        "Dsm"   : make_composite_variables_3body(options, pvs, input_data),
-        "p1"     : make_basic_variables(options, pvs, input_data),
-        "p2"    : make_basic_variables(options, pvs, input_data),
-        "p3"   : make_basic_variables(options, pvs, input_data),        
-    }
-    
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
diff --git a/Charm_2024validation/options/d_to_hhh_MC.py b/Charm_2024validation/options/d_to_hhh_MC.py
deleted file mode 100644
index e666e5f3ce..0000000000
--- a/Charm_2024validation/options/d_to_hhh_MC.py
+++ /dev/null
@@ -1,92 +0,0 @@
-from .tupling import (
-    make_MC_composite_variables,
-    make_MC_basic_variables,
-    make_MC_event_variables,
-)
-
-from PyConf.reading import get_mc_particles, get_mc_header
-from FunTuple import FunTuple_MCParticles as FuntupleMC
-
-def maketuple_MC_D2Kpipi(options, pvs, rec_summary):
-    name = "MC_D2Kpipi"
-    line = "/Event/MC/Particles"
-
-    input_data = get_mc_particles(f"{line}")
-
-    branches = {
-        "Dp" : "[D+ ==> K- pi+ pi+]CC",
-        "Km"   : "[D+ ==> ^K- pi+ pi+]CC",
-        "pip1"  : "[D+ ==> K- ^pi+ pi+]CC",
-        "pip2" : "[D+ ==> K- pi+ ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_MC_composite_variables(),
-        "Km"     : make_MC_basic_variables(),
-        "pip1"    : make_MC_basic_variables(),
-        "pip2"   : make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                          tuple_name="MCDecayTree",
-                          fields=branches, variables = variables,
-                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
-                          inputs=input_data)
-
-    return [mytuple]
-
-def maketuple_MC_Ds2KKpi(options, pvs, rec_summary):
-    name = "MC_Ds2KKpi"
-    line = "/Event/MC/Particles"
-
-    input_data = get_mc_particles(f"{line}")
-
-    branches = {
-        "Dp" : "[D_s+ ==> K- K+ pi+]CC",
-        "Km"   : "[D_s+ ==> ^K- K+ pi+]CC",
-        "Kp"  : "[D_s+ ==> K- ^K+ pi+]CC",
-        "pip" : "[D_s+ ==> K- K+ ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_MC_composite_variables(),
-        "Km"     : make_MC_basic_variables(),
-        "Kp"    : make_MC_basic_variables(),
-        "pip"   : make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                          tuple_name="MCDecayTree",
-                          fields=branches, variables = variables,
-                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
-                          inputs=input_data)
-
-    return [mytuple]
-
-def maketuple_MC_Ds2KKK(options, pvs, rec_summary):
-    name = "MC_Ds2KKK"
-    line = "/Event/MC/Particles"
-
-    input_data = get_mc_particles(f"{line}")
-
-    branches = {
-        "Dp" : "[D_s+ ==> K- K+ K+]CC",
-        "Km"   : "[D_s+ ==> ^K- K+ K+]CC",
-        "Kp1"  : "[D_s+ ==> K- ^K+ K+]CC",
-        "Kp2" : "[D_s+ ==> K- K+ ^K+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_MC_composite_variables(),
-        "Km"     : make_MC_basic_variables(),
-        "Kp1"    : make_MC_basic_variables(),
-        "Kp2"   : make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                          tuple_name="MCDecayTree",
-                          fields=branches, variables = variables,
-                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
-                          inputs=input_data)
-
-    return [mytuple]
diff --git a/Charm_2024validation/options/dst_to_dee.py b/Charm_2024validation/options/dst_to_dee.py
deleted file mode 100644
index 11f42bae95..0000000000
--- a/Charm_2024validation/options/dst_to_dee.py
+++ /dev/null
@@ -1,296 +0,0 @@
-import Functors as F
-from Functors.math import log
-from DaVinci import Options, make_config
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunctorCollection
-from PyConf.reading import get_particles, get_pvs
-import FunTuple.functorcollections as FC
-from FunTuple import FunTuple_Particles as Funtuple
-from DecayTreeFitter import DecayTreeFitter
-from Hlt2Conf.lines.charm.dst_to_dee_makers import (dst_BDT_functor)
-from .tupling import (
-    make_DeltaM_variable,
-    make_basic_variables,
-    make_composite_variables,
-    make_composite_variables_3body,
-    make_composite_variables_4body,
-    make_hlt2_event_variables,
-    make_basic_dtf_variables,
-    make_composite_dtf_variables,
-    make_composite_dtf_variables_3body,
-    make_composite_dtf_variables_4body,
-    Hlt1_lines
-)
-extra_brem_variables= (FunctorCollection(
-            {
-                "BREMHYPODELTAX": F.BREMHYPODELTAX,
-                "BREMHYPOENERGY": F.BREMHYPOENERGY,
-                "BREMHYPOID": F.BREMHYPOID,
-                "BREMHYPOMATCH_CHI2": F.BREMHYPOMATCH_CHI2,
-                "BREMPIDE": F.BREMPIDE,
-                "INBREM": F.INBREM,
-                "MASS_WITH_BREM": F.MASS_WITH_BREM,
-                "PT_WITH_BREM": F.PT_WITH_BREM,
-                "P_WITH_BREM": F.P_WITH_BREM,
-                "ECALPIDE": F.ECALPIDE,
-                "HCALPIDE": F.HCALPIDE,
-                "ELECTRONSHOWEREOP": F.ELECTRONSHOWEREOP,
-                "CLUSTERMATCH_CHI2": F.CLUSTERMATCH_CHI2,
-                "ELECTRONMATCH_CHI2": F.ELECTRONMATCH_CHI2,
-                "ELECTRONENERGY": F.ELECTRONENERGY,
-                "ELECTRONID": F.ELECTRONID,
-                "HCALEOP": F.HCALEOP,
-                "CALO_NEUTRAL_SHOWER_SHAPE": F.CALO_NEUTRAL_SHOWER_SHAPE,
-                "RICH_DLL_E": F.VALUE_OR(F.NaN)@F.RICH_DLL_E,
-            })
-    )
-
-decay_descriptor = {
-    'dst_kpi_os' : {
-        "Dst0":   "[ D*(2007)0 ->  (D0 ->  K-  pi+)  (gamma ->  e+  e-)]CC",
-        "D0":     "[ D*(2007)0 -> ^(D0 ->  K-  pi+)  (gamma ->  e+  e-)]CC",
-        "Kminus": "[ D*(2007)0 ->  (D0 -> ^K-  pi+)  (gamma ->  e+  e-)]CC",
-        "piplus": "[ D*(2007)0 ->  (D0 ->  K- ^pi+)  (gamma ->  e+  e-)]CC",
-        "gamma":  "[ D*(2007)0 ->  (D0 ->  K-  pi+) ^(gamma ->  e+  e-)]CC",
-        "eplus":  "[ D*(2007)0 ->  (D0 ->  K-  pi+)  (gamma -> ^e+  e-)]CC",
-        "eminus": "[ D*(2007)0 ->  (D0 ->  K-  pi+)  (gamma ->  e+ ^e-)]CC",
-    },
-
-    'dst_kpi_ss' : {
-        "Dst0":   "[ D*(2007)0 ->  (D0 ->  K-  pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "D0":     "[ D*(2007)0 -> ^(D0 ->  K-  pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "Kminus": "[ D*(2007)0 ->  (D0 -> ^K-  pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "piplus": "[ D*(2007)0 ->  (D0 ->  K- ^pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "gamma":  "[ D*(2007)0 ->  (D0 ->  K-  pi+) ^([gamma ->  e+  e+]CC)]CC",
-        "eplus":  "[ D*(2007)0 ->  (D0 ->  K-  pi+)  ([gamma -> ^e+  e+]CC)]CC",
-        "eminus": "[ D*(2007)0 ->  (D0 ->  K-  pi+)  ([gamma ->  e+ ^e+]CC)]CC",
-    },
-
-    'dst_k3pi_os' :  {
-        "Dst0":    "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)  (gamma ->  e+  e-)]CC",
-        "D0":      "[ D*(2007)0 -> ^(D0 -> K- pi- pi+ pi+)  (gamma ->  e+  e-)]CC",
-        "Kminus":  "[ D*(2007)0 ->  (D0 -> ^K- pi- pi+ pi+) (gamma ->  e+  e-)]CC",
-        "piminus": "[ D*(2007)0 ->  (D0 -> K- ^pi- pi+ pi+) (gamma ->  e+  e-)]CC",
-        "piplus1": "[ D*(2007)0 ->  (D0 -> K- pi- ^pi+ pi+) (gamma ->  e+  e-)]CC",
-        "piplus2": "[ D*(2007)0 ->  (D0 -> K- pi- pi+ ^pi+) (gamma ->  e+  e-)]CC",
-        "gamma":   "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+) ^(gamma ->  e+  e-)]CC",
-        "eplus":   "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)  (gamma -> ^e+  e-)]CC",
-        "eminus":  "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)  (gamma ->  e+ ^e-)]CC",
-    },
-
-    'dst_k3pi_ss' :  {
-        "Dst0":    "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)   ([gamma ->  e+  e+]CC)]CC",
-        "D0":      "[ D*(2007)0 -> ^(D0 -> K- pi- pi+ pi+)   ([gamma ->  e+  e+]CC)]CC",
-        "Kminus":  "[ D*(2007)0 ->  (D0 -> ^K- pi- pi+ pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "piminus": "[ D*(2007)0 ->  (D0 -> K- ^pi- pi+ pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "piplus1": "[ D*(2007)0 ->  (D0 -> K- pi- ^pi+ pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "piplus2": "[ D*(2007)0 ->  (D0 -> K- pi- pi+ ^pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "gamma":   "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)  ^([gamma ->  e+  e+]CC)]CC",
-        "eplus":   "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)   ([gamma -> ^e+  e+]CC)]CC",
-        "eminus":  "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)   ([gamma ->  e+ ^e+]CC)]CC",
-    },
-
-    'dsstp_2kpi_os' : {
-        "Dstp":   "[ D*_s+ ->  (D_s+ -> K- K+ pi+)  (gamma ->  e+  e-)]CC",
-        "DpDs":   "[ D*_s+ -> ^(D_s+ -> K- K+ pi+)  (gamma ->  e+  e-)]CC",
-        "Kminus": "[ D*_s+ ->  (D_s+ -> ^K- K+ pi+) (gamma ->  e+  e-)]CC",
-        "Kplus":  "[ D*_s+ ->  (D_s+ -> K- ^K+ pi+) (gamma ->  e+  e-)]CC",
-        "piplus": "[ D*_s+ ->  (D_s+ -> K- K+ ^pi+) (gamma ->  e+  e-)]CC",
-        "gamma":  "[ D*_s+ ->  (D_s+ -> K- K+ pi+) ^(gamma ->  e+  e-)]CC",
-        "eplus":  "[ D*_s+ ->  (D_s+ -> K- K+ pi+)  (gamma -> ^e+  e-)]CC",
-        "eminus": "[ D*_s+ ->  (D_s+ -> K- K+ pi+)  (gamma ->  e+ ^e-)]CC",
-    },
-    'dsstp_2kpi_ss' : {
-        "Dstp":   "[ D*_s+ ->  (D_s+ -> K- K+ pi+)   ([gamma ->  e+  e+]CC)]CC",
-        "DpDs":   "[ D*_s+ -> ^(D_s+ -> K- K+ pi+)   ([gamma ->  e+  e+]CC)]CC",
-        "Kminus": "[ D*_s+ ->  (D_s+ -> ^K- K+ pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "Kplus":  "[ D*_s+ ->  (D_s+ -> K- ^K+ pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "piplus": "[ D*_s+ ->  (D_s+ -> K- K+ ^pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "gamma":  "[ D*_s+ ->  (D_s+ -> K- K+ pi+)  ^([gamma ->  e+  e+]CC)]CC",
-        "eplus":  "[ D*_s+ ->  (D_s+ -> K- K+ pi+)   ([gamma -> ^e+  e+]CC)]CC",
-        "eminus": "[ D*_s+ ->  (D_s+ -> K- K+ pi+)   ([gamma ->  e+ ^e+]CC)]CC",
-    },
-
-}
-
-def MVA_dst_variables(line, pvs):
-    return (FunctorCollection( { "MVA": dst_BDT_functor(pvs, line=line)}))
-#make_dtf_variables(options,  input_data, ptype):
-def make_dtf_variables(options, input_data,  pvs, ptype="basic",  mass_constrain = ["D*(2007)0", "D0" ], nparticles=2):
-    
-    DTF = DecayTreeFitter(
-        name="DTF_{hash}",
-        input_particles=input_data,
-    )
-
-    DTF_DMass_BestPV = DecayTreeFitter(
-        name="DTF_DMass_BestPV_{hash}",
-        input_particles=input_data,
-        mass_constraints=mass_constrain,
-        input_pvs=pvs,
-        fit_all_pvs=False,
-    )
-    DTF_Mass_BestPV = DecayTreeFitter(
-        name="DTF_Mass_BestPV_{hash}",
-        input_particles=input_data,
-        mass_constraints=[mass_constrain[1]],
-        input_pvs=pvs,
-        fit_all_pvs=False,
-    )
-
-    DTF_BestPV = DecayTreeFitter(
-        name="DTF_BestPV_{hash}",
-        input_particles=input_data,
-        #mass_constraints=["D*(2007)0", "D0" ],
-        input_pvs=pvs,
-        fit_all_pvs=False,
-    )
-
-    DTF_DMass = DecayTreeFitter(
-        name="DTF_DMass_{hash}",
-        input_particles=input_data,
-        mass_constraints=mass_constrain,
-        output_level=3,
-    )
-    DTF_Mass = DecayTreeFitter(
-        name="DTF_Mass_{hash}",
-        input_particles=input_data,
-        mass_constraints=[mass_constrain[1]],
-        output_level=3,
-    )
-    
-    if ptype == "basic":
-        dtf_variables =  make_basic_dtf_variables
-    elif ptype == "composite":
-        if nparticles == 2:
-            dtf_variables = make_composite_dtf_variables 
-        elif nparticles == 3:
-            dtf_variables = make_composite_dtf_variables_3body
-        elif nparticles == 4:
-            dtf_variables = make_composite_dtf_variables_4body 
-
-    dtf_vars = dtf_variables(options, pvs, input_data,
-                                        DTF=DTF,
-                                        pv_constraint=False,
-                                        mass_constraint=False)
-    dtf_vars += dtf_variables(options, pvs, input_data,
-                                        DTF=DTF_BestPV,
-                                        pv_constraint=True,
-                                        mass_constraint=False)
-    dtf_vars += dtf_variables(options, pvs, input_data,
-                                        DTF=DTF_Mass,
-                                        pv_constraint=False,
-                                        mass_constraint=True, particle_name="D")
-    dtf_vars += dtf_variables(options, pvs, input_data,
-                                        DTF=DTF_Mass_BestPV,
-                                        pv_constraint=True,
-                                        mass_constraint=True, particle_name="D")
-    dtf_vars += dtf_variables(options, pvs, input_data,
-                                        DTF=DTF_DMass,
-                                        pv_constraint=False,
-                                        mass_constraint=True, particle_name="DstD")
-    dtf_vars += dtf_variables(options, pvs, input_data,
-                                        DTF=DTF_DMass_BestPV,
-                                        pv_constraint=True,
-                                        mass_constraint=True, particle_name="DstD")
-
-    return dtf_vars
-
-
-def make_Dst0ToD0EmEp_D0ToKmPip_tuple(options, line, pvs , rec_summary, dd='dst_kpi_os'):
-
-    input_data=get_particles(f"/Event/HLT2/{line}/Particles")
-    my_filter = create_lines_filter(f"LineFilter_{line}_{{hash}}",[line],)
-
-    fields = decay_descriptor[dd]
-    
-    composite_tuple_variables = {
-        "Dst0"   :  make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs,  "composite") +\
-             MVA_dst_variables("Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip", pvs) + make_DeltaM_variable(options), 
-        "D0"     :  make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs,  "composite"),
-        "gamma"  :  make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs,  "composite")
-    }
-    basic_tuple_variables = { 
-        "Kminus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"),
-        "piplus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"),
-        "eplus"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic") + extra_brem_variables,
-        "eminus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic") + extra_brem_variables,
-    }
-
-    my_tuple = Funtuple(
-        name=f"Tuple_{line}_{dd}",
-        tuple_name="DecayTree",
-        fields=fields,
-        variables= {**composite_tuple_variables, **basic_tuple_variables},
-        event_variables=make_hlt2_event_variables(options, pvs, rec_summary), 
-        inputs=input_data,
-        store_multiple_cand_info=True
-    )
-    return [ my_filter, my_tuple]
-
-def make_Dst0ToD0EmEp_D0ToKmPimPipPip_tuple(options, line, pvs, rec_summary, dd='dst_k3pi_os'):
-
-    input_data=get_particles(f"/Event/HLT2/{line}/Particles")
-    my_filter = create_lines_filter(f"LineFilter_{line}_{{hash}}",[line],)
-
-    fields = decay_descriptor[dd]
-    
-    composite_tuple_variables = {
-        "Dst0"   : make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs, "composite") +\
-             MVA_dst_variables("Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip", pvs) + make_DeltaM_variable(options), 
-        "D0"     : make_composite_variables_4body(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs, "composite", nparticles=4),
-        "gamma"  : make_composite_variables(options, pvs, input_data) 
-    }
-    basic_tuple_variables = { 
-        "Kminus"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"),
-        "piminus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"),
-        "piplus1" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"),
-        "piplus2" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"), 
-        "eplus"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic") + extra_brem_variables,
-        "eminus"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic") + extra_brem_variables,
-    }
-
-    my_tuple = Funtuple(
-        name=f"Tuple_{line}_{dd}",
-        tuple_name="DecayTree",
-        fields=fields,
-        variables= {**composite_tuple_variables, **basic_tuple_variables},
-        event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data,
-        store_multiple_cand_info=True
-    )
-    return [ my_filter, my_tuple]
-
-
-def make_DstpToDpDspEmEp_DpDspToKmKpPip_tuple(options, line, pvs , rec_summary, dd='dsstp_2kpi_os'):
-
-    input_data=get_particles(f"/Event/HLT2/{line}/Particles")
-    my_filter = create_lines_filter(f"LineFilter_{line}_{{hash}}",[line],)
-
-    fields = decay_descriptor[dd]
-
-    composite_tuple_variables = {
-        "Dstp"   : make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs, "composite", mass_constrain = ["D*_s+", "D_s+"]) +\
-             MVA_dst_variables("Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip", pvs) + make_DeltaM_variable(options), 
-        "DpDs"   : make_composite_variables_3body(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs, "composite", mass_constrain = ["D*_s+", "D_s+"], nparticles=3),
-        "gamma"  : make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs, "composite", mass_constrain = ["D*_s+", "D_s+"]),
-    }
-    basic_tuple_variables = { 
-        "Kminus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic",  mass_constrain = ["D*_s+", "D_s+"]),
-        "Kplus"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic",  mass_constrain = ["D*_s+", "D_s+"]),
-        "piplus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic",  mass_constrain = ["D*_s+", "D_s+"]),
-        "eplus"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic",  mass_constrain = ["D*_s+", "D_s+"])+ extra_brem_variables,
-        "eminus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic",  mass_constrain = ["D*_s+", "D_s+"])+ extra_brem_variables,
-    }
-
-    my_tuple = Funtuple(
-        name=f"Tuple_{line}_{dd}",
-        tuple_name="DecayTree",
-        fields=fields,
-        variables= {**composite_tuple_variables, **basic_tuple_variables},
-        event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data,
-        store_multiple_cand_info=True
-    )
-    return [ my_filter, my_tuple]
diff --git a/Charm_2024validation/options/hlt2/dst_to_dee.py b/Charm_2024validation/options/hlt2/dst_to_dee.py
deleted file mode 100644
index 4fd67becd7..0000000000
--- a/Charm_2024validation/options/hlt2/dst_to_dee.py
+++ /dev/null
@@ -1,9 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.dst_to_dee import all_lines as dst_to_dee_lines
-
-def make_lines():
-    mylines = [builder() for builder in dst_to_dee_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-
diff --git a/Charm_2024validation/options/hlt2/hlt2.py b/Charm_2024validation/options/hlt2/hlt2.py
deleted file mode 100644
index c1560ce952..0000000000
--- a/Charm_2024validation/options/hlt2/hlt2.py
+++ /dev/null
@@ -1,32 +0,0 @@
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_d0_to_hh.py b/Charm_2024validation/options/hlt2/hlt2_d0_to_hh.py
deleted file mode 100644
index 7c3a67ed03..0000000000
--- a/Charm_2024validation/options/hlt2/hlt2_d0_to_hh.py
+++ /dev/null
@@ -1,41 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_hh import all_lines as hh_lines
-
-def make_lines():
-    mylines = [builder() for builder in hh_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_d0_to_hhhh.py b/Charm_2024validation/options/hlt2/hlt2_d0_to_hhhh.py
deleted file mode 100644
index d7d5dcbb90..0000000000
--- a/Charm_2024validation/options/hlt2/hlt2_d0_to_hhhh.py
+++ /dev/null
@@ -1,40 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_hhhh import all_lines as hhhh_lines
-
-def make_lines():
-    mylines = [builder() for builder in hhhh_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_d0_to_hhpi0.py b/Charm_2024validation/options/hlt2/hlt2_d0_to_hhpi0.py
deleted file mode 100644
index 063eeb274a..0000000000
--- a/Charm_2024validation/options/hlt2/hlt2_d0_to_hhpi0.py
+++ /dev/null
@@ -1,40 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_hhpi0 import all_lines as hhpi0_lines
-
-def make_lines():
-    mylines = [builder() for builder in hhpi0_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_d0_to_kshh.py b/Charm_2024validation/options/hlt2/hlt2_d0_to_kshh.py
deleted file mode 100644
index 3e1996cdf0..0000000000
--- a/Charm_2024validation/options/hlt2/hlt2_d0_to_kshh.py
+++ /dev/null
@@ -1,40 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_kshh import all_lines as kshh_lines
-
-def make_lines():
-    mylines = [builder() for builder in kshh_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_d0_to_ksks.py b/Charm_2024validation/options/hlt2/hlt2_d0_to_ksks.py
deleted file mode 100644
index e8d1052803..0000000000
--- a/Charm_2024validation/options/hlt2/hlt2_d0_to_ksks.py
+++ /dev/null
@@ -1,40 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_ksks import all_lines as ksks_lines
-
-def make_lines():
-    mylines = [builder() for builder in ksks_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_d_to_hhh.py b/Charm_2024validation/options/hlt2/hlt2_d_to_hhh.py
deleted file mode 100644
index 97965cb96e..0000000000
--- a/Charm_2024validation/options/hlt2/hlt2_d_to_hhh.py
+++ /dev/null
@@ -1,42 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d_to_hhh import all_lines as hhh_lines
-from Hlt2Conf.lines.charm.detection_asymmetry_lines import all_lines as det_asy_lines
-
-def make_lines():
-    mylines = [builder() for builder in hhh_lines.values()]
-    mylines += [builder() for builder in det_asy_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_d_to_ksh.py b/Charm_2024validation/options/hlt2/hlt2_d_to_ksh.py
deleted file mode 100644
index d2593da6a9..0000000000
--- a/Charm_2024validation/options/hlt2/hlt2_d_to_ksh.py
+++ /dev/null
@@ -1,42 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d_to_ksh import all_lines as ksh_lines
-from Hlt2Conf.lines.charm.detection_asymmetry_lines import all_lines as det_asy_lines
-
-def make_lines():
-    mylines = [builder() for builder in ksh_lines.values()]
-    mylines += [builder() for builder in det_asy_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_dst_to_dee.py b/Charm_2024validation/options/hlt2/hlt2_dst_to_dee.py
deleted file mode 100644
index d43ecbcd65..0000000000
--- a/Charm_2024validation/options/hlt2/hlt2_dst_to_dee.py
+++ /dev/null
@@ -1,41 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.dst_to_dee import all_lines as dst_to_dee_lines
-
-def make_lines():
-    mylines = [builder() for builder in dst_to_dee_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_rare_charm.py b/Charm_2024validation/options/hlt2/hlt2_rare_charm.py
deleted file mode 100644
index cb9ac88a02..0000000000
--- a/Charm_2024validation/options/hlt2/hlt2_rare_charm.py
+++ /dev/null
@@ -1,40 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.rare_charm_lines import all_lines as rare_charm_lines
-
-def make_lines():
-    mylines = [builder() for builder in rare_charm_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2noUT.py b/Charm_2024validation/options/hlt2/hlt2noUT.py
deleted file mode 100644
index 473127434b..0000000000
--- a/Charm_2024validation/options/hlt2/hlt2noUT.py
+++ /dev/null
@@ -1,32 +0,0 @@
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf_without_UT
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf_without_UT),\
-         require_gec.bind(skipUT=True),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/options/hlt2/make_hlt2_decay.sh b/Charm_2024validation/options/hlt2/make_hlt2_decay.sh
deleted file mode 100644
index f127b86285..0000000000
--- a/Charm_2024validation/options/hlt2/make_hlt2_decay.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-cat d0_to_hh.py hlt2.py > hlt2_d0_to_hh.py
-cat d0_to_hhpi0.py hlt2.py > hlt2_d0_to_hhpi0.py
-cat d0_to_hhhh.py hlt2.py > hlt2_d0_to_hhhh.py
-cat d0_to_kshh.py hlt2.py > hlt2_d0_to_kshh.py
-cat d0_to_ksks.py hlt2.py > hlt2_d0_to_ksks.py
-cat d_to_hhh.py hlt2.py > hlt2_d_to_hhh.py
-cat d_to_ksh.py hlt2.py > hlt2_d_to_ksh.py
-cat rare_charm.py hlt2.py > hlt2_rare_charm.py
-cat dst_to_dee.py hlt2.py > hlt2_dst_to_dee.py
diff --git a/Charm_2024validation/options/tupling.py b/Charm_2024validation/options/tupling.py
deleted file mode 100644
index 99de572726..0000000000
--- a/Charm_2024validation/options/tupling.py
+++ /dev/null
@@ -1,986 +0,0 @@
-##############################################################################
-# (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.                                       #
-###############################################################################
-"""Common configuration functions
-
-"""
-
-import Functors as F
-from Functors.math import log
-import Functors.math as fmath
-
-from FunTuple import FunctorCollection
-from FunTuple.functorcollections import (
-    MCHierarchy,
-    MCPromptDecay,
-    Kinematics,
-    SelectionInfo,
-    HltTisTos,
-    MCVertexInfo,
-    MCKinematics,
-    ParticleID, #wrong variables PID_PI = 0, PROBNN_D = nan
-    EventInfo,
-    LHCInfo,
-    ParticleIsolation,
-    MCPrimaries,
-    MCReconstructed,
-    MCReconstructible,
-)
-
-from DaVinciMCTools import MCTruthAndBkgCat, MCReconstructed, MCReconstructible
-from PyConf.Algorithms import ParticleToSubcombinationsAlg
-from DecayTreeFitter import DecayTreeFitter
-
-Hlt1_global_lines = [
-    "Hlt1GECPassthroughDecision",
-    "Hlt1BeamGasDecision",
-    "Hlt1PassthroughDecision",
-    "Hlt1NoBeamDecision",
-    "Hlt1BeamOneDecision",
-    "Hlt1BeamTwoDecision",
-    "Hlt1BothBeamsDecision",
-    "Hlt1ODINLumiDecision",
-    "Hlt1ODINVeloOpenDecision",
-    "Hlt1ODINNoBiasDecision",
-    "Hlt1VeloMicroBiasDecision",
-    "Hlt1RICH1AlignmentDecision",
-    "Hlt1RICH2AlignmentDecision",
-    "Hlt1BeamGasDecision",
-    "Hlt1L02PPiDecision",
-    "Hlt1LowMassNoipDielectron_massSlice1_promptDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice1_promptDecision",
-    "Hlt1LowMassNoipDielectron_massSlice2_promptDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice2_promptDecision",
-    "Hlt1LowMassNoipDielectron_massSlice3_promptDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice3_promptDecision",
-    "Hlt1LowMassNoipDielectron_massSlice4_promptDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice4_promptDecision",
-    "Hlt1LowMassNoipDielectron_massSlice1_displacedDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice1_displacedDecision",
-    "Hlt1LowMassNoipDielectron_massSlice2_displacedDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice2_displacedDecision",
-    "Hlt1LowMassNoipDielectron_massSlice3_displacedDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice3_displacedDecision",
-    "Hlt1LowMassNoipDielectron_massSlice4_displacedDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice4_displacedDecision",
-]
-Hlt1_1track_lines = [
-    "Hlt1TrackMVADecision",
-    "Hlt1LowPtMuonDecision",
-    "Hlt1SingleHighPtMuonDecision",
-    "Hlt1SingleHighPtMuonNoMuIDDecision",
-    "Hlt1TrackMuonMVADecision",
-    "Hlt1OneMuonTrackLineDecision",
-    "Hlt1TrackElectronMVADecision",
-    "Hlt1SingleHighPtElectronDecision",
-    "Hlt1SingleHighEtDecision",
-]
-Hlt1_lines = Hlt1_1track_lines+[
-    "Hlt1TwoTrackMVACharmXSecDecision",
-    "Hlt1TwoTrackMVADecision",
-    "Hlt1TwoTrackKsDecision",
-    "Hlt1D2KPiDecision",
-    "Hlt1D2KKDecision",
-    "Hlt1D2PiPiDecision",
-    "Hlt1KsToPiPiDecision",
-    "Hlt1LowPtDiMuonDecision",#removed
-    "Hlt1DiMuonNoIPDecision",
-    "Hlt1DiMuonNoIP_ssDecision",
-    "Hlt1DiMuonHighMassDecision",
-    "Hlt1DiMuonLowMassDecision",#replaced by Hlt1DiMuonDisplacedDecision
-    "Hlt1DiMuonSoftDecision",
-    "Hlt1DiMuonDisplacedDecision",
-    "Hlt1TwoKsDecision",
-    "Hlt1D2KPiAlignmentDecision",
-    "Hlt1DiMuonHighMassAlignmentDecision",
-    "Hlt1DisplacedDiMuonAlignmentDecision",
-    "Hlt1DisplacedDielectronDecision",
-    "Hlt1DisplacedLeptonsDecision",#removed
-]
-
-
-Hlt2_lines = [
-    "Hlt2Charm_DstpToD0Pip_D0ToKmPip_XSec",
-    "Hlt2Charm_D0ToKmPip_XSec",
-    "Hlt2Charm_D0ToKmKp",
-    "Hlt2Charm_D0ToKmPip",
-    "Hlt2Charm_D0ToPimPip",
-    "Hlt2Charm_DpDspToKsKp_DD",
-    "Hlt2Charm_DpDspToKsKp_LD",
-    "Hlt2Charm_DpDspToKsKp_LL",
-    "Hlt2Charm_DpDspToKsPip_DD",
-    "Hlt2Charm_DpDspToKsPip_LD",
-    "Hlt2Charm_DpDspToKsPip_LL",
-    "Hlt2Charm_DpToKmPipPip",
-    "Hlt2Charm_DspToKmKpPip",
-    "Hlt2Charm_DpToKmPipPip_NoCuts",
-    "Hlt2Charm_DspToKmKpPip_NoCuts",
-    "Hlt2Charm_DpToKmPipPip_XSec",
-    "Hlt2Charm_DspToKmKpPip_XSec",
-    "Hlt2Charm_DstpToD0Pip_D0ToKmKp",
-    "Hlt2Charm_DstpToD0Pip_D0ToKmPip",
-    "Hlt2Charm_DstpToD0Pip_D0ToKpPim",
-    "Hlt2Charm_DstpToD0Pip_D0ToPimPip",
-    "Hlt2Charm_DstpToD0Pip_D0ToKmPip_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKpPim_LowBias",
-    "Hlt2Charm_D0ToKmPip_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKmKp_LowBias",
-    "Hlt2Charm_D0ToKmKp_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToPimPip_LowBias",
-    "Hlt2Charm_D0ToPimPip_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLL",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLL_Tight",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLDD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLDD_Tight",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDDD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDDD_Tight",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULLL",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULLL_Tight",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULDD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULDD_Tight",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLD_Tight",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDLD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDLD_Tight",
-    "Hlt2Charm_D0ToKsPimPip_LL",
-    "Hlt2Charm_D0ToKsPimPip_DD",
-    "Hlt2Charm_D0ToKsPimPip_LL_LowBias",
-    "Hlt2Charm_D0ToKsPimPip_LL_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_LL",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_DD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_LL_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_DD_LowBias",
-    "Hlt2Charm_D0ToKsKmPip_LL",
-    "Hlt2Charm_D0ToKsKmPip_DD",
-    "Hlt2Charm_D0ToKsKmPip_LL_LowBias",
-    "Hlt2Charm_D0ToKsKmPip_LL_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_LL",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_DD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_LL_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_DD_LowBias",
-    "Hlt2Charm_D0ToKsKpPim_LL",
-    "Hlt2Charm_D0ToKsKpPim_DD",
-    "Hlt2Charm_D0ToKsKpPim_LL_LowBias",
-    "Hlt2Charm_D0ToKsKpPim_DD_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_LL",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_DD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_LL_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_DD_LowBias",
-    "Hlt2Charm_D0ToKsKmKp_LL",
-    "Hlt2Charm_D0ToKsKmKp_DD",
-    "Hlt2Charm_D0ToKsKmKp_LL_LowBias",
-    "Hlt2Charm_D0ToKsKmKp_DD_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_LL",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_DD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_LL_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_DD_LowBias",
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS',
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS',
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS_MVA',
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS_MVA',
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS',
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS',
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS_MVA',
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS_MVA',
-    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS',
-    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS',
-    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS_MVA',
-    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS_MVA',
-]
-
-def make_composite_variables(options, pvs, data, add_truth=True, add_Hlt1TisTos=True):
-    if not options.simulation:
-        add_truth = False
-    variables = (
-        FunctorCollection(
-            {
-                "MAXPT": F.MAX(F.PT),
-                "MINPT": F.MIN(F.PT),
-                "SUMPT": F.SUM(F.PT),
-                "MAXP": F.MAX(F.P),
-                "MINP": F.MIN(F.P),
-                "BPVDIRA": F.BPVDIRA(pvs),
-                "VCHI2DOF": F.CHI2DOF,
-                #"VNDOF": F.NDOF,
-                "BPVFDCHI2": F.BPVFDCHI2(pvs),
-                "BPVFD": F.BPVFD(pvs),
-                "BPVVDRHO": F.BPVVDRHO(pvs),
-                "BPVVDZ": F.BPVVDZ(pvs),
-                "BPVIPCHI2": F.BPVIPCHI2(pvs),
-                "BPVIP": F.BPVIP(pvs),
-                "LOGBPVIPCHI2": log(F.BPVIPCHI2(pvs)),
-                "BPVLTIME": F.BPVLTIME(pvs),
-                "MAXBPVIPCHI2": F.MAX(F.BPVIPCHI2(pvs)),
-                "MINBPVIPCHI2": F.MIN(F.BPVIPCHI2(pvs)),
-                "MAXBPVIP": F.MAX(F.BPVIP(pvs)),
-                "MINBPVIP": F.MIN(F.BPVIP(pvs)),
-                "MAXDOCACHI2": F.MAXDOCACHI2,
-                "MAXDOCA": F.MAXDOCA,
-                "MAXSDOCACHI2": F.MAXSDOCACHI2,
-                "MAXSDOCA": F.MAXSDOCA,
-                "ETA": F.ETA,
-                "PHI": F.PHI,
-                "END_VX": F.END_VX,
-                "END_VY": F.END_VY,
-                "END_VZ": F.END_VZ,
-                "END_VX_ERR":F.SQRT @ F.CALL(0,0) @ F.POS_COV_MATRIX @ F.ENDVERTEX,
-                "END_VY_ERR":F.SQRT @ F.CALL(1,1) @ F.POS_COV_MATRIX @ F.ENDVERTEX,
-                "END_VZ_ERR":F.SQRT @ F.CALL(2,2) @ F.POS_COV_MATRIX @ F.ENDVERTEX,
-                "BPVX": F.BPVX(pvs),
-                "BPVY": F.BPVY(pvs),
-                "BPVZ": F.BPVZ(pvs),
-                "BPVX_ERR": F.SQRT @ F.CALL(0,0) @ F.POS_COV_MATRIX @ F.BPV(pvs),
-                "BPVY_ERR": F.SQRT @ F.CALL(1,1) @ F.POS_COV_MATRIX @ F.BPV(pvs),
-                "BPVZ_ERR": F.SQRT @ F.CALL(2,2) @ F.POS_COV_MATRIX @ F.BPV(pvs),
-                "ALLPVFD"     : F.ALLPV_FD(pvs),
-                "ALLPVIP"     : F.ALLPV_IP(pvs),
-                "OBJECT_KEY": F.OBJECT_KEY,
-            }
-        )
-        + Kinematics()
-        #+ ParticleID(extra_info=True) #only for daughters
-    )
-
-    if add_Hlt1TisTos:
-        variables += HltTisTos(
-            selection_type="Hlt1", trigger_lines=Hlt1_lines, data=data
-        )
-
-    if add_truth:
-        variables = add_truth_matching_functors(
-            options,
-            variables,
-            data,
-            hierarchy=True,
-            kinematics=True,
-            vertex_info=True,
-            bkgcat=True,
-        )
-
-    return variables
-
-def make_tistoscombinations(options, pvs, data):
-    algo_output = ParticleToSubcombinationsAlg( Input=data )
-    relations = algo_output.OutputRelations
-
-    tistos_variables_extra = HltTisTos(
-        selection_type="Hlt1", trigger_lines=["Hlt1TwoTrackMVADecision"], data=algo_output.OutputParticles
-    )
-    tistos_combinations = {}
-    for k,v in tistos_variables_extra.get_thor_functors().items():
-        tistos_combinations[k + "_SUBCOMB" ] = F.MAP_INPUT_ARRAY( v, relations )
-    tistos_combinations = FunctorCollection( tistos_combinations )
-
-    return tistos_combinations
-
-def make_composite_variables_3body(options, pvs, data, add_truth=True):
-
-    variables = (
-        FunctorCollection(
-            {
-                #12
-                "M12": F.SUBCOMB(Functor=F.MASS, Indices=(1, 2)),
-                "SDOCA12"     : F.SDOCA(Child1=1,Child2=2),
-                "SDOCACHI212" : F.SDOCACHI2(Child1=1,Child2=2),
-                "DOCA12"      : F.DOCA(Child1=1,Child2=2),
-                "DOCACHI212"  : F.DOCACHI2(Child1=1,Child2=2),
-                "COS12": F.ALV(1, 2),
-                #"ETA12": F.SUBCOMB(Functor=F.ETA, Indices=(1, 2)),
-                #"PT12": F.SUBCOMB(Functor=F.PT, Indices=(1, 2)),
-                #"VCHI212": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(1, 2)),
-                #"END_VZ12": F.SUBCOMB(Functor=F.END_VZ, Indices=(1, 2)),
-                #"BPVZ12": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(1, 2)),
-                #"BPVCORRM12": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(1, 2)),
-                #13
-                "M13": F.SUBCOMB(Functor=F.MASS, Indices=(1, 3)),
-                "SDOCA13"     : F.SDOCA(Child1=1,Child2=3),
-                "SDOCACHI213" : F.SDOCACHI2(Child1=1,Child2=3),
-                "DOCA13"      : F.DOCA(Child1=1,Child2=3),
-                "DOCACHI213"  : F.DOCACHI2(Child1=1,Child2=3),
-                "COS13": F.ALV(1, 3),
-                #"ETA13": F.SUBCOMB(Functor=F.ETA, Indices=(1, 3)),
-                #"PT13": F.SUBCOMB(Functor=F.PT, Indices=(1, 3)),
-                #"VCHI213": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(1, 3)),
-                #"END_VZ13": F.SUBCOMB(Functor=F.END_VZ, Indices=(1, 3)),
-                #"BPVZ13": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(1, 3)),
-                #"BPVCORRM13": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(1, 3)),
-                #23
-                "M23": F.SUBCOMB(Functor=F.MASS, Indices=(2, 3)),
-                "SDOCA23"     : F.SDOCA(Child1=2,Child2=3),
-                "SDOCACHI223" : F.SDOCACHI2(Child1=2,Child2=3),
-                "DOCA23"      : F.DOCA(Child1=2,Child2=3),
-                "DOCACHI223"  : F.DOCACHI2(Child1=2,Child2=3),
-                "COS23": F.ALV(2, 3),
-                #"ETA23": F.SUBCOMB(Functor=F.ETA, Indices=(2, 3)),
-                #"PT23": F.SUBCOMB(Functor=F.PT, Indices=(2, 3)),
-                #"VCHI223": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(2, 3)),
-                #"END_VZ23": F.SUBCOMB(Functor=F.END_VZ, Indices=(2, 3)),
-                #"BPVZ23": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(2, 3)),
-                #"BPVCORRM23": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(2, 3)),
-            }
-        )
-    )
-    return make_composite_variables(options, pvs, data, add_truth)+make_tistoscombinations(options, pvs, data)+variables
-
-def make_composite_variables_4body(options, pvs, data, add_truth=True):
-
-    variables = (
-        FunctorCollection(
-            {
-                #14
-                "M14": F.SUBCOMB(Functor=F.MASS, Indices=(1, 4)),
-                "SDOCA14"     : F.SDOCA(Child1=1,Child2=4),
-                "SDOCACHI214" : F.SDOCACHI2(Child1=1,Child2=4),
-                "DOCA14"      : F.DOCA(Child1=1,Child2=4),
-                "DOCACHI214"  : F.DOCACHI2(Child1=1,Child2=4),
-                "COS14": F.ALV(1, 4),
-                #"ETA14": F.SUBCOMB(Functor=F.ETA, Indices=(1, 4)),
-                #"PT14": F.SUBCOMB(Functor=F.PT, Indices=(1, 4)),
-                #"VCHI214": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(1, 4)),
-                #"END_VZ14": F.SUBCOMB(Functor=F.END_VZ, Indices=(1, 4)),
-                #"BPVZ14": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(1, 4)),
-                #"BPVCORRM14": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(1, 4)),
-                #24
-                "M24": F.SUBCOMB(Functor=F.MASS, Indices=(2, 4)),
-                "SDOCA24"     : F.SDOCA(Child1=2,Child2=4),
-                "SDOCACHI224" : F.SDOCACHI2(Child1=2,Child2=4),
-                "DOCA24"      : F.DOCA(Child1=2,Child2=4),
-                "DOCACHI224"  : F.DOCACHI2(Child1=2,Child2=4),
-                "COS24": F.ALV(2, 4),
-                #"ETA24": F.SUBCOMB(Functor=F.ETA, Indices=(2, 4)),
-                #"PT24": F.SUBCOMB(Functor=F.PT, Indices=(2, 4)),
-                #"VCHI224": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(2, 4)),
-                #"END_VZ24": F.SUBCOMB(Functor=F.END_VZ, Indices=(2, 4)),
-                #"BPVZ24": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(2, 4)),
-                #"BPVCORRM24": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(2, 4)),
-                #34
-                "M34": F.SUBCOMB(Functor=F.MASS, Indices=(3, 4)),
-                "SDOCA34"     : F.SDOCA(Child1=3,Child2=4),
-                "SDOCACHI234" : F.SDOCACHI2(Child1=3,Child2=4),
-                "DOCA34"      : F.DOCA(Child1=3,Child2=4),
-                "DOCACHI234"  : F.DOCACHI2(Child1=3,Child2=4),
-                "COS34": F.ALV(3, 4),
-                #"ETA34": F.SUBCOMB(Functor=F.ETA, Indices=(3, 4)),
-                #"PT34": F.SUBCOMB(Functor=F.PT, Indices=(3, 4)),
-                #"VCHI234": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(3, 4)),
-                #"END_VZ34": F.SUBCOMB(Functor=F.END_VZ, Indices=(3, 4)),
-                #"BPVZ34": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(3, 4)),
-                #"BPVCORRM34": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(3, 4)),
-            }
-        )
-    )
-    return make_composite_variables_3body(options, pvs, data, add_truth)+variables #make_tistoscombinations already included
-
-def make_b_composite_variables(options, pvs, data, add_truth=True):
-    
-    # define helper functors
-    get_child = F.CHILD(1, F.FORWARDARG0) # change here the index of the child
-    get_SV =  F.ENDVERTEX @ F.FORWARDARG0
-    get_SV_pos = F.TOLINALG @ F.POSITION @ get_SV # only if composite (i.e. has vertex)
-    get_child_endvtx_pos = F.ENDVERTEX_POS  @ get_child
-    get_fdvec_child = get_child_endvtx_pos - get_SV_pos
-
-    # define observables
-    IP_wrt_SV = F.IP.bind(get_SV_pos , get_child)
-    IPCHI2_wrt_SV = F.IPCHI2.bind(get_SV , get_child) # only if child is composite (i.e. has vertex)
-    FD_wrt_SV = F.MAGNITUDE @ get_fdvec_child
-    FDCHI2_wrt_SV = F.VTX_FDCHI2.bind(get_SV, get_child)
-
-    
-    variables = FunctorCollection(
-        {       
-            "ID": F.PARTICLE_ID ,
-            "PT": F.PT,
-            "P": F.P,
-            "MASS": F.MASS,
-            "CHILD1_IPwrtSV": IP_wrt_SV,
-            "CHILD1_IPCHI2wrtSV": IPCHI2_wrt_SV,
-            "CHILD1_FDwrtSV": FD_wrt_SV,
-            "CHILD1_FDCHI2wrtSV": FDCHI2_wrt_SV,
-            "PX": F.PX,
-            "PY": F.PY,
-            "PZ": F.PZ,
-            "END_VCHI2DOF": F.CHI2DOF @ F.ENDVERTEX,
-            "BPVCHI2DOF": F.CHI2DOF @ F.BPV(pvs),
-            # B2OC generic B hadron NN Hlt2 algorithm,
-            # not planning to use it directly for B2OC EM
-            "MVA": F.MVA(
-                MVAType="SigmaNet",
-                Config={
-                    "File":
-                    "paramfile://data/Hlt2B2OC_B_SigmaNet_Run3-v1.json",
-                    "Name":
-                    "B2OC_SigmaNet_Generic",
-                    "Lambda":
-                    "2.0",
-                    "NLayers":
-                    "3",
-                    "InputSize":
-                    "6",
-                    "Monotone_Constraints":
-                    "[1,-1,-1,-1,-1,-1]",
-                    "Variables":
-                    "log_B_PT,B_ETA,log_B_DIRA,log_B_ENDVERTEX_CHI2,log_B_IPCHI2_OWNPV,log_B_IP_OWNPV",
-                },
-                Inputs={
-                    "log_B_PT": fmath.log(F.PT),
-                    "B_ETA": F.ETA,
-                    "log_B_DIRA": fmath.log(1. - F.BPVDIRA(pvs)),
-                    "log_B_ENDVERTEX_CHI2": fmath.log(F.CHI2DOF),
-                    "log_B_IPCHI2_OWNPV": fmath.log(F.BPVIPCHI2(pvs)),
-                    "log_B_IP_OWNPV": fmath.log(F.BPVIP(pvs)),
-                }),
-            #'SSPionBDT_Mistag': F.SSPionBDT_Mistag(sspionTagging.OutputFlavourTags),
-            #'SSPionBDT_Decision': F.SSPionBDT_Decision(sspionTagging.OutputFlavourTags),
-
-        }
-    )
-    return make_composite_variables(options, pvs, data, add_truth)+make_tistoscombinations(options, pvs, data)+variables
-
-def make_DeltaM_variable(options):
-    return FunctorCollection({"DM": F.MASS - F.CHILD(1, F.MASS)})
-
-def make_basic_variables(options, pvs, data, add_truth=True, islong = True):
-    if not options.simulation:
-        add_truth = False
-    variables = (
-        FunctorCollection(
-            {
-                "TRCHI2DOF": F.CHI2DOF @ F.TRACK,
-                "ETA": F.ETA,
-                "PHI": F.PHI,
-                "TRGHOSTPROB": F.GHOSTPROB,
-                "BPVIPCHI2": F.BPVIPCHI2(pvs),
-                "BPVIP": F.BPVIP(pvs),
-                "BPVX": F.BPVX(pvs),
-                "BPVY": F.BPVY(pvs),
-                "BPVZ": F.BPVZ(pvs),
-                "TX"          : F.TX,
-                "TY"          : F.TY,
-                "MINIPCHI2"   : F.MINIPCHI2(pvs),
-                "MINIP"       : F.MINIP(pvs),
-                "KEY"         : F.VALUE_OR(-1) @ F.OBJECT_KEY @ F.TRACK,
-                "ISMUON"      : F.ISMUON,
-                "TRACKPT": F.TRACK_PT,
-                "TRACKHISTORY": F.VALUE_OR(-1) @ F.TRACKHISTORY @ F.TRACK,
-                "QOVERP": F.QOVERP @ F.TRACK,
-                "NDOF": F.VALUE_OR(-1) @ F.NDOF @ F.TRACK,
-                "NFTHITS": F.VALUE_OR(-1) @ F.NFTHITS @ F.TRACK,
-                "NHITS": F.VALUE_OR(-1) @ F.NHITS @ F.TRACK,
-                "NUTHITS": F.VALUE_OR(-1) @ F.NUTHITS @ F.TRACK,
-                "NVPHITS": F.VALUE_OR(-1) @ F.NVPHITS @ F.TRACK,
-                #"NMUONHITS": F.VALUE_OR(-1) @ F.NHITSMUONS @ F.TRACK, #https://gitlab.cern.ch/lhcb/Rec/-/merge_requests/3756
-                "TRACKHASVELO": F.VALUE_OR(-1) @ F.TRACKHASVELO @ F.TRACK,
-                "TRACKHASUT": F.VALUE_OR(-1) @ F.TRACKHASUT @ F.TRACK,
-                "OBJECT_KEY": F.OBJECT_KEY,
-                "HASBREM": F.HASBREM,
-                "BREMENERGY": F.BREMENERGY,
-                "BREMBENDCORR": F.BREMBENDCORR,
-            }
-        )
-        + Kinematics()
-        + ParticleID(extra_info=True)
-    )
-
-    if islong:
-        variables += FunctorCollection({"CTB": F.TRACK_POSVEC_CLOSESTTOBEAM})
-    
-    variables += HltTisTos(
-        selection_type="Hlt1", trigger_lines=Hlt1_1track_lines, data=data
-    )
-    
-    if add_truth:
-        variables = add_truth_matching_functors(
-            options,
-            variables,
-            data,
-            hierarchy=True,
-            kinematics=True,
-            vertex_info=True,
-            bkgcat=False,
-        )
-
-    return variables
-
-def make_hlt2_event_variables(options, pvs, rec_summary):
-    # define event level variables
-    evt_variables = EventInfo()
-    if not options.simulation:
-        evt_variables += LHCInfo() #FillNumber
-    evt_variables += SelectionInfo(selection_type="Hlt2", trigger_lines=Hlt2_lines)
-    evt_variables += SelectionInfo(selection_type="Hlt1", trigger_lines=Hlt1_global_lines)
-    evt_variables += FunctorCollection(
-        {
-            "ALLPVX": F.ALLPVX(pvs),
-            "ALLPVY": F.ALLPVY(pvs),
-            "ALLPVZ": F.ALLPVZ(pvs),
-            "ALLPVNDOF": F.MAP(F.VALUE_OR(F.NaN) @ F.NDOF) @ F.TES(pvs),
-            "ALLPVCHI2": F.MAP(F.VALUE_OR(F.NaN) @ F.CHI2) @ F.TES(pvs),
-            "nPVs": F.SIZE(pvs),
-            "nTracks": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nTracks"),
-            "nLongTracks": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nLongTracks"),
-            "nMuonTracks": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nMuonTracks"),
-            "nFTClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nFTClusters"),
-            "nVPClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nVPClusters"),
-            "nUTClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nUTClusters"),
-            "nSPDhits": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nSPDhits"),
-            "nEcalClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nEcalClusters"),
-            "nEcalClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nEcalClusters"),
-            "eCalTot": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "eCalTot"),
-            "hCalTot": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "hCalTot"),
-            "nRich1Hits": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nRich1Hits"),
-            "nRich2Hits": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nRich2Hits"),
-        }
-    )
-    return evt_variables
-
-def add_truth_matching_functors(
-    options,
-    variables,
-    data,
-    hierarchy=True,
-    kinematics=True,
-    vertex_info=True,
-    bkgcat=False,
-    prompt_info=True,
-):
-    """Add MC truth matching functors to an existing FunctorCollection.
-
-    Args:
-        options (DaVinci.Options): DaVinci options object.
-        variables (FunctorCollection): FunctorCollection to modify
-        data: data handle
-        hierarchy (bool): Add MCHierarchy info (default True)
-        kinematics (bool): Add MCKinematics info (default True)
-        vertex_info (bool): Add MCVertexInfo (default True)
-        bkgcat (bool): Add TRUEKEY and BKGCAT functors - intended for composite particles (default False)
-        prompt_info (bool): Add MCPromptDecay info (default True)
-
-    Returns:
-        FunctorCollection: modified FunctorCollection with truth matched variables.
-    """
-    assert (
-        options.simulation
-    ), "options.simulation is set to False - it doesn't make sense to add truth matching."
-
-    MCTRUTH = MCTruthAndBkgCat(data)
-
-    if bkgcat:
-        variables += FunctorCollection(
-            {
-                # Important note: specify an invalid value for integer functors if there exists no truth info.
-                #                 The invalid value for floating point functors is set to nan.
-                "TRUEKEY": F.VALUE_OR(-1) @ MCTRUTH(F.OBJECT_KEY),
-                "BKGCAT": MCTRUTH.BkgCat,
-            }
-        )
-    if hierarchy:
-        variables += MCHierarchy(mctruth_alg=MCTRUTH)  # likely to change again!!
-    if vertex_info:
-        variables += MCVertexInfo(mctruth_alg=MCTRUTH)  # likely to change again!!
-    if kinematics:
-        variables += MCKinematics(mctruth_alg=MCTRUTH)  # likely to change again!!
-    if prompt_info:
-        variables += MCPromptDecay(mctruth_alg=MCTRUTH)
-
-    return variables
-
-### DTF variables ###
-
-def make_basic_dtf_variables(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name="", islong=True):
-    variables = (
-        FunctorCollection(
-            {
-                "TRCHI2DOF": F.CHI2DOF @ F.TRACK,
-                "ETA": F.ETA,
-                "PHI": F.PHI,
-                "TRGHOSTPROB": F.GHOSTPROB,
-                "BPVIPCHI2": F.BPVIPCHI2(pvs),
-                "BPVIP": F.BPVIP(pvs),
-                "BPVX": F.BPVX(pvs),
-                "BPVY": F.BPVY(pvs),
-                "BPVZ": F.BPVZ(pvs),
-                "TX"          : F.TX,
-                "TY"          : F.TY,
-                "MINIPCHI2"   : F.MINIPCHI2(pvs),
-                "MINIP"       : F.MINIP(pvs),
-                "KEY"         : F.VALUE_OR(-1) @ F.OBJECT_KEY @ F.TRACK,
-                "TRACKPT": F.TRACK_PT,
-                "TRACKHISTORY": F.VALUE_OR(-1) @ F.TRACKHISTORY @ F.TRACK,
-                "QOVERP": F.QOVERP @ F.TRACK,
-                "NDOF": F.VALUE_OR(-1) @ F.NDOF @ F.TRACK,
-            }
-        )
-        + Kinematics()
-    )
-
-    if islong:
-        variables += FunctorCollection({"CTB": F.TRACK_POSVEC_CLOSESTTOBEAM})
-    
-    if(mass_constraint):
-        if(pv_constraint): # MASS + PV
-            dtf_variables_mass_pv = FunctorCollection({
-                        'DTF_PV_M'+ particle_name + '_' + k: DTF(v)
-                        for k, v in variables.get_thor_functors().items()
-                    })
-            return dtf_variables_mass_pv
-        else: # MASS
-            dtf_variables_mass = FunctorCollection(
-                {'DTF_M'+ particle_name + '_' + k: DTF(v)
-                 for k, v in variables.get_thor_functors().items()})
-        return dtf_variables_mass
-
-    elif(pv_constraint): # PV
-        dtf_variables_pv = FunctorCollection({
-                'DTF_PV_' + k: DTF(v)
-                for k, v in variables.get_thor_functors().items()
-            })
-        return dtf_variables_pv
-
-    else: # NO MASS/PV
-        dtf_variables = FunctorCollection(
-            {'DTF_' + k: DTF(v)
-             for k, v in variables.get_thor_functors().items()})
-        return dtf_variables
-
-def make_composite_dtf_variables(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name=""):
-    variables = (
-        FunctorCollection(
-            {
-                "MAXPT": F.MAX(F.PT),
-                "MINPT": F.MIN(F.PT),
-                "SUMPT": F.SUM(F.PT),
-                "MAXP": F.MAX(F.P),
-                "MINP": F.MIN(F.P),
-                "BPVDIRA": F.BPVDIRA(pvs),
-                "VCHI2DOF": F.CHI2DOF, #CHI2VXNDOF
-                "BPVFDCHI2": F.BPVFDCHI2(pvs),
-                "BPVFD": F.BPVFD(pvs),
-                "BPVVDRHO": F.BPVVDRHO(pvs),
-                "BPVVDZ": F.BPVVDZ(pvs),
-                "BPVIPCHI2": F.BPVIPCHI2(pvs),
-                "BPVIP": F.BPVIP(pvs),
-                "LOGBPVIPCHI2": log(F.BPVIPCHI2(pvs)),
-                "BPVLTIME": F.BPVLTIME(pvs),
-                "MAXBPVIPCHI2": F.MAX(F.BPVIPCHI2(pvs)), #MAX_
-                "MINBPVIPCHI2": F.MIN(F.BPVIPCHI2(pvs)),
-                "MAXBPVIP": F.MAX(F.BPVIP(pvs)),
-                "MINBPVIP": F.MIN(F.BPVIP(pvs)),
-                "ETA": F.ETA,
-                "PHI": F.PHI,
-                "END_VX": F.END_VX, #END_
-                "END_VY": F.END_VY,
-                "END_VZ": F.END_VZ,
-                "BPVX": F.BPVX(pvs),
-                "BPVY": F.BPVY(pvs),
-                "BPVZ": F.BPVZ(pvs),
-                "ALLPVFD"     : F.ALLPV_FD(pvs),
-                "ALLPVIP"     : F.ALLPV_IP(pvs),
-                
-            }
-        )
-        + Kinematics()
-    )
-
-    addstring = "DTF"
-    if(pv_constraint):
-            addstring += '_PV'
-    if(mass_constraint):
-            addstring += '_M'
-    addstring += particle_name
-
-    DTF_chi2ndof = FunctorCollection(
-            {
-                addstring+"_DTFCHI2": DTF.CHI2,
-                addstring+"_DTFNDOF": DTF.NDOF,
-                addstring+"_CTAU": DTF.CTAU,
-                addstring+"_CTAUERR": DTF.CTAUERR,
-                addstring+"_MERR": DTF.MASSERR,
-            }
-    )
-
-    if(mass_constraint):
-        if(pv_constraint): # MASS + PV
-            dtf_variables_mass_pv = FunctorCollection({
-                        'DTF_PV_M'+ particle_name + '_' + k: DTF(v)
-                        for k, v in variables.get_thor_functors().items()
-                    })
-            return dtf_variables_mass_pv+DTF_chi2ndof
-        else: # MASS
-            dtf_variables_mass = FunctorCollection(
-                {'DTF_M'+ particle_name + '_' + k: DTF(v)
-                 for k, v in variables.get_thor_functors().items()})
-        return dtf_variables_mass+DTF_chi2ndof
-
-    elif(pv_constraint): # PV
-        dtf_variables_pv = FunctorCollection({
-                'DTF_PV_' + k: DTF(v)
-                for k, v in variables.get_thor_functors().items()
-            })
-        return dtf_variables_pv+DTF_chi2ndof
-
-    else: # NO MASS/PV
-        dtf_variables = FunctorCollection(
-            {'DTF_' + k: DTF(v)
-             for k, v in variables.get_thor_functors().items()})
-        return dtf_variables+DTF_chi2ndof
-
-def make_composite_dtf_variables_3body(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name=""):
-    variables = (
-        FunctorCollection(
-            {
-                "M13": F.SUBCOMB(Functor=F.MASS, Indices=(1, 3)),
-                "M23": F.SUBCOMB(Functor=F.MASS, Indices=(2, 3)),
-            }
-        )
-    )
-
-    if(mass_constraint):
-        if(pv_constraint): # MASS + PV
-            dtf_variables_mass_pv = FunctorCollection({
-                        'DTF_PV_M'+ particle_name + '_' + k: DTF(v)
-                        for k, v in variables.get_thor_functors().items()
-                    })
-            return dtf_variables_mass_pv+make_composite_dtf_variables(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
-        else: # MASS
-            dtf_variables_mass = FunctorCollection(
-                {'DTF_M'+ particle_name + '_' + k: DTF(v)
-                 for k, v in variables.get_thor_functors().items()})
-        return dtf_variables_mass+make_composite_dtf_variables(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
-
-    elif(pv_constraint): # PV
-        dtf_variables_pv = FunctorCollection({
-                'DTF_PV_' + k: DTF(v)
-                for k, v in variables.get_thor_functors().items()
-            })
-        return dtf_variables_pv+make_composite_dtf_variables(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
-
-    else: # NO MASS/PV
-        dtf_variables = FunctorCollection(
-            {'DTF_' + k: DTF(v)
-             for k, v in variables.get_thor_functors().items()})
-
-    return dtf_variables+make_composite_dtf_variables(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
-
-def make_composite_dtf_variables_4body(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name=""):
-    variables = (
-        FunctorCollection(
-            {
-                "M14": F.SUBCOMB(Functor=F.MASS, Indices=(1, 4)),
-                "M24": F.SUBCOMB(Functor=F.MASS, Indices=(2, 4)),
-                "M34": F.SUBCOMB(Functor=F.MASS, Indices=(3, 4)),
-            }
-        )
-    )
-
-    if(mass_constraint):
-        if(pv_constraint): # MASS + PV
-            dtf_variables_mass_pv = FunctorCollection({
-                        'DTF_PV_M'+ particle_name + '_' + k: DTF(v)
-                        for k, v in variables.get_thor_functors().items()
-                    })
-            return dtf_variables_mass_pv+make_composite_dtf_variables_3body(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
-        else: # MASS
-            dtf_variables_mass = FunctorCollection(
-                {'DTF_M'+ particle_name + '_' + k: DTF(v)
-                 for k, v in variables.get_thor_functors().items()})
-        return dtf_variables_mass+make_composite_dtf_variables_3body(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
-
-    elif(pv_constraint): # PV
-        dtf_variables_pv = FunctorCollection({
-                'DTF_PV_' + k: DTF(v)
-                for k, v in variables.get_thor_functors().items()
-            })
-        return dtf_variables_pv+make_composite_dtf_variables_3body(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
-
-    else: # NO MASS/PV
-        dtf_variables = FunctorCollection(
-            {'DTF_' + k: DTF(v)
-             for k, v in variables.get_thor_functors().items()})
-    
-        return dtf_variables+make_composite_dtf_variables_3body(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
-
-
-def make_MC_basic_variables():
-    MC_MOTHER_ID = lambda gen: F.VALUE_OR(0) @ F.MC_MOTHER(gen, F.PARTICLE_ID)
-    MC_MOTHER_KEY = lambda gen: F.VALUE_OR(-1) @ F.MC_MOTHER(gen, F.OBJECT_KEY)
-
-    variables = (
-        FunctorCollection(
-            {
-                "OBJECT_KEY": F.OBJECT_KEY,
-                "ETA": F.ETA,
-                "PHI": F.PHI,
-                "ORIGIN_VX": F.ORIGIN_VX,
-                "ORIGIN_VY": F.ORIGIN_VY,
-                "ORIGIN_VZ": F.ORIGIN_VZ,
-                "FOURMOMENTUM": F.FOURMOMENTUM,
-                "TRUEID": F.PARTICLE_ID,
-                "MC_MOTHER_ID": MC_MOTHER_ID(1),
-                "MC_MOTHER_KEY": MC_MOTHER_KEY(1),
-                "MC_GD_MOTHER_ID": MC_MOTHER_ID(2),
-                "MC_GD_MOTHER_KEY": MC_MOTHER_KEY(2),
-                "MC_GD_GD_MOTHER_ID": MC_MOTHER_ID(3),
-                "MC_GD_GD_MOTHER_KEY": MC_MOTHER_KEY(3),
-            }
-        )
-        + Kinematics()
-    )
-
-
-    from PyConf.reading import get_mc_particles, get_pp2mcp_relations, get_mc_track_info
-    MC_data = get_mc_particles("/Event/HLT2/MC/Particles")
-    relations_charged = get_pp2mcp_relations("/Event/HLT2/Relations/ChargedPP2MCP")
-    relations_neutral = get_pp2mcp_relations("/Event/HLT2/Relations/NeutralPP2MCP")
-    mcreconstructed_all = MCReconstructed(
-        input_mcparticles=MC_data,
-        use_best_mcmatch=True,
-        relations_charged=relations_charged,
-        relations_neutral=relations_neutral,
-    )
-    mcreconstructible_all = MCReconstructible(
-        input_mctrackinfo=get_mc_track_info()
-    )
-    import FunTuple.functorcollections as FC
-    vars_reconstructed = FC.MCReconstructed(mcreconstructed_alg=mcreconstructed_all, extra_info=True)
-    vars_reconstructible = FC.MCReconstructible(mcreconstructible_alg=mcreconstructible_all, extra_info=True)
-
-
-    return variables+vars_reconstructed+vars_reconstructible
-
-def make_MC_composite_variables():
-    MC_MOTHER_ID = lambda gen: F.VALUE_OR(0) @ F.MC_MOTHER(gen, F.PARTICLE_ID)
-    MC_MOTHER_KEY = lambda gen: F.VALUE_OR(-1) @ F.MC_MOTHER(gen, F.OBJECT_KEY)
-
-    variables = (
-        FunctorCollection(
-            {
-                "END_VX": F.END_VX,
-                "END_VY": F.END_VY,
-                "END_VZ": F.END_VZ,
-                "LTIME": F.MC_LIFETIME,
-                "OBJECT_KEY": F.OBJECT_KEY,
-                "ETA": F.ETA,
-                "PHI": F.PHI,
-                "ORIGIN_VX": F.ORIGIN_VX,
-                "ORIGIN_VY": F.ORIGIN_VY,
-                "ORIGIN_VZ": F.ORIGIN_VZ,
-                "FOURMOMENTUM": F.FOURMOMENTUM,
-                "TRUEID": F.PARTICLE_ID,
-                "MC_MOTHER_ID": MC_MOTHER_ID(1),
-                "MC_MOTHER_KEY": MC_MOTHER_KEY(1),
-                "MC_GD_MOTHER_ID": MC_MOTHER_ID(2),
-                "MC_GD_MOTHER_KEY": MC_MOTHER_KEY(2),
-                "MC_GD_GD_MOTHER_ID": MC_MOTHER_ID(3),
-                "MC_GD_GD_MOTHER_KEY": MC_MOTHER_KEY(3),
-            }
-        )
-        + Kinematics()
-        + MCPromptDecay()
-        )
-
-    return variables
-
-def make_MC_event_variables(mc_header):
-    # define event level variables
-    evt_variables = EventInfo()
-    evt_variables += MCPrimaries(mc_header=mc_header)
-
-    return evt_variables
-
-def make_top_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"]):
-    from PyConf.reading import get_particles
-    from IsolationTools import VertexAndConeIsolation
-
-    possible_charm_locations = ["LongTrackIso", "TTrackIso", "DownstreamTrackIso", "UpstreamTrackIso", "NeutralIso", "PizIso"]
-    coneangles = [0.25,0.5,1.,1.5,2.]
-
-    count = 0
-    for location in locations:
-        extra_particles = get_particles(f"/Event/HLT2/{hlt2_line}/{location}/Particles")
-
-        for coneangle in coneangles:
-            top_RTAlg = VertexAndConeIsolation(
-                name=location+"_"+str(coneangle),
-                reference_particles=input_data,
-                related_particles=extra_particles,
-                cut=F.DR2<coneangle)
-
-            if count == 0:
-                top_iso_variables = ParticleIsolation(isolation_alg=top_RTAlg,array_indx_name='indx')
-            else:
-                top_iso_variables += ParticleIsolation(isolation_alg=top_RTAlg,array_indx_name='indx')
-            count += 1
-
-
-    return top_iso_variables
-
-def make_basic_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"]):
-    from PyConf.reading import get_particles
-    from IsolationTools import VertexAndConeIsolation
-    from PyConf.Algorithms import ThOrParticleSelection
-
-    basic_code = (F.FILTER(F.ALL) @ F.GET_ALL_BASICS())
-    basic_particles = ThOrParticleSelection(InputParticles=input_data, Functor=basic_code).OutputSelection
-
-    possible_charm_locations = ["LongTrackIso", "TTrackIso", "DownstreamTrackIso", "UpstreamTrackIso", "NeutralIso", "PizIso"]
-    coneangles = [0.25,0.5,1.,1.5,2.]
-
-    count = 0
-    for location in locations:
-        extra_particles = get_particles(f"/Event/HLT2/{hlt2_line}/{location}/Particles")
-
-        for coneangle in coneangles:
-            basic_RTAlg = VertexAndConeIsolation(
-                name=location+"_"+str(coneangle),
-                reference_particles=basic_particles,
-                related_particles=extra_particles,
-                cut=F.DR2<coneangle)
-
-            if count == 0:
-                basic_iso_variables = ParticleIsolation(isolation_alg=basic_RTAlg,array_indx_name='indx')
-            else:
-                basic_iso_variables += ParticleIsolation(isolation_alg=basic_RTAlg,array_indx_name='indx')
-            count += 1
-
-
-    return basic_iso_variables
-
-
-def make_intermediate_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"], composite_ID = "J/psi(1S)"):
-    from PyConf.reading import get_particles
-    from IsolationTools import VertexAndConeIsolation
-    from PyConf.Algorithms import ThOrParticleSelection
-
-    intermediate_code = F.FILTER(F.IS_ABS_ID(composite_ID)) @ F.GET_ALL_DESCENDANTS()
-    intermediate_particles = ThOrParticleSelection(InputParticles=input_data, Functor=intermediate_code).OutputSelection
-
-    possible_charm_locations = ["LongTrackIso", "TTrackIso", "DownstreamTrackIso", "UpstreamTrackIso", "NeutralIso", "PizIso"]
-    coneangles = [0.25,0.5,1.,1.5,2.]
-
-    count = 0
-    for location in locations:
-        extra_particles = get_particles(f"/Event/HLT2/{hlt2_line}/{location}/Particles")
-
-        for coneangle in coneangles:
-            intermediate_RTAlg = VertexAndConeIsolation(
-                name=location+"_"+str(coneangle),
-                reference_particles=intermediate_particles,
-                related_particles=extra_particles,
-                cut=F.DR2<coneangle)
-
-            if count == 0:
-                intermediate_iso_variables = ParticleIsolation(isolation_alg=intermediate_RTAlg,array_indx_name='indx')
-            else:
-                intermediate_iso_variables += ParticleIsolation(isolation_alg=intermediate_RTAlg,array_indx_name='indx')
-            count += 1
-
-
-    return intermediate_iso_variables
diff --git a/Charm_2024validation/tmp.yaml b/Charm_2024validation/tmp.yaml
deleted file mode 100644
index c871485c24..0000000000
--- a/Charm_2024validation/tmp.yaml
+++ /dev/null
@@ -1,12 +0,0 @@
-( '27186011', 'dst_to_dee', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27185021', 'dst_to_dee', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27184011', 'dst_to_dee', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27186011', 'dst_to_dee', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '27185021', 'dst_to_dee', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '27184011', 'dst_to_dee', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '27186011', 'dst_to_dee', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '27185021', 'dst_to_dee', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '27184011', 'dst_to_dee', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '27186011', 'dst_to_dee', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27185021', 'dst_to_dee', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27184011', 'dst_to_dee', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-- 
GitLab


From b9330741166bf8ba4644b8a1e32a208696be457c Mon Sep 17 00:00:00 2001
From: Serena Maccolini <serena.maccolini@cern.ch>
Date: Mon, 15 Jul 2024 17:00:49 +0200
Subject: [PATCH 08/51] Revert "cleaning up"

This reverts commit bf90432c8e23e45cf26c2769c03527195609b8fb.
---
 Charm_2024validation/README.md                |   68 +
 Charm_2024validation/dummy.yaml               |   16 +
 Charm_2024validation/info.yaml                |  122 ++
 Charm_2024validation/info_MC_4localtest.yaml  |  122 ++
 Charm_2024validation/info_MC_noUT.yaml        |  121 ++
 Charm_2024validation/info_data.yaml           |   53 +
 Charm_2024validation/info_data_noUT.yaml      |   50 +
 Charm_2024validation/main_d0_to_hh.py         |   58 +
 Charm_2024validation/main_d0_to_hhhh.py       |   40 +
 Charm_2024validation/main_d0_to_hhpi0.py      |   43 +
 Charm_2024validation/main_d0_to_kshh.py       |   75 +
 Charm_2024validation/main_d0_to_ksks.py       |   59 +
 Charm_2024validation/main_d_to_hhh.py         |   63 +
 Charm_2024validation/main_d_to_ksh.py         |   48 +
 .../main_detection_asymmetry.py               |   31 +
 Charm_2024validation/main_dst_to_dee.py       |   42 +
 Charm_2024validation/main_rare_charm.py       |   41 +
 Charm_2024validation/options/d0_to_hh.py      |  432 +++++
 Charm_2024validation/options/d0_to_hh_MC.py   |   99 +
 Charm_2024validation/options/d0_to_hhhh.py    |  247 +++
 Charm_2024validation/options/d0_to_hhhh_MC.py |   43 +
 Charm_2024validation/options/d0_to_hhpi0.py   |  359 ++++
 .../options/d0_to_hhpi0_MC.py                 |   44 +
 Charm_2024validation/options/d0_to_kshh.py    | 1585 +++++++++++++++++
 Charm_2024validation/options/d0_to_kshh_MC.py |   44 +
 Charm_2024validation/options/d0_to_ksks.py    | 1049 +++++++++++
 Charm_2024validation/options/d0_to_ksks_MC.py |   46 +
 Charm_2024validation/options/d_to_hhh.py      |  503 ++++++
 Charm_2024validation/options/d_to_hhh_MC.py   |   92 +
 Charm_2024validation/options/d_to_ksh.py      |  313 ++++
 Charm_2024validation/options/d_to_ksh_MC.py   |   68 +
 .../options/detection_asymmetry.py            |  191 ++
 Charm_2024validation/options/dst_to_dee.py    |  296 +++
 Charm_2024validation/options/hlt1.py          |   33 +
 Charm_2024validation/options/hlt2/d0_to_hh.py |    9 +
 .../options/hlt2/d0_to_hhhh.py                |    8 +
 .../options/hlt2/d0_to_hhpi0.py               |    8 +
 .../options/hlt2/d0_to_kshh.py                |    8 +
 .../options/hlt2/d0_to_ksks.py                |    8 +
 Charm_2024validation/options/hlt2/d_to_hhh.py |   10 +
 Charm_2024validation/options/hlt2/d_to_ksh.py |   10 +
 .../options/hlt2/dst_to_dee.py                |    9 +
 Charm_2024validation/options/hlt2/hlt2.py     |   32 +
 .../options/hlt2/hlt2_d0_to_hh.py             |   41 +
 .../options/hlt2/hlt2_d0_to_hhhh.py           |   40 +
 .../options/hlt2/hlt2_d0_to_hhpi0.py          |   40 +
 .../options/hlt2/hlt2_d0_to_kshh.py           |   40 +
 .../options/hlt2/hlt2_d0_to_ksks.py           |   40 +
 .../options/hlt2/hlt2_d_to_hhh.py             |   42 +
 .../options/hlt2/hlt2_d_to_ksh.py             |   42 +
 .../options/hlt2/hlt2_dst_to_dee.py           |   41 +
 .../options/hlt2/hlt2_rare_charm.py           |   40 +
 Charm_2024validation/options/hlt2/hlt2noUT.py |   32 +
 .../options/hlt2/make_hlt2_decay.sh           |    9 +
 .../options/hlt2/rare_charm.py                |    8 +
 Charm_2024validation/options/rare_charm.py    |  496 ++++++
 Charm_2024validation/options/tupling.py       |  986 ++++++++++
 Charm_2024validation/tmp.yaml                 |   12 +
 58 files changed, 8507 insertions(+)
 create mode 100644 Charm_2024validation/README.md
 create mode 100644 Charm_2024validation/dummy.yaml
 create mode 100644 Charm_2024validation/info.yaml
 create mode 100644 Charm_2024validation/info_MC_4localtest.yaml
 create mode 100644 Charm_2024validation/info_MC_noUT.yaml
 create mode 100644 Charm_2024validation/info_data.yaml
 create mode 100644 Charm_2024validation/info_data_noUT.yaml
 create mode 100644 Charm_2024validation/main_d0_to_hh.py
 create mode 100644 Charm_2024validation/main_d0_to_hhhh.py
 create mode 100644 Charm_2024validation/main_d0_to_hhpi0.py
 create mode 100644 Charm_2024validation/main_d0_to_kshh.py
 create mode 100644 Charm_2024validation/main_d0_to_ksks.py
 create mode 100644 Charm_2024validation/main_d_to_hhh.py
 create mode 100644 Charm_2024validation/main_d_to_ksh.py
 create mode 100644 Charm_2024validation/main_detection_asymmetry.py
 create mode 100644 Charm_2024validation/main_dst_to_dee.py
 create mode 100644 Charm_2024validation/main_rare_charm.py
 create mode 100644 Charm_2024validation/options/d0_to_hh.py
 create mode 100644 Charm_2024validation/options/d0_to_hh_MC.py
 create mode 100644 Charm_2024validation/options/d0_to_hhhh.py
 create mode 100644 Charm_2024validation/options/d0_to_hhhh_MC.py
 create mode 100644 Charm_2024validation/options/d0_to_hhpi0.py
 create mode 100644 Charm_2024validation/options/d0_to_hhpi0_MC.py
 create mode 100644 Charm_2024validation/options/d0_to_kshh.py
 create mode 100644 Charm_2024validation/options/d0_to_kshh_MC.py
 create mode 100644 Charm_2024validation/options/d0_to_ksks.py
 create mode 100644 Charm_2024validation/options/d0_to_ksks_MC.py
 create mode 100644 Charm_2024validation/options/d_to_hhh.py
 create mode 100644 Charm_2024validation/options/d_to_hhh_MC.py
 create mode 100644 Charm_2024validation/options/d_to_ksh.py
 create mode 100644 Charm_2024validation/options/d_to_ksh_MC.py
 create mode 100644 Charm_2024validation/options/detection_asymmetry.py
 create mode 100644 Charm_2024validation/options/dst_to_dee.py
 create mode 100644 Charm_2024validation/options/hlt1.py
 create mode 100644 Charm_2024validation/options/hlt2/d0_to_hh.py
 create mode 100644 Charm_2024validation/options/hlt2/d0_to_hhhh.py
 create mode 100644 Charm_2024validation/options/hlt2/d0_to_hhpi0.py
 create mode 100644 Charm_2024validation/options/hlt2/d0_to_kshh.py
 create mode 100644 Charm_2024validation/options/hlt2/d0_to_ksks.py
 create mode 100644 Charm_2024validation/options/hlt2/d_to_hhh.py
 create mode 100644 Charm_2024validation/options/hlt2/d_to_ksh.py
 create mode 100644 Charm_2024validation/options/hlt2/dst_to_dee.py
 create mode 100644 Charm_2024validation/options/hlt2/hlt2.py
 create mode 100644 Charm_2024validation/options/hlt2/hlt2_d0_to_hh.py
 create mode 100644 Charm_2024validation/options/hlt2/hlt2_d0_to_hhhh.py
 create mode 100644 Charm_2024validation/options/hlt2/hlt2_d0_to_hhpi0.py
 create mode 100644 Charm_2024validation/options/hlt2/hlt2_d0_to_kshh.py
 create mode 100644 Charm_2024validation/options/hlt2/hlt2_d0_to_ksks.py
 create mode 100644 Charm_2024validation/options/hlt2/hlt2_d_to_hhh.py
 create mode 100644 Charm_2024validation/options/hlt2/hlt2_d_to_ksh.py
 create mode 100644 Charm_2024validation/options/hlt2/hlt2_dst_to_dee.py
 create mode 100644 Charm_2024validation/options/hlt2/hlt2_rare_charm.py
 create mode 100644 Charm_2024validation/options/hlt2/hlt2noUT.py
 create mode 100644 Charm_2024validation/options/hlt2/make_hlt2_decay.sh
 create mode 100644 Charm_2024validation/options/hlt2/rare_charm.py
 create mode 100644 Charm_2024validation/options/rare_charm.py
 create mode 100644 Charm_2024validation/options/tupling.py
 create mode 100644 Charm_2024validation/tmp.yaml

diff --git a/Charm_2024validation/README.md b/Charm_2024validation/README.md
new file mode 100644
index 0000000000..f061ea162c
--- /dev/null
+++ b/Charm_2024validation/README.md
@@ -0,0 +1,68 @@
+Analysis production for 2024 data validation within the Charm WG.
+
+For easy tests, eg. on `d_to_hhh` subset:
+```sh
+lb-run DaVinci/v64r2 lbexec Charm_2024validation.main_d_to_hhh:main Charm_2024validation/dummy.yaml
+```
+
+Decays and Hlt2 lines considered are:
+- `d0_to_hh.py`:
+  - Dst2D0pi_D02Kpi_RS     "Hlt2Charm_DstpToD0Pip_D0ToKmPip"
+  - Dst2D0pi_D02Kpi_WS     "Hlt2Charm_DstpToD0Pip_D0ToKpPim"
+  - Dst2D0pi_D02KK     "Hlt2Charm_DstpToD0Pip_D0ToKmKp"
+  - Dst2D0pi_D02pipi     "Hlt2Charm_DstpToD0Pip_D0ToPimPip"
+  - D02Kpi     "Hlt2Charm_D0ToKmPip"
+  - D02KK     "Hlt2Charm_D0ToKmKp"
+  - D02pipi     "Hlt2Charm_D0ToPimPip"
+  - Dst2D0pi_D02Kpi_RS_LowBias     "Hlt2Charm_DstpToD0Pip_D0ToKmPip_LowBias"
+  - Dst2D0pi_D02Kpi_WS_LowBias     "Hlt2Charm_DstpToD0Pip_D0ToKpPim_LowBias"
+  - Dst2D0pi_D02KK_LowBias     "Hlt2Charm_DstpToD0Pip_D0ToKmKp_LowBias"
+  - Dst2D0pi_D02pipi_LowBias     "Hlt2Charm_DstpToD0Pip_D0ToPimPip_LowBias"
+  - D02Kpi_LowBias     "Hlt2Charm_D0ToKmPip_LowBias"
+  - D02KK_LowBias     "Hlt2Charm_D0ToKmKp_LowBias"
+  - D02pipi_LowBias     "Hlt2Charm_D0ToPimPip_LowBias"
+- `d_to_ksh.py`:
+  - D2KSpi_LL     "Hlt2Charm_DpDspToKsPip_LL"
+  - D2KSpi_LD     "Hlt2Charm_DpDspToKsPip_LD"
+  - D2KSpi_DD     "Hlt2Charm_DpDspToKsPip_DD"
+  - D2KSK_LL     "Hlt2Charm_DpDspToKsKp_LL"
+  - D2KSK_LD     "Hlt2Charm_DpDspToKsKp_LD"
+  - D2KSK_DD     "Hlt2Charm_DpDspToKsKp_DD"
+- `d_to_hhh.py`:
+  - D2Kpipi     "Hlt2Charm_DpDspToKmPipPip"
+  - D2Kpipi_NoCuts     "Hlt2Charm_DpDspToKmPipPip_NoCuts"
+  - Ds2KKpi     "Hlt2Charm_DspToKmKpPip"
+  - Ds2KKpi_NoCuts     "Hlt2Charm_DspToKmKpPip_NoCuts"
+  - D2pipipi     "Hlt2Charm_DpDspToPimPipPip"
+  - D2pipipi_NoCuts     "Hlt2Charm_DpDspToPimPipPip_NoCuts"
+- `d0_to_hhpi0.py`:
+  - Dst2D0pi_D02Kpipi0 "Hlt2Charm_DstpToD0Pip_D0ToKmPipPi0_{M,R}"
+  - Dst2D0pi_D02KKpi0 "Hlt2Charm_DstpToD0Pip_D0ToKmKpPi0_{M,R}"
+  - Dst2D0pi_D02pipipi0 "Hlt2Charm_DstpToD0Pip_D0ToPimPipPi0_{M,R}"
+- `detection_asymmetry.py`:
+  - D2Kpipi_ADet "Hlt2Charm_DpToKmPipPip_ADet"
+  - D2KSK_LL_ADet "Hlt2Charm_DspToKsKp_LL_ADet"
+  - D2KSpi_LL_ADet "Hlt2Charm_DpToKsPip_LL_ADet"
+  - D2pipipi_ADet "Hlt2Charm_DspToPimPipPip_ADet"
+  - Ds2KKpi_ADet "Hlt2Charm_DspToKmKpPip_ADet"
+  - Lc2KSp_LL_ADet "Hlt2Charm_LcpToPpKs_LL_ADet"
+  - Lc2pKpi_ADet "Hlt2Charm_LcpToPpKmPip_ADet"
+- `rare_charm.py`:
+  - D2pimumu "Hlt2Charm_DpDspToPipMumMup"
+  - D2pimumu_WS "Hlt2Charm_DpDspToPipMupMup_RareCharmControl"
+  - Dst2D0pi_D02Kpimumu_RS "Hlt2Charm_DstpToD0Pip_D0ToKmPipMumMup"
+- `d0_to_kshh.py`:
+- `d0_to_ksks.py`:
+- `dst_to_dee.py`:
+  -  Dst02D0EmEp_D02KmPip_OS    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS',
+  -  Dst02D0EmEp_D02KmPip_SS 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS',
+  -  Dst02D0EmEp_D02KmPip_OS_MVA 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS_MVA',
+  -  Dst02D0EmEp_D02KmPip_SS_MVA 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS_MVA',
+  -  Dst02D0EmEp_D02KmPimPipPip_OS 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS',
+  -  Dst02D0EmEp_D02KmPimPipPip_SS 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS',
+  -  Dst02D0EmEp_D02KmPimPipPip_OS_MVA 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS_MVA',
+  -  Dst02D0EmEp_D02KmPimPipPip_SS_MVA 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS_MVA',
+  -  Dstp2DpDspEmEp_DpDsp2KmKpPip_OS 'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS',
+  -  Dstp2DpDspEmEp_DpDsp2KmKpPip_SS 'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS',
+  -  Dstp2DpDspEmEp_DpDsp2KmKpPip_OS_MVA 'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS_MVA',
+  -  Dstp2DpDspEmEp_DpDsp2KmKpPip_SS_MVA'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS_MVA',
diff --git a/Charm_2024validation/dummy.yaml b/Charm_2024validation/dummy.yaml
new file mode 100644
index 0000000000..5bebae4ac3
--- /dev/null
+++ b/Charm_2024validation/dummy.yaml
@@ -0,0 +1,16 @@
+input_files:
+- root://myProxy@lhcbxrootd-kit.gridka.de//pnfs/gridka.de/lhcb/LHCb-Disk/lhcb/LHCb/Collision23/CHARM.DST/00198130/0000/00198130_00000552_1.charm.dst
+input_raw_format: 0.5
+input_type: ROOT
+output_type: ROOT
+event_store: HiveWhiteBoard
+simulation: False
+data_type: "Upgrade"
+geometry_version: run3/trunk
+conditions_version: Alignment2023_HLT2Processing_26_8_2023
+scheduler_legacy_mode: False
+input_process: "TurboPass"
+input_stream: "charm"
+histo_file: CHARM_HISTO.ROOT
+ntuple_file: CHARM.ROOT
+evt_max: 1000
diff --git a/Charm_2024validation/info.yaml b/Charm_2024validation/info.yaml
new file mode 100644
index 0000000000..26de654976
--- /dev/null
+++ b/Charm_2024validation/info.yaml
@@ -0,0 +1,122 @@
+defaults:
+  inform:
+    - serena.maccolini@cern.ch
+  wg: Charm
+
+{%- set conditions = [
+  "MagDown",
+]%}
+
+{%- set evttype_subsample_nutext_nu_dir1_dir2_dddb = [
+( '27163102', 'd0_to_hh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163101', 'd0_to_hh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163100', 'd0_to_hh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '23103042', 'd_to_hhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '23263022', 'd_to_hhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '21263012', 'd_to_hhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163471', 'd0_to_hhpi0', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27165903', 'd0_to_kshh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27165071', 'd0_to_hhhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27265008', 'd0_to_hhhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27265009', 'd0_to_hhhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27165072', 'd0_to_hhhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '23103111', 'd_to_ksh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '21103101', 'd_to_ksh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '23173003', 'rare_charm', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+
+( '27163102', 'd0_to_hh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163101', 'd0_to_hh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163100', 'd0_to_hh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '23103042', 'd_to_hhh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '23263022', 'd_to_hhh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '21263012', 'd_to_hhh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163471', 'd0_to_hhpi0', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '27165903', 'd0_to_kshh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '27165071', 'd0_to_hhhh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+
+( '27163102', 'd0_to_hh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163101', 'd0_to_hh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163100', 'd0_to_hh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '23103042', 'd_to_hhh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '23263022', 'd_to_hhh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '21263012', 'd_to_hhh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163471', 'd0_to_hhpi0', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '27165903', 'd0_to_kshh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '27165071', 'd0_to_hhhh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+
+( '27163102', 'd0_to_hh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163101', 'd0_to_hh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163100', 'd0_to_hh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '23103042', 'd_to_hhh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '23263022', 'd_to_hhh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '21263012', 'd_to_hhh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163471', 'd0_to_hhpi0', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27165903', 'd0_to_kshh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27165071', 'd0_to_hhhh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+
+]%}
+
+
+
+{%- for evttype, id, nutext, nu, dir1, dir2, dddb in evttype_subsample_nutext_nu_dir1_dir2_dddb %}
+
+{% for polarity in conditions %}
+
+{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1:
+  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
+  input:
+    bk_query: "/MC/{{dir1}}/Beam6800GeV-2024{{dir2}}-{{polarity}}-Nu{{nu}}-25ns-Pythia8/Sim10d/{{evttype}}/DIGI"
+    n_test_lfns: 3
+  output: HLT1.DST
+  options:
+    entrypoint: Charm_2024validation.options.hlt1:alg_config
+    extra_options:
+      input_raw_format: 0.5
+      conddb_tag: sim10-2024.Q1.2-v1.1-md100
+      dddb_tag: '{{dddb}}'
+      input_type: ROOT
+      output_type: ROOT
+      simulation: True
+      data_type: "Upgrade"
+      scheduler_legacy_mode: False
+      evt_max: 1000
+
+{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2:
+  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
+  input:
+    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1
+  output: HLT2.DST
+  options:
+    entrypoint: Charm_2024validation.options.hlt2.hlt2_{{id}}:alg_config
+    extra_options:
+      conddb_tag: sim10-2024.Q1.2-v1.1-md100
+      dddb_tag: '{{dddb}}'
+      input_raw_format: 0.5
+      input_type: "ROOT"
+      output_type: "ROOT"
+      simulation: True
+      data_type: "Upgrade"
+      output_manifest_file: "HLT2.tck.json"
+      scheduler_legacy_mode: False
+
+MC_{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}:
+  application: "DaVinci/v64r7@x86_64_v3-el9-gcc13+detdesc-opt+g"
+  input:
+    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2
+  output: DVTUPLE.ROOT
+  options:
+    entrypoint: Charm_2024validation.main_{{id}}:main
+    extra_options:
+      conddb_tag: sim10-2024.Q1.2-v1.1-md100
+      dddb_tag: '{{dddb}}'
+      input_raw_format: 0.5
+      input_type: ROOT
+      simulation: True
+      data_type: "Upgrade"
+      event_store: HiveWhiteBoard
+      input_process: "Hlt2"
+      input_manifest_file: "HLT2.tck.json"
+      write_decoding_keys_to_git: false
+      
+{%- endfor %}
+{%- endfor %}
diff --git a/Charm_2024validation/info_MC_4localtest.yaml b/Charm_2024validation/info_MC_4localtest.yaml
new file mode 100644
index 0000000000..3d18e13274
--- /dev/null
+++ b/Charm_2024validation/info_MC_4localtest.yaml
@@ -0,0 +1,122 @@
+defaults:
+  inform:
+    - serena.maccolini@cern.ch
+  wg: Charm
+
+{%- set conditions = [
+  "MagDown",
+]%}
+
+{%- set evttype_subsample_nutext_nu_dir1_dir2_dddb_geometry = [
+( '27163102', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163101', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163100', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23103042', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23263022', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '21263012', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163471', 'd0_to_hhpi0', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165903', 'd0_to_kshh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165071', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27265008', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27265009', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165072', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23103111', 'd_to_ksh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '21103101', 'd_to_ksh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23173003', 'rare_charm', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163102', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163101', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163100', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23103042', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23263022', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '21263012', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163471', 'd0_to_hhpi0', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165903', 'd0_to_kshh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165071', 'd0_to_hhhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163102', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163101', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163100', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23103042', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23263022', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '21263012', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163471', 'd0_to_hhpi0', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165903', 'd0_to_kshh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165071', 'd0_to_hhhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163102', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163101', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163100', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23103042', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23263022', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '21263012', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163471', 'd0_to_hhpi0', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165903', 'd0_to_kshh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165071', 'd0_to_hhhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165901', 'd0_to_ksks', '7p6', '7.6', 'Dev', '', 'dddb-20231017', 'run3/trunk'),
+]%}
+
+
+
+{%- for evttype, id, nutext, nu, dir1, dir2, dddb, geometry in evttype_subsample_nutext_nu_dir1_dir2_dddb_geometry %}
+
+{% for polarity in conditions %}
+
+{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1:
+  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
+  input:
+    bk_query: "/MC/{{dir1}}/Beam6800GeV-expected-2024{{dir2}}-{{polarity}}-Nu{{nu}}-25ns-Pythia8/Sim10c/{{evttype}}/DIGI"
+    n_test_lfns: 3
+  output: HLT1.DST
+  options:
+    entrypoint: Charm_2024validation.options.hlt1:alg_config
+    extra_options:
+      input_raw_format: 0.5
+      conddb_tag: sim-20231017-vc-md100
+      dddb_tag: '{{dddb}}'
+      input_type: ROOT
+      output_type: ROOT
+      simulation: True
+      data_type: "Upgrade"
+      scheduler_legacy_mode: False
+      geometry_version: "{{geometry}}"
+      evt_max: 1000
+
+{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2:
+  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
+  input:
+    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1
+  output: HLT2.DST
+  options:
+    entrypoint: Charm_2024validation.options.hlt2.hlt2_{{id}}:alg_config
+    extra_options:
+      conddb_tag: sim-20231017-vc-md100
+      dddb_tag: '{{dddb}}'
+      input_raw_format: 0.5
+      input_type: "ROOT"
+      output_type: "ROOT"
+      simulation: True
+      data_type: "Upgrade"
+      output_manifest_file: "HLT2.tck.json"
+      scheduler_legacy_mode: False
+      geometry_version: "{{geometry}}"
+
+MC_{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}:
+  application: "DaVinci/v64r3@x86_64_v3-el9-gcc13+detdesc-opt+g"
+  input:
+    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2
+  output: DVTUPLE.ROOT
+  options:
+    entrypoint: Charm_2024validation.main_{{id}}:main
+    extra_options:
+      conddb_tag: sim-20231017-vc-md100
+      dddb_tag: '{{dddb}}'
+      input_raw_format: 0.5
+      input_type: ROOT
+      simulation: True
+      data_type: "Upgrade"
+      event_store: HiveWhiteBoard
+      geometry_version: "{{geometry}}"
+      input_process: "Hlt2"
+      input_manifest_file: "HLT2.tck.json"
+      write_decoding_keys_to_git: false
+
+{%- endfor %}
+{%- endfor %}
diff --git a/Charm_2024validation/info_MC_noUT.yaml b/Charm_2024validation/info_MC_noUT.yaml
new file mode 100644
index 0000000000..52df9e4e96
--- /dev/null
+++ b/Charm_2024validation/info_MC_noUT.yaml
@@ -0,0 +1,121 @@
+defaults:
+  inform:
+    - serena.maccolini@cern.ch
+  wg: Charm
+
+{%- set conditions = [
+  "MagDown",
+]%}
+
+{%- set evttype_subsample_nutext_nu_dir1_dir2_dddb_geometry = [
+( '27163102', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163101', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163100', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23103042', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23263022', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '21263012', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163471', 'd0_to_hhpi0', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165903', 'd0_to_kshh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165071', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27265008', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27265009', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165072', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23103111', 'd_to_ksh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '21103101', 'd_to_ksh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23173003', 'rare_charm', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163102', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163101', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163100', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23103042', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23263022', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '21263012', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163471', 'd0_to_hhpi0', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165903', 'd0_to_kshh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165071', 'd0_to_hhhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163102', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163101', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163100', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23103042', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23263022', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '21263012', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163471', 'd0_to_hhpi0', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165903', 'd0_to_kshh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165071', 'd0_to_hhhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163102', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163101', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163100', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23103042', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23263022', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '21263012', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163471', 'd0_to_hhpi0', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165903', 'd0_to_kshh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165071', 'd0_to_hhhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165901', 'd0_to_ksks', '7p6', '7.6', 'Dev', '', 'dddb-20231017', 'run3/trunk'),
+]%}
+
+
+
+{%- for evttype, id, nutext, nu, dir1, dir2, dddb, geometry in evttype_subsample_nutext_nu_dir1_dir2_dddb_geometry %}
+
+{% for polarity in conditions %}
+
+{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1:
+  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
+  input:
+    bk_query: "/MC/{{dir1}}/Beam6800GeV-expected-2024{{dir2}}-{{polarity}}-Nu{{nu}}-25ns-Pythia8/Sim10c/{{evttype}}/DIGI"
+    n_test_lfns: 3
+  output: HLT1.DST
+  options:
+    entrypoint: Charm_2024validation.options.hlt1:alg_config
+    extra_options:
+      input_raw_format: 0.5
+      conddb_tag: sim-20231017-vc-md100
+      dddb_tag: '{{dddb}}'
+      input_type: ROOT
+      output_type: ROOT
+      simulation: True
+      data_type: "Upgrade"
+      scheduler_legacy_mode: False
+      geometry_version: "{{geometry}}"
+      evt_max: -1
+
+{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2:
+  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
+  input:
+    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1
+  output: HLT2.DST
+  options:
+    entrypoint: Charm_2024validation.options.hlt2.hlt2_{{id}}:alg_config
+    extra_options:
+      conddb_tag: sim-20231017-vc-md100
+      dddb_tag: '{{dddb}}'
+      input_raw_format: 0.5
+      input_type: "ROOT"
+      output_type: "ROOT"
+      simulation: True
+      data_type: "Upgrade"
+      output_manifest_file: "HLT2.tck.json"
+      scheduler_legacy_mode: False
+      geometry_version: "{{geometry}}"
+
+MC_{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}:
+  application: "DaVinci/v64r3@x86_64_v3-el9-gcc13+detdesc-opt+g"
+  input:
+    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2
+  output: DVTUPLE.ROOT
+  options:
+    entrypoint: Charm_2024validation.main_{{id}}:main
+    extra_options:
+      conddb_tag: sim-20231017-vc-md100
+      dddb_tag: '{{dddb}}'
+      input_raw_format: 0.5
+      input_type: ROOT
+      simulation: True
+      data_type: "Upgrade"
+      event_store: HiveWhiteBoard
+      geometry_version: "{{geometry}}"
+      input_process: "Hlt2"
+      input_manifest_file: "HLT2.tck.json"
+
+{%- endfor %}
+{%- endfor %}
diff --git a/Charm_2024validation/info_data.yaml b/Charm_2024validation/info_data.yaml
new file mode 100644
index 0000000000..cf3b7dcdf9
--- /dev/null
+++ b/Charm_2024validation/info_data.yaml
@@ -0,0 +1,53 @@
+defaults:
+  inform:
+    - serena.maccolini@cern.ch
+  wg: Charm
+
+{%- set conditions = [
+  "MagDown",
+]%}
+
+
+
+{%- set subsamples = [
+  "d0_to_hh",
+  "d_to_hhh",
+  "d_to_ksh",
+  "d0_to_hhpi0",
+  "d0_to_kshh",
+  "d0_to_ksks",
+  "d0_to_hhhh",
+  "rare_charm",
+  "detection_asymmetry",
+  "dst_to_dee",
+]%}
+
+{% for id in subsamples %}
+{% for polarity in conditions %}
+
+{{id}}_2024_{{ polarity }}:
+  application: "DaVinci/v64r7"
+  input:
+    bk_query: "/LHCb/Collision24/Beam6800GeV-VeloClosed-{{polarity}}/Real Data/Sprucing24c2/94000000/CHARM.DST"
+
+    dq_flags:
+      - UNCHECKED
+      - OK
+    keep_running: true
+  output: DVTUPLE_{{id}}.ROOT
+  options:
+    entrypoint: Charm_2024validation.main_{{id}}:main
+    extra_options:
+      input_raw_format: 0.5
+      input_type: ROOT
+      simulation: False
+      data_type: "Upgrade"
+      event_store: HiveWhiteBoard
+      geometry_version: run3/2024.Q1.2-v00.00
+      conditions_version: master
+      input_process: "TurboPass"
+      input_stream: "charm"
+      evt_max: -1
+
+{%- endfor %}
+{%- endfor %}
diff --git a/Charm_2024validation/info_data_noUT.yaml b/Charm_2024validation/info_data_noUT.yaml
new file mode 100644
index 0000000000..8c750c72d0
--- /dev/null
+++ b/Charm_2024validation/info_data_noUT.yaml
@@ -0,0 +1,50 @@
+defaults:
+  inform:
+    - serena.maccolini@cern.ch
+  wg: Charm
+
+{%- set conditions = [
+  "MagDown",
+]%}
+
+
+
+{%- set subsamples = [
+  "d0_to_hh",
+  "d_to_hhh",
+  "d_to_ksh",
+  "d0_to_hhpi0",
+  "d0_to_kshh",
+  "d0_to_ksks",
+  "d0_to_hhhh",
+  "rare_charm",
+  "detection_asymmetry",
+]%}
+
+{% for id in subsamples %}
+{% for polarity in conditions %}
+
+{{id}}_2024_{{ polarity }}:
+  application: "DaVinci/v64r5"
+  input:
+    bk_query: "/LHCb/Collision24/Beam6800GeV-VeloClosed-{{polarity}}-Excl-UT/Real Data/Sprucing24c1/94000000/CHARM.DST"
+    dq_flags:
+      - UNCHECKED
+      - OK
+    keep_running: true
+  output: DVTUPLE_{{id}}.ROOT
+  options:
+    entrypoint: Charm_2024validation.main_{{id}}:main
+    extra_options:
+      input_raw_format: 0.5
+      input_type: ROOT
+      simulation: False
+      data_type: "Upgrade"
+      event_store: HiveWhiteBoard
+      geometry_version: run3/2024.Q1.2-v00.00
+      conditions_version: master
+      input_process: "TurboPass"
+      input_stream: "charm"
+
+{%- endfor %}
+{%- endfor %}
diff --git a/Charm_2024validation/main_d0_to_hh.py b/Charm_2024validation/main_d0_to_hh.py
new file mode 100644
index 0000000000..12eea15463
--- /dev/null
+++ b/Charm_2024validation/main_d0_to_hh.py
@@ -0,0 +1,58 @@
+###############################################################################
+# (c) Copyright 2021-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 .options.d0_to_hh import *
+from .options.d0_to_hh_MC import *
+
+from DaVinci import Options, make_config
+from PyConf.reading import get_pvs, get_rec_summary
+
+def main(options: Options):
+
+    # get ODIN and DecReports location
+    pvs = get_pvs()
+    rec_summary = get_rec_summary()
+
+    tuples = {
+        #D02hh
+        "D02Kpi" : maketuple_D02Kpi(options, pvs, rec_summary),
+        "D02KK" : maketuple_D02KK(options, pvs, rec_summary),
+        "D02pipi" : maketuple_D02pipi(options, pvs, rec_summary),
+        #Dst2D0pi_D02hh
+        "Dst2D0pi_D02Kpi_RS" : maketuple_Dst2D0pi_D02Kpi_RS(options, pvs, rec_summary),
+        "Dst2D0pi_D02Kpi_WS" : maketuple_Dst2D0pi_D02Kpi_WS(options, pvs, rec_summary),
+        "Dst2D0pi_D02KK" : maketuple_Dst2D0pi_D02KK(options, pvs, rec_summary),
+        "Dst2D0pi_D02pipi" : maketuple_Dst2D0pi_D02pipi(options, pvs, rec_summary),
+
+        ##LowBias
+        #D02hh
+        "D02Kpi_LowBias" : maketuple_D02Kpi_LowBias(options, pvs, rec_summary),
+        "D02KK_LowBias" : maketuple_D02KK_LowBias(options, pvs, rec_summary),
+        "D02pipi_LowBias" : maketuple_D02pipi_LowBias(options, pvs, rec_summary),
+        #Dst2D0pi_D02hh
+        "Dst2D0pi_D02Kpi_RS_LowBias" : maketuple_Dst2D0pi_D02Kpi_RS_LowBias(options, pvs, rec_summary),
+        "Dst2D0pi_D02Kpi_WS_LowBias" : maketuple_Dst2D0pi_D02Kpi_WS_LowBias(options, pvs, rec_summary),
+        "Dst2D0pi_D02KK_LowBias" : maketuple_Dst2D0pi_D02KK_LowBias(options, pvs, rec_summary),
+        "Dst2D0pi_D02pipi_LowBias" : maketuple_Dst2D0pi_D02pipi_LowBias(options, pvs, rec_summary),
+    }
+
+    MCtuples = {
+        "MC_Dst2D0pi_D02Kpi_RS" : maketuple_MC_Dst2D0pi_D02Kpi_RS(options, pvs, rec_summary),
+        "MC_Dst2D0pi_D02KK_RS" : maketuple_MC_Dst2D0pi_D02KK(options, pvs, rec_summary),
+        "MC_Dst2D0pi_D02pipi" : maketuple_MC_Dst2D0pi_D02pipi(options, pvs, rec_summary),
+    }
+
+    if options.simulation:
+        tuples = tuples | MCtuples
+
+    config = make_config(options, tuples)
+
+    return config
diff --git a/Charm_2024validation/main_d0_to_hhhh.py b/Charm_2024validation/main_d0_to_hhhh.py
new file mode 100644
index 0000000000..5fb555ccfd
--- /dev/null
+++ b/Charm_2024validation/main_d0_to_hhhh.py
@@ -0,0 +1,40 @@
+###############################################################################
+# (c) Copyright 2021-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 .options.d0_to_hhhh import *
+from .options.d0_to_hhhh_MC import *
+
+from DaVinci import Options, make_config
+from PyConf.reading import get_pvs, get_rec_summary
+
+def main(options: Options):
+        
+    # get ODIN and DecReports location
+    pvs = get_pvs()
+    rec_summary = get_rec_summary()
+
+    tuples = {
+        "DstToD0pi_D0ToKKPiPi" : maketuple_DstToD0pi_D0ToKKPiPi(options, pvs, rec_summary),
+        "DstToD0pi_D0ToKPiPiPi" : maketuple_DstToD0pi_D0ToKPiPiPi(options, pvs, rec_summary),
+        "DstToD0pi_D0ToPiKPiPi" : maketuple_DstToD0pi_D0ToPiKPiPi(options, pvs, rec_summary),
+        "DstToD0pi_D0ToPiPiPiPi" : maketuple_DstToD0pi_D0ToPiPiPiPi(options, pvs, rec_summary),
+    }
+
+    MCtuples = {
+        "MC_DstToD0pi_D0ToKPiPiPi" : maketuple_MC_DstToD0pi_D0ToKPiPiPi(options, pvs, rec_summary),
+    }
+    
+    if options.simulation:
+        tuples = tuples | MCtuples
+        
+    config = make_config(options, tuples)
+
+    return config
diff --git a/Charm_2024validation/main_d0_to_hhpi0.py b/Charm_2024validation/main_d0_to_hhpi0.py
new file mode 100644
index 0000000000..ac59dc71d9
--- /dev/null
+++ b/Charm_2024validation/main_d0_to_hhpi0.py
@@ -0,0 +1,43 @@
+###############################################################################
+# (c) Copyright 2021-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 .options.d0_to_hhpi0 import *
+from .options.d0_to_hhpi0_MC import *
+
+from DaVinci import Options, make_config
+from PyConf.reading import get_pvs, get_rec_summary
+
+def main(options: Options):
+        
+    # get ODIN and DecReports location
+    pvs = get_pvs()
+    rec_summary = get_rec_summary()
+
+    tuples = {
+        #Dst2D0pi_D02hhpi0
+        "Dst2D0pi_D02Kpipi0_M" : maketuple_Dst2D0pi_D02Kpipi0_M(options, pvs, rec_summary),
+        "Dst2D0pi_D02KKpi0_M" : maketuple_Dst2D0pi_D02KKpi0_M(options, pvs, rec_summary),
+        "Dst2D0pi_D02pipipi0_M" : maketuple_Dst2D0pi_D02pipipi0_M(options, pvs, rec_summary),
+        "Dst2D0pi_D02Kpipi0_R" : maketuple_Dst2D0pi_D02Kpipi0_R(options, pvs, rec_summary),
+        "Dst2D0pi_D02KKpi0_R" : maketuple_Dst2D0pi_D02KKpi0_R(options, pvs, rec_summary),
+        "Dst2D0pi_D02pipipi0_R" : maketuple_Dst2D0pi_D02pipipi0_R(options, pvs, rec_summary),
+    }
+
+    MCtuples = {
+        "MC_Dst2D0pi_D02Kpipi0" : maketuple_MC_Dst2D0pi_D02Kpipi0(options, pvs, rec_summary),
+    }
+    
+    if options.simulation:
+        tuples = tuples | MCtuples
+        
+    config = make_config(options, tuples)
+
+    return config
diff --git a/Charm_2024validation/main_d0_to_kshh.py b/Charm_2024validation/main_d0_to_kshh.py
new file mode 100644
index 0000000000..f9cfbd58e2
--- /dev/null
+++ b/Charm_2024validation/main_d0_to_kshh.py
@@ -0,0 +1,75 @@
+###############################################################################
+# (c) Copyright 2021-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 .options.d0_to_kshh import *
+from .options.d0_to_kshh_MC import *
+
+from DaVinci import Options, make_config
+from PyConf.reading import get_pvs, get_rec_summary
+
+def main(options: Options):
+
+    # get ODIN and DecReports location
+    pvs = get_pvs()
+    rec_summary = get_rec_summary()
+
+    tuples = {
+        #D02kshh
+        "D0ToKsPimPip_LL" : maketuple_D0ToKsPimPip_LL(options, pvs, rec_summary),
+        "D0ToKsPimPip_DD" : maketuple_D0ToKsPimPip_DD(options, pvs, rec_summary),
+        "D0ToKsKmPip_LL" : maketuple_D0ToKsKmPip_LL(options, pvs, rec_summary),
+        "D0ToKsKmPip_DD" : maketuple_D0ToKsKmPip_DD(options, pvs, rec_summary),
+        "D0ToKsKpPim_LL" : maketuple_D0ToKsKmPip_LL(options, pvs, rec_summary),
+        "D0ToKsKpPim_DD" : maketuple_D0ToKsKmPip_DD(options, pvs, rec_summary),
+        "D0ToKsKmKp_LL" : maketuple_D0ToKsKmKp_LL(options, pvs, rec_summary),
+        "D0ToKsKmKp_DD" : maketuple_D0ToKsKmKp_DD(options, pvs, rec_summary),
+        #Dst2D0pi_D02kshh
+        "DstpToD0Pip_D0ToKsPimPip_LL" : maketuple_DstpToD0Pip_D0ToKsPimPip_LL(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsPimPip_DD" : maketuple_DstpToD0Pip_D0ToKsPimPip_DD(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsKmPip_LL" : maketuple_DstpToD0Pip_D0ToKsKmPip_LL(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsKmPip_DD" : maketuple_DstpToD0Pip_D0ToKsKmPip_DD(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsKpPim_LL" : maketuple_DstpToD0Pip_D0ToKsKmPip_LL(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsKpPim_DD" : maketuple_DstpToD0Pip_D0ToKsKmPip_DD(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsKmKp_LL" : maketuple_DstpToD0Pip_D0ToKsKmKp_LL(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsKmKp_DD" : maketuple_DstpToD0Pip_D0ToKsKmKp_DD(options, pvs, rec_summary),
+
+        ##LowBias
+        #D02kshh
+        "D0ToKsPimPip_LL_LowBias" : maketuple_D0ToKsPimPip_LL_LowBias(options, pvs, rec_summary),
+        "D0ToKsPimPip_DD_LowBias" : maketuple_D0ToKsPimPip_DD_LowBias(options, pvs, rec_summary),
+        "D0ToKsKmPip_LL_LowBias" : maketuple_D0ToKsKmPip_LL_LowBias(options, pvs, rec_summary),
+        "D0ToKsKmPip_DD_LowBias" : maketuple_D0ToKsKmPip_DD_LowBias(options, pvs, rec_summary),
+        "D0ToKsKpPim_LL_LowBias" : maketuple_D0ToKsKmPip_LL_LowBias(options, pvs, rec_summary),
+        "D0ToKsKpPim_DD_LowBias" : maketuple_D0ToKsKmPip_DD_LowBias(options, pvs, rec_summary),
+        "D0ToKsKmKp_LL_LowBias" : maketuple_D0ToKsKmKp_LL_LowBias(options, pvs, rec_summary),
+        "D0ToKsKmKp_DD_LowBias" : maketuple_D0ToKsKmKp_DD_LowBias(options, pvs, rec_summary),
+        #Dst2D0pi_D02kshh
+        "DstpToD0Pip_D0ToKsPimPip_LL_LowBias" : maketuple_DstpToD0Pip_D0ToKsPimPip_LL_LowBias(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsPimPip_DD_LowBias" : maketuple_DstpToD0Pip_D0ToKsPimPip_DD_LowBias(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsKmPip_LL_LowBias" : maketuple_DstpToD0Pip_D0ToKsKmPip_LL_LowBias(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsKmPip_DD_LowBias" : maketuple_DstpToD0Pip_D0ToKsKmPip_DD_LowBias(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsKpPim_LL_LowBias" : maketuple_DstpToD0Pip_D0ToKsKmPip_LL_LowBias(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsKpPim_DD_LowBias" : maketuple_DstpToD0Pip_D0ToKsKmPip_DD_LowBias(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsKmKp_LL_LowBias" : maketuple_DstpToD0Pip_D0ToKsKmKp_LL_LowBias(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsKmKp_DD_LowBias" : maketuple_DstpToD0Pip_D0ToKsKmKp_DD_LowBias(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsPimPip_DD_NoBias" : maketuple_DstpToD0Pip_D0ToKsPimPip_LL_NoBias(options, pvs, rec_summary),
+    }
+
+    MCtuples = {
+        "MC_DstpToD0Pip_D0ToKsPimPip" : maketuple_MC_DstpToD0Pip_D0ToKsPimPip(options, pvs, rec_summary),
+    }
+
+    if options.simulation:
+        tuples = tuples | MCtuples
+
+    config = make_config(options, tuples)
+
+    return config
diff --git a/Charm_2024validation/main_d0_to_ksks.py b/Charm_2024validation/main_d0_to_ksks.py
new file mode 100644
index 0000000000..cb69552d78
--- /dev/null
+++ b/Charm_2024validation/main_d0_to_ksks.py
@@ -0,0 +1,59 @@
+###############################################################################
+# (c) Copyright 2021-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.                                       #
+###############################################################################
+import Functors as F
+from Functors.math import log
+from DaVinci import Options, make_config
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from FunTuple import FunctorCollection
+import FunTuple.functorcollections as FC
+from FunTuple import FunTuple_Particles as Funtuple
+
+#D02KSKS
+from .options.d0_to_ksks import *
+from .options.d0_to_ksks_MC import *
+
+from PyConf.reading import get_pvs, get_rec_summary
+
+def main(options: Options):
+
+    # get ODIN and DecReports location
+    pvs = get_pvs()
+    rec_summary = get_rec_summary()
+
+    tuples = {
+        #D02KSKS
+        "Dst2D0pi_D02KSKS_LLLL" : maketuple_Dst2D0pi_D02KSKS_LLLL(options, pvs, rec_summary),
+        "Dst2D0pi_D02KSKS_LLLL_Tight" : maketuple_Dst2D0pi_D02KSKS_LLLL_Tight(options, pvs, rec_summary),
+        "Dst2D0pi_D02KSKS_LLDD" : maketuple_Dst2D0pi_D02KSKS_LLDD(options, pvs, rec_summary),
+        "Dst2D0pi_D02KSKS_LLDD_Tight" : maketuple_Dst2D0pi_D02KSKS_LLDD_Tight(options, pvs, rec_summary),
+        "Dst2D0pi_D02KSKS_DDDD" : maketuple_Dst2D0pi_D02KSKS_DDDD(options, pvs, rec_summary),
+        "Dst2D0pi_D02KSKS_DDDD_Tight" : maketuple_Dst2D0pi_D02KSKS_DDDD_Tight(options, pvs, rec_summary),
+        "Dst2D0pi_D02KSKS_ULLL" : maketuple_Dst2D0pi_D02KSKS_ULLL(options, pvs, rec_summary),
+        "Dst2D0pi_D02KSKS_ULLL_Tight" : maketuple_Dst2D0pi_D02KSKS_ULLL_Tight(options, pvs, rec_summary),
+        "Dst2D0pi_D02KSKS_ULDD" : maketuple_Dst2D0pi_D02KSKS_ULDD(options, pvs, rec_summary),
+        "Dst2D0pi_D02KSKS_ULDD_Tight" : maketuple_Dst2D0pi_D02KSKS_ULDD_Tight(options, pvs, rec_summary),
+        "Dst2D0pi_D02KSKS_LLLD" : maketuple_Dst2D0pi_D02KSKS_LLLD(options, pvs, rec_summary),
+        "Dst2D0pi_D02KSKS_LLLD_Tight" : maketuple_Dst2D0pi_D02KSKS_LLLD_Tight(options, pvs, rec_summary),
+        "Dst2D0pi_D02KSKS_DDLD" : maketuple_Dst2D0pi_D02KSKS_DDLD(options, pvs, rec_summary),
+        "Dst2D0pi_D02KSKS_DDLD_Tight" : maketuple_Dst2D0pi_D02KSKS_DDLD_Tight(options, pvs, rec_summary),
+    }
+
+    MCtuples = {
+        "MC_Dst2D0pi_D02KSKS_LLLL" : maketuple_MC_Dst2D0pi_D02KSKS_LLLL(options, pvs, rec_summary)
+    }
+
+    if options.simulation:
+        tuples = tuples | MCtuples
+        
+    config = make_config(options, tuples)
+
+    return config
diff --git a/Charm_2024validation/main_d_to_hhh.py b/Charm_2024validation/main_d_to_hhh.py
new file mode 100644
index 0000000000..516e32b119
--- /dev/null
+++ b/Charm_2024validation/main_d_to_hhh.py
@@ -0,0 +1,63 @@
+###############################################################################
+# (c) Copyright 2021-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 .options.d_to_hhh import *
+from .options.d_to_hhh_MC import *
+from .options.detection_asymmetry import *
+
+from DaVinci import Options, make_config
+from PyConf.reading import get_pvs, get_rec_summary
+
+def main(options: Options):
+
+    # get ODIN and DecReports location
+    pvs = get_pvs()
+    rec_summary = get_rec_summary()
+
+    tuples = {
+        #D2hhh
+        "D2Kpipi" : maketuple_D2Kpipi(options, pvs, rec_summary),
+        "D2Kpipi_NoCuts" : maketuple_D2Kpipi(options, pvs, rec_summary,True),
+        #"D2Kpipi_Kpi" : maketuple_D2Kpipi_Kpi(options, pvs, rec_summary), #subcomb of 2 out of 3 daughters
+        "Ds2KKpi" : maketuple_Ds2KKpi(options, pvs, rec_summary),
+        "Ds2KKpi_NoCuts" : maketuple_Ds2KKpi(options, pvs, rec_summary,True),
+        "D2pipipi" : maketuple_D2pipipi(options, pvs, rec_summary),
+        "D2pipipi_NoCuts" : maketuple_D2pipipi(options, pvs, rec_summary,True),
+        "D2pipiK" : maketuple_D2pipiK(options, pvs, rec_summary),
+        "D2pipiK_NoCuts" : maketuple_D2pipiK(options, pvs, rec_summary,True),
+        "D2KKK" : maketuple_D2KKK(options, pvs, rec_summary),
+        "D2KKK_NoCuts" : maketuple_D2KKK(options, pvs, rec_summary,True),
+        "D2piKK" : maketuple_D2piKK(options, pvs, rec_summary),
+        "D2piKK_NoCuts" : maketuple_D2piKK(options, pvs, rec_summary,True),
+        "B02Dpi_D2KKpi" : maketuple_B02Dpi_D2KKpi(options, pvs, rec_summary),
+        "B02Dpi_D2pipipi" : maketuple_B02Dpi_D2pipipi(options, pvs, rec_summary),
+        "Bs02Dspi_Ds2KKpi" : maketuple_Bs02Dspi_Ds2KKpi(options, pvs, rec_summary),
+        "Bs02Dspi_Ds2pipipi" : maketuple_Bs02Dspi_Ds2pipipi(options, pvs, rec_summary),
+        #ADet
+        "D2Kpipi_ADet" : maketuple_D2Kpipi_ADet(options, pvs, rec_summary),
+        "D2pipipi_ADet" : maketuple_D2pipipi_ADet(options, pvs, rec_summary),
+        "Ds2KKpi_ADet" : maketuple_Ds2KKpi_ADet(options, pvs, rec_summary),
+
+
+    }
+
+    MCtuples = {
+        "MC_D2Kpipi" : maketuple_MC_D2Kpipi(options, pvs, rec_summary),
+        "MC_Ds2KKpi" : maketuple_MC_Ds2KKpi(options, pvs, rec_summary)
+        "MC_Ds2KKK" : maketuple_MC_Ds2KKK(options, pvs, rec_summary)
+    }
+
+    if options.simulation:
+        tuples = tuples | MCtuples
+
+    config = make_config(options, tuples)
+
+    return config
diff --git a/Charm_2024validation/main_d_to_ksh.py b/Charm_2024validation/main_d_to_ksh.py
new file mode 100644
index 0000000000..00ddc66093
--- /dev/null
+++ b/Charm_2024validation/main_d_to_ksh.py
@@ -0,0 +1,48 @@
+###############################################################################
+# (c) Copyright 2021-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 .options.d_to_ksh import *
+from .options.d_to_ksh_MC import *
+from .options.detection_asymmetry import *
+
+from DaVinci import Options, make_config
+from PyConf.reading import get_pvs, get_rec_summary
+
+def main(options: Options):
+
+    # get ODIN and DecReports location
+    pvs = get_pvs()
+    rec_summary = get_rec_summary()
+
+    tuples = {
+        #D2KSh
+        "D2KSpi_LL" : maketuple_D2KSpi_LL(options, pvs, rec_summary),
+        "D2KSK_LL" : maketuple_D2KSK_LL(options, pvs, rec_summary),
+        "D2KSpi_LD" : maketuple_D2KSpi_LD(options, pvs, rec_summary),
+        "D2KSK_LD" : maketuple_D2KSK_LD(options, pvs, rec_summary),
+        "D2KSpi_DD" : maketuple_D2KSpi_DD(options, pvs, rec_summary),
+        "D2KSK_DD" : maketuple_D2KSK_DD(options, pvs, rec_summary),
+        #ADet
+        "D2KSK_LL_ADet" : maketuple_D2KSK_LL_ADet(options, pvs, rec_summary),
+        "D2KSpi_LL_ADet" : maketuple_D2KSpi_LL_ADet(options, pvs, rec_summary),
+    }
+
+    MCtuples = {
+        "MC_D2KSK" : maketuple_MC_D2KSK(options, pvs, rec_summary),
+        "MC_D2KSpi" : maketuple_MC_D2KSpi(options, pvs, rec_summary),
+    }
+
+    if options.simulation:
+        tuples = tuples | MCtuples
+        
+    config = make_config(options, tuples)
+
+    return config
diff --git a/Charm_2024validation/main_detection_asymmetry.py b/Charm_2024validation/main_detection_asymmetry.py
new file mode 100644
index 0000000000..1ededecf77
--- /dev/null
+++ b/Charm_2024validation/main_detection_asymmetry.py
@@ -0,0 +1,31 @@
+###############################################################################
+# (c) Copyright 2021-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 .options.detection_asymmetry import *
+
+from DaVinci import Options, make_config
+from PyConf.reading import get_pvs, get_rec_summary
+
+def main(options: Options):
+        
+    # get ODIN and DecReports location
+    pvs = get_pvs()
+    rec_summary = get_rec_summary()
+
+    tuples = {
+        #ADet
+        "Lc2KSp_LL_ADet" : maketuple_Lc2KSp_LL_ADet(options, pvs, rec_summary),
+        "Lc2pKpi_ADet" : maketuple_Lc2pKpi_ADet(options, pvs, rec_summary),
+    }
+        
+    config = make_config(options, tuples)
+
+    return config
diff --git a/Charm_2024validation/main_dst_to_dee.py b/Charm_2024validation/main_dst_to_dee.py
new file mode 100644
index 0000000000..3084abe4e7
--- /dev/null
+++ b/Charm_2024validation/main_dst_to_dee.py
@@ -0,0 +1,42 @@
+###############################################################################
+# (c) Copyright 2021-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 .options.dst_to_dee import *
+
+from DaVinci import Options, make_config
+from PyConf.reading import get_pvs, get_rec_summary
+
+def main(options: Options):
+
+    # get ODIN and DecReports location
+    pvs = get_pvs()
+    rec_summary = get_rec_summary()
+
+    tuples = {
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS':             make_Dst0ToD0EmEp_D0ToKmPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS", pvs, rec_summary, 'dst_kpi_os'),
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS':             make_Dst0ToD0EmEp_D0ToKmPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS", pvs, rec_summary, 'dst_kpi_ss'),
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS_MVA':         make_Dst0ToD0EmEp_D0ToKmPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS_MVA", pvs, rec_summary, 'dst_kpi_os'),
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS_MVA':         make_Dst0ToD0EmEp_D0ToKmPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS_MVA", pvs, rec_summary, 'dst_kpi_ss'),
+
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS':       make_Dst0ToD0EmEp_D0ToKmPimPipPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS", pvs, rec_summary,'dst_k3pi_os' ),
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS':       make_Dst0ToD0EmEp_D0ToKmPimPipPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS", pvs, rec_summary, 'dst_k3pi_ss'),
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS_MVA':   make_Dst0ToD0EmEp_D0ToKmPimPipPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS_MVA", pvs, rec_summary, 'dst_k3pi_os'),
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS_MVA':   make_Dst0ToD0EmEp_D0ToKmPimPipPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS_MVA", pvs, rec_summary, 'dst_k3pi_ss'),
+
+    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS':     make_DstpToDpDspEmEp_DpDspToKmKpPip_tuple(options, "Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS", pvs, rec_summary, "dsstp_2kpi_os"),
+    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS':     make_DstpToDpDspEmEp_DpDspToKmKpPip_tuple(options, "Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS", pvs, rec_summary, "dsstp_2kpi_ss"),
+    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS_MVA': make_DstpToDpDspEmEp_DpDspToKmKpPip_tuple(options, "Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS_MVA", pvs, rec_summary, "dsstp_2kpi_os"),
+    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS_MVA': make_DstpToDpDspEmEp_DpDspToKmKpPip_tuple(options, "Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS_MVA", pvs, rec_summary, "dsstp_2kpi_ss"),
+    }
+
+    config = make_config(options, tuples)
+
+    return config
\ No newline at end of file
diff --git a/Charm_2024validation/main_rare_charm.py b/Charm_2024validation/main_rare_charm.py
new file mode 100644
index 0000000000..d38574262b
--- /dev/null
+++ b/Charm_2024validation/main_rare_charm.py
@@ -0,0 +1,41 @@
+###############################################################################
+# (c) Copyright 2021-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 .options.rare_charm import *
+#from .options.rare_charm_MC import *
+
+from DaVinci import Options, make_config
+from PyConf.reading import get_pvs, get_rec_summary
+
+def main(options: Options):
+        
+    # get ODIN and DecReports location
+    pvs = get_pvs()
+    rec_summary = get_rec_summary()
+
+    tuples = {
+        "D2pimumu" : maketuple_D2pimumu(options, pvs, rec_summary),
+        "D2pimumu_WS" : maketuple_D2pimumu_WS(options, pvs, rec_summary),
+        "CharmRD_D2pipipi" : maketuple_D2pipipi(options, pvs, rec_summary),
+        "D2piee" : maketuple_D2piee(options, pvs, rec_summary),
+        "Lc2pmumu" : maketuple_Lc2pmumu(options, pvs, rec_summary),
+        "Dst2D0pi_D02Kpimumu_RS" : maketuple_Dst2D0pi_D02Kpimumu_RS(options, pvs, rec_summary),
+    }
+
+    MCtuples = {
+    }
+    
+    if options.simulation:
+        tuples = tuples | MCtuples
+        
+    config = make_config(options, tuples)
+
+    return config
diff --git a/Charm_2024validation/options/d0_to_hh.py b/Charm_2024validation/options/d0_to_hh.py
new file mode 100644
index 0000000000..80a3cdcec2
--- /dev/null
+++ b/Charm_2024validation/options/d0_to_hh.py
@@ -0,0 +1,432 @@
+from .tupling import (
+    make_composite_variables,
+    make_basic_variables,
+    make_hlt2_event_variables,
+    make_DeltaM_variable,
+    make_composite_dtf_variables,
+    make_basic_dtf_variables,
+)
+
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from FunTuple import FunTuple_Particles as Funtuple
+
+
+def make_dtf_variables(options, pvs, input_data, ptype):
+
+    if ptype not in ["basic", "composite"]:
+        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
+
+    from DecayTreeFitter import DecayTreeFitter
+    
+    DTF = DecayTreeFitter(
+        name=f'DTF_{{hash}}',
+        input_particles=input_data)
+
+    DTFvtx = DecayTreeFitter(
+        name=f'DTFvtx_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    DTFmass = DecayTreeFitter(
+        name=f'DTFmass_{{hash}}',
+        input_particles=input_data,
+        mass_constraints=["D0"])
+
+    DTFvtxmass = DecayTreeFitter(
+        name=f'DTFvtxmass_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0"])
+
+    if ptype == "basic":
+        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmass,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="D0")
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmass,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="D0")
+        return dtf_vars
+
+    if ptype == "composite":
+        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmass,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="D0")
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmass,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="D0")
+        return dtf_vars
+
+def maketuple_D02KK_LowBias(options, pvs, rec_summary):
+    name = "D02KK_LowBias"
+    turbo_line = "Hlt2Charm_D0ToKmKp_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> K- K+]CC",
+        "Km"   : "[D0 -> ^K- K+]CC",
+        "Kp"  : "[D0 -> K- ^K+]CC",
+    }
+
+    variables = {
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D02KK(options, pvs, rec_summary):
+    name = "D02KK"
+    turbo_line = "Hlt2Charm_D0ToKmKp"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> K- K+]CC",
+        "Km"   : "[D0 -> ^K- K+]CC",
+        "Kp"  : "[D0 -> K- ^K+]CC",
+    }
+
+    variables = {
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D02Kpi_LowBias(options, pvs, rec_summary):
+    name = "D02Kpi_LowBias"
+    turbo_line = "Hlt2Charm_D0ToKmPip_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> K- pi+]CC",
+        "Km"   : "[D0 -> ^K- pi+]CC",
+        "pip"  : "[D0 -> K- ^pi+]CC",
+    }
+
+    variables = {
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D02Kpi(options, pvs, rec_summary):
+    name = "D02Kpi"
+    turbo_line = "Hlt2Charm_D0ToKmPip"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> K- pi+]CC",
+        "Km"   : "[D0 -> ^K- pi+]CC",
+        "pip"  : "[D0 -> K- ^pi+]CC",
+    }
+
+    variables = {
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D02pipi_LowBias(options, pvs, rec_summary):
+    name = "D02pipi_LowBias"
+    turbo_line = "Hlt2Charm_D0ToPimPip_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> pi- pi+]CC",
+        "pim"   : "[D0 -> ^pi- pi+]CC",
+        "pip"  : "[D0 -> pi- ^pi+]CC",
+    }
+
+    variables = {
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D02pipi(options, pvs, rec_summary):
+    name = "D02pipi"
+    turbo_line = "Hlt2Charm_D0ToPimPip"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> pi- pi+]CC",
+        "pim"   : "[D0 -> ^pi- pi+]CC",
+        "pip"  : "[D0 -> pi- ^pi+]CC",
+    }
+
+    variables = {
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02KK_LowBias(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02KK_LowBias"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmKp_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> ([D0]CC -> K- K+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> K- K+) pi+]CC",
+        "Km"   : "[D*(2010)+ -> ([D0]CC -> ^K- K+) pi+]CC",
+        "Kp"  : "[D*(2010)+ -> ([D0]CC -> K- ^K+) pi+]CC",
+        "spip" : "[D*(2010)+ -> ([D0]CC -> K- K+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02KK(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02KK"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmKp"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> ([D0]CC -> K- K+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> K- K+) pi+]CC",
+        "Km"   : "[D*(2010)+ -> ([D0]CC -> ^K- K+) pi+]CC",
+        "Kp"  : "[D*(2010)+ -> ([D0]CC -> K- ^K+) pi+]CC",
+        "spip" : "[D*(2010)+ -> ([D0]CC -> K- K+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02Kpi_RS_LowBias(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02Kpi_RS_LowBias"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPip_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> (D0 -> K- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^(D0 -> K- pi+) pi+]CC",
+        "Km"   : "[D*(2010)+ -> (D0 -> ^K- pi+) pi+]CC",
+        "pip"  : "[D*(2010)+ -> (D0 -> K- ^pi+) pi+]CC",
+        "spip" : "[D*(2010)+ -> (D0 -> K- pi+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02Kpi_RS(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02Kpi_RS"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPip"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> (D0 -> K- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^(D0 -> K- pi+) pi+]CC",
+        "Km"   : "[D*(2010)+ -> (D0 -> ^K- pi+) pi+]CC",
+        "pip"  : "[D*(2010)+ -> (D0 -> K- ^pi+) pi+]CC",
+        "spip" : "[D*(2010)+ -> (D0 -> K- pi+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02Kpi_WS_LowBias(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02Kpi_WS_LowBias"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKpPim_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> (D0 -> K+ pi-) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^(D0 -> K+ pi-) pi+]CC",
+        "Kp"   : "[D*(2010)+ -> (D0 -> ^K+ pi-) pi+]CC",
+        "pim"  : "[D*(2010)+ -> (D0 -> K+ ^pi-) pi+]CC",
+        "spip" : "[D*(2010)+ -> (D0 -> K+ pi-) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Kp"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pim"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02Kpi_WS(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02Kpi_WS"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKpPim"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> (D0 -> K+ pi-) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^(D0 -> K+ pi-) pi+]CC",
+        "Kp"   : "[D*(2010)+ -> (D0 -> ^K+ pi-) pi+]CC",
+        "pim"  : "[D*(2010)+ -> (D0 -> K+ ^pi-) pi+]CC",
+        "spip" : "[D*(2010)+ -> (D0 -> K+ pi-) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Kp"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pim"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02pipi_LowBias(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02pipi_LowBias"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimPip_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> ([D0]CC -> pi- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> pi- pi+) pi+]CC",
+        "pim"   : "[D*(2010)+ -> ([D0]CC -> ^pi- pi+) pi+]CC",
+        "pip"  : "[D*(2010)+ -> ([D0]CC -> pi- ^pi+) pi+]CC",
+        "spip" : "[D*(2010)+ -> ([D0]CC -> pi- pi+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02pipi(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02pipi"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimPip"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> ([D0]CC -> pi- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> pi- pi+) pi+]CC",
+        "pim"   : "[D*(2010)+ -> ([D0]CC -> ^pi- pi+) pi+]CC",
+        "pip"  : "[D*(2010)+ -> ([D0]CC -> pi- ^pi+) pi+]CC",
+        "spip" : "[D*(2010)+ -> ([D0]CC -> pi- pi+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
diff --git a/Charm_2024validation/options/d0_to_hh_MC.py b/Charm_2024validation/options/d0_to_hh_MC.py
new file mode 100644
index 0000000000..aaae05665d
--- /dev/null
+++ b/Charm_2024validation/options/d0_to_hh_MC.py
@@ -0,0 +1,99 @@
+from .tupling import (
+    make_MC_composite_variables,
+    make_MC_basic_variables,
+    make_MC_event_variables,
+)
+
+from PyConf.reading import get_mc_particles, get_mc_header
+from FunTuple import FunTuple_MCParticles as FuntupleMC
+
+def maketuple_MC_Dst2D0pi_D02Kpi_RS(options, pvs, rec_summary):
+    name = "MC_Dst2D0pi_D02Kpi_RS"
+    line = "/Event/MC/Particles"
+
+    input_data = get_mc_particles(f"{line}")
+
+    branches = {
+        "Dst" : "[D*(2010)+ ==> (D0 ==> K- pi+ ) pi+]CC",
+        "D0"  : "[D*(2010)+ ==> ^(D0 ==> K- pi+ ) pi+]CC",
+        "Km"   : "[D*(2010)+ ==> (D0 ==> ^K- pi+ ) pi+]CC",
+        "pip"  : "[D*(2010)+ ==> (D0 ==> K- ^pi+ ) pi+]CC",
+        "spip" : "[D*(2010)+ ==> (D0 ==> K- pi+ ) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_MC_composite_variables(),
+        "D0"    : make_MC_composite_variables(),
+        "Km"     : make_MC_basic_variables(),
+        "pip"    : make_MC_basic_variables(),
+        "spip"   : make_MC_basic_variables(),
+    }
+
+    mytuple  = FuntupleMC(name=name,
+                          tuple_name="MCDecayTree",
+                          fields=branches, variables = variables,
+                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
+                          inputs=input_data)
+
+    return [mytuple]
+
+def maketuple_MC_Dst2D0pi_D02KK(options, pvs, rec_summary):
+    name = "MC_Dst2D0pi_D02KK"
+    line = "/Event/MC/Particles"
+
+    input_data = get_mc_particles(f"{line}")
+
+    branches = {
+        "Dst" : "[D*(2010)+ ==> ([D0]CC ==> K- K+) pi+]CC",
+        "D0"  : "[D*(2010)+ ==> ^([D0]CC ==> K- K+) pi+]CC",
+        "Km"   : "[D*(2010)+ ==> ([D0]CC ==> ^K- K+) pi+]CC",
+        "Kp"  : "[D*(2010)+ ==> ([D0]CC ==> K- ^K+) pi+]CC",
+        "spip" : "[D*(2010)+ ==> ([D0]CC ==> K- K+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_MC_composite_variables(),
+        "D0"    : make_MC_composite_variables(),
+        "Km"     : make_MC_basic_variables(),
+        "Kp"    : make_MC_basic_variables(),
+        "spip"   : make_MC_basic_variables(),
+    }
+
+    mytuple  = FuntupleMC(name=name,
+                        tuple_name="MCDecayTree",
+                        fields=branches, variables = variables,
+                        event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
+                        inputs=input_data)
+
+    return [mytuple]
+
+
+def maketuple_MC_Dst2D0pi_D02pipi(options, pvs, rec_summary):
+    name = "MC_Dst2D0pi_D02pipi"
+    line = "/Event/MC/Particles"
+
+    input_data = get_mc_particles(f"{line}")
+
+    branches = {
+        "Dst" : "[D*(2010)+ ==> ([D0]CC ==> pi- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ ==> ^([D0]CC ==> pi- pi+) pi+]CC",
+        "pim"   : "[D*(2010)+ ==> ([D0]CC ==> ^pi- pi+) pi+]CC",
+        "pip"  : "[D*(2010)+ ==> ([D0]CC ==> pi- ^pi+) pi+]CC",
+        "spip" : "[D*(2010)+ ==> ([D0]CC ==> pi- pi+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_MC_composite_variables(),
+        "D0"    : make_MC_composite_variables(),
+        "pim"     : make_MC_basic_variables(),
+        "pip"    : make_MC_basic_variables(),
+        "spip"   : make_MC_basic_variables(),
+    }
+
+    mytuple  = FuntupleMC(name=name,
+                        tuple_name="MCDecayTree",
+                        fields=branches, variables = variables,
+                        event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
+                        inputs=input_data)
+
+    return [mytuple]
diff --git a/Charm_2024validation/options/d0_to_hhhh.py b/Charm_2024validation/options/d0_to_hhhh.py
new file mode 100644
index 0000000000..0277430fb9
--- /dev/null
+++ b/Charm_2024validation/options/d0_to_hhhh.py
@@ -0,0 +1,247 @@
+from .tupling import (
+    make_composite_variables,
+    make_composite_variables_4body,
+    make_composite_variables_3body,
+    make_basic_variables,
+    make_hlt2_event_variables,
+    make_DeltaM_variable,
+    make_basic_dtf_variables,
+    make_composite_dtf_variables
+)
+
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from FunTuple import FunTuple_Particles as Funtuple
+from DecayTreeFitter import DecayTreeFitter
+
+# I can't get make_composite_variables_4body to work for some reason...
+import Functors as F
+from FunTuple import FunctorCollection
+variables_4body = (
+    FunctorCollection(
+        {
+            #14
+            "M14": F.SUBCOMB(Functor=F.MASS, Indices=(1, 4)),
+            "SDOCA14"     : F.SDOCA(Child1=1,Child2=4),
+            "SDOCACHI214" : F.SDOCACHI2(Child1=1,Child2=4),
+            "DOCA14"      : F.DOCA(Child1=1,Child2=4),
+            "DOCACHI214"  : F.DOCACHI2(Child1=1,Child2=4),
+            "COS14": F.ALV(1, 4),
+            #24
+            "M24": F.SUBCOMB(Functor=F.MASS, Indices=(2, 4)),
+            "SDOCA24"     : F.SDOCA(Child1=2,Child2=4),
+            "SDOCACHI224" : F.SDOCACHI2(Child1=2,Child2=4),
+            "DOCA24"      : F.DOCA(Child1=2,Child2=4),
+            "DOCACHI224"  : F.DOCACHI2(Child1=2,Child2=4),
+            "COS24": F.ALV(2, 4),
+            #34
+            "M34": F.SUBCOMB(Functor=F.MASS, Indices=(3, 4)),
+            "SDOCA34"     : F.SDOCA(Child1=3,Child2=4),
+            "SDOCACHI234" : F.SDOCACHI2(Child1=3,Child2=4),
+            "DOCA34"      : F.DOCA(Child1=3,Child2=4),
+            "DOCACHI234"  : F.DOCACHI2(Child1=3,Child2=4),
+            "COS34": F.ALV(3, 4),
+        }
+    )
+)
+
+
+def maketuple_DstToD0pi_D0ToKKPiPi(options, pvs, rec_summary):
+    name = "DstToD0pi_D0ToKKPiPi"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmKpPimPip"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> ([D0]CC -> K+ K- pi+ pi-) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> K+ K- pi+ pi-) pi+]CC",
+        "h1"  : "[D*(2010)+ -> ([D0]CC -> ^K+ K- pi+ pi-) pi+]CC",
+        "h2"  : "[D*(2010)+ -> ([D0]CC -> K+ ^K- pi+ pi-) pi+]CC",
+        "h3"  : "[D*(2010)+ -> ([D0]CC -> K+ K- ^pi+ pi-) pi+]CC",
+        "h4"  : "[D*(2010)+ -> ([D0]CC -> K+ K- pi+ ^pi-) pi+]CC",
+        "pis" : "[D*(2010)+ -> ([D0]CC -> K+ K- pi+ pi-) ^pi+]CC",
+    }
+
+    DTF_PV = DecayTreeFitter(
+        name='DTF_D0ToKKPiPi_PV',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    basic_variables = make_basic_variables(options, pvs, input_data) +\
+        make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)
+
+    composite_dtf_variables = make_composite_dtf_variables(options,
+                                                           pvs,
+                                                           input_data,
+                                                           DTF=DTF_PV,
+                                                           pv_constraint=True)
+
+    composite_variables = make_composite_variables(options, pvs, input_data) + composite_dtf_variables
+        
+
+    composite_variables_4body = make_composite_variables_3body(options, pvs, input_data) + composite_dtf_variables + variables_4body
+
+    variables = {
+        "Dst"   : composite_variables+make_DeltaM_variable(options),
+        "D0"    : composite_variables_4body,
+        "h1"    : basic_variables,
+        "h2"    : basic_variables,
+        "h3"    : basic_variables,
+        "h4"    : basic_variables,
+        "pis"   : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstToD0pi_D0ToKPiPiPi(options, pvs, rec_summary):
+    name = "DstToD0pi_D0ToKPiPiPi"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPimPipPip"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> (D0 -> K- pi+ pi- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^(D0 -> K- pi+ pi- pi+) pi+]CC",
+        "h1"   : "[D*(2010)+ -> (D0 -> ^K- pi+ pi- pi+) pi+]CC",
+        "h2"  : "[D*(2010)+ -> (D0 -> K- ^pi+ pi- pi+) pi+]CC",
+        "h3"   : "[D*(2010)+ -> (D0 -> K- pi+ ^pi- pi+) pi+]CC",
+        "h4"  : "[D*(2010)+ -> (D0 -> K- pi+ pi- ^pi+) pi+]CC",
+        "pis" : "[D*(2010)+ -> (D0 -> K- pi+ pi- pi+) ^pi+]CC",
+    }
+
+    DTF_PV = DecayTreeFitter(
+        name='DTF_D0ToKPiPiPi_PV',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    basic_variables = make_basic_variables(options, pvs, input_data) +\
+        make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True, mass_constraint=False)
+
+    composite_dtf_variables = make_composite_dtf_variables(options,
+                                                           pvs,
+                                                           input_data,
+                                                           DTF=DTF_PV,
+                                                           pv_constraint=True)
+
+    composite_variables = make_composite_variables(options, pvs, input_data) + composite_dtf_variables
+        
+
+    composite_variables_4body = make_composite_variables_3body(options, pvs, input_data) + composite_dtf_variables + variables_4body
+
+    variables = {
+        "Dst"   : composite_variables+make_DeltaM_variable(options),
+        "D0"    : composite_variables_4body,
+        "h1"    : basic_variables,
+        "h2"    : basic_variables,
+        "h3"    : basic_variables,
+        "h4"    : basic_variables,
+        "pis"   : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstToD0pi_D0ToPiKPiPi(options, pvs, rec_summary):
+    name = "DstToD0pi_D0ToPiKPiPi"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKpPimPimPip"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> (D0 -> pi- K+ pi- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^(D0 -> pi- K+ pi- pi+) pi+]CC",
+        "h1"   : "[D*(2010)+ -> (D0 -> ^pi- K+ pi- pi+) pi+]CC",
+        "h2"  : "[D*(2010)+ -> (D0 -> pi- ^K+ pi- pi+) pi+]CC",
+        "h3"   : "[D*(2010)+ -> (D0 -> pi- K+ ^pi- pi+) pi+]CC",
+        "h4"  : "[D*(2010)+ -> (D0 -> pi- K+ pi- ^pi+) pi+]CC",
+        "pis" : "[D*(2010)+ -> (D0 -> pi- K+ pi- pi+) ^pi+]CC",
+    }
+
+    DTF_PV = DecayTreeFitter(
+        name='DTF_D0ToPiKPiPi_PV',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    basic_variables = make_basic_variables(options, pvs, input_data) +\
+        make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True, mass_constraint=False)
+
+    composite_dtf_variables = make_composite_dtf_variables(options,
+                                                           pvs,
+                                                           input_data,
+                                                           DTF=DTF_PV,
+                                                           pv_constraint=True)
+
+    composite_variables = make_composite_variables(options, pvs, input_data) + composite_dtf_variables
+        
+
+    composite_variables_4body = make_composite_variables_3body(options, pvs, input_data) + composite_dtf_variables + variables_4body
+
+    variables = {
+        "Dst"   : composite_variables+make_DeltaM_variable(options),
+        "D0"    : composite_variables_4body,
+        "h1"    : basic_variables,
+        "h2"    : basic_variables,
+        "h3"    : basic_variables,
+        "h4"    : basic_variables,
+        "pis"   : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstToD0pi_D0ToPiPiPiPi(options, pvs, rec_summary):
+    name = "DstToD0pi_D0ToPiPiPiPi"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimPimPipPip"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> ([D0]CC -> pi+ pi- pi+ pi-) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> pi+ pi- pi+ pi-) pi+]CC",
+        "h1"  : "[D*(2010)+ -> ([D0]CC -> ^pi+ pi- pi+ pi-) pi+]CC",
+        "h2"  : "[D*(2010)+ -> ([D0]CC -> pi+ ^pi- pi+ pi-) pi+]CC",
+        "h3"  : "[D*(2010)+ -> ([D0]CC -> pi+ pi- ^pi+ pi-) pi+]CC",
+        "h4"  : "[D*(2010)+ -> ([D0]CC -> pi+ pi- pi+ ^pi-) pi+]CC",
+        "pis" : "[D*(2010)+ -> ([D0]CC -> pi+ pi- pi+ pi-) ^pi+]CC",
+    }
+
+    DTF_PV = DecayTreeFitter(
+        name='DTF_D0ToPiPiPiPi_PV',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    basic_variables = make_basic_variables(options, pvs, input_data) +\
+        make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True, mass_constraint=False)
+
+    composite_dtf_variables = make_composite_dtf_variables(options,
+                                                           pvs,
+                                                           input_data,
+                                                           DTF=DTF_PV,
+                                                           pv_constraint=True)
+
+    composite_variables = make_composite_variables(options, pvs, input_data) + composite_dtf_variables
+        
+
+    composite_variables_4body = make_composite_variables_3body(options, pvs, input_data) + composite_dtf_variables + variables_4body
+
+    variables = {
+        "Dst"   : composite_variables+make_DeltaM_variable(options),
+        "D0"    : composite_variables_4body,
+        "h1"    : basic_variables,
+        "h2"    : basic_variables,
+        "h3"    : basic_variables,
+        "h4"    : basic_variables,
+        "pis"   : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
diff --git a/Charm_2024validation/options/d0_to_hhhh_MC.py b/Charm_2024validation/options/d0_to_hhhh_MC.py
new file mode 100644
index 0000000000..2dbe198fa9
--- /dev/null
+++ b/Charm_2024validation/options/d0_to_hhhh_MC.py
@@ -0,0 +1,43 @@
+from .tupling import (
+    make_MC_composite_variables,
+    make_MC_basic_variables,
+    make_MC_event_variables,
+)
+
+from PyConf.reading import get_mc_particles, get_mc_header
+from FunTuple import FunTuple_MCParticles as FuntupleMC
+
+def maketuple_MC_DstToD0pi_D0ToKPiPiPi(options, pvs, rec_summary):
+    name = "MC_DstToD0pi_D0ToKPiPiPi"
+
+    line = "/Event/MC/Particles"
+    
+    input_data = get_mc_particles(f"{line}")
+
+    branches = {
+        "Dst" : "[D*(2010)+ ==> (D0 ==> K- pi+ pi- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ ==> ^(D0 ==> K- pi+ pi- pi+) pi+]CC",
+        "h1"   : "[D*(2010)+ ==> (D0 ==> ^K- pi+ pi- pi+) pi+]CC",
+        "h2"  : "[D*(2010)+ ==> (D0 ==> K- ^pi+ pi- pi+) pi+]CC",
+        "h3"   : "[D*(2010)+ ==> (D0 ==> K- pi+ ^pi- pi+) pi+]CC",
+        "h4"  : "[D*(2010)+ ==> (D0 ==> K- pi+ pi- ^pi+) pi+]CC",
+        "pis" : "[D*(2010)+ ==> (D0 ==> K- pi+ pi- pi+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_MC_composite_variables(),
+        "D0"    : make_MC_composite_variables(),
+        "h1"     : make_MC_basic_variables(),
+        "h2"    : make_MC_basic_variables(),
+        "h3"    : make_MC_basic_variables(),
+        "h4"    : make_MC_basic_variables(),
+        "pis"   : make_MC_basic_variables(),
+    }
+
+    mytuple  = FuntupleMC(name=name,
+                          tuple_name="MCDecayTree",
+                          fields=branches, variables = variables,  
+                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])), 
+                          inputs=input_data)
+
+    return [mytuple]
diff --git a/Charm_2024validation/options/d0_to_hhpi0.py b/Charm_2024validation/options/d0_to_hhpi0.py
new file mode 100644
index 0000000000..cf3c3ba59f
--- /dev/null
+++ b/Charm_2024validation/options/d0_to_hhpi0.py
@@ -0,0 +1,359 @@
+from .tupling import (
+    make_composite_variables,
+    make_DeltaM_variable,
+    make_basic_variables,
+    make_hlt2_event_variables,
+    make_top_isolation_variables,
+    make_basic_isolation_variables,
+    make_intermediate_isolation_variables,
+    make_composite_dtf_variables,
+    make_basic_dtf_variables,
+)
+
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from FunTuple import FunTuple_Particles as Funtuple
+
+iso_vars_locations = ["LongTrackIso", "NeutralIso", "PizIso"]
+
+def make_dtf_variables(options, pvs, input_data, ptype):
+
+    if ptype not in ["basic", "composite"]:
+        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
+
+    from DecayTreeFitter import DecayTreeFitter
+    
+    DTF = DecayTreeFitter(
+        name=f'DTF_{{hash}}',
+        input_particles=input_data)
+
+    DTFvtx = DecayTreeFitter(
+        name=f'DTFvtx_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    DTFmass = DecayTreeFitter(
+        name=f'DTFmass_{{hash}}',
+        input_particles=input_data,
+        mass_constraints=["D0"])
+
+    DTFvtxmass = DecayTreeFitter(
+        name=f'DTFvtxmass_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0"])
+
+    if ptype == "basic":
+        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmass,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="D0")
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmass,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="D0")
+        return dtf_vars
+
+    if ptype == "composite":
+        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmass,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="D0")
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmass,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="D0")
+        return dtf_vars
+
+
+def maketuple_Dst2D0pi_D02KKpi0_M(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02KKpi0_M"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmKpPi0_M"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) pi0) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (phi(1020) -> K- K+) pi0) pi+]CC",
+        "phi"   : "[D*(2010)+ -> ([D0]CC -> ^(phi(1020) -> K- K+) pi0) pi+]CC",
+        "Km"   : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> ^K- K+) pi0) pi+]CC",
+        "Kp"  : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- ^K+) pi0) pi+]CC",
+        "pi0"  : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) ^pi0) pi+]CC",
+        "spip" : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) pi0) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "phi"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation:
+
+        variables = {
+            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="D0"),
+            "phi"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="phi(1020)"),
+            "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02KKpi0_R(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02KKpi0_R"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmKpPi0_R"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) (pi0 -> gamma gamma) ) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (phi(1020) -> K- K+) (pi0 -> gamma gamma) ) pi+]CC",
+        "phi"   : "[D*(2010)+ -> ([D0]CC -> ^(phi(1020) -> K- K+) (pi0 -> gamma gamma) ) pi+]CC",
+        "Km"   : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> ^K- K+) (pi0 -> gamma gamma) ) pi+]CC",
+        "Kp"  : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- ^K+) (pi0 -> gamma gamma) ) pi+]CC",
+        "pi0"  : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) ^(pi0 -> gamma gamma) ) pi+]CC",
+        "gamma1"  : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) (pi0 -> ^gamma gamma) ) pi+]CC",
+        "gamma2"  : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) (pi0 -> gamma ^gamma) ) pi+]CC",
+        "spip" : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) (pi0 -> gamma gamma) ) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "phi"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "gamma1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "gamma2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation:
+
+        variables = {
+            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="D0"),
+            "phi"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="phi(1020)"),
+            "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="pi0"),
+            "gamma1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "gamma2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02Kpipi0_M(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02Kpipi0_M"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPipPi0_M"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) pi0) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^(D0 -> (K*(892)~0 -> K- pi+) pi0) pi+]CC",
+        "Kst"   : "[D*(2010)+ -> (D0 -> ^(K*(892)~0 -> K- pi+) pi0) pi+]CC",
+        "Km"   : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> ^K- pi+) pi0) pi+]CC",
+        "pip"  : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- ^pi+) pi0) pi+]CC",
+        "pi0"  : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) ^pi0) pi+]CC",
+        "spip" : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) pi0) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Kst"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation:
+
+        variables = {
+            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="D0"),
+            "Kst"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="K*(892)~0"),
+            "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02Kpipi0_R(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02Kpipi0_R"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPipPi0_R"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) (pi0 -> gamma gamma) ) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^(D0 -> (K*(892)~0 -> K- pi+) (pi0 -> gamma gamma) ) pi+]CC",
+        "Kst"   : "[D*(2010)+ -> (D0 -> ^(K*(892)~0 -> K- pi+) (pi0 -> gamma gamma) ) pi+]CC",
+        "Km"   : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> ^K- pi+) (pi0 -> gamma gamma) ) pi+]CC",
+        "pip"  : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- ^pi+) (pi0 -> gamma gamma) ) pi+]CC",
+        "pi0"  : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) ^(pi0 -> gamma gamma) ) pi+]CC",
+        "gamma1"  : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) (pi0 -> ^gamma gamma) ) pi+]CC",
+        "gamma2"  : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) (pi0 -> gamma ^gamma) ) pi+]CC",
+        "spip" : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) (pi0 -> gamma gamma) ) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Kst"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "gamma1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "gamma2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation:
+
+        variables = {
+            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="D0"),
+            "Kst"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="K*(892)~0"),
+            "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="pi0"),
+            "gamma1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "gamma2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02pipipi0_M(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02pipipi0_M"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimPipPi0_M"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) pi0) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (rho(770)0 -> pi- pi+) pi0) pi+]CC",
+        "rho"   : "[D*(2010)+ -> ([D0]CC -> ^(rho(770)0 -> pi- pi+) pi0) pi+]CC",
+        "pim"   : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> ^pi- pi+) pi0) pi+]CC",
+        "pip"  : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- ^pi+) pi0) pi+]CC",
+        "pi0"  : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) ^pi0) pi+]CC",
+        "spip" : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) pi0) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "rho"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation:
+
+        variables = {
+            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="D0"),
+            "rho"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="rho(770)0"),
+            "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02pipipi0_R(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02pipipi0_R"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimPipPi0_R"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) (pi0 -> gamma gamma) ) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (rho(770)0 -> pi- pi+) (pi0 -> gamma gamma) ) pi+]CC",
+        "rho"   : "[D*(2010)+ -> ([D0]CC -> ^(rho(770)0 -> pi- pi+) (pi0 -> gamma gamma) ) pi+]CC",
+        "pim"   : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> ^pi- pi+) (pi0 -> gamma gamma) ) pi+]CC",
+        "pip"  : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- ^pi+) (pi0 -> gamma gamma) ) pi+]CC",
+        "pi0"  : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) ^(pi0 -> gamma gamma) ) pi+]CC",
+        "gamma1"  : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) (pi0 -> ^gamma gamma) ) pi+]CC",
+        "gamma2"  : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) (pi0 -> gamma ^gamma) ) pi+]CC",
+        "spip" : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) (pi0 -> gamma gamma) ) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "rho"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "gamma1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "gamma2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation:
+
+        variables = {
+            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="D0"),
+            "rho"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="rho(770)0"),
+            "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="pi0"),
+            "gamma1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "gamma2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
diff --git a/Charm_2024validation/options/d0_to_hhpi0_MC.py b/Charm_2024validation/options/d0_to_hhpi0_MC.py
new file mode 100644
index 0000000000..84648f4e71
--- /dev/null
+++ b/Charm_2024validation/options/d0_to_hhpi0_MC.py
@@ -0,0 +1,44 @@
+from .tupling import (
+    make_MC_composite_variables,
+    make_MC_basic_variables,
+    make_MC_event_variables,
+)
+
+from PyConf.reading import get_mc_particles, get_mc_header
+from FunTuple import FunTuple_MCParticles as FuntupleMC
+
+def maketuple_MC_Dst2D0pi_D02Kpipi0(options, pvs, rec_summary):
+    name = "MC_Dst2D0pi_D02Kpipi0"
+    line = "/Event/MC/Particles"
+    
+    input_data = get_mc_particles(f"{line}")
+
+    branches = {
+        "Dst" : "[D*(2010)+ ==> (D0 ==> K- pi+ (pi0 ==> gamma gamma) ) pi+]CC",
+        "D0"  : "[D*(2010)+ ==> ^(D0 ==> K- pi+ (pi0 ==> gamma gamma) ) pi+]CC",
+        "Km"   : "[D*(2010)+ ==> (D0 ==> ^K- pi+ (pi0 ==> gamma gamma) ) pi+]CC",
+        "pip"  : "[D*(2010)+ ==> (D0 ==> K- ^pi+ (pi0 ==> gamma gamma) ) pi+]CC",
+        "pi0"  : "[D*(2010)+ ==> (D0 ==> K- pi+ ^(pi0 ==> gamma gamma) ) pi+]CC",
+        "gamma1"  : "[D*(2010)+ ==> (D0 ==> K- pi+ (pi0 ==> ^gamma gamma) ) pi+]CC",
+        "gamma2"  : "[D*(2010)+ ==> (D0 ==> K- pi+ (pi0 ==> gamma ^gamma) ) pi+]CC",
+        "spip" : "[D*(2010)+ ==> (D0 ==> K- pi+ (pi0 ==> gamma gamma) ) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_MC_composite_variables(),
+        "D0"    : make_MC_composite_variables(),
+        "Km"     : make_MC_basic_variables(),
+        "pip"    : make_MC_basic_variables(),
+        "pi0"    : make_MC_basic_variables(),
+        "gamma1"    : make_MC_basic_variables(),
+        "gamma2"    : make_MC_basic_variables(),
+        "spip"   : make_MC_basic_variables(),
+    }
+
+    mytuple  = FuntupleMC(name=name,
+                          tuple_name="MCDecayTree",
+                          fields=branches, variables = variables,  
+                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])), 
+                          inputs=input_data)
+
+    return [mytuple]
diff --git a/Charm_2024validation/options/d0_to_kshh.py b/Charm_2024validation/options/d0_to_kshh.py
new file mode 100644
index 0000000000..dad027529f
--- /dev/null
+++ b/Charm_2024validation/options/d0_to_kshh.py
@@ -0,0 +1,1585 @@
+from .tupling import (
+    make_composite_variables,
+    make_composite_variables_3body,
+    make_basic_variables,
+    make_hlt2_event_variables,
+    make_DeltaM_variable,
+    make_basic_dtf_variables,
+    make_composite_dtf_variables,
+    make_composite_dtf_variables_3body,
+)
+
+import Functors as F
+from Functors.math import log
+from DaVinci import Options, make_config
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from FunTuple import FunctorCollection
+from PyConf.reading import get_particles
+import FunTuple.functorcollections as FC
+from FunTuple import FunTuple_Particles as Funtuple
+from DecayTreeFitter import DecayTreeFitter
+
+# define helper functors
+get_SV =  F.ENDVERTEX @ F.FORWARDARG0
+get_SV_pos = F.TOLINALG @ F.POSITION @ get_SV
+# only if composite (i.e. has vertex)

+get_child_1 = F.CHILD(1, F.FORWARDARG0) # change here the index of the child.
+get_child_endvtx_pos_1 = F.ENDVERTEX_POS  @ get_child_1
+get_fdvec_child_1 = get_child_endvtx_pos_1 - get_SV_pos
+
+# define observables
+IP_wrt_SV_KS0 = F.IP.bind(get_SV_pos , get_child_1)
+IPCHI2_wrt_SV_KS0 = F.IPCHI2.bind(get_SV , get_child_1)
+# only if child is composite (i.e. has vertex)
+FD_wrt_SV_KS0 = F.MAGNITUDE @ get_fdvec_child_1
+FDCHI2_wrt_SV_KS0 = F.VTX_FDCHI2.bind(get_SV, get_child_1)
+# Note: Apply the functors to the head of the node of decay tree e.g. B
+# Functor collection for SV related info
+topo_sv_var = FunctorCollection(
+    {
+        "ORIVXIP_CHILD1": IP_wrt_SV_KS0,
+        "ORIVXIPCHI2_CHILD1": IPCHI2_wrt_SV_KS0,
+        "ORIVXFD_CHILD1": FD_wrt_SV_KS0,
+        "ORIVXFDCHI2_CHILD1": FDCHI2_wrt_SV_KS0,
+    }
+)
+
+"""
+ D0->KSππ LL, DD x LowBias x Dstar
+ D0->KSK-Ï€+ LL, DD x LowBias x Dstar
+ D0->KSK+Ï€- LL, DD x LowBias x Dstar
+ D0->KSKK LL, DD x LowBias x Dstar
+ nb: https://gitlab.cern.ch/lhcb/Moore/-/blob/master/Hlt/Hlt2Conf/python/Hlt2Conf/lines/charm/d0_to_kshh.py?ref_type=heads
+
+ """
+
+# D0->KSππ
+def maketuple_DstpToD0Pip_D0ToKsPimPip_LL_LowBias(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsPimPip_LL_LowBias"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_LL_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) pi- pi+) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) pi- pi+) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^pi- pi+) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- ^pi+) pi+]CC",
+        "pis" :   "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D02KSPiPi_LL_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D02KSPiPi_LL_lowbias_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0") + topo_sv_var,
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstpToD0Pip_D0ToKsPimPip_DD_LowBias(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsPimPip_DD_LowBias"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_DD_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) pi- pi+) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) pi- pi+) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^pi- pi+) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- ^pi+) pi+]CC",
+        "pis" :   "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D02KSPiPi_DD_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D02KSPiPi_DD_lowbias_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0") + topo_sv_var,
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstpToD0Pip_D0ToKsPimPip_LL(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsPimPip_LL"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_LL"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) pi- pi+) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) pi- pi+) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^pi- pi+) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- ^pi+) pi+]CC",
+        "pis" :   "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D02KSPiPi_LL_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D02KSPiPi_LL_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF= DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF= DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF= DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF= DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF= DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF= DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0") + topo_sv_var,
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstpToD0Pip_D0ToKsPimPip_DD(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsPimPip_DD"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_DD"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) pi- pi+) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) pi- pi+) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^pi- pi+) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- ^pi+) pi+]CC",
+        "pis" :   "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D02KSPiPi_DD_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D02KSPiPi_DD_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0") + topo_sv_var,
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsPimPip_LL_LowBias(options, pvs, rec_summary):
+    name = "D0ToKsPimPip_LL_LowBias"
+    turbo_line = "Hlt2Charm_D0ToKsPimPip_LL_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) pi- pi+]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) pi- pi+]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) pi- pi+]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) pi- pi+]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^pi- pi+]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) pi- ^pi+]CC",
+    }
+
+    DTF_D0ToKsPimPip_LL_LB_MASS = DecayTreeFitter(
+        name='DTF_D02KSPiPi_LL_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsPimPip_DD_LowBias(options, pvs, rec_summary):
+    name = "D0ToKsPimPip_DD_LowBias"
+    turbo_line = "Hlt2Charm_D0ToKsPimPip_DD_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) pi- pi+]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) pi- pi+]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) pi- pi+]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) pi- pi+]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^pi- pi+]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) pi- ^pi+]CC",
+    }
+
+    DTF_D0ToKsPimPip_DD_LB_MASS = DecayTreeFitter(
+        name='DTF_D02KSPiPi_DD_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsPimPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsPimPip_LL(options, pvs, rec_summary):
+    name = "D0ToKsPimPip_LL"
+    turbo_line = "Hlt2Charm_D0ToKsPimPip_LL"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) pi- pi+]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) pi- pi+]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) pi- pi+]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) pi- pi+]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^pi- pi+]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) pi- ^pi+]CC",
+    }
+
+    DTF_D0ToKsPimPip_LL_MASS = DecayTreeFitter(
+        name='DTF_D02KSPiPi_LL_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsPimPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsPimPip_DD(options, pvs, rec_summary):
+    name = "D0ToKsPimPip_DD"
+    turbo_line = "Hlt2Charm_D0ToKsPimPip_DD"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) pi- pi+]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) pi- pi+]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) pi- pi+]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) pi- pi+]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^pi- pi+]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) pi- ^pi+]CC",
+    }
+
+    DTF_D0ToKsPimPip_DD_MASS = DecayTreeFitter(
+        name='DTF_D02KSPiPi_DD_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsPimPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+# D0->KSK-Ï€+
+def maketuple_DstpToD0Pip_D0ToKsKmPip_LL_LowBias(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsKmPip_LL_LowBias"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_LL_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- pi+) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- pi+) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- pi+) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- pi+) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^pi+) pi+]CC",
+        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D0ToKsKmPip_LL_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D0ToKsKmPip_LL_lowbias_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstpToD0Pip_D0ToKsKmPip_DD_LowBias(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsKmPip_DD_LowBias"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_DD_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- pi+) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- pi+) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- pi+) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- pi+) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^pi+) pi+]CC",
+        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D0ToKsKmPip_DD_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D0ToKsKmPip_DD_lowbias_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstpToD0Pip_D0ToKsKmPip_LL(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsKmPip_LL"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_LL"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- pi+) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- pi+) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- pi+) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- pi+) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^pi+) pi+]CC",
+        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D0ToKsKmPip_LL_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D0ToKsKmPip_LL_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstpToD0Pip_D0ToKsKmPip_DD(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsKmPip_DD"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_DD"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- pi+) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- pi+) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- pi+) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- pi+) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^pi+) pi+]CC",
+        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D0ToKsKmPip_DD_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D0ToKsKmPip_DD_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsKmPip_LL_LowBias(options, pvs, rec_summary):
+    name = "D0ToKsKmPip_LL_LowBias"
+    turbo_line = "Hlt2Charm_D0ToKsKmPip_LL_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- pi+]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- pi+]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- pi+]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- pi+]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- pi+]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^pi+]CC",
+    }
+
+    DTF_D0ToKsKmPip_LL_LB_MASS = DecayTreeFitter(
+        name='DTF_D0ToKsKmPip_LL_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsKmPip_DD_LowBias(options, pvs, rec_summary):
+    name = "D0ToKsKmPip_DD_LowBias"
+    turbo_line = "Hlt2Charm_D0ToKsKmPip_DD_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- pi+]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- pi+]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- pi+]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- pi+]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- pi+]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^pi+]CC",
+    }
+
+    DTF_D0ToKsKmPip_DD_LB_MASS = DecayTreeFitter(
+        name='DTF_D0ToKsKmPip_DD_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsKmPip_LL(options, pvs, rec_summary):
+    name = "D0ToKsKmPip_LL"
+    turbo_line = "Hlt2Charm_D0ToKsKmPip_LL"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- pi+]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- pi+]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- pi+]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- pi+]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- pi+]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^pi+]CC",
+    }
+
+    DTF_D0ToKsKmPip_LL_MASS = DecayTreeFitter(
+        name='DTF_D0ToKsKmPip_LL_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsKmPip_DD(options, pvs, rec_summary):
+    name = "D0ToKsKmPip_DD"
+    turbo_line = "Hlt2Charm_D0ToKsKmPip_DD"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- pi+]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- pi+]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- pi+]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- pi+]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- pi+]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^pi+]CC",
+    }
+
+    DTF_D0ToKsKmPip_DD_MASS = DecayTreeFitter(
+        name='DTF_D0ToKsKmPip_DD_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+# D0->KSK+Ï€-
+def maketuple_DstpToD0Pip_D0ToKsKpPim_LL_LowBias(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsKpPim_LL_LowBias"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_LL_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K+ pi-) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K+ pi-) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K+ pi-) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ ^pi-) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K+ pi-) pi+]CC",
+        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D0ToKsKpPim_LL_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D0ToKsKpPim_LL_lowbias_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstpToD0Pip_D0ToKsKpPim_DD_LowBias(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsKpPim_DD_LowBias"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_DD_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K+ pi-) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K+ pi-) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K+ pi-) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ ^pi-) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K+ pi-) pi+]CC",
+        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D0ToKsKpPim_DD_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D0ToKsKpPim_DD_lowbias_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstpToD0Pip_D0ToKsKpPim_LL(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsKpPim_LL"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_LL"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K+ pi-) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K+ pi-) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K+ pi-) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ ^pi-) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K+ pi-) pi+]CC",
+        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D0ToKsKpPim_LL_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D0ToKsKpPim_LL_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstpToD0Pip_D0ToKsKpPim_DD(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsKpPim_DD"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_DD"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K+ pi-) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K+ pi-) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K+ pi-) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ ^pi-) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K+ pi-) pi+]CC",
+        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D0ToKsKpPim_DD_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D0ToKsKpPim_DD_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsKpPim_LL_LowBias(options, pvs, rec_summary):
+    name = "D0ToKsKpPim_LL_LowBias"
+    turbo_line = "Hlt2Charm_D0ToKsKpPim_LL_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) K+ pi-]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K+ pi-]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K+ pi-]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K+ pi-]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) K+ ^pi-]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) ^K+ pi-]CC",
+    }
+
+    DTF_D0ToKsKpPim_LL_LB_MASS = DecayTreeFitter(
+        name='DTF_D0ToKsKpPim_LL_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKpPim_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsKpPim_DD_LowBias(options, pvs, rec_summary):
+    name = "D0ToKsKpPim_DD_LowBias"
+    turbo_line = "Hlt2Charm_D0ToKsKpPim_DD_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) K+ pi-]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K+ pi-]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K+ pi-]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K+ pi-]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) K+ ^pi-]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) ^K+ pi-]CC",
+    }
+
+    DTF_D0ToKsKpPim_DD_LB_MASS = DecayTreeFitter(
+        name='DTF_D0ToKsKpPim_DD_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKpPim_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsKpPim_LL(options, pvs, rec_summary):
+    name = "D0ToKsKpPim_LL"
+    turbo_line = "Hlt2Charm_D0ToKsKpPim_LL"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) K+ pi-]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K+ pi-]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K+ pi-]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K+ pi-]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) K+ ^pi-]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) ^K+ pi-]CC",
+    }
+
+    DTF_D0ToKsKpPim_LL_MASS = DecayTreeFitter(
+        name='DTF_D0ToKsKpPim_LL_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKpPim_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsKpPim_DD(options, pvs, rec_summary):
+    name = "D0ToKsKpPim_DD"
+    turbo_line = "Hlt2Charm_D0ToKsKpPim_DD"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) K+ pi-]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K+ pi-]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K+ pi-]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K+ pi-]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) K+ ^pi-]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) ^K+ pi-]CC",
+    }
+
+    DTF_D0ToKsKpPim_DD_MASS = DecayTreeFitter(
+        name='DTF_D0ToKsKpPim_DD_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKpPim_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+# D0->KSK-K+
+def maketuple_DstpToD0Pip_D0ToKsKmKp_LL_LowBias(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsKmKp_LL_LowBias"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_LL_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- K+) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- K+) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- K+) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- K+) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^K+) pi+]CC",
+        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D0ToKsKmKp_LL_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D0ToKsKmKp_LL_lowbias_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstpToD0Pip_D0ToKsKmKp_DD_LowBias(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsKmKp_DD_LowBias"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_DD_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- K+) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- K+) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- K+) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- K+) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^K+) pi+]CC",
+        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D0ToKsKmKp_DD_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D0ToKsKmKp_DD_lowbias_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstpToD0Pip_D0ToKsKmKp_LL(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsKmKp_LL"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_LL"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- K+) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- K+) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- K+) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- K+) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^K+) pi+]CC",
+        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D0ToKsKmKp_LL_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D0ToKsKmKp_LL_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstpToD0Pip_D0ToKsKmKp_DD(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsKmKp_DD"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_DD"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- K+) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- K+) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- K+) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- K+) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^K+) pi+]CC",
+        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D0ToKsKmKp_DD_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D0ToKsKmKp_DD_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsKmKp_LL_LowBias(options, pvs, rec_summary):
+    name = "D0ToKsKmKp_LL_LowBias"
+    turbo_line = "Hlt2Charm_D0ToKsKmKp_LL_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- K+]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- K+]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- K+]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- K+]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- K+]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^K+]CC",
+    }
+
+    DTF_D0ToKsKmKp_LL_LB_MASS = DecayTreeFitter(
+        name='DTF_D0ToKsKmKp_LL_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmKp_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsKmKp_DD_LowBias(options, pvs, rec_summary):
+    name = "D0ToKsKmKp_DD_LowBias"
+    turbo_line = "Hlt2Charm_D0ToKsKmKp_DD_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- K+]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- K+]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- K+]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- K+]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- K+]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^K+]CC",
+    }
+
+    DTF_D0ToKsKmKp_DD_LB_MASS = DecayTreeFitter(
+        name='DTF_D0ToKsKmKp_DD_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmKp_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstpToD0Pip_D0ToKsPimPip_LL_NoBias(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsPimPip_LL_NoBias"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_LL_NoBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) pi- pi+) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) pi- pi+) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^pi- pi+) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- ^pi+) pi+]CC",
+        "pis" :   "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D02KSPiPi_LL_nobias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D02KSPiPi_LL_nobias_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0") + topo_sv_var,
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsKmKp_LL(options, pvs, rec_summary):
+    name = "D0ToKsKmKp_LL"
+    turbo_line = "Hlt2Charm_D0ToKsKmKp_LL"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- K+]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- K+]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- K+]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- K+]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- K+]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^K+]CC",
+    }
+
+    DTF_D0ToKsKmKp_LL_MASS = DecayTreeFitter(
+        name='DTF_D0ToKsKmKp_LL_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmKp_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsKmKp_DD(options, pvs, rec_summary):
+    name = "D0ToKsKmKp_DD"
+    turbo_line = "Hlt2Charm_D0ToKsKmKp_DD"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- K+]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- K+]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- K+]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- K+]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- K+]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^K+]CC",
+    }
+
+    DTF_D0ToKsKmKp_DD_MASS = DecayTreeFitter(
+        name='DTF_D0ToKsKmKp_DD_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmKp_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+# ########################################
diff --git a/Charm_2024validation/options/d0_to_kshh_MC.py b/Charm_2024validation/options/d0_to_kshh_MC.py
new file mode 100644
index 0000000000..9fa138f8ef
--- /dev/null
+++ b/Charm_2024validation/options/d0_to_kshh_MC.py
@@ -0,0 +1,44 @@
+from .tupling import (
+    make_MC_composite_variables,
+    make_MC_basic_variables,
+    make_MC_event_variables,
+)
+
+from PyConf.reading import get_mc_particles, get_mc_header
+from FunTuple import FunTuple_MCParticles as FuntupleMC
+
+def maketuple_MC_DstpToD0Pip_D0ToKsPimPip(options, pvs, rec_summary):
+    name = "MC_DstpToD0Pip_D0ToKsPimPip"
+    line = "/Event/MC/Particles"
+    
+    input_data = get_mc_particles(f"{line}")
+
+    branches = {
+       "Dst" : "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi- pi+) pi- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ ==> ^([D0]CC ==> (KS0 ==> pi- pi+) pi- pi+) pi+]CC",
+        "KS0"  : "[D*(2010)+ ==> ([D0]CC ==> ^(KS0 ==> pi- pi+) pi- pi+) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> ^pi- pi+) pi- pi+) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi- ^pi+) pi- pi+) pi+]CC",
+        "hm"   : "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi- pi+) ^pi- pi+) pi+]CC",
+        "hp"  :  "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi- pi+) pi- ^pi+) pi+]CC",
+        "pis" :  "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi- pi+) pi- pi+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_MC_composite_variables(),
+        "D0"    : make_MC_composite_variables(),
+        "KS0"    : make_MC_composite_variables(),
+        "KS0_pim"     : make_MC_basic_variables(),
+        "KS0_pip"     : make_MC_basic_variables(),
+        "hm"    : make_MC_basic_variables(),
+        "hp"    : make_MC_basic_variables(),
+        "pis"   : make_MC_basic_variables(),
+    }
+
+    mytuple  = FuntupleMC(name=name,
+                          tuple_name="MCDecayTree",
+                          fields=branches, variables = variables,  
+                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])), 
+                          inputs=input_data)
+
+    return [mytuple]
diff --git a/Charm_2024validation/options/d0_to_ksks.py b/Charm_2024validation/options/d0_to_ksks.py
new file mode 100644
index 0000000000..d47253aa14
--- /dev/null
+++ b/Charm_2024validation/options/d0_to_ksks.py
@@ -0,0 +1,1049 @@
+import Functors as F
+from Functors.math import log
+from DaVinci import Options, make_config
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from FunTuple import FunctorCollection
+from PyConf.reading import get_particles, get_pvs
+import FunTuple.functorcollections as FC
+from FunTuple import FunTuple_Particles as Funtuple
+from DecayTreeFitter import DecayTreeFitter
+
+from .tupling import (
+    make_basic_variables,
+    make_composite_variables,
+    make_hlt2_event_variables,
+    make_basic_dtf_variables,
+    make_composite_dtf_variables,
+    Hlt1_lines
+)
+
+# define helper functors
+get_SV =  F.ENDVERTEX @ F.FORWARDARG0
+get_SV_pos = F.TOLINALG @ F.POSITION @ get_SV
+# only if composite (i.e. has vertex)

+get_child_1 = F.CHILD(1, F.FORWARDARG0) # change here the index of the child.
+get_child_endvtx_pos_1 = F.ENDVERTEX_POS  @ get_child_1
+get_fdvec_child_1 = get_child_endvtx_pos_1 - get_SV_pos
+get_child_2 = F.CHILD(2, F.FORWARDARG0) # change here the index of the child.
+get_child_endvtx_pos_2 = F.ENDVERTEX_POS  @ get_child_2
+get_fdvec_child_2 = get_child_endvtx_pos_2 - get_SV_pos
+
+# define observables
+IP_wrt_SV_KS1 = F.IP.bind(get_SV_pos , get_child_1)
+IP_wrt_SV_KS2 = F.IP.bind(get_SV_pos , get_child_2)
+IPCHI2_wrt_SV_KS1 = F.IPCHI2.bind(get_SV , get_child_1)
+IPCHI2_wrt_SV_KS2 = F.IPCHI2.bind(get_SV , get_child_2)
+# only if child is composite (i.e. has vertex)
+FD_wrt_SV_KS1 = F.MAGNITUDE @ get_fdvec_child_1
+FD_wrt_SV_KS2 = F.MAGNITUDE @ get_fdvec_child_2
+FDCHI2_wrt_SV_KS1 = F.VTX_FDCHI2.bind(get_SV, get_child_1)
+FDCHI2_wrt_SV_KS2 = F.VTX_FDCHI2.bind(get_SV, get_child_2)
+# Note: Apply the functors to the head of the node of decay tree e.g. B
+# Functor collection for SV related info
+topo_sv_var = FunctorCollection(
+    {
+        "ORIVXIP_CHILD1": IP_wrt_SV_KS1,
+        "ORIVXIP_CHILD2": IP_wrt_SV_KS2,
+        "ORIVXIPCHI2_CHILD1": IPCHI2_wrt_SV_KS1,
+        "ORIVXIPCHI2_CHILD2": IPCHI2_wrt_SV_KS2,
+        "ORIVXFD_CHILD1": FD_wrt_SV_KS1,
+        "ORIVXFD_CHILD2": FD_wrt_SV_KS2,
+        "ORIVXFDCHI2_CHILD1": FDCHI2_wrt_SV_KS1,
+        "ORIVXFDCHI2_CHILD2": FDCHI2_wrt_SV_KS2,
+    }
+)
+
+############################# LLLL #############################
+def maketuple_Dst2D0pi_D02KSKS_LLLL(options, pvs, rec_summary):
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLL"
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+
+    fields = {
+        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
+        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
+        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
+    }
+
+    # DTF_LLLL = DecayTreeFitter(
+    #     name='DTF_LLLL',
+    #     input_particles=input_data)
+    #
+    # DTF_LLLL_PV = DecayTreeFitter(
+    #     name='DTF_LLLL_PV',
+    #     input_particles=input_data,
+    #     input_pvs=pvs)
+
+    DTF_LLLL_MASS = DecayTreeFitter(
+        name='DTF_LLLL_mass',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTF_LLLL_MASS_PV = DecayTreeFitter(
+        'DTF_LLLL_MASS_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL, pv_constraint=False, mass_constraint=False) +\
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_PV, pv_constraint=True, mass_constraint=False) +\
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL, pv_constraint=False, mass_constraint=False) +\
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_PV, pv_constraint=True, mass_constraint=False) +\
+
+    variables = {"pip1": basic_variables,
+                 "pim1": basic_variables,
+                 "pip2": basic_variables,
+                 "pim2": basic_variables,
+                 "KS1": composite_variables,
+                 "KS2": composite_variables,
+                 "D0": composite_variables + topo_sv_var,
+                 "Dst": composite_variables,
+                 "pi_soft": basic_variables,
+    }
+
+    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    mytuple = Funtuple(
+        "DstToD0PiToKS0KS0_LLLL",
+        "Tuple",
+        fields=fields,
+        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data, store_multiple_cand_info=True)
+
+    return [my_filter, mytuple]
+
+############################# LLLL Tight #############################
+def maketuple_Dst2D0pi_D02KSKS_LLLL_Tight(options, pvs, rec_summary):
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLL_Tight"
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+
+    fields = {
+        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
+        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
+        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
+    }
+
+    # DTF_LLLL_Tight = DecayTreeFitter(
+    #     name='DTF_LLLL_Tight',
+    #     input_particles=input_data)
+    #
+    # DTF_LLLL_Tight_PV = DecayTreeFitter(
+    #     name='DTF_LLLL_Tight_PV',
+    #     input_particles=input_data,
+    #     input_pvs=pvs)
+
+    DTF_LLLL_Tight_MASS = DecayTreeFitter(
+        name='DTF_LLLL_Tight_mass',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTF_LLLL_Tight_MASS_PV = DecayTreeFitter(
+        'DTF_LLLL_Tight_MASS_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_Tight, pv_constraint=False, mass_constraint=False) +\
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_Tight_PV, pv_constraint=True, mass_constraint=False) +\
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_Tight, pv_constraint=False, mass_constraint=False) +\
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_Tight_PV, pv_constraint=True, mass_constraint=False) +\
+
+    variables = {"pip1": basic_variables,
+                 "pim1": basic_variables,
+                 "pip2": basic_variables,
+                 "pim2": basic_variables,
+                 "KS1": composite_variables,
+                 "KS2": composite_variables,
+                 "D0": composite_variables + topo_sv_var,
+                 "Dst": composite_variables,
+                 "pi_soft": basic_variables,
+    }
+
+    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    mytuple = Funtuple(
+        "DstToD0PiToKS0KS0_LLLL_Tight",
+        "Tuple",
+        fields=fields,
+        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data, store_multiple_cand_info=True)
+
+    return [my_filter, mytuple]
+
+############################# LLDD #############################
+def maketuple_Dst2D0pi_D02KSKS_LLDD(options, pvs, rec_summary):
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLDD"
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+
+    fields = {
+        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
+        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
+        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
+    }
+
+    # DTF_LLDD = DecayTreeFitter(
+    #     name='DTF_LLDD',
+    #     input_particles=input_data)
+    #
+    # DTF_LLDD_PV = DecayTreeFitter(
+    #     name='DTF_LLDD_PV',
+    #     input_particles=input_data,
+    #     input_pvs=pvs)
+
+    DTF_LLDD_MASS = DecayTreeFitter(
+        name='DTF_LLDD_mass',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTF_LLDD_MASS_PV = DecayTreeFitter(
+        'DTF_LLDD_MASS_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLDD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLDD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLDD, pv_constraint=False, mass_constraint=False) +\
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLDD_PV, pv_constraint=True, mass_constraint=False) +\
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD, pv_constraint=False, mass_constraint=False) +\
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_PV, pv_constraint=True, mass_constraint=False) +\
+
+    variables = {"pip1": basic_variables,
+                 "pim1": basic_variables,
+                 "pip2": basic_variables,
+                 "pim2": basic_variables,
+                 "KS1": composite_variables,
+                 "KS2": composite_variables,
+                 "D0": composite_variables + topo_sv_var,
+                 "Dst": composite_variables,
+                 "pi_soft": basic_variables,
+    }
+
+    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    mytuple = Funtuple(
+        "DstToD0PiToKS0KS0_LLDD",
+        "Tuple",
+        fields=fields,
+        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data, store_multiple_cand_info=True)
+
+    return [my_filter, mytuple]
+
+############################# LLDD Tight #############################
+def maketuple_Dst2D0pi_D02KSKS_LLDD_Tight(options, pvs, rec_summary):
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLDD_Tight"
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+
+    fields = {
+        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
+        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
+        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
+    }
+
+    # DTF_LLDD_Tight = DecayTreeFitter(
+    #     name='DTF_LLDD_Tight',
+    #     input_particles=input_data)
+    #
+    # DTF_LLDD_Tight_PV = DecayTreeFitter(
+    #     name='DTF_LLDD_Tight_PV',
+    #     input_particles=input_data,
+    #     input_pvs=pvs)
+
+    DTF_LLDD_Tight_MASS = DecayTreeFitter(
+        name='DTF_LLDD_Tight_mass',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTF_LLDD_Tight_MASS_PV = DecayTreeFitter(
+        'DTF_LLDD_Tight_MASS_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False, DTF=DTF_LLDD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False, DTF=DTF_LLDD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLDD_Tight, pv_constraint=False, mass_constraint=False) +\
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLDD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_Tight, pv_constraint=False, mass_constraint=False) +\
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
+
+    variables = {"pip1": basic_variables,
+                 "pim1": basic_variables,
+                 "pip2": basic_variables,
+                 "pim2": basic_variables,
+                 "KS1": composite_variables,
+                 "KS2": composite_variables,
+                 "D0": composite_variables + topo_sv_var,
+                 "Dst": composite_variables,
+                 "pi_soft": basic_variables,
+    }
+
+    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    mytuple = Funtuple(
+        "DstToD0PiToKS0KS0_LLDD_Tight",
+        "Tuple",
+        fields=fields,
+        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data, store_multiple_cand_info=True)
+
+    return [my_filter, mytuple]
+
+############################# DDDD #############################
+def maketuple_Dst2D0pi_D02KSKS_DDDD(options, pvs, rec_summary):
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDDD"
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+
+    fields = {
+        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
+        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
+        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
+    }
+
+    # DTF_DDDD = DecayTreeFitter(
+    #     name='DTF_DDDD',
+    #     input_particles=input_data)
+    #
+    # DTF_DDDD_PV = DecayTreeFitter(
+    #     name='DTF_DDDD_PV',
+    #     input_particles=input_data,
+    #     input_pvs=pvs)
+
+    DTF_DDDD_MASS = DecayTreeFitter(
+        name='DTF_DDDD_mass',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTF_DDDD_MASS_PV = DecayTreeFitter(
+        'DTF_DDDD_MASS_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD, pv_constraint=False, mass_constraint=False) +\
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_PV, pv_constraint=True, mass_constraint=False) +\
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD, pv_constraint=False, mass_constraint=False) +\
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_PV, pv_constraint=True, mass_constraint=False) +\
+
+    variables = {"pip1": basic_variables,
+                 "pim1": basic_variables,
+                 "pip2": basic_variables,
+                 "pim2": basic_variables,
+                 "KS1": composite_variables,
+                 "KS2": composite_variables,
+                 "D0": composite_variables + topo_sv_var,
+                 "Dst": composite_variables,
+                 "pi_soft": basic_variables,
+    }
+
+    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    mytuple = Funtuple(
+        "DstToD0PiToKS0KS0_DDDD",
+        "Tuple",
+        fields=fields,
+        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data, store_multiple_cand_info=True)
+
+    return [my_filter, mytuple]
+
+############################# DDDD Tight #############################
+def maketuple_Dst2D0pi_D02KSKS_DDDD_Tight(options, pvs, rec_summary):
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDDD_Tight"
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+
+    fields = {
+        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
+        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
+        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
+    }
+
+    # DTF_DDDD_Tight = DecayTreeFitter(
+    #     name='DTF_DDDD_Tight',
+    #     input_particles=input_data)
+    #
+    # DTF_DDDD_Tight_PV = DecayTreeFitter(
+    #     name='DTF_DDDD_Tight_PV',
+    #     input_particles=input_data,
+    #     input_pvs=pvs)
+
+    DTF_DDDD_Tight_MASS = DecayTreeFitter(
+        name='DTF_DDDD_Tight_mass',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTF_DDDD_Tight_MASS_PV = DecayTreeFitter(
+        'DTF_DDDD_Tight_MASS_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_Tight, pv_constraint=False, mass_constraint=False) +\
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_Tight, pv_constraint=False, mass_constraint=False) +\
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
+
+    variables = {"pip1": basic_variables,
+                 "pim1": basic_variables,
+                 "pip2": basic_variables,
+                 "pim2": basic_variables,
+                 "KS1": composite_variables,
+                 "KS2": composite_variables,
+                 "D0": composite_variables + topo_sv_var,
+                 "Dst": composite_variables,
+                 "pi_soft": basic_variables,
+    }
+
+    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    mytuple = Funtuple(
+        "DstToD0PiToKS0KS0_DDDD_Tight",
+        "Tuple",
+        fields=fields,
+        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data, store_multiple_cand_info=True)
+
+    return [my_filter, mytuple]
+
+############################# ULLL #############################
+def maketuple_Dst2D0pi_D02KSKS_ULLL(options, pvs, rec_summary):
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULLL"
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+
+    fields = {
+        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
+        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
+        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
+    }
+
+    # DTF_ULLL = DecayTreeFitter(
+    #     name='DTF_ULLL',
+    #     input_particles=input_data)
+    #
+    # DTF_ULLL_PV = DecayTreeFitter(
+    #     name='DTF_ULLL_PV',
+    #     input_particles=input_data,
+    #     input_pvs=pvs)
+
+    DTF_ULLL_MASS = DecayTreeFitter(
+        name='DTF_ULLL_mass',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTF_ULLL_MASS_PV = DecayTreeFitter(
+        'DTF_ULLL_MASS_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL, pv_constraint=False, mass_constraint=False) +\
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_PV, pv_constraint=True, mass_constraint=False) +\
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL, pv_constraint=False, mass_constraint=False) +\
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_PV, pv_constraint=True, mass_constraint=False) +\
+
+    variables = {"pip1": basic_variables,
+                 "pim1": basic_variables,
+                 "pip2": basic_variables,
+                 "pim2": basic_variables,
+                 "KS1": composite_variables,
+                 "KS2": composite_variables,
+                 "D0": composite_variables + topo_sv_var,
+                 "Dst": composite_variables,
+                 "pi_soft": basic_variables,
+    }
+
+    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    mytuple = Funtuple(
+        "DstToD0PiToKS0KS0_ULLL",
+        "Tuple",
+        fields=fields,
+        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data, store_multiple_cand_info=True)
+
+    return [my_filter, mytuple]
+
+############################# ULLL Tight #############################
+def maketuple_Dst2D0pi_D02KSKS_ULLL_Tight(options, pvs, rec_summary):
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULLL_Tight"
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+
+    fields = {
+        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
+        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
+        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
+    }
+
+    # DTF_ULLL_Tight = DecayTreeFitter(
+    #     name='DTF_ULLL_Tight',
+    #     input_particles=input_data)
+    #
+    # DTF_ULLL_Tight_PV = DecayTreeFitter(
+    #     name='DTF_ULLL_Tight_PV',
+    #     input_particles=input_data,
+    #     input_pvs=pvs)
+
+    DTF_ULLL_Tight_MASS = DecayTreeFitter(
+        name='DTF_ULLL_Tight_mass',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTF_ULLL_Tight_MASS_PV = DecayTreeFitter(
+        'DTF_ULLL_Tight_MASS_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_Tight, pv_constraint=False, mass_constraint=False) +\
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_Tight_PV, pv_constraint=True, mass_constraint=False) +\
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_Tight, pv_constraint=False, mass_constraint=False) +\
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_Tight_PV, pv_constraint=True, mass_constraint=False) +\
+
+    variables = {"pip1": basic_variables,
+                 "pim1": basic_variables,
+                 "pip2": basic_variables,
+                 "pim2": basic_variables,
+                 "KS1": composite_variables,
+                 "KS2": composite_variables,
+                 "D0": composite_variables + topo_sv_var,
+                 "Dst": composite_variables,
+                 "pi_soft": basic_variables,
+    }
+
+    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    mytuple = Funtuple(
+        "DstToD0PiToKS0KS0_ULLL_Tight",
+        "Tuple",
+        fields=fields,
+        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data, store_multiple_cand_info=True)
+
+    return [my_filter, mytuple]
+
+############################# ULDD #############################
+def maketuple_Dst2D0pi_D02KSKS_ULDD(options, pvs, rec_summary):
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULDD"
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+
+    fields = {
+        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
+        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
+        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
+    }
+
+    # DTF_ULDD = DecayTreeFitter(
+    #     name='DTF_ULDD',
+    #     input_particles=input_data)
+    #
+    # DTF_ULDD_PV = DecayTreeFitter(
+    #     name='DTF_ULDD_PV',
+    #     input_particles=input_data,
+    #     input_pvs=pvs)
+
+    DTF_ULDD_MASS = DecayTreeFitter(
+        name='DTF_ULDD_mass',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTF_ULDD_MASS_PV = DecayTreeFitter(
+        'DTF_ULDD_MASS_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD, pv_constraint=False, mass_constraint=False) +\
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_PV, pv_constraint=True, mass_constraint=False) +\
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD, pv_constraint=False, mass_constraint=False) +\
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_PV, pv_constraint=True, mass_constraint=False) +\
+
+    variables = {"pip1": basic_variables,
+                 "pim1": basic_variables,
+                 "pip2": basic_variables,
+                 "pim2": basic_variables,
+                 "KS1": composite_variables,
+                 "KS2": composite_variables,
+                 "D0": composite_variables + topo_sv_var,
+                 "Dst": composite_variables,
+                 "pi_soft": basic_variables,
+    }
+
+    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    mytuple = Funtuple(
+        "DstToD0PiToKS0KS0_ULDD",
+        "Tuple",
+        fields=fields,
+        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data, store_multiple_cand_info=True)
+
+    return [my_filter, mytuple]
+
+############################# ULDD Tight #############################
+def maketuple_Dst2D0pi_D02KSKS_ULDD_Tight(options, pvs, rec_summary):
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULDD_Tight"
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+
+    fields = {
+        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
+        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
+        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
+    }
+
+    # DTF_ULDD_Tight = DecayTreeFitter(
+    #     name='DTF_ULDD_Tight',
+    #     input_particles=input_data)
+    #
+    # DTF_ULDD_Tight_PV = DecayTreeFitter(
+    #     name='DTF_ULDD_Tight_PV',
+    #     input_particles=input_data,
+    #     input_pvs=pvs)
+
+    DTF_ULDD_Tight_MASS = DecayTreeFitter(
+        name='DTF_ULDD_Tight_mass',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTF_ULDD_Tight_MASS_PV = DecayTreeFitter(
+        'DTF_ULDD_Tight_MASS_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_Tight, pv_constraint=False, mass_constraint=False) +\
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_Tight, pv_constraint=False, mass_constraint=False) +\
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
+
+    variables = {"pip1": basic_variables,
+                 "pim1": basic_variables,
+                 "pip2": basic_variables,
+                 "pim2": basic_variables,
+                 "KS1": composite_variables,
+                 "KS2": composite_variables,
+                 "D0": composite_variables + topo_sv_var,
+                 "Dst": composite_variables,
+                 "pi_soft": basic_variables,
+    }
+
+    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    mytuple = Funtuple(
+        "DstToD0PiToKS0KS0_ULDD_Tight",
+        "Tuple",
+        fields=fields,
+        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data, store_multiple_cand_info=True)
+
+    return [my_filter, mytuple]
+
+############################# LLLD #############################
+def maketuple_Dst2D0pi_D02KSKS_LLLD(options, pvs, rec_summary):
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLD"
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+
+    fields = {
+        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
+        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
+        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
+    }
+
+    # DTF_LLLD = DecayTreeFitter(
+    #     name='DTF_LLLD',
+    #     input_particles=input_data)
+    #
+    # DTF_LLLD_PV = DecayTreeFitter(
+    #     name='DTF_LLLD_PV',
+    #     input_particles=input_data,
+    #     input_pvs=pvs)
+
+    DTF_LLLD_MASS = DecayTreeFitter(
+        name='DTF_LLLD_mass',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTF_LLLD_MASS_PV = DecayTreeFitter(
+        'DTF_LLLD_MASS_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD, pv_constraint=False, mass_constraint=False) +\
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_PV, pv_constraint=True, mass_constraint=False) +\
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD, pv_constraint=False, mass_constraint=False) +\
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_PV, pv_constraint=True, mass_constraint=False) +\
+
+    variables = {"pip1": basic_variables,
+                 "pim1": basic_variables,
+                 "pip2": basic_variables,
+                 "pim2": basic_variables,
+                 "KS1": composite_variables,
+                 "KS2": composite_variables,
+                 "D0": composite_variables + topo_sv_var,
+                 "Dst": composite_variables,
+                 "pi_soft": basic_variables,
+    }
+
+    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    mytuple = Funtuple(
+        "DstToD0PiToKS0KS0_LLLD",
+        "Tuple",
+        fields=fields,
+        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data, store_multiple_cand_info=True)
+
+    return [my_filter, mytuple]
+
+############################# LLLD Tight #############################
+def maketuple_Dst2D0pi_D02KSKS_LLLD_Tight(options, pvs, rec_summary):
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLD_Tight"
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+
+    fields = {
+        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
+        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
+        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
+    }
+
+    # DTF_LLLD_Tight = DecayTreeFitter(
+    #     name='DTF_LLLD_Tight',
+    #     input_particles=input_data)
+    #
+    # DTF_LLLD_Tight_PV = DecayTreeFitter(
+    #     name='DTF_LLLD_Tight_PV',
+    #     input_particles=input_data,
+    #     input_pvs=pvs)
+
+    DTF_LLLD_Tight_MASS = DecayTreeFitter(
+        name='DTF_LLLD_Tight_mass',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTF_LLLD_Tight_MASS_PV = DecayTreeFitter(
+        'DTF_LLLD_Tight_MASS_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_Tight, pv_constraint=False, mass_constraint=False) +\
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_Tight, pv_constraint=False, mass_constraint=False) +\
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
+
+    variables = {"pip1": basic_variables,
+                 "pim1": basic_variables,
+                 "pip2": basic_variables,
+                 "pim2": basic_variables,
+                 "KS1": composite_variables,
+                 "KS2": composite_variables,
+                 "D0": composite_variables + topo_sv_var,
+                 "Dst": composite_variables,
+                 "pi_soft": basic_variables,
+    }
+
+    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    mytuple = Funtuple(
+        "DstToD0PiToKS0KS0_LLLD_Tight",
+        "Tuple",
+        fields=fields,
+        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data, store_multiple_cand_info=True)
+
+    return [my_filter, mytuple]
+
+############################# DDLD #############################
+def maketuple_Dst2D0pi_D02KSKS_DDLD(options, pvs, rec_summary):
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDLD"
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+
+    fields = {
+        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
+        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
+        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
+    }
+
+    # DTF_DDLD = DecayTreeFitter(
+    #     name='DTF_DDLD',
+    #     input_particles=input_data)
+    #
+    # DTF_DDLD_PV = DecayTreeFitter(
+    #     name='DTF_DDLD_PV',
+    #     input_particles=input_data,
+    #     input_pvs=pvs)
+
+    DTF_DDLD_MASS = DecayTreeFitter(
+        name='DTF_DDLD_mass',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTF_DDLD_MASS_PV = DecayTreeFitter(
+        'DTF_DDLD_MASS_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD, pv_constraint=False, mass_constraint=False) +\
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_PV, pv_constraint=True, mass_constraint=False) +\
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD, pv_constraint=False, mass_constraint=False) +\
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_PV, pv_constraint=True, mass_constraint=False) +\
+
+    variables = {"pip1": basic_variables,
+                 "pim1": basic_variables,
+                 "pip2": basic_variables,
+                 "pim2": basic_variables,
+                 "KS1": composite_variables,
+                 "KS2": composite_variables,
+                 "D0": composite_variables + topo_sv_var,
+                 "Dst": composite_variables,
+                 "pi_soft": basic_variables,
+    }
+
+    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    mytuple = Funtuple(
+        "DstToD0PiToKS0KS0_DDLD",
+        "Tuple",
+        fields=fields,
+        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data, store_multiple_cand_info=True)
+
+    return [my_filter, mytuple]
+
+############################# DDLD Tight #############################
+def maketuple_Dst2D0pi_D02KSKS_DDLD_Tight(options, pvs, rec_summary):
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDLD_Tight"
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+
+    fields = {
+        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
+        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
+        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
+    }
+
+    # DTF_DDLD_Tight = DecayTreeFitter(
+    #     name='DTF_DDLD_Tight',
+    #     input_particles=input_data)
+    #
+    # DTF_DDLD_Tight_PV = DecayTreeFitter(
+    #     name='DTF_DDLD_Tight_PV',
+    #     input_particles=input_data,
+    #     input_pvs=pvs)
+
+    DTF_DDLD_Tight_MASS = DecayTreeFitter(
+        name='DTF_DDLD_Tight_mass',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTF_DDLD_Tight_MASS_PV = DecayTreeFitter(
+        'DTF_DDLD_Tight_MASS_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_Tight, pv_constraint=False, mass_constraint=False) +\
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_Tight, pv_constraint=False, mass_constraint=False) +\
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
+
+    variables = {"pip1": basic_variables,
+                 "pim1": basic_variables,
+                 "pip2": basic_variables,
+                 "pim2": basic_variables,
+                 "KS1": composite_variables,
+                 "KS2": composite_variables,
+                 "D0": composite_variables + topo_sv_var,
+                 "Dst": composite_variables,
+                 "pi_soft": basic_variables,
+    }
+
+    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    mytuple = Funtuple(
+        "DstToD0PiToKS0KS0_DDLD_Tight",
+        "Tuple",
+        fields=fields,
+        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data, store_multiple_cand_info=True)
+
+    return [my_filter, mytuple]
diff --git a/Charm_2024validation/options/d0_to_ksks_MC.py b/Charm_2024validation/options/d0_to_ksks_MC.py
new file mode 100644
index 0000000000..06c1ac6139
--- /dev/null
+++ b/Charm_2024validation/options/d0_to_ksks_MC.py
@@ -0,0 +1,46 @@
+from .tupling import (
+    make_MC_composite_variables,
+    make_MC_basic_variables,
+    make_MC_event_variables,
+)
+
+from PyConf.reading import get_mc_particles, get_mc_header
+from FunTuple import FunTuple_MCParticles as FuntupleMC
+
+############################# LLLL #############################
+def maketuple_MC_Dst2D0pi_D02KSKS_LLLL(options, pvs, rec_summary):
+    name = "MC_DstpToD0Pip_D0ToKsKs_LLLL"
+    line = "/Event/MC/Particles"
+
+    input_data = get_mc_particles(f"{line}")
+
+    fields = {
+        "Dst": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi+ pi-) (KS0 ==> pi+ pi-) ) pi+]CC",
+        "D0": "[D*(2010)+ ==> ^([D0]CC ==> (KS0 ==> pi+ pi-) (KS0 ==> pi+ pi-) ) pi+]CC",
+        "KS1": "[D*(2010)+ ==> ([D0]CC ==> ^(KS0 ==> pi+ pi-) (KS0 ==> pi+ pi-) ) pi+]CC",
+        "KS2": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi+ pi-) ^(KS0 ==> pi+ pi-) ) pi+]CC",
+        "pip1": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> ^pi+ pi-) (KS0 ==> pi+ pi-) ) pi+]CC",
+        "pim1": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi+ ^pi-) (KS0 ==> pi+ pi-) ) pi+]CC",
+        "pip2": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi+ pi-) (KS0 ==> ^pi+ pi-) ) pi+]CC",
+        "pim2": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi+ pi-) (KS0 ==> pi+ ^pi-) ) pi+]CC",
+        "pi_soft": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi+ pi-) (KS0 ==> pi+ pi-) ) ^pi+]CC",
+    }
+
+    variables = {"pip1":  make_MC_basic_variables(),
+                 "pim1":  make_MC_basic_variables(),
+                 "pip2":  make_MC_basic_variables(),
+                 "pim2":  make_MC_basic_variables(),
+                 "KS1": make_MC_composite_variables(),
+                 "KS2": make_MC_composite_variables(),
+                 "D0": make_MC_composite_variables(),
+                 "Dst": make_MC_composite_variables(),
+                 "pi_soft":  make_MC_basic_variables(),
+    }
+
+    mytuple  = FuntupleMC(name=name,
+                          tuple_name="MCDecayTree",
+                          fields=fields, variables = variables,
+                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
+                          inputs=input_data)
+
+    return [mytuple]
diff --git a/Charm_2024validation/options/d_to_hhh.py b/Charm_2024validation/options/d_to_hhh.py
new file mode 100644
index 0000000000..d10fa039f6
--- /dev/null
+++ b/Charm_2024validation/options/d_to_hhh.py
@@ -0,0 +1,503 @@
+from .tupling import (
+    make_composite_variables_3body,
+    make_b_composite_variables,
+    make_composite_variables,
+    make_basic_variables,
+    make_hlt2_event_variables,
+    make_composite_dtf_variables_3body,
+    make_basic_dtf_variables,
+)
+
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from FunTuple import FunTuple_Particles as Funtuple
+
+
+def make_dtf_variables(options, pvs, input_data, ptype):
+
+    if ptype not in ["basic", "composite"]:
+        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
+
+    from DecayTreeFitter import DecayTreeFitter
+    
+    DTF = DecayTreeFitter(
+        name=f'DTF_{{hash}}',
+        input_particles=input_data)
+
+    DTFvtx = DecayTreeFitter(
+        name=f'DTFvtx_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    DTFmassDp = DecayTreeFitter(
+        name=f'DTFmassDp_{{hash}}',
+        input_particles=input_data,
+        mass_constraints=["D+"])
+
+    DTFvtxmassDp = DecayTreeFitter(
+        name=f'DTFvtxmassDp_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D+"])
+
+    DTFmassDsp = DecayTreeFitter(
+        name=f'DTFmassDsp_{{hash}}',
+        input_particles=input_data,
+        substitutions = ['D+{{D_s+}}'],
+        mass_constraints=["D_s+"])
+
+    DTFvtxmassDsp = DecayTreeFitter(
+        name=f'DTFvtxmassDsp_{{hash}}',
+        input_particles=input_data,
+        substitutions = ['D+{{D_s+}}',"KS0{{KS0}}"],#trick
+        mass_constraints=["D_s+"],
+        input_pvs=pvs,
+    )
+
+    if ptype == "basic":
+        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassDp,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="Dp")
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassDp,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="Dp")
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassDsp,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="Dsp")
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassDsp,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="Dsp")
+        return dtf_vars
+
+    if ptype == "composite":
+        dtf_vars = make_composite_dtf_variables_3body(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
+                                             DTF=DTFmassDp,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="Dp")
+        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
+                                             DTF=DTFvtxmassDp,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="Dp")
+        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
+                                             DTF=DTFmassDsp,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="Dsp")
+        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
+                                             DTF=DTFvtxmassDsp,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="Dsp")
+        return dtf_vars
+
+
+def maketuple_D2Kpipi(options, pvs, rec_summary, _NoCuts=False):
+    name = "D2Kpipi"
+    turbo_line = "Hlt2Charm_DpDspToKmPipPip"
+    if _NoCuts == True:
+        turbo_line += "_NoCuts"
+        name += "_NoCuts"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> K- pi+ pi+]CC",
+        "Km"   : "[D+ -> ^K- pi+ pi+]CC",
+        "pip1"  : "[D+ -> K- ^pi+ pi+]CC",
+        "pip2" : "[D+ -> K- pi+ ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2pipipi(options, pvs, rec_summary, _NoCuts=False):
+    name = "D2pipipi"
+    turbo_line = "Hlt2Charm_DpDspToPimPipPip"
+    if _NoCuts == True:
+        turbo_line += "_NoCuts"
+        name += "_NoCuts"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> pi- pi+ pi+]CC",
+        "pim"   : "[D+ -> ^pi- pi+ pi+]CC",
+        "pip1"  : "[D+ -> pi- ^pi+ pi+]CC",
+        "pip2" : "[D+ -> pi- pi+ ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Ds2KKpi(options, pvs, rec_summary, _NoCuts=False):
+    name = "Ds2KKpi"
+    turbo_line = "Hlt2Charm_DpDspToKmKpPip"
+    if _NoCuts == True:
+        turbo_line += "_NoCuts"
+        name += "_NoCuts"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> K- K+ pi+]CC",
+        "Km"   : "[D+ -> ^K- K+ pi+]CC",
+        "Kp"  : "[D+ -> K- ^K+ pi+]CC",
+        "pip" : "[D+ -> K- K+ ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+    
+    return [myfilter, mytuple]
+
+def maketuple_D2Kpipi_Kpi(options, pvs, rec_summary):
+    name = "D2Kpipi_Kpi"
+    turbo_line = "Hlt2Charm_DpDspToKmPipPip"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> (KS0 -> K- pi+) pi+]CC",
+        "Kst" : "[D+ -> ^(KS0 -> K- pi+) pi+]CC",
+        "Km"   : "[D+ -> (KS0 -> ^K- pi+) pi+]CC",
+        "pip"  : "[D+ -> (KS0 -> K- ^pi+) pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data),
+        "Kst"   : make_composite_variables(options, pvs, input_data),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, use_loki_decay_finder=True)
+
+    return [myfilter, mytuple]
+
+
+
+
+    '''
+    from PyConf.Algorithms import ThOrParticleSelection
+    import Functors as F
+    FILTER_TREE = lambda id: F.FILTER(F.IS_ABS_ID(id)) @ F.GET_ALL_DESCENDANTS()
+    Km_data = ThOrParticleSelection(
+    InputParticles=input_data, Functor=FILTER_TREE("[K-]CC")
+).OutputSelection
+    pip_data = ThOrParticleSelection(
+        InputParticles=input_data, Functor=FILTER_TREE("[pi+]CC")
+).OutputSelection
+    
+    
+    from PyConf.Algorithms import ChargedBasicsProducer, UniqueIDGeneratorAlg
+    from PyConf.Algorithms import ThOrCombiner__2ChargedBasics, ThOrCombiner__2Particle
+    # make unique_id_generator
+    unique_id_gen = UniqueIDGeneratorAlg()
+    '''
+    '''
+    # produce charged basic particles
+    produce_kaons = ChargedBasicsProducer(
+        InputUniqueIDGenerator=unique_id_gen, ParticleID="kaon")
+    produce_pions = ChargedBasicsProducer(
+        InputUniqueIDGenerator=unique_id_gen, ParticleID="pion")
+    produce_jpsi = ThOrCombiner__2ChargedBasics(
+    '''
+    '''
+    produce_jpsi = ThOrCombiner__2Particle(
+        InputUniqueIDGenerator=unique_id_gen,
+        DecayDescriptor="[J/psi(1S) -> K- pi+]cc",
+        #Input1=produce_kaons.Particles,
+        #Input2=produce_pions.Particles,
+        Input1=Km_data,
+        Input2=pip_data,
+    )
+    input_data = produce_jpsi.Output
+
+    branches = {
+        "Jpsi" : "[J/psi(1S) -> K- pi+]CC",
+    }
+
+    from FunTuple import FunctorCollection
+    import Functors as F
+    variables = {
+        #"Dp"   : make_composite_variables(options, pvs, input_data, False, False),
+        #"Jpsi"   : make_composite_variables(options, pvs, input_data, False, False),
+        "Jpsi"   : FunctorCollection({
+            "PX": F.PX,
+            "PY": F.PY,
+            "PZ": F.PZ,
+            "BPVDIRA": F.BPVDIRA(pvs),
+            "VCHI2DOF": F.CHI2DOF, #CHI2VXNDOF
+            "BPVIPCHI2": F.BPVIPCHI2(pvs),
+            "BPVIP": F.BPVIP(pvs),
+        }),
+        
+    }
+
+    from FunTuple import FunTuple_Composites as Funtuple
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables, inputs=input_data, store_multiple_cand_info=True)
+    ## add event_variables
+
+    
+    return [myfilter, mytuple]
+    '''
+    '''
+    from PyConf.control_flow import CompositeNode, NodeLogic
+    from PyConf.Algorithms import PrintDecayTree, PrintHeader
+    from RecoConf.reconstruction_objects import upfront_reconstruction
+    from DaVinci.common_particles import make_std_loose_jpsi2mum
+    jpsis = make_std_loose_jpsi2mumu()
+    pdt = PrintDecayTree(name="PrintJpsis", Input=jpsis)
+    algs = upfront_reconstruction() + [jpsis, pdt]
+
+    node = CompositeNode(
+    "PrintJpsiNode", children=algs, combine_logic=NodeLogic.NONLAZY_AND
+)
+    return [node]
+    
+    '''
+
+
+def maketuple_D2pipiK(options, pvs, rec_summary, _NoCuts=False):
+    name = "D2pipiK"
+    turbo_line = "Hlt2Charm_DpDspToKpPimPip"
+    if _NoCuts == True:
+        turbo_line += "_NoCuts"
+        name += "_NoCuts"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> pi- pi+ K+]CC",
+        "p1"   : "[D+ -> ^pi- pi+ K+]CC",
+        "p2"  : "[D+ -> pi- ^pi+ K+]CC",
+        "p3" : "[D+ -> pi- pi+ ^K+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
+        "p1"     : make_basic_variables(options, pvs, input_data),
+        "p2"    : make_basic_variables(options, pvs, input_data),
+        "p3"   : make_basic_variables(options, pvs, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2KKK(options, pvs, rec_summary, _NoCuts=False):
+    name = "D2KKK"
+    turbo_line = "Hlt2Charm_DpDspToKmKpKp"
+    if _NoCuts == True:
+        turbo_line += "_NoCuts"
+        name += "_NoCuts"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> K- K+ K+]CC",
+        "p1"   : "[D+ -> ^K- K+ K+]CC",
+        "p2"  : "[D+ -> K- ^K+ K+]CC",
+        "p3" : "[D+ -> K- K+ ^K+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
+        "p1"     : make_basic_variables(options, pvs, input_data),
+        "p2"    : make_basic_variables(options, pvs, input_data),
+        "p3"   : make_basic_variables(options, pvs, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2piKK(options, pvs, rec_summary, _NoCuts=False):
+    name = "D2piKK"
+    turbo_line = "Hlt2Charm_DpDspToKpKpPim"
+    if _NoCuts == True:
+        turbo_line += "_NoCuts"
+        name += "_NoCuts"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> pi- K+ K+]CC",
+        "p1"   : "[D+ -> ^pi- K+ K+]CC",
+        "p2"  : "[D+ -> pi- ^K+ K+]CC",
+        "p3" : "[D+ -> pi- K+ ^K+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
+        "p1"     : make_basic_variables(options, pvs, input_data),
+        "p2"    : make_basic_variables(options, pvs, input_data),
+        "p3"   : make_basic_variables(options, pvs, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+def maketuple_B02Dpi_D2KKpi(options, pvs, rec_summary):
+    name = "B02Dpi_D2KKpi"
+    turbo_line = "Hlt2Charm_B0ToDmPip_DmToKmKpPim"
+    
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+    
+    branches = {
+        "B0" : "[[B0]CC -> (D- -> K- K+ pi-) pi+]CC",
+        "pip" : "[[B0]CC -> (D- -> K- K+ pi-) ^pi+]CC",
+        "Dm" : "[[B0]CC -> ^(D- -> K- K+ pi-) pi+]CC",
+        "p1" : "[[B0]CC -> (D- -> ^K- K+ pi-) pi+]CC",
+        "p2" : "[[B0]CC -> (D- -> K- ^K+ pi-) pi+]CC",
+        "p3" : "[[B0]CC -> (D- -> K- K+ ^pi-) pi+]CC",
+    }
+    
+    variables = {
+        "B0" : make_b_composite_variables(options, pvs, input_data),
+        "pip" : make_basic_variables(options, pvs,input_data),
+        "Dm"   : make_composite_variables_3body(options, pvs, input_data),
+        "p1"     : make_basic_variables(options, pvs, input_data),
+        "p2"    : make_basic_variables(options, pvs, input_data),
+        "p3"   : make_basic_variables(options, pvs, input_data),        
+    }
+    
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+def maketuple_B02Dpi_D2pipipi(options, pvs, rec_summary, _NoCuts=False):    
+    name = "B02Dpi_D2pipipi"
+    turbo_line = "Hlt2Charm_B0ToDmPip_DmToPimPimPip"
+    
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+    
+    branches = {
+        "B0" : "[[B0]CC -> (D- -> pi- pi- pi+) pi+]CC",
+        "pip" : "[[B0]CC -> (D- -> pi- pi- pi+) ^pi+]CC",
+        "Dm" : "[[B0]CC -> ^(D- -> pi- pi- pi+) pi+]CC",
+        "p1" : "[[B0]CC -> (D- -> ^pi- pi- pi+) pi+]CC",
+        "p2" : "[[B0]CC -> (D- -> pi- ^pi- pi+) pi+]CC",
+        "p3" : "[[B0]CC -> (D- -> pi- pi- ^pi+) pi+]CC",
+    }
+    
+    variables = {
+        "B0" : make_b_composite_variables(options, pvs, input_data),
+        "pip" : make_basic_variables(options, pvs,input_data),
+        "Dm"   : make_composite_variables_3body(options, pvs, input_data),
+        "p1"     : make_basic_variables(options, pvs, input_data),
+        "p2"    : make_basic_variables(options, pvs, input_data),
+        "p3"   : make_basic_variables(options, pvs, input_data),        
+    }
+    
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+    
+def maketuple_Bs02Dspi_Ds2KKpi(options, pvs, rec_summary, _NoCuts=False):    
+    name = "Bs02Dspi_Ds2KKpi"
+    turbo_line = "Hlt2Charm_Bs0ToDsmPip_DsmToKmKpPim"
+    
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+    
+    branches = {
+        "Bs0" : "[[B_s0]CC -> (D_s- -> K- K+ pi-) pi+]CC",
+        "pip" : "[[B_s0]CC -> (D_s- -> K- K+ pi-) ^pi+]CC",
+        "Dsm" : "[[B_s0]CC -> ^(D_s- -> K- K+ pi-) pi+]CC",
+        "p1" : "[[B_s0]CC -> (D_s- -> ^K- K+ pi-) pi+]CC",
+        "p2" : "[[B_s0]CC -> (D_s- -> K- ^K+ pi-) pi+]CC",
+        "p3" : "[[B_s0]CC -> (D_s- -> K- K+ ^pi-) pi+]CC",
+    }
+    
+    variables = {
+        "Bs0" : make_b_composite_variables(options, pvs, input_data),
+        "pip" : make_basic_variables(options, pvs,input_data),
+        "Dsm"   : make_composite_variables_3body(options, pvs, input_data),
+        "p1"     : make_basic_variables(options, pvs, input_data),
+        "p2"    : make_basic_variables(options, pvs, input_data),
+        "p3"   : make_basic_variables(options, pvs, input_data),        
+    }
+    
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+    
+def maketuple_Bs02Dspi_Ds2pipipi(options, pvs, rec_summary, _NoCuts=False):
+    name = "Bs02Dspi_Ds2pipipi"
+    turbo_line = "Hlt2Charm_Bs0ToDsmPip_DsmToPimPimPip"
+    
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+    
+    branches = {
+        "Bs0" : "[[B_s0]CC -> (D_s- -> pi- pi- pi+) pi+]CC",
+        "pip" : "[[B_s0]CC -> (D_s- -> pi- pi- pi+) ^pi+]CC",
+        "Dsm" : "[[B_s0]CC -> ^(D_s- -> pi- pi- pi+) pi+]CC",
+        "p1" : "[[B_s0]CC -> (D_s- -> ^pi- pi- pi+) pi+]CC",
+        "p2" : "[[B_s0]CC -> (D_s- -> pi- ^pi- pi+) pi+]CC",
+        "p3" : "[[B_s0]CC -> (D_s- -> pi- pi- ^pi+) pi+]CC",
+    }
+    
+    variables = {
+        "Bs0" : make_b_composite_variables(options, pvs, input_data),
+        "pip" : make_basic_variables(options, pvs,input_data),
+        "Dsm"   : make_composite_variables_3body(options, pvs, input_data),
+        "p1"     : make_basic_variables(options, pvs, input_data),
+        "p2"    : make_basic_variables(options, pvs, input_data),
+        "p3"   : make_basic_variables(options, pvs, input_data),        
+    }
+    
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
diff --git a/Charm_2024validation/options/d_to_hhh_MC.py b/Charm_2024validation/options/d_to_hhh_MC.py
new file mode 100644
index 0000000000..e666e5f3ce
--- /dev/null
+++ b/Charm_2024validation/options/d_to_hhh_MC.py
@@ -0,0 +1,92 @@
+from .tupling import (
+    make_MC_composite_variables,
+    make_MC_basic_variables,
+    make_MC_event_variables,
+)
+
+from PyConf.reading import get_mc_particles, get_mc_header
+from FunTuple import FunTuple_MCParticles as FuntupleMC
+
+def maketuple_MC_D2Kpipi(options, pvs, rec_summary):
+    name = "MC_D2Kpipi"
+    line = "/Event/MC/Particles"
+
+    input_data = get_mc_particles(f"{line}")
+
+    branches = {
+        "Dp" : "[D+ ==> K- pi+ pi+]CC",
+        "Km"   : "[D+ ==> ^K- pi+ pi+]CC",
+        "pip1"  : "[D+ ==> K- ^pi+ pi+]CC",
+        "pip2" : "[D+ ==> K- pi+ ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_MC_composite_variables(),
+        "Km"     : make_MC_basic_variables(),
+        "pip1"    : make_MC_basic_variables(),
+        "pip2"   : make_MC_basic_variables(),
+    }
+
+    mytuple  = FuntupleMC(name=name,
+                          tuple_name="MCDecayTree",
+                          fields=branches, variables = variables,
+                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
+                          inputs=input_data)
+
+    return [mytuple]
+
+def maketuple_MC_Ds2KKpi(options, pvs, rec_summary):
+    name = "MC_Ds2KKpi"
+    line = "/Event/MC/Particles"
+
+    input_data = get_mc_particles(f"{line}")
+
+    branches = {
+        "Dp" : "[D_s+ ==> K- K+ pi+]CC",
+        "Km"   : "[D_s+ ==> ^K- K+ pi+]CC",
+        "Kp"  : "[D_s+ ==> K- ^K+ pi+]CC",
+        "pip" : "[D_s+ ==> K- K+ ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_MC_composite_variables(),
+        "Km"     : make_MC_basic_variables(),
+        "Kp"    : make_MC_basic_variables(),
+        "pip"   : make_MC_basic_variables(),
+    }
+
+    mytuple  = FuntupleMC(name=name,
+                          tuple_name="MCDecayTree",
+                          fields=branches, variables = variables,
+                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
+                          inputs=input_data)
+
+    return [mytuple]
+
+def maketuple_MC_Ds2KKK(options, pvs, rec_summary):
+    name = "MC_Ds2KKK"
+    line = "/Event/MC/Particles"
+
+    input_data = get_mc_particles(f"{line}")
+
+    branches = {
+        "Dp" : "[D_s+ ==> K- K+ K+]CC",
+        "Km"   : "[D_s+ ==> ^K- K+ K+]CC",
+        "Kp1"  : "[D_s+ ==> K- ^K+ K+]CC",
+        "Kp2" : "[D_s+ ==> K- K+ ^K+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_MC_composite_variables(),
+        "Km"     : make_MC_basic_variables(),
+        "Kp1"    : make_MC_basic_variables(),
+        "Kp2"   : make_MC_basic_variables(),
+    }
+
+    mytuple  = FuntupleMC(name=name,
+                          tuple_name="MCDecayTree",
+                          fields=branches, variables = variables,
+                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
+                          inputs=input_data)
+
+    return [mytuple]
diff --git a/Charm_2024validation/options/d_to_ksh.py b/Charm_2024validation/options/d_to_ksh.py
new file mode 100644
index 0000000000..df40aee746
--- /dev/null
+++ b/Charm_2024validation/options/d_to_ksh.py
@@ -0,0 +1,313 @@
+from .tupling import (
+    make_composite_variables,
+    make_basic_variables,
+    make_hlt2_event_variables,
+    make_composite_dtf_variables,
+    make_basic_dtf_variables,
+)
+
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from FunTuple import FunTuple_Particles as Funtuple
+
+
+def make_dtf_variables(options, pvs, input_data, ptype, islong=False):
+
+    if ptype not in ["basic", "composite"]:
+        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
+
+    from DecayTreeFitter import DecayTreeFitter
+    
+    DTF = DecayTreeFitter(
+        name=f'DTF_{{hash}}',
+        input_particles=input_data)
+
+    DTFvtx = DecayTreeFitter(
+        name=f'DTFvtx_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    DTFmassKS = DecayTreeFitter(
+        name=f'DTFmassKS_{{hash}}',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTFvtxmassKS = DecayTreeFitter(
+        name=f'DTFvtxmassKS_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    DTFmassDpKS = DecayTreeFitter(
+        name=f'DTFmassDpKS_{{hash}}',
+        input_particles=input_data,
+        mass_constraints=["D+","KS0"])
+
+    DTFvtxmassDpKS = DecayTreeFitter(
+        name=f'DTFvtxmassDpKS_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D+","KS0"])
+
+    DTFmassDspKS = DecayTreeFitter(
+        name=f'DTFmassDspKS_{{hash}}',
+        input_particles=input_data,
+        substitutions = ['D+{{D_s+}}'],
+        mass_constraints=["D_s+","KS0"])
+
+    DTFvtxmassDspKS = DecayTreeFitter(
+        name=f'DTFvtxmassDspKS_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs,
+        substitutions = ['D+{{D_s+}}',"KS0{{KS0}}"],#trick
+        mass_constraints=["D_s+","KS0"],
+    )
+
+
+    if ptype == "basic":
+        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False,
+                                            islong=islong)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False,
+                                            islong=islong)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassKS,
+                                             pv_constraint=False,
+                                             mass_constraint=True, 
+                                             particle_name="KS",
+                                             islong=islong)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassKS,
+                                             pv_constraint=True,
+                                             mass_constraint=True, 
+                                             particle_name="KS",
+                                             islong=islong)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassDpKS,
+                                             pv_constraint=False,
+                                             mass_constraint=True, 
+                                             particle_name="DpKS",
+                                             islong=islong)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassDpKS,
+                                             pv_constraint=True,
+                                             mass_constraint=True, 
+                                             particle_name="DpKS",
+                                             islong=islong)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassDspKS,
+                                             pv_constraint=False,
+                                             mass_constraint=True, 
+                                             particle_name="DspKS",
+                                             islong=islong)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassDspKS,
+                                             pv_constraint=True,
+                                             mass_constraint=True, 
+                                             particle_name="DspKS",
+                                             islong=islong)
+        return dtf_vars
+
+    if ptype == "composite":
+        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassKS,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="KS")
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassKS,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="KS")
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassDpKS,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="DpKS")
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassDpKS,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="DpKS")
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassDspKS,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="DspKS")
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassDspKS,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="DspKS")
+        return dtf_vars
+
+
+def maketuple_D2KSK_DD(options, pvs, rec_summary):
+    name = "D2KSK_DD"
+    turbo_line = "Hlt2Charm_DpDspToKsKp_DD"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> (KS0 -> pi- pi+) K+]CC",
+        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) K+]CC",
+        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) K+]CC",
+        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) K+]CC",
+        "hp" : "[D+ -> (KS0 -> pi- pi+) ^K+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "hp"   : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2KSK_LD(options, pvs, rec_summary):
+    name = "D2KSK_LD"
+    turbo_line = "Hlt2Charm_DpDspToKsKp_LD"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> (KS0 -> pi- pi+) K+]CC",
+        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) K+]CC",
+        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) K+]CC",
+        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) K+]CC",
+        "hp" : "[D+ -> (KS0 -> pi- pi+) ^K+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "hp"   : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_D2KSK_LL(options, pvs, rec_summary):
+    name = "D2KSK_LL"
+    turbo_line = "Hlt2Charm_DpDspToKsKp_LL"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> (KS0 -> pi- pi+) K+]CC",
+        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) K+]CC",
+        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) K+]CC",
+        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) K+]CC",
+        "hp" : "[D+ -> (KS0 -> pi- pi+) ^K+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "hp"   : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2KSpi_DD(options, pvs, rec_summary):
+    name = "D2KSpi_DD"
+    turbo_line = "Hlt2Charm_DpDspToKsPip_DD"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> (KS0 -> pi- pi+) pi+]CC",
+        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) pi+]CC",
+        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) pi+]CC",
+        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) pi+]CC",
+        "hp" : "[D+ -> (KS0 -> pi- pi+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "hp"   : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2KSpi_LD(options, pvs, rec_summary):
+    name = "D2KSpi_LD"
+    turbo_line = "Hlt2Charm_DpDspToKsPip_LD"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> (KS0 -> pi- pi+) pi+]CC",
+        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) pi+]CC",
+        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) pi+]CC",
+        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) pi+]CC",
+        "hp" : "[D+ -> (KS0 -> pi- pi+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "hp"   : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2KSpi_LL(options, pvs, rec_summary):
+    name = "D2KSpi_LL"
+    turbo_line = "Hlt2Charm_DpDspToKsPip_LL"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> (KS0 -> pi- pi+) pi+]CC",
+        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) pi+]CC",
+        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) pi+]CC",
+        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) pi+]CC",
+        "hp" : "[D+ -> (KS0 -> pi- pi+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "hp"   : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
diff --git a/Charm_2024validation/options/d_to_ksh_MC.py b/Charm_2024validation/options/d_to_ksh_MC.py
new file mode 100644
index 0000000000..38a2197998
--- /dev/null
+++ b/Charm_2024validation/options/d_to_ksh_MC.py
@@ -0,0 +1,68 @@
+from .tupling import (
+    make_MC_composite_variables,
+    make_MC_basic_variables,
+    make_MC_event_variables,
+)
+
+from PyConf.reading import get_mc_particles, get_mc_header
+from FunTuple import FunTuple_MCParticles as FuntupleMC
+
+def maketuple_MC_D2KSK(options, pvs, rec_summary):
+    name = "MC_D2KSK"
+    line = "/Event/MC/Particles"
+
+    input_data = get_mc_particles(f"{line}")
+
+    branches = {
+        "Dp" : "[D_s+ ==> (KS0 ==> pi- pi+) K+]CC",
+        "KS0"  : "[D_s+ ==> ^(KS0 ==> pi- pi+) K+]CC",
+        "pim"   : "[D_s+ ==> (KS0 ==> ^pi- pi+) K+]CC",
+        "pip"  : "[D_s+ ==> (KS0 ==> pi- ^pi+) K+]CC",
+        "hp" : "[D_s+ ==> (KS0 ==> pi- pi+) ^K+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_MC_composite_variables(),
+        "KS0"    : make_MC_composite_variables(),
+        "pim"     : make_MC_basic_variables(),
+        "pip"    : make_MC_basic_variables(),
+        "hp"   : make_MC_basic_variables(),
+    }
+
+    mytuple  = FuntupleMC(name=name,
+                        tuple_name="MCDecayTree",
+                        fields=branches, variables = variables,
+                        event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
+                        inputs=input_data)
+
+    return [mytuple]
+
+def maketuple_MC_D2KSpi(options, pvs, rec_summary):
+    name = "MC_D2KSpi"
+    line = "/Event/MC/Particles"
+
+    input_data = get_mc_particles(f"{line}")
+
+    branches = {
+        "Dp" : "[D+ ==> (KS0 ==> pi- pi+) pi+]CC",
+        "KS0"  : "[D+ ==> ^(KS0 ==> pi- pi+) pi+]CC",
+        "pim"   : "[D+ ==> (KS0 ==> ^pi- pi+) pi+]CC",
+        "pip"  : "[D+ ==> (KS0 ==> pi- ^pi+) pi+]CC",
+        "hp" : "[D+ ==> (KS0 ==> pi- pi+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_MC_composite_variables(),
+        "KS0"    : make_MC_composite_variables(),
+        "pim"     : make_MC_basic_variables(),
+        "pip"    : make_MC_basic_variables(),
+        "hp"   : make_MC_basic_variables(),
+    }
+
+    mytuple  = FuntupleMC(name=name,
+                        tuple_name="MCDecayTree",
+                        fields=branches, variables = variables,
+                        event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
+                        inputs=input_data)
+
+    return [mytuple]
diff --git a/Charm_2024validation/options/detection_asymmetry.py b/Charm_2024validation/options/detection_asymmetry.py
new file mode 100644
index 0000000000..9769559e87
--- /dev/null
+++ b/Charm_2024validation/options/detection_asymmetry.py
@@ -0,0 +1,191 @@
+from .tupling import (
+    make_composite_variables,
+    make_composite_variables_3body,
+    make_basic_variables,
+    make_hlt2_event_variables,
+)
+
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from FunTuple import FunTuple_Particles as Funtuple
+
+def maketuple_D2Kpipi_ADet(options, pvs, rec_summary):
+    name = "D2Kpipi_ADet"
+    turbo_line = "Hlt2Charm_DpToKmPipPip_ADet"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> K- pi+ pi+]CC",
+        "Km"   : "[D+ -> ^K- pi+ pi+]CC",
+        "pip1"  : "[D+ -> K- ^pi+ pi+]CC",
+        "pip2" : "[D+ -> K- pi+ ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
+        "Km"     : make_basic_variables(options, pvs, input_data),
+        "pip1"    : make_basic_variables(options, pvs, input_data),
+        "pip2"   : make_basic_variables(options, pvs, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2pipipi_ADet(options, pvs, rec_summary):
+    name = "D2pipipi_ADet"
+    turbo_line = "Hlt2Charm_DspToPimPipPip_ADet"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D_s+ -> pi- pi+ pi+]CC",
+        "pim"   : "[D_s+ -> ^pi- pi+ pi+]CC",
+        "pip1"  : "[D_s+ -> pi- ^pi+ pi+]CC",
+        "pip2" : "[D_s+ -> pi- pi+ ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
+        "pim"     : make_basic_variables(options, pvs, input_data),
+        "pip1"    : make_basic_variables(options, pvs, input_data),
+        "pip2"   : make_basic_variables(options, pvs, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Ds2KKpi_ADet(options, pvs, rec_summary):
+    name = "Ds2KKpi_ADet"
+    turbo_line = "Hlt2Charm_DspToKmKpPip_ADet"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D_s+ -> K- K+ pi+]CC",
+        "Km"   : "[D_s+ -> ^K- K+ pi+]CC",
+        "Kp"  : "[D_s+ -> K- ^K+ pi+]CC",
+        "pip" : "[D_s+ -> K- K+ ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
+        "Km"     : make_basic_variables(options, pvs, input_data),
+        "Kp"    : make_basic_variables(options, pvs, input_data),
+        "pip"   : make_basic_variables(options, pvs, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+    
+    return [myfilter, mytuple]
+        
+def maketuple_Lc2KSp_LL_ADet(options, pvs, rec_summary):
+    name = "Lc2KSp_LL_ADet"
+    turbo_line = "Hlt2Charm_LcpToPpKs_LL_ADet"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Lc" : "[Lambda_c+ -> (KS0 -> pi- pi+) p+]CC",
+        "KS0"  : "[Lambda_c+ -> ^(KS0 -> pi- pi+) p+]CC",
+        "pim"   : "[Lambda_c+ -> (KS0 -> ^pi- pi+) p+]CC",
+        "pip"  : "[Lambda_c+ -> (KS0 -> pi- ^pi+) p+]CC",
+        "pp" : "[Lambda_c+ -> (KS0 -> pi- pi+) ^p+]CC",
+    }
+
+    variables = {
+        "Lc"   : make_composite_variables(options, pvs, input_data),
+        "KS0"    : make_composite_variables(options, pvs, input_data),
+        "pim"     : make_basic_variables(options, pvs, input_data),
+        "pip"    : make_basic_variables(options, pvs, input_data),
+        "pp"   : make_basic_variables(options, pvs, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Lc2pKpi_ADet(options, pvs, rec_summary):
+    name = "Lc2pKpi_ADet"
+    turbo_line = "Hlt2Charm_LcpToPpKmPip_ADet"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Lc" : "[Lambda_c+ -> K- pi+ p+]CC",
+        "Km"   : "[Lambda_c+ -> ^K- pi+ p+]CC",
+        "pip"  : "[Lambda_c+ -> K- ^pi+ p+]CC",
+        "pp" : "[Lambda_c+ -> K- pi+ ^p+]CC",
+    }
+
+    variables = {
+        "Lc"   : make_composite_variables_3body(options, pvs, input_data),
+        "Km"     : make_basic_variables(options, pvs, input_data),
+        "pip"    : make_basic_variables(options, pvs, input_data),
+        "pp"   : make_basic_variables(options, pvs, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2KSK_LL_ADet(options, pvs, rec_summary):
+    name = "D2KSK_LL_ADet"
+    turbo_line = "Hlt2Charm_DspToKsKp_LL_ADet"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D_s+ -> (KS0 -> pi- pi+) K+]CC",
+        "KS0"  : "[D_s+ -> ^(KS0 -> pi- pi+) K+]CC",
+        "pim"   : "[D_s+ -> (KS0 -> ^pi- pi+) K+]CC",
+        "pip"  : "[D_s+ -> (KS0 -> pi- ^pi+) K+]CC",
+        "hp" : "[D_s+ -> (KS0 -> pi- pi+) ^K+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data),
+        "KS0"    : make_composite_variables(options, pvs, input_data),
+        "pim"     : make_basic_variables(options, pvs, input_data),
+        "pip"    : make_basic_variables(options, pvs, input_data),
+        "hp"   : make_basic_variables(options, pvs, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2KSpi_LL_ADet(options, pvs, rec_summary):
+    name = "D2KSpi_LL_ADet"
+    turbo_line = "Hlt2Charm_DpToKsPip_LL_ADet"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> (KS0 -> pi- pi+) pi+]CC",
+        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) pi+]CC",
+        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) pi+]CC",
+        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) pi+]CC",
+        "hp" : "[D+ -> (KS0 -> pi- pi+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data),
+        "KS0"    : make_composite_variables(options, pvs, input_data),
+        "pim"     : make_basic_variables(options, pvs, input_data),
+        "pip"    : make_basic_variables(options, pvs, input_data),
+        "hp"   : make_basic_variables(options, pvs, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
diff --git a/Charm_2024validation/options/dst_to_dee.py b/Charm_2024validation/options/dst_to_dee.py
new file mode 100644
index 0000000000..11f42bae95
--- /dev/null
+++ b/Charm_2024validation/options/dst_to_dee.py
@@ -0,0 +1,296 @@
+import Functors as F
+from Functors.math import log
+from DaVinci import Options, make_config
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from FunTuple import FunctorCollection
+from PyConf.reading import get_particles, get_pvs
+import FunTuple.functorcollections as FC
+from FunTuple import FunTuple_Particles as Funtuple
+from DecayTreeFitter import DecayTreeFitter
+from Hlt2Conf.lines.charm.dst_to_dee_makers import (dst_BDT_functor)
+from .tupling import (
+    make_DeltaM_variable,
+    make_basic_variables,
+    make_composite_variables,
+    make_composite_variables_3body,
+    make_composite_variables_4body,
+    make_hlt2_event_variables,
+    make_basic_dtf_variables,
+    make_composite_dtf_variables,
+    make_composite_dtf_variables_3body,
+    make_composite_dtf_variables_4body,
+    Hlt1_lines
+)
+extra_brem_variables= (FunctorCollection(
+            {
+                "BREMHYPODELTAX": F.BREMHYPODELTAX,
+                "BREMHYPOENERGY": F.BREMHYPOENERGY,
+                "BREMHYPOID": F.BREMHYPOID,
+                "BREMHYPOMATCH_CHI2": F.BREMHYPOMATCH_CHI2,
+                "BREMPIDE": F.BREMPIDE,
+                "INBREM": F.INBREM,
+                "MASS_WITH_BREM": F.MASS_WITH_BREM,
+                "PT_WITH_BREM": F.PT_WITH_BREM,
+                "P_WITH_BREM": F.P_WITH_BREM,
+                "ECALPIDE": F.ECALPIDE,
+                "HCALPIDE": F.HCALPIDE,
+                "ELECTRONSHOWEREOP": F.ELECTRONSHOWEREOP,
+                "CLUSTERMATCH_CHI2": F.CLUSTERMATCH_CHI2,
+                "ELECTRONMATCH_CHI2": F.ELECTRONMATCH_CHI2,
+                "ELECTRONENERGY": F.ELECTRONENERGY,
+                "ELECTRONID": F.ELECTRONID,
+                "HCALEOP": F.HCALEOP,
+                "CALO_NEUTRAL_SHOWER_SHAPE": F.CALO_NEUTRAL_SHOWER_SHAPE,
+                "RICH_DLL_E": F.VALUE_OR(F.NaN)@F.RICH_DLL_E,
+            })
+    )
+
+decay_descriptor = {
+    'dst_kpi_os' : {
+        "Dst0":   "[ D*(2007)0 ->  (D0 ->  K-  pi+)  (gamma ->  e+  e-)]CC",
+        "D0":     "[ D*(2007)0 -> ^(D0 ->  K-  pi+)  (gamma ->  e+  e-)]CC",
+        "Kminus": "[ D*(2007)0 ->  (D0 -> ^K-  pi+)  (gamma ->  e+  e-)]CC",
+        "piplus": "[ D*(2007)0 ->  (D0 ->  K- ^pi+)  (gamma ->  e+  e-)]CC",
+        "gamma":  "[ D*(2007)0 ->  (D0 ->  K-  pi+) ^(gamma ->  e+  e-)]CC",
+        "eplus":  "[ D*(2007)0 ->  (D0 ->  K-  pi+)  (gamma -> ^e+  e-)]CC",
+        "eminus": "[ D*(2007)0 ->  (D0 ->  K-  pi+)  (gamma ->  e+ ^e-)]CC",
+    },
+
+    'dst_kpi_ss' : {
+        "Dst0":   "[ D*(2007)0 ->  (D0 ->  K-  pi+)  ([gamma ->  e+  e+]CC)]CC",
+        "D0":     "[ D*(2007)0 -> ^(D0 ->  K-  pi+)  ([gamma ->  e+  e+]CC)]CC",
+        "Kminus": "[ D*(2007)0 ->  (D0 -> ^K-  pi+)  ([gamma ->  e+  e+]CC)]CC",
+        "piplus": "[ D*(2007)0 ->  (D0 ->  K- ^pi+)  ([gamma ->  e+  e+]CC)]CC",
+        "gamma":  "[ D*(2007)0 ->  (D0 ->  K-  pi+) ^([gamma ->  e+  e+]CC)]CC",
+        "eplus":  "[ D*(2007)0 ->  (D0 ->  K-  pi+)  ([gamma -> ^e+  e+]CC)]CC",
+        "eminus": "[ D*(2007)0 ->  (D0 ->  K-  pi+)  ([gamma ->  e+ ^e+]CC)]CC",
+    },
+
+    'dst_k3pi_os' :  {
+        "Dst0":    "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)  (gamma ->  e+  e-)]CC",
+        "D0":      "[ D*(2007)0 -> ^(D0 -> K- pi- pi+ pi+)  (gamma ->  e+  e-)]CC",
+        "Kminus":  "[ D*(2007)0 ->  (D0 -> ^K- pi- pi+ pi+) (gamma ->  e+  e-)]CC",
+        "piminus": "[ D*(2007)0 ->  (D0 -> K- ^pi- pi+ pi+) (gamma ->  e+  e-)]CC",
+        "piplus1": "[ D*(2007)0 ->  (D0 -> K- pi- ^pi+ pi+) (gamma ->  e+  e-)]CC",
+        "piplus2": "[ D*(2007)0 ->  (D0 -> K- pi- pi+ ^pi+) (gamma ->  e+  e-)]CC",
+        "gamma":   "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+) ^(gamma ->  e+  e-)]CC",
+        "eplus":   "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)  (gamma -> ^e+  e-)]CC",
+        "eminus":  "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)  (gamma ->  e+ ^e-)]CC",
+    },
+
+    'dst_k3pi_ss' :  {
+        "Dst0":    "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)   ([gamma ->  e+  e+]CC)]CC",
+        "D0":      "[ D*(2007)0 -> ^(D0 -> K- pi- pi+ pi+)   ([gamma ->  e+  e+]CC)]CC",
+        "Kminus":  "[ D*(2007)0 ->  (D0 -> ^K- pi- pi+ pi+)  ([gamma ->  e+  e+]CC)]CC",
+        "piminus": "[ D*(2007)0 ->  (D0 -> K- ^pi- pi+ pi+)  ([gamma ->  e+  e+]CC)]CC",
+        "piplus1": "[ D*(2007)0 ->  (D0 -> K- pi- ^pi+ pi+)  ([gamma ->  e+  e+]CC)]CC",
+        "piplus2": "[ D*(2007)0 ->  (D0 -> K- pi- pi+ ^pi+)  ([gamma ->  e+  e+]CC)]CC",
+        "gamma":   "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)  ^([gamma ->  e+  e+]CC)]CC",
+        "eplus":   "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)   ([gamma -> ^e+  e+]CC)]CC",
+        "eminus":  "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)   ([gamma ->  e+ ^e+]CC)]CC",
+    },
+
+    'dsstp_2kpi_os' : {
+        "Dstp":   "[ D*_s+ ->  (D_s+ -> K- K+ pi+)  (gamma ->  e+  e-)]CC",
+        "DpDs":   "[ D*_s+ -> ^(D_s+ -> K- K+ pi+)  (gamma ->  e+  e-)]CC",
+        "Kminus": "[ D*_s+ ->  (D_s+ -> ^K- K+ pi+) (gamma ->  e+  e-)]CC",
+        "Kplus":  "[ D*_s+ ->  (D_s+ -> K- ^K+ pi+) (gamma ->  e+  e-)]CC",
+        "piplus": "[ D*_s+ ->  (D_s+ -> K- K+ ^pi+) (gamma ->  e+  e-)]CC",
+        "gamma":  "[ D*_s+ ->  (D_s+ -> K- K+ pi+) ^(gamma ->  e+  e-)]CC",
+        "eplus":  "[ D*_s+ ->  (D_s+ -> K- K+ pi+)  (gamma -> ^e+  e-)]CC",
+        "eminus": "[ D*_s+ ->  (D_s+ -> K- K+ pi+)  (gamma ->  e+ ^e-)]CC",
+    },
+    'dsstp_2kpi_ss' : {
+        "Dstp":   "[ D*_s+ ->  (D_s+ -> K- K+ pi+)   ([gamma ->  e+  e+]CC)]CC",
+        "DpDs":   "[ D*_s+ -> ^(D_s+ -> K- K+ pi+)   ([gamma ->  e+  e+]CC)]CC",
+        "Kminus": "[ D*_s+ ->  (D_s+ -> ^K- K+ pi+)  ([gamma ->  e+  e+]CC)]CC",
+        "Kplus":  "[ D*_s+ ->  (D_s+ -> K- ^K+ pi+)  ([gamma ->  e+  e+]CC)]CC",
+        "piplus": "[ D*_s+ ->  (D_s+ -> K- K+ ^pi+)  ([gamma ->  e+  e+]CC)]CC",
+        "gamma":  "[ D*_s+ ->  (D_s+ -> K- K+ pi+)  ^([gamma ->  e+  e+]CC)]CC",
+        "eplus":  "[ D*_s+ ->  (D_s+ -> K- K+ pi+)   ([gamma -> ^e+  e+]CC)]CC",
+        "eminus": "[ D*_s+ ->  (D_s+ -> K- K+ pi+)   ([gamma ->  e+ ^e+]CC)]CC",
+    },
+
+}
+
+def MVA_dst_variables(line, pvs):
+    return (FunctorCollection( { "MVA": dst_BDT_functor(pvs, line=line)}))
+#make_dtf_variables(options,  input_data, ptype):
+def make_dtf_variables(options, input_data,  pvs, ptype="basic",  mass_constrain = ["D*(2007)0", "D0" ], nparticles=2):
+    
+    DTF = DecayTreeFitter(
+        name="DTF_{hash}",
+        input_particles=input_data,
+    )
+
+    DTF_DMass_BestPV = DecayTreeFitter(
+        name="DTF_DMass_BestPV_{hash}",
+        input_particles=input_data,
+        mass_constraints=mass_constrain,
+        input_pvs=pvs,
+        fit_all_pvs=False,
+    )
+    DTF_Mass_BestPV = DecayTreeFitter(
+        name="DTF_Mass_BestPV_{hash}",
+        input_particles=input_data,
+        mass_constraints=[mass_constrain[1]],
+        input_pvs=pvs,
+        fit_all_pvs=False,
+    )
+
+    DTF_BestPV = DecayTreeFitter(
+        name="DTF_BestPV_{hash}",
+        input_particles=input_data,
+        #mass_constraints=["D*(2007)0", "D0" ],
+        input_pvs=pvs,
+        fit_all_pvs=False,
+    )
+
+    DTF_DMass = DecayTreeFitter(
+        name="DTF_DMass_{hash}",
+        input_particles=input_data,
+        mass_constraints=mass_constrain,
+        output_level=3,
+    )
+    DTF_Mass = DecayTreeFitter(
+        name="DTF_Mass_{hash}",
+        input_particles=input_data,
+        mass_constraints=[mass_constrain[1]],
+        output_level=3,
+    )
+    
+    if ptype == "basic":
+        dtf_variables =  make_basic_dtf_variables
+    elif ptype == "composite":
+        if nparticles == 2:
+            dtf_variables = make_composite_dtf_variables 
+        elif nparticles == 3:
+            dtf_variables = make_composite_dtf_variables_3body
+        elif nparticles == 4:
+            dtf_variables = make_composite_dtf_variables_4body 
+
+    dtf_vars = dtf_variables(options, pvs, input_data,
+                                        DTF=DTF,
+                                        pv_constraint=False,
+                                        mass_constraint=False)
+    dtf_vars += dtf_variables(options, pvs, input_data,
+                                        DTF=DTF_BestPV,
+                                        pv_constraint=True,
+                                        mass_constraint=False)
+    dtf_vars += dtf_variables(options, pvs, input_data,
+                                        DTF=DTF_Mass,
+                                        pv_constraint=False,
+                                        mass_constraint=True, particle_name="D")
+    dtf_vars += dtf_variables(options, pvs, input_data,
+                                        DTF=DTF_Mass_BestPV,
+                                        pv_constraint=True,
+                                        mass_constraint=True, particle_name="D")
+    dtf_vars += dtf_variables(options, pvs, input_data,
+                                        DTF=DTF_DMass,
+                                        pv_constraint=False,
+                                        mass_constraint=True, particle_name="DstD")
+    dtf_vars += dtf_variables(options, pvs, input_data,
+                                        DTF=DTF_DMass_BestPV,
+                                        pv_constraint=True,
+                                        mass_constraint=True, particle_name="DstD")
+
+    return dtf_vars
+
+
+def make_Dst0ToD0EmEp_D0ToKmPip_tuple(options, line, pvs , rec_summary, dd='dst_kpi_os'):
+
+    input_data=get_particles(f"/Event/HLT2/{line}/Particles")
+    my_filter = create_lines_filter(f"LineFilter_{line}_{{hash}}",[line],)
+
+    fields = decay_descriptor[dd]
+    
+    composite_tuple_variables = {
+        "Dst0"   :  make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs,  "composite") +\
+             MVA_dst_variables("Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip", pvs) + make_DeltaM_variable(options), 
+        "D0"     :  make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs,  "composite"),
+        "gamma"  :  make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs,  "composite")
+    }
+    basic_tuple_variables = { 
+        "Kminus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"),
+        "piplus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"),
+        "eplus"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic") + extra_brem_variables,
+        "eminus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic") + extra_brem_variables,
+    }
+
+    my_tuple = Funtuple(
+        name=f"Tuple_{line}_{dd}",
+        tuple_name="DecayTree",
+        fields=fields,
+        variables= {**composite_tuple_variables, **basic_tuple_variables},
+        event_variables=make_hlt2_event_variables(options, pvs, rec_summary), 
+        inputs=input_data,
+        store_multiple_cand_info=True
+    )
+    return [ my_filter, my_tuple]
+
+def make_Dst0ToD0EmEp_D0ToKmPimPipPip_tuple(options, line, pvs, rec_summary, dd='dst_k3pi_os'):
+
+    input_data=get_particles(f"/Event/HLT2/{line}/Particles")
+    my_filter = create_lines_filter(f"LineFilter_{line}_{{hash}}",[line],)
+
+    fields = decay_descriptor[dd]
+    
+    composite_tuple_variables = {
+        "Dst0"   : make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs, "composite") +\
+             MVA_dst_variables("Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip", pvs) + make_DeltaM_variable(options), 
+        "D0"     : make_composite_variables_4body(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs, "composite", nparticles=4),
+        "gamma"  : make_composite_variables(options, pvs, input_data) 
+    }
+    basic_tuple_variables = { 
+        "Kminus"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"),
+        "piminus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"),
+        "piplus1" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"),
+        "piplus2" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"), 
+        "eplus"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic") + extra_brem_variables,
+        "eminus"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic") + extra_brem_variables,
+    }
+
+    my_tuple = Funtuple(
+        name=f"Tuple_{line}_{dd}",
+        tuple_name="DecayTree",
+        fields=fields,
+        variables= {**composite_tuple_variables, **basic_tuple_variables},
+        event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data,
+        store_multiple_cand_info=True
+    )
+    return [ my_filter, my_tuple]
+
+
+def make_DstpToDpDspEmEp_DpDspToKmKpPip_tuple(options, line, pvs , rec_summary, dd='dsstp_2kpi_os'):
+
+    input_data=get_particles(f"/Event/HLT2/{line}/Particles")
+    my_filter = create_lines_filter(f"LineFilter_{line}_{{hash}}",[line],)
+
+    fields = decay_descriptor[dd]
+
+    composite_tuple_variables = {
+        "Dstp"   : make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs, "composite", mass_constrain = ["D*_s+", "D_s+"]) +\
+             MVA_dst_variables("Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip", pvs) + make_DeltaM_variable(options), 
+        "DpDs"   : make_composite_variables_3body(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs, "composite", mass_constrain = ["D*_s+", "D_s+"], nparticles=3),
+        "gamma"  : make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs, "composite", mass_constrain = ["D*_s+", "D_s+"]),
+    }
+    basic_tuple_variables = { 
+        "Kminus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic",  mass_constrain = ["D*_s+", "D_s+"]),
+        "Kplus"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic",  mass_constrain = ["D*_s+", "D_s+"]),
+        "piplus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic",  mass_constrain = ["D*_s+", "D_s+"]),
+        "eplus"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic",  mass_constrain = ["D*_s+", "D_s+"])+ extra_brem_variables,
+        "eminus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic",  mass_constrain = ["D*_s+", "D_s+"])+ extra_brem_variables,
+    }
+
+    my_tuple = Funtuple(
+        name=f"Tuple_{line}_{dd}",
+        tuple_name="DecayTree",
+        fields=fields,
+        variables= {**composite_tuple_variables, **basic_tuple_variables},
+        event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data,
+        store_multiple_cand_info=True
+    )
+    return [ my_filter, my_tuple]
diff --git a/Charm_2024validation/options/hlt1.py b/Charm_2024validation/options/hlt1.py
new file mode 100644
index 0000000000..b93aeb113c
--- /dev/null
+++ b/Charm_2024validation/options/hlt1.py
@@ -0,0 +1,33 @@
+###############################################################################
+# (c) Copyright 2023 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.                                       #
+###############################################################################
+"""
+Configures running HLT1 via Moore.
+"""
+
+from Moore import Options
+from Moore.config import allen_control_flow
+from RecoConf.hlt1_allen import allen_gaudi_config, get_allen_line_names
+from AllenConf.hlt1_calibration_lines import make_passthrough_line
+from PyConf.application import configure_input, configure
+
+def alg_config(options: Options):
+    """
+    Configures algorithm running of HLT1 via Moore to be passed to Analysis Productions.
+    """
+
+    config = configure_input(options)
+    with allen_gaudi_config.bind(sequence="hlt1_pp_matching_no_ut_1000KHz"), make_passthrough_line.bind(pre_scaler=1):
+        line_names = get_allen_line_names()
+        allen_node = allen_control_flow(options)
+        config.update(configure(options, allen_node))
+
+    return config
+
diff --git a/Charm_2024validation/options/hlt2/d0_to_hh.py b/Charm_2024validation/options/hlt2/d0_to_hh.py
new file mode 100644
index 0000000000..3c0b0d0086
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/d0_to_hh.py
@@ -0,0 +1,9 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d0_to_hh import all_lines as hh_lines
+
+def make_lines():
+    mylines = [builder() for builder in hh_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+
diff --git a/Charm_2024validation/options/hlt2/d0_to_hhhh.py b/Charm_2024validation/options/hlt2/d0_to_hhhh.py
new file mode 100644
index 0000000000..81fe4dce30
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/d0_to_hhhh.py
@@ -0,0 +1,8 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d0_to_hhhh import all_lines as hhhh_lines
+
+def make_lines():
+    mylines = [builder() for builder in hhhh_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
diff --git a/Charm_2024validation/options/hlt2/d0_to_hhpi0.py b/Charm_2024validation/options/hlt2/d0_to_hhpi0.py
new file mode 100644
index 0000000000..52f8433c11
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/d0_to_hhpi0.py
@@ -0,0 +1,8 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d0_to_hhpi0 import all_lines as hhpi0_lines
+
+def make_lines():
+    mylines = [builder() for builder in hhpi0_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
diff --git a/Charm_2024validation/options/hlt2/d0_to_kshh.py b/Charm_2024validation/options/hlt2/d0_to_kshh.py
new file mode 100644
index 0000000000..79df310ed8
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/d0_to_kshh.py
@@ -0,0 +1,8 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d0_to_kshh import all_lines as kshh_lines
+
+def make_lines():
+    mylines = [builder() for builder in kshh_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
diff --git a/Charm_2024validation/options/hlt2/d0_to_ksks.py b/Charm_2024validation/options/hlt2/d0_to_ksks.py
new file mode 100644
index 0000000000..71ab403fd9
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/d0_to_ksks.py
@@ -0,0 +1,8 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d0_to_ksks import all_lines as ksks_lines
+
+def make_lines():
+    mylines = [builder() for builder in ksks_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
diff --git a/Charm_2024validation/options/hlt2/d_to_hhh.py b/Charm_2024validation/options/hlt2/d_to_hhh.py
new file mode 100644
index 0000000000..cd718f9b86
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/d_to_hhh.py
@@ -0,0 +1,10 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d_to_hhh import all_lines as hhh_lines
+from Hlt2Conf.lines.charm.detection_asymmetry_lines import all_lines as det_asy_lines
+
+def make_lines():
+    mylines = [builder() for builder in hhh_lines.values()]
+    mylines += [builder() for builder in det_asy_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
diff --git a/Charm_2024validation/options/hlt2/d_to_ksh.py b/Charm_2024validation/options/hlt2/d_to_ksh.py
new file mode 100644
index 0000000000..8c8b172dd0
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/d_to_ksh.py
@@ -0,0 +1,10 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d_to_ksh import all_lines as ksh_lines
+from Hlt2Conf.lines.charm.detection_asymmetry_lines import all_lines as det_asy_lines
+
+def make_lines():
+    mylines = [builder() for builder in ksh_lines.values()]
+    mylines += [builder() for builder in det_asy_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
diff --git a/Charm_2024validation/options/hlt2/dst_to_dee.py b/Charm_2024validation/options/hlt2/dst_to_dee.py
new file mode 100644
index 0000000000..4fd67becd7
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/dst_to_dee.py
@@ -0,0 +1,9 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.dst_to_dee import all_lines as dst_to_dee_lines
+
+def make_lines():
+    mylines = [builder() for builder in dst_to_dee_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+
diff --git a/Charm_2024validation/options/hlt2/hlt2.py b/Charm_2024validation/options/hlt2/hlt2.py
new file mode 100644
index 0000000000..c1560ce952
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/hlt2.py
@@ -0,0 +1,32 @@
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_d0_to_hh.py b/Charm_2024validation/options/hlt2/hlt2_d0_to_hh.py
new file mode 100644
index 0000000000..7c3a67ed03
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/hlt2_d0_to_hh.py
@@ -0,0 +1,41 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d0_to_hh import all_lines as hh_lines
+
+def make_lines():
+    mylines = [builder() for builder in hh_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_d0_to_hhhh.py b/Charm_2024validation/options/hlt2/hlt2_d0_to_hhhh.py
new file mode 100644
index 0000000000..d7d5dcbb90
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/hlt2_d0_to_hhhh.py
@@ -0,0 +1,40 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d0_to_hhhh import all_lines as hhhh_lines
+
+def make_lines():
+    mylines = [builder() for builder in hhhh_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_d0_to_hhpi0.py b/Charm_2024validation/options/hlt2/hlt2_d0_to_hhpi0.py
new file mode 100644
index 0000000000..063eeb274a
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/hlt2_d0_to_hhpi0.py
@@ -0,0 +1,40 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d0_to_hhpi0 import all_lines as hhpi0_lines
+
+def make_lines():
+    mylines = [builder() for builder in hhpi0_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_d0_to_kshh.py b/Charm_2024validation/options/hlt2/hlt2_d0_to_kshh.py
new file mode 100644
index 0000000000..3e1996cdf0
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/hlt2_d0_to_kshh.py
@@ -0,0 +1,40 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d0_to_kshh import all_lines as kshh_lines
+
+def make_lines():
+    mylines = [builder() for builder in kshh_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_d0_to_ksks.py b/Charm_2024validation/options/hlt2/hlt2_d0_to_ksks.py
new file mode 100644
index 0000000000..e8d1052803
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/hlt2_d0_to_ksks.py
@@ -0,0 +1,40 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d0_to_ksks import all_lines as ksks_lines
+
+def make_lines():
+    mylines = [builder() for builder in ksks_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_d_to_hhh.py b/Charm_2024validation/options/hlt2/hlt2_d_to_hhh.py
new file mode 100644
index 0000000000..97965cb96e
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/hlt2_d_to_hhh.py
@@ -0,0 +1,42 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d_to_hhh import all_lines as hhh_lines
+from Hlt2Conf.lines.charm.detection_asymmetry_lines import all_lines as det_asy_lines
+
+def make_lines():
+    mylines = [builder() for builder in hhh_lines.values()]
+    mylines += [builder() for builder in det_asy_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_d_to_ksh.py b/Charm_2024validation/options/hlt2/hlt2_d_to_ksh.py
new file mode 100644
index 0000000000..d2593da6a9
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/hlt2_d_to_ksh.py
@@ -0,0 +1,42 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d_to_ksh import all_lines as ksh_lines
+from Hlt2Conf.lines.charm.detection_asymmetry_lines import all_lines as det_asy_lines
+
+def make_lines():
+    mylines = [builder() for builder in ksh_lines.values()]
+    mylines += [builder() for builder in det_asy_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_dst_to_dee.py b/Charm_2024validation/options/hlt2/hlt2_dst_to_dee.py
new file mode 100644
index 0000000000..d43ecbcd65
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/hlt2_dst_to_dee.py
@@ -0,0 +1,41 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.dst_to_dee import all_lines as dst_to_dee_lines
+
+def make_lines():
+    mylines = [builder() for builder in dst_to_dee_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_rare_charm.py b/Charm_2024validation/options/hlt2/hlt2_rare_charm.py
new file mode 100644
index 0000000000..cb9ac88a02
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/hlt2_rare_charm.py
@@ -0,0 +1,40 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.rare_charm_lines import all_lines as rare_charm_lines
+
+def make_lines():
+    mylines = [builder() for builder in rare_charm_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2noUT.py b/Charm_2024validation/options/hlt2/hlt2noUT.py
new file mode 100644
index 0000000000..473127434b
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/hlt2noUT.py
@@ -0,0 +1,32 @@
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf_without_UT
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf_without_UT),\
+         require_gec.bind(skipUT=True),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/options/hlt2/make_hlt2_decay.sh b/Charm_2024validation/options/hlt2/make_hlt2_decay.sh
new file mode 100644
index 0000000000..f127b86285
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/make_hlt2_decay.sh
@@ -0,0 +1,9 @@
+cat d0_to_hh.py hlt2.py > hlt2_d0_to_hh.py
+cat d0_to_hhpi0.py hlt2.py > hlt2_d0_to_hhpi0.py
+cat d0_to_hhhh.py hlt2.py > hlt2_d0_to_hhhh.py
+cat d0_to_kshh.py hlt2.py > hlt2_d0_to_kshh.py
+cat d0_to_ksks.py hlt2.py > hlt2_d0_to_ksks.py
+cat d_to_hhh.py hlt2.py > hlt2_d_to_hhh.py
+cat d_to_ksh.py hlt2.py > hlt2_d_to_ksh.py
+cat rare_charm.py hlt2.py > hlt2_rare_charm.py
+cat dst_to_dee.py hlt2.py > hlt2_dst_to_dee.py
diff --git a/Charm_2024validation/options/hlt2/rare_charm.py b/Charm_2024validation/options/hlt2/rare_charm.py
new file mode 100644
index 0000000000..39194555f0
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/rare_charm.py
@@ -0,0 +1,8 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.rare_charm_lines import all_lines as rare_charm_lines
+
+def make_lines():
+    mylines = [builder() for builder in rare_charm_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
diff --git a/Charm_2024validation/options/rare_charm.py b/Charm_2024validation/options/rare_charm.py
new file mode 100644
index 0000000000..d4d4a5d83d
--- /dev/null
+++ b/Charm_2024validation/options/rare_charm.py
@@ -0,0 +1,496 @@
+from .tupling import (
+    make_composite_variables,
+    make_composite_variables_3body,
+    make_DeltaM_variable,
+    make_basic_variables,
+    make_hlt2_event_variables,
+    make_top_isolation_variables,
+    make_basic_isolation_variables,
+    make_intermediate_isolation_variables,
+    make_composite_dtf_variables,
+    make_composite_dtf_variables_3body,
+    make_basic_dtf_variables,
+)
+
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from FunTuple import FunTuple_Particles as Funtuple
+
+def make_dtf_variables_hmumu(options, pvs, input_data, ptype):
+
+    if ptype not in ["basic", "composite"]:
+        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
+
+    from DecayTreeFitter import DecayTreeFitter
+    
+    DTF = DecayTreeFitter(
+        name=f'DTF_{{hash}}',
+        input_particles=input_data)
+
+    DTFvtx = DecayTreeFitter(
+        name=f'DTFvtx_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    DTFmassDp = DecayTreeFitter(
+        name=f'DTFmassDp_{{hash}}',
+        input_particles=input_data,
+        mass_constraints=["D+"])
+
+    DTFvtxmassDp = DecayTreeFitter(
+        name=f'DTFvtxmassDp_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D+"])
+
+    DTFmassDsp = DecayTreeFitter(
+        name=f'DTFmassDsp_{{hash}}',
+        input_particles=input_data,
+        substitutions = ['D+{{D_s+}}'],
+        mass_constraints=["D_s+"])
+
+    DTFvtxmassDsp = DecayTreeFitter(
+        name=f'DTFvtxmassDsp_{{hash}}',
+        input_particles=input_data,
+        substitutions = ['D+{{D_s+}}',"J/psi(1S){{J/psi(1S)}}"],#trick
+        mass_constraints=["D_s+"],
+        input_pvs=pvs,
+    )
+
+    if ptype == "basic":
+        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassDp,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="Dp")
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassDp,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="Dp")
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassDsp,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="Dsp")
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassDsp,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="Dsp")
+        return dtf_vars
+
+    if ptype == "composite":
+        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassDp,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="Dp")
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassDp,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="Dp")
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassDsp,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="Dsp")
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassDsp,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="Dsp")
+        return dtf_vars
+
+
+def make_dtf_variables_pmumu(options, pvs, input_data, ptype):
+
+    if ptype not in ["basic", "composite"]:
+        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
+
+    from DecayTreeFitter import DecayTreeFitter
+    
+    DTF = DecayTreeFitter(
+        name=f'DTF_{{hash}}',
+        input_particles=input_data)
+
+    DTFvtx = DecayTreeFitter(
+        name=f'DTFvtx_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    DTFmass = DecayTreeFitter(
+        name=f'DTFmass_{{hash}}',
+        input_particles=input_data,
+        mass_constraints=["Lambda_c+"])
+
+    DTFvtxmass = DecayTreeFitter(
+        name=f'DTFvtxmass_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["Lambda_c+"])
+
+    if ptype == "basic":
+        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmass,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="Lc")
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmass,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="Lc")
+        return dtf_vars
+
+    if ptype == "composite":
+        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmass,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="D0")
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmass,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="D0")
+        return dtf_vars
+
+def make_dtf_variables_hhmumu(options, pvs, input_data, ptype):
+
+    if ptype not in ["basic", "composite","composite3b"]:
+        Exception(f"I want \'basic\' or \'composite\' or \'composite3b\. Got {ptype}")
+
+    from DecayTreeFitter import DecayTreeFitter
+    
+    DTF = DecayTreeFitter(
+        name=f'DTF_{{hash}}',
+        input_particles=input_data)
+
+    DTFvtx = DecayTreeFitter(
+        name=f'DTFvtx_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    DTFmass = DecayTreeFitter(
+        name=f'DTFmass_{{hash}}',
+        input_particles=input_data,
+        mass_constraints=["D0"])
+
+    DTFvtxmass = DecayTreeFitter(
+        name=f'DTFvtxmass_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0"])
+
+    if ptype == "basic":
+        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmass,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="D0")
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmass,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="D0")
+        return dtf_vars
+
+    if ptype == "composite3b":
+        dtf_vars = make_composite_dtf_variables_3body(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
+                                             DTF=DTFmass,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="D0")
+        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
+                                             DTF=DTFvtxmass,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="D0")
+
+        return dtf_vars
+        
+    if ptype == "composite":
+        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmass,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="D0")
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmass,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="D0")
+        return dtf_vars
+
+
+def maketuple_D2pimumu(options, pvs, rec_summary):
+    name = "D2pimumu"
+    turbo_line = "Hlt2Charm_DpDspToPipMumMup"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> (J/psi(1S) -> mu- mu+) pi+]CC",
+        "Jpsi" : "[D+ -> ^(J/psi(1S) -> mu- mu+) pi+]CC",
+        "lm"   : "[D+ -> (J/psi(1S) -> ^mu- mu+) pi+]CC",
+        "lp"   : "[D+ -> (J/psi(1S) -> mu- ^mu+) pi+]CC",
+        "hp" : "[D+ -> (J/psi(1S) -> mu- mu+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
+        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation: 
+
+        variables = {
+            "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+            "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2pimumu_WS(options, pvs, rec_summary):
+    name = "D2pimumu_WS"
+    turbo_line = "Hlt2Charm_DpDspToPipMupMup_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> (J/psi(1S) -> mu+ mu+) pi+]CC",
+        "Jpsi" : "[D+ -> (J/psi(1S) -> mu+ mu+) pi+]CC",
+        "lp1"   : "[D+ -> (J/psi(1S) -> ^mu+ mu+) pi+]CC",
+        "lp2"   : "[D+ -> (J/psi(1S) -> mu+ ^mu+) pi+]CC",
+        "hp" : "[D+ -> (J/psi(1S) -> mu+ mu+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
+        "lp1"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+        "lp2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation: 
+
+        variables = {
+            "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+            "lp1"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "lp2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2pipipi(options, pvs, rec_summary):
+    name = "CharmRD_D2pipipi"
+    turbo_line = "Hlt2Charm_DpDspToPipPimPip_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> (J/psi(1S) -> pi- pi+) pi+]CC",
+        "Jpsi" : "[D+ -> (J/psi(1S) -> pi- pi+) pi+]CC",
+        "lm"   : "[D+ -> (J/psi(1S) -> ^pi- pi+) pi+]CC",
+        "lp"   : "[D+ -> (J/psi(1S) -> pi- ^pi+) pi+]CC",
+        "hp" : "[D+ -> (J/psi(1S) -> pi- pi+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
+        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation: 
+
+        variables = {
+            "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+            "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2piee(options, pvs, rec_summary):
+    name = "D2piee"
+    turbo_line = "Hlt2Charm_DpDspToPipEmEp"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> (J/psi(1S) -> e- e+) pi+]CC",
+        "Jpsi" : "[D+ -> ^(J/psi(1S) -> e- e+) pi+]CC",
+        "lm"   : "[D+ -> (J/psi(1S) -> ^e- e+) pi+]CC",
+        "lp"   : "[D+ -> (J/psi(1S) -> e- ^e+) pi+]CC",
+        "hp" : "[D+ -> (J/psi(1S) -> e- e+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
+        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation: 
+
+        variables = {
+            "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+            "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Lc2pmumu(options, pvs, rec_summary):
+    name = "Lc2pmumu"
+    turbo_line = "Hlt2Charm_LcpToPpMumMup"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Lc" : "[Lambda_c+ -> (J/psi(1S) -> mu- mu+) p+]CC",
+        "Jpsi" : "[Lambda_c+ -> ^(J/psi(1S) -> mu- mu+) p+]CC",
+        "lm"   : "[Lambda_c+ -> (J/psi(1S) -> ^mu- mu+) p+]CC",
+        "lp"  : "[Lambda_c+ -> (J/psi(1S) -> mu- ^mu+) p+]CC",
+        "pp" : "[Lambda_c+ -> (J/psi(1S) -> mu- mu+) ^p+]CC",
+    }
+
+    variables = {
+        "Lc"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "pp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation: 
+
+        variables = {
+            "Lc"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+            "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "pp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02Kpimumu_RS(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02Kpimumu_RS"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPipMumMup"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^(D0 -> K- pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
+        "Km"   : "[D*(2010)+ -> (D0 -> ^K- pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
+        "pip"  : "[D*(2010)+ -> (D0 -> K- ^pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
+        "Jpsi"  : "[D*(2010)+ -> (D0 -> K- pi+ ^(J/psi(1S) -> mu- mu+)) pi+]CC",
+        "lm"  : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> ^mu- mu+)) pi+]CC",
+        "lp"  : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> mu- ^mu+)) pi+]CC",
+        "spip" : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> mu- mu+)) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite"),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation: 
+
+        variables = {
+            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
+            "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
+            "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+            "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
diff --git a/Charm_2024validation/options/tupling.py b/Charm_2024validation/options/tupling.py
new file mode 100644
index 0000000000..99de572726
--- /dev/null
+++ b/Charm_2024validation/options/tupling.py
@@ -0,0 +1,986 @@
+##############################################################################
+# (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.                                       #
+###############################################################################
+"""Common configuration functions
+
+"""
+
+import Functors as F
+from Functors.math import log
+import Functors.math as fmath
+
+from FunTuple import FunctorCollection
+from FunTuple.functorcollections import (
+    MCHierarchy,
+    MCPromptDecay,
+    Kinematics,
+    SelectionInfo,
+    HltTisTos,
+    MCVertexInfo,
+    MCKinematics,
+    ParticleID, #wrong variables PID_PI = 0, PROBNN_D = nan
+    EventInfo,
+    LHCInfo,
+    ParticleIsolation,
+    MCPrimaries,
+    MCReconstructed,
+    MCReconstructible,
+)
+
+from DaVinciMCTools import MCTruthAndBkgCat, MCReconstructed, MCReconstructible
+from PyConf.Algorithms import ParticleToSubcombinationsAlg
+from DecayTreeFitter import DecayTreeFitter
+
+Hlt1_global_lines = [
+    "Hlt1GECPassthroughDecision",
+    "Hlt1BeamGasDecision",
+    "Hlt1PassthroughDecision",
+    "Hlt1NoBeamDecision",
+    "Hlt1BeamOneDecision",
+    "Hlt1BeamTwoDecision",
+    "Hlt1BothBeamsDecision",
+    "Hlt1ODINLumiDecision",
+    "Hlt1ODINVeloOpenDecision",
+    "Hlt1ODINNoBiasDecision",
+    "Hlt1VeloMicroBiasDecision",
+    "Hlt1RICH1AlignmentDecision",
+    "Hlt1RICH2AlignmentDecision",
+    "Hlt1BeamGasDecision",
+    "Hlt1L02PPiDecision",
+    "Hlt1LowMassNoipDielectron_massSlice1_promptDecision",
+    "Hlt1LowMassNoipDielectron_SS_massSlice1_promptDecision",
+    "Hlt1LowMassNoipDielectron_massSlice2_promptDecision",
+    "Hlt1LowMassNoipDielectron_SS_massSlice2_promptDecision",
+    "Hlt1LowMassNoipDielectron_massSlice3_promptDecision",
+    "Hlt1LowMassNoipDielectron_SS_massSlice3_promptDecision",
+    "Hlt1LowMassNoipDielectron_massSlice4_promptDecision",
+    "Hlt1LowMassNoipDielectron_SS_massSlice4_promptDecision",
+    "Hlt1LowMassNoipDielectron_massSlice1_displacedDecision",
+    "Hlt1LowMassNoipDielectron_SS_massSlice1_displacedDecision",
+    "Hlt1LowMassNoipDielectron_massSlice2_displacedDecision",
+    "Hlt1LowMassNoipDielectron_SS_massSlice2_displacedDecision",
+    "Hlt1LowMassNoipDielectron_massSlice3_displacedDecision",
+    "Hlt1LowMassNoipDielectron_SS_massSlice3_displacedDecision",
+    "Hlt1LowMassNoipDielectron_massSlice4_displacedDecision",
+    "Hlt1LowMassNoipDielectron_SS_massSlice4_displacedDecision",
+]
+Hlt1_1track_lines = [
+    "Hlt1TrackMVADecision",
+    "Hlt1LowPtMuonDecision",
+    "Hlt1SingleHighPtMuonDecision",
+    "Hlt1SingleHighPtMuonNoMuIDDecision",
+    "Hlt1TrackMuonMVADecision",
+    "Hlt1OneMuonTrackLineDecision",
+    "Hlt1TrackElectronMVADecision",
+    "Hlt1SingleHighPtElectronDecision",
+    "Hlt1SingleHighEtDecision",
+]
+Hlt1_lines = Hlt1_1track_lines+[
+    "Hlt1TwoTrackMVACharmXSecDecision",
+    "Hlt1TwoTrackMVADecision",
+    "Hlt1TwoTrackKsDecision",
+    "Hlt1D2KPiDecision",
+    "Hlt1D2KKDecision",
+    "Hlt1D2PiPiDecision",
+    "Hlt1KsToPiPiDecision",
+    "Hlt1LowPtDiMuonDecision",#removed
+    "Hlt1DiMuonNoIPDecision",
+    "Hlt1DiMuonNoIP_ssDecision",
+    "Hlt1DiMuonHighMassDecision",
+    "Hlt1DiMuonLowMassDecision",#replaced by Hlt1DiMuonDisplacedDecision
+    "Hlt1DiMuonSoftDecision",
+    "Hlt1DiMuonDisplacedDecision",
+    "Hlt1TwoKsDecision",
+    "Hlt1D2KPiAlignmentDecision",
+    "Hlt1DiMuonHighMassAlignmentDecision",
+    "Hlt1DisplacedDiMuonAlignmentDecision",
+    "Hlt1DisplacedDielectronDecision",
+    "Hlt1DisplacedLeptonsDecision",#removed
+]
+
+
+Hlt2_lines = [
+    "Hlt2Charm_DstpToD0Pip_D0ToKmPip_XSec",
+    "Hlt2Charm_D0ToKmPip_XSec",
+    "Hlt2Charm_D0ToKmKp",
+    "Hlt2Charm_D0ToKmPip",
+    "Hlt2Charm_D0ToPimPip",
+    "Hlt2Charm_DpDspToKsKp_DD",
+    "Hlt2Charm_DpDspToKsKp_LD",
+    "Hlt2Charm_DpDspToKsKp_LL",
+    "Hlt2Charm_DpDspToKsPip_DD",
+    "Hlt2Charm_DpDspToKsPip_LD",
+    "Hlt2Charm_DpDspToKsPip_LL",
+    "Hlt2Charm_DpToKmPipPip",
+    "Hlt2Charm_DspToKmKpPip",
+    "Hlt2Charm_DpToKmPipPip_NoCuts",
+    "Hlt2Charm_DspToKmKpPip_NoCuts",
+    "Hlt2Charm_DpToKmPipPip_XSec",
+    "Hlt2Charm_DspToKmKpPip_XSec",
+    "Hlt2Charm_DstpToD0Pip_D0ToKmKp",
+    "Hlt2Charm_DstpToD0Pip_D0ToKmPip",
+    "Hlt2Charm_DstpToD0Pip_D0ToKpPim",
+    "Hlt2Charm_DstpToD0Pip_D0ToPimPip",
+    "Hlt2Charm_DstpToD0Pip_D0ToKmPip_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKpPim_LowBias",
+    "Hlt2Charm_D0ToKmPip_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKmKp_LowBias",
+    "Hlt2Charm_D0ToKmKp_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToPimPip_LowBias",
+    "Hlt2Charm_D0ToPimPip_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLL",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLL_Tight",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLDD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLDD_Tight",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDDD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDDD_Tight",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULLL",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULLL_Tight",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULDD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULDD_Tight",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLD_Tight",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDLD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDLD_Tight",
+    "Hlt2Charm_D0ToKsPimPip_LL",
+    "Hlt2Charm_D0ToKsPimPip_DD",
+    "Hlt2Charm_D0ToKsPimPip_LL_LowBias",
+    "Hlt2Charm_D0ToKsPimPip_LL_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_LL",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_DD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_LL_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_DD_LowBias",
+    "Hlt2Charm_D0ToKsKmPip_LL",
+    "Hlt2Charm_D0ToKsKmPip_DD",
+    "Hlt2Charm_D0ToKsKmPip_LL_LowBias",
+    "Hlt2Charm_D0ToKsKmPip_LL_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_LL",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_DD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_LL_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_DD_LowBias",
+    "Hlt2Charm_D0ToKsKpPim_LL",
+    "Hlt2Charm_D0ToKsKpPim_DD",
+    "Hlt2Charm_D0ToKsKpPim_LL_LowBias",
+    "Hlt2Charm_D0ToKsKpPim_DD_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_LL",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_DD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_LL_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_DD_LowBias",
+    "Hlt2Charm_D0ToKsKmKp_LL",
+    "Hlt2Charm_D0ToKsKmKp_DD",
+    "Hlt2Charm_D0ToKsKmKp_LL_LowBias",
+    "Hlt2Charm_D0ToKsKmKp_DD_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_LL",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_DD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_LL_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_DD_LowBias",
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS',
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS',
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS_MVA',
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS_MVA',
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS',
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS',
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS_MVA',
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS_MVA',
+    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS',
+    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS',
+    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS_MVA',
+    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS_MVA',
+]
+
+def make_composite_variables(options, pvs, data, add_truth=True, add_Hlt1TisTos=True):
+    if not options.simulation:
+        add_truth = False
+    variables = (
+        FunctorCollection(
+            {
+                "MAXPT": F.MAX(F.PT),
+                "MINPT": F.MIN(F.PT),
+                "SUMPT": F.SUM(F.PT),
+                "MAXP": F.MAX(F.P),
+                "MINP": F.MIN(F.P),
+                "BPVDIRA": F.BPVDIRA(pvs),
+                "VCHI2DOF": F.CHI2DOF,
+                #"VNDOF": F.NDOF,
+                "BPVFDCHI2": F.BPVFDCHI2(pvs),
+                "BPVFD": F.BPVFD(pvs),
+                "BPVVDRHO": F.BPVVDRHO(pvs),
+                "BPVVDZ": F.BPVVDZ(pvs),
+                "BPVIPCHI2": F.BPVIPCHI2(pvs),
+                "BPVIP": F.BPVIP(pvs),
+                "LOGBPVIPCHI2": log(F.BPVIPCHI2(pvs)),
+                "BPVLTIME": F.BPVLTIME(pvs),
+                "MAXBPVIPCHI2": F.MAX(F.BPVIPCHI2(pvs)),
+                "MINBPVIPCHI2": F.MIN(F.BPVIPCHI2(pvs)),
+                "MAXBPVIP": F.MAX(F.BPVIP(pvs)),
+                "MINBPVIP": F.MIN(F.BPVIP(pvs)),
+                "MAXDOCACHI2": F.MAXDOCACHI2,
+                "MAXDOCA": F.MAXDOCA,
+                "MAXSDOCACHI2": F.MAXSDOCACHI2,
+                "MAXSDOCA": F.MAXSDOCA,
+                "ETA": F.ETA,
+                "PHI": F.PHI,
+                "END_VX": F.END_VX,
+                "END_VY": F.END_VY,
+                "END_VZ": F.END_VZ,
+                "END_VX_ERR":F.SQRT @ F.CALL(0,0) @ F.POS_COV_MATRIX @ F.ENDVERTEX,
+                "END_VY_ERR":F.SQRT @ F.CALL(1,1) @ F.POS_COV_MATRIX @ F.ENDVERTEX,
+                "END_VZ_ERR":F.SQRT @ F.CALL(2,2) @ F.POS_COV_MATRIX @ F.ENDVERTEX,
+                "BPVX": F.BPVX(pvs),
+                "BPVY": F.BPVY(pvs),
+                "BPVZ": F.BPVZ(pvs),
+                "BPVX_ERR": F.SQRT @ F.CALL(0,0) @ F.POS_COV_MATRIX @ F.BPV(pvs),
+                "BPVY_ERR": F.SQRT @ F.CALL(1,1) @ F.POS_COV_MATRIX @ F.BPV(pvs),
+                "BPVZ_ERR": F.SQRT @ F.CALL(2,2) @ F.POS_COV_MATRIX @ F.BPV(pvs),
+                "ALLPVFD"     : F.ALLPV_FD(pvs),
+                "ALLPVIP"     : F.ALLPV_IP(pvs),
+                "OBJECT_KEY": F.OBJECT_KEY,
+            }
+        )
+        + Kinematics()
+        #+ ParticleID(extra_info=True) #only for daughters
+    )
+
+    if add_Hlt1TisTos:
+        variables += HltTisTos(
+            selection_type="Hlt1", trigger_lines=Hlt1_lines, data=data
+        )
+
+    if add_truth:
+        variables = add_truth_matching_functors(
+            options,
+            variables,
+            data,
+            hierarchy=True,
+            kinematics=True,
+            vertex_info=True,
+            bkgcat=True,
+        )
+
+    return variables
+
+def make_tistoscombinations(options, pvs, data):
+    algo_output = ParticleToSubcombinationsAlg( Input=data )
+    relations = algo_output.OutputRelations
+
+    tistos_variables_extra = HltTisTos(
+        selection_type="Hlt1", trigger_lines=["Hlt1TwoTrackMVADecision"], data=algo_output.OutputParticles
+    )
+    tistos_combinations = {}
+    for k,v in tistos_variables_extra.get_thor_functors().items():
+        tistos_combinations[k + "_SUBCOMB" ] = F.MAP_INPUT_ARRAY( v, relations )
+    tistos_combinations = FunctorCollection( tistos_combinations )
+
+    return tistos_combinations
+
+def make_composite_variables_3body(options, pvs, data, add_truth=True):
+
+    variables = (
+        FunctorCollection(
+            {
+                #12
+                "M12": F.SUBCOMB(Functor=F.MASS, Indices=(1, 2)),
+                "SDOCA12"     : F.SDOCA(Child1=1,Child2=2),
+                "SDOCACHI212" : F.SDOCACHI2(Child1=1,Child2=2),
+                "DOCA12"      : F.DOCA(Child1=1,Child2=2),
+                "DOCACHI212"  : F.DOCACHI2(Child1=1,Child2=2),
+                "COS12": F.ALV(1, 2),
+                #"ETA12": F.SUBCOMB(Functor=F.ETA, Indices=(1, 2)),
+                #"PT12": F.SUBCOMB(Functor=F.PT, Indices=(1, 2)),
+                #"VCHI212": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(1, 2)),
+                #"END_VZ12": F.SUBCOMB(Functor=F.END_VZ, Indices=(1, 2)),
+                #"BPVZ12": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(1, 2)),
+                #"BPVCORRM12": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(1, 2)),
+                #13
+                "M13": F.SUBCOMB(Functor=F.MASS, Indices=(1, 3)),
+                "SDOCA13"     : F.SDOCA(Child1=1,Child2=3),
+                "SDOCACHI213" : F.SDOCACHI2(Child1=1,Child2=3),
+                "DOCA13"      : F.DOCA(Child1=1,Child2=3),
+                "DOCACHI213"  : F.DOCACHI2(Child1=1,Child2=3),
+                "COS13": F.ALV(1, 3),
+                #"ETA13": F.SUBCOMB(Functor=F.ETA, Indices=(1, 3)),
+                #"PT13": F.SUBCOMB(Functor=F.PT, Indices=(1, 3)),
+                #"VCHI213": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(1, 3)),
+                #"END_VZ13": F.SUBCOMB(Functor=F.END_VZ, Indices=(1, 3)),
+                #"BPVZ13": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(1, 3)),
+                #"BPVCORRM13": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(1, 3)),
+                #23
+                "M23": F.SUBCOMB(Functor=F.MASS, Indices=(2, 3)),
+                "SDOCA23"     : F.SDOCA(Child1=2,Child2=3),
+                "SDOCACHI223" : F.SDOCACHI2(Child1=2,Child2=3),
+                "DOCA23"      : F.DOCA(Child1=2,Child2=3),
+                "DOCACHI223"  : F.DOCACHI2(Child1=2,Child2=3),
+                "COS23": F.ALV(2, 3),
+                #"ETA23": F.SUBCOMB(Functor=F.ETA, Indices=(2, 3)),
+                #"PT23": F.SUBCOMB(Functor=F.PT, Indices=(2, 3)),
+                #"VCHI223": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(2, 3)),
+                #"END_VZ23": F.SUBCOMB(Functor=F.END_VZ, Indices=(2, 3)),
+                #"BPVZ23": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(2, 3)),
+                #"BPVCORRM23": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(2, 3)),
+            }
+        )
+    )
+    return make_composite_variables(options, pvs, data, add_truth)+make_tistoscombinations(options, pvs, data)+variables
+
+def make_composite_variables_4body(options, pvs, data, add_truth=True):
+
+    variables = (
+        FunctorCollection(
+            {
+                #14
+                "M14": F.SUBCOMB(Functor=F.MASS, Indices=(1, 4)),
+                "SDOCA14"     : F.SDOCA(Child1=1,Child2=4),
+                "SDOCACHI214" : F.SDOCACHI2(Child1=1,Child2=4),
+                "DOCA14"      : F.DOCA(Child1=1,Child2=4),
+                "DOCACHI214"  : F.DOCACHI2(Child1=1,Child2=4),
+                "COS14": F.ALV(1, 4),
+                #"ETA14": F.SUBCOMB(Functor=F.ETA, Indices=(1, 4)),
+                #"PT14": F.SUBCOMB(Functor=F.PT, Indices=(1, 4)),
+                #"VCHI214": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(1, 4)),
+                #"END_VZ14": F.SUBCOMB(Functor=F.END_VZ, Indices=(1, 4)),
+                #"BPVZ14": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(1, 4)),
+                #"BPVCORRM14": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(1, 4)),
+                #24
+                "M24": F.SUBCOMB(Functor=F.MASS, Indices=(2, 4)),
+                "SDOCA24"     : F.SDOCA(Child1=2,Child2=4),
+                "SDOCACHI224" : F.SDOCACHI2(Child1=2,Child2=4),
+                "DOCA24"      : F.DOCA(Child1=2,Child2=4),
+                "DOCACHI224"  : F.DOCACHI2(Child1=2,Child2=4),
+                "COS24": F.ALV(2, 4),
+                #"ETA24": F.SUBCOMB(Functor=F.ETA, Indices=(2, 4)),
+                #"PT24": F.SUBCOMB(Functor=F.PT, Indices=(2, 4)),
+                #"VCHI224": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(2, 4)),
+                #"END_VZ24": F.SUBCOMB(Functor=F.END_VZ, Indices=(2, 4)),
+                #"BPVZ24": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(2, 4)),
+                #"BPVCORRM24": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(2, 4)),
+                #34
+                "M34": F.SUBCOMB(Functor=F.MASS, Indices=(3, 4)),
+                "SDOCA34"     : F.SDOCA(Child1=3,Child2=4),
+                "SDOCACHI234" : F.SDOCACHI2(Child1=3,Child2=4),
+                "DOCA34"      : F.DOCA(Child1=3,Child2=4),
+                "DOCACHI234"  : F.DOCACHI2(Child1=3,Child2=4),
+                "COS34": F.ALV(3, 4),
+                #"ETA34": F.SUBCOMB(Functor=F.ETA, Indices=(3, 4)),
+                #"PT34": F.SUBCOMB(Functor=F.PT, Indices=(3, 4)),
+                #"VCHI234": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(3, 4)),
+                #"END_VZ34": F.SUBCOMB(Functor=F.END_VZ, Indices=(3, 4)),
+                #"BPVZ34": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(3, 4)),
+                #"BPVCORRM34": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(3, 4)),
+            }
+        )
+    )
+    return make_composite_variables_3body(options, pvs, data, add_truth)+variables #make_tistoscombinations already included
+
+def make_b_composite_variables(options, pvs, data, add_truth=True):
+    
+    # define helper functors
+    get_child = F.CHILD(1, F.FORWARDARG0) # change here the index of the child
+    get_SV =  F.ENDVERTEX @ F.FORWARDARG0
+    get_SV_pos = F.TOLINALG @ F.POSITION @ get_SV # only if composite (i.e. has vertex)
+    get_child_endvtx_pos = F.ENDVERTEX_POS  @ get_child
+    get_fdvec_child = get_child_endvtx_pos - get_SV_pos
+
+    # define observables
+    IP_wrt_SV = F.IP.bind(get_SV_pos , get_child)
+    IPCHI2_wrt_SV = F.IPCHI2.bind(get_SV , get_child) # only if child is composite (i.e. has vertex)
+    FD_wrt_SV = F.MAGNITUDE @ get_fdvec_child
+    FDCHI2_wrt_SV = F.VTX_FDCHI2.bind(get_SV, get_child)
+
+    
+    variables = FunctorCollection(
+        {       
+            "ID": F.PARTICLE_ID ,
+            "PT": F.PT,
+            "P": F.P,
+            "MASS": F.MASS,
+            "CHILD1_IPwrtSV": IP_wrt_SV,
+            "CHILD1_IPCHI2wrtSV": IPCHI2_wrt_SV,
+            "CHILD1_FDwrtSV": FD_wrt_SV,
+            "CHILD1_FDCHI2wrtSV": FDCHI2_wrt_SV,
+            "PX": F.PX,
+            "PY": F.PY,
+            "PZ": F.PZ,
+            "END_VCHI2DOF": F.CHI2DOF @ F.ENDVERTEX,
+            "BPVCHI2DOF": F.CHI2DOF @ F.BPV(pvs),
+            # B2OC generic B hadron NN Hlt2 algorithm,
+            # not planning to use it directly for B2OC EM
+            "MVA": F.MVA(
+                MVAType="SigmaNet",
+                Config={
+                    "File":
+                    "paramfile://data/Hlt2B2OC_B_SigmaNet_Run3-v1.json",
+                    "Name":
+                    "B2OC_SigmaNet_Generic",
+                    "Lambda":
+                    "2.0",
+                    "NLayers":
+                    "3",
+                    "InputSize":
+                    "6",
+                    "Monotone_Constraints":
+                    "[1,-1,-1,-1,-1,-1]",
+                    "Variables":
+                    "log_B_PT,B_ETA,log_B_DIRA,log_B_ENDVERTEX_CHI2,log_B_IPCHI2_OWNPV,log_B_IP_OWNPV",
+                },
+                Inputs={
+                    "log_B_PT": fmath.log(F.PT),
+                    "B_ETA": F.ETA,
+                    "log_B_DIRA": fmath.log(1. - F.BPVDIRA(pvs)),
+                    "log_B_ENDVERTEX_CHI2": fmath.log(F.CHI2DOF),
+                    "log_B_IPCHI2_OWNPV": fmath.log(F.BPVIPCHI2(pvs)),
+                    "log_B_IP_OWNPV": fmath.log(F.BPVIP(pvs)),
+                }),
+            #'SSPionBDT_Mistag': F.SSPionBDT_Mistag(sspionTagging.OutputFlavourTags),
+            #'SSPionBDT_Decision': F.SSPionBDT_Decision(sspionTagging.OutputFlavourTags),
+
+        }
+    )
+    return make_composite_variables(options, pvs, data, add_truth)+make_tistoscombinations(options, pvs, data)+variables
+
+def make_DeltaM_variable(options):
+    return FunctorCollection({"DM": F.MASS - F.CHILD(1, F.MASS)})
+
+def make_basic_variables(options, pvs, data, add_truth=True, islong = True):
+    if not options.simulation:
+        add_truth = False
+    variables = (
+        FunctorCollection(
+            {
+                "TRCHI2DOF": F.CHI2DOF @ F.TRACK,
+                "ETA": F.ETA,
+                "PHI": F.PHI,
+                "TRGHOSTPROB": F.GHOSTPROB,
+                "BPVIPCHI2": F.BPVIPCHI2(pvs),
+                "BPVIP": F.BPVIP(pvs),
+                "BPVX": F.BPVX(pvs),
+                "BPVY": F.BPVY(pvs),
+                "BPVZ": F.BPVZ(pvs),
+                "TX"          : F.TX,
+                "TY"          : F.TY,
+                "MINIPCHI2"   : F.MINIPCHI2(pvs),
+                "MINIP"       : F.MINIP(pvs),
+                "KEY"         : F.VALUE_OR(-1) @ F.OBJECT_KEY @ F.TRACK,
+                "ISMUON"      : F.ISMUON,
+                "TRACKPT": F.TRACK_PT,
+                "TRACKHISTORY": F.VALUE_OR(-1) @ F.TRACKHISTORY @ F.TRACK,
+                "QOVERP": F.QOVERP @ F.TRACK,
+                "NDOF": F.VALUE_OR(-1) @ F.NDOF @ F.TRACK,
+                "NFTHITS": F.VALUE_OR(-1) @ F.NFTHITS @ F.TRACK,
+                "NHITS": F.VALUE_OR(-1) @ F.NHITS @ F.TRACK,
+                "NUTHITS": F.VALUE_OR(-1) @ F.NUTHITS @ F.TRACK,
+                "NVPHITS": F.VALUE_OR(-1) @ F.NVPHITS @ F.TRACK,
+                #"NMUONHITS": F.VALUE_OR(-1) @ F.NHITSMUONS @ F.TRACK, #https://gitlab.cern.ch/lhcb/Rec/-/merge_requests/3756
+                "TRACKHASVELO": F.VALUE_OR(-1) @ F.TRACKHASVELO @ F.TRACK,
+                "TRACKHASUT": F.VALUE_OR(-1) @ F.TRACKHASUT @ F.TRACK,
+                "OBJECT_KEY": F.OBJECT_KEY,
+                "HASBREM": F.HASBREM,
+                "BREMENERGY": F.BREMENERGY,
+                "BREMBENDCORR": F.BREMBENDCORR,
+            }
+        )
+        + Kinematics()
+        + ParticleID(extra_info=True)
+    )
+
+    if islong:
+        variables += FunctorCollection({"CTB": F.TRACK_POSVEC_CLOSESTTOBEAM})
+    
+    variables += HltTisTos(
+        selection_type="Hlt1", trigger_lines=Hlt1_1track_lines, data=data
+    )
+    
+    if add_truth:
+        variables = add_truth_matching_functors(
+            options,
+            variables,
+            data,
+            hierarchy=True,
+            kinematics=True,
+            vertex_info=True,
+            bkgcat=False,
+        )
+
+    return variables
+
+def make_hlt2_event_variables(options, pvs, rec_summary):
+    # define event level variables
+    evt_variables = EventInfo()
+    if not options.simulation:
+        evt_variables += LHCInfo() #FillNumber
+    evt_variables += SelectionInfo(selection_type="Hlt2", trigger_lines=Hlt2_lines)
+    evt_variables += SelectionInfo(selection_type="Hlt1", trigger_lines=Hlt1_global_lines)
+    evt_variables += FunctorCollection(
+        {
+            "ALLPVX": F.ALLPVX(pvs),
+            "ALLPVY": F.ALLPVY(pvs),
+            "ALLPVZ": F.ALLPVZ(pvs),
+            "ALLPVNDOF": F.MAP(F.VALUE_OR(F.NaN) @ F.NDOF) @ F.TES(pvs),
+            "ALLPVCHI2": F.MAP(F.VALUE_OR(F.NaN) @ F.CHI2) @ F.TES(pvs),
+            "nPVs": F.SIZE(pvs),
+            "nTracks": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nTracks"),
+            "nLongTracks": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nLongTracks"),
+            "nMuonTracks": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nMuonTracks"),
+            "nFTClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nFTClusters"),
+            "nVPClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nVPClusters"),
+            "nUTClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nUTClusters"),
+            "nSPDhits": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nSPDhits"),
+            "nEcalClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nEcalClusters"),
+            "nEcalClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nEcalClusters"),
+            "eCalTot": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "eCalTot"),
+            "hCalTot": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "hCalTot"),
+            "nRich1Hits": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nRich1Hits"),
+            "nRich2Hits": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nRich2Hits"),
+        }
+    )
+    return evt_variables
+
+def add_truth_matching_functors(
+    options,
+    variables,
+    data,
+    hierarchy=True,
+    kinematics=True,
+    vertex_info=True,
+    bkgcat=False,
+    prompt_info=True,
+):
+    """Add MC truth matching functors to an existing FunctorCollection.
+
+    Args:
+        options (DaVinci.Options): DaVinci options object.
+        variables (FunctorCollection): FunctorCollection to modify
+        data: data handle
+        hierarchy (bool): Add MCHierarchy info (default True)
+        kinematics (bool): Add MCKinematics info (default True)
+        vertex_info (bool): Add MCVertexInfo (default True)
+        bkgcat (bool): Add TRUEKEY and BKGCAT functors - intended for composite particles (default False)
+        prompt_info (bool): Add MCPromptDecay info (default True)
+
+    Returns:
+        FunctorCollection: modified FunctorCollection with truth matched variables.
+    """
+    assert (
+        options.simulation
+    ), "options.simulation is set to False - it doesn't make sense to add truth matching."
+
+    MCTRUTH = MCTruthAndBkgCat(data)
+
+    if bkgcat:
+        variables += FunctorCollection(
+            {
+                # Important note: specify an invalid value for integer functors if there exists no truth info.
+                #                 The invalid value for floating point functors is set to nan.
+                "TRUEKEY": F.VALUE_OR(-1) @ MCTRUTH(F.OBJECT_KEY),
+                "BKGCAT": MCTRUTH.BkgCat,
+            }
+        )
+    if hierarchy:
+        variables += MCHierarchy(mctruth_alg=MCTRUTH)  # likely to change again!!
+    if vertex_info:
+        variables += MCVertexInfo(mctruth_alg=MCTRUTH)  # likely to change again!!
+    if kinematics:
+        variables += MCKinematics(mctruth_alg=MCTRUTH)  # likely to change again!!
+    if prompt_info:
+        variables += MCPromptDecay(mctruth_alg=MCTRUTH)
+
+    return variables
+
+### DTF variables ###
+
+def make_basic_dtf_variables(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name="", islong=True):
+    variables = (
+        FunctorCollection(
+            {
+                "TRCHI2DOF": F.CHI2DOF @ F.TRACK,
+                "ETA": F.ETA,
+                "PHI": F.PHI,
+                "TRGHOSTPROB": F.GHOSTPROB,
+                "BPVIPCHI2": F.BPVIPCHI2(pvs),
+                "BPVIP": F.BPVIP(pvs),
+                "BPVX": F.BPVX(pvs),
+                "BPVY": F.BPVY(pvs),
+                "BPVZ": F.BPVZ(pvs),
+                "TX"          : F.TX,
+                "TY"          : F.TY,
+                "MINIPCHI2"   : F.MINIPCHI2(pvs),
+                "MINIP"       : F.MINIP(pvs),
+                "KEY"         : F.VALUE_OR(-1) @ F.OBJECT_KEY @ F.TRACK,
+                "TRACKPT": F.TRACK_PT,
+                "TRACKHISTORY": F.VALUE_OR(-1) @ F.TRACKHISTORY @ F.TRACK,
+                "QOVERP": F.QOVERP @ F.TRACK,
+                "NDOF": F.VALUE_OR(-1) @ F.NDOF @ F.TRACK,
+            }
+        )
+        + Kinematics()
+    )
+
+    if islong:
+        variables += FunctorCollection({"CTB": F.TRACK_POSVEC_CLOSESTTOBEAM})
+    
+    if(mass_constraint):
+        if(pv_constraint): # MASS + PV
+            dtf_variables_mass_pv = FunctorCollection({
+                        'DTF_PV_M'+ particle_name + '_' + k: DTF(v)
+                        for k, v in variables.get_thor_functors().items()
+                    })
+            return dtf_variables_mass_pv
+        else: # MASS
+            dtf_variables_mass = FunctorCollection(
+                {'DTF_M'+ particle_name + '_' + k: DTF(v)
+                 for k, v in variables.get_thor_functors().items()})
+        return dtf_variables_mass
+
+    elif(pv_constraint): # PV
+        dtf_variables_pv = FunctorCollection({
+                'DTF_PV_' + k: DTF(v)
+                for k, v in variables.get_thor_functors().items()
+            })
+        return dtf_variables_pv
+
+    else: # NO MASS/PV
+        dtf_variables = FunctorCollection(
+            {'DTF_' + k: DTF(v)
+             for k, v in variables.get_thor_functors().items()})
+        return dtf_variables
+
+def make_composite_dtf_variables(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name=""):
+    variables = (
+        FunctorCollection(
+            {
+                "MAXPT": F.MAX(F.PT),
+                "MINPT": F.MIN(F.PT),
+                "SUMPT": F.SUM(F.PT),
+                "MAXP": F.MAX(F.P),
+                "MINP": F.MIN(F.P),
+                "BPVDIRA": F.BPVDIRA(pvs),
+                "VCHI2DOF": F.CHI2DOF, #CHI2VXNDOF
+                "BPVFDCHI2": F.BPVFDCHI2(pvs),
+                "BPVFD": F.BPVFD(pvs),
+                "BPVVDRHO": F.BPVVDRHO(pvs),
+                "BPVVDZ": F.BPVVDZ(pvs),
+                "BPVIPCHI2": F.BPVIPCHI2(pvs),
+                "BPVIP": F.BPVIP(pvs),
+                "LOGBPVIPCHI2": log(F.BPVIPCHI2(pvs)),
+                "BPVLTIME": F.BPVLTIME(pvs),
+                "MAXBPVIPCHI2": F.MAX(F.BPVIPCHI2(pvs)), #MAX_
+                "MINBPVIPCHI2": F.MIN(F.BPVIPCHI2(pvs)),
+                "MAXBPVIP": F.MAX(F.BPVIP(pvs)),
+                "MINBPVIP": F.MIN(F.BPVIP(pvs)),
+                "ETA": F.ETA,
+                "PHI": F.PHI,
+                "END_VX": F.END_VX, #END_
+                "END_VY": F.END_VY,
+                "END_VZ": F.END_VZ,
+                "BPVX": F.BPVX(pvs),
+                "BPVY": F.BPVY(pvs),
+                "BPVZ": F.BPVZ(pvs),
+                "ALLPVFD"     : F.ALLPV_FD(pvs),
+                "ALLPVIP"     : F.ALLPV_IP(pvs),
+                
+            }
+        )
+        + Kinematics()
+    )
+
+    addstring = "DTF"
+    if(pv_constraint):
+            addstring += '_PV'
+    if(mass_constraint):
+            addstring += '_M'
+    addstring += particle_name
+
+    DTF_chi2ndof = FunctorCollection(
+            {
+                addstring+"_DTFCHI2": DTF.CHI2,
+                addstring+"_DTFNDOF": DTF.NDOF,
+                addstring+"_CTAU": DTF.CTAU,
+                addstring+"_CTAUERR": DTF.CTAUERR,
+                addstring+"_MERR": DTF.MASSERR,
+            }
+    )
+
+    if(mass_constraint):
+        if(pv_constraint): # MASS + PV
+            dtf_variables_mass_pv = FunctorCollection({
+                        'DTF_PV_M'+ particle_name + '_' + k: DTF(v)
+                        for k, v in variables.get_thor_functors().items()
+                    })
+            return dtf_variables_mass_pv+DTF_chi2ndof
+        else: # MASS
+            dtf_variables_mass = FunctorCollection(
+                {'DTF_M'+ particle_name + '_' + k: DTF(v)
+                 for k, v in variables.get_thor_functors().items()})
+        return dtf_variables_mass+DTF_chi2ndof
+
+    elif(pv_constraint): # PV
+        dtf_variables_pv = FunctorCollection({
+                'DTF_PV_' + k: DTF(v)
+                for k, v in variables.get_thor_functors().items()
+            })
+        return dtf_variables_pv+DTF_chi2ndof
+
+    else: # NO MASS/PV
+        dtf_variables = FunctorCollection(
+            {'DTF_' + k: DTF(v)
+             for k, v in variables.get_thor_functors().items()})
+        return dtf_variables+DTF_chi2ndof
+
+def make_composite_dtf_variables_3body(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name=""):
+    variables = (
+        FunctorCollection(
+            {
+                "M13": F.SUBCOMB(Functor=F.MASS, Indices=(1, 3)),
+                "M23": F.SUBCOMB(Functor=F.MASS, Indices=(2, 3)),
+            }
+        )
+    )
+
+    if(mass_constraint):
+        if(pv_constraint): # MASS + PV
+            dtf_variables_mass_pv = FunctorCollection({
+                        'DTF_PV_M'+ particle_name + '_' + k: DTF(v)
+                        for k, v in variables.get_thor_functors().items()
+                    })
+            return dtf_variables_mass_pv+make_composite_dtf_variables(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
+        else: # MASS
+            dtf_variables_mass = FunctorCollection(
+                {'DTF_M'+ particle_name + '_' + k: DTF(v)
+                 for k, v in variables.get_thor_functors().items()})
+        return dtf_variables_mass+make_composite_dtf_variables(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
+
+    elif(pv_constraint): # PV
+        dtf_variables_pv = FunctorCollection({
+                'DTF_PV_' + k: DTF(v)
+                for k, v in variables.get_thor_functors().items()
+            })
+        return dtf_variables_pv+make_composite_dtf_variables(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
+
+    else: # NO MASS/PV
+        dtf_variables = FunctorCollection(
+            {'DTF_' + k: DTF(v)
+             for k, v in variables.get_thor_functors().items()})
+
+    return dtf_variables+make_composite_dtf_variables(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
+
+def make_composite_dtf_variables_4body(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name=""):
+    variables = (
+        FunctorCollection(
+            {
+                "M14": F.SUBCOMB(Functor=F.MASS, Indices=(1, 4)),
+                "M24": F.SUBCOMB(Functor=F.MASS, Indices=(2, 4)),
+                "M34": F.SUBCOMB(Functor=F.MASS, Indices=(3, 4)),
+            }
+        )
+    )
+
+    if(mass_constraint):
+        if(pv_constraint): # MASS + PV
+            dtf_variables_mass_pv = FunctorCollection({
+                        'DTF_PV_M'+ particle_name + '_' + k: DTF(v)
+                        for k, v in variables.get_thor_functors().items()
+                    })
+            return dtf_variables_mass_pv+make_composite_dtf_variables_3body(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
+        else: # MASS
+            dtf_variables_mass = FunctorCollection(
+                {'DTF_M'+ particle_name + '_' + k: DTF(v)
+                 for k, v in variables.get_thor_functors().items()})
+        return dtf_variables_mass+make_composite_dtf_variables_3body(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
+
+    elif(pv_constraint): # PV
+        dtf_variables_pv = FunctorCollection({
+                'DTF_PV_' + k: DTF(v)
+                for k, v in variables.get_thor_functors().items()
+            })
+        return dtf_variables_pv+make_composite_dtf_variables_3body(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
+
+    else: # NO MASS/PV
+        dtf_variables = FunctorCollection(
+            {'DTF_' + k: DTF(v)
+             for k, v in variables.get_thor_functors().items()})
+    
+        return dtf_variables+make_composite_dtf_variables_3body(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
+
+
+def make_MC_basic_variables():
+    MC_MOTHER_ID = lambda gen: F.VALUE_OR(0) @ F.MC_MOTHER(gen, F.PARTICLE_ID)
+    MC_MOTHER_KEY = lambda gen: F.VALUE_OR(-1) @ F.MC_MOTHER(gen, F.OBJECT_KEY)
+
+    variables = (
+        FunctorCollection(
+            {
+                "OBJECT_KEY": F.OBJECT_KEY,
+                "ETA": F.ETA,
+                "PHI": F.PHI,
+                "ORIGIN_VX": F.ORIGIN_VX,
+                "ORIGIN_VY": F.ORIGIN_VY,
+                "ORIGIN_VZ": F.ORIGIN_VZ,
+                "FOURMOMENTUM": F.FOURMOMENTUM,
+                "TRUEID": F.PARTICLE_ID,
+                "MC_MOTHER_ID": MC_MOTHER_ID(1),
+                "MC_MOTHER_KEY": MC_MOTHER_KEY(1),
+                "MC_GD_MOTHER_ID": MC_MOTHER_ID(2),
+                "MC_GD_MOTHER_KEY": MC_MOTHER_KEY(2),
+                "MC_GD_GD_MOTHER_ID": MC_MOTHER_ID(3),
+                "MC_GD_GD_MOTHER_KEY": MC_MOTHER_KEY(3),
+            }
+        )
+        + Kinematics()
+    )
+
+
+    from PyConf.reading import get_mc_particles, get_pp2mcp_relations, get_mc_track_info
+    MC_data = get_mc_particles("/Event/HLT2/MC/Particles")
+    relations_charged = get_pp2mcp_relations("/Event/HLT2/Relations/ChargedPP2MCP")
+    relations_neutral = get_pp2mcp_relations("/Event/HLT2/Relations/NeutralPP2MCP")
+    mcreconstructed_all = MCReconstructed(
+        input_mcparticles=MC_data,
+        use_best_mcmatch=True,
+        relations_charged=relations_charged,
+        relations_neutral=relations_neutral,
+    )
+    mcreconstructible_all = MCReconstructible(
+        input_mctrackinfo=get_mc_track_info()
+    )
+    import FunTuple.functorcollections as FC
+    vars_reconstructed = FC.MCReconstructed(mcreconstructed_alg=mcreconstructed_all, extra_info=True)
+    vars_reconstructible = FC.MCReconstructible(mcreconstructible_alg=mcreconstructible_all, extra_info=True)
+
+
+    return variables+vars_reconstructed+vars_reconstructible
+
+def make_MC_composite_variables():
+    MC_MOTHER_ID = lambda gen: F.VALUE_OR(0) @ F.MC_MOTHER(gen, F.PARTICLE_ID)
+    MC_MOTHER_KEY = lambda gen: F.VALUE_OR(-1) @ F.MC_MOTHER(gen, F.OBJECT_KEY)
+
+    variables = (
+        FunctorCollection(
+            {
+                "END_VX": F.END_VX,
+                "END_VY": F.END_VY,
+                "END_VZ": F.END_VZ,
+                "LTIME": F.MC_LIFETIME,
+                "OBJECT_KEY": F.OBJECT_KEY,
+                "ETA": F.ETA,
+                "PHI": F.PHI,
+                "ORIGIN_VX": F.ORIGIN_VX,
+                "ORIGIN_VY": F.ORIGIN_VY,
+                "ORIGIN_VZ": F.ORIGIN_VZ,
+                "FOURMOMENTUM": F.FOURMOMENTUM,
+                "TRUEID": F.PARTICLE_ID,
+                "MC_MOTHER_ID": MC_MOTHER_ID(1),
+                "MC_MOTHER_KEY": MC_MOTHER_KEY(1),
+                "MC_GD_MOTHER_ID": MC_MOTHER_ID(2),
+                "MC_GD_MOTHER_KEY": MC_MOTHER_KEY(2),
+                "MC_GD_GD_MOTHER_ID": MC_MOTHER_ID(3),
+                "MC_GD_GD_MOTHER_KEY": MC_MOTHER_KEY(3),
+            }
+        )
+        + Kinematics()
+        + MCPromptDecay()
+        )
+
+    return variables
+
+def make_MC_event_variables(mc_header):
+    # define event level variables
+    evt_variables = EventInfo()
+    evt_variables += MCPrimaries(mc_header=mc_header)
+
+    return evt_variables
+
+def make_top_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"]):
+    from PyConf.reading import get_particles
+    from IsolationTools import VertexAndConeIsolation
+
+    possible_charm_locations = ["LongTrackIso", "TTrackIso", "DownstreamTrackIso", "UpstreamTrackIso", "NeutralIso", "PizIso"]
+    coneangles = [0.25,0.5,1.,1.5,2.]
+
+    count = 0
+    for location in locations:
+        extra_particles = get_particles(f"/Event/HLT2/{hlt2_line}/{location}/Particles")
+
+        for coneangle in coneangles:
+            top_RTAlg = VertexAndConeIsolation(
+                name=location+"_"+str(coneangle),
+                reference_particles=input_data,
+                related_particles=extra_particles,
+                cut=F.DR2<coneangle)
+
+            if count == 0:
+                top_iso_variables = ParticleIsolation(isolation_alg=top_RTAlg,array_indx_name='indx')
+            else:
+                top_iso_variables += ParticleIsolation(isolation_alg=top_RTAlg,array_indx_name='indx')
+            count += 1
+
+
+    return top_iso_variables
+
+def make_basic_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"]):
+    from PyConf.reading import get_particles
+    from IsolationTools import VertexAndConeIsolation
+    from PyConf.Algorithms import ThOrParticleSelection
+
+    basic_code = (F.FILTER(F.ALL) @ F.GET_ALL_BASICS())
+    basic_particles = ThOrParticleSelection(InputParticles=input_data, Functor=basic_code).OutputSelection
+
+    possible_charm_locations = ["LongTrackIso", "TTrackIso", "DownstreamTrackIso", "UpstreamTrackIso", "NeutralIso", "PizIso"]
+    coneangles = [0.25,0.5,1.,1.5,2.]
+
+    count = 0
+    for location in locations:
+        extra_particles = get_particles(f"/Event/HLT2/{hlt2_line}/{location}/Particles")
+
+        for coneangle in coneangles:
+            basic_RTAlg = VertexAndConeIsolation(
+                name=location+"_"+str(coneangle),
+                reference_particles=basic_particles,
+                related_particles=extra_particles,
+                cut=F.DR2<coneangle)
+
+            if count == 0:
+                basic_iso_variables = ParticleIsolation(isolation_alg=basic_RTAlg,array_indx_name='indx')
+            else:
+                basic_iso_variables += ParticleIsolation(isolation_alg=basic_RTAlg,array_indx_name='indx')
+            count += 1
+
+
+    return basic_iso_variables
+
+
+def make_intermediate_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"], composite_ID = "J/psi(1S)"):
+    from PyConf.reading import get_particles
+    from IsolationTools import VertexAndConeIsolation
+    from PyConf.Algorithms import ThOrParticleSelection
+
+    intermediate_code = F.FILTER(F.IS_ABS_ID(composite_ID)) @ F.GET_ALL_DESCENDANTS()
+    intermediate_particles = ThOrParticleSelection(InputParticles=input_data, Functor=intermediate_code).OutputSelection
+
+    possible_charm_locations = ["LongTrackIso", "TTrackIso", "DownstreamTrackIso", "UpstreamTrackIso", "NeutralIso", "PizIso"]
+    coneangles = [0.25,0.5,1.,1.5,2.]
+
+    count = 0
+    for location in locations:
+        extra_particles = get_particles(f"/Event/HLT2/{hlt2_line}/{location}/Particles")
+
+        for coneangle in coneangles:
+            intermediate_RTAlg = VertexAndConeIsolation(
+                name=location+"_"+str(coneangle),
+                reference_particles=intermediate_particles,
+                related_particles=extra_particles,
+                cut=F.DR2<coneangle)
+
+            if count == 0:
+                intermediate_iso_variables = ParticleIsolation(isolation_alg=intermediate_RTAlg,array_indx_name='indx')
+            else:
+                intermediate_iso_variables += ParticleIsolation(isolation_alg=intermediate_RTAlg,array_indx_name='indx')
+            count += 1
+
+
+    return intermediate_iso_variables
diff --git a/Charm_2024validation/tmp.yaml b/Charm_2024validation/tmp.yaml
new file mode 100644
index 0000000000..c871485c24
--- /dev/null
+++ b/Charm_2024validation/tmp.yaml
@@ -0,0 +1,12 @@
+( '27186011', 'dst_to_dee', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27185021', 'dst_to_dee', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27184011', 'dst_to_dee', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27186011', 'dst_to_dee', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '27185021', 'dst_to_dee', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '27184011', 'dst_to_dee', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '27186011', 'dst_to_dee', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '27185021', 'dst_to_dee', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '27184011', 'dst_to_dee', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '27186011', 'dst_to_dee', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27185021', 'dst_to_dee', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27184011', 'dst_to_dee', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-- 
GitLab


From 4669aa79e07047a98df8a75a936ff6c10750186c Mon Sep 17 00:00:00 2001
From: Serena Maccolini <serena.maccolini@cern.ch>
Date: Mon, 15 Jul 2024 17:24:41 +0200
Subject: [PATCH 09/51] adjust info.yaml

---
 Charm_2024validation/info.yaml | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/Charm_2024validation/info.yaml b/Charm_2024validation/info.yaml
index 26de654976..f49943e7e9 100644
--- a/Charm_2024validation/info.yaml
+++ b/Charm_2024validation/info.yaml
@@ -79,7 +79,7 @@ defaults:
       simulation: True
       data_type: "Upgrade"
       scheduler_legacy_mode: False
-      evt_max: 1000
+      evt_max: -1
 
 {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2:
   application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
@@ -116,7 +116,6 @@ MC_{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}:
       event_store: HiveWhiteBoard
       input_process: "Hlt2"
       input_manifest_file: "HLT2.tck.json"
-      write_decoding_keys_to_git: false
       
 {%- endfor %}
 {%- endfor %}
-- 
GitLab


From 6911780322bf388cf6efd39deccd047cce893a63 Mon Sep 17 00:00:00 2001
From: Serena Maccolini <serena.maccolini@cern.ch>
Date: Mon, 15 Jul 2024 18:00:52 +0200
Subject: [PATCH 10/51] cleaning up

---
 Charm_2024validation/README.md                |   68 -
 Charm_2024validation/dummy.yaml               |   16 -
 Charm_2024validation/info.yaml                |  121 --
 Charm_2024validation/info_MC_4localtest.yaml  |  122 --
 Charm_2024validation/info_MC_noUT.yaml        |  121 --
 Charm_2024validation/info_data.yaml           |   53 -
 Charm_2024validation/info_data_noUT.yaml      |   50 -
 Charm_2024validation/main_d0_to_hh.py         |   58 -
 Charm_2024validation/main_d0_to_hhhh.py       |   40 -
 Charm_2024validation/main_d0_to_hhpi0.py      |   43 -
 Charm_2024validation/main_d0_to_kshh.py       |   75 -
 Charm_2024validation/main_d0_to_ksks.py       |   59 -
 Charm_2024validation/main_d_to_hhh.py         |   63 -
 Charm_2024validation/main_d_to_ksh.py         |   48 -
 .../main_detection_asymmetry.py               |   31 -
 Charm_2024validation/main_dst_to_dee.py       |   42 -
 Charm_2024validation/main_rare_charm.py       |   41 -
 Charm_2024validation/options/d0_to_hh.py      |  432 -----
 Charm_2024validation/options/d0_to_hh_MC.py   |   99 -
 Charm_2024validation/options/d0_to_hhhh.py    |  247 ---
 Charm_2024validation/options/d0_to_hhhh_MC.py |   43 -
 Charm_2024validation/options/d0_to_hhpi0.py   |  359 ----
 .../options/d0_to_hhpi0_MC.py                 |   44 -
 Charm_2024validation/options/d0_to_kshh.py    | 1585 -----------------
 Charm_2024validation/options/d0_to_kshh_MC.py |   44 -
 Charm_2024validation/options/d0_to_ksks.py    | 1049 -----------
 Charm_2024validation/options/d0_to_ksks_MC.py |   46 -
 Charm_2024validation/options/d_to_hhh.py      |  503 ------
 Charm_2024validation/options/d_to_hhh_MC.py   |   92 -
 Charm_2024validation/options/d_to_ksh.py      |  313 ----
 Charm_2024validation/options/d_to_ksh_MC.py   |   68 -
 .../options/detection_asymmetry.py            |  191 --
 Charm_2024validation/options/dst_to_dee.py    |  296 ---
 Charm_2024validation/options/hlt1.py          |   33 -
 Charm_2024validation/options/hlt2/d0_to_hh.py |    9 -
 .../options/hlt2/d0_to_hhhh.py                |    8 -
 .../options/hlt2/d0_to_hhpi0.py               |    8 -
 .../options/hlt2/d0_to_kshh.py                |    8 -
 .../options/hlt2/d0_to_ksks.py                |    8 -
 Charm_2024validation/options/hlt2/d_to_hhh.py |   10 -
 Charm_2024validation/options/hlt2/d_to_ksh.py |   10 -
 .../options/hlt2/dst_to_dee.py                |    9 -
 Charm_2024validation/options/hlt2/hlt2.py     |   32 -
 .../options/hlt2/hlt2_d0_to_hh.py             |   41 -
 .../options/hlt2/hlt2_d0_to_hhhh.py           |   40 -
 .../options/hlt2/hlt2_d0_to_hhpi0.py          |   40 -
 .../options/hlt2/hlt2_d0_to_kshh.py           |   40 -
 .../options/hlt2/hlt2_d0_to_ksks.py           |   40 -
 .../options/hlt2/hlt2_d_to_hhh.py             |   42 -
 .../options/hlt2/hlt2_d_to_ksh.py             |   42 -
 .../options/hlt2/hlt2_dst_to_dee.py           |   41 -
 .../options/hlt2/hlt2_rare_charm.py           |   40 -
 Charm_2024validation/options/hlt2/hlt2noUT.py |   32 -
 .../options/hlt2/make_hlt2_decay.sh           |    9 -
 .../options/hlt2/rare_charm.py                |    8 -
 Charm_2024validation/options/rare_charm.py    |  496 ------
 Charm_2024validation/options/tupling.py       |  986 ----------
 Charm_2024validation/tmp.yaml                 |   12 -
 58 files changed, 8506 deletions(-)
 delete mode 100644 Charm_2024validation/README.md
 delete mode 100644 Charm_2024validation/dummy.yaml
 delete mode 100644 Charm_2024validation/info.yaml
 delete mode 100644 Charm_2024validation/info_MC_4localtest.yaml
 delete mode 100644 Charm_2024validation/info_MC_noUT.yaml
 delete mode 100644 Charm_2024validation/info_data.yaml
 delete mode 100644 Charm_2024validation/info_data_noUT.yaml
 delete mode 100644 Charm_2024validation/main_d0_to_hh.py
 delete mode 100644 Charm_2024validation/main_d0_to_hhhh.py
 delete mode 100644 Charm_2024validation/main_d0_to_hhpi0.py
 delete mode 100644 Charm_2024validation/main_d0_to_kshh.py
 delete mode 100644 Charm_2024validation/main_d0_to_ksks.py
 delete mode 100644 Charm_2024validation/main_d_to_hhh.py
 delete mode 100644 Charm_2024validation/main_d_to_ksh.py
 delete mode 100644 Charm_2024validation/main_detection_asymmetry.py
 delete mode 100644 Charm_2024validation/main_dst_to_dee.py
 delete mode 100644 Charm_2024validation/main_rare_charm.py
 delete mode 100644 Charm_2024validation/options/d0_to_hh.py
 delete mode 100644 Charm_2024validation/options/d0_to_hh_MC.py
 delete mode 100644 Charm_2024validation/options/d0_to_hhhh.py
 delete mode 100644 Charm_2024validation/options/d0_to_hhhh_MC.py
 delete mode 100644 Charm_2024validation/options/d0_to_hhpi0.py
 delete mode 100644 Charm_2024validation/options/d0_to_hhpi0_MC.py
 delete mode 100644 Charm_2024validation/options/d0_to_kshh.py
 delete mode 100644 Charm_2024validation/options/d0_to_kshh_MC.py
 delete mode 100644 Charm_2024validation/options/d0_to_ksks.py
 delete mode 100644 Charm_2024validation/options/d0_to_ksks_MC.py
 delete mode 100644 Charm_2024validation/options/d_to_hhh.py
 delete mode 100644 Charm_2024validation/options/d_to_hhh_MC.py
 delete mode 100644 Charm_2024validation/options/d_to_ksh.py
 delete mode 100644 Charm_2024validation/options/d_to_ksh_MC.py
 delete mode 100644 Charm_2024validation/options/detection_asymmetry.py
 delete mode 100644 Charm_2024validation/options/dst_to_dee.py
 delete mode 100644 Charm_2024validation/options/hlt1.py
 delete mode 100644 Charm_2024validation/options/hlt2/d0_to_hh.py
 delete mode 100644 Charm_2024validation/options/hlt2/d0_to_hhhh.py
 delete mode 100644 Charm_2024validation/options/hlt2/d0_to_hhpi0.py
 delete mode 100644 Charm_2024validation/options/hlt2/d0_to_kshh.py
 delete mode 100644 Charm_2024validation/options/hlt2/d0_to_ksks.py
 delete mode 100644 Charm_2024validation/options/hlt2/d_to_hhh.py
 delete mode 100644 Charm_2024validation/options/hlt2/d_to_ksh.py
 delete mode 100644 Charm_2024validation/options/hlt2/dst_to_dee.py
 delete mode 100644 Charm_2024validation/options/hlt2/hlt2.py
 delete mode 100644 Charm_2024validation/options/hlt2/hlt2_d0_to_hh.py
 delete mode 100644 Charm_2024validation/options/hlt2/hlt2_d0_to_hhhh.py
 delete mode 100644 Charm_2024validation/options/hlt2/hlt2_d0_to_hhpi0.py
 delete mode 100644 Charm_2024validation/options/hlt2/hlt2_d0_to_kshh.py
 delete mode 100644 Charm_2024validation/options/hlt2/hlt2_d0_to_ksks.py
 delete mode 100644 Charm_2024validation/options/hlt2/hlt2_d_to_hhh.py
 delete mode 100644 Charm_2024validation/options/hlt2/hlt2_d_to_ksh.py
 delete mode 100644 Charm_2024validation/options/hlt2/hlt2_dst_to_dee.py
 delete mode 100644 Charm_2024validation/options/hlt2/hlt2_rare_charm.py
 delete mode 100644 Charm_2024validation/options/hlt2/hlt2noUT.py
 delete mode 100644 Charm_2024validation/options/hlt2/make_hlt2_decay.sh
 delete mode 100644 Charm_2024validation/options/hlt2/rare_charm.py
 delete mode 100644 Charm_2024validation/options/rare_charm.py
 delete mode 100644 Charm_2024validation/options/tupling.py
 delete mode 100644 Charm_2024validation/tmp.yaml

diff --git a/Charm_2024validation/README.md b/Charm_2024validation/README.md
deleted file mode 100644
index f061ea162c..0000000000
--- a/Charm_2024validation/README.md
+++ /dev/null
@@ -1,68 +0,0 @@
-Analysis production for 2024 data validation within the Charm WG.
-
-For easy tests, eg. on `d_to_hhh` subset:
-```sh
-lb-run DaVinci/v64r2 lbexec Charm_2024validation.main_d_to_hhh:main Charm_2024validation/dummy.yaml
-```
-
-Decays and Hlt2 lines considered are:
-- `d0_to_hh.py`:
-  - Dst2D0pi_D02Kpi_RS     "Hlt2Charm_DstpToD0Pip_D0ToKmPip"
-  - Dst2D0pi_D02Kpi_WS     "Hlt2Charm_DstpToD0Pip_D0ToKpPim"
-  - Dst2D0pi_D02KK     "Hlt2Charm_DstpToD0Pip_D0ToKmKp"
-  - Dst2D0pi_D02pipi     "Hlt2Charm_DstpToD0Pip_D0ToPimPip"
-  - D02Kpi     "Hlt2Charm_D0ToKmPip"
-  - D02KK     "Hlt2Charm_D0ToKmKp"
-  - D02pipi     "Hlt2Charm_D0ToPimPip"
-  - Dst2D0pi_D02Kpi_RS_LowBias     "Hlt2Charm_DstpToD0Pip_D0ToKmPip_LowBias"
-  - Dst2D0pi_D02Kpi_WS_LowBias     "Hlt2Charm_DstpToD0Pip_D0ToKpPim_LowBias"
-  - Dst2D0pi_D02KK_LowBias     "Hlt2Charm_DstpToD0Pip_D0ToKmKp_LowBias"
-  - Dst2D0pi_D02pipi_LowBias     "Hlt2Charm_DstpToD0Pip_D0ToPimPip_LowBias"
-  - D02Kpi_LowBias     "Hlt2Charm_D0ToKmPip_LowBias"
-  - D02KK_LowBias     "Hlt2Charm_D0ToKmKp_LowBias"
-  - D02pipi_LowBias     "Hlt2Charm_D0ToPimPip_LowBias"
-- `d_to_ksh.py`:
-  - D2KSpi_LL     "Hlt2Charm_DpDspToKsPip_LL"
-  - D2KSpi_LD     "Hlt2Charm_DpDspToKsPip_LD"
-  - D2KSpi_DD     "Hlt2Charm_DpDspToKsPip_DD"
-  - D2KSK_LL     "Hlt2Charm_DpDspToKsKp_LL"
-  - D2KSK_LD     "Hlt2Charm_DpDspToKsKp_LD"
-  - D2KSK_DD     "Hlt2Charm_DpDspToKsKp_DD"
-- `d_to_hhh.py`:
-  - D2Kpipi     "Hlt2Charm_DpDspToKmPipPip"
-  - D2Kpipi_NoCuts     "Hlt2Charm_DpDspToKmPipPip_NoCuts"
-  - Ds2KKpi     "Hlt2Charm_DspToKmKpPip"
-  - Ds2KKpi_NoCuts     "Hlt2Charm_DspToKmKpPip_NoCuts"
-  - D2pipipi     "Hlt2Charm_DpDspToPimPipPip"
-  - D2pipipi_NoCuts     "Hlt2Charm_DpDspToPimPipPip_NoCuts"
-- `d0_to_hhpi0.py`:
-  - Dst2D0pi_D02Kpipi0 "Hlt2Charm_DstpToD0Pip_D0ToKmPipPi0_{M,R}"
-  - Dst2D0pi_D02KKpi0 "Hlt2Charm_DstpToD0Pip_D0ToKmKpPi0_{M,R}"
-  - Dst2D0pi_D02pipipi0 "Hlt2Charm_DstpToD0Pip_D0ToPimPipPi0_{M,R}"
-- `detection_asymmetry.py`:
-  - D2Kpipi_ADet "Hlt2Charm_DpToKmPipPip_ADet"
-  - D2KSK_LL_ADet "Hlt2Charm_DspToKsKp_LL_ADet"
-  - D2KSpi_LL_ADet "Hlt2Charm_DpToKsPip_LL_ADet"
-  - D2pipipi_ADet "Hlt2Charm_DspToPimPipPip_ADet"
-  - Ds2KKpi_ADet "Hlt2Charm_DspToKmKpPip_ADet"
-  - Lc2KSp_LL_ADet "Hlt2Charm_LcpToPpKs_LL_ADet"
-  - Lc2pKpi_ADet "Hlt2Charm_LcpToPpKmPip_ADet"
-- `rare_charm.py`:
-  - D2pimumu "Hlt2Charm_DpDspToPipMumMup"
-  - D2pimumu_WS "Hlt2Charm_DpDspToPipMupMup_RareCharmControl"
-  - Dst2D0pi_D02Kpimumu_RS "Hlt2Charm_DstpToD0Pip_D0ToKmPipMumMup"
-- `d0_to_kshh.py`:
-- `d0_to_ksks.py`:
-- `dst_to_dee.py`:
-  -  Dst02D0EmEp_D02KmPip_OS    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS',
-  -  Dst02D0EmEp_D02KmPip_SS 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS',
-  -  Dst02D0EmEp_D02KmPip_OS_MVA 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS_MVA',
-  -  Dst02D0EmEp_D02KmPip_SS_MVA 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS_MVA',
-  -  Dst02D0EmEp_D02KmPimPipPip_OS 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS',
-  -  Dst02D0EmEp_D02KmPimPipPip_SS 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS',
-  -  Dst02D0EmEp_D02KmPimPipPip_OS_MVA 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS_MVA',
-  -  Dst02D0EmEp_D02KmPimPipPip_SS_MVA 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS_MVA',
-  -  Dstp2DpDspEmEp_DpDsp2KmKpPip_OS 'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS',
-  -  Dstp2DpDspEmEp_DpDsp2KmKpPip_SS 'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS',
-  -  Dstp2DpDspEmEp_DpDsp2KmKpPip_OS_MVA 'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS_MVA',
-  -  Dstp2DpDspEmEp_DpDsp2KmKpPip_SS_MVA'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS_MVA',
diff --git a/Charm_2024validation/dummy.yaml b/Charm_2024validation/dummy.yaml
deleted file mode 100644
index 5bebae4ac3..0000000000
--- a/Charm_2024validation/dummy.yaml
+++ /dev/null
@@ -1,16 +0,0 @@
-input_files:
-- root://myProxy@lhcbxrootd-kit.gridka.de//pnfs/gridka.de/lhcb/LHCb-Disk/lhcb/LHCb/Collision23/CHARM.DST/00198130/0000/00198130_00000552_1.charm.dst
-input_raw_format: 0.5
-input_type: ROOT
-output_type: ROOT
-event_store: HiveWhiteBoard
-simulation: False
-data_type: "Upgrade"
-geometry_version: run3/trunk
-conditions_version: Alignment2023_HLT2Processing_26_8_2023
-scheduler_legacy_mode: False
-input_process: "TurboPass"
-input_stream: "charm"
-histo_file: CHARM_HISTO.ROOT
-ntuple_file: CHARM.ROOT
-evt_max: 1000
diff --git a/Charm_2024validation/info.yaml b/Charm_2024validation/info.yaml
deleted file mode 100644
index f49943e7e9..0000000000
--- a/Charm_2024validation/info.yaml
+++ /dev/null
@@ -1,121 +0,0 @@
-defaults:
-  inform:
-    - serena.maccolini@cern.ch
-  wg: Charm
-
-{%- set conditions = [
-  "MagDown",
-]%}
-
-{%- set evttype_subsample_nutext_nu_dir1_dir2_dddb = [
-( '27163102', 'd0_to_hh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163101', 'd0_to_hh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163100', 'd0_to_hh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '23103042', 'd_to_hhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '23263022', 'd_to_hhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '21263012', 'd_to_hhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163471', 'd0_to_hhpi0', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27165903', 'd0_to_kshh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27165071', 'd0_to_hhhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27265008', 'd0_to_hhhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27265009', 'd0_to_hhhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27165072', 'd0_to_hhhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '23103111', 'd_to_ksh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '21103101', 'd_to_ksh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '23173003', 'rare_charm', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-
-( '27163102', 'd0_to_hh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163101', 'd0_to_hh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163100', 'd0_to_hh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '23103042', 'd_to_hhh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '23263022', 'd_to_hhh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '21263012', 'd_to_hhh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163471', 'd0_to_hhpi0', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '27165903', 'd0_to_kshh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '27165071', 'd0_to_hhhh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-
-( '27163102', 'd0_to_hh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163101', 'd0_to_hh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163100', 'd0_to_hh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '23103042', 'd_to_hhh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '23263022', 'd_to_hhh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '21263012', 'd_to_hhh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163471', 'd0_to_hhpi0', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '27165903', 'd0_to_kshh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '27165071', 'd0_to_hhhh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-
-( '27163102', 'd0_to_hh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163101', 'd0_to_hh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163100', 'd0_to_hh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '23103042', 'd_to_hhh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '23263022', 'd_to_hhh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '21263012', 'd_to_hhh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163471', 'd0_to_hhpi0', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27165903', 'd0_to_kshh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27165071', 'd0_to_hhhh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-
-]%}
-
-
-
-{%- for evttype, id, nutext, nu, dir1, dir2, dddb in evttype_subsample_nutext_nu_dir1_dir2_dddb %}
-
-{% for polarity in conditions %}
-
-{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1:
-  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
-  input:
-    bk_query: "/MC/{{dir1}}/Beam6800GeV-2024{{dir2}}-{{polarity}}-Nu{{nu}}-25ns-Pythia8/Sim10d/{{evttype}}/DIGI"
-    n_test_lfns: 3
-  output: HLT1.DST
-  options:
-    entrypoint: Charm_2024validation.options.hlt1:alg_config
-    extra_options:
-      input_raw_format: 0.5
-      conddb_tag: sim10-2024.Q1.2-v1.1-md100
-      dddb_tag: '{{dddb}}'
-      input_type: ROOT
-      output_type: ROOT
-      simulation: True
-      data_type: "Upgrade"
-      scheduler_legacy_mode: False
-      evt_max: -1
-
-{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2:
-  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
-  input:
-    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1
-  output: HLT2.DST
-  options:
-    entrypoint: Charm_2024validation.options.hlt2.hlt2_{{id}}:alg_config
-    extra_options:
-      conddb_tag: sim10-2024.Q1.2-v1.1-md100
-      dddb_tag: '{{dddb}}'
-      input_raw_format: 0.5
-      input_type: "ROOT"
-      output_type: "ROOT"
-      simulation: True
-      data_type: "Upgrade"
-      output_manifest_file: "HLT2.tck.json"
-      scheduler_legacy_mode: False
-
-MC_{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}:
-  application: "DaVinci/v64r7@x86_64_v3-el9-gcc13+detdesc-opt+g"
-  input:
-    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2
-  output: DVTUPLE.ROOT
-  options:
-    entrypoint: Charm_2024validation.main_{{id}}:main
-    extra_options:
-      conddb_tag: sim10-2024.Q1.2-v1.1-md100
-      dddb_tag: '{{dddb}}'
-      input_raw_format: 0.5
-      input_type: ROOT
-      simulation: True
-      data_type: "Upgrade"
-      event_store: HiveWhiteBoard
-      input_process: "Hlt2"
-      input_manifest_file: "HLT2.tck.json"
-      
-{%- endfor %}
-{%- endfor %}
diff --git a/Charm_2024validation/info_MC_4localtest.yaml b/Charm_2024validation/info_MC_4localtest.yaml
deleted file mode 100644
index 3d18e13274..0000000000
--- a/Charm_2024validation/info_MC_4localtest.yaml
+++ /dev/null
@@ -1,122 +0,0 @@
-defaults:
-  inform:
-    - serena.maccolini@cern.ch
-  wg: Charm
-
-{%- set conditions = [
-  "MagDown",
-]%}
-
-{%- set evttype_subsample_nutext_nu_dir1_dir2_dddb_geometry = [
-( '27163102', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163101', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163100', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23103042', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23263022', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '21263012', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163471', 'd0_to_hhpi0', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165903', 'd0_to_kshh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165071', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27265008', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27265009', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165072', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23103111', 'd_to_ksh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '21103101', 'd_to_ksh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23173003', 'rare_charm', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163102', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163101', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163100', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23103042', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23263022', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '21263012', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163471', 'd0_to_hhpi0', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165903', 'd0_to_kshh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165071', 'd0_to_hhhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163102', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163101', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163100', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23103042', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23263022', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '21263012', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163471', 'd0_to_hhpi0', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165903', 'd0_to_kshh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165071', 'd0_to_hhhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163102', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163101', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163100', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23103042', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23263022', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '21263012', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163471', 'd0_to_hhpi0', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165903', 'd0_to_kshh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165071', 'd0_to_hhhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165901', 'd0_to_ksks', '7p6', '7.6', 'Dev', '', 'dddb-20231017', 'run3/trunk'),
-]%}
-
-
-
-{%- for evttype, id, nutext, nu, dir1, dir2, dddb, geometry in evttype_subsample_nutext_nu_dir1_dir2_dddb_geometry %}
-
-{% for polarity in conditions %}
-
-{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1:
-  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
-  input:
-    bk_query: "/MC/{{dir1}}/Beam6800GeV-expected-2024{{dir2}}-{{polarity}}-Nu{{nu}}-25ns-Pythia8/Sim10c/{{evttype}}/DIGI"
-    n_test_lfns: 3
-  output: HLT1.DST
-  options:
-    entrypoint: Charm_2024validation.options.hlt1:alg_config
-    extra_options:
-      input_raw_format: 0.5
-      conddb_tag: sim-20231017-vc-md100
-      dddb_tag: '{{dddb}}'
-      input_type: ROOT
-      output_type: ROOT
-      simulation: True
-      data_type: "Upgrade"
-      scheduler_legacy_mode: False
-      geometry_version: "{{geometry}}"
-      evt_max: 1000
-
-{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2:
-  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
-  input:
-    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1
-  output: HLT2.DST
-  options:
-    entrypoint: Charm_2024validation.options.hlt2.hlt2_{{id}}:alg_config
-    extra_options:
-      conddb_tag: sim-20231017-vc-md100
-      dddb_tag: '{{dddb}}'
-      input_raw_format: 0.5
-      input_type: "ROOT"
-      output_type: "ROOT"
-      simulation: True
-      data_type: "Upgrade"
-      output_manifest_file: "HLT2.tck.json"
-      scheduler_legacy_mode: False
-      geometry_version: "{{geometry}}"
-
-MC_{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}:
-  application: "DaVinci/v64r3@x86_64_v3-el9-gcc13+detdesc-opt+g"
-  input:
-    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2
-  output: DVTUPLE.ROOT
-  options:
-    entrypoint: Charm_2024validation.main_{{id}}:main
-    extra_options:
-      conddb_tag: sim-20231017-vc-md100
-      dddb_tag: '{{dddb}}'
-      input_raw_format: 0.5
-      input_type: ROOT
-      simulation: True
-      data_type: "Upgrade"
-      event_store: HiveWhiteBoard
-      geometry_version: "{{geometry}}"
-      input_process: "Hlt2"
-      input_manifest_file: "HLT2.tck.json"
-      write_decoding_keys_to_git: false
-
-{%- endfor %}
-{%- endfor %}
diff --git a/Charm_2024validation/info_MC_noUT.yaml b/Charm_2024validation/info_MC_noUT.yaml
deleted file mode 100644
index 52df9e4e96..0000000000
--- a/Charm_2024validation/info_MC_noUT.yaml
+++ /dev/null
@@ -1,121 +0,0 @@
-defaults:
-  inform:
-    - serena.maccolini@cern.ch
-  wg: Charm
-
-{%- set conditions = [
-  "MagDown",
-]%}
-
-{%- set evttype_subsample_nutext_nu_dir1_dir2_dddb_geometry = [
-( '27163102', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163101', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163100', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23103042', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23263022', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '21263012', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163471', 'd0_to_hhpi0', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165903', 'd0_to_kshh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165071', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27265008', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27265009', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165072', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23103111', 'd_to_ksh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '21103101', 'd_to_ksh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23173003', 'rare_charm', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163102', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163101', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163100', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23103042', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23263022', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '21263012', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163471', 'd0_to_hhpi0', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165903', 'd0_to_kshh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165071', 'd0_to_hhhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163102', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163101', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163100', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23103042', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23263022', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '21263012', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163471', 'd0_to_hhpi0', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165903', 'd0_to_kshh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165071', 'd0_to_hhhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163102', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163101', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163100', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23103042', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23263022', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '21263012', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163471', 'd0_to_hhpi0', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165903', 'd0_to_kshh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165071', 'd0_to_hhhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165901', 'd0_to_ksks', '7p6', '7.6', 'Dev', '', 'dddb-20231017', 'run3/trunk'),
-]%}
-
-
-
-{%- for evttype, id, nutext, nu, dir1, dir2, dddb, geometry in evttype_subsample_nutext_nu_dir1_dir2_dddb_geometry %}
-
-{% for polarity in conditions %}
-
-{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1:
-  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
-  input:
-    bk_query: "/MC/{{dir1}}/Beam6800GeV-expected-2024{{dir2}}-{{polarity}}-Nu{{nu}}-25ns-Pythia8/Sim10c/{{evttype}}/DIGI"
-    n_test_lfns: 3
-  output: HLT1.DST
-  options:
-    entrypoint: Charm_2024validation.options.hlt1:alg_config
-    extra_options:
-      input_raw_format: 0.5
-      conddb_tag: sim-20231017-vc-md100
-      dddb_tag: '{{dddb}}'
-      input_type: ROOT
-      output_type: ROOT
-      simulation: True
-      data_type: "Upgrade"
-      scheduler_legacy_mode: False
-      geometry_version: "{{geometry}}"
-      evt_max: -1
-
-{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2:
-  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
-  input:
-    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1
-  output: HLT2.DST
-  options:
-    entrypoint: Charm_2024validation.options.hlt2.hlt2_{{id}}:alg_config
-    extra_options:
-      conddb_tag: sim-20231017-vc-md100
-      dddb_tag: '{{dddb}}'
-      input_raw_format: 0.5
-      input_type: "ROOT"
-      output_type: "ROOT"
-      simulation: True
-      data_type: "Upgrade"
-      output_manifest_file: "HLT2.tck.json"
-      scheduler_legacy_mode: False
-      geometry_version: "{{geometry}}"
-
-MC_{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}:
-  application: "DaVinci/v64r3@x86_64_v3-el9-gcc13+detdesc-opt+g"
-  input:
-    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2
-  output: DVTUPLE.ROOT
-  options:
-    entrypoint: Charm_2024validation.main_{{id}}:main
-    extra_options:
-      conddb_tag: sim-20231017-vc-md100
-      dddb_tag: '{{dddb}}'
-      input_raw_format: 0.5
-      input_type: ROOT
-      simulation: True
-      data_type: "Upgrade"
-      event_store: HiveWhiteBoard
-      geometry_version: "{{geometry}}"
-      input_process: "Hlt2"
-      input_manifest_file: "HLT2.tck.json"
-
-{%- endfor %}
-{%- endfor %}
diff --git a/Charm_2024validation/info_data.yaml b/Charm_2024validation/info_data.yaml
deleted file mode 100644
index cf3b7dcdf9..0000000000
--- a/Charm_2024validation/info_data.yaml
+++ /dev/null
@@ -1,53 +0,0 @@
-defaults:
-  inform:
-    - serena.maccolini@cern.ch
-  wg: Charm
-
-{%- set conditions = [
-  "MagDown",
-]%}
-
-
-
-{%- set subsamples = [
-  "d0_to_hh",
-  "d_to_hhh",
-  "d_to_ksh",
-  "d0_to_hhpi0",
-  "d0_to_kshh",
-  "d0_to_ksks",
-  "d0_to_hhhh",
-  "rare_charm",
-  "detection_asymmetry",
-  "dst_to_dee",
-]%}
-
-{% for id in subsamples %}
-{% for polarity in conditions %}
-
-{{id}}_2024_{{ polarity }}:
-  application: "DaVinci/v64r7"
-  input:
-    bk_query: "/LHCb/Collision24/Beam6800GeV-VeloClosed-{{polarity}}/Real Data/Sprucing24c2/94000000/CHARM.DST"
-
-    dq_flags:
-      - UNCHECKED
-      - OK
-    keep_running: true
-  output: DVTUPLE_{{id}}.ROOT
-  options:
-    entrypoint: Charm_2024validation.main_{{id}}:main
-    extra_options:
-      input_raw_format: 0.5
-      input_type: ROOT
-      simulation: False
-      data_type: "Upgrade"
-      event_store: HiveWhiteBoard
-      geometry_version: run3/2024.Q1.2-v00.00
-      conditions_version: master
-      input_process: "TurboPass"
-      input_stream: "charm"
-      evt_max: -1
-
-{%- endfor %}
-{%- endfor %}
diff --git a/Charm_2024validation/info_data_noUT.yaml b/Charm_2024validation/info_data_noUT.yaml
deleted file mode 100644
index 8c750c72d0..0000000000
--- a/Charm_2024validation/info_data_noUT.yaml
+++ /dev/null
@@ -1,50 +0,0 @@
-defaults:
-  inform:
-    - serena.maccolini@cern.ch
-  wg: Charm
-
-{%- set conditions = [
-  "MagDown",
-]%}
-
-
-
-{%- set subsamples = [
-  "d0_to_hh",
-  "d_to_hhh",
-  "d_to_ksh",
-  "d0_to_hhpi0",
-  "d0_to_kshh",
-  "d0_to_ksks",
-  "d0_to_hhhh",
-  "rare_charm",
-  "detection_asymmetry",
-]%}
-
-{% for id in subsamples %}
-{% for polarity in conditions %}
-
-{{id}}_2024_{{ polarity }}:
-  application: "DaVinci/v64r5"
-  input:
-    bk_query: "/LHCb/Collision24/Beam6800GeV-VeloClosed-{{polarity}}-Excl-UT/Real Data/Sprucing24c1/94000000/CHARM.DST"
-    dq_flags:
-      - UNCHECKED
-      - OK
-    keep_running: true
-  output: DVTUPLE_{{id}}.ROOT
-  options:
-    entrypoint: Charm_2024validation.main_{{id}}:main
-    extra_options:
-      input_raw_format: 0.5
-      input_type: ROOT
-      simulation: False
-      data_type: "Upgrade"
-      event_store: HiveWhiteBoard
-      geometry_version: run3/2024.Q1.2-v00.00
-      conditions_version: master
-      input_process: "TurboPass"
-      input_stream: "charm"
-
-{%- endfor %}
-{%- endfor %}
diff --git a/Charm_2024validation/main_d0_to_hh.py b/Charm_2024validation/main_d0_to_hh.py
deleted file mode 100644
index 12eea15463..0000000000
--- a/Charm_2024validation/main_d0_to_hh.py
+++ /dev/null
@@ -1,58 +0,0 @@
-###############################################################################
-# (c) Copyright 2021-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 .options.d0_to_hh import *
-from .options.d0_to_hh_MC import *
-
-from DaVinci import Options, make_config
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-        #D02hh
-        "D02Kpi" : maketuple_D02Kpi(options, pvs, rec_summary),
-        "D02KK" : maketuple_D02KK(options, pvs, rec_summary),
-        "D02pipi" : maketuple_D02pipi(options, pvs, rec_summary),
-        #Dst2D0pi_D02hh
-        "Dst2D0pi_D02Kpi_RS" : maketuple_Dst2D0pi_D02Kpi_RS(options, pvs, rec_summary),
-        "Dst2D0pi_D02Kpi_WS" : maketuple_Dst2D0pi_D02Kpi_WS(options, pvs, rec_summary),
-        "Dst2D0pi_D02KK" : maketuple_Dst2D0pi_D02KK(options, pvs, rec_summary),
-        "Dst2D0pi_D02pipi" : maketuple_Dst2D0pi_D02pipi(options, pvs, rec_summary),
-
-        ##LowBias
-        #D02hh
-        "D02Kpi_LowBias" : maketuple_D02Kpi_LowBias(options, pvs, rec_summary),
-        "D02KK_LowBias" : maketuple_D02KK_LowBias(options, pvs, rec_summary),
-        "D02pipi_LowBias" : maketuple_D02pipi_LowBias(options, pvs, rec_summary),
-        #Dst2D0pi_D02hh
-        "Dst2D0pi_D02Kpi_RS_LowBias" : maketuple_Dst2D0pi_D02Kpi_RS_LowBias(options, pvs, rec_summary),
-        "Dst2D0pi_D02Kpi_WS_LowBias" : maketuple_Dst2D0pi_D02Kpi_WS_LowBias(options, pvs, rec_summary),
-        "Dst2D0pi_D02KK_LowBias" : maketuple_Dst2D0pi_D02KK_LowBias(options, pvs, rec_summary),
-        "Dst2D0pi_D02pipi_LowBias" : maketuple_Dst2D0pi_D02pipi_LowBias(options, pvs, rec_summary),
-    }
-
-    MCtuples = {
-        "MC_Dst2D0pi_D02Kpi_RS" : maketuple_MC_Dst2D0pi_D02Kpi_RS(options, pvs, rec_summary),
-        "MC_Dst2D0pi_D02KK_RS" : maketuple_MC_Dst2D0pi_D02KK(options, pvs, rec_summary),
-        "MC_Dst2D0pi_D02pipi" : maketuple_MC_Dst2D0pi_D02pipi(options, pvs, rec_summary),
-    }
-
-    if options.simulation:
-        tuples = tuples | MCtuples
-
-    config = make_config(options, tuples)
-
-    return config
diff --git a/Charm_2024validation/main_d0_to_hhhh.py b/Charm_2024validation/main_d0_to_hhhh.py
deleted file mode 100644
index 5fb555ccfd..0000000000
--- a/Charm_2024validation/main_d0_to_hhhh.py
+++ /dev/null
@@ -1,40 +0,0 @@
-###############################################################################
-# (c) Copyright 2021-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 .options.d0_to_hhhh import *
-from .options.d0_to_hhhh_MC import *
-
-from DaVinci import Options, make_config
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-        
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-        "DstToD0pi_D0ToKKPiPi" : maketuple_DstToD0pi_D0ToKKPiPi(options, pvs, rec_summary),
-        "DstToD0pi_D0ToKPiPiPi" : maketuple_DstToD0pi_D0ToKPiPiPi(options, pvs, rec_summary),
-        "DstToD0pi_D0ToPiKPiPi" : maketuple_DstToD0pi_D0ToPiKPiPi(options, pvs, rec_summary),
-        "DstToD0pi_D0ToPiPiPiPi" : maketuple_DstToD0pi_D0ToPiPiPiPi(options, pvs, rec_summary),
-    }
-
-    MCtuples = {
-        "MC_DstToD0pi_D0ToKPiPiPi" : maketuple_MC_DstToD0pi_D0ToKPiPiPi(options, pvs, rec_summary),
-    }
-    
-    if options.simulation:
-        tuples = tuples | MCtuples
-        
-    config = make_config(options, tuples)
-
-    return config
diff --git a/Charm_2024validation/main_d0_to_hhpi0.py b/Charm_2024validation/main_d0_to_hhpi0.py
deleted file mode 100644
index ac59dc71d9..0000000000
--- a/Charm_2024validation/main_d0_to_hhpi0.py
+++ /dev/null
@@ -1,43 +0,0 @@
-###############################################################################
-# (c) Copyright 2021-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 .options.d0_to_hhpi0 import *
-from .options.d0_to_hhpi0_MC import *
-
-from DaVinci import Options, make_config
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-        
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-        #Dst2D0pi_D02hhpi0
-        "Dst2D0pi_D02Kpipi0_M" : maketuple_Dst2D0pi_D02Kpipi0_M(options, pvs, rec_summary),
-        "Dst2D0pi_D02KKpi0_M" : maketuple_Dst2D0pi_D02KKpi0_M(options, pvs, rec_summary),
-        "Dst2D0pi_D02pipipi0_M" : maketuple_Dst2D0pi_D02pipipi0_M(options, pvs, rec_summary),
-        "Dst2D0pi_D02Kpipi0_R" : maketuple_Dst2D0pi_D02Kpipi0_R(options, pvs, rec_summary),
-        "Dst2D0pi_D02KKpi0_R" : maketuple_Dst2D0pi_D02KKpi0_R(options, pvs, rec_summary),
-        "Dst2D0pi_D02pipipi0_R" : maketuple_Dst2D0pi_D02pipipi0_R(options, pvs, rec_summary),
-    }
-
-    MCtuples = {
-        "MC_Dst2D0pi_D02Kpipi0" : maketuple_MC_Dst2D0pi_D02Kpipi0(options, pvs, rec_summary),
-    }
-    
-    if options.simulation:
-        tuples = tuples | MCtuples
-        
-    config = make_config(options, tuples)
-
-    return config
diff --git a/Charm_2024validation/main_d0_to_kshh.py b/Charm_2024validation/main_d0_to_kshh.py
deleted file mode 100644
index f9cfbd58e2..0000000000
--- a/Charm_2024validation/main_d0_to_kshh.py
+++ /dev/null
@@ -1,75 +0,0 @@
-###############################################################################
-# (c) Copyright 2021-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 .options.d0_to_kshh import *
-from .options.d0_to_kshh_MC import *
-
-from DaVinci import Options, make_config
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-        #D02kshh
-        "D0ToKsPimPip_LL" : maketuple_D0ToKsPimPip_LL(options, pvs, rec_summary),
-        "D0ToKsPimPip_DD" : maketuple_D0ToKsPimPip_DD(options, pvs, rec_summary),
-        "D0ToKsKmPip_LL" : maketuple_D0ToKsKmPip_LL(options, pvs, rec_summary),
-        "D0ToKsKmPip_DD" : maketuple_D0ToKsKmPip_DD(options, pvs, rec_summary),
-        "D0ToKsKpPim_LL" : maketuple_D0ToKsKmPip_LL(options, pvs, rec_summary),
-        "D0ToKsKpPim_DD" : maketuple_D0ToKsKmPip_DD(options, pvs, rec_summary),
-        "D0ToKsKmKp_LL" : maketuple_D0ToKsKmKp_LL(options, pvs, rec_summary),
-        "D0ToKsKmKp_DD" : maketuple_D0ToKsKmKp_DD(options, pvs, rec_summary),
-        #Dst2D0pi_D02kshh
-        "DstpToD0Pip_D0ToKsPimPip_LL" : maketuple_DstpToD0Pip_D0ToKsPimPip_LL(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsPimPip_DD" : maketuple_DstpToD0Pip_D0ToKsPimPip_DD(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKmPip_LL" : maketuple_DstpToD0Pip_D0ToKsKmPip_LL(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKmPip_DD" : maketuple_DstpToD0Pip_D0ToKsKmPip_DD(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKpPim_LL" : maketuple_DstpToD0Pip_D0ToKsKmPip_LL(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKpPim_DD" : maketuple_DstpToD0Pip_D0ToKsKmPip_DD(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKmKp_LL" : maketuple_DstpToD0Pip_D0ToKsKmKp_LL(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKmKp_DD" : maketuple_DstpToD0Pip_D0ToKsKmKp_DD(options, pvs, rec_summary),
-
-        ##LowBias
-        #D02kshh
-        "D0ToKsPimPip_LL_LowBias" : maketuple_D0ToKsPimPip_LL_LowBias(options, pvs, rec_summary),
-        "D0ToKsPimPip_DD_LowBias" : maketuple_D0ToKsPimPip_DD_LowBias(options, pvs, rec_summary),
-        "D0ToKsKmPip_LL_LowBias" : maketuple_D0ToKsKmPip_LL_LowBias(options, pvs, rec_summary),
-        "D0ToKsKmPip_DD_LowBias" : maketuple_D0ToKsKmPip_DD_LowBias(options, pvs, rec_summary),
-        "D0ToKsKpPim_LL_LowBias" : maketuple_D0ToKsKmPip_LL_LowBias(options, pvs, rec_summary),
-        "D0ToKsKpPim_DD_LowBias" : maketuple_D0ToKsKmPip_DD_LowBias(options, pvs, rec_summary),
-        "D0ToKsKmKp_LL_LowBias" : maketuple_D0ToKsKmKp_LL_LowBias(options, pvs, rec_summary),
-        "D0ToKsKmKp_DD_LowBias" : maketuple_D0ToKsKmKp_DD_LowBias(options, pvs, rec_summary),
-        #Dst2D0pi_D02kshh
-        "DstpToD0Pip_D0ToKsPimPip_LL_LowBias" : maketuple_DstpToD0Pip_D0ToKsPimPip_LL_LowBias(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsPimPip_DD_LowBias" : maketuple_DstpToD0Pip_D0ToKsPimPip_DD_LowBias(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKmPip_LL_LowBias" : maketuple_DstpToD0Pip_D0ToKsKmPip_LL_LowBias(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKmPip_DD_LowBias" : maketuple_DstpToD0Pip_D0ToKsKmPip_DD_LowBias(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKpPim_LL_LowBias" : maketuple_DstpToD0Pip_D0ToKsKmPip_LL_LowBias(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKpPim_DD_LowBias" : maketuple_DstpToD0Pip_D0ToKsKmPip_DD_LowBias(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKmKp_LL_LowBias" : maketuple_DstpToD0Pip_D0ToKsKmKp_LL_LowBias(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKmKp_DD_LowBias" : maketuple_DstpToD0Pip_D0ToKsKmKp_DD_LowBias(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsPimPip_DD_NoBias" : maketuple_DstpToD0Pip_D0ToKsPimPip_LL_NoBias(options, pvs, rec_summary),
-    }
-
-    MCtuples = {
-        "MC_DstpToD0Pip_D0ToKsPimPip" : maketuple_MC_DstpToD0Pip_D0ToKsPimPip(options, pvs, rec_summary),
-    }
-
-    if options.simulation:
-        tuples = tuples | MCtuples
-
-    config = make_config(options, tuples)
-
-    return config
diff --git a/Charm_2024validation/main_d0_to_ksks.py b/Charm_2024validation/main_d0_to_ksks.py
deleted file mode 100644
index cb69552d78..0000000000
--- a/Charm_2024validation/main_d0_to_ksks.py
+++ /dev/null
@@ -1,59 +0,0 @@
-###############################################################################
-# (c) Copyright 2021-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.                                       #
-###############################################################################
-import Functors as F
-from Functors.math import log
-from DaVinci import Options, make_config
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunctorCollection
-import FunTuple.functorcollections as FC
-from FunTuple import FunTuple_Particles as Funtuple
-
-#D02KSKS
-from .options.d0_to_ksks import *
-from .options.d0_to_ksks_MC import *
-
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-        #D02KSKS
-        "Dst2D0pi_D02KSKS_LLLL" : maketuple_Dst2D0pi_D02KSKS_LLLL(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_LLLL_Tight" : maketuple_Dst2D0pi_D02KSKS_LLLL_Tight(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_LLDD" : maketuple_Dst2D0pi_D02KSKS_LLDD(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_LLDD_Tight" : maketuple_Dst2D0pi_D02KSKS_LLDD_Tight(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_DDDD" : maketuple_Dst2D0pi_D02KSKS_DDDD(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_DDDD_Tight" : maketuple_Dst2D0pi_D02KSKS_DDDD_Tight(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_ULLL" : maketuple_Dst2D0pi_D02KSKS_ULLL(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_ULLL_Tight" : maketuple_Dst2D0pi_D02KSKS_ULLL_Tight(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_ULDD" : maketuple_Dst2D0pi_D02KSKS_ULDD(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_ULDD_Tight" : maketuple_Dst2D0pi_D02KSKS_ULDD_Tight(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_LLLD" : maketuple_Dst2D0pi_D02KSKS_LLLD(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_LLLD_Tight" : maketuple_Dst2D0pi_D02KSKS_LLLD_Tight(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_DDLD" : maketuple_Dst2D0pi_D02KSKS_DDLD(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_DDLD_Tight" : maketuple_Dst2D0pi_D02KSKS_DDLD_Tight(options, pvs, rec_summary),
-    }
-
-    MCtuples = {
-        "MC_Dst2D0pi_D02KSKS_LLLL" : maketuple_MC_Dst2D0pi_D02KSKS_LLLL(options, pvs, rec_summary)
-    }
-
-    if options.simulation:
-        tuples = tuples | MCtuples
-        
-    config = make_config(options, tuples)
-
-    return config
diff --git a/Charm_2024validation/main_d_to_hhh.py b/Charm_2024validation/main_d_to_hhh.py
deleted file mode 100644
index 516e32b119..0000000000
--- a/Charm_2024validation/main_d_to_hhh.py
+++ /dev/null
@@ -1,63 +0,0 @@
-###############################################################################
-# (c) Copyright 2021-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 .options.d_to_hhh import *
-from .options.d_to_hhh_MC import *
-from .options.detection_asymmetry import *
-
-from DaVinci import Options, make_config
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-        #D2hhh
-        "D2Kpipi" : maketuple_D2Kpipi(options, pvs, rec_summary),
-        "D2Kpipi_NoCuts" : maketuple_D2Kpipi(options, pvs, rec_summary,True),
-        #"D2Kpipi_Kpi" : maketuple_D2Kpipi_Kpi(options, pvs, rec_summary), #subcomb of 2 out of 3 daughters
-        "Ds2KKpi" : maketuple_Ds2KKpi(options, pvs, rec_summary),
-        "Ds2KKpi_NoCuts" : maketuple_Ds2KKpi(options, pvs, rec_summary,True),
-        "D2pipipi" : maketuple_D2pipipi(options, pvs, rec_summary),
-        "D2pipipi_NoCuts" : maketuple_D2pipipi(options, pvs, rec_summary,True),
-        "D2pipiK" : maketuple_D2pipiK(options, pvs, rec_summary),
-        "D2pipiK_NoCuts" : maketuple_D2pipiK(options, pvs, rec_summary,True),
-        "D2KKK" : maketuple_D2KKK(options, pvs, rec_summary),
-        "D2KKK_NoCuts" : maketuple_D2KKK(options, pvs, rec_summary,True),
-        "D2piKK" : maketuple_D2piKK(options, pvs, rec_summary),
-        "D2piKK_NoCuts" : maketuple_D2piKK(options, pvs, rec_summary,True),
-        "B02Dpi_D2KKpi" : maketuple_B02Dpi_D2KKpi(options, pvs, rec_summary),
-        "B02Dpi_D2pipipi" : maketuple_B02Dpi_D2pipipi(options, pvs, rec_summary),
-        "Bs02Dspi_Ds2KKpi" : maketuple_Bs02Dspi_Ds2KKpi(options, pvs, rec_summary),
-        "Bs02Dspi_Ds2pipipi" : maketuple_Bs02Dspi_Ds2pipipi(options, pvs, rec_summary),
-        #ADet
-        "D2Kpipi_ADet" : maketuple_D2Kpipi_ADet(options, pvs, rec_summary),
-        "D2pipipi_ADet" : maketuple_D2pipipi_ADet(options, pvs, rec_summary),
-        "Ds2KKpi_ADet" : maketuple_Ds2KKpi_ADet(options, pvs, rec_summary),
-
-
-    }
-
-    MCtuples = {
-        "MC_D2Kpipi" : maketuple_MC_D2Kpipi(options, pvs, rec_summary),
-        "MC_Ds2KKpi" : maketuple_MC_Ds2KKpi(options, pvs, rec_summary)
-        "MC_Ds2KKK" : maketuple_MC_Ds2KKK(options, pvs, rec_summary)
-    }
-
-    if options.simulation:
-        tuples = tuples | MCtuples
-
-    config = make_config(options, tuples)
-
-    return config
diff --git a/Charm_2024validation/main_d_to_ksh.py b/Charm_2024validation/main_d_to_ksh.py
deleted file mode 100644
index 00ddc66093..0000000000
--- a/Charm_2024validation/main_d_to_ksh.py
+++ /dev/null
@@ -1,48 +0,0 @@
-###############################################################################
-# (c) Copyright 2021-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 .options.d_to_ksh import *
-from .options.d_to_ksh_MC import *
-from .options.detection_asymmetry import *
-
-from DaVinci import Options, make_config
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-        #D2KSh
-        "D2KSpi_LL" : maketuple_D2KSpi_LL(options, pvs, rec_summary),
-        "D2KSK_LL" : maketuple_D2KSK_LL(options, pvs, rec_summary),
-        "D2KSpi_LD" : maketuple_D2KSpi_LD(options, pvs, rec_summary),
-        "D2KSK_LD" : maketuple_D2KSK_LD(options, pvs, rec_summary),
-        "D2KSpi_DD" : maketuple_D2KSpi_DD(options, pvs, rec_summary),
-        "D2KSK_DD" : maketuple_D2KSK_DD(options, pvs, rec_summary),
-        #ADet
-        "D2KSK_LL_ADet" : maketuple_D2KSK_LL_ADet(options, pvs, rec_summary),
-        "D2KSpi_LL_ADet" : maketuple_D2KSpi_LL_ADet(options, pvs, rec_summary),
-    }
-
-    MCtuples = {
-        "MC_D2KSK" : maketuple_MC_D2KSK(options, pvs, rec_summary),
-        "MC_D2KSpi" : maketuple_MC_D2KSpi(options, pvs, rec_summary),
-    }
-
-    if options.simulation:
-        tuples = tuples | MCtuples
-        
-    config = make_config(options, tuples)
-
-    return config
diff --git a/Charm_2024validation/main_detection_asymmetry.py b/Charm_2024validation/main_detection_asymmetry.py
deleted file mode 100644
index 1ededecf77..0000000000
--- a/Charm_2024validation/main_detection_asymmetry.py
+++ /dev/null
@@ -1,31 +0,0 @@
-###############################################################################
-# (c) Copyright 2021-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 .options.detection_asymmetry import *
-
-from DaVinci import Options, make_config
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-        
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-        #ADet
-        "Lc2KSp_LL_ADet" : maketuple_Lc2KSp_LL_ADet(options, pvs, rec_summary),
-        "Lc2pKpi_ADet" : maketuple_Lc2pKpi_ADet(options, pvs, rec_summary),
-    }
-        
-    config = make_config(options, tuples)
-
-    return config
diff --git a/Charm_2024validation/main_dst_to_dee.py b/Charm_2024validation/main_dst_to_dee.py
deleted file mode 100644
index 3084abe4e7..0000000000
--- a/Charm_2024validation/main_dst_to_dee.py
+++ /dev/null
@@ -1,42 +0,0 @@
-###############################################################################
-# (c) Copyright 2021-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 .options.dst_to_dee import *
-
-from DaVinci import Options, make_config
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS':             make_Dst0ToD0EmEp_D0ToKmPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS", pvs, rec_summary, 'dst_kpi_os'),
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS':             make_Dst0ToD0EmEp_D0ToKmPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS", pvs, rec_summary, 'dst_kpi_ss'),
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS_MVA':         make_Dst0ToD0EmEp_D0ToKmPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS_MVA", pvs, rec_summary, 'dst_kpi_os'),
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS_MVA':         make_Dst0ToD0EmEp_D0ToKmPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS_MVA", pvs, rec_summary, 'dst_kpi_ss'),
-
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS':       make_Dst0ToD0EmEp_D0ToKmPimPipPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS", pvs, rec_summary,'dst_k3pi_os' ),
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS':       make_Dst0ToD0EmEp_D0ToKmPimPipPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS", pvs, rec_summary, 'dst_k3pi_ss'),
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS_MVA':   make_Dst0ToD0EmEp_D0ToKmPimPipPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS_MVA", pvs, rec_summary, 'dst_k3pi_os'),
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS_MVA':   make_Dst0ToD0EmEp_D0ToKmPimPipPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS_MVA", pvs, rec_summary, 'dst_k3pi_ss'),
-
-    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS':     make_DstpToDpDspEmEp_DpDspToKmKpPip_tuple(options, "Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS", pvs, rec_summary, "dsstp_2kpi_os"),
-    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS':     make_DstpToDpDspEmEp_DpDspToKmKpPip_tuple(options, "Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS", pvs, rec_summary, "dsstp_2kpi_ss"),
-    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS_MVA': make_DstpToDpDspEmEp_DpDspToKmKpPip_tuple(options, "Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS_MVA", pvs, rec_summary, "dsstp_2kpi_os"),
-    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS_MVA': make_DstpToDpDspEmEp_DpDspToKmKpPip_tuple(options, "Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS_MVA", pvs, rec_summary, "dsstp_2kpi_ss"),
-    }
-
-    config = make_config(options, tuples)
-
-    return config
\ No newline at end of file
diff --git a/Charm_2024validation/main_rare_charm.py b/Charm_2024validation/main_rare_charm.py
deleted file mode 100644
index d38574262b..0000000000
--- a/Charm_2024validation/main_rare_charm.py
+++ /dev/null
@@ -1,41 +0,0 @@
-###############################################################################
-# (c) Copyright 2021-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 .options.rare_charm import *
-#from .options.rare_charm_MC import *
-
-from DaVinci import Options, make_config
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-        
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-        "D2pimumu" : maketuple_D2pimumu(options, pvs, rec_summary),
-        "D2pimumu_WS" : maketuple_D2pimumu_WS(options, pvs, rec_summary),
-        "CharmRD_D2pipipi" : maketuple_D2pipipi(options, pvs, rec_summary),
-        "D2piee" : maketuple_D2piee(options, pvs, rec_summary),
-        "Lc2pmumu" : maketuple_Lc2pmumu(options, pvs, rec_summary),
-        "Dst2D0pi_D02Kpimumu_RS" : maketuple_Dst2D0pi_D02Kpimumu_RS(options, pvs, rec_summary),
-    }
-
-    MCtuples = {
-    }
-    
-    if options.simulation:
-        tuples = tuples | MCtuples
-        
-    config = make_config(options, tuples)
-
-    return config
diff --git a/Charm_2024validation/options/d0_to_hh.py b/Charm_2024validation/options/d0_to_hh.py
deleted file mode 100644
index 80a3cdcec2..0000000000
--- a/Charm_2024validation/options/d0_to_hh.py
+++ /dev/null
@@ -1,432 +0,0 @@
-from .tupling import (
-    make_composite_variables,
-    make_basic_variables,
-    make_hlt2_event_variables,
-    make_DeltaM_variable,
-    make_composite_dtf_variables,
-    make_basic_dtf_variables,
-)
-
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunTuple_Particles as Funtuple
-
-
-def make_dtf_variables(options, pvs, input_data, ptype):
-
-    if ptype not in ["basic", "composite"]:
-        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
-
-    from DecayTreeFitter import DecayTreeFitter
-    
-    DTF = DecayTreeFitter(
-        name=f'DTF_{{hash}}',
-        input_particles=input_data)
-
-    DTFvtx = DecayTreeFitter(
-        name=f'DTFvtx_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    DTFmass = DecayTreeFitter(
-        name=f'DTFmass_{{hash}}',
-        input_particles=input_data,
-        mass_constraints=["D0"])
-
-    DTFvtxmass = DecayTreeFitter(
-        name=f'DTFvtxmass_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0"])
-
-    if ptype == "basic":
-        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmass,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="D0")
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmass,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="D0")
-        return dtf_vars
-
-    if ptype == "composite":
-        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmass,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="D0")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmass,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="D0")
-        return dtf_vars
-
-def maketuple_D02KK_LowBias(options, pvs, rec_summary):
-    name = "D02KK_LowBias"
-    turbo_line = "Hlt2Charm_D0ToKmKp_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> K- K+]CC",
-        "Km"   : "[D0 -> ^K- K+]CC",
-        "Kp"  : "[D0 -> K- ^K+]CC",
-    }
-
-    variables = {
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D02KK(options, pvs, rec_summary):
-    name = "D02KK"
-    turbo_line = "Hlt2Charm_D0ToKmKp"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> K- K+]CC",
-        "Km"   : "[D0 -> ^K- K+]CC",
-        "Kp"  : "[D0 -> K- ^K+]CC",
-    }
-
-    variables = {
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D02Kpi_LowBias(options, pvs, rec_summary):
-    name = "D02Kpi_LowBias"
-    turbo_line = "Hlt2Charm_D0ToKmPip_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> K- pi+]CC",
-        "Km"   : "[D0 -> ^K- pi+]CC",
-        "pip"  : "[D0 -> K- ^pi+]CC",
-    }
-
-    variables = {
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D02Kpi(options, pvs, rec_summary):
-    name = "D02Kpi"
-    turbo_line = "Hlt2Charm_D0ToKmPip"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> K- pi+]CC",
-        "Km"   : "[D0 -> ^K- pi+]CC",
-        "pip"  : "[D0 -> K- ^pi+]CC",
-    }
-
-    variables = {
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D02pipi_LowBias(options, pvs, rec_summary):
-    name = "D02pipi_LowBias"
-    turbo_line = "Hlt2Charm_D0ToPimPip_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> pi- pi+]CC",
-        "pim"   : "[D0 -> ^pi- pi+]CC",
-        "pip"  : "[D0 -> pi- ^pi+]CC",
-    }
-
-    variables = {
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D02pipi(options, pvs, rec_summary):
-    name = "D02pipi"
-    turbo_line = "Hlt2Charm_D0ToPimPip"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> pi- pi+]CC",
-        "pim"   : "[D0 -> ^pi- pi+]CC",
-        "pip"  : "[D0 -> pi- ^pi+]CC",
-    }
-
-    variables = {
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02KK_LowBias(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02KK_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmKp_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> ([D0]CC -> K- K+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> K- K+) pi+]CC",
-        "Km"   : "[D*(2010)+ -> ([D0]CC -> ^K- K+) pi+]CC",
-        "Kp"  : "[D*(2010)+ -> ([D0]CC -> K- ^K+) pi+]CC",
-        "spip" : "[D*(2010)+ -> ([D0]CC -> K- K+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02KK(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02KK"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmKp"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> ([D0]CC -> K- K+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> K- K+) pi+]CC",
-        "Km"   : "[D*(2010)+ -> ([D0]CC -> ^K- K+) pi+]CC",
-        "Kp"  : "[D*(2010)+ -> ([D0]CC -> K- ^K+) pi+]CC",
-        "spip" : "[D*(2010)+ -> ([D0]CC -> K- K+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02Kpi_RS_LowBias(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02Kpi_RS_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPip_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> (D0 -> K- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^(D0 -> K- pi+) pi+]CC",
-        "Km"   : "[D*(2010)+ -> (D0 -> ^K- pi+) pi+]CC",
-        "pip"  : "[D*(2010)+ -> (D0 -> K- ^pi+) pi+]CC",
-        "spip" : "[D*(2010)+ -> (D0 -> K- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02Kpi_RS(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02Kpi_RS"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPip"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> (D0 -> K- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^(D0 -> K- pi+) pi+]CC",
-        "Km"   : "[D*(2010)+ -> (D0 -> ^K- pi+) pi+]CC",
-        "pip"  : "[D*(2010)+ -> (D0 -> K- ^pi+) pi+]CC",
-        "spip" : "[D*(2010)+ -> (D0 -> K- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02Kpi_WS_LowBias(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02Kpi_WS_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKpPim_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> (D0 -> K+ pi-) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^(D0 -> K+ pi-) pi+]CC",
-        "Kp"   : "[D*(2010)+ -> (D0 -> ^K+ pi-) pi+]CC",
-        "pim"  : "[D*(2010)+ -> (D0 -> K+ ^pi-) pi+]CC",
-        "spip" : "[D*(2010)+ -> (D0 -> K+ pi-) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Kp"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pim"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02Kpi_WS(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02Kpi_WS"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKpPim"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> (D0 -> K+ pi-) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^(D0 -> K+ pi-) pi+]CC",
-        "Kp"   : "[D*(2010)+ -> (D0 -> ^K+ pi-) pi+]CC",
-        "pim"  : "[D*(2010)+ -> (D0 -> K+ ^pi-) pi+]CC",
-        "spip" : "[D*(2010)+ -> (D0 -> K+ pi-) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Kp"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pim"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02pipi_LowBias(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02pipi_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimPip_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> ([D0]CC -> pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> pi- pi+) pi+]CC",
-        "pim"   : "[D*(2010)+ -> ([D0]CC -> ^pi- pi+) pi+]CC",
-        "pip"  : "[D*(2010)+ -> ([D0]CC -> pi- ^pi+) pi+]CC",
-        "spip" : "[D*(2010)+ -> ([D0]CC -> pi- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02pipi(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02pipi"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimPip"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> ([D0]CC -> pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> pi- pi+) pi+]CC",
-        "pim"   : "[D*(2010)+ -> ([D0]CC -> ^pi- pi+) pi+]CC",
-        "pip"  : "[D*(2010)+ -> ([D0]CC -> pi- ^pi+) pi+]CC",
-        "spip" : "[D*(2010)+ -> ([D0]CC -> pi- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
diff --git a/Charm_2024validation/options/d0_to_hh_MC.py b/Charm_2024validation/options/d0_to_hh_MC.py
deleted file mode 100644
index aaae05665d..0000000000
--- a/Charm_2024validation/options/d0_to_hh_MC.py
+++ /dev/null
@@ -1,99 +0,0 @@
-from .tupling import (
-    make_MC_composite_variables,
-    make_MC_basic_variables,
-    make_MC_event_variables,
-)
-
-from PyConf.reading import get_mc_particles, get_mc_header
-from FunTuple import FunTuple_MCParticles as FuntupleMC
-
-def maketuple_MC_Dst2D0pi_D02Kpi_RS(options, pvs, rec_summary):
-    name = "MC_Dst2D0pi_D02Kpi_RS"
-    line = "/Event/MC/Particles"
-
-    input_data = get_mc_particles(f"{line}")
-
-    branches = {
-        "Dst" : "[D*(2010)+ ==> (D0 ==> K- pi+ ) pi+]CC",
-        "D0"  : "[D*(2010)+ ==> ^(D0 ==> K- pi+ ) pi+]CC",
-        "Km"   : "[D*(2010)+ ==> (D0 ==> ^K- pi+ ) pi+]CC",
-        "pip"  : "[D*(2010)+ ==> (D0 ==> K- ^pi+ ) pi+]CC",
-        "spip" : "[D*(2010)+ ==> (D0 ==> K- pi+ ) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_MC_composite_variables(),
-        "D0"    : make_MC_composite_variables(),
-        "Km"     : make_MC_basic_variables(),
-        "pip"    : make_MC_basic_variables(),
-        "spip"   : make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                          tuple_name="MCDecayTree",
-                          fields=branches, variables = variables,
-                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
-                          inputs=input_data)
-
-    return [mytuple]
-
-def maketuple_MC_Dst2D0pi_D02KK(options, pvs, rec_summary):
-    name = "MC_Dst2D0pi_D02KK"
-    line = "/Event/MC/Particles"
-
-    input_data = get_mc_particles(f"{line}")
-
-    branches = {
-        "Dst" : "[D*(2010)+ ==> ([D0]CC ==> K- K+) pi+]CC",
-        "D0"  : "[D*(2010)+ ==> ^([D0]CC ==> K- K+) pi+]CC",
-        "Km"   : "[D*(2010)+ ==> ([D0]CC ==> ^K- K+) pi+]CC",
-        "Kp"  : "[D*(2010)+ ==> ([D0]CC ==> K- ^K+) pi+]CC",
-        "spip" : "[D*(2010)+ ==> ([D0]CC ==> K- K+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_MC_composite_variables(),
-        "D0"    : make_MC_composite_variables(),
-        "Km"     : make_MC_basic_variables(),
-        "Kp"    : make_MC_basic_variables(),
-        "spip"   : make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                        tuple_name="MCDecayTree",
-                        fields=branches, variables = variables,
-                        event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
-                        inputs=input_data)
-
-    return [mytuple]
-
-
-def maketuple_MC_Dst2D0pi_D02pipi(options, pvs, rec_summary):
-    name = "MC_Dst2D0pi_D02pipi"
-    line = "/Event/MC/Particles"
-
-    input_data = get_mc_particles(f"{line}")
-
-    branches = {
-        "Dst" : "[D*(2010)+ ==> ([D0]CC ==> pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ ==> ^([D0]CC ==> pi- pi+) pi+]CC",
-        "pim"   : "[D*(2010)+ ==> ([D0]CC ==> ^pi- pi+) pi+]CC",
-        "pip"  : "[D*(2010)+ ==> ([D0]CC ==> pi- ^pi+) pi+]CC",
-        "spip" : "[D*(2010)+ ==> ([D0]CC ==> pi- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_MC_composite_variables(),
-        "D0"    : make_MC_composite_variables(),
-        "pim"     : make_MC_basic_variables(),
-        "pip"    : make_MC_basic_variables(),
-        "spip"   : make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                        tuple_name="MCDecayTree",
-                        fields=branches, variables = variables,
-                        event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
-                        inputs=input_data)
-
-    return [mytuple]
diff --git a/Charm_2024validation/options/d0_to_hhhh.py b/Charm_2024validation/options/d0_to_hhhh.py
deleted file mode 100644
index 0277430fb9..0000000000
--- a/Charm_2024validation/options/d0_to_hhhh.py
+++ /dev/null
@@ -1,247 +0,0 @@
-from .tupling import (
-    make_composite_variables,
-    make_composite_variables_4body,
-    make_composite_variables_3body,
-    make_basic_variables,
-    make_hlt2_event_variables,
-    make_DeltaM_variable,
-    make_basic_dtf_variables,
-    make_composite_dtf_variables
-)
-
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunTuple_Particles as Funtuple
-from DecayTreeFitter import DecayTreeFitter
-
-# I can't get make_composite_variables_4body to work for some reason...
-import Functors as F
-from FunTuple import FunctorCollection
-variables_4body = (
-    FunctorCollection(
-        {
-            #14
-            "M14": F.SUBCOMB(Functor=F.MASS, Indices=(1, 4)),
-            "SDOCA14"     : F.SDOCA(Child1=1,Child2=4),
-            "SDOCACHI214" : F.SDOCACHI2(Child1=1,Child2=4),
-            "DOCA14"      : F.DOCA(Child1=1,Child2=4),
-            "DOCACHI214"  : F.DOCACHI2(Child1=1,Child2=4),
-            "COS14": F.ALV(1, 4),
-            #24
-            "M24": F.SUBCOMB(Functor=F.MASS, Indices=(2, 4)),
-            "SDOCA24"     : F.SDOCA(Child1=2,Child2=4),
-            "SDOCACHI224" : F.SDOCACHI2(Child1=2,Child2=4),
-            "DOCA24"      : F.DOCA(Child1=2,Child2=4),
-            "DOCACHI224"  : F.DOCACHI2(Child1=2,Child2=4),
-            "COS24": F.ALV(2, 4),
-            #34
-            "M34": F.SUBCOMB(Functor=F.MASS, Indices=(3, 4)),
-            "SDOCA34"     : F.SDOCA(Child1=3,Child2=4),
-            "SDOCACHI234" : F.SDOCACHI2(Child1=3,Child2=4),
-            "DOCA34"      : F.DOCA(Child1=3,Child2=4),
-            "DOCACHI234"  : F.DOCACHI2(Child1=3,Child2=4),
-            "COS34": F.ALV(3, 4),
-        }
-    )
-)
-
-
-def maketuple_DstToD0pi_D0ToKKPiPi(options, pvs, rec_summary):
-    name = "DstToD0pi_D0ToKKPiPi"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmKpPimPip"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> ([D0]CC -> K+ K- pi+ pi-) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> K+ K- pi+ pi-) pi+]CC",
-        "h1"  : "[D*(2010)+ -> ([D0]CC -> ^K+ K- pi+ pi-) pi+]CC",
-        "h2"  : "[D*(2010)+ -> ([D0]CC -> K+ ^K- pi+ pi-) pi+]CC",
-        "h3"  : "[D*(2010)+ -> ([D0]CC -> K+ K- ^pi+ pi-) pi+]CC",
-        "h4"  : "[D*(2010)+ -> ([D0]CC -> K+ K- pi+ ^pi-) pi+]CC",
-        "pis" : "[D*(2010)+ -> ([D0]CC -> K+ K- pi+ pi-) ^pi+]CC",
-    }
-
-    DTF_PV = DecayTreeFitter(
-        name='DTF_D0ToKKPiPi_PV',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    basic_variables = make_basic_variables(options, pvs, input_data) +\
-        make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)
-
-    composite_dtf_variables = make_composite_dtf_variables(options,
-                                                           pvs,
-                                                           input_data,
-                                                           DTF=DTF_PV,
-                                                           pv_constraint=True)
-
-    composite_variables = make_composite_variables(options, pvs, input_data) + composite_dtf_variables
-        
-
-    composite_variables_4body = make_composite_variables_3body(options, pvs, input_data) + composite_dtf_variables + variables_4body
-
-    variables = {
-        "Dst"   : composite_variables+make_DeltaM_variable(options),
-        "D0"    : composite_variables_4body,
-        "h1"    : basic_variables,
-        "h2"    : basic_variables,
-        "h3"    : basic_variables,
-        "h4"    : basic_variables,
-        "pis"   : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstToD0pi_D0ToKPiPiPi(options, pvs, rec_summary):
-    name = "DstToD0pi_D0ToKPiPiPi"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPimPipPip"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> (D0 -> K- pi+ pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^(D0 -> K- pi+ pi- pi+) pi+]CC",
-        "h1"   : "[D*(2010)+ -> (D0 -> ^K- pi+ pi- pi+) pi+]CC",
-        "h2"  : "[D*(2010)+ -> (D0 -> K- ^pi+ pi- pi+) pi+]CC",
-        "h3"   : "[D*(2010)+ -> (D0 -> K- pi+ ^pi- pi+) pi+]CC",
-        "h4"  : "[D*(2010)+ -> (D0 -> K- pi+ pi- ^pi+) pi+]CC",
-        "pis" : "[D*(2010)+ -> (D0 -> K- pi+ pi- pi+) ^pi+]CC",
-    }
-
-    DTF_PV = DecayTreeFitter(
-        name='DTF_D0ToKPiPiPi_PV',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    basic_variables = make_basic_variables(options, pvs, input_data) +\
-        make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True, mass_constraint=False)
-
-    composite_dtf_variables = make_composite_dtf_variables(options,
-                                                           pvs,
-                                                           input_data,
-                                                           DTF=DTF_PV,
-                                                           pv_constraint=True)
-
-    composite_variables = make_composite_variables(options, pvs, input_data) + composite_dtf_variables
-        
-
-    composite_variables_4body = make_composite_variables_3body(options, pvs, input_data) + composite_dtf_variables + variables_4body
-
-    variables = {
-        "Dst"   : composite_variables+make_DeltaM_variable(options),
-        "D0"    : composite_variables_4body,
-        "h1"    : basic_variables,
-        "h2"    : basic_variables,
-        "h3"    : basic_variables,
-        "h4"    : basic_variables,
-        "pis"   : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstToD0pi_D0ToPiKPiPi(options, pvs, rec_summary):
-    name = "DstToD0pi_D0ToPiKPiPi"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKpPimPimPip"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> (D0 -> pi- K+ pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^(D0 -> pi- K+ pi- pi+) pi+]CC",
-        "h1"   : "[D*(2010)+ -> (D0 -> ^pi- K+ pi- pi+) pi+]CC",
-        "h2"  : "[D*(2010)+ -> (D0 -> pi- ^K+ pi- pi+) pi+]CC",
-        "h3"   : "[D*(2010)+ -> (D0 -> pi- K+ ^pi- pi+) pi+]CC",
-        "h4"  : "[D*(2010)+ -> (D0 -> pi- K+ pi- ^pi+) pi+]CC",
-        "pis" : "[D*(2010)+ -> (D0 -> pi- K+ pi- pi+) ^pi+]CC",
-    }
-
-    DTF_PV = DecayTreeFitter(
-        name='DTF_D0ToPiKPiPi_PV',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    basic_variables = make_basic_variables(options, pvs, input_data) +\
-        make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True, mass_constraint=False)
-
-    composite_dtf_variables = make_composite_dtf_variables(options,
-                                                           pvs,
-                                                           input_data,
-                                                           DTF=DTF_PV,
-                                                           pv_constraint=True)
-
-    composite_variables = make_composite_variables(options, pvs, input_data) + composite_dtf_variables
-        
-
-    composite_variables_4body = make_composite_variables_3body(options, pvs, input_data) + composite_dtf_variables + variables_4body
-
-    variables = {
-        "Dst"   : composite_variables+make_DeltaM_variable(options),
-        "D0"    : composite_variables_4body,
-        "h1"    : basic_variables,
-        "h2"    : basic_variables,
-        "h3"    : basic_variables,
-        "h4"    : basic_variables,
-        "pis"   : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstToD0pi_D0ToPiPiPiPi(options, pvs, rec_summary):
-    name = "DstToD0pi_D0ToPiPiPiPi"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimPimPipPip"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> ([D0]CC -> pi+ pi- pi+ pi-) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> pi+ pi- pi+ pi-) pi+]CC",
-        "h1"  : "[D*(2010)+ -> ([D0]CC -> ^pi+ pi- pi+ pi-) pi+]CC",
-        "h2"  : "[D*(2010)+ -> ([D0]CC -> pi+ ^pi- pi+ pi-) pi+]CC",
-        "h3"  : "[D*(2010)+ -> ([D0]CC -> pi+ pi- ^pi+ pi-) pi+]CC",
-        "h4"  : "[D*(2010)+ -> ([D0]CC -> pi+ pi- pi+ ^pi-) pi+]CC",
-        "pis" : "[D*(2010)+ -> ([D0]CC -> pi+ pi- pi+ pi-) ^pi+]CC",
-    }
-
-    DTF_PV = DecayTreeFitter(
-        name='DTF_D0ToPiPiPiPi_PV',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    basic_variables = make_basic_variables(options, pvs, input_data) +\
-        make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True, mass_constraint=False)
-
-    composite_dtf_variables = make_composite_dtf_variables(options,
-                                                           pvs,
-                                                           input_data,
-                                                           DTF=DTF_PV,
-                                                           pv_constraint=True)
-
-    composite_variables = make_composite_variables(options, pvs, input_data) + composite_dtf_variables
-        
-
-    composite_variables_4body = make_composite_variables_3body(options, pvs, input_data) + composite_dtf_variables + variables_4body
-
-    variables = {
-        "Dst"   : composite_variables+make_DeltaM_variable(options),
-        "D0"    : composite_variables_4body,
-        "h1"    : basic_variables,
-        "h2"    : basic_variables,
-        "h3"    : basic_variables,
-        "h4"    : basic_variables,
-        "pis"   : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
diff --git a/Charm_2024validation/options/d0_to_hhhh_MC.py b/Charm_2024validation/options/d0_to_hhhh_MC.py
deleted file mode 100644
index 2dbe198fa9..0000000000
--- a/Charm_2024validation/options/d0_to_hhhh_MC.py
+++ /dev/null
@@ -1,43 +0,0 @@
-from .tupling import (
-    make_MC_composite_variables,
-    make_MC_basic_variables,
-    make_MC_event_variables,
-)
-
-from PyConf.reading import get_mc_particles, get_mc_header
-from FunTuple import FunTuple_MCParticles as FuntupleMC
-
-def maketuple_MC_DstToD0pi_D0ToKPiPiPi(options, pvs, rec_summary):
-    name = "MC_DstToD0pi_D0ToKPiPiPi"
-
-    line = "/Event/MC/Particles"
-    
-    input_data = get_mc_particles(f"{line}")
-
-    branches = {
-        "Dst" : "[D*(2010)+ ==> (D0 ==> K- pi+ pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ ==> ^(D0 ==> K- pi+ pi- pi+) pi+]CC",
-        "h1"   : "[D*(2010)+ ==> (D0 ==> ^K- pi+ pi- pi+) pi+]CC",
-        "h2"  : "[D*(2010)+ ==> (D0 ==> K- ^pi+ pi- pi+) pi+]CC",
-        "h3"   : "[D*(2010)+ ==> (D0 ==> K- pi+ ^pi- pi+) pi+]CC",
-        "h4"  : "[D*(2010)+ ==> (D0 ==> K- pi+ pi- ^pi+) pi+]CC",
-        "pis" : "[D*(2010)+ ==> (D0 ==> K- pi+ pi- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_MC_composite_variables(),
-        "D0"    : make_MC_composite_variables(),
-        "h1"     : make_MC_basic_variables(),
-        "h2"    : make_MC_basic_variables(),
-        "h3"    : make_MC_basic_variables(),
-        "h4"    : make_MC_basic_variables(),
-        "pis"   : make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                          tuple_name="MCDecayTree",
-                          fields=branches, variables = variables,  
-                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])), 
-                          inputs=input_data)
-
-    return [mytuple]
diff --git a/Charm_2024validation/options/d0_to_hhpi0.py b/Charm_2024validation/options/d0_to_hhpi0.py
deleted file mode 100644
index cf3c3ba59f..0000000000
--- a/Charm_2024validation/options/d0_to_hhpi0.py
+++ /dev/null
@@ -1,359 +0,0 @@
-from .tupling import (
-    make_composite_variables,
-    make_DeltaM_variable,
-    make_basic_variables,
-    make_hlt2_event_variables,
-    make_top_isolation_variables,
-    make_basic_isolation_variables,
-    make_intermediate_isolation_variables,
-    make_composite_dtf_variables,
-    make_basic_dtf_variables,
-)
-
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunTuple_Particles as Funtuple
-
-iso_vars_locations = ["LongTrackIso", "NeutralIso", "PizIso"]
-
-def make_dtf_variables(options, pvs, input_data, ptype):
-
-    if ptype not in ["basic", "composite"]:
-        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
-
-    from DecayTreeFitter import DecayTreeFitter
-    
-    DTF = DecayTreeFitter(
-        name=f'DTF_{{hash}}',
-        input_particles=input_data)
-
-    DTFvtx = DecayTreeFitter(
-        name=f'DTFvtx_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    DTFmass = DecayTreeFitter(
-        name=f'DTFmass_{{hash}}',
-        input_particles=input_data,
-        mass_constraints=["D0"])
-
-    DTFvtxmass = DecayTreeFitter(
-        name=f'DTFvtxmass_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0"])
-
-    if ptype == "basic":
-        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmass,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="D0")
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmass,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="D0")
-        return dtf_vars
-
-    if ptype == "composite":
-        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmass,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="D0")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmass,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="D0")
-        return dtf_vars
-
-
-def maketuple_Dst2D0pi_D02KKpi0_M(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02KKpi0_M"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmKpPi0_M"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) pi0) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (phi(1020) -> K- K+) pi0) pi+]CC",
-        "phi"   : "[D*(2010)+ -> ([D0]CC -> ^(phi(1020) -> K- K+) pi0) pi+]CC",
-        "Km"   : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> ^K- K+) pi0) pi+]CC",
-        "Kp"  : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- ^K+) pi0) pi+]CC",
-        "pi0"  : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) ^pi0) pi+]CC",
-        "spip" : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) pi0) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "phi"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation:
-
-        variables = {
-            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="D0"),
-            "phi"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="phi(1020)"),
-            "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02KKpi0_R(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02KKpi0_R"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmKpPi0_R"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) (pi0 -> gamma gamma) ) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (phi(1020) -> K- K+) (pi0 -> gamma gamma) ) pi+]CC",
-        "phi"   : "[D*(2010)+ -> ([D0]CC -> ^(phi(1020) -> K- K+) (pi0 -> gamma gamma) ) pi+]CC",
-        "Km"   : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> ^K- K+) (pi0 -> gamma gamma) ) pi+]CC",
-        "Kp"  : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- ^K+) (pi0 -> gamma gamma) ) pi+]CC",
-        "pi0"  : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) ^(pi0 -> gamma gamma) ) pi+]CC",
-        "gamma1"  : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) (pi0 -> ^gamma gamma) ) pi+]CC",
-        "gamma2"  : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) (pi0 -> gamma ^gamma) ) pi+]CC",
-        "spip" : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) (pi0 -> gamma gamma) ) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "phi"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "gamma1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "gamma2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation:
-
-        variables = {
-            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="D0"),
-            "phi"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="phi(1020)"),
-            "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="pi0"),
-            "gamma1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "gamma2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02Kpipi0_M(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02Kpipi0_M"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPipPi0_M"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) pi0) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^(D0 -> (K*(892)~0 -> K- pi+) pi0) pi+]CC",
-        "Kst"   : "[D*(2010)+ -> (D0 -> ^(K*(892)~0 -> K- pi+) pi0) pi+]CC",
-        "Km"   : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> ^K- pi+) pi0) pi+]CC",
-        "pip"  : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- ^pi+) pi0) pi+]CC",
-        "pi0"  : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) ^pi0) pi+]CC",
-        "spip" : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) pi0) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Kst"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation:
-
-        variables = {
-            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="D0"),
-            "Kst"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="K*(892)~0"),
-            "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02Kpipi0_R(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02Kpipi0_R"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPipPi0_R"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) (pi0 -> gamma gamma) ) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^(D0 -> (K*(892)~0 -> K- pi+) (pi0 -> gamma gamma) ) pi+]CC",
-        "Kst"   : "[D*(2010)+ -> (D0 -> ^(K*(892)~0 -> K- pi+) (pi0 -> gamma gamma) ) pi+]CC",
-        "Km"   : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> ^K- pi+) (pi0 -> gamma gamma) ) pi+]CC",
-        "pip"  : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- ^pi+) (pi0 -> gamma gamma) ) pi+]CC",
-        "pi0"  : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) ^(pi0 -> gamma gamma) ) pi+]CC",
-        "gamma1"  : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) (pi0 -> ^gamma gamma) ) pi+]CC",
-        "gamma2"  : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) (pi0 -> gamma ^gamma) ) pi+]CC",
-        "spip" : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) (pi0 -> gamma gamma) ) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Kst"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "gamma1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "gamma2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation:
-
-        variables = {
-            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="D0"),
-            "Kst"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="K*(892)~0"),
-            "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="pi0"),
-            "gamma1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "gamma2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02pipipi0_M(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02pipipi0_M"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimPipPi0_M"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) pi0) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (rho(770)0 -> pi- pi+) pi0) pi+]CC",
-        "rho"   : "[D*(2010)+ -> ([D0]CC -> ^(rho(770)0 -> pi- pi+) pi0) pi+]CC",
-        "pim"   : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> ^pi- pi+) pi0) pi+]CC",
-        "pip"  : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- ^pi+) pi0) pi+]CC",
-        "pi0"  : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) ^pi0) pi+]CC",
-        "spip" : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) pi0) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "rho"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation:
-
-        variables = {
-            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="D0"),
-            "rho"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="rho(770)0"),
-            "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02pipipi0_R(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02pipipi0_R"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimPipPi0_R"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) (pi0 -> gamma gamma) ) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (rho(770)0 -> pi- pi+) (pi0 -> gamma gamma) ) pi+]CC",
-        "rho"   : "[D*(2010)+ -> ([D0]CC -> ^(rho(770)0 -> pi- pi+) (pi0 -> gamma gamma) ) pi+]CC",
-        "pim"   : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> ^pi- pi+) (pi0 -> gamma gamma) ) pi+]CC",
-        "pip"  : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- ^pi+) (pi0 -> gamma gamma) ) pi+]CC",
-        "pi0"  : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) ^(pi0 -> gamma gamma) ) pi+]CC",
-        "gamma1"  : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) (pi0 -> ^gamma gamma) ) pi+]CC",
-        "gamma2"  : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) (pi0 -> gamma ^gamma) ) pi+]CC",
-        "spip" : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) (pi0 -> gamma gamma) ) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "rho"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "gamma1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "gamma2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation:
-
-        variables = {
-            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="D0"),
-            "rho"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="rho(770)0"),
-            "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="pi0"),
-            "gamma1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "gamma2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
diff --git a/Charm_2024validation/options/d0_to_hhpi0_MC.py b/Charm_2024validation/options/d0_to_hhpi0_MC.py
deleted file mode 100644
index 84648f4e71..0000000000
--- a/Charm_2024validation/options/d0_to_hhpi0_MC.py
+++ /dev/null
@@ -1,44 +0,0 @@
-from .tupling import (
-    make_MC_composite_variables,
-    make_MC_basic_variables,
-    make_MC_event_variables,
-)
-
-from PyConf.reading import get_mc_particles, get_mc_header
-from FunTuple import FunTuple_MCParticles as FuntupleMC
-
-def maketuple_MC_Dst2D0pi_D02Kpipi0(options, pvs, rec_summary):
-    name = "MC_Dst2D0pi_D02Kpipi0"
-    line = "/Event/MC/Particles"
-    
-    input_data = get_mc_particles(f"{line}")
-
-    branches = {
-        "Dst" : "[D*(2010)+ ==> (D0 ==> K- pi+ (pi0 ==> gamma gamma) ) pi+]CC",
-        "D0"  : "[D*(2010)+ ==> ^(D0 ==> K- pi+ (pi0 ==> gamma gamma) ) pi+]CC",
-        "Km"   : "[D*(2010)+ ==> (D0 ==> ^K- pi+ (pi0 ==> gamma gamma) ) pi+]CC",
-        "pip"  : "[D*(2010)+ ==> (D0 ==> K- ^pi+ (pi0 ==> gamma gamma) ) pi+]CC",
-        "pi0"  : "[D*(2010)+ ==> (D0 ==> K- pi+ ^(pi0 ==> gamma gamma) ) pi+]CC",
-        "gamma1"  : "[D*(2010)+ ==> (D0 ==> K- pi+ (pi0 ==> ^gamma gamma) ) pi+]CC",
-        "gamma2"  : "[D*(2010)+ ==> (D0 ==> K- pi+ (pi0 ==> gamma ^gamma) ) pi+]CC",
-        "spip" : "[D*(2010)+ ==> (D0 ==> K- pi+ (pi0 ==> gamma gamma) ) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_MC_composite_variables(),
-        "D0"    : make_MC_composite_variables(),
-        "Km"     : make_MC_basic_variables(),
-        "pip"    : make_MC_basic_variables(),
-        "pi0"    : make_MC_basic_variables(),
-        "gamma1"    : make_MC_basic_variables(),
-        "gamma2"    : make_MC_basic_variables(),
-        "spip"   : make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                          tuple_name="MCDecayTree",
-                          fields=branches, variables = variables,  
-                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])), 
-                          inputs=input_data)
-
-    return [mytuple]
diff --git a/Charm_2024validation/options/d0_to_kshh.py b/Charm_2024validation/options/d0_to_kshh.py
deleted file mode 100644
index dad027529f..0000000000
--- a/Charm_2024validation/options/d0_to_kshh.py
+++ /dev/null
@@ -1,1585 +0,0 @@
-from .tupling import (
-    make_composite_variables,
-    make_composite_variables_3body,
-    make_basic_variables,
-    make_hlt2_event_variables,
-    make_DeltaM_variable,
-    make_basic_dtf_variables,
-    make_composite_dtf_variables,
-    make_composite_dtf_variables_3body,
-)
-
-import Functors as F
-from Functors.math import log
-from DaVinci import Options, make_config
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunctorCollection
-from PyConf.reading import get_particles
-import FunTuple.functorcollections as FC
-from FunTuple import FunTuple_Particles as Funtuple
-from DecayTreeFitter import DecayTreeFitter
-
-# define helper functors
-get_SV =  F.ENDVERTEX @ F.FORWARDARG0
-get_SV_pos = F.TOLINALG @ F.POSITION @ get_SV
-# only if composite (i.e. has vertex)

-get_child_1 = F.CHILD(1, F.FORWARDARG0) # change here the index of the child.
-get_child_endvtx_pos_1 = F.ENDVERTEX_POS  @ get_child_1
-get_fdvec_child_1 = get_child_endvtx_pos_1 - get_SV_pos
-
-# define observables
-IP_wrt_SV_KS0 = F.IP.bind(get_SV_pos , get_child_1)
-IPCHI2_wrt_SV_KS0 = F.IPCHI2.bind(get_SV , get_child_1)
-# only if child is composite (i.e. has vertex)
-FD_wrt_SV_KS0 = F.MAGNITUDE @ get_fdvec_child_1
-FDCHI2_wrt_SV_KS0 = F.VTX_FDCHI2.bind(get_SV, get_child_1)
-# Note: Apply the functors to the head of the node of decay tree e.g. B
-# Functor collection for SV related info
-topo_sv_var = FunctorCollection(
-    {
-        "ORIVXIP_CHILD1": IP_wrt_SV_KS0,
-        "ORIVXIPCHI2_CHILD1": IPCHI2_wrt_SV_KS0,
-        "ORIVXFD_CHILD1": FD_wrt_SV_KS0,
-        "ORIVXFDCHI2_CHILD1": FDCHI2_wrt_SV_KS0,
-    }
-)
-
-"""
- D0->KSππ LL, DD x LowBias x Dstar
- D0->KSK-Ï€+ LL, DD x LowBias x Dstar
- D0->KSK+Ï€- LL, DD x LowBias x Dstar
- D0->KSKK LL, DD x LowBias x Dstar
- nb: https://gitlab.cern.ch/lhcb/Moore/-/blob/master/Hlt/Hlt2Conf/python/Hlt2Conf/lines/charm/d0_to_kshh.py?ref_type=heads
-
- """
-
-# D0->KSππ
-def maketuple_DstpToD0Pip_D0ToKsPimPip_LL_LowBias(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsPimPip_LL_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_LL_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) pi- pi+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^pi- pi+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- ^pi+) pi+]CC",
-        "pis" :   "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D02KSPiPi_LL_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D02KSPiPi_LL_lowbias_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0") + topo_sv_var,
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsPimPip_DD_LowBias(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsPimPip_DD_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_DD_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) pi- pi+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^pi- pi+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- ^pi+) pi+]CC",
-        "pis" :   "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D02KSPiPi_DD_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D02KSPiPi_DD_lowbias_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0") + topo_sv_var,
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsPimPip_LL(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsPimPip_LL"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_LL"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) pi- pi+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^pi- pi+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- ^pi+) pi+]CC",
-        "pis" :   "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D02KSPiPi_LL_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D02KSPiPi_LL_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF= DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF= DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF= DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF= DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF= DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF= DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0") + topo_sv_var,
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsPimPip_DD(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsPimPip_DD"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_DD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) pi- pi+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^pi- pi+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- ^pi+) pi+]CC",
-        "pis" :   "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D02KSPiPi_DD_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D02KSPiPi_DD_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0") + topo_sv_var,
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsPimPip_LL_LowBias(options, pvs, rec_summary):
-    name = "D0ToKsPimPip_LL_LowBias"
-    turbo_line = "Hlt2Charm_D0ToKsPimPip_LL_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) pi- pi+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) pi- pi+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) pi- pi+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) pi- pi+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^pi- pi+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) pi- ^pi+]CC",
-    }
-
-    DTF_D0ToKsPimPip_LL_LB_MASS = DecayTreeFitter(
-        name='DTF_D02KSPiPi_LL_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsPimPip_DD_LowBias(options, pvs, rec_summary):
-    name = "D0ToKsPimPip_DD_LowBias"
-    turbo_line = "Hlt2Charm_D0ToKsPimPip_DD_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) pi- pi+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) pi- pi+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) pi- pi+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) pi- pi+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^pi- pi+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) pi- ^pi+]CC",
-    }
-
-    DTF_D0ToKsPimPip_DD_LB_MASS = DecayTreeFitter(
-        name='DTF_D02KSPiPi_DD_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsPimPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsPimPip_LL(options, pvs, rec_summary):
-    name = "D0ToKsPimPip_LL"
-    turbo_line = "Hlt2Charm_D0ToKsPimPip_LL"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) pi- pi+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) pi- pi+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) pi- pi+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) pi- pi+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^pi- pi+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) pi- ^pi+]CC",
-    }
-
-    DTF_D0ToKsPimPip_LL_MASS = DecayTreeFitter(
-        name='DTF_D02KSPiPi_LL_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsPimPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsPimPip_DD(options, pvs, rec_summary):
-    name = "D0ToKsPimPip_DD"
-    turbo_line = "Hlt2Charm_D0ToKsPimPip_DD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) pi- pi+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) pi- pi+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) pi- pi+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) pi- pi+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^pi- pi+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) pi- ^pi+]CC",
-    }
-
-    DTF_D0ToKsPimPip_DD_MASS = DecayTreeFitter(
-        name='DTF_D02KSPiPi_DD_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsPimPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-# D0->KSK-Ï€+
-def maketuple_DstpToD0Pip_D0ToKsKmPip_LL_LowBias(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKmPip_LL_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_LL_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- pi+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- pi+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- pi+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^pi+) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKmPip_LL_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKmPip_LL_lowbias_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsKmPip_DD_LowBias(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKmPip_DD_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_DD_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- pi+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- pi+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- pi+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^pi+) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKmPip_DD_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKmPip_DD_lowbias_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsKmPip_LL(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKmPip_LL"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_LL"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- pi+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- pi+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- pi+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^pi+) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKmPip_LL_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKmPip_LL_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsKmPip_DD(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKmPip_DD"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_DD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- pi+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- pi+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- pi+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^pi+) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKmPip_DD_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKmPip_DD_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKmPip_LL_LowBias(options, pvs, rec_summary):
-    name = "D0ToKsKmPip_LL_LowBias"
-    turbo_line = "Hlt2Charm_D0ToKsKmPip_LL_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- pi+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- pi+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- pi+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- pi+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- pi+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^pi+]CC",
-    }
-
-    DTF_D0ToKsKmPip_LL_LB_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKmPip_LL_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKmPip_DD_LowBias(options, pvs, rec_summary):
-    name = "D0ToKsKmPip_DD_LowBias"
-    turbo_line = "Hlt2Charm_D0ToKsKmPip_DD_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- pi+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- pi+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- pi+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- pi+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- pi+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^pi+]CC",
-    }
-
-    DTF_D0ToKsKmPip_DD_LB_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKmPip_DD_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKmPip_LL(options, pvs, rec_summary):
-    name = "D0ToKsKmPip_LL"
-    turbo_line = "Hlt2Charm_D0ToKsKmPip_LL"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- pi+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- pi+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- pi+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- pi+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- pi+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^pi+]CC",
-    }
-
-    DTF_D0ToKsKmPip_LL_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKmPip_LL_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKmPip_DD(options, pvs, rec_summary):
-    name = "D0ToKsKmPip_DD"
-    turbo_line = "Hlt2Charm_D0ToKsKmPip_DD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- pi+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- pi+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- pi+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- pi+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- pi+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^pi+]CC",
-    }
-
-    DTF_D0ToKsKmPip_DD_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKmPip_DD_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-# D0->KSK+Ï€-
-def maketuple_DstpToD0Pip_D0ToKsKpPim_LL_LowBias(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKpPim_LL_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_LL_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K+ pi-) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K+ pi-) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ ^pi-) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K+ pi-) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKpPim_LL_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKpPim_LL_lowbias_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsKpPim_DD_LowBias(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKpPim_DD_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_DD_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K+ pi-) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K+ pi-) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ ^pi-) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K+ pi-) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKpPim_DD_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKpPim_DD_lowbias_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsKpPim_LL(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKpPim_LL"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_LL"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K+ pi-) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K+ pi-) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ ^pi-) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K+ pi-) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKpPim_LL_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKpPim_LL_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsKpPim_DD(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKpPim_DD"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_DD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K+ pi-) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K+ pi-) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ ^pi-) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K+ pi-) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKpPim_DD_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKpPim_DD_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKpPim_LL_LowBias(options, pvs, rec_summary):
-    name = "D0ToKsKpPim_LL_LowBias"
-    turbo_line = "Hlt2Charm_D0ToKsKpPim_LL_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K+ pi-]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K+ pi-]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K+ pi-]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K+ pi-]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) K+ ^pi-]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) ^K+ pi-]CC",
-    }
-
-    DTF_D0ToKsKpPim_LL_LB_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKpPim_LL_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKpPim_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKpPim_DD_LowBias(options, pvs, rec_summary):
-    name = "D0ToKsKpPim_DD_LowBias"
-    turbo_line = "Hlt2Charm_D0ToKsKpPim_DD_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K+ pi-]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K+ pi-]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K+ pi-]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K+ pi-]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) K+ ^pi-]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) ^K+ pi-]CC",
-    }
-
-    DTF_D0ToKsKpPim_DD_LB_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKpPim_DD_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKpPim_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKpPim_LL(options, pvs, rec_summary):
-    name = "D0ToKsKpPim_LL"
-    turbo_line = "Hlt2Charm_D0ToKsKpPim_LL"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K+ pi-]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K+ pi-]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K+ pi-]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K+ pi-]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) K+ ^pi-]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) ^K+ pi-]CC",
-    }
-
-    DTF_D0ToKsKpPim_LL_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKpPim_LL_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKpPim_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKpPim_DD(options, pvs, rec_summary):
-    name = "D0ToKsKpPim_DD"
-    turbo_line = "Hlt2Charm_D0ToKsKpPim_DD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K+ pi-]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K+ pi-]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K+ pi-]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K+ pi-]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) K+ ^pi-]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) ^K+ pi-]CC",
-    }
-
-    DTF_D0ToKsKpPim_DD_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKpPim_DD_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKpPim_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-# D0->KSK-K+
-def maketuple_DstpToD0Pip_D0ToKsKmKp_LL_LowBias(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKmKp_LL_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_LL_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- K+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- K+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- K+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- K+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^K+) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKmKp_LL_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKmKp_LL_lowbias_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsKmKp_DD_LowBias(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKmKp_DD_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_DD_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- K+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- K+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- K+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- K+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^K+) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKmKp_DD_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKmKp_DD_lowbias_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsKmKp_LL(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKmKp_LL"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_LL"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- K+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- K+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- K+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- K+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^K+) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKmKp_LL_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKmKp_LL_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsKmKp_DD(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKmKp_DD"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_DD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- K+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- K+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- K+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- K+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^K+) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKmKp_DD_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKmKp_DD_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKmKp_LL_LowBias(options, pvs, rec_summary):
-    name = "D0ToKsKmKp_LL_LowBias"
-    turbo_line = "Hlt2Charm_D0ToKsKmKp_LL_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- K+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- K+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- K+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- K+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- K+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^K+]CC",
-    }
-
-    DTF_D0ToKsKmKp_LL_LB_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKmKp_LL_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmKp_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKmKp_DD_LowBias(options, pvs, rec_summary):
-    name = "D0ToKsKmKp_DD_LowBias"
-    turbo_line = "Hlt2Charm_D0ToKsKmKp_DD_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- K+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- K+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- K+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- K+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- K+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^K+]CC",
-    }
-
-    DTF_D0ToKsKmKp_DD_LB_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKmKp_DD_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmKp_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsPimPip_LL_NoBias(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsPimPip_LL_NoBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_LL_NoBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) pi- pi+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^pi- pi+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- ^pi+) pi+]CC",
-        "pis" :   "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D02KSPiPi_LL_nobias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D02KSPiPi_LL_nobias_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0") + topo_sv_var,
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKmKp_LL(options, pvs, rec_summary):
-    name = "D0ToKsKmKp_LL"
-    turbo_line = "Hlt2Charm_D0ToKsKmKp_LL"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- K+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- K+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- K+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- K+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- K+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^K+]CC",
-    }
-
-    DTF_D0ToKsKmKp_LL_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKmKp_LL_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmKp_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKmKp_DD(options, pvs, rec_summary):
-    name = "D0ToKsKmKp_DD"
-    turbo_line = "Hlt2Charm_D0ToKsKmKp_DD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- K+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- K+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- K+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- K+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- K+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^K+]CC",
-    }
-
-    DTF_D0ToKsKmKp_DD_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKmKp_DD_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmKp_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-# ########################################
diff --git a/Charm_2024validation/options/d0_to_kshh_MC.py b/Charm_2024validation/options/d0_to_kshh_MC.py
deleted file mode 100644
index 9fa138f8ef..0000000000
--- a/Charm_2024validation/options/d0_to_kshh_MC.py
+++ /dev/null
@@ -1,44 +0,0 @@
-from .tupling import (
-    make_MC_composite_variables,
-    make_MC_basic_variables,
-    make_MC_event_variables,
-)
-
-from PyConf.reading import get_mc_particles, get_mc_header
-from FunTuple import FunTuple_MCParticles as FuntupleMC
-
-def maketuple_MC_DstpToD0Pip_D0ToKsPimPip(options, pvs, rec_summary):
-    name = "MC_DstpToD0Pip_D0ToKsPimPip"
-    line = "/Event/MC/Particles"
-    
-    input_data = get_mc_particles(f"{line}")
-
-    branches = {
-       "Dst" : "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi- pi+) pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ ==> ^([D0]CC ==> (KS0 ==> pi- pi+) pi- pi+) pi+]CC",
-        "KS0"  : "[D*(2010)+ ==> ([D0]CC ==> ^(KS0 ==> pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> ^pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi- ^pi+) pi- pi+) pi+]CC",
-        "hm"   : "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi- pi+) ^pi- pi+) pi+]CC",
-        "hp"  :  "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi- pi+) pi- ^pi+) pi+]CC",
-        "pis" :  "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi- pi+) pi- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_MC_composite_variables(),
-        "D0"    : make_MC_composite_variables(),
-        "KS0"    : make_MC_composite_variables(),
-        "KS0_pim"     : make_MC_basic_variables(),
-        "KS0_pip"     : make_MC_basic_variables(),
-        "hm"    : make_MC_basic_variables(),
-        "hp"    : make_MC_basic_variables(),
-        "pis"   : make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                          tuple_name="MCDecayTree",
-                          fields=branches, variables = variables,  
-                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])), 
-                          inputs=input_data)
-
-    return [mytuple]
diff --git a/Charm_2024validation/options/d0_to_ksks.py b/Charm_2024validation/options/d0_to_ksks.py
deleted file mode 100644
index d47253aa14..0000000000
--- a/Charm_2024validation/options/d0_to_ksks.py
+++ /dev/null
@@ -1,1049 +0,0 @@
-import Functors as F
-from Functors.math import log
-from DaVinci import Options, make_config
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunctorCollection
-from PyConf.reading import get_particles, get_pvs
-import FunTuple.functorcollections as FC
-from FunTuple import FunTuple_Particles as Funtuple
-from DecayTreeFitter import DecayTreeFitter
-
-from .tupling import (
-    make_basic_variables,
-    make_composite_variables,
-    make_hlt2_event_variables,
-    make_basic_dtf_variables,
-    make_composite_dtf_variables,
-    Hlt1_lines
-)
-
-# define helper functors
-get_SV =  F.ENDVERTEX @ F.FORWARDARG0
-get_SV_pos = F.TOLINALG @ F.POSITION @ get_SV
-# only if composite (i.e. has vertex)

-get_child_1 = F.CHILD(1, F.FORWARDARG0) # change here the index of the child.
-get_child_endvtx_pos_1 = F.ENDVERTEX_POS  @ get_child_1
-get_fdvec_child_1 = get_child_endvtx_pos_1 - get_SV_pos
-get_child_2 = F.CHILD(2, F.FORWARDARG0) # change here the index of the child.
-get_child_endvtx_pos_2 = F.ENDVERTEX_POS  @ get_child_2
-get_fdvec_child_2 = get_child_endvtx_pos_2 - get_SV_pos
-
-# define observables
-IP_wrt_SV_KS1 = F.IP.bind(get_SV_pos , get_child_1)
-IP_wrt_SV_KS2 = F.IP.bind(get_SV_pos , get_child_2)
-IPCHI2_wrt_SV_KS1 = F.IPCHI2.bind(get_SV , get_child_1)
-IPCHI2_wrt_SV_KS2 = F.IPCHI2.bind(get_SV , get_child_2)
-# only if child is composite (i.e. has vertex)
-FD_wrt_SV_KS1 = F.MAGNITUDE @ get_fdvec_child_1
-FD_wrt_SV_KS2 = F.MAGNITUDE @ get_fdvec_child_2
-FDCHI2_wrt_SV_KS1 = F.VTX_FDCHI2.bind(get_SV, get_child_1)
-FDCHI2_wrt_SV_KS2 = F.VTX_FDCHI2.bind(get_SV, get_child_2)
-# Note: Apply the functors to the head of the node of decay tree e.g. B
-# Functor collection for SV related info
-topo_sv_var = FunctorCollection(
-    {
-        "ORIVXIP_CHILD1": IP_wrt_SV_KS1,
-        "ORIVXIP_CHILD2": IP_wrt_SV_KS2,
-        "ORIVXIPCHI2_CHILD1": IPCHI2_wrt_SV_KS1,
-        "ORIVXIPCHI2_CHILD2": IPCHI2_wrt_SV_KS2,
-        "ORIVXFD_CHILD1": FD_wrt_SV_KS1,
-        "ORIVXFD_CHILD2": FD_wrt_SV_KS2,
-        "ORIVXFDCHI2_CHILD1": FDCHI2_wrt_SV_KS1,
-        "ORIVXFDCHI2_CHILD2": FDCHI2_wrt_SV_KS2,
-    }
-)
-
-############################# LLLL #############################
-def maketuple_Dst2D0pi_D02KSKS_LLLL(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLL"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_LLLL = DecayTreeFitter(
-    #     name='DTF_LLLL',
-    #     input_particles=input_data)
-    #
-    # DTF_LLLL_PV = DecayTreeFitter(
-    #     name='DTF_LLLL_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_LLLL_MASS = DecayTreeFitter(
-        name='DTF_LLLL_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_LLLL_MASS_PV = DecayTreeFitter(
-        'DTF_LLLL_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_LLLL",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# LLLL Tight #############################
-def maketuple_Dst2D0pi_D02KSKS_LLLL_Tight(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLL_Tight"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_LLLL_Tight = DecayTreeFitter(
-    #     name='DTF_LLLL_Tight',
-    #     input_particles=input_data)
-    #
-    # DTF_LLLL_Tight_PV = DecayTreeFitter(
-    #     name='DTF_LLLL_Tight_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_LLLL_Tight_MASS = DecayTreeFitter(
-        name='DTF_LLLL_Tight_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_LLLL_Tight_MASS_PV = DecayTreeFitter(
-        'DTF_LLLL_Tight_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_LLLL_Tight",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# LLDD #############################
-def maketuple_Dst2D0pi_D02KSKS_LLDD(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLDD"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_LLDD = DecayTreeFitter(
-    #     name='DTF_LLDD',
-    #     input_particles=input_data)
-    #
-    # DTF_LLDD_PV = DecayTreeFitter(
-    #     name='DTF_LLDD_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_LLDD_MASS = DecayTreeFitter(
-        name='DTF_LLDD_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_LLDD_MASS_PV = DecayTreeFitter(
-        'DTF_LLDD_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLDD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLDD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLDD, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLDD_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_LLDD",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# LLDD Tight #############################
-def maketuple_Dst2D0pi_D02KSKS_LLDD_Tight(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLDD_Tight"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_LLDD_Tight = DecayTreeFitter(
-    #     name='DTF_LLDD_Tight',
-    #     input_particles=input_data)
-    #
-    # DTF_LLDD_Tight_PV = DecayTreeFitter(
-    #     name='DTF_LLDD_Tight_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_LLDD_Tight_MASS = DecayTreeFitter(
-        name='DTF_LLDD_Tight_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_LLDD_Tight_MASS_PV = DecayTreeFitter(
-        'DTF_LLDD_Tight_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False, DTF=DTF_LLDD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False, DTF=DTF_LLDD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLDD_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLDD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_LLDD_Tight",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# DDDD #############################
-def maketuple_Dst2D0pi_D02KSKS_DDDD(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDDD"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_DDDD = DecayTreeFitter(
-    #     name='DTF_DDDD',
-    #     input_particles=input_data)
-    #
-    # DTF_DDDD_PV = DecayTreeFitter(
-    #     name='DTF_DDDD_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_DDDD_MASS = DecayTreeFitter(
-        name='DTF_DDDD_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_DDDD_MASS_PV = DecayTreeFitter(
-        'DTF_DDDD_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_DDDD",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# DDDD Tight #############################
-def maketuple_Dst2D0pi_D02KSKS_DDDD_Tight(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDDD_Tight"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_DDDD_Tight = DecayTreeFitter(
-    #     name='DTF_DDDD_Tight',
-    #     input_particles=input_data)
-    #
-    # DTF_DDDD_Tight_PV = DecayTreeFitter(
-    #     name='DTF_DDDD_Tight_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_DDDD_Tight_MASS = DecayTreeFitter(
-        name='DTF_DDDD_Tight_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_DDDD_Tight_MASS_PV = DecayTreeFitter(
-        'DTF_DDDD_Tight_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_DDDD_Tight",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# ULLL #############################
-def maketuple_Dst2D0pi_D02KSKS_ULLL(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULLL"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_ULLL = DecayTreeFitter(
-    #     name='DTF_ULLL',
-    #     input_particles=input_data)
-    #
-    # DTF_ULLL_PV = DecayTreeFitter(
-    #     name='DTF_ULLL_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_ULLL_MASS = DecayTreeFitter(
-        name='DTF_ULLL_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_ULLL_MASS_PV = DecayTreeFitter(
-        'DTF_ULLL_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_ULLL",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# ULLL Tight #############################
-def maketuple_Dst2D0pi_D02KSKS_ULLL_Tight(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULLL_Tight"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_ULLL_Tight = DecayTreeFitter(
-    #     name='DTF_ULLL_Tight',
-    #     input_particles=input_data)
-    #
-    # DTF_ULLL_Tight_PV = DecayTreeFitter(
-    #     name='DTF_ULLL_Tight_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_ULLL_Tight_MASS = DecayTreeFitter(
-        name='DTF_ULLL_Tight_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_ULLL_Tight_MASS_PV = DecayTreeFitter(
-        'DTF_ULLL_Tight_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_ULLL_Tight",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# ULDD #############################
-def maketuple_Dst2D0pi_D02KSKS_ULDD(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULDD"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_ULDD = DecayTreeFitter(
-    #     name='DTF_ULDD',
-    #     input_particles=input_data)
-    #
-    # DTF_ULDD_PV = DecayTreeFitter(
-    #     name='DTF_ULDD_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_ULDD_MASS = DecayTreeFitter(
-        name='DTF_ULDD_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_ULDD_MASS_PV = DecayTreeFitter(
-        'DTF_ULDD_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_ULDD",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# ULDD Tight #############################
-def maketuple_Dst2D0pi_D02KSKS_ULDD_Tight(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULDD_Tight"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_ULDD_Tight = DecayTreeFitter(
-    #     name='DTF_ULDD_Tight',
-    #     input_particles=input_data)
-    #
-    # DTF_ULDD_Tight_PV = DecayTreeFitter(
-    #     name='DTF_ULDD_Tight_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_ULDD_Tight_MASS = DecayTreeFitter(
-        name='DTF_ULDD_Tight_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_ULDD_Tight_MASS_PV = DecayTreeFitter(
-        'DTF_ULDD_Tight_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_ULDD_Tight",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# LLLD #############################
-def maketuple_Dst2D0pi_D02KSKS_LLLD(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLD"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_LLLD = DecayTreeFitter(
-    #     name='DTF_LLLD',
-    #     input_particles=input_data)
-    #
-    # DTF_LLLD_PV = DecayTreeFitter(
-    #     name='DTF_LLLD_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_LLLD_MASS = DecayTreeFitter(
-        name='DTF_LLLD_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_LLLD_MASS_PV = DecayTreeFitter(
-        'DTF_LLLD_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_LLLD",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# LLLD Tight #############################
-def maketuple_Dst2D0pi_D02KSKS_LLLD_Tight(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLD_Tight"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_LLLD_Tight = DecayTreeFitter(
-    #     name='DTF_LLLD_Tight',
-    #     input_particles=input_data)
-    #
-    # DTF_LLLD_Tight_PV = DecayTreeFitter(
-    #     name='DTF_LLLD_Tight_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_LLLD_Tight_MASS = DecayTreeFitter(
-        name='DTF_LLLD_Tight_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_LLLD_Tight_MASS_PV = DecayTreeFitter(
-        'DTF_LLLD_Tight_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_LLLD_Tight",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# DDLD #############################
-def maketuple_Dst2D0pi_D02KSKS_DDLD(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDLD"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_DDLD = DecayTreeFitter(
-    #     name='DTF_DDLD',
-    #     input_particles=input_data)
-    #
-    # DTF_DDLD_PV = DecayTreeFitter(
-    #     name='DTF_DDLD_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_DDLD_MASS = DecayTreeFitter(
-        name='DTF_DDLD_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_DDLD_MASS_PV = DecayTreeFitter(
-        'DTF_DDLD_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_DDLD",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# DDLD Tight #############################
-def maketuple_Dst2D0pi_D02KSKS_DDLD_Tight(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDLD_Tight"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_DDLD_Tight = DecayTreeFitter(
-    #     name='DTF_DDLD_Tight',
-    #     input_particles=input_data)
-    #
-    # DTF_DDLD_Tight_PV = DecayTreeFitter(
-    #     name='DTF_DDLD_Tight_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_DDLD_Tight_MASS = DecayTreeFitter(
-        name='DTF_DDLD_Tight_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_DDLD_Tight_MASS_PV = DecayTreeFitter(
-        'DTF_DDLD_Tight_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_DDLD_Tight",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
diff --git a/Charm_2024validation/options/d0_to_ksks_MC.py b/Charm_2024validation/options/d0_to_ksks_MC.py
deleted file mode 100644
index 06c1ac6139..0000000000
--- a/Charm_2024validation/options/d0_to_ksks_MC.py
+++ /dev/null
@@ -1,46 +0,0 @@
-from .tupling import (
-    make_MC_composite_variables,
-    make_MC_basic_variables,
-    make_MC_event_variables,
-)
-
-from PyConf.reading import get_mc_particles, get_mc_header
-from FunTuple import FunTuple_MCParticles as FuntupleMC
-
-############################# LLLL #############################
-def maketuple_MC_Dst2D0pi_D02KSKS_LLLL(options, pvs, rec_summary):
-    name = "MC_DstpToD0Pip_D0ToKsKs_LLLL"
-    line = "/Event/MC/Particles"
-
-    input_data = get_mc_particles(f"{line}")
-
-    fields = {
-        "Dst": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi+ pi-) (KS0 ==> pi+ pi-) ) pi+]CC",
-        "D0": "[D*(2010)+ ==> ^([D0]CC ==> (KS0 ==> pi+ pi-) (KS0 ==> pi+ pi-) ) pi+]CC",
-        "KS1": "[D*(2010)+ ==> ([D0]CC ==> ^(KS0 ==> pi+ pi-) (KS0 ==> pi+ pi-) ) pi+]CC",
-        "KS2": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi+ pi-) ^(KS0 ==> pi+ pi-) ) pi+]CC",
-        "pip1": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> ^pi+ pi-) (KS0 ==> pi+ pi-) ) pi+]CC",
-        "pim1": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi+ ^pi-) (KS0 ==> pi+ pi-) ) pi+]CC",
-        "pip2": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi+ pi-) (KS0 ==> ^pi+ pi-) ) pi+]CC",
-        "pim2": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi+ pi-) (KS0 ==> pi+ ^pi-) ) pi+]CC",
-        "pi_soft": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi+ pi-) (KS0 ==> pi+ pi-) ) ^pi+]CC",
-    }
-
-    variables = {"pip1":  make_MC_basic_variables(),
-                 "pim1":  make_MC_basic_variables(),
-                 "pip2":  make_MC_basic_variables(),
-                 "pim2":  make_MC_basic_variables(),
-                 "KS1": make_MC_composite_variables(),
-                 "KS2": make_MC_composite_variables(),
-                 "D0": make_MC_composite_variables(),
-                 "Dst": make_MC_composite_variables(),
-                 "pi_soft":  make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                          tuple_name="MCDecayTree",
-                          fields=fields, variables = variables,
-                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
-                          inputs=input_data)
-
-    return [mytuple]
diff --git a/Charm_2024validation/options/d_to_hhh.py b/Charm_2024validation/options/d_to_hhh.py
deleted file mode 100644
index d10fa039f6..0000000000
--- a/Charm_2024validation/options/d_to_hhh.py
+++ /dev/null
@@ -1,503 +0,0 @@
-from .tupling import (
-    make_composite_variables_3body,
-    make_b_composite_variables,
-    make_composite_variables,
-    make_basic_variables,
-    make_hlt2_event_variables,
-    make_composite_dtf_variables_3body,
-    make_basic_dtf_variables,
-)
-
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunTuple_Particles as Funtuple
-
-
-def make_dtf_variables(options, pvs, input_data, ptype):
-
-    if ptype not in ["basic", "composite"]:
-        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
-
-    from DecayTreeFitter import DecayTreeFitter
-    
-    DTF = DecayTreeFitter(
-        name=f'DTF_{{hash}}',
-        input_particles=input_data)
-
-    DTFvtx = DecayTreeFitter(
-        name=f'DTFvtx_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    DTFmassDp = DecayTreeFitter(
-        name=f'DTFmassDp_{{hash}}',
-        input_particles=input_data,
-        mass_constraints=["D+"])
-
-    DTFvtxmassDp = DecayTreeFitter(
-        name=f'DTFvtxmassDp_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D+"])
-
-    DTFmassDsp = DecayTreeFitter(
-        name=f'DTFmassDsp_{{hash}}',
-        input_particles=input_data,
-        substitutions = ['D+{{D_s+}}'],
-        mass_constraints=["D_s+"])
-
-    DTFvtxmassDsp = DecayTreeFitter(
-        name=f'DTFvtxmassDsp_{{hash}}',
-        input_particles=input_data,
-        substitutions = ['D+{{D_s+}}',"KS0{{KS0}}"],#trick
-        mass_constraints=["D_s+"],
-        input_pvs=pvs,
-    )
-
-    if ptype == "basic":
-        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassDp,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="Dp")
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassDp,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="Dp")
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassDsp,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="Dsp")
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassDsp,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="Dsp")
-        return dtf_vars
-
-    if ptype == "composite":
-        dtf_vars = make_composite_dtf_variables_3body(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
-                                             DTF=DTFmassDp,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="Dp")
-        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
-                                             DTF=DTFvtxmassDp,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="Dp")
-        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
-                                             DTF=DTFmassDsp,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="Dsp")
-        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
-                                             DTF=DTFvtxmassDsp,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="Dsp")
-        return dtf_vars
-
-
-def maketuple_D2Kpipi(options, pvs, rec_summary, _NoCuts=False):
-    name = "D2Kpipi"
-    turbo_line = "Hlt2Charm_DpDspToKmPipPip"
-    if _NoCuts == True:
-        turbo_line += "_NoCuts"
-        name += "_NoCuts"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> K- pi+ pi+]CC",
-        "Km"   : "[D+ -> ^K- pi+ pi+]CC",
-        "pip1"  : "[D+ -> K- ^pi+ pi+]CC",
-        "pip2" : "[D+ -> K- pi+ ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2pipipi(options, pvs, rec_summary, _NoCuts=False):
-    name = "D2pipipi"
-    turbo_line = "Hlt2Charm_DpDspToPimPipPip"
-    if _NoCuts == True:
-        turbo_line += "_NoCuts"
-        name += "_NoCuts"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> pi- pi+ pi+]CC",
-        "pim"   : "[D+ -> ^pi- pi+ pi+]CC",
-        "pip1"  : "[D+ -> pi- ^pi+ pi+]CC",
-        "pip2" : "[D+ -> pi- pi+ ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Ds2KKpi(options, pvs, rec_summary, _NoCuts=False):
-    name = "Ds2KKpi"
-    turbo_line = "Hlt2Charm_DpDspToKmKpPip"
-    if _NoCuts == True:
-        turbo_line += "_NoCuts"
-        name += "_NoCuts"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> K- K+ pi+]CC",
-        "Km"   : "[D+ -> ^K- K+ pi+]CC",
-        "Kp"  : "[D+ -> K- ^K+ pi+]CC",
-        "pip" : "[D+ -> K- K+ ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-    
-    return [myfilter, mytuple]
-
-def maketuple_D2Kpipi_Kpi(options, pvs, rec_summary):
-    name = "D2Kpipi_Kpi"
-    turbo_line = "Hlt2Charm_DpDspToKmPipPip"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (KS0 -> K- pi+) pi+]CC",
-        "Kst" : "[D+ -> ^(KS0 -> K- pi+) pi+]CC",
-        "Km"   : "[D+ -> (KS0 -> ^K- pi+) pi+]CC",
-        "pip"  : "[D+ -> (KS0 -> K- ^pi+) pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data),
-        "Kst"   : make_composite_variables(options, pvs, input_data),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, use_loki_decay_finder=True)
-
-    return [myfilter, mytuple]
-
-
-
-
-    '''
-    from PyConf.Algorithms import ThOrParticleSelection
-    import Functors as F
-    FILTER_TREE = lambda id: F.FILTER(F.IS_ABS_ID(id)) @ F.GET_ALL_DESCENDANTS()
-    Km_data = ThOrParticleSelection(
-    InputParticles=input_data, Functor=FILTER_TREE("[K-]CC")
-).OutputSelection
-    pip_data = ThOrParticleSelection(
-        InputParticles=input_data, Functor=FILTER_TREE("[pi+]CC")
-).OutputSelection
-    
-    
-    from PyConf.Algorithms import ChargedBasicsProducer, UniqueIDGeneratorAlg
-    from PyConf.Algorithms import ThOrCombiner__2ChargedBasics, ThOrCombiner__2Particle
-    # make unique_id_generator
-    unique_id_gen = UniqueIDGeneratorAlg()
-    '''
-    '''
-    # produce charged basic particles
-    produce_kaons = ChargedBasicsProducer(
-        InputUniqueIDGenerator=unique_id_gen, ParticleID="kaon")
-    produce_pions = ChargedBasicsProducer(
-        InputUniqueIDGenerator=unique_id_gen, ParticleID="pion")
-    produce_jpsi = ThOrCombiner__2ChargedBasics(
-    '''
-    '''
-    produce_jpsi = ThOrCombiner__2Particle(
-        InputUniqueIDGenerator=unique_id_gen,
-        DecayDescriptor="[J/psi(1S) -> K- pi+]cc",
-        #Input1=produce_kaons.Particles,
-        #Input2=produce_pions.Particles,
-        Input1=Km_data,
-        Input2=pip_data,
-    )
-    input_data = produce_jpsi.Output
-
-    branches = {
-        "Jpsi" : "[J/psi(1S) -> K- pi+]CC",
-    }
-
-    from FunTuple import FunctorCollection
-    import Functors as F
-    variables = {
-        #"Dp"   : make_composite_variables(options, pvs, input_data, False, False),
-        #"Jpsi"   : make_composite_variables(options, pvs, input_data, False, False),
-        "Jpsi"   : FunctorCollection({
-            "PX": F.PX,
-            "PY": F.PY,
-            "PZ": F.PZ,
-            "BPVDIRA": F.BPVDIRA(pvs),
-            "VCHI2DOF": F.CHI2DOF, #CHI2VXNDOF
-            "BPVIPCHI2": F.BPVIPCHI2(pvs),
-            "BPVIP": F.BPVIP(pvs),
-        }),
-        
-    }
-
-    from FunTuple import FunTuple_Composites as Funtuple
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables, inputs=input_data, store_multiple_cand_info=True)
-    ## add event_variables
-
-    
-    return [myfilter, mytuple]
-    '''
-    '''
-    from PyConf.control_flow import CompositeNode, NodeLogic
-    from PyConf.Algorithms import PrintDecayTree, PrintHeader
-    from RecoConf.reconstruction_objects import upfront_reconstruction
-    from DaVinci.common_particles import make_std_loose_jpsi2mum
-    jpsis = make_std_loose_jpsi2mumu()
-    pdt = PrintDecayTree(name="PrintJpsis", Input=jpsis)
-    algs = upfront_reconstruction() + [jpsis, pdt]
-
-    node = CompositeNode(
-    "PrintJpsiNode", children=algs, combine_logic=NodeLogic.NONLAZY_AND
-)
-    return [node]
-    
-    '''
-
-
-def maketuple_D2pipiK(options, pvs, rec_summary, _NoCuts=False):
-    name = "D2pipiK"
-    turbo_line = "Hlt2Charm_DpDspToKpPimPip"
-    if _NoCuts == True:
-        turbo_line += "_NoCuts"
-        name += "_NoCuts"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> pi- pi+ K+]CC",
-        "p1"   : "[D+ -> ^pi- pi+ K+]CC",
-        "p2"  : "[D+ -> pi- ^pi+ K+]CC",
-        "p3" : "[D+ -> pi- pi+ ^K+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
-        "p1"     : make_basic_variables(options, pvs, input_data),
-        "p2"    : make_basic_variables(options, pvs, input_data),
-        "p3"   : make_basic_variables(options, pvs, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2KKK(options, pvs, rec_summary, _NoCuts=False):
-    name = "D2KKK"
-    turbo_line = "Hlt2Charm_DpDspToKmKpKp"
-    if _NoCuts == True:
-        turbo_line += "_NoCuts"
-        name += "_NoCuts"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> K- K+ K+]CC",
-        "p1"   : "[D+ -> ^K- K+ K+]CC",
-        "p2"  : "[D+ -> K- ^K+ K+]CC",
-        "p3" : "[D+ -> K- K+ ^K+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
-        "p1"     : make_basic_variables(options, pvs, input_data),
-        "p2"    : make_basic_variables(options, pvs, input_data),
-        "p3"   : make_basic_variables(options, pvs, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2piKK(options, pvs, rec_summary, _NoCuts=False):
-    name = "D2piKK"
-    turbo_line = "Hlt2Charm_DpDspToKpKpPim"
-    if _NoCuts == True:
-        turbo_line += "_NoCuts"
-        name += "_NoCuts"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> pi- K+ K+]CC",
-        "p1"   : "[D+ -> ^pi- K+ K+]CC",
-        "p2"  : "[D+ -> pi- ^K+ K+]CC",
-        "p3" : "[D+ -> pi- K+ ^K+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
-        "p1"     : make_basic_variables(options, pvs, input_data),
-        "p2"    : make_basic_variables(options, pvs, input_data),
-        "p3"   : make_basic_variables(options, pvs, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-
-def maketuple_B02Dpi_D2KKpi(options, pvs, rec_summary):
-    name = "B02Dpi_D2KKpi"
-    turbo_line = "Hlt2Charm_B0ToDmPip_DmToKmKpPim"
-    
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-    
-    branches = {
-        "B0" : "[[B0]CC -> (D- -> K- K+ pi-) pi+]CC",
-        "pip" : "[[B0]CC -> (D- -> K- K+ pi-) ^pi+]CC",
-        "Dm" : "[[B0]CC -> ^(D- -> K- K+ pi-) pi+]CC",
-        "p1" : "[[B0]CC -> (D- -> ^K- K+ pi-) pi+]CC",
-        "p2" : "[[B0]CC -> (D- -> K- ^K+ pi-) pi+]CC",
-        "p3" : "[[B0]CC -> (D- -> K- K+ ^pi-) pi+]CC",
-    }
-    
-    variables = {
-        "B0" : make_b_composite_variables(options, pvs, input_data),
-        "pip" : make_basic_variables(options, pvs,input_data),
-        "Dm"   : make_composite_variables_3body(options, pvs, input_data),
-        "p1"     : make_basic_variables(options, pvs, input_data),
-        "p2"    : make_basic_variables(options, pvs, input_data),
-        "p3"   : make_basic_variables(options, pvs, input_data),        
-    }
-    
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-
-def maketuple_B02Dpi_D2pipipi(options, pvs, rec_summary, _NoCuts=False):    
-    name = "B02Dpi_D2pipipi"
-    turbo_line = "Hlt2Charm_B0ToDmPip_DmToPimPimPip"
-    
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-    
-    branches = {
-        "B0" : "[[B0]CC -> (D- -> pi- pi- pi+) pi+]CC",
-        "pip" : "[[B0]CC -> (D- -> pi- pi- pi+) ^pi+]CC",
-        "Dm" : "[[B0]CC -> ^(D- -> pi- pi- pi+) pi+]CC",
-        "p1" : "[[B0]CC -> (D- -> ^pi- pi- pi+) pi+]CC",
-        "p2" : "[[B0]CC -> (D- -> pi- ^pi- pi+) pi+]CC",
-        "p3" : "[[B0]CC -> (D- -> pi- pi- ^pi+) pi+]CC",
-    }
-    
-    variables = {
-        "B0" : make_b_composite_variables(options, pvs, input_data),
-        "pip" : make_basic_variables(options, pvs,input_data),
-        "Dm"   : make_composite_variables_3body(options, pvs, input_data),
-        "p1"     : make_basic_variables(options, pvs, input_data),
-        "p2"    : make_basic_variables(options, pvs, input_data),
-        "p3"   : make_basic_variables(options, pvs, input_data),        
-    }
-    
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-    
-def maketuple_Bs02Dspi_Ds2KKpi(options, pvs, rec_summary, _NoCuts=False):    
-    name = "Bs02Dspi_Ds2KKpi"
-    turbo_line = "Hlt2Charm_Bs0ToDsmPip_DsmToKmKpPim"
-    
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-    
-    branches = {
-        "Bs0" : "[[B_s0]CC -> (D_s- -> K- K+ pi-) pi+]CC",
-        "pip" : "[[B_s0]CC -> (D_s- -> K- K+ pi-) ^pi+]CC",
-        "Dsm" : "[[B_s0]CC -> ^(D_s- -> K- K+ pi-) pi+]CC",
-        "p1" : "[[B_s0]CC -> (D_s- -> ^K- K+ pi-) pi+]CC",
-        "p2" : "[[B_s0]CC -> (D_s- -> K- ^K+ pi-) pi+]CC",
-        "p3" : "[[B_s0]CC -> (D_s- -> K- K+ ^pi-) pi+]CC",
-    }
-    
-    variables = {
-        "Bs0" : make_b_composite_variables(options, pvs, input_data),
-        "pip" : make_basic_variables(options, pvs,input_data),
-        "Dsm"   : make_composite_variables_3body(options, pvs, input_data),
-        "p1"     : make_basic_variables(options, pvs, input_data),
-        "p2"    : make_basic_variables(options, pvs, input_data),
-        "p3"   : make_basic_variables(options, pvs, input_data),        
-    }
-    
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-    
-def maketuple_Bs02Dspi_Ds2pipipi(options, pvs, rec_summary, _NoCuts=False):
-    name = "Bs02Dspi_Ds2pipipi"
-    turbo_line = "Hlt2Charm_Bs0ToDsmPip_DsmToPimPimPip"
-    
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-    
-    branches = {
-        "Bs0" : "[[B_s0]CC -> (D_s- -> pi- pi- pi+) pi+]CC",
-        "pip" : "[[B_s0]CC -> (D_s- -> pi- pi- pi+) ^pi+]CC",
-        "Dsm" : "[[B_s0]CC -> ^(D_s- -> pi- pi- pi+) pi+]CC",
-        "p1" : "[[B_s0]CC -> (D_s- -> ^pi- pi- pi+) pi+]CC",
-        "p2" : "[[B_s0]CC -> (D_s- -> pi- ^pi- pi+) pi+]CC",
-        "p3" : "[[B_s0]CC -> (D_s- -> pi- pi- ^pi+) pi+]CC",
-    }
-    
-    variables = {
-        "Bs0" : make_b_composite_variables(options, pvs, input_data),
-        "pip" : make_basic_variables(options, pvs,input_data),
-        "Dsm"   : make_composite_variables_3body(options, pvs, input_data),
-        "p1"     : make_basic_variables(options, pvs, input_data),
-        "p2"    : make_basic_variables(options, pvs, input_data),
-        "p3"   : make_basic_variables(options, pvs, input_data),        
-    }
-    
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
diff --git a/Charm_2024validation/options/d_to_hhh_MC.py b/Charm_2024validation/options/d_to_hhh_MC.py
deleted file mode 100644
index e666e5f3ce..0000000000
--- a/Charm_2024validation/options/d_to_hhh_MC.py
+++ /dev/null
@@ -1,92 +0,0 @@
-from .tupling import (
-    make_MC_composite_variables,
-    make_MC_basic_variables,
-    make_MC_event_variables,
-)
-
-from PyConf.reading import get_mc_particles, get_mc_header
-from FunTuple import FunTuple_MCParticles as FuntupleMC
-
-def maketuple_MC_D2Kpipi(options, pvs, rec_summary):
-    name = "MC_D2Kpipi"
-    line = "/Event/MC/Particles"
-
-    input_data = get_mc_particles(f"{line}")
-
-    branches = {
-        "Dp" : "[D+ ==> K- pi+ pi+]CC",
-        "Km"   : "[D+ ==> ^K- pi+ pi+]CC",
-        "pip1"  : "[D+ ==> K- ^pi+ pi+]CC",
-        "pip2" : "[D+ ==> K- pi+ ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_MC_composite_variables(),
-        "Km"     : make_MC_basic_variables(),
-        "pip1"    : make_MC_basic_variables(),
-        "pip2"   : make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                          tuple_name="MCDecayTree",
-                          fields=branches, variables = variables,
-                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
-                          inputs=input_data)
-
-    return [mytuple]
-
-def maketuple_MC_Ds2KKpi(options, pvs, rec_summary):
-    name = "MC_Ds2KKpi"
-    line = "/Event/MC/Particles"
-
-    input_data = get_mc_particles(f"{line}")
-
-    branches = {
-        "Dp" : "[D_s+ ==> K- K+ pi+]CC",
-        "Km"   : "[D_s+ ==> ^K- K+ pi+]CC",
-        "Kp"  : "[D_s+ ==> K- ^K+ pi+]CC",
-        "pip" : "[D_s+ ==> K- K+ ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_MC_composite_variables(),
-        "Km"     : make_MC_basic_variables(),
-        "Kp"    : make_MC_basic_variables(),
-        "pip"   : make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                          tuple_name="MCDecayTree",
-                          fields=branches, variables = variables,
-                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
-                          inputs=input_data)
-
-    return [mytuple]
-
-def maketuple_MC_Ds2KKK(options, pvs, rec_summary):
-    name = "MC_Ds2KKK"
-    line = "/Event/MC/Particles"
-
-    input_data = get_mc_particles(f"{line}")
-
-    branches = {
-        "Dp" : "[D_s+ ==> K- K+ K+]CC",
-        "Km"   : "[D_s+ ==> ^K- K+ K+]CC",
-        "Kp1"  : "[D_s+ ==> K- ^K+ K+]CC",
-        "Kp2" : "[D_s+ ==> K- K+ ^K+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_MC_composite_variables(),
-        "Km"     : make_MC_basic_variables(),
-        "Kp1"    : make_MC_basic_variables(),
-        "Kp2"   : make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                          tuple_name="MCDecayTree",
-                          fields=branches, variables = variables,
-                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
-                          inputs=input_data)
-
-    return [mytuple]
diff --git a/Charm_2024validation/options/d_to_ksh.py b/Charm_2024validation/options/d_to_ksh.py
deleted file mode 100644
index df40aee746..0000000000
--- a/Charm_2024validation/options/d_to_ksh.py
+++ /dev/null
@@ -1,313 +0,0 @@
-from .tupling import (
-    make_composite_variables,
-    make_basic_variables,
-    make_hlt2_event_variables,
-    make_composite_dtf_variables,
-    make_basic_dtf_variables,
-)
-
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunTuple_Particles as Funtuple
-
-
-def make_dtf_variables(options, pvs, input_data, ptype, islong=False):
-
-    if ptype not in ["basic", "composite"]:
-        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
-
-    from DecayTreeFitter import DecayTreeFitter
-    
-    DTF = DecayTreeFitter(
-        name=f'DTF_{{hash}}',
-        input_particles=input_data)
-
-    DTFvtx = DecayTreeFitter(
-        name=f'DTFvtx_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    DTFmassKS = DecayTreeFitter(
-        name=f'DTFmassKS_{{hash}}',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTFvtxmassKS = DecayTreeFitter(
-        name=f'DTFvtxmassKS_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    DTFmassDpKS = DecayTreeFitter(
-        name=f'DTFmassDpKS_{{hash}}',
-        input_particles=input_data,
-        mass_constraints=["D+","KS0"])
-
-    DTFvtxmassDpKS = DecayTreeFitter(
-        name=f'DTFvtxmassDpKS_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D+","KS0"])
-
-    DTFmassDspKS = DecayTreeFitter(
-        name=f'DTFmassDspKS_{{hash}}',
-        input_particles=input_data,
-        substitutions = ['D+{{D_s+}}'],
-        mass_constraints=["D_s+","KS0"])
-
-    DTFvtxmassDspKS = DecayTreeFitter(
-        name=f'DTFvtxmassDspKS_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs,
-        substitutions = ['D+{{D_s+}}',"KS0{{KS0}}"],#trick
-        mass_constraints=["D_s+","KS0"],
-    )
-
-
-    if ptype == "basic":
-        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False,
-                                            islong=islong)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False,
-                                            islong=islong)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassKS,
-                                             pv_constraint=False,
-                                             mass_constraint=True, 
-                                             particle_name="KS",
-                                             islong=islong)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassKS,
-                                             pv_constraint=True,
-                                             mass_constraint=True, 
-                                             particle_name="KS",
-                                             islong=islong)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassDpKS,
-                                             pv_constraint=False,
-                                             mass_constraint=True, 
-                                             particle_name="DpKS",
-                                             islong=islong)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassDpKS,
-                                             pv_constraint=True,
-                                             mass_constraint=True, 
-                                             particle_name="DpKS",
-                                             islong=islong)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassDspKS,
-                                             pv_constraint=False,
-                                             mass_constraint=True, 
-                                             particle_name="DspKS",
-                                             islong=islong)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassDspKS,
-                                             pv_constraint=True,
-                                             mass_constraint=True, 
-                                             particle_name="DspKS",
-                                             islong=islong)
-        return dtf_vars
-
-    if ptype == "composite":
-        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassKS,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="KS")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassKS,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="KS")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassDpKS,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="DpKS")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassDpKS,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="DpKS")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassDspKS,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="DspKS")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassDspKS,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="DspKS")
-        return dtf_vars
-
-
-def maketuple_D2KSK_DD(options, pvs, rec_summary):
-    name = "D2KSK_DD"
-    turbo_line = "Hlt2Charm_DpDspToKsKp_DD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (KS0 -> pi- pi+) K+]CC",
-        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) K+]CC",
-        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) K+]CC",
-        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) K+]CC",
-        "hp" : "[D+ -> (KS0 -> pi- pi+) ^K+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2KSK_LD(options, pvs, rec_summary):
-    name = "D2KSK_LD"
-    turbo_line = "Hlt2Charm_DpDspToKsKp_LD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (KS0 -> pi- pi+) K+]CC",
-        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) K+]CC",
-        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) K+]CC",
-        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) K+]CC",
-        "hp" : "[D+ -> (KS0 -> pi- pi+) ^K+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-
-def maketuple_D2KSK_LL(options, pvs, rec_summary):
-    name = "D2KSK_LL"
-    turbo_line = "Hlt2Charm_DpDspToKsKp_LL"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (KS0 -> pi- pi+) K+]CC",
-        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) K+]CC",
-        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) K+]CC",
-        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) K+]CC",
-        "hp" : "[D+ -> (KS0 -> pi- pi+) ^K+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2KSpi_DD(options, pvs, rec_summary):
-    name = "D2KSpi_DD"
-    turbo_line = "Hlt2Charm_DpDspToKsPip_DD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (KS0 -> pi- pi+) pi+]CC",
-        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) pi+]CC",
-        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) pi+]CC",
-        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) pi+]CC",
-        "hp" : "[D+ -> (KS0 -> pi- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2KSpi_LD(options, pvs, rec_summary):
-    name = "D2KSpi_LD"
-    turbo_line = "Hlt2Charm_DpDspToKsPip_LD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (KS0 -> pi- pi+) pi+]CC",
-        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) pi+]CC",
-        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) pi+]CC",
-        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) pi+]CC",
-        "hp" : "[D+ -> (KS0 -> pi- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2KSpi_LL(options, pvs, rec_summary):
-    name = "D2KSpi_LL"
-    turbo_line = "Hlt2Charm_DpDspToKsPip_LL"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (KS0 -> pi- pi+) pi+]CC",
-        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) pi+]CC",
-        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) pi+]CC",
-        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) pi+]CC",
-        "hp" : "[D+ -> (KS0 -> pi- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
diff --git a/Charm_2024validation/options/d_to_ksh_MC.py b/Charm_2024validation/options/d_to_ksh_MC.py
deleted file mode 100644
index 38a2197998..0000000000
--- a/Charm_2024validation/options/d_to_ksh_MC.py
+++ /dev/null
@@ -1,68 +0,0 @@
-from .tupling import (
-    make_MC_composite_variables,
-    make_MC_basic_variables,
-    make_MC_event_variables,
-)
-
-from PyConf.reading import get_mc_particles, get_mc_header
-from FunTuple import FunTuple_MCParticles as FuntupleMC
-
-def maketuple_MC_D2KSK(options, pvs, rec_summary):
-    name = "MC_D2KSK"
-    line = "/Event/MC/Particles"
-
-    input_data = get_mc_particles(f"{line}")
-
-    branches = {
-        "Dp" : "[D_s+ ==> (KS0 ==> pi- pi+) K+]CC",
-        "KS0"  : "[D_s+ ==> ^(KS0 ==> pi- pi+) K+]CC",
-        "pim"   : "[D_s+ ==> (KS0 ==> ^pi- pi+) K+]CC",
-        "pip"  : "[D_s+ ==> (KS0 ==> pi- ^pi+) K+]CC",
-        "hp" : "[D_s+ ==> (KS0 ==> pi- pi+) ^K+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_MC_composite_variables(),
-        "KS0"    : make_MC_composite_variables(),
-        "pim"     : make_MC_basic_variables(),
-        "pip"    : make_MC_basic_variables(),
-        "hp"   : make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                        tuple_name="MCDecayTree",
-                        fields=branches, variables = variables,
-                        event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
-                        inputs=input_data)
-
-    return [mytuple]
-
-def maketuple_MC_D2KSpi(options, pvs, rec_summary):
-    name = "MC_D2KSpi"
-    line = "/Event/MC/Particles"
-
-    input_data = get_mc_particles(f"{line}")
-
-    branches = {
-        "Dp" : "[D+ ==> (KS0 ==> pi- pi+) pi+]CC",
-        "KS0"  : "[D+ ==> ^(KS0 ==> pi- pi+) pi+]CC",
-        "pim"   : "[D+ ==> (KS0 ==> ^pi- pi+) pi+]CC",
-        "pip"  : "[D+ ==> (KS0 ==> pi- ^pi+) pi+]CC",
-        "hp" : "[D+ ==> (KS0 ==> pi- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_MC_composite_variables(),
-        "KS0"    : make_MC_composite_variables(),
-        "pim"     : make_MC_basic_variables(),
-        "pip"    : make_MC_basic_variables(),
-        "hp"   : make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                        tuple_name="MCDecayTree",
-                        fields=branches, variables = variables,
-                        event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
-                        inputs=input_data)
-
-    return [mytuple]
diff --git a/Charm_2024validation/options/detection_asymmetry.py b/Charm_2024validation/options/detection_asymmetry.py
deleted file mode 100644
index 9769559e87..0000000000
--- a/Charm_2024validation/options/detection_asymmetry.py
+++ /dev/null
@@ -1,191 +0,0 @@
-from .tupling import (
-    make_composite_variables,
-    make_composite_variables_3body,
-    make_basic_variables,
-    make_hlt2_event_variables,
-)
-
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunTuple_Particles as Funtuple
-
-def maketuple_D2Kpipi_ADet(options, pvs, rec_summary):
-    name = "D2Kpipi_ADet"
-    turbo_line = "Hlt2Charm_DpToKmPipPip_ADet"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> K- pi+ pi+]CC",
-        "Km"   : "[D+ -> ^K- pi+ pi+]CC",
-        "pip1"  : "[D+ -> K- ^pi+ pi+]CC",
-        "pip2" : "[D+ -> K- pi+ ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
-        "Km"     : make_basic_variables(options, pvs, input_data),
-        "pip1"    : make_basic_variables(options, pvs, input_data),
-        "pip2"   : make_basic_variables(options, pvs, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2pipipi_ADet(options, pvs, rec_summary):
-    name = "D2pipipi_ADet"
-    turbo_line = "Hlt2Charm_DspToPimPipPip_ADet"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D_s+ -> pi- pi+ pi+]CC",
-        "pim"   : "[D_s+ -> ^pi- pi+ pi+]CC",
-        "pip1"  : "[D_s+ -> pi- ^pi+ pi+]CC",
-        "pip2" : "[D_s+ -> pi- pi+ ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
-        "pim"     : make_basic_variables(options, pvs, input_data),
-        "pip1"    : make_basic_variables(options, pvs, input_data),
-        "pip2"   : make_basic_variables(options, pvs, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Ds2KKpi_ADet(options, pvs, rec_summary):
-    name = "Ds2KKpi_ADet"
-    turbo_line = "Hlt2Charm_DspToKmKpPip_ADet"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D_s+ -> K- K+ pi+]CC",
-        "Km"   : "[D_s+ -> ^K- K+ pi+]CC",
-        "Kp"  : "[D_s+ -> K- ^K+ pi+]CC",
-        "pip" : "[D_s+ -> K- K+ ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
-        "Km"     : make_basic_variables(options, pvs, input_data),
-        "Kp"    : make_basic_variables(options, pvs, input_data),
-        "pip"   : make_basic_variables(options, pvs, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-    
-    return [myfilter, mytuple]
-        
-def maketuple_Lc2KSp_LL_ADet(options, pvs, rec_summary):
-    name = "Lc2KSp_LL_ADet"
-    turbo_line = "Hlt2Charm_LcpToPpKs_LL_ADet"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Lc" : "[Lambda_c+ -> (KS0 -> pi- pi+) p+]CC",
-        "KS0"  : "[Lambda_c+ -> ^(KS0 -> pi- pi+) p+]CC",
-        "pim"   : "[Lambda_c+ -> (KS0 -> ^pi- pi+) p+]CC",
-        "pip"  : "[Lambda_c+ -> (KS0 -> pi- ^pi+) p+]CC",
-        "pp" : "[Lambda_c+ -> (KS0 -> pi- pi+) ^p+]CC",
-    }
-
-    variables = {
-        "Lc"   : make_composite_variables(options, pvs, input_data),
-        "KS0"    : make_composite_variables(options, pvs, input_data),
-        "pim"     : make_basic_variables(options, pvs, input_data),
-        "pip"    : make_basic_variables(options, pvs, input_data),
-        "pp"   : make_basic_variables(options, pvs, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Lc2pKpi_ADet(options, pvs, rec_summary):
-    name = "Lc2pKpi_ADet"
-    turbo_line = "Hlt2Charm_LcpToPpKmPip_ADet"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Lc" : "[Lambda_c+ -> K- pi+ p+]CC",
-        "Km"   : "[Lambda_c+ -> ^K- pi+ p+]CC",
-        "pip"  : "[Lambda_c+ -> K- ^pi+ p+]CC",
-        "pp" : "[Lambda_c+ -> K- pi+ ^p+]CC",
-    }
-
-    variables = {
-        "Lc"   : make_composite_variables_3body(options, pvs, input_data),
-        "Km"     : make_basic_variables(options, pvs, input_data),
-        "pip"    : make_basic_variables(options, pvs, input_data),
-        "pp"   : make_basic_variables(options, pvs, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2KSK_LL_ADet(options, pvs, rec_summary):
-    name = "D2KSK_LL_ADet"
-    turbo_line = "Hlt2Charm_DspToKsKp_LL_ADet"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D_s+ -> (KS0 -> pi- pi+) K+]CC",
-        "KS0"  : "[D_s+ -> ^(KS0 -> pi- pi+) K+]CC",
-        "pim"   : "[D_s+ -> (KS0 -> ^pi- pi+) K+]CC",
-        "pip"  : "[D_s+ -> (KS0 -> pi- ^pi+) K+]CC",
-        "hp" : "[D_s+ -> (KS0 -> pi- pi+) ^K+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data),
-        "KS0"    : make_composite_variables(options, pvs, input_data),
-        "pim"     : make_basic_variables(options, pvs, input_data),
-        "pip"    : make_basic_variables(options, pvs, input_data),
-        "hp"   : make_basic_variables(options, pvs, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2KSpi_LL_ADet(options, pvs, rec_summary):
-    name = "D2KSpi_LL_ADet"
-    turbo_line = "Hlt2Charm_DpToKsPip_LL_ADet"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (KS0 -> pi- pi+) pi+]CC",
-        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) pi+]CC",
-        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) pi+]CC",
-        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) pi+]CC",
-        "hp" : "[D+ -> (KS0 -> pi- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data),
-        "KS0"    : make_composite_variables(options, pvs, input_data),
-        "pim"     : make_basic_variables(options, pvs, input_data),
-        "pip"    : make_basic_variables(options, pvs, input_data),
-        "hp"   : make_basic_variables(options, pvs, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
diff --git a/Charm_2024validation/options/dst_to_dee.py b/Charm_2024validation/options/dst_to_dee.py
deleted file mode 100644
index 11f42bae95..0000000000
--- a/Charm_2024validation/options/dst_to_dee.py
+++ /dev/null
@@ -1,296 +0,0 @@
-import Functors as F
-from Functors.math import log
-from DaVinci import Options, make_config
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunctorCollection
-from PyConf.reading import get_particles, get_pvs
-import FunTuple.functorcollections as FC
-from FunTuple import FunTuple_Particles as Funtuple
-from DecayTreeFitter import DecayTreeFitter
-from Hlt2Conf.lines.charm.dst_to_dee_makers import (dst_BDT_functor)
-from .tupling import (
-    make_DeltaM_variable,
-    make_basic_variables,
-    make_composite_variables,
-    make_composite_variables_3body,
-    make_composite_variables_4body,
-    make_hlt2_event_variables,
-    make_basic_dtf_variables,
-    make_composite_dtf_variables,
-    make_composite_dtf_variables_3body,
-    make_composite_dtf_variables_4body,
-    Hlt1_lines
-)
-extra_brem_variables= (FunctorCollection(
-            {
-                "BREMHYPODELTAX": F.BREMHYPODELTAX,
-                "BREMHYPOENERGY": F.BREMHYPOENERGY,
-                "BREMHYPOID": F.BREMHYPOID,
-                "BREMHYPOMATCH_CHI2": F.BREMHYPOMATCH_CHI2,
-                "BREMPIDE": F.BREMPIDE,
-                "INBREM": F.INBREM,
-                "MASS_WITH_BREM": F.MASS_WITH_BREM,
-                "PT_WITH_BREM": F.PT_WITH_BREM,
-                "P_WITH_BREM": F.P_WITH_BREM,
-                "ECALPIDE": F.ECALPIDE,
-                "HCALPIDE": F.HCALPIDE,
-                "ELECTRONSHOWEREOP": F.ELECTRONSHOWEREOP,
-                "CLUSTERMATCH_CHI2": F.CLUSTERMATCH_CHI2,
-                "ELECTRONMATCH_CHI2": F.ELECTRONMATCH_CHI2,
-                "ELECTRONENERGY": F.ELECTRONENERGY,
-                "ELECTRONID": F.ELECTRONID,
-                "HCALEOP": F.HCALEOP,
-                "CALO_NEUTRAL_SHOWER_SHAPE": F.CALO_NEUTRAL_SHOWER_SHAPE,
-                "RICH_DLL_E": F.VALUE_OR(F.NaN)@F.RICH_DLL_E,
-            })
-    )
-
-decay_descriptor = {
-    'dst_kpi_os' : {
-        "Dst0":   "[ D*(2007)0 ->  (D0 ->  K-  pi+)  (gamma ->  e+  e-)]CC",
-        "D0":     "[ D*(2007)0 -> ^(D0 ->  K-  pi+)  (gamma ->  e+  e-)]CC",
-        "Kminus": "[ D*(2007)0 ->  (D0 -> ^K-  pi+)  (gamma ->  e+  e-)]CC",
-        "piplus": "[ D*(2007)0 ->  (D0 ->  K- ^pi+)  (gamma ->  e+  e-)]CC",
-        "gamma":  "[ D*(2007)0 ->  (D0 ->  K-  pi+) ^(gamma ->  e+  e-)]CC",
-        "eplus":  "[ D*(2007)0 ->  (D0 ->  K-  pi+)  (gamma -> ^e+  e-)]CC",
-        "eminus": "[ D*(2007)0 ->  (D0 ->  K-  pi+)  (gamma ->  e+ ^e-)]CC",
-    },
-
-    'dst_kpi_ss' : {
-        "Dst0":   "[ D*(2007)0 ->  (D0 ->  K-  pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "D0":     "[ D*(2007)0 -> ^(D0 ->  K-  pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "Kminus": "[ D*(2007)0 ->  (D0 -> ^K-  pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "piplus": "[ D*(2007)0 ->  (D0 ->  K- ^pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "gamma":  "[ D*(2007)0 ->  (D0 ->  K-  pi+) ^([gamma ->  e+  e+]CC)]CC",
-        "eplus":  "[ D*(2007)0 ->  (D0 ->  K-  pi+)  ([gamma -> ^e+  e+]CC)]CC",
-        "eminus": "[ D*(2007)0 ->  (D0 ->  K-  pi+)  ([gamma ->  e+ ^e+]CC)]CC",
-    },
-
-    'dst_k3pi_os' :  {
-        "Dst0":    "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)  (gamma ->  e+  e-)]CC",
-        "D0":      "[ D*(2007)0 -> ^(D0 -> K- pi- pi+ pi+)  (gamma ->  e+  e-)]CC",
-        "Kminus":  "[ D*(2007)0 ->  (D0 -> ^K- pi- pi+ pi+) (gamma ->  e+  e-)]CC",
-        "piminus": "[ D*(2007)0 ->  (D0 -> K- ^pi- pi+ pi+) (gamma ->  e+  e-)]CC",
-        "piplus1": "[ D*(2007)0 ->  (D0 -> K- pi- ^pi+ pi+) (gamma ->  e+  e-)]CC",
-        "piplus2": "[ D*(2007)0 ->  (D0 -> K- pi- pi+ ^pi+) (gamma ->  e+  e-)]CC",
-        "gamma":   "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+) ^(gamma ->  e+  e-)]CC",
-        "eplus":   "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)  (gamma -> ^e+  e-)]CC",
-        "eminus":  "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)  (gamma ->  e+ ^e-)]CC",
-    },
-
-    'dst_k3pi_ss' :  {
-        "Dst0":    "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)   ([gamma ->  e+  e+]CC)]CC",
-        "D0":      "[ D*(2007)0 -> ^(D0 -> K- pi- pi+ pi+)   ([gamma ->  e+  e+]CC)]CC",
-        "Kminus":  "[ D*(2007)0 ->  (D0 -> ^K- pi- pi+ pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "piminus": "[ D*(2007)0 ->  (D0 -> K- ^pi- pi+ pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "piplus1": "[ D*(2007)0 ->  (D0 -> K- pi- ^pi+ pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "piplus2": "[ D*(2007)0 ->  (D0 -> K- pi- pi+ ^pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "gamma":   "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)  ^([gamma ->  e+  e+]CC)]CC",
-        "eplus":   "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)   ([gamma -> ^e+  e+]CC)]CC",
-        "eminus":  "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)   ([gamma ->  e+ ^e+]CC)]CC",
-    },
-
-    'dsstp_2kpi_os' : {
-        "Dstp":   "[ D*_s+ ->  (D_s+ -> K- K+ pi+)  (gamma ->  e+  e-)]CC",
-        "DpDs":   "[ D*_s+ -> ^(D_s+ -> K- K+ pi+)  (gamma ->  e+  e-)]CC",
-        "Kminus": "[ D*_s+ ->  (D_s+ -> ^K- K+ pi+) (gamma ->  e+  e-)]CC",
-        "Kplus":  "[ D*_s+ ->  (D_s+ -> K- ^K+ pi+) (gamma ->  e+  e-)]CC",
-        "piplus": "[ D*_s+ ->  (D_s+ -> K- K+ ^pi+) (gamma ->  e+  e-)]CC",
-        "gamma":  "[ D*_s+ ->  (D_s+ -> K- K+ pi+) ^(gamma ->  e+  e-)]CC",
-        "eplus":  "[ D*_s+ ->  (D_s+ -> K- K+ pi+)  (gamma -> ^e+  e-)]CC",
-        "eminus": "[ D*_s+ ->  (D_s+ -> K- K+ pi+)  (gamma ->  e+ ^e-)]CC",
-    },
-    'dsstp_2kpi_ss' : {
-        "Dstp":   "[ D*_s+ ->  (D_s+ -> K- K+ pi+)   ([gamma ->  e+  e+]CC)]CC",
-        "DpDs":   "[ D*_s+ -> ^(D_s+ -> K- K+ pi+)   ([gamma ->  e+  e+]CC)]CC",
-        "Kminus": "[ D*_s+ ->  (D_s+ -> ^K- K+ pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "Kplus":  "[ D*_s+ ->  (D_s+ -> K- ^K+ pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "piplus": "[ D*_s+ ->  (D_s+ -> K- K+ ^pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "gamma":  "[ D*_s+ ->  (D_s+ -> K- K+ pi+)  ^([gamma ->  e+  e+]CC)]CC",
-        "eplus":  "[ D*_s+ ->  (D_s+ -> K- K+ pi+)   ([gamma -> ^e+  e+]CC)]CC",
-        "eminus": "[ D*_s+ ->  (D_s+ -> K- K+ pi+)   ([gamma ->  e+ ^e+]CC)]CC",
-    },
-
-}
-
-def MVA_dst_variables(line, pvs):
-    return (FunctorCollection( { "MVA": dst_BDT_functor(pvs, line=line)}))
-#make_dtf_variables(options,  input_data, ptype):
-def make_dtf_variables(options, input_data,  pvs, ptype="basic",  mass_constrain = ["D*(2007)0", "D0" ], nparticles=2):
-    
-    DTF = DecayTreeFitter(
-        name="DTF_{hash}",
-        input_particles=input_data,
-    )
-
-    DTF_DMass_BestPV = DecayTreeFitter(
-        name="DTF_DMass_BestPV_{hash}",
-        input_particles=input_data,
-        mass_constraints=mass_constrain,
-        input_pvs=pvs,
-        fit_all_pvs=False,
-    )
-    DTF_Mass_BestPV = DecayTreeFitter(
-        name="DTF_Mass_BestPV_{hash}",
-        input_particles=input_data,
-        mass_constraints=[mass_constrain[1]],
-        input_pvs=pvs,
-        fit_all_pvs=False,
-    )
-
-    DTF_BestPV = DecayTreeFitter(
-        name="DTF_BestPV_{hash}",
-        input_particles=input_data,
-        #mass_constraints=["D*(2007)0", "D0" ],
-        input_pvs=pvs,
-        fit_all_pvs=False,
-    )
-
-    DTF_DMass = DecayTreeFitter(
-        name="DTF_DMass_{hash}",
-        input_particles=input_data,
-        mass_constraints=mass_constrain,
-        output_level=3,
-    )
-    DTF_Mass = DecayTreeFitter(
-        name="DTF_Mass_{hash}",
-        input_particles=input_data,
-        mass_constraints=[mass_constrain[1]],
-        output_level=3,
-    )
-    
-    if ptype == "basic":
-        dtf_variables =  make_basic_dtf_variables
-    elif ptype == "composite":
-        if nparticles == 2:
-            dtf_variables = make_composite_dtf_variables 
-        elif nparticles == 3:
-            dtf_variables = make_composite_dtf_variables_3body
-        elif nparticles == 4:
-            dtf_variables = make_composite_dtf_variables_4body 
-
-    dtf_vars = dtf_variables(options, pvs, input_data,
-                                        DTF=DTF,
-                                        pv_constraint=False,
-                                        mass_constraint=False)
-    dtf_vars += dtf_variables(options, pvs, input_data,
-                                        DTF=DTF_BestPV,
-                                        pv_constraint=True,
-                                        mass_constraint=False)
-    dtf_vars += dtf_variables(options, pvs, input_data,
-                                        DTF=DTF_Mass,
-                                        pv_constraint=False,
-                                        mass_constraint=True, particle_name="D")
-    dtf_vars += dtf_variables(options, pvs, input_data,
-                                        DTF=DTF_Mass_BestPV,
-                                        pv_constraint=True,
-                                        mass_constraint=True, particle_name="D")
-    dtf_vars += dtf_variables(options, pvs, input_data,
-                                        DTF=DTF_DMass,
-                                        pv_constraint=False,
-                                        mass_constraint=True, particle_name="DstD")
-    dtf_vars += dtf_variables(options, pvs, input_data,
-                                        DTF=DTF_DMass_BestPV,
-                                        pv_constraint=True,
-                                        mass_constraint=True, particle_name="DstD")
-
-    return dtf_vars
-
-
-def make_Dst0ToD0EmEp_D0ToKmPip_tuple(options, line, pvs , rec_summary, dd='dst_kpi_os'):
-
-    input_data=get_particles(f"/Event/HLT2/{line}/Particles")
-    my_filter = create_lines_filter(f"LineFilter_{line}_{{hash}}",[line],)
-
-    fields = decay_descriptor[dd]
-    
-    composite_tuple_variables = {
-        "Dst0"   :  make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs,  "composite") +\
-             MVA_dst_variables("Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip", pvs) + make_DeltaM_variable(options), 
-        "D0"     :  make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs,  "composite"),
-        "gamma"  :  make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs,  "composite")
-    }
-    basic_tuple_variables = { 
-        "Kminus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"),
-        "piplus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"),
-        "eplus"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic") + extra_brem_variables,
-        "eminus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic") + extra_brem_variables,
-    }
-
-    my_tuple = Funtuple(
-        name=f"Tuple_{line}_{dd}",
-        tuple_name="DecayTree",
-        fields=fields,
-        variables= {**composite_tuple_variables, **basic_tuple_variables},
-        event_variables=make_hlt2_event_variables(options, pvs, rec_summary), 
-        inputs=input_data,
-        store_multiple_cand_info=True
-    )
-    return [ my_filter, my_tuple]
-
-def make_Dst0ToD0EmEp_D0ToKmPimPipPip_tuple(options, line, pvs, rec_summary, dd='dst_k3pi_os'):
-
-    input_data=get_particles(f"/Event/HLT2/{line}/Particles")
-    my_filter = create_lines_filter(f"LineFilter_{line}_{{hash}}",[line],)
-
-    fields = decay_descriptor[dd]
-    
-    composite_tuple_variables = {
-        "Dst0"   : make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs, "composite") +\
-             MVA_dst_variables("Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip", pvs) + make_DeltaM_variable(options), 
-        "D0"     : make_composite_variables_4body(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs, "composite", nparticles=4),
-        "gamma"  : make_composite_variables(options, pvs, input_data) 
-    }
-    basic_tuple_variables = { 
-        "Kminus"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"),
-        "piminus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"),
-        "piplus1" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"),
-        "piplus2" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"), 
-        "eplus"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic") + extra_brem_variables,
-        "eminus"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic") + extra_brem_variables,
-    }
-
-    my_tuple = Funtuple(
-        name=f"Tuple_{line}_{dd}",
-        tuple_name="DecayTree",
-        fields=fields,
-        variables= {**composite_tuple_variables, **basic_tuple_variables},
-        event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data,
-        store_multiple_cand_info=True
-    )
-    return [ my_filter, my_tuple]
-
-
-def make_DstpToDpDspEmEp_DpDspToKmKpPip_tuple(options, line, pvs , rec_summary, dd='dsstp_2kpi_os'):
-
-    input_data=get_particles(f"/Event/HLT2/{line}/Particles")
-    my_filter = create_lines_filter(f"LineFilter_{line}_{{hash}}",[line],)
-
-    fields = decay_descriptor[dd]
-
-    composite_tuple_variables = {
-        "Dstp"   : make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs, "composite", mass_constrain = ["D*_s+", "D_s+"]) +\
-             MVA_dst_variables("Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip", pvs) + make_DeltaM_variable(options), 
-        "DpDs"   : make_composite_variables_3body(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs, "composite", mass_constrain = ["D*_s+", "D_s+"], nparticles=3),
-        "gamma"  : make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs, "composite", mass_constrain = ["D*_s+", "D_s+"]),
-    }
-    basic_tuple_variables = { 
-        "Kminus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic",  mass_constrain = ["D*_s+", "D_s+"]),
-        "Kplus"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic",  mass_constrain = ["D*_s+", "D_s+"]),
-        "piplus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic",  mass_constrain = ["D*_s+", "D_s+"]),
-        "eplus"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic",  mass_constrain = ["D*_s+", "D_s+"])+ extra_brem_variables,
-        "eminus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic",  mass_constrain = ["D*_s+", "D_s+"])+ extra_brem_variables,
-    }
-
-    my_tuple = Funtuple(
-        name=f"Tuple_{line}_{dd}",
-        tuple_name="DecayTree",
-        fields=fields,
-        variables= {**composite_tuple_variables, **basic_tuple_variables},
-        event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data,
-        store_multiple_cand_info=True
-    )
-    return [ my_filter, my_tuple]
diff --git a/Charm_2024validation/options/hlt1.py b/Charm_2024validation/options/hlt1.py
deleted file mode 100644
index b93aeb113c..0000000000
--- a/Charm_2024validation/options/hlt1.py
+++ /dev/null
@@ -1,33 +0,0 @@
-###############################################################################
-# (c) Copyright 2023 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.                                       #
-###############################################################################
-"""
-Configures running HLT1 via Moore.
-"""
-
-from Moore import Options
-from Moore.config import allen_control_flow
-from RecoConf.hlt1_allen import allen_gaudi_config, get_allen_line_names
-from AllenConf.hlt1_calibration_lines import make_passthrough_line
-from PyConf.application import configure_input, configure
-
-def alg_config(options: Options):
-    """
-    Configures algorithm running of HLT1 via Moore to be passed to Analysis Productions.
-    """
-
-    config = configure_input(options)
-    with allen_gaudi_config.bind(sequence="hlt1_pp_matching_no_ut_1000KHz"), make_passthrough_line.bind(pre_scaler=1):
-        line_names = get_allen_line_names()
-        allen_node = allen_control_flow(options)
-        config.update(configure(options, allen_node))
-
-    return config
-
diff --git a/Charm_2024validation/options/hlt2/d0_to_hh.py b/Charm_2024validation/options/hlt2/d0_to_hh.py
deleted file mode 100644
index 3c0b0d0086..0000000000
--- a/Charm_2024validation/options/hlt2/d0_to_hh.py
+++ /dev/null
@@ -1,9 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_hh import all_lines as hh_lines
-
-def make_lines():
-    mylines = [builder() for builder in hh_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-
diff --git a/Charm_2024validation/options/hlt2/d0_to_hhhh.py b/Charm_2024validation/options/hlt2/d0_to_hhhh.py
deleted file mode 100644
index 81fe4dce30..0000000000
--- a/Charm_2024validation/options/hlt2/d0_to_hhhh.py
+++ /dev/null
@@ -1,8 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_hhhh import all_lines as hhhh_lines
-
-def make_lines():
-    mylines = [builder() for builder in hhhh_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
diff --git a/Charm_2024validation/options/hlt2/d0_to_hhpi0.py b/Charm_2024validation/options/hlt2/d0_to_hhpi0.py
deleted file mode 100644
index 52f8433c11..0000000000
--- a/Charm_2024validation/options/hlt2/d0_to_hhpi0.py
+++ /dev/null
@@ -1,8 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_hhpi0 import all_lines as hhpi0_lines
-
-def make_lines():
-    mylines = [builder() for builder in hhpi0_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
diff --git a/Charm_2024validation/options/hlt2/d0_to_kshh.py b/Charm_2024validation/options/hlt2/d0_to_kshh.py
deleted file mode 100644
index 79df310ed8..0000000000
--- a/Charm_2024validation/options/hlt2/d0_to_kshh.py
+++ /dev/null
@@ -1,8 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_kshh import all_lines as kshh_lines
-
-def make_lines():
-    mylines = [builder() for builder in kshh_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
diff --git a/Charm_2024validation/options/hlt2/d0_to_ksks.py b/Charm_2024validation/options/hlt2/d0_to_ksks.py
deleted file mode 100644
index 71ab403fd9..0000000000
--- a/Charm_2024validation/options/hlt2/d0_to_ksks.py
+++ /dev/null
@@ -1,8 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_ksks import all_lines as ksks_lines
-
-def make_lines():
-    mylines = [builder() for builder in ksks_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
diff --git a/Charm_2024validation/options/hlt2/d_to_hhh.py b/Charm_2024validation/options/hlt2/d_to_hhh.py
deleted file mode 100644
index cd718f9b86..0000000000
--- a/Charm_2024validation/options/hlt2/d_to_hhh.py
+++ /dev/null
@@ -1,10 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d_to_hhh import all_lines as hhh_lines
-from Hlt2Conf.lines.charm.detection_asymmetry_lines import all_lines as det_asy_lines
-
-def make_lines():
-    mylines = [builder() for builder in hhh_lines.values()]
-    mylines += [builder() for builder in det_asy_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
diff --git a/Charm_2024validation/options/hlt2/d_to_ksh.py b/Charm_2024validation/options/hlt2/d_to_ksh.py
deleted file mode 100644
index 8c8b172dd0..0000000000
--- a/Charm_2024validation/options/hlt2/d_to_ksh.py
+++ /dev/null
@@ -1,10 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d_to_ksh import all_lines as ksh_lines
-from Hlt2Conf.lines.charm.detection_asymmetry_lines import all_lines as det_asy_lines
-
-def make_lines():
-    mylines = [builder() for builder in ksh_lines.values()]
-    mylines += [builder() for builder in det_asy_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
diff --git a/Charm_2024validation/options/hlt2/dst_to_dee.py b/Charm_2024validation/options/hlt2/dst_to_dee.py
deleted file mode 100644
index 4fd67becd7..0000000000
--- a/Charm_2024validation/options/hlt2/dst_to_dee.py
+++ /dev/null
@@ -1,9 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.dst_to_dee import all_lines as dst_to_dee_lines
-
-def make_lines():
-    mylines = [builder() for builder in dst_to_dee_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-
diff --git a/Charm_2024validation/options/hlt2/hlt2.py b/Charm_2024validation/options/hlt2/hlt2.py
deleted file mode 100644
index c1560ce952..0000000000
--- a/Charm_2024validation/options/hlt2/hlt2.py
+++ /dev/null
@@ -1,32 +0,0 @@
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_d0_to_hh.py b/Charm_2024validation/options/hlt2/hlt2_d0_to_hh.py
deleted file mode 100644
index 7c3a67ed03..0000000000
--- a/Charm_2024validation/options/hlt2/hlt2_d0_to_hh.py
+++ /dev/null
@@ -1,41 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_hh import all_lines as hh_lines
-
-def make_lines():
-    mylines = [builder() for builder in hh_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_d0_to_hhhh.py b/Charm_2024validation/options/hlt2/hlt2_d0_to_hhhh.py
deleted file mode 100644
index d7d5dcbb90..0000000000
--- a/Charm_2024validation/options/hlt2/hlt2_d0_to_hhhh.py
+++ /dev/null
@@ -1,40 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_hhhh import all_lines as hhhh_lines
-
-def make_lines():
-    mylines = [builder() for builder in hhhh_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_d0_to_hhpi0.py b/Charm_2024validation/options/hlt2/hlt2_d0_to_hhpi0.py
deleted file mode 100644
index 063eeb274a..0000000000
--- a/Charm_2024validation/options/hlt2/hlt2_d0_to_hhpi0.py
+++ /dev/null
@@ -1,40 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_hhpi0 import all_lines as hhpi0_lines
-
-def make_lines():
-    mylines = [builder() for builder in hhpi0_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_d0_to_kshh.py b/Charm_2024validation/options/hlt2/hlt2_d0_to_kshh.py
deleted file mode 100644
index 3e1996cdf0..0000000000
--- a/Charm_2024validation/options/hlt2/hlt2_d0_to_kshh.py
+++ /dev/null
@@ -1,40 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_kshh import all_lines as kshh_lines
-
-def make_lines():
-    mylines = [builder() for builder in kshh_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_d0_to_ksks.py b/Charm_2024validation/options/hlt2/hlt2_d0_to_ksks.py
deleted file mode 100644
index e8d1052803..0000000000
--- a/Charm_2024validation/options/hlt2/hlt2_d0_to_ksks.py
+++ /dev/null
@@ -1,40 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_ksks import all_lines as ksks_lines
-
-def make_lines():
-    mylines = [builder() for builder in ksks_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_d_to_hhh.py b/Charm_2024validation/options/hlt2/hlt2_d_to_hhh.py
deleted file mode 100644
index 97965cb96e..0000000000
--- a/Charm_2024validation/options/hlt2/hlt2_d_to_hhh.py
+++ /dev/null
@@ -1,42 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d_to_hhh import all_lines as hhh_lines
-from Hlt2Conf.lines.charm.detection_asymmetry_lines import all_lines as det_asy_lines
-
-def make_lines():
-    mylines = [builder() for builder in hhh_lines.values()]
-    mylines += [builder() for builder in det_asy_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_d_to_ksh.py b/Charm_2024validation/options/hlt2/hlt2_d_to_ksh.py
deleted file mode 100644
index d2593da6a9..0000000000
--- a/Charm_2024validation/options/hlt2/hlt2_d_to_ksh.py
+++ /dev/null
@@ -1,42 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d_to_ksh import all_lines as ksh_lines
-from Hlt2Conf.lines.charm.detection_asymmetry_lines import all_lines as det_asy_lines
-
-def make_lines():
-    mylines = [builder() for builder in ksh_lines.values()]
-    mylines += [builder() for builder in det_asy_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_dst_to_dee.py b/Charm_2024validation/options/hlt2/hlt2_dst_to_dee.py
deleted file mode 100644
index d43ecbcd65..0000000000
--- a/Charm_2024validation/options/hlt2/hlt2_dst_to_dee.py
+++ /dev/null
@@ -1,41 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.dst_to_dee import all_lines as dst_to_dee_lines
-
-def make_lines():
-    mylines = [builder() for builder in dst_to_dee_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_rare_charm.py b/Charm_2024validation/options/hlt2/hlt2_rare_charm.py
deleted file mode 100644
index cb9ac88a02..0000000000
--- a/Charm_2024validation/options/hlt2/hlt2_rare_charm.py
+++ /dev/null
@@ -1,40 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.rare_charm_lines import all_lines as rare_charm_lines
-
-def make_lines():
-    mylines = [builder() for builder in rare_charm_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2noUT.py b/Charm_2024validation/options/hlt2/hlt2noUT.py
deleted file mode 100644
index 473127434b..0000000000
--- a/Charm_2024validation/options/hlt2/hlt2noUT.py
+++ /dev/null
@@ -1,32 +0,0 @@
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf_without_UT
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf_without_UT),\
-         require_gec.bind(skipUT=True),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/options/hlt2/make_hlt2_decay.sh b/Charm_2024validation/options/hlt2/make_hlt2_decay.sh
deleted file mode 100644
index f127b86285..0000000000
--- a/Charm_2024validation/options/hlt2/make_hlt2_decay.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-cat d0_to_hh.py hlt2.py > hlt2_d0_to_hh.py
-cat d0_to_hhpi0.py hlt2.py > hlt2_d0_to_hhpi0.py
-cat d0_to_hhhh.py hlt2.py > hlt2_d0_to_hhhh.py
-cat d0_to_kshh.py hlt2.py > hlt2_d0_to_kshh.py
-cat d0_to_ksks.py hlt2.py > hlt2_d0_to_ksks.py
-cat d_to_hhh.py hlt2.py > hlt2_d_to_hhh.py
-cat d_to_ksh.py hlt2.py > hlt2_d_to_ksh.py
-cat rare_charm.py hlt2.py > hlt2_rare_charm.py
-cat dst_to_dee.py hlt2.py > hlt2_dst_to_dee.py
diff --git a/Charm_2024validation/options/hlt2/rare_charm.py b/Charm_2024validation/options/hlt2/rare_charm.py
deleted file mode 100644
index 39194555f0..0000000000
--- a/Charm_2024validation/options/hlt2/rare_charm.py
+++ /dev/null
@@ -1,8 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.rare_charm_lines import all_lines as rare_charm_lines
-
-def make_lines():
-    mylines = [builder() for builder in rare_charm_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
diff --git a/Charm_2024validation/options/rare_charm.py b/Charm_2024validation/options/rare_charm.py
deleted file mode 100644
index d4d4a5d83d..0000000000
--- a/Charm_2024validation/options/rare_charm.py
+++ /dev/null
@@ -1,496 +0,0 @@
-from .tupling import (
-    make_composite_variables,
-    make_composite_variables_3body,
-    make_DeltaM_variable,
-    make_basic_variables,
-    make_hlt2_event_variables,
-    make_top_isolation_variables,
-    make_basic_isolation_variables,
-    make_intermediate_isolation_variables,
-    make_composite_dtf_variables,
-    make_composite_dtf_variables_3body,
-    make_basic_dtf_variables,
-)
-
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunTuple_Particles as Funtuple
-
-def make_dtf_variables_hmumu(options, pvs, input_data, ptype):
-
-    if ptype not in ["basic", "composite"]:
-        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
-
-    from DecayTreeFitter import DecayTreeFitter
-    
-    DTF = DecayTreeFitter(
-        name=f'DTF_{{hash}}',
-        input_particles=input_data)
-
-    DTFvtx = DecayTreeFitter(
-        name=f'DTFvtx_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    DTFmassDp = DecayTreeFitter(
-        name=f'DTFmassDp_{{hash}}',
-        input_particles=input_data,
-        mass_constraints=["D+"])
-
-    DTFvtxmassDp = DecayTreeFitter(
-        name=f'DTFvtxmassDp_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D+"])
-
-    DTFmassDsp = DecayTreeFitter(
-        name=f'DTFmassDsp_{{hash}}',
-        input_particles=input_data,
-        substitutions = ['D+{{D_s+}}'],
-        mass_constraints=["D_s+"])
-
-    DTFvtxmassDsp = DecayTreeFitter(
-        name=f'DTFvtxmassDsp_{{hash}}',
-        input_particles=input_data,
-        substitutions = ['D+{{D_s+}}',"J/psi(1S){{J/psi(1S)}}"],#trick
-        mass_constraints=["D_s+"],
-        input_pvs=pvs,
-    )
-
-    if ptype == "basic":
-        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassDp,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="Dp")
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassDp,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="Dp")
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassDsp,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="Dsp")
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassDsp,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="Dsp")
-        return dtf_vars
-
-    if ptype == "composite":
-        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassDp,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="Dp")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassDp,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="Dp")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassDsp,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="Dsp")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassDsp,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="Dsp")
-        return dtf_vars
-
-
-def make_dtf_variables_pmumu(options, pvs, input_data, ptype):
-
-    if ptype not in ["basic", "composite"]:
-        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
-
-    from DecayTreeFitter import DecayTreeFitter
-    
-    DTF = DecayTreeFitter(
-        name=f'DTF_{{hash}}',
-        input_particles=input_data)
-
-    DTFvtx = DecayTreeFitter(
-        name=f'DTFvtx_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    DTFmass = DecayTreeFitter(
-        name=f'DTFmass_{{hash}}',
-        input_particles=input_data,
-        mass_constraints=["Lambda_c+"])
-
-    DTFvtxmass = DecayTreeFitter(
-        name=f'DTFvtxmass_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["Lambda_c+"])
-
-    if ptype == "basic":
-        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmass,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="Lc")
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmass,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="Lc")
-        return dtf_vars
-
-    if ptype == "composite":
-        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmass,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="D0")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmass,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="D0")
-        return dtf_vars
-
-def make_dtf_variables_hhmumu(options, pvs, input_data, ptype):
-
-    if ptype not in ["basic", "composite","composite3b"]:
-        Exception(f"I want \'basic\' or \'composite\' or \'composite3b\. Got {ptype}")
-
-    from DecayTreeFitter import DecayTreeFitter
-    
-    DTF = DecayTreeFitter(
-        name=f'DTF_{{hash}}',
-        input_particles=input_data)
-
-    DTFvtx = DecayTreeFitter(
-        name=f'DTFvtx_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    DTFmass = DecayTreeFitter(
-        name=f'DTFmass_{{hash}}',
-        input_particles=input_data,
-        mass_constraints=["D0"])
-
-    DTFvtxmass = DecayTreeFitter(
-        name=f'DTFvtxmass_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0"])
-
-    if ptype == "basic":
-        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmass,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="D0")
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmass,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="D0")
-        return dtf_vars
-
-    if ptype == "composite3b":
-        dtf_vars = make_composite_dtf_variables_3body(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
-                                             DTF=DTFmass,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="D0")
-        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
-                                             DTF=DTFvtxmass,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="D0")
-
-        return dtf_vars
-        
-    if ptype == "composite":
-        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmass,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="D0")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmass,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="D0")
-        return dtf_vars
-
-
-def maketuple_D2pimumu(options, pvs, rec_summary):
-    name = "D2pimumu"
-    turbo_line = "Hlt2Charm_DpDspToPipMumMup"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (J/psi(1S) -> mu- mu+) pi+]CC",
-        "Jpsi" : "[D+ -> ^(J/psi(1S) -> mu- mu+) pi+]CC",
-        "lm"   : "[D+ -> (J/psi(1S) -> ^mu- mu+) pi+]CC",
-        "lp"   : "[D+ -> (J/psi(1S) -> mu- ^mu+) pi+]CC",
-        "hp" : "[D+ -> (J/psi(1S) -> mu- mu+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
-        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation: 
-
-        variables = {
-            "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-            "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2pimumu_WS(options, pvs, rec_summary):
-    name = "D2pimumu_WS"
-    turbo_line = "Hlt2Charm_DpDspToPipMupMup_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (J/psi(1S) -> mu+ mu+) pi+]CC",
-        "Jpsi" : "[D+ -> (J/psi(1S) -> mu+ mu+) pi+]CC",
-        "lp1"   : "[D+ -> (J/psi(1S) -> ^mu+ mu+) pi+]CC",
-        "lp2"   : "[D+ -> (J/psi(1S) -> mu+ ^mu+) pi+]CC",
-        "hp" : "[D+ -> (J/psi(1S) -> mu+ mu+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
-        "lp1"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-        "lp2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation: 
-
-        variables = {
-            "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-            "lp1"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "lp2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2pipipi(options, pvs, rec_summary):
-    name = "CharmRD_D2pipipi"
-    turbo_line = "Hlt2Charm_DpDspToPipPimPip_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (J/psi(1S) -> pi- pi+) pi+]CC",
-        "Jpsi" : "[D+ -> (J/psi(1S) -> pi- pi+) pi+]CC",
-        "lm"   : "[D+ -> (J/psi(1S) -> ^pi- pi+) pi+]CC",
-        "lp"   : "[D+ -> (J/psi(1S) -> pi- ^pi+) pi+]CC",
-        "hp" : "[D+ -> (J/psi(1S) -> pi- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
-        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation: 
-
-        variables = {
-            "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-            "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2piee(options, pvs, rec_summary):
-    name = "D2piee"
-    turbo_line = "Hlt2Charm_DpDspToPipEmEp"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (J/psi(1S) -> e- e+) pi+]CC",
-        "Jpsi" : "[D+ -> ^(J/psi(1S) -> e- e+) pi+]CC",
-        "lm"   : "[D+ -> (J/psi(1S) -> ^e- e+) pi+]CC",
-        "lp"   : "[D+ -> (J/psi(1S) -> e- ^e+) pi+]CC",
-        "hp" : "[D+ -> (J/psi(1S) -> e- e+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
-        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation: 
-
-        variables = {
-            "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-            "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Lc2pmumu(options, pvs, rec_summary):
-    name = "Lc2pmumu"
-    turbo_line = "Hlt2Charm_LcpToPpMumMup"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Lc" : "[Lambda_c+ -> (J/psi(1S) -> mu- mu+) p+]CC",
-        "Jpsi" : "[Lambda_c+ -> ^(J/psi(1S) -> mu- mu+) p+]CC",
-        "lm"   : "[Lambda_c+ -> (J/psi(1S) -> ^mu- mu+) p+]CC",
-        "lp"  : "[Lambda_c+ -> (J/psi(1S) -> mu- ^mu+) p+]CC",
-        "pp" : "[Lambda_c+ -> (J/psi(1S) -> mu- mu+) ^p+]CC",
-    }
-
-    variables = {
-        "Lc"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "pp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation: 
-
-        variables = {
-            "Lc"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-            "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "pp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02Kpimumu_RS(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02Kpimumu_RS"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPipMumMup"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^(D0 -> K- pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
-        "Km"   : "[D*(2010)+ -> (D0 -> ^K- pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
-        "pip"  : "[D*(2010)+ -> (D0 -> K- ^pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
-        "Jpsi"  : "[D*(2010)+ -> (D0 -> K- pi+ ^(J/psi(1S) -> mu- mu+)) pi+]CC",
-        "lm"  : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> ^mu- mu+)) pi+]CC",
-        "lp"  : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> mu- ^mu+)) pi+]CC",
-        "spip" : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> mu- mu+)) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite"),
-        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation: 
-
-        variables = {
-            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
-            "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
-            "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-            "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
diff --git a/Charm_2024validation/options/tupling.py b/Charm_2024validation/options/tupling.py
deleted file mode 100644
index 99de572726..0000000000
--- a/Charm_2024validation/options/tupling.py
+++ /dev/null
@@ -1,986 +0,0 @@
-##############################################################################
-# (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.                                       #
-###############################################################################
-"""Common configuration functions
-
-"""
-
-import Functors as F
-from Functors.math import log
-import Functors.math as fmath
-
-from FunTuple import FunctorCollection
-from FunTuple.functorcollections import (
-    MCHierarchy,
-    MCPromptDecay,
-    Kinematics,
-    SelectionInfo,
-    HltTisTos,
-    MCVertexInfo,
-    MCKinematics,
-    ParticleID, #wrong variables PID_PI = 0, PROBNN_D = nan
-    EventInfo,
-    LHCInfo,
-    ParticleIsolation,
-    MCPrimaries,
-    MCReconstructed,
-    MCReconstructible,
-)
-
-from DaVinciMCTools import MCTruthAndBkgCat, MCReconstructed, MCReconstructible
-from PyConf.Algorithms import ParticleToSubcombinationsAlg
-from DecayTreeFitter import DecayTreeFitter
-
-Hlt1_global_lines = [
-    "Hlt1GECPassthroughDecision",
-    "Hlt1BeamGasDecision",
-    "Hlt1PassthroughDecision",
-    "Hlt1NoBeamDecision",
-    "Hlt1BeamOneDecision",
-    "Hlt1BeamTwoDecision",
-    "Hlt1BothBeamsDecision",
-    "Hlt1ODINLumiDecision",
-    "Hlt1ODINVeloOpenDecision",
-    "Hlt1ODINNoBiasDecision",
-    "Hlt1VeloMicroBiasDecision",
-    "Hlt1RICH1AlignmentDecision",
-    "Hlt1RICH2AlignmentDecision",
-    "Hlt1BeamGasDecision",
-    "Hlt1L02PPiDecision",
-    "Hlt1LowMassNoipDielectron_massSlice1_promptDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice1_promptDecision",
-    "Hlt1LowMassNoipDielectron_massSlice2_promptDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice2_promptDecision",
-    "Hlt1LowMassNoipDielectron_massSlice3_promptDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice3_promptDecision",
-    "Hlt1LowMassNoipDielectron_massSlice4_promptDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice4_promptDecision",
-    "Hlt1LowMassNoipDielectron_massSlice1_displacedDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice1_displacedDecision",
-    "Hlt1LowMassNoipDielectron_massSlice2_displacedDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice2_displacedDecision",
-    "Hlt1LowMassNoipDielectron_massSlice3_displacedDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice3_displacedDecision",
-    "Hlt1LowMassNoipDielectron_massSlice4_displacedDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice4_displacedDecision",
-]
-Hlt1_1track_lines = [
-    "Hlt1TrackMVADecision",
-    "Hlt1LowPtMuonDecision",
-    "Hlt1SingleHighPtMuonDecision",
-    "Hlt1SingleHighPtMuonNoMuIDDecision",
-    "Hlt1TrackMuonMVADecision",
-    "Hlt1OneMuonTrackLineDecision",
-    "Hlt1TrackElectronMVADecision",
-    "Hlt1SingleHighPtElectronDecision",
-    "Hlt1SingleHighEtDecision",
-]
-Hlt1_lines = Hlt1_1track_lines+[
-    "Hlt1TwoTrackMVACharmXSecDecision",
-    "Hlt1TwoTrackMVADecision",
-    "Hlt1TwoTrackKsDecision",
-    "Hlt1D2KPiDecision",
-    "Hlt1D2KKDecision",
-    "Hlt1D2PiPiDecision",
-    "Hlt1KsToPiPiDecision",
-    "Hlt1LowPtDiMuonDecision",#removed
-    "Hlt1DiMuonNoIPDecision",
-    "Hlt1DiMuonNoIP_ssDecision",
-    "Hlt1DiMuonHighMassDecision",
-    "Hlt1DiMuonLowMassDecision",#replaced by Hlt1DiMuonDisplacedDecision
-    "Hlt1DiMuonSoftDecision",
-    "Hlt1DiMuonDisplacedDecision",
-    "Hlt1TwoKsDecision",
-    "Hlt1D2KPiAlignmentDecision",
-    "Hlt1DiMuonHighMassAlignmentDecision",
-    "Hlt1DisplacedDiMuonAlignmentDecision",
-    "Hlt1DisplacedDielectronDecision",
-    "Hlt1DisplacedLeptonsDecision",#removed
-]
-
-
-Hlt2_lines = [
-    "Hlt2Charm_DstpToD0Pip_D0ToKmPip_XSec",
-    "Hlt2Charm_D0ToKmPip_XSec",
-    "Hlt2Charm_D0ToKmKp",
-    "Hlt2Charm_D0ToKmPip",
-    "Hlt2Charm_D0ToPimPip",
-    "Hlt2Charm_DpDspToKsKp_DD",
-    "Hlt2Charm_DpDspToKsKp_LD",
-    "Hlt2Charm_DpDspToKsKp_LL",
-    "Hlt2Charm_DpDspToKsPip_DD",
-    "Hlt2Charm_DpDspToKsPip_LD",
-    "Hlt2Charm_DpDspToKsPip_LL",
-    "Hlt2Charm_DpToKmPipPip",
-    "Hlt2Charm_DspToKmKpPip",
-    "Hlt2Charm_DpToKmPipPip_NoCuts",
-    "Hlt2Charm_DspToKmKpPip_NoCuts",
-    "Hlt2Charm_DpToKmPipPip_XSec",
-    "Hlt2Charm_DspToKmKpPip_XSec",
-    "Hlt2Charm_DstpToD0Pip_D0ToKmKp",
-    "Hlt2Charm_DstpToD0Pip_D0ToKmPip",
-    "Hlt2Charm_DstpToD0Pip_D0ToKpPim",
-    "Hlt2Charm_DstpToD0Pip_D0ToPimPip",
-    "Hlt2Charm_DstpToD0Pip_D0ToKmPip_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKpPim_LowBias",
-    "Hlt2Charm_D0ToKmPip_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKmKp_LowBias",
-    "Hlt2Charm_D0ToKmKp_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToPimPip_LowBias",
-    "Hlt2Charm_D0ToPimPip_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLL",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLL_Tight",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLDD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLDD_Tight",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDDD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDDD_Tight",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULLL",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULLL_Tight",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULDD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULDD_Tight",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLD_Tight",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDLD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDLD_Tight",
-    "Hlt2Charm_D0ToKsPimPip_LL",
-    "Hlt2Charm_D0ToKsPimPip_DD",
-    "Hlt2Charm_D0ToKsPimPip_LL_LowBias",
-    "Hlt2Charm_D0ToKsPimPip_LL_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_LL",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_DD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_LL_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_DD_LowBias",
-    "Hlt2Charm_D0ToKsKmPip_LL",
-    "Hlt2Charm_D0ToKsKmPip_DD",
-    "Hlt2Charm_D0ToKsKmPip_LL_LowBias",
-    "Hlt2Charm_D0ToKsKmPip_LL_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_LL",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_DD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_LL_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_DD_LowBias",
-    "Hlt2Charm_D0ToKsKpPim_LL",
-    "Hlt2Charm_D0ToKsKpPim_DD",
-    "Hlt2Charm_D0ToKsKpPim_LL_LowBias",
-    "Hlt2Charm_D0ToKsKpPim_DD_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_LL",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_DD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_LL_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_DD_LowBias",
-    "Hlt2Charm_D0ToKsKmKp_LL",
-    "Hlt2Charm_D0ToKsKmKp_DD",
-    "Hlt2Charm_D0ToKsKmKp_LL_LowBias",
-    "Hlt2Charm_D0ToKsKmKp_DD_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_LL",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_DD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_LL_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_DD_LowBias",
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS',
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS',
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS_MVA',
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS_MVA',
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS',
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS',
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS_MVA',
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS_MVA',
-    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS',
-    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS',
-    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS_MVA',
-    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS_MVA',
-]
-
-def make_composite_variables(options, pvs, data, add_truth=True, add_Hlt1TisTos=True):
-    if not options.simulation:
-        add_truth = False
-    variables = (
-        FunctorCollection(
-            {
-                "MAXPT": F.MAX(F.PT),
-                "MINPT": F.MIN(F.PT),
-                "SUMPT": F.SUM(F.PT),
-                "MAXP": F.MAX(F.P),
-                "MINP": F.MIN(F.P),
-                "BPVDIRA": F.BPVDIRA(pvs),
-                "VCHI2DOF": F.CHI2DOF,
-                #"VNDOF": F.NDOF,
-                "BPVFDCHI2": F.BPVFDCHI2(pvs),
-                "BPVFD": F.BPVFD(pvs),
-                "BPVVDRHO": F.BPVVDRHO(pvs),
-                "BPVVDZ": F.BPVVDZ(pvs),
-                "BPVIPCHI2": F.BPVIPCHI2(pvs),
-                "BPVIP": F.BPVIP(pvs),
-                "LOGBPVIPCHI2": log(F.BPVIPCHI2(pvs)),
-                "BPVLTIME": F.BPVLTIME(pvs),
-                "MAXBPVIPCHI2": F.MAX(F.BPVIPCHI2(pvs)),
-                "MINBPVIPCHI2": F.MIN(F.BPVIPCHI2(pvs)),
-                "MAXBPVIP": F.MAX(F.BPVIP(pvs)),
-                "MINBPVIP": F.MIN(F.BPVIP(pvs)),
-                "MAXDOCACHI2": F.MAXDOCACHI2,
-                "MAXDOCA": F.MAXDOCA,
-                "MAXSDOCACHI2": F.MAXSDOCACHI2,
-                "MAXSDOCA": F.MAXSDOCA,
-                "ETA": F.ETA,
-                "PHI": F.PHI,
-                "END_VX": F.END_VX,
-                "END_VY": F.END_VY,
-                "END_VZ": F.END_VZ,
-                "END_VX_ERR":F.SQRT @ F.CALL(0,0) @ F.POS_COV_MATRIX @ F.ENDVERTEX,
-                "END_VY_ERR":F.SQRT @ F.CALL(1,1) @ F.POS_COV_MATRIX @ F.ENDVERTEX,
-                "END_VZ_ERR":F.SQRT @ F.CALL(2,2) @ F.POS_COV_MATRIX @ F.ENDVERTEX,
-                "BPVX": F.BPVX(pvs),
-                "BPVY": F.BPVY(pvs),
-                "BPVZ": F.BPVZ(pvs),
-                "BPVX_ERR": F.SQRT @ F.CALL(0,0) @ F.POS_COV_MATRIX @ F.BPV(pvs),
-                "BPVY_ERR": F.SQRT @ F.CALL(1,1) @ F.POS_COV_MATRIX @ F.BPV(pvs),
-                "BPVZ_ERR": F.SQRT @ F.CALL(2,2) @ F.POS_COV_MATRIX @ F.BPV(pvs),
-                "ALLPVFD"     : F.ALLPV_FD(pvs),
-                "ALLPVIP"     : F.ALLPV_IP(pvs),
-                "OBJECT_KEY": F.OBJECT_KEY,
-            }
-        )
-        + Kinematics()
-        #+ ParticleID(extra_info=True) #only for daughters
-    )
-
-    if add_Hlt1TisTos:
-        variables += HltTisTos(
-            selection_type="Hlt1", trigger_lines=Hlt1_lines, data=data
-        )
-
-    if add_truth:
-        variables = add_truth_matching_functors(
-            options,
-            variables,
-            data,
-            hierarchy=True,
-            kinematics=True,
-            vertex_info=True,
-            bkgcat=True,
-        )
-
-    return variables
-
-def make_tistoscombinations(options, pvs, data):
-    algo_output = ParticleToSubcombinationsAlg( Input=data )
-    relations = algo_output.OutputRelations
-
-    tistos_variables_extra = HltTisTos(
-        selection_type="Hlt1", trigger_lines=["Hlt1TwoTrackMVADecision"], data=algo_output.OutputParticles
-    )
-    tistos_combinations = {}
-    for k,v in tistos_variables_extra.get_thor_functors().items():
-        tistos_combinations[k + "_SUBCOMB" ] = F.MAP_INPUT_ARRAY( v, relations )
-    tistos_combinations = FunctorCollection( tistos_combinations )
-
-    return tistos_combinations
-
-def make_composite_variables_3body(options, pvs, data, add_truth=True):
-
-    variables = (
-        FunctorCollection(
-            {
-                #12
-                "M12": F.SUBCOMB(Functor=F.MASS, Indices=(1, 2)),
-                "SDOCA12"     : F.SDOCA(Child1=1,Child2=2),
-                "SDOCACHI212" : F.SDOCACHI2(Child1=1,Child2=2),
-                "DOCA12"      : F.DOCA(Child1=1,Child2=2),
-                "DOCACHI212"  : F.DOCACHI2(Child1=1,Child2=2),
-                "COS12": F.ALV(1, 2),
-                #"ETA12": F.SUBCOMB(Functor=F.ETA, Indices=(1, 2)),
-                #"PT12": F.SUBCOMB(Functor=F.PT, Indices=(1, 2)),
-                #"VCHI212": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(1, 2)),
-                #"END_VZ12": F.SUBCOMB(Functor=F.END_VZ, Indices=(1, 2)),
-                #"BPVZ12": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(1, 2)),
-                #"BPVCORRM12": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(1, 2)),
-                #13
-                "M13": F.SUBCOMB(Functor=F.MASS, Indices=(1, 3)),
-                "SDOCA13"     : F.SDOCA(Child1=1,Child2=3),
-                "SDOCACHI213" : F.SDOCACHI2(Child1=1,Child2=3),
-                "DOCA13"      : F.DOCA(Child1=1,Child2=3),
-                "DOCACHI213"  : F.DOCACHI2(Child1=1,Child2=3),
-                "COS13": F.ALV(1, 3),
-                #"ETA13": F.SUBCOMB(Functor=F.ETA, Indices=(1, 3)),
-                #"PT13": F.SUBCOMB(Functor=F.PT, Indices=(1, 3)),
-                #"VCHI213": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(1, 3)),
-                #"END_VZ13": F.SUBCOMB(Functor=F.END_VZ, Indices=(1, 3)),
-                #"BPVZ13": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(1, 3)),
-                #"BPVCORRM13": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(1, 3)),
-                #23
-                "M23": F.SUBCOMB(Functor=F.MASS, Indices=(2, 3)),
-                "SDOCA23"     : F.SDOCA(Child1=2,Child2=3),
-                "SDOCACHI223" : F.SDOCACHI2(Child1=2,Child2=3),
-                "DOCA23"      : F.DOCA(Child1=2,Child2=3),
-                "DOCACHI223"  : F.DOCACHI2(Child1=2,Child2=3),
-                "COS23": F.ALV(2, 3),
-                #"ETA23": F.SUBCOMB(Functor=F.ETA, Indices=(2, 3)),
-                #"PT23": F.SUBCOMB(Functor=F.PT, Indices=(2, 3)),
-                #"VCHI223": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(2, 3)),
-                #"END_VZ23": F.SUBCOMB(Functor=F.END_VZ, Indices=(2, 3)),
-                #"BPVZ23": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(2, 3)),
-                #"BPVCORRM23": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(2, 3)),
-            }
-        )
-    )
-    return make_composite_variables(options, pvs, data, add_truth)+make_tistoscombinations(options, pvs, data)+variables
-
-def make_composite_variables_4body(options, pvs, data, add_truth=True):
-
-    variables = (
-        FunctorCollection(
-            {
-                #14
-                "M14": F.SUBCOMB(Functor=F.MASS, Indices=(1, 4)),
-                "SDOCA14"     : F.SDOCA(Child1=1,Child2=4),
-                "SDOCACHI214" : F.SDOCACHI2(Child1=1,Child2=4),
-                "DOCA14"      : F.DOCA(Child1=1,Child2=4),
-                "DOCACHI214"  : F.DOCACHI2(Child1=1,Child2=4),
-                "COS14": F.ALV(1, 4),
-                #"ETA14": F.SUBCOMB(Functor=F.ETA, Indices=(1, 4)),
-                #"PT14": F.SUBCOMB(Functor=F.PT, Indices=(1, 4)),
-                #"VCHI214": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(1, 4)),
-                #"END_VZ14": F.SUBCOMB(Functor=F.END_VZ, Indices=(1, 4)),
-                #"BPVZ14": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(1, 4)),
-                #"BPVCORRM14": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(1, 4)),
-                #24
-                "M24": F.SUBCOMB(Functor=F.MASS, Indices=(2, 4)),
-                "SDOCA24"     : F.SDOCA(Child1=2,Child2=4),
-                "SDOCACHI224" : F.SDOCACHI2(Child1=2,Child2=4),
-                "DOCA24"      : F.DOCA(Child1=2,Child2=4),
-                "DOCACHI224"  : F.DOCACHI2(Child1=2,Child2=4),
-                "COS24": F.ALV(2, 4),
-                #"ETA24": F.SUBCOMB(Functor=F.ETA, Indices=(2, 4)),
-                #"PT24": F.SUBCOMB(Functor=F.PT, Indices=(2, 4)),
-                #"VCHI224": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(2, 4)),
-                #"END_VZ24": F.SUBCOMB(Functor=F.END_VZ, Indices=(2, 4)),
-                #"BPVZ24": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(2, 4)),
-                #"BPVCORRM24": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(2, 4)),
-                #34
-                "M34": F.SUBCOMB(Functor=F.MASS, Indices=(3, 4)),
-                "SDOCA34"     : F.SDOCA(Child1=3,Child2=4),
-                "SDOCACHI234" : F.SDOCACHI2(Child1=3,Child2=4),
-                "DOCA34"      : F.DOCA(Child1=3,Child2=4),
-                "DOCACHI234"  : F.DOCACHI2(Child1=3,Child2=4),
-                "COS34": F.ALV(3, 4),
-                #"ETA34": F.SUBCOMB(Functor=F.ETA, Indices=(3, 4)),
-                #"PT34": F.SUBCOMB(Functor=F.PT, Indices=(3, 4)),
-                #"VCHI234": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(3, 4)),
-                #"END_VZ34": F.SUBCOMB(Functor=F.END_VZ, Indices=(3, 4)),
-                #"BPVZ34": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(3, 4)),
-                #"BPVCORRM34": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(3, 4)),
-            }
-        )
-    )
-    return make_composite_variables_3body(options, pvs, data, add_truth)+variables #make_tistoscombinations already included
-
-def make_b_composite_variables(options, pvs, data, add_truth=True):
-    
-    # define helper functors
-    get_child = F.CHILD(1, F.FORWARDARG0) # change here the index of the child
-    get_SV =  F.ENDVERTEX @ F.FORWARDARG0
-    get_SV_pos = F.TOLINALG @ F.POSITION @ get_SV # only if composite (i.e. has vertex)
-    get_child_endvtx_pos = F.ENDVERTEX_POS  @ get_child
-    get_fdvec_child = get_child_endvtx_pos - get_SV_pos
-
-    # define observables
-    IP_wrt_SV = F.IP.bind(get_SV_pos , get_child)
-    IPCHI2_wrt_SV = F.IPCHI2.bind(get_SV , get_child) # only if child is composite (i.e. has vertex)
-    FD_wrt_SV = F.MAGNITUDE @ get_fdvec_child
-    FDCHI2_wrt_SV = F.VTX_FDCHI2.bind(get_SV, get_child)
-
-    
-    variables = FunctorCollection(
-        {       
-            "ID": F.PARTICLE_ID ,
-            "PT": F.PT,
-            "P": F.P,
-            "MASS": F.MASS,
-            "CHILD1_IPwrtSV": IP_wrt_SV,
-            "CHILD1_IPCHI2wrtSV": IPCHI2_wrt_SV,
-            "CHILD1_FDwrtSV": FD_wrt_SV,
-            "CHILD1_FDCHI2wrtSV": FDCHI2_wrt_SV,
-            "PX": F.PX,
-            "PY": F.PY,
-            "PZ": F.PZ,
-            "END_VCHI2DOF": F.CHI2DOF @ F.ENDVERTEX,
-            "BPVCHI2DOF": F.CHI2DOF @ F.BPV(pvs),
-            # B2OC generic B hadron NN Hlt2 algorithm,
-            # not planning to use it directly for B2OC EM
-            "MVA": F.MVA(
-                MVAType="SigmaNet",
-                Config={
-                    "File":
-                    "paramfile://data/Hlt2B2OC_B_SigmaNet_Run3-v1.json",
-                    "Name":
-                    "B2OC_SigmaNet_Generic",
-                    "Lambda":
-                    "2.0",
-                    "NLayers":
-                    "3",
-                    "InputSize":
-                    "6",
-                    "Monotone_Constraints":
-                    "[1,-1,-1,-1,-1,-1]",
-                    "Variables":
-                    "log_B_PT,B_ETA,log_B_DIRA,log_B_ENDVERTEX_CHI2,log_B_IPCHI2_OWNPV,log_B_IP_OWNPV",
-                },
-                Inputs={
-                    "log_B_PT": fmath.log(F.PT),
-                    "B_ETA": F.ETA,
-                    "log_B_DIRA": fmath.log(1. - F.BPVDIRA(pvs)),
-                    "log_B_ENDVERTEX_CHI2": fmath.log(F.CHI2DOF),
-                    "log_B_IPCHI2_OWNPV": fmath.log(F.BPVIPCHI2(pvs)),
-                    "log_B_IP_OWNPV": fmath.log(F.BPVIP(pvs)),
-                }),
-            #'SSPionBDT_Mistag': F.SSPionBDT_Mistag(sspionTagging.OutputFlavourTags),
-            #'SSPionBDT_Decision': F.SSPionBDT_Decision(sspionTagging.OutputFlavourTags),
-
-        }
-    )
-    return make_composite_variables(options, pvs, data, add_truth)+make_tistoscombinations(options, pvs, data)+variables
-
-def make_DeltaM_variable(options):
-    return FunctorCollection({"DM": F.MASS - F.CHILD(1, F.MASS)})
-
-def make_basic_variables(options, pvs, data, add_truth=True, islong = True):
-    if not options.simulation:
-        add_truth = False
-    variables = (
-        FunctorCollection(
-            {
-                "TRCHI2DOF": F.CHI2DOF @ F.TRACK,
-                "ETA": F.ETA,
-                "PHI": F.PHI,
-                "TRGHOSTPROB": F.GHOSTPROB,
-                "BPVIPCHI2": F.BPVIPCHI2(pvs),
-                "BPVIP": F.BPVIP(pvs),
-                "BPVX": F.BPVX(pvs),
-                "BPVY": F.BPVY(pvs),
-                "BPVZ": F.BPVZ(pvs),
-                "TX"          : F.TX,
-                "TY"          : F.TY,
-                "MINIPCHI2"   : F.MINIPCHI2(pvs),
-                "MINIP"       : F.MINIP(pvs),
-                "KEY"         : F.VALUE_OR(-1) @ F.OBJECT_KEY @ F.TRACK,
-                "ISMUON"      : F.ISMUON,
-                "TRACKPT": F.TRACK_PT,
-                "TRACKHISTORY": F.VALUE_OR(-1) @ F.TRACKHISTORY @ F.TRACK,
-                "QOVERP": F.QOVERP @ F.TRACK,
-                "NDOF": F.VALUE_OR(-1) @ F.NDOF @ F.TRACK,
-                "NFTHITS": F.VALUE_OR(-1) @ F.NFTHITS @ F.TRACK,
-                "NHITS": F.VALUE_OR(-1) @ F.NHITS @ F.TRACK,
-                "NUTHITS": F.VALUE_OR(-1) @ F.NUTHITS @ F.TRACK,
-                "NVPHITS": F.VALUE_OR(-1) @ F.NVPHITS @ F.TRACK,
-                #"NMUONHITS": F.VALUE_OR(-1) @ F.NHITSMUONS @ F.TRACK, #https://gitlab.cern.ch/lhcb/Rec/-/merge_requests/3756
-                "TRACKHASVELO": F.VALUE_OR(-1) @ F.TRACKHASVELO @ F.TRACK,
-                "TRACKHASUT": F.VALUE_OR(-1) @ F.TRACKHASUT @ F.TRACK,
-                "OBJECT_KEY": F.OBJECT_KEY,
-                "HASBREM": F.HASBREM,
-                "BREMENERGY": F.BREMENERGY,
-                "BREMBENDCORR": F.BREMBENDCORR,
-            }
-        )
-        + Kinematics()
-        + ParticleID(extra_info=True)
-    )
-
-    if islong:
-        variables += FunctorCollection({"CTB": F.TRACK_POSVEC_CLOSESTTOBEAM})
-    
-    variables += HltTisTos(
-        selection_type="Hlt1", trigger_lines=Hlt1_1track_lines, data=data
-    )
-    
-    if add_truth:
-        variables = add_truth_matching_functors(
-            options,
-            variables,
-            data,
-            hierarchy=True,
-            kinematics=True,
-            vertex_info=True,
-            bkgcat=False,
-        )
-
-    return variables
-
-def make_hlt2_event_variables(options, pvs, rec_summary):
-    # define event level variables
-    evt_variables = EventInfo()
-    if not options.simulation:
-        evt_variables += LHCInfo() #FillNumber
-    evt_variables += SelectionInfo(selection_type="Hlt2", trigger_lines=Hlt2_lines)
-    evt_variables += SelectionInfo(selection_type="Hlt1", trigger_lines=Hlt1_global_lines)
-    evt_variables += FunctorCollection(
-        {
-            "ALLPVX": F.ALLPVX(pvs),
-            "ALLPVY": F.ALLPVY(pvs),
-            "ALLPVZ": F.ALLPVZ(pvs),
-            "ALLPVNDOF": F.MAP(F.VALUE_OR(F.NaN) @ F.NDOF) @ F.TES(pvs),
-            "ALLPVCHI2": F.MAP(F.VALUE_OR(F.NaN) @ F.CHI2) @ F.TES(pvs),
-            "nPVs": F.SIZE(pvs),
-            "nTracks": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nTracks"),
-            "nLongTracks": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nLongTracks"),
-            "nMuonTracks": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nMuonTracks"),
-            "nFTClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nFTClusters"),
-            "nVPClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nVPClusters"),
-            "nUTClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nUTClusters"),
-            "nSPDhits": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nSPDhits"),
-            "nEcalClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nEcalClusters"),
-            "nEcalClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nEcalClusters"),
-            "eCalTot": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "eCalTot"),
-            "hCalTot": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "hCalTot"),
-            "nRich1Hits": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nRich1Hits"),
-            "nRich2Hits": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nRich2Hits"),
-        }
-    )
-    return evt_variables
-
-def add_truth_matching_functors(
-    options,
-    variables,
-    data,
-    hierarchy=True,
-    kinematics=True,
-    vertex_info=True,
-    bkgcat=False,
-    prompt_info=True,
-):
-    """Add MC truth matching functors to an existing FunctorCollection.
-
-    Args:
-        options (DaVinci.Options): DaVinci options object.
-        variables (FunctorCollection): FunctorCollection to modify
-        data: data handle
-        hierarchy (bool): Add MCHierarchy info (default True)
-        kinematics (bool): Add MCKinematics info (default True)
-        vertex_info (bool): Add MCVertexInfo (default True)
-        bkgcat (bool): Add TRUEKEY and BKGCAT functors - intended for composite particles (default False)
-        prompt_info (bool): Add MCPromptDecay info (default True)
-
-    Returns:
-        FunctorCollection: modified FunctorCollection with truth matched variables.
-    """
-    assert (
-        options.simulation
-    ), "options.simulation is set to False - it doesn't make sense to add truth matching."
-
-    MCTRUTH = MCTruthAndBkgCat(data)
-
-    if bkgcat:
-        variables += FunctorCollection(
-            {
-                # Important note: specify an invalid value for integer functors if there exists no truth info.
-                #                 The invalid value for floating point functors is set to nan.
-                "TRUEKEY": F.VALUE_OR(-1) @ MCTRUTH(F.OBJECT_KEY),
-                "BKGCAT": MCTRUTH.BkgCat,
-            }
-        )
-    if hierarchy:
-        variables += MCHierarchy(mctruth_alg=MCTRUTH)  # likely to change again!!
-    if vertex_info:
-        variables += MCVertexInfo(mctruth_alg=MCTRUTH)  # likely to change again!!
-    if kinematics:
-        variables += MCKinematics(mctruth_alg=MCTRUTH)  # likely to change again!!
-    if prompt_info:
-        variables += MCPromptDecay(mctruth_alg=MCTRUTH)
-
-    return variables
-
-### DTF variables ###
-
-def make_basic_dtf_variables(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name="", islong=True):
-    variables = (
-        FunctorCollection(
-            {
-                "TRCHI2DOF": F.CHI2DOF @ F.TRACK,
-                "ETA": F.ETA,
-                "PHI": F.PHI,
-                "TRGHOSTPROB": F.GHOSTPROB,
-                "BPVIPCHI2": F.BPVIPCHI2(pvs),
-                "BPVIP": F.BPVIP(pvs),
-                "BPVX": F.BPVX(pvs),
-                "BPVY": F.BPVY(pvs),
-                "BPVZ": F.BPVZ(pvs),
-                "TX"          : F.TX,
-                "TY"          : F.TY,
-                "MINIPCHI2"   : F.MINIPCHI2(pvs),
-                "MINIP"       : F.MINIP(pvs),
-                "KEY"         : F.VALUE_OR(-1) @ F.OBJECT_KEY @ F.TRACK,
-                "TRACKPT": F.TRACK_PT,
-                "TRACKHISTORY": F.VALUE_OR(-1) @ F.TRACKHISTORY @ F.TRACK,
-                "QOVERP": F.QOVERP @ F.TRACK,
-                "NDOF": F.VALUE_OR(-1) @ F.NDOF @ F.TRACK,
-            }
-        )
-        + Kinematics()
-    )
-
-    if islong:
-        variables += FunctorCollection({"CTB": F.TRACK_POSVEC_CLOSESTTOBEAM})
-    
-    if(mass_constraint):
-        if(pv_constraint): # MASS + PV
-            dtf_variables_mass_pv = FunctorCollection({
-                        'DTF_PV_M'+ particle_name + '_' + k: DTF(v)
-                        for k, v in variables.get_thor_functors().items()
-                    })
-            return dtf_variables_mass_pv
-        else: # MASS
-            dtf_variables_mass = FunctorCollection(
-                {'DTF_M'+ particle_name + '_' + k: DTF(v)
-                 for k, v in variables.get_thor_functors().items()})
-        return dtf_variables_mass
-
-    elif(pv_constraint): # PV
-        dtf_variables_pv = FunctorCollection({
-                'DTF_PV_' + k: DTF(v)
-                for k, v in variables.get_thor_functors().items()
-            })
-        return dtf_variables_pv
-
-    else: # NO MASS/PV
-        dtf_variables = FunctorCollection(
-            {'DTF_' + k: DTF(v)
-             for k, v in variables.get_thor_functors().items()})
-        return dtf_variables
-
-def make_composite_dtf_variables(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name=""):
-    variables = (
-        FunctorCollection(
-            {
-                "MAXPT": F.MAX(F.PT),
-                "MINPT": F.MIN(F.PT),
-                "SUMPT": F.SUM(F.PT),
-                "MAXP": F.MAX(F.P),
-                "MINP": F.MIN(F.P),
-                "BPVDIRA": F.BPVDIRA(pvs),
-                "VCHI2DOF": F.CHI2DOF, #CHI2VXNDOF
-                "BPVFDCHI2": F.BPVFDCHI2(pvs),
-                "BPVFD": F.BPVFD(pvs),
-                "BPVVDRHO": F.BPVVDRHO(pvs),
-                "BPVVDZ": F.BPVVDZ(pvs),
-                "BPVIPCHI2": F.BPVIPCHI2(pvs),
-                "BPVIP": F.BPVIP(pvs),
-                "LOGBPVIPCHI2": log(F.BPVIPCHI2(pvs)),
-                "BPVLTIME": F.BPVLTIME(pvs),
-                "MAXBPVIPCHI2": F.MAX(F.BPVIPCHI2(pvs)), #MAX_
-                "MINBPVIPCHI2": F.MIN(F.BPVIPCHI2(pvs)),
-                "MAXBPVIP": F.MAX(F.BPVIP(pvs)),
-                "MINBPVIP": F.MIN(F.BPVIP(pvs)),
-                "ETA": F.ETA,
-                "PHI": F.PHI,
-                "END_VX": F.END_VX, #END_
-                "END_VY": F.END_VY,
-                "END_VZ": F.END_VZ,
-                "BPVX": F.BPVX(pvs),
-                "BPVY": F.BPVY(pvs),
-                "BPVZ": F.BPVZ(pvs),
-                "ALLPVFD"     : F.ALLPV_FD(pvs),
-                "ALLPVIP"     : F.ALLPV_IP(pvs),
-                
-            }
-        )
-        + Kinematics()
-    )
-
-    addstring = "DTF"
-    if(pv_constraint):
-            addstring += '_PV'
-    if(mass_constraint):
-            addstring += '_M'
-    addstring += particle_name
-
-    DTF_chi2ndof = FunctorCollection(
-            {
-                addstring+"_DTFCHI2": DTF.CHI2,
-                addstring+"_DTFNDOF": DTF.NDOF,
-                addstring+"_CTAU": DTF.CTAU,
-                addstring+"_CTAUERR": DTF.CTAUERR,
-                addstring+"_MERR": DTF.MASSERR,
-            }
-    )
-
-    if(mass_constraint):
-        if(pv_constraint): # MASS + PV
-            dtf_variables_mass_pv = FunctorCollection({
-                        'DTF_PV_M'+ particle_name + '_' + k: DTF(v)
-                        for k, v in variables.get_thor_functors().items()
-                    })
-            return dtf_variables_mass_pv+DTF_chi2ndof
-        else: # MASS
-            dtf_variables_mass = FunctorCollection(
-                {'DTF_M'+ particle_name + '_' + k: DTF(v)
-                 for k, v in variables.get_thor_functors().items()})
-        return dtf_variables_mass+DTF_chi2ndof
-
-    elif(pv_constraint): # PV
-        dtf_variables_pv = FunctorCollection({
-                'DTF_PV_' + k: DTF(v)
-                for k, v in variables.get_thor_functors().items()
-            })
-        return dtf_variables_pv+DTF_chi2ndof
-
-    else: # NO MASS/PV
-        dtf_variables = FunctorCollection(
-            {'DTF_' + k: DTF(v)
-             for k, v in variables.get_thor_functors().items()})
-        return dtf_variables+DTF_chi2ndof
-
-def make_composite_dtf_variables_3body(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name=""):
-    variables = (
-        FunctorCollection(
-            {
-                "M13": F.SUBCOMB(Functor=F.MASS, Indices=(1, 3)),
-                "M23": F.SUBCOMB(Functor=F.MASS, Indices=(2, 3)),
-            }
-        )
-    )
-
-    if(mass_constraint):
-        if(pv_constraint): # MASS + PV
-            dtf_variables_mass_pv = FunctorCollection({
-                        'DTF_PV_M'+ particle_name + '_' + k: DTF(v)
-                        for k, v in variables.get_thor_functors().items()
-                    })
-            return dtf_variables_mass_pv+make_composite_dtf_variables(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
-        else: # MASS
-            dtf_variables_mass = FunctorCollection(
-                {'DTF_M'+ particle_name + '_' + k: DTF(v)
-                 for k, v in variables.get_thor_functors().items()})
-        return dtf_variables_mass+make_composite_dtf_variables(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
-
-    elif(pv_constraint): # PV
-        dtf_variables_pv = FunctorCollection({
-                'DTF_PV_' + k: DTF(v)
-                for k, v in variables.get_thor_functors().items()
-            })
-        return dtf_variables_pv+make_composite_dtf_variables(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
-
-    else: # NO MASS/PV
-        dtf_variables = FunctorCollection(
-            {'DTF_' + k: DTF(v)
-             for k, v in variables.get_thor_functors().items()})
-
-    return dtf_variables+make_composite_dtf_variables(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
-
-def make_composite_dtf_variables_4body(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name=""):
-    variables = (
-        FunctorCollection(
-            {
-                "M14": F.SUBCOMB(Functor=F.MASS, Indices=(1, 4)),
-                "M24": F.SUBCOMB(Functor=F.MASS, Indices=(2, 4)),
-                "M34": F.SUBCOMB(Functor=F.MASS, Indices=(3, 4)),
-            }
-        )
-    )
-
-    if(mass_constraint):
-        if(pv_constraint): # MASS + PV
-            dtf_variables_mass_pv = FunctorCollection({
-                        'DTF_PV_M'+ particle_name + '_' + k: DTF(v)
-                        for k, v in variables.get_thor_functors().items()
-                    })
-            return dtf_variables_mass_pv+make_composite_dtf_variables_3body(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
-        else: # MASS
-            dtf_variables_mass = FunctorCollection(
-                {'DTF_M'+ particle_name + '_' + k: DTF(v)
-                 for k, v in variables.get_thor_functors().items()})
-        return dtf_variables_mass+make_composite_dtf_variables_3body(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
-
-    elif(pv_constraint): # PV
-        dtf_variables_pv = FunctorCollection({
-                'DTF_PV_' + k: DTF(v)
-                for k, v in variables.get_thor_functors().items()
-            })
-        return dtf_variables_pv+make_composite_dtf_variables_3body(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
-
-    else: # NO MASS/PV
-        dtf_variables = FunctorCollection(
-            {'DTF_' + k: DTF(v)
-             for k, v in variables.get_thor_functors().items()})
-    
-        return dtf_variables+make_composite_dtf_variables_3body(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
-
-
-def make_MC_basic_variables():
-    MC_MOTHER_ID = lambda gen: F.VALUE_OR(0) @ F.MC_MOTHER(gen, F.PARTICLE_ID)
-    MC_MOTHER_KEY = lambda gen: F.VALUE_OR(-1) @ F.MC_MOTHER(gen, F.OBJECT_KEY)
-
-    variables = (
-        FunctorCollection(
-            {
-                "OBJECT_KEY": F.OBJECT_KEY,
-                "ETA": F.ETA,
-                "PHI": F.PHI,
-                "ORIGIN_VX": F.ORIGIN_VX,
-                "ORIGIN_VY": F.ORIGIN_VY,
-                "ORIGIN_VZ": F.ORIGIN_VZ,
-                "FOURMOMENTUM": F.FOURMOMENTUM,
-                "TRUEID": F.PARTICLE_ID,
-                "MC_MOTHER_ID": MC_MOTHER_ID(1),
-                "MC_MOTHER_KEY": MC_MOTHER_KEY(1),
-                "MC_GD_MOTHER_ID": MC_MOTHER_ID(2),
-                "MC_GD_MOTHER_KEY": MC_MOTHER_KEY(2),
-                "MC_GD_GD_MOTHER_ID": MC_MOTHER_ID(3),
-                "MC_GD_GD_MOTHER_KEY": MC_MOTHER_KEY(3),
-            }
-        )
-        + Kinematics()
-    )
-
-
-    from PyConf.reading import get_mc_particles, get_pp2mcp_relations, get_mc_track_info
-    MC_data = get_mc_particles("/Event/HLT2/MC/Particles")
-    relations_charged = get_pp2mcp_relations("/Event/HLT2/Relations/ChargedPP2MCP")
-    relations_neutral = get_pp2mcp_relations("/Event/HLT2/Relations/NeutralPP2MCP")
-    mcreconstructed_all = MCReconstructed(
-        input_mcparticles=MC_data,
-        use_best_mcmatch=True,
-        relations_charged=relations_charged,
-        relations_neutral=relations_neutral,
-    )
-    mcreconstructible_all = MCReconstructible(
-        input_mctrackinfo=get_mc_track_info()
-    )
-    import FunTuple.functorcollections as FC
-    vars_reconstructed = FC.MCReconstructed(mcreconstructed_alg=mcreconstructed_all, extra_info=True)
-    vars_reconstructible = FC.MCReconstructible(mcreconstructible_alg=mcreconstructible_all, extra_info=True)
-
-
-    return variables+vars_reconstructed+vars_reconstructible
-
-def make_MC_composite_variables():
-    MC_MOTHER_ID = lambda gen: F.VALUE_OR(0) @ F.MC_MOTHER(gen, F.PARTICLE_ID)
-    MC_MOTHER_KEY = lambda gen: F.VALUE_OR(-1) @ F.MC_MOTHER(gen, F.OBJECT_KEY)
-
-    variables = (
-        FunctorCollection(
-            {
-                "END_VX": F.END_VX,
-                "END_VY": F.END_VY,
-                "END_VZ": F.END_VZ,
-                "LTIME": F.MC_LIFETIME,
-                "OBJECT_KEY": F.OBJECT_KEY,
-                "ETA": F.ETA,
-                "PHI": F.PHI,
-                "ORIGIN_VX": F.ORIGIN_VX,
-                "ORIGIN_VY": F.ORIGIN_VY,
-                "ORIGIN_VZ": F.ORIGIN_VZ,
-                "FOURMOMENTUM": F.FOURMOMENTUM,
-                "TRUEID": F.PARTICLE_ID,
-                "MC_MOTHER_ID": MC_MOTHER_ID(1),
-                "MC_MOTHER_KEY": MC_MOTHER_KEY(1),
-                "MC_GD_MOTHER_ID": MC_MOTHER_ID(2),
-                "MC_GD_MOTHER_KEY": MC_MOTHER_KEY(2),
-                "MC_GD_GD_MOTHER_ID": MC_MOTHER_ID(3),
-                "MC_GD_GD_MOTHER_KEY": MC_MOTHER_KEY(3),
-            }
-        )
-        + Kinematics()
-        + MCPromptDecay()
-        )
-
-    return variables
-
-def make_MC_event_variables(mc_header):
-    # define event level variables
-    evt_variables = EventInfo()
-    evt_variables += MCPrimaries(mc_header=mc_header)
-
-    return evt_variables
-
-def make_top_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"]):
-    from PyConf.reading import get_particles
-    from IsolationTools import VertexAndConeIsolation
-
-    possible_charm_locations = ["LongTrackIso", "TTrackIso", "DownstreamTrackIso", "UpstreamTrackIso", "NeutralIso", "PizIso"]
-    coneangles = [0.25,0.5,1.,1.5,2.]
-
-    count = 0
-    for location in locations:
-        extra_particles = get_particles(f"/Event/HLT2/{hlt2_line}/{location}/Particles")
-
-        for coneangle in coneangles:
-            top_RTAlg = VertexAndConeIsolation(
-                name=location+"_"+str(coneangle),
-                reference_particles=input_data,
-                related_particles=extra_particles,
-                cut=F.DR2<coneangle)
-
-            if count == 0:
-                top_iso_variables = ParticleIsolation(isolation_alg=top_RTAlg,array_indx_name='indx')
-            else:
-                top_iso_variables += ParticleIsolation(isolation_alg=top_RTAlg,array_indx_name='indx')
-            count += 1
-
-
-    return top_iso_variables
-
-def make_basic_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"]):
-    from PyConf.reading import get_particles
-    from IsolationTools import VertexAndConeIsolation
-    from PyConf.Algorithms import ThOrParticleSelection
-
-    basic_code = (F.FILTER(F.ALL) @ F.GET_ALL_BASICS())
-    basic_particles = ThOrParticleSelection(InputParticles=input_data, Functor=basic_code).OutputSelection
-
-    possible_charm_locations = ["LongTrackIso", "TTrackIso", "DownstreamTrackIso", "UpstreamTrackIso", "NeutralIso", "PizIso"]
-    coneangles = [0.25,0.5,1.,1.5,2.]
-
-    count = 0
-    for location in locations:
-        extra_particles = get_particles(f"/Event/HLT2/{hlt2_line}/{location}/Particles")
-
-        for coneangle in coneangles:
-            basic_RTAlg = VertexAndConeIsolation(
-                name=location+"_"+str(coneangle),
-                reference_particles=basic_particles,
-                related_particles=extra_particles,
-                cut=F.DR2<coneangle)
-
-            if count == 0:
-                basic_iso_variables = ParticleIsolation(isolation_alg=basic_RTAlg,array_indx_name='indx')
-            else:
-                basic_iso_variables += ParticleIsolation(isolation_alg=basic_RTAlg,array_indx_name='indx')
-            count += 1
-
-
-    return basic_iso_variables
-
-
-def make_intermediate_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"], composite_ID = "J/psi(1S)"):
-    from PyConf.reading import get_particles
-    from IsolationTools import VertexAndConeIsolation
-    from PyConf.Algorithms import ThOrParticleSelection
-
-    intermediate_code = F.FILTER(F.IS_ABS_ID(composite_ID)) @ F.GET_ALL_DESCENDANTS()
-    intermediate_particles = ThOrParticleSelection(InputParticles=input_data, Functor=intermediate_code).OutputSelection
-
-    possible_charm_locations = ["LongTrackIso", "TTrackIso", "DownstreamTrackIso", "UpstreamTrackIso", "NeutralIso", "PizIso"]
-    coneangles = [0.25,0.5,1.,1.5,2.]
-
-    count = 0
-    for location in locations:
-        extra_particles = get_particles(f"/Event/HLT2/{hlt2_line}/{location}/Particles")
-
-        for coneangle in coneangles:
-            intermediate_RTAlg = VertexAndConeIsolation(
-                name=location+"_"+str(coneangle),
-                reference_particles=intermediate_particles,
-                related_particles=extra_particles,
-                cut=F.DR2<coneangle)
-
-            if count == 0:
-                intermediate_iso_variables = ParticleIsolation(isolation_alg=intermediate_RTAlg,array_indx_name='indx')
-            else:
-                intermediate_iso_variables += ParticleIsolation(isolation_alg=intermediate_RTAlg,array_indx_name='indx')
-            count += 1
-
-
-    return intermediate_iso_variables
diff --git a/Charm_2024validation/tmp.yaml b/Charm_2024validation/tmp.yaml
deleted file mode 100644
index c871485c24..0000000000
--- a/Charm_2024validation/tmp.yaml
+++ /dev/null
@@ -1,12 +0,0 @@
-( '27186011', 'dst_to_dee', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27185021', 'dst_to_dee', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27184011', 'dst_to_dee', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27186011', 'dst_to_dee', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '27185021', 'dst_to_dee', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '27184011', 'dst_to_dee', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '27186011', 'dst_to_dee', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '27185021', 'dst_to_dee', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '27184011', 'dst_to_dee', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '27186011', 'dst_to_dee', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27185021', 'dst_to_dee', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27184011', 'dst_to_dee', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-- 
GitLab


From c97be91eb0dfc52f554b38db5d328864e8c6f3df Mon Sep 17 00:00:00 2001
From: Serena Maccolini <serena.maccolini@cern.ch>
Date: Mon, 15 Jul 2024 18:18:56 +0200
Subject: [PATCH 11/51] uploading after clean up

---
 .../Charm_2024validation/README.md            |   68 +
 .../Charm_2024validation/dummy.yaml           |   16 +
 .../Charm_2024validation/info.yaml            |  121 ++
 .../info_MC_4localtest.yaml                   |  122 ++
 .../Charm_2024validation/info_MC_noUT.yaml    |  121 ++
 .../Charm_2024validation/info_data.yaml       |   53 +
 .../Charm_2024validation/info_data_noUT.yaml  |   50 +
 .../Charm_2024validation/main_d0_to_hh.py     |   58 +
 .../Charm_2024validation/main_d0_to_hhhh.py   |   40 +
 .../Charm_2024validation/main_d0_to_hhpi0.py  |   43 +
 .../Charm_2024validation/main_d0_to_kshh.py   |   75 +
 .../Charm_2024validation/main_d0_to_ksks.py   |   59 +
 .../Charm_2024validation/main_d_to_hhh.py     |   63 +
 .../Charm_2024validation/main_d_to_ksh.py     |   48 +
 .../main_detection_asymmetry.py               |   31 +
 .../Charm_2024validation/main_dst_to_dee.py   |   42 +
 .../Charm_2024validation/main_rare_charm.py   |   41 +
 .../Charm_2024validation/options/d0_to_hh.py  |  432 +++++
 .../options/d0_to_hh_MC.py                    |   99 +
 .../options/d0_to_hhhh.py                     |  247 +++
 .../options/d0_to_hhhh_MC.py                  |   43 +
 .../options/d0_to_hhpi0.py                    |  359 ++++
 .../options/d0_to_hhpi0_MC.py                 |   44 +
 .../options/d0_to_kshh.py                     | 1585 +++++++++++++++++
 .../options/d0_to_kshh_MC.py                  |   44 +
 .../options/d0_to_ksks.py                     | 1049 +++++++++++
 .../options/d0_to_ksks_MC.py                  |   46 +
 .../Charm_2024validation/options/d_to_hhh.py  |  503 ++++++
 .../options/d_to_hhh_MC.py                    |   92 +
 .../Charm_2024validation/options/d_to_ksh.py  |  313 ++++
 .../options/d_to_ksh_MC.py                    |   68 +
 .../options/detection_asymmetry.py            |  191 ++
 .../options/dst_to_dee.py                     |  296 +++
 .../Charm_2024validation/options/hlt1.py      |   33 +
 .../options/hlt2/d0_to_hh.py                  |    9 +
 .../options/hlt2/d0_to_hhhh.py                |    8 +
 .../options/hlt2/d0_to_hhpi0.py               |    8 +
 .../options/hlt2/d0_to_kshh.py                |    8 +
 .../options/hlt2/d0_to_ksks.py                |    8 +
 .../options/hlt2/d_to_hhh.py                  |   10 +
 .../options/hlt2/d_to_ksh.py                  |   10 +
 .../options/hlt2/dst_to_dee.py                |    9 +
 .../Charm_2024validation/options/hlt2/hlt2.py |   32 +
 .../options/hlt2/hlt2_d0_to_hh.py             |   41 +
 .../options/hlt2/hlt2_d0_to_hhhh.py           |   40 +
 .../options/hlt2/hlt2_d0_to_hhpi0.py          |   40 +
 .../options/hlt2/hlt2_d0_to_kshh.py           |   40 +
 .../options/hlt2/hlt2_d0_to_ksks.py           |   40 +
 .../options/hlt2/hlt2_d_to_hhh.py             |   42 +
 .../options/hlt2/hlt2_d_to_ksh.py             |   42 +
 .../options/hlt2/hlt2_dst_to_dee.py           |   41 +
 .../options/hlt2/hlt2_rare_charm.py           |   40 +
 .../options/hlt2/hlt2noUT.py                  |   32 +
 .../options/hlt2/make_hlt2_decay.sh           |    9 +
 .../options/hlt2/rare_charm.py                |    8 +
 .../options/rare_charm.py                     |  496 ++++++
 .../Charm_2024validation/options/tupling.py   |  986 ++++++++++
 .../Charm_2024validation/tmp.yaml             |   12 +
 Charm_2024validation/README.md                |   68 +
 Charm_2024validation/dummy.yaml               |   16 +
 Charm_2024validation/info.yaml                |  122 ++
 Charm_2024validation/info_MC_4localtest.yaml  |  122 ++
 Charm_2024validation/info_MC_noUT.yaml        |  121 ++
 Charm_2024validation/info_data.yaml           |   53 +
 Charm_2024validation/info_data_noUT.yaml      |   50 +
 Charm_2024validation/main_d0_to_hh.py         |   58 +
 Charm_2024validation/main_d0_to_hhhh.py       |   40 +
 Charm_2024validation/main_d0_to_hhpi0.py      |   43 +
 Charm_2024validation/main_d0_to_kshh.py       |   75 +
 Charm_2024validation/main_d0_to_ksks.py       |   59 +
 Charm_2024validation/main_d_to_hhh.py         |   63 +
 Charm_2024validation/main_d_to_ksh.py         |   48 +
 .../main_detection_asymmetry.py               |   31 +
 Charm_2024validation/main_dst_to_dee.py       |   42 +
 Charm_2024validation/main_rare_charm.py       |   41 +
 Charm_2024validation/options/d0_to_hh.py      |  432 +++++
 Charm_2024validation/options/d0_to_hh_MC.py   |   99 +
 Charm_2024validation/options/d0_to_hhhh.py    |  247 +++
 Charm_2024validation/options/d0_to_hhhh_MC.py |   43 +
 Charm_2024validation/options/d0_to_hhpi0.py   |  359 ++++
 .../options/d0_to_hhpi0_MC.py                 |   44 +
 Charm_2024validation/options/d0_to_kshh.py    | 1585 +++++++++++++++++
 Charm_2024validation/options/d0_to_kshh_MC.py |   44 +
 Charm_2024validation/options/d0_to_ksks.py    | 1049 +++++++++++
 Charm_2024validation/options/d0_to_ksks_MC.py |   46 +
 Charm_2024validation/options/d_to_hhh.py      |  503 ++++++
 Charm_2024validation/options/d_to_hhh_MC.py   |   92 +
 Charm_2024validation/options/d_to_ksh.py      |  313 ++++
 Charm_2024validation/options/d_to_ksh_MC.py   |   68 +
 .../options/detection_asymmetry.py            |  191 ++
 Charm_2024validation/options/dst_to_dee.py    |  296 +++
 Charm_2024validation/options/hlt1.py          |   33 +
 Charm_2024validation/options/hlt2/d0_to_hh.py |    9 +
 .../options/hlt2/d0_to_hhhh.py                |    8 +
 .../options/hlt2/d0_to_hhpi0.py               |    8 +
 .../options/hlt2/d0_to_kshh.py                |    8 +
 .../options/hlt2/d0_to_ksks.py                |    8 +
 Charm_2024validation/options/hlt2/d_to_hhh.py |   10 +
 Charm_2024validation/options/hlt2/d_to_ksh.py |   10 +
 .../options/hlt2/dst_to_dee.py                |    9 +
 Charm_2024validation/options/hlt2/hlt2.py     |   32 +
 .../options/hlt2/hlt2_d0_to_hh.py             |   41 +
 .../options/hlt2/hlt2_d0_to_hhhh.py           |   40 +
 .../options/hlt2/hlt2_d0_to_hhpi0.py          |   40 +
 .../options/hlt2/hlt2_d0_to_kshh.py           |   40 +
 .../options/hlt2/hlt2_d0_to_ksks.py           |   40 +
 .../options/hlt2/hlt2_d_to_hhh.py             |   42 +
 .../options/hlt2/hlt2_d_to_ksh.py             |   42 +
 .../options/hlt2/hlt2_dst_to_dee.py           |   41 +
 .../options/hlt2/hlt2_rare_charm.py           |   40 +
 Charm_2024validation/options/hlt2/hlt2noUT.py |   32 +
 .../options/hlt2/make_hlt2_decay.sh           |    9 +
 .../options/hlt2/rare_charm.py                |    8 +
 Charm_2024validation/options/rare_charm.py    |  496 ++++++
 Charm_2024validation/options/tupling.py       |  986 ++++++++++
 Charm_2024validation/tmp.yaml                 |   12 +
 116 files changed, 17013 insertions(+)
 create mode 100644 Charm_2024validation/Charm_2024validation/README.md
 create mode 100644 Charm_2024validation/Charm_2024validation/dummy.yaml
 create mode 100644 Charm_2024validation/Charm_2024validation/info.yaml
 create mode 100644 Charm_2024validation/Charm_2024validation/info_MC_4localtest.yaml
 create mode 100644 Charm_2024validation/Charm_2024validation/info_MC_noUT.yaml
 create mode 100644 Charm_2024validation/Charm_2024validation/info_data.yaml
 create mode 100644 Charm_2024validation/Charm_2024validation/info_data_noUT.yaml
 create mode 100644 Charm_2024validation/Charm_2024validation/main_d0_to_hh.py
 create mode 100644 Charm_2024validation/Charm_2024validation/main_d0_to_hhhh.py
 create mode 100644 Charm_2024validation/Charm_2024validation/main_d0_to_hhpi0.py
 create mode 100644 Charm_2024validation/Charm_2024validation/main_d0_to_kshh.py
 create mode 100644 Charm_2024validation/Charm_2024validation/main_d0_to_ksks.py
 create mode 100644 Charm_2024validation/Charm_2024validation/main_d_to_hhh.py
 create mode 100644 Charm_2024validation/Charm_2024validation/main_d_to_ksh.py
 create mode 100644 Charm_2024validation/Charm_2024validation/main_detection_asymmetry.py
 create mode 100644 Charm_2024validation/Charm_2024validation/main_dst_to_dee.py
 create mode 100644 Charm_2024validation/Charm_2024validation/main_rare_charm.py
 create mode 100644 Charm_2024validation/Charm_2024validation/options/d0_to_hh.py
 create mode 100644 Charm_2024validation/Charm_2024validation/options/d0_to_hh_MC.py
 create mode 100644 Charm_2024validation/Charm_2024validation/options/d0_to_hhhh.py
 create mode 100644 Charm_2024validation/Charm_2024validation/options/d0_to_hhhh_MC.py
 create mode 100644 Charm_2024validation/Charm_2024validation/options/d0_to_hhpi0.py
 create mode 100644 Charm_2024validation/Charm_2024validation/options/d0_to_hhpi0_MC.py
 create mode 100644 Charm_2024validation/Charm_2024validation/options/d0_to_kshh.py
 create mode 100644 Charm_2024validation/Charm_2024validation/options/d0_to_kshh_MC.py
 create mode 100644 Charm_2024validation/Charm_2024validation/options/d0_to_ksks.py
 create mode 100644 Charm_2024validation/Charm_2024validation/options/d0_to_ksks_MC.py
 create mode 100644 Charm_2024validation/Charm_2024validation/options/d_to_hhh.py
 create mode 100644 Charm_2024validation/Charm_2024validation/options/d_to_hhh_MC.py
 create mode 100644 Charm_2024validation/Charm_2024validation/options/d_to_ksh.py
 create mode 100644 Charm_2024validation/Charm_2024validation/options/d_to_ksh_MC.py
 create mode 100644 Charm_2024validation/Charm_2024validation/options/detection_asymmetry.py
 create mode 100644 Charm_2024validation/Charm_2024validation/options/dst_to_dee.py
 create mode 100644 Charm_2024validation/Charm_2024validation/options/hlt1.py
 create mode 100644 Charm_2024validation/Charm_2024validation/options/hlt2/d0_to_hh.py
 create mode 100644 Charm_2024validation/Charm_2024validation/options/hlt2/d0_to_hhhh.py
 create mode 100644 Charm_2024validation/Charm_2024validation/options/hlt2/d0_to_hhpi0.py
 create mode 100644 Charm_2024validation/Charm_2024validation/options/hlt2/d0_to_kshh.py
 create mode 100644 Charm_2024validation/Charm_2024validation/options/hlt2/d0_to_ksks.py
 create mode 100644 Charm_2024validation/Charm_2024validation/options/hlt2/d_to_hhh.py
 create mode 100644 Charm_2024validation/Charm_2024validation/options/hlt2/d_to_ksh.py
 create mode 100644 Charm_2024validation/Charm_2024validation/options/hlt2/dst_to_dee.py
 create mode 100644 Charm_2024validation/Charm_2024validation/options/hlt2/hlt2.py
 create mode 100644 Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_d0_to_hh.py
 create mode 100644 Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_d0_to_hhhh.py
 create mode 100644 Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_d0_to_hhpi0.py
 create mode 100644 Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_d0_to_kshh.py
 create mode 100644 Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_d0_to_ksks.py
 create mode 100644 Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_d_to_hhh.py
 create mode 100644 Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_d_to_ksh.py
 create mode 100644 Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_dst_to_dee.py
 create mode 100644 Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_rare_charm.py
 create mode 100644 Charm_2024validation/Charm_2024validation/options/hlt2/hlt2noUT.py
 create mode 100644 Charm_2024validation/Charm_2024validation/options/hlt2/make_hlt2_decay.sh
 create mode 100644 Charm_2024validation/Charm_2024validation/options/hlt2/rare_charm.py
 create mode 100644 Charm_2024validation/Charm_2024validation/options/rare_charm.py
 create mode 100644 Charm_2024validation/Charm_2024validation/options/tupling.py
 create mode 100644 Charm_2024validation/Charm_2024validation/tmp.yaml
 create mode 100644 Charm_2024validation/README.md
 create mode 100644 Charm_2024validation/dummy.yaml
 create mode 100644 Charm_2024validation/info.yaml
 create mode 100644 Charm_2024validation/info_MC_4localtest.yaml
 create mode 100644 Charm_2024validation/info_MC_noUT.yaml
 create mode 100644 Charm_2024validation/info_data.yaml
 create mode 100644 Charm_2024validation/info_data_noUT.yaml
 create mode 100644 Charm_2024validation/main_d0_to_hh.py
 create mode 100644 Charm_2024validation/main_d0_to_hhhh.py
 create mode 100644 Charm_2024validation/main_d0_to_hhpi0.py
 create mode 100644 Charm_2024validation/main_d0_to_kshh.py
 create mode 100644 Charm_2024validation/main_d0_to_ksks.py
 create mode 100644 Charm_2024validation/main_d_to_hhh.py
 create mode 100644 Charm_2024validation/main_d_to_ksh.py
 create mode 100644 Charm_2024validation/main_detection_asymmetry.py
 create mode 100644 Charm_2024validation/main_dst_to_dee.py
 create mode 100644 Charm_2024validation/main_rare_charm.py
 create mode 100644 Charm_2024validation/options/d0_to_hh.py
 create mode 100644 Charm_2024validation/options/d0_to_hh_MC.py
 create mode 100644 Charm_2024validation/options/d0_to_hhhh.py
 create mode 100644 Charm_2024validation/options/d0_to_hhhh_MC.py
 create mode 100644 Charm_2024validation/options/d0_to_hhpi0.py
 create mode 100644 Charm_2024validation/options/d0_to_hhpi0_MC.py
 create mode 100644 Charm_2024validation/options/d0_to_kshh.py
 create mode 100644 Charm_2024validation/options/d0_to_kshh_MC.py
 create mode 100644 Charm_2024validation/options/d0_to_ksks.py
 create mode 100644 Charm_2024validation/options/d0_to_ksks_MC.py
 create mode 100644 Charm_2024validation/options/d_to_hhh.py
 create mode 100644 Charm_2024validation/options/d_to_hhh_MC.py
 create mode 100644 Charm_2024validation/options/d_to_ksh.py
 create mode 100644 Charm_2024validation/options/d_to_ksh_MC.py
 create mode 100644 Charm_2024validation/options/detection_asymmetry.py
 create mode 100644 Charm_2024validation/options/dst_to_dee.py
 create mode 100644 Charm_2024validation/options/hlt1.py
 create mode 100644 Charm_2024validation/options/hlt2/d0_to_hh.py
 create mode 100644 Charm_2024validation/options/hlt2/d0_to_hhhh.py
 create mode 100644 Charm_2024validation/options/hlt2/d0_to_hhpi0.py
 create mode 100644 Charm_2024validation/options/hlt2/d0_to_kshh.py
 create mode 100644 Charm_2024validation/options/hlt2/d0_to_ksks.py
 create mode 100644 Charm_2024validation/options/hlt2/d_to_hhh.py
 create mode 100644 Charm_2024validation/options/hlt2/d_to_ksh.py
 create mode 100644 Charm_2024validation/options/hlt2/dst_to_dee.py
 create mode 100644 Charm_2024validation/options/hlt2/hlt2.py
 create mode 100644 Charm_2024validation/options/hlt2/hlt2_d0_to_hh.py
 create mode 100644 Charm_2024validation/options/hlt2/hlt2_d0_to_hhhh.py
 create mode 100644 Charm_2024validation/options/hlt2/hlt2_d0_to_hhpi0.py
 create mode 100644 Charm_2024validation/options/hlt2/hlt2_d0_to_kshh.py
 create mode 100644 Charm_2024validation/options/hlt2/hlt2_d0_to_ksks.py
 create mode 100644 Charm_2024validation/options/hlt2/hlt2_d_to_hhh.py
 create mode 100644 Charm_2024validation/options/hlt2/hlt2_d_to_ksh.py
 create mode 100644 Charm_2024validation/options/hlt2/hlt2_dst_to_dee.py
 create mode 100644 Charm_2024validation/options/hlt2/hlt2_rare_charm.py
 create mode 100644 Charm_2024validation/options/hlt2/hlt2noUT.py
 create mode 100644 Charm_2024validation/options/hlt2/make_hlt2_decay.sh
 create mode 100644 Charm_2024validation/options/hlt2/rare_charm.py
 create mode 100644 Charm_2024validation/options/rare_charm.py
 create mode 100644 Charm_2024validation/options/tupling.py
 create mode 100644 Charm_2024validation/tmp.yaml

diff --git a/Charm_2024validation/Charm_2024validation/README.md b/Charm_2024validation/Charm_2024validation/README.md
new file mode 100644
index 0000000000..f061ea162c
--- /dev/null
+++ b/Charm_2024validation/Charm_2024validation/README.md
@@ -0,0 +1,68 @@
+Analysis production for 2024 data validation within the Charm WG.
+
+For easy tests, eg. on `d_to_hhh` subset:
+```sh
+lb-run DaVinci/v64r2 lbexec Charm_2024validation.main_d_to_hhh:main Charm_2024validation/dummy.yaml
+```
+
+Decays and Hlt2 lines considered are:
+- `d0_to_hh.py`:
+  - Dst2D0pi_D02Kpi_RS     "Hlt2Charm_DstpToD0Pip_D0ToKmPip"
+  - Dst2D0pi_D02Kpi_WS     "Hlt2Charm_DstpToD0Pip_D0ToKpPim"
+  - Dst2D0pi_D02KK     "Hlt2Charm_DstpToD0Pip_D0ToKmKp"
+  - Dst2D0pi_D02pipi     "Hlt2Charm_DstpToD0Pip_D0ToPimPip"
+  - D02Kpi     "Hlt2Charm_D0ToKmPip"
+  - D02KK     "Hlt2Charm_D0ToKmKp"
+  - D02pipi     "Hlt2Charm_D0ToPimPip"
+  - Dst2D0pi_D02Kpi_RS_LowBias     "Hlt2Charm_DstpToD0Pip_D0ToKmPip_LowBias"
+  - Dst2D0pi_D02Kpi_WS_LowBias     "Hlt2Charm_DstpToD0Pip_D0ToKpPim_LowBias"
+  - Dst2D0pi_D02KK_LowBias     "Hlt2Charm_DstpToD0Pip_D0ToKmKp_LowBias"
+  - Dst2D0pi_D02pipi_LowBias     "Hlt2Charm_DstpToD0Pip_D0ToPimPip_LowBias"
+  - D02Kpi_LowBias     "Hlt2Charm_D0ToKmPip_LowBias"
+  - D02KK_LowBias     "Hlt2Charm_D0ToKmKp_LowBias"
+  - D02pipi_LowBias     "Hlt2Charm_D0ToPimPip_LowBias"
+- `d_to_ksh.py`:
+  - D2KSpi_LL     "Hlt2Charm_DpDspToKsPip_LL"
+  - D2KSpi_LD     "Hlt2Charm_DpDspToKsPip_LD"
+  - D2KSpi_DD     "Hlt2Charm_DpDspToKsPip_DD"
+  - D2KSK_LL     "Hlt2Charm_DpDspToKsKp_LL"
+  - D2KSK_LD     "Hlt2Charm_DpDspToKsKp_LD"
+  - D2KSK_DD     "Hlt2Charm_DpDspToKsKp_DD"
+- `d_to_hhh.py`:
+  - D2Kpipi     "Hlt2Charm_DpDspToKmPipPip"
+  - D2Kpipi_NoCuts     "Hlt2Charm_DpDspToKmPipPip_NoCuts"
+  - Ds2KKpi     "Hlt2Charm_DspToKmKpPip"
+  - Ds2KKpi_NoCuts     "Hlt2Charm_DspToKmKpPip_NoCuts"
+  - D2pipipi     "Hlt2Charm_DpDspToPimPipPip"
+  - D2pipipi_NoCuts     "Hlt2Charm_DpDspToPimPipPip_NoCuts"
+- `d0_to_hhpi0.py`:
+  - Dst2D0pi_D02Kpipi0 "Hlt2Charm_DstpToD0Pip_D0ToKmPipPi0_{M,R}"
+  - Dst2D0pi_D02KKpi0 "Hlt2Charm_DstpToD0Pip_D0ToKmKpPi0_{M,R}"
+  - Dst2D0pi_D02pipipi0 "Hlt2Charm_DstpToD0Pip_D0ToPimPipPi0_{M,R}"
+- `detection_asymmetry.py`:
+  - D2Kpipi_ADet "Hlt2Charm_DpToKmPipPip_ADet"
+  - D2KSK_LL_ADet "Hlt2Charm_DspToKsKp_LL_ADet"
+  - D2KSpi_LL_ADet "Hlt2Charm_DpToKsPip_LL_ADet"
+  - D2pipipi_ADet "Hlt2Charm_DspToPimPipPip_ADet"
+  - Ds2KKpi_ADet "Hlt2Charm_DspToKmKpPip_ADet"
+  - Lc2KSp_LL_ADet "Hlt2Charm_LcpToPpKs_LL_ADet"
+  - Lc2pKpi_ADet "Hlt2Charm_LcpToPpKmPip_ADet"
+- `rare_charm.py`:
+  - D2pimumu "Hlt2Charm_DpDspToPipMumMup"
+  - D2pimumu_WS "Hlt2Charm_DpDspToPipMupMup_RareCharmControl"
+  - Dst2D0pi_D02Kpimumu_RS "Hlt2Charm_DstpToD0Pip_D0ToKmPipMumMup"
+- `d0_to_kshh.py`:
+- `d0_to_ksks.py`:
+- `dst_to_dee.py`:
+  -  Dst02D0EmEp_D02KmPip_OS    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS',
+  -  Dst02D0EmEp_D02KmPip_SS 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS',
+  -  Dst02D0EmEp_D02KmPip_OS_MVA 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS_MVA',
+  -  Dst02D0EmEp_D02KmPip_SS_MVA 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS_MVA',
+  -  Dst02D0EmEp_D02KmPimPipPip_OS 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS',
+  -  Dst02D0EmEp_D02KmPimPipPip_SS 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS',
+  -  Dst02D0EmEp_D02KmPimPipPip_OS_MVA 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS_MVA',
+  -  Dst02D0EmEp_D02KmPimPipPip_SS_MVA 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS_MVA',
+  -  Dstp2DpDspEmEp_DpDsp2KmKpPip_OS 'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS',
+  -  Dstp2DpDspEmEp_DpDsp2KmKpPip_SS 'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS',
+  -  Dstp2DpDspEmEp_DpDsp2KmKpPip_OS_MVA 'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS_MVA',
+  -  Dstp2DpDspEmEp_DpDsp2KmKpPip_SS_MVA'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS_MVA',
diff --git a/Charm_2024validation/Charm_2024validation/dummy.yaml b/Charm_2024validation/Charm_2024validation/dummy.yaml
new file mode 100644
index 0000000000..5bebae4ac3
--- /dev/null
+++ b/Charm_2024validation/Charm_2024validation/dummy.yaml
@@ -0,0 +1,16 @@
+input_files:
+- root://myProxy@lhcbxrootd-kit.gridka.de//pnfs/gridka.de/lhcb/LHCb-Disk/lhcb/LHCb/Collision23/CHARM.DST/00198130/0000/00198130_00000552_1.charm.dst
+input_raw_format: 0.5
+input_type: ROOT
+output_type: ROOT
+event_store: HiveWhiteBoard
+simulation: False
+data_type: "Upgrade"
+geometry_version: run3/trunk
+conditions_version: Alignment2023_HLT2Processing_26_8_2023
+scheduler_legacy_mode: False
+input_process: "TurboPass"
+input_stream: "charm"
+histo_file: CHARM_HISTO.ROOT
+ntuple_file: CHARM.ROOT
+evt_max: 1000
diff --git a/Charm_2024validation/Charm_2024validation/info.yaml b/Charm_2024validation/Charm_2024validation/info.yaml
new file mode 100644
index 0000000000..f49943e7e9
--- /dev/null
+++ b/Charm_2024validation/Charm_2024validation/info.yaml
@@ -0,0 +1,121 @@
+defaults:
+  inform:
+    - serena.maccolini@cern.ch
+  wg: Charm
+
+{%- set conditions = [
+  "MagDown",
+]%}
+
+{%- set evttype_subsample_nutext_nu_dir1_dir2_dddb = [
+( '27163102', 'd0_to_hh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163101', 'd0_to_hh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163100', 'd0_to_hh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '23103042', 'd_to_hhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '23263022', 'd_to_hhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '21263012', 'd_to_hhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163471', 'd0_to_hhpi0', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27165903', 'd0_to_kshh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27165071', 'd0_to_hhhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27265008', 'd0_to_hhhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27265009', 'd0_to_hhhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27165072', 'd0_to_hhhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '23103111', 'd_to_ksh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '21103101', 'd_to_ksh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '23173003', 'rare_charm', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+
+( '27163102', 'd0_to_hh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163101', 'd0_to_hh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163100', 'd0_to_hh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '23103042', 'd_to_hhh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '23263022', 'd_to_hhh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '21263012', 'd_to_hhh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163471', 'd0_to_hhpi0', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '27165903', 'd0_to_kshh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '27165071', 'd0_to_hhhh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+
+( '27163102', 'd0_to_hh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163101', 'd0_to_hh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163100', 'd0_to_hh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '23103042', 'd_to_hhh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '23263022', 'd_to_hhh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '21263012', 'd_to_hhh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163471', 'd0_to_hhpi0', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '27165903', 'd0_to_kshh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '27165071', 'd0_to_hhhh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+
+( '27163102', 'd0_to_hh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163101', 'd0_to_hh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163100', 'd0_to_hh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '23103042', 'd_to_hhh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '23263022', 'd_to_hhh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '21263012', 'd_to_hhh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163471', 'd0_to_hhpi0', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27165903', 'd0_to_kshh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27165071', 'd0_to_hhhh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+
+]%}
+
+
+
+{%- for evttype, id, nutext, nu, dir1, dir2, dddb in evttype_subsample_nutext_nu_dir1_dir2_dddb %}
+
+{% for polarity in conditions %}
+
+{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1:
+  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
+  input:
+    bk_query: "/MC/{{dir1}}/Beam6800GeV-2024{{dir2}}-{{polarity}}-Nu{{nu}}-25ns-Pythia8/Sim10d/{{evttype}}/DIGI"
+    n_test_lfns: 3
+  output: HLT1.DST
+  options:
+    entrypoint: Charm_2024validation.options.hlt1:alg_config
+    extra_options:
+      input_raw_format: 0.5
+      conddb_tag: sim10-2024.Q1.2-v1.1-md100
+      dddb_tag: '{{dddb}}'
+      input_type: ROOT
+      output_type: ROOT
+      simulation: True
+      data_type: "Upgrade"
+      scheduler_legacy_mode: False
+      evt_max: -1
+
+{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2:
+  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
+  input:
+    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1
+  output: HLT2.DST
+  options:
+    entrypoint: Charm_2024validation.options.hlt2.hlt2_{{id}}:alg_config
+    extra_options:
+      conddb_tag: sim10-2024.Q1.2-v1.1-md100
+      dddb_tag: '{{dddb}}'
+      input_raw_format: 0.5
+      input_type: "ROOT"
+      output_type: "ROOT"
+      simulation: True
+      data_type: "Upgrade"
+      output_manifest_file: "HLT2.tck.json"
+      scheduler_legacy_mode: False
+
+MC_{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}:
+  application: "DaVinci/v64r7@x86_64_v3-el9-gcc13+detdesc-opt+g"
+  input:
+    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2
+  output: DVTUPLE.ROOT
+  options:
+    entrypoint: Charm_2024validation.main_{{id}}:main
+    extra_options:
+      conddb_tag: sim10-2024.Q1.2-v1.1-md100
+      dddb_tag: '{{dddb}}'
+      input_raw_format: 0.5
+      input_type: ROOT
+      simulation: True
+      data_type: "Upgrade"
+      event_store: HiveWhiteBoard
+      input_process: "Hlt2"
+      input_manifest_file: "HLT2.tck.json"
+      
+{%- endfor %}
+{%- endfor %}
diff --git a/Charm_2024validation/Charm_2024validation/info_MC_4localtest.yaml b/Charm_2024validation/Charm_2024validation/info_MC_4localtest.yaml
new file mode 100644
index 0000000000..3d18e13274
--- /dev/null
+++ b/Charm_2024validation/Charm_2024validation/info_MC_4localtest.yaml
@@ -0,0 +1,122 @@
+defaults:
+  inform:
+    - serena.maccolini@cern.ch
+  wg: Charm
+
+{%- set conditions = [
+  "MagDown",
+]%}
+
+{%- set evttype_subsample_nutext_nu_dir1_dir2_dddb_geometry = [
+( '27163102', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163101', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163100', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23103042', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23263022', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '21263012', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163471', 'd0_to_hhpi0', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165903', 'd0_to_kshh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165071', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27265008', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27265009', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165072', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23103111', 'd_to_ksh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '21103101', 'd_to_ksh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23173003', 'rare_charm', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163102', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163101', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163100', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23103042', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23263022', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '21263012', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163471', 'd0_to_hhpi0', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165903', 'd0_to_kshh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165071', 'd0_to_hhhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163102', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163101', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163100', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23103042', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23263022', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '21263012', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163471', 'd0_to_hhpi0', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165903', 'd0_to_kshh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165071', 'd0_to_hhhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163102', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163101', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163100', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23103042', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23263022', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '21263012', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163471', 'd0_to_hhpi0', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165903', 'd0_to_kshh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165071', 'd0_to_hhhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165901', 'd0_to_ksks', '7p6', '7.6', 'Dev', '', 'dddb-20231017', 'run3/trunk'),
+]%}
+
+
+
+{%- for evttype, id, nutext, nu, dir1, dir2, dddb, geometry in evttype_subsample_nutext_nu_dir1_dir2_dddb_geometry %}
+
+{% for polarity in conditions %}
+
+{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1:
+  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
+  input:
+    bk_query: "/MC/{{dir1}}/Beam6800GeV-expected-2024{{dir2}}-{{polarity}}-Nu{{nu}}-25ns-Pythia8/Sim10c/{{evttype}}/DIGI"
+    n_test_lfns: 3
+  output: HLT1.DST
+  options:
+    entrypoint: Charm_2024validation.options.hlt1:alg_config
+    extra_options:
+      input_raw_format: 0.5
+      conddb_tag: sim-20231017-vc-md100
+      dddb_tag: '{{dddb}}'
+      input_type: ROOT
+      output_type: ROOT
+      simulation: True
+      data_type: "Upgrade"
+      scheduler_legacy_mode: False
+      geometry_version: "{{geometry}}"
+      evt_max: 1000
+
+{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2:
+  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
+  input:
+    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1
+  output: HLT2.DST
+  options:
+    entrypoint: Charm_2024validation.options.hlt2.hlt2_{{id}}:alg_config
+    extra_options:
+      conddb_tag: sim-20231017-vc-md100
+      dddb_tag: '{{dddb}}'
+      input_raw_format: 0.5
+      input_type: "ROOT"
+      output_type: "ROOT"
+      simulation: True
+      data_type: "Upgrade"
+      output_manifest_file: "HLT2.tck.json"
+      scheduler_legacy_mode: False
+      geometry_version: "{{geometry}}"
+
+MC_{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}:
+  application: "DaVinci/v64r3@x86_64_v3-el9-gcc13+detdesc-opt+g"
+  input:
+    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2
+  output: DVTUPLE.ROOT
+  options:
+    entrypoint: Charm_2024validation.main_{{id}}:main
+    extra_options:
+      conddb_tag: sim-20231017-vc-md100
+      dddb_tag: '{{dddb}}'
+      input_raw_format: 0.5
+      input_type: ROOT
+      simulation: True
+      data_type: "Upgrade"
+      event_store: HiveWhiteBoard
+      geometry_version: "{{geometry}}"
+      input_process: "Hlt2"
+      input_manifest_file: "HLT2.tck.json"
+      write_decoding_keys_to_git: false
+
+{%- endfor %}
+{%- endfor %}
diff --git a/Charm_2024validation/Charm_2024validation/info_MC_noUT.yaml b/Charm_2024validation/Charm_2024validation/info_MC_noUT.yaml
new file mode 100644
index 0000000000..52df9e4e96
--- /dev/null
+++ b/Charm_2024validation/Charm_2024validation/info_MC_noUT.yaml
@@ -0,0 +1,121 @@
+defaults:
+  inform:
+    - serena.maccolini@cern.ch
+  wg: Charm
+
+{%- set conditions = [
+  "MagDown",
+]%}
+
+{%- set evttype_subsample_nutext_nu_dir1_dir2_dddb_geometry = [
+( '27163102', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163101', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163100', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23103042', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23263022', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '21263012', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163471', 'd0_to_hhpi0', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165903', 'd0_to_kshh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165071', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27265008', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27265009', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165072', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23103111', 'd_to_ksh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '21103101', 'd_to_ksh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23173003', 'rare_charm', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163102', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163101', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163100', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23103042', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23263022', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '21263012', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163471', 'd0_to_hhpi0', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165903', 'd0_to_kshh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165071', 'd0_to_hhhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163102', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163101', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163100', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23103042', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23263022', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '21263012', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163471', 'd0_to_hhpi0', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165903', 'd0_to_kshh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165071', 'd0_to_hhhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163102', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163101', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163100', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23103042', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23263022', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '21263012', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163471', 'd0_to_hhpi0', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165903', 'd0_to_kshh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165071', 'd0_to_hhhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165901', 'd0_to_ksks', '7p6', '7.6', 'Dev', '', 'dddb-20231017', 'run3/trunk'),
+]%}
+
+
+
+{%- for evttype, id, nutext, nu, dir1, dir2, dddb, geometry in evttype_subsample_nutext_nu_dir1_dir2_dddb_geometry %}
+
+{% for polarity in conditions %}
+
+{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1:
+  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
+  input:
+    bk_query: "/MC/{{dir1}}/Beam6800GeV-expected-2024{{dir2}}-{{polarity}}-Nu{{nu}}-25ns-Pythia8/Sim10c/{{evttype}}/DIGI"
+    n_test_lfns: 3
+  output: HLT1.DST
+  options:
+    entrypoint: Charm_2024validation.options.hlt1:alg_config
+    extra_options:
+      input_raw_format: 0.5
+      conddb_tag: sim-20231017-vc-md100
+      dddb_tag: '{{dddb}}'
+      input_type: ROOT
+      output_type: ROOT
+      simulation: True
+      data_type: "Upgrade"
+      scheduler_legacy_mode: False
+      geometry_version: "{{geometry}}"
+      evt_max: -1
+
+{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2:
+  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
+  input:
+    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1
+  output: HLT2.DST
+  options:
+    entrypoint: Charm_2024validation.options.hlt2.hlt2_{{id}}:alg_config
+    extra_options:
+      conddb_tag: sim-20231017-vc-md100
+      dddb_tag: '{{dddb}}'
+      input_raw_format: 0.5
+      input_type: "ROOT"
+      output_type: "ROOT"
+      simulation: True
+      data_type: "Upgrade"
+      output_manifest_file: "HLT2.tck.json"
+      scheduler_legacy_mode: False
+      geometry_version: "{{geometry}}"
+
+MC_{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}:
+  application: "DaVinci/v64r3@x86_64_v3-el9-gcc13+detdesc-opt+g"
+  input:
+    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2
+  output: DVTUPLE.ROOT
+  options:
+    entrypoint: Charm_2024validation.main_{{id}}:main
+    extra_options:
+      conddb_tag: sim-20231017-vc-md100
+      dddb_tag: '{{dddb}}'
+      input_raw_format: 0.5
+      input_type: ROOT
+      simulation: True
+      data_type: "Upgrade"
+      event_store: HiveWhiteBoard
+      geometry_version: "{{geometry}}"
+      input_process: "Hlt2"
+      input_manifest_file: "HLT2.tck.json"
+
+{%- endfor %}
+{%- endfor %}
diff --git a/Charm_2024validation/Charm_2024validation/info_data.yaml b/Charm_2024validation/Charm_2024validation/info_data.yaml
new file mode 100644
index 0000000000..cf3b7dcdf9
--- /dev/null
+++ b/Charm_2024validation/Charm_2024validation/info_data.yaml
@@ -0,0 +1,53 @@
+defaults:
+  inform:
+    - serena.maccolini@cern.ch
+  wg: Charm
+
+{%- set conditions = [
+  "MagDown",
+]%}
+
+
+
+{%- set subsamples = [
+  "d0_to_hh",
+  "d_to_hhh",
+  "d_to_ksh",
+  "d0_to_hhpi0",
+  "d0_to_kshh",
+  "d0_to_ksks",
+  "d0_to_hhhh",
+  "rare_charm",
+  "detection_asymmetry",
+  "dst_to_dee",
+]%}
+
+{% for id in subsamples %}
+{% for polarity in conditions %}
+
+{{id}}_2024_{{ polarity }}:
+  application: "DaVinci/v64r7"
+  input:
+    bk_query: "/LHCb/Collision24/Beam6800GeV-VeloClosed-{{polarity}}/Real Data/Sprucing24c2/94000000/CHARM.DST"
+
+    dq_flags:
+      - UNCHECKED
+      - OK
+    keep_running: true
+  output: DVTUPLE_{{id}}.ROOT
+  options:
+    entrypoint: Charm_2024validation.main_{{id}}:main
+    extra_options:
+      input_raw_format: 0.5
+      input_type: ROOT
+      simulation: False
+      data_type: "Upgrade"
+      event_store: HiveWhiteBoard
+      geometry_version: run3/2024.Q1.2-v00.00
+      conditions_version: master
+      input_process: "TurboPass"
+      input_stream: "charm"
+      evt_max: -1
+
+{%- endfor %}
+{%- endfor %}
diff --git a/Charm_2024validation/Charm_2024validation/info_data_noUT.yaml b/Charm_2024validation/Charm_2024validation/info_data_noUT.yaml
new file mode 100644
index 0000000000..8c750c72d0
--- /dev/null
+++ b/Charm_2024validation/Charm_2024validation/info_data_noUT.yaml
@@ -0,0 +1,50 @@
+defaults:
+  inform:
+    - serena.maccolini@cern.ch
+  wg: Charm
+
+{%- set conditions = [
+  "MagDown",
+]%}
+
+
+
+{%- set subsamples = [
+  "d0_to_hh",
+  "d_to_hhh",
+  "d_to_ksh",
+  "d0_to_hhpi0",
+  "d0_to_kshh",
+  "d0_to_ksks",
+  "d0_to_hhhh",
+  "rare_charm",
+  "detection_asymmetry",
+]%}
+
+{% for id in subsamples %}
+{% for polarity in conditions %}
+
+{{id}}_2024_{{ polarity }}:
+  application: "DaVinci/v64r5"
+  input:
+    bk_query: "/LHCb/Collision24/Beam6800GeV-VeloClosed-{{polarity}}-Excl-UT/Real Data/Sprucing24c1/94000000/CHARM.DST"
+    dq_flags:
+      - UNCHECKED
+      - OK
+    keep_running: true
+  output: DVTUPLE_{{id}}.ROOT
+  options:
+    entrypoint: Charm_2024validation.main_{{id}}:main
+    extra_options:
+      input_raw_format: 0.5
+      input_type: ROOT
+      simulation: False
+      data_type: "Upgrade"
+      event_store: HiveWhiteBoard
+      geometry_version: run3/2024.Q1.2-v00.00
+      conditions_version: master
+      input_process: "TurboPass"
+      input_stream: "charm"
+
+{%- endfor %}
+{%- endfor %}
diff --git a/Charm_2024validation/Charm_2024validation/main_d0_to_hh.py b/Charm_2024validation/Charm_2024validation/main_d0_to_hh.py
new file mode 100644
index 0000000000..12eea15463
--- /dev/null
+++ b/Charm_2024validation/Charm_2024validation/main_d0_to_hh.py
@@ -0,0 +1,58 @@
+###############################################################################
+# (c) Copyright 2021-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 .options.d0_to_hh import *
+from .options.d0_to_hh_MC import *
+
+from DaVinci import Options, make_config
+from PyConf.reading import get_pvs, get_rec_summary
+
+def main(options: Options):
+
+    # get ODIN and DecReports location
+    pvs = get_pvs()
+    rec_summary = get_rec_summary()
+
+    tuples = {
+        #D02hh
+        "D02Kpi" : maketuple_D02Kpi(options, pvs, rec_summary),
+        "D02KK" : maketuple_D02KK(options, pvs, rec_summary),
+        "D02pipi" : maketuple_D02pipi(options, pvs, rec_summary),
+        #Dst2D0pi_D02hh
+        "Dst2D0pi_D02Kpi_RS" : maketuple_Dst2D0pi_D02Kpi_RS(options, pvs, rec_summary),
+        "Dst2D0pi_D02Kpi_WS" : maketuple_Dst2D0pi_D02Kpi_WS(options, pvs, rec_summary),
+        "Dst2D0pi_D02KK" : maketuple_Dst2D0pi_D02KK(options, pvs, rec_summary),
+        "Dst2D0pi_D02pipi" : maketuple_Dst2D0pi_D02pipi(options, pvs, rec_summary),
+
+        ##LowBias
+        #D02hh
+        "D02Kpi_LowBias" : maketuple_D02Kpi_LowBias(options, pvs, rec_summary),
+        "D02KK_LowBias" : maketuple_D02KK_LowBias(options, pvs, rec_summary),
+        "D02pipi_LowBias" : maketuple_D02pipi_LowBias(options, pvs, rec_summary),
+        #Dst2D0pi_D02hh
+        "Dst2D0pi_D02Kpi_RS_LowBias" : maketuple_Dst2D0pi_D02Kpi_RS_LowBias(options, pvs, rec_summary),
+        "Dst2D0pi_D02Kpi_WS_LowBias" : maketuple_Dst2D0pi_D02Kpi_WS_LowBias(options, pvs, rec_summary),
+        "Dst2D0pi_D02KK_LowBias" : maketuple_Dst2D0pi_D02KK_LowBias(options, pvs, rec_summary),
+        "Dst2D0pi_D02pipi_LowBias" : maketuple_Dst2D0pi_D02pipi_LowBias(options, pvs, rec_summary),
+    }
+
+    MCtuples = {
+        "MC_Dst2D0pi_D02Kpi_RS" : maketuple_MC_Dst2D0pi_D02Kpi_RS(options, pvs, rec_summary),
+        "MC_Dst2D0pi_D02KK_RS" : maketuple_MC_Dst2D0pi_D02KK(options, pvs, rec_summary),
+        "MC_Dst2D0pi_D02pipi" : maketuple_MC_Dst2D0pi_D02pipi(options, pvs, rec_summary),
+    }
+
+    if options.simulation:
+        tuples = tuples | MCtuples
+
+    config = make_config(options, tuples)
+
+    return config
diff --git a/Charm_2024validation/Charm_2024validation/main_d0_to_hhhh.py b/Charm_2024validation/Charm_2024validation/main_d0_to_hhhh.py
new file mode 100644
index 0000000000..5fb555ccfd
--- /dev/null
+++ b/Charm_2024validation/Charm_2024validation/main_d0_to_hhhh.py
@@ -0,0 +1,40 @@
+###############################################################################
+# (c) Copyright 2021-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 .options.d0_to_hhhh import *
+from .options.d0_to_hhhh_MC import *
+
+from DaVinci import Options, make_config
+from PyConf.reading import get_pvs, get_rec_summary
+
+def main(options: Options):
+        
+    # get ODIN and DecReports location
+    pvs = get_pvs()
+    rec_summary = get_rec_summary()
+
+    tuples = {
+        "DstToD0pi_D0ToKKPiPi" : maketuple_DstToD0pi_D0ToKKPiPi(options, pvs, rec_summary),
+        "DstToD0pi_D0ToKPiPiPi" : maketuple_DstToD0pi_D0ToKPiPiPi(options, pvs, rec_summary),
+        "DstToD0pi_D0ToPiKPiPi" : maketuple_DstToD0pi_D0ToPiKPiPi(options, pvs, rec_summary),
+        "DstToD0pi_D0ToPiPiPiPi" : maketuple_DstToD0pi_D0ToPiPiPiPi(options, pvs, rec_summary),
+    }
+
+    MCtuples = {
+        "MC_DstToD0pi_D0ToKPiPiPi" : maketuple_MC_DstToD0pi_D0ToKPiPiPi(options, pvs, rec_summary),
+    }
+    
+    if options.simulation:
+        tuples = tuples | MCtuples
+        
+    config = make_config(options, tuples)
+
+    return config
diff --git a/Charm_2024validation/Charm_2024validation/main_d0_to_hhpi0.py b/Charm_2024validation/Charm_2024validation/main_d0_to_hhpi0.py
new file mode 100644
index 0000000000..ac59dc71d9
--- /dev/null
+++ b/Charm_2024validation/Charm_2024validation/main_d0_to_hhpi0.py
@@ -0,0 +1,43 @@
+###############################################################################
+# (c) Copyright 2021-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 .options.d0_to_hhpi0 import *
+from .options.d0_to_hhpi0_MC import *
+
+from DaVinci import Options, make_config
+from PyConf.reading import get_pvs, get_rec_summary
+
+def main(options: Options):
+        
+    # get ODIN and DecReports location
+    pvs = get_pvs()
+    rec_summary = get_rec_summary()
+
+    tuples = {
+        #Dst2D0pi_D02hhpi0
+        "Dst2D0pi_D02Kpipi0_M" : maketuple_Dst2D0pi_D02Kpipi0_M(options, pvs, rec_summary),
+        "Dst2D0pi_D02KKpi0_M" : maketuple_Dst2D0pi_D02KKpi0_M(options, pvs, rec_summary),
+        "Dst2D0pi_D02pipipi0_M" : maketuple_Dst2D0pi_D02pipipi0_M(options, pvs, rec_summary),
+        "Dst2D0pi_D02Kpipi0_R" : maketuple_Dst2D0pi_D02Kpipi0_R(options, pvs, rec_summary),
+        "Dst2D0pi_D02KKpi0_R" : maketuple_Dst2D0pi_D02KKpi0_R(options, pvs, rec_summary),
+        "Dst2D0pi_D02pipipi0_R" : maketuple_Dst2D0pi_D02pipipi0_R(options, pvs, rec_summary),
+    }
+
+    MCtuples = {
+        "MC_Dst2D0pi_D02Kpipi0" : maketuple_MC_Dst2D0pi_D02Kpipi0(options, pvs, rec_summary),
+    }
+    
+    if options.simulation:
+        tuples = tuples | MCtuples
+        
+    config = make_config(options, tuples)
+
+    return config
diff --git a/Charm_2024validation/Charm_2024validation/main_d0_to_kshh.py b/Charm_2024validation/Charm_2024validation/main_d0_to_kshh.py
new file mode 100644
index 0000000000..f9cfbd58e2
--- /dev/null
+++ b/Charm_2024validation/Charm_2024validation/main_d0_to_kshh.py
@@ -0,0 +1,75 @@
+###############################################################################
+# (c) Copyright 2021-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 .options.d0_to_kshh import *
+from .options.d0_to_kshh_MC import *
+
+from DaVinci import Options, make_config
+from PyConf.reading import get_pvs, get_rec_summary
+
+def main(options: Options):
+
+    # get ODIN and DecReports location
+    pvs = get_pvs()
+    rec_summary = get_rec_summary()
+
+    tuples = {
+        #D02kshh
+        "D0ToKsPimPip_LL" : maketuple_D0ToKsPimPip_LL(options, pvs, rec_summary),
+        "D0ToKsPimPip_DD" : maketuple_D0ToKsPimPip_DD(options, pvs, rec_summary),
+        "D0ToKsKmPip_LL" : maketuple_D0ToKsKmPip_LL(options, pvs, rec_summary),
+        "D0ToKsKmPip_DD" : maketuple_D0ToKsKmPip_DD(options, pvs, rec_summary),
+        "D0ToKsKpPim_LL" : maketuple_D0ToKsKmPip_LL(options, pvs, rec_summary),
+        "D0ToKsKpPim_DD" : maketuple_D0ToKsKmPip_DD(options, pvs, rec_summary),
+        "D0ToKsKmKp_LL" : maketuple_D0ToKsKmKp_LL(options, pvs, rec_summary),
+        "D0ToKsKmKp_DD" : maketuple_D0ToKsKmKp_DD(options, pvs, rec_summary),
+        #Dst2D0pi_D02kshh
+        "DstpToD0Pip_D0ToKsPimPip_LL" : maketuple_DstpToD0Pip_D0ToKsPimPip_LL(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsPimPip_DD" : maketuple_DstpToD0Pip_D0ToKsPimPip_DD(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsKmPip_LL" : maketuple_DstpToD0Pip_D0ToKsKmPip_LL(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsKmPip_DD" : maketuple_DstpToD0Pip_D0ToKsKmPip_DD(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsKpPim_LL" : maketuple_DstpToD0Pip_D0ToKsKmPip_LL(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsKpPim_DD" : maketuple_DstpToD0Pip_D0ToKsKmPip_DD(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsKmKp_LL" : maketuple_DstpToD0Pip_D0ToKsKmKp_LL(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsKmKp_DD" : maketuple_DstpToD0Pip_D0ToKsKmKp_DD(options, pvs, rec_summary),
+
+        ##LowBias
+        #D02kshh
+        "D0ToKsPimPip_LL_LowBias" : maketuple_D0ToKsPimPip_LL_LowBias(options, pvs, rec_summary),
+        "D0ToKsPimPip_DD_LowBias" : maketuple_D0ToKsPimPip_DD_LowBias(options, pvs, rec_summary),
+        "D0ToKsKmPip_LL_LowBias" : maketuple_D0ToKsKmPip_LL_LowBias(options, pvs, rec_summary),
+        "D0ToKsKmPip_DD_LowBias" : maketuple_D0ToKsKmPip_DD_LowBias(options, pvs, rec_summary),
+        "D0ToKsKpPim_LL_LowBias" : maketuple_D0ToKsKmPip_LL_LowBias(options, pvs, rec_summary),
+        "D0ToKsKpPim_DD_LowBias" : maketuple_D0ToKsKmPip_DD_LowBias(options, pvs, rec_summary),
+        "D0ToKsKmKp_LL_LowBias" : maketuple_D0ToKsKmKp_LL_LowBias(options, pvs, rec_summary),
+        "D0ToKsKmKp_DD_LowBias" : maketuple_D0ToKsKmKp_DD_LowBias(options, pvs, rec_summary),
+        #Dst2D0pi_D02kshh
+        "DstpToD0Pip_D0ToKsPimPip_LL_LowBias" : maketuple_DstpToD0Pip_D0ToKsPimPip_LL_LowBias(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsPimPip_DD_LowBias" : maketuple_DstpToD0Pip_D0ToKsPimPip_DD_LowBias(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsKmPip_LL_LowBias" : maketuple_DstpToD0Pip_D0ToKsKmPip_LL_LowBias(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsKmPip_DD_LowBias" : maketuple_DstpToD0Pip_D0ToKsKmPip_DD_LowBias(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsKpPim_LL_LowBias" : maketuple_DstpToD0Pip_D0ToKsKmPip_LL_LowBias(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsKpPim_DD_LowBias" : maketuple_DstpToD0Pip_D0ToKsKmPip_DD_LowBias(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsKmKp_LL_LowBias" : maketuple_DstpToD0Pip_D0ToKsKmKp_LL_LowBias(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsKmKp_DD_LowBias" : maketuple_DstpToD0Pip_D0ToKsKmKp_DD_LowBias(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsPimPip_DD_NoBias" : maketuple_DstpToD0Pip_D0ToKsPimPip_LL_NoBias(options, pvs, rec_summary),
+    }
+
+    MCtuples = {
+        "MC_DstpToD0Pip_D0ToKsPimPip" : maketuple_MC_DstpToD0Pip_D0ToKsPimPip(options, pvs, rec_summary),
+    }
+
+    if options.simulation:
+        tuples = tuples | MCtuples
+
+    config = make_config(options, tuples)
+
+    return config
diff --git a/Charm_2024validation/Charm_2024validation/main_d0_to_ksks.py b/Charm_2024validation/Charm_2024validation/main_d0_to_ksks.py
new file mode 100644
index 0000000000..cb69552d78
--- /dev/null
+++ b/Charm_2024validation/Charm_2024validation/main_d0_to_ksks.py
@@ -0,0 +1,59 @@
+###############################################################################
+# (c) Copyright 2021-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.                                       #
+###############################################################################
+import Functors as F
+from Functors.math import log
+from DaVinci import Options, make_config
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from FunTuple import FunctorCollection
+import FunTuple.functorcollections as FC
+from FunTuple import FunTuple_Particles as Funtuple
+
+#D02KSKS
+from .options.d0_to_ksks import *
+from .options.d0_to_ksks_MC import *
+
+from PyConf.reading import get_pvs, get_rec_summary
+
+def main(options: Options):
+
+    # get ODIN and DecReports location
+    pvs = get_pvs()
+    rec_summary = get_rec_summary()
+
+    tuples = {
+        #D02KSKS
+        "Dst2D0pi_D02KSKS_LLLL" : maketuple_Dst2D0pi_D02KSKS_LLLL(options, pvs, rec_summary),
+        "Dst2D0pi_D02KSKS_LLLL_Tight" : maketuple_Dst2D0pi_D02KSKS_LLLL_Tight(options, pvs, rec_summary),
+        "Dst2D0pi_D02KSKS_LLDD" : maketuple_Dst2D0pi_D02KSKS_LLDD(options, pvs, rec_summary),
+        "Dst2D0pi_D02KSKS_LLDD_Tight" : maketuple_Dst2D0pi_D02KSKS_LLDD_Tight(options, pvs, rec_summary),
+        "Dst2D0pi_D02KSKS_DDDD" : maketuple_Dst2D0pi_D02KSKS_DDDD(options, pvs, rec_summary),
+        "Dst2D0pi_D02KSKS_DDDD_Tight" : maketuple_Dst2D0pi_D02KSKS_DDDD_Tight(options, pvs, rec_summary),
+        "Dst2D0pi_D02KSKS_ULLL" : maketuple_Dst2D0pi_D02KSKS_ULLL(options, pvs, rec_summary),
+        "Dst2D0pi_D02KSKS_ULLL_Tight" : maketuple_Dst2D0pi_D02KSKS_ULLL_Tight(options, pvs, rec_summary),
+        "Dst2D0pi_D02KSKS_ULDD" : maketuple_Dst2D0pi_D02KSKS_ULDD(options, pvs, rec_summary),
+        "Dst2D0pi_D02KSKS_ULDD_Tight" : maketuple_Dst2D0pi_D02KSKS_ULDD_Tight(options, pvs, rec_summary),
+        "Dst2D0pi_D02KSKS_LLLD" : maketuple_Dst2D0pi_D02KSKS_LLLD(options, pvs, rec_summary),
+        "Dst2D0pi_D02KSKS_LLLD_Tight" : maketuple_Dst2D0pi_D02KSKS_LLLD_Tight(options, pvs, rec_summary),
+        "Dst2D0pi_D02KSKS_DDLD" : maketuple_Dst2D0pi_D02KSKS_DDLD(options, pvs, rec_summary),
+        "Dst2D0pi_D02KSKS_DDLD_Tight" : maketuple_Dst2D0pi_D02KSKS_DDLD_Tight(options, pvs, rec_summary),
+    }
+
+    MCtuples = {
+        "MC_Dst2D0pi_D02KSKS_LLLL" : maketuple_MC_Dst2D0pi_D02KSKS_LLLL(options, pvs, rec_summary)
+    }
+
+    if options.simulation:
+        tuples = tuples | MCtuples
+        
+    config = make_config(options, tuples)
+
+    return config
diff --git a/Charm_2024validation/Charm_2024validation/main_d_to_hhh.py b/Charm_2024validation/Charm_2024validation/main_d_to_hhh.py
new file mode 100644
index 0000000000..516e32b119
--- /dev/null
+++ b/Charm_2024validation/Charm_2024validation/main_d_to_hhh.py
@@ -0,0 +1,63 @@
+###############################################################################
+# (c) Copyright 2021-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 .options.d_to_hhh import *
+from .options.d_to_hhh_MC import *
+from .options.detection_asymmetry import *
+
+from DaVinci import Options, make_config
+from PyConf.reading import get_pvs, get_rec_summary
+
+def main(options: Options):
+
+    # get ODIN and DecReports location
+    pvs = get_pvs()
+    rec_summary = get_rec_summary()
+
+    tuples = {
+        #D2hhh
+        "D2Kpipi" : maketuple_D2Kpipi(options, pvs, rec_summary),
+        "D2Kpipi_NoCuts" : maketuple_D2Kpipi(options, pvs, rec_summary,True),
+        #"D2Kpipi_Kpi" : maketuple_D2Kpipi_Kpi(options, pvs, rec_summary), #subcomb of 2 out of 3 daughters
+        "Ds2KKpi" : maketuple_Ds2KKpi(options, pvs, rec_summary),
+        "Ds2KKpi_NoCuts" : maketuple_Ds2KKpi(options, pvs, rec_summary,True),
+        "D2pipipi" : maketuple_D2pipipi(options, pvs, rec_summary),
+        "D2pipipi_NoCuts" : maketuple_D2pipipi(options, pvs, rec_summary,True),
+        "D2pipiK" : maketuple_D2pipiK(options, pvs, rec_summary),
+        "D2pipiK_NoCuts" : maketuple_D2pipiK(options, pvs, rec_summary,True),
+        "D2KKK" : maketuple_D2KKK(options, pvs, rec_summary),
+        "D2KKK_NoCuts" : maketuple_D2KKK(options, pvs, rec_summary,True),
+        "D2piKK" : maketuple_D2piKK(options, pvs, rec_summary),
+        "D2piKK_NoCuts" : maketuple_D2piKK(options, pvs, rec_summary,True),
+        "B02Dpi_D2KKpi" : maketuple_B02Dpi_D2KKpi(options, pvs, rec_summary),
+        "B02Dpi_D2pipipi" : maketuple_B02Dpi_D2pipipi(options, pvs, rec_summary),
+        "Bs02Dspi_Ds2KKpi" : maketuple_Bs02Dspi_Ds2KKpi(options, pvs, rec_summary),
+        "Bs02Dspi_Ds2pipipi" : maketuple_Bs02Dspi_Ds2pipipi(options, pvs, rec_summary),
+        #ADet
+        "D2Kpipi_ADet" : maketuple_D2Kpipi_ADet(options, pvs, rec_summary),
+        "D2pipipi_ADet" : maketuple_D2pipipi_ADet(options, pvs, rec_summary),
+        "Ds2KKpi_ADet" : maketuple_Ds2KKpi_ADet(options, pvs, rec_summary),
+
+
+    }
+
+    MCtuples = {
+        "MC_D2Kpipi" : maketuple_MC_D2Kpipi(options, pvs, rec_summary),
+        "MC_Ds2KKpi" : maketuple_MC_Ds2KKpi(options, pvs, rec_summary)
+        "MC_Ds2KKK" : maketuple_MC_Ds2KKK(options, pvs, rec_summary)
+    }
+
+    if options.simulation:
+        tuples = tuples | MCtuples
+
+    config = make_config(options, tuples)
+
+    return config
diff --git a/Charm_2024validation/Charm_2024validation/main_d_to_ksh.py b/Charm_2024validation/Charm_2024validation/main_d_to_ksh.py
new file mode 100644
index 0000000000..00ddc66093
--- /dev/null
+++ b/Charm_2024validation/Charm_2024validation/main_d_to_ksh.py
@@ -0,0 +1,48 @@
+###############################################################################
+# (c) Copyright 2021-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 .options.d_to_ksh import *
+from .options.d_to_ksh_MC import *
+from .options.detection_asymmetry import *
+
+from DaVinci import Options, make_config
+from PyConf.reading import get_pvs, get_rec_summary
+
+def main(options: Options):
+
+    # get ODIN and DecReports location
+    pvs = get_pvs()
+    rec_summary = get_rec_summary()
+
+    tuples = {
+        #D2KSh
+        "D2KSpi_LL" : maketuple_D2KSpi_LL(options, pvs, rec_summary),
+        "D2KSK_LL" : maketuple_D2KSK_LL(options, pvs, rec_summary),
+        "D2KSpi_LD" : maketuple_D2KSpi_LD(options, pvs, rec_summary),
+        "D2KSK_LD" : maketuple_D2KSK_LD(options, pvs, rec_summary),
+        "D2KSpi_DD" : maketuple_D2KSpi_DD(options, pvs, rec_summary),
+        "D2KSK_DD" : maketuple_D2KSK_DD(options, pvs, rec_summary),
+        #ADet
+        "D2KSK_LL_ADet" : maketuple_D2KSK_LL_ADet(options, pvs, rec_summary),
+        "D2KSpi_LL_ADet" : maketuple_D2KSpi_LL_ADet(options, pvs, rec_summary),
+    }
+
+    MCtuples = {
+        "MC_D2KSK" : maketuple_MC_D2KSK(options, pvs, rec_summary),
+        "MC_D2KSpi" : maketuple_MC_D2KSpi(options, pvs, rec_summary),
+    }
+
+    if options.simulation:
+        tuples = tuples | MCtuples
+        
+    config = make_config(options, tuples)
+
+    return config
diff --git a/Charm_2024validation/Charm_2024validation/main_detection_asymmetry.py b/Charm_2024validation/Charm_2024validation/main_detection_asymmetry.py
new file mode 100644
index 0000000000..1ededecf77
--- /dev/null
+++ b/Charm_2024validation/Charm_2024validation/main_detection_asymmetry.py
@@ -0,0 +1,31 @@
+###############################################################################
+# (c) Copyright 2021-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 .options.detection_asymmetry import *
+
+from DaVinci import Options, make_config
+from PyConf.reading import get_pvs, get_rec_summary
+
+def main(options: Options):
+        
+    # get ODIN and DecReports location
+    pvs = get_pvs()
+    rec_summary = get_rec_summary()
+
+    tuples = {
+        #ADet
+        "Lc2KSp_LL_ADet" : maketuple_Lc2KSp_LL_ADet(options, pvs, rec_summary),
+        "Lc2pKpi_ADet" : maketuple_Lc2pKpi_ADet(options, pvs, rec_summary),
+    }
+        
+    config = make_config(options, tuples)
+
+    return config
diff --git a/Charm_2024validation/Charm_2024validation/main_dst_to_dee.py b/Charm_2024validation/Charm_2024validation/main_dst_to_dee.py
new file mode 100644
index 0000000000..3084abe4e7
--- /dev/null
+++ b/Charm_2024validation/Charm_2024validation/main_dst_to_dee.py
@@ -0,0 +1,42 @@
+###############################################################################
+# (c) Copyright 2021-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 .options.dst_to_dee import *
+
+from DaVinci import Options, make_config
+from PyConf.reading import get_pvs, get_rec_summary
+
+def main(options: Options):
+
+    # get ODIN and DecReports location
+    pvs = get_pvs()
+    rec_summary = get_rec_summary()
+
+    tuples = {
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS':             make_Dst0ToD0EmEp_D0ToKmPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS", pvs, rec_summary, 'dst_kpi_os'),
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS':             make_Dst0ToD0EmEp_D0ToKmPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS", pvs, rec_summary, 'dst_kpi_ss'),
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS_MVA':         make_Dst0ToD0EmEp_D0ToKmPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS_MVA", pvs, rec_summary, 'dst_kpi_os'),
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS_MVA':         make_Dst0ToD0EmEp_D0ToKmPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS_MVA", pvs, rec_summary, 'dst_kpi_ss'),
+
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS':       make_Dst0ToD0EmEp_D0ToKmPimPipPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS", pvs, rec_summary,'dst_k3pi_os' ),
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS':       make_Dst0ToD0EmEp_D0ToKmPimPipPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS", pvs, rec_summary, 'dst_k3pi_ss'),
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS_MVA':   make_Dst0ToD0EmEp_D0ToKmPimPipPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS_MVA", pvs, rec_summary, 'dst_k3pi_os'),
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS_MVA':   make_Dst0ToD0EmEp_D0ToKmPimPipPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS_MVA", pvs, rec_summary, 'dst_k3pi_ss'),
+
+    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS':     make_DstpToDpDspEmEp_DpDspToKmKpPip_tuple(options, "Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS", pvs, rec_summary, "dsstp_2kpi_os"),
+    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS':     make_DstpToDpDspEmEp_DpDspToKmKpPip_tuple(options, "Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS", pvs, rec_summary, "dsstp_2kpi_ss"),
+    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS_MVA': make_DstpToDpDspEmEp_DpDspToKmKpPip_tuple(options, "Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS_MVA", pvs, rec_summary, "dsstp_2kpi_os"),
+    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS_MVA': make_DstpToDpDspEmEp_DpDspToKmKpPip_tuple(options, "Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS_MVA", pvs, rec_summary, "dsstp_2kpi_ss"),
+    }
+
+    config = make_config(options, tuples)
+
+    return config
\ No newline at end of file
diff --git a/Charm_2024validation/Charm_2024validation/main_rare_charm.py b/Charm_2024validation/Charm_2024validation/main_rare_charm.py
new file mode 100644
index 0000000000..d38574262b
--- /dev/null
+++ b/Charm_2024validation/Charm_2024validation/main_rare_charm.py
@@ -0,0 +1,41 @@
+###############################################################################
+# (c) Copyright 2021-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 .options.rare_charm import *
+#from .options.rare_charm_MC import *
+
+from DaVinci import Options, make_config
+from PyConf.reading import get_pvs, get_rec_summary
+
+def main(options: Options):
+        
+    # get ODIN and DecReports location
+    pvs = get_pvs()
+    rec_summary = get_rec_summary()
+
+    tuples = {
+        "D2pimumu" : maketuple_D2pimumu(options, pvs, rec_summary),
+        "D2pimumu_WS" : maketuple_D2pimumu_WS(options, pvs, rec_summary),
+        "CharmRD_D2pipipi" : maketuple_D2pipipi(options, pvs, rec_summary),
+        "D2piee" : maketuple_D2piee(options, pvs, rec_summary),
+        "Lc2pmumu" : maketuple_Lc2pmumu(options, pvs, rec_summary),
+        "Dst2D0pi_D02Kpimumu_RS" : maketuple_Dst2D0pi_D02Kpimumu_RS(options, pvs, rec_summary),
+    }
+
+    MCtuples = {
+    }
+    
+    if options.simulation:
+        tuples = tuples | MCtuples
+        
+    config = make_config(options, tuples)
+
+    return config
diff --git a/Charm_2024validation/Charm_2024validation/options/d0_to_hh.py b/Charm_2024validation/Charm_2024validation/options/d0_to_hh.py
new file mode 100644
index 0000000000..80a3cdcec2
--- /dev/null
+++ b/Charm_2024validation/Charm_2024validation/options/d0_to_hh.py
@@ -0,0 +1,432 @@
+from .tupling import (
+    make_composite_variables,
+    make_basic_variables,
+    make_hlt2_event_variables,
+    make_DeltaM_variable,
+    make_composite_dtf_variables,
+    make_basic_dtf_variables,
+)
+
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from FunTuple import FunTuple_Particles as Funtuple
+
+
+def make_dtf_variables(options, pvs, input_data, ptype):
+
+    if ptype not in ["basic", "composite"]:
+        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
+
+    from DecayTreeFitter import DecayTreeFitter
+    
+    DTF = DecayTreeFitter(
+        name=f'DTF_{{hash}}',
+        input_particles=input_data)
+
+    DTFvtx = DecayTreeFitter(
+        name=f'DTFvtx_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    DTFmass = DecayTreeFitter(
+        name=f'DTFmass_{{hash}}',
+        input_particles=input_data,
+        mass_constraints=["D0"])
+
+    DTFvtxmass = DecayTreeFitter(
+        name=f'DTFvtxmass_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0"])
+
+    if ptype == "basic":
+        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmass,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="D0")
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmass,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="D0")
+        return dtf_vars
+
+    if ptype == "composite":
+        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmass,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="D0")
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmass,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="D0")
+        return dtf_vars
+
+def maketuple_D02KK_LowBias(options, pvs, rec_summary):
+    name = "D02KK_LowBias"
+    turbo_line = "Hlt2Charm_D0ToKmKp_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> K- K+]CC",
+        "Km"   : "[D0 -> ^K- K+]CC",
+        "Kp"  : "[D0 -> K- ^K+]CC",
+    }
+
+    variables = {
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D02KK(options, pvs, rec_summary):
+    name = "D02KK"
+    turbo_line = "Hlt2Charm_D0ToKmKp"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> K- K+]CC",
+        "Km"   : "[D0 -> ^K- K+]CC",
+        "Kp"  : "[D0 -> K- ^K+]CC",
+    }
+
+    variables = {
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D02Kpi_LowBias(options, pvs, rec_summary):
+    name = "D02Kpi_LowBias"
+    turbo_line = "Hlt2Charm_D0ToKmPip_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> K- pi+]CC",
+        "Km"   : "[D0 -> ^K- pi+]CC",
+        "pip"  : "[D0 -> K- ^pi+]CC",
+    }
+
+    variables = {
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D02Kpi(options, pvs, rec_summary):
+    name = "D02Kpi"
+    turbo_line = "Hlt2Charm_D0ToKmPip"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> K- pi+]CC",
+        "Km"   : "[D0 -> ^K- pi+]CC",
+        "pip"  : "[D0 -> K- ^pi+]CC",
+    }
+
+    variables = {
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D02pipi_LowBias(options, pvs, rec_summary):
+    name = "D02pipi_LowBias"
+    turbo_line = "Hlt2Charm_D0ToPimPip_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> pi- pi+]CC",
+        "pim"   : "[D0 -> ^pi- pi+]CC",
+        "pip"  : "[D0 -> pi- ^pi+]CC",
+    }
+
+    variables = {
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D02pipi(options, pvs, rec_summary):
+    name = "D02pipi"
+    turbo_line = "Hlt2Charm_D0ToPimPip"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> pi- pi+]CC",
+        "pim"   : "[D0 -> ^pi- pi+]CC",
+        "pip"  : "[D0 -> pi- ^pi+]CC",
+    }
+
+    variables = {
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02KK_LowBias(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02KK_LowBias"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmKp_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> ([D0]CC -> K- K+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> K- K+) pi+]CC",
+        "Km"   : "[D*(2010)+ -> ([D0]CC -> ^K- K+) pi+]CC",
+        "Kp"  : "[D*(2010)+ -> ([D0]CC -> K- ^K+) pi+]CC",
+        "spip" : "[D*(2010)+ -> ([D0]CC -> K- K+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02KK(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02KK"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmKp"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> ([D0]CC -> K- K+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> K- K+) pi+]CC",
+        "Km"   : "[D*(2010)+ -> ([D0]CC -> ^K- K+) pi+]CC",
+        "Kp"  : "[D*(2010)+ -> ([D0]CC -> K- ^K+) pi+]CC",
+        "spip" : "[D*(2010)+ -> ([D0]CC -> K- K+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02Kpi_RS_LowBias(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02Kpi_RS_LowBias"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPip_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> (D0 -> K- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^(D0 -> K- pi+) pi+]CC",
+        "Km"   : "[D*(2010)+ -> (D0 -> ^K- pi+) pi+]CC",
+        "pip"  : "[D*(2010)+ -> (D0 -> K- ^pi+) pi+]CC",
+        "spip" : "[D*(2010)+ -> (D0 -> K- pi+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02Kpi_RS(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02Kpi_RS"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPip"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> (D0 -> K- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^(D0 -> K- pi+) pi+]CC",
+        "Km"   : "[D*(2010)+ -> (D0 -> ^K- pi+) pi+]CC",
+        "pip"  : "[D*(2010)+ -> (D0 -> K- ^pi+) pi+]CC",
+        "spip" : "[D*(2010)+ -> (D0 -> K- pi+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02Kpi_WS_LowBias(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02Kpi_WS_LowBias"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKpPim_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> (D0 -> K+ pi-) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^(D0 -> K+ pi-) pi+]CC",
+        "Kp"   : "[D*(2010)+ -> (D0 -> ^K+ pi-) pi+]CC",
+        "pim"  : "[D*(2010)+ -> (D0 -> K+ ^pi-) pi+]CC",
+        "spip" : "[D*(2010)+ -> (D0 -> K+ pi-) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Kp"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pim"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02Kpi_WS(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02Kpi_WS"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKpPim"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> (D0 -> K+ pi-) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^(D0 -> K+ pi-) pi+]CC",
+        "Kp"   : "[D*(2010)+ -> (D0 -> ^K+ pi-) pi+]CC",
+        "pim"  : "[D*(2010)+ -> (D0 -> K+ ^pi-) pi+]CC",
+        "spip" : "[D*(2010)+ -> (D0 -> K+ pi-) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Kp"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pim"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02pipi_LowBias(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02pipi_LowBias"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimPip_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> ([D0]CC -> pi- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> pi- pi+) pi+]CC",
+        "pim"   : "[D*(2010)+ -> ([D0]CC -> ^pi- pi+) pi+]CC",
+        "pip"  : "[D*(2010)+ -> ([D0]CC -> pi- ^pi+) pi+]CC",
+        "spip" : "[D*(2010)+ -> ([D0]CC -> pi- pi+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02pipi(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02pipi"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimPip"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> ([D0]CC -> pi- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> pi- pi+) pi+]CC",
+        "pim"   : "[D*(2010)+ -> ([D0]CC -> ^pi- pi+) pi+]CC",
+        "pip"  : "[D*(2010)+ -> ([D0]CC -> pi- ^pi+) pi+]CC",
+        "spip" : "[D*(2010)+ -> ([D0]CC -> pi- pi+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
diff --git a/Charm_2024validation/Charm_2024validation/options/d0_to_hh_MC.py b/Charm_2024validation/Charm_2024validation/options/d0_to_hh_MC.py
new file mode 100644
index 0000000000..aaae05665d
--- /dev/null
+++ b/Charm_2024validation/Charm_2024validation/options/d0_to_hh_MC.py
@@ -0,0 +1,99 @@
+from .tupling import (
+    make_MC_composite_variables,
+    make_MC_basic_variables,
+    make_MC_event_variables,
+)
+
+from PyConf.reading import get_mc_particles, get_mc_header
+from FunTuple import FunTuple_MCParticles as FuntupleMC
+
+def maketuple_MC_Dst2D0pi_D02Kpi_RS(options, pvs, rec_summary):
+    name = "MC_Dst2D0pi_D02Kpi_RS"
+    line = "/Event/MC/Particles"
+
+    input_data = get_mc_particles(f"{line}")
+
+    branches = {
+        "Dst" : "[D*(2010)+ ==> (D0 ==> K- pi+ ) pi+]CC",
+        "D0"  : "[D*(2010)+ ==> ^(D0 ==> K- pi+ ) pi+]CC",
+        "Km"   : "[D*(2010)+ ==> (D0 ==> ^K- pi+ ) pi+]CC",
+        "pip"  : "[D*(2010)+ ==> (D0 ==> K- ^pi+ ) pi+]CC",
+        "spip" : "[D*(2010)+ ==> (D0 ==> K- pi+ ) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_MC_composite_variables(),
+        "D0"    : make_MC_composite_variables(),
+        "Km"     : make_MC_basic_variables(),
+        "pip"    : make_MC_basic_variables(),
+        "spip"   : make_MC_basic_variables(),
+    }
+
+    mytuple  = FuntupleMC(name=name,
+                          tuple_name="MCDecayTree",
+                          fields=branches, variables = variables,
+                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
+                          inputs=input_data)
+
+    return [mytuple]
+
+def maketuple_MC_Dst2D0pi_D02KK(options, pvs, rec_summary):
+    name = "MC_Dst2D0pi_D02KK"
+    line = "/Event/MC/Particles"
+
+    input_data = get_mc_particles(f"{line}")
+
+    branches = {
+        "Dst" : "[D*(2010)+ ==> ([D0]CC ==> K- K+) pi+]CC",
+        "D0"  : "[D*(2010)+ ==> ^([D0]CC ==> K- K+) pi+]CC",
+        "Km"   : "[D*(2010)+ ==> ([D0]CC ==> ^K- K+) pi+]CC",
+        "Kp"  : "[D*(2010)+ ==> ([D0]CC ==> K- ^K+) pi+]CC",
+        "spip" : "[D*(2010)+ ==> ([D0]CC ==> K- K+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_MC_composite_variables(),
+        "D0"    : make_MC_composite_variables(),
+        "Km"     : make_MC_basic_variables(),
+        "Kp"    : make_MC_basic_variables(),
+        "spip"   : make_MC_basic_variables(),
+    }
+
+    mytuple  = FuntupleMC(name=name,
+                        tuple_name="MCDecayTree",
+                        fields=branches, variables = variables,
+                        event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
+                        inputs=input_data)
+
+    return [mytuple]
+
+
+def maketuple_MC_Dst2D0pi_D02pipi(options, pvs, rec_summary):
+    name = "MC_Dst2D0pi_D02pipi"
+    line = "/Event/MC/Particles"
+
+    input_data = get_mc_particles(f"{line}")
+
+    branches = {
+        "Dst" : "[D*(2010)+ ==> ([D0]CC ==> pi- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ ==> ^([D0]CC ==> pi- pi+) pi+]CC",
+        "pim"   : "[D*(2010)+ ==> ([D0]CC ==> ^pi- pi+) pi+]CC",
+        "pip"  : "[D*(2010)+ ==> ([D0]CC ==> pi- ^pi+) pi+]CC",
+        "spip" : "[D*(2010)+ ==> ([D0]CC ==> pi- pi+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_MC_composite_variables(),
+        "D0"    : make_MC_composite_variables(),
+        "pim"     : make_MC_basic_variables(),
+        "pip"    : make_MC_basic_variables(),
+        "spip"   : make_MC_basic_variables(),
+    }
+
+    mytuple  = FuntupleMC(name=name,
+                        tuple_name="MCDecayTree",
+                        fields=branches, variables = variables,
+                        event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
+                        inputs=input_data)
+
+    return [mytuple]
diff --git a/Charm_2024validation/Charm_2024validation/options/d0_to_hhhh.py b/Charm_2024validation/Charm_2024validation/options/d0_to_hhhh.py
new file mode 100644
index 0000000000..0277430fb9
--- /dev/null
+++ b/Charm_2024validation/Charm_2024validation/options/d0_to_hhhh.py
@@ -0,0 +1,247 @@
+from .tupling import (
+    make_composite_variables,
+    make_composite_variables_4body,
+    make_composite_variables_3body,
+    make_basic_variables,
+    make_hlt2_event_variables,
+    make_DeltaM_variable,
+    make_basic_dtf_variables,
+    make_composite_dtf_variables
+)
+
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from FunTuple import FunTuple_Particles as Funtuple
+from DecayTreeFitter import DecayTreeFitter
+
+# I can't get make_composite_variables_4body to work for some reason...
+import Functors as F
+from FunTuple import FunctorCollection
+variables_4body = (
+    FunctorCollection(
+        {
+            #14
+            "M14": F.SUBCOMB(Functor=F.MASS, Indices=(1, 4)),
+            "SDOCA14"     : F.SDOCA(Child1=1,Child2=4),
+            "SDOCACHI214" : F.SDOCACHI2(Child1=1,Child2=4),
+            "DOCA14"      : F.DOCA(Child1=1,Child2=4),
+            "DOCACHI214"  : F.DOCACHI2(Child1=1,Child2=4),
+            "COS14": F.ALV(1, 4),
+            #24
+            "M24": F.SUBCOMB(Functor=F.MASS, Indices=(2, 4)),
+            "SDOCA24"     : F.SDOCA(Child1=2,Child2=4),
+            "SDOCACHI224" : F.SDOCACHI2(Child1=2,Child2=4),
+            "DOCA24"      : F.DOCA(Child1=2,Child2=4),
+            "DOCACHI224"  : F.DOCACHI2(Child1=2,Child2=4),
+            "COS24": F.ALV(2, 4),
+            #34
+            "M34": F.SUBCOMB(Functor=F.MASS, Indices=(3, 4)),
+            "SDOCA34"     : F.SDOCA(Child1=3,Child2=4),
+            "SDOCACHI234" : F.SDOCACHI2(Child1=3,Child2=4),
+            "DOCA34"      : F.DOCA(Child1=3,Child2=4),
+            "DOCACHI234"  : F.DOCACHI2(Child1=3,Child2=4),
+            "COS34": F.ALV(3, 4),
+        }
+    )
+)
+
+
+def maketuple_DstToD0pi_D0ToKKPiPi(options, pvs, rec_summary):
+    name = "DstToD0pi_D0ToKKPiPi"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmKpPimPip"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> ([D0]CC -> K+ K- pi+ pi-) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> K+ K- pi+ pi-) pi+]CC",
+        "h1"  : "[D*(2010)+ -> ([D0]CC -> ^K+ K- pi+ pi-) pi+]CC",
+        "h2"  : "[D*(2010)+ -> ([D0]CC -> K+ ^K- pi+ pi-) pi+]CC",
+        "h3"  : "[D*(2010)+ -> ([D0]CC -> K+ K- ^pi+ pi-) pi+]CC",
+        "h4"  : "[D*(2010)+ -> ([D0]CC -> K+ K- pi+ ^pi-) pi+]CC",
+        "pis" : "[D*(2010)+ -> ([D0]CC -> K+ K- pi+ pi-) ^pi+]CC",
+    }
+
+    DTF_PV = DecayTreeFitter(
+        name='DTF_D0ToKKPiPi_PV',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    basic_variables = make_basic_variables(options, pvs, input_data) +\
+        make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)
+
+    composite_dtf_variables = make_composite_dtf_variables(options,
+                                                           pvs,
+                                                           input_data,
+                                                           DTF=DTF_PV,
+                                                           pv_constraint=True)
+
+    composite_variables = make_composite_variables(options, pvs, input_data) + composite_dtf_variables
+        
+
+    composite_variables_4body = make_composite_variables_3body(options, pvs, input_data) + composite_dtf_variables + variables_4body
+
+    variables = {
+        "Dst"   : composite_variables+make_DeltaM_variable(options),
+        "D0"    : composite_variables_4body,
+        "h1"    : basic_variables,
+        "h2"    : basic_variables,
+        "h3"    : basic_variables,
+        "h4"    : basic_variables,
+        "pis"   : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstToD0pi_D0ToKPiPiPi(options, pvs, rec_summary):
+    name = "DstToD0pi_D0ToKPiPiPi"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPimPipPip"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> (D0 -> K- pi+ pi- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^(D0 -> K- pi+ pi- pi+) pi+]CC",
+        "h1"   : "[D*(2010)+ -> (D0 -> ^K- pi+ pi- pi+) pi+]CC",
+        "h2"  : "[D*(2010)+ -> (D0 -> K- ^pi+ pi- pi+) pi+]CC",
+        "h3"   : "[D*(2010)+ -> (D0 -> K- pi+ ^pi- pi+) pi+]CC",
+        "h4"  : "[D*(2010)+ -> (D0 -> K- pi+ pi- ^pi+) pi+]CC",
+        "pis" : "[D*(2010)+ -> (D0 -> K- pi+ pi- pi+) ^pi+]CC",
+    }
+
+    DTF_PV = DecayTreeFitter(
+        name='DTF_D0ToKPiPiPi_PV',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    basic_variables = make_basic_variables(options, pvs, input_data) +\
+        make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True, mass_constraint=False)
+
+    composite_dtf_variables = make_composite_dtf_variables(options,
+                                                           pvs,
+                                                           input_data,
+                                                           DTF=DTF_PV,
+                                                           pv_constraint=True)
+
+    composite_variables = make_composite_variables(options, pvs, input_data) + composite_dtf_variables
+        
+
+    composite_variables_4body = make_composite_variables_3body(options, pvs, input_data) + composite_dtf_variables + variables_4body
+
+    variables = {
+        "Dst"   : composite_variables+make_DeltaM_variable(options),
+        "D0"    : composite_variables_4body,
+        "h1"    : basic_variables,
+        "h2"    : basic_variables,
+        "h3"    : basic_variables,
+        "h4"    : basic_variables,
+        "pis"   : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstToD0pi_D0ToPiKPiPi(options, pvs, rec_summary):
+    name = "DstToD0pi_D0ToPiKPiPi"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKpPimPimPip"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> (D0 -> pi- K+ pi- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^(D0 -> pi- K+ pi- pi+) pi+]CC",
+        "h1"   : "[D*(2010)+ -> (D0 -> ^pi- K+ pi- pi+) pi+]CC",
+        "h2"  : "[D*(2010)+ -> (D0 -> pi- ^K+ pi- pi+) pi+]CC",
+        "h3"   : "[D*(2010)+ -> (D0 -> pi- K+ ^pi- pi+) pi+]CC",
+        "h4"  : "[D*(2010)+ -> (D0 -> pi- K+ pi- ^pi+) pi+]CC",
+        "pis" : "[D*(2010)+ -> (D0 -> pi- K+ pi- pi+) ^pi+]CC",
+    }
+
+    DTF_PV = DecayTreeFitter(
+        name='DTF_D0ToPiKPiPi_PV',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    basic_variables = make_basic_variables(options, pvs, input_data) +\
+        make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True, mass_constraint=False)
+
+    composite_dtf_variables = make_composite_dtf_variables(options,
+                                                           pvs,
+                                                           input_data,
+                                                           DTF=DTF_PV,
+                                                           pv_constraint=True)
+
+    composite_variables = make_composite_variables(options, pvs, input_data) + composite_dtf_variables
+        
+
+    composite_variables_4body = make_composite_variables_3body(options, pvs, input_data) + composite_dtf_variables + variables_4body
+
+    variables = {
+        "Dst"   : composite_variables+make_DeltaM_variable(options),
+        "D0"    : composite_variables_4body,
+        "h1"    : basic_variables,
+        "h2"    : basic_variables,
+        "h3"    : basic_variables,
+        "h4"    : basic_variables,
+        "pis"   : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstToD0pi_D0ToPiPiPiPi(options, pvs, rec_summary):
+    name = "DstToD0pi_D0ToPiPiPiPi"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimPimPipPip"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> ([D0]CC -> pi+ pi- pi+ pi-) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> pi+ pi- pi+ pi-) pi+]CC",
+        "h1"  : "[D*(2010)+ -> ([D0]CC -> ^pi+ pi- pi+ pi-) pi+]CC",
+        "h2"  : "[D*(2010)+ -> ([D0]CC -> pi+ ^pi- pi+ pi-) pi+]CC",
+        "h3"  : "[D*(2010)+ -> ([D0]CC -> pi+ pi- ^pi+ pi-) pi+]CC",
+        "h4"  : "[D*(2010)+ -> ([D0]CC -> pi+ pi- pi+ ^pi-) pi+]CC",
+        "pis" : "[D*(2010)+ -> ([D0]CC -> pi+ pi- pi+ pi-) ^pi+]CC",
+    }
+
+    DTF_PV = DecayTreeFitter(
+        name='DTF_D0ToPiPiPiPi_PV',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    basic_variables = make_basic_variables(options, pvs, input_data) +\
+        make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True, mass_constraint=False)
+
+    composite_dtf_variables = make_composite_dtf_variables(options,
+                                                           pvs,
+                                                           input_data,
+                                                           DTF=DTF_PV,
+                                                           pv_constraint=True)
+
+    composite_variables = make_composite_variables(options, pvs, input_data) + composite_dtf_variables
+        
+
+    composite_variables_4body = make_composite_variables_3body(options, pvs, input_data) + composite_dtf_variables + variables_4body
+
+    variables = {
+        "Dst"   : composite_variables+make_DeltaM_variable(options),
+        "D0"    : composite_variables_4body,
+        "h1"    : basic_variables,
+        "h2"    : basic_variables,
+        "h3"    : basic_variables,
+        "h4"    : basic_variables,
+        "pis"   : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
diff --git a/Charm_2024validation/Charm_2024validation/options/d0_to_hhhh_MC.py b/Charm_2024validation/Charm_2024validation/options/d0_to_hhhh_MC.py
new file mode 100644
index 0000000000..2dbe198fa9
--- /dev/null
+++ b/Charm_2024validation/Charm_2024validation/options/d0_to_hhhh_MC.py
@@ -0,0 +1,43 @@
+from .tupling import (
+    make_MC_composite_variables,
+    make_MC_basic_variables,
+    make_MC_event_variables,
+)
+
+from PyConf.reading import get_mc_particles, get_mc_header
+from FunTuple import FunTuple_MCParticles as FuntupleMC
+
+def maketuple_MC_DstToD0pi_D0ToKPiPiPi(options, pvs, rec_summary):
+    name = "MC_DstToD0pi_D0ToKPiPiPi"
+
+    line = "/Event/MC/Particles"
+    
+    input_data = get_mc_particles(f"{line}")
+
+    branches = {
+        "Dst" : "[D*(2010)+ ==> (D0 ==> K- pi+ pi- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ ==> ^(D0 ==> K- pi+ pi- pi+) pi+]CC",
+        "h1"   : "[D*(2010)+ ==> (D0 ==> ^K- pi+ pi- pi+) pi+]CC",
+        "h2"  : "[D*(2010)+ ==> (D0 ==> K- ^pi+ pi- pi+) pi+]CC",
+        "h3"   : "[D*(2010)+ ==> (D0 ==> K- pi+ ^pi- pi+) pi+]CC",
+        "h4"  : "[D*(2010)+ ==> (D0 ==> K- pi+ pi- ^pi+) pi+]CC",
+        "pis" : "[D*(2010)+ ==> (D0 ==> K- pi+ pi- pi+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_MC_composite_variables(),
+        "D0"    : make_MC_composite_variables(),
+        "h1"     : make_MC_basic_variables(),
+        "h2"    : make_MC_basic_variables(),
+        "h3"    : make_MC_basic_variables(),
+        "h4"    : make_MC_basic_variables(),
+        "pis"   : make_MC_basic_variables(),
+    }
+
+    mytuple  = FuntupleMC(name=name,
+                          tuple_name="MCDecayTree",
+                          fields=branches, variables = variables,  
+                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])), 
+                          inputs=input_data)
+
+    return [mytuple]
diff --git a/Charm_2024validation/Charm_2024validation/options/d0_to_hhpi0.py b/Charm_2024validation/Charm_2024validation/options/d0_to_hhpi0.py
new file mode 100644
index 0000000000..cf3c3ba59f
--- /dev/null
+++ b/Charm_2024validation/Charm_2024validation/options/d0_to_hhpi0.py
@@ -0,0 +1,359 @@
+from .tupling import (
+    make_composite_variables,
+    make_DeltaM_variable,
+    make_basic_variables,
+    make_hlt2_event_variables,
+    make_top_isolation_variables,
+    make_basic_isolation_variables,
+    make_intermediate_isolation_variables,
+    make_composite_dtf_variables,
+    make_basic_dtf_variables,
+)
+
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from FunTuple import FunTuple_Particles as Funtuple
+
+iso_vars_locations = ["LongTrackIso", "NeutralIso", "PizIso"]
+
+def make_dtf_variables(options, pvs, input_data, ptype):
+
+    if ptype not in ["basic", "composite"]:
+        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
+
+    from DecayTreeFitter import DecayTreeFitter
+    
+    DTF = DecayTreeFitter(
+        name=f'DTF_{{hash}}',
+        input_particles=input_data)
+
+    DTFvtx = DecayTreeFitter(
+        name=f'DTFvtx_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    DTFmass = DecayTreeFitter(
+        name=f'DTFmass_{{hash}}',
+        input_particles=input_data,
+        mass_constraints=["D0"])
+
+    DTFvtxmass = DecayTreeFitter(
+        name=f'DTFvtxmass_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0"])
+
+    if ptype == "basic":
+        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmass,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="D0")
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmass,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="D0")
+        return dtf_vars
+
+    if ptype == "composite":
+        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmass,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="D0")
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmass,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="D0")
+        return dtf_vars
+
+
+def maketuple_Dst2D0pi_D02KKpi0_M(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02KKpi0_M"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmKpPi0_M"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) pi0) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (phi(1020) -> K- K+) pi0) pi+]CC",
+        "phi"   : "[D*(2010)+ -> ([D0]CC -> ^(phi(1020) -> K- K+) pi0) pi+]CC",
+        "Km"   : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> ^K- K+) pi0) pi+]CC",
+        "Kp"  : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- ^K+) pi0) pi+]CC",
+        "pi0"  : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) ^pi0) pi+]CC",
+        "spip" : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) pi0) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "phi"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation:
+
+        variables = {
+            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="D0"),
+            "phi"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="phi(1020)"),
+            "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02KKpi0_R(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02KKpi0_R"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmKpPi0_R"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) (pi0 -> gamma gamma) ) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (phi(1020) -> K- K+) (pi0 -> gamma gamma) ) pi+]CC",
+        "phi"   : "[D*(2010)+ -> ([D0]CC -> ^(phi(1020) -> K- K+) (pi0 -> gamma gamma) ) pi+]CC",
+        "Km"   : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> ^K- K+) (pi0 -> gamma gamma) ) pi+]CC",
+        "Kp"  : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- ^K+) (pi0 -> gamma gamma) ) pi+]CC",
+        "pi0"  : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) ^(pi0 -> gamma gamma) ) pi+]CC",
+        "gamma1"  : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) (pi0 -> ^gamma gamma) ) pi+]CC",
+        "gamma2"  : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) (pi0 -> gamma ^gamma) ) pi+]CC",
+        "spip" : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) (pi0 -> gamma gamma) ) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "phi"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "gamma1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "gamma2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation:
+
+        variables = {
+            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="D0"),
+            "phi"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="phi(1020)"),
+            "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="pi0"),
+            "gamma1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "gamma2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02Kpipi0_M(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02Kpipi0_M"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPipPi0_M"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) pi0) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^(D0 -> (K*(892)~0 -> K- pi+) pi0) pi+]CC",
+        "Kst"   : "[D*(2010)+ -> (D0 -> ^(K*(892)~0 -> K- pi+) pi0) pi+]CC",
+        "Km"   : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> ^K- pi+) pi0) pi+]CC",
+        "pip"  : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- ^pi+) pi0) pi+]CC",
+        "pi0"  : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) ^pi0) pi+]CC",
+        "spip" : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) pi0) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Kst"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation:
+
+        variables = {
+            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="D0"),
+            "Kst"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="K*(892)~0"),
+            "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02Kpipi0_R(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02Kpipi0_R"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPipPi0_R"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) (pi0 -> gamma gamma) ) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^(D0 -> (K*(892)~0 -> K- pi+) (pi0 -> gamma gamma) ) pi+]CC",
+        "Kst"   : "[D*(2010)+ -> (D0 -> ^(K*(892)~0 -> K- pi+) (pi0 -> gamma gamma) ) pi+]CC",
+        "Km"   : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> ^K- pi+) (pi0 -> gamma gamma) ) pi+]CC",
+        "pip"  : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- ^pi+) (pi0 -> gamma gamma) ) pi+]CC",
+        "pi0"  : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) ^(pi0 -> gamma gamma) ) pi+]CC",
+        "gamma1"  : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) (pi0 -> ^gamma gamma) ) pi+]CC",
+        "gamma2"  : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) (pi0 -> gamma ^gamma) ) pi+]CC",
+        "spip" : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) (pi0 -> gamma gamma) ) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Kst"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "gamma1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "gamma2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation:
+
+        variables = {
+            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="D0"),
+            "Kst"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="K*(892)~0"),
+            "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="pi0"),
+            "gamma1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "gamma2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02pipipi0_M(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02pipipi0_M"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimPipPi0_M"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) pi0) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (rho(770)0 -> pi- pi+) pi0) pi+]CC",
+        "rho"   : "[D*(2010)+ -> ([D0]CC -> ^(rho(770)0 -> pi- pi+) pi0) pi+]CC",
+        "pim"   : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> ^pi- pi+) pi0) pi+]CC",
+        "pip"  : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- ^pi+) pi0) pi+]CC",
+        "pi0"  : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) ^pi0) pi+]CC",
+        "spip" : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) pi0) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "rho"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation:
+
+        variables = {
+            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="D0"),
+            "rho"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="rho(770)0"),
+            "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02pipipi0_R(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02pipipi0_R"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimPipPi0_R"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) (pi0 -> gamma gamma) ) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (rho(770)0 -> pi- pi+) (pi0 -> gamma gamma) ) pi+]CC",
+        "rho"   : "[D*(2010)+ -> ([D0]CC -> ^(rho(770)0 -> pi- pi+) (pi0 -> gamma gamma) ) pi+]CC",
+        "pim"   : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> ^pi- pi+) (pi0 -> gamma gamma) ) pi+]CC",
+        "pip"  : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- ^pi+) (pi0 -> gamma gamma) ) pi+]CC",
+        "pi0"  : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) ^(pi0 -> gamma gamma) ) pi+]CC",
+        "gamma1"  : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) (pi0 -> ^gamma gamma) ) pi+]CC",
+        "gamma2"  : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) (pi0 -> gamma ^gamma) ) pi+]CC",
+        "spip" : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) (pi0 -> gamma gamma) ) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "rho"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "gamma1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "gamma2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation:
+
+        variables = {
+            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="D0"),
+            "rho"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="rho(770)0"),
+            "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="pi0"),
+            "gamma1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "gamma2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
diff --git a/Charm_2024validation/Charm_2024validation/options/d0_to_hhpi0_MC.py b/Charm_2024validation/Charm_2024validation/options/d0_to_hhpi0_MC.py
new file mode 100644
index 0000000000..84648f4e71
--- /dev/null
+++ b/Charm_2024validation/Charm_2024validation/options/d0_to_hhpi0_MC.py
@@ -0,0 +1,44 @@
+from .tupling import (
+    make_MC_composite_variables,
+    make_MC_basic_variables,
+    make_MC_event_variables,
+)
+
+from PyConf.reading import get_mc_particles, get_mc_header
+from FunTuple import FunTuple_MCParticles as FuntupleMC
+
+def maketuple_MC_Dst2D0pi_D02Kpipi0(options, pvs, rec_summary):
+    name = "MC_Dst2D0pi_D02Kpipi0"
+    line = "/Event/MC/Particles"
+    
+    input_data = get_mc_particles(f"{line}")
+
+    branches = {
+        "Dst" : "[D*(2010)+ ==> (D0 ==> K- pi+ (pi0 ==> gamma gamma) ) pi+]CC",
+        "D0"  : "[D*(2010)+ ==> ^(D0 ==> K- pi+ (pi0 ==> gamma gamma) ) pi+]CC",
+        "Km"   : "[D*(2010)+ ==> (D0 ==> ^K- pi+ (pi0 ==> gamma gamma) ) pi+]CC",
+        "pip"  : "[D*(2010)+ ==> (D0 ==> K- ^pi+ (pi0 ==> gamma gamma) ) pi+]CC",
+        "pi0"  : "[D*(2010)+ ==> (D0 ==> K- pi+ ^(pi0 ==> gamma gamma) ) pi+]CC",
+        "gamma1"  : "[D*(2010)+ ==> (D0 ==> K- pi+ (pi0 ==> ^gamma gamma) ) pi+]CC",
+        "gamma2"  : "[D*(2010)+ ==> (D0 ==> K- pi+ (pi0 ==> gamma ^gamma) ) pi+]CC",
+        "spip" : "[D*(2010)+ ==> (D0 ==> K- pi+ (pi0 ==> gamma gamma) ) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_MC_composite_variables(),
+        "D0"    : make_MC_composite_variables(),
+        "Km"     : make_MC_basic_variables(),
+        "pip"    : make_MC_basic_variables(),
+        "pi0"    : make_MC_basic_variables(),
+        "gamma1"    : make_MC_basic_variables(),
+        "gamma2"    : make_MC_basic_variables(),
+        "spip"   : make_MC_basic_variables(),
+    }
+
+    mytuple  = FuntupleMC(name=name,
+                          tuple_name="MCDecayTree",
+                          fields=branches, variables = variables,  
+                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])), 
+                          inputs=input_data)
+
+    return [mytuple]
diff --git a/Charm_2024validation/Charm_2024validation/options/d0_to_kshh.py b/Charm_2024validation/Charm_2024validation/options/d0_to_kshh.py
new file mode 100644
index 0000000000..dad027529f
--- /dev/null
+++ b/Charm_2024validation/Charm_2024validation/options/d0_to_kshh.py
@@ -0,0 +1,1585 @@
+from .tupling import (
+    make_composite_variables,
+    make_composite_variables_3body,
+    make_basic_variables,
+    make_hlt2_event_variables,
+    make_DeltaM_variable,
+    make_basic_dtf_variables,
+    make_composite_dtf_variables,
+    make_composite_dtf_variables_3body,
+)
+
+import Functors as F
+from Functors.math import log
+from DaVinci import Options, make_config
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from FunTuple import FunctorCollection
+from PyConf.reading import get_particles
+import FunTuple.functorcollections as FC
+from FunTuple import FunTuple_Particles as Funtuple
+from DecayTreeFitter import DecayTreeFitter
+
+# define helper functors
+get_SV =  F.ENDVERTEX @ F.FORWARDARG0
+get_SV_pos = F.TOLINALG @ F.POSITION @ get_SV
+# only if composite (i.e. has vertex)

+get_child_1 = F.CHILD(1, F.FORWARDARG0) # change here the index of the child.
+get_child_endvtx_pos_1 = F.ENDVERTEX_POS  @ get_child_1
+get_fdvec_child_1 = get_child_endvtx_pos_1 - get_SV_pos
+
+# define observables
+IP_wrt_SV_KS0 = F.IP.bind(get_SV_pos , get_child_1)
+IPCHI2_wrt_SV_KS0 = F.IPCHI2.bind(get_SV , get_child_1)
+# only if child is composite (i.e. has vertex)
+FD_wrt_SV_KS0 = F.MAGNITUDE @ get_fdvec_child_1
+FDCHI2_wrt_SV_KS0 = F.VTX_FDCHI2.bind(get_SV, get_child_1)
+# Note: Apply the functors to the head of the node of decay tree e.g. B
+# Functor collection for SV related info
+topo_sv_var = FunctorCollection(
+    {
+        "ORIVXIP_CHILD1": IP_wrt_SV_KS0,
+        "ORIVXIPCHI2_CHILD1": IPCHI2_wrt_SV_KS0,
+        "ORIVXFD_CHILD1": FD_wrt_SV_KS0,
+        "ORIVXFDCHI2_CHILD1": FDCHI2_wrt_SV_KS0,
+    }
+)
+
+"""
+ D0->KSππ LL, DD x LowBias x Dstar
+ D0->KSK-Ï€+ LL, DD x LowBias x Dstar
+ D0->KSK+Ï€- LL, DD x LowBias x Dstar
+ D0->KSKK LL, DD x LowBias x Dstar
+ nb: https://gitlab.cern.ch/lhcb/Moore/-/blob/master/Hlt/Hlt2Conf/python/Hlt2Conf/lines/charm/d0_to_kshh.py?ref_type=heads
+
+ """
+
+# D0->KSππ
+def maketuple_DstpToD0Pip_D0ToKsPimPip_LL_LowBias(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsPimPip_LL_LowBias"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_LL_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) pi- pi+) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) pi- pi+) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^pi- pi+) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- ^pi+) pi+]CC",
+        "pis" :   "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D02KSPiPi_LL_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D02KSPiPi_LL_lowbias_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0") + topo_sv_var,
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstpToD0Pip_D0ToKsPimPip_DD_LowBias(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsPimPip_DD_LowBias"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_DD_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) pi- pi+) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) pi- pi+) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^pi- pi+) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- ^pi+) pi+]CC",
+        "pis" :   "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D02KSPiPi_DD_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D02KSPiPi_DD_lowbias_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0") + topo_sv_var,
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstpToD0Pip_D0ToKsPimPip_LL(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsPimPip_LL"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_LL"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) pi- pi+) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) pi- pi+) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^pi- pi+) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- ^pi+) pi+]CC",
+        "pis" :   "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D02KSPiPi_LL_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D02KSPiPi_LL_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF= DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF= DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF= DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF= DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF= DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF= DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0") + topo_sv_var,
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstpToD0Pip_D0ToKsPimPip_DD(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsPimPip_DD"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_DD"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) pi- pi+) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) pi- pi+) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^pi- pi+) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- ^pi+) pi+]CC",
+        "pis" :   "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D02KSPiPi_DD_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D02KSPiPi_DD_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0") + topo_sv_var,
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsPimPip_LL_LowBias(options, pvs, rec_summary):
+    name = "D0ToKsPimPip_LL_LowBias"
+    turbo_line = "Hlt2Charm_D0ToKsPimPip_LL_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) pi- pi+]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) pi- pi+]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) pi- pi+]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) pi- pi+]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^pi- pi+]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) pi- ^pi+]CC",
+    }
+
+    DTF_D0ToKsPimPip_LL_LB_MASS = DecayTreeFitter(
+        name='DTF_D02KSPiPi_LL_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsPimPip_DD_LowBias(options, pvs, rec_summary):
+    name = "D0ToKsPimPip_DD_LowBias"
+    turbo_line = "Hlt2Charm_D0ToKsPimPip_DD_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) pi- pi+]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) pi- pi+]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) pi- pi+]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) pi- pi+]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^pi- pi+]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) pi- ^pi+]CC",
+    }
+
+    DTF_D0ToKsPimPip_DD_LB_MASS = DecayTreeFitter(
+        name='DTF_D02KSPiPi_DD_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsPimPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsPimPip_LL(options, pvs, rec_summary):
+    name = "D0ToKsPimPip_LL"
+    turbo_line = "Hlt2Charm_D0ToKsPimPip_LL"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) pi- pi+]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) pi- pi+]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) pi- pi+]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) pi- pi+]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^pi- pi+]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) pi- ^pi+]CC",
+    }
+
+    DTF_D0ToKsPimPip_LL_MASS = DecayTreeFitter(
+        name='DTF_D02KSPiPi_LL_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsPimPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsPimPip_DD(options, pvs, rec_summary):
+    name = "D0ToKsPimPip_DD"
+    turbo_line = "Hlt2Charm_D0ToKsPimPip_DD"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) pi- pi+]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) pi- pi+]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) pi- pi+]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) pi- pi+]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^pi- pi+]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) pi- ^pi+]CC",
+    }
+
+    DTF_D0ToKsPimPip_DD_MASS = DecayTreeFitter(
+        name='DTF_D02KSPiPi_DD_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsPimPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+# D0->KSK-Ï€+
+def maketuple_DstpToD0Pip_D0ToKsKmPip_LL_LowBias(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsKmPip_LL_LowBias"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_LL_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- pi+) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- pi+) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- pi+) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- pi+) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^pi+) pi+]CC",
+        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D0ToKsKmPip_LL_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D0ToKsKmPip_LL_lowbias_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstpToD0Pip_D0ToKsKmPip_DD_LowBias(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsKmPip_DD_LowBias"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_DD_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- pi+) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- pi+) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- pi+) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- pi+) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^pi+) pi+]CC",
+        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D0ToKsKmPip_DD_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D0ToKsKmPip_DD_lowbias_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstpToD0Pip_D0ToKsKmPip_LL(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsKmPip_LL"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_LL"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- pi+) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- pi+) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- pi+) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- pi+) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^pi+) pi+]CC",
+        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D0ToKsKmPip_LL_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D0ToKsKmPip_LL_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstpToD0Pip_D0ToKsKmPip_DD(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsKmPip_DD"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_DD"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- pi+) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- pi+) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- pi+) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- pi+) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^pi+) pi+]CC",
+        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D0ToKsKmPip_DD_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D0ToKsKmPip_DD_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsKmPip_LL_LowBias(options, pvs, rec_summary):
+    name = "D0ToKsKmPip_LL_LowBias"
+    turbo_line = "Hlt2Charm_D0ToKsKmPip_LL_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- pi+]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- pi+]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- pi+]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- pi+]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- pi+]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^pi+]CC",
+    }
+
+    DTF_D0ToKsKmPip_LL_LB_MASS = DecayTreeFitter(
+        name='DTF_D0ToKsKmPip_LL_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsKmPip_DD_LowBias(options, pvs, rec_summary):
+    name = "D0ToKsKmPip_DD_LowBias"
+    turbo_line = "Hlt2Charm_D0ToKsKmPip_DD_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- pi+]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- pi+]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- pi+]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- pi+]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- pi+]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^pi+]CC",
+    }
+
+    DTF_D0ToKsKmPip_DD_LB_MASS = DecayTreeFitter(
+        name='DTF_D0ToKsKmPip_DD_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsKmPip_LL(options, pvs, rec_summary):
+    name = "D0ToKsKmPip_LL"
+    turbo_line = "Hlt2Charm_D0ToKsKmPip_LL"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- pi+]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- pi+]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- pi+]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- pi+]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- pi+]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^pi+]CC",
+    }
+
+    DTF_D0ToKsKmPip_LL_MASS = DecayTreeFitter(
+        name='DTF_D0ToKsKmPip_LL_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsKmPip_DD(options, pvs, rec_summary):
+    name = "D0ToKsKmPip_DD"
+    turbo_line = "Hlt2Charm_D0ToKsKmPip_DD"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- pi+]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- pi+]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- pi+]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- pi+]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- pi+]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^pi+]CC",
+    }
+
+    DTF_D0ToKsKmPip_DD_MASS = DecayTreeFitter(
+        name='DTF_D0ToKsKmPip_DD_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+# D0->KSK+Ï€-
+def maketuple_DstpToD0Pip_D0ToKsKpPim_LL_LowBias(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsKpPim_LL_LowBias"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_LL_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K+ pi-) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K+ pi-) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K+ pi-) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ ^pi-) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K+ pi-) pi+]CC",
+        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D0ToKsKpPim_LL_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D0ToKsKpPim_LL_lowbias_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstpToD0Pip_D0ToKsKpPim_DD_LowBias(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsKpPim_DD_LowBias"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_DD_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K+ pi-) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K+ pi-) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K+ pi-) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ ^pi-) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K+ pi-) pi+]CC",
+        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D0ToKsKpPim_DD_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D0ToKsKpPim_DD_lowbias_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstpToD0Pip_D0ToKsKpPim_LL(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsKpPim_LL"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_LL"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K+ pi-) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K+ pi-) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K+ pi-) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ ^pi-) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K+ pi-) pi+]CC",
+        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D0ToKsKpPim_LL_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D0ToKsKpPim_LL_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstpToD0Pip_D0ToKsKpPim_DD(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsKpPim_DD"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_DD"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K+ pi-) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K+ pi-) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K+ pi-) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ ^pi-) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K+ pi-) pi+]CC",
+        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D0ToKsKpPim_DD_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D0ToKsKpPim_DD_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsKpPim_LL_LowBias(options, pvs, rec_summary):
+    name = "D0ToKsKpPim_LL_LowBias"
+    turbo_line = "Hlt2Charm_D0ToKsKpPim_LL_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) K+ pi-]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K+ pi-]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K+ pi-]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K+ pi-]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) K+ ^pi-]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) ^K+ pi-]CC",
+    }
+
+    DTF_D0ToKsKpPim_LL_LB_MASS = DecayTreeFitter(
+        name='DTF_D0ToKsKpPim_LL_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKpPim_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsKpPim_DD_LowBias(options, pvs, rec_summary):
+    name = "D0ToKsKpPim_DD_LowBias"
+    turbo_line = "Hlt2Charm_D0ToKsKpPim_DD_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) K+ pi-]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K+ pi-]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K+ pi-]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K+ pi-]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) K+ ^pi-]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) ^K+ pi-]CC",
+    }
+
+    DTF_D0ToKsKpPim_DD_LB_MASS = DecayTreeFitter(
+        name='DTF_D0ToKsKpPim_DD_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKpPim_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsKpPim_LL(options, pvs, rec_summary):
+    name = "D0ToKsKpPim_LL"
+    turbo_line = "Hlt2Charm_D0ToKsKpPim_LL"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) K+ pi-]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K+ pi-]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K+ pi-]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K+ pi-]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) K+ ^pi-]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) ^K+ pi-]CC",
+    }
+
+    DTF_D0ToKsKpPim_LL_MASS = DecayTreeFitter(
+        name='DTF_D0ToKsKpPim_LL_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKpPim_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsKpPim_DD(options, pvs, rec_summary):
+    name = "D0ToKsKpPim_DD"
+    turbo_line = "Hlt2Charm_D0ToKsKpPim_DD"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) K+ pi-]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K+ pi-]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K+ pi-]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K+ pi-]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) K+ ^pi-]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) ^K+ pi-]CC",
+    }
+
+    DTF_D0ToKsKpPim_DD_MASS = DecayTreeFitter(
+        name='DTF_D0ToKsKpPim_DD_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKpPim_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+# D0->KSK-K+
+def maketuple_DstpToD0Pip_D0ToKsKmKp_LL_LowBias(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsKmKp_LL_LowBias"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_LL_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- K+) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- K+) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- K+) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- K+) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^K+) pi+]CC",
+        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D0ToKsKmKp_LL_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D0ToKsKmKp_LL_lowbias_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstpToD0Pip_D0ToKsKmKp_DD_LowBias(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsKmKp_DD_LowBias"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_DD_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- K+) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- K+) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- K+) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- K+) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^K+) pi+]CC",
+        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D0ToKsKmKp_DD_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D0ToKsKmKp_DD_lowbias_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstpToD0Pip_D0ToKsKmKp_LL(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsKmKp_LL"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_LL"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- K+) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- K+) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- K+) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- K+) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^K+) pi+]CC",
+        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D0ToKsKmKp_LL_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D0ToKsKmKp_LL_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstpToD0Pip_D0ToKsKmKp_DD(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsKmKp_DD"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_DD"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- K+) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- K+) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- K+) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- K+) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^K+) pi+]CC",
+        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D0ToKsKmKp_DD_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D0ToKsKmKp_DD_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsKmKp_LL_LowBias(options, pvs, rec_summary):
+    name = "D0ToKsKmKp_LL_LowBias"
+    turbo_line = "Hlt2Charm_D0ToKsKmKp_LL_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- K+]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- K+]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- K+]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- K+]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- K+]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^K+]CC",
+    }
+
+    DTF_D0ToKsKmKp_LL_LB_MASS = DecayTreeFitter(
+        name='DTF_D0ToKsKmKp_LL_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmKp_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsKmKp_DD_LowBias(options, pvs, rec_summary):
+    name = "D0ToKsKmKp_DD_LowBias"
+    turbo_line = "Hlt2Charm_D0ToKsKmKp_DD_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- K+]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- K+]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- K+]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- K+]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- K+]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^K+]CC",
+    }
+
+    DTF_D0ToKsKmKp_DD_LB_MASS = DecayTreeFitter(
+        name='DTF_D0ToKsKmKp_DD_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmKp_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstpToD0Pip_D0ToKsPimPip_LL_NoBias(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsPimPip_LL_NoBias"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_LL_NoBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) pi- pi+) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) pi- pi+) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^pi- pi+) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- ^pi+) pi+]CC",
+        "pis" :   "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D02KSPiPi_LL_nobias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D02KSPiPi_LL_nobias_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0") + topo_sv_var,
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsKmKp_LL(options, pvs, rec_summary):
+    name = "D0ToKsKmKp_LL"
+    turbo_line = "Hlt2Charm_D0ToKsKmKp_LL"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- K+]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- K+]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- K+]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- K+]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- K+]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^K+]CC",
+    }
+
+    DTF_D0ToKsKmKp_LL_MASS = DecayTreeFitter(
+        name='DTF_D0ToKsKmKp_LL_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmKp_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsKmKp_DD(options, pvs, rec_summary):
+    name = "D0ToKsKmKp_DD"
+    turbo_line = "Hlt2Charm_D0ToKsKmKp_DD"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- K+]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- K+]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- K+]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- K+]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- K+]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^K+]CC",
+    }
+
+    DTF_D0ToKsKmKp_DD_MASS = DecayTreeFitter(
+        name='DTF_D0ToKsKmKp_DD_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmKp_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+# ########################################
diff --git a/Charm_2024validation/Charm_2024validation/options/d0_to_kshh_MC.py b/Charm_2024validation/Charm_2024validation/options/d0_to_kshh_MC.py
new file mode 100644
index 0000000000..9fa138f8ef
--- /dev/null
+++ b/Charm_2024validation/Charm_2024validation/options/d0_to_kshh_MC.py
@@ -0,0 +1,44 @@
+from .tupling import (
+    make_MC_composite_variables,
+    make_MC_basic_variables,
+    make_MC_event_variables,
+)
+
+from PyConf.reading import get_mc_particles, get_mc_header
+from FunTuple import FunTuple_MCParticles as FuntupleMC
+
+def maketuple_MC_DstpToD0Pip_D0ToKsPimPip(options, pvs, rec_summary):
+    name = "MC_DstpToD0Pip_D0ToKsPimPip"
+    line = "/Event/MC/Particles"
+    
+    input_data = get_mc_particles(f"{line}")
+
+    branches = {
+       "Dst" : "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi- pi+) pi- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ ==> ^([D0]CC ==> (KS0 ==> pi- pi+) pi- pi+) pi+]CC",
+        "KS0"  : "[D*(2010)+ ==> ([D0]CC ==> ^(KS0 ==> pi- pi+) pi- pi+) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> ^pi- pi+) pi- pi+) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi- ^pi+) pi- pi+) pi+]CC",
+        "hm"   : "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi- pi+) ^pi- pi+) pi+]CC",
+        "hp"  :  "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi- pi+) pi- ^pi+) pi+]CC",
+        "pis" :  "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi- pi+) pi- pi+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_MC_composite_variables(),
+        "D0"    : make_MC_composite_variables(),
+        "KS0"    : make_MC_composite_variables(),
+        "KS0_pim"     : make_MC_basic_variables(),
+        "KS0_pip"     : make_MC_basic_variables(),
+        "hm"    : make_MC_basic_variables(),
+        "hp"    : make_MC_basic_variables(),
+        "pis"   : make_MC_basic_variables(),
+    }
+
+    mytuple  = FuntupleMC(name=name,
+                          tuple_name="MCDecayTree",
+                          fields=branches, variables = variables,  
+                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])), 
+                          inputs=input_data)
+
+    return [mytuple]
diff --git a/Charm_2024validation/Charm_2024validation/options/d0_to_ksks.py b/Charm_2024validation/Charm_2024validation/options/d0_to_ksks.py
new file mode 100644
index 0000000000..d47253aa14
--- /dev/null
+++ b/Charm_2024validation/Charm_2024validation/options/d0_to_ksks.py
@@ -0,0 +1,1049 @@
+import Functors as F
+from Functors.math import log
+from DaVinci import Options, make_config
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from FunTuple import FunctorCollection
+from PyConf.reading import get_particles, get_pvs
+import FunTuple.functorcollections as FC
+from FunTuple import FunTuple_Particles as Funtuple
+from DecayTreeFitter import DecayTreeFitter
+
+from .tupling import (
+    make_basic_variables,
+    make_composite_variables,
+    make_hlt2_event_variables,
+    make_basic_dtf_variables,
+    make_composite_dtf_variables,
+    Hlt1_lines
+)
+
+# define helper functors
+get_SV =  F.ENDVERTEX @ F.FORWARDARG0
+get_SV_pos = F.TOLINALG @ F.POSITION @ get_SV
+# only if composite (i.e. has vertex)

+get_child_1 = F.CHILD(1, F.FORWARDARG0) # change here the index of the child.
+get_child_endvtx_pos_1 = F.ENDVERTEX_POS  @ get_child_1
+get_fdvec_child_1 = get_child_endvtx_pos_1 - get_SV_pos
+get_child_2 = F.CHILD(2, F.FORWARDARG0) # change here the index of the child.
+get_child_endvtx_pos_2 = F.ENDVERTEX_POS  @ get_child_2
+get_fdvec_child_2 = get_child_endvtx_pos_2 - get_SV_pos
+
+# define observables
+IP_wrt_SV_KS1 = F.IP.bind(get_SV_pos , get_child_1)
+IP_wrt_SV_KS2 = F.IP.bind(get_SV_pos , get_child_2)
+IPCHI2_wrt_SV_KS1 = F.IPCHI2.bind(get_SV , get_child_1)
+IPCHI2_wrt_SV_KS2 = F.IPCHI2.bind(get_SV , get_child_2)
+# only if child is composite (i.e. has vertex)
+FD_wrt_SV_KS1 = F.MAGNITUDE @ get_fdvec_child_1
+FD_wrt_SV_KS2 = F.MAGNITUDE @ get_fdvec_child_2
+FDCHI2_wrt_SV_KS1 = F.VTX_FDCHI2.bind(get_SV, get_child_1)
+FDCHI2_wrt_SV_KS2 = F.VTX_FDCHI2.bind(get_SV, get_child_2)
+# Note: Apply the functors to the head of the node of decay tree e.g. B
+# Functor collection for SV related info
+topo_sv_var = FunctorCollection(
+    {
+        "ORIVXIP_CHILD1": IP_wrt_SV_KS1,
+        "ORIVXIP_CHILD2": IP_wrt_SV_KS2,
+        "ORIVXIPCHI2_CHILD1": IPCHI2_wrt_SV_KS1,
+        "ORIVXIPCHI2_CHILD2": IPCHI2_wrt_SV_KS2,
+        "ORIVXFD_CHILD1": FD_wrt_SV_KS1,
+        "ORIVXFD_CHILD2": FD_wrt_SV_KS2,
+        "ORIVXFDCHI2_CHILD1": FDCHI2_wrt_SV_KS1,
+        "ORIVXFDCHI2_CHILD2": FDCHI2_wrt_SV_KS2,
+    }
+)
+
+############################# LLLL #############################
+def maketuple_Dst2D0pi_D02KSKS_LLLL(options, pvs, rec_summary):
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLL"
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+
+    fields = {
+        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
+        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
+        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
+    }
+
+    # DTF_LLLL = DecayTreeFitter(
+    #     name='DTF_LLLL',
+    #     input_particles=input_data)
+    #
+    # DTF_LLLL_PV = DecayTreeFitter(
+    #     name='DTF_LLLL_PV',
+    #     input_particles=input_data,
+    #     input_pvs=pvs)
+
+    DTF_LLLL_MASS = DecayTreeFitter(
+        name='DTF_LLLL_mass',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTF_LLLL_MASS_PV = DecayTreeFitter(
+        'DTF_LLLL_MASS_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL, pv_constraint=False, mass_constraint=False) +\
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_PV, pv_constraint=True, mass_constraint=False) +\
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL, pv_constraint=False, mass_constraint=False) +\
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_PV, pv_constraint=True, mass_constraint=False) +\
+
+    variables = {"pip1": basic_variables,
+                 "pim1": basic_variables,
+                 "pip2": basic_variables,
+                 "pim2": basic_variables,
+                 "KS1": composite_variables,
+                 "KS2": composite_variables,
+                 "D0": composite_variables + topo_sv_var,
+                 "Dst": composite_variables,
+                 "pi_soft": basic_variables,
+    }
+
+    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    mytuple = Funtuple(
+        "DstToD0PiToKS0KS0_LLLL",
+        "Tuple",
+        fields=fields,
+        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data, store_multiple_cand_info=True)
+
+    return [my_filter, mytuple]
+
+############################# LLLL Tight #############################
+def maketuple_Dst2D0pi_D02KSKS_LLLL_Tight(options, pvs, rec_summary):
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLL_Tight"
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+
+    fields = {
+        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
+        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
+        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
+    }
+
+    # DTF_LLLL_Tight = DecayTreeFitter(
+    #     name='DTF_LLLL_Tight',
+    #     input_particles=input_data)
+    #
+    # DTF_LLLL_Tight_PV = DecayTreeFitter(
+    #     name='DTF_LLLL_Tight_PV',
+    #     input_particles=input_data,
+    #     input_pvs=pvs)
+
+    DTF_LLLL_Tight_MASS = DecayTreeFitter(
+        name='DTF_LLLL_Tight_mass',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTF_LLLL_Tight_MASS_PV = DecayTreeFitter(
+        'DTF_LLLL_Tight_MASS_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_Tight, pv_constraint=False, mass_constraint=False) +\
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_Tight_PV, pv_constraint=True, mass_constraint=False) +\
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_Tight, pv_constraint=False, mass_constraint=False) +\
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_Tight_PV, pv_constraint=True, mass_constraint=False) +\
+
+    variables = {"pip1": basic_variables,
+                 "pim1": basic_variables,
+                 "pip2": basic_variables,
+                 "pim2": basic_variables,
+                 "KS1": composite_variables,
+                 "KS2": composite_variables,
+                 "D0": composite_variables + topo_sv_var,
+                 "Dst": composite_variables,
+                 "pi_soft": basic_variables,
+    }
+
+    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    mytuple = Funtuple(
+        "DstToD0PiToKS0KS0_LLLL_Tight",
+        "Tuple",
+        fields=fields,
+        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data, store_multiple_cand_info=True)
+
+    return [my_filter, mytuple]
+
+############################# LLDD #############################
+def maketuple_Dst2D0pi_D02KSKS_LLDD(options, pvs, rec_summary):
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLDD"
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+
+    fields = {
+        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
+        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
+        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
+    }
+
+    # DTF_LLDD = DecayTreeFitter(
+    #     name='DTF_LLDD',
+    #     input_particles=input_data)
+    #
+    # DTF_LLDD_PV = DecayTreeFitter(
+    #     name='DTF_LLDD_PV',
+    #     input_particles=input_data,
+    #     input_pvs=pvs)
+
+    DTF_LLDD_MASS = DecayTreeFitter(
+        name='DTF_LLDD_mass',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTF_LLDD_MASS_PV = DecayTreeFitter(
+        'DTF_LLDD_MASS_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLDD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLDD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLDD, pv_constraint=False, mass_constraint=False) +\
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLDD_PV, pv_constraint=True, mass_constraint=False) +\
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD, pv_constraint=False, mass_constraint=False) +\
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_PV, pv_constraint=True, mass_constraint=False) +\
+
+    variables = {"pip1": basic_variables,
+                 "pim1": basic_variables,
+                 "pip2": basic_variables,
+                 "pim2": basic_variables,
+                 "KS1": composite_variables,
+                 "KS2": composite_variables,
+                 "D0": composite_variables + topo_sv_var,
+                 "Dst": composite_variables,
+                 "pi_soft": basic_variables,
+    }
+
+    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    mytuple = Funtuple(
+        "DstToD0PiToKS0KS0_LLDD",
+        "Tuple",
+        fields=fields,
+        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data, store_multiple_cand_info=True)
+
+    return [my_filter, mytuple]
+
+############################# LLDD Tight #############################
+def maketuple_Dst2D0pi_D02KSKS_LLDD_Tight(options, pvs, rec_summary):
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLDD_Tight"
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+
+    fields = {
+        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
+        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
+        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
+    }
+
+    # DTF_LLDD_Tight = DecayTreeFitter(
+    #     name='DTF_LLDD_Tight',
+    #     input_particles=input_data)
+    #
+    # DTF_LLDD_Tight_PV = DecayTreeFitter(
+    #     name='DTF_LLDD_Tight_PV',
+    #     input_particles=input_data,
+    #     input_pvs=pvs)
+
+    DTF_LLDD_Tight_MASS = DecayTreeFitter(
+        name='DTF_LLDD_Tight_mass',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTF_LLDD_Tight_MASS_PV = DecayTreeFitter(
+        'DTF_LLDD_Tight_MASS_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False, DTF=DTF_LLDD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False, DTF=DTF_LLDD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLDD_Tight, pv_constraint=False, mass_constraint=False) +\
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLDD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_Tight, pv_constraint=False, mass_constraint=False) +\
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
+
+    variables = {"pip1": basic_variables,
+                 "pim1": basic_variables,
+                 "pip2": basic_variables,
+                 "pim2": basic_variables,
+                 "KS1": composite_variables,
+                 "KS2": composite_variables,
+                 "D0": composite_variables + topo_sv_var,
+                 "Dst": composite_variables,
+                 "pi_soft": basic_variables,
+    }
+
+    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    mytuple = Funtuple(
+        "DstToD0PiToKS0KS0_LLDD_Tight",
+        "Tuple",
+        fields=fields,
+        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data, store_multiple_cand_info=True)
+
+    return [my_filter, mytuple]
+
+############################# DDDD #############################
+def maketuple_Dst2D0pi_D02KSKS_DDDD(options, pvs, rec_summary):
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDDD"
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+
+    fields = {
+        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
+        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
+        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
+    }
+
+    # DTF_DDDD = DecayTreeFitter(
+    #     name='DTF_DDDD',
+    #     input_particles=input_data)
+    #
+    # DTF_DDDD_PV = DecayTreeFitter(
+    #     name='DTF_DDDD_PV',
+    #     input_particles=input_data,
+    #     input_pvs=pvs)
+
+    DTF_DDDD_MASS = DecayTreeFitter(
+        name='DTF_DDDD_mass',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTF_DDDD_MASS_PV = DecayTreeFitter(
+        'DTF_DDDD_MASS_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD, pv_constraint=False, mass_constraint=False) +\
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_PV, pv_constraint=True, mass_constraint=False) +\
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD, pv_constraint=False, mass_constraint=False) +\
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_PV, pv_constraint=True, mass_constraint=False) +\
+
+    variables = {"pip1": basic_variables,
+                 "pim1": basic_variables,
+                 "pip2": basic_variables,
+                 "pim2": basic_variables,
+                 "KS1": composite_variables,
+                 "KS2": composite_variables,
+                 "D0": composite_variables + topo_sv_var,
+                 "Dst": composite_variables,
+                 "pi_soft": basic_variables,
+    }
+
+    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    mytuple = Funtuple(
+        "DstToD0PiToKS0KS0_DDDD",
+        "Tuple",
+        fields=fields,
+        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data, store_multiple_cand_info=True)
+
+    return [my_filter, mytuple]
+
+############################# DDDD Tight #############################
+def maketuple_Dst2D0pi_D02KSKS_DDDD_Tight(options, pvs, rec_summary):
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDDD_Tight"
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+
+    fields = {
+        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
+        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
+        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
+    }
+
+    # DTF_DDDD_Tight = DecayTreeFitter(
+    #     name='DTF_DDDD_Tight',
+    #     input_particles=input_data)
+    #
+    # DTF_DDDD_Tight_PV = DecayTreeFitter(
+    #     name='DTF_DDDD_Tight_PV',
+    #     input_particles=input_data,
+    #     input_pvs=pvs)
+
+    DTF_DDDD_Tight_MASS = DecayTreeFitter(
+        name='DTF_DDDD_Tight_mass',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTF_DDDD_Tight_MASS_PV = DecayTreeFitter(
+        'DTF_DDDD_Tight_MASS_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_Tight, pv_constraint=False, mass_constraint=False) +\
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_Tight, pv_constraint=False, mass_constraint=False) +\
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
+
+    variables = {"pip1": basic_variables,
+                 "pim1": basic_variables,
+                 "pip2": basic_variables,
+                 "pim2": basic_variables,
+                 "KS1": composite_variables,
+                 "KS2": composite_variables,
+                 "D0": composite_variables + topo_sv_var,
+                 "Dst": composite_variables,
+                 "pi_soft": basic_variables,
+    }
+
+    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    mytuple = Funtuple(
+        "DstToD0PiToKS0KS0_DDDD_Tight",
+        "Tuple",
+        fields=fields,
+        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data, store_multiple_cand_info=True)
+
+    return [my_filter, mytuple]
+
+############################# ULLL #############################
+def maketuple_Dst2D0pi_D02KSKS_ULLL(options, pvs, rec_summary):
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULLL"
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+
+    fields = {
+        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
+        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
+        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
+    }
+
+    # DTF_ULLL = DecayTreeFitter(
+    #     name='DTF_ULLL',
+    #     input_particles=input_data)
+    #
+    # DTF_ULLL_PV = DecayTreeFitter(
+    #     name='DTF_ULLL_PV',
+    #     input_particles=input_data,
+    #     input_pvs=pvs)
+
+    DTF_ULLL_MASS = DecayTreeFitter(
+        name='DTF_ULLL_mass',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTF_ULLL_MASS_PV = DecayTreeFitter(
+        'DTF_ULLL_MASS_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL, pv_constraint=False, mass_constraint=False) +\
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_PV, pv_constraint=True, mass_constraint=False) +\
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL, pv_constraint=False, mass_constraint=False) +\
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_PV, pv_constraint=True, mass_constraint=False) +\
+
+    variables = {"pip1": basic_variables,
+                 "pim1": basic_variables,
+                 "pip2": basic_variables,
+                 "pim2": basic_variables,
+                 "KS1": composite_variables,
+                 "KS2": composite_variables,
+                 "D0": composite_variables + topo_sv_var,
+                 "Dst": composite_variables,
+                 "pi_soft": basic_variables,
+    }
+
+    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    mytuple = Funtuple(
+        "DstToD0PiToKS0KS0_ULLL",
+        "Tuple",
+        fields=fields,
+        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data, store_multiple_cand_info=True)
+
+    return [my_filter, mytuple]
+
+############################# ULLL Tight #############################
+def maketuple_Dst2D0pi_D02KSKS_ULLL_Tight(options, pvs, rec_summary):
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULLL_Tight"
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+
+    fields = {
+        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
+        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
+        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
+    }
+
+    # DTF_ULLL_Tight = DecayTreeFitter(
+    #     name='DTF_ULLL_Tight',
+    #     input_particles=input_data)
+    #
+    # DTF_ULLL_Tight_PV = DecayTreeFitter(
+    #     name='DTF_ULLL_Tight_PV',
+    #     input_particles=input_data,
+    #     input_pvs=pvs)
+
+    DTF_ULLL_Tight_MASS = DecayTreeFitter(
+        name='DTF_ULLL_Tight_mass',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTF_ULLL_Tight_MASS_PV = DecayTreeFitter(
+        'DTF_ULLL_Tight_MASS_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_Tight, pv_constraint=False, mass_constraint=False) +\
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_Tight_PV, pv_constraint=True, mass_constraint=False) +\
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_Tight, pv_constraint=False, mass_constraint=False) +\
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_Tight_PV, pv_constraint=True, mass_constraint=False) +\
+
+    variables = {"pip1": basic_variables,
+                 "pim1": basic_variables,
+                 "pip2": basic_variables,
+                 "pim2": basic_variables,
+                 "KS1": composite_variables,
+                 "KS2": composite_variables,
+                 "D0": composite_variables + topo_sv_var,
+                 "Dst": composite_variables,
+                 "pi_soft": basic_variables,
+    }
+
+    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    mytuple = Funtuple(
+        "DstToD0PiToKS0KS0_ULLL_Tight",
+        "Tuple",
+        fields=fields,
+        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data, store_multiple_cand_info=True)
+
+    return [my_filter, mytuple]
+
+############################# ULDD #############################
+def maketuple_Dst2D0pi_D02KSKS_ULDD(options, pvs, rec_summary):
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULDD"
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+
+    fields = {
+        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
+        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
+        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
+    }
+
+    # DTF_ULDD = DecayTreeFitter(
+    #     name='DTF_ULDD',
+    #     input_particles=input_data)
+    #
+    # DTF_ULDD_PV = DecayTreeFitter(
+    #     name='DTF_ULDD_PV',
+    #     input_particles=input_data,
+    #     input_pvs=pvs)
+
+    DTF_ULDD_MASS = DecayTreeFitter(
+        name='DTF_ULDD_mass',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTF_ULDD_MASS_PV = DecayTreeFitter(
+        'DTF_ULDD_MASS_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD, pv_constraint=False, mass_constraint=False) +\
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_PV, pv_constraint=True, mass_constraint=False) +\
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD, pv_constraint=False, mass_constraint=False) +\
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_PV, pv_constraint=True, mass_constraint=False) +\
+
+    variables = {"pip1": basic_variables,
+                 "pim1": basic_variables,
+                 "pip2": basic_variables,
+                 "pim2": basic_variables,
+                 "KS1": composite_variables,
+                 "KS2": composite_variables,
+                 "D0": composite_variables + topo_sv_var,
+                 "Dst": composite_variables,
+                 "pi_soft": basic_variables,
+    }
+
+    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    mytuple = Funtuple(
+        "DstToD0PiToKS0KS0_ULDD",
+        "Tuple",
+        fields=fields,
+        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data, store_multiple_cand_info=True)
+
+    return [my_filter, mytuple]
+
+############################# ULDD Tight #############################
+def maketuple_Dst2D0pi_D02KSKS_ULDD_Tight(options, pvs, rec_summary):
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULDD_Tight"
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+
+    fields = {
+        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
+        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
+        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
+    }
+
+    # DTF_ULDD_Tight = DecayTreeFitter(
+    #     name='DTF_ULDD_Tight',
+    #     input_particles=input_data)
+    #
+    # DTF_ULDD_Tight_PV = DecayTreeFitter(
+    #     name='DTF_ULDD_Tight_PV',
+    #     input_particles=input_data,
+    #     input_pvs=pvs)
+
+    DTF_ULDD_Tight_MASS = DecayTreeFitter(
+        name='DTF_ULDD_Tight_mass',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTF_ULDD_Tight_MASS_PV = DecayTreeFitter(
+        'DTF_ULDD_Tight_MASS_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_Tight, pv_constraint=False, mass_constraint=False) +\
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_Tight, pv_constraint=False, mass_constraint=False) +\
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
+
+    variables = {"pip1": basic_variables,
+                 "pim1": basic_variables,
+                 "pip2": basic_variables,
+                 "pim2": basic_variables,
+                 "KS1": composite_variables,
+                 "KS2": composite_variables,
+                 "D0": composite_variables + topo_sv_var,
+                 "Dst": composite_variables,
+                 "pi_soft": basic_variables,
+    }
+
+    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    mytuple = Funtuple(
+        "DstToD0PiToKS0KS0_ULDD_Tight",
+        "Tuple",
+        fields=fields,
+        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data, store_multiple_cand_info=True)
+
+    return [my_filter, mytuple]
+
+############################# LLLD #############################
+def maketuple_Dst2D0pi_D02KSKS_LLLD(options, pvs, rec_summary):
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLD"
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+
+    fields = {
+        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
+        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
+        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
+    }
+
+    # DTF_LLLD = DecayTreeFitter(
+    #     name='DTF_LLLD',
+    #     input_particles=input_data)
+    #
+    # DTF_LLLD_PV = DecayTreeFitter(
+    #     name='DTF_LLLD_PV',
+    #     input_particles=input_data,
+    #     input_pvs=pvs)
+
+    DTF_LLLD_MASS = DecayTreeFitter(
+        name='DTF_LLLD_mass',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTF_LLLD_MASS_PV = DecayTreeFitter(
+        'DTF_LLLD_MASS_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD, pv_constraint=False, mass_constraint=False) +\
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_PV, pv_constraint=True, mass_constraint=False) +\
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD, pv_constraint=False, mass_constraint=False) +\
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_PV, pv_constraint=True, mass_constraint=False) +\
+
+    variables = {"pip1": basic_variables,
+                 "pim1": basic_variables,
+                 "pip2": basic_variables,
+                 "pim2": basic_variables,
+                 "KS1": composite_variables,
+                 "KS2": composite_variables,
+                 "D0": composite_variables + topo_sv_var,
+                 "Dst": composite_variables,
+                 "pi_soft": basic_variables,
+    }
+
+    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    mytuple = Funtuple(
+        "DstToD0PiToKS0KS0_LLLD",
+        "Tuple",
+        fields=fields,
+        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data, store_multiple_cand_info=True)
+
+    return [my_filter, mytuple]
+
+############################# LLLD Tight #############################
+def maketuple_Dst2D0pi_D02KSKS_LLLD_Tight(options, pvs, rec_summary):
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLD_Tight"
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+
+    fields = {
+        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
+        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
+        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
+    }
+
+    # DTF_LLLD_Tight = DecayTreeFitter(
+    #     name='DTF_LLLD_Tight',
+    #     input_particles=input_data)
+    #
+    # DTF_LLLD_Tight_PV = DecayTreeFitter(
+    #     name='DTF_LLLD_Tight_PV',
+    #     input_particles=input_data,
+    #     input_pvs=pvs)
+
+    DTF_LLLD_Tight_MASS = DecayTreeFitter(
+        name='DTF_LLLD_Tight_mass',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTF_LLLD_Tight_MASS_PV = DecayTreeFitter(
+        'DTF_LLLD_Tight_MASS_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_Tight, pv_constraint=False, mass_constraint=False) +\
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_Tight, pv_constraint=False, mass_constraint=False) +\
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
+
+    variables = {"pip1": basic_variables,
+                 "pim1": basic_variables,
+                 "pip2": basic_variables,
+                 "pim2": basic_variables,
+                 "KS1": composite_variables,
+                 "KS2": composite_variables,
+                 "D0": composite_variables + topo_sv_var,
+                 "Dst": composite_variables,
+                 "pi_soft": basic_variables,
+    }
+
+    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    mytuple = Funtuple(
+        "DstToD0PiToKS0KS0_LLLD_Tight",
+        "Tuple",
+        fields=fields,
+        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data, store_multiple_cand_info=True)
+
+    return [my_filter, mytuple]
+
+############################# DDLD #############################
+def maketuple_Dst2D0pi_D02KSKS_DDLD(options, pvs, rec_summary):
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDLD"
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+
+    fields = {
+        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
+        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
+        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
+    }
+
+    # DTF_DDLD = DecayTreeFitter(
+    #     name='DTF_DDLD',
+    #     input_particles=input_data)
+    #
+    # DTF_DDLD_PV = DecayTreeFitter(
+    #     name='DTF_DDLD_PV',
+    #     input_particles=input_data,
+    #     input_pvs=pvs)
+
+    DTF_DDLD_MASS = DecayTreeFitter(
+        name='DTF_DDLD_mass',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTF_DDLD_MASS_PV = DecayTreeFitter(
+        'DTF_DDLD_MASS_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD, pv_constraint=False, mass_constraint=False) +\
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_PV, pv_constraint=True, mass_constraint=False) +\
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD, pv_constraint=False, mass_constraint=False) +\
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_PV, pv_constraint=True, mass_constraint=False) +\
+
+    variables = {"pip1": basic_variables,
+                 "pim1": basic_variables,
+                 "pip2": basic_variables,
+                 "pim2": basic_variables,
+                 "KS1": composite_variables,
+                 "KS2": composite_variables,
+                 "D0": composite_variables + topo_sv_var,
+                 "Dst": composite_variables,
+                 "pi_soft": basic_variables,
+    }
+
+    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    mytuple = Funtuple(
+        "DstToD0PiToKS0KS0_DDLD",
+        "Tuple",
+        fields=fields,
+        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data, store_multiple_cand_info=True)
+
+    return [my_filter, mytuple]
+
+############################# DDLD Tight #############################
+def maketuple_Dst2D0pi_D02KSKS_DDLD_Tight(options, pvs, rec_summary):
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDLD_Tight"
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+
+    fields = {
+        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
+        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
+        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
+    }
+
+    # DTF_DDLD_Tight = DecayTreeFitter(
+    #     name='DTF_DDLD_Tight',
+    #     input_particles=input_data)
+    #
+    # DTF_DDLD_Tight_PV = DecayTreeFitter(
+    #     name='DTF_DDLD_Tight_PV',
+    #     input_particles=input_data,
+    #     input_pvs=pvs)
+
+    DTF_DDLD_Tight_MASS = DecayTreeFitter(
+        name='DTF_DDLD_Tight_mass',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTF_DDLD_Tight_MASS_PV = DecayTreeFitter(
+        'DTF_DDLD_Tight_MASS_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_Tight, pv_constraint=False, mass_constraint=False) +\
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_Tight, pv_constraint=False, mass_constraint=False) +\
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
+
+    variables = {"pip1": basic_variables,
+                 "pim1": basic_variables,
+                 "pip2": basic_variables,
+                 "pim2": basic_variables,
+                 "KS1": composite_variables,
+                 "KS2": composite_variables,
+                 "D0": composite_variables + topo_sv_var,
+                 "Dst": composite_variables,
+                 "pi_soft": basic_variables,
+    }
+
+    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    mytuple = Funtuple(
+        "DstToD0PiToKS0KS0_DDLD_Tight",
+        "Tuple",
+        fields=fields,
+        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data, store_multiple_cand_info=True)
+
+    return [my_filter, mytuple]
diff --git a/Charm_2024validation/Charm_2024validation/options/d0_to_ksks_MC.py b/Charm_2024validation/Charm_2024validation/options/d0_to_ksks_MC.py
new file mode 100644
index 0000000000..06c1ac6139
--- /dev/null
+++ b/Charm_2024validation/Charm_2024validation/options/d0_to_ksks_MC.py
@@ -0,0 +1,46 @@
+from .tupling import (
+    make_MC_composite_variables,
+    make_MC_basic_variables,
+    make_MC_event_variables,
+)
+
+from PyConf.reading import get_mc_particles, get_mc_header
+from FunTuple import FunTuple_MCParticles as FuntupleMC
+
+############################# LLLL #############################
+def maketuple_MC_Dst2D0pi_D02KSKS_LLLL(options, pvs, rec_summary):
+    name = "MC_DstpToD0Pip_D0ToKsKs_LLLL"
+    line = "/Event/MC/Particles"
+
+    input_data = get_mc_particles(f"{line}")
+
+    fields = {
+        "Dst": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi+ pi-) (KS0 ==> pi+ pi-) ) pi+]CC",
+        "D0": "[D*(2010)+ ==> ^([D0]CC ==> (KS0 ==> pi+ pi-) (KS0 ==> pi+ pi-) ) pi+]CC",
+        "KS1": "[D*(2010)+ ==> ([D0]CC ==> ^(KS0 ==> pi+ pi-) (KS0 ==> pi+ pi-) ) pi+]CC",
+        "KS2": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi+ pi-) ^(KS0 ==> pi+ pi-) ) pi+]CC",
+        "pip1": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> ^pi+ pi-) (KS0 ==> pi+ pi-) ) pi+]CC",
+        "pim1": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi+ ^pi-) (KS0 ==> pi+ pi-) ) pi+]CC",
+        "pip2": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi+ pi-) (KS0 ==> ^pi+ pi-) ) pi+]CC",
+        "pim2": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi+ pi-) (KS0 ==> pi+ ^pi-) ) pi+]CC",
+        "pi_soft": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi+ pi-) (KS0 ==> pi+ pi-) ) ^pi+]CC",
+    }
+
+    variables = {"pip1":  make_MC_basic_variables(),
+                 "pim1":  make_MC_basic_variables(),
+                 "pip2":  make_MC_basic_variables(),
+                 "pim2":  make_MC_basic_variables(),
+                 "KS1": make_MC_composite_variables(),
+                 "KS2": make_MC_composite_variables(),
+                 "D0": make_MC_composite_variables(),
+                 "Dst": make_MC_composite_variables(),
+                 "pi_soft":  make_MC_basic_variables(),
+    }
+
+    mytuple  = FuntupleMC(name=name,
+                          tuple_name="MCDecayTree",
+                          fields=fields, variables = variables,
+                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
+                          inputs=input_data)
+
+    return [mytuple]
diff --git a/Charm_2024validation/Charm_2024validation/options/d_to_hhh.py b/Charm_2024validation/Charm_2024validation/options/d_to_hhh.py
new file mode 100644
index 0000000000..d10fa039f6
--- /dev/null
+++ b/Charm_2024validation/Charm_2024validation/options/d_to_hhh.py
@@ -0,0 +1,503 @@
+from .tupling import (
+    make_composite_variables_3body,
+    make_b_composite_variables,
+    make_composite_variables,
+    make_basic_variables,
+    make_hlt2_event_variables,
+    make_composite_dtf_variables_3body,
+    make_basic_dtf_variables,
+)
+
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from FunTuple import FunTuple_Particles as Funtuple
+
+
+def make_dtf_variables(options, pvs, input_data, ptype):
+
+    if ptype not in ["basic", "composite"]:
+        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
+
+    from DecayTreeFitter import DecayTreeFitter
+    
+    DTF = DecayTreeFitter(
+        name=f'DTF_{{hash}}',
+        input_particles=input_data)
+
+    DTFvtx = DecayTreeFitter(
+        name=f'DTFvtx_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    DTFmassDp = DecayTreeFitter(
+        name=f'DTFmassDp_{{hash}}',
+        input_particles=input_data,
+        mass_constraints=["D+"])
+
+    DTFvtxmassDp = DecayTreeFitter(
+        name=f'DTFvtxmassDp_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D+"])
+
+    DTFmassDsp = DecayTreeFitter(
+        name=f'DTFmassDsp_{{hash}}',
+        input_particles=input_data,
+        substitutions = ['D+{{D_s+}}'],
+        mass_constraints=["D_s+"])
+
+    DTFvtxmassDsp = DecayTreeFitter(
+        name=f'DTFvtxmassDsp_{{hash}}',
+        input_particles=input_data,
+        substitutions = ['D+{{D_s+}}',"KS0{{KS0}}"],#trick
+        mass_constraints=["D_s+"],
+        input_pvs=pvs,
+    )
+
+    if ptype == "basic":
+        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassDp,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="Dp")
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassDp,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="Dp")
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassDsp,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="Dsp")
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassDsp,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="Dsp")
+        return dtf_vars
+
+    if ptype == "composite":
+        dtf_vars = make_composite_dtf_variables_3body(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
+                                             DTF=DTFmassDp,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="Dp")
+        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
+                                             DTF=DTFvtxmassDp,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="Dp")
+        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
+                                             DTF=DTFmassDsp,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="Dsp")
+        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
+                                             DTF=DTFvtxmassDsp,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="Dsp")
+        return dtf_vars
+
+
+def maketuple_D2Kpipi(options, pvs, rec_summary, _NoCuts=False):
+    name = "D2Kpipi"
+    turbo_line = "Hlt2Charm_DpDspToKmPipPip"
+    if _NoCuts == True:
+        turbo_line += "_NoCuts"
+        name += "_NoCuts"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> K- pi+ pi+]CC",
+        "Km"   : "[D+ -> ^K- pi+ pi+]CC",
+        "pip1"  : "[D+ -> K- ^pi+ pi+]CC",
+        "pip2" : "[D+ -> K- pi+ ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2pipipi(options, pvs, rec_summary, _NoCuts=False):
+    name = "D2pipipi"
+    turbo_line = "Hlt2Charm_DpDspToPimPipPip"
+    if _NoCuts == True:
+        turbo_line += "_NoCuts"
+        name += "_NoCuts"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> pi- pi+ pi+]CC",
+        "pim"   : "[D+ -> ^pi- pi+ pi+]CC",
+        "pip1"  : "[D+ -> pi- ^pi+ pi+]CC",
+        "pip2" : "[D+ -> pi- pi+ ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Ds2KKpi(options, pvs, rec_summary, _NoCuts=False):
+    name = "Ds2KKpi"
+    turbo_line = "Hlt2Charm_DpDspToKmKpPip"
+    if _NoCuts == True:
+        turbo_line += "_NoCuts"
+        name += "_NoCuts"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> K- K+ pi+]CC",
+        "Km"   : "[D+ -> ^K- K+ pi+]CC",
+        "Kp"  : "[D+ -> K- ^K+ pi+]CC",
+        "pip" : "[D+ -> K- K+ ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+    
+    return [myfilter, mytuple]
+
+def maketuple_D2Kpipi_Kpi(options, pvs, rec_summary):
+    name = "D2Kpipi_Kpi"
+    turbo_line = "Hlt2Charm_DpDspToKmPipPip"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> (KS0 -> K- pi+) pi+]CC",
+        "Kst" : "[D+ -> ^(KS0 -> K- pi+) pi+]CC",
+        "Km"   : "[D+ -> (KS0 -> ^K- pi+) pi+]CC",
+        "pip"  : "[D+ -> (KS0 -> K- ^pi+) pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data),
+        "Kst"   : make_composite_variables(options, pvs, input_data),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, use_loki_decay_finder=True)
+
+    return [myfilter, mytuple]
+
+
+
+
+    '''
+    from PyConf.Algorithms import ThOrParticleSelection
+    import Functors as F
+    FILTER_TREE = lambda id: F.FILTER(F.IS_ABS_ID(id)) @ F.GET_ALL_DESCENDANTS()
+    Km_data = ThOrParticleSelection(
+    InputParticles=input_data, Functor=FILTER_TREE("[K-]CC")
+).OutputSelection
+    pip_data = ThOrParticleSelection(
+        InputParticles=input_data, Functor=FILTER_TREE("[pi+]CC")
+).OutputSelection
+    
+    
+    from PyConf.Algorithms import ChargedBasicsProducer, UniqueIDGeneratorAlg
+    from PyConf.Algorithms import ThOrCombiner__2ChargedBasics, ThOrCombiner__2Particle
+    # make unique_id_generator
+    unique_id_gen = UniqueIDGeneratorAlg()
+    '''
+    '''
+    # produce charged basic particles
+    produce_kaons = ChargedBasicsProducer(
+        InputUniqueIDGenerator=unique_id_gen, ParticleID="kaon")
+    produce_pions = ChargedBasicsProducer(
+        InputUniqueIDGenerator=unique_id_gen, ParticleID="pion")
+    produce_jpsi = ThOrCombiner__2ChargedBasics(
+    '''
+    '''
+    produce_jpsi = ThOrCombiner__2Particle(
+        InputUniqueIDGenerator=unique_id_gen,
+        DecayDescriptor="[J/psi(1S) -> K- pi+]cc",
+        #Input1=produce_kaons.Particles,
+        #Input2=produce_pions.Particles,
+        Input1=Km_data,
+        Input2=pip_data,
+    )
+    input_data = produce_jpsi.Output
+
+    branches = {
+        "Jpsi" : "[J/psi(1S) -> K- pi+]CC",
+    }
+
+    from FunTuple import FunctorCollection
+    import Functors as F
+    variables = {
+        #"Dp"   : make_composite_variables(options, pvs, input_data, False, False),
+        #"Jpsi"   : make_composite_variables(options, pvs, input_data, False, False),
+        "Jpsi"   : FunctorCollection({
+            "PX": F.PX,
+            "PY": F.PY,
+            "PZ": F.PZ,
+            "BPVDIRA": F.BPVDIRA(pvs),
+            "VCHI2DOF": F.CHI2DOF, #CHI2VXNDOF
+            "BPVIPCHI2": F.BPVIPCHI2(pvs),
+            "BPVIP": F.BPVIP(pvs),
+        }),
+        
+    }
+
+    from FunTuple import FunTuple_Composites as Funtuple
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables, inputs=input_data, store_multiple_cand_info=True)
+    ## add event_variables
+
+    
+    return [myfilter, mytuple]
+    '''
+    '''
+    from PyConf.control_flow import CompositeNode, NodeLogic
+    from PyConf.Algorithms import PrintDecayTree, PrintHeader
+    from RecoConf.reconstruction_objects import upfront_reconstruction
+    from DaVinci.common_particles import make_std_loose_jpsi2mum
+    jpsis = make_std_loose_jpsi2mumu()
+    pdt = PrintDecayTree(name="PrintJpsis", Input=jpsis)
+    algs = upfront_reconstruction() + [jpsis, pdt]
+
+    node = CompositeNode(
+    "PrintJpsiNode", children=algs, combine_logic=NodeLogic.NONLAZY_AND
+)
+    return [node]
+    
+    '''
+
+
+def maketuple_D2pipiK(options, pvs, rec_summary, _NoCuts=False):
+    name = "D2pipiK"
+    turbo_line = "Hlt2Charm_DpDspToKpPimPip"
+    if _NoCuts == True:
+        turbo_line += "_NoCuts"
+        name += "_NoCuts"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> pi- pi+ K+]CC",
+        "p1"   : "[D+ -> ^pi- pi+ K+]CC",
+        "p2"  : "[D+ -> pi- ^pi+ K+]CC",
+        "p3" : "[D+ -> pi- pi+ ^K+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
+        "p1"     : make_basic_variables(options, pvs, input_data),
+        "p2"    : make_basic_variables(options, pvs, input_data),
+        "p3"   : make_basic_variables(options, pvs, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2KKK(options, pvs, rec_summary, _NoCuts=False):
+    name = "D2KKK"
+    turbo_line = "Hlt2Charm_DpDspToKmKpKp"
+    if _NoCuts == True:
+        turbo_line += "_NoCuts"
+        name += "_NoCuts"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> K- K+ K+]CC",
+        "p1"   : "[D+ -> ^K- K+ K+]CC",
+        "p2"  : "[D+ -> K- ^K+ K+]CC",
+        "p3" : "[D+ -> K- K+ ^K+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
+        "p1"     : make_basic_variables(options, pvs, input_data),
+        "p2"    : make_basic_variables(options, pvs, input_data),
+        "p3"   : make_basic_variables(options, pvs, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2piKK(options, pvs, rec_summary, _NoCuts=False):
+    name = "D2piKK"
+    turbo_line = "Hlt2Charm_DpDspToKpKpPim"
+    if _NoCuts == True:
+        turbo_line += "_NoCuts"
+        name += "_NoCuts"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> pi- K+ K+]CC",
+        "p1"   : "[D+ -> ^pi- K+ K+]CC",
+        "p2"  : "[D+ -> pi- ^K+ K+]CC",
+        "p3" : "[D+ -> pi- K+ ^K+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
+        "p1"     : make_basic_variables(options, pvs, input_data),
+        "p2"    : make_basic_variables(options, pvs, input_data),
+        "p3"   : make_basic_variables(options, pvs, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+def maketuple_B02Dpi_D2KKpi(options, pvs, rec_summary):
+    name = "B02Dpi_D2KKpi"
+    turbo_line = "Hlt2Charm_B0ToDmPip_DmToKmKpPim"
+    
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+    
+    branches = {
+        "B0" : "[[B0]CC -> (D- -> K- K+ pi-) pi+]CC",
+        "pip" : "[[B0]CC -> (D- -> K- K+ pi-) ^pi+]CC",
+        "Dm" : "[[B0]CC -> ^(D- -> K- K+ pi-) pi+]CC",
+        "p1" : "[[B0]CC -> (D- -> ^K- K+ pi-) pi+]CC",
+        "p2" : "[[B0]CC -> (D- -> K- ^K+ pi-) pi+]CC",
+        "p3" : "[[B0]CC -> (D- -> K- K+ ^pi-) pi+]CC",
+    }
+    
+    variables = {
+        "B0" : make_b_composite_variables(options, pvs, input_data),
+        "pip" : make_basic_variables(options, pvs,input_data),
+        "Dm"   : make_composite_variables_3body(options, pvs, input_data),
+        "p1"     : make_basic_variables(options, pvs, input_data),
+        "p2"    : make_basic_variables(options, pvs, input_data),
+        "p3"   : make_basic_variables(options, pvs, input_data),        
+    }
+    
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+def maketuple_B02Dpi_D2pipipi(options, pvs, rec_summary, _NoCuts=False):    
+    name = "B02Dpi_D2pipipi"
+    turbo_line = "Hlt2Charm_B0ToDmPip_DmToPimPimPip"
+    
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+    
+    branches = {
+        "B0" : "[[B0]CC -> (D- -> pi- pi- pi+) pi+]CC",
+        "pip" : "[[B0]CC -> (D- -> pi- pi- pi+) ^pi+]CC",
+        "Dm" : "[[B0]CC -> ^(D- -> pi- pi- pi+) pi+]CC",
+        "p1" : "[[B0]CC -> (D- -> ^pi- pi- pi+) pi+]CC",
+        "p2" : "[[B0]CC -> (D- -> pi- ^pi- pi+) pi+]CC",
+        "p3" : "[[B0]CC -> (D- -> pi- pi- ^pi+) pi+]CC",
+    }
+    
+    variables = {
+        "B0" : make_b_composite_variables(options, pvs, input_data),
+        "pip" : make_basic_variables(options, pvs,input_data),
+        "Dm"   : make_composite_variables_3body(options, pvs, input_data),
+        "p1"     : make_basic_variables(options, pvs, input_data),
+        "p2"    : make_basic_variables(options, pvs, input_data),
+        "p3"   : make_basic_variables(options, pvs, input_data),        
+    }
+    
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+    
+def maketuple_Bs02Dspi_Ds2KKpi(options, pvs, rec_summary, _NoCuts=False):    
+    name = "Bs02Dspi_Ds2KKpi"
+    turbo_line = "Hlt2Charm_Bs0ToDsmPip_DsmToKmKpPim"
+    
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+    
+    branches = {
+        "Bs0" : "[[B_s0]CC -> (D_s- -> K- K+ pi-) pi+]CC",
+        "pip" : "[[B_s0]CC -> (D_s- -> K- K+ pi-) ^pi+]CC",
+        "Dsm" : "[[B_s0]CC -> ^(D_s- -> K- K+ pi-) pi+]CC",
+        "p1" : "[[B_s0]CC -> (D_s- -> ^K- K+ pi-) pi+]CC",
+        "p2" : "[[B_s0]CC -> (D_s- -> K- ^K+ pi-) pi+]CC",
+        "p3" : "[[B_s0]CC -> (D_s- -> K- K+ ^pi-) pi+]CC",
+    }
+    
+    variables = {
+        "Bs0" : make_b_composite_variables(options, pvs, input_data),
+        "pip" : make_basic_variables(options, pvs,input_data),
+        "Dsm"   : make_composite_variables_3body(options, pvs, input_data),
+        "p1"     : make_basic_variables(options, pvs, input_data),
+        "p2"    : make_basic_variables(options, pvs, input_data),
+        "p3"   : make_basic_variables(options, pvs, input_data),        
+    }
+    
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+    
+def maketuple_Bs02Dspi_Ds2pipipi(options, pvs, rec_summary, _NoCuts=False):
+    name = "Bs02Dspi_Ds2pipipi"
+    turbo_line = "Hlt2Charm_Bs0ToDsmPip_DsmToPimPimPip"
+    
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+    
+    branches = {
+        "Bs0" : "[[B_s0]CC -> (D_s- -> pi- pi- pi+) pi+]CC",
+        "pip" : "[[B_s0]CC -> (D_s- -> pi- pi- pi+) ^pi+]CC",
+        "Dsm" : "[[B_s0]CC -> ^(D_s- -> pi- pi- pi+) pi+]CC",
+        "p1" : "[[B_s0]CC -> (D_s- -> ^pi- pi- pi+) pi+]CC",
+        "p2" : "[[B_s0]CC -> (D_s- -> pi- ^pi- pi+) pi+]CC",
+        "p3" : "[[B_s0]CC -> (D_s- -> pi- pi- ^pi+) pi+]CC",
+    }
+    
+    variables = {
+        "Bs0" : make_b_composite_variables(options, pvs, input_data),
+        "pip" : make_basic_variables(options, pvs,input_data),
+        "Dsm"   : make_composite_variables_3body(options, pvs, input_data),
+        "p1"     : make_basic_variables(options, pvs, input_data),
+        "p2"    : make_basic_variables(options, pvs, input_data),
+        "p3"   : make_basic_variables(options, pvs, input_data),        
+    }
+    
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
diff --git a/Charm_2024validation/Charm_2024validation/options/d_to_hhh_MC.py b/Charm_2024validation/Charm_2024validation/options/d_to_hhh_MC.py
new file mode 100644
index 0000000000..e666e5f3ce
--- /dev/null
+++ b/Charm_2024validation/Charm_2024validation/options/d_to_hhh_MC.py
@@ -0,0 +1,92 @@
+from .tupling import (
+    make_MC_composite_variables,
+    make_MC_basic_variables,
+    make_MC_event_variables,
+)
+
+from PyConf.reading import get_mc_particles, get_mc_header
+from FunTuple import FunTuple_MCParticles as FuntupleMC
+
+def maketuple_MC_D2Kpipi(options, pvs, rec_summary):
+    name = "MC_D2Kpipi"
+    line = "/Event/MC/Particles"
+
+    input_data = get_mc_particles(f"{line}")
+
+    branches = {
+        "Dp" : "[D+ ==> K- pi+ pi+]CC",
+        "Km"   : "[D+ ==> ^K- pi+ pi+]CC",
+        "pip1"  : "[D+ ==> K- ^pi+ pi+]CC",
+        "pip2" : "[D+ ==> K- pi+ ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_MC_composite_variables(),
+        "Km"     : make_MC_basic_variables(),
+        "pip1"    : make_MC_basic_variables(),
+        "pip2"   : make_MC_basic_variables(),
+    }
+
+    mytuple  = FuntupleMC(name=name,
+                          tuple_name="MCDecayTree",
+                          fields=branches, variables = variables,
+                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
+                          inputs=input_data)
+
+    return [mytuple]
+
+def maketuple_MC_Ds2KKpi(options, pvs, rec_summary):
+    name = "MC_Ds2KKpi"
+    line = "/Event/MC/Particles"
+
+    input_data = get_mc_particles(f"{line}")
+
+    branches = {
+        "Dp" : "[D_s+ ==> K- K+ pi+]CC",
+        "Km"   : "[D_s+ ==> ^K- K+ pi+]CC",
+        "Kp"  : "[D_s+ ==> K- ^K+ pi+]CC",
+        "pip" : "[D_s+ ==> K- K+ ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_MC_composite_variables(),
+        "Km"     : make_MC_basic_variables(),
+        "Kp"    : make_MC_basic_variables(),
+        "pip"   : make_MC_basic_variables(),
+    }
+
+    mytuple  = FuntupleMC(name=name,
+                          tuple_name="MCDecayTree",
+                          fields=branches, variables = variables,
+                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
+                          inputs=input_data)
+
+    return [mytuple]
+
+def maketuple_MC_Ds2KKK(options, pvs, rec_summary):
+    name = "MC_Ds2KKK"
+    line = "/Event/MC/Particles"
+
+    input_data = get_mc_particles(f"{line}")
+
+    branches = {
+        "Dp" : "[D_s+ ==> K- K+ K+]CC",
+        "Km"   : "[D_s+ ==> ^K- K+ K+]CC",
+        "Kp1"  : "[D_s+ ==> K- ^K+ K+]CC",
+        "Kp2" : "[D_s+ ==> K- K+ ^K+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_MC_composite_variables(),
+        "Km"     : make_MC_basic_variables(),
+        "Kp1"    : make_MC_basic_variables(),
+        "Kp2"   : make_MC_basic_variables(),
+    }
+
+    mytuple  = FuntupleMC(name=name,
+                          tuple_name="MCDecayTree",
+                          fields=branches, variables = variables,
+                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
+                          inputs=input_data)
+
+    return [mytuple]
diff --git a/Charm_2024validation/Charm_2024validation/options/d_to_ksh.py b/Charm_2024validation/Charm_2024validation/options/d_to_ksh.py
new file mode 100644
index 0000000000..df40aee746
--- /dev/null
+++ b/Charm_2024validation/Charm_2024validation/options/d_to_ksh.py
@@ -0,0 +1,313 @@
+from .tupling import (
+    make_composite_variables,
+    make_basic_variables,
+    make_hlt2_event_variables,
+    make_composite_dtf_variables,
+    make_basic_dtf_variables,
+)
+
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from FunTuple import FunTuple_Particles as Funtuple
+
+
+def make_dtf_variables(options, pvs, input_data, ptype, islong=False):
+
+    if ptype not in ["basic", "composite"]:
+        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
+
+    from DecayTreeFitter import DecayTreeFitter
+    
+    DTF = DecayTreeFitter(
+        name=f'DTF_{{hash}}',
+        input_particles=input_data)
+
+    DTFvtx = DecayTreeFitter(
+        name=f'DTFvtx_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    DTFmassKS = DecayTreeFitter(
+        name=f'DTFmassKS_{{hash}}',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTFvtxmassKS = DecayTreeFitter(
+        name=f'DTFvtxmassKS_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    DTFmassDpKS = DecayTreeFitter(
+        name=f'DTFmassDpKS_{{hash}}',
+        input_particles=input_data,
+        mass_constraints=["D+","KS0"])
+
+    DTFvtxmassDpKS = DecayTreeFitter(
+        name=f'DTFvtxmassDpKS_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D+","KS0"])
+
+    DTFmassDspKS = DecayTreeFitter(
+        name=f'DTFmassDspKS_{{hash}}',
+        input_particles=input_data,
+        substitutions = ['D+{{D_s+}}'],
+        mass_constraints=["D_s+","KS0"])
+
+    DTFvtxmassDspKS = DecayTreeFitter(
+        name=f'DTFvtxmassDspKS_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs,
+        substitutions = ['D+{{D_s+}}',"KS0{{KS0}}"],#trick
+        mass_constraints=["D_s+","KS0"],
+    )
+
+
+    if ptype == "basic":
+        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False,
+                                            islong=islong)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False,
+                                            islong=islong)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassKS,
+                                             pv_constraint=False,
+                                             mass_constraint=True, 
+                                             particle_name="KS",
+                                             islong=islong)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassKS,
+                                             pv_constraint=True,
+                                             mass_constraint=True, 
+                                             particle_name="KS",
+                                             islong=islong)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassDpKS,
+                                             pv_constraint=False,
+                                             mass_constraint=True, 
+                                             particle_name="DpKS",
+                                             islong=islong)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassDpKS,
+                                             pv_constraint=True,
+                                             mass_constraint=True, 
+                                             particle_name="DpKS",
+                                             islong=islong)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassDspKS,
+                                             pv_constraint=False,
+                                             mass_constraint=True, 
+                                             particle_name="DspKS",
+                                             islong=islong)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassDspKS,
+                                             pv_constraint=True,
+                                             mass_constraint=True, 
+                                             particle_name="DspKS",
+                                             islong=islong)
+        return dtf_vars
+
+    if ptype == "composite":
+        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassKS,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="KS")
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassKS,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="KS")
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassDpKS,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="DpKS")
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassDpKS,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="DpKS")
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassDspKS,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="DspKS")
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassDspKS,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="DspKS")
+        return dtf_vars
+
+
+def maketuple_D2KSK_DD(options, pvs, rec_summary):
+    name = "D2KSK_DD"
+    turbo_line = "Hlt2Charm_DpDspToKsKp_DD"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> (KS0 -> pi- pi+) K+]CC",
+        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) K+]CC",
+        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) K+]CC",
+        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) K+]CC",
+        "hp" : "[D+ -> (KS0 -> pi- pi+) ^K+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "hp"   : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2KSK_LD(options, pvs, rec_summary):
+    name = "D2KSK_LD"
+    turbo_line = "Hlt2Charm_DpDspToKsKp_LD"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> (KS0 -> pi- pi+) K+]CC",
+        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) K+]CC",
+        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) K+]CC",
+        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) K+]CC",
+        "hp" : "[D+ -> (KS0 -> pi- pi+) ^K+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "hp"   : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_D2KSK_LL(options, pvs, rec_summary):
+    name = "D2KSK_LL"
+    turbo_line = "Hlt2Charm_DpDspToKsKp_LL"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> (KS0 -> pi- pi+) K+]CC",
+        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) K+]CC",
+        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) K+]CC",
+        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) K+]CC",
+        "hp" : "[D+ -> (KS0 -> pi- pi+) ^K+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "hp"   : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2KSpi_DD(options, pvs, rec_summary):
+    name = "D2KSpi_DD"
+    turbo_line = "Hlt2Charm_DpDspToKsPip_DD"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> (KS0 -> pi- pi+) pi+]CC",
+        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) pi+]CC",
+        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) pi+]CC",
+        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) pi+]CC",
+        "hp" : "[D+ -> (KS0 -> pi- pi+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "hp"   : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2KSpi_LD(options, pvs, rec_summary):
+    name = "D2KSpi_LD"
+    turbo_line = "Hlt2Charm_DpDspToKsPip_LD"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> (KS0 -> pi- pi+) pi+]CC",
+        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) pi+]CC",
+        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) pi+]CC",
+        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) pi+]CC",
+        "hp" : "[D+ -> (KS0 -> pi- pi+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "hp"   : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2KSpi_LL(options, pvs, rec_summary):
+    name = "D2KSpi_LL"
+    turbo_line = "Hlt2Charm_DpDspToKsPip_LL"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> (KS0 -> pi- pi+) pi+]CC",
+        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) pi+]CC",
+        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) pi+]CC",
+        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) pi+]CC",
+        "hp" : "[D+ -> (KS0 -> pi- pi+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "hp"   : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
diff --git a/Charm_2024validation/Charm_2024validation/options/d_to_ksh_MC.py b/Charm_2024validation/Charm_2024validation/options/d_to_ksh_MC.py
new file mode 100644
index 0000000000..38a2197998
--- /dev/null
+++ b/Charm_2024validation/Charm_2024validation/options/d_to_ksh_MC.py
@@ -0,0 +1,68 @@
+from .tupling import (
+    make_MC_composite_variables,
+    make_MC_basic_variables,
+    make_MC_event_variables,
+)
+
+from PyConf.reading import get_mc_particles, get_mc_header
+from FunTuple import FunTuple_MCParticles as FuntupleMC
+
+def maketuple_MC_D2KSK(options, pvs, rec_summary):
+    name = "MC_D2KSK"
+    line = "/Event/MC/Particles"
+
+    input_data = get_mc_particles(f"{line}")
+
+    branches = {
+        "Dp" : "[D_s+ ==> (KS0 ==> pi- pi+) K+]CC",
+        "KS0"  : "[D_s+ ==> ^(KS0 ==> pi- pi+) K+]CC",
+        "pim"   : "[D_s+ ==> (KS0 ==> ^pi- pi+) K+]CC",
+        "pip"  : "[D_s+ ==> (KS0 ==> pi- ^pi+) K+]CC",
+        "hp" : "[D_s+ ==> (KS0 ==> pi- pi+) ^K+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_MC_composite_variables(),
+        "KS0"    : make_MC_composite_variables(),
+        "pim"     : make_MC_basic_variables(),
+        "pip"    : make_MC_basic_variables(),
+        "hp"   : make_MC_basic_variables(),
+    }
+
+    mytuple  = FuntupleMC(name=name,
+                        tuple_name="MCDecayTree",
+                        fields=branches, variables = variables,
+                        event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
+                        inputs=input_data)
+
+    return [mytuple]
+
+def maketuple_MC_D2KSpi(options, pvs, rec_summary):
+    name = "MC_D2KSpi"
+    line = "/Event/MC/Particles"
+
+    input_data = get_mc_particles(f"{line}")
+
+    branches = {
+        "Dp" : "[D+ ==> (KS0 ==> pi- pi+) pi+]CC",
+        "KS0"  : "[D+ ==> ^(KS0 ==> pi- pi+) pi+]CC",
+        "pim"   : "[D+ ==> (KS0 ==> ^pi- pi+) pi+]CC",
+        "pip"  : "[D+ ==> (KS0 ==> pi- ^pi+) pi+]CC",
+        "hp" : "[D+ ==> (KS0 ==> pi- pi+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_MC_composite_variables(),
+        "KS0"    : make_MC_composite_variables(),
+        "pim"     : make_MC_basic_variables(),
+        "pip"    : make_MC_basic_variables(),
+        "hp"   : make_MC_basic_variables(),
+    }
+
+    mytuple  = FuntupleMC(name=name,
+                        tuple_name="MCDecayTree",
+                        fields=branches, variables = variables,
+                        event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
+                        inputs=input_data)
+
+    return [mytuple]
diff --git a/Charm_2024validation/Charm_2024validation/options/detection_asymmetry.py b/Charm_2024validation/Charm_2024validation/options/detection_asymmetry.py
new file mode 100644
index 0000000000..9769559e87
--- /dev/null
+++ b/Charm_2024validation/Charm_2024validation/options/detection_asymmetry.py
@@ -0,0 +1,191 @@
+from .tupling import (
+    make_composite_variables,
+    make_composite_variables_3body,
+    make_basic_variables,
+    make_hlt2_event_variables,
+)
+
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from FunTuple import FunTuple_Particles as Funtuple
+
+def maketuple_D2Kpipi_ADet(options, pvs, rec_summary):
+    name = "D2Kpipi_ADet"
+    turbo_line = "Hlt2Charm_DpToKmPipPip_ADet"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> K- pi+ pi+]CC",
+        "Km"   : "[D+ -> ^K- pi+ pi+]CC",
+        "pip1"  : "[D+ -> K- ^pi+ pi+]CC",
+        "pip2" : "[D+ -> K- pi+ ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
+        "Km"     : make_basic_variables(options, pvs, input_data),
+        "pip1"    : make_basic_variables(options, pvs, input_data),
+        "pip2"   : make_basic_variables(options, pvs, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2pipipi_ADet(options, pvs, rec_summary):
+    name = "D2pipipi_ADet"
+    turbo_line = "Hlt2Charm_DspToPimPipPip_ADet"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D_s+ -> pi- pi+ pi+]CC",
+        "pim"   : "[D_s+ -> ^pi- pi+ pi+]CC",
+        "pip1"  : "[D_s+ -> pi- ^pi+ pi+]CC",
+        "pip2" : "[D_s+ -> pi- pi+ ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
+        "pim"     : make_basic_variables(options, pvs, input_data),
+        "pip1"    : make_basic_variables(options, pvs, input_data),
+        "pip2"   : make_basic_variables(options, pvs, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Ds2KKpi_ADet(options, pvs, rec_summary):
+    name = "Ds2KKpi_ADet"
+    turbo_line = "Hlt2Charm_DspToKmKpPip_ADet"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D_s+ -> K- K+ pi+]CC",
+        "Km"   : "[D_s+ -> ^K- K+ pi+]CC",
+        "Kp"  : "[D_s+ -> K- ^K+ pi+]CC",
+        "pip" : "[D_s+ -> K- K+ ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
+        "Km"     : make_basic_variables(options, pvs, input_data),
+        "Kp"    : make_basic_variables(options, pvs, input_data),
+        "pip"   : make_basic_variables(options, pvs, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+    
+    return [myfilter, mytuple]
+        
+def maketuple_Lc2KSp_LL_ADet(options, pvs, rec_summary):
+    name = "Lc2KSp_LL_ADet"
+    turbo_line = "Hlt2Charm_LcpToPpKs_LL_ADet"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Lc" : "[Lambda_c+ -> (KS0 -> pi- pi+) p+]CC",
+        "KS0"  : "[Lambda_c+ -> ^(KS0 -> pi- pi+) p+]CC",
+        "pim"   : "[Lambda_c+ -> (KS0 -> ^pi- pi+) p+]CC",
+        "pip"  : "[Lambda_c+ -> (KS0 -> pi- ^pi+) p+]CC",
+        "pp" : "[Lambda_c+ -> (KS0 -> pi- pi+) ^p+]CC",
+    }
+
+    variables = {
+        "Lc"   : make_composite_variables(options, pvs, input_data),
+        "KS0"    : make_composite_variables(options, pvs, input_data),
+        "pim"     : make_basic_variables(options, pvs, input_data),
+        "pip"    : make_basic_variables(options, pvs, input_data),
+        "pp"   : make_basic_variables(options, pvs, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Lc2pKpi_ADet(options, pvs, rec_summary):
+    name = "Lc2pKpi_ADet"
+    turbo_line = "Hlt2Charm_LcpToPpKmPip_ADet"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Lc" : "[Lambda_c+ -> K- pi+ p+]CC",
+        "Km"   : "[Lambda_c+ -> ^K- pi+ p+]CC",
+        "pip"  : "[Lambda_c+ -> K- ^pi+ p+]CC",
+        "pp" : "[Lambda_c+ -> K- pi+ ^p+]CC",
+    }
+
+    variables = {
+        "Lc"   : make_composite_variables_3body(options, pvs, input_data),
+        "Km"     : make_basic_variables(options, pvs, input_data),
+        "pip"    : make_basic_variables(options, pvs, input_data),
+        "pp"   : make_basic_variables(options, pvs, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2KSK_LL_ADet(options, pvs, rec_summary):
+    name = "D2KSK_LL_ADet"
+    turbo_line = "Hlt2Charm_DspToKsKp_LL_ADet"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D_s+ -> (KS0 -> pi- pi+) K+]CC",
+        "KS0"  : "[D_s+ -> ^(KS0 -> pi- pi+) K+]CC",
+        "pim"   : "[D_s+ -> (KS0 -> ^pi- pi+) K+]CC",
+        "pip"  : "[D_s+ -> (KS0 -> pi- ^pi+) K+]CC",
+        "hp" : "[D_s+ -> (KS0 -> pi- pi+) ^K+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data),
+        "KS0"    : make_composite_variables(options, pvs, input_data),
+        "pim"     : make_basic_variables(options, pvs, input_data),
+        "pip"    : make_basic_variables(options, pvs, input_data),
+        "hp"   : make_basic_variables(options, pvs, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2KSpi_LL_ADet(options, pvs, rec_summary):
+    name = "D2KSpi_LL_ADet"
+    turbo_line = "Hlt2Charm_DpToKsPip_LL_ADet"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> (KS0 -> pi- pi+) pi+]CC",
+        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) pi+]CC",
+        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) pi+]CC",
+        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) pi+]CC",
+        "hp" : "[D+ -> (KS0 -> pi- pi+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data),
+        "KS0"    : make_composite_variables(options, pvs, input_data),
+        "pim"     : make_basic_variables(options, pvs, input_data),
+        "pip"    : make_basic_variables(options, pvs, input_data),
+        "hp"   : make_basic_variables(options, pvs, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
diff --git a/Charm_2024validation/Charm_2024validation/options/dst_to_dee.py b/Charm_2024validation/Charm_2024validation/options/dst_to_dee.py
new file mode 100644
index 0000000000..11f42bae95
--- /dev/null
+++ b/Charm_2024validation/Charm_2024validation/options/dst_to_dee.py
@@ -0,0 +1,296 @@
+import Functors as F
+from Functors.math import log
+from DaVinci import Options, make_config
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from FunTuple import FunctorCollection
+from PyConf.reading import get_particles, get_pvs
+import FunTuple.functorcollections as FC
+from FunTuple import FunTuple_Particles as Funtuple
+from DecayTreeFitter import DecayTreeFitter
+from Hlt2Conf.lines.charm.dst_to_dee_makers import (dst_BDT_functor)
+from .tupling import (
+    make_DeltaM_variable,
+    make_basic_variables,
+    make_composite_variables,
+    make_composite_variables_3body,
+    make_composite_variables_4body,
+    make_hlt2_event_variables,
+    make_basic_dtf_variables,
+    make_composite_dtf_variables,
+    make_composite_dtf_variables_3body,
+    make_composite_dtf_variables_4body,
+    Hlt1_lines
+)
+extra_brem_variables= (FunctorCollection(
+            {
+                "BREMHYPODELTAX": F.BREMHYPODELTAX,
+                "BREMHYPOENERGY": F.BREMHYPOENERGY,
+                "BREMHYPOID": F.BREMHYPOID,
+                "BREMHYPOMATCH_CHI2": F.BREMHYPOMATCH_CHI2,
+                "BREMPIDE": F.BREMPIDE,
+                "INBREM": F.INBREM,
+                "MASS_WITH_BREM": F.MASS_WITH_BREM,
+                "PT_WITH_BREM": F.PT_WITH_BREM,
+                "P_WITH_BREM": F.P_WITH_BREM,
+                "ECALPIDE": F.ECALPIDE,
+                "HCALPIDE": F.HCALPIDE,
+                "ELECTRONSHOWEREOP": F.ELECTRONSHOWEREOP,
+                "CLUSTERMATCH_CHI2": F.CLUSTERMATCH_CHI2,
+                "ELECTRONMATCH_CHI2": F.ELECTRONMATCH_CHI2,
+                "ELECTRONENERGY": F.ELECTRONENERGY,
+                "ELECTRONID": F.ELECTRONID,
+                "HCALEOP": F.HCALEOP,
+                "CALO_NEUTRAL_SHOWER_SHAPE": F.CALO_NEUTRAL_SHOWER_SHAPE,
+                "RICH_DLL_E": F.VALUE_OR(F.NaN)@F.RICH_DLL_E,
+            })
+    )
+
+decay_descriptor = {
+    'dst_kpi_os' : {
+        "Dst0":   "[ D*(2007)0 ->  (D0 ->  K-  pi+)  (gamma ->  e+  e-)]CC",
+        "D0":     "[ D*(2007)0 -> ^(D0 ->  K-  pi+)  (gamma ->  e+  e-)]CC",
+        "Kminus": "[ D*(2007)0 ->  (D0 -> ^K-  pi+)  (gamma ->  e+  e-)]CC",
+        "piplus": "[ D*(2007)0 ->  (D0 ->  K- ^pi+)  (gamma ->  e+  e-)]CC",
+        "gamma":  "[ D*(2007)0 ->  (D0 ->  K-  pi+) ^(gamma ->  e+  e-)]CC",
+        "eplus":  "[ D*(2007)0 ->  (D0 ->  K-  pi+)  (gamma -> ^e+  e-)]CC",
+        "eminus": "[ D*(2007)0 ->  (D0 ->  K-  pi+)  (gamma ->  e+ ^e-)]CC",
+    },
+
+    'dst_kpi_ss' : {
+        "Dst0":   "[ D*(2007)0 ->  (D0 ->  K-  pi+)  ([gamma ->  e+  e+]CC)]CC",
+        "D0":     "[ D*(2007)0 -> ^(D0 ->  K-  pi+)  ([gamma ->  e+  e+]CC)]CC",
+        "Kminus": "[ D*(2007)0 ->  (D0 -> ^K-  pi+)  ([gamma ->  e+  e+]CC)]CC",
+        "piplus": "[ D*(2007)0 ->  (D0 ->  K- ^pi+)  ([gamma ->  e+  e+]CC)]CC",
+        "gamma":  "[ D*(2007)0 ->  (D0 ->  K-  pi+) ^([gamma ->  e+  e+]CC)]CC",
+        "eplus":  "[ D*(2007)0 ->  (D0 ->  K-  pi+)  ([gamma -> ^e+  e+]CC)]CC",
+        "eminus": "[ D*(2007)0 ->  (D0 ->  K-  pi+)  ([gamma ->  e+ ^e+]CC)]CC",
+    },
+
+    'dst_k3pi_os' :  {
+        "Dst0":    "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)  (gamma ->  e+  e-)]CC",
+        "D0":      "[ D*(2007)0 -> ^(D0 -> K- pi- pi+ pi+)  (gamma ->  e+  e-)]CC",
+        "Kminus":  "[ D*(2007)0 ->  (D0 -> ^K- pi- pi+ pi+) (gamma ->  e+  e-)]CC",
+        "piminus": "[ D*(2007)0 ->  (D0 -> K- ^pi- pi+ pi+) (gamma ->  e+  e-)]CC",
+        "piplus1": "[ D*(2007)0 ->  (D0 -> K- pi- ^pi+ pi+) (gamma ->  e+  e-)]CC",
+        "piplus2": "[ D*(2007)0 ->  (D0 -> K- pi- pi+ ^pi+) (gamma ->  e+  e-)]CC",
+        "gamma":   "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+) ^(gamma ->  e+  e-)]CC",
+        "eplus":   "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)  (gamma -> ^e+  e-)]CC",
+        "eminus":  "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)  (gamma ->  e+ ^e-)]CC",
+    },
+
+    'dst_k3pi_ss' :  {
+        "Dst0":    "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)   ([gamma ->  e+  e+]CC)]CC",
+        "D0":      "[ D*(2007)0 -> ^(D0 -> K- pi- pi+ pi+)   ([gamma ->  e+  e+]CC)]CC",
+        "Kminus":  "[ D*(2007)0 ->  (D0 -> ^K- pi- pi+ pi+)  ([gamma ->  e+  e+]CC)]CC",
+        "piminus": "[ D*(2007)0 ->  (D0 -> K- ^pi- pi+ pi+)  ([gamma ->  e+  e+]CC)]CC",
+        "piplus1": "[ D*(2007)0 ->  (D0 -> K- pi- ^pi+ pi+)  ([gamma ->  e+  e+]CC)]CC",
+        "piplus2": "[ D*(2007)0 ->  (D0 -> K- pi- pi+ ^pi+)  ([gamma ->  e+  e+]CC)]CC",
+        "gamma":   "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)  ^([gamma ->  e+  e+]CC)]CC",
+        "eplus":   "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)   ([gamma -> ^e+  e+]CC)]CC",
+        "eminus":  "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)   ([gamma ->  e+ ^e+]CC)]CC",
+    },
+
+    'dsstp_2kpi_os' : {
+        "Dstp":   "[ D*_s+ ->  (D_s+ -> K- K+ pi+)  (gamma ->  e+  e-)]CC",
+        "DpDs":   "[ D*_s+ -> ^(D_s+ -> K- K+ pi+)  (gamma ->  e+  e-)]CC",
+        "Kminus": "[ D*_s+ ->  (D_s+ -> ^K- K+ pi+) (gamma ->  e+  e-)]CC",
+        "Kplus":  "[ D*_s+ ->  (D_s+ -> K- ^K+ pi+) (gamma ->  e+  e-)]CC",
+        "piplus": "[ D*_s+ ->  (D_s+ -> K- K+ ^pi+) (gamma ->  e+  e-)]CC",
+        "gamma":  "[ D*_s+ ->  (D_s+ -> K- K+ pi+) ^(gamma ->  e+  e-)]CC",
+        "eplus":  "[ D*_s+ ->  (D_s+ -> K- K+ pi+)  (gamma -> ^e+  e-)]CC",
+        "eminus": "[ D*_s+ ->  (D_s+ -> K- K+ pi+)  (gamma ->  e+ ^e-)]CC",
+    },
+    'dsstp_2kpi_ss' : {
+        "Dstp":   "[ D*_s+ ->  (D_s+ -> K- K+ pi+)   ([gamma ->  e+  e+]CC)]CC",
+        "DpDs":   "[ D*_s+ -> ^(D_s+ -> K- K+ pi+)   ([gamma ->  e+  e+]CC)]CC",
+        "Kminus": "[ D*_s+ ->  (D_s+ -> ^K- K+ pi+)  ([gamma ->  e+  e+]CC)]CC",
+        "Kplus":  "[ D*_s+ ->  (D_s+ -> K- ^K+ pi+)  ([gamma ->  e+  e+]CC)]CC",
+        "piplus": "[ D*_s+ ->  (D_s+ -> K- K+ ^pi+)  ([gamma ->  e+  e+]CC)]CC",
+        "gamma":  "[ D*_s+ ->  (D_s+ -> K- K+ pi+)  ^([gamma ->  e+  e+]CC)]CC",
+        "eplus":  "[ D*_s+ ->  (D_s+ -> K- K+ pi+)   ([gamma -> ^e+  e+]CC)]CC",
+        "eminus": "[ D*_s+ ->  (D_s+ -> K- K+ pi+)   ([gamma ->  e+ ^e+]CC)]CC",
+    },
+
+}
+
+def MVA_dst_variables(line, pvs):
+    return (FunctorCollection( { "MVA": dst_BDT_functor(pvs, line=line)}))
+#make_dtf_variables(options,  input_data, ptype):
+def make_dtf_variables(options, input_data,  pvs, ptype="basic",  mass_constrain = ["D*(2007)0", "D0" ], nparticles=2):
+    
+    DTF = DecayTreeFitter(
+        name="DTF_{hash}",
+        input_particles=input_data,
+    )
+
+    DTF_DMass_BestPV = DecayTreeFitter(
+        name="DTF_DMass_BestPV_{hash}",
+        input_particles=input_data,
+        mass_constraints=mass_constrain,
+        input_pvs=pvs,
+        fit_all_pvs=False,
+    )
+    DTF_Mass_BestPV = DecayTreeFitter(
+        name="DTF_Mass_BestPV_{hash}",
+        input_particles=input_data,
+        mass_constraints=[mass_constrain[1]],
+        input_pvs=pvs,
+        fit_all_pvs=False,
+    )
+
+    DTF_BestPV = DecayTreeFitter(
+        name="DTF_BestPV_{hash}",
+        input_particles=input_data,
+        #mass_constraints=["D*(2007)0", "D0" ],
+        input_pvs=pvs,
+        fit_all_pvs=False,
+    )
+
+    DTF_DMass = DecayTreeFitter(
+        name="DTF_DMass_{hash}",
+        input_particles=input_data,
+        mass_constraints=mass_constrain,
+        output_level=3,
+    )
+    DTF_Mass = DecayTreeFitter(
+        name="DTF_Mass_{hash}",
+        input_particles=input_data,
+        mass_constraints=[mass_constrain[1]],
+        output_level=3,
+    )
+    
+    if ptype == "basic":
+        dtf_variables =  make_basic_dtf_variables
+    elif ptype == "composite":
+        if nparticles == 2:
+            dtf_variables = make_composite_dtf_variables 
+        elif nparticles == 3:
+            dtf_variables = make_composite_dtf_variables_3body
+        elif nparticles == 4:
+            dtf_variables = make_composite_dtf_variables_4body 
+
+    dtf_vars = dtf_variables(options, pvs, input_data,
+                                        DTF=DTF,
+                                        pv_constraint=False,
+                                        mass_constraint=False)
+    dtf_vars += dtf_variables(options, pvs, input_data,
+                                        DTF=DTF_BestPV,
+                                        pv_constraint=True,
+                                        mass_constraint=False)
+    dtf_vars += dtf_variables(options, pvs, input_data,
+                                        DTF=DTF_Mass,
+                                        pv_constraint=False,
+                                        mass_constraint=True, particle_name="D")
+    dtf_vars += dtf_variables(options, pvs, input_data,
+                                        DTF=DTF_Mass_BestPV,
+                                        pv_constraint=True,
+                                        mass_constraint=True, particle_name="D")
+    dtf_vars += dtf_variables(options, pvs, input_data,
+                                        DTF=DTF_DMass,
+                                        pv_constraint=False,
+                                        mass_constraint=True, particle_name="DstD")
+    dtf_vars += dtf_variables(options, pvs, input_data,
+                                        DTF=DTF_DMass_BestPV,
+                                        pv_constraint=True,
+                                        mass_constraint=True, particle_name="DstD")
+
+    return dtf_vars
+
+
+def make_Dst0ToD0EmEp_D0ToKmPip_tuple(options, line, pvs , rec_summary, dd='dst_kpi_os'):
+
+    input_data=get_particles(f"/Event/HLT2/{line}/Particles")
+    my_filter = create_lines_filter(f"LineFilter_{line}_{{hash}}",[line],)
+
+    fields = decay_descriptor[dd]
+    
+    composite_tuple_variables = {
+        "Dst0"   :  make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs,  "composite") +\
+             MVA_dst_variables("Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip", pvs) + make_DeltaM_variable(options), 
+        "D0"     :  make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs,  "composite"),
+        "gamma"  :  make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs,  "composite")
+    }
+    basic_tuple_variables = { 
+        "Kminus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"),
+        "piplus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"),
+        "eplus"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic") + extra_brem_variables,
+        "eminus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic") + extra_brem_variables,
+    }
+
+    my_tuple = Funtuple(
+        name=f"Tuple_{line}_{dd}",
+        tuple_name="DecayTree",
+        fields=fields,
+        variables= {**composite_tuple_variables, **basic_tuple_variables},
+        event_variables=make_hlt2_event_variables(options, pvs, rec_summary), 
+        inputs=input_data,
+        store_multiple_cand_info=True
+    )
+    return [ my_filter, my_tuple]
+
+def make_Dst0ToD0EmEp_D0ToKmPimPipPip_tuple(options, line, pvs, rec_summary, dd='dst_k3pi_os'):
+
+    input_data=get_particles(f"/Event/HLT2/{line}/Particles")
+    my_filter = create_lines_filter(f"LineFilter_{line}_{{hash}}",[line],)
+
+    fields = decay_descriptor[dd]
+    
+    composite_tuple_variables = {
+        "Dst0"   : make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs, "composite") +\
+             MVA_dst_variables("Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip", pvs) + make_DeltaM_variable(options), 
+        "D0"     : make_composite_variables_4body(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs, "composite", nparticles=4),
+        "gamma"  : make_composite_variables(options, pvs, input_data) 
+    }
+    basic_tuple_variables = { 
+        "Kminus"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"),
+        "piminus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"),
+        "piplus1" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"),
+        "piplus2" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"), 
+        "eplus"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic") + extra_brem_variables,
+        "eminus"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic") + extra_brem_variables,
+    }
+
+    my_tuple = Funtuple(
+        name=f"Tuple_{line}_{dd}",
+        tuple_name="DecayTree",
+        fields=fields,
+        variables= {**composite_tuple_variables, **basic_tuple_variables},
+        event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data,
+        store_multiple_cand_info=True
+    )
+    return [ my_filter, my_tuple]
+
+
+def make_DstpToDpDspEmEp_DpDspToKmKpPip_tuple(options, line, pvs , rec_summary, dd='dsstp_2kpi_os'):
+
+    input_data=get_particles(f"/Event/HLT2/{line}/Particles")
+    my_filter = create_lines_filter(f"LineFilter_{line}_{{hash}}",[line],)
+
+    fields = decay_descriptor[dd]
+
+    composite_tuple_variables = {
+        "Dstp"   : make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs, "composite", mass_constrain = ["D*_s+", "D_s+"]) +\
+             MVA_dst_variables("Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip", pvs) + make_DeltaM_variable(options), 
+        "DpDs"   : make_composite_variables_3body(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs, "composite", mass_constrain = ["D*_s+", "D_s+"], nparticles=3),
+        "gamma"  : make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs, "composite", mass_constrain = ["D*_s+", "D_s+"]),
+    }
+    basic_tuple_variables = { 
+        "Kminus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic",  mass_constrain = ["D*_s+", "D_s+"]),
+        "Kplus"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic",  mass_constrain = ["D*_s+", "D_s+"]),
+        "piplus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic",  mass_constrain = ["D*_s+", "D_s+"]),
+        "eplus"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic",  mass_constrain = ["D*_s+", "D_s+"])+ extra_brem_variables,
+        "eminus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic",  mass_constrain = ["D*_s+", "D_s+"])+ extra_brem_variables,
+    }
+
+    my_tuple = Funtuple(
+        name=f"Tuple_{line}_{dd}",
+        tuple_name="DecayTree",
+        fields=fields,
+        variables= {**composite_tuple_variables, **basic_tuple_variables},
+        event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data,
+        store_multiple_cand_info=True
+    )
+    return [ my_filter, my_tuple]
diff --git a/Charm_2024validation/Charm_2024validation/options/hlt1.py b/Charm_2024validation/Charm_2024validation/options/hlt1.py
new file mode 100644
index 0000000000..b93aeb113c
--- /dev/null
+++ b/Charm_2024validation/Charm_2024validation/options/hlt1.py
@@ -0,0 +1,33 @@
+###############################################################################
+# (c) Copyright 2023 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.                                       #
+###############################################################################
+"""
+Configures running HLT1 via Moore.
+"""
+
+from Moore import Options
+from Moore.config import allen_control_flow
+from RecoConf.hlt1_allen import allen_gaudi_config, get_allen_line_names
+from AllenConf.hlt1_calibration_lines import make_passthrough_line
+from PyConf.application import configure_input, configure
+
+def alg_config(options: Options):
+    """
+    Configures algorithm running of HLT1 via Moore to be passed to Analysis Productions.
+    """
+
+    config = configure_input(options)
+    with allen_gaudi_config.bind(sequence="hlt1_pp_matching_no_ut_1000KHz"), make_passthrough_line.bind(pre_scaler=1):
+        line_names = get_allen_line_names()
+        allen_node = allen_control_flow(options)
+        config.update(configure(options, allen_node))
+
+    return config
+
diff --git a/Charm_2024validation/Charm_2024validation/options/hlt2/d0_to_hh.py b/Charm_2024validation/Charm_2024validation/options/hlt2/d0_to_hh.py
new file mode 100644
index 0000000000..3c0b0d0086
--- /dev/null
+++ b/Charm_2024validation/Charm_2024validation/options/hlt2/d0_to_hh.py
@@ -0,0 +1,9 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d0_to_hh import all_lines as hh_lines
+
+def make_lines():
+    mylines = [builder() for builder in hh_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+
diff --git a/Charm_2024validation/Charm_2024validation/options/hlt2/d0_to_hhhh.py b/Charm_2024validation/Charm_2024validation/options/hlt2/d0_to_hhhh.py
new file mode 100644
index 0000000000..81fe4dce30
--- /dev/null
+++ b/Charm_2024validation/Charm_2024validation/options/hlt2/d0_to_hhhh.py
@@ -0,0 +1,8 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d0_to_hhhh import all_lines as hhhh_lines
+
+def make_lines():
+    mylines = [builder() for builder in hhhh_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
diff --git a/Charm_2024validation/Charm_2024validation/options/hlt2/d0_to_hhpi0.py b/Charm_2024validation/Charm_2024validation/options/hlt2/d0_to_hhpi0.py
new file mode 100644
index 0000000000..52f8433c11
--- /dev/null
+++ b/Charm_2024validation/Charm_2024validation/options/hlt2/d0_to_hhpi0.py
@@ -0,0 +1,8 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d0_to_hhpi0 import all_lines as hhpi0_lines
+
+def make_lines():
+    mylines = [builder() for builder in hhpi0_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
diff --git a/Charm_2024validation/Charm_2024validation/options/hlt2/d0_to_kshh.py b/Charm_2024validation/Charm_2024validation/options/hlt2/d0_to_kshh.py
new file mode 100644
index 0000000000..79df310ed8
--- /dev/null
+++ b/Charm_2024validation/Charm_2024validation/options/hlt2/d0_to_kshh.py
@@ -0,0 +1,8 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d0_to_kshh import all_lines as kshh_lines
+
+def make_lines():
+    mylines = [builder() for builder in kshh_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
diff --git a/Charm_2024validation/Charm_2024validation/options/hlt2/d0_to_ksks.py b/Charm_2024validation/Charm_2024validation/options/hlt2/d0_to_ksks.py
new file mode 100644
index 0000000000..71ab403fd9
--- /dev/null
+++ b/Charm_2024validation/Charm_2024validation/options/hlt2/d0_to_ksks.py
@@ -0,0 +1,8 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d0_to_ksks import all_lines as ksks_lines
+
+def make_lines():
+    mylines = [builder() for builder in ksks_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
diff --git a/Charm_2024validation/Charm_2024validation/options/hlt2/d_to_hhh.py b/Charm_2024validation/Charm_2024validation/options/hlt2/d_to_hhh.py
new file mode 100644
index 0000000000..cd718f9b86
--- /dev/null
+++ b/Charm_2024validation/Charm_2024validation/options/hlt2/d_to_hhh.py
@@ -0,0 +1,10 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d_to_hhh import all_lines as hhh_lines
+from Hlt2Conf.lines.charm.detection_asymmetry_lines import all_lines as det_asy_lines
+
+def make_lines():
+    mylines = [builder() for builder in hhh_lines.values()]
+    mylines += [builder() for builder in det_asy_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
diff --git a/Charm_2024validation/Charm_2024validation/options/hlt2/d_to_ksh.py b/Charm_2024validation/Charm_2024validation/options/hlt2/d_to_ksh.py
new file mode 100644
index 0000000000..8c8b172dd0
--- /dev/null
+++ b/Charm_2024validation/Charm_2024validation/options/hlt2/d_to_ksh.py
@@ -0,0 +1,10 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d_to_ksh import all_lines as ksh_lines
+from Hlt2Conf.lines.charm.detection_asymmetry_lines import all_lines as det_asy_lines
+
+def make_lines():
+    mylines = [builder() for builder in ksh_lines.values()]
+    mylines += [builder() for builder in det_asy_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
diff --git a/Charm_2024validation/Charm_2024validation/options/hlt2/dst_to_dee.py b/Charm_2024validation/Charm_2024validation/options/hlt2/dst_to_dee.py
new file mode 100644
index 0000000000..4fd67becd7
--- /dev/null
+++ b/Charm_2024validation/Charm_2024validation/options/hlt2/dst_to_dee.py
@@ -0,0 +1,9 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.dst_to_dee import all_lines as dst_to_dee_lines
+
+def make_lines():
+    mylines = [builder() for builder in dst_to_dee_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+
diff --git a/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2.py b/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2.py
new file mode 100644
index 0000000000..c1560ce952
--- /dev/null
+++ b/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2.py
@@ -0,0 +1,32 @@
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_d0_to_hh.py b/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_d0_to_hh.py
new file mode 100644
index 0000000000..7c3a67ed03
--- /dev/null
+++ b/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_d0_to_hh.py
@@ -0,0 +1,41 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d0_to_hh import all_lines as hh_lines
+
+def make_lines():
+    mylines = [builder() for builder in hh_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_d0_to_hhhh.py b/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_d0_to_hhhh.py
new file mode 100644
index 0000000000..d7d5dcbb90
--- /dev/null
+++ b/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_d0_to_hhhh.py
@@ -0,0 +1,40 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d0_to_hhhh import all_lines as hhhh_lines
+
+def make_lines():
+    mylines = [builder() for builder in hhhh_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_d0_to_hhpi0.py b/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_d0_to_hhpi0.py
new file mode 100644
index 0000000000..063eeb274a
--- /dev/null
+++ b/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_d0_to_hhpi0.py
@@ -0,0 +1,40 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d0_to_hhpi0 import all_lines as hhpi0_lines
+
+def make_lines():
+    mylines = [builder() for builder in hhpi0_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_d0_to_kshh.py b/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_d0_to_kshh.py
new file mode 100644
index 0000000000..3e1996cdf0
--- /dev/null
+++ b/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_d0_to_kshh.py
@@ -0,0 +1,40 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d0_to_kshh import all_lines as kshh_lines
+
+def make_lines():
+    mylines = [builder() for builder in kshh_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_d0_to_ksks.py b/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_d0_to_ksks.py
new file mode 100644
index 0000000000..e8d1052803
--- /dev/null
+++ b/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_d0_to_ksks.py
@@ -0,0 +1,40 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d0_to_ksks import all_lines as ksks_lines
+
+def make_lines():
+    mylines = [builder() for builder in ksks_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_d_to_hhh.py b/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_d_to_hhh.py
new file mode 100644
index 0000000000..97965cb96e
--- /dev/null
+++ b/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_d_to_hhh.py
@@ -0,0 +1,42 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d_to_hhh import all_lines as hhh_lines
+from Hlt2Conf.lines.charm.detection_asymmetry_lines import all_lines as det_asy_lines
+
+def make_lines():
+    mylines = [builder() for builder in hhh_lines.values()]
+    mylines += [builder() for builder in det_asy_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_d_to_ksh.py b/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_d_to_ksh.py
new file mode 100644
index 0000000000..d2593da6a9
--- /dev/null
+++ b/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_d_to_ksh.py
@@ -0,0 +1,42 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d_to_ksh import all_lines as ksh_lines
+from Hlt2Conf.lines.charm.detection_asymmetry_lines import all_lines as det_asy_lines
+
+def make_lines():
+    mylines = [builder() for builder in ksh_lines.values()]
+    mylines += [builder() for builder in det_asy_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_dst_to_dee.py b/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_dst_to_dee.py
new file mode 100644
index 0000000000..d43ecbcd65
--- /dev/null
+++ b/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_dst_to_dee.py
@@ -0,0 +1,41 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.dst_to_dee import all_lines as dst_to_dee_lines
+
+def make_lines():
+    mylines = [builder() for builder in dst_to_dee_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_rare_charm.py b/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_rare_charm.py
new file mode 100644
index 0000000000..cb9ac88a02
--- /dev/null
+++ b/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_rare_charm.py
@@ -0,0 +1,40 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.rare_charm_lines import all_lines as rare_charm_lines
+
+def make_lines():
+    mylines = [builder() for builder in rare_charm_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2noUT.py b/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2noUT.py
new file mode 100644
index 0000000000..473127434b
--- /dev/null
+++ b/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2noUT.py
@@ -0,0 +1,32 @@
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf_without_UT
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf_without_UT),\
+         require_gec.bind(skipUT=True),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/Charm_2024validation/options/hlt2/make_hlt2_decay.sh b/Charm_2024validation/Charm_2024validation/options/hlt2/make_hlt2_decay.sh
new file mode 100644
index 0000000000..f127b86285
--- /dev/null
+++ b/Charm_2024validation/Charm_2024validation/options/hlt2/make_hlt2_decay.sh
@@ -0,0 +1,9 @@
+cat d0_to_hh.py hlt2.py > hlt2_d0_to_hh.py
+cat d0_to_hhpi0.py hlt2.py > hlt2_d0_to_hhpi0.py
+cat d0_to_hhhh.py hlt2.py > hlt2_d0_to_hhhh.py
+cat d0_to_kshh.py hlt2.py > hlt2_d0_to_kshh.py
+cat d0_to_ksks.py hlt2.py > hlt2_d0_to_ksks.py
+cat d_to_hhh.py hlt2.py > hlt2_d_to_hhh.py
+cat d_to_ksh.py hlt2.py > hlt2_d_to_ksh.py
+cat rare_charm.py hlt2.py > hlt2_rare_charm.py
+cat dst_to_dee.py hlt2.py > hlt2_dst_to_dee.py
diff --git a/Charm_2024validation/Charm_2024validation/options/hlt2/rare_charm.py b/Charm_2024validation/Charm_2024validation/options/hlt2/rare_charm.py
new file mode 100644
index 0000000000..39194555f0
--- /dev/null
+++ b/Charm_2024validation/Charm_2024validation/options/hlt2/rare_charm.py
@@ -0,0 +1,8 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.rare_charm_lines import all_lines as rare_charm_lines
+
+def make_lines():
+    mylines = [builder() for builder in rare_charm_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
diff --git a/Charm_2024validation/Charm_2024validation/options/rare_charm.py b/Charm_2024validation/Charm_2024validation/options/rare_charm.py
new file mode 100644
index 0000000000..d4d4a5d83d
--- /dev/null
+++ b/Charm_2024validation/Charm_2024validation/options/rare_charm.py
@@ -0,0 +1,496 @@
+from .tupling import (
+    make_composite_variables,
+    make_composite_variables_3body,
+    make_DeltaM_variable,
+    make_basic_variables,
+    make_hlt2_event_variables,
+    make_top_isolation_variables,
+    make_basic_isolation_variables,
+    make_intermediate_isolation_variables,
+    make_composite_dtf_variables,
+    make_composite_dtf_variables_3body,
+    make_basic_dtf_variables,
+)
+
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from FunTuple import FunTuple_Particles as Funtuple
+
+def make_dtf_variables_hmumu(options, pvs, input_data, ptype):
+
+    if ptype not in ["basic", "composite"]:
+        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
+
+    from DecayTreeFitter import DecayTreeFitter
+    
+    DTF = DecayTreeFitter(
+        name=f'DTF_{{hash}}',
+        input_particles=input_data)
+
+    DTFvtx = DecayTreeFitter(
+        name=f'DTFvtx_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    DTFmassDp = DecayTreeFitter(
+        name=f'DTFmassDp_{{hash}}',
+        input_particles=input_data,
+        mass_constraints=["D+"])
+
+    DTFvtxmassDp = DecayTreeFitter(
+        name=f'DTFvtxmassDp_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D+"])
+
+    DTFmassDsp = DecayTreeFitter(
+        name=f'DTFmassDsp_{{hash}}',
+        input_particles=input_data,
+        substitutions = ['D+{{D_s+}}'],
+        mass_constraints=["D_s+"])
+
+    DTFvtxmassDsp = DecayTreeFitter(
+        name=f'DTFvtxmassDsp_{{hash}}',
+        input_particles=input_data,
+        substitutions = ['D+{{D_s+}}',"J/psi(1S){{J/psi(1S)}}"],#trick
+        mass_constraints=["D_s+"],
+        input_pvs=pvs,
+    )
+
+    if ptype == "basic":
+        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassDp,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="Dp")
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassDp,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="Dp")
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassDsp,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="Dsp")
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassDsp,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="Dsp")
+        return dtf_vars
+
+    if ptype == "composite":
+        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassDp,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="Dp")
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassDp,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="Dp")
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassDsp,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="Dsp")
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassDsp,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="Dsp")
+        return dtf_vars
+
+
+def make_dtf_variables_pmumu(options, pvs, input_data, ptype):
+
+    if ptype not in ["basic", "composite"]:
+        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
+
+    from DecayTreeFitter import DecayTreeFitter
+    
+    DTF = DecayTreeFitter(
+        name=f'DTF_{{hash}}',
+        input_particles=input_data)
+
+    DTFvtx = DecayTreeFitter(
+        name=f'DTFvtx_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    DTFmass = DecayTreeFitter(
+        name=f'DTFmass_{{hash}}',
+        input_particles=input_data,
+        mass_constraints=["Lambda_c+"])
+
+    DTFvtxmass = DecayTreeFitter(
+        name=f'DTFvtxmass_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["Lambda_c+"])
+
+    if ptype == "basic":
+        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmass,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="Lc")
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmass,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="Lc")
+        return dtf_vars
+
+    if ptype == "composite":
+        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmass,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="D0")
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmass,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="D0")
+        return dtf_vars
+
+def make_dtf_variables_hhmumu(options, pvs, input_data, ptype):
+
+    if ptype not in ["basic", "composite","composite3b"]:
+        Exception(f"I want \'basic\' or \'composite\' or \'composite3b\. Got {ptype}")
+
+    from DecayTreeFitter import DecayTreeFitter
+    
+    DTF = DecayTreeFitter(
+        name=f'DTF_{{hash}}',
+        input_particles=input_data)
+
+    DTFvtx = DecayTreeFitter(
+        name=f'DTFvtx_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    DTFmass = DecayTreeFitter(
+        name=f'DTFmass_{{hash}}',
+        input_particles=input_data,
+        mass_constraints=["D0"])
+
+    DTFvtxmass = DecayTreeFitter(
+        name=f'DTFvtxmass_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0"])
+
+    if ptype == "basic":
+        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmass,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="D0")
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmass,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="D0")
+        return dtf_vars
+
+    if ptype == "composite3b":
+        dtf_vars = make_composite_dtf_variables_3body(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
+                                             DTF=DTFmass,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="D0")
+        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
+                                             DTF=DTFvtxmass,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="D0")
+
+        return dtf_vars
+        
+    if ptype == "composite":
+        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmass,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="D0")
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmass,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="D0")
+        return dtf_vars
+
+
+def maketuple_D2pimumu(options, pvs, rec_summary):
+    name = "D2pimumu"
+    turbo_line = "Hlt2Charm_DpDspToPipMumMup"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> (J/psi(1S) -> mu- mu+) pi+]CC",
+        "Jpsi" : "[D+ -> ^(J/psi(1S) -> mu- mu+) pi+]CC",
+        "lm"   : "[D+ -> (J/psi(1S) -> ^mu- mu+) pi+]CC",
+        "lp"   : "[D+ -> (J/psi(1S) -> mu- ^mu+) pi+]CC",
+        "hp" : "[D+ -> (J/psi(1S) -> mu- mu+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
+        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation: 
+
+        variables = {
+            "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+            "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2pimumu_WS(options, pvs, rec_summary):
+    name = "D2pimumu_WS"
+    turbo_line = "Hlt2Charm_DpDspToPipMupMup_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> (J/psi(1S) -> mu+ mu+) pi+]CC",
+        "Jpsi" : "[D+ -> (J/psi(1S) -> mu+ mu+) pi+]CC",
+        "lp1"   : "[D+ -> (J/psi(1S) -> ^mu+ mu+) pi+]CC",
+        "lp2"   : "[D+ -> (J/psi(1S) -> mu+ ^mu+) pi+]CC",
+        "hp" : "[D+ -> (J/psi(1S) -> mu+ mu+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
+        "lp1"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+        "lp2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation: 
+
+        variables = {
+            "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+            "lp1"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "lp2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2pipipi(options, pvs, rec_summary):
+    name = "CharmRD_D2pipipi"
+    turbo_line = "Hlt2Charm_DpDspToPipPimPip_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> (J/psi(1S) -> pi- pi+) pi+]CC",
+        "Jpsi" : "[D+ -> (J/psi(1S) -> pi- pi+) pi+]CC",
+        "lm"   : "[D+ -> (J/psi(1S) -> ^pi- pi+) pi+]CC",
+        "lp"   : "[D+ -> (J/psi(1S) -> pi- ^pi+) pi+]CC",
+        "hp" : "[D+ -> (J/psi(1S) -> pi- pi+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
+        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation: 
+
+        variables = {
+            "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+            "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2piee(options, pvs, rec_summary):
+    name = "D2piee"
+    turbo_line = "Hlt2Charm_DpDspToPipEmEp"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> (J/psi(1S) -> e- e+) pi+]CC",
+        "Jpsi" : "[D+ -> ^(J/psi(1S) -> e- e+) pi+]CC",
+        "lm"   : "[D+ -> (J/psi(1S) -> ^e- e+) pi+]CC",
+        "lp"   : "[D+ -> (J/psi(1S) -> e- ^e+) pi+]CC",
+        "hp" : "[D+ -> (J/psi(1S) -> e- e+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
+        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation: 
+
+        variables = {
+            "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+            "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Lc2pmumu(options, pvs, rec_summary):
+    name = "Lc2pmumu"
+    turbo_line = "Hlt2Charm_LcpToPpMumMup"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Lc" : "[Lambda_c+ -> (J/psi(1S) -> mu- mu+) p+]CC",
+        "Jpsi" : "[Lambda_c+ -> ^(J/psi(1S) -> mu- mu+) p+]CC",
+        "lm"   : "[Lambda_c+ -> (J/psi(1S) -> ^mu- mu+) p+]CC",
+        "lp"  : "[Lambda_c+ -> (J/psi(1S) -> mu- ^mu+) p+]CC",
+        "pp" : "[Lambda_c+ -> (J/psi(1S) -> mu- mu+) ^p+]CC",
+    }
+
+    variables = {
+        "Lc"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "pp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation: 
+
+        variables = {
+            "Lc"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+            "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "pp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02Kpimumu_RS(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02Kpimumu_RS"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPipMumMup"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^(D0 -> K- pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
+        "Km"   : "[D*(2010)+ -> (D0 -> ^K- pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
+        "pip"  : "[D*(2010)+ -> (D0 -> K- ^pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
+        "Jpsi"  : "[D*(2010)+ -> (D0 -> K- pi+ ^(J/psi(1S) -> mu- mu+)) pi+]CC",
+        "lm"  : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> ^mu- mu+)) pi+]CC",
+        "lp"  : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> mu- ^mu+)) pi+]CC",
+        "spip" : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> mu- mu+)) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite"),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation: 
+
+        variables = {
+            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
+            "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
+            "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+            "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
diff --git a/Charm_2024validation/Charm_2024validation/options/tupling.py b/Charm_2024validation/Charm_2024validation/options/tupling.py
new file mode 100644
index 0000000000..99de572726
--- /dev/null
+++ b/Charm_2024validation/Charm_2024validation/options/tupling.py
@@ -0,0 +1,986 @@
+##############################################################################
+# (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.                                       #
+###############################################################################
+"""Common configuration functions
+
+"""
+
+import Functors as F
+from Functors.math import log
+import Functors.math as fmath
+
+from FunTuple import FunctorCollection
+from FunTuple.functorcollections import (
+    MCHierarchy,
+    MCPromptDecay,
+    Kinematics,
+    SelectionInfo,
+    HltTisTos,
+    MCVertexInfo,
+    MCKinematics,
+    ParticleID, #wrong variables PID_PI = 0, PROBNN_D = nan
+    EventInfo,
+    LHCInfo,
+    ParticleIsolation,
+    MCPrimaries,
+    MCReconstructed,
+    MCReconstructible,
+)
+
+from DaVinciMCTools import MCTruthAndBkgCat, MCReconstructed, MCReconstructible
+from PyConf.Algorithms import ParticleToSubcombinationsAlg
+from DecayTreeFitter import DecayTreeFitter
+
+Hlt1_global_lines = [
+    "Hlt1GECPassthroughDecision",
+    "Hlt1BeamGasDecision",
+    "Hlt1PassthroughDecision",
+    "Hlt1NoBeamDecision",
+    "Hlt1BeamOneDecision",
+    "Hlt1BeamTwoDecision",
+    "Hlt1BothBeamsDecision",
+    "Hlt1ODINLumiDecision",
+    "Hlt1ODINVeloOpenDecision",
+    "Hlt1ODINNoBiasDecision",
+    "Hlt1VeloMicroBiasDecision",
+    "Hlt1RICH1AlignmentDecision",
+    "Hlt1RICH2AlignmentDecision",
+    "Hlt1BeamGasDecision",
+    "Hlt1L02PPiDecision",
+    "Hlt1LowMassNoipDielectron_massSlice1_promptDecision",
+    "Hlt1LowMassNoipDielectron_SS_massSlice1_promptDecision",
+    "Hlt1LowMassNoipDielectron_massSlice2_promptDecision",
+    "Hlt1LowMassNoipDielectron_SS_massSlice2_promptDecision",
+    "Hlt1LowMassNoipDielectron_massSlice3_promptDecision",
+    "Hlt1LowMassNoipDielectron_SS_massSlice3_promptDecision",
+    "Hlt1LowMassNoipDielectron_massSlice4_promptDecision",
+    "Hlt1LowMassNoipDielectron_SS_massSlice4_promptDecision",
+    "Hlt1LowMassNoipDielectron_massSlice1_displacedDecision",
+    "Hlt1LowMassNoipDielectron_SS_massSlice1_displacedDecision",
+    "Hlt1LowMassNoipDielectron_massSlice2_displacedDecision",
+    "Hlt1LowMassNoipDielectron_SS_massSlice2_displacedDecision",
+    "Hlt1LowMassNoipDielectron_massSlice3_displacedDecision",
+    "Hlt1LowMassNoipDielectron_SS_massSlice3_displacedDecision",
+    "Hlt1LowMassNoipDielectron_massSlice4_displacedDecision",
+    "Hlt1LowMassNoipDielectron_SS_massSlice4_displacedDecision",
+]
+Hlt1_1track_lines = [
+    "Hlt1TrackMVADecision",
+    "Hlt1LowPtMuonDecision",
+    "Hlt1SingleHighPtMuonDecision",
+    "Hlt1SingleHighPtMuonNoMuIDDecision",
+    "Hlt1TrackMuonMVADecision",
+    "Hlt1OneMuonTrackLineDecision",
+    "Hlt1TrackElectronMVADecision",
+    "Hlt1SingleHighPtElectronDecision",
+    "Hlt1SingleHighEtDecision",
+]
+Hlt1_lines = Hlt1_1track_lines+[
+    "Hlt1TwoTrackMVACharmXSecDecision",
+    "Hlt1TwoTrackMVADecision",
+    "Hlt1TwoTrackKsDecision",
+    "Hlt1D2KPiDecision",
+    "Hlt1D2KKDecision",
+    "Hlt1D2PiPiDecision",
+    "Hlt1KsToPiPiDecision",
+    "Hlt1LowPtDiMuonDecision",#removed
+    "Hlt1DiMuonNoIPDecision",
+    "Hlt1DiMuonNoIP_ssDecision",
+    "Hlt1DiMuonHighMassDecision",
+    "Hlt1DiMuonLowMassDecision",#replaced by Hlt1DiMuonDisplacedDecision
+    "Hlt1DiMuonSoftDecision",
+    "Hlt1DiMuonDisplacedDecision",
+    "Hlt1TwoKsDecision",
+    "Hlt1D2KPiAlignmentDecision",
+    "Hlt1DiMuonHighMassAlignmentDecision",
+    "Hlt1DisplacedDiMuonAlignmentDecision",
+    "Hlt1DisplacedDielectronDecision",
+    "Hlt1DisplacedLeptonsDecision",#removed
+]
+
+
+Hlt2_lines = [
+    "Hlt2Charm_DstpToD0Pip_D0ToKmPip_XSec",
+    "Hlt2Charm_D0ToKmPip_XSec",
+    "Hlt2Charm_D0ToKmKp",
+    "Hlt2Charm_D0ToKmPip",
+    "Hlt2Charm_D0ToPimPip",
+    "Hlt2Charm_DpDspToKsKp_DD",
+    "Hlt2Charm_DpDspToKsKp_LD",
+    "Hlt2Charm_DpDspToKsKp_LL",
+    "Hlt2Charm_DpDspToKsPip_DD",
+    "Hlt2Charm_DpDspToKsPip_LD",
+    "Hlt2Charm_DpDspToKsPip_LL",
+    "Hlt2Charm_DpToKmPipPip",
+    "Hlt2Charm_DspToKmKpPip",
+    "Hlt2Charm_DpToKmPipPip_NoCuts",
+    "Hlt2Charm_DspToKmKpPip_NoCuts",
+    "Hlt2Charm_DpToKmPipPip_XSec",
+    "Hlt2Charm_DspToKmKpPip_XSec",
+    "Hlt2Charm_DstpToD0Pip_D0ToKmKp",
+    "Hlt2Charm_DstpToD0Pip_D0ToKmPip",
+    "Hlt2Charm_DstpToD0Pip_D0ToKpPim",
+    "Hlt2Charm_DstpToD0Pip_D0ToPimPip",
+    "Hlt2Charm_DstpToD0Pip_D0ToKmPip_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKpPim_LowBias",
+    "Hlt2Charm_D0ToKmPip_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKmKp_LowBias",
+    "Hlt2Charm_D0ToKmKp_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToPimPip_LowBias",
+    "Hlt2Charm_D0ToPimPip_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLL",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLL_Tight",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLDD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLDD_Tight",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDDD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDDD_Tight",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULLL",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULLL_Tight",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULDD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULDD_Tight",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLD_Tight",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDLD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDLD_Tight",
+    "Hlt2Charm_D0ToKsPimPip_LL",
+    "Hlt2Charm_D0ToKsPimPip_DD",
+    "Hlt2Charm_D0ToKsPimPip_LL_LowBias",
+    "Hlt2Charm_D0ToKsPimPip_LL_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_LL",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_DD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_LL_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_DD_LowBias",
+    "Hlt2Charm_D0ToKsKmPip_LL",
+    "Hlt2Charm_D0ToKsKmPip_DD",
+    "Hlt2Charm_D0ToKsKmPip_LL_LowBias",
+    "Hlt2Charm_D0ToKsKmPip_LL_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_LL",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_DD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_LL_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_DD_LowBias",
+    "Hlt2Charm_D0ToKsKpPim_LL",
+    "Hlt2Charm_D0ToKsKpPim_DD",
+    "Hlt2Charm_D0ToKsKpPim_LL_LowBias",
+    "Hlt2Charm_D0ToKsKpPim_DD_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_LL",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_DD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_LL_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_DD_LowBias",
+    "Hlt2Charm_D0ToKsKmKp_LL",
+    "Hlt2Charm_D0ToKsKmKp_DD",
+    "Hlt2Charm_D0ToKsKmKp_LL_LowBias",
+    "Hlt2Charm_D0ToKsKmKp_DD_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_LL",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_DD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_LL_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_DD_LowBias",
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS',
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS',
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS_MVA',
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS_MVA',
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS',
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS',
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS_MVA',
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS_MVA',
+    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS',
+    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS',
+    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS_MVA',
+    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS_MVA',
+]
+
+def make_composite_variables(options, pvs, data, add_truth=True, add_Hlt1TisTos=True):
+    if not options.simulation:
+        add_truth = False
+    variables = (
+        FunctorCollection(
+            {
+                "MAXPT": F.MAX(F.PT),
+                "MINPT": F.MIN(F.PT),
+                "SUMPT": F.SUM(F.PT),
+                "MAXP": F.MAX(F.P),
+                "MINP": F.MIN(F.P),
+                "BPVDIRA": F.BPVDIRA(pvs),
+                "VCHI2DOF": F.CHI2DOF,
+                #"VNDOF": F.NDOF,
+                "BPVFDCHI2": F.BPVFDCHI2(pvs),
+                "BPVFD": F.BPVFD(pvs),
+                "BPVVDRHO": F.BPVVDRHO(pvs),
+                "BPVVDZ": F.BPVVDZ(pvs),
+                "BPVIPCHI2": F.BPVIPCHI2(pvs),
+                "BPVIP": F.BPVIP(pvs),
+                "LOGBPVIPCHI2": log(F.BPVIPCHI2(pvs)),
+                "BPVLTIME": F.BPVLTIME(pvs),
+                "MAXBPVIPCHI2": F.MAX(F.BPVIPCHI2(pvs)),
+                "MINBPVIPCHI2": F.MIN(F.BPVIPCHI2(pvs)),
+                "MAXBPVIP": F.MAX(F.BPVIP(pvs)),
+                "MINBPVIP": F.MIN(F.BPVIP(pvs)),
+                "MAXDOCACHI2": F.MAXDOCACHI2,
+                "MAXDOCA": F.MAXDOCA,
+                "MAXSDOCACHI2": F.MAXSDOCACHI2,
+                "MAXSDOCA": F.MAXSDOCA,
+                "ETA": F.ETA,
+                "PHI": F.PHI,
+                "END_VX": F.END_VX,
+                "END_VY": F.END_VY,
+                "END_VZ": F.END_VZ,
+                "END_VX_ERR":F.SQRT @ F.CALL(0,0) @ F.POS_COV_MATRIX @ F.ENDVERTEX,
+                "END_VY_ERR":F.SQRT @ F.CALL(1,1) @ F.POS_COV_MATRIX @ F.ENDVERTEX,
+                "END_VZ_ERR":F.SQRT @ F.CALL(2,2) @ F.POS_COV_MATRIX @ F.ENDVERTEX,
+                "BPVX": F.BPVX(pvs),
+                "BPVY": F.BPVY(pvs),
+                "BPVZ": F.BPVZ(pvs),
+                "BPVX_ERR": F.SQRT @ F.CALL(0,0) @ F.POS_COV_MATRIX @ F.BPV(pvs),
+                "BPVY_ERR": F.SQRT @ F.CALL(1,1) @ F.POS_COV_MATRIX @ F.BPV(pvs),
+                "BPVZ_ERR": F.SQRT @ F.CALL(2,2) @ F.POS_COV_MATRIX @ F.BPV(pvs),
+                "ALLPVFD"     : F.ALLPV_FD(pvs),
+                "ALLPVIP"     : F.ALLPV_IP(pvs),
+                "OBJECT_KEY": F.OBJECT_KEY,
+            }
+        )
+        + Kinematics()
+        #+ ParticleID(extra_info=True) #only for daughters
+    )
+
+    if add_Hlt1TisTos:
+        variables += HltTisTos(
+            selection_type="Hlt1", trigger_lines=Hlt1_lines, data=data
+        )
+
+    if add_truth:
+        variables = add_truth_matching_functors(
+            options,
+            variables,
+            data,
+            hierarchy=True,
+            kinematics=True,
+            vertex_info=True,
+            bkgcat=True,
+        )
+
+    return variables
+
+def make_tistoscombinations(options, pvs, data):
+    algo_output = ParticleToSubcombinationsAlg( Input=data )
+    relations = algo_output.OutputRelations
+
+    tistos_variables_extra = HltTisTos(
+        selection_type="Hlt1", trigger_lines=["Hlt1TwoTrackMVADecision"], data=algo_output.OutputParticles
+    )
+    tistos_combinations = {}
+    for k,v in tistos_variables_extra.get_thor_functors().items():
+        tistos_combinations[k + "_SUBCOMB" ] = F.MAP_INPUT_ARRAY( v, relations )
+    tistos_combinations = FunctorCollection( tistos_combinations )
+
+    return tistos_combinations
+
+def make_composite_variables_3body(options, pvs, data, add_truth=True):
+
+    variables = (
+        FunctorCollection(
+            {
+                #12
+                "M12": F.SUBCOMB(Functor=F.MASS, Indices=(1, 2)),
+                "SDOCA12"     : F.SDOCA(Child1=1,Child2=2),
+                "SDOCACHI212" : F.SDOCACHI2(Child1=1,Child2=2),
+                "DOCA12"      : F.DOCA(Child1=1,Child2=2),
+                "DOCACHI212"  : F.DOCACHI2(Child1=1,Child2=2),
+                "COS12": F.ALV(1, 2),
+                #"ETA12": F.SUBCOMB(Functor=F.ETA, Indices=(1, 2)),
+                #"PT12": F.SUBCOMB(Functor=F.PT, Indices=(1, 2)),
+                #"VCHI212": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(1, 2)),
+                #"END_VZ12": F.SUBCOMB(Functor=F.END_VZ, Indices=(1, 2)),
+                #"BPVZ12": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(1, 2)),
+                #"BPVCORRM12": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(1, 2)),
+                #13
+                "M13": F.SUBCOMB(Functor=F.MASS, Indices=(1, 3)),
+                "SDOCA13"     : F.SDOCA(Child1=1,Child2=3),
+                "SDOCACHI213" : F.SDOCACHI2(Child1=1,Child2=3),
+                "DOCA13"      : F.DOCA(Child1=1,Child2=3),
+                "DOCACHI213"  : F.DOCACHI2(Child1=1,Child2=3),
+                "COS13": F.ALV(1, 3),
+                #"ETA13": F.SUBCOMB(Functor=F.ETA, Indices=(1, 3)),
+                #"PT13": F.SUBCOMB(Functor=F.PT, Indices=(1, 3)),
+                #"VCHI213": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(1, 3)),
+                #"END_VZ13": F.SUBCOMB(Functor=F.END_VZ, Indices=(1, 3)),
+                #"BPVZ13": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(1, 3)),
+                #"BPVCORRM13": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(1, 3)),
+                #23
+                "M23": F.SUBCOMB(Functor=F.MASS, Indices=(2, 3)),
+                "SDOCA23"     : F.SDOCA(Child1=2,Child2=3),
+                "SDOCACHI223" : F.SDOCACHI2(Child1=2,Child2=3),
+                "DOCA23"      : F.DOCA(Child1=2,Child2=3),
+                "DOCACHI223"  : F.DOCACHI2(Child1=2,Child2=3),
+                "COS23": F.ALV(2, 3),
+                #"ETA23": F.SUBCOMB(Functor=F.ETA, Indices=(2, 3)),
+                #"PT23": F.SUBCOMB(Functor=F.PT, Indices=(2, 3)),
+                #"VCHI223": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(2, 3)),
+                #"END_VZ23": F.SUBCOMB(Functor=F.END_VZ, Indices=(2, 3)),
+                #"BPVZ23": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(2, 3)),
+                #"BPVCORRM23": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(2, 3)),
+            }
+        )
+    )
+    return make_composite_variables(options, pvs, data, add_truth)+make_tistoscombinations(options, pvs, data)+variables
+
+def make_composite_variables_4body(options, pvs, data, add_truth=True):
+
+    variables = (
+        FunctorCollection(
+            {
+                #14
+                "M14": F.SUBCOMB(Functor=F.MASS, Indices=(1, 4)),
+                "SDOCA14"     : F.SDOCA(Child1=1,Child2=4),
+                "SDOCACHI214" : F.SDOCACHI2(Child1=1,Child2=4),
+                "DOCA14"      : F.DOCA(Child1=1,Child2=4),
+                "DOCACHI214"  : F.DOCACHI2(Child1=1,Child2=4),
+                "COS14": F.ALV(1, 4),
+                #"ETA14": F.SUBCOMB(Functor=F.ETA, Indices=(1, 4)),
+                #"PT14": F.SUBCOMB(Functor=F.PT, Indices=(1, 4)),
+                #"VCHI214": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(1, 4)),
+                #"END_VZ14": F.SUBCOMB(Functor=F.END_VZ, Indices=(1, 4)),
+                #"BPVZ14": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(1, 4)),
+                #"BPVCORRM14": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(1, 4)),
+                #24
+                "M24": F.SUBCOMB(Functor=F.MASS, Indices=(2, 4)),
+                "SDOCA24"     : F.SDOCA(Child1=2,Child2=4),
+                "SDOCACHI224" : F.SDOCACHI2(Child1=2,Child2=4),
+                "DOCA24"      : F.DOCA(Child1=2,Child2=4),
+                "DOCACHI224"  : F.DOCACHI2(Child1=2,Child2=4),
+                "COS24": F.ALV(2, 4),
+                #"ETA24": F.SUBCOMB(Functor=F.ETA, Indices=(2, 4)),
+                #"PT24": F.SUBCOMB(Functor=F.PT, Indices=(2, 4)),
+                #"VCHI224": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(2, 4)),
+                #"END_VZ24": F.SUBCOMB(Functor=F.END_VZ, Indices=(2, 4)),
+                #"BPVZ24": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(2, 4)),
+                #"BPVCORRM24": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(2, 4)),
+                #34
+                "M34": F.SUBCOMB(Functor=F.MASS, Indices=(3, 4)),
+                "SDOCA34"     : F.SDOCA(Child1=3,Child2=4),
+                "SDOCACHI234" : F.SDOCACHI2(Child1=3,Child2=4),
+                "DOCA34"      : F.DOCA(Child1=3,Child2=4),
+                "DOCACHI234"  : F.DOCACHI2(Child1=3,Child2=4),
+                "COS34": F.ALV(3, 4),
+                #"ETA34": F.SUBCOMB(Functor=F.ETA, Indices=(3, 4)),
+                #"PT34": F.SUBCOMB(Functor=F.PT, Indices=(3, 4)),
+                #"VCHI234": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(3, 4)),
+                #"END_VZ34": F.SUBCOMB(Functor=F.END_VZ, Indices=(3, 4)),
+                #"BPVZ34": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(3, 4)),
+                #"BPVCORRM34": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(3, 4)),
+            }
+        )
+    )
+    return make_composite_variables_3body(options, pvs, data, add_truth)+variables #make_tistoscombinations already included
+
+def make_b_composite_variables(options, pvs, data, add_truth=True):
+    
+    # define helper functors
+    get_child = F.CHILD(1, F.FORWARDARG0) # change here the index of the child
+    get_SV =  F.ENDVERTEX @ F.FORWARDARG0
+    get_SV_pos = F.TOLINALG @ F.POSITION @ get_SV # only if composite (i.e. has vertex)
+    get_child_endvtx_pos = F.ENDVERTEX_POS  @ get_child
+    get_fdvec_child = get_child_endvtx_pos - get_SV_pos
+
+    # define observables
+    IP_wrt_SV = F.IP.bind(get_SV_pos , get_child)
+    IPCHI2_wrt_SV = F.IPCHI2.bind(get_SV , get_child) # only if child is composite (i.e. has vertex)
+    FD_wrt_SV = F.MAGNITUDE @ get_fdvec_child
+    FDCHI2_wrt_SV = F.VTX_FDCHI2.bind(get_SV, get_child)
+
+    
+    variables = FunctorCollection(
+        {       
+            "ID": F.PARTICLE_ID ,
+            "PT": F.PT,
+            "P": F.P,
+            "MASS": F.MASS,
+            "CHILD1_IPwrtSV": IP_wrt_SV,
+            "CHILD1_IPCHI2wrtSV": IPCHI2_wrt_SV,
+            "CHILD1_FDwrtSV": FD_wrt_SV,
+            "CHILD1_FDCHI2wrtSV": FDCHI2_wrt_SV,
+            "PX": F.PX,
+            "PY": F.PY,
+            "PZ": F.PZ,
+            "END_VCHI2DOF": F.CHI2DOF @ F.ENDVERTEX,
+            "BPVCHI2DOF": F.CHI2DOF @ F.BPV(pvs),
+            # B2OC generic B hadron NN Hlt2 algorithm,
+            # not planning to use it directly for B2OC EM
+            "MVA": F.MVA(
+                MVAType="SigmaNet",
+                Config={
+                    "File":
+                    "paramfile://data/Hlt2B2OC_B_SigmaNet_Run3-v1.json",
+                    "Name":
+                    "B2OC_SigmaNet_Generic",
+                    "Lambda":
+                    "2.0",
+                    "NLayers":
+                    "3",
+                    "InputSize":
+                    "6",
+                    "Monotone_Constraints":
+                    "[1,-1,-1,-1,-1,-1]",
+                    "Variables":
+                    "log_B_PT,B_ETA,log_B_DIRA,log_B_ENDVERTEX_CHI2,log_B_IPCHI2_OWNPV,log_B_IP_OWNPV",
+                },
+                Inputs={
+                    "log_B_PT": fmath.log(F.PT),
+                    "B_ETA": F.ETA,
+                    "log_B_DIRA": fmath.log(1. - F.BPVDIRA(pvs)),
+                    "log_B_ENDVERTEX_CHI2": fmath.log(F.CHI2DOF),
+                    "log_B_IPCHI2_OWNPV": fmath.log(F.BPVIPCHI2(pvs)),
+                    "log_B_IP_OWNPV": fmath.log(F.BPVIP(pvs)),
+                }),
+            #'SSPionBDT_Mistag': F.SSPionBDT_Mistag(sspionTagging.OutputFlavourTags),
+            #'SSPionBDT_Decision': F.SSPionBDT_Decision(sspionTagging.OutputFlavourTags),
+
+        }
+    )
+    return make_composite_variables(options, pvs, data, add_truth)+make_tistoscombinations(options, pvs, data)+variables
+
+def make_DeltaM_variable(options):
+    return FunctorCollection({"DM": F.MASS - F.CHILD(1, F.MASS)})
+
+def make_basic_variables(options, pvs, data, add_truth=True, islong = True):
+    if not options.simulation:
+        add_truth = False
+    variables = (
+        FunctorCollection(
+            {
+                "TRCHI2DOF": F.CHI2DOF @ F.TRACK,
+                "ETA": F.ETA,
+                "PHI": F.PHI,
+                "TRGHOSTPROB": F.GHOSTPROB,
+                "BPVIPCHI2": F.BPVIPCHI2(pvs),
+                "BPVIP": F.BPVIP(pvs),
+                "BPVX": F.BPVX(pvs),
+                "BPVY": F.BPVY(pvs),
+                "BPVZ": F.BPVZ(pvs),
+                "TX"          : F.TX,
+                "TY"          : F.TY,
+                "MINIPCHI2"   : F.MINIPCHI2(pvs),
+                "MINIP"       : F.MINIP(pvs),
+                "KEY"         : F.VALUE_OR(-1) @ F.OBJECT_KEY @ F.TRACK,
+                "ISMUON"      : F.ISMUON,
+                "TRACKPT": F.TRACK_PT,
+                "TRACKHISTORY": F.VALUE_OR(-1) @ F.TRACKHISTORY @ F.TRACK,
+                "QOVERP": F.QOVERP @ F.TRACK,
+                "NDOF": F.VALUE_OR(-1) @ F.NDOF @ F.TRACK,
+                "NFTHITS": F.VALUE_OR(-1) @ F.NFTHITS @ F.TRACK,
+                "NHITS": F.VALUE_OR(-1) @ F.NHITS @ F.TRACK,
+                "NUTHITS": F.VALUE_OR(-1) @ F.NUTHITS @ F.TRACK,
+                "NVPHITS": F.VALUE_OR(-1) @ F.NVPHITS @ F.TRACK,
+                #"NMUONHITS": F.VALUE_OR(-1) @ F.NHITSMUONS @ F.TRACK, #https://gitlab.cern.ch/lhcb/Rec/-/merge_requests/3756
+                "TRACKHASVELO": F.VALUE_OR(-1) @ F.TRACKHASVELO @ F.TRACK,
+                "TRACKHASUT": F.VALUE_OR(-1) @ F.TRACKHASUT @ F.TRACK,
+                "OBJECT_KEY": F.OBJECT_KEY,
+                "HASBREM": F.HASBREM,
+                "BREMENERGY": F.BREMENERGY,
+                "BREMBENDCORR": F.BREMBENDCORR,
+            }
+        )
+        + Kinematics()
+        + ParticleID(extra_info=True)
+    )
+
+    if islong:
+        variables += FunctorCollection({"CTB": F.TRACK_POSVEC_CLOSESTTOBEAM})
+    
+    variables += HltTisTos(
+        selection_type="Hlt1", trigger_lines=Hlt1_1track_lines, data=data
+    )
+    
+    if add_truth:
+        variables = add_truth_matching_functors(
+            options,
+            variables,
+            data,
+            hierarchy=True,
+            kinematics=True,
+            vertex_info=True,
+            bkgcat=False,
+        )
+
+    return variables
+
+def make_hlt2_event_variables(options, pvs, rec_summary):
+    # define event level variables
+    evt_variables = EventInfo()
+    if not options.simulation:
+        evt_variables += LHCInfo() #FillNumber
+    evt_variables += SelectionInfo(selection_type="Hlt2", trigger_lines=Hlt2_lines)
+    evt_variables += SelectionInfo(selection_type="Hlt1", trigger_lines=Hlt1_global_lines)
+    evt_variables += FunctorCollection(
+        {
+            "ALLPVX": F.ALLPVX(pvs),
+            "ALLPVY": F.ALLPVY(pvs),
+            "ALLPVZ": F.ALLPVZ(pvs),
+            "ALLPVNDOF": F.MAP(F.VALUE_OR(F.NaN) @ F.NDOF) @ F.TES(pvs),
+            "ALLPVCHI2": F.MAP(F.VALUE_OR(F.NaN) @ F.CHI2) @ F.TES(pvs),
+            "nPVs": F.SIZE(pvs),
+            "nTracks": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nTracks"),
+            "nLongTracks": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nLongTracks"),
+            "nMuonTracks": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nMuonTracks"),
+            "nFTClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nFTClusters"),
+            "nVPClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nVPClusters"),
+            "nUTClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nUTClusters"),
+            "nSPDhits": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nSPDhits"),
+            "nEcalClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nEcalClusters"),
+            "nEcalClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nEcalClusters"),
+            "eCalTot": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "eCalTot"),
+            "hCalTot": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "hCalTot"),
+            "nRich1Hits": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nRich1Hits"),
+            "nRich2Hits": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nRich2Hits"),
+        }
+    )
+    return evt_variables
+
+def add_truth_matching_functors(
+    options,
+    variables,
+    data,
+    hierarchy=True,
+    kinematics=True,
+    vertex_info=True,
+    bkgcat=False,
+    prompt_info=True,
+):
+    """Add MC truth matching functors to an existing FunctorCollection.
+
+    Args:
+        options (DaVinci.Options): DaVinci options object.
+        variables (FunctorCollection): FunctorCollection to modify
+        data: data handle
+        hierarchy (bool): Add MCHierarchy info (default True)
+        kinematics (bool): Add MCKinematics info (default True)
+        vertex_info (bool): Add MCVertexInfo (default True)
+        bkgcat (bool): Add TRUEKEY and BKGCAT functors - intended for composite particles (default False)
+        prompt_info (bool): Add MCPromptDecay info (default True)
+
+    Returns:
+        FunctorCollection: modified FunctorCollection with truth matched variables.
+    """
+    assert (
+        options.simulation
+    ), "options.simulation is set to False - it doesn't make sense to add truth matching."
+
+    MCTRUTH = MCTruthAndBkgCat(data)
+
+    if bkgcat:
+        variables += FunctorCollection(
+            {
+                # Important note: specify an invalid value for integer functors if there exists no truth info.
+                #                 The invalid value for floating point functors is set to nan.
+                "TRUEKEY": F.VALUE_OR(-1) @ MCTRUTH(F.OBJECT_KEY),
+                "BKGCAT": MCTRUTH.BkgCat,
+            }
+        )
+    if hierarchy:
+        variables += MCHierarchy(mctruth_alg=MCTRUTH)  # likely to change again!!
+    if vertex_info:
+        variables += MCVertexInfo(mctruth_alg=MCTRUTH)  # likely to change again!!
+    if kinematics:
+        variables += MCKinematics(mctruth_alg=MCTRUTH)  # likely to change again!!
+    if prompt_info:
+        variables += MCPromptDecay(mctruth_alg=MCTRUTH)
+
+    return variables
+
+### DTF variables ###
+
+def make_basic_dtf_variables(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name="", islong=True):
+    variables = (
+        FunctorCollection(
+            {
+                "TRCHI2DOF": F.CHI2DOF @ F.TRACK,
+                "ETA": F.ETA,
+                "PHI": F.PHI,
+                "TRGHOSTPROB": F.GHOSTPROB,
+                "BPVIPCHI2": F.BPVIPCHI2(pvs),
+                "BPVIP": F.BPVIP(pvs),
+                "BPVX": F.BPVX(pvs),
+                "BPVY": F.BPVY(pvs),
+                "BPVZ": F.BPVZ(pvs),
+                "TX"          : F.TX,
+                "TY"          : F.TY,
+                "MINIPCHI2"   : F.MINIPCHI2(pvs),
+                "MINIP"       : F.MINIP(pvs),
+                "KEY"         : F.VALUE_OR(-1) @ F.OBJECT_KEY @ F.TRACK,
+                "TRACKPT": F.TRACK_PT,
+                "TRACKHISTORY": F.VALUE_OR(-1) @ F.TRACKHISTORY @ F.TRACK,
+                "QOVERP": F.QOVERP @ F.TRACK,
+                "NDOF": F.VALUE_OR(-1) @ F.NDOF @ F.TRACK,
+            }
+        )
+        + Kinematics()
+    )
+
+    if islong:
+        variables += FunctorCollection({"CTB": F.TRACK_POSVEC_CLOSESTTOBEAM})
+    
+    if(mass_constraint):
+        if(pv_constraint): # MASS + PV
+            dtf_variables_mass_pv = FunctorCollection({
+                        'DTF_PV_M'+ particle_name + '_' + k: DTF(v)
+                        for k, v in variables.get_thor_functors().items()
+                    })
+            return dtf_variables_mass_pv
+        else: # MASS
+            dtf_variables_mass = FunctorCollection(
+                {'DTF_M'+ particle_name + '_' + k: DTF(v)
+                 for k, v in variables.get_thor_functors().items()})
+        return dtf_variables_mass
+
+    elif(pv_constraint): # PV
+        dtf_variables_pv = FunctorCollection({
+                'DTF_PV_' + k: DTF(v)
+                for k, v in variables.get_thor_functors().items()
+            })
+        return dtf_variables_pv
+
+    else: # NO MASS/PV
+        dtf_variables = FunctorCollection(
+            {'DTF_' + k: DTF(v)
+             for k, v in variables.get_thor_functors().items()})
+        return dtf_variables
+
+def make_composite_dtf_variables(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name=""):
+    variables = (
+        FunctorCollection(
+            {
+                "MAXPT": F.MAX(F.PT),
+                "MINPT": F.MIN(F.PT),
+                "SUMPT": F.SUM(F.PT),
+                "MAXP": F.MAX(F.P),
+                "MINP": F.MIN(F.P),
+                "BPVDIRA": F.BPVDIRA(pvs),
+                "VCHI2DOF": F.CHI2DOF, #CHI2VXNDOF
+                "BPVFDCHI2": F.BPVFDCHI2(pvs),
+                "BPVFD": F.BPVFD(pvs),
+                "BPVVDRHO": F.BPVVDRHO(pvs),
+                "BPVVDZ": F.BPVVDZ(pvs),
+                "BPVIPCHI2": F.BPVIPCHI2(pvs),
+                "BPVIP": F.BPVIP(pvs),
+                "LOGBPVIPCHI2": log(F.BPVIPCHI2(pvs)),
+                "BPVLTIME": F.BPVLTIME(pvs),
+                "MAXBPVIPCHI2": F.MAX(F.BPVIPCHI2(pvs)), #MAX_
+                "MINBPVIPCHI2": F.MIN(F.BPVIPCHI2(pvs)),
+                "MAXBPVIP": F.MAX(F.BPVIP(pvs)),
+                "MINBPVIP": F.MIN(F.BPVIP(pvs)),
+                "ETA": F.ETA,
+                "PHI": F.PHI,
+                "END_VX": F.END_VX, #END_
+                "END_VY": F.END_VY,
+                "END_VZ": F.END_VZ,
+                "BPVX": F.BPVX(pvs),
+                "BPVY": F.BPVY(pvs),
+                "BPVZ": F.BPVZ(pvs),
+                "ALLPVFD"     : F.ALLPV_FD(pvs),
+                "ALLPVIP"     : F.ALLPV_IP(pvs),
+                
+            }
+        )
+        + Kinematics()
+    )
+
+    addstring = "DTF"
+    if(pv_constraint):
+            addstring += '_PV'
+    if(mass_constraint):
+            addstring += '_M'
+    addstring += particle_name
+
+    DTF_chi2ndof = FunctorCollection(
+            {
+                addstring+"_DTFCHI2": DTF.CHI2,
+                addstring+"_DTFNDOF": DTF.NDOF,
+                addstring+"_CTAU": DTF.CTAU,
+                addstring+"_CTAUERR": DTF.CTAUERR,
+                addstring+"_MERR": DTF.MASSERR,
+            }
+    )
+
+    if(mass_constraint):
+        if(pv_constraint): # MASS + PV
+            dtf_variables_mass_pv = FunctorCollection({
+                        'DTF_PV_M'+ particle_name + '_' + k: DTF(v)
+                        for k, v in variables.get_thor_functors().items()
+                    })
+            return dtf_variables_mass_pv+DTF_chi2ndof
+        else: # MASS
+            dtf_variables_mass = FunctorCollection(
+                {'DTF_M'+ particle_name + '_' + k: DTF(v)
+                 for k, v in variables.get_thor_functors().items()})
+        return dtf_variables_mass+DTF_chi2ndof
+
+    elif(pv_constraint): # PV
+        dtf_variables_pv = FunctorCollection({
+                'DTF_PV_' + k: DTF(v)
+                for k, v in variables.get_thor_functors().items()
+            })
+        return dtf_variables_pv+DTF_chi2ndof
+
+    else: # NO MASS/PV
+        dtf_variables = FunctorCollection(
+            {'DTF_' + k: DTF(v)
+             for k, v in variables.get_thor_functors().items()})
+        return dtf_variables+DTF_chi2ndof
+
+def make_composite_dtf_variables_3body(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name=""):
+    variables = (
+        FunctorCollection(
+            {
+                "M13": F.SUBCOMB(Functor=F.MASS, Indices=(1, 3)),
+                "M23": F.SUBCOMB(Functor=F.MASS, Indices=(2, 3)),
+            }
+        )
+    )
+
+    if(mass_constraint):
+        if(pv_constraint): # MASS + PV
+            dtf_variables_mass_pv = FunctorCollection({
+                        'DTF_PV_M'+ particle_name + '_' + k: DTF(v)
+                        for k, v in variables.get_thor_functors().items()
+                    })
+            return dtf_variables_mass_pv+make_composite_dtf_variables(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
+        else: # MASS
+            dtf_variables_mass = FunctorCollection(
+                {'DTF_M'+ particle_name + '_' + k: DTF(v)
+                 for k, v in variables.get_thor_functors().items()})
+        return dtf_variables_mass+make_composite_dtf_variables(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
+
+    elif(pv_constraint): # PV
+        dtf_variables_pv = FunctorCollection({
+                'DTF_PV_' + k: DTF(v)
+                for k, v in variables.get_thor_functors().items()
+            })
+        return dtf_variables_pv+make_composite_dtf_variables(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
+
+    else: # NO MASS/PV
+        dtf_variables = FunctorCollection(
+            {'DTF_' + k: DTF(v)
+             for k, v in variables.get_thor_functors().items()})
+
+    return dtf_variables+make_composite_dtf_variables(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
+
+def make_composite_dtf_variables_4body(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name=""):
+    variables = (
+        FunctorCollection(
+            {
+                "M14": F.SUBCOMB(Functor=F.MASS, Indices=(1, 4)),
+                "M24": F.SUBCOMB(Functor=F.MASS, Indices=(2, 4)),
+                "M34": F.SUBCOMB(Functor=F.MASS, Indices=(3, 4)),
+            }
+        )
+    )
+
+    if(mass_constraint):
+        if(pv_constraint): # MASS + PV
+            dtf_variables_mass_pv = FunctorCollection({
+                        'DTF_PV_M'+ particle_name + '_' + k: DTF(v)
+                        for k, v in variables.get_thor_functors().items()
+                    })
+            return dtf_variables_mass_pv+make_composite_dtf_variables_3body(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
+        else: # MASS
+            dtf_variables_mass = FunctorCollection(
+                {'DTF_M'+ particle_name + '_' + k: DTF(v)
+                 for k, v in variables.get_thor_functors().items()})
+        return dtf_variables_mass+make_composite_dtf_variables_3body(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
+
+    elif(pv_constraint): # PV
+        dtf_variables_pv = FunctorCollection({
+                'DTF_PV_' + k: DTF(v)
+                for k, v in variables.get_thor_functors().items()
+            })
+        return dtf_variables_pv+make_composite_dtf_variables_3body(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
+
+    else: # NO MASS/PV
+        dtf_variables = FunctorCollection(
+            {'DTF_' + k: DTF(v)
+             for k, v in variables.get_thor_functors().items()})
+    
+        return dtf_variables+make_composite_dtf_variables_3body(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
+
+
+def make_MC_basic_variables():
+    MC_MOTHER_ID = lambda gen: F.VALUE_OR(0) @ F.MC_MOTHER(gen, F.PARTICLE_ID)
+    MC_MOTHER_KEY = lambda gen: F.VALUE_OR(-1) @ F.MC_MOTHER(gen, F.OBJECT_KEY)
+
+    variables = (
+        FunctorCollection(
+            {
+                "OBJECT_KEY": F.OBJECT_KEY,
+                "ETA": F.ETA,
+                "PHI": F.PHI,
+                "ORIGIN_VX": F.ORIGIN_VX,
+                "ORIGIN_VY": F.ORIGIN_VY,
+                "ORIGIN_VZ": F.ORIGIN_VZ,
+                "FOURMOMENTUM": F.FOURMOMENTUM,
+                "TRUEID": F.PARTICLE_ID,
+                "MC_MOTHER_ID": MC_MOTHER_ID(1),
+                "MC_MOTHER_KEY": MC_MOTHER_KEY(1),
+                "MC_GD_MOTHER_ID": MC_MOTHER_ID(2),
+                "MC_GD_MOTHER_KEY": MC_MOTHER_KEY(2),
+                "MC_GD_GD_MOTHER_ID": MC_MOTHER_ID(3),
+                "MC_GD_GD_MOTHER_KEY": MC_MOTHER_KEY(3),
+            }
+        )
+        + Kinematics()
+    )
+
+
+    from PyConf.reading import get_mc_particles, get_pp2mcp_relations, get_mc_track_info
+    MC_data = get_mc_particles("/Event/HLT2/MC/Particles")
+    relations_charged = get_pp2mcp_relations("/Event/HLT2/Relations/ChargedPP2MCP")
+    relations_neutral = get_pp2mcp_relations("/Event/HLT2/Relations/NeutralPP2MCP")
+    mcreconstructed_all = MCReconstructed(
+        input_mcparticles=MC_data,
+        use_best_mcmatch=True,
+        relations_charged=relations_charged,
+        relations_neutral=relations_neutral,
+    )
+    mcreconstructible_all = MCReconstructible(
+        input_mctrackinfo=get_mc_track_info()
+    )
+    import FunTuple.functorcollections as FC
+    vars_reconstructed = FC.MCReconstructed(mcreconstructed_alg=mcreconstructed_all, extra_info=True)
+    vars_reconstructible = FC.MCReconstructible(mcreconstructible_alg=mcreconstructible_all, extra_info=True)
+
+
+    return variables+vars_reconstructed+vars_reconstructible
+
+def make_MC_composite_variables():
+    MC_MOTHER_ID = lambda gen: F.VALUE_OR(0) @ F.MC_MOTHER(gen, F.PARTICLE_ID)
+    MC_MOTHER_KEY = lambda gen: F.VALUE_OR(-1) @ F.MC_MOTHER(gen, F.OBJECT_KEY)
+
+    variables = (
+        FunctorCollection(
+            {
+                "END_VX": F.END_VX,
+                "END_VY": F.END_VY,
+                "END_VZ": F.END_VZ,
+                "LTIME": F.MC_LIFETIME,
+                "OBJECT_KEY": F.OBJECT_KEY,
+                "ETA": F.ETA,
+                "PHI": F.PHI,
+                "ORIGIN_VX": F.ORIGIN_VX,
+                "ORIGIN_VY": F.ORIGIN_VY,
+                "ORIGIN_VZ": F.ORIGIN_VZ,
+                "FOURMOMENTUM": F.FOURMOMENTUM,
+                "TRUEID": F.PARTICLE_ID,
+                "MC_MOTHER_ID": MC_MOTHER_ID(1),
+                "MC_MOTHER_KEY": MC_MOTHER_KEY(1),
+                "MC_GD_MOTHER_ID": MC_MOTHER_ID(2),
+                "MC_GD_MOTHER_KEY": MC_MOTHER_KEY(2),
+                "MC_GD_GD_MOTHER_ID": MC_MOTHER_ID(3),
+                "MC_GD_GD_MOTHER_KEY": MC_MOTHER_KEY(3),
+            }
+        )
+        + Kinematics()
+        + MCPromptDecay()
+        )
+
+    return variables
+
+def make_MC_event_variables(mc_header):
+    # define event level variables
+    evt_variables = EventInfo()
+    evt_variables += MCPrimaries(mc_header=mc_header)
+
+    return evt_variables
+
+def make_top_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"]):
+    from PyConf.reading import get_particles
+    from IsolationTools import VertexAndConeIsolation
+
+    possible_charm_locations = ["LongTrackIso", "TTrackIso", "DownstreamTrackIso", "UpstreamTrackIso", "NeutralIso", "PizIso"]
+    coneangles = [0.25,0.5,1.,1.5,2.]
+
+    count = 0
+    for location in locations:
+        extra_particles = get_particles(f"/Event/HLT2/{hlt2_line}/{location}/Particles")
+
+        for coneangle in coneangles:
+            top_RTAlg = VertexAndConeIsolation(
+                name=location+"_"+str(coneangle),
+                reference_particles=input_data,
+                related_particles=extra_particles,
+                cut=F.DR2<coneangle)
+
+            if count == 0:
+                top_iso_variables = ParticleIsolation(isolation_alg=top_RTAlg,array_indx_name='indx')
+            else:
+                top_iso_variables += ParticleIsolation(isolation_alg=top_RTAlg,array_indx_name='indx')
+            count += 1
+
+
+    return top_iso_variables
+
+def make_basic_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"]):
+    from PyConf.reading import get_particles
+    from IsolationTools import VertexAndConeIsolation
+    from PyConf.Algorithms import ThOrParticleSelection
+
+    basic_code = (F.FILTER(F.ALL) @ F.GET_ALL_BASICS())
+    basic_particles = ThOrParticleSelection(InputParticles=input_data, Functor=basic_code).OutputSelection
+
+    possible_charm_locations = ["LongTrackIso", "TTrackIso", "DownstreamTrackIso", "UpstreamTrackIso", "NeutralIso", "PizIso"]
+    coneangles = [0.25,0.5,1.,1.5,2.]
+
+    count = 0
+    for location in locations:
+        extra_particles = get_particles(f"/Event/HLT2/{hlt2_line}/{location}/Particles")
+
+        for coneangle in coneangles:
+            basic_RTAlg = VertexAndConeIsolation(
+                name=location+"_"+str(coneangle),
+                reference_particles=basic_particles,
+                related_particles=extra_particles,
+                cut=F.DR2<coneangle)
+
+            if count == 0:
+                basic_iso_variables = ParticleIsolation(isolation_alg=basic_RTAlg,array_indx_name='indx')
+            else:
+                basic_iso_variables += ParticleIsolation(isolation_alg=basic_RTAlg,array_indx_name='indx')
+            count += 1
+
+
+    return basic_iso_variables
+
+
+def make_intermediate_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"], composite_ID = "J/psi(1S)"):
+    from PyConf.reading import get_particles
+    from IsolationTools import VertexAndConeIsolation
+    from PyConf.Algorithms import ThOrParticleSelection
+
+    intermediate_code = F.FILTER(F.IS_ABS_ID(composite_ID)) @ F.GET_ALL_DESCENDANTS()
+    intermediate_particles = ThOrParticleSelection(InputParticles=input_data, Functor=intermediate_code).OutputSelection
+
+    possible_charm_locations = ["LongTrackIso", "TTrackIso", "DownstreamTrackIso", "UpstreamTrackIso", "NeutralIso", "PizIso"]
+    coneangles = [0.25,0.5,1.,1.5,2.]
+
+    count = 0
+    for location in locations:
+        extra_particles = get_particles(f"/Event/HLT2/{hlt2_line}/{location}/Particles")
+
+        for coneangle in coneangles:
+            intermediate_RTAlg = VertexAndConeIsolation(
+                name=location+"_"+str(coneangle),
+                reference_particles=intermediate_particles,
+                related_particles=extra_particles,
+                cut=F.DR2<coneangle)
+
+            if count == 0:
+                intermediate_iso_variables = ParticleIsolation(isolation_alg=intermediate_RTAlg,array_indx_name='indx')
+            else:
+                intermediate_iso_variables += ParticleIsolation(isolation_alg=intermediate_RTAlg,array_indx_name='indx')
+            count += 1
+
+
+    return intermediate_iso_variables
diff --git a/Charm_2024validation/Charm_2024validation/tmp.yaml b/Charm_2024validation/Charm_2024validation/tmp.yaml
new file mode 100644
index 0000000000..c871485c24
--- /dev/null
+++ b/Charm_2024validation/Charm_2024validation/tmp.yaml
@@ -0,0 +1,12 @@
+( '27186011', 'dst_to_dee', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27185021', 'dst_to_dee', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27184011', 'dst_to_dee', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27186011', 'dst_to_dee', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '27185021', 'dst_to_dee', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '27184011', 'dst_to_dee', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '27186011', 'dst_to_dee', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '27185021', 'dst_to_dee', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '27184011', 'dst_to_dee', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '27186011', 'dst_to_dee', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27185021', 'dst_to_dee', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27184011', 'dst_to_dee', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
diff --git a/Charm_2024validation/README.md b/Charm_2024validation/README.md
new file mode 100644
index 0000000000..f061ea162c
--- /dev/null
+++ b/Charm_2024validation/README.md
@@ -0,0 +1,68 @@
+Analysis production for 2024 data validation within the Charm WG.
+
+For easy tests, eg. on `d_to_hhh` subset:
+```sh
+lb-run DaVinci/v64r2 lbexec Charm_2024validation.main_d_to_hhh:main Charm_2024validation/dummy.yaml
+```
+
+Decays and Hlt2 lines considered are:
+- `d0_to_hh.py`:
+  - Dst2D0pi_D02Kpi_RS     "Hlt2Charm_DstpToD0Pip_D0ToKmPip"
+  - Dst2D0pi_D02Kpi_WS     "Hlt2Charm_DstpToD0Pip_D0ToKpPim"
+  - Dst2D0pi_D02KK     "Hlt2Charm_DstpToD0Pip_D0ToKmKp"
+  - Dst2D0pi_D02pipi     "Hlt2Charm_DstpToD0Pip_D0ToPimPip"
+  - D02Kpi     "Hlt2Charm_D0ToKmPip"
+  - D02KK     "Hlt2Charm_D0ToKmKp"
+  - D02pipi     "Hlt2Charm_D0ToPimPip"
+  - Dst2D0pi_D02Kpi_RS_LowBias     "Hlt2Charm_DstpToD0Pip_D0ToKmPip_LowBias"
+  - Dst2D0pi_D02Kpi_WS_LowBias     "Hlt2Charm_DstpToD0Pip_D0ToKpPim_LowBias"
+  - Dst2D0pi_D02KK_LowBias     "Hlt2Charm_DstpToD0Pip_D0ToKmKp_LowBias"
+  - Dst2D0pi_D02pipi_LowBias     "Hlt2Charm_DstpToD0Pip_D0ToPimPip_LowBias"
+  - D02Kpi_LowBias     "Hlt2Charm_D0ToKmPip_LowBias"
+  - D02KK_LowBias     "Hlt2Charm_D0ToKmKp_LowBias"
+  - D02pipi_LowBias     "Hlt2Charm_D0ToPimPip_LowBias"
+- `d_to_ksh.py`:
+  - D2KSpi_LL     "Hlt2Charm_DpDspToKsPip_LL"
+  - D2KSpi_LD     "Hlt2Charm_DpDspToKsPip_LD"
+  - D2KSpi_DD     "Hlt2Charm_DpDspToKsPip_DD"
+  - D2KSK_LL     "Hlt2Charm_DpDspToKsKp_LL"
+  - D2KSK_LD     "Hlt2Charm_DpDspToKsKp_LD"
+  - D2KSK_DD     "Hlt2Charm_DpDspToKsKp_DD"
+- `d_to_hhh.py`:
+  - D2Kpipi     "Hlt2Charm_DpDspToKmPipPip"
+  - D2Kpipi_NoCuts     "Hlt2Charm_DpDspToKmPipPip_NoCuts"
+  - Ds2KKpi     "Hlt2Charm_DspToKmKpPip"
+  - Ds2KKpi_NoCuts     "Hlt2Charm_DspToKmKpPip_NoCuts"
+  - D2pipipi     "Hlt2Charm_DpDspToPimPipPip"
+  - D2pipipi_NoCuts     "Hlt2Charm_DpDspToPimPipPip_NoCuts"
+- `d0_to_hhpi0.py`:
+  - Dst2D0pi_D02Kpipi0 "Hlt2Charm_DstpToD0Pip_D0ToKmPipPi0_{M,R}"
+  - Dst2D0pi_D02KKpi0 "Hlt2Charm_DstpToD0Pip_D0ToKmKpPi0_{M,R}"
+  - Dst2D0pi_D02pipipi0 "Hlt2Charm_DstpToD0Pip_D0ToPimPipPi0_{M,R}"
+- `detection_asymmetry.py`:
+  - D2Kpipi_ADet "Hlt2Charm_DpToKmPipPip_ADet"
+  - D2KSK_LL_ADet "Hlt2Charm_DspToKsKp_LL_ADet"
+  - D2KSpi_LL_ADet "Hlt2Charm_DpToKsPip_LL_ADet"
+  - D2pipipi_ADet "Hlt2Charm_DspToPimPipPip_ADet"
+  - Ds2KKpi_ADet "Hlt2Charm_DspToKmKpPip_ADet"
+  - Lc2KSp_LL_ADet "Hlt2Charm_LcpToPpKs_LL_ADet"
+  - Lc2pKpi_ADet "Hlt2Charm_LcpToPpKmPip_ADet"
+- `rare_charm.py`:
+  - D2pimumu "Hlt2Charm_DpDspToPipMumMup"
+  - D2pimumu_WS "Hlt2Charm_DpDspToPipMupMup_RareCharmControl"
+  - Dst2D0pi_D02Kpimumu_RS "Hlt2Charm_DstpToD0Pip_D0ToKmPipMumMup"
+- `d0_to_kshh.py`:
+- `d0_to_ksks.py`:
+- `dst_to_dee.py`:
+  -  Dst02D0EmEp_D02KmPip_OS    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS',
+  -  Dst02D0EmEp_D02KmPip_SS 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS',
+  -  Dst02D0EmEp_D02KmPip_OS_MVA 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS_MVA',
+  -  Dst02D0EmEp_D02KmPip_SS_MVA 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS_MVA',
+  -  Dst02D0EmEp_D02KmPimPipPip_OS 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS',
+  -  Dst02D0EmEp_D02KmPimPipPip_SS 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS',
+  -  Dst02D0EmEp_D02KmPimPipPip_OS_MVA 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS_MVA',
+  -  Dst02D0EmEp_D02KmPimPipPip_SS_MVA 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS_MVA',
+  -  Dstp2DpDspEmEp_DpDsp2KmKpPip_OS 'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS',
+  -  Dstp2DpDspEmEp_DpDsp2KmKpPip_SS 'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS',
+  -  Dstp2DpDspEmEp_DpDsp2KmKpPip_OS_MVA 'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS_MVA',
+  -  Dstp2DpDspEmEp_DpDsp2KmKpPip_SS_MVA'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS_MVA',
diff --git a/Charm_2024validation/dummy.yaml b/Charm_2024validation/dummy.yaml
new file mode 100644
index 0000000000..5bebae4ac3
--- /dev/null
+++ b/Charm_2024validation/dummy.yaml
@@ -0,0 +1,16 @@
+input_files:
+- root://myProxy@lhcbxrootd-kit.gridka.de//pnfs/gridka.de/lhcb/LHCb-Disk/lhcb/LHCb/Collision23/CHARM.DST/00198130/0000/00198130_00000552_1.charm.dst
+input_raw_format: 0.5
+input_type: ROOT
+output_type: ROOT
+event_store: HiveWhiteBoard
+simulation: False
+data_type: "Upgrade"
+geometry_version: run3/trunk
+conditions_version: Alignment2023_HLT2Processing_26_8_2023
+scheduler_legacy_mode: False
+input_process: "TurboPass"
+input_stream: "charm"
+histo_file: CHARM_HISTO.ROOT
+ntuple_file: CHARM.ROOT
+evt_max: 1000
diff --git a/Charm_2024validation/info.yaml b/Charm_2024validation/info.yaml
new file mode 100644
index 0000000000..26de654976
--- /dev/null
+++ b/Charm_2024validation/info.yaml
@@ -0,0 +1,122 @@
+defaults:
+  inform:
+    - serena.maccolini@cern.ch
+  wg: Charm
+
+{%- set conditions = [
+  "MagDown",
+]%}
+
+{%- set evttype_subsample_nutext_nu_dir1_dir2_dddb = [
+( '27163102', 'd0_to_hh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163101', 'd0_to_hh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163100', 'd0_to_hh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '23103042', 'd_to_hhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '23263022', 'd_to_hhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '21263012', 'd_to_hhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163471', 'd0_to_hhpi0', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27165903', 'd0_to_kshh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27165071', 'd0_to_hhhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27265008', 'd0_to_hhhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27265009', 'd0_to_hhhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27165072', 'd0_to_hhhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '23103111', 'd_to_ksh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '21103101', 'd_to_ksh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '23173003', 'rare_charm', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+
+( '27163102', 'd0_to_hh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163101', 'd0_to_hh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163100', 'd0_to_hh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '23103042', 'd_to_hhh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '23263022', 'd_to_hhh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '21263012', 'd_to_hhh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163471', 'd0_to_hhpi0', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '27165903', 'd0_to_kshh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '27165071', 'd0_to_hhhh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+
+( '27163102', 'd0_to_hh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163101', 'd0_to_hh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163100', 'd0_to_hh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '23103042', 'd_to_hhh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '23263022', 'd_to_hhh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '21263012', 'd_to_hhh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163471', 'd0_to_hhpi0', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '27165903', 'd0_to_kshh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '27165071', 'd0_to_hhhh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+
+( '27163102', 'd0_to_hh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163101', 'd0_to_hh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163100', 'd0_to_hh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '23103042', 'd_to_hhh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '23263022', 'd_to_hhh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '21263012', 'd_to_hhh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163471', 'd0_to_hhpi0', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27165903', 'd0_to_kshh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27165071', 'd0_to_hhhh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+
+]%}
+
+
+
+{%- for evttype, id, nutext, nu, dir1, dir2, dddb in evttype_subsample_nutext_nu_dir1_dir2_dddb %}
+
+{% for polarity in conditions %}
+
+{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1:
+  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
+  input:
+    bk_query: "/MC/{{dir1}}/Beam6800GeV-2024{{dir2}}-{{polarity}}-Nu{{nu}}-25ns-Pythia8/Sim10d/{{evttype}}/DIGI"
+    n_test_lfns: 3
+  output: HLT1.DST
+  options:
+    entrypoint: Charm_2024validation.options.hlt1:alg_config
+    extra_options:
+      input_raw_format: 0.5
+      conddb_tag: sim10-2024.Q1.2-v1.1-md100
+      dddb_tag: '{{dddb}}'
+      input_type: ROOT
+      output_type: ROOT
+      simulation: True
+      data_type: "Upgrade"
+      scheduler_legacy_mode: False
+      evt_max: 1000
+
+{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2:
+  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
+  input:
+    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1
+  output: HLT2.DST
+  options:
+    entrypoint: Charm_2024validation.options.hlt2.hlt2_{{id}}:alg_config
+    extra_options:
+      conddb_tag: sim10-2024.Q1.2-v1.1-md100
+      dddb_tag: '{{dddb}}'
+      input_raw_format: 0.5
+      input_type: "ROOT"
+      output_type: "ROOT"
+      simulation: True
+      data_type: "Upgrade"
+      output_manifest_file: "HLT2.tck.json"
+      scheduler_legacy_mode: False
+
+MC_{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}:
+  application: "DaVinci/v64r7@x86_64_v3-el9-gcc13+detdesc-opt+g"
+  input:
+    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2
+  output: DVTUPLE.ROOT
+  options:
+    entrypoint: Charm_2024validation.main_{{id}}:main
+    extra_options:
+      conddb_tag: sim10-2024.Q1.2-v1.1-md100
+      dddb_tag: '{{dddb}}'
+      input_raw_format: 0.5
+      input_type: ROOT
+      simulation: True
+      data_type: "Upgrade"
+      event_store: HiveWhiteBoard
+      input_process: "Hlt2"
+      input_manifest_file: "HLT2.tck.json"
+      write_decoding_keys_to_git: false
+      
+{%- endfor %}
+{%- endfor %}
diff --git a/Charm_2024validation/info_MC_4localtest.yaml b/Charm_2024validation/info_MC_4localtest.yaml
new file mode 100644
index 0000000000..3d18e13274
--- /dev/null
+++ b/Charm_2024validation/info_MC_4localtest.yaml
@@ -0,0 +1,122 @@
+defaults:
+  inform:
+    - serena.maccolini@cern.ch
+  wg: Charm
+
+{%- set conditions = [
+  "MagDown",
+]%}
+
+{%- set evttype_subsample_nutext_nu_dir1_dir2_dddb_geometry = [
+( '27163102', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163101', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163100', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23103042', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23263022', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '21263012', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163471', 'd0_to_hhpi0', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165903', 'd0_to_kshh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165071', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27265008', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27265009', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165072', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23103111', 'd_to_ksh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '21103101', 'd_to_ksh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23173003', 'rare_charm', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163102', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163101', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163100', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23103042', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23263022', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '21263012', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163471', 'd0_to_hhpi0', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165903', 'd0_to_kshh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165071', 'd0_to_hhhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163102', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163101', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163100', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23103042', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23263022', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '21263012', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163471', 'd0_to_hhpi0', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165903', 'd0_to_kshh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165071', 'd0_to_hhhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163102', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163101', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163100', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23103042', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23263022', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '21263012', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163471', 'd0_to_hhpi0', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165903', 'd0_to_kshh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165071', 'd0_to_hhhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165901', 'd0_to_ksks', '7p6', '7.6', 'Dev', '', 'dddb-20231017', 'run3/trunk'),
+]%}
+
+
+
+{%- for evttype, id, nutext, nu, dir1, dir2, dddb, geometry in evttype_subsample_nutext_nu_dir1_dir2_dddb_geometry %}
+
+{% for polarity in conditions %}
+
+{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1:
+  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
+  input:
+    bk_query: "/MC/{{dir1}}/Beam6800GeV-expected-2024{{dir2}}-{{polarity}}-Nu{{nu}}-25ns-Pythia8/Sim10c/{{evttype}}/DIGI"
+    n_test_lfns: 3
+  output: HLT1.DST
+  options:
+    entrypoint: Charm_2024validation.options.hlt1:alg_config
+    extra_options:
+      input_raw_format: 0.5
+      conddb_tag: sim-20231017-vc-md100
+      dddb_tag: '{{dddb}}'
+      input_type: ROOT
+      output_type: ROOT
+      simulation: True
+      data_type: "Upgrade"
+      scheduler_legacy_mode: False
+      geometry_version: "{{geometry}}"
+      evt_max: 1000
+
+{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2:
+  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
+  input:
+    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1
+  output: HLT2.DST
+  options:
+    entrypoint: Charm_2024validation.options.hlt2.hlt2_{{id}}:alg_config
+    extra_options:
+      conddb_tag: sim-20231017-vc-md100
+      dddb_tag: '{{dddb}}'
+      input_raw_format: 0.5
+      input_type: "ROOT"
+      output_type: "ROOT"
+      simulation: True
+      data_type: "Upgrade"
+      output_manifest_file: "HLT2.tck.json"
+      scheduler_legacy_mode: False
+      geometry_version: "{{geometry}}"
+
+MC_{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}:
+  application: "DaVinci/v64r3@x86_64_v3-el9-gcc13+detdesc-opt+g"
+  input:
+    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2
+  output: DVTUPLE.ROOT
+  options:
+    entrypoint: Charm_2024validation.main_{{id}}:main
+    extra_options:
+      conddb_tag: sim-20231017-vc-md100
+      dddb_tag: '{{dddb}}'
+      input_raw_format: 0.5
+      input_type: ROOT
+      simulation: True
+      data_type: "Upgrade"
+      event_store: HiveWhiteBoard
+      geometry_version: "{{geometry}}"
+      input_process: "Hlt2"
+      input_manifest_file: "HLT2.tck.json"
+      write_decoding_keys_to_git: false
+
+{%- endfor %}
+{%- endfor %}
diff --git a/Charm_2024validation/info_MC_noUT.yaml b/Charm_2024validation/info_MC_noUT.yaml
new file mode 100644
index 0000000000..52df9e4e96
--- /dev/null
+++ b/Charm_2024validation/info_MC_noUT.yaml
@@ -0,0 +1,121 @@
+defaults:
+  inform:
+    - serena.maccolini@cern.ch
+  wg: Charm
+
+{%- set conditions = [
+  "MagDown",
+]%}
+
+{%- set evttype_subsample_nutext_nu_dir1_dir2_dddb_geometry = [
+( '27163102', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163101', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163100', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23103042', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23263022', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '21263012', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163471', 'd0_to_hhpi0', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165903', 'd0_to_kshh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165071', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27265008', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27265009', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165072', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23103111', 'd_to_ksh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '21103101', 'd_to_ksh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23173003', 'rare_charm', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163102', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163101', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163100', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23103042', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23263022', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '21263012', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163471', 'd0_to_hhpi0', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165903', 'd0_to_kshh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165071', 'd0_to_hhhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163102', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163101', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163100', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23103042', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23263022', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '21263012', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163471', 'd0_to_hhpi0', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165903', 'd0_to_kshh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165071', 'd0_to_hhhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163102', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163101', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163100', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23103042', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '23263022', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '21263012', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27163471', 'd0_to_hhpi0', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165903', 'd0_to_kshh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165071', 'd0_to_hhhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
+( '27165901', 'd0_to_ksks', '7p6', '7.6', 'Dev', '', 'dddb-20231017', 'run3/trunk'),
+]%}
+
+
+
+{%- for evttype, id, nutext, nu, dir1, dir2, dddb, geometry in evttype_subsample_nutext_nu_dir1_dir2_dddb_geometry %}
+
+{% for polarity in conditions %}
+
+{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1:
+  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
+  input:
+    bk_query: "/MC/{{dir1}}/Beam6800GeV-expected-2024{{dir2}}-{{polarity}}-Nu{{nu}}-25ns-Pythia8/Sim10c/{{evttype}}/DIGI"
+    n_test_lfns: 3
+  output: HLT1.DST
+  options:
+    entrypoint: Charm_2024validation.options.hlt1:alg_config
+    extra_options:
+      input_raw_format: 0.5
+      conddb_tag: sim-20231017-vc-md100
+      dddb_tag: '{{dddb}}'
+      input_type: ROOT
+      output_type: ROOT
+      simulation: True
+      data_type: "Upgrade"
+      scheduler_legacy_mode: False
+      geometry_version: "{{geometry}}"
+      evt_max: -1
+
+{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2:
+  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
+  input:
+    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1
+  output: HLT2.DST
+  options:
+    entrypoint: Charm_2024validation.options.hlt2.hlt2_{{id}}:alg_config
+    extra_options:
+      conddb_tag: sim-20231017-vc-md100
+      dddb_tag: '{{dddb}}'
+      input_raw_format: 0.5
+      input_type: "ROOT"
+      output_type: "ROOT"
+      simulation: True
+      data_type: "Upgrade"
+      output_manifest_file: "HLT2.tck.json"
+      scheduler_legacy_mode: False
+      geometry_version: "{{geometry}}"
+
+MC_{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}:
+  application: "DaVinci/v64r3@x86_64_v3-el9-gcc13+detdesc-opt+g"
+  input:
+    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2
+  output: DVTUPLE.ROOT
+  options:
+    entrypoint: Charm_2024validation.main_{{id}}:main
+    extra_options:
+      conddb_tag: sim-20231017-vc-md100
+      dddb_tag: '{{dddb}}'
+      input_raw_format: 0.5
+      input_type: ROOT
+      simulation: True
+      data_type: "Upgrade"
+      event_store: HiveWhiteBoard
+      geometry_version: "{{geometry}}"
+      input_process: "Hlt2"
+      input_manifest_file: "HLT2.tck.json"
+
+{%- endfor %}
+{%- endfor %}
diff --git a/Charm_2024validation/info_data.yaml b/Charm_2024validation/info_data.yaml
new file mode 100644
index 0000000000..cf3b7dcdf9
--- /dev/null
+++ b/Charm_2024validation/info_data.yaml
@@ -0,0 +1,53 @@
+defaults:
+  inform:
+    - serena.maccolini@cern.ch
+  wg: Charm
+
+{%- set conditions = [
+  "MagDown",
+]%}
+
+
+
+{%- set subsamples = [
+  "d0_to_hh",
+  "d_to_hhh",
+  "d_to_ksh",
+  "d0_to_hhpi0",
+  "d0_to_kshh",
+  "d0_to_ksks",
+  "d0_to_hhhh",
+  "rare_charm",
+  "detection_asymmetry",
+  "dst_to_dee",
+]%}
+
+{% for id in subsamples %}
+{% for polarity in conditions %}
+
+{{id}}_2024_{{ polarity }}:
+  application: "DaVinci/v64r7"
+  input:
+    bk_query: "/LHCb/Collision24/Beam6800GeV-VeloClosed-{{polarity}}/Real Data/Sprucing24c2/94000000/CHARM.DST"
+
+    dq_flags:
+      - UNCHECKED
+      - OK
+    keep_running: true
+  output: DVTUPLE_{{id}}.ROOT
+  options:
+    entrypoint: Charm_2024validation.main_{{id}}:main
+    extra_options:
+      input_raw_format: 0.5
+      input_type: ROOT
+      simulation: False
+      data_type: "Upgrade"
+      event_store: HiveWhiteBoard
+      geometry_version: run3/2024.Q1.2-v00.00
+      conditions_version: master
+      input_process: "TurboPass"
+      input_stream: "charm"
+      evt_max: -1
+
+{%- endfor %}
+{%- endfor %}
diff --git a/Charm_2024validation/info_data_noUT.yaml b/Charm_2024validation/info_data_noUT.yaml
new file mode 100644
index 0000000000..8c750c72d0
--- /dev/null
+++ b/Charm_2024validation/info_data_noUT.yaml
@@ -0,0 +1,50 @@
+defaults:
+  inform:
+    - serena.maccolini@cern.ch
+  wg: Charm
+
+{%- set conditions = [
+  "MagDown",
+]%}
+
+
+
+{%- set subsamples = [
+  "d0_to_hh",
+  "d_to_hhh",
+  "d_to_ksh",
+  "d0_to_hhpi0",
+  "d0_to_kshh",
+  "d0_to_ksks",
+  "d0_to_hhhh",
+  "rare_charm",
+  "detection_asymmetry",
+]%}
+
+{% for id in subsamples %}
+{% for polarity in conditions %}
+
+{{id}}_2024_{{ polarity }}:
+  application: "DaVinci/v64r5"
+  input:
+    bk_query: "/LHCb/Collision24/Beam6800GeV-VeloClosed-{{polarity}}-Excl-UT/Real Data/Sprucing24c1/94000000/CHARM.DST"
+    dq_flags:
+      - UNCHECKED
+      - OK
+    keep_running: true
+  output: DVTUPLE_{{id}}.ROOT
+  options:
+    entrypoint: Charm_2024validation.main_{{id}}:main
+    extra_options:
+      input_raw_format: 0.5
+      input_type: ROOT
+      simulation: False
+      data_type: "Upgrade"
+      event_store: HiveWhiteBoard
+      geometry_version: run3/2024.Q1.2-v00.00
+      conditions_version: master
+      input_process: "TurboPass"
+      input_stream: "charm"
+
+{%- endfor %}
+{%- endfor %}
diff --git a/Charm_2024validation/main_d0_to_hh.py b/Charm_2024validation/main_d0_to_hh.py
new file mode 100644
index 0000000000..12eea15463
--- /dev/null
+++ b/Charm_2024validation/main_d0_to_hh.py
@@ -0,0 +1,58 @@
+###############################################################################
+# (c) Copyright 2021-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 .options.d0_to_hh import *
+from .options.d0_to_hh_MC import *
+
+from DaVinci import Options, make_config
+from PyConf.reading import get_pvs, get_rec_summary
+
+def main(options: Options):
+
+    # get ODIN and DecReports location
+    pvs = get_pvs()
+    rec_summary = get_rec_summary()
+
+    tuples = {
+        #D02hh
+        "D02Kpi" : maketuple_D02Kpi(options, pvs, rec_summary),
+        "D02KK" : maketuple_D02KK(options, pvs, rec_summary),
+        "D02pipi" : maketuple_D02pipi(options, pvs, rec_summary),
+        #Dst2D0pi_D02hh
+        "Dst2D0pi_D02Kpi_RS" : maketuple_Dst2D0pi_D02Kpi_RS(options, pvs, rec_summary),
+        "Dst2D0pi_D02Kpi_WS" : maketuple_Dst2D0pi_D02Kpi_WS(options, pvs, rec_summary),
+        "Dst2D0pi_D02KK" : maketuple_Dst2D0pi_D02KK(options, pvs, rec_summary),
+        "Dst2D0pi_D02pipi" : maketuple_Dst2D0pi_D02pipi(options, pvs, rec_summary),
+
+        ##LowBias
+        #D02hh
+        "D02Kpi_LowBias" : maketuple_D02Kpi_LowBias(options, pvs, rec_summary),
+        "D02KK_LowBias" : maketuple_D02KK_LowBias(options, pvs, rec_summary),
+        "D02pipi_LowBias" : maketuple_D02pipi_LowBias(options, pvs, rec_summary),
+        #Dst2D0pi_D02hh
+        "Dst2D0pi_D02Kpi_RS_LowBias" : maketuple_Dst2D0pi_D02Kpi_RS_LowBias(options, pvs, rec_summary),
+        "Dst2D0pi_D02Kpi_WS_LowBias" : maketuple_Dst2D0pi_D02Kpi_WS_LowBias(options, pvs, rec_summary),
+        "Dst2D0pi_D02KK_LowBias" : maketuple_Dst2D0pi_D02KK_LowBias(options, pvs, rec_summary),
+        "Dst2D0pi_D02pipi_LowBias" : maketuple_Dst2D0pi_D02pipi_LowBias(options, pvs, rec_summary),
+    }
+
+    MCtuples = {
+        "MC_Dst2D0pi_D02Kpi_RS" : maketuple_MC_Dst2D0pi_D02Kpi_RS(options, pvs, rec_summary),
+        "MC_Dst2D0pi_D02KK_RS" : maketuple_MC_Dst2D0pi_D02KK(options, pvs, rec_summary),
+        "MC_Dst2D0pi_D02pipi" : maketuple_MC_Dst2D0pi_D02pipi(options, pvs, rec_summary),
+    }
+
+    if options.simulation:
+        tuples = tuples | MCtuples
+
+    config = make_config(options, tuples)
+
+    return config
diff --git a/Charm_2024validation/main_d0_to_hhhh.py b/Charm_2024validation/main_d0_to_hhhh.py
new file mode 100644
index 0000000000..5fb555ccfd
--- /dev/null
+++ b/Charm_2024validation/main_d0_to_hhhh.py
@@ -0,0 +1,40 @@
+###############################################################################
+# (c) Copyright 2021-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 .options.d0_to_hhhh import *
+from .options.d0_to_hhhh_MC import *
+
+from DaVinci import Options, make_config
+from PyConf.reading import get_pvs, get_rec_summary
+
+def main(options: Options):
+        
+    # get ODIN and DecReports location
+    pvs = get_pvs()
+    rec_summary = get_rec_summary()
+
+    tuples = {
+        "DstToD0pi_D0ToKKPiPi" : maketuple_DstToD0pi_D0ToKKPiPi(options, pvs, rec_summary),
+        "DstToD0pi_D0ToKPiPiPi" : maketuple_DstToD0pi_D0ToKPiPiPi(options, pvs, rec_summary),
+        "DstToD0pi_D0ToPiKPiPi" : maketuple_DstToD0pi_D0ToPiKPiPi(options, pvs, rec_summary),
+        "DstToD0pi_D0ToPiPiPiPi" : maketuple_DstToD0pi_D0ToPiPiPiPi(options, pvs, rec_summary),
+    }
+
+    MCtuples = {
+        "MC_DstToD0pi_D0ToKPiPiPi" : maketuple_MC_DstToD0pi_D0ToKPiPiPi(options, pvs, rec_summary),
+    }
+    
+    if options.simulation:
+        tuples = tuples | MCtuples
+        
+    config = make_config(options, tuples)
+
+    return config
diff --git a/Charm_2024validation/main_d0_to_hhpi0.py b/Charm_2024validation/main_d0_to_hhpi0.py
new file mode 100644
index 0000000000..ac59dc71d9
--- /dev/null
+++ b/Charm_2024validation/main_d0_to_hhpi0.py
@@ -0,0 +1,43 @@
+###############################################################################
+# (c) Copyright 2021-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 .options.d0_to_hhpi0 import *
+from .options.d0_to_hhpi0_MC import *
+
+from DaVinci import Options, make_config
+from PyConf.reading import get_pvs, get_rec_summary
+
+def main(options: Options):
+        
+    # get ODIN and DecReports location
+    pvs = get_pvs()
+    rec_summary = get_rec_summary()
+
+    tuples = {
+        #Dst2D0pi_D02hhpi0
+        "Dst2D0pi_D02Kpipi0_M" : maketuple_Dst2D0pi_D02Kpipi0_M(options, pvs, rec_summary),
+        "Dst2D0pi_D02KKpi0_M" : maketuple_Dst2D0pi_D02KKpi0_M(options, pvs, rec_summary),
+        "Dst2D0pi_D02pipipi0_M" : maketuple_Dst2D0pi_D02pipipi0_M(options, pvs, rec_summary),
+        "Dst2D0pi_D02Kpipi0_R" : maketuple_Dst2D0pi_D02Kpipi0_R(options, pvs, rec_summary),
+        "Dst2D0pi_D02KKpi0_R" : maketuple_Dst2D0pi_D02KKpi0_R(options, pvs, rec_summary),
+        "Dst2D0pi_D02pipipi0_R" : maketuple_Dst2D0pi_D02pipipi0_R(options, pvs, rec_summary),
+    }
+
+    MCtuples = {
+        "MC_Dst2D0pi_D02Kpipi0" : maketuple_MC_Dst2D0pi_D02Kpipi0(options, pvs, rec_summary),
+    }
+    
+    if options.simulation:
+        tuples = tuples | MCtuples
+        
+    config = make_config(options, tuples)
+
+    return config
diff --git a/Charm_2024validation/main_d0_to_kshh.py b/Charm_2024validation/main_d0_to_kshh.py
new file mode 100644
index 0000000000..f9cfbd58e2
--- /dev/null
+++ b/Charm_2024validation/main_d0_to_kshh.py
@@ -0,0 +1,75 @@
+###############################################################################
+# (c) Copyright 2021-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 .options.d0_to_kshh import *
+from .options.d0_to_kshh_MC import *
+
+from DaVinci import Options, make_config
+from PyConf.reading import get_pvs, get_rec_summary
+
+def main(options: Options):
+
+    # get ODIN and DecReports location
+    pvs = get_pvs()
+    rec_summary = get_rec_summary()
+
+    tuples = {
+        #D02kshh
+        "D0ToKsPimPip_LL" : maketuple_D0ToKsPimPip_LL(options, pvs, rec_summary),
+        "D0ToKsPimPip_DD" : maketuple_D0ToKsPimPip_DD(options, pvs, rec_summary),
+        "D0ToKsKmPip_LL" : maketuple_D0ToKsKmPip_LL(options, pvs, rec_summary),
+        "D0ToKsKmPip_DD" : maketuple_D0ToKsKmPip_DD(options, pvs, rec_summary),
+        "D0ToKsKpPim_LL" : maketuple_D0ToKsKmPip_LL(options, pvs, rec_summary),
+        "D0ToKsKpPim_DD" : maketuple_D0ToKsKmPip_DD(options, pvs, rec_summary),
+        "D0ToKsKmKp_LL" : maketuple_D0ToKsKmKp_LL(options, pvs, rec_summary),
+        "D0ToKsKmKp_DD" : maketuple_D0ToKsKmKp_DD(options, pvs, rec_summary),
+        #Dst2D0pi_D02kshh
+        "DstpToD0Pip_D0ToKsPimPip_LL" : maketuple_DstpToD0Pip_D0ToKsPimPip_LL(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsPimPip_DD" : maketuple_DstpToD0Pip_D0ToKsPimPip_DD(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsKmPip_LL" : maketuple_DstpToD0Pip_D0ToKsKmPip_LL(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsKmPip_DD" : maketuple_DstpToD0Pip_D0ToKsKmPip_DD(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsKpPim_LL" : maketuple_DstpToD0Pip_D0ToKsKmPip_LL(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsKpPim_DD" : maketuple_DstpToD0Pip_D0ToKsKmPip_DD(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsKmKp_LL" : maketuple_DstpToD0Pip_D0ToKsKmKp_LL(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsKmKp_DD" : maketuple_DstpToD0Pip_D0ToKsKmKp_DD(options, pvs, rec_summary),
+
+        ##LowBias
+        #D02kshh
+        "D0ToKsPimPip_LL_LowBias" : maketuple_D0ToKsPimPip_LL_LowBias(options, pvs, rec_summary),
+        "D0ToKsPimPip_DD_LowBias" : maketuple_D0ToKsPimPip_DD_LowBias(options, pvs, rec_summary),
+        "D0ToKsKmPip_LL_LowBias" : maketuple_D0ToKsKmPip_LL_LowBias(options, pvs, rec_summary),
+        "D0ToKsKmPip_DD_LowBias" : maketuple_D0ToKsKmPip_DD_LowBias(options, pvs, rec_summary),
+        "D0ToKsKpPim_LL_LowBias" : maketuple_D0ToKsKmPip_LL_LowBias(options, pvs, rec_summary),
+        "D0ToKsKpPim_DD_LowBias" : maketuple_D0ToKsKmPip_DD_LowBias(options, pvs, rec_summary),
+        "D0ToKsKmKp_LL_LowBias" : maketuple_D0ToKsKmKp_LL_LowBias(options, pvs, rec_summary),
+        "D0ToKsKmKp_DD_LowBias" : maketuple_D0ToKsKmKp_DD_LowBias(options, pvs, rec_summary),
+        #Dst2D0pi_D02kshh
+        "DstpToD0Pip_D0ToKsPimPip_LL_LowBias" : maketuple_DstpToD0Pip_D0ToKsPimPip_LL_LowBias(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsPimPip_DD_LowBias" : maketuple_DstpToD0Pip_D0ToKsPimPip_DD_LowBias(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsKmPip_LL_LowBias" : maketuple_DstpToD0Pip_D0ToKsKmPip_LL_LowBias(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsKmPip_DD_LowBias" : maketuple_DstpToD0Pip_D0ToKsKmPip_DD_LowBias(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsKpPim_LL_LowBias" : maketuple_DstpToD0Pip_D0ToKsKmPip_LL_LowBias(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsKpPim_DD_LowBias" : maketuple_DstpToD0Pip_D0ToKsKmPip_DD_LowBias(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsKmKp_LL_LowBias" : maketuple_DstpToD0Pip_D0ToKsKmKp_LL_LowBias(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsKmKp_DD_LowBias" : maketuple_DstpToD0Pip_D0ToKsKmKp_DD_LowBias(options, pvs, rec_summary),
+        "DstpToD0Pip_D0ToKsPimPip_DD_NoBias" : maketuple_DstpToD0Pip_D0ToKsPimPip_LL_NoBias(options, pvs, rec_summary),
+    }
+
+    MCtuples = {
+        "MC_DstpToD0Pip_D0ToKsPimPip" : maketuple_MC_DstpToD0Pip_D0ToKsPimPip(options, pvs, rec_summary),
+    }
+
+    if options.simulation:
+        tuples = tuples | MCtuples
+
+    config = make_config(options, tuples)
+
+    return config
diff --git a/Charm_2024validation/main_d0_to_ksks.py b/Charm_2024validation/main_d0_to_ksks.py
new file mode 100644
index 0000000000..cb69552d78
--- /dev/null
+++ b/Charm_2024validation/main_d0_to_ksks.py
@@ -0,0 +1,59 @@
+###############################################################################
+# (c) Copyright 2021-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.                                       #
+###############################################################################
+import Functors as F
+from Functors.math import log
+from DaVinci import Options, make_config
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from FunTuple import FunctorCollection
+import FunTuple.functorcollections as FC
+from FunTuple import FunTuple_Particles as Funtuple
+
+#D02KSKS
+from .options.d0_to_ksks import *
+from .options.d0_to_ksks_MC import *
+
+from PyConf.reading import get_pvs, get_rec_summary
+
+def main(options: Options):
+
+    # get ODIN and DecReports location
+    pvs = get_pvs()
+    rec_summary = get_rec_summary()
+
+    tuples = {
+        #D02KSKS
+        "Dst2D0pi_D02KSKS_LLLL" : maketuple_Dst2D0pi_D02KSKS_LLLL(options, pvs, rec_summary),
+        "Dst2D0pi_D02KSKS_LLLL_Tight" : maketuple_Dst2D0pi_D02KSKS_LLLL_Tight(options, pvs, rec_summary),
+        "Dst2D0pi_D02KSKS_LLDD" : maketuple_Dst2D0pi_D02KSKS_LLDD(options, pvs, rec_summary),
+        "Dst2D0pi_D02KSKS_LLDD_Tight" : maketuple_Dst2D0pi_D02KSKS_LLDD_Tight(options, pvs, rec_summary),
+        "Dst2D0pi_D02KSKS_DDDD" : maketuple_Dst2D0pi_D02KSKS_DDDD(options, pvs, rec_summary),
+        "Dst2D0pi_D02KSKS_DDDD_Tight" : maketuple_Dst2D0pi_D02KSKS_DDDD_Tight(options, pvs, rec_summary),
+        "Dst2D0pi_D02KSKS_ULLL" : maketuple_Dst2D0pi_D02KSKS_ULLL(options, pvs, rec_summary),
+        "Dst2D0pi_D02KSKS_ULLL_Tight" : maketuple_Dst2D0pi_D02KSKS_ULLL_Tight(options, pvs, rec_summary),
+        "Dst2D0pi_D02KSKS_ULDD" : maketuple_Dst2D0pi_D02KSKS_ULDD(options, pvs, rec_summary),
+        "Dst2D0pi_D02KSKS_ULDD_Tight" : maketuple_Dst2D0pi_D02KSKS_ULDD_Tight(options, pvs, rec_summary),
+        "Dst2D0pi_D02KSKS_LLLD" : maketuple_Dst2D0pi_D02KSKS_LLLD(options, pvs, rec_summary),
+        "Dst2D0pi_D02KSKS_LLLD_Tight" : maketuple_Dst2D0pi_D02KSKS_LLLD_Tight(options, pvs, rec_summary),
+        "Dst2D0pi_D02KSKS_DDLD" : maketuple_Dst2D0pi_D02KSKS_DDLD(options, pvs, rec_summary),
+        "Dst2D0pi_D02KSKS_DDLD_Tight" : maketuple_Dst2D0pi_D02KSKS_DDLD_Tight(options, pvs, rec_summary),
+    }
+
+    MCtuples = {
+        "MC_Dst2D0pi_D02KSKS_LLLL" : maketuple_MC_Dst2D0pi_D02KSKS_LLLL(options, pvs, rec_summary)
+    }
+
+    if options.simulation:
+        tuples = tuples | MCtuples
+        
+    config = make_config(options, tuples)
+
+    return config
diff --git a/Charm_2024validation/main_d_to_hhh.py b/Charm_2024validation/main_d_to_hhh.py
new file mode 100644
index 0000000000..516e32b119
--- /dev/null
+++ b/Charm_2024validation/main_d_to_hhh.py
@@ -0,0 +1,63 @@
+###############################################################################
+# (c) Copyright 2021-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 .options.d_to_hhh import *
+from .options.d_to_hhh_MC import *
+from .options.detection_asymmetry import *
+
+from DaVinci import Options, make_config
+from PyConf.reading import get_pvs, get_rec_summary
+
+def main(options: Options):
+
+    # get ODIN and DecReports location
+    pvs = get_pvs()
+    rec_summary = get_rec_summary()
+
+    tuples = {
+        #D2hhh
+        "D2Kpipi" : maketuple_D2Kpipi(options, pvs, rec_summary),
+        "D2Kpipi_NoCuts" : maketuple_D2Kpipi(options, pvs, rec_summary,True),
+        #"D2Kpipi_Kpi" : maketuple_D2Kpipi_Kpi(options, pvs, rec_summary), #subcomb of 2 out of 3 daughters
+        "Ds2KKpi" : maketuple_Ds2KKpi(options, pvs, rec_summary),
+        "Ds2KKpi_NoCuts" : maketuple_Ds2KKpi(options, pvs, rec_summary,True),
+        "D2pipipi" : maketuple_D2pipipi(options, pvs, rec_summary),
+        "D2pipipi_NoCuts" : maketuple_D2pipipi(options, pvs, rec_summary,True),
+        "D2pipiK" : maketuple_D2pipiK(options, pvs, rec_summary),
+        "D2pipiK_NoCuts" : maketuple_D2pipiK(options, pvs, rec_summary,True),
+        "D2KKK" : maketuple_D2KKK(options, pvs, rec_summary),
+        "D2KKK_NoCuts" : maketuple_D2KKK(options, pvs, rec_summary,True),
+        "D2piKK" : maketuple_D2piKK(options, pvs, rec_summary),
+        "D2piKK_NoCuts" : maketuple_D2piKK(options, pvs, rec_summary,True),
+        "B02Dpi_D2KKpi" : maketuple_B02Dpi_D2KKpi(options, pvs, rec_summary),
+        "B02Dpi_D2pipipi" : maketuple_B02Dpi_D2pipipi(options, pvs, rec_summary),
+        "Bs02Dspi_Ds2KKpi" : maketuple_Bs02Dspi_Ds2KKpi(options, pvs, rec_summary),
+        "Bs02Dspi_Ds2pipipi" : maketuple_Bs02Dspi_Ds2pipipi(options, pvs, rec_summary),
+        #ADet
+        "D2Kpipi_ADet" : maketuple_D2Kpipi_ADet(options, pvs, rec_summary),
+        "D2pipipi_ADet" : maketuple_D2pipipi_ADet(options, pvs, rec_summary),
+        "Ds2KKpi_ADet" : maketuple_Ds2KKpi_ADet(options, pvs, rec_summary),
+
+
+    }
+
+    MCtuples = {
+        "MC_D2Kpipi" : maketuple_MC_D2Kpipi(options, pvs, rec_summary),
+        "MC_Ds2KKpi" : maketuple_MC_Ds2KKpi(options, pvs, rec_summary)
+        "MC_Ds2KKK" : maketuple_MC_Ds2KKK(options, pvs, rec_summary)
+    }
+
+    if options.simulation:
+        tuples = tuples | MCtuples
+
+    config = make_config(options, tuples)
+
+    return config
diff --git a/Charm_2024validation/main_d_to_ksh.py b/Charm_2024validation/main_d_to_ksh.py
new file mode 100644
index 0000000000..00ddc66093
--- /dev/null
+++ b/Charm_2024validation/main_d_to_ksh.py
@@ -0,0 +1,48 @@
+###############################################################################
+# (c) Copyright 2021-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 .options.d_to_ksh import *
+from .options.d_to_ksh_MC import *
+from .options.detection_asymmetry import *
+
+from DaVinci import Options, make_config
+from PyConf.reading import get_pvs, get_rec_summary
+
+def main(options: Options):
+
+    # get ODIN and DecReports location
+    pvs = get_pvs()
+    rec_summary = get_rec_summary()
+
+    tuples = {
+        #D2KSh
+        "D2KSpi_LL" : maketuple_D2KSpi_LL(options, pvs, rec_summary),
+        "D2KSK_LL" : maketuple_D2KSK_LL(options, pvs, rec_summary),
+        "D2KSpi_LD" : maketuple_D2KSpi_LD(options, pvs, rec_summary),
+        "D2KSK_LD" : maketuple_D2KSK_LD(options, pvs, rec_summary),
+        "D2KSpi_DD" : maketuple_D2KSpi_DD(options, pvs, rec_summary),
+        "D2KSK_DD" : maketuple_D2KSK_DD(options, pvs, rec_summary),
+        #ADet
+        "D2KSK_LL_ADet" : maketuple_D2KSK_LL_ADet(options, pvs, rec_summary),
+        "D2KSpi_LL_ADet" : maketuple_D2KSpi_LL_ADet(options, pvs, rec_summary),
+    }
+
+    MCtuples = {
+        "MC_D2KSK" : maketuple_MC_D2KSK(options, pvs, rec_summary),
+        "MC_D2KSpi" : maketuple_MC_D2KSpi(options, pvs, rec_summary),
+    }
+
+    if options.simulation:
+        tuples = tuples | MCtuples
+        
+    config = make_config(options, tuples)
+
+    return config
diff --git a/Charm_2024validation/main_detection_asymmetry.py b/Charm_2024validation/main_detection_asymmetry.py
new file mode 100644
index 0000000000..1ededecf77
--- /dev/null
+++ b/Charm_2024validation/main_detection_asymmetry.py
@@ -0,0 +1,31 @@
+###############################################################################
+# (c) Copyright 2021-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 .options.detection_asymmetry import *
+
+from DaVinci import Options, make_config
+from PyConf.reading import get_pvs, get_rec_summary
+
+def main(options: Options):
+        
+    # get ODIN and DecReports location
+    pvs = get_pvs()
+    rec_summary = get_rec_summary()
+
+    tuples = {
+        #ADet
+        "Lc2KSp_LL_ADet" : maketuple_Lc2KSp_LL_ADet(options, pvs, rec_summary),
+        "Lc2pKpi_ADet" : maketuple_Lc2pKpi_ADet(options, pvs, rec_summary),
+    }
+        
+    config = make_config(options, tuples)
+
+    return config
diff --git a/Charm_2024validation/main_dst_to_dee.py b/Charm_2024validation/main_dst_to_dee.py
new file mode 100644
index 0000000000..3084abe4e7
--- /dev/null
+++ b/Charm_2024validation/main_dst_to_dee.py
@@ -0,0 +1,42 @@
+###############################################################################
+# (c) Copyright 2021-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 .options.dst_to_dee import *
+
+from DaVinci import Options, make_config
+from PyConf.reading import get_pvs, get_rec_summary
+
+def main(options: Options):
+
+    # get ODIN and DecReports location
+    pvs = get_pvs()
+    rec_summary = get_rec_summary()
+
+    tuples = {
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS':             make_Dst0ToD0EmEp_D0ToKmPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS", pvs, rec_summary, 'dst_kpi_os'),
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS':             make_Dst0ToD0EmEp_D0ToKmPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS", pvs, rec_summary, 'dst_kpi_ss'),
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS_MVA':         make_Dst0ToD0EmEp_D0ToKmPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS_MVA", pvs, rec_summary, 'dst_kpi_os'),
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS_MVA':         make_Dst0ToD0EmEp_D0ToKmPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS_MVA", pvs, rec_summary, 'dst_kpi_ss'),
+
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS':       make_Dst0ToD0EmEp_D0ToKmPimPipPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS", pvs, rec_summary,'dst_k3pi_os' ),
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS':       make_Dst0ToD0EmEp_D0ToKmPimPipPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS", pvs, rec_summary, 'dst_k3pi_ss'),
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS_MVA':   make_Dst0ToD0EmEp_D0ToKmPimPipPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS_MVA", pvs, rec_summary, 'dst_k3pi_os'),
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS_MVA':   make_Dst0ToD0EmEp_D0ToKmPimPipPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS_MVA", pvs, rec_summary, 'dst_k3pi_ss'),
+
+    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS':     make_DstpToDpDspEmEp_DpDspToKmKpPip_tuple(options, "Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS", pvs, rec_summary, "dsstp_2kpi_os"),
+    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS':     make_DstpToDpDspEmEp_DpDspToKmKpPip_tuple(options, "Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS", pvs, rec_summary, "dsstp_2kpi_ss"),
+    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS_MVA': make_DstpToDpDspEmEp_DpDspToKmKpPip_tuple(options, "Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS_MVA", pvs, rec_summary, "dsstp_2kpi_os"),
+    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS_MVA': make_DstpToDpDspEmEp_DpDspToKmKpPip_tuple(options, "Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS_MVA", pvs, rec_summary, "dsstp_2kpi_ss"),
+    }
+
+    config = make_config(options, tuples)
+
+    return config
\ No newline at end of file
diff --git a/Charm_2024validation/main_rare_charm.py b/Charm_2024validation/main_rare_charm.py
new file mode 100644
index 0000000000..d38574262b
--- /dev/null
+++ b/Charm_2024validation/main_rare_charm.py
@@ -0,0 +1,41 @@
+###############################################################################
+# (c) Copyright 2021-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 .options.rare_charm import *
+#from .options.rare_charm_MC import *
+
+from DaVinci import Options, make_config
+from PyConf.reading import get_pvs, get_rec_summary
+
+def main(options: Options):
+        
+    # get ODIN and DecReports location
+    pvs = get_pvs()
+    rec_summary = get_rec_summary()
+
+    tuples = {
+        "D2pimumu" : maketuple_D2pimumu(options, pvs, rec_summary),
+        "D2pimumu_WS" : maketuple_D2pimumu_WS(options, pvs, rec_summary),
+        "CharmRD_D2pipipi" : maketuple_D2pipipi(options, pvs, rec_summary),
+        "D2piee" : maketuple_D2piee(options, pvs, rec_summary),
+        "Lc2pmumu" : maketuple_Lc2pmumu(options, pvs, rec_summary),
+        "Dst2D0pi_D02Kpimumu_RS" : maketuple_Dst2D0pi_D02Kpimumu_RS(options, pvs, rec_summary),
+    }
+
+    MCtuples = {
+    }
+    
+    if options.simulation:
+        tuples = tuples | MCtuples
+        
+    config = make_config(options, tuples)
+
+    return config
diff --git a/Charm_2024validation/options/d0_to_hh.py b/Charm_2024validation/options/d0_to_hh.py
new file mode 100644
index 0000000000..80a3cdcec2
--- /dev/null
+++ b/Charm_2024validation/options/d0_to_hh.py
@@ -0,0 +1,432 @@
+from .tupling import (
+    make_composite_variables,
+    make_basic_variables,
+    make_hlt2_event_variables,
+    make_DeltaM_variable,
+    make_composite_dtf_variables,
+    make_basic_dtf_variables,
+)
+
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from FunTuple import FunTuple_Particles as Funtuple
+
+
+def make_dtf_variables(options, pvs, input_data, ptype):
+
+    if ptype not in ["basic", "composite"]:
+        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
+
+    from DecayTreeFitter import DecayTreeFitter
+    
+    DTF = DecayTreeFitter(
+        name=f'DTF_{{hash}}',
+        input_particles=input_data)
+
+    DTFvtx = DecayTreeFitter(
+        name=f'DTFvtx_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    DTFmass = DecayTreeFitter(
+        name=f'DTFmass_{{hash}}',
+        input_particles=input_data,
+        mass_constraints=["D0"])
+
+    DTFvtxmass = DecayTreeFitter(
+        name=f'DTFvtxmass_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0"])
+
+    if ptype == "basic":
+        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmass,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="D0")
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmass,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="D0")
+        return dtf_vars
+
+    if ptype == "composite":
+        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmass,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="D0")
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmass,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="D0")
+        return dtf_vars
+
+def maketuple_D02KK_LowBias(options, pvs, rec_summary):
+    name = "D02KK_LowBias"
+    turbo_line = "Hlt2Charm_D0ToKmKp_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> K- K+]CC",
+        "Km"   : "[D0 -> ^K- K+]CC",
+        "Kp"  : "[D0 -> K- ^K+]CC",
+    }
+
+    variables = {
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D02KK(options, pvs, rec_summary):
+    name = "D02KK"
+    turbo_line = "Hlt2Charm_D0ToKmKp"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> K- K+]CC",
+        "Km"   : "[D0 -> ^K- K+]CC",
+        "Kp"  : "[D0 -> K- ^K+]CC",
+    }
+
+    variables = {
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D02Kpi_LowBias(options, pvs, rec_summary):
+    name = "D02Kpi_LowBias"
+    turbo_line = "Hlt2Charm_D0ToKmPip_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> K- pi+]CC",
+        "Km"   : "[D0 -> ^K- pi+]CC",
+        "pip"  : "[D0 -> K- ^pi+]CC",
+    }
+
+    variables = {
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D02Kpi(options, pvs, rec_summary):
+    name = "D02Kpi"
+    turbo_line = "Hlt2Charm_D0ToKmPip"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> K- pi+]CC",
+        "Km"   : "[D0 -> ^K- pi+]CC",
+        "pip"  : "[D0 -> K- ^pi+]CC",
+    }
+
+    variables = {
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D02pipi_LowBias(options, pvs, rec_summary):
+    name = "D02pipi_LowBias"
+    turbo_line = "Hlt2Charm_D0ToPimPip_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> pi- pi+]CC",
+        "pim"   : "[D0 -> ^pi- pi+]CC",
+        "pip"  : "[D0 -> pi- ^pi+]CC",
+    }
+
+    variables = {
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D02pipi(options, pvs, rec_summary):
+    name = "D02pipi"
+    turbo_line = "Hlt2Charm_D0ToPimPip"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> pi- pi+]CC",
+        "pim"   : "[D0 -> ^pi- pi+]CC",
+        "pip"  : "[D0 -> pi- ^pi+]CC",
+    }
+
+    variables = {
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02KK_LowBias(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02KK_LowBias"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmKp_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> ([D0]CC -> K- K+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> K- K+) pi+]CC",
+        "Km"   : "[D*(2010)+ -> ([D0]CC -> ^K- K+) pi+]CC",
+        "Kp"  : "[D*(2010)+ -> ([D0]CC -> K- ^K+) pi+]CC",
+        "spip" : "[D*(2010)+ -> ([D0]CC -> K- K+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02KK(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02KK"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmKp"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> ([D0]CC -> K- K+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> K- K+) pi+]CC",
+        "Km"   : "[D*(2010)+ -> ([D0]CC -> ^K- K+) pi+]CC",
+        "Kp"  : "[D*(2010)+ -> ([D0]CC -> K- ^K+) pi+]CC",
+        "spip" : "[D*(2010)+ -> ([D0]CC -> K- K+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02Kpi_RS_LowBias(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02Kpi_RS_LowBias"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPip_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> (D0 -> K- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^(D0 -> K- pi+) pi+]CC",
+        "Km"   : "[D*(2010)+ -> (D0 -> ^K- pi+) pi+]CC",
+        "pip"  : "[D*(2010)+ -> (D0 -> K- ^pi+) pi+]CC",
+        "spip" : "[D*(2010)+ -> (D0 -> K- pi+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02Kpi_RS(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02Kpi_RS"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPip"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> (D0 -> K- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^(D0 -> K- pi+) pi+]CC",
+        "Km"   : "[D*(2010)+ -> (D0 -> ^K- pi+) pi+]CC",
+        "pip"  : "[D*(2010)+ -> (D0 -> K- ^pi+) pi+]CC",
+        "spip" : "[D*(2010)+ -> (D0 -> K- pi+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02Kpi_WS_LowBias(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02Kpi_WS_LowBias"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKpPim_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> (D0 -> K+ pi-) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^(D0 -> K+ pi-) pi+]CC",
+        "Kp"   : "[D*(2010)+ -> (D0 -> ^K+ pi-) pi+]CC",
+        "pim"  : "[D*(2010)+ -> (D0 -> K+ ^pi-) pi+]CC",
+        "spip" : "[D*(2010)+ -> (D0 -> K+ pi-) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Kp"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pim"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02Kpi_WS(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02Kpi_WS"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKpPim"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> (D0 -> K+ pi-) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^(D0 -> K+ pi-) pi+]CC",
+        "Kp"   : "[D*(2010)+ -> (D0 -> ^K+ pi-) pi+]CC",
+        "pim"  : "[D*(2010)+ -> (D0 -> K+ ^pi-) pi+]CC",
+        "spip" : "[D*(2010)+ -> (D0 -> K+ pi-) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Kp"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pim"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02pipi_LowBias(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02pipi_LowBias"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimPip_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> ([D0]CC -> pi- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> pi- pi+) pi+]CC",
+        "pim"   : "[D*(2010)+ -> ([D0]CC -> ^pi- pi+) pi+]CC",
+        "pip"  : "[D*(2010)+ -> ([D0]CC -> pi- ^pi+) pi+]CC",
+        "spip" : "[D*(2010)+ -> ([D0]CC -> pi- pi+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02pipi(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02pipi"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimPip"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> ([D0]CC -> pi- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> pi- pi+) pi+]CC",
+        "pim"   : "[D*(2010)+ -> ([D0]CC -> ^pi- pi+) pi+]CC",
+        "pip"  : "[D*(2010)+ -> ([D0]CC -> pi- ^pi+) pi+]CC",
+        "spip" : "[D*(2010)+ -> ([D0]CC -> pi- pi+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
diff --git a/Charm_2024validation/options/d0_to_hh_MC.py b/Charm_2024validation/options/d0_to_hh_MC.py
new file mode 100644
index 0000000000..aaae05665d
--- /dev/null
+++ b/Charm_2024validation/options/d0_to_hh_MC.py
@@ -0,0 +1,99 @@
+from .tupling import (
+    make_MC_composite_variables,
+    make_MC_basic_variables,
+    make_MC_event_variables,
+)
+
+from PyConf.reading import get_mc_particles, get_mc_header
+from FunTuple import FunTuple_MCParticles as FuntupleMC
+
+def maketuple_MC_Dst2D0pi_D02Kpi_RS(options, pvs, rec_summary):
+    name = "MC_Dst2D0pi_D02Kpi_RS"
+    line = "/Event/MC/Particles"
+
+    input_data = get_mc_particles(f"{line}")
+
+    branches = {
+        "Dst" : "[D*(2010)+ ==> (D0 ==> K- pi+ ) pi+]CC",
+        "D0"  : "[D*(2010)+ ==> ^(D0 ==> K- pi+ ) pi+]CC",
+        "Km"   : "[D*(2010)+ ==> (D0 ==> ^K- pi+ ) pi+]CC",
+        "pip"  : "[D*(2010)+ ==> (D0 ==> K- ^pi+ ) pi+]CC",
+        "spip" : "[D*(2010)+ ==> (D0 ==> K- pi+ ) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_MC_composite_variables(),
+        "D0"    : make_MC_composite_variables(),
+        "Km"     : make_MC_basic_variables(),
+        "pip"    : make_MC_basic_variables(),
+        "spip"   : make_MC_basic_variables(),
+    }
+
+    mytuple  = FuntupleMC(name=name,
+                          tuple_name="MCDecayTree",
+                          fields=branches, variables = variables,
+                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
+                          inputs=input_data)
+
+    return [mytuple]
+
+def maketuple_MC_Dst2D0pi_D02KK(options, pvs, rec_summary):
+    name = "MC_Dst2D0pi_D02KK"
+    line = "/Event/MC/Particles"
+
+    input_data = get_mc_particles(f"{line}")
+
+    branches = {
+        "Dst" : "[D*(2010)+ ==> ([D0]CC ==> K- K+) pi+]CC",
+        "D0"  : "[D*(2010)+ ==> ^([D0]CC ==> K- K+) pi+]CC",
+        "Km"   : "[D*(2010)+ ==> ([D0]CC ==> ^K- K+) pi+]CC",
+        "Kp"  : "[D*(2010)+ ==> ([D0]CC ==> K- ^K+) pi+]CC",
+        "spip" : "[D*(2010)+ ==> ([D0]CC ==> K- K+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_MC_composite_variables(),
+        "D0"    : make_MC_composite_variables(),
+        "Km"     : make_MC_basic_variables(),
+        "Kp"    : make_MC_basic_variables(),
+        "spip"   : make_MC_basic_variables(),
+    }
+
+    mytuple  = FuntupleMC(name=name,
+                        tuple_name="MCDecayTree",
+                        fields=branches, variables = variables,
+                        event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
+                        inputs=input_data)
+
+    return [mytuple]
+
+
+def maketuple_MC_Dst2D0pi_D02pipi(options, pvs, rec_summary):
+    name = "MC_Dst2D0pi_D02pipi"
+    line = "/Event/MC/Particles"
+
+    input_data = get_mc_particles(f"{line}")
+
+    branches = {
+        "Dst" : "[D*(2010)+ ==> ([D0]CC ==> pi- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ ==> ^([D0]CC ==> pi- pi+) pi+]CC",
+        "pim"   : "[D*(2010)+ ==> ([D0]CC ==> ^pi- pi+) pi+]CC",
+        "pip"  : "[D*(2010)+ ==> ([D0]CC ==> pi- ^pi+) pi+]CC",
+        "spip" : "[D*(2010)+ ==> ([D0]CC ==> pi- pi+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_MC_composite_variables(),
+        "D0"    : make_MC_composite_variables(),
+        "pim"     : make_MC_basic_variables(),
+        "pip"    : make_MC_basic_variables(),
+        "spip"   : make_MC_basic_variables(),
+    }
+
+    mytuple  = FuntupleMC(name=name,
+                        tuple_name="MCDecayTree",
+                        fields=branches, variables = variables,
+                        event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
+                        inputs=input_data)
+
+    return [mytuple]
diff --git a/Charm_2024validation/options/d0_to_hhhh.py b/Charm_2024validation/options/d0_to_hhhh.py
new file mode 100644
index 0000000000..0277430fb9
--- /dev/null
+++ b/Charm_2024validation/options/d0_to_hhhh.py
@@ -0,0 +1,247 @@
+from .tupling import (
+    make_composite_variables,
+    make_composite_variables_4body,
+    make_composite_variables_3body,
+    make_basic_variables,
+    make_hlt2_event_variables,
+    make_DeltaM_variable,
+    make_basic_dtf_variables,
+    make_composite_dtf_variables
+)
+
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from FunTuple import FunTuple_Particles as Funtuple
+from DecayTreeFitter import DecayTreeFitter
+
+# I can't get make_composite_variables_4body to work for some reason...
+import Functors as F
+from FunTuple import FunctorCollection
+variables_4body = (
+    FunctorCollection(
+        {
+            #14
+            "M14": F.SUBCOMB(Functor=F.MASS, Indices=(1, 4)),
+            "SDOCA14"     : F.SDOCA(Child1=1,Child2=4),
+            "SDOCACHI214" : F.SDOCACHI2(Child1=1,Child2=4),
+            "DOCA14"      : F.DOCA(Child1=1,Child2=4),
+            "DOCACHI214"  : F.DOCACHI2(Child1=1,Child2=4),
+            "COS14": F.ALV(1, 4),
+            #24
+            "M24": F.SUBCOMB(Functor=F.MASS, Indices=(2, 4)),
+            "SDOCA24"     : F.SDOCA(Child1=2,Child2=4),
+            "SDOCACHI224" : F.SDOCACHI2(Child1=2,Child2=4),
+            "DOCA24"      : F.DOCA(Child1=2,Child2=4),
+            "DOCACHI224"  : F.DOCACHI2(Child1=2,Child2=4),
+            "COS24": F.ALV(2, 4),
+            #34
+            "M34": F.SUBCOMB(Functor=F.MASS, Indices=(3, 4)),
+            "SDOCA34"     : F.SDOCA(Child1=3,Child2=4),
+            "SDOCACHI234" : F.SDOCACHI2(Child1=3,Child2=4),
+            "DOCA34"      : F.DOCA(Child1=3,Child2=4),
+            "DOCACHI234"  : F.DOCACHI2(Child1=3,Child2=4),
+            "COS34": F.ALV(3, 4),
+        }
+    )
+)
+
+
+def maketuple_DstToD0pi_D0ToKKPiPi(options, pvs, rec_summary):
+    name = "DstToD0pi_D0ToKKPiPi"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmKpPimPip"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> ([D0]CC -> K+ K- pi+ pi-) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> K+ K- pi+ pi-) pi+]CC",
+        "h1"  : "[D*(2010)+ -> ([D0]CC -> ^K+ K- pi+ pi-) pi+]CC",
+        "h2"  : "[D*(2010)+ -> ([D0]CC -> K+ ^K- pi+ pi-) pi+]CC",
+        "h3"  : "[D*(2010)+ -> ([D0]CC -> K+ K- ^pi+ pi-) pi+]CC",
+        "h4"  : "[D*(2010)+ -> ([D0]CC -> K+ K- pi+ ^pi-) pi+]CC",
+        "pis" : "[D*(2010)+ -> ([D0]CC -> K+ K- pi+ pi-) ^pi+]CC",
+    }
+
+    DTF_PV = DecayTreeFitter(
+        name='DTF_D0ToKKPiPi_PV',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    basic_variables = make_basic_variables(options, pvs, input_data) +\
+        make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)
+
+    composite_dtf_variables = make_composite_dtf_variables(options,
+                                                           pvs,
+                                                           input_data,
+                                                           DTF=DTF_PV,
+                                                           pv_constraint=True)
+
+    composite_variables = make_composite_variables(options, pvs, input_data) + composite_dtf_variables
+        
+
+    composite_variables_4body = make_composite_variables_3body(options, pvs, input_data) + composite_dtf_variables + variables_4body
+
+    variables = {
+        "Dst"   : composite_variables+make_DeltaM_variable(options),
+        "D0"    : composite_variables_4body,
+        "h1"    : basic_variables,
+        "h2"    : basic_variables,
+        "h3"    : basic_variables,
+        "h4"    : basic_variables,
+        "pis"   : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstToD0pi_D0ToKPiPiPi(options, pvs, rec_summary):
+    name = "DstToD0pi_D0ToKPiPiPi"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPimPipPip"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> (D0 -> K- pi+ pi- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^(D0 -> K- pi+ pi- pi+) pi+]CC",
+        "h1"   : "[D*(2010)+ -> (D0 -> ^K- pi+ pi- pi+) pi+]CC",
+        "h2"  : "[D*(2010)+ -> (D0 -> K- ^pi+ pi- pi+) pi+]CC",
+        "h3"   : "[D*(2010)+ -> (D0 -> K- pi+ ^pi- pi+) pi+]CC",
+        "h4"  : "[D*(2010)+ -> (D0 -> K- pi+ pi- ^pi+) pi+]CC",
+        "pis" : "[D*(2010)+ -> (D0 -> K- pi+ pi- pi+) ^pi+]CC",
+    }
+
+    DTF_PV = DecayTreeFitter(
+        name='DTF_D0ToKPiPiPi_PV',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    basic_variables = make_basic_variables(options, pvs, input_data) +\
+        make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True, mass_constraint=False)
+
+    composite_dtf_variables = make_composite_dtf_variables(options,
+                                                           pvs,
+                                                           input_data,
+                                                           DTF=DTF_PV,
+                                                           pv_constraint=True)
+
+    composite_variables = make_composite_variables(options, pvs, input_data) + composite_dtf_variables
+        
+
+    composite_variables_4body = make_composite_variables_3body(options, pvs, input_data) + composite_dtf_variables + variables_4body
+
+    variables = {
+        "Dst"   : composite_variables+make_DeltaM_variable(options),
+        "D0"    : composite_variables_4body,
+        "h1"    : basic_variables,
+        "h2"    : basic_variables,
+        "h3"    : basic_variables,
+        "h4"    : basic_variables,
+        "pis"   : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstToD0pi_D0ToPiKPiPi(options, pvs, rec_summary):
+    name = "DstToD0pi_D0ToPiKPiPi"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKpPimPimPip"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> (D0 -> pi- K+ pi- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^(D0 -> pi- K+ pi- pi+) pi+]CC",
+        "h1"   : "[D*(2010)+ -> (D0 -> ^pi- K+ pi- pi+) pi+]CC",
+        "h2"  : "[D*(2010)+ -> (D0 -> pi- ^K+ pi- pi+) pi+]CC",
+        "h3"   : "[D*(2010)+ -> (D0 -> pi- K+ ^pi- pi+) pi+]CC",
+        "h4"  : "[D*(2010)+ -> (D0 -> pi- K+ pi- ^pi+) pi+]CC",
+        "pis" : "[D*(2010)+ -> (D0 -> pi- K+ pi- pi+) ^pi+]CC",
+    }
+
+    DTF_PV = DecayTreeFitter(
+        name='DTF_D0ToPiKPiPi_PV',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    basic_variables = make_basic_variables(options, pvs, input_data) +\
+        make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True, mass_constraint=False)
+
+    composite_dtf_variables = make_composite_dtf_variables(options,
+                                                           pvs,
+                                                           input_data,
+                                                           DTF=DTF_PV,
+                                                           pv_constraint=True)
+
+    composite_variables = make_composite_variables(options, pvs, input_data) + composite_dtf_variables
+        
+
+    composite_variables_4body = make_composite_variables_3body(options, pvs, input_data) + composite_dtf_variables + variables_4body
+
+    variables = {
+        "Dst"   : composite_variables+make_DeltaM_variable(options),
+        "D0"    : composite_variables_4body,
+        "h1"    : basic_variables,
+        "h2"    : basic_variables,
+        "h3"    : basic_variables,
+        "h4"    : basic_variables,
+        "pis"   : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstToD0pi_D0ToPiPiPiPi(options, pvs, rec_summary):
+    name = "DstToD0pi_D0ToPiPiPiPi"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimPimPipPip"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> ([D0]CC -> pi+ pi- pi+ pi-) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> pi+ pi- pi+ pi-) pi+]CC",
+        "h1"  : "[D*(2010)+ -> ([D0]CC -> ^pi+ pi- pi+ pi-) pi+]CC",
+        "h2"  : "[D*(2010)+ -> ([D0]CC -> pi+ ^pi- pi+ pi-) pi+]CC",
+        "h3"  : "[D*(2010)+ -> ([D0]CC -> pi+ pi- ^pi+ pi-) pi+]CC",
+        "h4"  : "[D*(2010)+ -> ([D0]CC -> pi+ pi- pi+ ^pi-) pi+]CC",
+        "pis" : "[D*(2010)+ -> ([D0]CC -> pi+ pi- pi+ pi-) ^pi+]CC",
+    }
+
+    DTF_PV = DecayTreeFitter(
+        name='DTF_D0ToPiPiPiPi_PV',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    basic_variables = make_basic_variables(options, pvs, input_data) +\
+        make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True, mass_constraint=False)
+
+    composite_dtf_variables = make_composite_dtf_variables(options,
+                                                           pvs,
+                                                           input_data,
+                                                           DTF=DTF_PV,
+                                                           pv_constraint=True)
+
+    composite_variables = make_composite_variables(options, pvs, input_data) + composite_dtf_variables
+        
+
+    composite_variables_4body = make_composite_variables_3body(options, pvs, input_data) + composite_dtf_variables + variables_4body
+
+    variables = {
+        "Dst"   : composite_variables+make_DeltaM_variable(options),
+        "D0"    : composite_variables_4body,
+        "h1"    : basic_variables,
+        "h2"    : basic_variables,
+        "h3"    : basic_variables,
+        "h4"    : basic_variables,
+        "pis"   : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
diff --git a/Charm_2024validation/options/d0_to_hhhh_MC.py b/Charm_2024validation/options/d0_to_hhhh_MC.py
new file mode 100644
index 0000000000..2dbe198fa9
--- /dev/null
+++ b/Charm_2024validation/options/d0_to_hhhh_MC.py
@@ -0,0 +1,43 @@
+from .tupling import (
+    make_MC_composite_variables,
+    make_MC_basic_variables,
+    make_MC_event_variables,
+)
+
+from PyConf.reading import get_mc_particles, get_mc_header
+from FunTuple import FunTuple_MCParticles as FuntupleMC
+
+def maketuple_MC_DstToD0pi_D0ToKPiPiPi(options, pvs, rec_summary):
+    name = "MC_DstToD0pi_D0ToKPiPiPi"
+
+    line = "/Event/MC/Particles"
+    
+    input_data = get_mc_particles(f"{line}")
+
+    branches = {
+        "Dst" : "[D*(2010)+ ==> (D0 ==> K- pi+ pi- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ ==> ^(D0 ==> K- pi+ pi- pi+) pi+]CC",
+        "h1"   : "[D*(2010)+ ==> (D0 ==> ^K- pi+ pi- pi+) pi+]CC",
+        "h2"  : "[D*(2010)+ ==> (D0 ==> K- ^pi+ pi- pi+) pi+]CC",
+        "h3"   : "[D*(2010)+ ==> (D0 ==> K- pi+ ^pi- pi+) pi+]CC",
+        "h4"  : "[D*(2010)+ ==> (D0 ==> K- pi+ pi- ^pi+) pi+]CC",
+        "pis" : "[D*(2010)+ ==> (D0 ==> K- pi+ pi- pi+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_MC_composite_variables(),
+        "D0"    : make_MC_composite_variables(),
+        "h1"     : make_MC_basic_variables(),
+        "h2"    : make_MC_basic_variables(),
+        "h3"    : make_MC_basic_variables(),
+        "h4"    : make_MC_basic_variables(),
+        "pis"   : make_MC_basic_variables(),
+    }
+
+    mytuple  = FuntupleMC(name=name,
+                          tuple_name="MCDecayTree",
+                          fields=branches, variables = variables,  
+                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])), 
+                          inputs=input_data)
+
+    return [mytuple]
diff --git a/Charm_2024validation/options/d0_to_hhpi0.py b/Charm_2024validation/options/d0_to_hhpi0.py
new file mode 100644
index 0000000000..cf3c3ba59f
--- /dev/null
+++ b/Charm_2024validation/options/d0_to_hhpi0.py
@@ -0,0 +1,359 @@
+from .tupling import (
+    make_composite_variables,
+    make_DeltaM_variable,
+    make_basic_variables,
+    make_hlt2_event_variables,
+    make_top_isolation_variables,
+    make_basic_isolation_variables,
+    make_intermediate_isolation_variables,
+    make_composite_dtf_variables,
+    make_basic_dtf_variables,
+)
+
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from FunTuple import FunTuple_Particles as Funtuple
+
+iso_vars_locations = ["LongTrackIso", "NeutralIso", "PizIso"]
+
+def make_dtf_variables(options, pvs, input_data, ptype):
+
+    if ptype not in ["basic", "composite"]:
+        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
+
+    from DecayTreeFitter import DecayTreeFitter
+    
+    DTF = DecayTreeFitter(
+        name=f'DTF_{{hash}}',
+        input_particles=input_data)
+
+    DTFvtx = DecayTreeFitter(
+        name=f'DTFvtx_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    DTFmass = DecayTreeFitter(
+        name=f'DTFmass_{{hash}}',
+        input_particles=input_data,
+        mass_constraints=["D0"])
+
+    DTFvtxmass = DecayTreeFitter(
+        name=f'DTFvtxmass_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0"])
+
+    if ptype == "basic":
+        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmass,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="D0")
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmass,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="D0")
+        return dtf_vars
+
+    if ptype == "composite":
+        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmass,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="D0")
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmass,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="D0")
+        return dtf_vars
+
+
+def maketuple_Dst2D0pi_D02KKpi0_M(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02KKpi0_M"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmKpPi0_M"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) pi0) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (phi(1020) -> K- K+) pi0) pi+]CC",
+        "phi"   : "[D*(2010)+ -> ([D0]CC -> ^(phi(1020) -> K- K+) pi0) pi+]CC",
+        "Km"   : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> ^K- K+) pi0) pi+]CC",
+        "Kp"  : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- ^K+) pi0) pi+]CC",
+        "pi0"  : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) ^pi0) pi+]CC",
+        "spip" : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) pi0) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "phi"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation:
+
+        variables = {
+            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="D0"),
+            "phi"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="phi(1020)"),
+            "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02KKpi0_R(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02KKpi0_R"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmKpPi0_R"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) (pi0 -> gamma gamma) ) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (phi(1020) -> K- K+) (pi0 -> gamma gamma) ) pi+]CC",
+        "phi"   : "[D*(2010)+ -> ([D0]CC -> ^(phi(1020) -> K- K+) (pi0 -> gamma gamma) ) pi+]CC",
+        "Km"   : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> ^K- K+) (pi0 -> gamma gamma) ) pi+]CC",
+        "Kp"  : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- ^K+) (pi0 -> gamma gamma) ) pi+]CC",
+        "pi0"  : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) ^(pi0 -> gamma gamma) ) pi+]CC",
+        "gamma1"  : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) (pi0 -> ^gamma gamma) ) pi+]CC",
+        "gamma2"  : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) (pi0 -> gamma ^gamma) ) pi+]CC",
+        "spip" : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) (pi0 -> gamma gamma) ) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "phi"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "gamma1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "gamma2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation:
+
+        variables = {
+            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="D0"),
+            "phi"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="phi(1020)"),
+            "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="pi0"),
+            "gamma1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "gamma2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02Kpipi0_M(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02Kpipi0_M"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPipPi0_M"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) pi0) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^(D0 -> (K*(892)~0 -> K- pi+) pi0) pi+]CC",
+        "Kst"   : "[D*(2010)+ -> (D0 -> ^(K*(892)~0 -> K- pi+) pi0) pi+]CC",
+        "Km"   : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> ^K- pi+) pi0) pi+]CC",
+        "pip"  : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- ^pi+) pi0) pi+]CC",
+        "pi0"  : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) ^pi0) pi+]CC",
+        "spip" : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) pi0) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Kst"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation:
+
+        variables = {
+            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="D0"),
+            "Kst"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="K*(892)~0"),
+            "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02Kpipi0_R(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02Kpipi0_R"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPipPi0_R"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) (pi0 -> gamma gamma) ) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^(D0 -> (K*(892)~0 -> K- pi+) (pi0 -> gamma gamma) ) pi+]CC",
+        "Kst"   : "[D*(2010)+ -> (D0 -> ^(K*(892)~0 -> K- pi+) (pi0 -> gamma gamma) ) pi+]CC",
+        "Km"   : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> ^K- pi+) (pi0 -> gamma gamma) ) pi+]CC",
+        "pip"  : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- ^pi+) (pi0 -> gamma gamma) ) pi+]CC",
+        "pi0"  : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) ^(pi0 -> gamma gamma) ) pi+]CC",
+        "gamma1"  : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) (pi0 -> ^gamma gamma) ) pi+]CC",
+        "gamma2"  : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) (pi0 -> gamma ^gamma) ) pi+]CC",
+        "spip" : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) (pi0 -> gamma gamma) ) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Kst"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "gamma1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "gamma2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation:
+
+        variables = {
+            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="D0"),
+            "Kst"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="K*(892)~0"),
+            "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="pi0"),
+            "gamma1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "gamma2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02pipipi0_M(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02pipipi0_M"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimPipPi0_M"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) pi0) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (rho(770)0 -> pi- pi+) pi0) pi+]CC",
+        "rho"   : "[D*(2010)+ -> ([D0]CC -> ^(rho(770)0 -> pi- pi+) pi0) pi+]CC",
+        "pim"   : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> ^pi- pi+) pi0) pi+]CC",
+        "pip"  : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- ^pi+) pi0) pi+]CC",
+        "pi0"  : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) ^pi0) pi+]CC",
+        "spip" : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) pi0) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "rho"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation:
+
+        variables = {
+            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="D0"),
+            "rho"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="rho(770)0"),
+            "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02pipipi0_R(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02pipipi0_R"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimPipPi0_R"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) (pi0 -> gamma gamma) ) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (rho(770)0 -> pi- pi+) (pi0 -> gamma gamma) ) pi+]CC",
+        "rho"   : "[D*(2010)+ -> ([D0]CC -> ^(rho(770)0 -> pi- pi+) (pi0 -> gamma gamma) ) pi+]CC",
+        "pim"   : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> ^pi- pi+) (pi0 -> gamma gamma) ) pi+]CC",
+        "pip"  : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- ^pi+) (pi0 -> gamma gamma) ) pi+]CC",
+        "pi0"  : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) ^(pi0 -> gamma gamma) ) pi+]CC",
+        "gamma1"  : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) (pi0 -> ^gamma gamma) ) pi+]CC",
+        "gamma2"  : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) (pi0 -> gamma ^gamma) ) pi+]CC",
+        "spip" : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) (pi0 -> gamma gamma) ) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "rho"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "gamma1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "gamma2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation:
+
+        variables = {
+            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="D0"),
+            "rho"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="rho(770)0"),
+            "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="pi0"),
+            "gamma1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "gamma2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
diff --git a/Charm_2024validation/options/d0_to_hhpi0_MC.py b/Charm_2024validation/options/d0_to_hhpi0_MC.py
new file mode 100644
index 0000000000..84648f4e71
--- /dev/null
+++ b/Charm_2024validation/options/d0_to_hhpi0_MC.py
@@ -0,0 +1,44 @@
+from .tupling import (
+    make_MC_composite_variables,
+    make_MC_basic_variables,
+    make_MC_event_variables,
+)
+
+from PyConf.reading import get_mc_particles, get_mc_header
+from FunTuple import FunTuple_MCParticles as FuntupleMC
+
+def maketuple_MC_Dst2D0pi_D02Kpipi0(options, pvs, rec_summary):
+    name = "MC_Dst2D0pi_D02Kpipi0"
+    line = "/Event/MC/Particles"
+    
+    input_data = get_mc_particles(f"{line}")
+
+    branches = {
+        "Dst" : "[D*(2010)+ ==> (D0 ==> K- pi+ (pi0 ==> gamma gamma) ) pi+]CC",
+        "D0"  : "[D*(2010)+ ==> ^(D0 ==> K- pi+ (pi0 ==> gamma gamma) ) pi+]CC",
+        "Km"   : "[D*(2010)+ ==> (D0 ==> ^K- pi+ (pi0 ==> gamma gamma) ) pi+]CC",
+        "pip"  : "[D*(2010)+ ==> (D0 ==> K- ^pi+ (pi0 ==> gamma gamma) ) pi+]CC",
+        "pi0"  : "[D*(2010)+ ==> (D0 ==> K- pi+ ^(pi0 ==> gamma gamma) ) pi+]CC",
+        "gamma1"  : "[D*(2010)+ ==> (D0 ==> K- pi+ (pi0 ==> ^gamma gamma) ) pi+]CC",
+        "gamma2"  : "[D*(2010)+ ==> (D0 ==> K- pi+ (pi0 ==> gamma ^gamma) ) pi+]CC",
+        "spip" : "[D*(2010)+ ==> (D0 ==> K- pi+ (pi0 ==> gamma gamma) ) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_MC_composite_variables(),
+        "D0"    : make_MC_composite_variables(),
+        "Km"     : make_MC_basic_variables(),
+        "pip"    : make_MC_basic_variables(),
+        "pi0"    : make_MC_basic_variables(),
+        "gamma1"    : make_MC_basic_variables(),
+        "gamma2"    : make_MC_basic_variables(),
+        "spip"   : make_MC_basic_variables(),
+    }
+
+    mytuple  = FuntupleMC(name=name,
+                          tuple_name="MCDecayTree",
+                          fields=branches, variables = variables,  
+                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])), 
+                          inputs=input_data)
+
+    return [mytuple]
diff --git a/Charm_2024validation/options/d0_to_kshh.py b/Charm_2024validation/options/d0_to_kshh.py
new file mode 100644
index 0000000000..dad027529f
--- /dev/null
+++ b/Charm_2024validation/options/d0_to_kshh.py
@@ -0,0 +1,1585 @@
+from .tupling import (
+    make_composite_variables,
+    make_composite_variables_3body,
+    make_basic_variables,
+    make_hlt2_event_variables,
+    make_DeltaM_variable,
+    make_basic_dtf_variables,
+    make_composite_dtf_variables,
+    make_composite_dtf_variables_3body,
+)
+
+import Functors as F
+from Functors.math import log
+from DaVinci import Options, make_config
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from FunTuple import FunctorCollection
+from PyConf.reading import get_particles
+import FunTuple.functorcollections as FC
+from FunTuple import FunTuple_Particles as Funtuple
+from DecayTreeFitter import DecayTreeFitter
+
+# define helper functors
+get_SV =  F.ENDVERTEX @ F.FORWARDARG0
+get_SV_pos = F.TOLINALG @ F.POSITION @ get_SV
+# only if composite (i.e. has vertex)

+get_child_1 = F.CHILD(1, F.FORWARDARG0) # change here the index of the child.
+get_child_endvtx_pos_1 = F.ENDVERTEX_POS  @ get_child_1
+get_fdvec_child_1 = get_child_endvtx_pos_1 - get_SV_pos
+
+# define observables
+IP_wrt_SV_KS0 = F.IP.bind(get_SV_pos , get_child_1)
+IPCHI2_wrt_SV_KS0 = F.IPCHI2.bind(get_SV , get_child_1)
+# only if child is composite (i.e. has vertex)
+FD_wrt_SV_KS0 = F.MAGNITUDE @ get_fdvec_child_1
+FDCHI2_wrt_SV_KS0 = F.VTX_FDCHI2.bind(get_SV, get_child_1)
+# Note: Apply the functors to the head of the node of decay tree e.g. B
+# Functor collection for SV related info
+topo_sv_var = FunctorCollection(
+    {
+        "ORIVXIP_CHILD1": IP_wrt_SV_KS0,
+        "ORIVXIPCHI2_CHILD1": IPCHI2_wrt_SV_KS0,
+        "ORIVXFD_CHILD1": FD_wrt_SV_KS0,
+        "ORIVXFDCHI2_CHILD1": FDCHI2_wrt_SV_KS0,
+    }
+)
+
+"""
+ D0->KSππ LL, DD x LowBias x Dstar
+ D0->KSK-Ï€+ LL, DD x LowBias x Dstar
+ D0->KSK+Ï€- LL, DD x LowBias x Dstar
+ D0->KSKK LL, DD x LowBias x Dstar
+ nb: https://gitlab.cern.ch/lhcb/Moore/-/blob/master/Hlt/Hlt2Conf/python/Hlt2Conf/lines/charm/d0_to_kshh.py?ref_type=heads
+
+ """
+
+# D0->KSππ
+def maketuple_DstpToD0Pip_D0ToKsPimPip_LL_LowBias(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsPimPip_LL_LowBias"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_LL_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) pi- pi+) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) pi- pi+) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^pi- pi+) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- ^pi+) pi+]CC",
+        "pis" :   "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D02KSPiPi_LL_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D02KSPiPi_LL_lowbias_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0") + topo_sv_var,
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstpToD0Pip_D0ToKsPimPip_DD_LowBias(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsPimPip_DD_LowBias"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_DD_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) pi- pi+) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) pi- pi+) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^pi- pi+) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- ^pi+) pi+]CC",
+        "pis" :   "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D02KSPiPi_DD_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D02KSPiPi_DD_lowbias_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0") + topo_sv_var,
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstpToD0Pip_D0ToKsPimPip_LL(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsPimPip_LL"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_LL"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) pi- pi+) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) pi- pi+) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^pi- pi+) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- ^pi+) pi+]CC",
+        "pis" :   "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D02KSPiPi_LL_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D02KSPiPi_LL_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF= DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF= DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF= DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF= DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF= DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF= DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0") + topo_sv_var,
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstpToD0Pip_D0ToKsPimPip_DD(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsPimPip_DD"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_DD"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) pi- pi+) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) pi- pi+) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^pi- pi+) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- ^pi+) pi+]CC",
+        "pis" :   "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D02KSPiPi_DD_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D02KSPiPi_DD_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0") + topo_sv_var,
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsPimPip_LL_LowBias(options, pvs, rec_summary):
+    name = "D0ToKsPimPip_LL_LowBias"
+    turbo_line = "Hlt2Charm_D0ToKsPimPip_LL_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) pi- pi+]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) pi- pi+]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) pi- pi+]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) pi- pi+]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^pi- pi+]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) pi- ^pi+]CC",
+    }
+
+    DTF_D0ToKsPimPip_LL_LB_MASS = DecayTreeFitter(
+        name='DTF_D02KSPiPi_LL_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsPimPip_DD_LowBias(options, pvs, rec_summary):
+    name = "D0ToKsPimPip_DD_LowBias"
+    turbo_line = "Hlt2Charm_D0ToKsPimPip_DD_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) pi- pi+]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) pi- pi+]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) pi- pi+]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) pi- pi+]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^pi- pi+]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) pi- ^pi+]CC",
+    }
+
+    DTF_D0ToKsPimPip_DD_LB_MASS = DecayTreeFitter(
+        name='DTF_D02KSPiPi_DD_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsPimPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsPimPip_LL(options, pvs, rec_summary):
+    name = "D0ToKsPimPip_LL"
+    turbo_line = "Hlt2Charm_D0ToKsPimPip_LL"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) pi- pi+]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) pi- pi+]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) pi- pi+]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) pi- pi+]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^pi- pi+]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) pi- ^pi+]CC",
+    }
+
+    DTF_D0ToKsPimPip_LL_MASS = DecayTreeFitter(
+        name='DTF_D02KSPiPi_LL_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsPimPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsPimPip_DD(options, pvs, rec_summary):
+    name = "D0ToKsPimPip_DD"
+    turbo_line = "Hlt2Charm_D0ToKsPimPip_DD"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) pi- pi+]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) pi- pi+]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) pi- pi+]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) pi- pi+]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^pi- pi+]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) pi- ^pi+]CC",
+    }
+
+    DTF_D0ToKsPimPip_DD_MASS = DecayTreeFitter(
+        name='DTF_D02KSPiPi_DD_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsPimPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+# D0->KSK-Ï€+
+def maketuple_DstpToD0Pip_D0ToKsKmPip_LL_LowBias(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsKmPip_LL_LowBias"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_LL_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- pi+) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- pi+) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- pi+) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- pi+) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^pi+) pi+]CC",
+        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D0ToKsKmPip_LL_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D0ToKsKmPip_LL_lowbias_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstpToD0Pip_D0ToKsKmPip_DD_LowBias(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsKmPip_DD_LowBias"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_DD_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- pi+) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- pi+) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- pi+) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- pi+) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^pi+) pi+]CC",
+        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D0ToKsKmPip_DD_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D0ToKsKmPip_DD_lowbias_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstpToD0Pip_D0ToKsKmPip_LL(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsKmPip_LL"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_LL"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- pi+) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- pi+) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- pi+) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- pi+) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^pi+) pi+]CC",
+        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D0ToKsKmPip_LL_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D0ToKsKmPip_LL_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstpToD0Pip_D0ToKsKmPip_DD(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsKmPip_DD"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_DD"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- pi+) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- pi+) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- pi+) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- pi+) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^pi+) pi+]CC",
+        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D0ToKsKmPip_DD_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D0ToKsKmPip_DD_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsKmPip_LL_LowBias(options, pvs, rec_summary):
+    name = "D0ToKsKmPip_LL_LowBias"
+    turbo_line = "Hlt2Charm_D0ToKsKmPip_LL_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- pi+]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- pi+]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- pi+]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- pi+]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- pi+]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^pi+]CC",
+    }
+
+    DTF_D0ToKsKmPip_LL_LB_MASS = DecayTreeFitter(
+        name='DTF_D0ToKsKmPip_LL_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsKmPip_DD_LowBias(options, pvs, rec_summary):
+    name = "D0ToKsKmPip_DD_LowBias"
+    turbo_line = "Hlt2Charm_D0ToKsKmPip_DD_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- pi+]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- pi+]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- pi+]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- pi+]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- pi+]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^pi+]CC",
+    }
+
+    DTF_D0ToKsKmPip_DD_LB_MASS = DecayTreeFitter(
+        name='DTF_D0ToKsKmPip_DD_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsKmPip_LL(options, pvs, rec_summary):
+    name = "D0ToKsKmPip_LL"
+    turbo_line = "Hlt2Charm_D0ToKsKmPip_LL"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- pi+]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- pi+]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- pi+]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- pi+]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- pi+]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^pi+]CC",
+    }
+
+    DTF_D0ToKsKmPip_LL_MASS = DecayTreeFitter(
+        name='DTF_D0ToKsKmPip_LL_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsKmPip_DD(options, pvs, rec_summary):
+    name = "D0ToKsKmPip_DD"
+    turbo_line = "Hlt2Charm_D0ToKsKmPip_DD"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- pi+]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- pi+]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- pi+]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- pi+]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- pi+]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^pi+]CC",
+    }
+
+    DTF_D0ToKsKmPip_DD_MASS = DecayTreeFitter(
+        name='DTF_D0ToKsKmPip_DD_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+# D0->KSK+Ï€-
+def maketuple_DstpToD0Pip_D0ToKsKpPim_LL_LowBias(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsKpPim_LL_LowBias"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_LL_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K+ pi-) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K+ pi-) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K+ pi-) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ ^pi-) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K+ pi-) pi+]CC",
+        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D0ToKsKpPim_LL_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D0ToKsKpPim_LL_lowbias_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstpToD0Pip_D0ToKsKpPim_DD_LowBias(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsKpPim_DD_LowBias"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_DD_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K+ pi-) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K+ pi-) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K+ pi-) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ ^pi-) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K+ pi-) pi+]CC",
+        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D0ToKsKpPim_DD_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D0ToKsKpPim_DD_lowbias_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstpToD0Pip_D0ToKsKpPim_LL(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsKpPim_LL"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_LL"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K+ pi-) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K+ pi-) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K+ pi-) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ ^pi-) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K+ pi-) pi+]CC",
+        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D0ToKsKpPim_LL_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D0ToKsKpPim_LL_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstpToD0Pip_D0ToKsKpPim_DD(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsKpPim_DD"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_DD"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K+ pi-) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K+ pi-) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K+ pi-) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ ^pi-) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K+ pi-) pi+]CC",
+        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D0ToKsKpPim_DD_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D0ToKsKpPim_DD_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsKpPim_LL_LowBias(options, pvs, rec_summary):
+    name = "D0ToKsKpPim_LL_LowBias"
+    turbo_line = "Hlt2Charm_D0ToKsKpPim_LL_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) K+ pi-]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K+ pi-]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K+ pi-]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K+ pi-]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) K+ ^pi-]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) ^K+ pi-]CC",
+    }
+
+    DTF_D0ToKsKpPim_LL_LB_MASS = DecayTreeFitter(
+        name='DTF_D0ToKsKpPim_LL_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKpPim_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsKpPim_DD_LowBias(options, pvs, rec_summary):
+    name = "D0ToKsKpPim_DD_LowBias"
+    turbo_line = "Hlt2Charm_D0ToKsKpPim_DD_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) K+ pi-]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K+ pi-]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K+ pi-]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K+ pi-]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) K+ ^pi-]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) ^K+ pi-]CC",
+    }
+
+    DTF_D0ToKsKpPim_DD_LB_MASS = DecayTreeFitter(
+        name='DTF_D0ToKsKpPim_DD_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKpPim_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsKpPim_LL(options, pvs, rec_summary):
+    name = "D0ToKsKpPim_LL"
+    turbo_line = "Hlt2Charm_D0ToKsKpPim_LL"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) K+ pi-]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K+ pi-]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K+ pi-]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K+ pi-]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) K+ ^pi-]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) ^K+ pi-]CC",
+    }
+
+    DTF_D0ToKsKpPim_LL_MASS = DecayTreeFitter(
+        name='DTF_D0ToKsKpPim_LL_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKpPim_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsKpPim_DD(options, pvs, rec_summary):
+    name = "D0ToKsKpPim_DD"
+    turbo_line = "Hlt2Charm_D0ToKsKpPim_DD"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) K+ pi-]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K+ pi-]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K+ pi-]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K+ pi-]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) K+ ^pi-]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) ^K+ pi-]CC",
+    }
+
+    DTF_D0ToKsKpPim_DD_MASS = DecayTreeFitter(
+        name='DTF_D0ToKsKpPim_DD_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKpPim_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+# D0->KSK-K+
+def maketuple_DstpToD0Pip_D0ToKsKmKp_LL_LowBias(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsKmKp_LL_LowBias"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_LL_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- K+) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- K+) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- K+) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- K+) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^K+) pi+]CC",
+        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D0ToKsKmKp_LL_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D0ToKsKmKp_LL_lowbias_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstpToD0Pip_D0ToKsKmKp_DD_LowBias(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsKmKp_DD_LowBias"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_DD_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- K+) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- K+) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- K+) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- K+) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^K+) pi+]CC",
+        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D0ToKsKmKp_DD_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D0ToKsKmKp_DD_lowbias_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstpToD0Pip_D0ToKsKmKp_LL(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsKmKp_LL"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_LL"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- K+) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- K+) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- K+) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- K+) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^K+) pi+]CC",
+        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D0ToKsKmKp_LL_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D0ToKsKmKp_LL_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstpToD0Pip_D0ToKsKmKp_DD(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsKmKp_DD"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_DD"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- K+) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- K+) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- K+) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- K+) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^K+) pi+]CC",
+        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D0ToKsKmKp_DD_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D0ToKsKmKp_DD_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsKmKp_LL_LowBias(options, pvs, rec_summary):
+    name = "D0ToKsKmKp_LL_LowBias"
+    turbo_line = "Hlt2Charm_D0ToKsKmKp_LL_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- K+]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- K+]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- K+]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- K+]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- K+]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^K+]CC",
+    }
+
+    DTF_D0ToKsKmKp_LL_LB_MASS = DecayTreeFitter(
+        name='DTF_D0ToKsKmKp_LL_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmKp_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsKmKp_DD_LowBias(options, pvs, rec_summary):
+    name = "D0ToKsKmKp_DD_LowBias"
+    turbo_line = "Hlt2Charm_D0ToKsKmKp_DD_LowBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- K+]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- K+]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- K+]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- K+]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- K+]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^K+]CC",
+    }
+
+    DTF_D0ToKsKmKp_DD_LB_MASS = DecayTreeFitter(
+        name='DTF_D0ToKsKmKp_DD_lowbias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmKp_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_DstpToD0Pip_D0ToKsPimPip_LL_NoBias(options, pvs, rec_summary):
+    name = "DstpToD0Pip_D0ToKsPimPip_LL_NoBias"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_LL_NoBias"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) pi- pi+) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) pi- pi+) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) pi- pi+) pi+]CC",
+        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^pi- pi+) pi+]CC",
+        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- ^pi+) pi+]CC",
+        "pis" :   "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) ^pi+]CC",
+    }
+
+    DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS = DecayTreeFitter(
+        name='DTF_DstpToD0Pip_D02KSPiPi_LL_nobias_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV = DecayTreeFitter(
+        'DTF_DstpToD0Pip_D02KSPiPi_LL_nobias_mass_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "Dst"   : composite_variables + make_DeltaM_variable(options),
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0") + topo_sv_var,
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+        "pis"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsKmKp_LL(options, pvs, rec_summary):
+    name = "D0ToKsKmKp_LL"
+    turbo_line = "Hlt2Charm_D0ToKsKmKp_LL"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- K+]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- K+]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- K+]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- K+]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- K+]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^K+]CC",
+    }
+
+    DTF_D0ToKsKmKp_LL_MASS = DecayTreeFitter(
+        name='DTF_D0ToKsKmKp_LL_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmKp_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D0ToKsKmKp_DD(options, pvs, rec_summary):
+    name = "D0ToKsKmKp_DD"
+    turbo_line = "Hlt2Charm_D0ToKsKmKp_DD"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- K+]CC",
+        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- K+]CC",
+        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- K+]CC",
+        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- K+]CC",
+        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- K+]CC",
+        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^K+]CC",
+    }
+
+    DTF_D0ToKsKmKp_DD_MASS = DecayTreeFitter(
+        name='DTF_D0ToKsKmKp_DD_mass',
+        input_particles=input_data,
+        mass_constraints=["D0","KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmKp_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
+
+    variables = {
+        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
+        "KS0"   : composite_variables,
+        "KS0_pim"    : basic_variables,
+        "KS0_pip"    : basic_variables,
+        "hm"    : basic_variables,
+        "hp"    : basic_variables,
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+# ########################################
diff --git a/Charm_2024validation/options/d0_to_kshh_MC.py b/Charm_2024validation/options/d0_to_kshh_MC.py
new file mode 100644
index 0000000000..9fa138f8ef
--- /dev/null
+++ b/Charm_2024validation/options/d0_to_kshh_MC.py
@@ -0,0 +1,44 @@
+from .tupling import (
+    make_MC_composite_variables,
+    make_MC_basic_variables,
+    make_MC_event_variables,
+)
+
+from PyConf.reading import get_mc_particles, get_mc_header
+from FunTuple import FunTuple_MCParticles as FuntupleMC
+
+def maketuple_MC_DstpToD0Pip_D0ToKsPimPip(options, pvs, rec_summary):
+    name = "MC_DstpToD0Pip_D0ToKsPimPip"
+    line = "/Event/MC/Particles"
+    
+    input_data = get_mc_particles(f"{line}")
+
+    branches = {
+       "Dst" : "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi- pi+) pi- pi+) pi+]CC",
+        "D0"  : "[D*(2010)+ ==> ^([D0]CC ==> (KS0 ==> pi- pi+) pi- pi+) pi+]CC",
+        "KS0"  : "[D*(2010)+ ==> ([D0]CC ==> ^(KS0 ==> pi- pi+) pi- pi+) pi+]CC",
+        "KS0_pim"   : "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> ^pi- pi+) pi- pi+) pi+]CC",
+        "KS0_pip"  :  "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi- ^pi+) pi- pi+) pi+]CC",
+        "hm"   : "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi- pi+) ^pi- pi+) pi+]CC",
+        "hp"  :  "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi- pi+) pi- ^pi+) pi+]CC",
+        "pis" :  "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi- pi+) pi- pi+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_MC_composite_variables(),
+        "D0"    : make_MC_composite_variables(),
+        "KS0"    : make_MC_composite_variables(),
+        "KS0_pim"     : make_MC_basic_variables(),
+        "KS0_pip"     : make_MC_basic_variables(),
+        "hm"    : make_MC_basic_variables(),
+        "hp"    : make_MC_basic_variables(),
+        "pis"   : make_MC_basic_variables(),
+    }
+
+    mytuple  = FuntupleMC(name=name,
+                          tuple_name="MCDecayTree",
+                          fields=branches, variables = variables,  
+                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])), 
+                          inputs=input_data)
+
+    return [mytuple]
diff --git a/Charm_2024validation/options/d0_to_ksks.py b/Charm_2024validation/options/d0_to_ksks.py
new file mode 100644
index 0000000000..d47253aa14
--- /dev/null
+++ b/Charm_2024validation/options/d0_to_ksks.py
@@ -0,0 +1,1049 @@
+import Functors as F
+from Functors.math import log
+from DaVinci import Options, make_config
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from FunTuple import FunctorCollection
+from PyConf.reading import get_particles, get_pvs
+import FunTuple.functorcollections as FC
+from FunTuple import FunTuple_Particles as Funtuple
+from DecayTreeFitter import DecayTreeFitter
+
+from .tupling import (
+    make_basic_variables,
+    make_composite_variables,
+    make_hlt2_event_variables,
+    make_basic_dtf_variables,
+    make_composite_dtf_variables,
+    Hlt1_lines
+)
+
+# define helper functors
+get_SV =  F.ENDVERTEX @ F.FORWARDARG0
+get_SV_pos = F.TOLINALG @ F.POSITION @ get_SV
+# only if composite (i.e. has vertex)

+get_child_1 = F.CHILD(1, F.FORWARDARG0) # change here the index of the child.
+get_child_endvtx_pos_1 = F.ENDVERTEX_POS  @ get_child_1
+get_fdvec_child_1 = get_child_endvtx_pos_1 - get_SV_pos
+get_child_2 = F.CHILD(2, F.FORWARDARG0) # change here the index of the child.
+get_child_endvtx_pos_2 = F.ENDVERTEX_POS  @ get_child_2
+get_fdvec_child_2 = get_child_endvtx_pos_2 - get_SV_pos
+
+# define observables
+IP_wrt_SV_KS1 = F.IP.bind(get_SV_pos , get_child_1)
+IP_wrt_SV_KS2 = F.IP.bind(get_SV_pos , get_child_2)
+IPCHI2_wrt_SV_KS1 = F.IPCHI2.bind(get_SV , get_child_1)
+IPCHI2_wrt_SV_KS2 = F.IPCHI2.bind(get_SV , get_child_2)
+# only if child is composite (i.e. has vertex)
+FD_wrt_SV_KS1 = F.MAGNITUDE @ get_fdvec_child_1
+FD_wrt_SV_KS2 = F.MAGNITUDE @ get_fdvec_child_2
+FDCHI2_wrt_SV_KS1 = F.VTX_FDCHI2.bind(get_SV, get_child_1)
+FDCHI2_wrt_SV_KS2 = F.VTX_FDCHI2.bind(get_SV, get_child_2)
+# Note: Apply the functors to the head of the node of decay tree e.g. B
+# Functor collection for SV related info
+topo_sv_var = FunctorCollection(
+    {
+        "ORIVXIP_CHILD1": IP_wrt_SV_KS1,
+        "ORIVXIP_CHILD2": IP_wrt_SV_KS2,
+        "ORIVXIPCHI2_CHILD1": IPCHI2_wrt_SV_KS1,
+        "ORIVXIPCHI2_CHILD2": IPCHI2_wrt_SV_KS2,
+        "ORIVXFD_CHILD1": FD_wrt_SV_KS1,
+        "ORIVXFD_CHILD2": FD_wrt_SV_KS2,
+        "ORIVXFDCHI2_CHILD1": FDCHI2_wrt_SV_KS1,
+        "ORIVXFDCHI2_CHILD2": FDCHI2_wrt_SV_KS2,
+    }
+)
+
+############################# LLLL #############################
+def maketuple_Dst2D0pi_D02KSKS_LLLL(options, pvs, rec_summary):
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLL"
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+
+    fields = {
+        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
+        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
+        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
+    }
+
+    # DTF_LLLL = DecayTreeFitter(
+    #     name='DTF_LLLL',
+    #     input_particles=input_data)
+    #
+    # DTF_LLLL_PV = DecayTreeFitter(
+    #     name='DTF_LLLL_PV',
+    #     input_particles=input_data,
+    #     input_pvs=pvs)
+
+    DTF_LLLL_MASS = DecayTreeFitter(
+        name='DTF_LLLL_mass',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTF_LLLL_MASS_PV = DecayTreeFitter(
+        'DTF_LLLL_MASS_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL, pv_constraint=False, mass_constraint=False) +\
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_PV, pv_constraint=True, mass_constraint=False) +\
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL, pv_constraint=False, mass_constraint=False) +\
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_PV, pv_constraint=True, mass_constraint=False) +\
+
+    variables = {"pip1": basic_variables,
+                 "pim1": basic_variables,
+                 "pip2": basic_variables,
+                 "pim2": basic_variables,
+                 "KS1": composite_variables,
+                 "KS2": composite_variables,
+                 "D0": composite_variables + topo_sv_var,
+                 "Dst": composite_variables,
+                 "pi_soft": basic_variables,
+    }
+
+    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    mytuple = Funtuple(
+        "DstToD0PiToKS0KS0_LLLL",
+        "Tuple",
+        fields=fields,
+        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data, store_multiple_cand_info=True)
+
+    return [my_filter, mytuple]
+
+############################# LLLL Tight #############################
+def maketuple_Dst2D0pi_D02KSKS_LLLL_Tight(options, pvs, rec_summary):
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLL_Tight"
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+
+    fields = {
+        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
+        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
+        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
+    }
+
+    # DTF_LLLL_Tight = DecayTreeFitter(
+    #     name='DTF_LLLL_Tight',
+    #     input_particles=input_data)
+    #
+    # DTF_LLLL_Tight_PV = DecayTreeFitter(
+    #     name='DTF_LLLL_Tight_PV',
+    #     input_particles=input_data,
+    #     input_pvs=pvs)
+
+    DTF_LLLL_Tight_MASS = DecayTreeFitter(
+        name='DTF_LLLL_Tight_mass',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTF_LLLL_Tight_MASS_PV = DecayTreeFitter(
+        'DTF_LLLL_Tight_MASS_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_Tight, pv_constraint=False, mass_constraint=False) +\
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_Tight_PV, pv_constraint=True, mass_constraint=False) +\
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_Tight, pv_constraint=False, mass_constraint=False) +\
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_Tight_PV, pv_constraint=True, mass_constraint=False) +\
+
+    variables = {"pip1": basic_variables,
+                 "pim1": basic_variables,
+                 "pip2": basic_variables,
+                 "pim2": basic_variables,
+                 "KS1": composite_variables,
+                 "KS2": composite_variables,
+                 "D0": composite_variables + topo_sv_var,
+                 "Dst": composite_variables,
+                 "pi_soft": basic_variables,
+    }
+
+    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    mytuple = Funtuple(
+        "DstToD0PiToKS0KS0_LLLL_Tight",
+        "Tuple",
+        fields=fields,
+        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data, store_multiple_cand_info=True)
+
+    return [my_filter, mytuple]
+
+############################# LLDD #############################
+def maketuple_Dst2D0pi_D02KSKS_LLDD(options, pvs, rec_summary):
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLDD"
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+
+    fields = {
+        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
+        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
+        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
+    }
+
+    # DTF_LLDD = DecayTreeFitter(
+    #     name='DTF_LLDD',
+    #     input_particles=input_data)
+    #
+    # DTF_LLDD_PV = DecayTreeFitter(
+    #     name='DTF_LLDD_PV',
+    #     input_particles=input_data,
+    #     input_pvs=pvs)
+
+    DTF_LLDD_MASS = DecayTreeFitter(
+        name='DTF_LLDD_mass',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTF_LLDD_MASS_PV = DecayTreeFitter(
+        'DTF_LLDD_MASS_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLDD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLDD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLDD, pv_constraint=False, mass_constraint=False) +\
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLDD_PV, pv_constraint=True, mass_constraint=False) +\
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD, pv_constraint=False, mass_constraint=False) +\
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_PV, pv_constraint=True, mass_constraint=False) +\
+
+    variables = {"pip1": basic_variables,
+                 "pim1": basic_variables,
+                 "pip2": basic_variables,
+                 "pim2": basic_variables,
+                 "KS1": composite_variables,
+                 "KS2": composite_variables,
+                 "D0": composite_variables + topo_sv_var,
+                 "Dst": composite_variables,
+                 "pi_soft": basic_variables,
+    }
+
+    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    mytuple = Funtuple(
+        "DstToD0PiToKS0KS0_LLDD",
+        "Tuple",
+        fields=fields,
+        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data, store_multiple_cand_info=True)
+
+    return [my_filter, mytuple]
+
+############################# LLDD Tight #############################
+def maketuple_Dst2D0pi_D02KSKS_LLDD_Tight(options, pvs, rec_summary):
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLDD_Tight"
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+
+    fields = {
+        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
+        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
+        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
+    }
+
+    # DTF_LLDD_Tight = DecayTreeFitter(
+    #     name='DTF_LLDD_Tight',
+    #     input_particles=input_data)
+    #
+    # DTF_LLDD_Tight_PV = DecayTreeFitter(
+    #     name='DTF_LLDD_Tight_PV',
+    #     input_particles=input_data,
+    #     input_pvs=pvs)
+
+    DTF_LLDD_Tight_MASS = DecayTreeFitter(
+        name='DTF_LLDD_Tight_mass',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTF_LLDD_Tight_MASS_PV = DecayTreeFitter(
+        'DTF_LLDD_Tight_MASS_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False, DTF=DTF_LLDD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False, DTF=DTF_LLDD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLDD_Tight, pv_constraint=False, mass_constraint=False) +\
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLDD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_Tight, pv_constraint=False, mass_constraint=False) +\
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
+
+    variables = {"pip1": basic_variables,
+                 "pim1": basic_variables,
+                 "pip2": basic_variables,
+                 "pim2": basic_variables,
+                 "KS1": composite_variables,
+                 "KS2": composite_variables,
+                 "D0": composite_variables + topo_sv_var,
+                 "Dst": composite_variables,
+                 "pi_soft": basic_variables,
+    }
+
+    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    mytuple = Funtuple(
+        "DstToD0PiToKS0KS0_LLDD_Tight",
+        "Tuple",
+        fields=fields,
+        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data, store_multiple_cand_info=True)
+
+    return [my_filter, mytuple]
+
+############################# DDDD #############################
+def maketuple_Dst2D0pi_D02KSKS_DDDD(options, pvs, rec_summary):
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDDD"
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+
+    fields = {
+        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
+        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
+        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
+    }
+
+    # DTF_DDDD = DecayTreeFitter(
+    #     name='DTF_DDDD',
+    #     input_particles=input_data)
+    #
+    # DTF_DDDD_PV = DecayTreeFitter(
+    #     name='DTF_DDDD_PV',
+    #     input_particles=input_data,
+    #     input_pvs=pvs)
+
+    DTF_DDDD_MASS = DecayTreeFitter(
+        name='DTF_DDDD_mass',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTF_DDDD_MASS_PV = DecayTreeFitter(
+        'DTF_DDDD_MASS_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD, pv_constraint=False, mass_constraint=False) +\
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_PV, pv_constraint=True, mass_constraint=False) +\
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD, pv_constraint=False, mass_constraint=False) +\
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_PV, pv_constraint=True, mass_constraint=False) +\
+
+    variables = {"pip1": basic_variables,
+                 "pim1": basic_variables,
+                 "pip2": basic_variables,
+                 "pim2": basic_variables,
+                 "KS1": composite_variables,
+                 "KS2": composite_variables,
+                 "D0": composite_variables + topo_sv_var,
+                 "Dst": composite_variables,
+                 "pi_soft": basic_variables,
+    }
+
+    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    mytuple = Funtuple(
+        "DstToD0PiToKS0KS0_DDDD",
+        "Tuple",
+        fields=fields,
+        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data, store_multiple_cand_info=True)
+
+    return [my_filter, mytuple]
+
+############################# DDDD Tight #############################
+def maketuple_Dst2D0pi_D02KSKS_DDDD_Tight(options, pvs, rec_summary):
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDDD_Tight"
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+
+    fields = {
+        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
+        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
+        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
+    }
+
+    # DTF_DDDD_Tight = DecayTreeFitter(
+    #     name='DTF_DDDD_Tight',
+    #     input_particles=input_data)
+    #
+    # DTF_DDDD_Tight_PV = DecayTreeFitter(
+    #     name='DTF_DDDD_Tight_PV',
+    #     input_particles=input_data,
+    #     input_pvs=pvs)
+
+    DTF_DDDD_Tight_MASS = DecayTreeFitter(
+        name='DTF_DDDD_Tight_mass',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTF_DDDD_Tight_MASS_PV = DecayTreeFitter(
+        'DTF_DDDD_Tight_MASS_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_Tight, pv_constraint=False, mass_constraint=False) +\
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_Tight, pv_constraint=False, mass_constraint=False) +\
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
+
+    variables = {"pip1": basic_variables,
+                 "pim1": basic_variables,
+                 "pip2": basic_variables,
+                 "pim2": basic_variables,
+                 "KS1": composite_variables,
+                 "KS2": composite_variables,
+                 "D0": composite_variables + topo_sv_var,
+                 "Dst": composite_variables,
+                 "pi_soft": basic_variables,
+    }
+
+    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    mytuple = Funtuple(
+        "DstToD0PiToKS0KS0_DDDD_Tight",
+        "Tuple",
+        fields=fields,
+        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data, store_multiple_cand_info=True)
+
+    return [my_filter, mytuple]
+
+############################# ULLL #############################
+def maketuple_Dst2D0pi_D02KSKS_ULLL(options, pvs, rec_summary):
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULLL"
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+
+    fields = {
+        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
+        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
+        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
+    }
+
+    # DTF_ULLL = DecayTreeFitter(
+    #     name='DTF_ULLL',
+    #     input_particles=input_data)
+    #
+    # DTF_ULLL_PV = DecayTreeFitter(
+    #     name='DTF_ULLL_PV',
+    #     input_particles=input_data,
+    #     input_pvs=pvs)
+
+    DTF_ULLL_MASS = DecayTreeFitter(
+        name='DTF_ULLL_mass',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTF_ULLL_MASS_PV = DecayTreeFitter(
+        'DTF_ULLL_MASS_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL, pv_constraint=False, mass_constraint=False) +\
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_PV, pv_constraint=True, mass_constraint=False) +\
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL, pv_constraint=False, mass_constraint=False) +\
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_PV, pv_constraint=True, mass_constraint=False) +\
+
+    variables = {"pip1": basic_variables,
+                 "pim1": basic_variables,
+                 "pip2": basic_variables,
+                 "pim2": basic_variables,
+                 "KS1": composite_variables,
+                 "KS2": composite_variables,
+                 "D0": composite_variables + topo_sv_var,
+                 "Dst": composite_variables,
+                 "pi_soft": basic_variables,
+    }
+
+    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    mytuple = Funtuple(
+        "DstToD0PiToKS0KS0_ULLL",
+        "Tuple",
+        fields=fields,
+        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data, store_multiple_cand_info=True)
+
+    return [my_filter, mytuple]
+
+############################# ULLL Tight #############################
+def maketuple_Dst2D0pi_D02KSKS_ULLL_Tight(options, pvs, rec_summary):
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULLL_Tight"
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+
+    fields = {
+        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
+        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
+        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
+    }
+
+    # DTF_ULLL_Tight = DecayTreeFitter(
+    #     name='DTF_ULLL_Tight',
+    #     input_particles=input_data)
+    #
+    # DTF_ULLL_Tight_PV = DecayTreeFitter(
+    #     name='DTF_ULLL_Tight_PV',
+    #     input_particles=input_data,
+    #     input_pvs=pvs)
+
+    DTF_ULLL_Tight_MASS = DecayTreeFitter(
+        name='DTF_ULLL_Tight_mass',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTF_ULLL_Tight_MASS_PV = DecayTreeFitter(
+        'DTF_ULLL_Tight_MASS_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_Tight, pv_constraint=False, mass_constraint=False) +\
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_Tight_PV, pv_constraint=True, mass_constraint=False) +\
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_Tight, pv_constraint=False, mass_constraint=False) +\
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_Tight_PV, pv_constraint=True, mass_constraint=False) +\
+
+    variables = {"pip1": basic_variables,
+                 "pim1": basic_variables,
+                 "pip2": basic_variables,
+                 "pim2": basic_variables,
+                 "KS1": composite_variables,
+                 "KS2": composite_variables,
+                 "D0": composite_variables + topo_sv_var,
+                 "Dst": composite_variables,
+                 "pi_soft": basic_variables,
+    }
+
+    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    mytuple = Funtuple(
+        "DstToD0PiToKS0KS0_ULLL_Tight",
+        "Tuple",
+        fields=fields,
+        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data, store_multiple_cand_info=True)
+
+    return [my_filter, mytuple]
+
+############################# ULDD #############################
+def maketuple_Dst2D0pi_D02KSKS_ULDD(options, pvs, rec_summary):
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULDD"
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+
+    fields = {
+        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
+        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
+        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
+    }
+
+    # DTF_ULDD = DecayTreeFitter(
+    #     name='DTF_ULDD',
+    #     input_particles=input_data)
+    #
+    # DTF_ULDD_PV = DecayTreeFitter(
+    #     name='DTF_ULDD_PV',
+    #     input_particles=input_data,
+    #     input_pvs=pvs)
+
+    DTF_ULDD_MASS = DecayTreeFitter(
+        name='DTF_ULDD_mass',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTF_ULDD_MASS_PV = DecayTreeFitter(
+        'DTF_ULDD_MASS_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD, pv_constraint=False, mass_constraint=False) +\
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_PV, pv_constraint=True, mass_constraint=False) +\
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD, pv_constraint=False, mass_constraint=False) +\
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_PV, pv_constraint=True, mass_constraint=False) +\
+
+    variables = {"pip1": basic_variables,
+                 "pim1": basic_variables,
+                 "pip2": basic_variables,
+                 "pim2": basic_variables,
+                 "KS1": composite_variables,
+                 "KS2": composite_variables,
+                 "D0": composite_variables + topo_sv_var,
+                 "Dst": composite_variables,
+                 "pi_soft": basic_variables,
+    }
+
+    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    mytuple = Funtuple(
+        "DstToD0PiToKS0KS0_ULDD",
+        "Tuple",
+        fields=fields,
+        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data, store_multiple_cand_info=True)
+
+    return [my_filter, mytuple]
+
+############################# ULDD Tight #############################
+def maketuple_Dst2D0pi_D02KSKS_ULDD_Tight(options, pvs, rec_summary):
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULDD_Tight"
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+
+    fields = {
+        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
+        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
+        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
+    }
+
+    # DTF_ULDD_Tight = DecayTreeFitter(
+    #     name='DTF_ULDD_Tight',
+    #     input_particles=input_data)
+    #
+    # DTF_ULDD_Tight_PV = DecayTreeFitter(
+    #     name='DTF_ULDD_Tight_PV',
+    #     input_particles=input_data,
+    #     input_pvs=pvs)
+
+    DTF_ULDD_Tight_MASS = DecayTreeFitter(
+        name='DTF_ULDD_Tight_mass',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTF_ULDD_Tight_MASS_PV = DecayTreeFitter(
+        'DTF_ULDD_Tight_MASS_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_Tight, pv_constraint=False, mass_constraint=False) +\
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_Tight, pv_constraint=False, mass_constraint=False) +\
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
+
+    variables = {"pip1": basic_variables,
+                 "pim1": basic_variables,
+                 "pip2": basic_variables,
+                 "pim2": basic_variables,
+                 "KS1": composite_variables,
+                 "KS2": composite_variables,
+                 "D0": composite_variables + topo_sv_var,
+                 "Dst": composite_variables,
+                 "pi_soft": basic_variables,
+    }
+
+    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    mytuple = Funtuple(
+        "DstToD0PiToKS0KS0_ULDD_Tight",
+        "Tuple",
+        fields=fields,
+        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data, store_multiple_cand_info=True)
+
+    return [my_filter, mytuple]
+
+############################# LLLD #############################
+def maketuple_Dst2D0pi_D02KSKS_LLLD(options, pvs, rec_summary):
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLD"
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+
+    fields = {
+        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
+        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
+        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
+    }
+
+    # DTF_LLLD = DecayTreeFitter(
+    #     name='DTF_LLLD',
+    #     input_particles=input_data)
+    #
+    # DTF_LLLD_PV = DecayTreeFitter(
+    #     name='DTF_LLLD_PV',
+    #     input_particles=input_data,
+    #     input_pvs=pvs)
+
+    DTF_LLLD_MASS = DecayTreeFitter(
+        name='DTF_LLLD_mass',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTF_LLLD_MASS_PV = DecayTreeFitter(
+        'DTF_LLLD_MASS_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD, pv_constraint=False, mass_constraint=False) +\
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_PV, pv_constraint=True, mass_constraint=False) +\
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD, pv_constraint=False, mass_constraint=False) +\
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_PV, pv_constraint=True, mass_constraint=False) +\
+
+    variables = {"pip1": basic_variables,
+                 "pim1": basic_variables,
+                 "pip2": basic_variables,
+                 "pim2": basic_variables,
+                 "KS1": composite_variables,
+                 "KS2": composite_variables,
+                 "D0": composite_variables + topo_sv_var,
+                 "Dst": composite_variables,
+                 "pi_soft": basic_variables,
+    }
+
+    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    mytuple = Funtuple(
+        "DstToD0PiToKS0KS0_LLLD",
+        "Tuple",
+        fields=fields,
+        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data, store_multiple_cand_info=True)
+
+    return [my_filter, mytuple]
+
+############################# LLLD Tight #############################
+def maketuple_Dst2D0pi_D02KSKS_LLLD_Tight(options, pvs, rec_summary):
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLD_Tight"
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+
+    fields = {
+        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
+        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
+        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
+    }
+
+    # DTF_LLLD_Tight = DecayTreeFitter(
+    #     name='DTF_LLLD_Tight',
+    #     input_particles=input_data)
+    #
+    # DTF_LLLD_Tight_PV = DecayTreeFitter(
+    #     name='DTF_LLLD_Tight_PV',
+    #     input_particles=input_data,
+    #     input_pvs=pvs)
+
+    DTF_LLLD_Tight_MASS = DecayTreeFitter(
+        name='DTF_LLLD_Tight_mass',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTF_LLLD_Tight_MASS_PV = DecayTreeFitter(
+        'DTF_LLLD_Tight_MASS_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_Tight, pv_constraint=False, mass_constraint=False) +\
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_Tight, pv_constraint=False, mass_constraint=False) +\
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
+
+    variables = {"pip1": basic_variables,
+                 "pim1": basic_variables,
+                 "pip2": basic_variables,
+                 "pim2": basic_variables,
+                 "KS1": composite_variables,
+                 "KS2": composite_variables,
+                 "D0": composite_variables + topo_sv_var,
+                 "Dst": composite_variables,
+                 "pi_soft": basic_variables,
+    }
+
+    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    mytuple = Funtuple(
+        "DstToD0PiToKS0KS0_LLLD_Tight",
+        "Tuple",
+        fields=fields,
+        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data, store_multiple_cand_info=True)
+
+    return [my_filter, mytuple]
+
+############################# DDLD #############################
+def maketuple_Dst2D0pi_D02KSKS_DDLD(options, pvs, rec_summary):
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDLD"
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+
+    fields = {
+        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
+        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
+        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
+    }
+
+    # DTF_DDLD = DecayTreeFitter(
+    #     name='DTF_DDLD',
+    #     input_particles=input_data)
+    #
+    # DTF_DDLD_PV = DecayTreeFitter(
+    #     name='DTF_DDLD_PV',
+    #     input_particles=input_data,
+    #     input_pvs=pvs)
+
+    DTF_DDLD_MASS = DecayTreeFitter(
+        name='DTF_DDLD_mass',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTF_DDLD_MASS_PV = DecayTreeFitter(
+        'DTF_DDLD_MASS_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD, pv_constraint=False, mass_constraint=False) +\
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_PV, pv_constraint=True, mass_constraint=False) +\
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD, pv_constraint=False, mass_constraint=False) +\
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_PV, pv_constraint=True, mass_constraint=False) +\
+
+    variables = {"pip1": basic_variables,
+                 "pim1": basic_variables,
+                 "pip2": basic_variables,
+                 "pim2": basic_variables,
+                 "KS1": composite_variables,
+                 "KS2": composite_variables,
+                 "D0": composite_variables + topo_sv_var,
+                 "Dst": composite_variables,
+                 "pi_soft": basic_variables,
+    }
+
+    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    mytuple = Funtuple(
+        "DstToD0PiToKS0KS0_DDLD",
+        "Tuple",
+        fields=fields,
+        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data, store_multiple_cand_info=True)
+
+    return [my_filter, mytuple]
+
+############################# DDLD Tight #############################
+def maketuple_Dst2D0pi_D02KSKS_DDLD_Tight(options, pvs, rec_summary):
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDLD_Tight"
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+
+    fields = {
+        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
+        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
+        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
+        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
+    }
+
+    # DTF_DDLD_Tight = DecayTreeFitter(
+    #     name='DTF_DDLD_Tight',
+    #     input_particles=input_data)
+    #
+    # DTF_DDLD_Tight_PV = DecayTreeFitter(
+    #     name='DTF_DDLD_Tight_PV',
+    #     input_particles=input_data,
+    #     input_pvs=pvs)
+
+    DTF_DDLD_Tight_MASS = DecayTreeFitter(
+        name='DTF_DDLD_Tight_mass',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTF_DDLD_Tight_MASS_PV = DecayTreeFitter(
+        'DTF_DDLD_Tight_MASS_PV',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_Tight, pv_constraint=False, mass_constraint=False) +\
+        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
+
+    composite_variables = make_composite_variables(options, pvs, input_data) +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
+        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_Tight, pv_constraint=False, mass_constraint=False) +\
+        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
+
+    variables = {"pip1": basic_variables,
+                 "pim1": basic_variables,
+                 "pip2": basic_variables,
+                 "pim2": basic_variables,
+                 "KS1": composite_variables,
+                 "KS2": composite_variables,
+                 "D0": composite_variables + topo_sv_var,
+                 "Dst": composite_variables,
+                 "pi_soft": basic_variables,
+    }
+
+    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    mytuple = Funtuple(
+        "DstToD0PiToKS0KS0_DDLD_Tight",
+        "Tuple",
+        fields=fields,
+        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data, store_multiple_cand_info=True)
+
+    return [my_filter, mytuple]
diff --git a/Charm_2024validation/options/d0_to_ksks_MC.py b/Charm_2024validation/options/d0_to_ksks_MC.py
new file mode 100644
index 0000000000..06c1ac6139
--- /dev/null
+++ b/Charm_2024validation/options/d0_to_ksks_MC.py
@@ -0,0 +1,46 @@
+from .tupling import (
+    make_MC_composite_variables,
+    make_MC_basic_variables,
+    make_MC_event_variables,
+)
+
+from PyConf.reading import get_mc_particles, get_mc_header
+from FunTuple import FunTuple_MCParticles as FuntupleMC
+
+############################# LLLL #############################
+def maketuple_MC_Dst2D0pi_D02KSKS_LLLL(options, pvs, rec_summary):
+    name = "MC_DstpToD0Pip_D0ToKsKs_LLLL"
+    line = "/Event/MC/Particles"
+
+    input_data = get_mc_particles(f"{line}")
+
+    fields = {
+        "Dst": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi+ pi-) (KS0 ==> pi+ pi-) ) pi+]CC",
+        "D0": "[D*(2010)+ ==> ^([D0]CC ==> (KS0 ==> pi+ pi-) (KS0 ==> pi+ pi-) ) pi+]CC",
+        "KS1": "[D*(2010)+ ==> ([D0]CC ==> ^(KS0 ==> pi+ pi-) (KS0 ==> pi+ pi-) ) pi+]CC",
+        "KS2": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi+ pi-) ^(KS0 ==> pi+ pi-) ) pi+]CC",
+        "pip1": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> ^pi+ pi-) (KS0 ==> pi+ pi-) ) pi+]CC",
+        "pim1": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi+ ^pi-) (KS0 ==> pi+ pi-) ) pi+]CC",
+        "pip2": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi+ pi-) (KS0 ==> ^pi+ pi-) ) pi+]CC",
+        "pim2": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi+ pi-) (KS0 ==> pi+ ^pi-) ) pi+]CC",
+        "pi_soft": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi+ pi-) (KS0 ==> pi+ pi-) ) ^pi+]CC",
+    }
+
+    variables = {"pip1":  make_MC_basic_variables(),
+                 "pim1":  make_MC_basic_variables(),
+                 "pip2":  make_MC_basic_variables(),
+                 "pim2":  make_MC_basic_variables(),
+                 "KS1": make_MC_composite_variables(),
+                 "KS2": make_MC_composite_variables(),
+                 "D0": make_MC_composite_variables(),
+                 "Dst": make_MC_composite_variables(),
+                 "pi_soft":  make_MC_basic_variables(),
+    }
+
+    mytuple  = FuntupleMC(name=name,
+                          tuple_name="MCDecayTree",
+                          fields=fields, variables = variables,
+                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
+                          inputs=input_data)
+
+    return [mytuple]
diff --git a/Charm_2024validation/options/d_to_hhh.py b/Charm_2024validation/options/d_to_hhh.py
new file mode 100644
index 0000000000..d10fa039f6
--- /dev/null
+++ b/Charm_2024validation/options/d_to_hhh.py
@@ -0,0 +1,503 @@
+from .tupling import (
+    make_composite_variables_3body,
+    make_b_composite_variables,
+    make_composite_variables,
+    make_basic_variables,
+    make_hlt2_event_variables,
+    make_composite_dtf_variables_3body,
+    make_basic_dtf_variables,
+)
+
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from FunTuple import FunTuple_Particles as Funtuple
+
+
+def make_dtf_variables(options, pvs, input_data, ptype):
+
+    if ptype not in ["basic", "composite"]:
+        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
+
+    from DecayTreeFitter import DecayTreeFitter
+    
+    DTF = DecayTreeFitter(
+        name=f'DTF_{{hash}}',
+        input_particles=input_data)
+
+    DTFvtx = DecayTreeFitter(
+        name=f'DTFvtx_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    DTFmassDp = DecayTreeFitter(
+        name=f'DTFmassDp_{{hash}}',
+        input_particles=input_data,
+        mass_constraints=["D+"])
+
+    DTFvtxmassDp = DecayTreeFitter(
+        name=f'DTFvtxmassDp_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D+"])
+
+    DTFmassDsp = DecayTreeFitter(
+        name=f'DTFmassDsp_{{hash}}',
+        input_particles=input_data,
+        substitutions = ['D+{{D_s+}}'],
+        mass_constraints=["D_s+"])
+
+    DTFvtxmassDsp = DecayTreeFitter(
+        name=f'DTFvtxmassDsp_{{hash}}',
+        input_particles=input_data,
+        substitutions = ['D+{{D_s+}}',"KS0{{KS0}}"],#trick
+        mass_constraints=["D_s+"],
+        input_pvs=pvs,
+    )
+
+    if ptype == "basic":
+        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassDp,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="Dp")
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassDp,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="Dp")
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassDsp,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="Dsp")
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassDsp,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="Dsp")
+        return dtf_vars
+
+    if ptype == "composite":
+        dtf_vars = make_composite_dtf_variables_3body(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
+                                             DTF=DTFmassDp,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="Dp")
+        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
+                                             DTF=DTFvtxmassDp,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="Dp")
+        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
+                                             DTF=DTFmassDsp,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="Dsp")
+        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
+                                             DTF=DTFvtxmassDsp,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="Dsp")
+        return dtf_vars
+
+
+def maketuple_D2Kpipi(options, pvs, rec_summary, _NoCuts=False):
+    name = "D2Kpipi"
+    turbo_line = "Hlt2Charm_DpDspToKmPipPip"
+    if _NoCuts == True:
+        turbo_line += "_NoCuts"
+        name += "_NoCuts"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> K- pi+ pi+]CC",
+        "Km"   : "[D+ -> ^K- pi+ pi+]CC",
+        "pip1"  : "[D+ -> K- ^pi+ pi+]CC",
+        "pip2" : "[D+ -> K- pi+ ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2pipipi(options, pvs, rec_summary, _NoCuts=False):
+    name = "D2pipipi"
+    turbo_line = "Hlt2Charm_DpDspToPimPipPip"
+    if _NoCuts == True:
+        turbo_line += "_NoCuts"
+        name += "_NoCuts"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> pi- pi+ pi+]CC",
+        "pim"   : "[D+ -> ^pi- pi+ pi+]CC",
+        "pip1"  : "[D+ -> pi- ^pi+ pi+]CC",
+        "pip2" : "[D+ -> pi- pi+ ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Ds2KKpi(options, pvs, rec_summary, _NoCuts=False):
+    name = "Ds2KKpi"
+    turbo_line = "Hlt2Charm_DpDspToKmKpPip"
+    if _NoCuts == True:
+        turbo_line += "_NoCuts"
+        name += "_NoCuts"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> K- K+ pi+]CC",
+        "Km"   : "[D+ -> ^K- K+ pi+]CC",
+        "Kp"  : "[D+ -> K- ^K+ pi+]CC",
+        "pip" : "[D+ -> K- K+ ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+    
+    return [myfilter, mytuple]
+
+def maketuple_D2Kpipi_Kpi(options, pvs, rec_summary):
+    name = "D2Kpipi_Kpi"
+    turbo_line = "Hlt2Charm_DpDspToKmPipPip"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> (KS0 -> K- pi+) pi+]CC",
+        "Kst" : "[D+ -> ^(KS0 -> K- pi+) pi+]CC",
+        "Km"   : "[D+ -> (KS0 -> ^K- pi+) pi+]CC",
+        "pip"  : "[D+ -> (KS0 -> K- ^pi+) pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data),
+        "Kst"   : make_composite_variables(options, pvs, input_data),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, use_loki_decay_finder=True)
+
+    return [myfilter, mytuple]
+
+
+
+
+    '''
+    from PyConf.Algorithms import ThOrParticleSelection
+    import Functors as F
+    FILTER_TREE = lambda id: F.FILTER(F.IS_ABS_ID(id)) @ F.GET_ALL_DESCENDANTS()
+    Km_data = ThOrParticleSelection(
+    InputParticles=input_data, Functor=FILTER_TREE("[K-]CC")
+).OutputSelection
+    pip_data = ThOrParticleSelection(
+        InputParticles=input_data, Functor=FILTER_TREE("[pi+]CC")
+).OutputSelection
+    
+    
+    from PyConf.Algorithms import ChargedBasicsProducer, UniqueIDGeneratorAlg
+    from PyConf.Algorithms import ThOrCombiner__2ChargedBasics, ThOrCombiner__2Particle
+    # make unique_id_generator
+    unique_id_gen = UniqueIDGeneratorAlg()
+    '''
+    '''
+    # produce charged basic particles
+    produce_kaons = ChargedBasicsProducer(
+        InputUniqueIDGenerator=unique_id_gen, ParticleID="kaon")
+    produce_pions = ChargedBasicsProducer(
+        InputUniqueIDGenerator=unique_id_gen, ParticleID="pion")
+    produce_jpsi = ThOrCombiner__2ChargedBasics(
+    '''
+    '''
+    produce_jpsi = ThOrCombiner__2Particle(
+        InputUniqueIDGenerator=unique_id_gen,
+        DecayDescriptor="[J/psi(1S) -> K- pi+]cc",
+        #Input1=produce_kaons.Particles,
+        #Input2=produce_pions.Particles,
+        Input1=Km_data,
+        Input2=pip_data,
+    )
+    input_data = produce_jpsi.Output
+
+    branches = {
+        "Jpsi" : "[J/psi(1S) -> K- pi+]CC",
+    }
+
+    from FunTuple import FunctorCollection
+    import Functors as F
+    variables = {
+        #"Dp"   : make_composite_variables(options, pvs, input_data, False, False),
+        #"Jpsi"   : make_composite_variables(options, pvs, input_data, False, False),
+        "Jpsi"   : FunctorCollection({
+            "PX": F.PX,
+            "PY": F.PY,
+            "PZ": F.PZ,
+            "BPVDIRA": F.BPVDIRA(pvs),
+            "VCHI2DOF": F.CHI2DOF, #CHI2VXNDOF
+            "BPVIPCHI2": F.BPVIPCHI2(pvs),
+            "BPVIP": F.BPVIP(pvs),
+        }),
+        
+    }
+
+    from FunTuple import FunTuple_Composites as Funtuple
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables, inputs=input_data, store_multiple_cand_info=True)
+    ## add event_variables
+
+    
+    return [myfilter, mytuple]
+    '''
+    '''
+    from PyConf.control_flow import CompositeNode, NodeLogic
+    from PyConf.Algorithms import PrintDecayTree, PrintHeader
+    from RecoConf.reconstruction_objects import upfront_reconstruction
+    from DaVinci.common_particles import make_std_loose_jpsi2mum
+    jpsis = make_std_loose_jpsi2mumu()
+    pdt = PrintDecayTree(name="PrintJpsis", Input=jpsis)
+    algs = upfront_reconstruction() + [jpsis, pdt]
+
+    node = CompositeNode(
+    "PrintJpsiNode", children=algs, combine_logic=NodeLogic.NONLAZY_AND
+)
+    return [node]
+    
+    '''
+
+
+def maketuple_D2pipiK(options, pvs, rec_summary, _NoCuts=False):
+    name = "D2pipiK"
+    turbo_line = "Hlt2Charm_DpDspToKpPimPip"
+    if _NoCuts == True:
+        turbo_line += "_NoCuts"
+        name += "_NoCuts"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> pi- pi+ K+]CC",
+        "p1"   : "[D+ -> ^pi- pi+ K+]CC",
+        "p2"  : "[D+ -> pi- ^pi+ K+]CC",
+        "p3" : "[D+ -> pi- pi+ ^K+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
+        "p1"     : make_basic_variables(options, pvs, input_data),
+        "p2"    : make_basic_variables(options, pvs, input_data),
+        "p3"   : make_basic_variables(options, pvs, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2KKK(options, pvs, rec_summary, _NoCuts=False):
+    name = "D2KKK"
+    turbo_line = "Hlt2Charm_DpDspToKmKpKp"
+    if _NoCuts == True:
+        turbo_line += "_NoCuts"
+        name += "_NoCuts"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> K- K+ K+]CC",
+        "p1"   : "[D+ -> ^K- K+ K+]CC",
+        "p2"  : "[D+ -> K- ^K+ K+]CC",
+        "p3" : "[D+ -> K- K+ ^K+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
+        "p1"     : make_basic_variables(options, pvs, input_data),
+        "p2"    : make_basic_variables(options, pvs, input_data),
+        "p3"   : make_basic_variables(options, pvs, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2piKK(options, pvs, rec_summary, _NoCuts=False):
+    name = "D2piKK"
+    turbo_line = "Hlt2Charm_DpDspToKpKpPim"
+    if _NoCuts == True:
+        turbo_line += "_NoCuts"
+        name += "_NoCuts"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> pi- K+ K+]CC",
+        "p1"   : "[D+ -> ^pi- K+ K+]CC",
+        "p2"  : "[D+ -> pi- ^K+ K+]CC",
+        "p3" : "[D+ -> pi- K+ ^K+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
+        "p1"     : make_basic_variables(options, pvs, input_data),
+        "p2"    : make_basic_variables(options, pvs, input_data),
+        "p3"   : make_basic_variables(options, pvs, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+def maketuple_B02Dpi_D2KKpi(options, pvs, rec_summary):
+    name = "B02Dpi_D2KKpi"
+    turbo_line = "Hlt2Charm_B0ToDmPip_DmToKmKpPim"
+    
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+    
+    branches = {
+        "B0" : "[[B0]CC -> (D- -> K- K+ pi-) pi+]CC",
+        "pip" : "[[B0]CC -> (D- -> K- K+ pi-) ^pi+]CC",
+        "Dm" : "[[B0]CC -> ^(D- -> K- K+ pi-) pi+]CC",
+        "p1" : "[[B0]CC -> (D- -> ^K- K+ pi-) pi+]CC",
+        "p2" : "[[B0]CC -> (D- -> K- ^K+ pi-) pi+]CC",
+        "p3" : "[[B0]CC -> (D- -> K- K+ ^pi-) pi+]CC",
+    }
+    
+    variables = {
+        "B0" : make_b_composite_variables(options, pvs, input_data),
+        "pip" : make_basic_variables(options, pvs,input_data),
+        "Dm"   : make_composite_variables_3body(options, pvs, input_data),
+        "p1"     : make_basic_variables(options, pvs, input_data),
+        "p2"    : make_basic_variables(options, pvs, input_data),
+        "p3"   : make_basic_variables(options, pvs, input_data),        
+    }
+    
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+def maketuple_B02Dpi_D2pipipi(options, pvs, rec_summary, _NoCuts=False):    
+    name = "B02Dpi_D2pipipi"
+    turbo_line = "Hlt2Charm_B0ToDmPip_DmToPimPimPip"
+    
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+    
+    branches = {
+        "B0" : "[[B0]CC -> (D- -> pi- pi- pi+) pi+]CC",
+        "pip" : "[[B0]CC -> (D- -> pi- pi- pi+) ^pi+]CC",
+        "Dm" : "[[B0]CC -> ^(D- -> pi- pi- pi+) pi+]CC",
+        "p1" : "[[B0]CC -> (D- -> ^pi- pi- pi+) pi+]CC",
+        "p2" : "[[B0]CC -> (D- -> pi- ^pi- pi+) pi+]CC",
+        "p3" : "[[B0]CC -> (D- -> pi- pi- ^pi+) pi+]CC",
+    }
+    
+    variables = {
+        "B0" : make_b_composite_variables(options, pvs, input_data),
+        "pip" : make_basic_variables(options, pvs,input_data),
+        "Dm"   : make_composite_variables_3body(options, pvs, input_data),
+        "p1"     : make_basic_variables(options, pvs, input_data),
+        "p2"    : make_basic_variables(options, pvs, input_data),
+        "p3"   : make_basic_variables(options, pvs, input_data),        
+    }
+    
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+    
+def maketuple_Bs02Dspi_Ds2KKpi(options, pvs, rec_summary, _NoCuts=False):    
+    name = "Bs02Dspi_Ds2KKpi"
+    turbo_line = "Hlt2Charm_Bs0ToDsmPip_DsmToKmKpPim"
+    
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+    
+    branches = {
+        "Bs0" : "[[B_s0]CC -> (D_s- -> K- K+ pi-) pi+]CC",
+        "pip" : "[[B_s0]CC -> (D_s- -> K- K+ pi-) ^pi+]CC",
+        "Dsm" : "[[B_s0]CC -> ^(D_s- -> K- K+ pi-) pi+]CC",
+        "p1" : "[[B_s0]CC -> (D_s- -> ^K- K+ pi-) pi+]CC",
+        "p2" : "[[B_s0]CC -> (D_s- -> K- ^K+ pi-) pi+]CC",
+        "p3" : "[[B_s0]CC -> (D_s- -> K- K+ ^pi-) pi+]CC",
+    }
+    
+    variables = {
+        "Bs0" : make_b_composite_variables(options, pvs, input_data),
+        "pip" : make_basic_variables(options, pvs,input_data),
+        "Dsm"   : make_composite_variables_3body(options, pvs, input_data),
+        "p1"     : make_basic_variables(options, pvs, input_data),
+        "p2"    : make_basic_variables(options, pvs, input_data),
+        "p3"   : make_basic_variables(options, pvs, input_data),        
+    }
+    
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+    
+def maketuple_Bs02Dspi_Ds2pipipi(options, pvs, rec_summary, _NoCuts=False):
+    name = "Bs02Dspi_Ds2pipipi"
+    turbo_line = "Hlt2Charm_Bs0ToDsmPip_DsmToPimPimPip"
+    
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+    
+    branches = {
+        "Bs0" : "[[B_s0]CC -> (D_s- -> pi- pi- pi+) pi+]CC",
+        "pip" : "[[B_s0]CC -> (D_s- -> pi- pi- pi+) ^pi+]CC",
+        "Dsm" : "[[B_s0]CC -> ^(D_s- -> pi- pi- pi+) pi+]CC",
+        "p1" : "[[B_s0]CC -> (D_s- -> ^pi- pi- pi+) pi+]CC",
+        "p2" : "[[B_s0]CC -> (D_s- -> pi- ^pi- pi+) pi+]CC",
+        "p3" : "[[B_s0]CC -> (D_s- -> pi- pi- ^pi+) pi+]CC",
+    }
+    
+    variables = {
+        "Bs0" : make_b_composite_variables(options, pvs, input_data),
+        "pip" : make_basic_variables(options, pvs,input_data),
+        "Dsm"   : make_composite_variables_3body(options, pvs, input_data),
+        "p1"     : make_basic_variables(options, pvs, input_data),
+        "p2"    : make_basic_variables(options, pvs, input_data),
+        "p3"   : make_basic_variables(options, pvs, input_data),        
+    }
+    
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
diff --git a/Charm_2024validation/options/d_to_hhh_MC.py b/Charm_2024validation/options/d_to_hhh_MC.py
new file mode 100644
index 0000000000..e666e5f3ce
--- /dev/null
+++ b/Charm_2024validation/options/d_to_hhh_MC.py
@@ -0,0 +1,92 @@
+from .tupling import (
+    make_MC_composite_variables,
+    make_MC_basic_variables,
+    make_MC_event_variables,
+)
+
+from PyConf.reading import get_mc_particles, get_mc_header
+from FunTuple import FunTuple_MCParticles as FuntupleMC
+
+def maketuple_MC_D2Kpipi(options, pvs, rec_summary):
+    name = "MC_D2Kpipi"
+    line = "/Event/MC/Particles"
+
+    input_data = get_mc_particles(f"{line}")
+
+    branches = {
+        "Dp" : "[D+ ==> K- pi+ pi+]CC",
+        "Km"   : "[D+ ==> ^K- pi+ pi+]CC",
+        "pip1"  : "[D+ ==> K- ^pi+ pi+]CC",
+        "pip2" : "[D+ ==> K- pi+ ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_MC_composite_variables(),
+        "Km"     : make_MC_basic_variables(),
+        "pip1"    : make_MC_basic_variables(),
+        "pip2"   : make_MC_basic_variables(),
+    }
+
+    mytuple  = FuntupleMC(name=name,
+                          tuple_name="MCDecayTree",
+                          fields=branches, variables = variables,
+                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
+                          inputs=input_data)
+
+    return [mytuple]
+
+def maketuple_MC_Ds2KKpi(options, pvs, rec_summary):
+    name = "MC_Ds2KKpi"
+    line = "/Event/MC/Particles"
+
+    input_data = get_mc_particles(f"{line}")
+
+    branches = {
+        "Dp" : "[D_s+ ==> K- K+ pi+]CC",
+        "Km"   : "[D_s+ ==> ^K- K+ pi+]CC",
+        "Kp"  : "[D_s+ ==> K- ^K+ pi+]CC",
+        "pip" : "[D_s+ ==> K- K+ ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_MC_composite_variables(),
+        "Km"     : make_MC_basic_variables(),
+        "Kp"    : make_MC_basic_variables(),
+        "pip"   : make_MC_basic_variables(),
+    }
+
+    mytuple  = FuntupleMC(name=name,
+                          tuple_name="MCDecayTree",
+                          fields=branches, variables = variables,
+                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
+                          inputs=input_data)
+
+    return [mytuple]
+
+def maketuple_MC_Ds2KKK(options, pvs, rec_summary):
+    name = "MC_Ds2KKK"
+    line = "/Event/MC/Particles"
+
+    input_data = get_mc_particles(f"{line}")
+
+    branches = {
+        "Dp" : "[D_s+ ==> K- K+ K+]CC",
+        "Km"   : "[D_s+ ==> ^K- K+ K+]CC",
+        "Kp1"  : "[D_s+ ==> K- ^K+ K+]CC",
+        "Kp2" : "[D_s+ ==> K- K+ ^K+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_MC_composite_variables(),
+        "Km"     : make_MC_basic_variables(),
+        "Kp1"    : make_MC_basic_variables(),
+        "Kp2"   : make_MC_basic_variables(),
+    }
+
+    mytuple  = FuntupleMC(name=name,
+                          tuple_name="MCDecayTree",
+                          fields=branches, variables = variables,
+                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
+                          inputs=input_data)
+
+    return [mytuple]
diff --git a/Charm_2024validation/options/d_to_ksh.py b/Charm_2024validation/options/d_to_ksh.py
new file mode 100644
index 0000000000..df40aee746
--- /dev/null
+++ b/Charm_2024validation/options/d_to_ksh.py
@@ -0,0 +1,313 @@
+from .tupling import (
+    make_composite_variables,
+    make_basic_variables,
+    make_hlt2_event_variables,
+    make_composite_dtf_variables,
+    make_basic_dtf_variables,
+)
+
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from FunTuple import FunTuple_Particles as Funtuple
+
+
+def make_dtf_variables(options, pvs, input_data, ptype, islong=False):
+
+    if ptype not in ["basic", "composite"]:
+        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
+
+    from DecayTreeFitter import DecayTreeFitter
+    
+    DTF = DecayTreeFitter(
+        name=f'DTF_{{hash}}',
+        input_particles=input_data)
+
+    DTFvtx = DecayTreeFitter(
+        name=f'DTFvtx_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    DTFmassKS = DecayTreeFitter(
+        name=f'DTFmassKS_{{hash}}',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTFvtxmassKS = DecayTreeFitter(
+        name=f'DTFvtxmassKS_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    DTFmassDpKS = DecayTreeFitter(
+        name=f'DTFmassDpKS_{{hash}}',
+        input_particles=input_data,
+        mass_constraints=["D+","KS0"])
+
+    DTFvtxmassDpKS = DecayTreeFitter(
+        name=f'DTFvtxmassDpKS_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D+","KS0"])
+
+    DTFmassDspKS = DecayTreeFitter(
+        name=f'DTFmassDspKS_{{hash}}',
+        input_particles=input_data,
+        substitutions = ['D+{{D_s+}}'],
+        mass_constraints=["D_s+","KS0"])
+
+    DTFvtxmassDspKS = DecayTreeFitter(
+        name=f'DTFvtxmassDspKS_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs,
+        substitutions = ['D+{{D_s+}}',"KS0{{KS0}}"],#trick
+        mass_constraints=["D_s+","KS0"],
+    )
+
+
+    if ptype == "basic":
+        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False,
+                                            islong=islong)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False,
+                                            islong=islong)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassKS,
+                                             pv_constraint=False,
+                                             mass_constraint=True, 
+                                             particle_name="KS",
+                                             islong=islong)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassKS,
+                                             pv_constraint=True,
+                                             mass_constraint=True, 
+                                             particle_name="KS",
+                                             islong=islong)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassDpKS,
+                                             pv_constraint=False,
+                                             mass_constraint=True, 
+                                             particle_name="DpKS",
+                                             islong=islong)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassDpKS,
+                                             pv_constraint=True,
+                                             mass_constraint=True, 
+                                             particle_name="DpKS",
+                                             islong=islong)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassDspKS,
+                                             pv_constraint=False,
+                                             mass_constraint=True, 
+                                             particle_name="DspKS",
+                                             islong=islong)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassDspKS,
+                                             pv_constraint=True,
+                                             mass_constraint=True, 
+                                             particle_name="DspKS",
+                                             islong=islong)
+        return dtf_vars
+
+    if ptype == "composite":
+        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassKS,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="KS")
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassKS,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="KS")
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassDpKS,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="DpKS")
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassDpKS,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="DpKS")
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassDspKS,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="DspKS")
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassDspKS,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="DspKS")
+        return dtf_vars
+
+
+def maketuple_D2KSK_DD(options, pvs, rec_summary):
+    name = "D2KSK_DD"
+    turbo_line = "Hlt2Charm_DpDspToKsKp_DD"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> (KS0 -> pi- pi+) K+]CC",
+        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) K+]CC",
+        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) K+]CC",
+        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) K+]CC",
+        "hp" : "[D+ -> (KS0 -> pi- pi+) ^K+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "hp"   : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2KSK_LD(options, pvs, rec_summary):
+    name = "D2KSK_LD"
+    turbo_line = "Hlt2Charm_DpDspToKsKp_LD"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> (KS0 -> pi- pi+) K+]CC",
+        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) K+]CC",
+        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) K+]CC",
+        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) K+]CC",
+        "hp" : "[D+ -> (KS0 -> pi- pi+) ^K+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "hp"   : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_D2KSK_LL(options, pvs, rec_summary):
+    name = "D2KSK_LL"
+    turbo_line = "Hlt2Charm_DpDspToKsKp_LL"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> (KS0 -> pi- pi+) K+]CC",
+        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) K+]CC",
+        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) K+]CC",
+        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) K+]CC",
+        "hp" : "[D+ -> (KS0 -> pi- pi+) ^K+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "hp"   : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2KSpi_DD(options, pvs, rec_summary):
+    name = "D2KSpi_DD"
+    turbo_line = "Hlt2Charm_DpDspToKsPip_DD"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> (KS0 -> pi- pi+) pi+]CC",
+        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) pi+]CC",
+        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) pi+]CC",
+        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) pi+]CC",
+        "hp" : "[D+ -> (KS0 -> pi- pi+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "hp"   : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2KSpi_LD(options, pvs, rec_summary):
+    name = "D2KSpi_LD"
+    turbo_line = "Hlt2Charm_DpDspToKsPip_LD"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> (KS0 -> pi- pi+) pi+]CC",
+        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) pi+]CC",
+        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) pi+]CC",
+        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) pi+]CC",
+        "hp" : "[D+ -> (KS0 -> pi- pi+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "hp"   : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2KSpi_LL(options, pvs, rec_summary):
+    name = "D2KSpi_LL"
+    turbo_line = "Hlt2Charm_DpDspToKsPip_LL"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> (KS0 -> pi- pi+) pi+]CC",
+        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) pi+]CC",
+        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) pi+]CC",
+        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) pi+]CC",
+        "hp" : "[D+ -> (KS0 -> pi- pi+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
+        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "hp"   : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
diff --git a/Charm_2024validation/options/d_to_ksh_MC.py b/Charm_2024validation/options/d_to_ksh_MC.py
new file mode 100644
index 0000000000..38a2197998
--- /dev/null
+++ b/Charm_2024validation/options/d_to_ksh_MC.py
@@ -0,0 +1,68 @@
+from .tupling import (
+    make_MC_composite_variables,
+    make_MC_basic_variables,
+    make_MC_event_variables,
+)
+
+from PyConf.reading import get_mc_particles, get_mc_header
+from FunTuple import FunTuple_MCParticles as FuntupleMC
+
+def maketuple_MC_D2KSK(options, pvs, rec_summary):
+    name = "MC_D2KSK"
+    line = "/Event/MC/Particles"
+
+    input_data = get_mc_particles(f"{line}")
+
+    branches = {
+        "Dp" : "[D_s+ ==> (KS0 ==> pi- pi+) K+]CC",
+        "KS0"  : "[D_s+ ==> ^(KS0 ==> pi- pi+) K+]CC",
+        "pim"   : "[D_s+ ==> (KS0 ==> ^pi- pi+) K+]CC",
+        "pip"  : "[D_s+ ==> (KS0 ==> pi- ^pi+) K+]CC",
+        "hp" : "[D_s+ ==> (KS0 ==> pi- pi+) ^K+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_MC_composite_variables(),
+        "KS0"    : make_MC_composite_variables(),
+        "pim"     : make_MC_basic_variables(),
+        "pip"    : make_MC_basic_variables(),
+        "hp"   : make_MC_basic_variables(),
+    }
+
+    mytuple  = FuntupleMC(name=name,
+                        tuple_name="MCDecayTree",
+                        fields=branches, variables = variables,
+                        event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
+                        inputs=input_data)
+
+    return [mytuple]
+
+def maketuple_MC_D2KSpi(options, pvs, rec_summary):
+    name = "MC_D2KSpi"
+    line = "/Event/MC/Particles"
+
+    input_data = get_mc_particles(f"{line}")
+
+    branches = {
+        "Dp" : "[D+ ==> (KS0 ==> pi- pi+) pi+]CC",
+        "KS0"  : "[D+ ==> ^(KS0 ==> pi- pi+) pi+]CC",
+        "pim"   : "[D+ ==> (KS0 ==> ^pi- pi+) pi+]CC",
+        "pip"  : "[D+ ==> (KS0 ==> pi- ^pi+) pi+]CC",
+        "hp" : "[D+ ==> (KS0 ==> pi- pi+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_MC_composite_variables(),
+        "KS0"    : make_MC_composite_variables(),
+        "pim"     : make_MC_basic_variables(),
+        "pip"    : make_MC_basic_variables(),
+        "hp"   : make_MC_basic_variables(),
+    }
+
+    mytuple  = FuntupleMC(name=name,
+                        tuple_name="MCDecayTree",
+                        fields=branches, variables = variables,
+                        event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
+                        inputs=input_data)
+
+    return [mytuple]
diff --git a/Charm_2024validation/options/detection_asymmetry.py b/Charm_2024validation/options/detection_asymmetry.py
new file mode 100644
index 0000000000..9769559e87
--- /dev/null
+++ b/Charm_2024validation/options/detection_asymmetry.py
@@ -0,0 +1,191 @@
+from .tupling import (
+    make_composite_variables,
+    make_composite_variables_3body,
+    make_basic_variables,
+    make_hlt2_event_variables,
+)
+
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from FunTuple import FunTuple_Particles as Funtuple
+
+def maketuple_D2Kpipi_ADet(options, pvs, rec_summary):
+    name = "D2Kpipi_ADet"
+    turbo_line = "Hlt2Charm_DpToKmPipPip_ADet"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> K- pi+ pi+]CC",
+        "Km"   : "[D+ -> ^K- pi+ pi+]CC",
+        "pip1"  : "[D+ -> K- ^pi+ pi+]CC",
+        "pip2" : "[D+ -> K- pi+ ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
+        "Km"     : make_basic_variables(options, pvs, input_data),
+        "pip1"    : make_basic_variables(options, pvs, input_data),
+        "pip2"   : make_basic_variables(options, pvs, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2pipipi_ADet(options, pvs, rec_summary):
+    name = "D2pipipi_ADet"
+    turbo_line = "Hlt2Charm_DspToPimPipPip_ADet"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D_s+ -> pi- pi+ pi+]CC",
+        "pim"   : "[D_s+ -> ^pi- pi+ pi+]CC",
+        "pip1"  : "[D_s+ -> pi- ^pi+ pi+]CC",
+        "pip2" : "[D_s+ -> pi- pi+ ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
+        "pim"     : make_basic_variables(options, pvs, input_data),
+        "pip1"    : make_basic_variables(options, pvs, input_data),
+        "pip2"   : make_basic_variables(options, pvs, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Ds2KKpi_ADet(options, pvs, rec_summary):
+    name = "Ds2KKpi_ADet"
+    turbo_line = "Hlt2Charm_DspToKmKpPip_ADet"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D_s+ -> K- K+ pi+]CC",
+        "Km"   : "[D_s+ -> ^K- K+ pi+]CC",
+        "Kp"  : "[D_s+ -> K- ^K+ pi+]CC",
+        "pip" : "[D_s+ -> K- K+ ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
+        "Km"     : make_basic_variables(options, pvs, input_data),
+        "Kp"    : make_basic_variables(options, pvs, input_data),
+        "pip"   : make_basic_variables(options, pvs, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+    
+    return [myfilter, mytuple]
+        
+def maketuple_Lc2KSp_LL_ADet(options, pvs, rec_summary):
+    name = "Lc2KSp_LL_ADet"
+    turbo_line = "Hlt2Charm_LcpToPpKs_LL_ADet"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Lc" : "[Lambda_c+ -> (KS0 -> pi- pi+) p+]CC",
+        "KS0"  : "[Lambda_c+ -> ^(KS0 -> pi- pi+) p+]CC",
+        "pim"   : "[Lambda_c+ -> (KS0 -> ^pi- pi+) p+]CC",
+        "pip"  : "[Lambda_c+ -> (KS0 -> pi- ^pi+) p+]CC",
+        "pp" : "[Lambda_c+ -> (KS0 -> pi- pi+) ^p+]CC",
+    }
+
+    variables = {
+        "Lc"   : make_composite_variables(options, pvs, input_data),
+        "KS0"    : make_composite_variables(options, pvs, input_data),
+        "pim"     : make_basic_variables(options, pvs, input_data),
+        "pip"    : make_basic_variables(options, pvs, input_data),
+        "pp"   : make_basic_variables(options, pvs, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Lc2pKpi_ADet(options, pvs, rec_summary):
+    name = "Lc2pKpi_ADet"
+    turbo_line = "Hlt2Charm_LcpToPpKmPip_ADet"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Lc" : "[Lambda_c+ -> K- pi+ p+]CC",
+        "Km"   : "[Lambda_c+ -> ^K- pi+ p+]CC",
+        "pip"  : "[Lambda_c+ -> K- ^pi+ p+]CC",
+        "pp" : "[Lambda_c+ -> K- pi+ ^p+]CC",
+    }
+
+    variables = {
+        "Lc"   : make_composite_variables_3body(options, pvs, input_data),
+        "Km"     : make_basic_variables(options, pvs, input_data),
+        "pip"    : make_basic_variables(options, pvs, input_data),
+        "pp"   : make_basic_variables(options, pvs, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2KSK_LL_ADet(options, pvs, rec_summary):
+    name = "D2KSK_LL_ADet"
+    turbo_line = "Hlt2Charm_DspToKsKp_LL_ADet"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D_s+ -> (KS0 -> pi- pi+) K+]CC",
+        "KS0"  : "[D_s+ -> ^(KS0 -> pi- pi+) K+]CC",
+        "pim"   : "[D_s+ -> (KS0 -> ^pi- pi+) K+]CC",
+        "pip"  : "[D_s+ -> (KS0 -> pi- ^pi+) K+]CC",
+        "hp" : "[D_s+ -> (KS0 -> pi- pi+) ^K+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data),
+        "KS0"    : make_composite_variables(options, pvs, input_data),
+        "pim"     : make_basic_variables(options, pvs, input_data),
+        "pip"    : make_basic_variables(options, pvs, input_data),
+        "hp"   : make_basic_variables(options, pvs, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2KSpi_LL_ADet(options, pvs, rec_summary):
+    name = "D2KSpi_LL_ADet"
+    turbo_line = "Hlt2Charm_DpToKsPip_LL_ADet"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> (KS0 -> pi- pi+) pi+]CC",
+        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) pi+]CC",
+        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) pi+]CC",
+        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) pi+]CC",
+        "hp" : "[D+ -> (KS0 -> pi- pi+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data),
+        "KS0"    : make_composite_variables(options, pvs, input_data),
+        "pim"     : make_basic_variables(options, pvs, input_data),
+        "pip"    : make_basic_variables(options, pvs, input_data),
+        "hp"   : make_basic_variables(options, pvs, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
diff --git a/Charm_2024validation/options/dst_to_dee.py b/Charm_2024validation/options/dst_to_dee.py
new file mode 100644
index 0000000000..11f42bae95
--- /dev/null
+++ b/Charm_2024validation/options/dst_to_dee.py
@@ -0,0 +1,296 @@
+import Functors as F
+from Functors.math import log
+from DaVinci import Options, make_config
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from FunTuple import FunctorCollection
+from PyConf.reading import get_particles, get_pvs
+import FunTuple.functorcollections as FC
+from FunTuple import FunTuple_Particles as Funtuple
+from DecayTreeFitter import DecayTreeFitter
+from Hlt2Conf.lines.charm.dst_to_dee_makers import (dst_BDT_functor)
+from .tupling import (
+    make_DeltaM_variable,
+    make_basic_variables,
+    make_composite_variables,
+    make_composite_variables_3body,
+    make_composite_variables_4body,
+    make_hlt2_event_variables,
+    make_basic_dtf_variables,
+    make_composite_dtf_variables,
+    make_composite_dtf_variables_3body,
+    make_composite_dtf_variables_4body,
+    Hlt1_lines
+)
+extra_brem_variables= (FunctorCollection(
+            {
+                "BREMHYPODELTAX": F.BREMHYPODELTAX,
+                "BREMHYPOENERGY": F.BREMHYPOENERGY,
+                "BREMHYPOID": F.BREMHYPOID,
+                "BREMHYPOMATCH_CHI2": F.BREMHYPOMATCH_CHI2,
+                "BREMPIDE": F.BREMPIDE,
+                "INBREM": F.INBREM,
+                "MASS_WITH_BREM": F.MASS_WITH_BREM,
+                "PT_WITH_BREM": F.PT_WITH_BREM,
+                "P_WITH_BREM": F.P_WITH_BREM,
+                "ECALPIDE": F.ECALPIDE,
+                "HCALPIDE": F.HCALPIDE,
+                "ELECTRONSHOWEREOP": F.ELECTRONSHOWEREOP,
+                "CLUSTERMATCH_CHI2": F.CLUSTERMATCH_CHI2,
+                "ELECTRONMATCH_CHI2": F.ELECTRONMATCH_CHI2,
+                "ELECTRONENERGY": F.ELECTRONENERGY,
+                "ELECTRONID": F.ELECTRONID,
+                "HCALEOP": F.HCALEOP,
+                "CALO_NEUTRAL_SHOWER_SHAPE": F.CALO_NEUTRAL_SHOWER_SHAPE,
+                "RICH_DLL_E": F.VALUE_OR(F.NaN)@F.RICH_DLL_E,
+            })
+    )
+
+decay_descriptor = {
+    'dst_kpi_os' : {
+        "Dst0":   "[ D*(2007)0 ->  (D0 ->  K-  pi+)  (gamma ->  e+  e-)]CC",
+        "D0":     "[ D*(2007)0 -> ^(D0 ->  K-  pi+)  (gamma ->  e+  e-)]CC",
+        "Kminus": "[ D*(2007)0 ->  (D0 -> ^K-  pi+)  (gamma ->  e+  e-)]CC",
+        "piplus": "[ D*(2007)0 ->  (D0 ->  K- ^pi+)  (gamma ->  e+  e-)]CC",
+        "gamma":  "[ D*(2007)0 ->  (D0 ->  K-  pi+) ^(gamma ->  e+  e-)]CC",
+        "eplus":  "[ D*(2007)0 ->  (D0 ->  K-  pi+)  (gamma -> ^e+  e-)]CC",
+        "eminus": "[ D*(2007)0 ->  (D0 ->  K-  pi+)  (gamma ->  e+ ^e-)]CC",
+    },
+
+    'dst_kpi_ss' : {
+        "Dst0":   "[ D*(2007)0 ->  (D0 ->  K-  pi+)  ([gamma ->  e+  e+]CC)]CC",
+        "D0":     "[ D*(2007)0 -> ^(D0 ->  K-  pi+)  ([gamma ->  e+  e+]CC)]CC",
+        "Kminus": "[ D*(2007)0 ->  (D0 -> ^K-  pi+)  ([gamma ->  e+  e+]CC)]CC",
+        "piplus": "[ D*(2007)0 ->  (D0 ->  K- ^pi+)  ([gamma ->  e+  e+]CC)]CC",
+        "gamma":  "[ D*(2007)0 ->  (D0 ->  K-  pi+) ^([gamma ->  e+  e+]CC)]CC",
+        "eplus":  "[ D*(2007)0 ->  (D0 ->  K-  pi+)  ([gamma -> ^e+  e+]CC)]CC",
+        "eminus": "[ D*(2007)0 ->  (D0 ->  K-  pi+)  ([gamma ->  e+ ^e+]CC)]CC",
+    },
+
+    'dst_k3pi_os' :  {
+        "Dst0":    "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)  (gamma ->  e+  e-)]CC",
+        "D0":      "[ D*(2007)0 -> ^(D0 -> K- pi- pi+ pi+)  (gamma ->  e+  e-)]CC",
+        "Kminus":  "[ D*(2007)0 ->  (D0 -> ^K- pi- pi+ pi+) (gamma ->  e+  e-)]CC",
+        "piminus": "[ D*(2007)0 ->  (D0 -> K- ^pi- pi+ pi+) (gamma ->  e+  e-)]CC",
+        "piplus1": "[ D*(2007)0 ->  (D0 -> K- pi- ^pi+ pi+) (gamma ->  e+  e-)]CC",
+        "piplus2": "[ D*(2007)0 ->  (D0 -> K- pi- pi+ ^pi+) (gamma ->  e+  e-)]CC",
+        "gamma":   "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+) ^(gamma ->  e+  e-)]CC",
+        "eplus":   "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)  (gamma -> ^e+  e-)]CC",
+        "eminus":  "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)  (gamma ->  e+ ^e-)]CC",
+    },
+
+    'dst_k3pi_ss' :  {
+        "Dst0":    "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)   ([gamma ->  e+  e+]CC)]CC",
+        "D0":      "[ D*(2007)0 -> ^(D0 -> K- pi- pi+ pi+)   ([gamma ->  e+  e+]CC)]CC",
+        "Kminus":  "[ D*(2007)0 ->  (D0 -> ^K- pi- pi+ pi+)  ([gamma ->  e+  e+]CC)]CC",
+        "piminus": "[ D*(2007)0 ->  (D0 -> K- ^pi- pi+ pi+)  ([gamma ->  e+  e+]CC)]CC",
+        "piplus1": "[ D*(2007)0 ->  (D0 -> K- pi- ^pi+ pi+)  ([gamma ->  e+  e+]CC)]CC",
+        "piplus2": "[ D*(2007)0 ->  (D0 -> K- pi- pi+ ^pi+)  ([gamma ->  e+  e+]CC)]CC",
+        "gamma":   "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)  ^([gamma ->  e+  e+]CC)]CC",
+        "eplus":   "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)   ([gamma -> ^e+  e+]CC)]CC",
+        "eminus":  "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)   ([gamma ->  e+ ^e+]CC)]CC",
+    },
+
+    'dsstp_2kpi_os' : {
+        "Dstp":   "[ D*_s+ ->  (D_s+ -> K- K+ pi+)  (gamma ->  e+  e-)]CC",
+        "DpDs":   "[ D*_s+ -> ^(D_s+ -> K- K+ pi+)  (gamma ->  e+  e-)]CC",
+        "Kminus": "[ D*_s+ ->  (D_s+ -> ^K- K+ pi+) (gamma ->  e+  e-)]CC",
+        "Kplus":  "[ D*_s+ ->  (D_s+ -> K- ^K+ pi+) (gamma ->  e+  e-)]CC",
+        "piplus": "[ D*_s+ ->  (D_s+ -> K- K+ ^pi+) (gamma ->  e+  e-)]CC",
+        "gamma":  "[ D*_s+ ->  (D_s+ -> K- K+ pi+) ^(gamma ->  e+  e-)]CC",
+        "eplus":  "[ D*_s+ ->  (D_s+ -> K- K+ pi+)  (gamma -> ^e+  e-)]CC",
+        "eminus": "[ D*_s+ ->  (D_s+ -> K- K+ pi+)  (gamma ->  e+ ^e-)]CC",
+    },
+    'dsstp_2kpi_ss' : {
+        "Dstp":   "[ D*_s+ ->  (D_s+ -> K- K+ pi+)   ([gamma ->  e+  e+]CC)]CC",
+        "DpDs":   "[ D*_s+ -> ^(D_s+ -> K- K+ pi+)   ([gamma ->  e+  e+]CC)]CC",
+        "Kminus": "[ D*_s+ ->  (D_s+ -> ^K- K+ pi+)  ([gamma ->  e+  e+]CC)]CC",
+        "Kplus":  "[ D*_s+ ->  (D_s+ -> K- ^K+ pi+)  ([gamma ->  e+  e+]CC)]CC",
+        "piplus": "[ D*_s+ ->  (D_s+ -> K- K+ ^pi+)  ([gamma ->  e+  e+]CC)]CC",
+        "gamma":  "[ D*_s+ ->  (D_s+ -> K- K+ pi+)  ^([gamma ->  e+  e+]CC)]CC",
+        "eplus":  "[ D*_s+ ->  (D_s+ -> K- K+ pi+)   ([gamma -> ^e+  e+]CC)]CC",
+        "eminus": "[ D*_s+ ->  (D_s+ -> K- K+ pi+)   ([gamma ->  e+ ^e+]CC)]CC",
+    },
+
+}
+
+def MVA_dst_variables(line, pvs):
+    return (FunctorCollection( { "MVA": dst_BDT_functor(pvs, line=line)}))
+#make_dtf_variables(options,  input_data, ptype):
+def make_dtf_variables(options, input_data,  pvs, ptype="basic",  mass_constrain = ["D*(2007)0", "D0" ], nparticles=2):
+    
+    DTF = DecayTreeFitter(
+        name="DTF_{hash}",
+        input_particles=input_data,
+    )
+
+    DTF_DMass_BestPV = DecayTreeFitter(
+        name="DTF_DMass_BestPV_{hash}",
+        input_particles=input_data,
+        mass_constraints=mass_constrain,
+        input_pvs=pvs,
+        fit_all_pvs=False,
+    )
+    DTF_Mass_BestPV = DecayTreeFitter(
+        name="DTF_Mass_BestPV_{hash}",
+        input_particles=input_data,
+        mass_constraints=[mass_constrain[1]],
+        input_pvs=pvs,
+        fit_all_pvs=False,
+    )
+
+    DTF_BestPV = DecayTreeFitter(
+        name="DTF_BestPV_{hash}",
+        input_particles=input_data,
+        #mass_constraints=["D*(2007)0", "D0" ],
+        input_pvs=pvs,
+        fit_all_pvs=False,
+    )
+
+    DTF_DMass = DecayTreeFitter(
+        name="DTF_DMass_{hash}",
+        input_particles=input_data,
+        mass_constraints=mass_constrain,
+        output_level=3,
+    )
+    DTF_Mass = DecayTreeFitter(
+        name="DTF_Mass_{hash}",
+        input_particles=input_data,
+        mass_constraints=[mass_constrain[1]],
+        output_level=3,
+    )
+    
+    if ptype == "basic":
+        dtf_variables =  make_basic_dtf_variables
+    elif ptype == "composite":
+        if nparticles == 2:
+            dtf_variables = make_composite_dtf_variables 
+        elif nparticles == 3:
+            dtf_variables = make_composite_dtf_variables_3body
+        elif nparticles == 4:
+            dtf_variables = make_composite_dtf_variables_4body 
+
+    dtf_vars = dtf_variables(options, pvs, input_data,
+                                        DTF=DTF,
+                                        pv_constraint=False,
+                                        mass_constraint=False)
+    dtf_vars += dtf_variables(options, pvs, input_data,
+                                        DTF=DTF_BestPV,
+                                        pv_constraint=True,
+                                        mass_constraint=False)
+    dtf_vars += dtf_variables(options, pvs, input_data,
+                                        DTF=DTF_Mass,
+                                        pv_constraint=False,
+                                        mass_constraint=True, particle_name="D")
+    dtf_vars += dtf_variables(options, pvs, input_data,
+                                        DTF=DTF_Mass_BestPV,
+                                        pv_constraint=True,
+                                        mass_constraint=True, particle_name="D")
+    dtf_vars += dtf_variables(options, pvs, input_data,
+                                        DTF=DTF_DMass,
+                                        pv_constraint=False,
+                                        mass_constraint=True, particle_name="DstD")
+    dtf_vars += dtf_variables(options, pvs, input_data,
+                                        DTF=DTF_DMass_BestPV,
+                                        pv_constraint=True,
+                                        mass_constraint=True, particle_name="DstD")
+
+    return dtf_vars
+
+
+def make_Dst0ToD0EmEp_D0ToKmPip_tuple(options, line, pvs , rec_summary, dd='dst_kpi_os'):
+
+    input_data=get_particles(f"/Event/HLT2/{line}/Particles")
+    my_filter = create_lines_filter(f"LineFilter_{line}_{{hash}}",[line],)
+
+    fields = decay_descriptor[dd]
+    
+    composite_tuple_variables = {
+        "Dst0"   :  make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs,  "composite") +\
+             MVA_dst_variables("Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip", pvs) + make_DeltaM_variable(options), 
+        "D0"     :  make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs,  "composite"),
+        "gamma"  :  make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs,  "composite")
+    }
+    basic_tuple_variables = { 
+        "Kminus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"),
+        "piplus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"),
+        "eplus"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic") + extra_brem_variables,
+        "eminus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic") + extra_brem_variables,
+    }
+
+    my_tuple = Funtuple(
+        name=f"Tuple_{line}_{dd}",
+        tuple_name="DecayTree",
+        fields=fields,
+        variables= {**composite_tuple_variables, **basic_tuple_variables},
+        event_variables=make_hlt2_event_variables(options, pvs, rec_summary), 
+        inputs=input_data,
+        store_multiple_cand_info=True
+    )
+    return [ my_filter, my_tuple]
+
+def make_Dst0ToD0EmEp_D0ToKmPimPipPip_tuple(options, line, pvs, rec_summary, dd='dst_k3pi_os'):
+
+    input_data=get_particles(f"/Event/HLT2/{line}/Particles")
+    my_filter = create_lines_filter(f"LineFilter_{line}_{{hash}}",[line],)
+
+    fields = decay_descriptor[dd]
+    
+    composite_tuple_variables = {
+        "Dst0"   : make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs, "composite") +\
+             MVA_dst_variables("Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip", pvs) + make_DeltaM_variable(options), 
+        "D0"     : make_composite_variables_4body(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs, "composite", nparticles=4),
+        "gamma"  : make_composite_variables(options, pvs, input_data) 
+    }
+    basic_tuple_variables = { 
+        "Kminus"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"),
+        "piminus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"),
+        "piplus1" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"),
+        "piplus2" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"), 
+        "eplus"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic") + extra_brem_variables,
+        "eminus"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic") + extra_brem_variables,
+    }
+
+    my_tuple = Funtuple(
+        name=f"Tuple_{line}_{dd}",
+        tuple_name="DecayTree",
+        fields=fields,
+        variables= {**composite_tuple_variables, **basic_tuple_variables},
+        event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data,
+        store_multiple_cand_info=True
+    )
+    return [ my_filter, my_tuple]
+
+
+def make_DstpToDpDspEmEp_DpDspToKmKpPip_tuple(options, line, pvs , rec_summary, dd='dsstp_2kpi_os'):
+
+    input_data=get_particles(f"/Event/HLT2/{line}/Particles")
+    my_filter = create_lines_filter(f"LineFilter_{line}_{{hash}}",[line],)
+
+    fields = decay_descriptor[dd]
+
+    composite_tuple_variables = {
+        "Dstp"   : make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs, "composite", mass_constrain = ["D*_s+", "D_s+"]) +\
+             MVA_dst_variables("Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip", pvs) + make_DeltaM_variable(options), 
+        "DpDs"   : make_composite_variables_3body(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs, "composite", mass_constrain = ["D*_s+", "D_s+"], nparticles=3),
+        "gamma"  : make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs, "composite", mass_constrain = ["D*_s+", "D_s+"]),
+    }
+    basic_tuple_variables = { 
+        "Kminus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic",  mass_constrain = ["D*_s+", "D_s+"]),
+        "Kplus"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic",  mass_constrain = ["D*_s+", "D_s+"]),
+        "piplus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic",  mass_constrain = ["D*_s+", "D_s+"]),
+        "eplus"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic",  mass_constrain = ["D*_s+", "D_s+"])+ extra_brem_variables,
+        "eminus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic",  mass_constrain = ["D*_s+", "D_s+"])+ extra_brem_variables,
+    }
+
+    my_tuple = Funtuple(
+        name=f"Tuple_{line}_{dd}",
+        tuple_name="DecayTree",
+        fields=fields,
+        variables= {**composite_tuple_variables, **basic_tuple_variables},
+        event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
+        inputs=input_data,
+        store_multiple_cand_info=True
+    )
+    return [ my_filter, my_tuple]
diff --git a/Charm_2024validation/options/hlt1.py b/Charm_2024validation/options/hlt1.py
new file mode 100644
index 0000000000..b93aeb113c
--- /dev/null
+++ b/Charm_2024validation/options/hlt1.py
@@ -0,0 +1,33 @@
+###############################################################################
+# (c) Copyright 2023 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.                                       #
+###############################################################################
+"""
+Configures running HLT1 via Moore.
+"""
+
+from Moore import Options
+from Moore.config import allen_control_flow
+from RecoConf.hlt1_allen import allen_gaudi_config, get_allen_line_names
+from AllenConf.hlt1_calibration_lines import make_passthrough_line
+from PyConf.application import configure_input, configure
+
+def alg_config(options: Options):
+    """
+    Configures algorithm running of HLT1 via Moore to be passed to Analysis Productions.
+    """
+
+    config = configure_input(options)
+    with allen_gaudi_config.bind(sequence="hlt1_pp_matching_no_ut_1000KHz"), make_passthrough_line.bind(pre_scaler=1):
+        line_names = get_allen_line_names()
+        allen_node = allen_control_flow(options)
+        config.update(configure(options, allen_node))
+
+    return config
+
diff --git a/Charm_2024validation/options/hlt2/d0_to_hh.py b/Charm_2024validation/options/hlt2/d0_to_hh.py
new file mode 100644
index 0000000000..3c0b0d0086
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/d0_to_hh.py
@@ -0,0 +1,9 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d0_to_hh import all_lines as hh_lines
+
+def make_lines():
+    mylines = [builder() for builder in hh_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+
diff --git a/Charm_2024validation/options/hlt2/d0_to_hhhh.py b/Charm_2024validation/options/hlt2/d0_to_hhhh.py
new file mode 100644
index 0000000000..81fe4dce30
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/d0_to_hhhh.py
@@ -0,0 +1,8 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d0_to_hhhh import all_lines as hhhh_lines
+
+def make_lines():
+    mylines = [builder() for builder in hhhh_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
diff --git a/Charm_2024validation/options/hlt2/d0_to_hhpi0.py b/Charm_2024validation/options/hlt2/d0_to_hhpi0.py
new file mode 100644
index 0000000000..52f8433c11
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/d0_to_hhpi0.py
@@ -0,0 +1,8 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d0_to_hhpi0 import all_lines as hhpi0_lines
+
+def make_lines():
+    mylines = [builder() for builder in hhpi0_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
diff --git a/Charm_2024validation/options/hlt2/d0_to_kshh.py b/Charm_2024validation/options/hlt2/d0_to_kshh.py
new file mode 100644
index 0000000000..79df310ed8
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/d0_to_kshh.py
@@ -0,0 +1,8 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d0_to_kshh import all_lines as kshh_lines
+
+def make_lines():
+    mylines = [builder() for builder in kshh_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
diff --git a/Charm_2024validation/options/hlt2/d0_to_ksks.py b/Charm_2024validation/options/hlt2/d0_to_ksks.py
new file mode 100644
index 0000000000..71ab403fd9
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/d0_to_ksks.py
@@ -0,0 +1,8 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d0_to_ksks import all_lines as ksks_lines
+
+def make_lines():
+    mylines = [builder() for builder in ksks_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
diff --git a/Charm_2024validation/options/hlt2/d_to_hhh.py b/Charm_2024validation/options/hlt2/d_to_hhh.py
new file mode 100644
index 0000000000..cd718f9b86
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/d_to_hhh.py
@@ -0,0 +1,10 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d_to_hhh import all_lines as hhh_lines
+from Hlt2Conf.lines.charm.detection_asymmetry_lines import all_lines as det_asy_lines
+
+def make_lines():
+    mylines = [builder() for builder in hhh_lines.values()]
+    mylines += [builder() for builder in det_asy_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
diff --git a/Charm_2024validation/options/hlt2/d_to_ksh.py b/Charm_2024validation/options/hlt2/d_to_ksh.py
new file mode 100644
index 0000000000..8c8b172dd0
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/d_to_ksh.py
@@ -0,0 +1,10 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d_to_ksh import all_lines as ksh_lines
+from Hlt2Conf.lines.charm.detection_asymmetry_lines import all_lines as det_asy_lines
+
+def make_lines():
+    mylines = [builder() for builder in ksh_lines.values()]
+    mylines += [builder() for builder in det_asy_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
diff --git a/Charm_2024validation/options/hlt2/dst_to_dee.py b/Charm_2024validation/options/hlt2/dst_to_dee.py
new file mode 100644
index 0000000000..4fd67becd7
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/dst_to_dee.py
@@ -0,0 +1,9 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.dst_to_dee import all_lines as dst_to_dee_lines
+
+def make_lines():
+    mylines = [builder() for builder in dst_to_dee_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+
diff --git a/Charm_2024validation/options/hlt2/hlt2.py b/Charm_2024validation/options/hlt2/hlt2.py
new file mode 100644
index 0000000000..c1560ce952
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/hlt2.py
@@ -0,0 +1,32 @@
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_d0_to_hh.py b/Charm_2024validation/options/hlt2/hlt2_d0_to_hh.py
new file mode 100644
index 0000000000..7c3a67ed03
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/hlt2_d0_to_hh.py
@@ -0,0 +1,41 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d0_to_hh import all_lines as hh_lines
+
+def make_lines():
+    mylines = [builder() for builder in hh_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_d0_to_hhhh.py b/Charm_2024validation/options/hlt2/hlt2_d0_to_hhhh.py
new file mode 100644
index 0000000000..d7d5dcbb90
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/hlt2_d0_to_hhhh.py
@@ -0,0 +1,40 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d0_to_hhhh import all_lines as hhhh_lines
+
+def make_lines():
+    mylines = [builder() for builder in hhhh_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_d0_to_hhpi0.py b/Charm_2024validation/options/hlt2/hlt2_d0_to_hhpi0.py
new file mode 100644
index 0000000000..063eeb274a
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/hlt2_d0_to_hhpi0.py
@@ -0,0 +1,40 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d0_to_hhpi0 import all_lines as hhpi0_lines
+
+def make_lines():
+    mylines = [builder() for builder in hhpi0_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_d0_to_kshh.py b/Charm_2024validation/options/hlt2/hlt2_d0_to_kshh.py
new file mode 100644
index 0000000000..3e1996cdf0
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/hlt2_d0_to_kshh.py
@@ -0,0 +1,40 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d0_to_kshh import all_lines as kshh_lines
+
+def make_lines():
+    mylines = [builder() for builder in kshh_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_d0_to_ksks.py b/Charm_2024validation/options/hlt2/hlt2_d0_to_ksks.py
new file mode 100644
index 0000000000..e8d1052803
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/hlt2_d0_to_ksks.py
@@ -0,0 +1,40 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d0_to_ksks import all_lines as ksks_lines
+
+def make_lines():
+    mylines = [builder() for builder in ksks_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_d_to_hhh.py b/Charm_2024validation/options/hlt2/hlt2_d_to_hhh.py
new file mode 100644
index 0000000000..97965cb96e
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/hlt2_d_to_hhh.py
@@ -0,0 +1,42 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d_to_hhh import all_lines as hhh_lines
+from Hlt2Conf.lines.charm.detection_asymmetry_lines import all_lines as det_asy_lines
+
+def make_lines():
+    mylines = [builder() for builder in hhh_lines.values()]
+    mylines += [builder() for builder in det_asy_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_d_to_ksh.py b/Charm_2024validation/options/hlt2/hlt2_d_to_ksh.py
new file mode 100644
index 0000000000..d2593da6a9
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/hlt2_d_to_ksh.py
@@ -0,0 +1,42 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d_to_ksh import all_lines as ksh_lines
+from Hlt2Conf.lines.charm.detection_asymmetry_lines import all_lines as det_asy_lines
+
+def make_lines():
+    mylines = [builder() for builder in ksh_lines.values()]
+    mylines += [builder() for builder in det_asy_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_dst_to_dee.py b/Charm_2024validation/options/hlt2/hlt2_dst_to_dee.py
new file mode 100644
index 0000000000..d43ecbcd65
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/hlt2_dst_to_dee.py
@@ -0,0 +1,41 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.dst_to_dee import all_lines as dst_to_dee_lines
+
+def make_lines():
+    mylines = [builder() for builder in dst_to_dee_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2_rare_charm.py b/Charm_2024validation/options/hlt2/hlt2_rare_charm.py
new file mode 100644
index 0000000000..cb9ac88a02
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/hlt2_rare_charm.py
@@ -0,0 +1,40 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.rare_charm_lines import all_lines as rare_charm_lines
+
+def make_lines():
+    mylines = [builder() for builder in rare_charm_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/options/hlt2/hlt2noUT.py b/Charm_2024validation/options/hlt2/hlt2noUT.py
new file mode 100644
index 0000000000..473127434b
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/hlt2noUT.py
@@ -0,0 +1,32 @@
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf_without_UT
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf_without_UT),\
+         require_gec.bind(skipUT=True),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/options/hlt2/make_hlt2_decay.sh b/Charm_2024validation/options/hlt2/make_hlt2_decay.sh
new file mode 100644
index 0000000000..f127b86285
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/make_hlt2_decay.sh
@@ -0,0 +1,9 @@
+cat d0_to_hh.py hlt2.py > hlt2_d0_to_hh.py
+cat d0_to_hhpi0.py hlt2.py > hlt2_d0_to_hhpi0.py
+cat d0_to_hhhh.py hlt2.py > hlt2_d0_to_hhhh.py
+cat d0_to_kshh.py hlt2.py > hlt2_d0_to_kshh.py
+cat d0_to_ksks.py hlt2.py > hlt2_d0_to_ksks.py
+cat d_to_hhh.py hlt2.py > hlt2_d_to_hhh.py
+cat d_to_ksh.py hlt2.py > hlt2_d_to_ksh.py
+cat rare_charm.py hlt2.py > hlt2_rare_charm.py
+cat dst_to_dee.py hlt2.py > hlt2_dst_to_dee.py
diff --git a/Charm_2024validation/options/hlt2/rare_charm.py b/Charm_2024validation/options/hlt2/rare_charm.py
new file mode 100644
index 0000000000..39194555f0
--- /dev/null
+++ b/Charm_2024validation/options/hlt2/rare_charm.py
@@ -0,0 +1,8 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.rare_charm_lines import all_lines as rare_charm_lines
+
+def make_lines():
+    mylines = [builder() for builder in rare_charm_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
diff --git a/Charm_2024validation/options/rare_charm.py b/Charm_2024validation/options/rare_charm.py
new file mode 100644
index 0000000000..d4d4a5d83d
--- /dev/null
+++ b/Charm_2024validation/options/rare_charm.py
@@ -0,0 +1,496 @@
+from .tupling import (
+    make_composite_variables,
+    make_composite_variables_3body,
+    make_DeltaM_variable,
+    make_basic_variables,
+    make_hlt2_event_variables,
+    make_top_isolation_variables,
+    make_basic_isolation_variables,
+    make_intermediate_isolation_variables,
+    make_composite_dtf_variables,
+    make_composite_dtf_variables_3body,
+    make_basic_dtf_variables,
+)
+
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from FunTuple import FunTuple_Particles as Funtuple
+
+def make_dtf_variables_hmumu(options, pvs, input_data, ptype):
+
+    if ptype not in ["basic", "composite"]:
+        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
+
+    from DecayTreeFitter import DecayTreeFitter
+    
+    DTF = DecayTreeFitter(
+        name=f'DTF_{{hash}}',
+        input_particles=input_data)
+
+    DTFvtx = DecayTreeFitter(
+        name=f'DTFvtx_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    DTFmassDp = DecayTreeFitter(
+        name=f'DTFmassDp_{{hash}}',
+        input_particles=input_data,
+        mass_constraints=["D+"])
+
+    DTFvtxmassDp = DecayTreeFitter(
+        name=f'DTFvtxmassDp_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D+"])
+
+    DTFmassDsp = DecayTreeFitter(
+        name=f'DTFmassDsp_{{hash}}',
+        input_particles=input_data,
+        substitutions = ['D+{{D_s+}}'],
+        mass_constraints=["D_s+"])
+
+    DTFvtxmassDsp = DecayTreeFitter(
+        name=f'DTFvtxmassDsp_{{hash}}',
+        input_particles=input_data,
+        substitutions = ['D+{{D_s+}}',"J/psi(1S){{J/psi(1S)}}"],#trick
+        mass_constraints=["D_s+"],
+        input_pvs=pvs,
+    )
+
+    if ptype == "basic":
+        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassDp,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="Dp")
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassDp,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="Dp")
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassDsp,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="Dsp")
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassDsp,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="Dsp")
+        return dtf_vars
+
+    if ptype == "composite":
+        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassDp,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="Dp")
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassDp,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="Dp")
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassDsp,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="Dsp")
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassDsp,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="Dsp")
+        return dtf_vars
+
+
+def make_dtf_variables_pmumu(options, pvs, input_data, ptype):
+
+    if ptype not in ["basic", "composite"]:
+        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
+
+    from DecayTreeFitter import DecayTreeFitter
+    
+    DTF = DecayTreeFitter(
+        name=f'DTF_{{hash}}',
+        input_particles=input_data)
+
+    DTFvtx = DecayTreeFitter(
+        name=f'DTFvtx_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    DTFmass = DecayTreeFitter(
+        name=f'DTFmass_{{hash}}',
+        input_particles=input_data,
+        mass_constraints=["Lambda_c+"])
+
+    DTFvtxmass = DecayTreeFitter(
+        name=f'DTFvtxmass_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["Lambda_c+"])
+
+    if ptype == "basic":
+        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmass,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="Lc")
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmass,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="Lc")
+        return dtf_vars
+
+    if ptype == "composite":
+        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmass,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="D0")
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmass,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="D0")
+        return dtf_vars
+
+def make_dtf_variables_hhmumu(options, pvs, input_data, ptype):
+
+    if ptype not in ["basic", "composite","composite3b"]:
+        Exception(f"I want \'basic\' or \'composite\' or \'composite3b\. Got {ptype}")
+
+    from DecayTreeFitter import DecayTreeFitter
+    
+    DTF = DecayTreeFitter(
+        name=f'DTF_{{hash}}',
+        input_particles=input_data)
+
+    DTFvtx = DecayTreeFitter(
+        name=f'DTFvtx_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    DTFmass = DecayTreeFitter(
+        name=f'DTFmass_{{hash}}',
+        input_particles=input_data,
+        mass_constraints=["D0"])
+
+    DTFvtxmass = DecayTreeFitter(
+        name=f'DTFvtxmass_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0"])
+
+    if ptype == "basic":
+        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmass,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="D0")
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmass,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="D0")
+        return dtf_vars
+
+    if ptype == "composite3b":
+        dtf_vars = make_composite_dtf_variables_3body(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
+                                             DTF=DTFmass,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="D0")
+        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
+                                             DTF=DTFvtxmass,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="D0")
+
+        return dtf_vars
+        
+    if ptype == "composite":
+        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmass,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="D0")
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmass,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="D0")
+        return dtf_vars
+
+
+def maketuple_D2pimumu(options, pvs, rec_summary):
+    name = "D2pimumu"
+    turbo_line = "Hlt2Charm_DpDspToPipMumMup"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> (J/psi(1S) -> mu- mu+) pi+]CC",
+        "Jpsi" : "[D+ -> ^(J/psi(1S) -> mu- mu+) pi+]CC",
+        "lm"   : "[D+ -> (J/psi(1S) -> ^mu- mu+) pi+]CC",
+        "lp"   : "[D+ -> (J/psi(1S) -> mu- ^mu+) pi+]CC",
+        "hp" : "[D+ -> (J/psi(1S) -> mu- mu+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
+        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation: 
+
+        variables = {
+            "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+            "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2pimumu_WS(options, pvs, rec_summary):
+    name = "D2pimumu_WS"
+    turbo_line = "Hlt2Charm_DpDspToPipMupMup_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> (J/psi(1S) -> mu+ mu+) pi+]CC",
+        "Jpsi" : "[D+ -> (J/psi(1S) -> mu+ mu+) pi+]CC",
+        "lp1"   : "[D+ -> (J/psi(1S) -> ^mu+ mu+) pi+]CC",
+        "lp2"   : "[D+ -> (J/psi(1S) -> mu+ ^mu+) pi+]CC",
+        "hp" : "[D+ -> (J/psi(1S) -> mu+ mu+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
+        "lp1"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+        "lp2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation: 
+
+        variables = {
+            "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+            "lp1"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "lp2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2pipipi(options, pvs, rec_summary):
+    name = "CharmRD_D2pipipi"
+    turbo_line = "Hlt2Charm_DpDspToPipPimPip_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> (J/psi(1S) -> pi- pi+) pi+]CC",
+        "Jpsi" : "[D+ -> (J/psi(1S) -> pi- pi+) pi+]CC",
+        "lm"   : "[D+ -> (J/psi(1S) -> ^pi- pi+) pi+]CC",
+        "lp"   : "[D+ -> (J/psi(1S) -> pi- ^pi+) pi+]CC",
+        "hp" : "[D+ -> (J/psi(1S) -> pi- pi+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
+        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation: 
+
+        variables = {
+            "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+            "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2piee(options, pvs, rec_summary):
+    name = "D2piee"
+    turbo_line = "Hlt2Charm_DpDspToPipEmEp"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> (J/psi(1S) -> e- e+) pi+]CC",
+        "Jpsi" : "[D+ -> ^(J/psi(1S) -> e- e+) pi+]CC",
+        "lm"   : "[D+ -> (J/psi(1S) -> ^e- e+) pi+]CC",
+        "lp"   : "[D+ -> (J/psi(1S) -> e- ^e+) pi+]CC",
+        "hp" : "[D+ -> (J/psi(1S) -> e- e+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
+        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation: 
+
+        variables = {
+            "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+            "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Lc2pmumu(options, pvs, rec_summary):
+    name = "Lc2pmumu"
+    turbo_line = "Hlt2Charm_LcpToPpMumMup"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Lc" : "[Lambda_c+ -> (J/psi(1S) -> mu- mu+) p+]CC",
+        "Jpsi" : "[Lambda_c+ -> ^(J/psi(1S) -> mu- mu+) p+]CC",
+        "lm"   : "[Lambda_c+ -> (J/psi(1S) -> ^mu- mu+) p+]CC",
+        "lp"  : "[Lambda_c+ -> (J/psi(1S) -> mu- ^mu+) p+]CC",
+        "pp" : "[Lambda_c+ -> (J/psi(1S) -> mu- mu+) ^p+]CC",
+    }
+
+    variables = {
+        "Lc"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "pp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation: 
+
+        variables = {
+            "Lc"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+            "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "pp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02Kpimumu_RS(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02Kpimumu_RS"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPipMumMup"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^(D0 -> K- pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
+        "Km"   : "[D*(2010)+ -> (D0 -> ^K- pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
+        "pip"  : "[D*(2010)+ -> (D0 -> K- ^pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
+        "Jpsi"  : "[D*(2010)+ -> (D0 -> K- pi+ ^(J/psi(1S) -> mu- mu+)) pi+]CC",
+        "lm"  : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> ^mu- mu+)) pi+]CC",
+        "lp"  : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> mu- ^mu+)) pi+]CC",
+        "spip" : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> mu- mu+)) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite"),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation: 
+
+        variables = {
+            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
+            "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
+            "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+            "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
diff --git a/Charm_2024validation/options/tupling.py b/Charm_2024validation/options/tupling.py
new file mode 100644
index 0000000000..99de572726
--- /dev/null
+++ b/Charm_2024validation/options/tupling.py
@@ -0,0 +1,986 @@
+##############################################################################
+# (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.                                       #
+###############################################################################
+"""Common configuration functions
+
+"""
+
+import Functors as F
+from Functors.math import log
+import Functors.math as fmath
+
+from FunTuple import FunctorCollection
+from FunTuple.functorcollections import (
+    MCHierarchy,
+    MCPromptDecay,
+    Kinematics,
+    SelectionInfo,
+    HltTisTos,
+    MCVertexInfo,
+    MCKinematics,
+    ParticleID, #wrong variables PID_PI = 0, PROBNN_D = nan
+    EventInfo,
+    LHCInfo,
+    ParticleIsolation,
+    MCPrimaries,
+    MCReconstructed,
+    MCReconstructible,
+)
+
+from DaVinciMCTools import MCTruthAndBkgCat, MCReconstructed, MCReconstructible
+from PyConf.Algorithms import ParticleToSubcombinationsAlg
+from DecayTreeFitter import DecayTreeFitter
+
+Hlt1_global_lines = [
+    "Hlt1GECPassthroughDecision",
+    "Hlt1BeamGasDecision",
+    "Hlt1PassthroughDecision",
+    "Hlt1NoBeamDecision",
+    "Hlt1BeamOneDecision",
+    "Hlt1BeamTwoDecision",
+    "Hlt1BothBeamsDecision",
+    "Hlt1ODINLumiDecision",
+    "Hlt1ODINVeloOpenDecision",
+    "Hlt1ODINNoBiasDecision",
+    "Hlt1VeloMicroBiasDecision",
+    "Hlt1RICH1AlignmentDecision",
+    "Hlt1RICH2AlignmentDecision",
+    "Hlt1BeamGasDecision",
+    "Hlt1L02PPiDecision",
+    "Hlt1LowMassNoipDielectron_massSlice1_promptDecision",
+    "Hlt1LowMassNoipDielectron_SS_massSlice1_promptDecision",
+    "Hlt1LowMassNoipDielectron_massSlice2_promptDecision",
+    "Hlt1LowMassNoipDielectron_SS_massSlice2_promptDecision",
+    "Hlt1LowMassNoipDielectron_massSlice3_promptDecision",
+    "Hlt1LowMassNoipDielectron_SS_massSlice3_promptDecision",
+    "Hlt1LowMassNoipDielectron_massSlice4_promptDecision",
+    "Hlt1LowMassNoipDielectron_SS_massSlice4_promptDecision",
+    "Hlt1LowMassNoipDielectron_massSlice1_displacedDecision",
+    "Hlt1LowMassNoipDielectron_SS_massSlice1_displacedDecision",
+    "Hlt1LowMassNoipDielectron_massSlice2_displacedDecision",
+    "Hlt1LowMassNoipDielectron_SS_massSlice2_displacedDecision",
+    "Hlt1LowMassNoipDielectron_massSlice3_displacedDecision",
+    "Hlt1LowMassNoipDielectron_SS_massSlice3_displacedDecision",
+    "Hlt1LowMassNoipDielectron_massSlice4_displacedDecision",
+    "Hlt1LowMassNoipDielectron_SS_massSlice4_displacedDecision",
+]
+Hlt1_1track_lines = [
+    "Hlt1TrackMVADecision",
+    "Hlt1LowPtMuonDecision",
+    "Hlt1SingleHighPtMuonDecision",
+    "Hlt1SingleHighPtMuonNoMuIDDecision",
+    "Hlt1TrackMuonMVADecision",
+    "Hlt1OneMuonTrackLineDecision",
+    "Hlt1TrackElectronMVADecision",
+    "Hlt1SingleHighPtElectronDecision",
+    "Hlt1SingleHighEtDecision",
+]
+Hlt1_lines = Hlt1_1track_lines+[
+    "Hlt1TwoTrackMVACharmXSecDecision",
+    "Hlt1TwoTrackMVADecision",
+    "Hlt1TwoTrackKsDecision",
+    "Hlt1D2KPiDecision",
+    "Hlt1D2KKDecision",
+    "Hlt1D2PiPiDecision",
+    "Hlt1KsToPiPiDecision",
+    "Hlt1LowPtDiMuonDecision",#removed
+    "Hlt1DiMuonNoIPDecision",
+    "Hlt1DiMuonNoIP_ssDecision",
+    "Hlt1DiMuonHighMassDecision",
+    "Hlt1DiMuonLowMassDecision",#replaced by Hlt1DiMuonDisplacedDecision
+    "Hlt1DiMuonSoftDecision",
+    "Hlt1DiMuonDisplacedDecision",
+    "Hlt1TwoKsDecision",
+    "Hlt1D2KPiAlignmentDecision",
+    "Hlt1DiMuonHighMassAlignmentDecision",
+    "Hlt1DisplacedDiMuonAlignmentDecision",
+    "Hlt1DisplacedDielectronDecision",
+    "Hlt1DisplacedLeptonsDecision",#removed
+]
+
+
+Hlt2_lines = [
+    "Hlt2Charm_DstpToD0Pip_D0ToKmPip_XSec",
+    "Hlt2Charm_D0ToKmPip_XSec",
+    "Hlt2Charm_D0ToKmKp",
+    "Hlt2Charm_D0ToKmPip",
+    "Hlt2Charm_D0ToPimPip",
+    "Hlt2Charm_DpDspToKsKp_DD",
+    "Hlt2Charm_DpDspToKsKp_LD",
+    "Hlt2Charm_DpDspToKsKp_LL",
+    "Hlt2Charm_DpDspToKsPip_DD",
+    "Hlt2Charm_DpDspToKsPip_LD",
+    "Hlt2Charm_DpDspToKsPip_LL",
+    "Hlt2Charm_DpToKmPipPip",
+    "Hlt2Charm_DspToKmKpPip",
+    "Hlt2Charm_DpToKmPipPip_NoCuts",
+    "Hlt2Charm_DspToKmKpPip_NoCuts",
+    "Hlt2Charm_DpToKmPipPip_XSec",
+    "Hlt2Charm_DspToKmKpPip_XSec",
+    "Hlt2Charm_DstpToD0Pip_D0ToKmKp",
+    "Hlt2Charm_DstpToD0Pip_D0ToKmPip",
+    "Hlt2Charm_DstpToD0Pip_D0ToKpPim",
+    "Hlt2Charm_DstpToD0Pip_D0ToPimPip",
+    "Hlt2Charm_DstpToD0Pip_D0ToKmPip_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKpPim_LowBias",
+    "Hlt2Charm_D0ToKmPip_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKmKp_LowBias",
+    "Hlt2Charm_D0ToKmKp_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToPimPip_LowBias",
+    "Hlt2Charm_D0ToPimPip_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLL",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLL_Tight",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLDD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLDD_Tight",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDDD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDDD_Tight",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULLL",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULLL_Tight",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULDD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULDD_Tight",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLD_Tight",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDLD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDLD_Tight",
+    "Hlt2Charm_D0ToKsPimPip_LL",
+    "Hlt2Charm_D0ToKsPimPip_DD",
+    "Hlt2Charm_D0ToKsPimPip_LL_LowBias",
+    "Hlt2Charm_D0ToKsPimPip_LL_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_LL",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_DD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_LL_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_DD_LowBias",
+    "Hlt2Charm_D0ToKsKmPip_LL",
+    "Hlt2Charm_D0ToKsKmPip_DD",
+    "Hlt2Charm_D0ToKsKmPip_LL_LowBias",
+    "Hlt2Charm_D0ToKsKmPip_LL_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_LL",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_DD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_LL_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_DD_LowBias",
+    "Hlt2Charm_D0ToKsKpPim_LL",
+    "Hlt2Charm_D0ToKsKpPim_DD",
+    "Hlt2Charm_D0ToKsKpPim_LL_LowBias",
+    "Hlt2Charm_D0ToKsKpPim_DD_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_LL",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_DD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_LL_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_DD_LowBias",
+    "Hlt2Charm_D0ToKsKmKp_LL",
+    "Hlt2Charm_D0ToKsKmKp_DD",
+    "Hlt2Charm_D0ToKsKmKp_LL_LowBias",
+    "Hlt2Charm_D0ToKsKmKp_DD_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_LL",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_DD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_LL_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_DD_LowBias",
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS',
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS',
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS_MVA',
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS_MVA',
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS',
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS',
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS_MVA',
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS_MVA',
+    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS',
+    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS',
+    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS_MVA',
+    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS_MVA',
+]
+
+def make_composite_variables(options, pvs, data, add_truth=True, add_Hlt1TisTos=True):
+    if not options.simulation:
+        add_truth = False
+    variables = (
+        FunctorCollection(
+            {
+                "MAXPT": F.MAX(F.PT),
+                "MINPT": F.MIN(F.PT),
+                "SUMPT": F.SUM(F.PT),
+                "MAXP": F.MAX(F.P),
+                "MINP": F.MIN(F.P),
+                "BPVDIRA": F.BPVDIRA(pvs),
+                "VCHI2DOF": F.CHI2DOF,
+                #"VNDOF": F.NDOF,
+                "BPVFDCHI2": F.BPVFDCHI2(pvs),
+                "BPVFD": F.BPVFD(pvs),
+                "BPVVDRHO": F.BPVVDRHO(pvs),
+                "BPVVDZ": F.BPVVDZ(pvs),
+                "BPVIPCHI2": F.BPVIPCHI2(pvs),
+                "BPVIP": F.BPVIP(pvs),
+                "LOGBPVIPCHI2": log(F.BPVIPCHI2(pvs)),
+                "BPVLTIME": F.BPVLTIME(pvs),
+                "MAXBPVIPCHI2": F.MAX(F.BPVIPCHI2(pvs)),
+                "MINBPVIPCHI2": F.MIN(F.BPVIPCHI2(pvs)),
+                "MAXBPVIP": F.MAX(F.BPVIP(pvs)),
+                "MINBPVIP": F.MIN(F.BPVIP(pvs)),
+                "MAXDOCACHI2": F.MAXDOCACHI2,
+                "MAXDOCA": F.MAXDOCA,
+                "MAXSDOCACHI2": F.MAXSDOCACHI2,
+                "MAXSDOCA": F.MAXSDOCA,
+                "ETA": F.ETA,
+                "PHI": F.PHI,
+                "END_VX": F.END_VX,
+                "END_VY": F.END_VY,
+                "END_VZ": F.END_VZ,
+                "END_VX_ERR":F.SQRT @ F.CALL(0,0) @ F.POS_COV_MATRIX @ F.ENDVERTEX,
+                "END_VY_ERR":F.SQRT @ F.CALL(1,1) @ F.POS_COV_MATRIX @ F.ENDVERTEX,
+                "END_VZ_ERR":F.SQRT @ F.CALL(2,2) @ F.POS_COV_MATRIX @ F.ENDVERTEX,
+                "BPVX": F.BPVX(pvs),
+                "BPVY": F.BPVY(pvs),
+                "BPVZ": F.BPVZ(pvs),
+                "BPVX_ERR": F.SQRT @ F.CALL(0,0) @ F.POS_COV_MATRIX @ F.BPV(pvs),
+                "BPVY_ERR": F.SQRT @ F.CALL(1,1) @ F.POS_COV_MATRIX @ F.BPV(pvs),
+                "BPVZ_ERR": F.SQRT @ F.CALL(2,2) @ F.POS_COV_MATRIX @ F.BPV(pvs),
+                "ALLPVFD"     : F.ALLPV_FD(pvs),
+                "ALLPVIP"     : F.ALLPV_IP(pvs),
+                "OBJECT_KEY": F.OBJECT_KEY,
+            }
+        )
+        + Kinematics()
+        #+ ParticleID(extra_info=True) #only for daughters
+    )
+
+    if add_Hlt1TisTos:
+        variables += HltTisTos(
+            selection_type="Hlt1", trigger_lines=Hlt1_lines, data=data
+        )
+
+    if add_truth:
+        variables = add_truth_matching_functors(
+            options,
+            variables,
+            data,
+            hierarchy=True,
+            kinematics=True,
+            vertex_info=True,
+            bkgcat=True,
+        )
+
+    return variables
+
+def make_tistoscombinations(options, pvs, data):
+    algo_output = ParticleToSubcombinationsAlg( Input=data )
+    relations = algo_output.OutputRelations
+
+    tistos_variables_extra = HltTisTos(
+        selection_type="Hlt1", trigger_lines=["Hlt1TwoTrackMVADecision"], data=algo_output.OutputParticles
+    )
+    tistos_combinations = {}
+    for k,v in tistos_variables_extra.get_thor_functors().items():
+        tistos_combinations[k + "_SUBCOMB" ] = F.MAP_INPUT_ARRAY( v, relations )
+    tistos_combinations = FunctorCollection( tistos_combinations )
+
+    return tistos_combinations
+
+def make_composite_variables_3body(options, pvs, data, add_truth=True):
+
+    variables = (
+        FunctorCollection(
+            {
+                #12
+                "M12": F.SUBCOMB(Functor=F.MASS, Indices=(1, 2)),
+                "SDOCA12"     : F.SDOCA(Child1=1,Child2=2),
+                "SDOCACHI212" : F.SDOCACHI2(Child1=1,Child2=2),
+                "DOCA12"      : F.DOCA(Child1=1,Child2=2),
+                "DOCACHI212"  : F.DOCACHI2(Child1=1,Child2=2),
+                "COS12": F.ALV(1, 2),
+                #"ETA12": F.SUBCOMB(Functor=F.ETA, Indices=(1, 2)),
+                #"PT12": F.SUBCOMB(Functor=F.PT, Indices=(1, 2)),
+                #"VCHI212": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(1, 2)),
+                #"END_VZ12": F.SUBCOMB(Functor=F.END_VZ, Indices=(1, 2)),
+                #"BPVZ12": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(1, 2)),
+                #"BPVCORRM12": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(1, 2)),
+                #13
+                "M13": F.SUBCOMB(Functor=F.MASS, Indices=(1, 3)),
+                "SDOCA13"     : F.SDOCA(Child1=1,Child2=3),
+                "SDOCACHI213" : F.SDOCACHI2(Child1=1,Child2=3),
+                "DOCA13"      : F.DOCA(Child1=1,Child2=3),
+                "DOCACHI213"  : F.DOCACHI2(Child1=1,Child2=3),
+                "COS13": F.ALV(1, 3),
+                #"ETA13": F.SUBCOMB(Functor=F.ETA, Indices=(1, 3)),
+                #"PT13": F.SUBCOMB(Functor=F.PT, Indices=(1, 3)),
+                #"VCHI213": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(1, 3)),
+                #"END_VZ13": F.SUBCOMB(Functor=F.END_VZ, Indices=(1, 3)),
+                #"BPVZ13": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(1, 3)),
+                #"BPVCORRM13": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(1, 3)),
+                #23
+                "M23": F.SUBCOMB(Functor=F.MASS, Indices=(2, 3)),
+                "SDOCA23"     : F.SDOCA(Child1=2,Child2=3),
+                "SDOCACHI223" : F.SDOCACHI2(Child1=2,Child2=3),
+                "DOCA23"      : F.DOCA(Child1=2,Child2=3),
+                "DOCACHI223"  : F.DOCACHI2(Child1=2,Child2=3),
+                "COS23": F.ALV(2, 3),
+                #"ETA23": F.SUBCOMB(Functor=F.ETA, Indices=(2, 3)),
+                #"PT23": F.SUBCOMB(Functor=F.PT, Indices=(2, 3)),
+                #"VCHI223": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(2, 3)),
+                #"END_VZ23": F.SUBCOMB(Functor=F.END_VZ, Indices=(2, 3)),
+                #"BPVZ23": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(2, 3)),
+                #"BPVCORRM23": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(2, 3)),
+            }
+        )
+    )
+    return make_composite_variables(options, pvs, data, add_truth)+make_tistoscombinations(options, pvs, data)+variables
+
+def make_composite_variables_4body(options, pvs, data, add_truth=True):
+
+    variables = (
+        FunctorCollection(
+            {
+                #14
+                "M14": F.SUBCOMB(Functor=F.MASS, Indices=(1, 4)),
+                "SDOCA14"     : F.SDOCA(Child1=1,Child2=4),
+                "SDOCACHI214" : F.SDOCACHI2(Child1=1,Child2=4),
+                "DOCA14"      : F.DOCA(Child1=1,Child2=4),
+                "DOCACHI214"  : F.DOCACHI2(Child1=1,Child2=4),
+                "COS14": F.ALV(1, 4),
+                #"ETA14": F.SUBCOMB(Functor=F.ETA, Indices=(1, 4)),
+                #"PT14": F.SUBCOMB(Functor=F.PT, Indices=(1, 4)),
+                #"VCHI214": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(1, 4)),
+                #"END_VZ14": F.SUBCOMB(Functor=F.END_VZ, Indices=(1, 4)),
+                #"BPVZ14": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(1, 4)),
+                #"BPVCORRM14": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(1, 4)),
+                #24
+                "M24": F.SUBCOMB(Functor=F.MASS, Indices=(2, 4)),
+                "SDOCA24"     : F.SDOCA(Child1=2,Child2=4),
+                "SDOCACHI224" : F.SDOCACHI2(Child1=2,Child2=4),
+                "DOCA24"      : F.DOCA(Child1=2,Child2=4),
+                "DOCACHI224"  : F.DOCACHI2(Child1=2,Child2=4),
+                "COS24": F.ALV(2, 4),
+                #"ETA24": F.SUBCOMB(Functor=F.ETA, Indices=(2, 4)),
+                #"PT24": F.SUBCOMB(Functor=F.PT, Indices=(2, 4)),
+                #"VCHI224": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(2, 4)),
+                #"END_VZ24": F.SUBCOMB(Functor=F.END_VZ, Indices=(2, 4)),
+                #"BPVZ24": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(2, 4)),
+                #"BPVCORRM24": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(2, 4)),
+                #34
+                "M34": F.SUBCOMB(Functor=F.MASS, Indices=(3, 4)),
+                "SDOCA34"     : F.SDOCA(Child1=3,Child2=4),
+                "SDOCACHI234" : F.SDOCACHI2(Child1=3,Child2=4),
+                "DOCA34"      : F.DOCA(Child1=3,Child2=4),
+                "DOCACHI234"  : F.DOCACHI2(Child1=3,Child2=4),
+                "COS34": F.ALV(3, 4),
+                #"ETA34": F.SUBCOMB(Functor=F.ETA, Indices=(3, 4)),
+                #"PT34": F.SUBCOMB(Functor=F.PT, Indices=(3, 4)),
+                #"VCHI234": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(3, 4)),
+                #"END_VZ34": F.SUBCOMB(Functor=F.END_VZ, Indices=(3, 4)),
+                #"BPVZ34": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(3, 4)),
+                #"BPVCORRM34": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(3, 4)),
+            }
+        )
+    )
+    return make_composite_variables_3body(options, pvs, data, add_truth)+variables #make_tistoscombinations already included
+
+def make_b_composite_variables(options, pvs, data, add_truth=True):
+    
+    # define helper functors
+    get_child = F.CHILD(1, F.FORWARDARG0) # change here the index of the child
+    get_SV =  F.ENDVERTEX @ F.FORWARDARG0
+    get_SV_pos = F.TOLINALG @ F.POSITION @ get_SV # only if composite (i.e. has vertex)
+    get_child_endvtx_pos = F.ENDVERTEX_POS  @ get_child
+    get_fdvec_child = get_child_endvtx_pos - get_SV_pos
+
+    # define observables
+    IP_wrt_SV = F.IP.bind(get_SV_pos , get_child)
+    IPCHI2_wrt_SV = F.IPCHI2.bind(get_SV , get_child) # only if child is composite (i.e. has vertex)
+    FD_wrt_SV = F.MAGNITUDE @ get_fdvec_child
+    FDCHI2_wrt_SV = F.VTX_FDCHI2.bind(get_SV, get_child)
+
+    
+    variables = FunctorCollection(
+        {       
+            "ID": F.PARTICLE_ID ,
+            "PT": F.PT,
+            "P": F.P,
+            "MASS": F.MASS,
+            "CHILD1_IPwrtSV": IP_wrt_SV,
+            "CHILD1_IPCHI2wrtSV": IPCHI2_wrt_SV,
+            "CHILD1_FDwrtSV": FD_wrt_SV,
+            "CHILD1_FDCHI2wrtSV": FDCHI2_wrt_SV,
+            "PX": F.PX,
+            "PY": F.PY,
+            "PZ": F.PZ,
+            "END_VCHI2DOF": F.CHI2DOF @ F.ENDVERTEX,
+            "BPVCHI2DOF": F.CHI2DOF @ F.BPV(pvs),
+            # B2OC generic B hadron NN Hlt2 algorithm,
+            # not planning to use it directly for B2OC EM
+            "MVA": F.MVA(
+                MVAType="SigmaNet",
+                Config={
+                    "File":
+                    "paramfile://data/Hlt2B2OC_B_SigmaNet_Run3-v1.json",
+                    "Name":
+                    "B2OC_SigmaNet_Generic",
+                    "Lambda":
+                    "2.0",
+                    "NLayers":
+                    "3",
+                    "InputSize":
+                    "6",
+                    "Monotone_Constraints":
+                    "[1,-1,-1,-1,-1,-1]",
+                    "Variables":
+                    "log_B_PT,B_ETA,log_B_DIRA,log_B_ENDVERTEX_CHI2,log_B_IPCHI2_OWNPV,log_B_IP_OWNPV",
+                },
+                Inputs={
+                    "log_B_PT": fmath.log(F.PT),
+                    "B_ETA": F.ETA,
+                    "log_B_DIRA": fmath.log(1. - F.BPVDIRA(pvs)),
+                    "log_B_ENDVERTEX_CHI2": fmath.log(F.CHI2DOF),
+                    "log_B_IPCHI2_OWNPV": fmath.log(F.BPVIPCHI2(pvs)),
+                    "log_B_IP_OWNPV": fmath.log(F.BPVIP(pvs)),
+                }),
+            #'SSPionBDT_Mistag': F.SSPionBDT_Mistag(sspionTagging.OutputFlavourTags),
+            #'SSPionBDT_Decision': F.SSPionBDT_Decision(sspionTagging.OutputFlavourTags),
+
+        }
+    )
+    return make_composite_variables(options, pvs, data, add_truth)+make_tistoscombinations(options, pvs, data)+variables
+
+def make_DeltaM_variable(options):
+    return FunctorCollection({"DM": F.MASS - F.CHILD(1, F.MASS)})
+
+def make_basic_variables(options, pvs, data, add_truth=True, islong = True):
+    if not options.simulation:
+        add_truth = False
+    variables = (
+        FunctorCollection(
+            {
+                "TRCHI2DOF": F.CHI2DOF @ F.TRACK,
+                "ETA": F.ETA,
+                "PHI": F.PHI,
+                "TRGHOSTPROB": F.GHOSTPROB,
+                "BPVIPCHI2": F.BPVIPCHI2(pvs),
+                "BPVIP": F.BPVIP(pvs),
+                "BPVX": F.BPVX(pvs),
+                "BPVY": F.BPVY(pvs),
+                "BPVZ": F.BPVZ(pvs),
+                "TX"          : F.TX,
+                "TY"          : F.TY,
+                "MINIPCHI2"   : F.MINIPCHI2(pvs),
+                "MINIP"       : F.MINIP(pvs),
+                "KEY"         : F.VALUE_OR(-1) @ F.OBJECT_KEY @ F.TRACK,
+                "ISMUON"      : F.ISMUON,
+                "TRACKPT": F.TRACK_PT,
+                "TRACKHISTORY": F.VALUE_OR(-1) @ F.TRACKHISTORY @ F.TRACK,
+                "QOVERP": F.QOVERP @ F.TRACK,
+                "NDOF": F.VALUE_OR(-1) @ F.NDOF @ F.TRACK,
+                "NFTHITS": F.VALUE_OR(-1) @ F.NFTHITS @ F.TRACK,
+                "NHITS": F.VALUE_OR(-1) @ F.NHITS @ F.TRACK,
+                "NUTHITS": F.VALUE_OR(-1) @ F.NUTHITS @ F.TRACK,
+                "NVPHITS": F.VALUE_OR(-1) @ F.NVPHITS @ F.TRACK,
+                #"NMUONHITS": F.VALUE_OR(-1) @ F.NHITSMUONS @ F.TRACK, #https://gitlab.cern.ch/lhcb/Rec/-/merge_requests/3756
+                "TRACKHASVELO": F.VALUE_OR(-1) @ F.TRACKHASVELO @ F.TRACK,
+                "TRACKHASUT": F.VALUE_OR(-1) @ F.TRACKHASUT @ F.TRACK,
+                "OBJECT_KEY": F.OBJECT_KEY,
+                "HASBREM": F.HASBREM,
+                "BREMENERGY": F.BREMENERGY,
+                "BREMBENDCORR": F.BREMBENDCORR,
+            }
+        )
+        + Kinematics()
+        + ParticleID(extra_info=True)
+    )
+
+    if islong:
+        variables += FunctorCollection({"CTB": F.TRACK_POSVEC_CLOSESTTOBEAM})
+    
+    variables += HltTisTos(
+        selection_type="Hlt1", trigger_lines=Hlt1_1track_lines, data=data
+    )
+    
+    if add_truth:
+        variables = add_truth_matching_functors(
+            options,
+            variables,
+            data,
+            hierarchy=True,
+            kinematics=True,
+            vertex_info=True,
+            bkgcat=False,
+        )
+
+    return variables
+
+def make_hlt2_event_variables(options, pvs, rec_summary):
+    # define event level variables
+    evt_variables = EventInfo()
+    if not options.simulation:
+        evt_variables += LHCInfo() #FillNumber
+    evt_variables += SelectionInfo(selection_type="Hlt2", trigger_lines=Hlt2_lines)
+    evt_variables += SelectionInfo(selection_type="Hlt1", trigger_lines=Hlt1_global_lines)
+    evt_variables += FunctorCollection(
+        {
+            "ALLPVX": F.ALLPVX(pvs),
+            "ALLPVY": F.ALLPVY(pvs),
+            "ALLPVZ": F.ALLPVZ(pvs),
+            "ALLPVNDOF": F.MAP(F.VALUE_OR(F.NaN) @ F.NDOF) @ F.TES(pvs),
+            "ALLPVCHI2": F.MAP(F.VALUE_OR(F.NaN) @ F.CHI2) @ F.TES(pvs),
+            "nPVs": F.SIZE(pvs),
+            "nTracks": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nTracks"),
+            "nLongTracks": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nLongTracks"),
+            "nMuonTracks": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nMuonTracks"),
+            "nFTClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nFTClusters"),
+            "nVPClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nVPClusters"),
+            "nUTClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nUTClusters"),
+            "nSPDhits": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nSPDhits"),
+            "nEcalClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nEcalClusters"),
+            "nEcalClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nEcalClusters"),
+            "eCalTot": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "eCalTot"),
+            "hCalTot": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "hCalTot"),
+            "nRich1Hits": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nRich1Hits"),
+            "nRich2Hits": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nRich2Hits"),
+        }
+    )
+    return evt_variables
+
+def add_truth_matching_functors(
+    options,
+    variables,
+    data,
+    hierarchy=True,
+    kinematics=True,
+    vertex_info=True,
+    bkgcat=False,
+    prompt_info=True,
+):
+    """Add MC truth matching functors to an existing FunctorCollection.
+
+    Args:
+        options (DaVinci.Options): DaVinci options object.
+        variables (FunctorCollection): FunctorCollection to modify
+        data: data handle
+        hierarchy (bool): Add MCHierarchy info (default True)
+        kinematics (bool): Add MCKinematics info (default True)
+        vertex_info (bool): Add MCVertexInfo (default True)
+        bkgcat (bool): Add TRUEKEY and BKGCAT functors - intended for composite particles (default False)
+        prompt_info (bool): Add MCPromptDecay info (default True)
+
+    Returns:
+        FunctorCollection: modified FunctorCollection with truth matched variables.
+    """
+    assert (
+        options.simulation
+    ), "options.simulation is set to False - it doesn't make sense to add truth matching."
+
+    MCTRUTH = MCTruthAndBkgCat(data)
+
+    if bkgcat:
+        variables += FunctorCollection(
+            {
+                # Important note: specify an invalid value for integer functors if there exists no truth info.
+                #                 The invalid value for floating point functors is set to nan.
+                "TRUEKEY": F.VALUE_OR(-1) @ MCTRUTH(F.OBJECT_KEY),
+                "BKGCAT": MCTRUTH.BkgCat,
+            }
+        )
+    if hierarchy:
+        variables += MCHierarchy(mctruth_alg=MCTRUTH)  # likely to change again!!
+    if vertex_info:
+        variables += MCVertexInfo(mctruth_alg=MCTRUTH)  # likely to change again!!
+    if kinematics:
+        variables += MCKinematics(mctruth_alg=MCTRUTH)  # likely to change again!!
+    if prompt_info:
+        variables += MCPromptDecay(mctruth_alg=MCTRUTH)
+
+    return variables
+
+### DTF variables ###
+
+def make_basic_dtf_variables(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name="", islong=True):
+    variables = (
+        FunctorCollection(
+            {
+                "TRCHI2DOF": F.CHI2DOF @ F.TRACK,
+                "ETA": F.ETA,
+                "PHI": F.PHI,
+                "TRGHOSTPROB": F.GHOSTPROB,
+                "BPVIPCHI2": F.BPVIPCHI2(pvs),
+                "BPVIP": F.BPVIP(pvs),
+                "BPVX": F.BPVX(pvs),
+                "BPVY": F.BPVY(pvs),
+                "BPVZ": F.BPVZ(pvs),
+                "TX"          : F.TX,
+                "TY"          : F.TY,
+                "MINIPCHI2"   : F.MINIPCHI2(pvs),
+                "MINIP"       : F.MINIP(pvs),
+                "KEY"         : F.VALUE_OR(-1) @ F.OBJECT_KEY @ F.TRACK,
+                "TRACKPT": F.TRACK_PT,
+                "TRACKHISTORY": F.VALUE_OR(-1) @ F.TRACKHISTORY @ F.TRACK,
+                "QOVERP": F.QOVERP @ F.TRACK,
+                "NDOF": F.VALUE_OR(-1) @ F.NDOF @ F.TRACK,
+            }
+        )
+        + Kinematics()
+    )
+
+    if islong:
+        variables += FunctorCollection({"CTB": F.TRACK_POSVEC_CLOSESTTOBEAM})
+    
+    if(mass_constraint):
+        if(pv_constraint): # MASS + PV
+            dtf_variables_mass_pv = FunctorCollection({
+                        'DTF_PV_M'+ particle_name + '_' + k: DTF(v)
+                        for k, v in variables.get_thor_functors().items()
+                    })
+            return dtf_variables_mass_pv
+        else: # MASS
+            dtf_variables_mass = FunctorCollection(
+                {'DTF_M'+ particle_name + '_' + k: DTF(v)
+                 for k, v in variables.get_thor_functors().items()})
+        return dtf_variables_mass
+
+    elif(pv_constraint): # PV
+        dtf_variables_pv = FunctorCollection({
+                'DTF_PV_' + k: DTF(v)
+                for k, v in variables.get_thor_functors().items()
+            })
+        return dtf_variables_pv
+
+    else: # NO MASS/PV
+        dtf_variables = FunctorCollection(
+            {'DTF_' + k: DTF(v)
+             for k, v in variables.get_thor_functors().items()})
+        return dtf_variables
+
+def make_composite_dtf_variables(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name=""):
+    variables = (
+        FunctorCollection(
+            {
+                "MAXPT": F.MAX(F.PT),
+                "MINPT": F.MIN(F.PT),
+                "SUMPT": F.SUM(F.PT),
+                "MAXP": F.MAX(F.P),
+                "MINP": F.MIN(F.P),
+                "BPVDIRA": F.BPVDIRA(pvs),
+                "VCHI2DOF": F.CHI2DOF, #CHI2VXNDOF
+                "BPVFDCHI2": F.BPVFDCHI2(pvs),
+                "BPVFD": F.BPVFD(pvs),
+                "BPVVDRHO": F.BPVVDRHO(pvs),
+                "BPVVDZ": F.BPVVDZ(pvs),
+                "BPVIPCHI2": F.BPVIPCHI2(pvs),
+                "BPVIP": F.BPVIP(pvs),
+                "LOGBPVIPCHI2": log(F.BPVIPCHI2(pvs)),
+                "BPVLTIME": F.BPVLTIME(pvs),
+                "MAXBPVIPCHI2": F.MAX(F.BPVIPCHI2(pvs)), #MAX_
+                "MINBPVIPCHI2": F.MIN(F.BPVIPCHI2(pvs)),
+                "MAXBPVIP": F.MAX(F.BPVIP(pvs)),
+                "MINBPVIP": F.MIN(F.BPVIP(pvs)),
+                "ETA": F.ETA,
+                "PHI": F.PHI,
+                "END_VX": F.END_VX, #END_
+                "END_VY": F.END_VY,
+                "END_VZ": F.END_VZ,
+                "BPVX": F.BPVX(pvs),
+                "BPVY": F.BPVY(pvs),
+                "BPVZ": F.BPVZ(pvs),
+                "ALLPVFD"     : F.ALLPV_FD(pvs),
+                "ALLPVIP"     : F.ALLPV_IP(pvs),
+                
+            }
+        )
+        + Kinematics()
+    )
+
+    addstring = "DTF"
+    if(pv_constraint):
+            addstring += '_PV'
+    if(mass_constraint):
+            addstring += '_M'
+    addstring += particle_name
+
+    DTF_chi2ndof = FunctorCollection(
+            {
+                addstring+"_DTFCHI2": DTF.CHI2,
+                addstring+"_DTFNDOF": DTF.NDOF,
+                addstring+"_CTAU": DTF.CTAU,
+                addstring+"_CTAUERR": DTF.CTAUERR,
+                addstring+"_MERR": DTF.MASSERR,
+            }
+    )
+
+    if(mass_constraint):
+        if(pv_constraint): # MASS + PV
+            dtf_variables_mass_pv = FunctorCollection({
+                        'DTF_PV_M'+ particle_name + '_' + k: DTF(v)
+                        for k, v in variables.get_thor_functors().items()
+                    })
+            return dtf_variables_mass_pv+DTF_chi2ndof
+        else: # MASS
+            dtf_variables_mass = FunctorCollection(
+                {'DTF_M'+ particle_name + '_' + k: DTF(v)
+                 for k, v in variables.get_thor_functors().items()})
+        return dtf_variables_mass+DTF_chi2ndof
+
+    elif(pv_constraint): # PV
+        dtf_variables_pv = FunctorCollection({
+                'DTF_PV_' + k: DTF(v)
+                for k, v in variables.get_thor_functors().items()
+            })
+        return dtf_variables_pv+DTF_chi2ndof
+
+    else: # NO MASS/PV
+        dtf_variables = FunctorCollection(
+            {'DTF_' + k: DTF(v)
+             for k, v in variables.get_thor_functors().items()})
+        return dtf_variables+DTF_chi2ndof
+
+def make_composite_dtf_variables_3body(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name=""):
+    variables = (
+        FunctorCollection(
+            {
+                "M13": F.SUBCOMB(Functor=F.MASS, Indices=(1, 3)),
+                "M23": F.SUBCOMB(Functor=F.MASS, Indices=(2, 3)),
+            }
+        )
+    )
+
+    if(mass_constraint):
+        if(pv_constraint): # MASS + PV
+            dtf_variables_mass_pv = FunctorCollection({
+                        'DTF_PV_M'+ particle_name + '_' + k: DTF(v)
+                        for k, v in variables.get_thor_functors().items()
+                    })
+            return dtf_variables_mass_pv+make_composite_dtf_variables(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
+        else: # MASS
+            dtf_variables_mass = FunctorCollection(
+                {'DTF_M'+ particle_name + '_' + k: DTF(v)
+                 for k, v in variables.get_thor_functors().items()})
+        return dtf_variables_mass+make_composite_dtf_variables(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
+
+    elif(pv_constraint): # PV
+        dtf_variables_pv = FunctorCollection({
+                'DTF_PV_' + k: DTF(v)
+                for k, v in variables.get_thor_functors().items()
+            })
+        return dtf_variables_pv+make_composite_dtf_variables(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
+
+    else: # NO MASS/PV
+        dtf_variables = FunctorCollection(
+            {'DTF_' + k: DTF(v)
+             for k, v in variables.get_thor_functors().items()})
+
+    return dtf_variables+make_composite_dtf_variables(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
+
+def make_composite_dtf_variables_4body(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name=""):
+    variables = (
+        FunctorCollection(
+            {
+                "M14": F.SUBCOMB(Functor=F.MASS, Indices=(1, 4)),
+                "M24": F.SUBCOMB(Functor=F.MASS, Indices=(2, 4)),
+                "M34": F.SUBCOMB(Functor=F.MASS, Indices=(3, 4)),
+            }
+        )
+    )
+
+    if(mass_constraint):
+        if(pv_constraint): # MASS + PV
+            dtf_variables_mass_pv = FunctorCollection({
+                        'DTF_PV_M'+ particle_name + '_' + k: DTF(v)
+                        for k, v in variables.get_thor_functors().items()
+                    })
+            return dtf_variables_mass_pv+make_composite_dtf_variables_3body(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
+        else: # MASS
+            dtf_variables_mass = FunctorCollection(
+                {'DTF_M'+ particle_name + '_' + k: DTF(v)
+                 for k, v in variables.get_thor_functors().items()})
+        return dtf_variables_mass+make_composite_dtf_variables_3body(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
+
+    elif(pv_constraint): # PV
+        dtf_variables_pv = FunctorCollection({
+                'DTF_PV_' + k: DTF(v)
+                for k, v in variables.get_thor_functors().items()
+            })
+        return dtf_variables_pv+make_composite_dtf_variables_3body(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
+
+    else: # NO MASS/PV
+        dtf_variables = FunctorCollection(
+            {'DTF_' + k: DTF(v)
+             for k, v in variables.get_thor_functors().items()})
+    
+        return dtf_variables+make_composite_dtf_variables_3body(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
+
+
+def make_MC_basic_variables():
+    MC_MOTHER_ID = lambda gen: F.VALUE_OR(0) @ F.MC_MOTHER(gen, F.PARTICLE_ID)
+    MC_MOTHER_KEY = lambda gen: F.VALUE_OR(-1) @ F.MC_MOTHER(gen, F.OBJECT_KEY)
+
+    variables = (
+        FunctorCollection(
+            {
+                "OBJECT_KEY": F.OBJECT_KEY,
+                "ETA": F.ETA,
+                "PHI": F.PHI,
+                "ORIGIN_VX": F.ORIGIN_VX,
+                "ORIGIN_VY": F.ORIGIN_VY,
+                "ORIGIN_VZ": F.ORIGIN_VZ,
+                "FOURMOMENTUM": F.FOURMOMENTUM,
+                "TRUEID": F.PARTICLE_ID,
+                "MC_MOTHER_ID": MC_MOTHER_ID(1),
+                "MC_MOTHER_KEY": MC_MOTHER_KEY(1),
+                "MC_GD_MOTHER_ID": MC_MOTHER_ID(2),
+                "MC_GD_MOTHER_KEY": MC_MOTHER_KEY(2),
+                "MC_GD_GD_MOTHER_ID": MC_MOTHER_ID(3),
+                "MC_GD_GD_MOTHER_KEY": MC_MOTHER_KEY(3),
+            }
+        )
+        + Kinematics()
+    )
+
+
+    from PyConf.reading import get_mc_particles, get_pp2mcp_relations, get_mc_track_info
+    MC_data = get_mc_particles("/Event/HLT2/MC/Particles")
+    relations_charged = get_pp2mcp_relations("/Event/HLT2/Relations/ChargedPP2MCP")
+    relations_neutral = get_pp2mcp_relations("/Event/HLT2/Relations/NeutralPP2MCP")
+    mcreconstructed_all = MCReconstructed(
+        input_mcparticles=MC_data,
+        use_best_mcmatch=True,
+        relations_charged=relations_charged,
+        relations_neutral=relations_neutral,
+    )
+    mcreconstructible_all = MCReconstructible(
+        input_mctrackinfo=get_mc_track_info()
+    )
+    import FunTuple.functorcollections as FC
+    vars_reconstructed = FC.MCReconstructed(mcreconstructed_alg=mcreconstructed_all, extra_info=True)
+    vars_reconstructible = FC.MCReconstructible(mcreconstructible_alg=mcreconstructible_all, extra_info=True)
+
+
+    return variables+vars_reconstructed+vars_reconstructible
+
+def make_MC_composite_variables():
+    MC_MOTHER_ID = lambda gen: F.VALUE_OR(0) @ F.MC_MOTHER(gen, F.PARTICLE_ID)
+    MC_MOTHER_KEY = lambda gen: F.VALUE_OR(-1) @ F.MC_MOTHER(gen, F.OBJECT_KEY)
+
+    variables = (
+        FunctorCollection(
+            {
+                "END_VX": F.END_VX,
+                "END_VY": F.END_VY,
+                "END_VZ": F.END_VZ,
+                "LTIME": F.MC_LIFETIME,
+                "OBJECT_KEY": F.OBJECT_KEY,
+                "ETA": F.ETA,
+                "PHI": F.PHI,
+                "ORIGIN_VX": F.ORIGIN_VX,
+                "ORIGIN_VY": F.ORIGIN_VY,
+                "ORIGIN_VZ": F.ORIGIN_VZ,
+                "FOURMOMENTUM": F.FOURMOMENTUM,
+                "TRUEID": F.PARTICLE_ID,
+                "MC_MOTHER_ID": MC_MOTHER_ID(1),
+                "MC_MOTHER_KEY": MC_MOTHER_KEY(1),
+                "MC_GD_MOTHER_ID": MC_MOTHER_ID(2),
+                "MC_GD_MOTHER_KEY": MC_MOTHER_KEY(2),
+                "MC_GD_GD_MOTHER_ID": MC_MOTHER_ID(3),
+                "MC_GD_GD_MOTHER_KEY": MC_MOTHER_KEY(3),
+            }
+        )
+        + Kinematics()
+        + MCPromptDecay()
+        )
+
+    return variables
+
+def make_MC_event_variables(mc_header):
+    # define event level variables
+    evt_variables = EventInfo()
+    evt_variables += MCPrimaries(mc_header=mc_header)
+
+    return evt_variables
+
+def make_top_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"]):
+    from PyConf.reading import get_particles
+    from IsolationTools import VertexAndConeIsolation
+
+    possible_charm_locations = ["LongTrackIso", "TTrackIso", "DownstreamTrackIso", "UpstreamTrackIso", "NeutralIso", "PizIso"]
+    coneangles = [0.25,0.5,1.,1.5,2.]
+
+    count = 0
+    for location in locations:
+        extra_particles = get_particles(f"/Event/HLT2/{hlt2_line}/{location}/Particles")
+
+        for coneangle in coneangles:
+            top_RTAlg = VertexAndConeIsolation(
+                name=location+"_"+str(coneangle),
+                reference_particles=input_data,
+                related_particles=extra_particles,
+                cut=F.DR2<coneangle)
+
+            if count == 0:
+                top_iso_variables = ParticleIsolation(isolation_alg=top_RTAlg,array_indx_name='indx')
+            else:
+                top_iso_variables += ParticleIsolation(isolation_alg=top_RTAlg,array_indx_name='indx')
+            count += 1
+
+
+    return top_iso_variables
+
+def make_basic_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"]):
+    from PyConf.reading import get_particles
+    from IsolationTools import VertexAndConeIsolation
+    from PyConf.Algorithms import ThOrParticleSelection
+
+    basic_code = (F.FILTER(F.ALL) @ F.GET_ALL_BASICS())
+    basic_particles = ThOrParticleSelection(InputParticles=input_data, Functor=basic_code).OutputSelection
+
+    possible_charm_locations = ["LongTrackIso", "TTrackIso", "DownstreamTrackIso", "UpstreamTrackIso", "NeutralIso", "PizIso"]
+    coneangles = [0.25,0.5,1.,1.5,2.]
+
+    count = 0
+    for location in locations:
+        extra_particles = get_particles(f"/Event/HLT2/{hlt2_line}/{location}/Particles")
+
+        for coneangle in coneangles:
+            basic_RTAlg = VertexAndConeIsolation(
+                name=location+"_"+str(coneangle),
+                reference_particles=basic_particles,
+                related_particles=extra_particles,
+                cut=F.DR2<coneangle)
+
+            if count == 0:
+                basic_iso_variables = ParticleIsolation(isolation_alg=basic_RTAlg,array_indx_name='indx')
+            else:
+                basic_iso_variables += ParticleIsolation(isolation_alg=basic_RTAlg,array_indx_name='indx')
+            count += 1
+
+
+    return basic_iso_variables
+
+
+def make_intermediate_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"], composite_ID = "J/psi(1S)"):
+    from PyConf.reading import get_particles
+    from IsolationTools import VertexAndConeIsolation
+    from PyConf.Algorithms import ThOrParticleSelection
+
+    intermediate_code = F.FILTER(F.IS_ABS_ID(composite_ID)) @ F.GET_ALL_DESCENDANTS()
+    intermediate_particles = ThOrParticleSelection(InputParticles=input_data, Functor=intermediate_code).OutputSelection
+
+    possible_charm_locations = ["LongTrackIso", "TTrackIso", "DownstreamTrackIso", "UpstreamTrackIso", "NeutralIso", "PizIso"]
+    coneangles = [0.25,0.5,1.,1.5,2.]
+
+    count = 0
+    for location in locations:
+        extra_particles = get_particles(f"/Event/HLT2/{hlt2_line}/{location}/Particles")
+
+        for coneangle in coneangles:
+            intermediate_RTAlg = VertexAndConeIsolation(
+                name=location+"_"+str(coneangle),
+                reference_particles=intermediate_particles,
+                related_particles=extra_particles,
+                cut=F.DR2<coneangle)
+
+            if count == 0:
+                intermediate_iso_variables = ParticleIsolation(isolation_alg=intermediate_RTAlg,array_indx_name='indx')
+            else:
+                intermediate_iso_variables += ParticleIsolation(isolation_alg=intermediate_RTAlg,array_indx_name='indx')
+            count += 1
+
+
+    return intermediate_iso_variables
diff --git a/Charm_2024validation/tmp.yaml b/Charm_2024validation/tmp.yaml
new file mode 100644
index 0000000000..c871485c24
--- /dev/null
+++ b/Charm_2024validation/tmp.yaml
@@ -0,0 +1,12 @@
+( '27186011', 'dst_to_dee', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27185021', 'dst_to_dee', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27184011', 'dst_to_dee', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27186011', 'dst_to_dee', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '27185021', 'dst_to_dee', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '27184011', 'dst_to_dee', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
+( '27186011', 'dst_to_dee', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '27185021', 'dst_to_dee', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '27184011', 'dst_to_dee', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '27186011', 'dst_to_dee', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27185021', 'dst_to_dee', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27184011', 'dst_to_dee', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-- 
GitLab


From c62b2369e714fe1569f9683b08ebb0cde6173bbe Mon Sep 17 00:00:00 2001
From: Serena Maccolini <serena.maccolini@cern.ch>
Date: Mon, 15 Jul 2024 18:21:23 +0200
Subject: [PATCH 12/51] fix

---
 .../Charm_2024validation/README.md            |   68 -
 .../Charm_2024validation/dummy.yaml           |   16 -
 .../Charm_2024validation/info.yaml            |  121 --
 .../info_MC_4localtest.yaml                   |  122 --
 .../Charm_2024validation/info_MC_noUT.yaml    |  121 --
 .../Charm_2024validation/info_data.yaml       |   53 -
 .../Charm_2024validation/info_data_noUT.yaml  |   50 -
 .../Charm_2024validation/main_d0_to_hh.py     |   58 -
 .../Charm_2024validation/main_d0_to_hhhh.py   |   40 -
 .../Charm_2024validation/main_d0_to_hhpi0.py  |   43 -
 .../Charm_2024validation/main_d0_to_kshh.py   |   75 -
 .../Charm_2024validation/main_d0_to_ksks.py   |   59 -
 .../Charm_2024validation/main_d_to_hhh.py     |   63 -
 .../Charm_2024validation/main_d_to_ksh.py     |   48 -
 .../main_detection_asymmetry.py               |   31 -
 .../Charm_2024validation/main_dst_to_dee.py   |   42 -
 .../Charm_2024validation/main_rare_charm.py   |   41 -
 .../Charm_2024validation/options/d0_to_hh.py  |  432 -----
 .../options/d0_to_hh_MC.py                    |   99 -
 .../options/d0_to_hhhh.py                     |  247 ---
 .../options/d0_to_hhhh_MC.py                  |   43 -
 .../options/d0_to_hhpi0.py                    |  359 ----
 .../options/d0_to_hhpi0_MC.py                 |   44 -
 .../options/d0_to_kshh.py                     | 1585 -----------------
 .../options/d0_to_kshh_MC.py                  |   44 -
 .../options/d0_to_ksks.py                     | 1049 -----------
 .../options/d0_to_ksks_MC.py                  |   46 -
 .../Charm_2024validation/options/d_to_hhh.py  |  503 ------
 .../options/d_to_hhh_MC.py                    |   92 -
 .../Charm_2024validation/options/d_to_ksh.py  |  313 ----
 .../options/d_to_ksh_MC.py                    |   68 -
 .../options/detection_asymmetry.py            |  191 --
 .../options/dst_to_dee.py                     |  296 ---
 .../Charm_2024validation/options/hlt1.py      |   33 -
 .../options/hlt2/d0_to_hh.py                  |    9 -
 .../options/hlt2/d0_to_hhhh.py                |    8 -
 .../options/hlt2/d0_to_hhpi0.py               |    8 -
 .../options/hlt2/d0_to_kshh.py                |    8 -
 .../options/hlt2/d0_to_ksks.py                |    8 -
 .../options/hlt2/d_to_hhh.py                  |   10 -
 .../options/hlt2/d_to_ksh.py                  |   10 -
 .../options/hlt2/dst_to_dee.py                |    9 -
 .../Charm_2024validation/options/hlt2/hlt2.py |   32 -
 .../options/hlt2/hlt2_d0_to_hh.py             |   41 -
 .../options/hlt2/hlt2_d0_to_hhhh.py           |   40 -
 .../options/hlt2/hlt2_d0_to_hhpi0.py          |   40 -
 .../options/hlt2/hlt2_d0_to_kshh.py           |   40 -
 .../options/hlt2/hlt2_d0_to_ksks.py           |   40 -
 .../options/hlt2/hlt2_d_to_hhh.py             |   42 -
 .../options/hlt2/hlt2_d_to_ksh.py             |   42 -
 .../options/hlt2/hlt2_dst_to_dee.py           |   41 -
 .../options/hlt2/hlt2_rare_charm.py           |   40 -
 .../options/hlt2/hlt2noUT.py                  |   32 -
 .../options/hlt2/make_hlt2_decay.sh           |    9 -
 .../options/hlt2/rare_charm.py                |    8 -
 .../options/rare_charm.py                     |  496 ------
 .../Charm_2024validation/options/tupling.py   |  986 ----------
 .../Charm_2024validation/tmp.yaml             |   12 -
 Charm_2024validation/info.yaml                |    3 +-
 59 files changed, 1 insertion(+), 8508 deletions(-)
 delete mode 100644 Charm_2024validation/Charm_2024validation/README.md
 delete mode 100644 Charm_2024validation/Charm_2024validation/dummy.yaml
 delete mode 100644 Charm_2024validation/Charm_2024validation/info.yaml
 delete mode 100644 Charm_2024validation/Charm_2024validation/info_MC_4localtest.yaml
 delete mode 100644 Charm_2024validation/Charm_2024validation/info_MC_noUT.yaml
 delete mode 100644 Charm_2024validation/Charm_2024validation/info_data.yaml
 delete mode 100644 Charm_2024validation/Charm_2024validation/info_data_noUT.yaml
 delete mode 100644 Charm_2024validation/Charm_2024validation/main_d0_to_hh.py
 delete mode 100644 Charm_2024validation/Charm_2024validation/main_d0_to_hhhh.py
 delete mode 100644 Charm_2024validation/Charm_2024validation/main_d0_to_hhpi0.py
 delete mode 100644 Charm_2024validation/Charm_2024validation/main_d0_to_kshh.py
 delete mode 100644 Charm_2024validation/Charm_2024validation/main_d0_to_ksks.py
 delete mode 100644 Charm_2024validation/Charm_2024validation/main_d_to_hhh.py
 delete mode 100644 Charm_2024validation/Charm_2024validation/main_d_to_ksh.py
 delete mode 100644 Charm_2024validation/Charm_2024validation/main_detection_asymmetry.py
 delete mode 100644 Charm_2024validation/Charm_2024validation/main_dst_to_dee.py
 delete mode 100644 Charm_2024validation/Charm_2024validation/main_rare_charm.py
 delete mode 100644 Charm_2024validation/Charm_2024validation/options/d0_to_hh.py
 delete mode 100644 Charm_2024validation/Charm_2024validation/options/d0_to_hh_MC.py
 delete mode 100644 Charm_2024validation/Charm_2024validation/options/d0_to_hhhh.py
 delete mode 100644 Charm_2024validation/Charm_2024validation/options/d0_to_hhhh_MC.py
 delete mode 100644 Charm_2024validation/Charm_2024validation/options/d0_to_hhpi0.py
 delete mode 100644 Charm_2024validation/Charm_2024validation/options/d0_to_hhpi0_MC.py
 delete mode 100644 Charm_2024validation/Charm_2024validation/options/d0_to_kshh.py
 delete mode 100644 Charm_2024validation/Charm_2024validation/options/d0_to_kshh_MC.py
 delete mode 100644 Charm_2024validation/Charm_2024validation/options/d0_to_ksks.py
 delete mode 100644 Charm_2024validation/Charm_2024validation/options/d0_to_ksks_MC.py
 delete mode 100644 Charm_2024validation/Charm_2024validation/options/d_to_hhh.py
 delete mode 100644 Charm_2024validation/Charm_2024validation/options/d_to_hhh_MC.py
 delete mode 100644 Charm_2024validation/Charm_2024validation/options/d_to_ksh.py
 delete mode 100644 Charm_2024validation/Charm_2024validation/options/d_to_ksh_MC.py
 delete mode 100644 Charm_2024validation/Charm_2024validation/options/detection_asymmetry.py
 delete mode 100644 Charm_2024validation/Charm_2024validation/options/dst_to_dee.py
 delete mode 100644 Charm_2024validation/Charm_2024validation/options/hlt1.py
 delete mode 100644 Charm_2024validation/Charm_2024validation/options/hlt2/d0_to_hh.py
 delete mode 100644 Charm_2024validation/Charm_2024validation/options/hlt2/d0_to_hhhh.py
 delete mode 100644 Charm_2024validation/Charm_2024validation/options/hlt2/d0_to_hhpi0.py
 delete mode 100644 Charm_2024validation/Charm_2024validation/options/hlt2/d0_to_kshh.py
 delete mode 100644 Charm_2024validation/Charm_2024validation/options/hlt2/d0_to_ksks.py
 delete mode 100644 Charm_2024validation/Charm_2024validation/options/hlt2/d_to_hhh.py
 delete mode 100644 Charm_2024validation/Charm_2024validation/options/hlt2/d_to_ksh.py
 delete mode 100644 Charm_2024validation/Charm_2024validation/options/hlt2/dst_to_dee.py
 delete mode 100644 Charm_2024validation/Charm_2024validation/options/hlt2/hlt2.py
 delete mode 100644 Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_d0_to_hh.py
 delete mode 100644 Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_d0_to_hhhh.py
 delete mode 100644 Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_d0_to_hhpi0.py
 delete mode 100644 Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_d0_to_kshh.py
 delete mode 100644 Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_d0_to_ksks.py
 delete mode 100644 Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_d_to_hhh.py
 delete mode 100644 Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_d_to_ksh.py
 delete mode 100644 Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_dst_to_dee.py
 delete mode 100644 Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_rare_charm.py
 delete mode 100644 Charm_2024validation/Charm_2024validation/options/hlt2/hlt2noUT.py
 delete mode 100644 Charm_2024validation/Charm_2024validation/options/hlt2/make_hlt2_decay.sh
 delete mode 100644 Charm_2024validation/Charm_2024validation/options/hlt2/rare_charm.py
 delete mode 100644 Charm_2024validation/Charm_2024validation/options/rare_charm.py
 delete mode 100644 Charm_2024validation/Charm_2024validation/options/tupling.py
 delete mode 100644 Charm_2024validation/Charm_2024validation/tmp.yaml

diff --git a/Charm_2024validation/Charm_2024validation/README.md b/Charm_2024validation/Charm_2024validation/README.md
deleted file mode 100644
index f061ea162c..0000000000
--- a/Charm_2024validation/Charm_2024validation/README.md
+++ /dev/null
@@ -1,68 +0,0 @@
-Analysis production for 2024 data validation within the Charm WG.
-
-For easy tests, eg. on `d_to_hhh` subset:
-```sh
-lb-run DaVinci/v64r2 lbexec Charm_2024validation.main_d_to_hhh:main Charm_2024validation/dummy.yaml
-```
-
-Decays and Hlt2 lines considered are:
-- `d0_to_hh.py`:
-  - Dst2D0pi_D02Kpi_RS     "Hlt2Charm_DstpToD0Pip_D0ToKmPip"
-  - Dst2D0pi_D02Kpi_WS     "Hlt2Charm_DstpToD0Pip_D0ToKpPim"
-  - Dst2D0pi_D02KK     "Hlt2Charm_DstpToD0Pip_D0ToKmKp"
-  - Dst2D0pi_D02pipi     "Hlt2Charm_DstpToD0Pip_D0ToPimPip"
-  - D02Kpi     "Hlt2Charm_D0ToKmPip"
-  - D02KK     "Hlt2Charm_D0ToKmKp"
-  - D02pipi     "Hlt2Charm_D0ToPimPip"
-  - Dst2D0pi_D02Kpi_RS_LowBias     "Hlt2Charm_DstpToD0Pip_D0ToKmPip_LowBias"
-  - Dst2D0pi_D02Kpi_WS_LowBias     "Hlt2Charm_DstpToD0Pip_D0ToKpPim_LowBias"
-  - Dst2D0pi_D02KK_LowBias     "Hlt2Charm_DstpToD0Pip_D0ToKmKp_LowBias"
-  - Dst2D0pi_D02pipi_LowBias     "Hlt2Charm_DstpToD0Pip_D0ToPimPip_LowBias"
-  - D02Kpi_LowBias     "Hlt2Charm_D0ToKmPip_LowBias"
-  - D02KK_LowBias     "Hlt2Charm_D0ToKmKp_LowBias"
-  - D02pipi_LowBias     "Hlt2Charm_D0ToPimPip_LowBias"
-- `d_to_ksh.py`:
-  - D2KSpi_LL     "Hlt2Charm_DpDspToKsPip_LL"
-  - D2KSpi_LD     "Hlt2Charm_DpDspToKsPip_LD"
-  - D2KSpi_DD     "Hlt2Charm_DpDspToKsPip_DD"
-  - D2KSK_LL     "Hlt2Charm_DpDspToKsKp_LL"
-  - D2KSK_LD     "Hlt2Charm_DpDspToKsKp_LD"
-  - D2KSK_DD     "Hlt2Charm_DpDspToKsKp_DD"
-- `d_to_hhh.py`:
-  - D2Kpipi     "Hlt2Charm_DpDspToKmPipPip"
-  - D2Kpipi_NoCuts     "Hlt2Charm_DpDspToKmPipPip_NoCuts"
-  - Ds2KKpi     "Hlt2Charm_DspToKmKpPip"
-  - Ds2KKpi_NoCuts     "Hlt2Charm_DspToKmKpPip_NoCuts"
-  - D2pipipi     "Hlt2Charm_DpDspToPimPipPip"
-  - D2pipipi_NoCuts     "Hlt2Charm_DpDspToPimPipPip_NoCuts"
-- `d0_to_hhpi0.py`:
-  - Dst2D0pi_D02Kpipi0 "Hlt2Charm_DstpToD0Pip_D0ToKmPipPi0_{M,R}"
-  - Dst2D0pi_D02KKpi0 "Hlt2Charm_DstpToD0Pip_D0ToKmKpPi0_{M,R}"
-  - Dst2D0pi_D02pipipi0 "Hlt2Charm_DstpToD0Pip_D0ToPimPipPi0_{M,R}"
-- `detection_asymmetry.py`:
-  - D2Kpipi_ADet "Hlt2Charm_DpToKmPipPip_ADet"
-  - D2KSK_LL_ADet "Hlt2Charm_DspToKsKp_LL_ADet"
-  - D2KSpi_LL_ADet "Hlt2Charm_DpToKsPip_LL_ADet"
-  - D2pipipi_ADet "Hlt2Charm_DspToPimPipPip_ADet"
-  - Ds2KKpi_ADet "Hlt2Charm_DspToKmKpPip_ADet"
-  - Lc2KSp_LL_ADet "Hlt2Charm_LcpToPpKs_LL_ADet"
-  - Lc2pKpi_ADet "Hlt2Charm_LcpToPpKmPip_ADet"
-- `rare_charm.py`:
-  - D2pimumu "Hlt2Charm_DpDspToPipMumMup"
-  - D2pimumu_WS "Hlt2Charm_DpDspToPipMupMup_RareCharmControl"
-  - Dst2D0pi_D02Kpimumu_RS "Hlt2Charm_DstpToD0Pip_D0ToKmPipMumMup"
-- `d0_to_kshh.py`:
-- `d0_to_ksks.py`:
-- `dst_to_dee.py`:
-  -  Dst02D0EmEp_D02KmPip_OS    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS',
-  -  Dst02D0EmEp_D02KmPip_SS 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS',
-  -  Dst02D0EmEp_D02KmPip_OS_MVA 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS_MVA',
-  -  Dst02D0EmEp_D02KmPip_SS_MVA 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS_MVA',
-  -  Dst02D0EmEp_D02KmPimPipPip_OS 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS',
-  -  Dst02D0EmEp_D02KmPimPipPip_SS 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS',
-  -  Dst02D0EmEp_D02KmPimPipPip_OS_MVA 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS_MVA',
-  -  Dst02D0EmEp_D02KmPimPipPip_SS_MVA 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS_MVA',
-  -  Dstp2DpDspEmEp_DpDsp2KmKpPip_OS 'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS',
-  -  Dstp2DpDspEmEp_DpDsp2KmKpPip_SS 'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS',
-  -  Dstp2DpDspEmEp_DpDsp2KmKpPip_OS_MVA 'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS_MVA',
-  -  Dstp2DpDspEmEp_DpDsp2KmKpPip_SS_MVA'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS_MVA',
diff --git a/Charm_2024validation/Charm_2024validation/dummy.yaml b/Charm_2024validation/Charm_2024validation/dummy.yaml
deleted file mode 100644
index 5bebae4ac3..0000000000
--- a/Charm_2024validation/Charm_2024validation/dummy.yaml
+++ /dev/null
@@ -1,16 +0,0 @@
-input_files:
-- root://myProxy@lhcbxrootd-kit.gridka.de//pnfs/gridka.de/lhcb/LHCb-Disk/lhcb/LHCb/Collision23/CHARM.DST/00198130/0000/00198130_00000552_1.charm.dst
-input_raw_format: 0.5
-input_type: ROOT
-output_type: ROOT
-event_store: HiveWhiteBoard
-simulation: False
-data_type: "Upgrade"
-geometry_version: run3/trunk
-conditions_version: Alignment2023_HLT2Processing_26_8_2023
-scheduler_legacy_mode: False
-input_process: "TurboPass"
-input_stream: "charm"
-histo_file: CHARM_HISTO.ROOT
-ntuple_file: CHARM.ROOT
-evt_max: 1000
diff --git a/Charm_2024validation/Charm_2024validation/info.yaml b/Charm_2024validation/Charm_2024validation/info.yaml
deleted file mode 100644
index f49943e7e9..0000000000
--- a/Charm_2024validation/Charm_2024validation/info.yaml
+++ /dev/null
@@ -1,121 +0,0 @@
-defaults:
-  inform:
-    - serena.maccolini@cern.ch
-  wg: Charm
-
-{%- set conditions = [
-  "MagDown",
-]%}
-
-{%- set evttype_subsample_nutext_nu_dir1_dir2_dddb = [
-( '27163102', 'd0_to_hh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163101', 'd0_to_hh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163100', 'd0_to_hh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '23103042', 'd_to_hhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '23263022', 'd_to_hhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '21263012', 'd_to_hhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163471', 'd0_to_hhpi0', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27165903', 'd0_to_kshh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27165071', 'd0_to_hhhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27265008', 'd0_to_hhhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27265009', 'd0_to_hhhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27165072', 'd0_to_hhhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '23103111', 'd_to_ksh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '21103101', 'd_to_ksh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '23173003', 'rare_charm', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-
-( '27163102', 'd0_to_hh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163101', 'd0_to_hh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163100', 'd0_to_hh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '23103042', 'd_to_hhh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '23263022', 'd_to_hhh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '21263012', 'd_to_hhh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163471', 'd0_to_hhpi0', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '27165903', 'd0_to_kshh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '27165071', 'd0_to_hhhh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-
-( '27163102', 'd0_to_hh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163101', 'd0_to_hh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163100', 'd0_to_hh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '23103042', 'd_to_hhh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '23263022', 'd_to_hhh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '21263012', 'd_to_hhh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163471', 'd0_to_hhpi0', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '27165903', 'd0_to_kshh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '27165071', 'd0_to_hhhh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-
-( '27163102', 'd0_to_hh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163101', 'd0_to_hh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163100', 'd0_to_hh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '23103042', 'd_to_hhh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '23263022', 'd_to_hhh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '21263012', 'd_to_hhh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163471', 'd0_to_hhpi0', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27165903', 'd0_to_kshh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27165071', 'd0_to_hhhh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-
-]%}
-
-
-
-{%- for evttype, id, nutext, nu, dir1, dir2, dddb in evttype_subsample_nutext_nu_dir1_dir2_dddb %}
-
-{% for polarity in conditions %}
-
-{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1:
-  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
-  input:
-    bk_query: "/MC/{{dir1}}/Beam6800GeV-2024{{dir2}}-{{polarity}}-Nu{{nu}}-25ns-Pythia8/Sim10d/{{evttype}}/DIGI"
-    n_test_lfns: 3
-  output: HLT1.DST
-  options:
-    entrypoint: Charm_2024validation.options.hlt1:alg_config
-    extra_options:
-      input_raw_format: 0.5
-      conddb_tag: sim10-2024.Q1.2-v1.1-md100
-      dddb_tag: '{{dddb}}'
-      input_type: ROOT
-      output_type: ROOT
-      simulation: True
-      data_type: "Upgrade"
-      scheduler_legacy_mode: False
-      evt_max: -1
-
-{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2:
-  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
-  input:
-    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1
-  output: HLT2.DST
-  options:
-    entrypoint: Charm_2024validation.options.hlt2.hlt2_{{id}}:alg_config
-    extra_options:
-      conddb_tag: sim10-2024.Q1.2-v1.1-md100
-      dddb_tag: '{{dddb}}'
-      input_raw_format: 0.5
-      input_type: "ROOT"
-      output_type: "ROOT"
-      simulation: True
-      data_type: "Upgrade"
-      output_manifest_file: "HLT2.tck.json"
-      scheduler_legacy_mode: False
-
-MC_{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}:
-  application: "DaVinci/v64r7@x86_64_v3-el9-gcc13+detdesc-opt+g"
-  input:
-    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2
-  output: DVTUPLE.ROOT
-  options:
-    entrypoint: Charm_2024validation.main_{{id}}:main
-    extra_options:
-      conddb_tag: sim10-2024.Q1.2-v1.1-md100
-      dddb_tag: '{{dddb}}'
-      input_raw_format: 0.5
-      input_type: ROOT
-      simulation: True
-      data_type: "Upgrade"
-      event_store: HiveWhiteBoard
-      input_process: "Hlt2"
-      input_manifest_file: "HLT2.tck.json"
-      
-{%- endfor %}
-{%- endfor %}
diff --git a/Charm_2024validation/Charm_2024validation/info_MC_4localtest.yaml b/Charm_2024validation/Charm_2024validation/info_MC_4localtest.yaml
deleted file mode 100644
index 3d18e13274..0000000000
--- a/Charm_2024validation/Charm_2024validation/info_MC_4localtest.yaml
+++ /dev/null
@@ -1,122 +0,0 @@
-defaults:
-  inform:
-    - serena.maccolini@cern.ch
-  wg: Charm
-
-{%- set conditions = [
-  "MagDown",
-]%}
-
-{%- set evttype_subsample_nutext_nu_dir1_dir2_dddb_geometry = [
-( '27163102', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163101', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163100', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23103042', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23263022', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '21263012', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163471', 'd0_to_hhpi0', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165903', 'd0_to_kshh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165071', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27265008', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27265009', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165072', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23103111', 'd_to_ksh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '21103101', 'd_to_ksh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23173003', 'rare_charm', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163102', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163101', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163100', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23103042', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23263022', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '21263012', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163471', 'd0_to_hhpi0', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165903', 'd0_to_kshh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165071', 'd0_to_hhhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163102', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163101', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163100', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23103042', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23263022', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '21263012', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163471', 'd0_to_hhpi0', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165903', 'd0_to_kshh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165071', 'd0_to_hhhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163102', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163101', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163100', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23103042', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23263022', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '21263012', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163471', 'd0_to_hhpi0', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165903', 'd0_to_kshh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165071', 'd0_to_hhhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165901', 'd0_to_ksks', '7p6', '7.6', 'Dev', '', 'dddb-20231017', 'run3/trunk'),
-]%}
-
-
-
-{%- for evttype, id, nutext, nu, dir1, dir2, dddb, geometry in evttype_subsample_nutext_nu_dir1_dir2_dddb_geometry %}
-
-{% for polarity in conditions %}
-
-{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1:
-  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
-  input:
-    bk_query: "/MC/{{dir1}}/Beam6800GeV-expected-2024{{dir2}}-{{polarity}}-Nu{{nu}}-25ns-Pythia8/Sim10c/{{evttype}}/DIGI"
-    n_test_lfns: 3
-  output: HLT1.DST
-  options:
-    entrypoint: Charm_2024validation.options.hlt1:alg_config
-    extra_options:
-      input_raw_format: 0.5
-      conddb_tag: sim-20231017-vc-md100
-      dddb_tag: '{{dddb}}'
-      input_type: ROOT
-      output_type: ROOT
-      simulation: True
-      data_type: "Upgrade"
-      scheduler_legacy_mode: False
-      geometry_version: "{{geometry}}"
-      evt_max: 1000
-
-{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2:
-  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
-  input:
-    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1
-  output: HLT2.DST
-  options:
-    entrypoint: Charm_2024validation.options.hlt2.hlt2_{{id}}:alg_config
-    extra_options:
-      conddb_tag: sim-20231017-vc-md100
-      dddb_tag: '{{dddb}}'
-      input_raw_format: 0.5
-      input_type: "ROOT"
-      output_type: "ROOT"
-      simulation: True
-      data_type: "Upgrade"
-      output_manifest_file: "HLT2.tck.json"
-      scheduler_legacy_mode: False
-      geometry_version: "{{geometry}}"
-
-MC_{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}:
-  application: "DaVinci/v64r3@x86_64_v3-el9-gcc13+detdesc-opt+g"
-  input:
-    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2
-  output: DVTUPLE.ROOT
-  options:
-    entrypoint: Charm_2024validation.main_{{id}}:main
-    extra_options:
-      conddb_tag: sim-20231017-vc-md100
-      dddb_tag: '{{dddb}}'
-      input_raw_format: 0.5
-      input_type: ROOT
-      simulation: True
-      data_type: "Upgrade"
-      event_store: HiveWhiteBoard
-      geometry_version: "{{geometry}}"
-      input_process: "Hlt2"
-      input_manifest_file: "HLT2.tck.json"
-      write_decoding_keys_to_git: false
-
-{%- endfor %}
-{%- endfor %}
diff --git a/Charm_2024validation/Charm_2024validation/info_MC_noUT.yaml b/Charm_2024validation/Charm_2024validation/info_MC_noUT.yaml
deleted file mode 100644
index 52df9e4e96..0000000000
--- a/Charm_2024validation/Charm_2024validation/info_MC_noUT.yaml
+++ /dev/null
@@ -1,121 +0,0 @@
-defaults:
-  inform:
-    - serena.maccolini@cern.ch
-  wg: Charm
-
-{%- set conditions = [
-  "MagDown",
-]%}
-
-{%- set evttype_subsample_nutext_nu_dir1_dir2_dddb_geometry = [
-( '27163102', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163101', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163100', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23103042', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23263022', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '21263012', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163471', 'd0_to_hhpi0', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165903', 'd0_to_kshh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165071', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27265008', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27265009', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165072', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23103111', 'd_to_ksh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '21103101', 'd_to_ksh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23173003', 'rare_charm', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163102', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163101', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163100', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23103042', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23263022', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '21263012', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163471', 'd0_to_hhpi0', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165903', 'd0_to_kshh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165071', 'd0_to_hhhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163102', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163101', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163100', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23103042', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23263022', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '21263012', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163471', 'd0_to_hhpi0', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165903', 'd0_to_kshh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165071', 'd0_to_hhhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163102', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163101', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163100', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23103042', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23263022', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '21263012', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163471', 'd0_to_hhpi0', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165903', 'd0_to_kshh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165071', 'd0_to_hhhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165901', 'd0_to_ksks', '7p6', '7.6', 'Dev', '', 'dddb-20231017', 'run3/trunk'),
-]%}
-
-
-
-{%- for evttype, id, nutext, nu, dir1, dir2, dddb, geometry in evttype_subsample_nutext_nu_dir1_dir2_dddb_geometry %}
-
-{% for polarity in conditions %}
-
-{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1:
-  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
-  input:
-    bk_query: "/MC/{{dir1}}/Beam6800GeV-expected-2024{{dir2}}-{{polarity}}-Nu{{nu}}-25ns-Pythia8/Sim10c/{{evttype}}/DIGI"
-    n_test_lfns: 3
-  output: HLT1.DST
-  options:
-    entrypoint: Charm_2024validation.options.hlt1:alg_config
-    extra_options:
-      input_raw_format: 0.5
-      conddb_tag: sim-20231017-vc-md100
-      dddb_tag: '{{dddb}}'
-      input_type: ROOT
-      output_type: ROOT
-      simulation: True
-      data_type: "Upgrade"
-      scheduler_legacy_mode: False
-      geometry_version: "{{geometry}}"
-      evt_max: -1
-
-{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2:
-  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
-  input:
-    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1
-  output: HLT2.DST
-  options:
-    entrypoint: Charm_2024validation.options.hlt2.hlt2_{{id}}:alg_config
-    extra_options:
-      conddb_tag: sim-20231017-vc-md100
-      dddb_tag: '{{dddb}}'
-      input_raw_format: 0.5
-      input_type: "ROOT"
-      output_type: "ROOT"
-      simulation: True
-      data_type: "Upgrade"
-      output_manifest_file: "HLT2.tck.json"
-      scheduler_legacy_mode: False
-      geometry_version: "{{geometry}}"
-
-MC_{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}:
-  application: "DaVinci/v64r3@x86_64_v3-el9-gcc13+detdesc-opt+g"
-  input:
-    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2
-  output: DVTUPLE.ROOT
-  options:
-    entrypoint: Charm_2024validation.main_{{id}}:main
-    extra_options:
-      conddb_tag: sim-20231017-vc-md100
-      dddb_tag: '{{dddb}}'
-      input_raw_format: 0.5
-      input_type: ROOT
-      simulation: True
-      data_type: "Upgrade"
-      event_store: HiveWhiteBoard
-      geometry_version: "{{geometry}}"
-      input_process: "Hlt2"
-      input_manifest_file: "HLT2.tck.json"
-
-{%- endfor %}
-{%- endfor %}
diff --git a/Charm_2024validation/Charm_2024validation/info_data.yaml b/Charm_2024validation/Charm_2024validation/info_data.yaml
deleted file mode 100644
index cf3b7dcdf9..0000000000
--- a/Charm_2024validation/Charm_2024validation/info_data.yaml
+++ /dev/null
@@ -1,53 +0,0 @@
-defaults:
-  inform:
-    - serena.maccolini@cern.ch
-  wg: Charm
-
-{%- set conditions = [
-  "MagDown",
-]%}
-
-
-
-{%- set subsamples = [
-  "d0_to_hh",
-  "d_to_hhh",
-  "d_to_ksh",
-  "d0_to_hhpi0",
-  "d0_to_kshh",
-  "d0_to_ksks",
-  "d0_to_hhhh",
-  "rare_charm",
-  "detection_asymmetry",
-  "dst_to_dee",
-]%}
-
-{% for id in subsamples %}
-{% for polarity in conditions %}
-
-{{id}}_2024_{{ polarity }}:
-  application: "DaVinci/v64r7"
-  input:
-    bk_query: "/LHCb/Collision24/Beam6800GeV-VeloClosed-{{polarity}}/Real Data/Sprucing24c2/94000000/CHARM.DST"
-
-    dq_flags:
-      - UNCHECKED
-      - OK
-    keep_running: true
-  output: DVTUPLE_{{id}}.ROOT
-  options:
-    entrypoint: Charm_2024validation.main_{{id}}:main
-    extra_options:
-      input_raw_format: 0.5
-      input_type: ROOT
-      simulation: False
-      data_type: "Upgrade"
-      event_store: HiveWhiteBoard
-      geometry_version: run3/2024.Q1.2-v00.00
-      conditions_version: master
-      input_process: "TurboPass"
-      input_stream: "charm"
-      evt_max: -1
-
-{%- endfor %}
-{%- endfor %}
diff --git a/Charm_2024validation/Charm_2024validation/info_data_noUT.yaml b/Charm_2024validation/Charm_2024validation/info_data_noUT.yaml
deleted file mode 100644
index 8c750c72d0..0000000000
--- a/Charm_2024validation/Charm_2024validation/info_data_noUT.yaml
+++ /dev/null
@@ -1,50 +0,0 @@
-defaults:
-  inform:
-    - serena.maccolini@cern.ch
-  wg: Charm
-
-{%- set conditions = [
-  "MagDown",
-]%}
-
-
-
-{%- set subsamples = [
-  "d0_to_hh",
-  "d_to_hhh",
-  "d_to_ksh",
-  "d0_to_hhpi0",
-  "d0_to_kshh",
-  "d0_to_ksks",
-  "d0_to_hhhh",
-  "rare_charm",
-  "detection_asymmetry",
-]%}
-
-{% for id in subsamples %}
-{% for polarity in conditions %}
-
-{{id}}_2024_{{ polarity }}:
-  application: "DaVinci/v64r5"
-  input:
-    bk_query: "/LHCb/Collision24/Beam6800GeV-VeloClosed-{{polarity}}-Excl-UT/Real Data/Sprucing24c1/94000000/CHARM.DST"
-    dq_flags:
-      - UNCHECKED
-      - OK
-    keep_running: true
-  output: DVTUPLE_{{id}}.ROOT
-  options:
-    entrypoint: Charm_2024validation.main_{{id}}:main
-    extra_options:
-      input_raw_format: 0.5
-      input_type: ROOT
-      simulation: False
-      data_type: "Upgrade"
-      event_store: HiveWhiteBoard
-      geometry_version: run3/2024.Q1.2-v00.00
-      conditions_version: master
-      input_process: "TurboPass"
-      input_stream: "charm"
-
-{%- endfor %}
-{%- endfor %}
diff --git a/Charm_2024validation/Charm_2024validation/main_d0_to_hh.py b/Charm_2024validation/Charm_2024validation/main_d0_to_hh.py
deleted file mode 100644
index 12eea15463..0000000000
--- a/Charm_2024validation/Charm_2024validation/main_d0_to_hh.py
+++ /dev/null
@@ -1,58 +0,0 @@
-###############################################################################
-# (c) Copyright 2021-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 .options.d0_to_hh import *
-from .options.d0_to_hh_MC import *
-
-from DaVinci import Options, make_config
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-        #D02hh
-        "D02Kpi" : maketuple_D02Kpi(options, pvs, rec_summary),
-        "D02KK" : maketuple_D02KK(options, pvs, rec_summary),
-        "D02pipi" : maketuple_D02pipi(options, pvs, rec_summary),
-        #Dst2D0pi_D02hh
-        "Dst2D0pi_D02Kpi_RS" : maketuple_Dst2D0pi_D02Kpi_RS(options, pvs, rec_summary),
-        "Dst2D0pi_D02Kpi_WS" : maketuple_Dst2D0pi_D02Kpi_WS(options, pvs, rec_summary),
-        "Dst2D0pi_D02KK" : maketuple_Dst2D0pi_D02KK(options, pvs, rec_summary),
-        "Dst2D0pi_D02pipi" : maketuple_Dst2D0pi_D02pipi(options, pvs, rec_summary),
-
-        ##LowBias
-        #D02hh
-        "D02Kpi_LowBias" : maketuple_D02Kpi_LowBias(options, pvs, rec_summary),
-        "D02KK_LowBias" : maketuple_D02KK_LowBias(options, pvs, rec_summary),
-        "D02pipi_LowBias" : maketuple_D02pipi_LowBias(options, pvs, rec_summary),
-        #Dst2D0pi_D02hh
-        "Dst2D0pi_D02Kpi_RS_LowBias" : maketuple_Dst2D0pi_D02Kpi_RS_LowBias(options, pvs, rec_summary),
-        "Dst2D0pi_D02Kpi_WS_LowBias" : maketuple_Dst2D0pi_D02Kpi_WS_LowBias(options, pvs, rec_summary),
-        "Dst2D0pi_D02KK_LowBias" : maketuple_Dst2D0pi_D02KK_LowBias(options, pvs, rec_summary),
-        "Dst2D0pi_D02pipi_LowBias" : maketuple_Dst2D0pi_D02pipi_LowBias(options, pvs, rec_summary),
-    }
-
-    MCtuples = {
-        "MC_Dst2D0pi_D02Kpi_RS" : maketuple_MC_Dst2D0pi_D02Kpi_RS(options, pvs, rec_summary),
-        "MC_Dst2D0pi_D02KK_RS" : maketuple_MC_Dst2D0pi_D02KK(options, pvs, rec_summary),
-        "MC_Dst2D0pi_D02pipi" : maketuple_MC_Dst2D0pi_D02pipi(options, pvs, rec_summary),
-    }
-
-    if options.simulation:
-        tuples = tuples | MCtuples
-
-    config = make_config(options, tuples)
-
-    return config
diff --git a/Charm_2024validation/Charm_2024validation/main_d0_to_hhhh.py b/Charm_2024validation/Charm_2024validation/main_d0_to_hhhh.py
deleted file mode 100644
index 5fb555ccfd..0000000000
--- a/Charm_2024validation/Charm_2024validation/main_d0_to_hhhh.py
+++ /dev/null
@@ -1,40 +0,0 @@
-###############################################################################
-# (c) Copyright 2021-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 .options.d0_to_hhhh import *
-from .options.d0_to_hhhh_MC import *
-
-from DaVinci import Options, make_config
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-        
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-        "DstToD0pi_D0ToKKPiPi" : maketuple_DstToD0pi_D0ToKKPiPi(options, pvs, rec_summary),
-        "DstToD0pi_D0ToKPiPiPi" : maketuple_DstToD0pi_D0ToKPiPiPi(options, pvs, rec_summary),
-        "DstToD0pi_D0ToPiKPiPi" : maketuple_DstToD0pi_D0ToPiKPiPi(options, pvs, rec_summary),
-        "DstToD0pi_D0ToPiPiPiPi" : maketuple_DstToD0pi_D0ToPiPiPiPi(options, pvs, rec_summary),
-    }
-
-    MCtuples = {
-        "MC_DstToD0pi_D0ToKPiPiPi" : maketuple_MC_DstToD0pi_D0ToKPiPiPi(options, pvs, rec_summary),
-    }
-    
-    if options.simulation:
-        tuples = tuples | MCtuples
-        
-    config = make_config(options, tuples)
-
-    return config
diff --git a/Charm_2024validation/Charm_2024validation/main_d0_to_hhpi0.py b/Charm_2024validation/Charm_2024validation/main_d0_to_hhpi0.py
deleted file mode 100644
index ac59dc71d9..0000000000
--- a/Charm_2024validation/Charm_2024validation/main_d0_to_hhpi0.py
+++ /dev/null
@@ -1,43 +0,0 @@
-###############################################################################
-# (c) Copyright 2021-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 .options.d0_to_hhpi0 import *
-from .options.d0_to_hhpi0_MC import *
-
-from DaVinci import Options, make_config
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-        
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-        #Dst2D0pi_D02hhpi0
-        "Dst2D0pi_D02Kpipi0_M" : maketuple_Dst2D0pi_D02Kpipi0_M(options, pvs, rec_summary),
-        "Dst2D0pi_D02KKpi0_M" : maketuple_Dst2D0pi_D02KKpi0_M(options, pvs, rec_summary),
-        "Dst2D0pi_D02pipipi0_M" : maketuple_Dst2D0pi_D02pipipi0_M(options, pvs, rec_summary),
-        "Dst2D0pi_D02Kpipi0_R" : maketuple_Dst2D0pi_D02Kpipi0_R(options, pvs, rec_summary),
-        "Dst2D0pi_D02KKpi0_R" : maketuple_Dst2D0pi_D02KKpi0_R(options, pvs, rec_summary),
-        "Dst2D0pi_D02pipipi0_R" : maketuple_Dst2D0pi_D02pipipi0_R(options, pvs, rec_summary),
-    }
-
-    MCtuples = {
-        "MC_Dst2D0pi_D02Kpipi0" : maketuple_MC_Dst2D0pi_D02Kpipi0(options, pvs, rec_summary),
-    }
-    
-    if options.simulation:
-        tuples = tuples | MCtuples
-        
-    config = make_config(options, tuples)
-
-    return config
diff --git a/Charm_2024validation/Charm_2024validation/main_d0_to_kshh.py b/Charm_2024validation/Charm_2024validation/main_d0_to_kshh.py
deleted file mode 100644
index f9cfbd58e2..0000000000
--- a/Charm_2024validation/Charm_2024validation/main_d0_to_kshh.py
+++ /dev/null
@@ -1,75 +0,0 @@
-###############################################################################
-# (c) Copyright 2021-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 .options.d0_to_kshh import *
-from .options.d0_to_kshh_MC import *
-
-from DaVinci import Options, make_config
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-        #D02kshh
-        "D0ToKsPimPip_LL" : maketuple_D0ToKsPimPip_LL(options, pvs, rec_summary),
-        "D0ToKsPimPip_DD" : maketuple_D0ToKsPimPip_DD(options, pvs, rec_summary),
-        "D0ToKsKmPip_LL" : maketuple_D0ToKsKmPip_LL(options, pvs, rec_summary),
-        "D0ToKsKmPip_DD" : maketuple_D0ToKsKmPip_DD(options, pvs, rec_summary),
-        "D0ToKsKpPim_LL" : maketuple_D0ToKsKmPip_LL(options, pvs, rec_summary),
-        "D0ToKsKpPim_DD" : maketuple_D0ToKsKmPip_DD(options, pvs, rec_summary),
-        "D0ToKsKmKp_LL" : maketuple_D0ToKsKmKp_LL(options, pvs, rec_summary),
-        "D0ToKsKmKp_DD" : maketuple_D0ToKsKmKp_DD(options, pvs, rec_summary),
-        #Dst2D0pi_D02kshh
-        "DstpToD0Pip_D0ToKsPimPip_LL" : maketuple_DstpToD0Pip_D0ToKsPimPip_LL(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsPimPip_DD" : maketuple_DstpToD0Pip_D0ToKsPimPip_DD(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKmPip_LL" : maketuple_DstpToD0Pip_D0ToKsKmPip_LL(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKmPip_DD" : maketuple_DstpToD0Pip_D0ToKsKmPip_DD(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKpPim_LL" : maketuple_DstpToD0Pip_D0ToKsKmPip_LL(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKpPim_DD" : maketuple_DstpToD0Pip_D0ToKsKmPip_DD(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKmKp_LL" : maketuple_DstpToD0Pip_D0ToKsKmKp_LL(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKmKp_DD" : maketuple_DstpToD0Pip_D0ToKsKmKp_DD(options, pvs, rec_summary),
-
-        ##LowBias
-        #D02kshh
-        "D0ToKsPimPip_LL_LowBias" : maketuple_D0ToKsPimPip_LL_LowBias(options, pvs, rec_summary),
-        "D0ToKsPimPip_DD_LowBias" : maketuple_D0ToKsPimPip_DD_LowBias(options, pvs, rec_summary),
-        "D0ToKsKmPip_LL_LowBias" : maketuple_D0ToKsKmPip_LL_LowBias(options, pvs, rec_summary),
-        "D0ToKsKmPip_DD_LowBias" : maketuple_D0ToKsKmPip_DD_LowBias(options, pvs, rec_summary),
-        "D0ToKsKpPim_LL_LowBias" : maketuple_D0ToKsKmPip_LL_LowBias(options, pvs, rec_summary),
-        "D0ToKsKpPim_DD_LowBias" : maketuple_D0ToKsKmPip_DD_LowBias(options, pvs, rec_summary),
-        "D0ToKsKmKp_LL_LowBias" : maketuple_D0ToKsKmKp_LL_LowBias(options, pvs, rec_summary),
-        "D0ToKsKmKp_DD_LowBias" : maketuple_D0ToKsKmKp_DD_LowBias(options, pvs, rec_summary),
-        #Dst2D0pi_D02kshh
-        "DstpToD0Pip_D0ToKsPimPip_LL_LowBias" : maketuple_DstpToD0Pip_D0ToKsPimPip_LL_LowBias(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsPimPip_DD_LowBias" : maketuple_DstpToD0Pip_D0ToKsPimPip_DD_LowBias(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKmPip_LL_LowBias" : maketuple_DstpToD0Pip_D0ToKsKmPip_LL_LowBias(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKmPip_DD_LowBias" : maketuple_DstpToD0Pip_D0ToKsKmPip_DD_LowBias(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKpPim_LL_LowBias" : maketuple_DstpToD0Pip_D0ToKsKmPip_LL_LowBias(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKpPim_DD_LowBias" : maketuple_DstpToD0Pip_D0ToKsKmPip_DD_LowBias(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKmKp_LL_LowBias" : maketuple_DstpToD0Pip_D0ToKsKmKp_LL_LowBias(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKmKp_DD_LowBias" : maketuple_DstpToD0Pip_D0ToKsKmKp_DD_LowBias(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsPimPip_DD_NoBias" : maketuple_DstpToD0Pip_D0ToKsPimPip_LL_NoBias(options, pvs, rec_summary),
-    }
-
-    MCtuples = {
-        "MC_DstpToD0Pip_D0ToKsPimPip" : maketuple_MC_DstpToD0Pip_D0ToKsPimPip(options, pvs, rec_summary),
-    }
-
-    if options.simulation:
-        tuples = tuples | MCtuples
-
-    config = make_config(options, tuples)
-
-    return config
diff --git a/Charm_2024validation/Charm_2024validation/main_d0_to_ksks.py b/Charm_2024validation/Charm_2024validation/main_d0_to_ksks.py
deleted file mode 100644
index cb69552d78..0000000000
--- a/Charm_2024validation/Charm_2024validation/main_d0_to_ksks.py
+++ /dev/null
@@ -1,59 +0,0 @@
-###############################################################################
-# (c) Copyright 2021-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.                                       #
-###############################################################################
-import Functors as F
-from Functors.math import log
-from DaVinci import Options, make_config
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunctorCollection
-import FunTuple.functorcollections as FC
-from FunTuple import FunTuple_Particles as Funtuple
-
-#D02KSKS
-from .options.d0_to_ksks import *
-from .options.d0_to_ksks_MC import *
-
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-        #D02KSKS
-        "Dst2D0pi_D02KSKS_LLLL" : maketuple_Dst2D0pi_D02KSKS_LLLL(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_LLLL_Tight" : maketuple_Dst2D0pi_D02KSKS_LLLL_Tight(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_LLDD" : maketuple_Dst2D0pi_D02KSKS_LLDD(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_LLDD_Tight" : maketuple_Dst2D0pi_D02KSKS_LLDD_Tight(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_DDDD" : maketuple_Dst2D0pi_D02KSKS_DDDD(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_DDDD_Tight" : maketuple_Dst2D0pi_D02KSKS_DDDD_Tight(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_ULLL" : maketuple_Dst2D0pi_D02KSKS_ULLL(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_ULLL_Tight" : maketuple_Dst2D0pi_D02KSKS_ULLL_Tight(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_ULDD" : maketuple_Dst2D0pi_D02KSKS_ULDD(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_ULDD_Tight" : maketuple_Dst2D0pi_D02KSKS_ULDD_Tight(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_LLLD" : maketuple_Dst2D0pi_D02KSKS_LLLD(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_LLLD_Tight" : maketuple_Dst2D0pi_D02KSKS_LLLD_Tight(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_DDLD" : maketuple_Dst2D0pi_D02KSKS_DDLD(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_DDLD_Tight" : maketuple_Dst2D0pi_D02KSKS_DDLD_Tight(options, pvs, rec_summary),
-    }
-
-    MCtuples = {
-        "MC_Dst2D0pi_D02KSKS_LLLL" : maketuple_MC_Dst2D0pi_D02KSKS_LLLL(options, pvs, rec_summary)
-    }
-
-    if options.simulation:
-        tuples = tuples | MCtuples
-        
-    config = make_config(options, tuples)
-
-    return config
diff --git a/Charm_2024validation/Charm_2024validation/main_d_to_hhh.py b/Charm_2024validation/Charm_2024validation/main_d_to_hhh.py
deleted file mode 100644
index 516e32b119..0000000000
--- a/Charm_2024validation/Charm_2024validation/main_d_to_hhh.py
+++ /dev/null
@@ -1,63 +0,0 @@
-###############################################################################
-# (c) Copyright 2021-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 .options.d_to_hhh import *
-from .options.d_to_hhh_MC import *
-from .options.detection_asymmetry import *
-
-from DaVinci import Options, make_config
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-        #D2hhh
-        "D2Kpipi" : maketuple_D2Kpipi(options, pvs, rec_summary),
-        "D2Kpipi_NoCuts" : maketuple_D2Kpipi(options, pvs, rec_summary,True),
-        #"D2Kpipi_Kpi" : maketuple_D2Kpipi_Kpi(options, pvs, rec_summary), #subcomb of 2 out of 3 daughters
-        "Ds2KKpi" : maketuple_Ds2KKpi(options, pvs, rec_summary),
-        "Ds2KKpi_NoCuts" : maketuple_Ds2KKpi(options, pvs, rec_summary,True),
-        "D2pipipi" : maketuple_D2pipipi(options, pvs, rec_summary),
-        "D2pipipi_NoCuts" : maketuple_D2pipipi(options, pvs, rec_summary,True),
-        "D2pipiK" : maketuple_D2pipiK(options, pvs, rec_summary),
-        "D2pipiK_NoCuts" : maketuple_D2pipiK(options, pvs, rec_summary,True),
-        "D2KKK" : maketuple_D2KKK(options, pvs, rec_summary),
-        "D2KKK_NoCuts" : maketuple_D2KKK(options, pvs, rec_summary,True),
-        "D2piKK" : maketuple_D2piKK(options, pvs, rec_summary),
-        "D2piKK_NoCuts" : maketuple_D2piKK(options, pvs, rec_summary,True),
-        "B02Dpi_D2KKpi" : maketuple_B02Dpi_D2KKpi(options, pvs, rec_summary),
-        "B02Dpi_D2pipipi" : maketuple_B02Dpi_D2pipipi(options, pvs, rec_summary),
-        "Bs02Dspi_Ds2KKpi" : maketuple_Bs02Dspi_Ds2KKpi(options, pvs, rec_summary),
-        "Bs02Dspi_Ds2pipipi" : maketuple_Bs02Dspi_Ds2pipipi(options, pvs, rec_summary),
-        #ADet
-        "D2Kpipi_ADet" : maketuple_D2Kpipi_ADet(options, pvs, rec_summary),
-        "D2pipipi_ADet" : maketuple_D2pipipi_ADet(options, pvs, rec_summary),
-        "Ds2KKpi_ADet" : maketuple_Ds2KKpi_ADet(options, pvs, rec_summary),
-
-
-    }
-
-    MCtuples = {
-        "MC_D2Kpipi" : maketuple_MC_D2Kpipi(options, pvs, rec_summary),
-        "MC_Ds2KKpi" : maketuple_MC_Ds2KKpi(options, pvs, rec_summary)
-        "MC_Ds2KKK" : maketuple_MC_Ds2KKK(options, pvs, rec_summary)
-    }
-
-    if options.simulation:
-        tuples = tuples | MCtuples
-
-    config = make_config(options, tuples)
-
-    return config
diff --git a/Charm_2024validation/Charm_2024validation/main_d_to_ksh.py b/Charm_2024validation/Charm_2024validation/main_d_to_ksh.py
deleted file mode 100644
index 00ddc66093..0000000000
--- a/Charm_2024validation/Charm_2024validation/main_d_to_ksh.py
+++ /dev/null
@@ -1,48 +0,0 @@
-###############################################################################
-# (c) Copyright 2021-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 .options.d_to_ksh import *
-from .options.d_to_ksh_MC import *
-from .options.detection_asymmetry import *
-
-from DaVinci import Options, make_config
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-        #D2KSh
-        "D2KSpi_LL" : maketuple_D2KSpi_LL(options, pvs, rec_summary),
-        "D2KSK_LL" : maketuple_D2KSK_LL(options, pvs, rec_summary),
-        "D2KSpi_LD" : maketuple_D2KSpi_LD(options, pvs, rec_summary),
-        "D2KSK_LD" : maketuple_D2KSK_LD(options, pvs, rec_summary),
-        "D2KSpi_DD" : maketuple_D2KSpi_DD(options, pvs, rec_summary),
-        "D2KSK_DD" : maketuple_D2KSK_DD(options, pvs, rec_summary),
-        #ADet
-        "D2KSK_LL_ADet" : maketuple_D2KSK_LL_ADet(options, pvs, rec_summary),
-        "D2KSpi_LL_ADet" : maketuple_D2KSpi_LL_ADet(options, pvs, rec_summary),
-    }
-
-    MCtuples = {
-        "MC_D2KSK" : maketuple_MC_D2KSK(options, pvs, rec_summary),
-        "MC_D2KSpi" : maketuple_MC_D2KSpi(options, pvs, rec_summary),
-    }
-
-    if options.simulation:
-        tuples = tuples | MCtuples
-        
-    config = make_config(options, tuples)
-
-    return config
diff --git a/Charm_2024validation/Charm_2024validation/main_detection_asymmetry.py b/Charm_2024validation/Charm_2024validation/main_detection_asymmetry.py
deleted file mode 100644
index 1ededecf77..0000000000
--- a/Charm_2024validation/Charm_2024validation/main_detection_asymmetry.py
+++ /dev/null
@@ -1,31 +0,0 @@
-###############################################################################
-# (c) Copyright 2021-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 .options.detection_asymmetry import *
-
-from DaVinci import Options, make_config
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-        
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-        #ADet
-        "Lc2KSp_LL_ADet" : maketuple_Lc2KSp_LL_ADet(options, pvs, rec_summary),
-        "Lc2pKpi_ADet" : maketuple_Lc2pKpi_ADet(options, pvs, rec_summary),
-    }
-        
-    config = make_config(options, tuples)
-
-    return config
diff --git a/Charm_2024validation/Charm_2024validation/main_dst_to_dee.py b/Charm_2024validation/Charm_2024validation/main_dst_to_dee.py
deleted file mode 100644
index 3084abe4e7..0000000000
--- a/Charm_2024validation/Charm_2024validation/main_dst_to_dee.py
+++ /dev/null
@@ -1,42 +0,0 @@
-###############################################################################
-# (c) Copyright 2021-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 .options.dst_to_dee import *
-
-from DaVinci import Options, make_config
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS':             make_Dst0ToD0EmEp_D0ToKmPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS", pvs, rec_summary, 'dst_kpi_os'),
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS':             make_Dst0ToD0EmEp_D0ToKmPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS", pvs, rec_summary, 'dst_kpi_ss'),
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS_MVA':         make_Dst0ToD0EmEp_D0ToKmPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS_MVA", pvs, rec_summary, 'dst_kpi_os'),
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS_MVA':         make_Dst0ToD0EmEp_D0ToKmPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS_MVA", pvs, rec_summary, 'dst_kpi_ss'),
-
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS':       make_Dst0ToD0EmEp_D0ToKmPimPipPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS", pvs, rec_summary,'dst_k3pi_os' ),
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS':       make_Dst0ToD0EmEp_D0ToKmPimPipPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS", pvs, rec_summary, 'dst_k3pi_ss'),
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS_MVA':   make_Dst0ToD0EmEp_D0ToKmPimPipPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS_MVA", pvs, rec_summary, 'dst_k3pi_os'),
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS_MVA':   make_Dst0ToD0EmEp_D0ToKmPimPipPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS_MVA", pvs, rec_summary, 'dst_k3pi_ss'),
-
-    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS':     make_DstpToDpDspEmEp_DpDspToKmKpPip_tuple(options, "Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS", pvs, rec_summary, "dsstp_2kpi_os"),
-    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS':     make_DstpToDpDspEmEp_DpDspToKmKpPip_tuple(options, "Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS", pvs, rec_summary, "dsstp_2kpi_ss"),
-    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS_MVA': make_DstpToDpDspEmEp_DpDspToKmKpPip_tuple(options, "Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS_MVA", pvs, rec_summary, "dsstp_2kpi_os"),
-    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS_MVA': make_DstpToDpDspEmEp_DpDspToKmKpPip_tuple(options, "Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS_MVA", pvs, rec_summary, "dsstp_2kpi_ss"),
-    }
-
-    config = make_config(options, tuples)
-
-    return config
\ No newline at end of file
diff --git a/Charm_2024validation/Charm_2024validation/main_rare_charm.py b/Charm_2024validation/Charm_2024validation/main_rare_charm.py
deleted file mode 100644
index d38574262b..0000000000
--- a/Charm_2024validation/Charm_2024validation/main_rare_charm.py
+++ /dev/null
@@ -1,41 +0,0 @@
-###############################################################################
-# (c) Copyright 2021-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 .options.rare_charm import *
-#from .options.rare_charm_MC import *
-
-from DaVinci import Options, make_config
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-        
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-        "D2pimumu" : maketuple_D2pimumu(options, pvs, rec_summary),
-        "D2pimumu_WS" : maketuple_D2pimumu_WS(options, pvs, rec_summary),
-        "CharmRD_D2pipipi" : maketuple_D2pipipi(options, pvs, rec_summary),
-        "D2piee" : maketuple_D2piee(options, pvs, rec_summary),
-        "Lc2pmumu" : maketuple_Lc2pmumu(options, pvs, rec_summary),
-        "Dst2D0pi_D02Kpimumu_RS" : maketuple_Dst2D0pi_D02Kpimumu_RS(options, pvs, rec_summary),
-    }
-
-    MCtuples = {
-    }
-    
-    if options.simulation:
-        tuples = tuples | MCtuples
-        
-    config = make_config(options, tuples)
-
-    return config
diff --git a/Charm_2024validation/Charm_2024validation/options/d0_to_hh.py b/Charm_2024validation/Charm_2024validation/options/d0_to_hh.py
deleted file mode 100644
index 80a3cdcec2..0000000000
--- a/Charm_2024validation/Charm_2024validation/options/d0_to_hh.py
+++ /dev/null
@@ -1,432 +0,0 @@
-from .tupling import (
-    make_composite_variables,
-    make_basic_variables,
-    make_hlt2_event_variables,
-    make_DeltaM_variable,
-    make_composite_dtf_variables,
-    make_basic_dtf_variables,
-)
-
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunTuple_Particles as Funtuple
-
-
-def make_dtf_variables(options, pvs, input_data, ptype):
-
-    if ptype not in ["basic", "composite"]:
-        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
-
-    from DecayTreeFitter import DecayTreeFitter
-    
-    DTF = DecayTreeFitter(
-        name=f'DTF_{{hash}}',
-        input_particles=input_data)
-
-    DTFvtx = DecayTreeFitter(
-        name=f'DTFvtx_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    DTFmass = DecayTreeFitter(
-        name=f'DTFmass_{{hash}}',
-        input_particles=input_data,
-        mass_constraints=["D0"])
-
-    DTFvtxmass = DecayTreeFitter(
-        name=f'DTFvtxmass_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0"])
-
-    if ptype == "basic":
-        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmass,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="D0")
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmass,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="D0")
-        return dtf_vars
-
-    if ptype == "composite":
-        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmass,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="D0")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmass,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="D0")
-        return dtf_vars
-
-def maketuple_D02KK_LowBias(options, pvs, rec_summary):
-    name = "D02KK_LowBias"
-    turbo_line = "Hlt2Charm_D0ToKmKp_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> K- K+]CC",
-        "Km"   : "[D0 -> ^K- K+]CC",
-        "Kp"  : "[D0 -> K- ^K+]CC",
-    }
-
-    variables = {
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D02KK(options, pvs, rec_summary):
-    name = "D02KK"
-    turbo_line = "Hlt2Charm_D0ToKmKp"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> K- K+]CC",
-        "Km"   : "[D0 -> ^K- K+]CC",
-        "Kp"  : "[D0 -> K- ^K+]CC",
-    }
-
-    variables = {
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D02Kpi_LowBias(options, pvs, rec_summary):
-    name = "D02Kpi_LowBias"
-    turbo_line = "Hlt2Charm_D0ToKmPip_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> K- pi+]CC",
-        "Km"   : "[D0 -> ^K- pi+]CC",
-        "pip"  : "[D0 -> K- ^pi+]CC",
-    }
-
-    variables = {
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D02Kpi(options, pvs, rec_summary):
-    name = "D02Kpi"
-    turbo_line = "Hlt2Charm_D0ToKmPip"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> K- pi+]CC",
-        "Km"   : "[D0 -> ^K- pi+]CC",
-        "pip"  : "[D0 -> K- ^pi+]CC",
-    }
-
-    variables = {
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D02pipi_LowBias(options, pvs, rec_summary):
-    name = "D02pipi_LowBias"
-    turbo_line = "Hlt2Charm_D0ToPimPip_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> pi- pi+]CC",
-        "pim"   : "[D0 -> ^pi- pi+]CC",
-        "pip"  : "[D0 -> pi- ^pi+]CC",
-    }
-
-    variables = {
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D02pipi(options, pvs, rec_summary):
-    name = "D02pipi"
-    turbo_line = "Hlt2Charm_D0ToPimPip"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> pi- pi+]CC",
-        "pim"   : "[D0 -> ^pi- pi+]CC",
-        "pip"  : "[D0 -> pi- ^pi+]CC",
-    }
-
-    variables = {
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02KK_LowBias(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02KK_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmKp_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> ([D0]CC -> K- K+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> K- K+) pi+]CC",
-        "Km"   : "[D*(2010)+ -> ([D0]CC -> ^K- K+) pi+]CC",
-        "Kp"  : "[D*(2010)+ -> ([D0]CC -> K- ^K+) pi+]CC",
-        "spip" : "[D*(2010)+ -> ([D0]CC -> K- K+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02KK(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02KK"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmKp"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> ([D0]CC -> K- K+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> K- K+) pi+]CC",
-        "Km"   : "[D*(2010)+ -> ([D0]CC -> ^K- K+) pi+]CC",
-        "Kp"  : "[D*(2010)+ -> ([D0]CC -> K- ^K+) pi+]CC",
-        "spip" : "[D*(2010)+ -> ([D0]CC -> K- K+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02Kpi_RS_LowBias(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02Kpi_RS_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPip_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> (D0 -> K- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^(D0 -> K- pi+) pi+]CC",
-        "Km"   : "[D*(2010)+ -> (D0 -> ^K- pi+) pi+]CC",
-        "pip"  : "[D*(2010)+ -> (D0 -> K- ^pi+) pi+]CC",
-        "spip" : "[D*(2010)+ -> (D0 -> K- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02Kpi_RS(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02Kpi_RS"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPip"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> (D0 -> K- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^(D0 -> K- pi+) pi+]CC",
-        "Km"   : "[D*(2010)+ -> (D0 -> ^K- pi+) pi+]CC",
-        "pip"  : "[D*(2010)+ -> (D0 -> K- ^pi+) pi+]CC",
-        "spip" : "[D*(2010)+ -> (D0 -> K- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02Kpi_WS_LowBias(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02Kpi_WS_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKpPim_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> (D0 -> K+ pi-) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^(D0 -> K+ pi-) pi+]CC",
-        "Kp"   : "[D*(2010)+ -> (D0 -> ^K+ pi-) pi+]CC",
-        "pim"  : "[D*(2010)+ -> (D0 -> K+ ^pi-) pi+]CC",
-        "spip" : "[D*(2010)+ -> (D0 -> K+ pi-) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Kp"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pim"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02Kpi_WS(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02Kpi_WS"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKpPim"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> (D0 -> K+ pi-) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^(D0 -> K+ pi-) pi+]CC",
-        "Kp"   : "[D*(2010)+ -> (D0 -> ^K+ pi-) pi+]CC",
-        "pim"  : "[D*(2010)+ -> (D0 -> K+ ^pi-) pi+]CC",
-        "spip" : "[D*(2010)+ -> (D0 -> K+ pi-) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Kp"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pim"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02pipi_LowBias(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02pipi_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimPip_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> ([D0]CC -> pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> pi- pi+) pi+]CC",
-        "pim"   : "[D*(2010)+ -> ([D0]CC -> ^pi- pi+) pi+]CC",
-        "pip"  : "[D*(2010)+ -> ([D0]CC -> pi- ^pi+) pi+]CC",
-        "spip" : "[D*(2010)+ -> ([D0]CC -> pi- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02pipi(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02pipi"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimPip"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> ([D0]CC -> pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> pi- pi+) pi+]CC",
-        "pim"   : "[D*(2010)+ -> ([D0]CC -> ^pi- pi+) pi+]CC",
-        "pip"  : "[D*(2010)+ -> ([D0]CC -> pi- ^pi+) pi+]CC",
-        "spip" : "[D*(2010)+ -> ([D0]CC -> pi- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
diff --git a/Charm_2024validation/Charm_2024validation/options/d0_to_hh_MC.py b/Charm_2024validation/Charm_2024validation/options/d0_to_hh_MC.py
deleted file mode 100644
index aaae05665d..0000000000
--- a/Charm_2024validation/Charm_2024validation/options/d0_to_hh_MC.py
+++ /dev/null
@@ -1,99 +0,0 @@
-from .tupling import (
-    make_MC_composite_variables,
-    make_MC_basic_variables,
-    make_MC_event_variables,
-)
-
-from PyConf.reading import get_mc_particles, get_mc_header
-from FunTuple import FunTuple_MCParticles as FuntupleMC
-
-def maketuple_MC_Dst2D0pi_D02Kpi_RS(options, pvs, rec_summary):
-    name = "MC_Dst2D0pi_D02Kpi_RS"
-    line = "/Event/MC/Particles"
-
-    input_data = get_mc_particles(f"{line}")
-
-    branches = {
-        "Dst" : "[D*(2010)+ ==> (D0 ==> K- pi+ ) pi+]CC",
-        "D0"  : "[D*(2010)+ ==> ^(D0 ==> K- pi+ ) pi+]CC",
-        "Km"   : "[D*(2010)+ ==> (D0 ==> ^K- pi+ ) pi+]CC",
-        "pip"  : "[D*(2010)+ ==> (D0 ==> K- ^pi+ ) pi+]CC",
-        "spip" : "[D*(2010)+ ==> (D0 ==> K- pi+ ) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_MC_composite_variables(),
-        "D0"    : make_MC_composite_variables(),
-        "Km"     : make_MC_basic_variables(),
-        "pip"    : make_MC_basic_variables(),
-        "spip"   : make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                          tuple_name="MCDecayTree",
-                          fields=branches, variables = variables,
-                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
-                          inputs=input_data)
-
-    return [mytuple]
-
-def maketuple_MC_Dst2D0pi_D02KK(options, pvs, rec_summary):
-    name = "MC_Dst2D0pi_D02KK"
-    line = "/Event/MC/Particles"
-
-    input_data = get_mc_particles(f"{line}")
-
-    branches = {
-        "Dst" : "[D*(2010)+ ==> ([D0]CC ==> K- K+) pi+]CC",
-        "D0"  : "[D*(2010)+ ==> ^([D0]CC ==> K- K+) pi+]CC",
-        "Km"   : "[D*(2010)+ ==> ([D0]CC ==> ^K- K+) pi+]CC",
-        "Kp"  : "[D*(2010)+ ==> ([D0]CC ==> K- ^K+) pi+]CC",
-        "spip" : "[D*(2010)+ ==> ([D0]CC ==> K- K+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_MC_composite_variables(),
-        "D0"    : make_MC_composite_variables(),
-        "Km"     : make_MC_basic_variables(),
-        "Kp"    : make_MC_basic_variables(),
-        "spip"   : make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                        tuple_name="MCDecayTree",
-                        fields=branches, variables = variables,
-                        event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
-                        inputs=input_data)
-
-    return [mytuple]
-
-
-def maketuple_MC_Dst2D0pi_D02pipi(options, pvs, rec_summary):
-    name = "MC_Dst2D0pi_D02pipi"
-    line = "/Event/MC/Particles"
-
-    input_data = get_mc_particles(f"{line}")
-
-    branches = {
-        "Dst" : "[D*(2010)+ ==> ([D0]CC ==> pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ ==> ^([D0]CC ==> pi- pi+) pi+]CC",
-        "pim"   : "[D*(2010)+ ==> ([D0]CC ==> ^pi- pi+) pi+]CC",
-        "pip"  : "[D*(2010)+ ==> ([D0]CC ==> pi- ^pi+) pi+]CC",
-        "spip" : "[D*(2010)+ ==> ([D0]CC ==> pi- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_MC_composite_variables(),
-        "D0"    : make_MC_composite_variables(),
-        "pim"     : make_MC_basic_variables(),
-        "pip"    : make_MC_basic_variables(),
-        "spip"   : make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                        tuple_name="MCDecayTree",
-                        fields=branches, variables = variables,
-                        event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
-                        inputs=input_data)
-
-    return [mytuple]
diff --git a/Charm_2024validation/Charm_2024validation/options/d0_to_hhhh.py b/Charm_2024validation/Charm_2024validation/options/d0_to_hhhh.py
deleted file mode 100644
index 0277430fb9..0000000000
--- a/Charm_2024validation/Charm_2024validation/options/d0_to_hhhh.py
+++ /dev/null
@@ -1,247 +0,0 @@
-from .tupling import (
-    make_composite_variables,
-    make_composite_variables_4body,
-    make_composite_variables_3body,
-    make_basic_variables,
-    make_hlt2_event_variables,
-    make_DeltaM_variable,
-    make_basic_dtf_variables,
-    make_composite_dtf_variables
-)
-
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunTuple_Particles as Funtuple
-from DecayTreeFitter import DecayTreeFitter
-
-# I can't get make_composite_variables_4body to work for some reason...
-import Functors as F
-from FunTuple import FunctorCollection
-variables_4body = (
-    FunctorCollection(
-        {
-            #14
-            "M14": F.SUBCOMB(Functor=F.MASS, Indices=(1, 4)),
-            "SDOCA14"     : F.SDOCA(Child1=1,Child2=4),
-            "SDOCACHI214" : F.SDOCACHI2(Child1=1,Child2=4),
-            "DOCA14"      : F.DOCA(Child1=1,Child2=4),
-            "DOCACHI214"  : F.DOCACHI2(Child1=1,Child2=4),
-            "COS14": F.ALV(1, 4),
-            #24
-            "M24": F.SUBCOMB(Functor=F.MASS, Indices=(2, 4)),
-            "SDOCA24"     : F.SDOCA(Child1=2,Child2=4),
-            "SDOCACHI224" : F.SDOCACHI2(Child1=2,Child2=4),
-            "DOCA24"      : F.DOCA(Child1=2,Child2=4),
-            "DOCACHI224"  : F.DOCACHI2(Child1=2,Child2=4),
-            "COS24": F.ALV(2, 4),
-            #34
-            "M34": F.SUBCOMB(Functor=F.MASS, Indices=(3, 4)),
-            "SDOCA34"     : F.SDOCA(Child1=3,Child2=4),
-            "SDOCACHI234" : F.SDOCACHI2(Child1=3,Child2=4),
-            "DOCA34"      : F.DOCA(Child1=3,Child2=4),
-            "DOCACHI234"  : F.DOCACHI2(Child1=3,Child2=4),
-            "COS34": F.ALV(3, 4),
-        }
-    )
-)
-
-
-def maketuple_DstToD0pi_D0ToKKPiPi(options, pvs, rec_summary):
-    name = "DstToD0pi_D0ToKKPiPi"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmKpPimPip"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> ([D0]CC -> K+ K- pi+ pi-) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> K+ K- pi+ pi-) pi+]CC",
-        "h1"  : "[D*(2010)+ -> ([D0]CC -> ^K+ K- pi+ pi-) pi+]CC",
-        "h2"  : "[D*(2010)+ -> ([D0]CC -> K+ ^K- pi+ pi-) pi+]CC",
-        "h3"  : "[D*(2010)+ -> ([D0]CC -> K+ K- ^pi+ pi-) pi+]CC",
-        "h4"  : "[D*(2010)+ -> ([D0]CC -> K+ K- pi+ ^pi-) pi+]CC",
-        "pis" : "[D*(2010)+ -> ([D0]CC -> K+ K- pi+ pi-) ^pi+]CC",
-    }
-
-    DTF_PV = DecayTreeFitter(
-        name='DTF_D0ToKKPiPi_PV',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    basic_variables = make_basic_variables(options, pvs, input_data) +\
-        make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)
-
-    composite_dtf_variables = make_composite_dtf_variables(options,
-                                                           pvs,
-                                                           input_data,
-                                                           DTF=DTF_PV,
-                                                           pv_constraint=True)
-
-    composite_variables = make_composite_variables(options, pvs, input_data) + composite_dtf_variables
-        
-
-    composite_variables_4body = make_composite_variables_3body(options, pvs, input_data) + composite_dtf_variables + variables_4body
-
-    variables = {
-        "Dst"   : composite_variables+make_DeltaM_variable(options),
-        "D0"    : composite_variables_4body,
-        "h1"    : basic_variables,
-        "h2"    : basic_variables,
-        "h3"    : basic_variables,
-        "h4"    : basic_variables,
-        "pis"   : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstToD0pi_D0ToKPiPiPi(options, pvs, rec_summary):
-    name = "DstToD0pi_D0ToKPiPiPi"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPimPipPip"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> (D0 -> K- pi+ pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^(D0 -> K- pi+ pi- pi+) pi+]CC",
-        "h1"   : "[D*(2010)+ -> (D0 -> ^K- pi+ pi- pi+) pi+]CC",
-        "h2"  : "[D*(2010)+ -> (D0 -> K- ^pi+ pi- pi+) pi+]CC",
-        "h3"   : "[D*(2010)+ -> (D0 -> K- pi+ ^pi- pi+) pi+]CC",
-        "h4"  : "[D*(2010)+ -> (D0 -> K- pi+ pi- ^pi+) pi+]CC",
-        "pis" : "[D*(2010)+ -> (D0 -> K- pi+ pi- pi+) ^pi+]CC",
-    }
-
-    DTF_PV = DecayTreeFitter(
-        name='DTF_D0ToKPiPiPi_PV',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    basic_variables = make_basic_variables(options, pvs, input_data) +\
-        make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True, mass_constraint=False)
-
-    composite_dtf_variables = make_composite_dtf_variables(options,
-                                                           pvs,
-                                                           input_data,
-                                                           DTF=DTF_PV,
-                                                           pv_constraint=True)
-
-    composite_variables = make_composite_variables(options, pvs, input_data) + composite_dtf_variables
-        
-
-    composite_variables_4body = make_composite_variables_3body(options, pvs, input_data) + composite_dtf_variables + variables_4body
-
-    variables = {
-        "Dst"   : composite_variables+make_DeltaM_variable(options),
-        "D0"    : composite_variables_4body,
-        "h1"    : basic_variables,
-        "h2"    : basic_variables,
-        "h3"    : basic_variables,
-        "h4"    : basic_variables,
-        "pis"   : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstToD0pi_D0ToPiKPiPi(options, pvs, rec_summary):
-    name = "DstToD0pi_D0ToPiKPiPi"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKpPimPimPip"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> (D0 -> pi- K+ pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^(D0 -> pi- K+ pi- pi+) pi+]CC",
-        "h1"   : "[D*(2010)+ -> (D0 -> ^pi- K+ pi- pi+) pi+]CC",
-        "h2"  : "[D*(2010)+ -> (D0 -> pi- ^K+ pi- pi+) pi+]CC",
-        "h3"   : "[D*(2010)+ -> (D0 -> pi- K+ ^pi- pi+) pi+]CC",
-        "h4"  : "[D*(2010)+ -> (D0 -> pi- K+ pi- ^pi+) pi+]CC",
-        "pis" : "[D*(2010)+ -> (D0 -> pi- K+ pi- pi+) ^pi+]CC",
-    }
-
-    DTF_PV = DecayTreeFitter(
-        name='DTF_D0ToPiKPiPi_PV',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    basic_variables = make_basic_variables(options, pvs, input_data) +\
-        make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True, mass_constraint=False)
-
-    composite_dtf_variables = make_composite_dtf_variables(options,
-                                                           pvs,
-                                                           input_data,
-                                                           DTF=DTF_PV,
-                                                           pv_constraint=True)
-
-    composite_variables = make_composite_variables(options, pvs, input_data) + composite_dtf_variables
-        
-
-    composite_variables_4body = make_composite_variables_3body(options, pvs, input_data) + composite_dtf_variables + variables_4body
-
-    variables = {
-        "Dst"   : composite_variables+make_DeltaM_variable(options),
-        "D0"    : composite_variables_4body,
-        "h1"    : basic_variables,
-        "h2"    : basic_variables,
-        "h3"    : basic_variables,
-        "h4"    : basic_variables,
-        "pis"   : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstToD0pi_D0ToPiPiPiPi(options, pvs, rec_summary):
-    name = "DstToD0pi_D0ToPiPiPiPi"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimPimPipPip"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> ([D0]CC -> pi+ pi- pi+ pi-) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> pi+ pi- pi+ pi-) pi+]CC",
-        "h1"  : "[D*(2010)+ -> ([D0]CC -> ^pi+ pi- pi+ pi-) pi+]CC",
-        "h2"  : "[D*(2010)+ -> ([D0]CC -> pi+ ^pi- pi+ pi-) pi+]CC",
-        "h3"  : "[D*(2010)+ -> ([D0]CC -> pi+ pi- ^pi+ pi-) pi+]CC",
-        "h4"  : "[D*(2010)+ -> ([D0]CC -> pi+ pi- pi+ ^pi-) pi+]CC",
-        "pis" : "[D*(2010)+ -> ([D0]CC -> pi+ pi- pi+ pi-) ^pi+]CC",
-    }
-
-    DTF_PV = DecayTreeFitter(
-        name='DTF_D0ToPiPiPiPi_PV',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    basic_variables = make_basic_variables(options, pvs, input_data) +\
-        make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True, mass_constraint=False)
-
-    composite_dtf_variables = make_composite_dtf_variables(options,
-                                                           pvs,
-                                                           input_data,
-                                                           DTF=DTF_PV,
-                                                           pv_constraint=True)
-
-    composite_variables = make_composite_variables(options, pvs, input_data) + composite_dtf_variables
-        
-
-    composite_variables_4body = make_composite_variables_3body(options, pvs, input_data) + composite_dtf_variables + variables_4body
-
-    variables = {
-        "Dst"   : composite_variables+make_DeltaM_variable(options),
-        "D0"    : composite_variables_4body,
-        "h1"    : basic_variables,
-        "h2"    : basic_variables,
-        "h3"    : basic_variables,
-        "h4"    : basic_variables,
-        "pis"   : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
diff --git a/Charm_2024validation/Charm_2024validation/options/d0_to_hhhh_MC.py b/Charm_2024validation/Charm_2024validation/options/d0_to_hhhh_MC.py
deleted file mode 100644
index 2dbe198fa9..0000000000
--- a/Charm_2024validation/Charm_2024validation/options/d0_to_hhhh_MC.py
+++ /dev/null
@@ -1,43 +0,0 @@
-from .tupling import (
-    make_MC_composite_variables,
-    make_MC_basic_variables,
-    make_MC_event_variables,
-)
-
-from PyConf.reading import get_mc_particles, get_mc_header
-from FunTuple import FunTuple_MCParticles as FuntupleMC
-
-def maketuple_MC_DstToD0pi_D0ToKPiPiPi(options, pvs, rec_summary):
-    name = "MC_DstToD0pi_D0ToKPiPiPi"
-
-    line = "/Event/MC/Particles"
-    
-    input_data = get_mc_particles(f"{line}")
-
-    branches = {
-        "Dst" : "[D*(2010)+ ==> (D0 ==> K- pi+ pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ ==> ^(D0 ==> K- pi+ pi- pi+) pi+]CC",
-        "h1"   : "[D*(2010)+ ==> (D0 ==> ^K- pi+ pi- pi+) pi+]CC",
-        "h2"  : "[D*(2010)+ ==> (D0 ==> K- ^pi+ pi- pi+) pi+]CC",
-        "h3"   : "[D*(2010)+ ==> (D0 ==> K- pi+ ^pi- pi+) pi+]CC",
-        "h4"  : "[D*(2010)+ ==> (D0 ==> K- pi+ pi- ^pi+) pi+]CC",
-        "pis" : "[D*(2010)+ ==> (D0 ==> K- pi+ pi- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_MC_composite_variables(),
-        "D0"    : make_MC_composite_variables(),
-        "h1"     : make_MC_basic_variables(),
-        "h2"    : make_MC_basic_variables(),
-        "h3"    : make_MC_basic_variables(),
-        "h4"    : make_MC_basic_variables(),
-        "pis"   : make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                          tuple_name="MCDecayTree",
-                          fields=branches, variables = variables,  
-                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])), 
-                          inputs=input_data)
-
-    return [mytuple]
diff --git a/Charm_2024validation/Charm_2024validation/options/d0_to_hhpi0.py b/Charm_2024validation/Charm_2024validation/options/d0_to_hhpi0.py
deleted file mode 100644
index cf3c3ba59f..0000000000
--- a/Charm_2024validation/Charm_2024validation/options/d0_to_hhpi0.py
+++ /dev/null
@@ -1,359 +0,0 @@
-from .tupling import (
-    make_composite_variables,
-    make_DeltaM_variable,
-    make_basic_variables,
-    make_hlt2_event_variables,
-    make_top_isolation_variables,
-    make_basic_isolation_variables,
-    make_intermediate_isolation_variables,
-    make_composite_dtf_variables,
-    make_basic_dtf_variables,
-)
-
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunTuple_Particles as Funtuple
-
-iso_vars_locations = ["LongTrackIso", "NeutralIso", "PizIso"]
-
-def make_dtf_variables(options, pvs, input_data, ptype):
-
-    if ptype not in ["basic", "composite"]:
-        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
-
-    from DecayTreeFitter import DecayTreeFitter
-    
-    DTF = DecayTreeFitter(
-        name=f'DTF_{{hash}}',
-        input_particles=input_data)
-
-    DTFvtx = DecayTreeFitter(
-        name=f'DTFvtx_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    DTFmass = DecayTreeFitter(
-        name=f'DTFmass_{{hash}}',
-        input_particles=input_data,
-        mass_constraints=["D0"])
-
-    DTFvtxmass = DecayTreeFitter(
-        name=f'DTFvtxmass_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0"])
-
-    if ptype == "basic":
-        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmass,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="D0")
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmass,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="D0")
-        return dtf_vars
-
-    if ptype == "composite":
-        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmass,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="D0")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmass,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="D0")
-        return dtf_vars
-
-
-def maketuple_Dst2D0pi_D02KKpi0_M(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02KKpi0_M"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmKpPi0_M"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) pi0) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (phi(1020) -> K- K+) pi0) pi+]CC",
-        "phi"   : "[D*(2010)+ -> ([D0]CC -> ^(phi(1020) -> K- K+) pi0) pi+]CC",
-        "Km"   : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> ^K- K+) pi0) pi+]CC",
-        "Kp"  : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- ^K+) pi0) pi+]CC",
-        "pi0"  : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) ^pi0) pi+]CC",
-        "spip" : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) pi0) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "phi"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation:
-
-        variables = {
-            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="D0"),
-            "phi"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="phi(1020)"),
-            "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02KKpi0_R(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02KKpi0_R"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmKpPi0_R"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) (pi0 -> gamma gamma) ) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (phi(1020) -> K- K+) (pi0 -> gamma gamma) ) pi+]CC",
-        "phi"   : "[D*(2010)+ -> ([D0]CC -> ^(phi(1020) -> K- K+) (pi0 -> gamma gamma) ) pi+]CC",
-        "Km"   : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> ^K- K+) (pi0 -> gamma gamma) ) pi+]CC",
-        "Kp"  : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- ^K+) (pi0 -> gamma gamma) ) pi+]CC",
-        "pi0"  : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) ^(pi0 -> gamma gamma) ) pi+]CC",
-        "gamma1"  : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) (pi0 -> ^gamma gamma) ) pi+]CC",
-        "gamma2"  : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) (pi0 -> gamma ^gamma) ) pi+]CC",
-        "spip" : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) (pi0 -> gamma gamma) ) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "phi"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "gamma1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "gamma2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation:
-
-        variables = {
-            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="D0"),
-            "phi"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="phi(1020)"),
-            "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="pi0"),
-            "gamma1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "gamma2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02Kpipi0_M(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02Kpipi0_M"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPipPi0_M"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) pi0) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^(D0 -> (K*(892)~0 -> K- pi+) pi0) pi+]CC",
-        "Kst"   : "[D*(2010)+ -> (D0 -> ^(K*(892)~0 -> K- pi+) pi0) pi+]CC",
-        "Km"   : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> ^K- pi+) pi0) pi+]CC",
-        "pip"  : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- ^pi+) pi0) pi+]CC",
-        "pi0"  : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) ^pi0) pi+]CC",
-        "spip" : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) pi0) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Kst"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation:
-
-        variables = {
-            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="D0"),
-            "Kst"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="K*(892)~0"),
-            "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02Kpipi0_R(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02Kpipi0_R"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPipPi0_R"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) (pi0 -> gamma gamma) ) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^(D0 -> (K*(892)~0 -> K- pi+) (pi0 -> gamma gamma) ) pi+]CC",
-        "Kst"   : "[D*(2010)+ -> (D0 -> ^(K*(892)~0 -> K- pi+) (pi0 -> gamma gamma) ) pi+]CC",
-        "Km"   : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> ^K- pi+) (pi0 -> gamma gamma) ) pi+]CC",
-        "pip"  : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- ^pi+) (pi0 -> gamma gamma) ) pi+]CC",
-        "pi0"  : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) ^(pi0 -> gamma gamma) ) pi+]CC",
-        "gamma1"  : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) (pi0 -> ^gamma gamma) ) pi+]CC",
-        "gamma2"  : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) (pi0 -> gamma ^gamma) ) pi+]CC",
-        "spip" : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) (pi0 -> gamma gamma) ) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Kst"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "gamma1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "gamma2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation:
-
-        variables = {
-            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="D0"),
-            "Kst"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="K*(892)~0"),
-            "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="pi0"),
-            "gamma1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "gamma2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02pipipi0_M(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02pipipi0_M"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimPipPi0_M"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) pi0) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (rho(770)0 -> pi- pi+) pi0) pi+]CC",
-        "rho"   : "[D*(2010)+ -> ([D0]CC -> ^(rho(770)0 -> pi- pi+) pi0) pi+]CC",
-        "pim"   : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> ^pi- pi+) pi0) pi+]CC",
-        "pip"  : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- ^pi+) pi0) pi+]CC",
-        "pi0"  : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) ^pi0) pi+]CC",
-        "spip" : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) pi0) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "rho"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation:
-
-        variables = {
-            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="D0"),
-            "rho"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="rho(770)0"),
-            "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02pipipi0_R(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02pipipi0_R"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimPipPi0_R"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) (pi0 -> gamma gamma) ) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (rho(770)0 -> pi- pi+) (pi0 -> gamma gamma) ) pi+]CC",
-        "rho"   : "[D*(2010)+ -> ([D0]CC -> ^(rho(770)0 -> pi- pi+) (pi0 -> gamma gamma) ) pi+]CC",
-        "pim"   : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> ^pi- pi+) (pi0 -> gamma gamma) ) pi+]CC",
-        "pip"  : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- ^pi+) (pi0 -> gamma gamma) ) pi+]CC",
-        "pi0"  : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) ^(pi0 -> gamma gamma) ) pi+]CC",
-        "gamma1"  : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) (pi0 -> ^gamma gamma) ) pi+]CC",
-        "gamma2"  : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) (pi0 -> gamma ^gamma) ) pi+]CC",
-        "spip" : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) (pi0 -> gamma gamma) ) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "rho"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "gamma1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "gamma2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation:
-
-        variables = {
-            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="D0"),
-            "rho"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="rho(770)0"),
-            "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="pi0"),
-            "gamma1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "gamma2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
diff --git a/Charm_2024validation/Charm_2024validation/options/d0_to_hhpi0_MC.py b/Charm_2024validation/Charm_2024validation/options/d0_to_hhpi0_MC.py
deleted file mode 100644
index 84648f4e71..0000000000
--- a/Charm_2024validation/Charm_2024validation/options/d0_to_hhpi0_MC.py
+++ /dev/null
@@ -1,44 +0,0 @@
-from .tupling import (
-    make_MC_composite_variables,
-    make_MC_basic_variables,
-    make_MC_event_variables,
-)
-
-from PyConf.reading import get_mc_particles, get_mc_header
-from FunTuple import FunTuple_MCParticles as FuntupleMC
-
-def maketuple_MC_Dst2D0pi_D02Kpipi0(options, pvs, rec_summary):
-    name = "MC_Dst2D0pi_D02Kpipi0"
-    line = "/Event/MC/Particles"
-    
-    input_data = get_mc_particles(f"{line}")
-
-    branches = {
-        "Dst" : "[D*(2010)+ ==> (D0 ==> K- pi+ (pi0 ==> gamma gamma) ) pi+]CC",
-        "D0"  : "[D*(2010)+ ==> ^(D0 ==> K- pi+ (pi0 ==> gamma gamma) ) pi+]CC",
-        "Km"   : "[D*(2010)+ ==> (D0 ==> ^K- pi+ (pi0 ==> gamma gamma) ) pi+]CC",
-        "pip"  : "[D*(2010)+ ==> (D0 ==> K- ^pi+ (pi0 ==> gamma gamma) ) pi+]CC",
-        "pi0"  : "[D*(2010)+ ==> (D0 ==> K- pi+ ^(pi0 ==> gamma gamma) ) pi+]CC",
-        "gamma1"  : "[D*(2010)+ ==> (D0 ==> K- pi+ (pi0 ==> ^gamma gamma) ) pi+]CC",
-        "gamma2"  : "[D*(2010)+ ==> (D0 ==> K- pi+ (pi0 ==> gamma ^gamma) ) pi+]CC",
-        "spip" : "[D*(2010)+ ==> (D0 ==> K- pi+ (pi0 ==> gamma gamma) ) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_MC_composite_variables(),
-        "D0"    : make_MC_composite_variables(),
-        "Km"     : make_MC_basic_variables(),
-        "pip"    : make_MC_basic_variables(),
-        "pi0"    : make_MC_basic_variables(),
-        "gamma1"    : make_MC_basic_variables(),
-        "gamma2"    : make_MC_basic_variables(),
-        "spip"   : make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                          tuple_name="MCDecayTree",
-                          fields=branches, variables = variables,  
-                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])), 
-                          inputs=input_data)
-
-    return [mytuple]
diff --git a/Charm_2024validation/Charm_2024validation/options/d0_to_kshh.py b/Charm_2024validation/Charm_2024validation/options/d0_to_kshh.py
deleted file mode 100644
index dad027529f..0000000000
--- a/Charm_2024validation/Charm_2024validation/options/d0_to_kshh.py
+++ /dev/null
@@ -1,1585 +0,0 @@
-from .tupling import (
-    make_composite_variables,
-    make_composite_variables_3body,
-    make_basic_variables,
-    make_hlt2_event_variables,
-    make_DeltaM_variable,
-    make_basic_dtf_variables,
-    make_composite_dtf_variables,
-    make_composite_dtf_variables_3body,
-)
-
-import Functors as F
-from Functors.math import log
-from DaVinci import Options, make_config
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunctorCollection
-from PyConf.reading import get_particles
-import FunTuple.functorcollections as FC
-from FunTuple import FunTuple_Particles as Funtuple
-from DecayTreeFitter import DecayTreeFitter
-
-# define helper functors
-get_SV =  F.ENDVERTEX @ F.FORWARDARG0
-get_SV_pos = F.TOLINALG @ F.POSITION @ get_SV
-# only if composite (i.e. has vertex)

-get_child_1 = F.CHILD(1, F.FORWARDARG0) # change here the index of the child.
-get_child_endvtx_pos_1 = F.ENDVERTEX_POS  @ get_child_1
-get_fdvec_child_1 = get_child_endvtx_pos_1 - get_SV_pos
-
-# define observables
-IP_wrt_SV_KS0 = F.IP.bind(get_SV_pos , get_child_1)
-IPCHI2_wrt_SV_KS0 = F.IPCHI2.bind(get_SV , get_child_1)
-# only if child is composite (i.e. has vertex)
-FD_wrt_SV_KS0 = F.MAGNITUDE @ get_fdvec_child_1
-FDCHI2_wrt_SV_KS0 = F.VTX_FDCHI2.bind(get_SV, get_child_1)
-# Note: Apply the functors to the head of the node of decay tree e.g. B
-# Functor collection for SV related info
-topo_sv_var = FunctorCollection(
-    {
-        "ORIVXIP_CHILD1": IP_wrt_SV_KS0,
-        "ORIVXIPCHI2_CHILD1": IPCHI2_wrt_SV_KS0,
-        "ORIVXFD_CHILD1": FD_wrt_SV_KS0,
-        "ORIVXFDCHI2_CHILD1": FDCHI2_wrt_SV_KS0,
-    }
-)
-
-"""
- D0->KSππ LL, DD x LowBias x Dstar
- D0->KSK-Ï€+ LL, DD x LowBias x Dstar
- D0->KSK+Ï€- LL, DD x LowBias x Dstar
- D0->KSKK LL, DD x LowBias x Dstar
- nb: https://gitlab.cern.ch/lhcb/Moore/-/blob/master/Hlt/Hlt2Conf/python/Hlt2Conf/lines/charm/d0_to_kshh.py?ref_type=heads
-
- """
-
-# D0->KSππ
-def maketuple_DstpToD0Pip_D0ToKsPimPip_LL_LowBias(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsPimPip_LL_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_LL_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) pi- pi+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^pi- pi+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- ^pi+) pi+]CC",
-        "pis" :   "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D02KSPiPi_LL_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D02KSPiPi_LL_lowbias_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0") + topo_sv_var,
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsPimPip_DD_LowBias(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsPimPip_DD_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_DD_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) pi- pi+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^pi- pi+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- ^pi+) pi+]CC",
-        "pis" :   "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D02KSPiPi_DD_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D02KSPiPi_DD_lowbias_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0") + topo_sv_var,
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsPimPip_LL(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsPimPip_LL"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_LL"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) pi- pi+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^pi- pi+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- ^pi+) pi+]CC",
-        "pis" :   "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D02KSPiPi_LL_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D02KSPiPi_LL_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF= DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF= DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF= DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF= DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF= DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF= DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0") + topo_sv_var,
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsPimPip_DD(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsPimPip_DD"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_DD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) pi- pi+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^pi- pi+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- ^pi+) pi+]CC",
-        "pis" :   "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D02KSPiPi_DD_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D02KSPiPi_DD_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0") + topo_sv_var,
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsPimPip_LL_LowBias(options, pvs, rec_summary):
-    name = "D0ToKsPimPip_LL_LowBias"
-    turbo_line = "Hlt2Charm_D0ToKsPimPip_LL_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) pi- pi+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) pi- pi+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) pi- pi+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) pi- pi+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^pi- pi+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) pi- ^pi+]CC",
-    }
-
-    DTF_D0ToKsPimPip_LL_LB_MASS = DecayTreeFitter(
-        name='DTF_D02KSPiPi_LL_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsPimPip_DD_LowBias(options, pvs, rec_summary):
-    name = "D0ToKsPimPip_DD_LowBias"
-    turbo_line = "Hlt2Charm_D0ToKsPimPip_DD_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) pi- pi+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) pi- pi+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) pi- pi+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) pi- pi+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^pi- pi+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) pi- ^pi+]CC",
-    }
-
-    DTF_D0ToKsPimPip_DD_LB_MASS = DecayTreeFitter(
-        name='DTF_D02KSPiPi_DD_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsPimPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsPimPip_LL(options, pvs, rec_summary):
-    name = "D0ToKsPimPip_LL"
-    turbo_line = "Hlt2Charm_D0ToKsPimPip_LL"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) pi- pi+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) pi- pi+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) pi- pi+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) pi- pi+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^pi- pi+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) pi- ^pi+]CC",
-    }
-
-    DTF_D0ToKsPimPip_LL_MASS = DecayTreeFitter(
-        name='DTF_D02KSPiPi_LL_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsPimPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsPimPip_DD(options, pvs, rec_summary):
-    name = "D0ToKsPimPip_DD"
-    turbo_line = "Hlt2Charm_D0ToKsPimPip_DD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) pi- pi+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) pi- pi+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) pi- pi+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) pi- pi+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^pi- pi+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) pi- ^pi+]CC",
-    }
-
-    DTF_D0ToKsPimPip_DD_MASS = DecayTreeFitter(
-        name='DTF_D02KSPiPi_DD_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsPimPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-# D0->KSK-Ï€+
-def maketuple_DstpToD0Pip_D0ToKsKmPip_LL_LowBias(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKmPip_LL_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_LL_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- pi+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- pi+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- pi+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^pi+) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKmPip_LL_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKmPip_LL_lowbias_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsKmPip_DD_LowBias(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKmPip_DD_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_DD_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- pi+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- pi+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- pi+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^pi+) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKmPip_DD_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKmPip_DD_lowbias_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsKmPip_LL(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKmPip_LL"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_LL"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- pi+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- pi+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- pi+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^pi+) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKmPip_LL_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKmPip_LL_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsKmPip_DD(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKmPip_DD"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_DD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- pi+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- pi+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- pi+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^pi+) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKmPip_DD_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKmPip_DD_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKmPip_LL_LowBias(options, pvs, rec_summary):
-    name = "D0ToKsKmPip_LL_LowBias"
-    turbo_line = "Hlt2Charm_D0ToKsKmPip_LL_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- pi+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- pi+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- pi+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- pi+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- pi+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^pi+]CC",
-    }
-
-    DTF_D0ToKsKmPip_LL_LB_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKmPip_LL_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKmPip_DD_LowBias(options, pvs, rec_summary):
-    name = "D0ToKsKmPip_DD_LowBias"
-    turbo_line = "Hlt2Charm_D0ToKsKmPip_DD_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- pi+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- pi+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- pi+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- pi+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- pi+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^pi+]CC",
-    }
-
-    DTF_D0ToKsKmPip_DD_LB_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKmPip_DD_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKmPip_LL(options, pvs, rec_summary):
-    name = "D0ToKsKmPip_LL"
-    turbo_line = "Hlt2Charm_D0ToKsKmPip_LL"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- pi+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- pi+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- pi+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- pi+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- pi+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^pi+]CC",
-    }
-
-    DTF_D0ToKsKmPip_LL_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKmPip_LL_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKmPip_DD(options, pvs, rec_summary):
-    name = "D0ToKsKmPip_DD"
-    turbo_line = "Hlt2Charm_D0ToKsKmPip_DD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- pi+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- pi+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- pi+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- pi+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- pi+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^pi+]CC",
-    }
-
-    DTF_D0ToKsKmPip_DD_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKmPip_DD_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-# D0->KSK+Ï€-
-def maketuple_DstpToD0Pip_D0ToKsKpPim_LL_LowBias(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKpPim_LL_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_LL_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K+ pi-) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K+ pi-) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ ^pi-) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K+ pi-) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKpPim_LL_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKpPim_LL_lowbias_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsKpPim_DD_LowBias(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKpPim_DD_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_DD_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K+ pi-) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K+ pi-) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ ^pi-) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K+ pi-) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKpPim_DD_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKpPim_DD_lowbias_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsKpPim_LL(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKpPim_LL"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_LL"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K+ pi-) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K+ pi-) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ ^pi-) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K+ pi-) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKpPim_LL_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKpPim_LL_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsKpPim_DD(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKpPim_DD"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_DD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K+ pi-) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K+ pi-) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ ^pi-) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K+ pi-) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKpPim_DD_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKpPim_DD_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKpPim_LL_LowBias(options, pvs, rec_summary):
-    name = "D0ToKsKpPim_LL_LowBias"
-    turbo_line = "Hlt2Charm_D0ToKsKpPim_LL_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K+ pi-]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K+ pi-]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K+ pi-]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K+ pi-]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) K+ ^pi-]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) ^K+ pi-]CC",
-    }
-
-    DTF_D0ToKsKpPim_LL_LB_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKpPim_LL_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKpPim_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKpPim_DD_LowBias(options, pvs, rec_summary):
-    name = "D0ToKsKpPim_DD_LowBias"
-    turbo_line = "Hlt2Charm_D0ToKsKpPim_DD_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K+ pi-]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K+ pi-]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K+ pi-]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K+ pi-]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) K+ ^pi-]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) ^K+ pi-]CC",
-    }
-
-    DTF_D0ToKsKpPim_DD_LB_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKpPim_DD_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKpPim_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKpPim_LL(options, pvs, rec_summary):
-    name = "D0ToKsKpPim_LL"
-    turbo_line = "Hlt2Charm_D0ToKsKpPim_LL"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K+ pi-]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K+ pi-]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K+ pi-]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K+ pi-]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) K+ ^pi-]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) ^K+ pi-]CC",
-    }
-
-    DTF_D0ToKsKpPim_LL_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKpPim_LL_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKpPim_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKpPim_DD(options, pvs, rec_summary):
-    name = "D0ToKsKpPim_DD"
-    turbo_line = "Hlt2Charm_D0ToKsKpPim_DD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K+ pi-]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K+ pi-]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K+ pi-]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K+ pi-]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) K+ ^pi-]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) ^K+ pi-]CC",
-    }
-
-    DTF_D0ToKsKpPim_DD_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKpPim_DD_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKpPim_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-# D0->KSK-K+
-def maketuple_DstpToD0Pip_D0ToKsKmKp_LL_LowBias(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKmKp_LL_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_LL_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- K+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- K+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- K+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- K+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^K+) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKmKp_LL_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKmKp_LL_lowbias_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsKmKp_DD_LowBias(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKmKp_DD_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_DD_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- K+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- K+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- K+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- K+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^K+) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKmKp_DD_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKmKp_DD_lowbias_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsKmKp_LL(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKmKp_LL"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_LL"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- K+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- K+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- K+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- K+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^K+) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKmKp_LL_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKmKp_LL_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsKmKp_DD(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKmKp_DD"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_DD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- K+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- K+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- K+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- K+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^K+) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKmKp_DD_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKmKp_DD_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKmKp_LL_LowBias(options, pvs, rec_summary):
-    name = "D0ToKsKmKp_LL_LowBias"
-    turbo_line = "Hlt2Charm_D0ToKsKmKp_LL_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- K+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- K+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- K+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- K+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- K+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^K+]CC",
-    }
-
-    DTF_D0ToKsKmKp_LL_LB_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKmKp_LL_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmKp_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKmKp_DD_LowBias(options, pvs, rec_summary):
-    name = "D0ToKsKmKp_DD_LowBias"
-    turbo_line = "Hlt2Charm_D0ToKsKmKp_DD_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- K+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- K+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- K+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- K+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- K+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^K+]CC",
-    }
-
-    DTF_D0ToKsKmKp_DD_LB_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKmKp_DD_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmKp_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsPimPip_LL_NoBias(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsPimPip_LL_NoBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_LL_NoBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) pi- pi+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^pi- pi+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- ^pi+) pi+]CC",
-        "pis" :   "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D02KSPiPi_LL_nobias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D02KSPiPi_LL_nobias_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0") + topo_sv_var,
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKmKp_LL(options, pvs, rec_summary):
-    name = "D0ToKsKmKp_LL"
-    turbo_line = "Hlt2Charm_D0ToKsKmKp_LL"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- K+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- K+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- K+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- K+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- K+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^K+]CC",
-    }
-
-    DTF_D0ToKsKmKp_LL_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKmKp_LL_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmKp_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKmKp_DD(options, pvs, rec_summary):
-    name = "D0ToKsKmKp_DD"
-    turbo_line = "Hlt2Charm_D0ToKsKmKp_DD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- K+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- K+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- K+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- K+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- K+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^K+]CC",
-    }
-
-    DTF_D0ToKsKmKp_DD_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKmKp_DD_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmKp_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-# ########################################
diff --git a/Charm_2024validation/Charm_2024validation/options/d0_to_kshh_MC.py b/Charm_2024validation/Charm_2024validation/options/d0_to_kshh_MC.py
deleted file mode 100644
index 9fa138f8ef..0000000000
--- a/Charm_2024validation/Charm_2024validation/options/d0_to_kshh_MC.py
+++ /dev/null
@@ -1,44 +0,0 @@
-from .tupling import (
-    make_MC_composite_variables,
-    make_MC_basic_variables,
-    make_MC_event_variables,
-)
-
-from PyConf.reading import get_mc_particles, get_mc_header
-from FunTuple import FunTuple_MCParticles as FuntupleMC
-
-def maketuple_MC_DstpToD0Pip_D0ToKsPimPip(options, pvs, rec_summary):
-    name = "MC_DstpToD0Pip_D0ToKsPimPip"
-    line = "/Event/MC/Particles"
-    
-    input_data = get_mc_particles(f"{line}")
-
-    branches = {
-       "Dst" : "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi- pi+) pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ ==> ^([D0]CC ==> (KS0 ==> pi- pi+) pi- pi+) pi+]CC",
-        "KS0"  : "[D*(2010)+ ==> ([D0]CC ==> ^(KS0 ==> pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> ^pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi- ^pi+) pi- pi+) pi+]CC",
-        "hm"   : "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi- pi+) ^pi- pi+) pi+]CC",
-        "hp"  :  "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi- pi+) pi- ^pi+) pi+]CC",
-        "pis" :  "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi- pi+) pi- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_MC_composite_variables(),
-        "D0"    : make_MC_composite_variables(),
-        "KS0"    : make_MC_composite_variables(),
-        "KS0_pim"     : make_MC_basic_variables(),
-        "KS0_pip"     : make_MC_basic_variables(),
-        "hm"    : make_MC_basic_variables(),
-        "hp"    : make_MC_basic_variables(),
-        "pis"   : make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                          tuple_name="MCDecayTree",
-                          fields=branches, variables = variables,  
-                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])), 
-                          inputs=input_data)
-
-    return [mytuple]
diff --git a/Charm_2024validation/Charm_2024validation/options/d0_to_ksks.py b/Charm_2024validation/Charm_2024validation/options/d0_to_ksks.py
deleted file mode 100644
index d47253aa14..0000000000
--- a/Charm_2024validation/Charm_2024validation/options/d0_to_ksks.py
+++ /dev/null
@@ -1,1049 +0,0 @@
-import Functors as F
-from Functors.math import log
-from DaVinci import Options, make_config
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunctorCollection
-from PyConf.reading import get_particles, get_pvs
-import FunTuple.functorcollections as FC
-from FunTuple import FunTuple_Particles as Funtuple
-from DecayTreeFitter import DecayTreeFitter
-
-from .tupling import (
-    make_basic_variables,
-    make_composite_variables,
-    make_hlt2_event_variables,
-    make_basic_dtf_variables,
-    make_composite_dtf_variables,
-    Hlt1_lines
-)
-
-# define helper functors
-get_SV =  F.ENDVERTEX @ F.FORWARDARG0
-get_SV_pos = F.TOLINALG @ F.POSITION @ get_SV
-# only if composite (i.e. has vertex)

-get_child_1 = F.CHILD(1, F.FORWARDARG0) # change here the index of the child.
-get_child_endvtx_pos_1 = F.ENDVERTEX_POS  @ get_child_1
-get_fdvec_child_1 = get_child_endvtx_pos_1 - get_SV_pos
-get_child_2 = F.CHILD(2, F.FORWARDARG0) # change here the index of the child.
-get_child_endvtx_pos_2 = F.ENDVERTEX_POS  @ get_child_2
-get_fdvec_child_2 = get_child_endvtx_pos_2 - get_SV_pos
-
-# define observables
-IP_wrt_SV_KS1 = F.IP.bind(get_SV_pos , get_child_1)
-IP_wrt_SV_KS2 = F.IP.bind(get_SV_pos , get_child_2)
-IPCHI2_wrt_SV_KS1 = F.IPCHI2.bind(get_SV , get_child_1)
-IPCHI2_wrt_SV_KS2 = F.IPCHI2.bind(get_SV , get_child_2)
-# only if child is composite (i.e. has vertex)
-FD_wrt_SV_KS1 = F.MAGNITUDE @ get_fdvec_child_1
-FD_wrt_SV_KS2 = F.MAGNITUDE @ get_fdvec_child_2
-FDCHI2_wrt_SV_KS1 = F.VTX_FDCHI2.bind(get_SV, get_child_1)
-FDCHI2_wrt_SV_KS2 = F.VTX_FDCHI2.bind(get_SV, get_child_2)
-# Note: Apply the functors to the head of the node of decay tree e.g. B
-# Functor collection for SV related info
-topo_sv_var = FunctorCollection(
-    {
-        "ORIVXIP_CHILD1": IP_wrt_SV_KS1,
-        "ORIVXIP_CHILD2": IP_wrt_SV_KS2,
-        "ORIVXIPCHI2_CHILD1": IPCHI2_wrt_SV_KS1,
-        "ORIVXIPCHI2_CHILD2": IPCHI2_wrt_SV_KS2,
-        "ORIVXFD_CHILD1": FD_wrt_SV_KS1,
-        "ORIVXFD_CHILD2": FD_wrt_SV_KS2,
-        "ORIVXFDCHI2_CHILD1": FDCHI2_wrt_SV_KS1,
-        "ORIVXFDCHI2_CHILD2": FDCHI2_wrt_SV_KS2,
-    }
-)
-
-############################# LLLL #############################
-def maketuple_Dst2D0pi_D02KSKS_LLLL(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLL"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_LLLL = DecayTreeFitter(
-    #     name='DTF_LLLL',
-    #     input_particles=input_data)
-    #
-    # DTF_LLLL_PV = DecayTreeFitter(
-    #     name='DTF_LLLL_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_LLLL_MASS = DecayTreeFitter(
-        name='DTF_LLLL_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_LLLL_MASS_PV = DecayTreeFitter(
-        'DTF_LLLL_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_LLLL",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# LLLL Tight #############################
-def maketuple_Dst2D0pi_D02KSKS_LLLL_Tight(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLL_Tight"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_LLLL_Tight = DecayTreeFitter(
-    #     name='DTF_LLLL_Tight',
-    #     input_particles=input_data)
-    #
-    # DTF_LLLL_Tight_PV = DecayTreeFitter(
-    #     name='DTF_LLLL_Tight_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_LLLL_Tight_MASS = DecayTreeFitter(
-        name='DTF_LLLL_Tight_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_LLLL_Tight_MASS_PV = DecayTreeFitter(
-        'DTF_LLLL_Tight_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_LLLL_Tight",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# LLDD #############################
-def maketuple_Dst2D0pi_D02KSKS_LLDD(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLDD"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_LLDD = DecayTreeFitter(
-    #     name='DTF_LLDD',
-    #     input_particles=input_data)
-    #
-    # DTF_LLDD_PV = DecayTreeFitter(
-    #     name='DTF_LLDD_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_LLDD_MASS = DecayTreeFitter(
-        name='DTF_LLDD_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_LLDD_MASS_PV = DecayTreeFitter(
-        'DTF_LLDD_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLDD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLDD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLDD, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLDD_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_LLDD",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# LLDD Tight #############################
-def maketuple_Dst2D0pi_D02KSKS_LLDD_Tight(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLDD_Tight"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_LLDD_Tight = DecayTreeFitter(
-    #     name='DTF_LLDD_Tight',
-    #     input_particles=input_data)
-    #
-    # DTF_LLDD_Tight_PV = DecayTreeFitter(
-    #     name='DTF_LLDD_Tight_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_LLDD_Tight_MASS = DecayTreeFitter(
-        name='DTF_LLDD_Tight_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_LLDD_Tight_MASS_PV = DecayTreeFitter(
-        'DTF_LLDD_Tight_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False, DTF=DTF_LLDD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False, DTF=DTF_LLDD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLDD_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLDD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_LLDD_Tight",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# DDDD #############################
-def maketuple_Dst2D0pi_D02KSKS_DDDD(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDDD"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_DDDD = DecayTreeFitter(
-    #     name='DTF_DDDD',
-    #     input_particles=input_data)
-    #
-    # DTF_DDDD_PV = DecayTreeFitter(
-    #     name='DTF_DDDD_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_DDDD_MASS = DecayTreeFitter(
-        name='DTF_DDDD_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_DDDD_MASS_PV = DecayTreeFitter(
-        'DTF_DDDD_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_DDDD",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# DDDD Tight #############################
-def maketuple_Dst2D0pi_D02KSKS_DDDD_Tight(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDDD_Tight"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_DDDD_Tight = DecayTreeFitter(
-    #     name='DTF_DDDD_Tight',
-    #     input_particles=input_data)
-    #
-    # DTF_DDDD_Tight_PV = DecayTreeFitter(
-    #     name='DTF_DDDD_Tight_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_DDDD_Tight_MASS = DecayTreeFitter(
-        name='DTF_DDDD_Tight_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_DDDD_Tight_MASS_PV = DecayTreeFitter(
-        'DTF_DDDD_Tight_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_DDDD_Tight",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# ULLL #############################
-def maketuple_Dst2D0pi_D02KSKS_ULLL(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULLL"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_ULLL = DecayTreeFitter(
-    #     name='DTF_ULLL',
-    #     input_particles=input_data)
-    #
-    # DTF_ULLL_PV = DecayTreeFitter(
-    #     name='DTF_ULLL_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_ULLL_MASS = DecayTreeFitter(
-        name='DTF_ULLL_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_ULLL_MASS_PV = DecayTreeFitter(
-        'DTF_ULLL_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_ULLL",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# ULLL Tight #############################
-def maketuple_Dst2D0pi_D02KSKS_ULLL_Tight(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULLL_Tight"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_ULLL_Tight = DecayTreeFitter(
-    #     name='DTF_ULLL_Tight',
-    #     input_particles=input_data)
-    #
-    # DTF_ULLL_Tight_PV = DecayTreeFitter(
-    #     name='DTF_ULLL_Tight_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_ULLL_Tight_MASS = DecayTreeFitter(
-        name='DTF_ULLL_Tight_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_ULLL_Tight_MASS_PV = DecayTreeFitter(
-        'DTF_ULLL_Tight_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_ULLL_Tight",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# ULDD #############################
-def maketuple_Dst2D0pi_D02KSKS_ULDD(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULDD"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_ULDD = DecayTreeFitter(
-    #     name='DTF_ULDD',
-    #     input_particles=input_data)
-    #
-    # DTF_ULDD_PV = DecayTreeFitter(
-    #     name='DTF_ULDD_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_ULDD_MASS = DecayTreeFitter(
-        name='DTF_ULDD_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_ULDD_MASS_PV = DecayTreeFitter(
-        'DTF_ULDD_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_ULDD",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# ULDD Tight #############################
-def maketuple_Dst2D0pi_D02KSKS_ULDD_Tight(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULDD_Tight"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_ULDD_Tight = DecayTreeFitter(
-    #     name='DTF_ULDD_Tight',
-    #     input_particles=input_data)
-    #
-    # DTF_ULDD_Tight_PV = DecayTreeFitter(
-    #     name='DTF_ULDD_Tight_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_ULDD_Tight_MASS = DecayTreeFitter(
-        name='DTF_ULDD_Tight_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_ULDD_Tight_MASS_PV = DecayTreeFitter(
-        'DTF_ULDD_Tight_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_ULDD_Tight",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# LLLD #############################
-def maketuple_Dst2D0pi_D02KSKS_LLLD(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLD"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_LLLD = DecayTreeFitter(
-    #     name='DTF_LLLD',
-    #     input_particles=input_data)
-    #
-    # DTF_LLLD_PV = DecayTreeFitter(
-    #     name='DTF_LLLD_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_LLLD_MASS = DecayTreeFitter(
-        name='DTF_LLLD_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_LLLD_MASS_PV = DecayTreeFitter(
-        'DTF_LLLD_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_LLLD",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# LLLD Tight #############################
-def maketuple_Dst2D0pi_D02KSKS_LLLD_Tight(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLD_Tight"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_LLLD_Tight = DecayTreeFitter(
-    #     name='DTF_LLLD_Tight',
-    #     input_particles=input_data)
-    #
-    # DTF_LLLD_Tight_PV = DecayTreeFitter(
-    #     name='DTF_LLLD_Tight_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_LLLD_Tight_MASS = DecayTreeFitter(
-        name='DTF_LLLD_Tight_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_LLLD_Tight_MASS_PV = DecayTreeFitter(
-        'DTF_LLLD_Tight_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_LLLD_Tight",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# DDLD #############################
-def maketuple_Dst2D0pi_D02KSKS_DDLD(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDLD"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_DDLD = DecayTreeFitter(
-    #     name='DTF_DDLD',
-    #     input_particles=input_data)
-    #
-    # DTF_DDLD_PV = DecayTreeFitter(
-    #     name='DTF_DDLD_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_DDLD_MASS = DecayTreeFitter(
-        name='DTF_DDLD_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_DDLD_MASS_PV = DecayTreeFitter(
-        'DTF_DDLD_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_DDLD",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# DDLD Tight #############################
-def maketuple_Dst2D0pi_D02KSKS_DDLD_Tight(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDLD_Tight"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_DDLD_Tight = DecayTreeFitter(
-    #     name='DTF_DDLD_Tight',
-    #     input_particles=input_data)
-    #
-    # DTF_DDLD_Tight_PV = DecayTreeFitter(
-    #     name='DTF_DDLD_Tight_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_DDLD_Tight_MASS = DecayTreeFitter(
-        name='DTF_DDLD_Tight_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_DDLD_Tight_MASS_PV = DecayTreeFitter(
-        'DTF_DDLD_Tight_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_DDLD_Tight",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
diff --git a/Charm_2024validation/Charm_2024validation/options/d0_to_ksks_MC.py b/Charm_2024validation/Charm_2024validation/options/d0_to_ksks_MC.py
deleted file mode 100644
index 06c1ac6139..0000000000
--- a/Charm_2024validation/Charm_2024validation/options/d0_to_ksks_MC.py
+++ /dev/null
@@ -1,46 +0,0 @@
-from .tupling import (
-    make_MC_composite_variables,
-    make_MC_basic_variables,
-    make_MC_event_variables,
-)
-
-from PyConf.reading import get_mc_particles, get_mc_header
-from FunTuple import FunTuple_MCParticles as FuntupleMC
-
-############################# LLLL #############################
-def maketuple_MC_Dst2D0pi_D02KSKS_LLLL(options, pvs, rec_summary):
-    name = "MC_DstpToD0Pip_D0ToKsKs_LLLL"
-    line = "/Event/MC/Particles"
-
-    input_data = get_mc_particles(f"{line}")
-
-    fields = {
-        "Dst": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi+ pi-) (KS0 ==> pi+ pi-) ) pi+]CC",
-        "D0": "[D*(2010)+ ==> ^([D0]CC ==> (KS0 ==> pi+ pi-) (KS0 ==> pi+ pi-) ) pi+]CC",
-        "KS1": "[D*(2010)+ ==> ([D0]CC ==> ^(KS0 ==> pi+ pi-) (KS0 ==> pi+ pi-) ) pi+]CC",
-        "KS2": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi+ pi-) ^(KS0 ==> pi+ pi-) ) pi+]CC",
-        "pip1": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> ^pi+ pi-) (KS0 ==> pi+ pi-) ) pi+]CC",
-        "pim1": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi+ ^pi-) (KS0 ==> pi+ pi-) ) pi+]CC",
-        "pip2": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi+ pi-) (KS0 ==> ^pi+ pi-) ) pi+]CC",
-        "pim2": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi+ pi-) (KS0 ==> pi+ ^pi-) ) pi+]CC",
-        "pi_soft": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi+ pi-) (KS0 ==> pi+ pi-) ) ^pi+]CC",
-    }
-
-    variables = {"pip1":  make_MC_basic_variables(),
-                 "pim1":  make_MC_basic_variables(),
-                 "pip2":  make_MC_basic_variables(),
-                 "pim2":  make_MC_basic_variables(),
-                 "KS1": make_MC_composite_variables(),
-                 "KS2": make_MC_composite_variables(),
-                 "D0": make_MC_composite_variables(),
-                 "Dst": make_MC_composite_variables(),
-                 "pi_soft":  make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                          tuple_name="MCDecayTree",
-                          fields=fields, variables = variables,
-                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
-                          inputs=input_data)
-
-    return [mytuple]
diff --git a/Charm_2024validation/Charm_2024validation/options/d_to_hhh.py b/Charm_2024validation/Charm_2024validation/options/d_to_hhh.py
deleted file mode 100644
index d10fa039f6..0000000000
--- a/Charm_2024validation/Charm_2024validation/options/d_to_hhh.py
+++ /dev/null
@@ -1,503 +0,0 @@
-from .tupling import (
-    make_composite_variables_3body,
-    make_b_composite_variables,
-    make_composite_variables,
-    make_basic_variables,
-    make_hlt2_event_variables,
-    make_composite_dtf_variables_3body,
-    make_basic_dtf_variables,
-)
-
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunTuple_Particles as Funtuple
-
-
-def make_dtf_variables(options, pvs, input_data, ptype):
-
-    if ptype not in ["basic", "composite"]:
-        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
-
-    from DecayTreeFitter import DecayTreeFitter
-    
-    DTF = DecayTreeFitter(
-        name=f'DTF_{{hash}}',
-        input_particles=input_data)
-
-    DTFvtx = DecayTreeFitter(
-        name=f'DTFvtx_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    DTFmassDp = DecayTreeFitter(
-        name=f'DTFmassDp_{{hash}}',
-        input_particles=input_data,
-        mass_constraints=["D+"])
-
-    DTFvtxmassDp = DecayTreeFitter(
-        name=f'DTFvtxmassDp_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D+"])
-
-    DTFmassDsp = DecayTreeFitter(
-        name=f'DTFmassDsp_{{hash}}',
-        input_particles=input_data,
-        substitutions = ['D+{{D_s+}}'],
-        mass_constraints=["D_s+"])
-
-    DTFvtxmassDsp = DecayTreeFitter(
-        name=f'DTFvtxmassDsp_{{hash}}',
-        input_particles=input_data,
-        substitutions = ['D+{{D_s+}}',"KS0{{KS0}}"],#trick
-        mass_constraints=["D_s+"],
-        input_pvs=pvs,
-    )
-
-    if ptype == "basic":
-        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassDp,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="Dp")
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassDp,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="Dp")
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassDsp,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="Dsp")
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassDsp,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="Dsp")
-        return dtf_vars
-
-    if ptype == "composite":
-        dtf_vars = make_composite_dtf_variables_3body(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
-                                             DTF=DTFmassDp,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="Dp")
-        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
-                                             DTF=DTFvtxmassDp,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="Dp")
-        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
-                                             DTF=DTFmassDsp,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="Dsp")
-        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
-                                             DTF=DTFvtxmassDsp,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="Dsp")
-        return dtf_vars
-
-
-def maketuple_D2Kpipi(options, pvs, rec_summary, _NoCuts=False):
-    name = "D2Kpipi"
-    turbo_line = "Hlt2Charm_DpDspToKmPipPip"
-    if _NoCuts == True:
-        turbo_line += "_NoCuts"
-        name += "_NoCuts"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> K- pi+ pi+]CC",
-        "Km"   : "[D+ -> ^K- pi+ pi+]CC",
-        "pip1"  : "[D+ -> K- ^pi+ pi+]CC",
-        "pip2" : "[D+ -> K- pi+ ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2pipipi(options, pvs, rec_summary, _NoCuts=False):
-    name = "D2pipipi"
-    turbo_line = "Hlt2Charm_DpDspToPimPipPip"
-    if _NoCuts == True:
-        turbo_line += "_NoCuts"
-        name += "_NoCuts"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> pi- pi+ pi+]CC",
-        "pim"   : "[D+ -> ^pi- pi+ pi+]CC",
-        "pip1"  : "[D+ -> pi- ^pi+ pi+]CC",
-        "pip2" : "[D+ -> pi- pi+ ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Ds2KKpi(options, pvs, rec_summary, _NoCuts=False):
-    name = "Ds2KKpi"
-    turbo_line = "Hlt2Charm_DpDspToKmKpPip"
-    if _NoCuts == True:
-        turbo_line += "_NoCuts"
-        name += "_NoCuts"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> K- K+ pi+]CC",
-        "Km"   : "[D+ -> ^K- K+ pi+]CC",
-        "Kp"  : "[D+ -> K- ^K+ pi+]CC",
-        "pip" : "[D+ -> K- K+ ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-    
-    return [myfilter, mytuple]
-
-def maketuple_D2Kpipi_Kpi(options, pvs, rec_summary):
-    name = "D2Kpipi_Kpi"
-    turbo_line = "Hlt2Charm_DpDspToKmPipPip"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (KS0 -> K- pi+) pi+]CC",
-        "Kst" : "[D+ -> ^(KS0 -> K- pi+) pi+]CC",
-        "Km"   : "[D+ -> (KS0 -> ^K- pi+) pi+]CC",
-        "pip"  : "[D+ -> (KS0 -> K- ^pi+) pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data),
-        "Kst"   : make_composite_variables(options, pvs, input_data),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, use_loki_decay_finder=True)
-
-    return [myfilter, mytuple]
-
-
-
-
-    '''
-    from PyConf.Algorithms import ThOrParticleSelection
-    import Functors as F
-    FILTER_TREE = lambda id: F.FILTER(F.IS_ABS_ID(id)) @ F.GET_ALL_DESCENDANTS()
-    Km_data = ThOrParticleSelection(
-    InputParticles=input_data, Functor=FILTER_TREE("[K-]CC")
-).OutputSelection
-    pip_data = ThOrParticleSelection(
-        InputParticles=input_data, Functor=FILTER_TREE("[pi+]CC")
-).OutputSelection
-    
-    
-    from PyConf.Algorithms import ChargedBasicsProducer, UniqueIDGeneratorAlg
-    from PyConf.Algorithms import ThOrCombiner__2ChargedBasics, ThOrCombiner__2Particle
-    # make unique_id_generator
-    unique_id_gen = UniqueIDGeneratorAlg()
-    '''
-    '''
-    # produce charged basic particles
-    produce_kaons = ChargedBasicsProducer(
-        InputUniqueIDGenerator=unique_id_gen, ParticleID="kaon")
-    produce_pions = ChargedBasicsProducer(
-        InputUniqueIDGenerator=unique_id_gen, ParticleID="pion")
-    produce_jpsi = ThOrCombiner__2ChargedBasics(
-    '''
-    '''
-    produce_jpsi = ThOrCombiner__2Particle(
-        InputUniqueIDGenerator=unique_id_gen,
-        DecayDescriptor="[J/psi(1S) -> K- pi+]cc",
-        #Input1=produce_kaons.Particles,
-        #Input2=produce_pions.Particles,
-        Input1=Km_data,
-        Input2=pip_data,
-    )
-    input_data = produce_jpsi.Output
-
-    branches = {
-        "Jpsi" : "[J/psi(1S) -> K- pi+]CC",
-    }
-
-    from FunTuple import FunctorCollection
-    import Functors as F
-    variables = {
-        #"Dp"   : make_composite_variables(options, pvs, input_data, False, False),
-        #"Jpsi"   : make_composite_variables(options, pvs, input_data, False, False),
-        "Jpsi"   : FunctorCollection({
-            "PX": F.PX,
-            "PY": F.PY,
-            "PZ": F.PZ,
-            "BPVDIRA": F.BPVDIRA(pvs),
-            "VCHI2DOF": F.CHI2DOF, #CHI2VXNDOF
-            "BPVIPCHI2": F.BPVIPCHI2(pvs),
-            "BPVIP": F.BPVIP(pvs),
-        }),
-        
-    }
-
-    from FunTuple import FunTuple_Composites as Funtuple
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables, inputs=input_data, store_multiple_cand_info=True)
-    ## add event_variables
-
-    
-    return [myfilter, mytuple]
-    '''
-    '''
-    from PyConf.control_flow import CompositeNode, NodeLogic
-    from PyConf.Algorithms import PrintDecayTree, PrintHeader
-    from RecoConf.reconstruction_objects import upfront_reconstruction
-    from DaVinci.common_particles import make_std_loose_jpsi2mum
-    jpsis = make_std_loose_jpsi2mumu()
-    pdt = PrintDecayTree(name="PrintJpsis", Input=jpsis)
-    algs = upfront_reconstruction() + [jpsis, pdt]
-
-    node = CompositeNode(
-    "PrintJpsiNode", children=algs, combine_logic=NodeLogic.NONLAZY_AND
-)
-    return [node]
-    
-    '''
-
-
-def maketuple_D2pipiK(options, pvs, rec_summary, _NoCuts=False):
-    name = "D2pipiK"
-    turbo_line = "Hlt2Charm_DpDspToKpPimPip"
-    if _NoCuts == True:
-        turbo_line += "_NoCuts"
-        name += "_NoCuts"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> pi- pi+ K+]CC",
-        "p1"   : "[D+ -> ^pi- pi+ K+]CC",
-        "p2"  : "[D+ -> pi- ^pi+ K+]CC",
-        "p3" : "[D+ -> pi- pi+ ^K+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
-        "p1"     : make_basic_variables(options, pvs, input_data),
-        "p2"    : make_basic_variables(options, pvs, input_data),
-        "p3"   : make_basic_variables(options, pvs, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2KKK(options, pvs, rec_summary, _NoCuts=False):
-    name = "D2KKK"
-    turbo_line = "Hlt2Charm_DpDspToKmKpKp"
-    if _NoCuts == True:
-        turbo_line += "_NoCuts"
-        name += "_NoCuts"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> K- K+ K+]CC",
-        "p1"   : "[D+ -> ^K- K+ K+]CC",
-        "p2"  : "[D+ -> K- ^K+ K+]CC",
-        "p3" : "[D+ -> K- K+ ^K+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
-        "p1"     : make_basic_variables(options, pvs, input_data),
-        "p2"    : make_basic_variables(options, pvs, input_data),
-        "p3"   : make_basic_variables(options, pvs, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2piKK(options, pvs, rec_summary, _NoCuts=False):
-    name = "D2piKK"
-    turbo_line = "Hlt2Charm_DpDspToKpKpPim"
-    if _NoCuts == True:
-        turbo_line += "_NoCuts"
-        name += "_NoCuts"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> pi- K+ K+]CC",
-        "p1"   : "[D+ -> ^pi- K+ K+]CC",
-        "p2"  : "[D+ -> pi- ^K+ K+]CC",
-        "p3" : "[D+ -> pi- K+ ^K+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
-        "p1"     : make_basic_variables(options, pvs, input_data),
-        "p2"    : make_basic_variables(options, pvs, input_data),
-        "p3"   : make_basic_variables(options, pvs, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-
-def maketuple_B02Dpi_D2KKpi(options, pvs, rec_summary):
-    name = "B02Dpi_D2KKpi"
-    turbo_line = "Hlt2Charm_B0ToDmPip_DmToKmKpPim"
-    
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-    
-    branches = {
-        "B0" : "[[B0]CC -> (D- -> K- K+ pi-) pi+]CC",
-        "pip" : "[[B0]CC -> (D- -> K- K+ pi-) ^pi+]CC",
-        "Dm" : "[[B0]CC -> ^(D- -> K- K+ pi-) pi+]CC",
-        "p1" : "[[B0]CC -> (D- -> ^K- K+ pi-) pi+]CC",
-        "p2" : "[[B0]CC -> (D- -> K- ^K+ pi-) pi+]CC",
-        "p3" : "[[B0]CC -> (D- -> K- K+ ^pi-) pi+]CC",
-    }
-    
-    variables = {
-        "B0" : make_b_composite_variables(options, pvs, input_data),
-        "pip" : make_basic_variables(options, pvs,input_data),
-        "Dm"   : make_composite_variables_3body(options, pvs, input_data),
-        "p1"     : make_basic_variables(options, pvs, input_data),
-        "p2"    : make_basic_variables(options, pvs, input_data),
-        "p3"   : make_basic_variables(options, pvs, input_data),        
-    }
-    
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-
-def maketuple_B02Dpi_D2pipipi(options, pvs, rec_summary, _NoCuts=False):    
-    name = "B02Dpi_D2pipipi"
-    turbo_line = "Hlt2Charm_B0ToDmPip_DmToPimPimPip"
-    
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-    
-    branches = {
-        "B0" : "[[B0]CC -> (D- -> pi- pi- pi+) pi+]CC",
-        "pip" : "[[B0]CC -> (D- -> pi- pi- pi+) ^pi+]CC",
-        "Dm" : "[[B0]CC -> ^(D- -> pi- pi- pi+) pi+]CC",
-        "p1" : "[[B0]CC -> (D- -> ^pi- pi- pi+) pi+]CC",
-        "p2" : "[[B0]CC -> (D- -> pi- ^pi- pi+) pi+]CC",
-        "p3" : "[[B0]CC -> (D- -> pi- pi- ^pi+) pi+]CC",
-    }
-    
-    variables = {
-        "B0" : make_b_composite_variables(options, pvs, input_data),
-        "pip" : make_basic_variables(options, pvs,input_data),
-        "Dm"   : make_composite_variables_3body(options, pvs, input_data),
-        "p1"     : make_basic_variables(options, pvs, input_data),
-        "p2"    : make_basic_variables(options, pvs, input_data),
-        "p3"   : make_basic_variables(options, pvs, input_data),        
-    }
-    
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-    
-def maketuple_Bs02Dspi_Ds2KKpi(options, pvs, rec_summary, _NoCuts=False):    
-    name = "Bs02Dspi_Ds2KKpi"
-    turbo_line = "Hlt2Charm_Bs0ToDsmPip_DsmToKmKpPim"
-    
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-    
-    branches = {
-        "Bs0" : "[[B_s0]CC -> (D_s- -> K- K+ pi-) pi+]CC",
-        "pip" : "[[B_s0]CC -> (D_s- -> K- K+ pi-) ^pi+]CC",
-        "Dsm" : "[[B_s0]CC -> ^(D_s- -> K- K+ pi-) pi+]CC",
-        "p1" : "[[B_s0]CC -> (D_s- -> ^K- K+ pi-) pi+]CC",
-        "p2" : "[[B_s0]CC -> (D_s- -> K- ^K+ pi-) pi+]CC",
-        "p3" : "[[B_s0]CC -> (D_s- -> K- K+ ^pi-) pi+]CC",
-    }
-    
-    variables = {
-        "Bs0" : make_b_composite_variables(options, pvs, input_data),
-        "pip" : make_basic_variables(options, pvs,input_data),
-        "Dsm"   : make_composite_variables_3body(options, pvs, input_data),
-        "p1"     : make_basic_variables(options, pvs, input_data),
-        "p2"    : make_basic_variables(options, pvs, input_data),
-        "p3"   : make_basic_variables(options, pvs, input_data),        
-    }
-    
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-    
-def maketuple_Bs02Dspi_Ds2pipipi(options, pvs, rec_summary, _NoCuts=False):
-    name = "Bs02Dspi_Ds2pipipi"
-    turbo_line = "Hlt2Charm_Bs0ToDsmPip_DsmToPimPimPip"
-    
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-    
-    branches = {
-        "Bs0" : "[[B_s0]CC -> (D_s- -> pi- pi- pi+) pi+]CC",
-        "pip" : "[[B_s0]CC -> (D_s- -> pi- pi- pi+) ^pi+]CC",
-        "Dsm" : "[[B_s0]CC -> ^(D_s- -> pi- pi- pi+) pi+]CC",
-        "p1" : "[[B_s0]CC -> (D_s- -> ^pi- pi- pi+) pi+]CC",
-        "p2" : "[[B_s0]CC -> (D_s- -> pi- ^pi- pi+) pi+]CC",
-        "p3" : "[[B_s0]CC -> (D_s- -> pi- pi- ^pi+) pi+]CC",
-    }
-    
-    variables = {
-        "Bs0" : make_b_composite_variables(options, pvs, input_data),
-        "pip" : make_basic_variables(options, pvs,input_data),
-        "Dsm"   : make_composite_variables_3body(options, pvs, input_data),
-        "p1"     : make_basic_variables(options, pvs, input_data),
-        "p2"    : make_basic_variables(options, pvs, input_data),
-        "p3"   : make_basic_variables(options, pvs, input_data),        
-    }
-    
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
diff --git a/Charm_2024validation/Charm_2024validation/options/d_to_hhh_MC.py b/Charm_2024validation/Charm_2024validation/options/d_to_hhh_MC.py
deleted file mode 100644
index e666e5f3ce..0000000000
--- a/Charm_2024validation/Charm_2024validation/options/d_to_hhh_MC.py
+++ /dev/null
@@ -1,92 +0,0 @@
-from .tupling import (
-    make_MC_composite_variables,
-    make_MC_basic_variables,
-    make_MC_event_variables,
-)
-
-from PyConf.reading import get_mc_particles, get_mc_header
-from FunTuple import FunTuple_MCParticles as FuntupleMC
-
-def maketuple_MC_D2Kpipi(options, pvs, rec_summary):
-    name = "MC_D2Kpipi"
-    line = "/Event/MC/Particles"
-
-    input_data = get_mc_particles(f"{line}")
-
-    branches = {
-        "Dp" : "[D+ ==> K- pi+ pi+]CC",
-        "Km"   : "[D+ ==> ^K- pi+ pi+]CC",
-        "pip1"  : "[D+ ==> K- ^pi+ pi+]CC",
-        "pip2" : "[D+ ==> K- pi+ ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_MC_composite_variables(),
-        "Km"     : make_MC_basic_variables(),
-        "pip1"    : make_MC_basic_variables(),
-        "pip2"   : make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                          tuple_name="MCDecayTree",
-                          fields=branches, variables = variables,
-                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
-                          inputs=input_data)
-
-    return [mytuple]
-
-def maketuple_MC_Ds2KKpi(options, pvs, rec_summary):
-    name = "MC_Ds2KKpi"
-    line = "/Event/MC/Particles"
-
-    input_data = get_mc_particles(f"{line}")
-
-    branches = {
-        "Dp" : "[D_s+ ==> K- K+ pi+]CC",
-        "Km"   : "[D_s+ ==> ^K- K+ pi+]CC",
-        "Kp"  : "[D_s+ ==> K- ^K+ pi+]CC",
-        "pip" : "[D_s+ ==> K- K+ ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_MC_composite_variables(),
-        "Km"     : make_MC_basic_variables(),
-        "Kp"    : make_MC_basic_variables(),
-        "pip"   : make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                          tuple_name="MCDecayTree",
-                          fields=branches, variables = variables,
-                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
-                          inputs=input_data)
-
-    return [mytuple]
-
-def maketuple_MC_Ds2KKK(options, pvs, rec_summary):
-    name = "MC_Ds2KKK"
-    line = "/Event/MC/Particles"
-
-    input_data = get_mc_particles(f"{line}")
-
-    branches = {
-        "Dp" : "[D_s+ ==> K- K+ K+]CC",
-        "Km"   : "[D_s+ ==> ^K- K+ K+]CC",
-        "Kp1"  : "[D_s+ ==> K- ^K+ K+]CC",
-        "Kp2" : "[D_s+ ==> K- K+ ^K+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_MC_composite_variables(),
-        "Km"     : make_MC_basic_variables(),
-        "Kp1"    : make_MC_basic_variables(),
-        "Kp2"   : make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                          tuple_name="MCDecayTree",
-                          fields=branches, variables = variables,
-                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
-                          inputs=input_data)
-
-    return [mytuple]
diff --git a/Charm_2024validation/Charm_2024validation/options/d_to_ksh.py b/Charm_2024validation/Charm_2024validation/options/d_to_ksh.py
deleted file mode 100644
index df40aee746..0000000000
--- a/Charm_2024validation/Charm_2024validation/options/d_to_ksh.py
+++ /dev/null
@@ -1,313 +0,0 @@
-from .tupling import (
-    make_composite_variables,
-    make_basic_variables,
-    make_hlt2_event_variables,
-    make_composite_dtf_variables,
-    make_basic_dtf_variables,
-)
-
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunTuple_Particles as Funtuple
-
-
-def make_dtf_variables(options, pvs, input_data, ptype, islong=False):
-
-    if ptype not in ["basic", "composite"]:
-        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
-
-    from DecayTreeFitter import DecayTreeFitter
-    
-    DTF = DecayTreeFitter(
-        name=f'DTF_{{hash}}',
-        input_particles=input_data)
-
-    DTFvtx = DecayTreeFitter(
-        name=f'DTFvtx_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    DTFmassKS = DecayTreeFitter(
-        name=f'DTFmassKS_{{hash}}',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTFvtxmassKS = DecayTreeFitter(
-        name=f'DTFvtxmassKS_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    DTFmassDpKS = DecayTreeFitter(
-        name=f'DTFmassDpKS_{{hash}}',
-        input_particles=input_data,
-        mass_constraints=["D+","KS0"])
-
-    DTFvtxmassDpKS = DecayTreeFitter(
-        name=f'DTFvtxmassDpKS_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D+","KS0"])
-
-    DTFmassDspKS = DecayTreeFitter(
-        name=f'DTFmassDspKS_{{hash}}',
-        input_particles=input_data,
-        substitutions = ['D+{{D_s+}}'],
-        mass_constraints=["D_s+","KS0"])
-
-    DTFvtxmassDspKS = DecayTreeFitter(
-        name=f'DTFvtxmassDspKS_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs,
-        substitutions = ['D+{{D_s+}}',"KS0{{KS0}}"],#trick
-        mass_constraints=["D_s+","KS0"],
-    )
-
-
-    if ptype == "basic":
-        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False,
-                                            islong=islong)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False,
-                                            islong=islong)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassKS,
-                                             pv_constraint=False,
-                                             mass_constraint=True, 
-                                             particle_name="KS",
-                                             islong=islong)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassKS,
-                                             pv_constraint=True,
-                                             mass_constraint=True, 
-                                             particle_name="KS",
-                                             islong=islong)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassDpKS,
-                                             pv_constraint=False,
-                                             mass_constraint=True, 
-                                             particle_name="DpKS",
-                                             islong=islong)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassDpKS,
-                                             pv_constraint=True,
-                                             mass_constraint=True, 
-                                             particle_name="DpKS",
-                                             islong=islong)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassDspKS,
-                                             pv_constraint=False,
-                                             mass_constraint=True, 
-                                             particle_name="DspKS",
-                                             islong=islong)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassDspKS,
-                                             pv_constraint=True,
-                                             mass_constraint=True, 
-                                             particle_name="DspKS",
-                                             islong=islong)
-        return dtf_vars
-
-    if ptype == "composite":
-        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassKS,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="KS")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassKS,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="KS")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassDpKS,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="DpKS")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassDpKS,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="DpKS")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassDspKS,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="DspKS")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassDspKS,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="DspKS")
-        return dtf_vars
-
-
-def maketuple_D2KSK_DD(options, pvs, rec_summary):
-    name = "D2KSK_DD"
-    turbo_line = "Hlt2Charm_DpDspToKsKp_DD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (KS0 -> pi- pi+) K+]CC",
-        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) K+]CC",
-        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) K+]CC",
-        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) K+]CC",
-        "hp" : "[D+ -> (KS0 -> pi- pi+) ^K+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2KSK_LD(options, pvs, rec_summary):
-    name = "D2KSK_LD"
-    turbo_line = "Hlt2Charm_DpDspToKsKp_LD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (KS0 -> pi- pi+) K+]CC",
-        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) K+]CC",
-        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) K+]CC",
-        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) K+]CC",
-        "hp" : "[D+ -> (KS0 -> pi- pi+) ^K+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-
-def maketuple_D2KSK_LL(options, pvs, rec_summary):
-    name = "D2KSK_LL"
-    turbo_line = "Hlt2Charm_DpDspToKsKp_LL"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (KS0 -> pi- pi+) K+]CC",
-        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) K+]CC",
-        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) K+]CC",
-        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) K+]CC",
-        "hp" : "[D+ -> (KS0 -> pi- pi+) ^K+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2KSpi_DD(options, pvs, rec_summary):
-    name = "D2KSpi_DD"
-    turbo_line = "Hlt2Charm_DpDspToKsPip_DD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (KS0 -> pi- pi+) pi+]CC",
-        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) pi+]CC",
-        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) pi+]CC",
-        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) pi+]CC",
-        "hp" : "[D+ -> (KS0 -> pi- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2KSpi_LD(options, pvs, rec_summary):
-    name = "D2KSpi_LD"
-    turbo_line = "Hlt2Charm_DpDspToKsPip_LD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (KS0 -> pi- pi+) pi+]CC",
-        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) pi+]CC",
-        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) pi+]CC",
-        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) pi+]CC",
-        "hp" : "[D+ -> (KS0 -> pi- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2KSpi_LL(options, pvs, rec_summary):
-    name = "D2KSpi_LL"
-    turbo_line = "Hlt2Charm_DpDspToKsPip_LL"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (KS0 -> pi- pi+) pi+]CC",
-        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) pi+]CC",
-        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) pi+]CC",
-        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) pi+]CC",
-        "hp" : "[D+ -> (KS0 -> pi- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
diff --git a/Charm_2024validation/Charm_2024validation/options/d_to_ksh_MC.py b/Charm_2024validation/Charm_2024validation/options/d_to_ksh_MC.py
deleted file mode 100644
index 38a2197998..0000000000
--- a/Charm_2024validation/Charm_2024validation/options/d_to_ksh_MC.py
+++ /dev/null
@@ -1,68 +0,0 @@
-from .tupling import (
-    make_MC_composite_variables,
-    make_MC_basic_variables,
-    make_MC_event_variables,
-)
-
-from PyConf.reading import get_mc_particles, get_mc_header
-from FunTuple import FunTuple_MCParticles as FuntupleMC
-
-def maketuple_MC_D2KSK(options, pvs, rec_summary):
-    name = "MC_D2KSK"
-    line = "/Event/MC/Particles"
-
-    input_data = get_mc_particles(f"{line}")
-
-    branches = {
-        "Dp" : "[D_s+ ==> (KS0 ==> pi- pi+) K+]CC",
-        "KS0"  : "[D_s+ ==> ^(KS0 ==> pi- pi+) K+]CC",
-        "pim"   : "[D_s+ ==> (KS0 ==> ^pi- pi+) K+]CC",
-        "pip"  : "[D_s+ ==> (KS0 ==> pi- ^pi+) K+]CC",
-        "hp" : "[D_s+ ==> (KS0 ==> pi- pi+) ^K+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_MC_composite_variables(),
-        "KS0"    : make_MC_composite_variables(),
-        "pim"     : make_MC_basic_variables(),
-        "pip"    : make_MC_basic_variables(),
-        "hp"   : make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                        tuple_name="MCDecayTree",
-                        fields=branches, variables = variables,
-                        event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
-                        inputs=input_data)
-
-    return [mytuple]
-
-def maketuple_MC_D2KSpi(options, pvs, rec_summary):
-    name = "MC_D2KSpi"
-    line = "/Event/MC/Particles"
-
-    input_data = get_mc_particles(f"{line}")
-
-    branches = {
-        "Dp" : "[D+ ==> (KS0 ==> pi- pi+) pi+]CC",
-        "KS0"  : "[D+ ==> ^(KS0 ==> pi- pi+) pi+]CC",
-        "pim"   : "[D+ ==> (KS0 ==> ^pi- pi+) pi+]CC",
-        "pip"  : "[D+ ==> (KS0 ==> pi- ^pi+) pi+]CC",
-        "hp" : "[D+ ==> (KS0 ==> pi- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_MC_composite_variables(),
-        "KS0"    : make_MC_composite_variables(),
-        "pim"     : make_MC_basic_variables(),
-        "pip"    : make_MC_basic_variables(),
-        "hp"   : make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                        tuple_name="MCDecayTree",
-                        fields=branches, variables = variables,
-                        event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
-                        inputs=input_data)
-
-    return [mytuple]
diff --git a/Charm_2024validation/Charm_2024validation/options/detection_asymmetry.py b/Charm_2024validation/Charm_2024validation/options/detection_asymmetry.py
deleted file mode 100644
index 9769559e87..0000000000
--- a/Charm_2024validation/Charm_2024validation/options/detection_asymmetry.py
+++ /dev/null
@@ -1,191 +0,0 @@
-from .tupling import (
-    make_composite_variables,
-    make_composite_variables_3body,
-    make_basic_variables,
-    make_hlt2_event_variables,
-)
-
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunTuple_Particles as Funtuple
-
-def maketuple_D2Kpipi_ADet(options, pvs, rec_summary):
-    name = "D2Kpipi_ADet"
-    turbo_line = "Hlt2Charm_DpToKmPipPip_ADet"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> K- pi+ pi+]CC",
-        "Km"   : "[D+ -> ^K- pi+ pi+]CC",
-        "pip1"  : "[D+ -> K- ^pi+ pi+]CC",
-        "pip2" : "[D+ -> K- pi+ ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
-        "Km"     : make_basic_variables(options, pvs, input_data),
-        "pip1"    : make_basic_variables(options, pvs, input_data),
-        "pip2"   : make_basic_variables(options, pvs, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2pipipi_ADet(options, pvs, rec_summary):
-    name = "D2pipipi_ADet"
-    turbo_line = "Hlt2Charm_DspToPimPipPip_ADet"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D_s+ -> pi- pi+ pi+]CC",
-        "pim"   : "[D_s+ -> ^pi- pi+ pi+]CC",
-        "pip1"  : "[D_s+ -> pi- ^pi+ pi+]CC",
-        "pip2" : "[D_s+ -> pi- pi+ ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
-        "pim"     : make_basic_variables(options, pvs, input_data),
-        "pip1"    : make_basic_variables(options, pvs, input_data),
-        "pip2"   : make_basic_variables(options, pvs, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Ds2KKpi_ADet(options, pvs, rec_summary):
-    name = "Ds2KKpi_ADet"
-    turbo_line = "Hlt2Charm_DspToKmKpPip_ADet"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D_s+ -> K- K+ pi+]CC",
-        "Km"   : "[D_s+ -> ^K- K+ pi+]CC",
-        "Kp"  : "[D_s+ -> K- ^K+ pi+]CC",
-        "pip" : "[D_s+ -> K- K+ ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
-        "Km"     : make_basic_variables(options, pvs, input_data),
-        "Kp"    : make_basic_variables(options, pvs, input_data),
-        "pip"   : make_basic_variables(options, pvs, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-    
-    return [myfilter, mytuple]
-        
-def maketuple_Lc2KSp_LL_ADet(options, pvs, rec_summary):
-    name = "Lc2KSp_LL_ADet"
-    turbo_line = "Hlt2Charm_LcpToPpKs_LL_ADet"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Lc" : "[Lambda_c+ -> (KS0 -> pi- pi+) p+]CC",
-        "KS0"  : "[Lambda_c+ -> ^(KS0 -> pi- pi+) p+]CC",
-        "pim"   : "[Lambda_c+ -> (KS0 -> ^pi- pi+) p+]CC",
-        "pip"  : "[Lambda_c+ -> (KS0 -> pi- ^pi+) p+]CC",
-        "pp" : "[Lambda_c+ -> (KS0 -> pi- pi+) ^p+]CC",
-    }
-
-    variables = {
-        "Lc"   : make_composite_variables(options, pvs, input_data),
-        "KS0"    : make_composite_variables(options, pvs, input_data),
-        "pim"     : make_basic_variables(options, pvs, input_data),
-        "pip"    : make_basic_variables(options, pvs, input_data),
-        "pp"   : make_basic_variables(options, pvs, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Lc2pKpi_ADet(options, pvs, rec_summary):
-    name = "Lc2pKpi_ADet"
-    turbo_line = "Hlt2Charm_LcpToPpKmPip_ADet"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Lc" : "[Lambda_c+ -> K- pi+ p+]CC",
-        "Km"   : "[Lambda_c+ -> ^K- pi+ p+]CC",
-        "pip"  : "[Lambda_c+ -> K- ^pi+ p+]CC",
-        "pp" : "[Lambda_c+ -> K- pi+ ^p+]CC",
-    }
-
-    variables = {
-        "Lc"   : make_composite_variables_3body(options, pvs, input_data),
-        "Km"     : make_basic_variables(options, pvs, input_data),
-        "pip"    : make_basic_variables(options, pvs, input_data),
-        "pp"   : make_basic_variables(options, pvs, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2KSK_LL_ADet(options, pvs, rec_summary):
-    name = "D2KSK_LL_ADet"
-    turbo_line = "Hlt2Charm_DspToKsKp_LL_ADet"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D_s+ -> (KS0 -> pi- pi+) K+]CC",
-        "KS0"  : "[D_s+ -> ^(KS0 -> pi- pi+) K+]CC",
-        "pim"   : "[D_s+ -> (KS0 -> ^pi- pi+) K+]CC",
-        "pip"  : "[D_s+ -> (KS0 -> pi- ^pi+) K+]CC",
-        "hp" : "[D_s+ -> (KS0 -> pi- pi+) ^K+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data),
-        "KS0"    : make_composite_variables(options, pvs, input_data),
-        "pim"     : make_basic_variables(options, pvs, input_data),
-        "pip"    : make_basic_variables(options, pvs, input_data),
-        "hp"   : make_basic_variables(options, pvs, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2KSpi_LL_ADet(options, pvs, rec_summary):
-    name = "D2KSpi_LL_ADet"
-    turbo_line = "Hlt2Charm_DpToKsPip_LL_ADet"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (KS0 -> pi- pi+) pi+]CC",
-        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) pi+]CC",
-        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) pi+]CC",
-        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) pi+]CC",
-        "hp" : "[D+ -> (KS0 -> pi- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data),
-        "KS0"    : make_composite_variables(options, pvs, input_data),
-        "pim"     : make_basic_variables(options, pvs, input_data),
-        "pip"    : make_basic_variables(options, pvs, input_data),
-        "hp"   : make_basic_variables(options, pvs, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
diff --git a/Charm_2024validation/Charm_2024validation/options/dst_to_dee.py b/Charm_2024validation/Charm_2024validation/options/dst_to_dee.py
deleted file mode 100644
index 11f42bae95..0000000000
--- a/Charm_2024validation/Charm_2024validation/options/dst_to_dee.py
+++ /dev/null
@@ -1,296 +0,0 @@
-import Functors as F
-from Functors.math import log
-from DaVinci import Options, make_config
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunctorCollection
-from PyConf.reading import get_particles, get_pvs
-import FunTuple.functorcollections as FC
-from FunTuple import FunTuple_Particles as Funtuple
-from DecayTreeFitter import DecayTreeFitter
-from Hlt2Conf.lines.charm.dst_to_dee_makers import (dst_BDT_functor)
-from .tupling import (
-    make_DeltaM_variable,
-    make_basic_variables,
-    make_composite_variables,
-    make_composite_variables_3body,
-    make_composite_variables_4body,
-    make_hlt2_event_variables,
-    make_basic_dtf_variables,
-    make_composite_dtf_variables,
-    make_composite_dtf_variables_3body,
-    make_composite_dtf_variables_4body,
-    Hlt1_lines
-)
-extra_brem_variables= (FunctorCollection(
-            {
-                "BREMHYPODELTAX": F.BREMHYPODELTAX,
-                "BREMHYPOENERGY": F.BREMHYPOENERGY,
-                "BREMHYPOID": F.BREMHYPOID,
-                "BREMHYPOMATCH_CHI2": F.BREMHYPOMATCH_CHI2,
-                "BREMPIDE": F.BREMPIDE,
-                "INBREM": F.INBREM,
-                "MASS_WITH_BREM": F.MASS_WITH_BREM,
-                "PT_WITH_BREM": F.PT_WITH_BREM,
-                "P_WITH_BREM": F.P_WITH_BREM,
-                "ECALPIDE": F.ECALPIDE,
-                "HCALPIDE": F.HCALPIDE,
-                "ELECTRONSHOWEREOP": F.ELECTRONSHOWEREOP,
-                "CLUSTERMATCH_CHI2": F.CLUSTERMATCH_CHI2,
-                "ELECTRONMATCH_CHI2": F.ELECTRONMATCH_CHI2,
-                "ELECTRONENERGY": F.ELECTRONENERGY,
-                "ELECTRONID": F.ELECTRONID,
-                "HCALEOP": F.HCALEOP,
-                "CALO_NEUTRAL_SHOWER_SHAPE": F.CALO_NEUTRAL_SHOWER_SHAPE,
-                "RICH_DLL_E": F.VALUE_OR(F.NaN)@F.RICH_DLL_E,
-            })
-    )
-
-decay_descriptor = {
-    'dst_kpi_os' : {
-        "Dst0":   "[ D*(2007)0 ->  (D0 ->  K-  pi+)  (gamma ->  e+  e-)]CC",
-        "D0":     "[ D*(2007)0 -> ^(D0 ->  K-  pi+)  (gamma ->  e+  e-)]CC",
-        "Kminus": "[ D*(2007)0 ->  (D0 -> ^K-  pi+)  (gamma ->  e+  e-)]CC",
-        "piplus": "[ D*(2007)0 ->  (D0 ->  K- ^pi+)  (gamma ->  e+  e-)]CC",
-        "gamma":  "[ D*(2007)0 ->  (D0 ->  K-  pi+) ^(gamma ->  e+  e-)]CC",
-        "eplus":  "[ D*(2007)0 ->  (D0 ->  K-  pi+)  (gamma -> ^e+  e-)]CC",
-        "eminus": "[ D*(2007)0 ->  (D0 ->  K-  pi+)  (gamma ->  e+ ^e-)]CC",
-    },
-
-    'dst_kpi_ss' : {
-        "Dst0":   "[ D*(2007)0 ->  (D0 ->  K-  pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "D0":     "[ D*(2007)0 -> ^(D0 ->  K-  pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "Kminus": "[ D*(2007)0 ->  (D0 -> ^K-  pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "piplus": "[ D*(2007)0 ->  (D0 ->  K- ^pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "gamma":  "[ D*(2007)0 ->  (D0 ->  K-  pi+) ^([gamma ->  e+  e+]CC)]CC",
-        "eplus":  "[ D*(2007)0 ->  (D0 ->  K-  pi+)  ([gamma -> ^e+  e+]CC)]CC",
-        "eminus": "[ D*(2007)0 ->  (D0 ->  K-  pi+)  ([gamma ->  e+ ^e+]CC)]CC",
-    },
-
-    'dst_k3pi_os' :  {
-        "Dst0":    "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)  (gamma ->  e+  e-)]CC",
-        "D0":      "[ D*(2007)0 -> ^(D0 -> K- pi- pi+ pi+)  (gamma ->  e+  e-)]CC",
-        "Kminus":  "[ D*(2007)0 ->  (D0 -> ^K- pi- pi+ pi+) (gamma ->  e+  e-)]CC",
-        "piminus": "[ D*(2007)0 ->  (D0 -> K- ^pi- pi+ pi+) (gamma ->  e+  e-)]CC",
-        "piplus1": "[ D*(2007)0 ->  (D0 -> K- pi- ^pi+ pi+) (gamma ->  e+  e-)]CC",
-        "piplus2": "[ D*(2007)0 ->  (D0 -> K- pi- pi+ ^pi+) (gamma ->  e+  e-)]CC",
-        "gamma":   "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+) ^(gamma ->  e+  e-)]CC",
-        "eplus":   "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)  (gamma -> ^e+  e-)]CC",
-        "eminus":  "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)  (gamma ->  e+ ^e-)]CC",
-    },
-
-    'dst_k3pi_ss' :  {
-        "Dst0":    "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)   ([gamma ->  e+  e+]CC)]CC",
-        "D0":      "[ D*(2007)0 -> ^(D0 -> K- pi- pi+ pi+)   ([gamma ->  e+  e+]CC)]CC",
-        "Kminus":  "[ D*(2007)0 ->  (D0 -> ^K- pi- pi+ pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "piminus": "[ D*(2007)0 ->  (D0 -> K- ^pi- pi+ pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "piplus1": "[ D*(2007)0 ->  (D0 -> K- pi- ^pi+ pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "piplus2": "[ D*(2007)0 ->  (D0 -> K- pi- pi+ ^pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "gamma":   "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)  ^([gamma ->  e+  e+]CC)]CC",
-        "eplus":   "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)   ([gamma -> ^e+  e+]CC)]CC",
-        "eminus":  "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)   ([gamma ->  e+ ^e+]CC)]CC",
-    },
-
-    'dsstp_2kpi_os' : {
-        "Dstp":   "[ D*_s+ ->  (D_s+ -> K- K+ pi+)  (gamma ->  e+  e-)]CC",
-        "DpDs":   "[ D*_s+ -> ^(D_s+ -> K- K+ pi+)  (gamma ->  e+  e-)]CC",
-        "Kminus": "[ D*_s+ ->  (D_s+ -> ^K- K+ pi+) (gamma ->  e+  e-)]CC",
-        "Kplus":  "[ D*_s+ ->  (D_s+ -> K- ^K+ pi+) (gamma ->  e+  e-)]CC",
-        "piplus": "[ D*_s+ ->  (D_s+ -> K- K+ ^pi+) (gamma ->  e+  e-)]CC",
-        "gamma":  "[ D*_s+ ->  (D_s+ -> K- K+ pi+) ^(gamma ->  e+  e-)]CC",
-        "eplus":  "[ D*_s+ ->  (D_s+ -> K- K+ pi+)  (gamma -> ^e+  e-)]CC",
-        "eminus": "[ D*_s+ ->  (D_s+ -> K- K+ pi+)  (gamma ->  e+ ^e-)]CC",
-    },
-    'dsstp_2kpi_ss' : {
-        "Dstp":   "[ D*_s+ ->  (D_s+ -> K- K+ pi+)   ([gamma ->  e+  e+]CC)]CC",
-        "DpDs":   "[ D*_s+ -> ^(D_s+ -> K- K+ pi+)   ([gamma ->  e+  e+]CC)]CC",
-        "Kminus": "[ D*_s+ ->  (D_s+ -> ^K- K+ pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "Kplus":  "[ D*_s+ ->  (D_s+ -> K- ^K+ pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "piplus": "[ D*_s+ ->  (D_s+ -> K- K+ ^pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "gamma":  "[ D*_s+ ->  (D_s+ -> K- K+ pi+)  ^([gamma ->  e+  e+]CC)]CC",
-        "eplus":  "[ D*_s+ ->  (D_s+ -> K- K+ pi+)   ([gamma -> ^e+  e+]CC)]CC",
-        "eminus": "[ D*_s+ ->  (D_s+ -> K- K+ pi+)   ([gamma ->  e+ ^e+]CC)]CC",
-    },
-
-}
-
-def MVA_dst_variables(line, pvs):
-    return (FunctorCollection( { "MVA": dst_BDT_functor(pvs, line=line)}))
-#make_dtf_variables(options,  input_data, ptype):
-def make_dtf_variables(options, input_data,  pvs, ptype="basic",  mass_constrain = ["D*(2007)0", "D0" ], nparticles=2):
-    
-    DTF = DecayTreeFitter(
-        name="DTF_{hash}",
-        input_particles=input_data,
-    )
-
-    DTF_DMass_BestPV = DecayTreeFitter(
-        name="DTF_DMass_BestPV_{hash}",
-        input_particles=input_data,
-        mass_constraints=mass_constrain,
-        input_pvs=pvs,
-        fit_all_pvs=False,
-    )
-    DTF_Mass_BestPV = DecayTreeFitter(
-        name="DTF_Mass_BestPV_{hash}",
-        input_particles=input_data,
-        mass_constraints=[mass_constrain[1]],
-        input_pvs=pvs,
-        fit_all_pvs=False,
-    )
-
-    DTF_BestPV = DecayTreeFitter(
-        name="DTF_BestPV_{hash}",
-        input_particles=input_data,
-        #mass_constraints=["D*(2007)0", "D0" ],
-        input_pvs=pvs,
-        fit_all_pvs=False,
-    )
-
-    DTF_DMass = DecayTreeFitter(
-        name="DTF_DMass_{hash}",
-        input_particles=input_data,
-        mass_constraints=mass_constrain,
-        output_level=3,
-    )
-    DTF_Mass = DecayTreeFitter(
-        name="DTF_Mass_{hash}",
-        input_particles=input_data,
-        mass_constraints=[mass_constrain[1]],
-        output_level=3,
-    )
-    
-    if ptype == "basic":
-        dtf_variables =  make_basic_dtf_variables
-    elif ptype == "composite":
-        if nparticles == 2:
-            dtf_variables = make_composite_dtf_variables 
-        elif nparticles == 3:
-            dtf_variables = make_composite_dtf_variables_3body
-        elif nparticles == 4:
-            dtf_variables = make_composite_dtf_variables_4body 
-
-    dtf_vars = dtf_variables(options, pvs, input_data,
-                                        DTF=DTF,
-                                        pv_constraint=False,
-                                        mass_constraint=False)
-    dtf_vars += dtf_variables(options, pvs, input_data,
-                                        DTF=DTF_BestPV,
-                                        pv_constraint=True,
-                                        mass_constraint=False)
-    dtf_vars += dtf_variables(options, pvs, input_data,
-                                        DTF=DTF_Mass,
-                                        pv_constraint=False,
-                                        mass_constraint=True, particle_name="D")
-    dtf_vars += dtf_variables(options, pvs, input_data,
-                                        DTF=DTF_Mass_BestPV,
-                                        pv_constraint=True,
-                                        mass_constraint=True, particle_name="D")
-    dtf_vars += dtf_variables(options, pvs, input_data,
-                                        DTF=DTF_DMass,
-                                        pv_constraint=False,
-                                        mass_constraint=True, particle_name="DstD")
-    dtf_vars += dtf_variables(options, pvs, input_data,
-                                        DTF=DTF_DMass_BestPV,
-                                        pv_constraint=True,
-                                        mass_constraint=True, particle_name="DstD")
-
-    return dtf_vars
-
-
-def make_Dst0ToD0EmEp_D0ToKmPip_tuple(options, line, pvs , rec_summary, dd='dst_kpi_os'):
-
-    input_data=get_particles(f"/Event/HLT2/{line}/Particles")
-    my_filter = create_lines_filter(f"LineFilter_{line}_{{hash}}",[line],)
-
-    fields = decay_descriptor[dd]
-    
-    composite_tuple_variables = {
-        "Dst0"   :  make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs,  "composite") +\
-             MVA_dst_variables("Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip", pvs) + make_DeltaM_variable(options), 
-        "D0"     :  make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs,  "composite"),
-        "gamma"  :  make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs,  "composite")
-    }
-    basic_tuple_variables = { 
-        "Kminus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"),
-        "piplus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"),
-        "eplus"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic") + extra_brem_variables,
-        "eminus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic") + extra_brem_variables,
-    }
-
-    my_tuple = Funtuple(
-        name=f"Tuple_{line}_{dd}",
-        tuple_name="DecayTree",
-        fields=fields,
-        variables= {**composite_tuple_variables, **basic_tuple_variables},
-        event_variables=make_hlt2_event_variables(options, pvs, rec_summary), 
-        inputs=input_data,
-        store_multiple_cand_info=True
-    )
-    return [ my_filter, my_tuple]
-
-def make_Dst0ToD0EmEp_D0ToKmPimPipPip_tuple(options, line, pvs, rec_summary, dd='dst_k3pi_os'):
-
-    input_data=get_particles(f"/Event/HLT2/{line}/Particles")
-    my_filter = create_lines_filter(f"LineFilter_{line}_{{hash}}",[line],)
-
-    fields = decay_descriptor[dd]
-    
-    composite_tuple_variables = {
-        "Dst0"   : make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs, "composite") +\
-             MVA_dst_variables("Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip", pvs) + make_DeltaM_variable(options), 
-        "D0"     : make_composite_variables_4body(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs, "composite", nparticles=4),
-        "gamma"  : make_composite_variables(options, pvs, input_data) 
-    }
-    basic_tuple_variables = { 
-        "Kminus"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"),
-        "piminus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"),
-        "piplus1" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"),
-        "piplus2" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"), 
-        "eplus"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic") + extra_brem_variables,
-        "eminus"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic") + extra_brem_variables,
-    }
-
-    my_tuple = Funtuple(
-        name=f"Tuple_{line}_{dd}",
-        tuple_name="DecayTree",
-        fields=fields,
-        variables= {**composite_tuple_variables, **basic_tuple_variables},
-        event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data,
-        store_multiple_cand_info=True
-    )
-    return [ my_filter, my_tuple]
-
-
-def make_DstpToDpDspEmEp_DpDspToKmKpPip_tuple(options, line, pvs , rec_summary, dd='dsstp_2kpi_os'):
-
-    input_data=get_particles(f"/Event/HLT2/{line}/Particles")
-    my_filter = create_lines_filter(f"LineFilter_{line}_{{hash}}",[line],)
-
-    fields = decay_descriptor[dd]
-
-    composite_tuple_variables = {
-        "Dstp"   : make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs, "composite", mass_constrain = ["D*_s+", "D_s+"]) +\
-             MVA_dst_variables("Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip", pvs) + make_DeltaM_variable(options), 
-        "DpDs"   : make_composite_variables_3body(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs, "composite", mass_constrain = ["D*_s+", "D_s+"], nparticles=3),
-        "gamma"  : make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs, "composite", mass_constrain = ["D*_s+", "D_s+"]),
-    }
-    basic_tuple_variables = { 
-        "Kminus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic",  mass_constrain = ["D*_s+", "D_s+"]),
-        "Kplus"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic",  mass_constrain = ["D*_s+", "D_s+"]),
-        "piplus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic",  mass_constrain = ["D*_s+", "D_s+"]),
-        "eplus"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic",  mass_constrain = ["D*_s+", "D_s+"])+ extra_brem_variables,
-        "eminus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic",  mass_constrain = ["D*_s+", "D_s+"])+ extra_brem_variables,
-    }
-
-    my_tuple = Funtuple(
-        name=f"Tuple_{line}_{dd}",
-        tuple_name="DecayTree",
-        fields=fields,
-        variables= {**composite_tuple_variables, **basic_tuple_variables},
-        event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data,
-        store_multiple_cand_info=True
-    )
-    return [ my_filter, my_tuple]
diff --git a/Charm_2024validation/Charm_2024validation/options/hlt1.py b/Charm_2024validation/Charm_2024validation/options/hlt1.py
deleted file mode 100644
index b93aeb113c..0000000000
--- a/Charm_2024validation/Charm_2024validation/options/hlt1.py
+++ /dev/null
@@ -1,33 +0,0 @@
-###############################################################################
-# (c) Copyright 2023 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.                                       #
-###############################################################################
-"""
-Configures running HLT1 via Moore.
-"""
-
-from Moore import Options
-from Moore.config import allen_control_flow
-from RecoConf.hlt1_allen import allen_gaudi_config, get_allen_line_names
-from AllenConf.hlt1_calibration_lines import make_passthrough_line
-from PyConf.application import configure_input, configure
-
-def alg_config(options: Options):
-    """
-    Configures algorithm running of HLT1 via Moore to be passed to Analysis Productions.
-    """
-
-    config = configure_input(options)
-    with allen_gaudi_config.bind(sequence="hlt1_pp_matching_no_ut_1000KHz"), make_passthrough_line.bind(pre_scaler=1):
-        line_names = get_allen_line_names()
-        allen_node = allen_control_flow(options)
-        config.update(configure(options, allen_node))
-
-    return config
-
diff --git a/Charm_2024validation/Charm_2024validation/options/hlt2/d0_to_hh.py b/Charm_2024validation/Charm_2024validation/options/hlt2/d0_to_hh.py
deleted file mode 100644
index 3c0b0d0086..0000000000
--- a/Charm_2024validation/Charm_2024validation/options/hlt2/d0_to_hh.py
+++ /dev/null
@@ -1,9 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_hh import all_lines as hh_lines
-
-def make_lines():
-    mylines = [builder() for builder in hh_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-
diff --git a/Charm_2024validation/Charm_2024validation/options/hlt2/d0_to_hhhh.py b/Charm_2024validation/Charm_2024validation/options/hlt2/d0_to_hhhh.py
deleted file mode 100644
index 81fe4dce30..0000000000
--- a/Charm_2024validation/Charm_2024validation/options/hlt2/d0_to_hhhh.py
+++ /dev/null
@@ -1,8 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_hhhh import all_lines as hhhh_lines
-
-def make_lines():
-    mylines = [builder() for builder in hhhh_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
diff --git a/Charm_2024validation/Charm_2024validation/options/hlt2/d0_to_hhpi0.py b/Charm_2024validation/Charm_2024validation/options/hlt2/d0_to_hhpi0.py
deleted file mode 100644
index 52f8433c11..0000000000
--- a/Charm_2024validation/Charm_2024validation/options/hlt2/d0_to_hhpi0.py
+++ /dev/null
@@ -1,8 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_hhpi0 import all_lines as hhpi0_lines
-
-def make_lines():
-    mylines = [builder() for builder in hhpi0_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
diff --git a/Charm_2024validation/Charm_2024validation/options/hlt2/d0_to_kshh.py b/Charm_2024validation/Charm_2024validation/options/hlt2/d0_to_kshh.py
deleted file mode 100644
index 79df310ed8..0000000000
--- a/Charm_2024validation/Charm_2024validation/options/hlt2/d0_to_kshh.py
+++ /dev/null
@@ -1,8 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_kshh import all_lines as kshh_lines
-
-def make_lines():
-    mylines = [builder() for builder in kshh_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
diff --git a/Charm_2024validation/Charm_2024validation/options/hlt2/d0_to_ksks.py b/Charm_2024validation/Charm_2024validation/options/hlt2/d0_to_ksks.py
deleted file mode 100644
index 71ab403fd9..0000000000
--- a/Charm_2024validation/Charm_2024validation/options/hlt2/d0_to_ksks.py
+++ /dev/null
@@ -1,8 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_ksks import all_lines as ksks_lines
-
-def make_lines():
-    mylines = [builder() for builder in ksks_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
diff --git a/Charm_2024validation/Charm_2024validation/options/hlt2/d_to_hhh.py b/Charm_2024validation/Charm_2024validation/options/hlt2/d_to_hhh.py
deleted file mode 100644
index cd718f9b86..0000000000
--- a/Charm_2024validation/Charm_2024validation/options/hlt2/d_to_hhh.py
+++ /dev/null
@@ -1,10 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d_to_hhh import all_lines as hhh_lines
-from Hlt2Conf.lines.charm.detection_asymmetry_lines import all_lines as det_asy_lines
-
-def make_lines():
-    mylines = [builder() for builder in hhh_lines.values()]
-    mylines += [builder() for builder in det_asy_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
diff --git a/Charm_2024validation/Charm_2024validation/options/hlt2/d_to_ksh.py b/Charm_2024validation/Charm_2024validation/options/hlt2/d_to_ksh.py
deleted file mode 100644
index 8c8b172dd0..0000000000
--- a/Charm_2024validation/Charm_2024validation/options/hlt2/d_to_ksh.py
+++ /dev/null
@@ -1,10 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d_to_ksh import all_lines as ksh_lines
-from Hlt2Conf.lines.charm.detection_asymmetry_lines import all_lines as det_asy_lines
-
-def make_lines():
-    mylines = [builder() for builder in ksh_lines.values()]
-    mylines += [builder() for builder in det_asy_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
diff --git a/Charm_2024validation/Charm_2024validation/options/hlt2/dst_to_dee.py b/Charm_2024validation/Charm_2024validation/options/hlt2/dst_to_dee.py
deleted file mode 100644
index 4fd67becd7..0000000000
--- a/Charm_2024validation/Charm_2024validation/options/hlt2/dst_to_dee.py
+++ /dev/null
@@ -1,9 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.dst_to_dee import all_lines as dst_to_dee_lines
-
-def make_lines():
-    mylines = [builder() for builder in dst_to_dee_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-
diff --git a/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2.py b/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2.py
deleted file mode 100644
index c1560ce952..0000000000
--- a/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2.py
+++ /dev/null
@@ -1,32 +0,0 @@
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_d0_to_hh.py b/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_d0_to_hh.py
deleted file mode 100644
index 7c3a67ed03..0000000000
--- a/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_d0_to_hh.py
+++ /dev/null
@@ -1,41 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_hh import all_lines as hh_lines
-
-def make_lines():
-    mylines = [builder() for builder in hh_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_d0_to_hhhh.py b/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_d0_to_hhhh.py
deleted file mode 100644
index d7d5dcbb90..0000000000
--- a/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_d0_to_hhhh.py
+++ /dev/null
@@ -1,40 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_hhhh import all_lines as hhhh_lines
-
-def make_lines():
-    mylines = [builder() for builder in hhhh_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_d0_to_hhpi0.py b/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_d0_to_hhpi0.py
deleted file mode 100644
index 063eeb274a..0000000000
--- a/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_d0_to_hhpi0.py
+++ /dev/null
@@ -1,40 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_hhpi0 import all_lines as hhpi0_lines
-
-def make_lines():
-    mylines = [builder() for builder in hhpi0_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_d0_to_kshh.py b/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_d0_to_kshh.py
deleted file mode 100644
index 3e1996cdf0..0000000000
--- a/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_d0_to_kshh.py
+++ /dev/null
@@ -1,40 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_kshh import all_lines as kshh_lines
-
-def make_lines():
-    mylines = [builder() for builder in kshh_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_d0_to_ksks.py b/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_d0_to_ksks.py
deleted file mode 100644
index e8d1052803..0000000000
--- a/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_d0_to_ksks.py
+++ /dev/null
@@ -1,40 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_ksks import all_lines as ksks_lines
-
-def make_lines():
-    mylines = [builder() for builder in ksks_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_d_to_hhh.py b/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_d_to_hhh.py
deleted file mode 100644
index 97965cb96e..0000000000
--- a/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_d_to_hhh.py
+++ /dev/null
@@ -1,42 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d_to_hhh import all_lines as hhh_lines
-from Hlt2Conf.lines.charm.detection_asymmetry_lines import all_lines as det_asy_lines
-
-def make_lines():
-    mylines = [builder() for builder in hhh_lines.values()]
-    mylines += [builder() for builder in det_asy_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_d_to_ksh.py b/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_d_to_ksh.py
deleted file mode 100644
index d2593da6a9..0000000000
--- a/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_d_to_ksh.py
+++ /dev/null
@@ -1,42 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d_to_ksh import all_lines as ksh_lines
-from Hlt2Conf.lines.charm.detection_asymmetry_lines import all_lines as det_asy_lines
-
-def make_lines():
-    mylines = [builder() for builder in ksh_lines.values()]
-    mylines += [builder() for builder in det_asy_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_dst_to_dee.py b/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_dst_to_dee.py
deleted file mode 100644
index d43ecbcd65..0000000000
--- a/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_dst_to_dee.py
+++ /dev/null
@@ -1,41 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.dst_to_dee import all_lines as dst_to_dee_lines
-
-def make_lines():
-    mylines = [builder() for builder in dst_to_dee_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_rare_charm.py b/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_rare_charm.py
deleted file mode 100644
index cb9ac88a02..0000000000
--- a/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2_rare_charm.py
+++ /dev/null
@@ -1,40 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.rare_charm_lines import all_lines as rare_charm_lines
-
-def make_lines():
-    mylines = [builder() for builder in rare_charm_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2noUT.py b/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2noUT.py
deleted file mode 100644
index 473127434b..0000000000
--- a/Charm_2024validation/Charm_2024validation/options/hlt2/hlt2noUT.py
+++ /dev/null
@@ -1,32 +0,0 @@
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf_without_UT
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf_without_UT),\
-         require_gec.bind(skipUT=True),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/Charm_2024validation/options/hlt2/make_hlt2_decay.sh b/Charm_2024validation/Charm_2024validation/options/hlt2/make_hlt2_decay.sh
deleted file mode 100644
index f127b86285..0000000000
--- a/Charm_2024validation/Charm_2024validation/options/hlt2/make_hlt2_decay.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-cat d0_to_hh.py hlt2.py > hlt2_d0_to_hh.py
-cat d0_to_hhpi0.py hlt2.py > hlt2_d0_to_hhpi0.py
-cat d0_to_hhhh.py hlt2.py > hlt2_d0_to_hhhh.py
-cat d0_to_kshh.py hlt2.py > hlt2_d0_to_kshh.py
-cat d0_to_ksks.py hlt2.py > hlt2_d0_to_ksks.py
-cat d_to_hhh.py hlt2.py > hlt2_d_to_hhh.py
-cat d_to_ksh.py hlt2.py > hlt2_d_to_ksh.py
-cat rare_charm.py hlt2.py > hlt2_rare_charm.py
-cat dst_to_dee.py hlt2.py > hlt2_dst_to_dee.py
diff --git a/Charm_2024validation/Charm_2024validation/options/hlt2/rare_charm.py b/Charm_2024validation/Charm_2024validation/options/hlt2/rare_charm.py
deleted file mode 100644
index 39194555f0..0000000000
--- a/Charm_2024validation/Charm_2024validation/options/hlt2/rare_charm.py
+++ /dev/null
@@ -1,8 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.rare_charm_lines import all_lines as rare_charm_lines
-
-def make_lines():
-    mylines = [builder() for builder in rare_charm_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
diff --git a/Charm_2024validation/Charm_2024validation/options/rare_charm.py b/Charm_2024validation/Charm_2024validation/options/rare_charm.py
deleted file mode 100644
index d4d4a5d83d..0000000000
--- a/Charm_2024validation/Charm_2024validation/options/rare_charm.py
+++ /dev/null
@@ -1,496 +0,0 @@
-from .tupling import (
-    make_composite_variables,
-    make_composite_variables_3body,
-    make_DeltaM_variable,
-    make_basic_variables,
-    make_hlt2_event_variables,
-    make_top_isolation_variables,
-    make_basic_isolation_variables,
-    make_intermediate_isolation_variables,
-    make_composite_dtf_variables,
-    make_composite_dtf_variables_3body,
-    make_basic_dtf_variables,
-)
-
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunTuple_Particles as Funtuple
-
-def make_dtf_variables_hmumu(options, pvs, input_data, ptype):
-
-    if ptype not in ["basic", "composite"]:
-        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
-
-    from DecayTreeFitter import DecayTreeFitter
-    
-    DTF = DecayTreeFitter(
-        name=f'DTF_{{hash}}',
-        input_particles=input_data)
-
-    DTFvtx = DecayTreeFitter(
-        name=f'DTFvtx_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    DTFmassDp = DecayTreeFitter(
-        name=f'DTFmassDp_{{hash}}',
-        input_particles=input_data,
-        mass_constraints=["D+"])
-
-    DTFvtxmassDp = DecayTreeFitter(
-        name=f'DTFvtxmassDp_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D+"])
-
-    DTFmassDsp = DecayTreeFitter(
-        name=f'DTFmassDsp_{{hash}}',
-        input_particles=input_data,
-        substitutions = ['D+{{D_s+}}'],
-        mass_constraints=["D_s+"])
-
-    DTFvtxmassDsp = DecayTreeFitter(
-        name=f'DTFvtxmassDsp_{{hash}}',
-        input_particles=input_data,
-        substitutions = ['D+{{D_s+}}',"J/psi(1S){{J/psi(1S)}}"],#trick
-        mass_constraints=["D_s+"],
-        input_pvs=pvs,
-    )
-
-    if ptype == "basic":
-        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassDp,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="Dp")
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassDp,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="Dp")
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassDsp,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="Dsp")
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassDsp,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="Dsp")
-        return dtf_vars
-
-    if ptype == "composite":
-        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassDp,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="Dp")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassDp,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="Dp")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassDsp,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="Dsp")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassDsp,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="Dsp")
-        return dtf_vars
-
-
-def make_dtf_variables_pmumu(options, pvs, input_data, ptype):
-
-    if ptype not in ["basic", "composite"]:
-        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
-
-    from DecayTreeFitter import DecayTreeFitter
-    
-    DTF = DecayTreeFitter(
-        name=f'DTF_{{hash}}',
-        input_particles=input_data)
-
-    DTFvtx = DecayTreeFitter(
-        name=f'DTFvtx_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    DTFmass = DecayTreeFitter(
-        name=f'DTFmass_{{hash}}',
-        input_particles=input_data,
-        mass_constraints=["Lambda_c+"])
-
-    DTFvtxmass = DecayTreeFitter(
-        name=f'DTFvtxmass_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["Lambda_c+"])
-
-    if ptype == "basic":
-        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmass,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="Lc")
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmass,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="Lc")
-        return dtf_vars
-
-    if ptype == "composite":
-        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmass,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="D0")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmass,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="D0")
-        return dtf_vars
-
-def make_dtf_variables_hhmumu(options, pvs, input_data, ptype):
-
-    if ptype not in ["basic", "composite","composite3b"]:
-        Exception(f"I want \'basic\' or \'composite\' or \'composite3b\. Got {ptype}")
-
-    from DecayTreeFitter import DecayTreeFitter
-    
-    DTF = DecayTreeFitter(
-        name=f'DTF_{{hash}}',
-        input_particles=input_data)
-
-    DTFvtx = DecayTreeFitter(
-        name=f'DTFvtx_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    DTFmass = DecayTreeFitter(
-        name=f'DTFmass_{{hash}}',
-        input_particles=input_data,
-        mass_constraints=["D0"])
-
-    DTFvtxmass = DecayTreeFitter(
-        name=f'DTFvtxmass_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0"])
-
-    if ptype == "basic":
-        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmass,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="D0")
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmass,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="D0")
-        return dtf_vars
-
-    if ptype == "composite3b":
-        dtf_vars = make_composite_dtf_variables_3body(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
-                                             DTF=DTFmass,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="D0")
-        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
-                                             DTF=DTFvtxmass,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="D0")
-
-        return dtf_vars
-        
-    if ptype == "composite":
-        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmass,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="D0")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmass,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="D0")
-        return dtf_vars
-
-
-def maketuple_D2pimumu(options, pvs, rec_summary):
-    name = "D2pimumu"
-    turbo_line = "Hlt2Charm_DpDspToPipMumMup"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (J/psi(1S) -> mu- mu+) pi+]CC",
-        "Jpsi" : "[D+ -> ^(J/psi(1S) -> mu- mu+) pi+]CC",
-        "lm"   : "[D+ -> (J/psi(1S) -> ^mu- mu+) pi+]CC",
-        "lp"   : "[D+ -> (J/psi(1S) -> mu- ^mu+) pi+]CC",
-        "hp" : "[D+ -> (J/psi(1S) -> mu- mu+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
-        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation: 
-
-        variables = {
-            "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-            "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2pimumu_WS(options, pvs, rec_summary):
-    name = "D2pimumu_WS"
-    turbo_line = "Hlt2Charm_DpDspToPipMupMup_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (J/psi(1S) -> mu+ mu+) pi+]CC",
-        "Jpsi" : "[D+ -> (J/psi(1S) -> mu+ mu+) pi+]CC",
-        "lp1"   : "[D+ -> (J/psi(1S) -> ^mu+ mu+) pi+]CC",
-        "lp2"   : "[D+ -> (J/psi(1S) -> mu+ ^mu+) pi+]CC",
-        "hp" : "[D+ -> (J/psi(1S) -> mu+ mu+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
-        "lp1"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-        "lp2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation: 
-
-        variables = {
-            "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-            "lp1"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "lp2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2pipipi(options, pvs, rec_summary):
-    name = "CharmRD_D2pipipi"
-    turbo_line = "Hlt2Charm_DpDspToPipPimPip_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (J/psi(1S) -> pi- pi+) pi+]CC",
-        "Jpsi" : "[D+ -> (J/psi(1S) -> pi- pi+) pi+]CC",
-        "lm"   : "[D+ -> (J/psi(1S) -> ^pi- pi+) pi+]CC",
-        "lp"   : "[D+ -> (J/psi(1S) -> pi- ^pi+) pi+]CC",
-        "hp" : "[D+ -> (J/psi(1S) -> pi- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
-        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation: 
-
-        variables = {
-            "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-            "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2piee(options, pvs, rec_summary):
-    name = "D2piee"
-    turbo_line = "Hlt2Charm_DpDspToPipEmEp"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (J/psi(1S) -> e- e+) pi+]CC",
-        "Jpsi" : "[D+ -> ^(J/psi(1S) -> e- e+) pi+]CC",
-        "lm"   : "[D+ -> (J/psi(1S) -> ^e- e+) pi+]CC",
-        "lp"   : "[D+ -> (J/psi(1S) -> e- ^e+) pi+]CC",
-        "hp" : "[D+ -> (J/psi(1S) -> e- e+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
-        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation: 
-
-        variables = {
-            "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-            "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Lc2pmumu(options, pvs, rec_summary):
-    name = "Lc2pmumu"
-    turbo_line = "Hlt2Charm_LcpToPpMumMup"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Lc" : "[Lambda_c+ -> (J/psi(1S) -> mu- mu+) p+]CC",
-        "Jpsi" : "[Lambda_c+ -> ^(J/psi(1S) -> mu- mu+) p+]CC",
-        "lm"   : "[Lambda_c+ -> (J/psi(1S) -> ^mu- mu+) p+]CC",
-        "lp"  : "[Lambda_c+ -> (J/psi(1S) -> mu- ^mu+) p+]CC",
-        "pp" : "[Lambda_c+ -> (J/psi(1S) -> mu- mu+) ^p+]CC",
-    }
-
-    variables = {
-        "Lc"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "pp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation: 
-
-        variables = {
-            "Lc"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-            "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "pp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02Kpimumu_RS(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02Kpimumu_RS"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPipMumMup"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^(D0 -> K- pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
-        "Km"   : "[D*(2010)+ -> (D0 -> ^K- pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
-        "pip"  : "[D*(2010)+ -> (D0 -> K- ^pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
-        "Jpsi"  : "[D*(2010)+ -> (D0 -> K- pi+ ^(J/psi(1S) -> mu- mu+)) pi+]CC",
-        "lm"  : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> ^mu- mu+)) pi+]CC",
-        "lp"  : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> mu- ^mu+)) pi+]CC",
-        "spip" : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> mu- mu+)) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite"),
-        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation: 
-
-        variables = {
-            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
-            "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
-            "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-            "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
diff --git a/Charm_2024validation/Charm_2024validation/options/tupling.py b/Charm_2024validation/Charm_2024validation/options/tupling.py
deleted file mode 100644
index 99de572726..0000000000
--- a/Charm_2024validation/Charm_2024validation/options/tupling.py
+++ /dev/null
@@ -1,986 +0,0 @@
-##############################################################################
-# (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.                                       #
-###############################################################################
-"""Common configuration functions
-
-"""
-
-import Functors as F
-from Functors.math import log
-import Functors.math as fmath
-
-from FunTuple import FunctorCollection
-from FunTuple.functorcollections import (
-    MCHierarchy,
-    MCPromptDecay,
-    Kinematics,
-    SelectionInfo,
-    HltTisTos,
-    MCVertexInfo,
-    MCKinematics,
-    ParticleID, #wrong variables PID_PI = 0, PROBNN_D = nan
-    EventInfo,
-    LHCInfo,
-    ParticleIsolation,
-    MCPrimaries,
-    MCReconstructed,
-    MCReconstructible,
-)
-
-from DaVinciMCTools import MCTruthAndBkgCat, MCReconstructed, MCReconstructible
-from PyConf.Algorithms import ParticleToSubcombinationsAlg
-from DecayTreeFitter import DecayTreeFitter
-
-Hlt1_global_lines = [
-    "Hlt1GECPassthroughDecision",
-    "Hlt1BeamGasDecision",
-    "Hlt1PassthroughDecision",
-    "Hlt1NoBeamDecision",
-    "Hlt1BeamOneDecision",
-    "Hlt1BeamTwoDecision",
-    "Hlt1BothBeamsDecision",
-    "Hlt1ODINLumiDecision",
-    "Hlt1ODINVeloOpenDecision",
-    "Hlt1ODINNoBiasDecision",
-    "Hlt1VeloMicroBiasDecision",
-    "Hlt1RICH1AlignmentDecision",
-    "Hlt1RICH2AlignmentDecision",
-    "Hlt1BeamGasDecision",
-    "Hlt1L02PPiDecision",
-    "Hlt1LowMassNoipDielectron_massSlice1_promptDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice1_promptDecision",
-    "Hlt1LowMassNoipDielectron_massSlice2_promptDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice2_promptDecision",
-    "Hlt1LowMassNoipDielectron_massSlice3_promptDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice3_promptDecision",
-    "Hlt1LowMassNoipDielectron_massSlice4_promptDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice4_promptDecision",
-    "Hlt1LowMassNoipDielectron_massSlice1_displacedDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice1_displacedDecision",
-    "Hlt1LowMassNoipDielectron_massSlice2_displacedDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice2_displacedDecision",
-    "Hlt1LowMassNoipDielectron_massSlice3_displacedDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice3_displacedDecision",
-    "Hlt1LowMassNoipDielectron_massSlice4_displacedDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice4_displacedDecision",
-]
-Hlt1_1track_lines = [
-    "Hlt1TrackMVADecision",
-    "Hlt1LowPtMuonDecision",
-    "Hlt1SingleHighPtMuonDecision",
-    "Hlt1SingleHighPtMuonNoMuIDDecision",
-    "Hlt1TrackMuonMVADecision",
-    "Hlt1OneMuonTrackLineDecision",
-    "Hlt1TrackElectronMVADecision",
-    "Hlt1SingleHighPtElectronDecision",
-    "Hlt1SingleHighEtDecision",
-]
-Hlt1_lines = Hlt1_1track_lines+[
-    "Hlt1TwoTrackMVACharmXSecDecision",
-    "Hlt1TwoTrackMVADecision",
-    "Hlt1TwoTrackKsDecision",
-    "Hlt1D2KPiDecision",
-    "Hlt1D2KKDecision",
-    "Hlt1D2PiPiDecision",
-    "Hlt1KsToPiPiDecision",
-    "Hlt1LowPtDiMuonDecision",#removed
-    "Hlt1DiMuonNoIPDecision",
-    "Hlt1DiMuonNoIP_ssDecision",
-    "Hlt1DiMuonHighMassDecision",
-    "Hlt1DiMuonLowMassDecision",#replaced by Hlt1DiMuonDisplacedDecision
-    "Hlt1DiMuonSoftDecision",
-    "Hlt1DiMuonDisplacedDecision",
-    "Hlt1TwoKsDecision",
-    "Hlt1D2KPiAlignmentDecision",
-    "Hlt1DiMuonHighMassAlignmentDecision",
-    "Hlt1DisplacedDiMuonAlignmentDecision",
-    "Hlt1DisplacedDielectronDecision",
-    "Hlt1DisplacedLeptonsDecision",#removed
-]
-
-
-Hlt2_lines = [
-    "Hlt2Charm_DstpToD0Pip_D0ToKmPip_XSec",
-    "Hlt2Charm_D0ToKmPip_XSec",
-    "Hlt2Charm_D0ToKmKp",
-    "Hlt2Charm_D0ToKmPip",
-    "Hlt2Charm_D0ToPimPip",
-    "Hlt2Charm_DpDspToKsKp_DD",
-    "Hlt2Charm_DpDspToKsKp_LD",
-    "Hlt2Charm_DpDspToKsKp_LL",
-    "Hlt2Charm_DpDspToKsPip_DD",
-    "Hlt2Charm_DpDspToKsPip_LD",
-    "Hlt2Charm_DpDspToKsPip_LL",
-    "Hlt2Charm_DpToKmPipPip",
-    "Hlt2Charm_DspToKmKpPip",
-    "Hlt2Charm_DpToKmPipPip_NoCuts",
-    "Hlt2Charm_DspToKmKpPip_NoCuts",
-    "Hlt2Charm_DpToKmPipPip_XSec",
-    "Hlt2Charm_DspToKmKpPip_XSec",
-    "Hlt2Charm_DstpToD0Pip_D0ToKmKp",
-    "Hlt2Charm_DstpToD0Pip_D0ToKmPip",
-    "Hlt2Charm_DstpToD0Pip_D0ToKpPim",
-    "Hlt2Charm_DstpToD0Pip_D0ToPimPip",
-    "Hlt2Charm_DstpToD0Pip_D0ToKmPip_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKpPim_LowBias",
-    "Hlt2Charm_D0ToKmPip_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKmKp_LowBias",
-    "Hlt2Charm_D0ToKmKp_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToPimPip_LowBias",
-    "Hlt2Charm_D0ToPimPip_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLL",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLL_Tight",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLDD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLDD_Tight",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDDD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDDD_Tight",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULLL",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULLL_Tight",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULDD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULDD_Tight",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLD_Tight",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDLD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDLD_Tight",
-    "Hlt2Charm_D0ToKsPimPip_LL",
-    "Hlt2Charm_D0ToKsPimPip_DD",
-    "Hlt2Charm_D0ToKsPimPip_LL_LowBias",
-    "Hlt2Charm_D0ToKsPimPip_LL_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_LL",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_DD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_LL_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_DD_LowBias",
-    "Hlt2Charm_D0ToKsKmPip_LL",
-    "Hlt2Charm_D0ToKsKmPip_DD",
-    "Hlt2Charm_D0ToKsKmPip_LL_LowBias",
-    "Hlt2Charm_D0ToKsKmPip_LL_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_LL",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_DD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_LL_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_DD_LowBias",
-    "Hlt2Charm_D0ToKsKpPim_LL",
-    "Hlt2Charm_D0ToKsKpPim_DD",
-    "Hlt2Charm_D0ToKsKpPim_LL_LowBias",
-    "Hlt2Charm_D0ToKsKpPim_DD_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_LL",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_DD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_LL_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_DD_LowBias",
-    "Hlt2Charm_D0ToKsKmKp_LL",
-    "Hlt2Charm_D0ToKsKmKp_DD",
-    "Hlt2Charm_D0ToKsKmKp_LL_LowBias",
-    "Hlt2Charm_D0ToKsKmKp_DD_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_LL",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_DD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_LL_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_DD_LowBias",
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS',
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS',
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS_MVA',
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS_MVA',
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS',
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS',
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS_MVA',
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS_MVA',
-    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS',
-    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS',
-    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS_MVA',
-    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS_MVA',
-]
-
-def make_composite_variables(options, pvs, data, add_truth=True, add_Hlt1TisTos=True):
-    if not options.simulation:
-        add_truth = False
-    variables = (
-        FunctorCollection(
-            {
-                "MAXPT": F.MAX(F.PT),
-                "MINPT": F.MIN(F.PT),
-                "SUMPT": F.SUM(F.PT),
-                "MAXP": F.MAX(F.P),
-                "MINP": F.MIN(F.P),
-                "BPVDIRA": F.BPVDIRA(pvs),
-                "VCHI2DOF": F.CHI2DOF,
-                #"VNDOF": F.NDOF,
-                "BPVFDCHI2": F.BPVFDCHI2(pvs),
-                "BPVFD": F.BPVFD(pvs),
-                "BPVVDRHO": F.BPVVDRHO(pvs),
-                "BPVVDZ": F.BPVVDZ(pvs),
-                "BPVIPCHI2": F.BPVIPCHI2(pvs),
-                "BPVIP": F.BPVIP(pvs),
-                "LOGBPVIPCHI2": log(F.BPVIPCHI2(pvs)),
-                "BPVLTIME": F.BPVLTIME(pvs),
-                "MAXBPVIPCHI2": F.MAX(F.BPVIPCHI2(pvs)),
-                "MINBPVIPCHI2": F.MIN(F.BPVIPCHI2(pvs)),
-                "MAXBPVIP": F.MAX(F.BPVIP(pvs)),
-                "MINBPVIP": F.MIN(F.BPVIP(pvs)),
-                "MAXDOCACHI2": F.MAXDOCACHI2,
-                "MAXDOCA": F.MAXDOCA,
-                "MAXSDOCACHI2": F.MAXSDOCACHI2,
-                "MAXSDOCA": F.MAXSDOCA,
-                "ETA": F.ETA,
-                "PHI": F.PHI,
-                "END_VX": F.END_VX,
-                "END_VY": F.END_VY,
-                "END_VZ": F.END_VZ,
-                "END_VX_ERR":F.SQRT @ F.CALL(0,0) @ F.POS_COV_MATRIX @ F.ENDVERTEX,
-                "END_VY_ERR":F.SQRT @ F.CALL(1,1) @ F.POS_COV_MATRIX @ F.ENDVERTEX,
-                "END_VZ_ERR":F.SQRT @ F.CALL(2,2) @ F.POS_COV_MATRIX @ F.ENDVERTEX,
-                "BPVX": F.BPVX(pvs),
-                "BPVY": F.BPVY(pvs),
-                "BPVZ": F.BPVZ(pvs),
-                "BPVX_ERR": F.SQRT @ F.CALL(0,0) @ F.POS_COV_MATRIX @ F.BPV(pvs),
-                "BPVY_ERR": F.SQRT @ F.CALL(1,1) @ F.POS_COV_MATRIX @ F.BPV(pvs),
-                "BPVZ_ERR": F.SQRT @ F.CALL(2,2) @ F.POS_COV_MATRIX @ F.BPV(pvs),
-                "ALLPVFD"     : F.ALLPV_FD(pvs),
-                "ALLPVIP"     : F.ALLPV_IP(pvs),
-                "OBJECT_KEY": F.OBJECT_KEY,
-            }
-        )
-        + Kinematics()
-        #+ ParticleID(extra_info=True) #only for daughters
-    )
-
-    if add_Hlt1TisTos:
-        variables += HltTisTos(
-            selection_type="Hlt1", trigger_lines=Hlt1_lines, data=data
-        )
-
-    if add_truth:
-        variables = add_truth_matching_functors(
-            options,
-            variables,
-            data,
-            hierarchy=True,
-            kinematics=True,
-            vertex_info=True,
-            bkgcat=True,
-        )
-
-    return variables
-
-def make_tistoscombinations(options, pvs, data):
-    algo_output = ParticleToSubcombinationsAlg( Input=data )
-    relations = algo_output.OutputRelations
-
-    tistos_variables_extra = HltTisTos(
-        selection_type="Hlt1", trigger_lines=["Hlt1TwoTrackMVADecision"], data=algo_output.OutputParticles
-    )
-    tistos_combinations = {}
-    for k,v in tistos_variables_extra.get_thor_functors().items():
-        tistos_combinations[k + "_SUBCOMB" ] = F.MAP_INPUT_ARRAY( v, relations )
-    tistos_combinations = FunctorCollection( tistos_combinations )
-
-    return tistos_combinations
-
-def make_composite_variables_3body(options, pvs, data, add_truth=True):
-
-    variables = (
-        FunctorCollection(
-            {
-                #12
-                "M12": F.SUBCOMB(Functor=F.MASS, Indices=(1, 2)),
-                "SDOCA12"     : F.SDOCA(Child1=1,Child2=2),
-                "SDOCACHI212" : F.SDOCACHI2(Child1=1,Child2=2),
-                "DOCA12"      : F.DOCA(Child1=1,Child2=2),
-                "DOCACHI212"  : F.DOCACHI2(Child1=1,Child2=2),
-                "COS12": F.ALV(1, 2),
-                #"ETA12": F.SUBCOMB(Functor=F.ETA, Indices=(1, 2)),
-                #"PT12": F.SUBCOMB(Functor=F.PT, Indices=(1, 2)),
-                #"VCHI212": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(1, 2)),
-                #"END_VZ12": F.SUBCOMB(Functor=F.END_VZ, Indices=(1, 2)),
-                #"BPVZ12": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(1, 2)),
-                #"BPVCORRM12": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(1, 2)),
-                #13
-                "M13": F.SUBCOMB(Functor=F.MASS, Indices=(1, 3)),
-                "SDOCA13"     : F.SDOCA(Child1=1,Child2=3),
-                "SDOCACHI213" : F.SDOCACHI2(Child1=1,Child2=3),
-                "DOCA13"      : F.DOCA(Child1=1,Child2=3),
-                "DOCACHI213"  : F.DOCACHI2(Child1=1,Child2=3),
-                "COS13": F.ALV(1, 3),
-                #"ETA13": F.SUBCOMB(Functor=F.ETA, Indices=(1, 3)),
-                #"PT13": F.SUBCOMB(Functor=F.PT, Indices=(1, 3)),
-                #"VCHI213": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(1, 3)),
-                #"END_VZ13": F.SUBCOMB(Functor=F.END_VZ, Indices=(1, 3)),
-                #"BPVZ13": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(1, 3)),
-                #"BPVCORRM13": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(1, 3)),
-                #23
-                "M23": F.SUBCOMB(Functor=F.MASS, Indices=(2, 3)),
-                "SDOCA23"     : F.SDOCA(Child1=2,Child2=3),
-                "SDOCACHI223" : F.SDOCACHI2(Child1=2,Child2=3),
-                "DOCA23"      : F.DOCA(Child1=2,Child2=3),
-                "DOCACHI223"  : F.DOCACHI2(Child1=2,Child2=3),
-                "COS23": F.ALV(2, 3),
-                #"ETA23": F.SUBCOMB(Functor=F.ETA, Indices=(2, 3)),
-                #"PT23": F.SUBCOMB(Functor=F.PT, Indices=(2, 3)),
-                #"VCHI223": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(2, 3)),
-                #"END_VZ23": F.SUBCOMB(Functor=F.END_VZ, Indices=(2, 3)),
-                #"BPVZ23": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(2, 3)),
-                #"BPVCORRM23": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(2, 3)),
-            }
-        )
-    )
-    return make_composite_variables(options, pvs, data, add_truth)+make_tistoscombinations(options, pvs, data)+variables
-
-def make_composite_variables_4body(options, pvs, data, add_truth=True):
-
-    variables = (
-        FunctorCollection(
-            {
-                #14
-                "M14": F.SUBCOMB(Functor=F.MASS, Indices=(1, 4)),
-                "SDOCA14"     : F.SDOCA(Child1=1,Child2=4),
-                "SDOCACHI214" : F.SDOCACHI2(Child1=1,Child2=4),
-                "DOCA14"      : F.DOCA(Child1=1,Child2=4),
-                "DOCACHI214"  : F.DOCACHI2(Child1=1,Child2=4),
-                "COS14": F.ALV(1, 4),
-                #"ETA14": F.SUBCOMB(Functor=F.ETA, Indices=(1, 4)),
-                #"PT14": F.SUBCOMB(Functor=F.PT, Indices=(1, 4)),
-                #"VCHI214": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(1, 4)),
-                #"END_VZ14": F.SUBCOMB(Functor=F.END_VZ, Indices=(1, 4)),
-                #"BPVZ14": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(1, 4)),
-                #"BPVCORRM14": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(1, 4)),
-                #24
-                "M24": F.SUBCOMB(Functor=F.MASS, Indices=(2, 4)),
-                "SDOCA24"     : F.SDOCA(Child1=2,Child2=4),
-                "SDOCACHI224" : F.SDOCACHI2(Child1=2,Child2=4),
-                "DOCA24"      : F.DOCA(Child1=2,Child2=4),
-                "DOCACHI224"  : F.DOCACHI2(Child1=2,Child2=4),
-                "COS24": F.ALV(2, 4),
-                #"ETA24": F.SUBCOMB(Functor=F.ETA, Indices=(2, 4)),
-                #"PT24": F.SUBCOMB(Functor=F.PT, Indices=(2, 4)),
-                #"VCHI224": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(2, 4)),
-                #"END_VZ24": F.SUBCOMB(Functor=F.END_VZ, Indices=(2, 4)),
-                #"BPVZ24": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(2, 4)),
-                #"BPVCORRM24": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(2, 4)),
-                #34
-                "M34": F.SUBCOMB(Functor=F.MASS, Indices=(3, 4)),
-                "SDOCA34"     : F.SDOCA(Child1=3,Child2=4),
-                "SDOCACHI234" : F.SDOCACHI2(Child1=3,Child2=4),
-                "DOCA34"      : F.DOCA(Child1=3,Child2=4),
-                "DOCACHI234"  : F.DOCACHI2(Child1=3,Child2=4),
-                "COS34": F.ALV(3, 4),
-                #"ETA34": F.SUBCOMB(Functor=F.ETA, Indices=(3, 4)),
-                #"PT34": F.SUBCOMB(Functor=F.PT, Indices=(3, 4)),
-                #"VCHI234": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(3, 4)),
-                #"END_VZ34": F.SUBCOMB(Functor=F.END_VZ, Indices=(3, 4)),
-                #"BPVZ34": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(3, 4)),
-                #"BPVCORRM34": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(3, 4)),
-            }
-        )
-    )
-    return make_composite_variables_3body(options, pvs, data, add_truth)+variables #make_tistoscombinations already included
-
-def make_b_composite_variables(options, pvs, data, add_truth=True):
-    
-    # define helper functors
-    get_child = F.CHILD(1, F.FORWARDARG0) # change here the index of the child
-    get_SV =  F.ENDVERTEX @ F.FORWARDARG0
-    get_SV_pos = F.TOLINALG @ F.POSITION @ get_SV # only if composite (i.e. has vertex)
-    get_child_endvtx_pos = F.ENDVERTEX_POS  @ get_child
-    get_fdvec_child = get_child_endvtx_pos - get_SV_pos
-
-    # define observables
-    IP_wrt_SV = F.IP.bind(get_SV_pos , get_child)
-    IPCHI2_wrt_SV = F.IPCHI2.bind(get_SV , get_child) # only if child is composite (i.e. has vertex)
-    FD_wrt_SV = F.MAGNITUDE @ get_fdvec_child
-    FDCHI2_wrt_SV = F.VTX_FDCHI2.bind(get_SV, get_child)
-
-    
-    variables = FunctorCollection(
-        {       
-            "ID": F.PARTICLE_ID ,
-            "PT": F.PT,
-            "P": F.P,
-            "MASS": F.MASS,
-            "CHILD1_IPwrtSV": IP_wrt_SV,
-            "CHILD1_IPCHI2wrtSV": IPCHI2_wrt_SV,
-            "CHILD1_FDwrtSV": FD_wrt_SV,
-            "CHILD1_FDCHI2wrtSV": FDCHI2_wrt_SV,
-            "PX": F.PX,
-            "PY": F.PY,
-            "PZ": F.PZ,
-            "END_VCHI2DOF": F.CHI2DOF @ F.ENDVERTEX,
-            "BPVCHI2DOF": F.CHI2DOF @ F.BPV(pvs),
-            # B2OC generic B hadron NN Hlt2 algorithm,
-            # not planning to use it directly for B2OC EM
-            "MVA": F.MVA(
-                MVAType="SigmaNet",
-                Config={
-                    "File":
-                    "paramfile://data/Hlt2B2OC_B_SigmaNet_Run3-v1.json",
-                    "Name":
-                    "B2OC_SigmaNet_Generic",
-                    "Lambda":
-                    "2.0",
-                    "NLayers":
-                    "3",
-                    "InputSize":
-                    "6",
-                    "Monotone_Constraints":
-                    "[1,-1,-1,-1,-1,-1]",
-                    "Variables":
-                    "log_B_PT,B_ETA,log_B_DIRA,log_B_ENDVERTEX_CHI2,log_B_IPCHI2_OWNPV,log_B_IP_OWNPV",
-                },
-                Inputs={
-                    "log_B_PT": fmath.log(F.PT),
-                    "B_ETA": F.ETA,
-                    "log_B_DIRA": fmath.log(1. - F.BPVDIRA(pvs)),
-                    "log_B_ENDVERTEX_CHI2": fmath.log(F.CHI2DOF),
-                    "log_B_IPCHI2_OWNPV": fmath.log(F.BPVIPCHI2(pvs)),
-                    "log_B_IP_OWNPV": fmath.log(F.BPVIP(pvs)),
-                }),
-            #'SSPionBDT_Mistag': F.SSPionBDT_Mistag(sspionTagging.OutputFlavourTags),
-            #'SSPionBDT_Decision': F.SSPionBDT_Decision(sspionTagging.OutputFlavourTags),
-
-        }
-    )
-    return make_composite_variables(options, pvs, data, add_truth)+make_tistoscombinations(options, pvs, data)+variables
-
-def make_DeltaM_variable(options):
-    return FunctorCollection({"DM": F.MASS - F.CHILD(1, F.MASS)})
-
-def make_basic_variables(options, pvs, data, add_truth=True, islong = True):
-    if not options.simulation:
-        add_truth = False
-    variables = (
-        FunctorCollection(
-            {
-                "TRCHI2DOF": F.CHI2DOF @ F.TRACK,
-                "ETA": F.ETA,
-                "PHI": F.PHI,
-                "TRGHOSTPROB": F.GHOSTPROB,
-                "BPVIPCHI2": F.BPVIPCHI2(pvs),
-                "BPVIP": F.BPVIP(pvs),
-                "BPVX": F.BPVX(pvs),
-                "BPVY": F.BPVY(pvs),
-                "BPVZ": F.BPVZ(pvs),
-                "TX"          : F.TX,
-                "TY"          : F.TY,
-                "MINIPCHI2"   : F.MINIPCHI2(pvs),
-                "MINIP"       : F.MINIP(pvs),
-                "KEY"         : F.VALUE_OR(-1) @ F.OBJECT_KEY @ F.TRACK,
-                "ISMUON"      : F.ISMUON,
-                "TRACKPT": F.TRACK_PT,
-                "TRACKHISTORY": F.VALUE_OR(-1) @ F.TRACKHISTORY @ F.TRACK,
-                "QOVERP": F.QOVERP @ F.TRACK,
-                "NDOF": F.VALUE_OR(-1) @ F.NDOF @ F.TRACK,
-                "NFTHITS": F.VALUE_OR(-1) @ F.NFTHITS @ F.TRACK,
-                "NHITS": F.VALUE_OR(-1) @ F.NHITS @ F.TRACK,
-                "NUTHITS": F.VALUE_OR(-1) @ F.NUTHITS @ F.TRACK,
-                "NVPHITS": F.VALUE_OR(-1) @ F.NVPHITS @ F.TRACK,
-                #"NMUONHITS": F.VALUE_OR(-1) @ F.NHITSMUONS @ F.TRACK, #https://gitlab.cern.ch/lhcb/Rec/-/merge_requests/3756
-                "TRACKHASVELO": F.VALUE_OR(-1) @ F.TRACKHASVELO @ F.TRACK,
-                "TRACKHASUT": F.VALUE_OR(-1) @ F.TRACKHASUT @ F.TRACK,
-                "OBJECT_KEY": F.OBJECT_KEY,
-                "HASBREM": F.HASBREM,
-                "BREMENERGY": F.BREMENERGY,
-                "BREMBENDCORR": F.BREMBENDCORR,
-            }
-        )
-        + Kinematics()
-        + ParticleID(extra_info=True)
-    )
-
-    if islong:
-        variables += FunctorCollection({"CTB": F.TRACK_POSVEC_CLOSESTTOBEAM})
-    
-    variables += HltTisTos(
-        selection_type="Hlt1", trigger_lines=Hlt1_1track_lines, data=data
-    )
-    
-    if add_truth:
-        variables = add_truth_matching_functors(
-            options,
-            variables,
-            data,
-            hierarchy=True,
-            kinematics=True,
-            vertex_info=True,
-            bkgcat=False,
-        )
-
-    return variables
-
-def make_hlt2_event_variables(options, pvs, rec_summary):
-    # define event level variables
-    evt_variables = EventInfo()
-    if not options.simulation:
-        evt_variables += LHCInfo() #FillNumber
-    evt_variables += SelectionInfo(selection_type="Hlt2", trigger_lines=Hlt2_lines)
-    evt_variables += SelectionInfo(selection_type="Hlt1", trigger_lines=Hlt1_global_lines)
-    evt_variables += FunctorCollection(
-        {
-            "ALLPVX": F.ALLPVX(pvs),
-            "ALLPVY": F.ALLPVY(pvs),
-            "ALLPVZ": F.ALLPVZ(pvs),
-            "ALLPVNDOF": F.MAP(F.VALUE_OR(F.NaN) @ F.NDOF) @ F.TES(pvs),
-            "ALLPVCHI2": F.MAP(F.VALUE_OR(F.NaN) @ F.CHI2) @ F.TES(pvs),
-            "nPVs": F.SIZE(pvs),
-            "nTracks": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nTracks"),
-            "nLongTracks": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nLongTracks"),
-            "nMuonTracks": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nMuonTracks"),
-            "nFTClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nFTClusters"),
-            "nVPClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nVPClusters"),
-            "nUTClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nUTClusters"),
-            "nSPDhits": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nSPDhits"),
-            "nEcalClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nEcalClusters"),
-            "nEcalClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nEcalClusters"),
-            "eCalTot": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "eCalTot"),
-            "hCalTot": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "hCalTot"),
-            "nRich1Hits": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nRich1Hits"),
-            "nRich2Hits": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nRich2Hits"),
-        }
-    )
-    return evt_variables
-
-def add_truth_matching_functors(
-    options,
-    variables,
-    data,
-    hierarchy=True,
-    kinematics=True,
-    vertex_info=True,
-    bkgcat=False,
-    prompt_info=True,
-):
-    """Add MC truth matching functors to an existing FunctorCollection.
-
-    Args:
-        options (DaVinci.Options): DaVinci options object.
-        variables (FunctorCollection): FunctorCollection to modify
-        data: data handle
-        hierarchy (bool): Add MCHierarchy info (default True)
-        kinematics (bool): Add MCKinematics info (default True)
-        vertex_info (bool): Add MCVertexInfo (default True)
-        bkgcat (bool): Add TRUEKEY and BKGCAT functors - intended for composite particles (default False)
-        prompt_info (bool): Add MCPromptDecay info (default True)
-
-    Returns:
-        FunctorCollection: modified FunctorCollection with truth matched variables.
-    """
-    assert (
-        options.simulation
-    ), "options.simulation is set to False - it doesn't make sense to add truth matching."
-
-    MCTRUTH = MCTruthAndBkgCat(data)
-
-    if bkgcat:
-        variables += FunctorCollection(
-            {
-                # Important note: specify an invalid value for integer functors if there exists no truth info.
-                #                 The invalid value for floating point functors is set to nan.
-                "TRUEKEY": F.VALUE_OR(-1) @ MCTRUTH(F.OBJECT_KEY),
-                "BKGCAT": MCTRUTH.BkgCat,
-            }
-        )
-    if hierarchy:
-        variables += MCHierarchy(mctruth_alg=MCTRUTH)  # likely to change again!!
-    if vertex_info:
-        variables += MCVertexInfo(mctruth_alg=MCTRUTH)  # likely to change again!!
-    if kinematics:
-        variables += MCKinematics(mctruth_alg=MCTRUTH)  # likely to change again!!
-    if prompt_info:
-        variables += MCPromptDecay(mctruth_alg=MCTRUTH)
-
-    return variables
-
-### DTF variables ###
-
-def make_basic_dtf_variables(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name="", islong=True):
-    variables = (
-        FunctorCollection(
-            {
-                "TRCHI2DOF": F.CHI2DOF @ F.TRACK,
-                "ETA": F.ETA,
-                "PHI": F.PHI,
-                "TRGHOSTPROB": F.GHOSTPROB,
-                "BPVIPCHI2": F.BPVIPCHI2(pvs),
-                "BPVIP": F.BPVIP(pvs),
-                "BPVX": F.BPVX(pvs),
-                "BPVY": F.BPVY(pvs),
-                "BPVZ": F.BPVZ(pvs),
-                "TX"          : F.TX,
-                "TY"          : F.TY,
-                "MINIPCHI2"   : F.MINIPCHI2(pvs),
-                "MINIP"       : F.MINIP(pvs),
-                "KEY"         : F.VALUE_OR(-1) @ F.OBJECT_KEY @ F.TRACK,
-                "TRACKPT": F.TRACK_PT,
-                "TRACKHISTORY": F.VALUE_OR(-1) @ F.TRACKHISTORY @ F.TRACK,
-                "QOVERP": F.QOVERP @ F.TRACK,
-                "NDOF": F.VALUE_OR(-1) @ F.NDOF @ F.TRACK,
-            }
-        )
-        + Kinematics()
-    )
-
-    if islong:
-        variables += FunctorCollection({"CTB": F.TRACK_POSVEC_CLOSESTTOBEAM})
-    
-    if(mass_constraint):
-        if(pv_constraint): # MASS + PV
-            dtf_variables_mass_pv = FunctorCollection({
-                        'DTF_PV_M'+ particle_name + '_' + k: DTF(v)
-                        for k, v in variables.get_thor_functors().items()
-                    })
-            return dtf_variables_mass_pv
-        else: # MASS
-            dtf_variables_mass = FunctorCollection(
-                {'DTF_M'+ particle_name + '_' + k: DTF(v)
-                 for k, v in variables.get_thor_functors().items()})
-        return dtf_variables_mass
-
-    elif(pv_constraint): # PV
-        dtf_variables_pv = FunctorCollection({
-                'DTF_PV_' + k: DTF(v)
-                for k, v in variables.get_thor_functors().items()
-            })
-        return dtf_variables_pv
-
-    else: # NO MASS/PV
-        dtf_variables = FunctorCollection(
-            {'DTF_' + k: DTF(v)
-             for k, v in variables.get_thor_functors().items()})
-        return dtf_variables
-
-def make_composite_dtf_variables(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name=""):
-    variables = (
-        FunctorCollection(
-            {
-                "MAXPT": F.MAX(F.PT),
-                "MINPT": F.MIN(F.PT),
-                "SUMPT": F.SUM(F.PT),
-                "MAXP": F.MAX(F.P),
-                "MINP": F.MIN(F.P),
-                "BPVDIRA": F.BPVDIRA(pvs),
-                "VCHI2DOF": F.CHI2DOF, #CHI2VXNDOF
-                "BPVFDCHI2": F.BPVFDCHI2(pvs),
-                "BPVFD": F.BPVFD(pvs),
-                "BPVVDRHO": F.BPVVDRHO(pvs),
-                "BPVVDZ": F.BPVVDZ(pvs),
-                "BPVIPCHI2": F.BPVIPCHI2(pvs),
-                "BPVIP": F.BPVIP(pvs),
-                "LOGBPVIPCHI2": log(F.BPVIPCHI2(pvs)),
-                "BPVLTIME": F.BPVLTIME(pvs),
-                "MAXBPVIPCHI2": F.MAX(F.BPVIPCHI2(pvs)), #MAX_
-                "MINBPVIPCHI2": F.MIN(F.BPVIPCHI2(pvs)),
-                "MAXBPVIP": F.MAX(F.BPVIP(pvs)),
-                "MINBPVIP": F.MIN(F.BPVIP(pvs)),
-                "ETA": F.ETA,
-                "PHI": F.PHI,
-                "END_VX": F.END_VX, #END_
-                "END_VY": F.END_VY,
-                "END_VZ": F.END_VZ,
-                "BPVX": F.BPVX(pvs),
-                "BPVY": F.BPVY(pvs),
-                "BPVZ": F.BPVZ(pvs),
-                "ALLPVFD"     : F.ALLPV_FD(pvs),
-                "ALLPVIP"     : F.ALLPV_IP(pvs),
-                
-            }
-        )
-        + Kinematics()
-    )
-
-    addstring = "DTF"
-    if(pv_constraint):
-            addstring += '_PV'
-    if(mass_constraint):
-            addstring += '_M'
-    addstring += particle_name
-
-    DTF_chi2ndof = FunctorCollection(
-            {
-                addstring+"_DTFCHI2": DTF.CHI2,
-                addstring+"_DTFNDOF": DTF.NDOF,
-                addstring+"_CTAU": DTF.CTAU,
-                addstring+"_CTAUERR": DTF.CTAUERR,
-                addstring+"_MERR": DTF.MASSERR,
-            }
-    )
-
-    if(mass_constraint):
-        if(pv_constraint): # MASS + PV
-            dtf_variables_mass_pv = FunctorCollection({
-                        'DTF_PV_M'+ particle_name + '_' + k: DTF(v)
-                        for k, v in variables.get_thor_functors().items()
-                    })
-            return dtf_variables_mass_pv+DTF_chi2ndof
-        else: # MASS
-            dtf_variables_mass = FunctorCollection(
-                {'DTF_M'+ particle_name + '_' + k: DTF(v)
-                 for k, v in variables.get_thor_functors().items()})
-        return dtf_variables_mass+DTF_chi2ndof
-
-    elif(pv_constraint): # PV
-        dtf_variables_pv = FunctorCollection({
-                'DTF_PV_' + k: DTF(v)
-                for k, v in variables.get_thor_functors().items()
-            })
-        return dtf_variables_pv+DTF_chi2ndof
-
-    else: # NO MASS/PV
-        dtf_variables = FunctorCollection(
-            {'DTF_' + k: DTF(v)
-             for k, v in variables.get_thor_functors().items()})
-        return dtf_variables+DTF_chi2ndof
-
-def make_composite_dtf_variables_3body(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name=""):
-    variables = (
-        FunctorCollection(
-            {
-                "M13": F.SUBCOMB(Functor=F.MASS, Indices=(1, 3)),
-                "M23": F.SUBCOMB(Functor=F.MASS, Indices=(2, 3)),
-            }
-        )
-    )
-
-    if(mass_constraint):
-        if(pv_constraint): # MASS + PV
-            dtf_variables_mass_pv = FunctorCollection({
-                        'DTF_PV_M'+ particle_name + '_' + k: DTF(v)
-                        for k, v in variables.get_thor_functors().items()
-                    })
-            return dtf_variables_mass_pv+make_composite_dtf_variables(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
-        else: # MASS
-            dtf_variables_mass = FunctorCollection(
-                {'DTF_M'+ particle_name + '_' + k: DTF(v)
-                 for k, v in variables.get_thor_functors().items()})
-        return dtf_variables_mass+make_composite_dtf_variables(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
-
-    elif(pv_constraint): # PV
-        dtf_variables_pv = FunctorCollection({
-                'DTF_PV_' + k: DTF(v)
-                for k, v in variables.get_thor_functors().items()
-            })
-        return dtf_variables_pv+make_composite_dtf_variables(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
-
-    else: # NO MASS/PV
-        dtf_variables = FunctorCollection(
-            {'DTF_' + k: DTF(v)
-             for k, v in variables.get_thor_functors().items()})
-
-    return dtf_variables+make_composite_dtf_variables(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
-
-def make_composite_dtf_variables_4body(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name=""):
-    variables = (
-        FunctorCollection(
-            {
-                "M14": F.SUBCOMB(Functor=F.MASS, Indices=(1, 4)),
-                "M24": F.SUBCOMB(Functor=F.MASS, Indices=(2, 4)),
-                "M34": F.SUBCOMB(Functor=F.MASS, Indices=(3, 4)),
-            }
-        )
-    )
-
-    if(mass_constraint):
-        if(pv_constraint): # MASS + PV
-            dtf_variables_mass_pv = FunctorCollection({
-                        'DTF_PV_M'+ particle_name + '_' + k: DTF(v)
-                        for k, v in variables.get_thor_functors().items()
-                    })
-            return dtf_variables_mass_pv+make_composite_dtf_variables_3body(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
-        else: # MASS
-            dtf_variables_mass = FunctorCollection(
-                {'DTF_M'+ particle_name + '_' + k: DTF(v)
-                 for k, v in variables.get_thor_functors().items()})
-        return dtf_variables_mass+make_composite_dtf_variables_3body(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
-
-    elif(pv_constraint): # PV
-        dtf_variables_pv = FunctorCollection({
-                'DTF_PV_' + k: DTF(v)
-                for k, v in variables.get_thor_functors().items()
-            })
-        return dtf_variables_pv+make_composite_dtf_variables_3body(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
-
-    else: # NO MASS/PV
-        dtf_variables = FunctorCollection(
-            {'DTF_' + k: DTF(v)
-             for k, v in variables.get_thor_functors().items()})
-    
-        return dtf_variables+make_composite_dtf_variables_3body(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
-
-
-def make_MC_basic_variables():
-    MC_MOTHER_ID = lambda gen: F.VALUE_OR(0) @ F.MC_MOTHER(gen, F.PARTICLE_ID)
-    MC_MOTHER_KEY = lambda gen: F.VALUE_OR(-1) @ F.MC_MOTHER(gen, F.OBJECT_KEY)
-
-    variables = (
-        FunctorCollection(
-            {
-                "OBJECT_KEY": F.OBJECT_KEY,
-                "ETA": F.ETA,
-                "PHI": F.PHI,
-                "ORIGIN_VX": F.ORIGIN_VX,
-                "ORIGIN_VY": F.ORIGIN_VY,
-                "ORIGIN_VZ": F.ORIGIN_VZ,
-                "FOURMOMENTUM": F.FOURMOMENTUM,
-                "TRUEID": F.PARTICLE_ID,
-                "MC_MOTHER_ID": MC_MOTHER_ID(1),
-                "MC_MOTHER_KEY": MC_MOTHER_KEY(1),
-                "MC_GD_MOTHER_ID": MC_MOTHER_ID(2),
-                "MC_GD_MOTHER_KEY": MC_MOTHER_KEY(2),
-                "MC_GD_GD_MOTHER_ID": MC_MOTHER_ID(3),
-                "MC_GD_GD_MOTHER_KEY": MC_MOTHER_KEY(3),
-            }
-        )
-        + Kinematics()
-    )
-
-
-    from PyConf.reading import get_mc_particles, get_pp2mcp_relations, get_mc_track_info
-    MC_data = get_mc_particles("/Event/HLT2/MC/Particles")
-    relations_charged = get_pp2mcp_relations("/Event/HLT2/Relations/ChargedPP2MCP")
-    relations_neutral = get_pp2mcp_relations("/Event/HLT2/Relations/NeutralPP2MCP")
-    mcreconstructed_all = MCReconstructed(
-        input_mcparticles=MC_data,
-        use_best_mcmatch=True,
-        relations_charged=relations_charged,
-        relations_neutral=relations_neutral,
-    )
-    mcreconstructible_all = MCReconstructible(
-        input_mctrackinfo=get_mc_track_info()
-    )
-    import FunTuple.functorcollections as FC
-    vars_reconstructed = FC.MCReconstructed(mcreconstructed_alg=mcreconstructed_all, extra_info=True)
-    vars_reconstructible = FC.MCReconstructible(mcreconstructible_alg=mcreconstructible_all, extra_info=True)
-
-
-    return variables+vars_reconstructed+vars_reconstructible
-
-def make_MC_composite_variables():
-    MC_MOTHER_ID = lambda gen: F.VALUE_OR(0) @ F.MC_MOTHER(gen, F.PARTICLE_ID)
-    MC_MOTHER_KEY = lambda gen: F.VALUE_OR(-1) @ F.MC_MOTHER(gen, F.OBJECT_KEY)
-
-    variables = (
-        FunctorCollection(
-            {
-                "END_VX": F.END_VX,
-                "END_VY": F.END_VY,
-                "END_VZ": F.END_VZ,
-                "LTIME": F.MC_LIFETIME,
-                "OBJECT_KEY": F.OBJECT_KEY,
-                "ETA": F.ETA,
-                "PHI": F.PHI,
-                "ORIGIN_VX": F.ORIGIN_VX,
-                "ORIGIN_VY": F.ORIGIN_VY,
-                "ORIGIN_VZ": F.ORIGIN_VZ,
-                "FOURMOMENTUM": F.FOURMOMENTUM,
-                "TRUEID": F.PARTICLE_ID,
-                "MC_MOTHER_ID": MC_MOTHER_ID(1),
-                "MC_MOTHER_KEY": MC_MOTHER_KEY(1),
-                "MC_GD_MOTHER_ID": MC_MOTHER_ID(2),
-                "MC_GD_MOTHER_KEY": MC_MOTHER_KEY(2),
-                "MC_GD_GD_MOTHER_ID": MC_MOTHER_ID(3),
-                "MC_GD_GD_MOTHER_KEY": MC_MOTHER_KEY(3),
-            }
-        )
-        + Kinematics()
-        + MCPromptDecay()
-        )
-
-    return variables
-
-def make_MC_event_variables(mc_header):
-    # define event level variables
-    evt_variables = EventInfo()
-    evt_variables += MCPrimaries(mc_header=mc_header)
-
-    return evt_variables
-
-def make_top_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"]):
-    from PyConf.reading import get_particles
-    from IsolationTools import VertexAndConeIsolation
-
-    possible_charm_locations = ["LongTrackIso", "TTrackIso", "DownstreamTrackIso", "UpstreamTrackIso", "NeutralIso", "PizIso"]
-    coneangles = [0.25,0.5,1.,1.5,2.]
-
-    count = 0
-    for location in locations:
-        extra_particles = get_particles(f"/Event/HLT2/{hlt2_line}/{location}/Particles")
-
-        for coneangle in coneangles:
-            top_RTAlg = VertexAndConeIsolation(
-                name=location+"_"+str(coneangle),
-                reference_particles=input_data,
-                related_particles=extra_particles,
-                cut=F.DR2<coneangle)
-
-            if count == 0:
-                top_iso_variables = ParticleIsolation(isolation_alg=top_RTAlg,array_indx_name='indx')
-            else:
-                top_iso_variables += ParticleIsolation(isolation_alg=top_RTAlg,array_indx_name='indx')
-            count += 1
-
-
-    return top_iso_variables
-
-def make_basic_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"]):
-    from PyConf.reading import get_particles
-    from IsolationTools import VertexAndConeIsolation
-    from PyConf.Algorithms import ThOrParticleSelection
-
-    basic_code = (F.FILTER(F.ALL) @ F.GET_ALL_BASICS())
-    basic_particles = ThOrParticleSelection(InputParticles=input_data, Functor=basic_code).OutputSelection
-
-    possible_charm_locations = ["LongTrackIso", "TTrackIso", "DownstreamTrackIso", "UpstreamTrackIso", "NeutralIso", "PizIso"]
-    coneangles = [0.25,0.5,1.,1.5,2.]
-
-    count = 0
-    for location in locations:
-        extra_particles = get_particles(f"/Event/HLT2/{hlt2_line}/{location}/Particles")
-
-        for coneangle in coneangles:
-            basic_RTAlg = VertexAndConeIsolation(
-                name=location+"_"+str(coneangle),
-                reference_particles=basic_particles,
-                related_particles=extra_particles,
-                cut=F.DR2<coneangle)
-
-            if count == 0:
-                basic_iso_variables = ParticleIsolation(isolation_alg=basic_RTAlg,array_indx_name='indx')
-            else:
-                basic_iso_variables += ParticleIsolation(isolation_alg=basic_RTAlg,array_indx_name='indx')
-            count += 1
-
-
-    return basic_iso_variables
-
-
-def make_intermediate_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"], composite_ID = "J/psi(1S)"):
-    from PyConf.reading import get_particles
-    from IsolationTools import VertexAndConeIsolation
-    from PyConf.Algorithms import ThOrParticleSelection
-
-    intermediate_code = F.FILTER(F.IS_ABS_ID(composite_ID)) @ F.GET_ALL_DESCENDANTS()
-    intermediate_particles = ThOrParticleSelection(InputParticles=input_data, Functor=intermediate_code).OutputSelection
-
-    possible_charm_locations = ["LongTrackIso", "TTrackIso", "DownstreamTrackIso", "UpstreamTrackIso", "NeutralIso", "PizIso"]
-    coneangles = [0.25,0.5,1.,1.5,2.]
-
-    count = 0
-    for location in locations:
-        extra_particles = get_particles(f"/Event/HLT2/{hlt2_line}/{location}/Particles")
-
-        for coneangle in coneangles:
-            intermediate_RTAlg = VertexAndConeIsolation(
-                name=location+"_"+str(coneangle),
-                reference_particles=intermediate_particles,
-                related_particles=extra_particles,
-                cut=F.DR2<coneangle)
-
-            if count == 0:
-                intermediate_iso_variables = ParticleIsolation(isolation_alg=intermediate_RTAlg,array_indx_name='indx')
-            else:
-                intermediate_iso_variables += ParticleIsolation(isolation_alg=intermediate_RTAlg,array_indx_name='indx')
-            count += 1
-
-
-    return intermediate_iso_variables
diff --git a/Charm_2024validation/Charm_2024validation/tmp.yaml b/Charm_2024validation/Charm_2024validation/tmp.yaml
deleted file mode 100644
index c871485c24..0000000000
--- a/Charm_2024validation/Charm_2024validation/tmp.yaml
+++ /dev/null
@@ -1,12 +0,0 @@
-( '27186011', 'dst_to_dee', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27185021', 'dst_to_dee', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27184011', 'dst_to_dee', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27186011', 'dst_to_dee', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '27185021', 'dst_to_dee', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '27184011', 'dst_to_dee', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '27186011', 'dst_to_dee', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '27185021', 'dst_to_dee', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '27184011', 'dst_to_dee', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '27186011', 'dst_to_dee', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27185021', 'dst_to_dee', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27184011', 'dst_to_dee', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
diff --git a/Charm_2024validation/info.yaml b/Charm_2024validation/info.yaml
index 26de654976..f49943e7e9 100644
--- a/Charm_2024validation/info.yaml
+++ b/Charm_2024validation/info.yaml
@@ -79,7 +79,7 @@ defaults:
       simulation: True
       data_type: "Upgrade"
       scheduler_legacy_mode: False
-      evt_max: 1000
+      evt_max: -1
 
 {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2:
   application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
@@ -116,7 +116,6 @@ MC_{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}:
       event_store: HiveWhiteBoard
       input_process: "Hlt2"
       input_manifest_file: "HLT2.tck.json"
-      write_decoding_keys_to_git: false
       
 {%- endfor %}
 {%- endfor %}
-- 
GitLab


From 98d692651052355fefcc748c096a13eda3d9eddb Mon Sep 17 00:00:00 2001
From: Serena Maccolini <serena.maccolini@cern.ch>
Date: Mon, 15 Jul 2024 23:55:17 +0200
Subject: [PATCH 13/51] adjust info.yaml

---
 Charm_2024validation/info.yaml | 17 +++++++++--------
 Charm_2024validation/tmp.yaml  |  1 +
 2 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/Charm_2024validation/info.yaml b/Charm_2024validation/info.yaml
index f49943e7e9..7332ee785c 100644
--- a/Charm_2024validation/info.yaml
+++ b/Charm_2024validation/info.yaml
@@ -4,7 +4,8 @@ defaults:
   wg: Charm
 
 {%- set conditions = [
-  "MagDown",
+  ("MagDown","md"),
+  ("MagUp","mu"),
 ]%}
 
 {%- set evttype_subsample_nutext_nu_dir1_dir2_dddb = [
@@ -60,19 +61,19 @@ defaults:
 
 {%- for evttype, id, nutext, nu, dir1, dir2, dddb in evttype_subsample_nutext_nu_dir1_dir2_dddb %}
 
-{% for polarity in conditions %}
+{% for polarity,pol in conditions %}
 
 {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1:
-  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
+  application: "Moore/v55r10@x86_64_v2-el9-gcc13+detdesc-opt"
   input:
     bk_query: "/MC/{{dir1}}/Beam6800GeV-2024{{dir2}}-{{polarity}}-Nu{{nu}}-25ns-Pythia8/Sim10d/{{evttype}}/DIGI"
-    n_test_lfns: 3
+    n_test_lfns: 1
   output: HLT1.DST
   options:
     entrypoint: Charm_2024validation.options.hlt1:alg_config
     extra_options:
       input_raw_format: 0.5
-      conddb_tag: sim10-2024.Q1.2-v1.1-md100
+      conddb_tag: sim10-2024.Q1.2-v1.1-{{pol}}100
       dddb_tag: '{{dddb}}'
       input_type: ROOT
       output_type: ROOT
@@ -82,14 +83,14 @@ defaults:
       evt_max: -1
 
 {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2:
-  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
+  application: "Moore/v55r10@x86_64_v2-el9-gcc13+detdesc-opt"
   input:
     job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1
   output: HLT2.DST
   options:
     entrypoint: Charm_2024validation.options.hlt2.hlt2_{{id}}:alg_config
     extra_options:
-      conddb_tag: sim10-2024.Q1.2-v1.1-md100
+      conddb_tag: sim10-2024.Q1.2-v1.1-{{pol}}100
       dddb_tag: '{{dddb}}'
       input_raw_format: 0.5
       input_type: "ROOT"
@@ -107,7 +108,7 @@ MC_{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}:
   options:
     entrypoint: Charm_2024validation.main_{{id}}:main
     extra_options:
-      conddb_tag: sim10-2024.Q1.2-v1.1-md100
+      conddb_tag: sim10-2024.Q1.2-v1.1-{{pol}}100
       dddb_tag: '{{dddb}}'
       input_raw_format: 0.5
       input_type: ROOT
diff --git a/Charm_2024validation/tmp.yaml b/Charm_2024validation/tmp.yaml
index c871485c24..0230740567 100644
--- a/Charm_2024validation/tmp.yaml
+++ b/Charm_2024validation/tmp.yaml
@@ -10,3 +10,4 @@
 ( '27186011', 'dst_to_dee', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
 ( '27185021', 'dst_to_dee', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
 ( '27184011', 'dst_to_dee', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27165900', 'd0_to_ksks', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-- 
GitLab


From e2258f81634ce19ee783569c10944d27a1c5c2e0 Mon Sep 17 00:00:00 2001
From: Serena Maccolini <serena.maccolini@cern.ch>
Date: Tue, 16 Jul 2024 00:12:35 +0200
Subject: [PATCH 14/51] adjust info.yaml

---
 Charm_2024validation/info.yaml | 18 ------------------
 Charm_2024validation/tmp.yaml  | 10 ++++++++++
 2 files changed, 10 insertions(+), 18 deletions(-)

diff --git a/Charm_2024validation/info.yaml b/Charm_2024validation/info.yaml
index 7332ee785c..ac94d3d4cf 100644
--- a/Charm_2024validation/info.yaml
+++ b/Charm_2024validation/info.yaml
@@ -35,25 +35,7 @@ defaults:
 ( '27165903', 'd0_to_kshh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
 ( '27165071', 'd0_to_hhhh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
 
-( '27163102', 'd0_to_hh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163101', 'd0_to_hh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163100', 'd0_to_hh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '23103042', 'd_to_hhh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '23263022', 'd_to_hhh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
 ( '21263012', 'd_to_hhh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163471', 'd0_to_hhpi0', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '27165903', 'd0_to_kshh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '27165071', 'd0_to_hhhh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-
-( '27163102', 'd0_to_hh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163101', 'd0_to_hh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163100', 'd0_to_hh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '23103042', 'd_to_hhh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '23263022', 'd_to_hhh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '21263012', 'd_to_hhh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163471', 'd0_to_hhpi0', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27165903', 'd0_to_kshh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27165071', 'd0_to_hhhh', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
 
 ]%}
 
diff --git a/Charm_2024validation/tmp.yaml b/Charm_2024validation/tmp.yaml
index 0230740567..84cb491ff0 100644
--- a/Charm_2024validation/tmp.yaml
+++ b/Charm_2024validation/tmp.yaml
@@ -10,4 +10,14 @@
 ( '27186011', 'dst_to_dee', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
 ( '27185021', 'dst_to_dee', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
 ( '27184011', 'dst_to_dee', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
+
 ( '27165900', 'd0_to_ksks', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+
+( '27163102', 'd0_to_hh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163101', 'd0_to_hh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163100', 'd0_to_hh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '23103042', 'd_to_hhh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '23263022', 'd_to_hhh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163471', 'd0_to_hhpi0', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '27165903', 'd0_to_kshh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+( '27165071', 'd0_to_hhhh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-- 
GitLab


From 174761e0c858a13b8ff41268955846102a58b06c Mon Sep 17 00:00:00 2001
From: Serena Maccolini <serena.maccolini@cern.ch>
Date: Wed, 17 Jul 2024 11:23:20 +0200
Subject: [PATCH 15/51] hlt1+hlt2 OK

---
 Charm_2024validation/info.yaml                | 14 +++--
 Charm_2024validation/options/hlt1.py          | 18 ++++--
 Charm_2024validation/options/hlt1_noUT.py     | 33 +++++++++++
 Charm_2024validation/options/hlt2/hlt2.py     | 58 ++++++++++---------
 .../options/hlt2/hlt2_d0_to_hh.py             | 58 ++++++++++---------
 .../options/hlt2/hlt2_d0_to_hhhh.py           | 58 ++++++++++---------
 .../options/hlt2/hlt2_d0_to_hhpi0.py          | 58 ++++++++++---------
 .../options/hlt2/hlt2_d0_to_kshh.py           | 58 ++++++++++---------
 .../options/hlt2/hlt2_d0_to_ksks.py           | 58 ++++++++++---------
 .../options/hlt2/hlt2_d_to_hhh.py             | 58 ++++++++++---------
 .../options/hlt2/hlt2_d_to_ksh.py             | 58 ++++++++++---------
 .../options/hlt2/hlt2_dst_to_dee.py           | 58 ++++++++++---------
 .../options/hlt2/hlt2_rare_charm.py           | 58 ++++++++++---------
 .../options/hlt2_noUT/d0_to_hh.py             |  9 +++
 .../options/hlt2_noUT/d0_to_hhhh.py           |  8 +++
 .../options/hlt2_noUT/d0_to_hhpi0.py          |  8 +++
 .../options/hlt2_noUT/d0_to_kshh.py           |  8 +++
 .../options/hlt2_noUT/d0_to_ksks.py           |  8 +++
 .../options/hlt2_noUT/d_to_hhh.py             | 10 ++++
 .../options/hlt2_noUT/d_to_ksh.py             | 10 ++++
 .../options/hlt2_noUT/dst_to_dee.py           |  9 +++
 .../{hlt2/hlt2noUT.py => hlt2_noUT/hlt2.py}   |  0
 .../options/hlt2_noUT/hlt2_d0_to_hh.py        | 41 +++++++++++++
 .../options/hlt2_noUT/hlt2_d0_to_hhhh.py      | 40 +++++++++++++
 .../options/hlt2_noUT/hlt2_d0_to_hhpi0.py     | 40 +++++++++++++
 .../options/hlt2_noUT/hlt2_d0_to_kshh.py      | 40 +++++++++++++
 .../options/hlt2_noUT/hlt2_d0_to_ksks.py      | 40 +++++++++++++
 .../options/hlt2_noUT/hlt2_d_to_hhh.py        | 42 ++++++++++++++
 .../options/hlt2_noUT/hlt2_d_to_ksh.py        | 42 ++++++++++++++
 .../options/hlt2_noUT/hlt2_dst_to_dee.py      | 41 +++++++++++++
 .../options/hlt2_noUT/hlt2_rare_charm.py      | 40 +++++++++++++
 .../options/hlt2_noUT/hlt2withUTCarlos.py     | 32 ++++++++++
 .../options/hlt2_noUT/make_hlt2_decay.sh      |  9 +++
 .../options/hlt2_noUT/rare_charm.py           |  8 +++
 34 files changed, 850 insertions(+), 280 deletions(-)
 create mode 100644 Charm_2024validation/options/hlt1_noUT.py
 create mode 100644 Charm_2024validation/options/hlt2_noUT/d0_to_hh.py
 create mode 100644 Charm_2024validation/options/hlt2_noUT/d0_to_hhhh.py
 create mode 100644 Charm_2024validation/options/hlt2_noUT/d0_to_hhpi0.py
 create mode 100644 Charm_2024validation/options/hlt2_noUT/d0_to_kshh.py
 create mode 100644 Charm_2024validation/options/hlt2_noUT/d0_to_ksks.py
 create mode 100644 Charm_2024validation/options/hlt2_noUT/d_to_hhh.py
 create mode 100644 Charm_2024validation/options/hlt2_noUT/d_to_ksh.py
 create mode 100644 Charm_2024validation/options/hlt2_noUT/dst_to_dee.py
 rename Charm_2024validation/options/{hlt2/hlt2noUT.py => hlt2_noUT/hlt2.py} (100%)
 create mode 100644 Charm_2024validation/options/hlt2_noUT/hlt2_d0_to_hh.py
 create mode 100644 Charm_2024validation/options/hlt2_noUT/hlt2_d0_to_hhhh.py
 create mode 100644 Charm_2024validation/options/hlt2_noUT/hlt2_d0_to_hhpi0.py
 create mode 100644 Charm_2024validation/options/hlt2_noUT/hlt2_d0_to_kshh.py
 create mode 100644 Charm_2024validation/options/hlt2_noUT/hlt2_d0_to_ksks.py
 create mode 100644 Charm_2024validation/options/hlt2_noUT/hlt2_d_to_hhh.py
 create mode 100644 Charm_2024validation/options/hlt2_noUT/hlt2_d_to_ksh.py
 create mode 100644 Charm_2024validation/options/hlt2_noUT/hlt2_dst_to_dee.py
 create mode 100644 Charm_2024validation/options/hlt2_noUT/hlt2_rare_charm.py
 create mode 100644 Charm_2024validation/options/hlt2_noUT/hlt2withUTCarlos.py
 create mode 100644 Charm_2024validation/options/hlt2_noUT/make_hlt2_decay.sh
 create mode 100644 Charm_2024validation/options/hlt2_noUT/rare_charm.py

diff --git a/Charm_2024validation/info.yaml b/Charm_2024validation/info.yaml
index ac94d3d4cf..a97f773ee8 100644
--- a/Charm_2024validation/info.yaml
+++ b/Charm_2024validation/info.yaml
@@ -46,7 +46,7 @@ defaults:
 {% for polarity,pol in conditions %}
 
 {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1:
-  application: "Moore/v55r10@x86_64_v2-el9-gcc13+detdesc-opt"
+  application: "Moore/v55r11@x86_64_v2-el9-gcc13+detdesc-opt"
   input:
     bk_query: "/MC/{{dir1}}/Beam6800GeV-2024{{dir2}}-{{polarity}}-Nu{{nu}}-25ns-Pythia8/Sim10d/{{evttype}}/DIGI"
     n_test_lfns: 1
@@ -62,13 +62,13 @@ defaults:
       simulation: True
       data_type: "Upgrade"
       scheduler_legacy_mode: False
-      evt_max: -1
+      evt_max: 10
 
 {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2:
-  application: "Moore/v55r10@x86_64_v2-el9-gcc13+detdesc-opt"
+  application: "Moore/v55r11@x86_64_v2-el9-gcc13+detdesc-opt"
   input:
     job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1
-  output: HLT2.DST
+  output: HLT2.charm.DST
   options:
     entrypoint: Charm_2024validation.options.hlt2.hlt2_{{id}}:alg_config
     extra_options:
@@ -83,7 +83,7 @@ defaults:
       scheduler_legacy_mode: False
 
 MC_{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}:
-  application: "DaVinci/v64r7@x86_64_v3-el9-gcc13+detdesc-opt+g"
+  application: "DaVinci/v64r7@x86_64_v2-el9-gcc13+detdesc-opt"
   input:
     job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2
   output: DVTUPLE.ROOT
@@ -92,13 +92,15 @@ MC_{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}:
     extra_options:
       conddb_tag: sim10-2024.Q1.2-v1.1-{{pol}}100
       dddb_tag: '{{dddb}}'
+      geometry_version: run3/2024.Q1.2-v00.00
       input_raw_format: 0.5
       input_type: ROOT
       simulation: True
       data_type: "Upgrade"
       event_store: HiveWhiteBoard
-      input_process: "Hlt2"
+      input_stream: "charm"
       input_manifest_file: "HLT2.tck.json"
+      write_decoding_keys_to_git: false
       
 {%- endfor %}
 {%- endfor %}
diff --git a/Charm_2024validation/options/hlt1.py b/Charm_2024validation/options/hlt1.py
index b93aeb113c..fd51d865e4 100644
--- a/Charm_2024validation/options/hlt1.py
+++ b/Charm_2024validation/options/hlt1.py
@@ -24,10 +24,20 @@ def alg_config(options: Options):
     """
 
     config = configure_input(options)
-    with allen_gaudi_config.bind(sequence="hlt1_pp_matching_no_ut_1000KHz"), make_passthrough_line.bind(pre_scaler=1):
-        line_names = get_allen_line_names()
-        allen_node = allen_control_flow(options)
-        config.update(configure(options, allen_node))
+    from Moore.production import hlt1
+    hlt1(options, "--sequence=hlt1_pp_matching_no_ut_1000KHz", "--flagging")
+    #line_names = get_allen_line_names()
+    #allen_node = allen_control_flow(options)
+    #config.update(configure(options, allen_node))
 
     return config
 
+'''
+from Moore.production import hlt1
+hlt1(options, "--sequence=hlt1_pp_matching_no_ut_1000KHz", "--flagging")
+'''
+
+'''
+    with allen_gaudi_config.bind(sequence="hlt1_pp_matching_no_ut_1000KHz"), make_passthrough_line.bind(pre_scaler=1):
+
+'''
diff --git a/Charm_2024validation/options/hlt1_noUT.py b/Charm_2024validation/options/hlt1_noUT.py
new file mode 100644
index 0000000000..b93aeb113c
--- /dev/null
+++ b/Charm_2024validation/options/hlt1_noUT.py
@@ -0,0 +1,33 @@
+###############################################################################
+# (c) Copyright 2023 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.                                       #
+###############################################################################
+"""
+Configures running HLT1 via Moore.
+"""
+
+from Moore import Options
+from Moore.config import allen_control_flow
+from RecoConf.hlt1_allen import allen_gaudi_config, get_allen_line_names
+from AllenConf.hlt1_calibration_lines import make_passthrough_line
+from PyConf.application import configure_input, configure
+
+def alg_config(options: Options):
+    """
+    Configures algorithm running of HLT1 via Moore to be passed to Analysis Productions.
+    """
+
+    config = configure_input(options)
+    with allen_gaudi_config.bind(sequence="hlt1_pp_matching_no_ut_1000KHz"), make_passthrough_line.bind(pre_scaler=1):
+        line_names = get_allen_line_names()
+        allen_node = allen_control_flow(options)
+        config.update(configure(options, allen_node))
+
+    return config
+
diff --git a/Charm_2024validation/options/hlt2/hlt2.py b/Charm_2024validation/options/hlt2/hlt2.py
index c1560ce952..7edd6ed888 100644
--- a/Charm_2024validation/options/hlt2/hlt2.py
+++ b/Charm_2024validation/options/hlt2/hlt2.py
@@ -1,32 +1,36 @@
-import Moore
+########################################
+# Generic Imports (minimalistic)
+########################################
+from Moore.streams import DETECTORS, Stream, Streams
+def make_streams():
+    streams = [
+        Stream("charm",
+               lines=make_lines(),
+               routing_bit=99,
+               detectors=[])
+    ]
+    return Streams(streams=streams)
 from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from Moore.lines import Hlt2Line
+from Hlt2Conf.settings.hlt2_binds import config_pp_2024, config_pp_2024_without_UT
+from RecoConf.global_tools import (
+    stateProvider_with_simplified_geom,
+    trackMasterExtrapolator_with_simplified_geom)
 from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
+from PyConf.Tools import TrackMasterExtrapolator, TrackMasterFitter
+
+TrackMasterExtrapolator.global_bind(
+    ApplyMultScattCorr=False,
+    ApplyEnergyLossCorr=False,
+    ApplyElectronEnergyLossCorr=False,
 )
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
+TrackMasterFitter.global_bind(ApplyMaterialCorrections=False)
+public_tools = [
+    trackMasterExtrapolator_with_simplified_geom(),
+    stateProvider_with_simplified_geom(),
+]
 
 def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
+
+    with reconstruction.bind( from_file = False) , config_pp_2024() :   
+        return run_moore(options, make_streams, public_tools=public_tools)
diff --git a/Charm_2024validation/options/hlt2/hlt2_d0_to_hh.py b/Charm_2024validation/options/hlt2/hlt2_d0_to_hh.py
index 7c3a67ed03..18f95936f1 100644
--- a/Charm_2024validation/options/hlt2/hlt2_d0_to_hh.py
+++ b/Charm_2024validation/options/hlt2/hlt2_d0_to_hh.py
@@ -7,35 +7,39 @@ def make_lines():
     mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
     return mylines
 
-import Moore
+########################################
+# Generic Imports (minimalistic)
+########################################
+from Moore.streams import DETECTORS, Stream, Streams
+def make_streams():
+    streams = [
+        Stream("charm",
+               lines=make_lines(),
+               routing_bit=99,
+               detectors=[])
+    ]
+    return Streams(streams=streams)
 from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from Moore.lines import Hlt2Line
+from Hlt2Conf.settings.hlt2_binds import config_pp_2024, config_pp_2024_without_UT
+from RecoConf.global_tools import (
+    stateProvider_with_simplified_geom,
+    trackMasterExtrapolator_with_simplified_geom)
 from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
+from PyConf.Tools import TrackMasterExtrapolator, TrackMasterFitter
+
+TrackMasterExtrapolator.global_bind(
+    ApplyMultScattCorr=False,
+    ApplyEnergyLossCorr=False,
+    ApplyElectronEnergyLossCorr=False,
 )
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
+TrackMasterFitter.global_bind(ApplyMaterialCorrections=False)
+public_tools = [
+    trackMasterExtrapolator_with_simplified_geom(),
+    stateProvider_with_simplified_geom(),
+]
 
 def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
+
+    with reconstruction.bind( from_file = False) , config_pp_2024() :   
+        return run_moore(options, make_streams, public_tools=public_tools)
diff --git a/Charm_2024validation/options/hlt2/hlt2_d0_to_hhhh.py b/Charm_2024validation/options/hlt2/hlt2_d0_to_hhhh.py
index d7d5dcbb90..965bc23e30 100644
--- a/Charm_2024validation/options/hlt2/hlt2_d0_to_hhhh.py
+++ b/Charm_2024validation/options/hlt2/hlt2_d0_to_hhhh.py
@@ -6,35 +6,39 @@ def make_lines():
     mylines = [builder() for builder in hhhh_lines.values()]
     mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
     return mylines
-import Moore
+########################################
+# Generic Imports (minimalistic)
+########################################
+from Moore.streams import DETECTORS, Stream, Streams
+def make_streams():
+    streams = [
+        Stream("charm",
+               lines=make_lines(),
+               routing_bit=99,
+               detectors=[])
+    ]
+    return Streams(streams=streams)
 from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from Moore.lines import Hlt2Line
+from Hlt2Conf.settings.hlt2_binds import config_pp_2024, config_pp_2024_without_UT
+from RecoConf.global_tools import (
+    stateProvider_with_simplified_geom,
+    trackMasterExtrapolator_with_simplified_geom)
 from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
+from PyConf.Tools import TrackMasterExtrapolator, TrackMasterFitter
+
+TrackMasterExtrapolator.global_bind(
+    ApplyMultScattCorr=False,
+    ApplyEnergyLossCorr=False,
+    ApplyElectronEnergyLossCorr=False,
 )
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
+TrackMasterFitter.global_bind(ApplyMaterialCorrections=False)
+public_tools = [
+    trackMasterExtrapolator_with_simplified_geom(),
+    stateProvider_with_simplified_geom(),
+]
 
 def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
+
+    with reconstruction.bind( from_file = False) , config_pp_2024() :   
+        return run_moore(options, make_streams, public_tools=public_tools)
diff --git a/Charm_2024validation/options/hlt2/hlt2_d0_to_hhpi0.py b/Charm_2024validation/options/hlt2/hlt2_d0_to_hhpi0.py
index 063eeb274a..a6e53e3b78 100644
--- a/Charm_2024validation/options/hlt2/hlt2_d0_to_hhpi0.py
+++ b/Charm_2024validation/options/hlt2/hlt2_d0_to_hhpi0.py
@@ -6,35 +6,39 @@ def make_lines():
     mylines = [builder() for builder in hhpi0_lines.values()]
     mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
     return mylines
-import Moore
+########################################
+# Generic Imports (minimalistic)
+########################################
+from Moore.streams import DETECTORS, Stream, Streams
+def make_streams():
+    streams = [
+        Stream("charm",
+               lines=make_lines(),
+               routing_bit=99,
+               detectors=[])
+    ]
+    return Streams(streams=streams)
 from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from Moore.lines import Hlt2Line
+from Hlt2Conf.settings.hlt2_binds import config_pp_2024, config_pp_2024_without_UT
+from RecoConf.global_tools import (
+    stateProvider_with_simplified_geom,
+    trackMasterExtrapolator_with_simplified_geom)
 from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
+from PyConf.Tools import TrackMasterExtrapolator, TrackMasterFitter
+
+TrackMasterExtrapolator.global_bind(
+    ApplyMultScattCorr=False,
+    ApplyEnergyLossCorr=False,
+    ApplyElectronEnergyLossCorr=False,
 )
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
+TrackMasterFitter.global_bind(ApplyMaterialCorrections=False)
+public_tools = [
+    trackMasterExtrapolator_with_simplified_geom(),
+    stateProvider_with_simplified_geom(),
+]
 
 def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
+
+    with reconstruction.bind( from_file = False) , config_pp_2024() :   
+        return run_moore(options, make_streams, public_tools=public_tools)
diff --git a/Charm_2024validation/options/hlt2/hlt2_d0_to_kshh.py b/Charm_2024validation/options/hlt2/hlt2_d0_to_kshh.py
index 3e1996cdf0..cd21f7598b 100644
--- a/Charm_2024validation/options/hlt2/hlt2_d0_to_kshh.py
+++ b/Charm_2024validation/options/hlt2/hlt2_d0_to_kshh.py
@@ -6,35 +6,39 @@ def make_lines():
     mylines = [builder() for builder in kshh_lines.values()]
     mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
     return mylines
-import Moore
+########################################
+# Generic Imports (minimalistic)
+########################################
+from Moore.streams import DETECTORS, Stream, Streams
+def make_streams():
+    streams = [
+        Stream("charm",
+               lines=make_lines(),
+               routing_bit=99,
+               detectors=[])
+    ]
+    return Streams(streams=streams)
 from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from Moore.lines import Hlt2Line
+from Hlt2Conf.settings.hlt2_binds import config_pp_2024, config_pp_2024_without_UT
+from RecoConf.global_tools import (
+    stateProvider_with_simplified_geom,
+    trackMasterExtrapolator_with_simplified_geom)
 from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
+from PyConf.Tools import TrackMasterExtrapolator, TrackMasterFitter
+
+TrackMasterExtrapolator.global_bind(
+    ApplyMultScattCorr=False,
+    ApplyEnergyLossCorr=False,
+    ApplyElectronEnergyLossCorr=False,
 )
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
+TrackMasterFitter.global_bind(ApplyMaterialCorrections=False)
+public_tools = [
+    trackMasterExtrapolator_with_simplified_geom(),
+    stateProvider_with_simplified_geom(),
+]
 
 def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
+
+    with reconstruction.bind( from_file = False) , config_pp_2024() :   
+        return run_moore(options, make_streams, public_tools=public_tools)
diff --git a/Charm_2024validation/options/hlt2/hlt2_d0_to_ksks.py b/Charm_2024validation/options/hlt2/hlt2_d0_to_ksks.py
index e8d1052803..ef758d0f1f 100644
--- a/Charm_2024validation/options/hlt2/hlt2_d0_to_ksks.py
+++ b/Charm_2024validation/options/hlt2/hlt2_d0_to_ksks.py
@@ -6,35 +6,39 @@ def make_lines():
     mylines = [builder() for builder in ksks_lines.values()]
     mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
     return mylines
-import Moore
+########################################
+# Generic Imports (minimalistic)
+########################################
+from Moore.streams import DETECTORS, Stream, Streams
+def make_streams():
+    streams = [
+        Stream("charm",
+               lines=make_lines(),
+               routing_bit=99,
+               detectors=[])
+    ]
+    return Streams(streams=streams)
 from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from Moore.lines import Hlt2Line
+from Hlt2Conf.settings.hlt2_binds import config_pp_2024, config_pp_2024_without_UT
+from RecoConf.global_tools import (
+    stateProvider_with_simplified_geom,
+    trackMasterExtrapolator_with_simplified_geom)
 from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
+from PyConf.Tools import TrackMasterExtrapolator, TrackMasterFitter
+
+TrackMasterExtrapolator.global_bind(
+    ApplyMultScattCorr=False,
+    ApplyEnergyLossCorr=False,
+    ApplyElectronEnergyLossCorr=False,
 )
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
+TrackMasterFitter.global_bind(ApplyMaterialCorrections=False)
+public_tools = [
+    trackMasterExtrapolator_with_simplified_geom(),
+    stateProvider_with_simplified_geom(),
+]
 
 def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
+
+    with reconstruction.bind( from_file = False) , config_pp_2024() :   
+        return run_moore(options, make_streams, public_tools=public_tools)
diff --git a/Charm_2024validation/options/hlt2/hlt2_d_to_hhh.py b/Charm_2024validation/options/hlt2/hlt2_d_to_hhh.py
index 97965cb96e..84909f2f7f 100644
--- a/Charm_2024validation/options/hlt2/hlt2_d_to_hhh.py
+++ b/Charm_2024validation/options/hlt2/hlt2_d_to_hhh.py
@@ -8,35 +8,39 @@ def make_lines():
     mylines += [builder() for builder in det_asy_lines.values()]
     mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
     return mylines
-import Moore
+########################################
+# Generic Imports (minimalistic)
+########################################
+from Moore.streams import DETECTORS, Stream, Streams
+def make_streams():
+    streams = [
+        Stream("charm",
+               lines=make_lines(),
+               routing_bit=99,
+               detectors=[])
+    ]
+    return Streams(streams=streams)
 from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from Moore.lines import Hlt2Line
+from Hlt2Conf.settings.hlt2_binds import config_pp_2024, config_pp_2024_without_UT
+from RecoConf.global_tools import (
+    stateProvider_with_simplified_geom,
+    trackMasterExtrapolator_with_simplified_geom)
 from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
+from PyConf.Tools import TrackMasterExtrapolator, TrackMasterFitter
+
+TrackMasterExtrapolator.global_bind(
+    ApplyMultScattCorr=False,
+    ApplyEnergyLossCorr=False,
+    ApplyElectronEnergyLossCorr=False,
 )
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
+TrackMasterFitter.global_bind(ApplyMaterialCorrections=False)
+public_tools = [
+    trackMasterExtrapolator_with_simplified_geom(),
+    stateProvider_with_simplified_geom(),
+]
 
 def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
+
+    with reconstruction.bind( from_file = False) , config_pp_2024() :   
+        return run_moore(options, make_streams, public_tools=public_tools)
diff --git a/Charm_2024validation/options/hlt2/hlt2_d_to_ksh.py b/Charm_2024validation/options/hlt2/hlt2_d_to_ksh.py
index d2593da6a9..836afe5c2f 100644
--- a/Charm_2024validation/options/hlt2/hlt2_d_to_ksh.py
+++ b/Charm_2024validation/options/hlt2/hlt2_d_to_ksh.py
@@ -8,35 +8,39 @@ def make_lines():
     mylines += [builder() for builder in det_asy_lines.values()]
     mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
     return mylines
-import Moore
+########################################
+# Generic Imports (minimalistic)
+########################################
+from Moore.streams import DETECTORS, Stream, Streams
+def make_streams():
+    streams = [
+        Stream("charm",
+               lines=make_lines(),
+               routing_bit=99,
+               detectors=[])
+    ]
+    return Streams(streams=streams)
 from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from Moore.lines import Hlt2Line
+from Hlt2Conf.settings.hlt2_binds import config_pp_2024, config_pp_2024_without_UT
+from RecoConf.global_tools import (
+    stateProvider_with_simplified_geom,
+    trackMasterExtrapolator_with_simplified_geom)
 from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
+from PyConf.Tools import TrackMasterExtrapolator, TrackMasterFitter
+
+TrackMasterExtrapolator.global_bind(
+    ApplyMultScattCorr=False,
+    ApplyEnergyLossCorr=False,
+    ApplyElectronEnergyLossCorr=False,
 )
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
+TrackMasterFitter.global_bind(ApplyMaterialCorrections=False)
+public_tools = [
+    trackMasterExtrapolator_with_simplified_geom(),
+    stateProvider_with_simplified_geom(),
+]
 
 def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
+
+    with reconstruction.bind( from_file = False) , config_pp_2024() :   
+        return run_moore(options, make_streams, public_tools=public_tools)
diff --git a/Charm_2024validation/options/hlt2/hlt2_dst_to_dee.py b/Charm_2024validation/options/hlt2/hlt2_dst_to_dee.py
index d43ecbcd65..733fc98340 100644
--- a/Charm_2024validation/options/hlt2/hlt2_dst_to_dee.py
+++ b/Charm_2024validation/options/hlt2/hlt2_dst_to_dee.py
@@ -7,35 +7,39 @@ def make_lines():
     mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
     return mylines
 
-import Moore
+########################################
+# Generic Imports (minimalistic)
+########################################
+from Moore.streams import DETECTORS, Stream, Streams
+def make_streams():
+    streams = [
+        Stream("charm",
+               lines=make_lines(),
+               routing_bit=99,
+               detectors=[])
+    ]
+    return Streams(streams=streams)
 from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from Moore.lines import Hlt2Line
+from Hlt2Conf.settings.hlt2_binds import config_pp_2024, config_pp_2024_without_UT
+from RecoConf.global_tools import (
+    stateProvider_with_simplified_geom,
+    trackMasterExtrapolator_with_simplified_geom)
 from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
+from PyConf.Tools import TrackMasterExtrapolator, TrackMasterFitter
+
+TrackMasterExtrapolator.global_bind(
+    ApplyMultScattCorr=False,
+    ApplyEnergyLossCorr=False,
+    ApplyElectronEnergyLossCorr=False,
 )
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
+TrackMasterFitter.global_bind(ApplyMaterialCorrections=False)
+public_tools = [
+    trackMasterExtrapolator_with_simplified_geom(),
+    stateProvider_with_simplified_geom(),
+]
 
 def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
+
+    with reconstruction.bind( from_file = False) , config_pp_2024() :   
+        return run_moore(options, make_streams, public_tools=public_tools)
diff --git a/Charm_2024validation/options/hlt2/hlt2_rare_charm.py b/Charm_2024validation/options/hlt2/hlt2_rare_charm.py
index cb9ac88a02..be7558c8bf 100644
--- a/Charm_2024validation/options/hlt2/hlt2_rare_charm.py
+++ b/Charm_2024validation/options/hlt2/hlt2_rare_charm.py
@@ -6,35 +6,39 @@ def make_lines():
     mylines = [builder() for builder in rare_charm_lines.values()]
     mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
     return mylines
-import Moore
+########################################
+# Generic Imports (minimalistic)
+########################################
+from Moore.streams import DETECTORS, Stream, Streams
+def make_streams():
+    streams = [
+        Stream("charm",
+               lines=make_lines(),
+               routing_bit=99,
+               detectors=[])
+    ]
+    return Streams(streams=streams)
 from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from Moore.lines import Hlt2Line
+from Hlt2Conf.settings.hlt2_binds import config_pp_2024, config_pp_2024_without_UT
+from RecoConf.global_tools import (
+    stateProvider_with_simplified_geom,
+    trackMasterExtrapolator_with_simplified_geom)
 from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
+from PyConf.Tools import TrackMasterExtrapolator, TrackMasterFitter
+
+TrackMasterExtrapolator.global_bind(
+    ApplyMultScattCorr=False,
+    ApplyEnergyLossCorr=False,
+    ApplyElectronEnergyLossCorr=False,
 )
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
+TrackMasterFitter.global_bind(ApplyMaterialCorrections=False)
+public_tools = [
+    trackMasterExtrapolator_with_simplified_geom(),
+    stateProvider_with_simplified_geom(),
+]
 
 def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
+
+    with reconstruction.bind( from_file = False) , config_pp_2024() :   
+        return run_moore(options, make_streams, public_tools=public_tools)
diff --git a/Charm_2024validation/options/hlt2_noUT/d0_to_hh.py b/Charm_2024validation/options/hlt2_noUT/d0_to_hh.py
new file mode 100644
index 0000000000..3c0b0d0086
--- /dev/null
+++ b/Charm_2024validation/options/hlt2_noUT/d0_to_hh.py
@@ -0,0 +1,9 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d0_to_hh import all_lines as hh_lines
+
+def make_lines():
+    mylines = [builder() for builder in hh_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+
diff --git a/Charm_2024validation/options/hlt2_noUT/d0_to_hhhh.py b/Charm_2024validation/options/hlt2_noUT/d0_to_hhhh.py
new file mode 100644
index 0000000000..81fe4dce30
--- /dev/null
+++ b/Charm_2024validation/options/hlt2_noUT/d0_to_hhhh.py
@@ -0,0 +1,8 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d0_to_hhhh import all_lines as hhhh_lines
+
+def make_lines():
+    mylines = [builder() for builder in hhhh_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
diff --git a/Charm_2024validation/options/hlt2_noUT/d0_to_hhpi0.py b/Charm_2024validation/options/hlt2_noUT/d0_to_hhpi0.py
new file mode 100644
index 0000000000..52f8433c11
--- /dev/null
+++ b/Charm_2024validation/options/hlt2_noUT/d0_to_hhpi0.py
@@ -0,0 +1,8 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d0_to_hhpi0 import all_lines as hhpi0_lines
+
+def make_lines():
+    mylines = [builder() for builder in hhpi0_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
diff --git a/Charm_2024validation/options/hlt2_noUT/d0_to_kshh.py b/Charm_2024validation/options/hlt2_noUT/d0_to_kshh.py
new file mode 100644
index 0000000000..79df310ed8
--- /dev/null
+++ b/Charm_2024validation/options/hlt2_noUT/d0_to_kshh.py
@@ -0,0 +1,8 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d0_to_kshh import all_lines as kshh_lines
+
+def make_lines():
+    mylines = [builder() for builder in kshh_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
diff --git a/Charm_2024validation/options/hlt2_noUT/d0_to_ksks.py b/Charm_2024validation/options/hlt2_noUT/d0_to_ksks.py
new file mode 100644
index 0000000000..71ab403fd9
--- /dev/null
+++ b/Charm_2024validation/options/hlt2_noUT/d0_to_ksks.py
@@ -0,0 +1,8 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d0_to_ksks import all_lines as ksks_lines
+
+def make_lines():
+    mylines = [builder() for builder in ksks_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
diff --git a/Charm_2024validation/options/hlt2_noUT/d_to_hhh.py b/Charm_2024validation/options/hlt2_noUT/d_to_hhh.py
new file mode 100644
index 0000000000..cd718f9b86
--- /dev/null
+++ b/Charm_2024validation/options/hlt2_noUT/d_to_hhh.py
@@ -0,0 +1,10 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d_to_hhh import all_lines as hhh_lines
+from Hlt2Conf.lines.charm.detection_asymmetry_lines import all_lines as det_asy_lines
+
+def make_lines():
+    mylines = [builder() for builder in hhh_lines.values()]
+    mylines += [builder() for builder in det_asy_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
diff --git a/Charm_2024validation/options/hlt2_noUT/d_to_ksh.py b/Charm_2024validation/options/hlt2_noUT/d_to_ksh.py
new file mode 100644
index 0000000000..8c8b172dd0
--- /dev/null
+++ b/Charm_2024validation/options/hlt2_noUT/d_to_ksh.py
@@ -0,0 +1,10 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d_to_ksh import all_lines as ksh_lines
+from Hlt2Conf.lines.charm.detection_asymmetry_lines import all_lines as det_asy_lines
+
+def make_lines():
+    mylines = [builder() for builder in ksh_lines.values()]
+    mylines += [builder() for builder in det_asy_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
diff --git a/Charm_2024validation/options/hlt2_noUT/dst_to_dee.py b/Charm_2024validation/options/hlt2_noUT/dst_to_dee.py
new file mode 100644
index 0000000000..4fd67becd7
--- /dev/null
+++ b/Charm_2024validation/options/hlt2_noUT/dst_to_dee.py
@@ -0,0 +1,9 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.dst_to_dee import all_lines as dst_to_dee_lines
+
+def make_lines():
+    mylines = [builder() for builder in dst_to_dee_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+
diff --git a/Charm_2024validation/options/hlt2/hlt2noUT.py b/Charm_2024validation/options/hlt2_noUT/hlt2.py
similarity index 100%
rename from Charm_2024validation/options/hlt2/hlt2noUT.py
rename to Charm_2024validation/options/hlt2_noUT/hlt2.py
diff --git a/Charm_2024validation/options/hlt2_noUT/hlt2_d0_to_hh.py b/Charm_2024validation/options/hlt2_noUT/hlt2_d0_to_hh.py
new file mode 100644
index 0000000000..7896029d08
--- /dev/null
+++ b/Charm_2024validation/options/hlt2_noUT/hlt2_d0_to_hh.py
@@ -0,0 +1,41 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d0_to_hh import all_lines as hh_lines
+
+def make_lines():
+    mylines = [builder() for builder in hh_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf_without_UT
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf_without_UT),\
+         require_gec.bind(skipUT=True),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/options/hlt2_noUT/hlt2_d0_to_hhhh.py b/Charm_2024validation/options/hlt2_noUT/hlt2_d0_to_hhhh.py
new file mode 100644
index 0000000000..a56dd8452a
--- /dev/null
+++ b/Charm_2024validation/options/hlt2_noUT/hlt2_d0_to_hhhh.py
@@ -0,0 +1,40 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d0_to_hhhh import all_lines as hhhh_lines
+
+def make_lines():
+    mylines = [builder() for builder in hhhh_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf_without_UT
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf_without_UT),\
+         require_gec.bind(skipUT=True),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/options/hlt2_noUT/hlt2_d0_to_hhpi0.py b/Charm_2024validation/options/hlt2_noUT/hlt2_d0_to_hhpi0.py
new file mode 100644
index 0000000000..b38b81aaae
--- /dev/null
+++ b/Charm_2024validation/options/hlt2_noUT/hlt2_d0_to_hhpi0.py
@@ -0,0 +1,40 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d0_to_hhpi0 import all_lines as hhpi0_lines
+
+def make_lines():
+    mylines = [builder() for builder in hhpi0_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf_without_UT
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf_without_UT),\
+         require_gec.bind(skipUT=True),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/options/hlt2_noUT/hlt2_d0_to_kshh.py b/Charm_2024validation/options/hlt2_noUT/hlt2_d0_to_kshh.py
new file mode 100644
index 0000000000..c16b5e303d
--- /dev/null
+++ b/Charm_2024validation/options/hlt2_noUT/hlt2_d0_to_kshh.py
@@ -0,0 +1,40 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d0_to_kshh import all_lines as kshh_lines
+
+def make_lines():
+    mylines = [builder() for builder in kshh_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf_without_UT
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf_without_UT),\
+         require_gec.bind(skipUT=True),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/options/hlt2_noUT/hlt2_d0_to_ksks.py b/Charm_2024validation/options/hlt2_noUT/hlt2_d0_to_ksks.py
new file mode 100644
index 0000000000..a18a45658a
--- /dev/null
+++ b/Charm_2024validation/options/hlt2_noUT/hlt2_d0_to_ksks.py
@@ -0,0 +1,40 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d0_to_ksks import all_lines as ksks_lines
+
+def make_lines():
+    mylines = [builder() for builder in ksks_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf_without_UT
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf_without_UT),\
+         require_gec.bind(skipUT=True),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/options/hlt2_noUT/hlt2_d_to_hhh.py b/Charm_2024validation/options/hlt2_noUT/hlt2_d_to_hhh.py
new file mode 100644
index 0000000000..048feaf912
--- /dev/null
+++ b/Charm_2024validation/options/hlt2_noUT/hlt2_d_to_hhh.py
@@ -0,0 +1,42 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d_to_hhh import all_lines as hhh_lines
+from Hlt2Conf.lines.charm.detection_asymmetry_lines import all_lines as det_asy_lines
+
+def make_lines():
+    mylines = [builder() for builder in hhh_lines.values()]
+    mylines += [builder() for builder in det_asy_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf_without_UT
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf_without_UT),\
+         require_gec.bind(skipUT=True),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/options/hlt2_noUT/hlt2_d_to_ksh.py b/Charm_2024validation/options/hlt2_noUT/hlt2_d_to_ksh.py
new file mode 100644
index 0000000000..4bd087b0b2
--- /dev/null
+++ b/Charm_2024validation/options/hlt2_noUT/hlt2_d_to_ksh.py
@@ -0,0 +1,42 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.d_to_ksh import all_lines as ksh_lines
+from Hlt2Conf.lines.charm.detection_asymmetry_lines import all_lines as det_asy_lines
+
+def make_lines():
+    mylines = [builder() for builder in ksh_lines.values()]
+    mylines += [builder() for builder in det_asy_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf_without_UT
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf_without_UT),\
+         require_gec.bind(skipUT=True),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/options/hlt2_noUT/hlt2_dst_to_dee.py b/Charm_2024validation/options/hlt2_noUT/hlt2_dst_to_dee.py
new file mode 100644
index 0000000000..4b65028429
--- /dev/null
+++ b/Charm_2024validation/options/hlt2_noUT/hlt2_dst_to_dee.py
@@ -0,0 +1,41 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.dst_to_dee import all_lines as dst_to_dee_lines
+
+def make_lines():
+    mylines = [builder() for builder in dst_to_dee_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf_without_UT
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf_without_UT),\
+         require_gec.bind(skipUT=True),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/options/hlt2_noUT/hlt2_rare_charm.py b/Charm_2024validation/options/hlt2_noUT/hlt2_rare_charm.py
new file mode 100644
index 0000000000..92f80cdaf9
--- /dev/null
+++ b/Charm_2024validation/options/hlt2_noUT/hlt2_rare_charm.py
@@ -0,0 +1,40 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.rare_charm_lines import all_lines as rare_charm_lines
+
+def make_lines():
+    mylines = [builder() for builder in rare_charm_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf_without_UT
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf_without_UT),\
+         require_gec.bind(skipUT=True),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/options/hlt2_noUT/hlt2withUTCarlos.py b/Charm_2024validation/options/hlt2_noUT/hlt2withUTCarlos.py
new file mode 100644
index 0000000000..c1560ce952
--- /dev/null
+++ b/Charm_2024validation/options/hlt2_noUT/hlt2withUTCarlos.py
@@ -0,0 +1,32 @@
+import Moore
+from Moore import Options, run_moore
+from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
+from RecoConf.reconstruction_objects import reconstruction
+from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
+from RecoConf.hlt2_tracking import (
+    make_TrackBestTrackCreator_tracks,
+    make_PrKalmanFilter_noUT_tracks,
+    make_PrKalmanFilter_Velo_tracks,
+    make_PrKalmanFilter_Seed_tracks,
+)
+from RecoConf.decoders import default_VeloCluster_source
+from RecoConf.event_filters import require_gec
+from Moore.streams import Stream, Streams
+from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
+import sys
+
+def alg_config(options: Options):
+    public_tools = [
+        trackMasterExtrapolator_with_simplified_geom(),
+        stateProvider_with_simplified_geom(),
+    ]
+    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
+    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
+         require_gec.bind(skipUT=False),\
+         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
+         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
+         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
+         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
+         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
+        config = run_moore(options, make_lines, public_tools)
+    return config
diff --git a/Charm_2024validation/options/hlt2_noUT/make_hlt2_decay.sh b/Charm_2024validation/options/hlt2_noUT/make_hlt2_decay.sh
new file mode 100644
index 0000000000..f127b86285
--- /dev/null
+++ b/Charm_2024validation/options/hlt2_noUT/make_hlt2_decay.sh
@@ -0,0 +1,9 @@
+cat d0_to_hh.py hlt2.py > hlt2_d0_to_hh.py
+cat d0_to_hhpi0.py hlt2.py > hlt2_d0_to_hhpi0.py
+cat d0_to_hhhh.py hlt2.py > hlt2_d0_to_hhhh.py
+cat d0_to_kshh.py hlt2.py > hlt2_d0_to_kshh.py
+cat d0_to_ksks.py hlt2.py > hlt2_d0_to_ksks.py
+cat d_to_hhh.py hlt2.py > hlt2_d_to_hhh.py
+cat d_to_ksh.py hlt2.py > hlt2_d_to_ksh.py
+cat rare_charm.py hlt2.py > hlt2_rare_charm.py
+cat dst_to_dee.py hlt2.py > hlt2_dst_to_dee.py
diff --git a/Charm_2024validation/options/hlt2_noUT/rare_charm.py b/Charm_2024validation/options/hlt2_noUT/rare_charm.py
new file mode 100644
index 0000000000..39194555f0
--- /dev/null
+++ b/Charm_2024validation/options/hlt2_noUT/rare_charm.py
@@ -0,0 +1,8 @@
+################## options ############
+from Moore.lines import Hlt2Line
+from Hlt2Conf.lines.charm.rare_charm_lines import all_lines as rare_charm_lines
+
+def make_lines():
+    mylines = [builder() for builder in rare_charm_lines.values()]
+    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
+    return mylines
-- 
GitLab


From 4db13cbd0769330d504001e92abb21a9fd78051e Mon Sep 17 00:00:00 2001
From: Serena Maccolini <serena.maccolini@cern.ch>
Date: Wed, 17 Jul 2024 11:23:46 +0200
Subject: [PATCH 16/51] hlt1+hlt2 OK

---
 Charm_2024validation/info.yaml | 2 --
 1 file changed, 2 deletions(-)

diff --git a/Charm_2024validation/info.yaml b/Charm_2024validation/info.yaml
index a97f773ee8..824f6dff21 100644
--- a/Charm_2024validation/info.yaml
+++ b/Charm_2024validation/info.yaml
@@ -62,7 +62,6 @@ defaults:
       simulation: True
       data_type: "Upgrade"
       scheduler_legacy_mode: False
-      evt_max: 10
 
 {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2:
   application: "Moore/v55r11@x86_64_v2-el9-gcc13+detdesc-opt"
@@ -100,7 +99,6 @@ MC_{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}:
       event_store: HiveWhiteBoard
       input_stream: "charm"
       input_manifest_file: "HLT2.tck.json"
-      write_decoding_keys_to_git: false
       
 {%- endfor %}
 {%- endfor %}
-- 
GitLab


From 8235d8d3d83706f8bd2aee61801137a6f887770b Mon Sep 17 00:00:00 2001
From: Serena Maccolini <serena.maccolini@cern.ch>
Date: Wed, 17 Jul 2024 13:40:17 +0200
Subject: [PATCH 17/51] using DaVinciv64r8 with DD4Hep

---
 Charm_2024validation/info.yaml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Charm_2024validation/info.yaml b/Charm_2024validation/info.yaml
index 824f6dff21..7fe5379873 100644
--- a/Charm_2024validation/info.yaml
+++ b/Charm_2024validation/info.yaml
@@ -82,7 +82,7 @@ defaults:
       scheduler_legacy_mode: False
 
 MC_{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}:
-  application: "DaVinci/v64r7@x86_64_v2-el9-gcc13+detdesc-opt"
+  application: "DaVinci/v64r8"
   input:
     job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2
   output: DVTUPLE.ROOT
@@ -92,6 +92,7 @@ MC_{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}:
       conddb_tag: sim10-2024.Q1.2-v1.1-{{pol}}100
       dddb_tag: '{{dddb}}'
       geometry_version: run3/2024.Q1.2-v00.00
+      conditions_version: "sim10/run3-ideal"
       input_raw_format: 0.5
       input_type: ROOT
       simulation: True
-- 
GitLab


From 042152321ed88ae837b2788e58766b3df715add9 Mon Sep 17 00:00:00 2001
From: Serena Maccolini <serena.maccolini@cern.ch>
Date: Thu, 18 Jul 2024 17:12:24 +0200
Subject: [PATCH 18/51] back-to-DVv64r7-detdesc + KShh Hlt1 line

---
 Charm_2024validation/info.yaml           | 42 ++++++++++++++++++++++--
 Charm_2024validation/main_d_to_hhh.py    |  2 +-
 Charm_2024validation/options/d_to_ksh.py | 38 ++++++++++-----------
 Charm_2024validation/options/tupling.py  | 39 +++++++++++++---------
 4 files changed, 84 insertions(+), 37 deletions(-)

diff --git a/Charm_2024validation/info.yaml b/Charm_2024validation/info.yaml
index 7fe5379873..2f71390164 100644
--- a/Charm_2024validation/info.yaml
+++ b/Charm_2024validation/info.yaml
@@ -82,7 +82,7 @@ defaults:
       scheduler_legacy_mode: False
 
 MC_{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}:
-  application: "DaVinci/v64r8"
+  application: "DaVinci/v64r7@x86_64_v2-el9-gcc13+detdesc-opt"
   input:
     job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2
   output: DVTUPLE.ROOT
@@ -92,7 +92,6 @@ MC_{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}:
       conddb_tag: sim10-2024.Q1.2-v1.1-{{pol}}100
       dddb_tag: '{{dddb}}'
       geometry_version: run3/2024.Q1.2-v00.00
-      conditions_version: "sim10/run3-ideal"
       input_raw_format: 0.5
       input_type: ROOT
       simulation: True
@@ -103,3 +102,42 @@ MC_{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}:
       
 {%- endfor %}
 {%- endfor %}
+
+
+{%- set conditions = [
+  "MagDown",
+]%}
+
+{%- set subsamples = [
+  "d0_to_kshh",
+]%}
+
+{% for id in subsamples %}
+{% for polarity in conditions %}
+
+{{id}}_2024_{{ polarity }}:
+  application: "DaVinci/v64r7"
+  input:
+    bk_query: "/LHCb/Collision24/Beam6800GeV-VeloClosed-{{polarity}}/Real Data/Sprucing24c2/94000000/CHARM.DST"
+
+    dq_flags:
+      - UNCHECKED
+      - OK
+    keep_running: true
+  output: DVTUPLE_{{id}}.ROOT
+  options:
+    entrypoint: Charm_2024validation.main_{{id}}:main
+    extra_options:
+      input_raw_format: 0.5
+      input_type: ROOT
+      simulation: False
+      data_type: "Upgrade"
+      event_store: HiveWhiteBoard
+      geometry_version: run3/2024.Q1.2-v00.00
+      conditions_version: master
+      input_process: "TurboPass"
+      input_stream: "charm"
+      evt_max: -1
+
+{%- endfor %}
+{%- endfor %}
diff --git a/Charm_2024validation/main_d_to_hhh.py b/Charm_2024validation/main_d_to_hhh.py
index 516e32b119..00d753301b 100644
--- a/Charm_2024validation/main_d_to_hhh.py
+++ b/Charm_2024validation/main_d_to_hhh.py
@@ -51,7 +51,7 @@ def main(options: Options):
 
     MCtuples = {
         "MC_D2Kpipi" : maketuple_MC_D2Kpipi(options, pvs, rec_summary),
-        "MC_Ds2KKpi" : maketuple_MC_Ds2KKpi(options, pvs, rec_summary)
+        "MC_Ds2KKpi" : maketuple_MC_Ds2KKpi(options, pvs, rec_summary),
         "MC_Ds2KKK" : maketuple_MC_Ds2KKK(options, pvs, rec_summary)
     }
 
diff --git a/Charm_2024validation/options/d_to_ksh.py b/Charm_2024validation/options/d_to_ksh.py
index df40aee746..6428f1b816 100644
--- a/Charm_2024validation/options/d_to_ksh.py
+++ b/Charm_2024validation/options/d_to_ksh.py
@@ -11,7 +11,7 @@ from PyConf.reading import get_particles
 from FunTuple import FunTuple_Particles as Funtuple
 
 
-def make_dtf_variables(options, pvs, input_data, ptype, islong=False):
+def make_dtf_variables(options, pvs, input_data, ptype, islong=True):
 
     if ptype not in ["basic", "composite"]:
         Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
@@ -167,9 +167,9 @@ def maketuple_D2KSK_DD(options, pvs, rec_summary):
     variables = {
         "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
         "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic", islong=False),
+        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic", islong=False),
+        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
@@ -194,9 +194,9 @@ def maketuple_D2KSK_LD(options, pvs, rec_summary):
     variables = {
         "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
         "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic", islong=False),
+        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic", islong=False),
+        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
@@ -222,9 +222,9 @@ def maketuple_D2KSK_LL(options, pvs, rec_summary):
     variables = {
         "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
         "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
@@ -249,9 +249,9 @@ def maketuple_D2KSpi_DD(options, pvs, rec_summary):
     variables = {
         "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
         "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic", islong=False),
+        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic", islong=False),
+        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
@@ -276,9 +276,9 @@ def maketuple_D2KSpi_LD(options, pvs, rec_summary):
     variables = {
         "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
         "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic", islong=False),
+        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic", islong=False),
+        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
@@ -303,9 +303,9 @@ def maketuple_D2KSpi_LL(options, pvs, rec_summary):
     variables = {
         "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
         "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
+        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
diff --git a/Charm_2024validation/options/tupling.py b/Charm_2024validation/options/tupling.py
index 99de572726..494a1309c7 100644
--- a/Charm_2024validation/options/tupling.py
+++ b/Charm_2024validation/options/tupling.py
@@ -83,6 +83,7 @@ Hlt1_1track_lines = [
     "Hlt1SingleHighEtDecision",
 ]
 Hlt1_lines = Hlt1_1track_lines+[
+    "Hlt1D2KshhDecision",
     "Hlt1TwoTrackMVACharmXSecDecision",
     "Hlt1TwoTrackMVADecision",
     "Hlt1TwoTrackKsDecision",
@@ -388,10 +389,10 @@ def make_b_composite_variables(options, pvs, data, add_truth=True):
     get_fdvec_child = get_child_endvtx_pos - get_SV_pos
 
     # define observables
-    IP_wrt_SV = F.IP.bind(get_SV_pos , get_child)
-    IPCHI2_wrt_SV = F.IPCHI2.bind(get_SV , get_child) # only if child is composite (i.e. has vertex)
-    FD_wrt_SV = F.MAGNITUDE @ get_fdvec_child
-    FDCHI2_wrt_SV = F.VTX_FDCHI2.bind(get_SV, get_child)
+    IP_wrt_SV = F.VALUE_OR(-1) @F.IP.bind(get_SV_pos , get_child)
+    IPCHI2_wrt_SV = F.VALUE_OR(-1) @ F.IPCHI2.bind(get_SV , get_child) # only if child is composite (i.e. has vertex)
+    FD_wrt_SV = F.VALUE_OR(-1) @ F.MAGNITUDE @ get_fdvec_child
+    FDCHI2_wrt_SV = F.VALUE_OR(-1) @ F.VTX_FDCHI2.bind(get_SV, get_child)
 
     
     variables = FunctorCollection(
@@ -407,8 +408,8 @@ def make_b_composite_variables(options, pvs, data, add_truth=True):
             "PX": F.PX,
             "PY": F.PY,
             "PZ": F.PZ,
-            "END_VCHI2DOF": F.CHI2DOF @ F.ENDVERTEX,
-            "BPVCHI2DOF": F.CHI2DOF @ F.BPV(pvs),
+            "END_VCHI2DOF": F.VALUE_OR(-1) @F.CHI2DOF @ F.ENDVERTEX,
+            "BPVCHI2DOF": F.VALUE_OR(-1) @F.CHI2DOF @ F.BPV(pvs),
             # B2OC generic B hadron NN Hlt2 algorithm,
             # not planning to use it directly for B2OC EM
             "MVA": F.MVA(
@@ -447,13 +448,13 @@ def make_b_composite_variables(options, pvs, data, add_truth=True):
 def make_DeltaM_variable(options):
     return FunctorCollection({"DM": F.MASS - F.CHILD(1, F.MASS)})
 
-def make_basic_variables(options, pvs, data, add_truth=True, islong = True):
+def make_basic_variables(options, pvs, data, add_truth=True, islong=True):
     if not options.simulation:
         add_truth = False
     variables = (
         FunctorCollection(
             {
-                "TRCHI2DOF": F.CHI2DOF @ F.TRACK,
+                "TRCHI2DOF": F.VALUE_OR(-1) @ F.CHI2DOF @ F.TRACK,
                 "ETA": F.ETA,
                 "PHI": F.PHI,
                 "TRGHOSTPROB": F.GHOSTPROB,
@@ -470,7 +471,7 @@ def make_basic_variables(options, pvs, data, add_truth=True, islong = True):
                 "ISMUON"      : F.ISMUON,
                 "TRACKPT": F.TRACK_PT,
                 "TRACKHISTORY": F.VALUE_OR(-1) @ F.TRACKHISTORY @ F.TRACK,
-                "QOVERP": F.QOVERP @ F.TRACK,
+                "QOVERP": F.VALUE_OR(-1) @ F.QOVERP @ F.TRACK,
                 "NDOF": F.VALUE_OR(-1) @ F.NDOF @ F.TRACK,
                 "NFTHITS": F.VALUE_OR(-1) @ F.NFTHITS @ F.TRACK,
                 "NHITS": F.VALUE_OR(-1) @ F.NHITS @ F.TRACK,
@@ -490,7 +491,11 @@ def make_basic_variables(options, pvs, data, add_truth=True, islong = True):
     )
 
     if islong:
-        variables += FunctorCollection({"CTB": F.TRACK_POSVEC_CLOSESTTOBEAM})
+        variables += FunctorCollection({
+            "CTBX": F.VALUE_OR(F.NaN) @ F.X_COORDINATE @ F.POSITION @ F.CLOSESTTOBEAM @ F.TRACK,#X_COORDINATE @ POSITION @ CLOSESTTOBEAM @ TRACK
+            "CTBY": F.VALUE_OR(F.NaN) @ F.Y_COORDINATE @ F.POSITION @ F.CLOSESTTOBEAM @ F.TRACK,
+            "CTBZ": F.VALUE_OR(F.NaN) @ F.Z_COORDINATE @ F.POSITION @ F.CLOSESTTOBEAM @ F.TRACK,
+        })
     
     variables += HltTisTos(
         selection_type="Hlt1", trigger_lines=Hlt1_1track_lines, data=data
@@ -521,8 +526,8 @@ def make_hlt2_event_variables(options, pvs, rec_summary):
             "ALLPVX": F.ALLPVX(pvs),
             "ALLPVY": F.ALLPVY(pvs),
             "ALLPVZ": F.ALLPVZ(pvs),
-            "ALLPVNDOF": F.MAP(F.VALUE_OR(F.NaN) @ F.NDOF) @ F.TES(pvs),
-            "ALLPVCHI2": F.MAP(F.VALUE_OR(F.NaN) @ F.CHI2) @ F.TES(pvs),
+            "ALLPVNDOF": F.MAP(F.VALUE_OR(-1) @ F.NDOF) @ F.TES(pvs),
+            "ALLPVCHI2": F.MAP(F.VALUE_OR(-1) @ F.CHI2) @ F.TES(pvs),
             "nPVs": F.SIZE(pvs),
             "nTracks": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nTracks"),
             "nLongTracks": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nLongTracks"),
@@ -598,7 +603,7 @@ def make_basic_dtf_variables(options, pvs, data, DTF=None, pv_constraint=False,
     variables = (
         FunctorCollection(
             {
-                "TRCHI2DOF": F.CHI2DOF @ F.TRACK,
+                "TRCHI2DOF": F.VALUE_OR(-1) @ F.CHI2DOF @ F.TRACK,
                 "ETA": F.ETA,
                 "PHI": F.PHI,
                 "TRGHOSTPROB": F.GHOSTPROB,
@@ -614,7 +619,7 @@ def make_basic_dtf_variables(options, pvs, data, DTF=None, pv_constraint=False,
                 "KEY"         : F.VALUE_OR(-1) @ F.OBJECT_KEY @ F.TRACK,
                 "TRACKPT": F.TRACK_PT,
                 "TRACKHISTORY": F.VALUE_OR(-1) @ F.TRACKHISTORY @ F.TRACK,
-                "QOVERP": F.QOVERP @ F.TRACK,
+                "QOVERP": F.VALUE_OR(-1) @ F.QOVERP @ F.TRACK,
                 "NDOF": F.VALUE_OR(-1) @ F.NDOF @ F.TRACK,
             }
         )
@@ -622,7 +627,11 @@ def make_basic_dtf_variables(options, pvs, data, DTF=None, pv_constraint=False,
     )
 
     if islong:
-        variables += FunctorCollection({"CTB": F.TRACK_POSVEC_CLOSESTTOBEAM})
+        variables += FunctorCollection({
+            "CTBX": F.VALUE_OR(F.NaN) @ F.X_COORDINATE @ F.POSITION @ F.CLOSESTTOBEAM @ F.TRACK,#X_COORDINATE @ POSITION @ CLOSESTTOBEAM @ TRACK
+            "CTBY": F.VALUE_OR(F.NaN) @ F.Y_COORDINATE @ F.POSITION @ F.CLOSESTTOBEAM @ F.TRACK,
+            "CTBZ": F.VALUE_OR(F.NaN) @ F.Z_COORDINATE @ F.POSITION @ F.CLOSESTTOBEAM @ F.TRACK,
+        })
     
     if(mass_constraint):
         if(pv_constraint): # MASS + PV
-- 
GitLab


From 67b990884ec36778caeaded317112c33715deb3a Mon Sep 17 00:00:00 2001
From: Serena Maccolini <serena.maccolini@cern.ch>
Date: Mon, 22 Jul 2024 13:33:27 +0200
Subject: [PATCH 19/51] move to clang

---
 Charm_2024validation/info.yaml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Charm_2024validation/info.yaml b/Charm_2024validation/info.yaml
index 2f71390164..dec8763306 100644
--- a/Charm_2024validation/info.yaml
+++ b/Charm_2024validation/info.yaml
@@ -82,7 +82,7 @@ defaults:
       scheduler_legacy_mode: False
 
 MC_{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}:
-  application: "DaVinci/v64r7@x86_64_v2-el9-gcc13+detdesc-opt"
+  application: "DaVinci/v64r8@x86_64_v2-el9-clang16+detdesc-opt"
   input:
     job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2
   output: DVTUPLE.ROOT
@@ -116,7 +116,7 @@ MC_{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}:
 {% for polarity in conditions %}
 
 {{id}}_2024_{{ polarity }}:
-  application: "DaVinci/v64r7"
+  application: "DaVinci/v64r7@x86_64_v2-el9-clang16-opt"
   input:
     bk_query: "/LHCb/Collision24/Beam6800GeV-VeloClosed-{{polarity}}/Real Data/Sprucing24c2/94000000/CHARM.DST"
 
-- 
GitLab


From e2092652a9b5fc4f7d3723d90e34a852d43d7945 Mon Sep 17 00:00:00 2001
From: Serena Maccolini <serena.maccolini@cern.ch>
Date: Wed, 24 Jul 2024 09:23:44 +0200
Subject: [PATCH 20/51] move to clang (fix)

---
 Charm_2024validation/info.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Charm_2024validation/info.yaml b/Charm_2024validation/info.yaml
index dec8763306..92219d7be1 100644
--- a/Charm_2024validation/info.yaml
+++ b/Charm_2024validation/info.yaml
@@ -92,6 +92,7 @@ MC_{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}:
       conddb_tag: sim10-2024.Q1.2-v1.1-{{pol}}100
       dddb_tag: '{{dddb}}'
       geometry_version: run3/2024.Q1.2-v00.00
+      conditions_version: "sim10/run3-ideal"
       input_raw_format: 0.5
       input_type: ROOT
       simulation: True
-- 
GitLab


From fdba20d6288ec004c634e3f9de1a211f5f4ce895 Mon Sep 17 00:00:00 2001
From: Lorenzo Pica <lorenzo.pica@cern.ch>
Date: Wed, 24 Jul 2024 09:55:41 +0200
Subject: [PATCH 21/51] Add d0_to_ksks to MC samples

---
 Charm_2024validation/info.yaml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Charm_2024validation/info.yaml b/Charm_2024validation/info.yaml
index 92219d7be1..8f491f10b4 100644
--- a/Charm_2024validation/info.yaml
+++ b/Charm_2024validation/info.yaml
@@ -24,6 +24,7 @@ defaults:
 ( '23103111', 'd_to_ksh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
 ( '21103101', 'd_to_ksh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
 ( '23173003', 'rare_charm', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27165900', 'd0_to_ksks', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
 
 ( '27163102', 'd0_to_hh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
 ( '27163101', 'd0_to_hh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
@@ -100,7 +101,7 @@ MC_{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}:
       event_store: HiveWhiteBoard
       input_stream: "charm"
       input_manifest_file: "HLT2.tck.json"
-      
+
 {%- endfor %}
 {%- endfor %}
 
-- 
GitLab


From fdc4a44892ed03727b3195402668690cdeaf8ebc Mon Sep 17 00:00:00 2001
From: Serena Maccolini <serena.maccolini@cern.ch>
Date: Wed, 24 Jul 2024 18:45:18 +0200
Subject: [PATCH 22/51] excluding CTB

---
 Charm_2024validation/options/d_to_ksh.py | 2 +-
 Charm_2024validation/options/tupling.py  | 7 +++++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/Charm_2024validation/options/d_to_ksh.py b/Charm_2024validation/options/d_to_ksh.py
index 6428f1b816..4b9dd6c8d8 100644
--- a/Charm_2024validation/options/d_to_ksh.py
+++ b/Charm_2024validation/options/d_to_ksh.py
@@ -11,7 +11,7 @@ from PyConf.reading import get_particles
 from FunTuple import FunTuple_Particles as Funtuple
 
 
-def make_dtf_variables(options, pvs, input_data, ptype, islong=True):
+def make_dtf_variables(options, pvs, input_data, ptype, islong=False):
 
     if ptype not in ["basic", "composite"]:
         Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
diff --git a/Charm_2024validation/options/tupling.py b/Charm_2024validation/options/tupling.py
index 494a1309c7..0c15387275 100644
--- a/Charm_2024validation/options/tupling.py
+++ b/Charm_2024validation/options/tupling.py
@@ -448,7 +448,7 @@ def make_b_composite_variables(options, pvs, data, add_truth=True):
 def make_DeltaM_variable(options):
     return FunctorCollection({"DM": F.MASS - F.CHILD(1, F.MASS)})
 
-def make_basic_variables(options, pvs, data, add_truth=True, islong=True):
+def make_basic_variables(options, pvs, data, add_truth=True, islong=False):
     if not options.simulation:
         add_truth = False
     variables = (
@@ -599,7 +599,7 @@ def add_truth_matching_functors(
 
 ### DTF variables ###
 
-def make_basic_dtf_variables(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name="", islong=True):
+def make_basic_dtf_variables(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name="", islong=False):
     variables = (
         FunctorCollection(
             {
@@ -824,6 +824,9 @@ def make_MC_basic_variables():
     variables = (
         FunctorCollection(
             {
+                "END_VX": F.END_VX,
+                "END_VY": F.END_VY,
+                "END_VZ": F.END_VZ,
                 "OBJECT_KEY": F.OBJECT_KEY,
                 "ETA": F.ETA,
                 "PHI": F.PHI,
-- 
GitLab


From c268a10df47eb3f0951788dd7714e828cf92c9d2 Mon Sep 17 00:00:00 2001
From: Lorenzo Pica <lorenzo.pica@cern.ch>
Date: Thu, 25 Jul 2024 18:30:44 +0200
Subject: [PATCH 23/51] Move to clang16 for Moore

---
 Charm_2024validation/info.yaml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Charm_2024validation/info.yaml b/Charm_2024validation/info.yaml
index 8f491f10b4..282cc7c9f8 100644
--- a/Charm_2024validation/info.yaml
+++ b/Charm_2024validation/info.yaml
@@ -47,7 +47,7 @@ defaults:
 {% for polarity,pol in conditions %}
 
 {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1:
-  application: "Moore/v55r11@x86_64_v2-el9-gcc13+detdesc-opt"
+  application: "Moore/v55r11@x86_64_v2-el9-clang16+detdesc-opt"
   input:
     bk_query: "/MC/{{dir1}}/Beam6800GeV-2024{{dir2}}-{{polarity}}-Nu{{nu}}-25ns-Pythia8/Sim10d/{{evttype}}/DIGI"
     n_test_lfns: 1
@@ -65,7 +65,7 @@ defaults:
       scheduler_legacy_mode: False
 
 {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2:
-  application: "Moore/v55r11@x86_64_v2-el9-gcc13+detdesc-opt"
+  application: "Moore/v55r11@x86_64_v2-el9-clang16+detdesc-opt"
   input:
     job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1
   output: HLT2.charm.DST
-- 
GitLab


From fdeac57133d09d7a6b39698dcca54154069928c2 Mon Sep 17 00:00:00 2001
From: Lorenzo Pica <lorenzo.pica@cern.ch>
Date: Fri, 26 Jul 2024 17:23:08 +0200
Subject: [PATCH 24/51] Try to reduce memory consumption

---
 Charm_2024validation/info.yaml            | 5 +++++
 Charm_2024validation/options/hlt1.py      | 3 ++-
 Charm_2024validation/options/hlt1_noUT.py | 1 +
 3 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/Charm_2024validation/info.yaml b/Charm_2024validation/info.yaml
index 282cc7c9f8..05d684af7b 100644
--- a/Charm_2024validation/info.yaml
+++ b/Charm_2024validation/info.yaml
@@ -140,6 +140,11 @@ MC_{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}:
       input_process: "TurboPass"
       input_stream: "charm"
       evt_max: -1
+      compression:
+        algorithm: ZSTD
+        level: 1
+        max_buffer_size: 1048576
+
 
 {%- endfor %}
 {%- endfor %}
diff --git a/Charm_2024validation/options/hlt1.py b/Charm_2024validation/options/hlt1.py
index fd51d865e4..db4fa72f60 100644
--- a/Charm_2024validation/options/hlt1.py
+++ b/Charm_2024validation/options/hlt1.py
@@ -29,7 +29,8 @@ def alg_config(options: Options):
     #line_names = get_allen_line_names()
     #allen_node = allen_control_flow(options)
     #config.update(configure(options, allen_node))
-
+    config["Gaudi::IODataManager/IODataManager"].AgeLimit = 0
+    
     return config
 
 '''
diff --git a/Charm_2024validation/options/hlt1_noUT.py b/Charm_2024validation/options/hlt1_noUT.py
index b93aeb113c..883aa6cadd 100644
--- a/Charm_2024validation/options/hlt1_noUT.py
+++ b/Charm_2024validation/options/hlt1_noUT.py
@@ -28,6 +28,7 @@ def alg_config(options: Options):
         line_names = get_allen_line_names()
         allen_node = allen_control_flow(options)
         config.update(configure(options, allen_node))
+        config["Gaudi::IODataManager/IODataManager"].AgeLimit = 0
 
     return config
 
-- 
GitLab


From e94f96ed745885e6aa181d95d9287dc44dd9656d Mon Sep 17 00:00:00 2001
From: Serena Maccolini <serena.maccolini@cern.ch>
Date: Mon, 29 Jul 2024 10:29:40 +0200
Subject: [PATCH 25/51] trying to reduce memory consumption x2

---
 Charm_2024validation/info.yaml | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/Charm_2024validation/info.yaml b/Charm_2024validation/info.yaml
index 05d684af7b..341481e6bb 100644
--- a/Charm_2024validation/info.yaml
+++ b/Charm_2024validation/info.yaml
@@ -63,6 +63,10 @@ defaults:
       simulation: True
       data_type: "Upgrade"
       scheduler_legacy_mode: False
+      compression:
+        algorithm: ZSTD
+        level: 1
+        max_buffer_size: 1048576
 
 {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2:
   application: "Moore/v55r11@x86_64_v2-el9-clang16+detdesc-opt"
@@ -81,6 +85,10 @@ defaults:
       data_type: "Upgrade"
       output_manifest_file: "HLT2.tck.json"
       scheduler_legacy_mode: False
+      compression:
+        algorithm: ZSTD
+        level: 1
+        max_buffer_size: 1048576
 
 MC_{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}:
   application: "DaVinci/v64r8@x86_64_v2-el9-clang16+detdesc-opt"
@@ -101,6 +109,10 @@ MC_{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}:
       event_store: HiveWhiteBoard
       input_stream: "charm"
       input_manifest_file: "HLT2.tck.json"
+      compression:
+        algorithm: ZSTD
+        level: 1
+        max_buffer_size: 1048576
 
 {%- endfor %}
 {%- endfor %}
-- 
GitLab


From 6d98a8277850c446480aa3a71d469ef39a99a5f9 Mon Sep 17 00:00:00 2001
From: Serena Maccolini <serena.maccolini@cern.ch>
Date: Mon, 29 Jul 2024 17:48:45 +0200
Subject: [PATCH 26/51] adding MagUp postTS

---
 Charm_2024validation/info.yaml | 53 ++++++++++++++++++++++++++++++++++
 1 file changed, 53 insertions(+)

diff --git a/Charm_2024validation/info.yaml b/Charm_2024validation/info.yaml
index 341481e6bb..a3ef24d8fb 100644
--- a/Charm_2024validation/info.yaml
+++ b/Charm_2024validation/info.yaml
@@ -160,3 +160,56 @@ MC_{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}:
 
 {%- endfor %}
 {%- endfor %}
+
+
+{%- set conditions = [
+  "MagUp",
+]%}
+
+{%- set subsamples = [
+  "d0_to_hh",
+  "d_to_hhh",
+  "d_to_ksh",
+  "d0_to_hhpi0",
+  "d0_to_kshh",
+  "d0_to_ksks",
+  "d0_to_hhhh",
+  "rare_charm",
+  "detection_asymmetry",
+  "dst_to_dee",
+]%}
+
+{% for id in subsamples %}
+{% for polarity in conditions %}
+
+{{id}}_2024_{{ polarity }}:
+  application: "DaVinci/v64r7@x86_64_v2-el9-clang16-opt"
+  input:
+    bk_query: "/LHCb/Collision24/Beam6800GeV-VeloClosed-{{polarity}}/Real Data/Sprucing24c2/94000000/CHARM.DST"
+
+    dq_flags:
+      - UNCHECKED
+      - OK
+    keep_running: true
+  output: DVTUPLE_{{id}}.ROOT
+  options:
+    entrypoint: Charm_2024validation.main_{{id}}:main
+    extra_options:
+      input_raw_format: 0.5
+      input_type: ROOT
+      simulation: False
+      data_type: "Upgrade"
+      event_store: HiveWhiteBoard
+      geometry_version: run3/2024.Q1.2-v00.00
+      conditions_version: master
+      input_process: "TurboPass"
+      input_stream: "charm"
+      evt_max: -1
+      compression:
+        algorithm: ZSTD
+        level: 1
+        max_buffer_size: 1048576
+
+
+{%- endfor %}
+{%- endfor %}
-- 
GitLab


From f7f2e0f6786010fa6c6581285a16a43646d93e5b Mon Sep 17 00:00:00 2001
From: Serena Maccolini <serena.maccolini@cern.ch>
Date: Mon, 29 Jul 2024 20:12:56 +0200
Subject: [PATCH 27/51] removeing hhpi0 MC

---
 Charm_2024validation/info.yaml | 2 --
 Charm_2024validation/tmp.yaml  | 4 ++++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/Charm_2024validation/info.yaml b/Charm_2024validation/info.yaml
index a3ef24d8fb..14591535c9 100644
--- a/Charm_2024validation/info.yaml
+++ b/Charm_2024validation/info.yaml
@@ -15,7 +15,6 @@ defaults:
 ( '23103042', 'd_to_hhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
 ( '23263022', 'd_to_hhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
 ( '21263012', 'd_to_hhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163471', 'd0_to_hhpi0', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
 ( '27165903', 'd0_to_kshh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
 ( '27165071', 'd0_to_hhhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
 ( '27265008', 'd0_to_hhhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
@@ -32,7 +31,6 @@ defaults:
 ( '23103042', 'd_to_hhh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
 ( '23263022', 'd_to_hhh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
 ( '21263012', 'd_to_hhh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163471', 'd0_to_hhpi0', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
 ( '27165903', 'd0_to_kshh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
 ( '27165071', 'd0_to_hhhh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
 
diff --git a/Charm_2024validation/tmp.yaml b/Charm_2024validation/tmp.yaml
index 84cb491ff0..80dfd6ef7f 100644
--- a/Charm_2024validation/tmp.yaml
+++ b/Charm_2024validation/tmp.yaml
@@ -21,3 +21,7 @@
 ( '27163471', 'd0_to_hhpi0', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
 ( '27165903', 'd0_to_kshh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
 ( '27165071', 'd0_to_hhhh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
+
+
+( '27163471', 'd0_to_hhpi0', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
+( '27163471', 'd0_to_hhpi0', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-- 
GitLab


From a5242678f4c31715519ea20c9ecb7af279f2ef48 Mon Sep 17 00:00:00 2001
From: Donata Osthues <donata.osthues@cern.ch>
Date: Mon, 28 Oct 2024 12:31:21 +0100
Subject: [PATCH 28/51] D02hhmumu, D2hmumu, Lc2pll, control channels

---
 Charm_2024raredecays/._.DS_Store            |  Bin 0 -> 4096 bytes
 Charm_2024raredecays/._info.yaml            |  Bin 0 -> 4096 bytes
 Charm_2024raredecays/info.yaml              |   60 ++
 Charm_2024raredecays/main_Lb_to_Lcl.py      |   45 +
 Charm_2024raredecays/main_Lc_to_pll.py      |   55 +
 Charm_2024raredecays/main_d0_to_hhhh.py     |   50 +
 Charm_2024raredecays/main_d0_to_hhll.py     |   49 +
 Charm_2024raredecays/main_d_to_hhh.py       |   55 +
 Charm_2024raredecays/main_d_to_hll.py       |   53 +
 Charm_2024raredecays/options/._Lc_to_pll.py |  Bin 0 -> 4096 bytes
 Charm_2024raredecays/options/Lb_to_Lcl.py   |  166 +++
 Charm_2024raredecays/options/Lc_to_pll.py   |  385 +++++++
 Charm_2024raredecays/options/d0_to_hhhh.py  |  450 +++++++++
 Charm_2024raredecays/options/d0_to_hhll.py  |  204 ++++
 Charm_2024raredecays/options/d_to_hhh.py    |  204 ++++
 Charm_2024raredecays/options/d_to_hll.py    |  156 +++
 Charm_2024raredecays/options/rare_charm.py  |  501 +++++++++
 Charm_2024raredecays/options/tupling.py     | 1003 +++++++++++++++++++
 18 files changed, 3436 insertions(+)
 create mode 100644 Charm_2024raredecays/._.DS_Store
 create mode 100644 Charm_2024raredecays/._info.yaml
 create mode 100644 Charm_2024raredecays/info.yaml
 create mode 100644 Charm_2024raredecays/main_Lb_to_Lcl.py
 create mode 100644 Charm_2024raredecays/main_Lc_to_pll.py
 create mode 100644 Charm_2024raredecays/main_d0_to_hhhh.py
 create mode 100644 Charm_2024raredecays/main_d0_to_hhll.py
 create mode 100644 Charm_2024raredecays/main_d_to_hhh.py
 create mode 100644 Charm_2024raredecays/main_d_to_hll.py
 create mode 100644 Charm_2024raredecays/options/._Lc_to_pll.py
 create mode 100644 Charm_2024raredecays/options/Lb_to_Lcl.py
 create mode 100644 Charm_2024raredecays/options/Lc_to_pll.py
 create mode 100644 Charm_2024raredecays/options/d0_to_hhhh.py
 create mode 100644 Charm_2024raredecays/options/d0_to_hhll.py
 create mode 100644 Charm_2024raredecays/options/d_to_hhh.py
 create mode 100644 Charm_2024raredecays/options/d_to_hll.py
 create mode 100644 Charm_2024raredecays/options/rare_charm.py
 create mode 100644 Charm_2024raredecays/options/tupling.py

diff --git a/Charm_2024raredecays/._.DS_Store b/Charm_2024raredecays/._.DS_Store
new file mode 100644
index 0000000000000000000000000000000000000000..cb1f0ba4f31de76c88aa8b5e45c4706fffaecfc6
GIT binary patch
literal 4096
zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDJkFz{^v(m+1nBL)UWIhYCu0iY;W;207T
z1eBNu(ZNuGRne&6Xb6mkz-S1JhQMeDjE2By2#kinXb6mkz-S1JhQMeDP&ot`f#!iQ
z7|4ZWWELwFr55Lx7A2=Dq~#Z7D`e)Cq~?`m=I15m<Wwr;q^6Z9B;_RLWdpmqP+dcs
PLiIn~D>4jn|NjF3f4UuX

literal 0
HcmV?d00001

diff --git a/Charm_2024raredecays/._info.yaml b/Charm_2024raredecays/._info.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..0f756bdd37f2360438c41f725d75a1d78577905f
GIT binary patch
literal 4096
zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDJkFz{^v(m+1nBL)UWIUt(=a103v0xFS!
z=wMg?WDB5aVFdD_;!?@^xq68O1v#mDIf=z3rNyZ!DTyVi$^pS3J({t9(?Il#($~@;
zdK8R?z-S1JhQMeDjE2By2#kinXb6mkz-S1JhQMeDjD`TN5CC;HK^P3=LNYRo6^c@e
z^Gl18Qx($ki?S6m^GZ_lN;32F5_57Y6>?J3N)(cE67#ZwePO7sAx)wBAMO<y2D$(L
E0c!#(V*mgE

literal 0
HcmV?d00001

diff --git a/Charm_2024raredecays/info.yaml b/Charm_2024raredecays/info.yaml
new file mode 100644
index 0000000000..0e4e9d964b
--- /dev/null
+++ b/Charm_2024raredecays/info.yaml
@@ -0,0 +1,60 @@
+# copied and adapted from: 
+# file        = AnalysisProductions/Charm_2024validation/info.yaml 
+# commit_hash = fdeac57133d09d7a6b39698dcca54154069928c2
+
+
+defaults:
+  inform:
+      - donata.osthues@cern.ch
+  wg: Charm
+
+
+{%- set conditions = [
+  "MagDown",
+  "MagUp",
+]%}
+
+
+{%- set subsamples = [
+  "d0_to_hhll",
+  "d_to_hll",
+  "d0_to_hhhh",
+  "d_to_hhh",
+  "Lb_to_Lcl",
+  "Lc_to_pll",
+]%}
+
+{% for id in subsamples %}
+{% for polarity in conditions %}
+
+{{id}}_2024_{{ polarity }}:
+  application: "DaVinci/v64r7@x86_64_v2-el9-clang16-opt"
+  input:
+    bk_query: "/LHCb/Collision24/Beam6800GeV-VeloClosed-{{polarity}}/Real Data/Sprucing24c2/94000000/CHARM.DST"
+
+    dq_flags:
+      - UNCHECKED
+      - OK
+    keep_running: true
+  output: DVTUPLE_{{id}}.ROOT
+  options:
+    entrypoint: Charm_2024raredecays.main_{{id}}:main
+    extra_options:
+      input_raw_format: 0.5
+      input_type: ROOT
+      simulation: False
+      data_type: "Upgrade"
+      event_store: HiveWhiteBoard
+      geometry_version: run3/2024.Q1.2-v00.00
+      conditions_version: master
+      input_process: "TurboPass"
+      input_stream: "charm"
+      evt_max: -1
+      compression:
+        algorithm: ZSTD
+        level: 1
+        max_buffer_size: 1048576
+
+
+{%- endfor %}
+{%- endfor %}
diff --git a/Charm_2024raredecays/main_Lb_to_Lcl.py b/Charm_2024raredecays/main_Lb_to_Lcl.py
new file mode 100644
index 0000000000..cfe2518b8b
--- /dev/null
+++ b/Charm_2024raredecays/main_Lb_to_Lcl.py
@@ -0,0 +1,45 @@
+# copied and adapted from: 
+# file        = AnalysisProductions/Charm_2024validation/main_rare_charm.py 
+# commit_hash = fdeac57133d09d7a6b39698dcca54154069928c2
+
+
+
+###############################################################################
+# (c) Copyright 2021-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 .options.Lb_to_Lcl import *
+
+from DaVinci import Options, make_config
+from PyConf.reading import get_pvs, get_rec_summary
+
+def main(options: Options):
+        
+    # get ODIN and DecReports location
+    pvs = get_pvs()
+    rec_summary = get_rec_summary()
+
+    tuples = {
+        # muonic channels
+        "Lc2pmumu"   : maketuple_Lb2Lcmu_Lc2pmumu(options, pvs, rec_summary),
+        "Lc2pee"     : maketuple_Lb2Lcmu_Lc2pee(options, pvs, rec_summary),
+        "Lc2KSp_LL"  : maketuple_Lb2Lcmu_Lc2KSp_LL(options, pvs, rec_summary),
+        "Lc2KSp_DD"  : maketuple_Lb2Lcmu_Lc2KSp_DD(options, pvs, rec_summary),
+    }
+
+    #MCtuples = {
+    #}
+    
+    #if options.simulation:
+    #    tuples = tuples | MCtuples
+        
+    config = make_config(options, tuples)
+
+    return config
\ No newline at end of file
diff --git a/Charm_2024raredecays/main_Lc_to_pll.py b/Charm_2024raredecays/main_Lc_to_pll.py
new file mode 100644
index 0000000000..3472a739d0
--- /dev/null
+++ b/Charm_2024raredecays/main_Lc_to_pll.py
@@ -0,0 +1,55 @@
+# copied and adapted from: 
+# file        = AnalysisProductions/Charm_2024validation/main_rare_charm.py 
+# commit_hash = fdeac57133d09d7a6b39698dcca54154069928c2
+
+
+
+###############################################################################
+# (c) Copyright 2021-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 .options.Lc_to_pll import *
+
+from DaVinci import Options, make_config
+from PyConf.reading import get_pvs, get_rec_summary
+
+def main(options: Options):
+        
+    # get ODIN and DecReports location
+    pvs = get_pvs()
+    rec_summary = get_rec_summary()
+
+    tuples = {
+        # baryonic channels
+        "D2pimumu_OS" : maketuple_Lc2pmumu(options, pvs, rec_summary),
+        "D2pimumu_SS" : maketuple_Lc2pmumu_SS(options, pvs, rec_summary),
+        "D2Kmumu_OS"  : maketuple_Lc2pee(options, pvs, rec_summary),
+        "D2Kmumu_SS"  : maketuple_Lc2pee_SS(options, pvs, rec_summary),
+        "Lc2pmue_OSep" : maketuple_Lc2pmue_OS(options, pvs, rec_summary, mupem = False),
+        "Lc2pmue_OSem" : maketuple_Lc2pmue_OS(options, pvs, rec_summary, mupem = True),
+        "D2pimumu_SS" : maketuple_Lc2pmue_SS(options, pvs, rec_summary),
+        # control channel
+        "D2Kmumu_OS"  : maketuple_Lc2pmumu_WS(options, pvs, rec_summary),
+        "D2Kmumu_SS"  : maketuple_Lc2pee_WS(options, pvs, rec_summary),
+        "D2Kmumu_OS"  : maketuple_Lc2pmue_WS(options, pvs, rec_summary),
+        "D2Kmumu_SS"  : maketuple_Lc2ppipi(options, pvs, rec_summary),
+        "D2Kmumu_SS"  : maketuple_Lc2KSp_LL(options, pvs, rec_summary),
+        "D2Kmumu_SS"  : maketuple_Lc2KSp_DD(options, pvs, rec_summary),
+    }
+
+    #MCtuples = {
+    #}
+    
+    #if options.simulation:
+    #    tuples = tuples | MCtuples
+        
+    config = make_config(options, tuples)
+
+    return config
\ No newline at end of file
diff --git a/Charm_2024raredecays/main_d0_to_hhhh.py b/Charm_2024raredecays/main_d0_to_hhhh.py
new file mode 100644
index 0000000000..a903ef6a36
--- /dev/null
+++ b/Charm_2024raredecays/main_d0_to_hhhh.py
@@ -0,0 +1,50 @@
+# copied and adapted from: 
+# file        = AnalysisProductions/Charm_2024validation/main_rare_charm.py 
+# commit_hash = fdeac57133d09d7a6b39698dcca54154069928c2
+
+
+
+###############################################################################
+# (c) Copyright 2021-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 .options.d0_to_hhhh import *
+
+from DaVinci import Options, make_config
+from PyConf.reading import get_pvs, get_rec_summary
+
+def main(options: Options):
+        
+    # get ODIN and DecReports location
+    pvs = get_pvs()
+    rec_summary = get_rec_summary()
+
+    tuples = {
+        "DstToD0pi_D0ToKKPiPi"      : maketuple_DstToD0pi_D0ToKKPiPi(options, pvs, rec_summary),
+        "DstToD0pi_D0ToKPiPiPi_RS"  : maketuple_DstToD0pi_D0ToKPiPiPi_RS(options, pvs, rec_summary),
+        "DstToD0pi_D0ToKPiPiPi_WS"  : maketuple_DstToD0pi_D0ToKPiPiPi_WS(options, pvs, rec_summary),
+        "DstToD0pi_D0ToPiPiPiPi"    : maketuple_DstToD0pi_D0ToPiPiPiPi(options, pvs, rec_summary),
+        "Dst2D0pi_D02pipimumu_WSp"  : maketuple_Dst2D0pi_D02pipimumu_WS(options, pvs, rec_summary, pim = False),
+        "Dst2D0pi_D02pipimumu_WSm"  : maketuple_Dst2D0pi_D02pipimumu_WS(options, pvs, rec_summary, pim = True),
+        "Dst2D0pi_D02KKmumu_WSp"    : maketuple_Dst2D0pi_D02KKmumu_WS(options, pvs, rec_summary, Km = False),
+        "Dst2D0pi_D02KKmumu_WSm"    : maketuple_Dst2D0pi_D02KKmumu_WS(options, pvs, rec_summary, Km = True),
+        "Dst2D0pi_D02Kpimumu_WSp"   : maketuple_Dst2D0pi_D02Kpimumu_WS(options, pvs, rec_summary, Km = False),
+        "Dst2D0pi_D02Kpimumu_WSm"   : maketuple_Dst2D0pi_D02Kpimumu_WS(options, pvs, rec_summary, Km = True),
+    }
+
+    #MCtuples = {
+    #}
+    
+    #if options.simulation:
+    #    tuples = tuples | MCtuples
+        
+    config = make_config(options, tuples)
+
+    return config
diff --git a/Charm_2024raredecays/main_d0_to_hhll.py b/Charm_2024raredecays/main_d0_to_hhll.py
new file mode 100644
index 0000000000..42f7a98d3d
--- /dev/null
+++ b/Charm_2024raredecays/main_d0_to_hhll.py
@@ -0,0 +1,49 @@
+# copied and adapted from: 
+# file        = AnalysisProductions/Charm_2024validation/main_rare_charm.py 
+# commit_hash = fdeac57133d09d7a6b39698dcca54154069928c2
+
+
+
+###############################################################################
+# (c) Copyright 2021-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 .options.d0_to_hhll import *
+
+from DaVinci import Options, make_config
+from PyConf.reading import get_pvs, get_rec_summary
+
+def main(options: Options):
+        
+    # get ODIN and DecReports location
+    pvs = get_pvs()
+    rec_summary = get_rec_summary()
+
+    tuples = {
+        "Dst2D0pi_D02pipimumu"   : maketuple_Dst2D0pi_D02pipimumu(options, pvs, rec_summary),
+        "Dst2D0pi_D02KKmumu"     : maketuple_Dst2D0pi_D02KKmumu(options, pvs, rec_summary),
+        "Dst2D0pi_D02Kpimumu_RS" : maketuple_Dst2D0pi_D02Kpimumu_RS(options, pvs, rec_summary),
+        "Dst2D0pi_D02Kpimumu_WS" : maketuple_Dst2D0pi_D02Kpimumu_WS(options, pvs, rec_summary),
+        "D02Kpimumu"             : maketuple_D02Kpimumu(options, pvs, rec_summary),
+        #"DstToD0pi_D0ToKKPiPi"   : maketuple_DstToD0pi_D0ToKKPiPi(options, pvs, rec_summary),
+        #"DstToD0pi_D0ToKPiPiPi"  : maketuple_DstToD0pi_D0ToKPiPiPi(options, pvs, rec_summary),
+        #"DstToD0pi_D0ToPiKPiPi"  : maketuple_DstToD0pi_D0ToPiKPiPi(options, pvs, rec_summary),
+        #"DstToD0pi_D0ToPiPiPiPi" : maketuple_DstToD0pi_D0ToPiPiPiPi(options, pvs, rec_summary),
+    }
+
+    #MCtuples = {
+    #}
+    
+    #if options.simulation:
+    #    tuples = tuples | MCtuples
+        
+    config = make_config(options, tuples)
+
+    return config
diff --git a/Charm_2024raredecays/main_d_to_hhh.py b/Charm_2024raredecays/main_d_to_hhh.py
new file mode 100644
index 0000000000..e63fd33665
--- /dev/null
+++ b/Charm_2024raredecays/main_d_to_hhh.py
@@ -0,0 +1,55 @@
+# copied and adapted from: 
+# file        = AnalysisProductions/Charm_2024validation/main_rare_charm.py 
+# commit_hash = fdeac57133d09d7a6b39698dcca54154069928c2
+
+
+
+###############################################################################
+# (c) Copyright 2021-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 .options.d_to_hhh import *
+
+from DaVinci import Options, make_config
+from PyConf.reading import get_pvs, get_rec_summary
+
+def main(options: Options):
+        
+    # get ODIN and DecReports location
+    pvs = get_pvs()
+    rec_summary = get_rec_summary()
+
+    tuples = {
+        # muonic channels
+        "D2pimumu_WS" : maketuple_D2pimumu_WS(options, pvs, rec_summary),
+        "D2Kmumu_WS"  : maketuple_D2Kmumu_WS(options, pvs, rec_summary),
+        "D2Kpipi"     : maketuple_D2Kpipi(options, pvs, rec_summary),
+        "D2pipipi"    : maketuple_D2pipipi(options, pvs, rec_summary),
+        "D2KSK_LL"    : maketuple_D2KSK_LL(options, pvs, rec_summary),
+        "D2KSpi_LL"   : maketuple_D2KSpi_LL(options, pvs, rec_summary),
+
+        # control channels
+        #"D2Kpipi" : maketuple_D2Kpipi(options, pvs, rec_summary),
+        #"D2pipipi" : maketuple_D2pipipi(options, pvs, rec_summary),
+        #"D2pipiK" : maketuple_D2pipiK(options, pvs, rec_summary),
+        #"D2KKK" : maketuple_D2KKK(options, pvs, rec_summary),
+        #"D2piKK" : maketuple_D2piKK(options, pvs, rec_summary),
+
+    }
+
+    #MCtuples = {
+    #}
+    
+    #if options.simulation:
+    #    tuples = tuples | MCtuples
+        
+    config = make_config(options, tuples)
+
+    return config
\ No newline at end of file
diff --git a/Charm_2024raredecays/main_d_to_hll.py b/Charm_2024raredecays/main_d_to_hll.py
new file mode 100644
index 0000000000..ddc8525162
--- /dev/null
+++ b/Charm_2024raredecays/main_d_to_hll.py
@@ -0,0 +1,53 @@
+# copied and adapted from: 
+# file        = AnalysisProductions/Charm_2024validation/main_rare_charm.py 
+# commit_hash = fdeac57133d09d7a6b39698dcca54154069928c2
+
+
+
+###############################################################################
+# (c) Copyright 2021-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 .options.d_to_hll import *
+
+from DaVinci import Options, make_config
+from PyConf.reading import get_pvs, get_rec_summary
+
+def main(options: Options):
+        
+    # get ODIN and DecReports location
+    pvs = get_pvs()
+    rec_summary = get_rec_summary()
+
+    tuples = {
+        # muonic channels
+        "D2pimumu_OS" : maketuple_D2pimumu_OS(options, pvs, rec_summary),
+        "D2pimumu_SS" : maketuple_D2pimumu_SS(options, pvs, rec_summary),
+        "D2Kmumu_OS"  : maketuple_D2Kmumu_OS(options, pvs, rec_summary),
+        "D2Kmumu_SS"  : maketuple_D2Kmumu_SS(options, pvs, rec_summary),
+
+        # control channels
+        #"D2Kpipi" : maketuple_D2Kpipi(options, pvs, rec_summary),
+        #"D2pipipi" : maketuple_D2pipipi(options, pvs, rec_summary),
+        #"D2pipiK" : maketuple_D2pipiK(options, pvs, rec_summary),
+        #"D2KKK" : maketuple_D2KKK(options, pvs, rec_summary),
+        #"D2piKK" : maketuple_D2piKK(options, pvs, rec_summary),
+
+    }
+
+    #MCtuples = {
+    #}
+    
+    #if options.simulation:
+    #    tuples = tuples | MCtuples
+        
+    config = make_config(options, tuples)
+
+    return config
\ No newline at end of file
diff --git a/Charm_2024raredecays/options/._Lc_to_pll.py b/Charm_2024raredecays/options/._Lc_to_pll.py
new file mode 100644
index 0000000000000000000000000000000000000000..8974e17ea96fdde85b81948b0451b2fdcef7a1cd
GIT binary patch
literal 4096
zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDJkFz{^v(m+1nBL)UWIUt(=a103vVqnnK
zfaqXY08}o3riBs6hl)!j=jZAr78K;9>g6OBmy{N#rlcg6q$&plgY@JH2&RK*|0U`&
zAbJ#xhQMeDjE2By2#kinXb6mkz-S1JhQMeDjE2By2#kgRt`GoqHbEE+<U%qsixrAe
zi}Op1l2aAZ@{6(+GV@AO^GY)F^AdA%Div~4(@GSQauV~hfqh}9t|3jK`XBBU83wuk
F{{e)pD1ZO}

literal 0
HcmV?d00001

diff --git a/Charm_2024raredecays/options/Lb_to_Lcl.py b/Charm_2024raredecays/options/Lb_to_Lcl.py
new file mode 100644
index 0000000000..f62e0e60b1
--- /dev/null
+++ b/Charm_2024raredecays/options/Lb_to_Lcl.py
@@ -0,0 +1,166 @@
+# copied and adapted from: 
+# file        = AnalysisProductions/CharmRD/maketuple_D02Kmumu.py 
+# commit_hash = 73c8c844eb343b39ffc6b274fcdf2d196bfd7016
+
+
+from .tupling import (
+    make_composite_variables,
+    make_composite_variables_3body,
+    make_basic_variables,
+    make_hlt2_event_variables,
+    make_basic_dtf_variables,
+    make_composite_dtf_variables,
+    make_basic_isolation_variables,
+    make_intermediate_isolation_variables,
+    make_top_isolation_variables,
+)
+
+from .rare_charm import (
+    make_dtf_variables_hmumu,
+    make_dtf_variables_pmumu,
+    make_dtf_variables_hhmumu,
+)
+
+import Functors as F
+from Functors.math import log
+from DaVinci import Options, make_config
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from FunTuple import FunctorCollection
+from PyConf.reading import get_particles, get_pvs
+import FunTuple.functorcollections as FC
+from FunTuple import FunTuple_Particles as Funtuple
+
+from DecayTreeFitter import DecayTreeFitter
+
+
+def maketuple_Lb2Lcmu_Lc2pmumu(options, pvs, rec_summary):
+    name = "Lb2Lcmu_Lc2pmumu"
+    turbo_line = "Hlt2Charm_B2LcpMum_LcpToPpMumMup"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Lb"     : "[Lambda_b0 -> (Lambda_c+ -> (J/psi(1S) -> mu- mu+) p+) mu-]CC",
+        "Lc"     : "[Lambda_b0 -> ^(Lambda_c+ -> (J/psi(1S) -> mu- mu+) p+) mu-]CC",
+        "Jpsi"   : "[Lambda_b0 -> (Lambda_c+ -> ^(J/psi(1S) -> mu- mu+) p+) mu-]CC",
+        "lm"     : "[Lambda_b0 -> (Lambda_c+ -> (J/psi(1S) -> ^mu- mu+) p+) mu-]CC",
+        "lp"     : "[Lambda_b0 -> (Lambda_c+ -> (J/psi(1S) -> mu- ^mu+) p+) mu-]CC",
+        "pp"     : "[Lambda_b0 -> (Lambda_c+ -> (J/psi(1S) -> mu- mu+) ^p+) mu-]CC",
+        "mumtag" : "[Lambda_b0 -> (Lambda_c+ -> (J/psi(1S) -> mu- mu+) p+) ^mu-]CC",
+
+    }
+
+    variables = {
+        "Lb"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "mumtag" : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_Lb2Lcmu_Lc2pee(options, pvs, rec_summary):
+    name = "Lb2Lcmu_Lc2pee"
+    turbo_line = "Hlt2Charm_B2LcpMum_LcpToPpEmEp"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Lb"     : "[Lambda_b0 -> (Lambda_c+ -> (J/psi(1S) -> e- e+) p+) mu-]CC",
+        "Lc"     : "[Lambda_b0 -> ^(Lambda_c+ -> (J/psi(1S) -> e- e+) p+) mu-]CC",
+        "Jpsi"   : "[Lambda_b0 -> (Lambda_c+ -> ^(J/psi(1S) -> e- e+) p+) mu-]CC",
+        "lm"     : "[Lambda_b0 -> (Lambda_c+ -> (J/psi(1S) -> ^e- e+) p+) mu-]CC",
+        "lp"     : "[Lambda_b0 -> (Lambda_c+ -> (J/psi(1S) -> e- ^e+) p+) mu-]CC",
+        "pp"     : "[Lambda_b0 -> (Lambda_c+ -> (J/psi(1S) -> e- e+) ^p+) mu-]CC",
+        "mumtag" : "[Lambda_b0 -> (Lambda_c+ -> (J/psi(1S) -> e- e+) p+) ^mu-]CC",
+
+    }
+
+    variables = {
+        "Lb"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "mumtag" : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+
+
+def maketuple_Lb2Lcmu_Lc2KSp_LL(options, pvs, rec_summary):
+    name = "Lb2Lcmu_Lc2KSp_LL"
+    turbo_line = "Hlt2Charm_B2LcpMumX_LcpToKsPp_LL_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Lb"    : "[Lambda_b0 -> (Lambda_c+ -> (KS0 -> pi- pi+) p+) mu-]CC",
+        "Lc"    : "[Lambda_b0 -> ^(Lambda_c+ -> (KS0 -> pi- pi+) p+) mu-]CC",
+        "KS0"   : "[Lambda_b0 -> (Lambda_c+ -> ^(KS0 -> pi- pi+) p+) mu-]CC",
+        "pim"   : "[Lambda_b0 -> (Lambda_c+ -> (KS0 -> ^pi- pi+) p+) mu-]CC",
+        "pip"   : "[Lambda_b0 -> (Lambda_c+ -> (KS0 -> pi- ^pi+) p+) mu-]CC",
+        "pp"    : "[Lambda_b0 -> (Lambda_c+ -> (KS0 -> pi- pi+) ^p+) mu-]CC",
+        "mum"   : "[Lambda_b0 -> (Lambda_c+ -> (KS0 -> pi- pi+) p+) ^mu-]CC",
+    }
+
+    variables = {
+        "Lb"    : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
+        "Lc"    : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
+        "KS0"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
+        "pim"   : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "pip"   : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "pp"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "mum"   : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+
+
+def maketuple_Lb2Lcmu_Lc2KSp_DD(options, pvs, rec_summary):
+    name = "Lb2Lcmu_Lc2KSp_DD"
+    turbo_line = "Hlt2Charm_B2LcpMumX_LcpToKsPp_DD_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Lb"    : "[Lambda_b0 -> (Lambda_c+ -> (KS0 -> pi- pi+) p+) mu-]CC",
+        "Lc"    : "[Lambda_b0 -> ^(Lambda_c+ -> (KS0 -> pi- pi+) p+) mu-]CC",
+        "KS0"   : "[Lambda_b0 -> (Lambda_c+ -> ^(KS0 -> pi- pi+) p+) mu-]CC",
+        "pim"   : "[Lambda_b0 -> (Lambda_c+ -> (KS0 -> ^pi- pi+) p+) mu-]CC",
+        "pip"   : "[Lambda_b0 -> (Lambda_c+ -> (KS0 -> pi- ^pi+) p+) mu-]CC",
+        "pp"    : "[Lambda_b0 -> (Lambda_c+ -> (KS0 -> pi- pi+) ^p+) mu-]CC",
+        "mum"   : "[Lambda_b0 -> (Lambda_c+ -> (KS0 -> pi- pi+) p+) ^mu-]CC",
+    }
+
+    variables = {
+        "Lb"    : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
+        "Lc"    : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
+        "KS0"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
+        "pim"   : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "pip"   : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "pp"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "mum"   : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
diff --git a/Charm_2024raredecays/options/Lc_to_pll.py b/Charm_2024raredecays/options/Lc_to_pll.py
new file mode 100644
index 0000000000..f93dc3cd67
--- /dev/null
+++ b/Charm_2024raredecays/options/Lc_to_pll.py
@@ -0,0 +1,385 @@
+# copied and adapted from: 
+# file        = AnalysisProductions/CharmRD/maketuple_D02Kmumu.py 
+# commit_hash = 73c8c844eb343b39ffc6b274fcdf2d196bfd7016
+
+
+from .tupling import (
+    make_composite_variables,
+    make_composite_variables_3body,
+    make_basic_variables,
+    make_hlt2_event_variables,
+    make_basic_dtf_variables,
+    make_composite_dtf_variables,
+    make_basic_isolation_variables,
+    make_intermediate_isolation_variables,
+    make_top_isolation_variables,
+)
+
+from .rare_charm import (
+    make_dtf_variables_hmumu,
+    make_dtf_variables_pmumu,
+    make_dtf_variables_hhmumu,
+)
+
+import Functors as F
+from Functors.math import log
+from DaVinci import Options, make_config
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from FunTuple import FunctorCollection
+from PyConf.reading import get_particles, get_pvs
+import FunTuple.functorcollections as FC
+from FunTuple import FunTuple_Particles as Funtuple
+
+from DecayTreeFitter import DecayTreeFitter
+
+
+
+def maketuple_Lc2pmumu(options, pvs, rec_summary):
+    name = "Lc2pmumu"
+    turbo_line = "Hlt2Charm_LcpToPpMumMup"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Lc"   : "[Lambda_c+ -> (J/psi(1S) -> mu- mu+) p+]CC",
+        "Jpsi" : "[Lambda_c+ -> ^(J/psi(1S) -> mu- mu+) p+]CC",
+        "lm"   : "[Lambda_c+ -> (J/psi(1S) -> ^mu- mu+) p+]CC",
+        "lp"   : "[Lambda_c+ -> (J/psi(1S) -> mu- ^mu+) p+]CC",
+        "pp"   : "[Lambda_c+ -> (J/psi(1S) -> mu- mu+) ^p+]CC",
+    }
+
+    variables = {
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_Lc2pmumu_SS(options, pvs, rec_summary):
+    name = "Lc2pmumu_SS"
+    turbo_line = "Hlt2Charm_LcpToPmMupMup"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Lc"   : "[Lambda_c+ -> (J/psi(1S) -> mu+ mu+) p~-]CC",
+        "Jpsi" : "[Lambda_c+ -> ^(J/psi(1S) -> mu+ mu+) p~-]CC",
+        "lp1"  : "[Lambda_c+ -> (J/psi(1S) -> ^mu+ mu+) p~-]CC",
+        "lp2"  : "[Lambda_c+ -> (J/psi(1S) -> mu+ ^mu+) p~-]CC",
+        "pm"   : "[Lambda_c+ -> (J/psi(1S) -> mu+ mu+) ^p~-]CC",
+    }
+
+    variables = {
+        "Lc"    : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lp1"   : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "lp2"   : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "pm"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_Lc2pee(options, pvs, rec_summary):
+    name = "Lc2pee"
+    turbo_line = "Hlt2Charm_LcpToPpEmEp"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Lc"   : "[Lambda_c+ -> (J/psi(1S) -> e- e+) p+]CC",
+        "Jpsi" : "[Lambda_c+ -> ^(J/psi(1S) -> e- e+) p+]CC",
+        "lm"   : "[Lambda_c+ -> (J/psi(1S) -> ^e- e+) p+]CC",
+        "lp"   : "[Lambda_c+ -> (J/psi(1S) -> e- ^e+) p+]CC",
+        "pp"   : "[Lambda_c+ -> (J/psi(1S) -> e- e+) ^p+]CC",
+    }
+
+    variables = {
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_Lc2pee_SS(options, pvs, rec_summary):
+    name = "Lc2pee_SS"
+    turbo_line = "Hlt2Charm_LcpToPmEpEp"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Lc"    : "[Lambda_c+ -> (J/psi(1S) -> e+ e+) p~-]CC",
+        "Jpsi"  : "[Lambda_c+ -> ^(J/psi(1S) -> e+ e+) p~-]CC",
+        "lp1"   : "[Lambda_c+ -> (J/psi(1S) -> ^e+ e+) p~-]CC",
+        "lp2"   : "[Lambda_c+ -> (J/psi(1S) -> e+ ^e+) p~-]CC",
+        "pm"    : "[Lambda_c+ -> (J/psi(1S) -> e+ e+) ^p~-]CC",
+    }
+
+    variables = {
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lp1"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "lp2"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "pm"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_Lc2pmue_OS(options, pvs, rec_summary, mupem = False):
+    name = "Lc2pmue_OSep"
+    turbo_line = "Hlt2Charm_LcpToPpMumpEpm"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Lc"   : "[Lambda_c+ -> (J/psi(1S) -> mu- e+) p+]CC",
+        "Jpsi" : "[Lambda_c+ -> ^(J/psi(1S) -> mu- e+) p+]CC",
+        "lm"   : "[Lambda_c+ -> (J/psi(1S) -> ^mu- e+) p+]CC",
+        "lp"   : "[Lambda_c+ -> (J/psi(1S) -> mu- ^e+) p+]CC",
+        "pp"   : "[Lambda_c+ -> (J/psi(1S) -> mu- e+) ^p+]CC",
+    }
+
+    if mupem == True:
+        name = "Lc2pmue_OSem"
+        branches = {
+            "Lc"   : "[Lambda_c+ -> (J/psi(1S) -> e- mu+) p+]CC",
+            "Jpsi" : "[Lambda_c+ -> ^(J/psi(1S) -> e- mu+) p+]CC",
+            "lm"   : "[Lambda_c+ -> (J/psi(1S) -> ^e- mu+) p+]CC",
+            "lp"   : "[Lambda_c+ -> (J/psi(1S) -> e- ^mu+) p+]CC",
+            "pp"   : "[Lambda_c+ -> (J/psi(1S) -> e- mu+) ^p+]CC",
+        }
+
+    variables = {
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_Lc2pmue_SS(options, pvs, rec_summary):
+    name = "Lc2pmue_SS"
+    turbo_line = "Hlt2Charm_LcpToPmMupEp"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Lc"   : "[Lambda_c+ -> (J/psi(1S) -> mu+ e+) p~-]CC",
+        "Jpsi" : "[Lambda_c+ -> ^(J/psi(1S) -> mu+ e+) p~-]CC",
+        "l1"   : "[Lambda_c+ -> (J/psi(1S) -> ^mu+ e+) p~-]CC",
+        "l2"   : "[Lambda_c+ -> (J/psi(1S) -> mu+ ^e+) p~-]CC",
+        "pp"   : "[Lambda_c+ -> (J/psi(1S) -> mu+ e+) ^p~-]CC",
+    }
+
+    variables = {
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
+        "l1"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "l2"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+        
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+
+#_____________control lines_________________________________________
+
+def maketuple_Lc2pmumu_WS(options, pvs, rec_summary):
+    name = "Lc2pmumu_WS"
+    turbo_line = "Hlt2Charm_LcpToPpMupMup_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Lc"    : "[Lambda_c+ -> (J/psi(1S) -> mu+ mu+) p+]CC",
+        "Jpsi"  : "[Lambda_c+ -> ^(J/psi(1S) -> mu+ mu+) p+]CC",
+        "lp1"   : "[Lambda_c+ -> (J/psi(1S) -> ^mu+ mu+) p+]CC",
+        "lp2"   : "[Lambda_c+ -> (J/psi(1S) -> mu+ ^mu+) p+]CC",
+        "pp"    : "[Lambda_c+ -> (J/psi(1S) -> mu+ mu+) ^p+]CC",
+    }
+
+    variables = {
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lp1"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "lp2"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_Lc2pee_WS(options, pvs, rec_summary):
+    name = "Lc2pee_WS"
+    turbo_line = "Hlt2Charm_LcpToPpEpEp_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Lc"    : "[Lambda_c+ -> (J/psi(1S) -> e+ e+) p+]CC",
+        "Jpsi"  : "[Lambda_c+ -> ^(J/psi(1S) -> e+ e+) p+]CC",
+        "lp1"   : "[Lambda_c+ -> (J/psi(1S) -> ^e+ e+) p+]CC",
+        "lp2"   : "[Lambda_c+ -> (J/psi(1S) -> e+ ^e+) p+]CC",
+        "pp"    : "[Lambda_c+ -> (J/psi(1S) -> e+ e+) ^p+]CC",
+    }
+
+    variables = {
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lp1"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "lp2"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_Lc2pmue_WS(options, pvs, rec_summary):
+    name = "Lc2pmue_WS"
+    turbo_line = "Hlt2Charm_LcpToPpMupEp_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Lc"    : "[Lambda_c+ -> (J/psi(1S) -> mu+ e+) p+]CC",
+        "Jpsi"  : "[Lambda_c+ -> ^(J/psi(1S) -> mu+ e+) p+]CC",
+        "lp1"   : "[Lambda_c+ -> (J/psi(1S) -> ^mu+ e+) p+]CC",
+        "lp2"   : "[Lambda_c+ -> (J/psi(1S) -> mu+ ^e+) p+]CC",
+        "pp"    : "[Lambda_c+ -> (J/psi(1S) -> mu+ e+) ^p+]CC",
+    }
+
+    variables = {
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lp1"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "lp2"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_Lc2ppipi(options, pvs, rec_summary):
+    name = "Lc2ppipi"
+    turbo_line = "Hlt2Charm_LcpToPpPimPip_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Lc"   : "[Lambda_c+ -> (J/psi(1S) -> pi- pi+) p+]CC",
+        "Jpsi" : "[Lambda_c+ -> ^(J/psi(1S) -> pi- pi+) p+]CC",
+        "lm"   : "[Lambda_c+ -> (J/psi(1S) -> ^pi- pi+) p+]CC",
+        "lp"   : "[Lambda_c+ -> (J/psi(1S) -> pi- ^pi+) p+]CC",
+        "pp"   : "[Lambda_c+ -> (J/psi(1S) -> pi- pi+) ^p+]CC",
+    }
+
+    variables = {
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_Lc2KSp_LL(options, pvs, rec_summary):
+    name = "Lc2KSp_LL"
+    turbo_line = "Hlt2Charm_LcpToKsPp_LL_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Lc"    : "[Lambda_c+ -> (KS0 -> pi- pi+) p+]CC",
+        "KS0"   : "[Lambda_c+ -> ^(KS0 -> pi- pi+) p+]CC",
+        "pim"   : "[Lambda_c+ -> (KS0 -> ^pi- pi+) p+]CC",
+        "pip"   : "[Lambda_c+ -> (KS0 -> pi- ^pi+) p+]CC",
+        "pp"    : "[Lambda_c+ -> (KS0 -> pi- pi+) ^p+]CC",
+    }
+
+    variables = {
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
+        "KS0"    : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
+        "pim"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_Lc2KSp_DD(options, pvs, rec_summary):
+    name = "Lc2KSp_DD"
+    turbo_line = "Hlt2Charm_LcpToKsPp_DD_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Lc"    : "[Lambda_c+ -> (KS0 -> pi- pi+) p+]CC",
+        "KS0"   : "[Lambda_c+ -> ^(KS0 -> pi- pi+) p+]CC",
+        "pim"   : "[Lambda_c+ -> (KS0 -> ^pi- pi+) p+]CC",
+        "pip"   : "[Lambda_c+ -> (KS0 -> pi- ^pi+) p+]CC",
+        "pp"   : "[Lambda_c+ -> (KS0 -> pi- pi+) ^p+]CC",
+    }
+
+    variables = {
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
+        "KS0"    : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
+        "pim"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
diff --git a/Charm_2024raredecays/options/d0_to_hhhh.py b/Charm_2024raredecays/options/d0_to_hhhh.py
new file mode 100644
index 0000000000..349fbd85b8
--- /dev/null
+++ b/Charm_2024raredecays/options/d0_to_hhhh.py
@@ -0,0 +1,450 @@
+# copied from: 
+# file        = AnalysisProductions/Charm_2024validation/d0_to_hhhh.py 
+# commit_hash = fdeac57133d09d7a6b39698dcca54154069928c2
+
+
+from .tupling import (
+    make_composite_variables,
+    make_composite_variables_4body,
+    make_composite_variables_3body,
+    make_basic_variables,
+    make_hlt2_event_variables,
+    make_DeltaM_variable,
+    make_basic_dtf_variables,
+    make_composite_dtf_variables,
+    make_basic_isolation_variables,
+    make_intermediate_isolation_variables,
+    make_top_isolation_variables,
+)
+
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from FunTuple import FunTuple_Particles as Funtuple
+from DecayTreeFitter import DecayTreeFitter
+
+# I can't get make_composite_variables_4body to work for some reason...
+import Functors as F
+from FunTuple import FunctorCollection
+variables_4body = (
+    FunctorCollection(
+        {
+            #14
+            "M14": F.SUBCOMB(Functor=F.MASS, Indices=(1, 4)),
+            "SDOCA14"     : F.SDOCA(Child1=1,Child2=4),
+            "SDOCACHI214" : F.SDOCACHI2(Child1=1,Child2=4),
+            "DOCA14"      : F.DOCA(Child1=1,Child2=4),
+            "DOCACHI214"  : F.DOCACHI2(Child1=1,Child2=4),
+            "COS14": F.ALV(1, 4),
+            #24
+            "M24": F.SUBCOMB(Functor=F.MASS, Indices=(2, 4)),
+            "SDOCA24"     : F.SDOCA(Child1=2,Child2=4),
+            "SDOCACHI224" : F.SDOCACHI2(Child1=2,Child2=4),
+            "DOCA24"      : F.DOCA(Child1=2,Child2=4),
+            "DOCACHI224"  : F.DOCACHI2(Child1=2,Child2=4),
+            "COS24": F.ALV(2, 4),
+            #34
+            "M34": F.SUBCOMB(Functor=F.MASS, Indices=(3, 4)),
+            "SDOCA34"     : F.SDOCA(Child1=3,Child2=4),
+            "SDOCACHI234" : F.SDOCACHI2(Child1=3,Child2=4),
+            "DOCA34"      : F.DOCA(Child1=3,Child2=4),
+            "DOCACHI234"  : F.DOCACHI2(Child1=3,Child2=4),
+            "COS34": F.ALV(3, 4),
+        }
+    )
+)
+
+
+def maketuple_DstToD0pi_D0ToKKPiPi(options, pvs, rec_summary):
+    name = "DstToD0pi_D0ToKKPiPi"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmKpPimPip_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst"   : "[D*(2010)+ -> ([D0]CC -> K- K+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "D0"    : "[D*(2010)+ -> ^([D0]CC -> K- K+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "Km"    : "[D*(2010)+ -> ([D0]CC -> ^K- K+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "Kp"    : "[D*(2010)+ -> ([D0]CC -> K- ^K+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "Jpsi"  : "[D*(2010)+ -> ([D0]CC -> K- K+ ^(J/psi(1S) -> pi- pi+)) pi+]CC",
+        "lm"    : "[D*(2010)+ -> ([D0]CC -> K- K+ (J/psi(1S) -> ^pi- pi+)) pi+]CC",
+        "lp"    : "[D*(2010)+ -> ([D0]CC -> K- K+ (J/psi(1S) -> pi- ^pi+)) pi+]CC",
+        "spip"  : "[D*(2010)+ -> ([D0]CC -> K- K+ (J/psi(1S) -> pi- pi+)) ^pi+]CC",
+    }
+
+
+    DTF_PV = DecayTreeFitter(
+        name='DTF_D0ToKKPiPi_PV',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    #basic_variables = make_basic_variables(options, pvs, input_data) +\
+    #    make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)
+
+    composite_dtf_variables = make_composite_dtf_variables(options,
+                                                           pvs,
+                                                           input_data,
+                                                           DTF=DTF_PV,
+                                                           pv_constraint=True)
+
+    #composite_variables = make_composite_variables(options, pvs, input_data) + composite_dtf_variables
+        
+
+    #composite_variables_4body = make_composite_variables_3body(options, pvs, input_data) + composite_dtf_variables + variables_4body
+
+    #variables = {
+    #    "Dst"   : composite_variables+make_DeltaM_variable(options),
+    #    "D0"    : composite_variables_4body,
+    #    "h1"    : basic_variables,
+    #    "h2"    : basic_variables,
+    #    "h3"    : basic_variables,
+    #    "h4"    : basic_variables,
+    #    "h5"    : basic_variables,
+    #    "pis"   : basic_variables,
+    #}
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+composite_dtf_variables+make_top_isolation_variables(turbo_line, input_data),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+composite_dtf_variables+make_intermediate_isolation_variables(turbo_line, input_data),
+        "Km"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+        "Kp"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+composite_dtf_variables+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+        "spip"  : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+
+
+def maketuple_DstToD0pi_D0ToKPiPiPi_RS(options, pvs, rec_summary):
+    name = "DstToD0pi_D0ToKPiPiPi_RS"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPimPipPip_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst"   : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "D0"    : "[D*(2010)+ -> ^(D0 -> K- pi+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "Km"    : "[D*(2010)+ -> (D0 -> ^K- pi+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "pip"   : "[D*(2010)+ -> (D0 -> K- ^pi+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "Jpsi"  : "[D*(2010)+ -> (D0 -> K- pi+ ^(J/psi(1S) -> pi- pi+)) pi+]CC",
+        "lm"    : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> ^pi- pi+)) pi+]CC",
+        "lp"    : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> pi- ^pi+)) pi+]CC",
+        "spip"  : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> pi- pi+)) ^pi+]CC",
+    }
+
+    DTF_PV = DecayTreeFitter(
+        name='DTF_D0ToKPiPiPi_RS_PV',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    composite_dtf_variables = make_composite_dtf_variables(options,
+                                                           pvs,
+                                                           input_data,
+                                                           DTF=DTF_PV,
+                                                           pv_constraint=True)
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+composite_dtf_variables+make_top_isolation_variables(turbo_line, input_data),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+composite_dtf_variables+make_intermediate_isolation_variables(turbo_line, input_data),
+        "Km"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+        "pip"   : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+composite_dtf_variables+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+        "spip"  : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_DstToD0pi_D0ToKPiPiPi_WS(options, pvs, rec_summary):
+    name = "DstToD0pi_D0ToKPiPiPi_WS"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKpPimPimPip_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst"   : "[D*(2010)+ -> (D0 -> pi- K+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "D0"    : "[D*(2010)+ -> ^(D0 -> pi- K+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "pim"   : "[D*(2010)+ -> (D0 -> ^pi- K+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "Kp"    : "[D*(2010)+ -> (D0 -> pi- ^K+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "Jpsi"  : "[D*(2010)+ -> (D0 -> pi- K+ ^(J/psi(1S) -> pi- pi+)) pi+]CC",
+        "lm"    : "[D*(2010)+ -> (D0 -> pi- K+ (J/psi(1S) -> ^pi- pi+)) pi+]CC",
+        "lp"    : "[D*(2010)+ -> (D0 -> pi- K+ (J/psi(1S) -> pi- ^pi+)) pi+]CC",
+        "spip"  : "[D*(2010)+ -> (D0 -> pi- K+ (J/psi(1S) -> pi- pi+)) ^pi+]CC",
+    }
+
+    DTF_PV = DecayTreeFitter(
+        name='DTF_D0ToKPiPiPi_WS_PV',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    composite_dtf_variables = make_composite_dtf_variables(options,
+                                                           pvs,
+                                                           input_data,
+                                                           DTF=DTF_PV,
+                                                           pv_constraint=True)
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+composite_dtf_variables+make_top_isolation_variables(turbo_line, input_data),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+composite_dtf_variables+make_intermediate_isolation_variables(turbo_line, input_data),
+        "pim"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+        "Kp"   : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+composite_dtf_variables+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+        "spip"  : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_DstToD0pi_D0ToPiPiPiPi(options, pvs, rec_summary):
+    name = "DstToD0pi_D0ToPiPiPiPi"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimPimPipPip_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst"   : "[D*(2010)+ -> ([D0]CC -> pi- pi+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "D0"    : "[D*(2010)+ -> ^([D0]CC -> pi- pi+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "pim"   : "[D*(2010)+ -> ([D0]CC -> ^pi- pi+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "pip"   : "[D*(2010)+ -> ([D0]CC -> pi- ^pi+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "Jpsi"  : "[D*(2010)+ -> ([D0]CC -> pi- pi+ ^(J/psi(1S) -> pi- pi+)) pi+]CC",
+        "lm"    : "[D*(2010)+ -> ([D0]CC -> pi- pi+ (J/psi(1S) -> ^pi- pi+)) pi+]CC",
+        "lp"    : "[D*(2010)+ -> ([D0]CC -> pi- pi+ (J/psi(1S) -> pi- ^pi+)) pi+]CC",
+        "spip"  : "[D*(2010)+ -> ([D0]CC -> pi- pi+ (J/psi(1S) -> pi- pi+)) ^pi+]CC",
+    }
+
+
+    DTF_PV = DecayTreeFitter(
+        name='DTF_D0ToPiPiPiPi_PV',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    composite_dtf_variables = make_composite_dtf_variables(options,
+                                                           pvs,
+                                                           input_data,
+                                                           DTF=DTF_PV,
+                                                           pv_constraint=True)
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+composite_dtf_variables+make_top_isolation_variables(turbo_line, input_data),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+composite_dtf_variables+make_intermediate_isolation_variables(turbo_line, input_data),
+        "pim"   : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+        "pip"   : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+composite_dtf_variables+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+        "spip"  : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+
+
+
+def maketuple_Dst2D0pi_D02pipimumu_WS(options, pvs, rec_summary, pim = False):
+    name = "Dst2D0pi_D02pipimumu_WSp"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimpPimpMumpMump_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst"   : "[D*(2010)+ -> ([D0]CC -> pi+ pi+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
+        "D0"    : "[D*(2010)+ -> ^([D0]CC -> pi+ pi+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
+        "h1"    : "[D*(2010)+ -> ([D0]CC -> ^pi+ pi+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
+        "h2"    : "[D*(2010)+ -> ([D0]CC -> pi+ ^pi+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
+        "Jpsi"  : "[D*(2010)+ -> ([D0]CC -> pi+ pi+ ^(J/psi(1S) -> mu+ mu+)) pi+]CC",
+        "l1"    : "[D*(2010)+ -> ([D0]CC -> pi+ pi+ (J/psi(1S) -> ^mu+ mu+)) pi+]CC",
+        "l2"    : "[D*(2010)+ -> ([D0]CC -> pi+ pi+ (J/psi(1S) -> mu+ ^mu+)) pi+]CC",
+        "spip"  : "[D*(2010)+ -> ([D0]CC -> pi+ pi+ (J/psi(1S) -> mu+ mu+)) ^pi+]CC",
+    }
+
+    if pim == True:
+        name = "Dst2D0pi_D02pipimumu_WSm"
+
+        branches = {
+            "Dst"  : "[D*(2010)+ -> ([D0]CC -> pi- pi- (J/psi(1S) -> mu- mu-)) pi+]CC",
+            "D0"   : "[D*(2010)+ -> ^([D0]CC -> pi- pi- (J/psi(1S) -> mu- mu-)) pi+]CC",
+            "h1"   : "[D*(2010)+ -> ([D0]CC -> ^pi- pi- (J/psi(1S) -> mu- mu-)) pi+]CC",
+            "h2"   : "[D*(2010)+ -> ([D0]CC -> pi- ^pi- (J/psi(1S) -> mu- mu-)) pi+]CC",
+            "Jpsi" : "[D*(2010)+ -> ([D0]CC -> pi- pi- ^(J/psi(1S) -> mu- mu-)) pi+]CC",
+            "l1"   : "[D*(2010)+ -> ([D0]CC -> pi- pi- (J/psi(1S) -> ^mu- mu-)) pi+]CC",
+            "l2"   : "[D*(2010)+ -> ([D0]CC -> pi- pi- (J/psi(1S) -> mu- ^mu-)) pi+]CC",
+            "spip" : "[D*(2010)+ -> ([D0]CC -> pi- pi- (J/psi(1S) -> mu- mu-)) ^pi+]CC",
+        }
+
+    DTF_PV = DecayTreeFitter(
+        name='DTF_D0Topipimumu_WS_PV',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    composite_dtf_variables = make_composite_dtf_variables(options,
+                                                           pvs,
+                                                           input_data,
+                                                           DTF=DTF_PV,
+                                                           pv_constraint=True)
+    
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+composite_dtf_variables+make_top_isolation_variables(turbo_line, input_data),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+composite_dtf_variables+make_intermediate_isolation_variables(turbo_line, input_data),
+        "h1"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+        "h2"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+composite_dtf_variables+make_intermediate_isolation_variables(turbo_line, input_data),
+        "l1"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+        "l2"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+        "spip"  : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+
+
+def maketuple_Dst2D0pi_D02KKmumu_WS(options, pvs, rec_summary, Km = False):
+    name = "Dst2D0pi_D02KKmumu_WSp"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmpKmpMumpMump_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst"   : "[D*(2010)+ -> ([D0]CC -> K+ K+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
+        "D0"    : "[D*(2010)+ -> ^([D0]CC -> K+ K+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
+        "h1"    : "[D*(2010)+ -> ([D0]CC -> ^K+ K+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
+        "h2"    : "[D*(2010)+ -> ([D0]CC -> K+ ^K+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
+        "Jpsi"  : "[D*(2010)+ -> ([D0]CC -> K+ K+ ^(J/psi(1S) -> mu+ mu+)) pi+]CC",
+        "l1"    : "[D*(2010)+ -> ([D0]CC -> K+ K+ (J/psi(1S) -> ^mu+ mu+)) pi+]CC",
+        "l2"    : "[D*(2010)+ -> ([D0]CC -> K+ K+ (J/psi(1S) -> mu+ ^mu+)) pi+]CC",
+        "spip"  : "[D*(2010)+ -> ([D0]CC -> K+ K+ (J/psi(1S) -> mu+ mu+)) ^pi+]CC",
+    }
+
+
+    if Km == True:
+        name = "Dst2D0pi_D02KKmumu_WSm"
+
+        branches = {
+            "Dst"   : "[D*(2010)+ -> ([D0]CC -> K- K- (J/psi(1S) -> mu- mu-)) pi+]CC",
+            "D0"    : "[D*(2010)+ -> ^([D0]CC -> K- K- (J/psi(1S) -> mu- mu-)) pi+]CC",
+            "h1"    : "[D*(2010)+ -> ([D0]CC -> ^K- K- (J/psi(1S) -> mu- mu-)) pi+]CC",
+            "h2"    : "[D*(2010)+ -> ([D0]CC -> K- ^K- (J/psi(1S) -> mu- mu-)) pi+]CC",
+            "Jpsi"  : "[D*(2010)+ -> ([D0]CC -> K- K- ^(J/psi(1S) -> mu- mu-)) pi+]CC",
+            "l1"    : "[D*(2010)+ -> ([D0]CC -> K- K- (J/psi(1S) -> ^mu- mu-)) pi+]CC",
+            "l2"    : "[D*(2010)+ -> ([D0]CC -> K- K- (J/psi(1S) -> mu- ^mu-)) pi+]CC",
+            "spip"  : "[D*(2010)+ -> ([D0]CC -> K- K- (J/psi(1S) -> mu- mu-)) ^pi+]CC",
+        }
+
+
+    DTF_PV = DecayTreeFitter(
+        name='DTF_D0ToKKmumu_WS_PV',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    composite_dtf_variables = make_composite_dtf_variables(options,
+                                                           pvs,
+                                                           input_data,
+                                                           DTF=DTF_PV,
+                                                           pv_constraint=True)
+    
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+composite_dtf_variables+make_top_isolation_variables(turbo_line, input_data),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+composite_dtf_variables+make_intermediate_isolation_variables(turbo_line, input_data),
+        "h1"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+        "h2"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+composite_dtf_variables+make_intermediate_isolation_variables(turbo_line, input_data),
+        "l1"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+        "l2"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+        "spip"  : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_Dst2D0pi_D02Kpimumu_WS(options, pvs, rec_summary, Km = False):
+    name = "Dst2D0pi_D02Kpimumu_WSp"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmpPimpMumpMump_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+
+    branches = {
+        "Dst"   : "[D*(2010)+ -> ([D0]CC -> K+ pi+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
+        "D0"    : "[D*(2010)+ -> ^([D0]CC -> K+ pi+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
+        "h1"    : "[D*(2010)+ -> ([D0]CC -> ^K+ pi+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
+        "h2"    : "[D*(2010)+ -> ([D0]CC -> K+ ^pi+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
+        "Jpsi"  : "[D*(2010)+ -> ([D0]CC -> K+ pi+ ^(J/psi(1S) -> mu+ mu+)) pi+]CC",
+        "l1"    : "[D*(2010)+ -> ([D0]CC -> K+ pi+ (J/psi(1S) -> ^mu+ mu+)) pi+]CC",
+        "l2"    : "[D*(2010)+ -> ([D0]CC -> K+ pi+ (J/psi(1S) -> mu+ ^mu+)) pi+]CC",
+        "spip"  : "[D*(2010)+ -> ([D0]CC -> K+ pi+ (J/psi(1S) -> mu+ mu+)) ^pi+]CC",
+    }
+
+
+
+    if Km == True:
+        name = "Dst2D0pi_D02Kpimumu_WSm"
+
+        branches = {
+            "Dst" : "[D*(2010)+ -> ([D0]CC -> K- pi- (J/psi(1S) -> mu- mu-)) pi+]CC",
+            "D0"  : "[D*(2010)+ -> ^([D0]CC -> K- pi- (J/psi(1S) -> mu- mu-)) pi+]CC",
+            "h1"   : "[D*(2010)+ -> ([D0]CC -> ^K- pi- (J/psi(1S) -> mu- mu-)) pi+]CC",
+            "h2"  : "[D*(2010)+ -> ([D0]CC -> K- ^pi- (J/psi(1S) -> mu- mu-)) pi+]CC",
+            "Jpsi"  : "[D*(2010)+ -> ([D0]CC -> K- pi- ^(J/psi(1S) -> mu- mu-)) pi+]CC",
+            "l1"  : "[D*(2010)+ -> ([D0]CC -> K- pi- (J/psi(1S) -> ^mu- mu-)) pi+]CC",
+            "l2"  : "[D*(2010)+ -> ([D0]CC -> K- pi- (J/psi(1S) -> mu- ^mu-)) pi+]CC",
+            "spip" : "[D*(2010)+ -> ([D0]CC -> K- pi- (J/psi(1S) -> mu- mu-)) ^pi+]CC",
+        }
+
+
+
+    DTF_PV = DecayTreeFitter(
+        name='DTF_D0ToKpimumu_WS_PV',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    composite_dtf_variables = make_composite_dtf_variables(options,
+                                                           pvs,
+                                                           input_data,
+                                                           DTF=DTF_PV,
+                                                           pv_constraint=True)
+    
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+composite_dtf_variables+make_top_isolation_variables(turbo_line, input_data),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+composite_dtf_variables+make_intermediate_isolation_variables(turbo_line, input_data),
+        "h1"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+        "h2"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+composite_dtf_variables+make_intermediate_isolation_variables(turbo_line, input_data),
+        "l1"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+        "l2"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+        "spip"  : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
diff --git a/Charm_2024raredecays/options/d0_to_hhll.py b/Charm_2024raredecays/options/d0_to_hhll.py
new file mode 100644
index 0000000000..7685206874
--- /dev/null
+++ b/Charm_2024raredecays/options/d0_to_hhll.py
@@ -0,0 +1,204 @@
+# copied and adapted from: 
+# file        = AnalysisProductions/CharmRD/maketuple_D02Kpimumu.py 
+# commit_hash = 73c8c844eb343b39ffc6b274fcdf2d196bfd7016
+
+
+from .tupling import (
+    make_composite_variables,
+    make_composite_variables_4body,
+    make_composite_variables_3body,
+    make_basic_variables,
+    make_hlt2_event_variables,
+    make_DeltaM_variable,
+    make_basic_dtf_variables,
+    make_composite_dtf_variables,
+    make_basic_isolation_variables,
+    make_intermediate_isolation_variables,
+    make_top_isolation_variables,
+)
+
+from .rare_charm import (
+    make_dtf_variables_hmumu,
+    make_dtf_variables_pmumu,
+    make_dtf_variables_hhmumu,
+)
+
+from DaVinci import Options, make_config
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles, get_pvs
+from FunTuple import FunTuple_Particles as Funtuple
+from FunTuple import FunctorCollection
+import FunTuple.functorcollections as FC
+from DecayTreeFitter import DecayTreeFitter
+import Functors as F
+from Functors.math import log
+
+
+
+
+#______________________ muon channels ______________________________________________________________________________________________________________
+
+
+def maketuple_Dst2D0pi_D02pipimumu(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02pipimumu"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimPipMumMup"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst"  : "[D*(2010)+ -> ([D0]CC -> pi+ pi- (J/psi(1S) -> mu- mu+)) pi+]CC",
+        "D0"   : "[D*(2010)+ -> ^([D0]CC -> pi+ pi- (J/psi(1S) -> mu- mu+)) pi+]CC",
+        "pip"  : "[D*(2010)+ -> ([D0]CC -> ^pi+ pi- (J/psi(1S) -> mu- mu+)) pi+]CC",
+        "pim"  : "[D*(2010)+ -> ([D0]CC -> pi+ ^pi- (J/psi(1S) -> mu- mu+)) pi+]CC",
+        "Jpsi" : "[D*(2010)+ -> ([D0]CC -> pi+ pi- ^(J/psi(1S) -> mu- mu+)) pi+]CC",
+        "lm"   : "[D*(2010)+ -> ([D0]CC -> pi+ pi- (J/psi(1S) -> ^mu- mu+)) pi+]CC",
+        "lp"   : "[D*(2010)+ -> ([D0]CC -> pi+ pi- (J/psi(1S) -> mu- ^mu+)) pi+]CC",
+        "spip" : "[D*(2010)+ -> ([D0]CC -> pi+ pi- (J/psi(1S) -> mu- mu+)) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "pim"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_Dst2D0pi_D02KKmumu(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02KKmumu"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmKpMumMup"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst"  : "[D*(2010)+ -> ([D0]CC -> K+ K- (J/psi(1S) -> mu- mu+)) pi+]CC",
+        "D0"   : "[D*(2010)+ -> ^([D0]CC -> K+ K- (J/psi(1S) -> mu- mu+)) pi+]CC",
+        "Kp"   : "[D*(2010)+ -> ([D0]CC -> ^K+ K- (J/psi(1S) -> mu- mu+)) pi+]CC",
+        "Km"   : "[D*(2010)+ -> ([D0]CC -> K+ ^K- (J/psi(1S) -> mu- mu+)) pi+]CC",
+        "Jpsi" : "[D*(2010)+ -> ([D0]CC -> K+ K- ^(J/psi(1S) -> mu- mu+)) pi+]CC",
+        "lm"   : "[D*(2010)+ -> ([D0]CC -> K+ K- (J/psi(1S) -> ^mu- mu+)) pi+]CC",
+        "lp"   : "[D*(2010)+ -> ([D0]CC -> K+ K- (J/psi(1S) -> mu- ^mu+)) pi+]CC",
+        "spip" : "[D*(2010)+ -> ([D0]CC -> K+ K- (J/psi(1S) -> mu- mu+)) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
+        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Km"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02Kpimumu_RS(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02Kpimumu_RS"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPipMumMup"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst"  : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
+        "D0"   : "[D*(2010)+ -> ^(D0 -> K- pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
+        "Km"   : "[D*(2010)+ -> (D0 -> ^K- pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
+        "pip"  : "[D*(2010)+ -> (D0 -> K- ^pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
+        "Jpsi" : "[D*(2010)+ -> (D0 -> K- pi+ ^(J/psi(1S) -> mu- mu+)) pi+]CC",
+        "lm"   : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> ^mu- mu+)) pi+]CC",
+        "lp"   : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> mu- ^mu+)) pi+]CC",
+        "spip" : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> mu- mu+)) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
+        "Km"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_Dst2D0pi_D02Kpimumu_WS(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02Kpimumu_WS"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKpPimMumMup"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst"  : "[D*(2010)+ -> (D0 -> K+ pi- (J/psi(1S) -> mu- mu+)) pi+]CC",
+        "D0"   : "[D*(2010)+ -> ^(D0 -> K+ pi- (J/psi(1S) -> mu- mu+)) pi+]CC",
+        "Kp"   : "[D*(2010)+ -> (D0 -> ^K+ pi- (J/psi(1S) -> mu- mu+)) pi+]CC",
+        "pim"  : "[D*(2010)+ -> (D0 -> K+ ^pi- (J/psi(1S) -> mu- mu+)) pi+]CC",
+        "Jpsi" : "[D*(2010)+ -> (D0 -> K+ pi- ^(J/psi(1S) -> mu- mu+)) pi+]CC",
+        "lm"   : "[D*(2010)+ -> (D0 -> K+ pi- (J/psi(1S) -> ^mu- mu+)) pi+]CC",
+        "lp"   : "[D*(2010)+ -> (D0 -> K+ pi- (J/psi(1S) -> mu- ^mu+)) pi+]CC",
+        "spip" : "[D*(2010)+ -> (D0 -> K+ pi- (J/psi(1S) -> mu- mu+)) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
+        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "pim"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D02Kpimumu(options, pvs, rec_summary):
+    name = "D02Kpimumu"
+    turbo_line = "Hlt2Charm_D0ToKmPipMumMup_Untag" # Why is there only the KmPip option and not KpPim? Is this inclusive?
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}", [turbo_line])
+
+    branches = {
+        "D0"   : "[D0 -> K- pi+ (J/psi(1S) -> mu- mu+)]CC",
+        "Km"   : "[D0 -> ^K- pi+ (J/psi(1S) -> mu- mu+)]CC",
+        "pip"  : "[D0 -> K- ^pi+ (J/psi(1S) -> mu- mu+)]CC",
+        "Jpsi" : "[D0 -> K- pi+ ^(J/psi(1S) -> mu- mu+)]CC",
+        "lm"   : "[D0 -> K- pi+ (J/psi(1S) -> ^mu- mu+)]CC",
+        "lp"   : "[D0 -> K- pi+ (J/psi(1S) -> mu- ^mu+)]CC",
+    }
+
+    variables = {
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_top_isolation_variables(turbo_line, input_data),
+        "Km"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
diff --git a/Charm_2024raredecays/options/d_to_hhh.py b/Charm_2024raredecays/options/d_to_hhh.py
new file mode 100644
index 0000000000..d62674f963
--- /dev/null
+++ b/Charm_2024raredecays/options/d_to_hhh.py
@@ -0,0 +1,204 @@
+# copied from: 
+# file        = AnalysisProductions/Charm_2024validation/d_to_hhh.py 
+# commit_hash = fdeac57133d09d7a6b39698dcca54154069928c2
+
+
+from .tupling import (
+    make_composite_variables_3body,
+    make_b_composite_variables,
+    make_composite_variables,
+    make_basic_variables,
+    make_hlt2_event_variables,
+    make_composite_dtf_variables_3body,
+    make_basic_dtf_variables,
+    make_basic_isolation_variables,
+    make_intermediate_isolation_variables,
+    make_top_isolation_variables,
+)
+
+from .rare_charm import (
+    make_dtf_variables_hmumu,
+    make_dtf_variables_pmumu,
+    make_dtf_variables_hhmumu,
+)
+
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from FunTuple import FunTuple_Particles as Funtuple
+                      
+
+
+def maketuple_D2pimumu_WS(options, pvs, rec_summary):
+    name = "D2pimumu_WS"
+    turbo_line = "Hlt2Charm_DpDspToPipMupMup_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp"    : "[D+ -> (J/psi(1S) -> mu+ mu+) pi+]CC",
+        "Jpsi"  : "[D+ -> (J/psi(1S) -> mu+ mu+) pi+]CC",
+        "lp1"   : "[D+ -> (J/psi(1S) -> ^mu+ mu+) pi+]CC",
+        "lp2"   : "[D+ -> (J/psi(1S) -> mu+ ^mu+) pi+]CC",
+        "hp"    : "[D+ -> (J/psi(1S) -> mu+ mu+) ^pi+]CC",
+    }
+
+
+    variables = {
+        "Dp"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lp1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "hp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+
+
+def maketuple_D2Kmumu_WS(options, pvs, rec_summary):
+    name = "D2Kmumu_WS"
+    turbo_line = "Hlt2Charm_DpDspToKpMupMup_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp"    : "[D+ -> (J/psi(1S) -> mu+ mu+) K+]CC",
+        "Jpsi"  : "[D+ -> (J/psi(1S) -> mu+ mu+) K+]CC",
+        "lp1"   : "[D+ -> (J/psi(1S) -> ^mu+ mu+) K+]CC",
+        "lp2"   : "[D+ -> (J/psi(1S) -> mu+ ^mu+) K+]CC",
+        "hp"    : "[D+ -> (J/psi(1S) -> mu+ mu+) ^K+]CC",
+    }
+
+
+    variables = {
+        "Dp"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lp1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "hp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+
+
+def maketuple_D2Kpipi(options, pvs, rec_summary):
+    name = "D2Kpipi"
+    turbo_line = "Hlt2Charm_DpDspToPipPimPip_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp"   : "[D+ -> (J/psi(1S) -> pi- pi+) K+]CC",
+        "Jpsi" : "[D+ -> (J/psi(1S) -> pi- pi+) K+]CC",
+        "lm"   : "[D+ -> (J/psi(1S) -> ^pi- pi+) K+]CC",
+        "lp"   : "[D+ -> (J/psi(1S) -> pi- ^pi+) K+]CC",
+        "hp"   : "[D+ -> (J/psi(1S) -> pi- pi+) ^K+]CC",
+    }
+
+    variables = {
+        "Dp"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "hp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_D2pipipi(options, pvs, rec_summary, _NoCuts=False):
+    name = "D2pipipi"
+    turbo_line = "Hlt2Charm_DpDspToPipPimPip_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp"   : "[D+ -> (J/psi(1S) -> pi- pi+) pi+]CC",
+        "Jpsi" : "[D+ -> (J/psi(1S) -> pi- pi+) pi+]CC",
+        "lm"   : "[D+ -> (J/psi(1S) -> ^pi- pi+) pi+]CC",
+        "lp"   : "[D+ -> (J/psi(1S) -> pi- ^pi+) pi+]CC",
+        "hp"   : "[D+ -> (J/psi(1S) -> pi- pi+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "hp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+
+
+def maketuple_D2KSK_LL(options, pvs, rec_summary):
+    name = "D2KSK_LL"
+    turbo_line = "Hlt2Charm_DpDspToKsKp_LL_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp"   : "[D+ -> (KS0 -> pi- pi+) K+]CC",
+        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) K+]CC",
+        "pim"  : "[D+ -> (KS0 -> ^pi- pi+) K+]CC",
+        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) K+]CC",
+        "hp"   : "[D+ -> (KS0 -> pi- pi+) ^K+]CC",
+    }
+
+    variables = {
+        "Dp"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+        "KS0"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "pim"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "hp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, use_loki_decay_finder=True)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_D2KSpi_LL(options, pvs, rec_summary):
+    name = "D2KSpi_LL"
+    turbo_line = "Hlt2Charm_DpDspToKsPip_LL_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp"   : "[D+ -> (KS0 -> pi- pi+) pi+]CC",
+        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) pi+]CC",
+        "pim"  : "[D+ -> (KS0 -> ^pi- pi+) pi+]CC",
+        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) pi+]CC",
+        "hp"   : "[D+ -> (KS0 -> pi- pi+) ^pi+]CC",
+    }
+
+
+    variables = {
+        "Dp"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+        "KS0"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "pim"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "hp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, use_loki_decay_finder=True)
+
+    return [myfilter, mytuple]
+
diff --git a/Charm_2024raredecays/options/d_to_hll.py b/Charm_2024raredecays/options/d_to_hll.py
new file mode 100644
index 0000000000..6986a85f66
--- /dev/null
+++ b/Charm_2024raredecays/options/d_to_hll.py
@@ -0,0 +1,156 @@
+# copied and adapted from: 
+# file        = AnalysisProductions/CharmRD/maketuple_D02Kmumu.py 
+# commit_hash = 73c8c844eb343b39ffc6b274fcdf2d196bfd7016
+
+
+from .tupling import (
+    make_composite_variables,
+    make_composite_variables_3body,
+    make_basic_variables,
+    make_hlt2_event_variables,
+    make_basic_dtf_variables,
+    make_composite_dtf_variables,
+    make_basic_isolation_variables,
+    make_intermediate_isolation_variables,
+    make_top_isolation_variables,
+)
+
+from .rare_charm import (
+    make_dtf_variables_hmumu,
+    make_dtf_variables_pmumu,
+    make_dtf_variables_hhmumu,
+)
+
+import Functors as F
+from Functors.math import log
+from DaVinci import Options, make_config
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from FunTuple import FunctorCollection
+from PyConf.reading import get_particles, get_pvs
+import FunTuple.functorcollections as FC
+from FunTuple import FunTuple_Particles as Funtuple
+
+from DecayTreeFitter import DecayTreeFitter
+
+
+
+def maketuple_D2pimumu_OS(options, pvs, rec_summary): 
+    name = "D2pimumu_OS"
+    turbo_line = "Hlt2Charm_DpDspToPipMumMup" 
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp"   : "[D+ -> (J/psi(1S) -> mu- mu+) pi+]CC",
+        "Jpsi" : "[D+ -> ^(J/psi(1S) -> mu- mu+) pi+]CC",
+        "lm"   : "[D+ -> (J/psi(1S) -> ^mu- mu+) pi+]CC",
+        "lp"   : "[D+ -> (J/psi(1S) -> mu- ^mu+) pi+]CC",
+        "hp"   : "[D+ -> (J/psi(1S) -> mu- mu+) ^pi+]CC",
+    }
+
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+        "Jpsi" : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+
+
+def maketuple_D2pimumu_SS(options, pvs, rec_summary): 
+    name = "D2pimumu_SS"
+    turbo_line = "Hlt2Charm_DpDspToPimMupMup"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp"    : "[D+ -> (J/psi(1S) -> mu+ mu+) pi-]CC",
+        "Jpsi"  : "[D+ -> (J/psi(1S) -> mu+ mu+) pi-]CC",
+        "lp1"   : "[D+ -> (J/psi(1S) -> ^mu+ mu+) pi-]CC",
+        "lp2"   : "[D+ -> (J/psi(1S) -> mu+ ^mu+) pi-]CC",
+        "hm"    : "[D+ -> (J/psi(1S) -> mu+ mu+) ^pi-]CC",
+    }
+
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+        "Jpsi" : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lp1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "hm"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+    
+    return [myfilter, mytuple]
+
+
+
+def maketuple_D2Kmumu_OS(options, pvs, rec_summary):
+    name = "D2Kmumu_OS"
+    turbo_line = "Hlt2Charm_DpDspToKpMumMup" 
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp"   : "[D+ -> (J/psi(1S) -> mu- mu+) K+]CC",
+        "Jpsi" : "[D+ -> ^(J/psi(1S) -> mu- mu+) K+]CC",
+        "lm"   : "[D+ -> (J/psi(1S) -> ^mu- mu+) K+]CC",
+        "lp"   : "[D+ -> (J/psi(1S) -> mu- ^mu+) K+]CC",
+        "hp"   : "[D+ -> (J/psi(1S) -> mu- mu+) ^K+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+        "Jpsi" : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+
+
+def maketuple_D2Kmumu_SS(options, pvs, rec_summary):
+    name = "D2dKmumu_SS"
+    turbo_line = "Hlt2Charm_DpDspToKmMupMup" 
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp"    : "[D+ -> (J/psi(1S) -> mu+ mu+) K-]CC",
+        "Jpsi"  : "[D+ -> (J/psi(1S) -> mu+ mu+) K-]CC",
+        "lp1"   : "[D+ -> (J/psi(1S) -> ^mu+ mu+) K-]CC",
+        "lp2"   : "[D+ -> (J/psi(1S) -> mu+ ^mu+) K-]CC",
+        "hm"    : "[D+ -> (J/psi(1S) -> mu+ mu+) ^K-]CC",
+    }
+
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+        "Jpsi" : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lp1"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp2"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "hm"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+
+
+
diff --git a/Charm_2024raredecays/options/rare_charm.py b/Charm_2024raredecays/options/rare_charm.py
new file mode 100644
index 0000000000..dff2ef39bd
--- /dev/null
+++ b/Charm_2024raredecays/options/rare_charm.py
@@ -0,0 +1,501 @@
+# copied from: 
+# file        = AnalysisProductions/Charm_2024validation/d_to_hhh.py 
+# commit_hash = fdeac57133d09d7a6b39698dcca54154069928c2
+
+
+from .tupling import (
+    make_composite_variables,
+    make_composite_variables_3body,
+    make_DeltaM_variable,
+    make_basic_variables,
+    make_hlt2_event_variables,
+    make_top_isolation_variables,
+    make_basic_isolation_variables,
+    make_intermediate_isolation_variables,
+    make_composite_dtf_variables,
+    make_composite_dtf_variables_3body,
+    make_basic_dtf_variables,
+)
+
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from FunTuple import FunTuple_Particles as Funtuple
+
+def make_dtf_variables_hmumu(options, pvs, input_data, ptype):
+
+    if ptype not in ["basic", "composite"]:
+        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
+
+    from DecayTreeFitter import DecayTreeFitter
+    
+    DTF = DecayTreeFitter(
+        name=f'DTF_{{hash}}',
+        input_particles=input_data)
+
+    DTFvtx = DecayTreeFitter(
+        name=f'DTFvtx_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    DTFmassDp = DecayTreeFitter(
+        name=f'DTFmassDp_{{hash}}',
+        input_particles=input_data,
+        mass_constraints=["D+"])
+
+    DTFvtxmassDp = DecayTreeFitter(
+        name=f'DTFvtxmassDp_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D+"])
+
+    DTFmassDsp = DecayTreeFitter(
+        name=f'DTFmassDsp_{{hash}}',
+        input_particles=input_data,
+        substitutions = ['D+{{D_s+}}'],
+        mass_constraints=["D_s+"])
+
+    DTFvtxmassDsp = DecayTreeFitter(
+        name=f'DTFvtxmassDsp_{{hash}}',
+        input_particles=input_data,
+        substitutions = ['D+{{D_s+}}',"J/psi(1S){{J/psi(1S)}}"],#trick
+        mass_constraints=["D_s+"],
+        input_pvs=pvs,
+    )
+
+    if ptype == "basic":
+        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassDp,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="Dp")
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassDp,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="Dp")
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassDsp,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="Dsp")
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassDsp,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="Dsp")
+        return dtf_vars
+
+    if ptype == "composite":
+        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassDp,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="Dp")
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassDp,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="Dp")
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassDsp,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="Dsp")
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassDsp,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="Dsp")
+        return dtf_vars
+
+
+def make_dtf_variables_pmumu(options, pvs, input_data, ptype):
+
+    if ptype not in ["basic", "composite"]:
+        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
+
+    from DecayTreeFitter import DecayTreeFitter
+    
+    DTF = DecayTreeFitter(
+        name=f'DTF_{{hash}}',
+        input_particles=input_data)
+
+    DTFvtx = DecayTreeFitter(
+        name=f'DTFvtx_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    DTFmass = DecayTreeFitter(
+        name=f'DTFmass_{{hash}}',
+        input_particles=input_data,
+        mass_constraints=["Lambda_c+"])
+
+    DTFvtxmass = DecayTreeFitter(
+        name=f'DTFvtxmass_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["Lambda_c+"])
+
+    if ptype == "basic":
+        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmass,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="Lc")
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmass,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="Lc")
+        return dtf_vars
+
+    if ptype == "composite":
+        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmass,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="D0")
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmass,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="D0")
+        return dtf_vars
+
+def make_dtf_variables_hhmumu(options, pvs, input_data, ptype):
+
+    if ptype not in ["basic", "composite","composite3b"]:
+        Exception(f"I want \'basic\' or \'composite\' or \'composite3b\. Got {ptype}")
+
+    from DecayTreeFitter import DecayTreeFitter
+    
+    DTF = DecayTreeFitter(
+        name=f'DTF_{{hash}}',
+        input_particles=input_data)
+
+    DTFvtx = DecayTreeFitter(
+        name=f'DTFvtx_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    DTFmass = DecayTreeFitter(
+        name=f'DTFmass_{{hash}}',
+        input_particles=input_data,
+        mass_constraints=["D0"])
+
+    DTFvtxmass = DecayTreeFitter(
+        name=f'DTFvtxmass_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0"])
+
+    if ptype == "basic":
+        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmass,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="D0")
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmass,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="D0")
+        return dtf_vars
+
+    if ptype == "composite3b":
+        dtf_vars = make_composite_dtf_variables_3body(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
+                                             DTF=DTFmass,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="D0")
+        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
+                                             DTF=DTFvtxmass,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="D0")
+
+        return dtf_vars
+        
+    if ptype == "composite":
+        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmass,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="D0")
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmass,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="D0")
+        return dtf_vars
+
+
+def maketuple_D2pimumu(options, pvs, rec_summary):
+    name = "D2pimumu"
+    turbo_line = "Hlt2Charm_DpDspToPipMumMup"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> (J/psi(1S) -> mu- mu+) pi+]CC",
+        "Jpsi" : "[D+ -> ^(J/psi(1S) -> mu- mu+) pi+]CC",
+        "lm"   : "[D+ -> (J/psi(1S) -> ^mu- mu+) pi+]CC",
+        "lp"   : "[D+ -> (J/psi(1S) -> mu- ^mu+) pi+]CC",
+        "hp" : "[D+ -> (J/psi(1S) -> mu- mu+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
+        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation: 
+
+        variables = {
+            "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+            "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2pimumu_WS(options, pvs, rec_summary):
+    name = "D2pimumu_WS"
+    turbo_line = "Hlt2Charm_DpDspToPipMupMup_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> (J/psi(1S) -> mu+ mu+) pi+]CC",
+        "Jpsi" : "[D+ -> (J/psi(1S) -> mu+ mu+) pi+]CC",
+        "lp1"   : "[D+ -> (J/psi(1S) -> ^mu+ mu+) pi+]CC",
+        "lp2"   : "[D+ -> (J/psi(1S) -> mu+ ^mu+) pi+]CC",
+        "hp" : "[D+ -> (J/psi(1S) -> mu+ mu+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
+        "lp1"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+        "lp2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation: 
+
+        variables = {
+            "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+            "lp1"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "lp2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2pipipi(options, pvs, rec_summary):
+    name = "CharmRD_D2pipipi"
+    turbo_line = "Hlt2Charm_DpDspToPipPimPip_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> (J/psi(1S) -> pi- pi+) pi+]CC",
+        "Jpsi" : "[D+ -> (J/psi(1S) -> pi- pi+) pi+]CC",
+        "lm"   : "[D+ -> (J/psi(1S) -> ^pi- pi+) pi+]CC",
+        "lp"   : "[D+ -> (J/psi(1S) -> pi- ^pi+) pi+]CC",
+        "hp" : "[D+ -> (J/psi(1S) -> pi- pi+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
+        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation: 
+
+        variables = {
+            "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+            "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2piee(options, pvs, rec_summary):
+    name = "D2piee"
+    turbo_line = "Hlt2Charm_DpDspToPipEmEp"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> (J/psi(1S) -> e- e+) pi+]CC",
+        "Jpsi" : "[D+ -> ^(J/psi(1S) -> e- e+) pi+]CC",
+        "lm"   : "[D+ -> (J/psi(1S) -> ^e- e+) pi+]CC",
+        "lp"   : "[D+ -> (J/psi(1S) -> e- ^e+) pi+]CC",
+        "hp" : "[D+ -> (J/psi(1S) -> e- e+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
+        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation: 
+
+        variables = {
+            "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+            "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Lc2pmumu(options, pvs, rec_summary):
+    name = "Lc2pmumu"
+    turbo_line = "Hlt2Charm_LcpToPpMumMup"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Lc" : "[Lambda_c+ -> (J/psi(1S) -> mu- mu+) p+]CC",
+        "Jpsi" : "[Lambda_c+ -> ^(J/psi(1S) -> mu- mu+) p+]CC",
+        "lm"   : "[Lambda_c+ -> (J/psi(1S) -> ^mu- mu+) p+]CC",
+        "lp"  : "[Lambda_c+ -> (J/psi(1S) -> mu- ^mu+) p+]CC",
+        "pp" : "[Lambda_c+ -> (J/psi(1S) -> mu- mu+) ^p+]CC",
+    }
+
+    variables = {
+        "Lc"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "pp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation: 
+
+        variables = {
+            "Lc"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+            "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "pp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02Kpimumu_RS(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02Kpimumu_RS"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPipMumMup"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^(D0 -> K- pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
+        "Km"   : "[D*(2010)+ -> (D0 -> ^K- pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
+        "pip"  : "[D*(2010)+ -> (D0 -> K- ^pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
+        "Jpsi"  : "[D*(2010)+ -> (D0 -> K- pi+ ^(J/psi(1S) -> mu- mu+)) pi+]CC",
+        "lm"  : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> ^mu- mu+)) pi+]CC",
+        "lp"  : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> mu- ^mu+)) pi+]CC",
+        "spip" : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> mu- mu+)) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite"),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation: 
+
+        variables = {
+            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
+            "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
+            "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+            "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
diff --git a/Charm_2024raredecays/options/tupling.py b/Charm_2024raredecays/options/tupling.py
new file mode 100644
index 0000000000..5da60b4e0b
--- /dev/null
+++ b/Charm_2024raredecays/options/tupling.py
@@ -0,0 +1,1003 @@
+# copied from: 
+# file        = AnalysisProductions/Charm_2024validation/d_to_hhh.py 
+# commit_hash = fdeac57133d09d7a6b39698dcca54154069928c2
+
+
+##############################################################################
+# (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.                                       #
+###############################################################################
+"""Common configuration functions
+
+"""
+
+import Functors as F
+from Functors.math import log
+import Functors.math as fmath
+
+from FunTuple import FunctorCollection
+from FunTuple.functorcollections import (
+    MCHierarchy,
+    MCPromptDecay,
+    Kinematics,
+    SelectionInfo,
+    HltTisTos,
+    MCVertexInfo,
+    MCKinematics,
+    ParticleID, #wrong variables PID_PI = 0, PROBNN_D = nan
+    EventInfo,
+    LHCInfo,
+    ParticleIsolation,
+    MCPrimaries,
+    MCReconstructed,
+    MCReconstructible,
+)
+
+from DaVinciMCTools import MCTruthAndBkgCat, MCReconstructed, MCReconstructible
+from PyConf.Algorithms import ParticleToSubcombinationsAlg
+from DecayTreeFitter import DecayTreeFitter
+
+Hlt1_global_lines = [
+    "Hlt1GECPassthroughDecision",
+    "Hlt1BeamGasDecision",
+    "Hlt1PassthroughDecision",
+    "Hlt1NoBeamDecision",
+    "Hlt1BeamOneDecision",
+    "Hlt1BeamTwoDecision",
+    "Hlt1BothBeamsDecision",
+    "Hlt1ODINLumiDecision",
+    "Hlt1ODINVeloOpenDecision",
+    "Hlt1ODINNoBiasDecision",
+    "Hlt1VeloMicroBiasDecision",
+    "Hlt1RICH1AlignmentDecision",
+    "Hlt1RICH2AlignmentDecision",
+    "Hlt1BeamGasDecision",
+    "Hlt1L02PPiDecision",
+    "Hlt1LowMassNoipDielectron_massSlice1_promptDecision",
+    "Hlt1LowMassNoipDielectron_SS_massSlice1_promptDecision",
+    "Hlt1LowMassNoipDielectron_massSlice2_promptDecision",
+    "Hlt1LowMassNoipDielectron_SS_massSlice2_promptDecision",
+    "Hlt1LowMassNoipDielectron_massSlice3_promptDecision",
+    "Hlt1LowMassNoipDielectron_SS_massSlice3_promptDecision",
+    "Hlt1LowMassNoipDielectron_massSlice4_promptDecision",
+    "Hlt1LowMassNoipDielectron_SS_massSlice4_promptDecision",
+    "Hlt1LowMassNoipDielectron_massSlice1_displacedDecision",
+    "Hlt1LowMassNoipDielectron_SS_massSlice1_displacedDecision",
+    "Hlt1LowMassNoipDielectron_massSlice2_displacedDecision",
+    "Hlt1LowMassNoipDielectron_SS_massSlice2_displacedDecision",
+    "Hlt1LowMassNoipDielectron_massSlice3_displacedDecision",
+    "Hlt1LowMassNoipDielectron_SS_massSlice3_displacedDecision",
+    "Hlt1LowMassNoipDielectron_massSlice4_displacedDecision",
+    "Hlt1LowMassNoipDielectron_SS_massSlice4_displacedDecision",
+]
+Hlt1_1track_lines = [
+    "Hlt1TrackMVADecision",
+    "Hlt1LowPtMuonDecision",
+    "Hlt1SingleHighPtMuonDecision",
+    "Hlt1SingleHighPtMuonNoMuIDDecision",
+    "Hlt1TrackMuonMVADecision",
+    "Hlt1OneMuonTrackLineDecision",
+    "Hlt1TrackElectronMVADecision",
+    "Hlt1SingleHighPtElectronDecision",
+    "Hlt1SingleHighEtDecision",
+]
+Hlt1_lines = Hlt1_1track_lines+[
+    "Hlt1D2KshhDecision",
+    "Hlt1TwoTrackMVACharmXSecDecision",
+    "Hlt1TwoTrackMVADecision",
+    "Hlt1TwoTrackKsDecision",
+    "Hlt1D2KPiDecision",
+    "Hlt1D2KKDecision",
+    "Hlt1D2PiPiDecision",
+    "Hlt1KsToPiPiDecision",
+    "Hlt1LowPtDiMuonDecision",#removed
+    "Hlt1DiMuonNoIPDecision",
+    "Hlt1DiMuonNoIP_ssDecision",
+    "Hlt1DiMuonHighMassDecision",
+    "Hlt1DiMuonLowMassDecision",#replaced by Hlt1DiMuonDisplacedDecision
+    "Hlt1DiMuonSoftDecision",
+    "Hlt1DiMuonDisplacedDecision",
+    "Hlt1TwoKsDecision",
+    "Hlt1D2KPiAlignmentDecision",
+    "Hlt1DiMuonHighMassAlignmentDecision",
+    "Hlt1DisplacedDiMuonAlignmentDecision",
+    "Hlt1DisplacedDielectronDecision",
+    "Hlt1DisplacedLeptonsDecision",#removed
+]
+
+
+Hlt2_lines = [
+    "Hlt2Charm_DstpToD0Pip_D0ToKmPip_XSec",
+    "Hlt2Charm_D0ToKmPip_XSec",
+    "Hlt2Charm_D0ToKmKp",
+    "Hlt2Charm_D0ToKmPip",
+    "Hlt2Charm_D0ToPimPip",
+    "Hlt2Charm_DpDspToKsKp_DD",
+    "Hlt2Charm_DpDspToKsKp_LD",
+    "Hlt2Charm_DpDspToKsKp_LL",
+    "Hlt2Charm_DpDspToKsPip_DD",
+    "Hlt2Charm_DpDspToKsPip_LD",
+    "Hlt2Charm_DpDspToKsPip_LL",
+    "Hlt2Charm_DpToKmPipPip",
+    "Hlt2Charm_DspToKmKpPip",
+    "Hlt2Charm_DpToKmPipPip_NoCuts",
+    "Hlt2Charm_DspToKmKpPip_NoCuts",
+    "Hlt2Charm_DpToKmPipPip_XSec",
+    "Hlt2Charm_DspToKmKpPip_XSec",
+    "Hlt2Charm_DstpToD0Pip_D0ToKmKp",
+    "Hlt2Charm_DstpToD0Pip_D0ToKmPip",
+    "Hlt2Charm_DstpToD0Pip_D0ToKpPim",
+    "Hlt2Charm_DstpToD0Pip_D0ToPimPip",
+    "Hlt2Charm_DstpToD0Pip_D0ToKmPip_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKpPim_LowBias",
+    "Hlt2Charm_D0ToKmPip_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKmKp_LowBias",
+    "Hlt2Charm_D0ToKmKp_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToPimPip_LowBias",
+    "Hlt2Charm_D0ToPimPip_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLL",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLL_Tight",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLDD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLDD_Tight",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDDD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDDD_Tight",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULLL",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULLL_Tight",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULDD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULDD_Tight",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLD_Tight",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDLD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDLD_Tight",
+    "Hlt2Charm_D0ToKsPimPip_LL",
+    "Hlt2Charm_D0ToKsPimPip_DD",
+    "Hlt2Charm_D0ToKsPimPip_LL_LowBias",
+    "Hlt2Charm_D0ToKsPimPip_LL_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_LL",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_DD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_LL_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_DD_LowBias",
+    "Hlt2Charm_D0ToKsKmPip_LL",
+    "Hlt2Charm_D0ToKsKmPip_DD",
+    "Hlt2Charm_D0ToKsKmPip_LL_LowBias",
+    "Hlt2Charm_D0ToKsKmPip_LL_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_LL",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_DD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_LL_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_DD_LowBias",
+    "Hlt2Charm_D0ToKsKpPim_LL",
+    "Hlt2Charm_D0ToKsKpPim_DD",
+    "Hlt2Charm_D0ToKsKpPim_LL_LowBias",
+    "Hlt2Charm_D0ToKsKpPim_DD_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_LL",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_DD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_LL_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_DD_LowBias",
+    "Hlt2Charm_D0ToKsKmKp_LL",
+    "Hlt2Charm_D0ToKsKmKp_DD",
+    "Hlt2Charm_D0ToKsKmKp_LL_LowBias",
+    "Hlt2Charm_D0ToKsKmKp_DD_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_LL",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_DD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_LL_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_DD_LowBias",
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS',
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS',
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS_MVA',
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS_MVA',
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS',
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS',
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS_MVA',
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS_MVA',
+    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS',
+    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS',
+    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS_MVA',
+    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS_MVA',
+]
+
+def make_composite_variables(options, pvs, data, add_truth=True, add_Hlt1TisTos=True):
+    if not options.simulation:
+        add_truth = False
+    variables = (
+        FunctorCollection(
+            {
+                "MAXPT": F.MAX(F.PT),
+                "MINPT": F.MIN(F.PT),
+                "SUMPT": F.SUM(F.PT),
+                "MAXP": F.MAX(F.P),
+                "MINP": F.MIN(F.P),
+                "BPVDIRA": F.BPVDIRA(pvs),
+                "VCHI2DOF": F.CHI2DOF,
+                #"VNDOF": F.NDOF,
+                "BPVFDCHI2": F.BPVFDCHI2(pvs),
+                "BPVFD": F.BPVFD(pvs),
+                "BPVVDRHO": F.BPVVDRHO(pvs),
+                "BPVVDZ": F.BPVVDZ(pvs),
+                "BPVIPCHI2": F.BPVIPCHI2(pvs),
+                "BPVIP": F.BPVIP(pvs),
+                "LOGBPVIPCHI2": log(F.BPVIPCHI2(pvs)),
+                "BPVLTIME": F.BPVLTIME(pvs),
+                "MAXBPVIPCHI2": F.MAX(F.BPVIPCHI2(pvs)),
+                "MINBPVIPCHI2": F.MIN(F.BPVIPCHI2(pvs)),
+                "MAXBPVIP": F.MAX(F.BPVIP(pvs)),
+                "MINBPVIP": F.MIN(F.BPVIP(pvs)),
+                "MAXDOCACHI2": F.MAXDOCACHI2,
+                "MAXDOCA": F.MAXDOCA,
+                "MAXSDOCACHI2": F.MAXSDOCACHI2,
+                "MAXSDOCA": F.MAXSDOCA,
+                "ETA": F.ETA,
+                "PHI": F.PHI,
+                "END_VX": F.END_VX,
+                "END_VY": F.END_VY,
+                "END_VZ": F.END_VZ,
+                "END_VX_ERR":F.SQRT @ F.CALL(0,0) @ F.POS_COV_MATRIX @ F.ENDVERTEX,
+                "END_VY_ERR":F.SQRT @ F.CALL(1,1) @ F.POS_COV_MATRIX @ F.ENDVERTEX,
+                "END_VZ_ERR":F.SQRT @ F.CALL(2,2) @ F.POS_COV_MATRIX @ F.ENDVERTEX,
+                "BPVX": F.BPVX(pvs),
+                "BPVY": F.BPVY(pvs),
+                "BPVZ": F.BPVZ(pvs),
+                "BPVX_ERR": F.SQRT @ F.CALL(0,0) @ F.POS_COV_MATRIX @ F.BPV(pvs),
+                "BPVY_ERR": F.SQRT @ F.CALL(1,1) @ F.POS_COV_MATRIX @ F.BPV(pvs),
+                "BPVZ_ERR": F.SQRT @ F.CALL(2,2) @ F.POS_COV_MATRIX @ F.BPV(pvs),
+                "ALLPVFD"     : F.ALLPV_FD(pvs),
+                "ALLPVIP"     : F.ALLPV_IP(pvs),
+                "OBJECT_KEY": F.OBJECT_KEY,
+            }
+        )
+        + Kinematics()
+        #+ ParticleID(extra_info=True) #only for daughters
+    )
+
+    if add_Hlt1TisTos:
+        variables += HltTisTos(
+            selection_type="Hlt1", trigger_lines=Hlt1_lines, data=data
+        )
+
+    if add_truth:
+        variables = add_truth_matching_functors(
+            options,
+            variables,
+            data,
+            hierarchy=True,
+            kinematics=True,
+            vertex_info=True,
+            bkgcat=True,
+        )
+
+    return variables
+
+def make_tistoscombinations(options, pvs, data):
+    algo_output = ParticleToSubcombinationsAlg( Input=data )
+    relations = algo_output.OutputRelations
+
+    tistos_variables_extra = HltTisTos(
+        selection_type="Hlt1", trigger_lines=["Hlt1TwoTrackMVADecision"], data=algo_output.OutputParticles
+    )
+    tistos_combinations = {}
+    for k,v in tistos_variables_extra.get_thor_functors().items():
+        tistos_combinations[k + "_SUBCOMB" ] = F.MAP_INPUT_ARRAY( v, relations )
+    tistos_combinations = FunctorCollection( tistos_combinations )
+
+    return tistos_combinations
+
+def make_composite_variables_3body(options, pvs, data, add_truth=True):
+
+    variables = (
+        FunctorCollection(
+            {
+                #12
+                "M12": F.SUBCOMB(Functor=F.MASS, Indices=(1, 2)),
+                "SDOCA12"     : F.SDOCA(Child1=1,Child2=2),
+                "SDOCACHI212" : F.SDOCACHI2(Child1=1,Child2=2),
+                "DOCA12"      : F.DOCA(Child1=1,Child2=2),
+                "DOCACHI212"  : F.DOCACHI2(Child1=1,Child2=2),
+                "COS12": F.ALV(1, 2),
+                #"ETA12": F.SUBCOMB(Functor=F.ETA, Indices=(1, 2)),
+                #"PT12": F.SUBCOMB(Functor=F.PT, Indices=(1, 2)),
+                #"VCHI212": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(1, 2)),
+                #"END_VZ12": F.SUBCOMB(Functor=F.END_VZ, Indices=(1, 2)),
+                #"BPVZ12": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(1, 2)),
+                #"BPVCORRM12": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(1, 2)),
+                #13
+                "M13": F.SUBCOMB(Functor=F.MASS, Indices=(1, 3)),
+                "SDOCA13"     : F.SDOCA(Child1=1,Child2=3),
+                "SDOCACHI213" : F.SDOCACHI2(Child1=1,Child2=3),
+                "DOCA13"      : F.DOCA(Child1=1,Child2=3),
+                "DOCACHI213"  : F.DOCACHI2(Child1=1,Child2=3),
+                "COS13": F.ALV(1, 3),
+                #"ETA13": F.SUBCOMB(Functor=F.ETA, Indices=(1, 3)),
+                #"PT13": F.SUBCOMB(Functor=F.PT, Indices=(1, 3)),
+                #"VCHI213": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(1, 3)),
+                #"END_VZ13": F.SUBCOMB(Functor=F.END_VZ, Indices=(1, 3)),
+                #"BPVZ13": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(1, 3)),
+                #"BPVCORRM13": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(1, 3)),
+                #23
+                "M23": F.SUBCOMB(Functor=F.MASS, Indices=(2, 3)),
+                "SDOCA23"     : F.SDOCA(Child1=2,Child2=3),
+                "SDOCACHI223" : F.SDOCACHI2(Child1=2,Child2=3),
+                "DOCA23"      : F.DOCA(Child1=2,Child2=3),
+                "DOCACHI223"  : F.DOCACHI2(Child1=2,Child2=3),
+                "COS23": F.ALV(2, 3),
+                #"ETA23": F.SUBCOMB(Functor=F.ETA, Indices=(2, 3)),
+                #"PT23": F.SUBCOMB(Functor=F.PT, Indices=(2, 3)),
+                #"VCHI223": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(2, 3)),
+                #"END_VZ23": F.SUBCOMB(Functor=F.END_VZ, Indices=(2, 3)),
+                #"BPVZ23": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(2, 3)),
+                #"BPVCORRM23": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(2, 3)),
+            }
+        )
+    )
+    return make_composite_variables(options, pvs, data, add_truth)+make_tistoscombinations(options, pvs, data)+variables
+
+def make_composite_variables_4body(options, pvs, data, add_truth=True):
+
+    variables = (
+        FunctorCollection(
+            {
+                #14
+                "M14": F.SUBCOMB(Functor=F.MASS, Indices=(1, 4)),
+                "SDOCA14"     : F.SDOCA(Child1=1,Child2=4),
+                "SDOCACHI214" : F.SDOCACHI2(Child1=1,Child2=4),
+                "DOCA14"      : F.DOCA(Child1=1,Child2=4),
+                "DOCACHI214"  : F.DOCACHI2(Child1=1,Child2=4),
+                "COS14": F.ALV(1, 4),
+                #"ETA14": F.SUBCOMB(Functor=F.ETA, Indices=(1, 4)),
+                #"PT14": F.SUBCOMB(Functor=F.PT, Indices=(1, 4)),
+                #"VCHI214": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(1, 4)),
+                #"END_VZ14": F.SUBCOMB(Functor=F.END_VZ, Indices=(1, 4)),
+                #"BPVZ14": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(1, 4)),
+                #"BPVCORRM14": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(1, 4)),
+                #24
+                "M24": F.SUBCOMB(Functor=F.MASS, Indices=(2, 4)),
+                "SDOCA24"     : F.SDOCA(Child1=2,Child2=4),
+                "SDOCACHI224" : F.SDOCACHI2(Child1=2,Child2=4),
+                "DOCA24"      : F.DOCA(Child1=2,Child2=4),
+                "DOCACHI224"  : F.DOCACHI2(Child1=2,Child2=4),
+                "COS24": F.ALV(2, 4),
+                #"ETA24": F.SUBCOMB(Functor=F.ETA, Indices=(2, 4)),
+                #"PT24": F.SUBCOMB(Functor=F.PT, Indices=(2, 4)),
+                #"VCHI224": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(2, 4)),
+                #"END_VZ24": F.SUBCOMB(Functor=F.END_VZ, Indices=(2, 4)),
+                #"BPVZ24": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(2, 4)),
+                #"BPVCORRM24": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(2, 4)),
+                #34
+                "M34": F.SUBCOMB(Functor=F.MASS, Indices=(3, 4)),
+                "SDOCA34"     : F.SDOCA(Child1=3,Child2=4),
+                "SDOCACHI234" : F.SDOCACHI2(Child1=3,Child2=4),
+                "DOCA34"      : F.DOCA(Child1=3,Child2=4),
+                "DOCACHI234"  : F.DOCACHI2(Child1=3,Child2=4),
+                "COS34": F.ALV(3, 4),
+                #"ETA34": F.SUBCOMB(Functor=F.ETA, Indices=(3, 4)),
+                #"PT34": F.SUBCOMB(Functor=F.PT, Indices=(3, 4)),
+                #"VCHI234": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(3, 4)),
+                #"END_VZ34": F.SUBCOMB(Functor=F.END_VZ, Indices=(3, 4)),
+                #"BPVZ34": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(3, 4)),
+                #"BPVCORRM34": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(3, 4)),
+            }
+        )
+    )
+    return make_composite_variables_3body(options, pvs, data, add_truth)+variables #make_tistoscombinations already included
+
+def make_b_composite_variables(options, pvs, data, add_truth=True):
+    
+    # define helper functors
+    get_child = F.CHILD(1, F.FORWARDARG0) # change here the index of the child
+    get_SV =  F.ENDVERTEX @ F.FORWARDARG0
+    get_SV_pos = F.TOLINALG @ F.POSITION @ get_SV # only if composite (i.e. has vertex)
+    get_child_endvtx_pos = F.ENDVERTEX_POS  @ get_child
+    get_fdvec_child = get_child_endvtx_pos - get_SV_pos
+
+    # define observables
+    IP_wrt_SV = F.VALUE_OR(-1) @F.IP.bind(get_SV_pos , get_child)
+    IPCHI2_wrt_SV = F.VALUE_OR(-1) @ F.IPCHI2.bind(get_SV , get_child) # only if child is composite (i.e. has vertex)
+    FD_wrt_SV = F.VALUE_OR(-1) @ F.MAGNITUDE @ get_fdvec_child
+    FDCHI2_wrt_SV = F.VALUE_OR(-1) @ F.VTX_FDCHI2.bind(get_SV, get_child)
+
+    
+    variables = FunctorCollection(
+        {       
+            "ID": F.PARTICLE_ID ,
+            "PT": F.PT,
+            "P": F.P,
+            "MASS": F.MASS,
+            "CHILD1_IPwrtSV": IP_wrt_SV,
+            "CHILD1_IPCHI2wrtSV": IPCHI2_wrt_SV,
+            "CHILD1_FDwrtSV": FD_wrt_SV,
+            "CHILD1_FDCHI2wrtSV": FDCHI2_wrt_SV,
+            "PX": F.PX,
+            "PY": F.PY,
+            "PZ": F.PZ,
+            "END_VCHI2DOF": F.VALUE_OR(-1) @F.CHI2DOF @ F.ENDVERTEX,
+            "BPVCHI2DOF": F.VALUE_OR(-1) @F.CHI2DOF @ F.BPV(pvs),
+            # B2OC generic B hadron NN Hlt2 algorithm,
+            # not planning to use it directly for B2OC EM
+            "MVA": F.MVA(
+                MVAType="SigmaNet",
+                Config={
+                    "File":
+                    "paramfile://data/Hlt2B2OC_B_SigmaNet_Run3-v1.json",
+                    "Name":
+                    "B2OC_SigmaNet_Generic",
+                    "Lambda":
+                    "2.0",
+                    "NLayers":
+                    "3",
+                    "InputSize":
+                    "6",
+                    "Monotone_Constraints":
+                    "[1,-1,-1,-1,-1,-1]",
+                    "Variables":
+                    "log_B_PT,B_ETA,log_B_DIRA,log_B_ENDVERTEX_CHI2,log_B_IPCHI2_OWNPV,log_B_IP_OWNPV",
+                },
+                Inputs={
+                    "log_B_PT": fmath.log(F.PT),
+                    "B_ETA": F.ETA,
+                    "log_B_DIRA": fmath.log(1. - F.BPVDIRA(pvs)),
+                    "log_B_ENDVERTEX_CHI2": fmath.log(F.CHI2DOF),
+                    "log_B_IPCHI2_OWNPV": fmath.log(F.BPVIPCHI2(pvs)),
+                    "log_B_IP_OWNPV": fmath.log(F.BPVIP(pvs)),
+                }),
+            #'SSPionBDT_Mistag': F.SSPionBDT_Mistag(sspionTagging.OutputFlavourTags),
+            #'SSPionBDT_Decision': F.SSPionBDT_Decision(sspionTagging.OutputFlavourTags),
+
+        }
+    )
+    return make_composite_variables(options, pvs, data, add_truth)+make_tistoscombinations(options, pvs, data)+variables
+
+def make_DeltaM_variable(options):
+    return FunctorCollection({"DM": F.MASS - F.CHILD(1, F.MASS)})
+
+def make_basic_variables(options, pvs, data, add_truth=True, islong=False):
+    if not options.simulation:
+        add_truth = False
+    variables = (
+        FunctorCollection(
+            {
+                "TRCHI2DOF": F.VALUE_OR(-1) @ F.CHI2DOF @ F.TRACK,
+                "ETA": F.ETA,
+                "PHI": F.PHI,
+                "TRGHOSTPROB": F.GHOSTPROB,
+                "BPVIPCHI2": F.BPVIPCHI2(pvs),
+                "BPVIP": F.BPVIP(pvs),
+                "BPVX": F.BPVX(pvs),
+                "BPVY": F.BPVY(pvs),
+                "BPVZ": F.BPVZ(pvs),
+                "TX"          : F.TX,
+                "TY"          : F.TY,
+                "MINIPCHI2"   : F.MINIPCHI2(pvs),
+                "MINIP"       : F.MINIP(pvs),
+                "KEY"         : F.VALUE_OR(-1) @ F.OBJECT_KEY @ F.TRACK,
+                "ISMUON"      : F.ISMUON,
+                "TRACKPT": F.TRACK_PT,
+                "TRACKHISTORY": F.VALUE_OR(-1) @ F.TRACKHISTORY @ F.TRACK,
+                "QOVERP": F.VALUE_OR(-1) @ F.QOVERP @ F.TRACK,
+                "NDOF": F.VALUE_OR(-1) @ F.NDOF @ F.TRACK,
+                "NFTHITS": F.VALUE_OR(-1) @ F.NFTHITS @ F.TRACK,
+                "NHITS": F.VALUE_OR(-1) @ F.NHITS @ F.TRACK,
+                "NUTHITS": F.VALUE_OR(-1) @ F.NUTHITS @ F.TRACK,
+                "NVPHITS": F.VALUE_OR(-1) @ F.NVPHITS @ F.TRACK,
+                #"NMUONHITS": F.VALUE_OR(-1) @ F.NHITSMUONS @ F.TRACK, #https://gitlab.cern.ch/lhcb/Rec/-/merge_requests/3756
+                "TRACKHASVELO": F.VALUE_OR(-1) @ F.TRACKHASVELO @ F.TRACK,
+                "TRACKHASUT": F.VALUE_OR(-1) @ F.TRACKHASUT @ F.TRACK,
+                "OBJECT_KEY": F.OBJECT_KEY,
+                "HASBREM": F.HASBREM,
+                "BREMENERGY": F.BREMENERGY,
+                "BREMBENDCORR": F.BREMBENDCORR,
+            }
+        )
+        + Kinematics()
+        + ParticleID(extra_info=True)
+    )
+
+    if islong:
+        variables += FunctorCollection({
+            "CTBX": F.VALUE_OR(F.NaN) @ F.X_COORDINATE @ F.POSITION @ F.CLOSESTTOBEAM @ F.TRACK,#X_COORDINATE @ POSITION @ CLOSESTTOBEAM @ TRACK
+            "CTBY": F.VALUE_OR(F.NaN) @ F.Y_COORDINATE @ F.POSITION @ F.CLOSESTTOBEAM @ F.TRACK,
+            "CTBZ": F.VALUE_OR(F.NaN) @ F.Z_COORDINATE @ F.POSITION @ F.CLOSESTTOBEAM @ F.TRACK,
+        })
+    
+    variables += HltTisTos(
+        selection_type="Hlt1", trigger_lines=Hlt1_1track_lines, data=data
+    )
+    
+    if add_truth:
+        variables = add_truth_matching_functors(
+            options,
+            variables,
+            data,
+            hierarchy=True,
+            kinematics=True,
+            vertex_info=True,
+            bkgcat=False,
+        )
+
+    return variables
+
+def make_hlt2_event_variables(options, pvs, rec_summary):
+    # define event level variables
+    evt_variables = EventInfo()
+    if not options.simulation:
+        evt_variables += LHCInfo() #FillNumber
+    evt_variables += SelectionInfo(selection_type="Hlt2", trigger_lines=Hlt2_lines)
+    evt_variables += SelectionInfo(selection_type="Hlt1", trigger_lines=Hlt1_global_lines)
+    evt_variables += FunctorCollection(
+        {
+            "ALLPVX": F.ALLPVX(pvs),
+            "ALLPVY": F.ALLPVY(pvs),
+            "ALLPVZ": F.ALLPVZ(pvs),
+            "ALLPVNDOF": F.MAP(F.VALUE_OR(-1) @ F.NDOF) @ F.TES(pvs),
+            "ALLPVCHI2": F.MAP(F.VALUE_OR(-1) @ F.CHI2) @ F.TES(pvs),
+            "nPVs": F.SIZE(pvs),
+            "nTracks": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nTracks"),
+            "nLongTracks": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nLongTracks"),
+            "nMuonTracks": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nMuonTracks"),
+            "nFTClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nFTClusters"),
+            "nVPClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nVPClusters"),
+            "nUTClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nUTClusters"),
+            "nSPDhits": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nSPDhits"),
+            "nEcalClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nEcalClusters"),
+            "nEcalClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nEcalClusters"),
+            "eCalTot": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "eCalTot"),
+            "hCalTot": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "hCalTot"),
+            "nRich1Hits": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nRich1Hits"),
+            "nRich2Hits": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nRich2Hits"),
+        }
+    )
+    return evt_variables
+
+def add_truth_matching_functors(
+    options,
+    variables,
+    data,
+    hierarchy=True,
+    kinematics=True,
+    vertex_info=True,
+    bkgcat=False,
+    prompt_info=True,
+):
+    """Add MC truth matching functors to an existing FunctorCollection.
+
+    Args:
+        options (DaVinci.Options): DaVinci options object.
+        variables (FunctorCollection): FunctorCollection to modify
+        data: data handle
+        hierarchy (bool): Add MCHierarchy info (default True)
+        kinematics (bool): Add MCKinematics info (default True)
+        vertex_info (bool): Add MCVertexInfo (default True)
+        bkgcat (bool): Add TRUEKEY and BKGCAT functors - intended for composite particles (default False)
+        prompt_info (bool): Add MCPromptDecay info (default True)
+
+    Returns:
+        FunctorCollection: modified FunctorCollection with truth matched variables.
+    """
+    assert (
+        options.simulation
+    ), "options.simulation is set to False - it doesn't make sense to add truth matching."
+
+    MCTRUTH = MCTruthAndBkgCat(data)
+
+    if bkgcat:
+        variables += FunctorCollection(
+            {
+                # Important note: specify an invalid value for integer functors if there exists no truth info.
+                #                 The invalid value for floating point functors is set to nan.
+                "TRUEKEY": F.VALUE_OR(-1) @ MCTRUTH(F.OBJECT_KEY),
+                "BKGCAT": MCTRUTH.BkgCat,
+            }
+        )
+    if hierarchy:
+        variables += MCHierarchy(mctruth_alg=MCTRUTH)  # likely to change again!!
+    if vertex_info:
+        variables += MCVertexInfo(mctruth_alg=MCTRUTH)  # likely to change again!!
+    if kinematics:
+        variables += MCKinematics(mctruth_alg=MCTRUTH)  # likely to change again!!
+    if prompt_info:
+        variables += MCPromptDecay(mctruth_alg=MCTRUTH)
+
+    return variables
+
+### DTF variables ###
+
+def make_basic_dtf_variables(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name="", islong=False):
+    variables = (
+        FunctorCollection(
+            {
+                "TRCHI2DOF": F.VALUE_OR(-1) @ F.CHI2DOF @ F.TRACK,
+                "ETA": F.ETA,
+                "PHI": F.PHI,
+                "TRGHOSTPROB": F.GHOSTPROB,
+                "BPVIPCHI2": F.BPVIPCHI2(pvs),
+                "BPVIP": F.BPVIP(pvs),
+                "BPVX": F.BPVX(pvs),
+                "BPVY": F.BPVY(pvs),
+                "BPVZ": F.BPVZ(pvs),
+                "TX"          : F.TX,
+                "TY"          : F.TY,
+                "MINIPCHI2"   : F.MINIPCHI2(pvs),
+                "MINIP"       : F.MINIP(pvs),
+                "KEY"         : F.VALUE_OR(-1) @ F.OBJECT_KEY @ F.TRACK,
+                "TRACKPT": F.TRACK_PT,
+                "TRACKHISTORY": F.VALUE_OR(-1) @ F.TRACKHISTORY @ F.TRACK,
+                "QOVERP": F.VALUE_OR(-1) @ F.QOVERP @ F.TRACK,
+                "NDOF": F.VALUE_OR(-1) @ F.NDOF @ F.TRACK,
+            }
+        )
+        + Kinematics()
+    )
+
+    if islong:
+        variables += FunctorCollection({
+            "CTBX": F.VALUE_OR(F.NaN) @ F.X_COORDINATE @ F.POSITION @ F.CLOSESTTOBEAM @ F.TRACK,#X_COORDINATE @ POSITION @ CLOSESTTOBEAM @ TRACK
+            "CTBY": F.VALUE_OR(F.NaN) @ F.Y_COORDINATE @ F.POSITION @ F.CLOSESTTOBEAM @ F.TRACK,
+            "CTBZ": F.VALUE_OR(F.NaN) @ F.Z_COORDINATE @ F.POSITION @ F.CLOSESTTOBEAM @ F.TRACK,
+        })
+    
+    if(mass_constraint):
+        if(pv_constraint): # MASS + PV
+            dtf_variables_mass_pv = FunctorCollection({
+                        'DTF_PV_M'+ particle_name + '_' + k: DTF(v)
+                        for k, v in variables.get_thor_functors().items()
+                    })
+            return dtf_variables_mass_pv
+        else: # MASS
+            dtf_variables_mass = FunctorCollection(
+                {'DTF_M'+ particle_name + '_' + k: DTF(v)
+                 for k, v in variables.get_thor_functors().items()})
+        return dtf_variables_mass
+
+    elif(pv_constraint): # PV
+        dtf_variables_pv = FunctorCollection({
+                'DTF_PV_' + k: DTF(v)
+                for k, v in variables.get_thor_functors().items()
+            })
+        return dtf_variables_pv
+
+    else: # NO MASS/PV
+        dtf_variables = FunctorCollection(
+            {'DTF_' + k: DTF(v)
+             for k, v in variables.get_thor_functors().items()})
+        return dtf_variables
+
+def make_composite_dtf_variables(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name=""):
+    variables = (
+        FunctorCollection(
+            {
+                "MAXPT": F.MAX(F.PT),
+                "MINPT": F.MIN(F.PT),
+                "SUMPT": F.SUM(F.PT),
+                "MAXP": F.MAX(F.P),
+                "MINP": F.MIN(F.P),
+                "BPVDIRA": F.BPVDIRA(pvs),
+                "VCHI2DOF": F.CHI2DOF, #CHI2VXNDOF
+                "BPVFDCHI2": F.BPVFDCHI2(pvs),
+                "BPVFD": F.BPVFD(pvs),
+                "BPVVDRHO": F.BPVVDRHO(pvs),
+                "BPVVDZ": F.BPVVDZ(pvs),
+                "BPVIPCHI2": F.BPVIPCHI2(pvs),
+                "BPVIP": F.BPVIP(pvs),
+                "LOGBPVIPCHI2": log(F.BPVIPCHI2(pvs)),
+                "BPVLTIME": F.BPVLTIME(pvs),
+                "MAXBPVIPCHI2": F.MAX(F.BPVIPCHI2(pvs)), #MAX_
+                "MINBPVIPCHI2": F.MIN(F.BPVIPCHI2(pvs)),
+                "MAXBPVIP": F.MAX(F.BPVIP(pvs)),
+                "MINBPVIP": F.MIN(F.BPVIP(pvs)),
+                "ETA": F.ETA,
+                "PHI": F.PHI,
+                "END_VX": F.END_VX, #END_
+                "END_VY": F.END_VY,
+                "END_VZ": F.END_VZ,
+                "BPVX": F.BPVX(pvs),
+                "BPVY": F.BPVY(pvs),
+                "BPVZ": F.BPVZ(pvs),
+                "ALLPVFD"     : F.ALLPV_FD(pvs),
+                "ALLPVIP"     : F.ALLPV_IP(pvs),
+                
+            }
+        )
+        + Kinematics()
+    )
+
+    addstring = "DTF"
+    if(pv_constraint):
+            addstring += '_PV'
+    if(mass_constraint):
+            addstring += '_M'
+    addstring += particle_name
+
+    DTF_chi2ndof = FunctorCollection(
+            {
+                addstring+"_DTFCHI2": DTF.CHI2,
+                addstring+"_DTFNDOF": DTF.NDOF,
+                addstring+"_CTAU": DTF.CTAU,
+                addstring+"_CTAUERR": DTF.CTAUERR,
+                addstring+"_MERR": DTF.MASSERR,
+            }
+    )
+
+    if(mass_constraint):
+        if(pv_constraint): # MASS + PV
+            dtf_variables_mass_pv = FunctorCollection({
+                        'DTF_PV_M'+ particle_name + '_' + k: DTF(v)
+                        for k, v in variables.get_thor_functors().items()
+                    })
+            return dtf_variables_mass_pv+DTF_chi2ndof
+        else: # MASS
+            dtf_variables_mass = FunctorCollection(
+                {'DTF_M'+ particle_name + '_' + k: DTF(v)
+                 for k, v in variables.get_thor_functors().items()})
+        return dtf_variables_mass+DTF_chi2ndof
+
+    elif(pv_constraint): # PV
+        dtf_variables_pv = FunctorCollection({
+                'DTF_PV_' + k: DTF(v)
+                for k, v in variables.get_thor_functors().items()
+            })
+        return dtf_variables_pv+DTF_chi2ndof
+
+    else: # NO MASS/PV
+        dtf_variables = FunctorCollection(
+            {'DTF_' + k: DTF(v)
+             for k, v in variables.get_thor_functors().items()})
+        return dtf_variables+DTF_chi2ndof
+
+def make_composite_dtf_variables_3body(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name=""):
+    variables = (
+        FunctorCollection(
+            {
+                "M13": F.SUBCOMB(Functor=F.MASS, Indices=(1, 3)),
+                "M23": F.SUBCOMB(Functor=F.MASS, Indices=(2, 3)),
+            }
+        )
+    )
+
+    if(mass_constraint):
+        if(pv_constraint): # MASS + PV
+            dtf_variables_mass_pv = FunctorCollection({
+                        'DTF_PV_M'+ particle_name + '_' + k: DTF(v)
+                        for k, v in variables.get_thor_functors().items()
+                    })
+            return dtf_variables_mass_pv+make_composite_dtf_variables(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
+        else: # MASS
+            dtf_variables_mass = FunctorCollection(
+                {'DTF_M'+ particle_name + '_' + k: DTF(v)
+                 for k, v in variables.get_thor_functors().items()})
+        return dtf_variables_mass+make_composite_dtf_variables(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
+
+    elif(pv_constraint): # PV
+        dtf_variables_pv = FunctorCollection({
+                'DTF_PV_' + k: DTF(v)
+                for k, v in variables.get_thor_functors().items()
+            })
+        return dtf_variables_pv+make_composite_dtf_variables(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
+
+    else: # NO MASS/PV
+        dtf_variables = FunctorCollection(
+            {'DTF_' + k: DTF(v)
+             for k, v in variables.get_thor_functors().items()})
+
+    return dtf_variables+make_composite_dtf_variables(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
+
+def make_composite_dtf_variables_4body(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name=""):
+    variables = (
+        FunctorCollection(
+            {
+                "M14": F.SUBCOMB(Functor=F.MASS, Indices=(1, 4)),
+                "M24": F.SUBCOMB(Functor=F.MASS, Indices=(2, 4)),
+                "M34": F.SUBCOMB(Functor=F.MASS, Indices=(3, 4)),
+            }
+        )
+    )
+
+    if(mass_constraint):
+        if(pv_constraint): # MASS + PV
+            dtf_variables_mass_pv = FunctorCollection({
+                        'DTF_PV_M'+ particle_name + '_' + k: DTF(v)
+                        for k, v in variables.get_thor_functors().items()
+                    })
+            return dtf_variables_mass_pv+make_composite_dtf_variables_3body(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
+        else: # MASS
+            dtf_variables_mass = FunctorCollection(
+                {'DTF_M'+ particle_name + '_' + k: DTF(v)
+                 for k, v in variables.get_thor_functors().items()})
+        return dtf_variables_mass+make_composite_dtf_variables_3body(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
+
+    elif(pv_constraint): # PV
+        dtf_variables_pv = FunctorCollection({
+                'DTF_PV_' + k: DTF(v)
+                for k, v in variables.get_thor_functors().items()
+            })
+        return dtf_variables_pv+make_composite_dtf_variables_3body(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
+
+    else: # NO MASS/PV
+        dtf_variables = FunctorCollection(
+            {'DTF_' + k: DTF(v)
+             for k, v in variables.get_thor_functors().items()})
+    
+        return dtf_variables+make_composite_dtf_variables_3body(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
+
+
+def make_MC_basic_variables():
+    MC_MOTHER_ID = lambda gen: F.VALUE_OR(0) @ F.MC_MOTHER(gen, F.PARTICLE_ID)
+    MC_MOTHER_KEY = lambda gen: F.VALUE_OR(-1) @ F.MC_MOTHER(gen, F.OBJECT_KEY)
+
+    variables = (
+        FunctorCollection(
+            {
+                "END_VX": F.END_VX,
+                "END_VY": F.END_VY,
+                "END_VZ": F.END_VZ,
+                "OBJECT_KEY": F.OBJECT_KEY,
+                "ETA": F.ETA,
+                "PHI": F.PHI,
+                "ORIGIN_VX": F.ORIGIN_VX,
+                "ORIGIN_VY": F.ORIGIN_VY,
+                "ORIGIN_VZ": F.ORIGIN_VZ,
+                "FOURMOMENTUM": F.FOURMOMENTUM,
+                "TRUEID": F.PARTICLE_ID,
+                "MC_MOTHER_ID": MC_MOTHER_ID(1),
+                "MC_MOTHER_KEY": MC_MOTHER_KEY(1),
+                "MC_GD_MOTHER_ID": MC_MOTHER_ID(2),
+                "MC_GD_MOTHER_KEY": MC_MOTHER_KEY(2),
+                "MC_GD_GD_MOTHER_ID": MC_MOTHER_ID(3),
+                "MC_GD_GD_MOTHER_KEY": MC_MOTHER_KEY(3),
+            }
+        )
+        + Kinematics()
+    )
+
+
+    from PyConf.reading import get_mc_particles, get_pp2mcp_relations, get_mc_track_info
+    MC_data = get_mc_particles("/Event/HLT2/MC/Particles")
+    relations_charged = get_pp2mcp_relations("/Event/HLT2/Relations/ChargedPP2MCP")
+    relations_neutral = get_pp2mcp_relations("/Event/HLT2/Relations/NeutralPP2MCP")
+    mcreconstructed_all = MCReconstructed(
+        input_mcparticles=MC_data,
+        use_best_mcmatch=True,
+        relations_charged=relations_charged,
+        relations_neutral=relations_neutral,
+    )
+    mcreconstructible_all = MCReconstructible(
+        input_mctrackinfo=get_mc_track_info()
+    )
+    import FunTuple.functorcollections as FC
+    vars_reconstructed = FC.MCReconstructed(mcreconstructed_alg=mcreconstructed_all, extra_info=True)
+    vars_reconstructible = FC.MCReconstructible(mcreconstructible_alg=mcreconstructible_all, extra_info=True)
+
+
+    return variables+vars_reconstructed+vars_reconstructible
+
+def make_MC_composite_variables():
+    MC_MOTHER_ID = lambda gen: F.VALUE_OR(0) @ F.MC_MOTHER(gen, F.PARTICLE_ID)
+    MC_MOTHER_KEY = lambda gen: F.VALUE_OR(-1) @ F.MC_MOTHER(gen, F.OBJECT_KEY)
+
+    variables = (
+        FunctorCollection(
+            {
+                "END_VX": F.END_VX,
+                "END_VY": F.END_VY,
+                "END_VZ": F.END_VZ,
+                "LTIME": F.MC_LIFETIME,
+                "OBJECT_KEY": F.OBJECT_KEY,
+                "ETA": F.ETA,
+                "PHI": F.PHI,
+                "ORIGIN_VX": F.ORIGIN_VX,
+                "ORIGIN_VY": F.ORIGIN_VY,
+                "ORIGIN_VZ": F.ORIGIN_VZ,
+                "FOURMOMENTUM": F.FOURMOMENTUM,
+                "TRUEID": F.PARTICLE_ID,
+                "MC_MOTHER_ID": MC_MOTHER_ID(1),
+                "MC_MOTHER_KEY": MC_MOTHER_KEY(1),
+                "MC_GD_MOTHER_ID": MC_MOTHER_ID(2),
+                "MC_GD_MOTHER_KEY": MC_MOTHER_KEY(2),
+                "MC_GD_GD_MOTHER_ID": MC_MOTHER_ID(3),
+                "MC_GD_GD_MOTHER_KEY": MC_MOTHER_KEY(3),
+            }
+        )
+        + Kinematics()
+        + MCPromptDecay()
+        )
+
+    return variables
+
+def make_MC_event_variables(mc_header):
+    # define event level variables
+    evt_variables = EventInfo()
+    evt_variables += MCPrimaries(mc_header=mc_header)
+
+    return evt_variables
+
+def make_top_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"]):
+    from PyConf.reading import get_particles
+    from IsolationTools import VertexAndConeIsolation
+
+    possible_charm_locations = ["LongTrackIso", "TTrackIso", "DownstreamTrackIso", "UpstreamTrackIso", "NeutralIso", "PizIso"]
+    coneangles = [0.25,0.5,1.,1.5,2.]
+
+    count = 0
+    for location in locations:
+        extra_particles = get_particles(f"/Event/HLT2/{hlt2_line}/{location}/Particles")
+
+        for coneangle in coneangles:
+            top_RTAlg = VertexAndConeIsolation(
+                name=location+"_"+str(coneangle),
+                reference_particles=input_data,
+                related_particles=extra_particles,
+                cut=F.DR2<coneangle)
+
+            if count == 0:
+                top_iso_variables = ParticleIsolation(isolation_alg=top_RTAlg,array_indx_name='indx')
+            else:
+                top_iso_variables += ParticleIsolation(isolation_alg=top_RTAlg,array_indx_name='indx')
+            count += 1
+
+
+    return top_iso_variables
+
+def make_basic_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"]):
+    from PyConf.reading import get_particles
+    from IsolationTools import VertexAndConeIsolation
+    from PyConf.Algorithms import ThOrParticleSelection
+
+    basic_code = (F.FILTER(F.ALL) @ F.GET_ALL_BASICS())
+    basic_particles = ThOrParticleSelection(InputParticles=input_data, Functor=basic_code).OutputSelection
+
+    possible_charm_locations = ["LongTrackIso", "TTrackIso", "DownstreamTrackIso", "UpstreamTrackIso", "NeutralIso", "PizIso"]
+    coneangles = [0.25,0.5,1.,1.5,2.]
+
+    count = 0
+    for location in locations:
+        extra_particles = get_particles(f"/Event/HLT2/{hlt2_line}/{location}/Particles")
+
+        for coneangle in coneangles:
+            basic_RTAlg = VertexAndConeIsolation(
+                name=location+"_"+str(coneangle),
+                reference_particles=basic_particles,
+                related_particles=extra_particles,
+                cut=F.DR2<coneangle)
+
+            if count == 0:
+                basic_iso_variables = ParticleIsolation(isolation_alg=basic_RTAlg,array_indx_name='indx')
+            else:
+                basic_iso_variables += ParticleIsolation(isolation_alg=basic_RTAlg,array_indx_name='indx')
+            count += 1
+
+
+    return basic_iso_variables
+
+
+def make_intermediate_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"], composite_ID = "J/psi(1S)"):
+    from PyConf.reading import get_particles
+    from IsolationTools import VertexAndConeIsolation
+    from PyConf.Algorithms import ThOrParticleSelection
+
+    intermediate_code = F.FILTER(F.IS_ABS_ID(composite_ID)) @ F.GET_ALL_DESCENDANTS()
+    intermediate_particles = ThOrParticleSelection(InputParticles=input_data, Functor=intermediate_code).OutputSelection
+
+    possible_charm_locations = ["LongTrackIso", "TTrackIso", "DownstreamTrackIso", "UpstreamTrackIso", "NeutralIso", "PizIso"]
+    coneangles = [0.25,0.5,1.,1.5,2.]
+
+    count = 0
+    for location in locations:
+        extra_particles = get_particles(f"/Event/HLT2/{hlt2_line}/{location}/Particles")
+
+        for coneangle in coneangles:
+            intermediate_RTAlg = VertexAndConeIsolation(
+                name=location+"_"+str(coneangle),
+                reference_particles=intermediate_particles,
+                related_particles=extra_particles,
+                cut=F.DR2<coneangle)
+
+            if count == 0:
+                intermediate_iso_variables = ParticleIsolation(isolation_alg=intermediate_RTAlg,array_indx_name='indx')
+            else:
+                intermediate_iso_variables += ParticleIsolation(isolation_alg=intermediate_RTAlg,array_indx_name='indx')
+            count += 1
+
+
+    return intermediate_iso_variables
-- 
GitLab


From c566ae0d8a149d83efc84754cd79681cdf7e09dd Mon Sep 17 00:00:00 2001
From: Donata Osthues <donata.osthues@cern.ch>
Date: Mon, 28 Oct 2024 12:35:54 +0100
Subject: [PATCH 29/51] remove Charm_2024validation from this branch

---
 Charm_2024validation/README.md                |   68 -
 Charm_2024validation/dummy.yaml               |   16 -
 Charm_2024validation/info.yaml                |  213 ---
 Charm_2024validation/info_MC_4localtest.yaml  |  122 --
 Charm_2024validation/info_MC_noUT.yaml        |  121 --
 Charm_2024validation/info_data.yaml           |   53 -
 Charm_2024validation/info_data_noUT.yaml      |   50 -
 Charm_2024validation/main_d0_to_hh.py         |   58 -
 Charm_2024validation/main_d0_to_hhhh.py       |   40 -
 Charm_2024validation/main_d0_to_hhpi0.py      |   43 -
 Charm_2024validation/main_d0_to_kshh.py       |   75 -
 Charm_2024validation/main_d0_to_ksks.py       |   59 -
 Charm_2024validation/main_d_to_hhh.py         |   63 -
 Charm_2024validation/main_d_to_ksh.py         |   48 -
 .../main_detection_asymmetry.py               |   31 -
 Charm_2024validation/main_dst_to_dee.py       |   42 -
 Charm_2024validation/main_rare_charm.py       |   41 -
 Charm_2024validation/options/d0_to_hh.py      |  432 -----
 Charm_2024validation/options/d0_to_hh_MC.py   |   99 -
 Charm_2024validation/options/d0_to_hhhh.py    |  247 ---
 Charm_2024validation/options/d0_to_hhhh_MC.py |   43 -
 Charm_2024validation/options/d0_to_hhpi0.py   |  359 ----
 .../options/d0_to_hhpi0_MC.py                 |   44 -
 Charm_2024validation/options/d0_to_kshh.py    | 1585 -----------------
 Charm_2024validation/options/d0_to_kshh_MC.py |   44 -
 Charm_2024validation/options/d0_to_ksks.py    | 1049 -----------
 Charm_2024validation/options/d0_to_ksks_MC.py |   46 -
 Charm_2024validation/options/d_to_hhh.py      |  503 ------
 Charm_2024validation/options/d_to_hhh_MC.py   |   92 -
 Charm_2024validation/options/d_to_ksh.py      |  313 ----
 Charm_2024validation/options/d_to_ksh_MC.py   |   68 -
 .../options/detection_asymmetry.py            |  191 --
 Charm_2024validation/options/dst_to_dee.py    |  296 ---
 Charm_2024validation/options/hlt1.py          |   44 -
 Charm_2024validation/options/hlt1_noUT.py     |   34 -
 Charm_2024validation/options/hlt2/d0_to_hh.py |    9 -
 .../options/hlt2/d0_to_hhhh.py                |    8 -
 .../options/hlt2/d0_to_hhpi0.py               |    8 -
 .../options/hlt2/d0_to_kshh.py                |    8 -
 .../options/hlt2/d0_to_ksks.py                |    8 -
 Charm_2024validation/options/hlt2/d_to_hhh.py |   10 -
 Charm_2024validation/options/hlt2/d_to_ksh.py |   10 -
 .../options/hlt2/dst_to_dee.py                |    9 -
 Charm_2024validation/options/hlt2/hlt2.py     |   36 -
 .../options/hlt2/hlt2_d0_to_hh.py             |   45 -
 .../options/hlt2/hlt2_d0_to_hhhh.py           |   44 -
 .../options/hlt2/hlt2_d0_to_hhpi0.py          |   44 -
 .../options/hlt2/hlt2_d0_to_kshh.py           |   44 -
 .../options/hlt2/hlt2_d0_to_ksks.py           |   44 -
 .../options/hlt2/hlt2_d_to_hhh.py             |   46 -
 .../options/hlt2/hlt2_d_to_ksh.py             |   46 -
 .../options/hlt2/hlt2_dst_to_dee.py           |   45 -
 .../options/hlt2/hlt2_rare_charm.py           |   44 -
 .../options/hlt2/make_hlt2_decay.sh           |    9 -
 .../options/hlt2/rare_charm.py                |    8 -
 .../options/hlt2_noUT/d0_to_hh.py             |    9 -
 .../options/hlt2_noUT/d0_to_hhhh.py           |    8 -
 .../options/hlt2_noUT/d0_to_hhpi0.py          |    8 -
 .../options/hlt2_noUT/d0_to_kshh.py           |    8 -
 .../options/hlt2_noUT/d0_to_ksks.py           |    8 -
 .../options/hlt2_noUT/d_to_hhh.py             |   10 -
 .../options/hlt2_noUT/d_to_ksh.py             |   10 -
 .../options/hlt2_noUT/dst_to_dee.py           |    9 -
 .../options/hlt2_noUT/hlt2.py                 |   32 -
 .../options/hlt2_noUT/hlt2_d0_to_hh.py        |   41 -
 .../options/hlt2_noUT/hlt2_d0_to_hhhh.py      |   40 -
 .../options/hlt2_noUT/hlt2_d0_to_hhpi0.py     |   40 -
 .../options/hlt2_noUT/hlt2_d0_to_kshh.py      |   40 -
 .../options/hlt2_noUT/hlt2_d0_to_ksks.py      |   40 -
 .../options/hlt2_noUT/hlt2_d_to_hhh.py        |   42 -
 .../options/hlt2_noUT/hlt2_d_to_ksh.py        |   42 -
 .../options/hlt2_noUT/hlt2_dst_to_dee.py      |   41 -
 .../options/hlt2_noUT/hlt2_rare_charm.py      |   40 -
 .../options/hlt2_noUT/hlt2withUTCarlos.py     |   32 -
 .../options/hlt2_noUT/make_hlt2_decay.sh      |    9 -
 .../options/hlt2_noUT/rare_charm.py           |    8 -
 Charm_2024validation/options/rare_charm.py    |  496 ------
 Charm_2024validation/options/tupling.py       |  998 -----------
 Charm_2024validation/tmp.yaml                 |   27 -
 79 files changed, 9195 deletions(-)
 delete mode 100644 Charm_2024validation/README.md
 delete mode 100644 Charm_2024validation/dummy.yaml
 delete mode 100644 Charm_2024validation/info.yaml
 delete mode 100644 Charm_2024validation/info_MC_4localtest.yaml
 delete mode 100644 Charm_2024validation/info_MC_noUT.yaml
 delete mode 100644 Charm_2024validation/info_data.yaml
 delete mode 100644 Charm_2024validation/info_data_noUT.yaml
 delete mode 100644 Charm_2024validation/main_d0_to_hh.py
 delete mode 100644 Charm_2024validation/main_d0_to_hhhh.py
 delete mode 100644 Charm_2024validation/main_d0_to_hhpi0.py
 delete mode 100644 Charm_2024validation/main_d0_to_kshh.py
 delete mode 100644 Charm_2024validation/main_d0_to_ksks.py
 delete mode 100644 Charm_2024validation/main_d_to_hhh.py
 delete mode 100644 Charm_2024validation/main_d_to_ksh.py
 delete mode 100644 Charm_2024validation/main_detection_asymmetry.py
 delete mode 100644 Charm_2024validation/main_dst_to_dee.py
 delete mode 100644 Charm_2024validation/main_rare_charm.py
 delete mode 100644 Charm_2024validation/options/d0_to_hh.py
 delete mode 100644 Charm_2024validation/options/d0_to_hh_MC.py
 delete mode 100644 Charm_2024validation/options/d0_to_hhhh.py
 delete mode 100644 Charm_2024validation/options/d0_to_hhhh_MC.py
 delete mode 100644 Charm_2024validation/options/d0_to_hhpi0.py
 delete mode 100644 Charm_2024validation/options/d0_to_hhpi0_MC.py
 delete mode 100644 Charm_2024validation/options/d0_to_kshh.py
 delete mode 100644 Charm_2024validation/options/d0_to_kshh_MC.py
 delete mode 100644 Charm_2024validation/options/d0_to_ksks.py
 delete mode 100644 Charm_2024validation/options/d0_to_ksks_MC.py
 delete mode 100644 Charm_2024validation/options/d_to_hhh.py
 delete mode 100644 Charm_2024validation/options/d_to_hhh_MC.py
 delete mode 100644 Charm_2024validation/options/d_to_ksh.py
 delete mode 100644 Charm_2024validation/options/d_to_ksh_MC.py
 delete mode 100644 Charm_2024validation/options/detection_asymmetry.py
 delete mode 100644 Charm_2024validation/options/dst_to_dee.py
 delete mode 100644 Charm_2024validation/options/hlt1.py
 delete mode 100644 Charm_2024validation/options/hlt1_noUT.py
 delete mode 100644 Charm_2024validation/options/hlt2/d0_to_hh.py
 delete mode 100644 Charm_2024validation/options/hlt2/d0_to_hhhh.py
 delete mode 100644 Charm_2024validation/options/hlt2/d0_to_hhpi0.py
 delete mode 100644 Charm_2024validation/options/hlt2/d0_to_kshh.py
 delete mode 100644 Charm_2024validation/options/hlt2/d0_to_ksks.py
 delete mode 100644 Charm_2024validation/options/hlt2/d_to_hhh.py
 delete mode 100644 Charm_2024validation/options/hlt2/d_to_ksh.py
 delete mode 100644 Charm_2024validation/options/hlt2/dst_to_dee.py
 delete mode 100644 Charm_2024validation/options/hlt2/hlt2.py
 delete mode 100644 Charm_2024validation/options/hlt2/hlt2_d0_to_hh.py
 delete mode 100644 Charm_2024validation/options/hlt2/hlt2_d0_to_hhhh.py
 delete mode 100644 Charm_2024validation/options/hlt2/hlt2_d0_to_hhpi0.py
 delete mode 100644 Charm_2024validation/options/hlt2/hlt2_d0_to_kshh.py
 delete mode 100644 Charm_2024validation/options/hlt2/hlt2_d0_to_ksks.py
 delete mode 100644 Charm_2024validation/options/hlt2/hlt2_d_to_hhh.py
 delete mode 100644 Charm_2024validation/options/hlt2/hlt2_d_to_ksh.py
 delete mode 100644 Charm_2024validation/options/hlt2/hlt2_dst_to_dee.py
 delete mode 100644 Charm_2024validation/options/hlt2/hlt2_rare_charm.py
 delete mode 100644 Charm_2024validation/options/hlt2/make_hlt2_decay.sh
 delete mode 100644 Charm_2024validation/options/hlt2/rare_charm.py
 delete mode 100644 Charm_2024validation/options/hlt2_noUT/d0_to_hh.py
 delete mode 100644 Charm_2024validation/options/hlt2_noUT/d0_to_hhhh.py
 delete mode 100644 Charm_2024validation/options/hlt2_noUT/d0_to_hhpi0.py
 delete mode 100644 Charm_2024validation/options/hlt2_noUT/d0_to_kshh.py
 delete mode 100644 Charm_2024validation/options/hlt2_noUT/d0_to_ksks.py
 delete mode 100644 Charm_2024validation/options/hlt2_noUT/d_to_hhh.py
 delete mode 100644 Charm_2024validation/options/hlt2_noUT/d_to_ksh.py
 delete mode 100644 Charm_2024validation/options/hlt2_noUT/dst_to_dee.py
 delete mode 100644 Charm_2024validation/options/hlt2_noUT/hlt2.py
 delete mode 100644 Charm_2024validation/options/hlt2_noUT/hlt2_d0_to_hh.py
 delete mode 100644 Charm_2024validation/options/hlt2_noUT/hlt2_d0_to_hhhh.py
 delete mode 100644 Charm_2024validation/options/hlt2_noUT/hlt2_d0_to_hhpi0.py
 delete mode 100644 Charm_2024validation/options/hlt2_noUT/hlt2_d0_to_kshh.py
 delete mode 100644 Charm_2024validation/options/hlt2_noUT/hlt2_d0_to_ksks.py
 delete mode 100644 Charm_2024validation/options/hlt2_noUT/hlt2_d_to_hhh.py
 delete mode 100644 Charm_2024validation/options/hlt2_noUT/hlt2_d_to_ksh.py
 delete mode 100644 Charm_2024validation/options/hlt2_noUT/hlt2_dst_to_dee.py
 delete mode 100644 Charm_2024validation/options/hlt2_noUT/hlt2_rare_charm.py
 delete mode 100644 Charm_2024validation/options/hlt2_noUT/hlt2withUTCarlos.py
 delete mode 100644 Charm_2024validation/options/hlt2_noUT/make_hlt2_decay.sh
 delete mode 100644 Charm_2024validation/options/hlt2_noUT/rare_charm.py
 delete mode 100644 Charm_2024validation/options/rare_charm.py
 delete mode 100644 Charm_2024validation/options/tupling.py
 delete mode 100644 Charm_2024validation/tmp.yaml

diff --git a/Charm_2024validation/README.md b/Charm_2024validation/README.md
deleted file mode 100644
index f061ea162c..0000000000
--- a/Charm_2024validation/README.md
+++ /dev/null
@@ -1,68 +0,0 @@
-Analysis production for 2024 data validation within the Charm WG.
-
-For easy tests, eg. on `d_to_hhh` subset:
-```sh
-lb-run DaVinci/v64r2 lbexec Charm_2024validation.main_d_to_hhh:main Charm_2024validation/dummy.yaml
-```
-
-Decays and Hlt2 lines considered are:
-- `d0_to_hh.py`:
-  - Dst2D0pi_D02Kpi_RS     "Hlt2Charm_DstpToD0Pip_D0ToKmPip"
-  - Dst2D0pi_D02Kpi_WS     "Hlt2Charm_DstpToD0Pip_D0ToKpPim"
-  - Dst2D0pi_D02KK     "Hlt2Charm_DstpToD0Pip_D0ToKmKp"
-  - Dst2D0pi_D02pipi     "Hlt2Charm_DstpToD0Pip_D0ToPimPip"
-  - D02Kpi     "Hlt2Charm_D0ToKmPip"
-  - D02KK     "Hlt2Charm_D0ToKmKp"
-  - D02pipi     "Hlt2Charm_D0ToPimPip"
-  - Dst2D0pi_D02Kpi_RS_LowBias     "Hlt2Charm_DstpToD0Pip_D0ToKmPip_LowBias"
-  - Dst2D0pi_D02Kpi_WS_LowBias     "Hlt2Charm_DstpToD0Pip_D0ToKpPim_LowBias"
-  - Dst2D0pi_D02KK_LowBias     "Hlt2Charm_DstpToD0Pip_D0ToKmKp_LowBias"
-  - Dst2D0pi_D02pipi_LowBias     "Hlt2Charm_DstpToD0Pip_D0ToPimPip_LowBias"
-  - D02Kpi_LowBias     "Hlt2Charm_D0ToKmPip_LowBias"
-  - D02KK_LowBias     "Hlt2Charm_D0ToKmKp_LowBias"
-  - D02pipi_LowBias     "Hlt2Charm_D0ToPimPip_LowBias"
-- `d_to_ksh.py`:
-  - D2KSpi_LL     "Hlt2Charm_DpDspToKsPip_LL"
-  - D2KSpi_LD     "Hlt2Charm_DpDspToKsPip_LD"
-  - D2KSpi_DD     "Hlt2Charm_DpDspToKsPip_DD"
-  - D2KSK_LL     "Hlt2Charm_DpDspToKsKp_LL"
-  - D2KSK_LD     "Hlt2Charm_DpDspToKsKp_LD"
-  - D2KSK_DD     "Hlt2Charm_DpDspToKsKp_DD"
-- `d_to_hhh.py`:
-  - D2Kpipi     "Hlt2Charm_DpDspToKmPipPip"
-  - D2Kpipi_NoCuts     "Hlt2Charm_DpDspToKmPipPip_NoCuts"
-  - Ds2KKpi     "Hlt2Charm_DspToKmKpPip"
-  - Ds2KKpi_NoCuts     "Hlt2Charm_DspToKmKpPip_NoCuts"
-  - D2pipipi     "Hlt2Charm_DpDspToPimPipPip"
-  - D2pipipi_NoCuts     "Hlt2Charm_DpDspToPimPipPip_NoCuts"
-- `d0_to_hhpi0.py`:
-  - Dst2D0pi_D02Kpipi0 "Hlt2Charm_DstpToD0Pip_D0ToKmPipPi0_{M,R}"
-  - Dst2D0pi_D02KKpi0 "Hlt2Charm_DstpToD0Pip_D0ToKmKpPi0_{M,R}"
-  - Dst2D0pi_D02pipipi0 "Hlt2Charm_DstpToD0Pip_D0ToPimPipPi0_{M,R}"
-- `detection_asymmetry.py`:
-  - D2Kpipi_ADet "Hlt2Charm_DpToKmPipPip_ADet"
-  - D2KSK_LL_ADet "Hlt2Charm_DspToKsKp_LL_ADet"
-  - D2KSpi_LL_ADet "Hlt2Charm_DpToKsPip_LL_ADet"
-  - D2pipipi_ADet "Hlt2Charm_DspToPimPipPip_ADet"
-  - Ds2KKpi_ADet "Hlt2Charm_DspToKmKpPip_ADet"
-  - Lc2KSp_LL_ADet "Hlt2Charm_LcpToPpKs_LL_ADet"
-  - Lc2pKpi_ADet "Hlt2Charm_LcpToPpKmPip_ADet"
-- `rare_charm.py`:
-  - D2pimumu "Hlt2Charm_DpDspToPipMumMup"
-  - D2pimumu_WS "Hlt2Charm_DpDspToPipMupMup_RareCharmControl"
-  - Dst2D0pi_D02Kpimumu_RS "Hlt2Charm_DstpToD0Pip_D0ToKmPipMumMup"
-- `d0_to_kshh.py`:
-- `d0_to_ksks.py`:
-- `dst_to_dee.py`:
-  -  Dst02D0EmEp_D02KmPip_OS    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS',
-  -  Dst02D0EmEp_D02KmPip_SS 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS',
-  -  Dst02D0EmEp_D02KmPip_OS_MVA 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS_MVA',
-  -  Dst02D0EmEp_D02KmPip_SS_MVA 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS_MVA',
-  -  Dst02D0EmEp_D02KmPimPipPip_OS 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS',
-  -  Dst02D0EmEp_D02KmPimPipPip_SS 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS',
-  -  Dst02D0EmEp_D02KmPimPipPip_OS_MVA 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS_MVA',
-  -  Dst02D0EmEp_D02KmPimPipPip_SS_MVA 'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS_MVA',
-  -  Dstp2DpDspEmEp_DpDsp2KmKpPip_OS 'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS',
-  -  Dstp2DpDspEmEp_DpDsp2KmKpPip_SS 'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS',
-  -  Dstp2DpDspEmEp_DpDsp2KmKpPip_OS_MVA 'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS_MVA',
-  -  Dstp2DpDspEmEp_DpDsp2KmKpPip_SS_MVA'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS_MVA',
diff --git a/Charm_2024validation/dummy.yaml b/Charm_2024validation/dummy.yaml
deleted file mode 100644
index 5bebae4ac3..0000000000
--- a/Charm_2024validation/dummy.yaml
+++ /dev/null
@@ -1,16 +0,0 @@
-input_files:
-- root://myProxy@lhcbxrootd-kit.gridka.de//pnfs/gridka.de/lhcb/LHCb-Disk/lhcb/LHCb/Collision23/CHARM.DST/00198130/0000/00198130_00000552_1.charm.dst
-input_raw_format: 0.5
-input_type: ROOT
-output_type: ROOT
-event_store: HiveWhiteBoard
-simulation: False
-data_type: "Upgrade"
-geometry_version: run3/trunk
-conditions_version: Alignment2023_HLT2Processing_26_8_2023
-scheduler_legacy_mode: False
-input_process: "TurboPass"
-input_stream: "charm"
-histo_file: CHARM_HISTO.ROOT
-ntuple_file: CHARM.ROOT
-evt_max: 1000
diff --git a/Charm_2024validation/info.yaml b/Charm_2024validation/info.yaml
deleted file mode 100644
index 14591535c9..0000000000
--- a/Charm_2024validation/info.yaml
+++ /dev/null
@@ -1,213 +0,0 @@
-defaults:
-  inform:
-    - serena.maccolini@cern.ch
-  wg: Charm
-
-{%- set conditions = [
-  ("MagDown","md"),
-  ("MagUp","mu"),
-]%}
-
-{%- set evttype_subsample_nutext_nu_dir1_dir2_dddb = [
-( '27163102', 'd0_to_hh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163101', 'd0_to_hh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163100', 'd0_to_hh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '23103042', 'd_to_hhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '23263022', 'd_to_hhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '21263012', 'd_to_hhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27165903', 'd0_to_kshh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27165071', 'd0_to_hhhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27265008', 'd0_to_hhhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27265009', 'd0_to_hhhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27165072', 'd0_to_hhhh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '23103111', 'd_to_ksh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '21103101', 'd_to_ksh', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '23173003', 'rare_charm', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27165900', 'd0_to_ksks', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-
-( '27163102', 'd0_to_hh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163101', 'd0_to_hh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163100', 'd0_to_hh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '23103042', 'd_to_hhh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '23263022', 'd_to_hhh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '21263012', 'd_to_hhh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '27165903', 'd0_to_kshh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '27165071', 'd0_to_hhhh', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-
-( '21263012', 'd_to_hhh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-
-]%}
-
-
-
-{%- for evttype, id, nutext, nu, dir1, dir2, dddb in evttype_subsample_nutext_nu_dir1_dir2_dddb %}
-
-{% for polarity,pol in conditions %}
-
-{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1:
-  application: "Moore/v55r11@x86_64_v2-el9-clang16+detdesc-opt"
-  input:
-    bk_query: "/MC/{{dir1}}/Beam6800GeV-2024{{dir2}}-{{polarity}}-Nu{{nu}}-25ns-Pythia8/Sim10d/{{evttype}}/DIGI"
-    n_test_lfns: 1
-  output: HLT1.DST
-  options:
-    entrypoint: Charm_2024validation.options.hlt1:alg_config
-    extra_options:
-      input_raw_format: 0.5
-      conddb_tag: sim10-2024.Q1.2-v1.1-{{pol}}100
-      dddb_tag: '{{dddb}}'
-      input_type: ROOT
-      output_type: ROOT
-      simulation: True
-      data_type: "Upgrade"
-      scheduler_legacy_mode: False
-      compression:
-        algorithm: ZSTD
-        level: 1
-        max_buffer_size: 1048576
-
-{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2:
-  application: "Moore/v55r11@x86_64_v2-el9-clang16+detdesc-opt"
-  input:
-    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1
-  output: HLT2.charm.DST
-  options:
-    entrypoint: Charm_2024validation.options.hlt2.hlt2_{{id}}:alg_config
-    extra_options:
-      conddb_tag: sim10-2024.Q1.2-v1.1-{{pol}}100
-      dddb_tag: '{{dddb}}'
-      input_raw_format: 0.5
-      input_type: "ROOT"
-      output_type: "ROOT"
-      simulation: True
-      data_type: "Upgrade"
-      output_manifest_file: "HLT2.tck.json"
-      scheduler_legacy_mode: False
-      compression:
-        algorithm: ZSTD
-        level: 1
-        max_buffer_size: 1048576
-
-MC_{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}:
-  application: "DaVinci/v64r8@x86_64_v2-el9-clang16+detdesc-opt"
-  input:
-    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2
-  output: DVTUPLE.ROOT
-  options:
-    entrypoint: Charm_2024validation.main_{{id}}:main
-    extra_options:
-      conddb_tag: sim10-2024.Q1.2-v1.1-{{pol}}100
-      dddb_tag: '{{dddb}}'
-      geometry_version: run3/2024.Q1.2-v00.00
-      conditions_version: "sim10/run3-ideal"
-      input_raw_format: 0.5
-      input_type: ROOT
-      simulation: True
-      data_type: "Upgrade"
-      event_store: HiveWhiteBoard
-      input_stream: "charm"
-      input_manifest_file: "HLT2.tck.json"
-      compression:
-        algorithm: ZSTD
-        level: 1
-        max_buffer_size: 1048576
-
-{%- endfor %}
-{%- endfor %}
-
-
-{%- set conditions = [
-  "MagDown",
-]%}
-
-{%- set subsamples = [
-  "d0_to_kshh",
-]%}
-
-{% for id in subsamples %}
-{% for polarity in conditions %}
-
-{{id}}_2024_{{ polarity }}:
-  application: "DaVinci/v64r7@x86_64_v2-el9-clang16-opt"
-  input:
-    bk_query: "/LHCb/Collision24/Beam6800GeV-VeloClosed-{{polarity}}/Real Data/Sprucing24c2/94000000/CHARM.DST"
-
-    dq_flags:
-      - UNCHECKED
-      - OK
-    keep_running: true
-  output: DVTUPLE_{{id}}.ROOT
-  options:
-    entrypoint: Charm_2024validation.main_{{id}}:main
-    extra_options:
-      input_raw_format: 0.5
-      input_type: ROOT
-      simulation: False
-      data_type: "Upgrade"
-      event_store: HiveWhiteBoard
-      geometry_version: run3/2024.Q1.2-v00.00
-      conditions_version: master
-      input_process: "TurboPass"
-      input_stream: "charm"
-      evt_max: -1
-      compression:
-        algorithm: ZSTD
-        level: 1
-        max_buffer_size: 1048576
-
-
-{%- endfor %}
-{%- endfor %}
-
-
-{%- set conditions = [
-  "MagUp",
-]%}
-
-{%- set subsamples = [
-  "d0_to_hh",
-  "d_to_hhh",
-  "d_to_ksh",
-  "d0_to_hhpi0",
-  "d0_to_kshh",
-  "d0_to_ksks",
-  "d0_to_hhhh",
-  "rare_charm",
-  "detection_asymmetry",
-  "dst_to_dee",
-]%}
-
-{% for id in subsamples %}
-{% for polarity in conditions %}
-
-{{id}}_2024_{{ polarity }}:
-  application: "DaVinci/v64r7@x86_64_v2-el9-clang16-opt"
-  input:
-    bk_query: "/LHCb/Collision24/Beam6800GeV-VeloClosed-{{polarity}}/Real Data/Sprucing24c2/94000000/CHARM.DST"
-
-    dq_flags:
-      - UNCHECKED
-      - OK
-    keep_running: true
-  output: DVTUPLE_{{id}}.ROOT
-  options:
-    entrypoint: Charm_2024validation.main_{{id}}:main
-    extra_options:
-      input_raw_format: 0.5
-      input_type: ROOT
-      simulation: False
-      data_type: "Upgrade"
-      event_store: HiveWhiteBoard
-      geometry_version: run3/2024.Q1.2-v00.00
-      conditions_version: master
-      input_process: "TurboPass"
-      input_stream: "charm"
-      evt_max: -1
-      compression:
-        algorithm: ZSTD
-        level: 1
-        max_buffer_size: 1048576
-
-
-{%- endfor %}
-{%- endfor %}
diff --git a/Charm_2024validation/info_MC_4localtest.yaml b/Charm_2024validation/info_MC_4localtest.yaml
deleted file mode 100644
index 3d18e13274..0000000000
--- a/Charm_2024validation/info_MC_4localtest.yaml
+++ /dev/null
@@ -1,122 +0,0 @@
-defaults:
-  inform:
-    - serena.maccolini@cern.ch
-  wg: Charm
-
-{%- set conditions = [
-  "MagDown",
-]%}
-
-{%- set evttype_subsample_nutext_nu_dir1_dir2_dddb_geometry = [
-( '27163102', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163101', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163100', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23103042', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23263022', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '21263012', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163471', 'd0_to_hhpi0', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165903', 'd0_to_kshh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165071', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27265008', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27265009', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165072', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23103111', 'd_to_ksh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '21103101', 'd_to_ksh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23173003', 'rare_charm', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163102', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163101', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163100', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23103042', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23263022', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '21263012', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163471', 'd0_to_hhpi0', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165903', 'd0_to_kshh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165071', 'd0_to_hhhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163102', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163101', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163100', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23103042', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23263022', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '21263012', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163471', 'd0_to_hhpi0', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165903', 'd0_to_kshh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165071', 'd0_to_hhhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163102', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163101', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163100', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23103042', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23263022', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '21263012', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163471', 'd0_to_hhpi0', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165903', 'd0_to_kshh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165071', 'd0_to_hhhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165901', 'd0_to_ksks', '7p6', '7.6', 'Dev', '', 'dddb-20231017', 'run3/trunk'),
-]%}
-
-
-
-{%- for evttype, id, nutext, nu, dir1, dir2, dddb, geometry in evttype_subsample_nutext_nu_dir1_dir2_dddb_geometry %}
-
-{% for polarity in conditions %}
-
-{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1:
-  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
-  input:
-    bk_query: "/MC/{{dir1}}/Beam6800GeV-expected-2024{{dir2}}-{{polarity}}-Nu{{nu}}-25ns-Pythia8/Sim10c/{{evttype}}/DIGI"
-    n_test_lfns: 3
-  output: HLT1.DST
-  options:
-    entrypoint: Charm_2024validation.options.hlt1:alg_config
-    extra_options:
-      input_raw_format: 0.5
-      conddb_tag: sim-20231017-vc-md100
-      dddb_tag: '{{dddb}}'
-      input_type: ROOT
-      output_type: ROOT
-      simulation: True
-      data_type: "Upgrade"
-      scheduler_legacy_mode: False
-      geometry_version: "{{geometry}}"
-      evt_max: 1000
-
-{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2:
-  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
-  input:
-    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1
-  output: HLT2.DST
-  options:
-    entrypoint: Charm_2024validation.options.hlt2.hlt2_{{id}}:alg_config
-    extra_options:
-      conddb_tag: sim-20231017-vc-md100
-      dddb_tag: '{{dddb}}'
-      input_raw_format: 0.5
-      input_type: "ROOT"
-      output_type: "ROOT"
-      simulation: True
-      data_type: "Upgrade"
-      output_manifest_file: "HLT2.tck.json"
-      scheduler_legacy_mode: False
-      geometry_version: "{{geometry}}"
-
-MC_{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}:
-  application: "DaVinci/v64r3@x86_64_v3-el9-gcc13+detdesc-opt+g"
-  input:
-    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2
-  output: DVTUPLE.ROOT
-  options:
-    entrypoint: Charm_2024validation.main_{{id}}:main
-    extra_options:
-      conddb_tag: sim-20231017-vc-md100
-      dddb_tag: '{{dddb}}'
-      input_raw_format: 0.5
-      input_type: ROOT
-      simulation: True
-      data_type: "Upgrade"
-      event_store: HiveWhiteBoard
-      geometry_version: "{{geometry}}"
-      input_process: "Hlt2"
-      input_manifest_file: "HLT2.tck.json"
-      write_decoding_keys_to_git: false
-
-{%- endfor %}
-{%- endfor %}
diff --git a/Charm_2024validation/info_MC_noUT.yaml b/Charm_2024validation/info_MC_noUT.yaml
deleted file mode 100644
index 52df9e4e96..0000000000
--- a/Charm_2024validation/info_MC_noUT.yaml
+++ /dev/null
@@ -1,121 +0,0 @@
-defaults:
-  inform:
-    - serena.maccolini@cern.ch
-  wg: Charm
-
-{%- set conditions = [
-  "MagDown",
-]%}
-
-{%- set evttype_subsample_nutext_nu_dir1_dir2_dddb_geometry = [
-( '27163102', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163101', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163100', 'd0_to_hh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23103042', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23263022', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '21263012', 'd_to_hhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163471', 'd0_to_hhpi0', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165903', 'd0_to_kshh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165071', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27265008', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27265009', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165072', 'd0_to_hhhh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23103111', 'd_to_ksh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '21103101', 'd_to_ksh', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23173003', 'rare_charm', '7p6', '7.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163102', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163101', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163100', 'd0_to_hh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23103042', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23263022', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '21263012', 'd_to_hhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163471', 'd0_to_hhpi0', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165903', 'd0_to_kshh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165071', 'd0_to_hhhh', '5p7', '5.7', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163102', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163101', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163100', 'd0_to_hh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23103042', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23263022', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '21263012', 'd_to_hhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163471', 'd0_to_hhpi0', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165903', 'd0_to_kshh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165071', 'd0_to_hhhh', '4p3', '4.3', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163102', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163101', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163100', 'd0_to_hh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23103042', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '23263022', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '21263012', 'd_to_hhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27163471', 'd0_to_hhpi0', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165903', 'd0_to_kshh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165071', 'd0_to_hhhh', '1p6', '1.6', 'expected-2024.Q1.2', '.Q1.2', 'dddb-20240311', 'run3/2024.Q1.2-v00.00'),
-( '27165901', 'd0_to_ksks', '7p6', '7.6', 'Dev', '', 'dddb-20231017', 'run3/trunk'),
-]%}
-
-
-
-{%- for evttype, id, nutext, nu, dir1, dir2, dddb, geometry in evttype_subsample_nutext_nu_dir1_dir2_dddb_geometry %}
-
-{% for polarity in conditions %}
-
-{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1:
-  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
-  input:
-    bk_query: "/MC/{{dir1}}/Beam6800GeV-expected-2024{{dir2}}-{{polarity}}-Nu{{nu}}-25ns-Pythia8/Sim10c/{{evttype}}/DIGI"
-    n_test_lfns: 3
-  output: HLT1.DST
-  options:
-    entrypoint: Charm_2024validation.options.hlt1:alg_config
-    extra_options:
-      input_raw_format: 0.5
-      conddb_tag: sim-20231017-vc-md100
-      dddb_tag: '{{dddb}}'
-      input_type: ROOT
-      output_type: ROOT
-      simulation: True
-      data_type: "Upgrade"
-      scheduler_legacy_mode: False
-      geometry_version: "{{geometry}}"
-      evt_max: -1
-
-{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2:
-  application: "Moore/v55r6@x86_64_v2-el9-gcc13+detdesc-opt"
-  input:
-    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT1
-  output: HLT2.DST
-  options:
-    entrypoint: Charm_2024validation.options.hlt2.hlt2_{{id}}:alg_config
-    extra_options:
-      conddb_tag: sim-20231017-vc-md100
-      dddb_tag: '{{dddb}}'
-      input_raw_format: 0.5
-      input_type: "ROOT"
-      output_type: "ROOT"
-      simulation: True
-      data_type: "Upgrade"
-      output_manifest_file: "HLT2.tck.json"
-      scheduler_legacy_mode: False
-      geometry_version: "{{geometry}}"
-
-MC_{{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}:
-  application: "DaVinci/v64r3@x86_64_v3-el9-gcc13+detdesc-opt+g"
-  input:
-    job_name: {{id}}_{{evttype}}_2024_{{ polarity }}_Nu{{nutext}}_HLT2
-  output: DVTUPLE.ROOT
-  options:
-    entrypoint: Charm_2024validation.main_{{id}}:main
-    extra_options:
-      conddb_tag: sim-20231017-vc-md100
-      dddb_tag: '{{dddb}}'
-      input_raw_format: 0.5
-      input_type: ROOT
-      simulation: True
-      data_type: "Upgrade"
-      event_store: HiveWhiteBoard
-      geometry_version: "{{geometry}}"
-      input_process: "Hlt2"
-      input_manifest_file: "HLT2.tck.json"
-
-{%- endfor %}
-{%- endfor %}
diff --git a/Charm_2024validation/info_data.yaml b/Charm_2024validation/info_data.yaml
deleted file mode 100644
index cf3b7dcdf9..0000000000
--- a/Charm_2024validation/info_data.yaml
+++ /dev/null
@@ -1,53 +0,0 @@
-defaults:
-  inform:
-    - serena.maccolini@cern.ch
-  wg: Charm
-
-{%- set conditions = [
-  "MagDown",
-]%}
-
-
-
-{%- set subsamples = [
-  "d0_to_hh",
-  "d_to_hhh",
-  "d_to_ksh",
-  "d0_to_hhpi0",
-  "d0_to_kshh",
-  "d0_to_ksks",
-  "d0_to_hhhh",
-  "rare_charm",
-  "detection_asymmetry",
-  "dst_to_dee",
-]%}
-
-{% for id in subsamples %}
-{% for polarity in conditions %}
-
-{{id}}_2024_{{ polarity }}:
-  application: "DaVinci/v64r7"
-  input:
-    bk_query: "/LHCb/Collision24/Beam6800GeV-VeloClosed-{{polarity}}/Real Data/Sprucing24c2/94000000/CHARM.DST"
-
-    dq_flags:
-      - UNCHECKED
-      - OK
-    keep_running: true
-  output: DVTUPLE_{{id}}.ROOT
-  options:
-    entrypoint: Charm_2024validation.main_{{id}}:main
-    extra_options:
-      input_raw_format: 0.5
-      input_type: ROOT
-      simulation: False
-      data_type: "Upgrade"
-      event_store: HiveWhiteBoard
-      geometry_version: run3/2024.Q1.2-v00.00
-      conditions_version: master
-      input_process: "TurboPass"
-      input_stream: "charm"
-      evt_max: -1
-
-{%- endfor %}
-{%- endfor %}
diff --git a/Charm_2024validation/info_data_noUT.yaml b/Charm_2024validation/info_data_noUT.yaml
deleted file mode 100644
index 8c750c72d0..0000000000
--- a/Charm_2024validation/info_data_noUT.yaml
+++ /dev/null
@@ -1,50 +0,0 @@
-defaults:
-  inform:
-    - serena.maccolini@cern.ch
-  wg: Charm
-
-{%- set conditions = [
-  "MagDown",
-]%}
-
-
-
-{%- set subsamples = [
-  "d0_to_hh",
-  "d_to_hhh",
-  "d_to_ksh",
-  "d0_to_hhpi0",
-  "d0_to_kshh",
-  "d0_to_ksks",
-  "d0_to_hhhh",
-  "rare_charm",
-  "detection_asymmetry",
-]%}
-
-{% for id in subsamples %}
-{% for polarity in conditions %}
-
-{{id}}_2024_{{ polarity }}:
-  application: "DaVinci/v64r5"
-  input:
-    bk_query: "/LHCb/Collision24/Beam6800GeV-VeloClosed-{{polarity}}-Excl-UT/Real Data/Sprucing24c1/94000000/CHARM.DST"
-    dq_flags:
-      - UNCHECKED
-      - OK
-    keep_running: true
-  output: DVTUPLE_{{id}}.ROOT
-  options:
-    entrypoint: Charm_2024validation.main_{{id}}:main
-    extra_options:
-      input_raw_format: 0.5
-      input_type: ROOT
-      simulation: False
-      data_type: "Upgrade"
-      event_store: HiveWhiteBoard
-      geometry_version: run3/2024.Q1.2-v00.00
-      conditions_version: master
-      input_process: "TurboPass"
-      input_stream: "charm"
-
-{%- endfor %}
-{%- endfor %}
diff --git a/Charm_2024validation/main_d0_to_hh.py b/Charm_2024validation/main_d0_to_hh.py
deleted file mode 100644
index 12eea15463..0000000000
--- a/Charm_2024validation/main_d0_to_hh.py
+++ /dev/null
@@ -1,58 +0,0 @@
-###############################################################################
-# (c) Copyright 2021-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 .options.d0_to_hh import *
-from .options.d0_to_hh_MC import *
-
-from DaVinci import Options, make_config
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-        #D02hh
-        "D02Kpi" : maketuple_D02Kpi(options, pvs, rec_summary),
-        "D02KK" : maketuple_D02KK(options, pvs, rec_summary),
-        "D02pipi" : maketuple_D02pipi(options, pvs, rec_summary),
-        #Dst2D0pi_D02hh
-        "Dst2D0pi_D02Kpi_RS" : maketuple_Dst2D0pi_D02Kpi_RS(options, pvs, rec_summary),
-        "Dst2D0pi_D02Kpi_WS" : maketuple_Dst2D0pi_D02Kpi_WS(options, pvs, rec_summary),
-        "Dst2D0pi_D02KK" : maketuple_Dst2D0pi_D02KK(options, pvs, rec_summary),
-        "Dst2D0pi_D02pipi" : maketuple_Dst2D0pi_D02pipi(options, pvs, rec_summary),
-
-        ##LowBias
-        #D02hh
-        "D02Kpi_LowBias" : maketuple_D02Kpi_LowBias(options, pvs, rec_summary),
-        "D02KK_LowBias" : maketuple_D02KK_LowBias(options, pvs, rec_summary),
-        "D02pipi_LowBias" : maketuple_D02pipi_LowBias(options, pvs, rec_summary),
-        #Dst2D0pi_D02hh
-        "Dst2D0pi_D02Kpi_RS_LowBias" : maketuple_Dst2D0pi_D02Kpi_RS_LowBias(options, pvs, rec_summary),
-        "Dst2D0pi_D02Kpi_WS_LowBias" : maketuple_Dst2D0pi_D02Kpi_WS_LowBias(options, pvs, rec_summary),
-        "Dst2D0pi_D02KK_LowBias" : maketuple_Dst2D0pi_D02KK_LowBias(options, pvs, rec_summary),
-        "Dst2D0pi_D02pipi_LowBias" : maketuple_Dst2D0pi_D02pipi_LowBias(options, pvs, rec_summary),
-    }
-
-    MCtuples = {
-        "MC_Dst2D0pi_D02Kpi_RS" : maketuple_MC_Dst2D0pi_D02Kpi_RS(options, pvs, rec_summary),
-        "MC_Dst2D0pi_D02KK_RS" : maketuple_MC_Dst2D0pi_D02KK(options, pvs, rec_summary),
-        "MC_Dst2D0pi_D02pipi" : maketuple_MC_Dst2D0pi_D02pipi(options, pvs, rec_summary),
-    }
-
-    if options.simulation:
-        tuples = tuples | MCtuples
-
-    config = make_config(options, tuples)
-
-    return config
diff --git a/Charm_2024validation/main_d0_to_hhhh.py b/Charm_2024validation/main_d0_to_hhhh.py
deleted file mode 100644
index 5fb555ccfd..0000000000
--- a/Charm_2024validation/main_d0_to_hhhh.py
+++ /dev/null
@@ -1,40 +0,0 @@
-###############################################################################
-# (c) Copyright 2021-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 .options.d0_to_hhhh import *
-from .options.d0_to_hhhh_MC import *
-
-from DaVinci import Options, make_config
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-        
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-        "DstToD0pi_D0ToKKPiPi" : maketuple_DstToD0pi_D0ToKKPiPi(options, pvs, rec_summary),
-        "DstToD0pi_D0ToKPiPiPi" : maketuple_DstToD0pi_D0ToKPiPiPi(options, pvs, rec_summary),
-        "DstToD0pi_D0ToPiKPiPi" : maketuple_DstToD0pi_D0ToPiKPiPi(options, pvs, rec_summary),
-        "DstToD0pi_D0ToPiPiPiPi" : maketuple_DstToD0pi_D0ToPiPiPiPi(options, pvs, rec_summary),
-    }
-
-    MCtuples = {
-        "MC_DstToD0pi_D0ToKPiPiPi" : maketuple_MC_DstToD0pi_D0ToKPiPiPi(options, pvs, rec_summary),
-    }
-    
-    if options.simulation:
-        tuples = tuples | MCtuples
-        
-    config = make_config(options, tuples)
-
-    return config
diff --git a/Charm_2024validation/main_d0_to_hhpi0.py b/Charm_2024validation/main_d0_to_hhpi0.py
deleted file mode 100644
index ac59dc71d9..0000000000
--- a/Charm_2024validation/main_d0_to_hhpi0.py
+++ /dev/null
@@ -1,43 +0,0 @@
-###############################################################################
-# (c) Copyright 2021-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 .options.d0_to_hhpi0 import *
-from .options.d0_to_hhpi0_MC import *
-
-from DaVinci import Options, make_config
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-        
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-        #Dst2D0pi_D02hhpi0
-        "Dst2D0pi_D02Kpipi0_M" : maketuple_Dst2D0pi_D02Kpipi0_M(options, pvs, rec_summary),
-        "Dst2D0pi_D02KKpi0_M" : maketuple_Dst2D0pi_D02KKpi0_M(options, pvs, rec_summary),
-        "Dst2D0pi_D02pipipi0_M" : maketuple_Dst2D0pi_D02pipipi0_M(options, pvs, rec_summary),
-        "Dst2D0pi_D02Kpipi0_R" : maketuple_Dst2D0pi_D02Kpipi0_R(options, pvs, rec_summary),
-        "Dst2D0pi_D02KKpi0_R" : maketuple_Dst2D0pi_D02KKpi0_R(options, pvs, rec_summary),
-        "Dst2D0pi_D02pipipi0_R" : maketuple_Dst2D0pi_D02pipipi0_R(options, pvs, rec_summary),
-    }
-
-    MCtuples = {
-        "MC_Dst2D0pi_D02Kpipi0" : maketuple_MC_Dst2D0pi_D02Kpipi0(options, pvs, rec_summary),
-    }
-    
-    if options.simulation:
-        tuples = tuples | MCtuples
-        
-    config = make_config(options, tuples)
-
-    return config
diff --git a/Charm_2024validation/main_d0_to_kshh.py b/Charm_2024validation/main_d0_to_kshh.py
deleted file mode 100644
index f9cfbd58e2..0000000000
--- a/Charm_2024validation/main_d0_to_kshh.py
+++ /dev/null
@@ -1,75 +0,0 @@
-###############################################################################
-# (c) Copyright 2021-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 .options.d0_to_kshh import *
-from .options.d0_to_kshh_MC import *
-
-from DaVinci import Options, make_config
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-        #D02kshh
-        "D0ToKsPimPip_LL" : maketuple_D0ToKsPimPip_LL(options, pvs, rec_summary),
-        "D0ToKsPimPip_DD" : maketuple_D0ToKsPimPip_DD(options, pvs, rec_summary),
-        "D0ToKsKmPip_LL" : maketuple_D0ToKsKmPip_LL(options, pvs, rec_summary),
-        "D0ToKsKmPip_DD" : maketuple_D0ToKsKmPip_DD(options, pvs, rec_summary),
-        "D0ToKsKpPim_LL" : maketuple_D0ToKsKmPip_LL(options, pvs, rec_summary),
-        "D0ToKsKpPim_DD" : maketuple_D0ToKsKmPip_DD(options, pvs, rec_summary),
-        "D0ToKsKmKp_LL" : maketuple_D0ToKsKmKp_LL(options, pvs, rec_summary),
-        "D0ToKsKmKp_DD" : maketuple_D0ToKsKmKp_DD(options, pvs, rec_summary),
-        #Dst2D0pi_D02kshh
-        "DstpToD0Pip_D0ToKsPimPip_LL" : maketuple_DstpToD0Pip_D0ToKsPimPip_LL(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsPimPip_DD" : maketuple_DstpToD0Pip_D0ToKsPimPip_DD(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKmPip_LL" : maketuple_DstpToD0Pip_D0ToKsKmPip_LL(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKmPip_DD" : maketuple_DstpToD0Pip_D0ToKsKmPip_DD(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKpPim_LL" : maketuple_DstpToD0Pip_D0ToKsKmPip_LL(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKpPim_DD" : maketuple_DstpToD0Pip_D0ToKsKmPip_DD(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKmKp_LL" : maketuple_DstpToD0Pip_D0ToKsKmKp_LL(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKmKp_DD" : maketuple_DstpToD0Pip_D0ToKsKmKp_DD(options, pvs, rec_summary),
-
-        ##LowBias
-        #D02kshh
-        "D0ToKsPimPip_LL_LowBias" : maketuple_D0ToKsPimPip_LL_LowBias(options, pvs, rec_summary),
-        "D0ToKsPimPip_DD_LowBias" : maketuple_D0ToKsPimPip_DD_LowBias(options, pvs, rec_summary),
-        "D0ToKsKmPip_LL_LowBias" : maketuple_D0ToKsKmPip_LL_LowBias(options, pvs, rec_summary),
-        "D0ToKsKmPip_DD_LowBias" : maketuple_D0ToKsKmPip_DD_LowBias(options, pvs, rec_summary),
-        "D0ToKsKpPim_LL_LowBias" : maketuple_D0ToKsKmPip_LL_LowBias(options, pvs, rec_summary),
-        "D0ToKsKpPim_DD_LowBias" : maketuple_D0ToKsKmPip_DD_LowBias(options, pvs, rec_summary),
-        "D0ToKsKmKp_LL_LowBias" : maketuple_D0ToKsKmKp_LL_LowBias(options, pvs, rec_summary),
-        "D0ToKsKmKp_DD_LowBias" : maketuple_D0ToKsKmKp_DD_LowBias(options, pvs, rec_summary),
-        #Dst2D0pi_D02kshh
-        "DstpToD0Pip_D0ToKsPimPip_LL_LowBias" : maketuple_DstpToD0Pip_D0ToKsPimPip_LL_LowBias(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsPimPip_DD_LowBias" : maketuple_DstpToD0Pip_D0ToKsPimPip_DD_LowBias(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKmPip_LL_LowBias" : maketuple_DstpToD0Pip_D0ToKsKmPip_LL_LowBias(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKmPip_DD_LowBias" : maketuple_DstpToD0Pip_D0ToKsKmPip_DD_LowBias(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKpPim_LL_LowBias" : maketuple_DstpToD0Pip_D0ToKsKmPip_LL_LowBias(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKpPim_DD_LowBias" : maketuple_DstpToD0Pip_D0ToKsKmPip_DD_LowBias(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKmKp_LL_LowBias" : maketuple_DstpToD0Pip_D0ToKsKmKp_LL_LowBias(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsKmKp_DD_LowBias" : maketuple_DstpToD0Pip_D0ToKsKmKp_DD_LowBias(options, pvs, rec_summary),
-        "DstpToD0Pip_D0ToKsPimPip_DD_NoBias" : maketuple_DstpToD0Pip_D0ToKsPimPip_LL_NoBias(options, pvs, rec_summary),
-    }
-
-    MCtuples = {
-        "MC_DstpToD0Pip_D0ToKsPimPip" : maketuple_MC_DstpToD0Pip_D0ToKsPimPip(options, pvs, rec_summary),
-    }
-
-    if options.simulation:
-        tuples = tuples | MCtuples
-
-    config = make_config(options, tuples)
-
-    return config
diff --git a/Charm_2024validation/main_d0_to_ksks.py b/Charm_2024validation/main_d0_to_ksks.py
deleted file mode 100644
index cb69552d78..0000000000
--- a/Charm_2024validation/main_d0_to_ksks.py
+++ /dev/null
@@ -1,59 +0,0 @@
-###############################################################################
-# (c) Copyright 2021-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.                                       #
-###############################################################################
-import Functors as F
-from Functors.math import log
-from DaVinci import Options, make_config
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunctorCollection
-import FunTuple.functorcollections as FC
-from FunTuple import FunTuple_Particles as Funtuple
-
-#D02KSKS
-from .options.d0_to_ksks import *
-from .options.d0_to_ksks_MC import *
-
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-        #D02KSKS
-        "Dst2D0pi_D02KSKS_LLLL" : maketuple_Dst2D0pi_D02KSKS_LLLL(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_LLLL_Tight" : maketuple_Dst2D0pi_D02KSKS_LLLL_Tight(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_LLDD" : maketuple_Dst2D0pi_D02KSKS_LLDD(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_LLDD_Tight" : maketuple_Dst2D0pi_D02KSKS_LLDD_Tight(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_DDDD" : maketuple_Dst2D0pi_D02KSKS_DDDD(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_DDDD_Tight" : maketuple_Dst2D0pi_D02KSKS_DDDD_Tight(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_ULLL" : maketuple_Dst2D0pi_D02KSKS_ULLL(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_ULLL_Tight" : maketuple_Dst2D0pi_D02KSKS_ULLL_Tight(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_ULDD" : maketuple_Dst2D0pi_D02KSKS_ULDD(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_ULDD_Tight" : maketuple_Dst2D0pi_D02KSKS_ULDD_Tight(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_LLLD" : maketuple_Dst2D0pi_D02KSKS_LLLD(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_LLLD_Tight" : maketuple_Dst2D0pi_D02KSKS_LLLD_Tight(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_DDLD" : maketuple_Dst2D0pi_D02KSKS_DDLD(options, pvs, rec_summary),
-        "Dst2D0pi_D02KSKS_DDLD_Tight" : maketuple_Dst2D0pi_D02KSKS_DDLD_Tight(options, pvs, rec_summary),
-    }
-
-    MCtuples = {
-        "MC_Dst2D0pi_D02KSKS_LLLL" : maketuple_MC_Dst2D0pi_D02KSKS_LLLL(options, pvs, rec_summary)
-    }
-
-    if options.simulation:
-        tuples = tuples | MCtuples
-        
-    config = make_config(options, tuples)
-
-    return config
diff --git a/Charm_2024validation/main_d_to_hhh.py b/Charm_2024validation/main_d_to_hhh.py
deleted file mode 100644
index 00d753301b..0000000000
--- a/Charm_2024validation/main_d_to_hhh.py
+++ /dev/null
@@ -1,63 +0,0 @@
-###############################################################################
-# (c) Copyright 2021-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 .options.d_to_hhh import *
-from .options.d_to_hhh_MC import *
-from .options.detection_asymmetry import *
-
-from DaVinci import Options, make_config
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-        #D2hhh
-        "D2Kpipi" : maketuple_D2Kpipi(options, pvs, rec_summary),
-        "D2Kpipi_NoCuts" : maketuple_D2Kpipi(options, pvs, rec_summary,True),
-        #"D2Kpipi_Kpi" : maketuple_D2Kpipi_Kpi(options, pvs, rec_summary), #subcomb of 2 out of 3 daughters
-        "Ds2KKpi" : maketuple_Ds2KKpi(options, pvs, rec_summary),
-        "Ds2KKpi_NoCuts" : maketuple_Ds2KKpi(options, pvs, rec_summary,True),
-        "D2pipipi" : maketuple_D2pipipi(options, pvs, rec_summary),
-        "D2pipipi_NoCuts" : maketuple_D2pipipi(options, pvs, rec_summary,True),
-        "D2pipiK" : maketuple_D2pipiK(options, pvs, rec_summary),
-        "D2pipiK_NoCuts" : maketuple_D2pipiK(options, pvs, rec_summary,True),
-        "D2KKK" : maketuple_D2KKK(options, pvs, rec_summary),
-        "D2KKK_NoCuts" : maketuple_D2KKK(options, pvs, rec_summary,True),
-        "D2piKK" : maketuple_D2piKK(options, pvs, rec_summary),
-        "D2piKK_NoCuts" : maketuple_D2piKK(options, pvs, rec_summary,True),
-        "B02Dpi_D2KKpi" : maketuple_B02Dpi_D2KKpi(options, pvs, rec_summary),
-        "B02Dpi_D2pipipi" : maketuple_B02Dpi_D2pipipi(options, pvs, rec_summary),
-        "Bs02Dspi_Ds2KKpi" : maketuple_Bs02Dspi_Ds2KKpi(options, pvs, rec_summary),
-        "Bs02Dspi_Ds2pipipi" : maketuple_Bs02Dspi_Ds2pipipi(options, pvs, rec_summary),
-        #ADet
-        "D2Kpipi_ADet" : maketuple_D2Kpipi_ADet(options, pvs, rec_summary),
-        "D2pipipi_ADet" : maketuple_D2pipipi_ADet(options, pvs, rec_summary),
-        "Ds2KKpi_ADet" : maketuple_Ds2KKpi_ADet(options, pvs, rec_summary),
-
-
-    }
-
-    MCtuples = {
-        "MC_D2Kpipi" : maketuple_MC_D2Kpipi(options, pvs, rec_summary),
-        "MC_Ds2KKpi" : maketuple_MC_Ds2KKpi(options, pvs, rec_summary),
-        "MC_Ds2KKK" : maketuple_MC_Ds2KKK(options, pvs, rec_summary)
-    }
-
-    if options.simulation:
-        tuples = tuples | MCtuples
-
-    config = make_config(options, tuples)
-
-    return config
diff --git a/Charm_2024validation/main_d_to_ksh.py b/Charm_2024validation/main_d_to_ksh.py
deleted file mode 100644
index 00ddc66093..0000000000
--- a/Charm_2024validation/main_d_to_ksh.py
+++ /dev/null
@@ -1,48 +0,0 @@
-###############################################################################
-# (c) Copyright 2021-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 .options.d_to_ksh import *
-from .options.d_to_ksh_MC import *
-from .options.detection_asymmetry import *
-
-from DaVinci import Options, make_config
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-        #D2KSh
-        "D2KSpi_LL" : maketuple_D2KSpi_LL(options, pvs, rec_summary),
-        "D2KSK_LL" : maketuple_D2KSK_LL(options, pvs, rec_summary),
-        "D2KSpi_LD" : maketuple_D2KSpi_LD(options, pvs, rec_summary),
-        "D2KSK_LD" : maketuple_D2KSK_LD(options, pvs, rec_summary),
-        "D2KSpi_DD" : maketuple_D2KSpi_DD(options, pvs, rec_summary),
-        "D2KSK_DD" : maketuple_D2KSK_DD(options, pvs, rec_summary),
-        #ADet
-        "D2KSK_LL_ADet" : maketuple_D2KSK_LL_ADet(options, pvs, rec_summary),
-        "D2KSpi_LL_ADet" : maketuple_D2KSpi_LL_ADet(options, pvs, rec_summary),
-    }
-
-    MCtuples = {
-        "MC_D2KSK" : maketuple_MC_D2KSK(options, pvs, rec_summary),
-        "MC_D2KSpi" : maketuple_MC_D2KSpi(options, pvs, rec_summary),
-    }
-
-    if options.simulation:
-        tuples = tuples | MCtuples
-        
-    config = make_config(options, tuples)
-
-    return config
diff --git a/Charm_2024validation/main_detection_asymmetry.py b/Charm_2024validation/main_detection_asymmetry.py
deleted file mode 100644
index 1ededecf77..0000000000
--- a/Charm_2024validation/main_detection_asymmetry.py
+++ /dev/null
@@ -1,31 +0,0 @@
-###############################################################################
-# (c) Copyright 2021-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 .options.detection_asymmetry import *
-
-from DaVinci import Options, make_config
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-        
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-        #ADet
-        "Lc2KSp_LL_ADet" : maketuple_Lc2KSp_LL_ADet(options, pvs, rec_summary),
-        "Lc2pKpi_ADet" : maketuple_Lc2pKpi_ADet(options, pvs, rec_summary),
-    }
-        
-    config = make_config(options, tuples)
-
-    return config
diff --git a/Charm_2024validation/main_dst_to_dee.py b/Charm_2024validation/main_dst_to_dee.py
deleted file mode 100644
index 3084abe4e7..0000000000
--- a/Charm_2024validation/main_dst_to_dee.py
+++ /dev/null
@@ -1,42 +0,0 @@
-###############################################################################
-# (c) Copyright 2021-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 .options.dst_to_dee import *
-
-from DaVinci import Options, make_config
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS':             make_Dst0ToD0EmEp_D0ToKmPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS", pvs, rec_summary, 'dst_kpi_os'),
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS':             make_Dst0ToD0EmEp_D0ToKmPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS", pvs, rec_summary, 'dst_kpi_ss'),
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS_MVA':         make_Dst0ToD0EmEp_D0ToKmPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS_MVA", pvs, rec_summary, 'dst_kpi_os'),
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS_MVA':         make_Dst0ToD0EmEp_D0ToKmPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS_MVA", pvs, rec_summary, 'dst_kpi_ss'),
-
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS':       make_Dst0ToD0EmEp_D0ToKmPimPipPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS", pvs, rec_summary,'dst_k3pi_os' ),
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS':       make_Dst0ToD0EmEp_D0ToKmPimPipPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS", pvs, rec_summary, 'dst_k3pi_ss'),
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS_MVA':   make_Dst0ToD0EmEp_D0ToKmPimPipPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS_MVA", pvs, rec_summary, 'dst_k3pi_os'),
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS_MVA':   make_Dst0ToD0EmEp_D0ToKmPimPipPip_tuple(options, "Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS_MVA", pvs, rec_summary, 'dst_k3pi_ss'),
-
-    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS':     make_DstpToDpDspEmEp_DpDspToKmKpPip_tuple(options, "Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS", pvs, rec_summary, "dsstp_2kpi_os"),
-    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS':     make_DstpToDpDspEmEp_DpDspToKmKpPip_tuple(options, "Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS", pvs, rec_summary, "dsstp_2kpi_ss"),
-    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS_MVA': make_DstpToDpDspEmEp_DpDspToKmKpPip_tuple(options, "Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS_MVA", pvs, rec_summary, "dsstp_2kpi_os"),
-    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS_MVA': make_DstpToDpDspEmEp_DpDspToKmKpPip_tuple(options, "Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS_MVA", pvs, rec_summary, "dsstp_2kpi_ss"),
-    }
-
-    config = make_config(options, tuples)
-
-    return config
\ No newline at end of file
diff --git a/Charm_2024validation/main_rare_charm.py b/Charm_2024validation/main_rare_charm.py
deleted file mode 100644
index d38574262b..0000000000
--- a/Charm_2024validation/main_rare_charm.py
+++ /dev/null
@@ -1,41 +0,0 @@
-###############################################################################
-# (c) Copyright 2021-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 .options.rare_charm import *
-#from .options.rare_charm_MC import *
-
-from DaVinci import Options, make_config
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-        
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-        "D2pimumu" : maketuple_D2pimumu(options, pvs, rec_summary),
-        "D2pimumu_WS" : maketuple_D2pimumu_WS(options, pvs, rec_summary),
-        "CharmRD_D2pipipi" : maketuple_D2pipipi(options, pvs, rec_summary),
-        "D2piee" : maketuple_D2piee(options, pvs, rec_summary),
-        "Lc2pmumu" : maketuple_Lc2pmumu(options, pvs, rec_summary),
-        "Dst2D0pi_D02Kpimumu_RS" : maketuple_Dst2D0pi_D02Kpimumu_RS(options, pvs, rec_summary),
-    }
-
-    MCtuples = {
-    }
-    
-    if options.simulation:
-        tuples = tuples | MCtuples
-        
-    config = make_config(options, tuples)
-
-    return config
diff --git a/Charm_2024validation/options/d0_to_hh.py b/Charm_2024validation/options/d0_to_hh.py
deleted file mode 100644
index 80a3cdcec2..0000000000
--- a/Charm_2024validation/options/d0_to_hh.py
+++ /dev/null
@@ -1,432 +0,0 @@
-from .tupling import (
-    make_composite_variables,
-    make_basic_variables,
-    make_hlt2_event_variables,
-    make_DeltaM_variable,
-    make_composite_dtf_variables,
-    make_basic_dtf_variables,
-)
-
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunTuple_Particles as Funtuple
-
-
-def make_dtf_variables(options, pvs, input_data, ptype):
-
-    if ptype not in ["basic", "composite"]:
-        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
-
-    from DecayTreeFitter import DecayTreeFitter
-    
-    DTF = DecayTreeFitter(
-        name=f'DTF_{{hash}}',
-        input_particles=input_data)
-
-    DTFvtx = DecayTreeFitter(
-        name=f'DTFvtx_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    DTFmass = DecayTreeFitter(
-        name=f'DTFmass_{{hash}}',
-        input_particles=input_data,
-        mass_constraints=["D0"])
-
-    DTFvtxmass = DecayTreeFitter(
-        name=f'DTFvtxmass_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0"])
-
-    if ptype == "basic":
-        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmass,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="D0")
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmass,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="D0")
-        return dtf_vars
-
-    if ptype == "composite":
-        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmass,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="D0")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmass,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="D0")
-        return dtf_vars
-
-def maketuple_D02KK_LowBias(options, pvs, rec_summary):
-    name = "D02KK_LowBias"
-    turbo_line = "Hlt2Charm_D0ToKmKp_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> K- K+]CC",
-        "Km"   : "[D0 -> ^K- K+]CC",
-        "Kp"  : "[D0 -> K- ^K+]CC",
-    }
-
-    variables = {
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D02KK(options, pvs, rec_summary):
-    name = "D02KK"
-    turbo_line = "Hlt2Charm_D0ToKmKp"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> K- K+]CC",
-        "Km"   : "[D0 -> ^K- K+]CC",
-        "Kp"  : "[D0 -> K- ^K+]CC",
-    }
-
-    variables = {
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D02Kpi_LowBias(options, pvs, rec_summary):
-    name = "D02Kpi_LowBias"
-    turbo_line = "Hlt2Charm_D0ToKmPip_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> K- pi+]CC",
-        "Km"   : "[D0 -> ^K- pi+]CC",
-        "pip"  : "[D0 -> K- ^pi+]CC",
-    }
-
-    variables = {
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D02Kpi(options, pvs, rec_summary):
-    name = "D02Kpi"
-    turbo_line = "Hlt2Charm_D0ToKmPip"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> K- pi+]CC",
-        "Km"   : "[D0 -> ^K- pi+]CC",
-        "pip"  : "[D0 -> K- ^pi+]CC",
-    }
-
-    variables = {
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D02pipi_LowBias(options, pvs, rec_summary):
-    name = "D02pipi_LowBias"
-    turbo_line = "Hlt2Charm_D0ToPimPip_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> pi- pi+]CC",
-        "pim"   : "[D0 -> ^pi- pi+]CC",
-        "pip"  : "[D0 -> pi- ^pi+]CC",
-    }
-
-    variables = {
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D02pipi(options, pvs, rec_summary):
-    name = "D02pipi"
-    turbo_line = "Hlt2Charm_D0ToPimPip"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> pi- pi+]CC",
-        "pim"   : "[D0 -> ^pi- pi+]CC",
-        "pip"  : "[D0 -> pi- ^pi+]CC",
-    }
-
-    variables = {
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02KK_LowBias(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02KK_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmKp_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> ([D0]CC -> K- K+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> K- K+) pi+]CC",
-        "Km"   : "[D*(2010)+ -> ([D0]CC -> ^K- K+) pi+]CC",
-        "Kp"  : "[D*(2010)+ -> ([D0]CC -> K- ^K+) pi+]CC",
-        "spip" : "[D*(2010)+ -> ([D0]CC -> K- K+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02KK(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02KK"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmKp"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> ([D0]CC -> K- K+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> K- K+) pi+]CC",
-        "Km"   : "[D*(2010)+ -> ([D0]CC -> ^K- K+) pi+]CC",
-        "Kp"  : "[D*(2010)+ -> ([D0]CC -> K- ^K+) pi+]CC",
-        "spip" : "[D*(2010)+ -> ([D0]CC -> K- K+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02Kpi_RS_LowBias(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02Kpi_RS_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPip_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> (D0 -> K- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^(D0 -> K- pi+) pi+]CC",
-        "Km"   : "[D*(2010)+ -> (D0 -> ^K- pi+) pi+]CC",
-        "pip"  : "[D*(2010)+ -> (D0 -> K- ^pi+) pi+]CC",
-        "spip" : "[D*(2010)+ -> (D0 -> K- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02Kpi_RS(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02Kpi_RS"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPip"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> (D0 -> K- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^(D0 -> K- pi+) pi+]CC",
-        "Km"   : "[D*(2010)+ -> (D0 -> ^K- pi+) pi+]CC",
-        "pip"  : "[D*(2010)+ -> (D0 -> K- ^pi+) pi+]CC",
-        "spip" : "[D*(2010)+ -> (D0 -> K- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02Kpi_WS_LowBias(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02Kpi_WS_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKpPim_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> (D0 -> K+ pi-) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^(D0 -> K+ pi-) pi+]CC",
-        "Kp"   : "[D*(2010)+ -> (D0 -> ^K+ pi-) pi+]CC",
-        "pim"  : "[D*(2010)+ -> (D0 -> K+ ^pi-) pi+]CC",
-        "spip" : "[D*(2010)+ -> (D0 -> K+ pi-) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Kp"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pim"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02Kpi_WS(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02Kpi_WS"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKpPim"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> (D0 -> K+ pi-) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^(D0 -> K+ pi-) pi+]CC",
-        "Kp"   : "[D*(2010)+ -> (D0 -> ^K+ pi-) pi+]CC",
-        "pim"  : "[D*(2010)+ -> (D0 -> K+ ^pi-) pi+]CC",
-        "spip" : "[D*(2010)+ -> (D0 -> K+ pi-) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Kp"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pim"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02pipi_LowBias(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02pipi_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimPip_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> ([D0]CC -> pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> pi- pi+) pi+]CC",
-        "pim"   : "[D*(2010)+ -> ([D0]CC -> ^pi- pi+) pi+]CC",
-        "pip"  : "[D*(2010)+ -> ([D0]CC -> pi- ^pi+) pi+]CC",
-        "spip" : "[D*(2010)+ -> ([D0]CC -> pi- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02pipi(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02pipi"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimPip"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> ([D0]CC -> pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> pi- pi+) pi+]CC",
-        "pim"   : "[D*(2010)+ -> ([D0]CC -> ^pi- pi+) pi+]CC",
-        "pip"  : "[D*(2010)+ -> ([D0]CC -> pi- ^pi+) pi+]CC",
-        "spip" : "[D*(2010)+ -> ([D0]CC -> pi- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
diff --git a/Charm_2024validation/options/d0_to_hh_MC.py b/Charm_2024validation/options/d0_to_hh_MC.py
deleted file mode 100644
index aaae05665d..0000000000
--- a/Charm_2024validation/options/d0_to_hh_MC.py
+++ /dev/null
@@ -1,99 +0,0 @@
-from .tupling import (
-    make_MC_composite_variables,
-    make_MC_basic_variables,
-    make_MC_event_variables,
-)
-
-from PyConf.reading import get_mc_particles, get_mc_header
-from FunTuple import FunTuple_MCParticles as FuntupleMC
-
-def maketuple_MC_Dst2D0pi_D02Kpi_RS(options, pvs, rec_summary):
-    name = "MC_Dst2D0pi_D02Kpi_RS"
-    line = "/Event/MC/Particles"
-
-    input_data = get_mc_particles(f"{line}")
-
-    branches = {
-        "Dst" : "[D*(2010)+ ==> (D0 ==> K- pi+ ) pi+]CC",
-        "D0"  : "[D*(2010)+ ==> ^(D0 ==> K- pi+ ) pi+]CC",
-        "Km"   : "[D*(2010)+ ==> (D0 ==> ^K- pi+ ) pi+]CC",
-        "pip"  : "[D*(2010)+ ==> (D0 ==> K- ^pi+ ) pi+]CC",
-        "spip" : "[D*(2010)+ ==> (D0 ==> K- pi+ ) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_MC_composite_variables(),
-        "D0"    : make_MC_composite_variables(),
-        "Km"     : make_MC_basic_variables(),
-        "pip"    : make_MC_basic_variables(),
-        "spip"   : make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                          tuple_name="MCDecayTree",
-                          fields=branches, variables = variables,
-                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
-                          inputs=input_data)
-
-    return [mytuple]
-
-def maketuple_MC_Dst2D0pi_D02KK(options, pvs, rec_summary):
-    name = "MC_Dst2D0pi_D02KK"
-    line = "/Event/MC/Particles"
-
-    input_data = get_mc_particles(f"{line}")
-
-    branches = {
-        "Dst" : "[D*(2010)+ ==> ([D0]CC ==> K- K+) pi+]CC",
-        "D0"  : "[D*(2010)+ ==> ^([D0]CC ==> K- K+) pi+]CC",
-        "Km"   : "[D*(2010)+ ==> ([D0]CC ==> ^K- K+) pi+]CC",
-        "Kp"  : "[D*(2010)+ ==> ([D0]CC ==> K- ^K+) pi+]CC",
-        "spip" : "[D*(2010)+ ==> ([D0]CC ==> K- K+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_MC_composite_variables(),
-        "D0"    : make_MC_composite_variables(),
-        "Km"     : make_MC_basic_variables(),
-        "Kp"    : make_MC_basic_variables(),
-        "spip"   : make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                        tuple_name="MCDecayTree",
-                        fields=branches, variables = variables,
-                        event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
-                        inputs=input_data)
-
-    return [mytuple]
-
-
-def maketuple_MC_Dst2D0pi_D02pipi(options, pvs, rec_summary):
-    name = "MC_Dst2D0pi_D02pipi"
-    line = "/Event/MC/Particles"
-
-    input_data = get_mc_particles(f"{line}")
-
-    branches = {
-        "Dst" : "[D*(2010)+ ==> ([D0]CC ==> pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ ==> ^([D0]CC ==> pi- pi+) pi+]CC",
-        "pim"   : "[D*(2010)+ ==> ([D0]CC ==> ^pi- pi+) pi+]CC",
-        "pip"  : "[D*(2010)+ ==> ([D0]CC ==> pi- ^pi+) pi+]CC",
-        "spip" : "[D*(2010)+ ==> ([D0]CC ==> pi- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_MC_composite_variables(),
-        "D0"    : make_MC_composite_variables(),
-        "pim"     : make_MC_basic_variables(),
-        "pip"    : make_MC_basic_variables(),
-        "spip"   : make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                        tuple_name="MCDecayTree",
-                        fields=branches, variables = variables,
-                        event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
-                        inputs=input_data)
-
-    return [mytuple]
diff --git a/Charm_2024validation/options/d0_to_hhhh.py b/Charm_2024validation/options/d0_to_hhhh.py
deleted file mode 100644
index 0277430fb9..0000000000
--- a/Charm_2024validation/options/d0_to_hhhh.py
+++ /dev/null
@@ -1,247 +0,0 @@
-from .tupling import (
-    make_composite_variables,
-    make_composite_variables_4body,
-    make_composite_variables_3body,
-    make_basic_variables,
-    make_hlt2_event_variables,
-    make_DeltaM_variable,
-    make_basic_dtf_variables,
-    make_composite_dtf_variables
-)
-
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunTuple_Particles as Funtuple
-from DecayTreeFitter import DecayTreeFitter
-
-# I can't get make_composite_variables_4body to work for some reason...
-import Functors as F
-from FunTuple import FunctorCollection
-variables_4body = (
-    FunctorCollection(
-        {
-            #14
-            "M14": F.SUBCOMB(Functor=F.MASS, Indices=(1, 4)),
-            "SDOCA14"     : F.SDOCA(Child1=1,Child2=4),
-            "SDOCACHI214" : F.SDOCACHI2(Child1=1,Child2=4),
-            "DOCA14"      : F.DOCA(Child1=1,Child2=4),
-            "DOCACHI214"  : F.DOCACHI2(Child1=1,Child2=4),
-            "COS14": F.ALV(1, 4),
-            #24
-            "M24": F.SUBCOMB(Functor=F.MASS, Indices=(2, 4)),
-            "SDOCA24"     : F.SDOCA(Child1=2,Child2=4),
-            "SDOCACHI224" : F.SDOCACHI2(Child1=2,Child2=4),
-            "DOCA24"      : F.DOCA(Child1=2,Child2=4),
-            "DOCACHI224"  : F.DOCACHI2(Child1=2,Child2=4),
-            "COS24": F.ALV(2, 4),
-            #34
-            "M34": F.SUBCOMB(Functor=F.MASS, Indices=(3, 4)),
-            "SDOCA34"     : F.SDOCA(Child1=3,Child2=4),
-            "SDOCACHI234" : F.SDOCACHI2(Child1=3,Child2=4),
-            "DOCA34"      : F.DOCA(Child1=3,Child2=4),
-            "DOCACHI234"  : F.DOCACHI2(Child1=3,Child2=4),
-            "COS34": F.ALV(3, 4),
-        }
-    )
-)
-
-
-def maketuple_DstToD0pi_D0ToKKPiPi(options, pvs, rec_summary):
-    name = "DstToD0pi_D0ToKKPiPi"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmKpPimPip"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> ([D0]CC -> K+ K- pi+ pi-) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> K+ K- pi+ pi-) pi+]CC",
-        "h1"  : "[D*(2010)+ -> ([D0]CC -> ^K+ K- pi+ pi-) pi+]CC",
-        "h2"  : "[D*(2010)+ -> ([D0]CC -> K+ ^K- pi+ pi-) pi+]CC",
-        "h3"  : "[D*(2010)+ -> ([D0]CC -> K+ K- ^pi+ pi-) pi+]CC",
-        "h4"  : "[D*(2010)+ -> ([D0]CC -> K+ K- pi+ ^pi-) pi+]CC",
-        "pis" : "[D*(2010)+ -> ([D0]CC -> K+ K- pi+ pi-) ^pi+]CC",
-    }
-
-    DTF_PV = DecayTreeFitter(
-        name='DTF_D0ToKKPiPi_PV',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    basic_variables = make_basic_variables(options, pvs, input_data) +\
-        make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)
-
-    composite_dtf_variables = make_composite_dtf_variables(options,
-                                                           pvs,
-                                                           input_data,
-                                                           DTF=DTF_PV,
-                                                           pv_constraint=True)
-
-    composite_variables = make_composite_variables(options, pvs, input_data) + composite_dtf_variables
-        
-
-    composite_variables_4body = make_composite_variables_3body(options, pvs, input_data) + composite_dtf_variables + variables_4body
-
-    variables = {
-        "Dst"   : composite_variables+make_DeltaM_variable(options),
-        "D0"    : composite_variables_4body,
-        "h1"    : basic_variables,
-        "h2"    : basic_variables,
-        "h3"    : basic_variables,
-        "h4"    : basic_variables,
-        "pis"   : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstToD0pi_D0ToKPiPiPi(options, pvs, rec_summary):
-    name = "DstToD0pi_D0ToKPiPiPi"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPimPipPip"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> (D0 -> K- pi+ pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^(D0 -> K- pi+ pi- pi+) pi+]CC",
-        "h1"   : "[D*(2010)+ -> (D0 -> ^K- pi+ pi- pi+) pi+]CC",
-        "h2"  : "[D*(2010)+ -> (D0 -> K- ^pi+ pi- pi+) pi+]CC",
-        "h3"   : "[D*(2010)+ -> (D0 -> K- pi+ ^pi- pi+) pi+]CC",
-        "h4"  : "[D*(2010)+ -> (D0 -> K- pi+ pi- ^pi+) pi+]CC",
-        "pis" : "[D*(2010)+ -> (D0 -> K- pi+ pi- pi+) ^pi+]CC",
-    }
-
-    DTF_PV = DecayTreeFitter(
-        name='DTF_D0ToKPiPiPi_PV',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    basic_variables = make_basic_variables(options, pvs, input_data) +\
-        make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True, mass_constraint=False)
-
-    composite_dtf_variables = make_composite_dtf_variables(options,
-                                                           pvs,
-                                                           input_data,
-                                                           DTF=DTF_PV,
-                                                           pv_constraint=True)
-
-    composite_variables = make_composite_variables(options, pvs, input_data) + composite_dtf_variables
-        
-
-    composite_variables_4body = make_composite_variables_3body(options, pvs, input_data) + composite_dtf_variables + variables_4body
-
-    variables = {
-        "Dst"   : composite_variables+make_DeltaM_variable(options),
-        "D0"    : composite_variables_4body,
-        "h1"    : basic_variables,
-        "h2"    : basic_variables,
-        "h3"    : basic_variables,
-        "h4"    : basic_variables,
-        "pis"   : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstToD0pi_D0ToPiKPiPi(options, pvs, rec_summary):
-    name = "DstToD0pi_D0ToPiKPiPi"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKpPimPimPip"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> (D0 -> pi- K+ pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^(D0 -> pi- K+ pi- pi+) pi+]CC",
-        "h1"   : "[D*(2010)+ -> (D0 -> ^pi- K+ pi- pi+) pi+]CC",
-        "h2"  : "[D*(2010)+ -> (D0 -> pi- ^K+ pi- pi+) pi+]CC",
-        "h3"   : "[D*(2010)+ -> (D0 -> pi- K+ ^pi- pi+) pi+]CC",
-        "h4"  : "[D*(2010)+ -> (D0 -> pi- K+ pi- ^pi+) pi+]CC",
-        "pis" : "[D*(2010)+ -> (D0 -> pi- K+ pi- pi+) ^pi+]CC",
-    }
-
-    DTF_PV = DecayTreeFitter(
-        name='DTF_D0ToPiKPiPi_PV',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    basic_variables = make_basic_variables(options, pvs, input_data) +\
-        make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True, mass_constraint=False)
-
-    composite_dtf_variables = make_composite_dtf_variables(options,
-                                                           pvs,
-                                                           input_data,
-                                                           DTF=DTF_PV,
-                                                           pv_constraint=True)
-
-    composite_variables = make_composite_variables(options, pvs, input_data) + composite_dtf_variables
-        
-
-    composite_variables_4body = make_composite_variables_3body(options, pvs, input_data) + composite_dtf_variables + variables_4body
-
-    variables = {
-        "Dst"   : composite_variables+make_DeltaM_variable(options),
-        "D0"    : composite_variables_4body,
-        "h1"    : basic_variables,
-        "h2"    : basic_variables,
-        "h3"    : basic_variables,
-        "h4"    : basic_variables,
-        "pis"   : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstToD0pi_D0ToPiPiPiPi(options, pvs, rec_summary):
-    name = "DstToD0pi_D0ToPiPiPiPi"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimPimPipPip"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> ([D0]CC -> pi+ pi- pi+ pi-) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> pi+ pi- pi+ pi-) pi+]CC",
-        "h1"  : "[D*(2010)+ -> ([D0]CC -> ^pi+ pi- pi+ pi-) pi+]CC",
-        "h2"  : "[D*(2010)+ -> ([D0]CC -> pi+ ^pi- pi+ pi-) pi+]CC",
-        "h3"  : "[D*(2010)+ -> ([D0]CC -> pi+ pi- ^pi+ pi-) pi+]CC",
-        "h4"  : "[D*(2010)+ -> ([D0]CC -> pi+ pi- pi+ ^pi-) pi+]CC",
-        "pis" : "[D*(2010)+ -> ([D0]CC -> pi+ pi- pi+ pi-) ^pi+]CC",
-    }
-
-    DTF_PV = DecayTreeFitter(
-        name='DTF_D0ToPiPiPiPi_PV',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    basic_variables = make_basic_variables(options, pvs, input_data) +\
-        make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True, mass_constraint=False)
-
-    composite_dtf_variables = make_composite_dtf_variables(options,
-                                                           pvs,
-                                                           input_data,
-                                                           DTF=DTF_PV,
-                                                           pv_constraint=True)
-
-    composite_variables = make_composite_variables(options, pvs, input_data) + composite_dtf_variables
-        
-
-    composite_variables_4body = make_composite_variables_3body(options, pvs, input_data) + composite_dtf_variables + variables_4body
-
-    variables = {
-        "Dst"   : composite_variables+make_DeltaM_variable(options),
-        "D0"    : composite_variables_4body,
-        "h1"    : basic_variables,
-        "h2"    : basic_variables,
-        "h3"    : basic_variables,
-        "h4"    : basic_variables,
-        "pis"   : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
diff --git a/Charm_2024validation/options/d0_to_hhhh_MC.py b/Charm_2024validation/options/d0_to_hhhh_MC.py
deleted file mode 100644
index 2dbe198fa9..0000000000
--- a/Charm_2024validation/options/d0_to_hhhh_MC.py
+++ /dev/null
@@ -1,43 +0,0 @@
-from .tupling import (
-    make_MC_composite_variables,
-    make_MC_basic_variables,
-    make_MC_event_variables,
-)
-
-from PyConf.reading import get_mc_particles, get_mc_header
-from FunTuple import FunTuple_MCParticles as FuntupleMC
-
-def maketuple_MC_DstToD0pi_D0ToKPiPiPi(options, pvs, rec_summary):
-    name = "MC_DstToD0pi_D0ToKPiPiPi"
-
-    line = "/Event/MC/Particles"
-    
-    input_data = get_mc_particles(f"{line}")
-
-    branches = {
-        "Dst" : "[D*(2010)+ ==> (D0 ==> K- pi+ pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ ==> ^(D0 ==> K- pi+ pi- pi+) pi+]CC",
-        "h1"   : "[D*(2010)+ ==> (D0 ==> ^K- pi+ pi- pi+) pi+]CC",
-        "h2"  : "[D*(2010)+ ==> (D0 ==> K- ^pi+ pi- pi+) pi+]CC",
-        "h3"   : "[D*(2010)+ ==> (D0 ==> K- pi+ ^pi- pi+) pi+]CC",
-        "h4"  : "[D*(2010)+ ==> (D0 ==> K- pi+ pi- ^pi+) pi+]CC",
-        "pis" : "[D*(2010)+ ==> (D0 ==> K- pi+ pi- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_MC_composite_variables(),
-        "D0"    : make_MC_composite_variables(),
-        "h1"     : make_MC_basic_variables(),
-        "h2"    : make_MC_basic_variables(),
-        "h3"    : make_MC_basic_variables(),
-        "h4"    : make_MC_basic_variables(),
-        "pis"   : make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                          tuple_name="MCDecayTree",
-                          fields=branches, variables = variables,  
-                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])), 
-                          inputs=input_data)
-
-    return [mytuple]
diff --git a/Charm_2024validation/options/d0_to_hhpi0.py b/Charm_2024validation/options/d0_to_hhpi0.py
deleted file mode 100644
index cf3c3ba59f..0000000000
--- a/Charm_2024validation/options/d0_to_hhpi0.py
+++ /dev/null
@@ -1,359 +0,0 @@
-from .tupling import (
-    make_composite_variables,
-    make_DeltaM_variable,
-    make_basic_variables,
-    make_hlt2_event_variables,
-    make_top_isolation_variables,
-    make_basic_isolation_variables,
-    make_intermediate_isolation_variables,
-    make_composite_dtf_variables,
-    make_basic_dtf_variables,
-)
-
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunTuple_Particles as Funtuple
-
-iso_vars_locations = ["LongTrackIso", "NeutralIso", "PizIso"]
-
-def make_dtf_variables(options, pvs, input_data, ptype):
-
-    if ptype not in ["basic", "composite"]:
-        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
-
-    from DecayTreeFitter import DecayTreeFitter
-    
-    DTF = DecayTreeFitter(
-        name=f'DTF_{{hash}}',
-        input_particles=input_data)
-
-    DTFvtx = DecayTreeFitter(
-        name=f'DTFvtx_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    DTFmass = DecayTreeFitter(
-        name=f'DTFmass_{{hash}}',
-        input_particles=input_data,
-        mass_constraints=["D0"])
-
-    DTFvtxmass = DecayTreeFitter(
-        name=f'DTFvtxmass_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0"])
-
-    if ptype == "basic":
-        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmass,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="D0")
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmass,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="D0")
-        return dtf_vars
-
-    if ptype == "composite":
-        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmass,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="D0")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmass,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="D0")
-        return dtf_vars
-
-
-def maketuple_Dst2D0pi_D02KKpi0_M(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02KKpi0_M"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmKpPi0_M"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) pi0) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (phi(1020) -> K- K+) pi0) pi+]CC",
-        "phi"   : "[D*(2010)+ -> ([D0]CC -> ^(phi(1020) -> K- K+) pi0) pi+]CC",
-        "Km"   : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> ^K- K+) pi0) pi+]CC",
-        "Kp"  : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- ^K+) pi0) pi+]CC",
-        "pi0"  : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) ^pi0) pi+]CC",
-        "spip" : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) pi0) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "phi"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation:
-
-        variables = {
-            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="D0"),
-            "phi"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="phi(1020)"),
-            "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02KKpi0_R(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02KKpi0_R"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmKpPi0_R"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) (pi0 -> gamma gamma) ) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (phi(1020) -> K- K+) (pi0 -> gamma gamma) ) pi+]CC",
-        "phi"   : "[D*(2010)+ -> ([D0]CC -> ^(phi(1020) -> K- K+) (pi0 -> gamma gamma) ) pi+]CC",
-        "Km"   : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> ^K- K+) (pi0 -> gamma gamma) ) pi+]CC",
-        "Kp"  : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- ^K+) (pi0 -> gamma gamma) ) pi+]CC",
-        "pi0"  : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) ^(pi0 -> gamma gamma) ) pi+]CC",
-        "gamma1"  : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) (pi0 -> ^gamma gamma) ) pi+]CC",
-        "gamma2"  : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) (pi0 -> gamma ^gamma) ) pi+]CC",
-        "spip" : "[D*(2010)+ -> ([D0]CC -> (phi(1020) -> K- K+) (pi0 -> gamma gamma) ) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "phi"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "gamma1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "gamma2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation:
-
-        variables = {
-            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="D0"),
-            "phi"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="phi(1020)"),
-            "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="pi0"),
-            "gamma1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "gamma2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02Kpipi0_M(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02Kpipi0_M"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPipPi0_M"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) pi0) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^(D0 -> (K*(892)~0 -> K- pi+) pi0) pi+]CC",
-        "Kst"   : "[D*(2010)+ -> (D0 -> ^(K*(892)~0 -> K- pi+) pi0) pi+]CC",
-        "Km"   : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> ^K- pi+) pi0) pi+]CC",
-        "pip"  : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- ^pi+) pi0) pi+]CC",
-        "pi0"  : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) ^pi0) pi+]CC",
-        "spip" : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) pi0) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Kst"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation:
-
-        variables = {
-            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="D0"),
-            "Kst"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="K*(892)~0"),
-            "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02Kpipi0_R(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02Kpipi0_R"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPipPi0_R"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) (pi0 -> gamma gamma) ) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^(D0 -> (K*(892)~0 -> K- pi+) (pi0 -> gamma gamma) ) pi+]CC",
-        "Kst"   : "[D*(2010)+ -> (D0 -> ^(K*(892)~0 -> K- pi+) (pi0 -> gamma gamma) ) pi+]CC",
-        "Km"   : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> ^K- pi+) (pi0 -> gamma gamma) ) pi+]CC",
-        "pip"  : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- ^pi+) (pi0 -> gamma gamma) ) pi+]CC",
-        "pi0"  : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) ^(pi0 -> gamma gamma) ) pi+]CC",
-        "gamma1"  : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) (pi0 -> ^gamma gamma) ) pi+]CC",
-        "gamma2"  : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) (pi0 -> gamma ^gamma) ) pi+]CC",
-        "spip" : "[D*(2010)+ -> (D0 -> (K*(892)~0 -> K- pi+) (pi0 -> gamma gamma) ) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Kst"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "gamma1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "gamma2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation:
-
-        variables = {
-            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="D0"),
-            "Kst"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="K*(892)~0"),
-            "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="pi0"),
-            "gamma1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "gamma2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02pipipi0_M(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02pipipi0_M"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimPipPi0_M"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) pi0) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (rho(770)0 -> pi- pi+) pi0) pi+]CC",
-        "rho"   : "[D*(2010)+ -> ([D0]CC -> ^(rho(770)0 -> pi- pi+) pi0) pi+]CC",
-        "pim"   : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> ^pi- pi+) pi0) pi+]CC",
-        "pip"  : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- ^pi+) pi0) pi+]CC",
-        "pi0"  : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) ^pi0) pi+]CC",
-        "spip" : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) pi0) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "rho"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation:
-
-        variables = {
-            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="D0"),
-            "rho"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="rho(770)0"),
-            "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02pipipi0_R(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02pipipi0_R"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimPipPi0_R"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) (pi0 -> gamma gamma) ) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (rho(770)0 -> pi- pi+) (pi0 -> gamma gamma) ) pi+]CC",
-        "rho"   : "[D*(2010)+ -> ([D0]CC -> ^(rho(770)0 -> pi- pi+) (pi0 -> gamma gamma) ) pi+]CC",
-        "pim"   : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> ^pi- pi+) (pi0 -> gamma gamma) ) pi+]CC",
-        "pip"  : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- ^pi+) (pi0 -> gamma gamma) ) pi+]CC",
-        "pi0"  : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) ^(pi0 -> gamma gamma) ) pi+]CC",
-        "gamma1"  : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) (pi0 -> ^gamma gamma) ) pi+]CC",
-        "gamma2"  : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) (pi0 -> gamma ^gamma) ) pi+]CC",
-        "spip" : "[D*(2010)+ -> ([D0]CC -> (rho(770)0 -> pi- pi+) (pi0 -> gamma gamma) ) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "rho"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "gamma1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "gamma2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation:
-
-        variables = {
-            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "D0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="D0"),
-            "rho"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="rho(770)0"),
-            "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "pi0"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_intermediate_isolation_variables(turbo_line, input_data, locations=iso_vars_locations, composite_ID="pi0"),
-            "gamma1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "gamma2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, locations=iso_vars_locations),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
diff --git a/Charm_2024validation/options/d0_to_hhpi0_MC.py b/Charm_2024validation/options/d0_to_hhpi0_MC.py
deleted file mode 100644
index 84648f4e71..0000000000
--- a/Charm_2024validation/options/d0_to_hhpi0_MC.py
+++ /dev/null
@@ -1,44 +0,0 @@
-from .tupling import (
-    make_MC_composite_variables,
-    make_MC_basic_variables,
-    make_MC_event_variables,
-)
-
-from PyConf.reading import get_mc_particles, get_mc_header
-from FunTuple import FunTuple_MCParticles as FuntupleMC
-
-def maketuple_MC_Dst2D0pi_D02Kpipi0(options, pvs, rec_summary):
-    name = "MC_Dst2D0pi_D02Kpipi0"
-    line = "/Event/MC/Particles"
-    
-    input_data = get_mc_particles(f"{line}")
-
-    branches = {
-        "Dst" : "[D*(2010)+ ==> (D0 ==> K- pi+ (pi0 ==> gamma gamma) ) pi+]CC",
-        "D0"  : "[D*(2010)+ ==> ^(D0 ==> K- pi+ (pi0 ==> gamma gamma) ) pi+]CC",
-        "Km"   : "[D*(2010)+ ==> (D0 ==> ^K- pi+ (pi0 ==> gamma gamma) ) pi+]CC",
-        "pip"  : "[D*(2010)+ ==> (D0 ==> K- ^pi+ (pi0 ==> gamma gamma) ) pi+]CC",
-        "pi0"  : "[D*(2010)+ ==> (D0 ==> K- pi+ ^(pi0 ==> gamma gamma) ) pi+]CC",
-        "gamma1"  : "[D*(2010)+ ==> (D0 ==> K- pi+ (pi0 ==> ^gamma gamma) ) pi+]CC",
-        "gamma2"  : "[D*(2010)+ ==> (D0 ==> K- pi+ (pi0 ==> gamma ^gamma) ) pi+]CC",
-        "spip" : "[D*(2010)+ ==> (D0 ==> K- pi+ (pi0 ==> gamma gamma) ) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_MC_composite_variables(),
-        "D0"    : make_MC_composite_variables(),
-        "Km"     : make_MC_basic_variables(),
-        "pip"    : make_MC_basic_variables(),
-        "pi0"    : make_MC_basic_variables(),
-        "gamma1"    : make_MC_basic_variables(),
-        "gamma2"    : make_MC_basic_variables(),
-        "spip"   : make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                          tuple_name="MCDecayTree",
-                          fields=branches, variables = variables,  
-                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])), 
-                          inputs=input_data)
-
-    return [mytuple]
diff --git a/Charm_2024validation/options/d0_to_kshh.py b/Charm_2024validation/options/d0_to_kshh.py
deleted file mode 100644
index dad027529f..0000000000
--- a/Charm_2024validation/options/d0_to_kshh.py
+++ /dev/null
@@ -1,1585 +0,0 @@
-from .tupling import (
-    make_composite_variables,
-    make_composite_variables_3body,
-    make_basic_variables,
-    make_hlt2_event_variables,
-    make_DeltaM_variable,
-    make_basic_dtf_variables,
-    make_composite_dtf_variables,
-    make_composite_dtf_variables_3body,
-)
-
-import Functors as F
-from Functors.math import log
-from DaVinci import Options, make_config
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunctorCollection
-from PyConf.reading import get_particles
-import FunTuple.functorcollections as FC
-from FunTuple import FunTuple_Particles as Funtuple
-from DecayTreeFitter import DecayTreeFitter
-
-# define helper functors
-get_SV =  F.ENDVERTEX @ F.FORWARDARG0
-get_SV_pos = F.TOLINALG @ F.POSITION @ get_SV
-# only if composite (i.e. has vertex)

-get_child_1 = F.CHILD(1, F.FORWARDARG0) # change here the index of the child.
-get_child_endvtx_pos_1 = F.ENDVERTEX_POS  @ get_child_1
-get_fdvec_child_1 = get_child_endvtx_pos_1 - get_SV_pos
-
-# define observables
-IP_wrt_SV_KS0 = F.IP.bind(get_SV_pos , get_child_1)
-IPCHI2_wrt_SV_KS0 = F.IPCHI2.bind(get_SV , get_child_1)
-# only if child is composite (i.e. has vertex)
-FD_wrt_SV_KS0 = F.MAGNITUDE @ get_fdvec_child_1
-FDCHI2_wrt_SV_KS0 = F.VTX_FDCHI2.bind(get_SV, get_child_1)
-# Note: Apply the functors to the head of the node of decay tree e.g. B
-# Functor collection for SV related info
-topo_sv_var = FunctorCollection(
-    {
-        "ORIVXIP_CHILD1": IP_wrt_SV_KS0,
-        "ORIVXIPCHI2_CHILD1": IPCHI2_wrt_SV_KS0,
-        "ORIVXFD_CHILD1": FD_wrt_SV_KS0,
-        "ORIVXFDCHI2_CHILD1": FDCHI2_wrt_SV_KS0,
-    }
-)
-
-"""
- D0->KSππ LL, DD x LowBias x Dstar
- D0->KSK-Ï€+ LL, DD x LowBias x Dstar
- D0->KSK+Ï€- LL, DD x LowBias x Dstar
- D0->KSKK LL, DD x LowBias x Dstar
- nb: https://gitlab.cern.ch/lhcb/Moore/-/blob/master/Hlt/Hlt2Conf/python/Hlt2Conf/lines/charm/d0_to_kshh.py?ref_type=heads
-
- """
-
-# D0->KSππ
-def maketuple_DstpToD0Pip_D0ToKsPimPip_LL_LowBias(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsPimPip_LL_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_LL_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) pi- pi+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^pi- pi+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- ^pi+) pi+]CC",
-        "pis" :   "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D02KSPiPi_LL_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D02KSPiPi_LL_lowbias_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0") + topo_sv_var,
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsPimPip_DD_LowBias(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsPimPip_DD_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_DD_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) pi- pi+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^pi- pi+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- ^pi+) pi+]CC",
-        "pis" :   "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D02KSPiPi_DD_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D02KSPiPi_DD_lowbias_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0") + topo_sv_var,
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsPimPip_LL(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsPimPip_LL"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_LL"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) pi- pi+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^pi- pi+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- ^pi+) pi+]CC",
-        "pis" :   "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D02KSPiPi_LL_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D02KSPiPi_LL_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF= DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF= DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF= DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF= DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF= DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF= DTF_DstpToD0Pip_D0ToKsPimPip_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0") + topo_sv_var,
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsPimPip_DD(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsPimPip_DD"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_DD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) pi- pi+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^pi- pi+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- ^pi+) pi+]CC",
-        "pis" :   "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D02KSPiPi_DD_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D02KSPiPi_DD_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0") + topo_sv_var,
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsPimPip_LL_LowBias(options, pvs, rec_summary):
-    name = "D0ToKsPimPip_LL_LowBias"
-    turbo_line = "Hlt2Charm_D0ToKsPimPip_LL_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) pi- pi+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) pi- pi+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) pi- pi+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) pi- pi+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^pi- pi+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) pi- ^pi+]CC",
-    }
-
-    DTF_D0ToKsPimPip_LL_LB_MASS = DecayTreeFitter(
-        name='DTF_D02KSPiPi_LL_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsPimPip_DD_LowBias(options, pvs, rec_summary):
-    name = "D0ToKsPimPip_DD_LowBias"
-    turbo_line = "Hlt2Charm_D0ToKsPimPip_DD_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) pi- pi+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) pi- pi+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) pi- pi+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) pi- pi+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^pi- pi+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) pi- ^pi+]CC",
-    }
-
-    DTF_D0ToKsPimPip_DD_LB_MASS = DecayTreeFitter(
-        name='DTF_D02KSPiPi_DD_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsPimPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsPimPip_LL(options, pvs, rec_summary):
-    name = "D0ToKsPimPip_LL"
-    turbo_line = "Hlt2Charm_D0ToKsPimPip_LL"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) pi- pi+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) pi- pi+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) pi- pi+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) pi- pi+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^pi- pi+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) pi- ^pi+]CC",
-    }
-
-    DTF_D0ToKsPimPip_LL_MASS = DecayTreeFitter(
-        name='DTF_D02KSPiPi_LL_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsPimPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsPimPip_DD(options, pvs, rec_summary):
-    name = "D0ToKsPimPip_DD"
-    turbo_line = "Hlt2Charm_D0ToKsPimPip_DD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) pi- pi+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) pi- pi+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) pi- pi+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) pi- pi+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^pi- pi+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) pi- ^pi+]CC",
-    }
-
-    DTF_D0ToKsPimPip_DD_MASS = DecayTreeFitter(
-        name='DTF_D02KSPiPi_DD_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsPimPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsPimPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-# D0->KSK-Ï€+
-def maketuple_DstpToD0Pip_D0ToKsKmPip_LL_LowBias(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKmPip_LL_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_LL_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- pi+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- pi+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- pi+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^pi+) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKmPip_LL_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKmPip_LL_lowbias_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsKmPip_DD_LowBias(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKmPip_DD_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_DD_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- pi+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- pi+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- pi+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^pi+) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKmPip_DD_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKmPip_DD_lowbias_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsKmPip_LL(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKmPip_LL"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_LL"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- pi+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- pi+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- pi+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^pi+) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKmPip_LL_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKmPip_LL_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsKmPip_DD(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKmPip_DD"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_DD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- pi+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- pi+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- pi+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- pi+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^pi+) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- pi+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKmPip_DD_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKmPip_DD_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmPip_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKmPip_LL_LowBias(options, pvs, rec_summary):
-    name = "D0ToKsKmPip_LL_LowBias"
-    turbo_line = "Hlt2Charm_D0ToKsKmPip_LL_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- pi+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- pi+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- pi+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- pi+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- pi+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^pi+]CC",
-    }
-
-    DTF_D0ToKsKmPip_LL_LB_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKmPip_LL_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKmPip_DD_LowBias(options, pvs, rec_summary):
-    name = "D0ToKsKmPip_DD_LowBias"
-    turbo_line = "Hlt2Charm_D0ToKsKmPip_DD_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- pi+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- pi+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- pi+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- pi+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- pi+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^pi+]CC",
-    }
-
-    DTF_D0ToKsKmPip_DD_LB_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKmPip_DD_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKmPip_LL(options, pvs, rec_summary):
-    name = "D0ToKsKmPip_LL"
-    turbo_line = "Hlt2Charm_D0ToKsKmPip_LL"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- pi+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- pi+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- pi+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- pi+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- pi+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^pi+]CC",
-    }
-
-    DTF_D0ToKsKmPip_LL_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKmPip_LL_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKmPip_DD(options, pvs, rec_summary):
-    name = "D0ToKsKmPip_DD"
-    turbo_line = "Hlt2Charm_D0ToKsKmPip_DD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- pi+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- pi+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- pi+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- pi+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- pi+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^pi+]CC",
-    }
-
-    DTF_D0ToKsKmPip_DD_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKmPip_DD_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmPip_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-# D0->KSK+Ï€-
-def maketuple_DstpToD0Pip_D0ToKsKpPim_LL_LowBias(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKpPim_LL_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_LL_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K+ pi-) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K+ pi-) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ ^pi-) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K+ pi-) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKpPim_LL_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKpPim_LL_lowbias_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsKpPim_DD_LowBias(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKpPim_DD_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_DD_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K+ pi-) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K+ pi-) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ ^pi-) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K+ pi-) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKpPim_DD_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKpPim_DD_lowbias_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsKpPim_LL(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKpPim_LL"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_LL"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K+ pi-) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K+ pi-) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ ^pi-) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K+ pi-) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKpPim_LL_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKpPim_LL_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsKpPim_DD(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKpPim_DD"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_DD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K+ pi-) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K+ pi-) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K+ pi-) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ ^pi-) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K+ pi-) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K+ pi-) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKpPim_DD_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKpPim_DD_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKpPim_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKpPim_LL_LowBias(options, pvs, rec_summary):
-    name = "D0ToKsKpPim_LL_LowBias"
-    turbo_line = "Hlt2Charm_D0ToKsKpPim_LL_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K+ pi-]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K+ pi-]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K+ pi-]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K+ pi-]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) K+ ^pi-]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) ^K+ pi-]CC",
-    }
-
-    DTF_D0ToKsKpPim_LL_LB_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKpPim_LL_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKpPim_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKpPim_DD_LowBias(options, pvs, rec_summary):
-    name = "D0ToKsKpPim_DD_LowBias"
-    turbo_line = "Hlt2Charm_D0ToKsKpPim_DD_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K+ pi-]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K+ pi-]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K+ pi-]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K+ pi-]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) K+ ^pi-]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) ^K+ pi-]CC",
-    }
-
-    DTF_D0ToKsKpPim_DD_LB_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKpPim_DD_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKpPim_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKpPim_LL(options, pvs, rec_summary):
-    name = "D0ToKsKpPim_LL"
-    turbo_line = "Hlt2Charm_D0ToKsKpPim_LL"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K+ pi-]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K+ pi-]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K+ pi-]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K+ pi-]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) K+ ^pi-]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) ^K+ pi-]CC",
-    }
-
-    DTF_D0ToKsKpPim_LL_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKpPim_LL_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKpPim_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKpPim_DD(options, pvs, rec_summary):
-    name = "D0ToKsKpPim_DD"
-    turbo_line = "Hlt2Charm_D0ToKsKpPim_DD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K+ pi-]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K+ pi-]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K+ pi-]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K+ pi-]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) K+ ^pi-]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) ^K+ pi-]CC",
-    }
-
-    DTF_D0ToKsKpPim_DD_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKpPim_DD_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKpPim_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKpPim_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-# D0->KSK-K+
-def maketuple_DstpToD0Pip_D0ToKsKmKp_LL_LowBias(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKmKp_LL_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_LL_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- K+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- K+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- K+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- K+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^K+) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKmKp_LL_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKmKp_LL_lowbias_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsKmKp_DD_LowBias(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKmKp_DD_LowBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_DD_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- K+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- K+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- K+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- K+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^K+) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKmKp_DD_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKmKp_DD_lowbias_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsKmKp_LL(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKmKp_LL"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_LL"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- K+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- K+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- K+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- K+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^K+) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKmKp_LL_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKmKp_LL_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_LL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsKmKp_DD(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsKmKp_DD"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_DD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) K- K+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) K- K+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) K- K+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) K- K+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^K- K+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- ^K+) pi+]CC",
-        "pis" :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) K- K+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D0ToKsKmKp_DD_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D0ToKsKmKp_DD_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsKmKp_DD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKmKp_LL_LowBias(options, pvs, rec_summary):
-    name = "D0ToKsKmKp_LL_LowBias"
-    turbo_line = "Hlt2Charm_D0ToKsKmKp_LL_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- K+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- K+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- K+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- K+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- K+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^K+]CC",
-    }
-
-    DTF_D0ToKsKmKp_LL_LB_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKmKp_LL_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmKp_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKmKp_DD_LowBias(options, pvs, rec_summary):
-    name = "D0ToKsKmKp_DD_LowBias"
-    turbo_line = "Hlt2Charm_D0ToKsKmKp_DD_LowBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- K+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- K+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- K+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- K+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- K+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^K+]CC",
-    }
-
-    DTF_D0ToKsKmKp_DD_LB_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKmKp_DD_lowbias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmKp_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_DD_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_DstpToD0Pip_D0ToKsPimPip_LL_NoBias(options, pvs, rec_summary):
-    name = "DstpToD0Pip_D0ToKsPimPip_LL_NoBias"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_LL_NoBias"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-       "Dst" : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^([D0]CC -> (KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "KS0"  : "[D*(2010)+ -> ([D0]CC -> ^(KS0 -> pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> ^pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- ^pi+) pi- pi+) pi+]CC",
-        "hm"   : "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) ^pi- pi+) pi+]CC",
-        "hp"  :  "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- ^pi+) pi+]CC",
-        "pis" :   "[D*(2010)+ -> ([D0]CC -> (KS0 -> pi- pi+) pi- pi+) ^pi+]CC",
-    }
-
-    DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS = DecayTreeFitter(
-        name='DTF_DstpToD0Pip_D02KSPiPi_LL_nobias_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV = DecayTreeFitter(
-        'DTF_DstpToD0Pip_D02KSPiPi_LL_nobias_mass_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "Dst"   : composite_variables + make_DeltaM_variable(options),
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0") + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_DstpToD0Pip_D0ToKsPimPip_LL_LB_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="D0andKS0") + topo_sv_var,
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-        "pis"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKmKp_LL(options, pvs, rec_summary):
-    name = "D0ToKsKmKp_LL"
-    turbo_line = "Hlt2Charm_D0ToKsKmKp_LL"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- K+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- K+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- K+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- K+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- K+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^K+]CC",
-    }
-
-    DTF_D0ToKsKmKp_LL_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKmKp_LL_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmKp_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_LL_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D0ToKsKmKp_DD(options, pvs, rec_summary):
-    name = "D0ToKsKmKp_DD"
-    turbo_line = "Hlt2Charm_D0ToKsKmKp_DD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "D0"  : "[D0 -> (KS0 -> pi- pi+) K- K+]CC",
-        "KS0" : "[D0 -> ^(KS0 -> pi- pi+) K- K+]CC",
-        "KS0_pim"  : "[D0 -> (KS0 -> ^pi- pi+) K- K+]CC",
-        "KS0_pip"  : "[D0 -> (KS0 -> pi- ^pi+) K- K+]CC",
-        "hm"  : "[D0 -> (KS0 -> pi- pi+) ^K- K+]CC",
-        "hp"  : "[D0 -> (KS0 -> pi- pi+) K- ^K+]CC",
-    }
-
-    DTF_D0ToKsKmKp_DD_MASS = DecayTreeFitter(
-        name='DTF_D0ToKsKmKp_DD_mass',
-        input_particles=input_data,
-        mass_constraints=["D0","KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_D0ToKsKmKp_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0")
-
-    variables = {
-        "D0"    : composite_variables + make_composite_variables_3body(options, pvs, input_data) + make_composite_dtf_variables_3body(options, pvs, input_data, DTF=DTF_D0ToKsKmKp_DD_MASS, pv_constraint=False, mass_constraint=True, particle_name="D0andKS0"),
-        "KS0"   : composite_variables,
-        "KS0_pim"    : basic_variables,
-        "KS0_pip"    : basic_variables,
-        "hm"    : basic_variables,
-        "hp"    : basic_variables,
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-# ########################################
diff --git a/Charm_2024validation/options/d0_to_kshh_MC.py b/Charm_2024validation/options/d0_to_kshh_MC.py
deleted file mode 100644
index 9fa138f8ef..0000000000
--- a/Charm_2024validation/options/d0_to_kshh_MC.py
+++ /dev/null
@@ -1,44 +0,0 @@
-from .tupling import (
-    make_MC_composite_variables,
-    make_MC_basic_variables,
-    make_MC_event_variables,
-)
-
-from PyConf.reading import get_mc_particles, get_mc_header
-from FunTuple import FunTuple_MCParticles as FuntupleMC
-
-def maketuple_MC_DstpToD0Pip_D0ToKsPimPip(options, pvs, rec_summary):
-    name = "MC_DstpToD0Pip_D0ToKsPimPip"
-    line = "/Event/MC/Particles"
-    
-    input_data = get_mc_particles(f"{line}")
-
-    branches = {
-       "Dst" : "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi- pi+) pi- pi+) pi+]CC",
-        "D0"  : "[D*(2010)+ ==> ^([D0]CC ==> (KS0 ==> pi- pi+) pi- pi+) pi+]CC",
-        "KS0"  : "[D*(2010)+ ==> ([D0]CC ==> ^(KS0 ==> pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pim"   : "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> ^pi- pi+) pi- pi+) pi+]CC",
-        "KS0_pip"  :  "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi- ^pi+) pi- pi+) pi+]CC",
-        "hm"   : "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi- pi+) ^pi- pi+) pi+]CC",
-        "hp"  :  "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi- pi+) pi- ^pi+) pi+]CC",
-        "pis" :  "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi- pi+) pi- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_MC_composite_variables(),
-        "D0"    : make_MC_composite_variables(),
-        "KS0"    : make_MC_composite_variables(),
-        "KS0_pim"     : make_MC_basic_variables(),
-        "KS0_pip"     : make_MC_basic_variables(),
-        "hm"    : make_MC_basic_variables(),
-        "hp"    : make_MC_basic_variables(),
-        "pis"   : make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                          tuple_name="MCDecayTree",
-                          fields=branches, variables = variables,  
-                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])), 
-                          inputs=input_data)
-
-    return [mytuple]
diff --git a/Charm_2024validation/options/d0_to_ksks.py b/Charm_2024validation/options/d0_to_ksks.py
deleted file mode 100644
index d47253aa14..0000000000
--- a/Charm_2024validation/options/d0_to_ksks.py
+++ /dev/null
@@ -1,1049 +0,0 @@
-import Functors as F
-from Functors.math import log
-from DaVinci import Options, make_config
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunctorCollection
-from PyConf.reading import get_particles, get_pvs
-import FunTuple.functorcollections as FC
-from FunTuple import FunTuple_Particles as Funtuple
-from DecayTreeFitter import DecayTreeFitter
-
-from .tupling import (
-    make_basic_variables,
-    make_composite_variables,
-    make_hlt2_event_variables,
-    make_basic_dtf_variables,
-    make_composite_dtf_variables,
-    Hlt1_lines
-)
-
-# define helper functors
-get_SV =  F.ENDVERTEX @ F.FORWARDARG0
-get_SV_pos = F.TOLINALG @ F.POSITION @ get_SV
-# only if composite (i.e. has vertex)

-get_child_1 = F.CHILD(1, F.FORWARDARG0) # change here the index of the child.
-get_child_endvtx_pos_1 = F.ENDVERTEX_POS  @ get_child_1
-get_fdvec_child_1 = get_child_endvtx_pos_1 - get_SV_pos
-get_child_2 = F.CHILD(2, F.FORWARDARG0) # change here the index of the child.
-get_child_endvtx_pos_2 = F.ENDVERTEX_POS  @ get_child_2
-get_fdvec_child_2 = get_child_endvtx_pos_2 - get_SV_pos
-
-# define observables
-IP_wrt_SV_KS1 = F.IP.bind(get_SV_pos , get_child_1)
-IP_wrt_SV_KS2 = F.IP.bind(get_SV_pos , get_child_2)
-IPCHI2_wrt_SV_KS1 = F.IPCHI2.bind(get_SV , get_child_1)
-IPCHI2_wrt_SV_KS2 = F.IPCHI2.bind(get_SV , get_child_2)
-# only if child is composite (i.e. has vertex)
-FD_wrt_SV_KS1 = F.MAGNITUDE @ get_fdvec_child_1
-FD_wrt_SV_KS2 = F.MAGNITUDE @ get_fdvec_child_2
-FDCHI2_wrt_SV_KS1 = F.VTX_FDCHI2.bind(get_SV, get_child_1)
-FDCHI2_wrt_SV_KS2 = F.VTX_FDCHI2.bind(get_SV, get_child_2)
-# Note: Apply the functors to the head of the node of decay tree e.g. B
-# Functor collection for SV related info
-topo_sv_var = FunctorCollection(
-    {
-        "ORIVXIP_CHILD1": IP_wrt_SV_KS1,
-        "ORIVXIP_CHILD2": IP_wrt_SV_KS2,
-        "ORIVXIPCHI2_CHILD1": IPCHI2_wrt_SV_KS1,
-        "ORIVXIPCHI2_CHILD2": IPCHI2_wrt_SV_KS2,
-        "ORIVXFD_CHILD1": FD_wrt_SV_KS1,
-        "ORIVXFD_CHILD2": FD_wrt_SV_KS2,
-        "ORIVXFDCHI2_CHILD1": FDCHI2_wrt_SV_KS1,
-        "ORIVXFDCHI2_CHILD2": FDCHI2_wrt_SV_KS2,
-    }
-)
-
-############################# LLLL #############################
-def maketuple_Dst2D0pi_D02KSKS_LLLL(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLL"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_LLLL = DecayTreeFitter(
-    #     name='DTF_LLLL',
-    #     input_particles=input_data)
-    #
-    # DTF_LLLL_PV = DecayTreeFitter(
-    #     name='DTF_LLLL_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_LLLL_MASS = DecayTreeFitter(
-        name='DTF_LLLL_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_LLLL_MASS_PV = DecayTreeFitter(
-        'DTF_LLLL_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_LLLL",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# LLLL Tight #############################
-def maketuple_Dst2D0pi_D02KSKS_LLLL_Tight(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLL_Tight"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_LLLL_Tight = DecayTreeFitter(
-    #     name='DTF_LLLL_Tight',
-    #     input_particles=input_data)
-    #
-    # DTF_LLLL_Tight_PV = DecayTreeFitter(
-    #     name='DTF_LLLL_Tight_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_LLLL_Tight_MASS = DecayTreeFitter(
-        name='DTF_LLLL_Tight_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_LLLL_Tight_MASS_PV = DecayTreeFitter(
-        'DTF_LLLL_Tight_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLL_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLL_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_LLLL_Tight",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# LLDD #############################
-def maketuple_Dst2D0pi_D02KSKS_LLDD(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLDD"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_LLDD = DecayTreeFitter(
-    #     name='DTF_LLDD',
-    #     input_particles=input_data)
-    #
-    # DTF_LLDD_PV = DecayTreeFitter(
-    #     name='DTF_LLDD_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_LLDD_MASS = DecayTreeFitter(
-        name='DTF_LLDD_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_LLDD_MASS_PV = DecayTreeFitter(
-        'DTF_LLDD_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLDD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLDD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLDD, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLDD_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_LLDD",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# LLDD Tight #############################
-def maketuple_Dst2D0pi_D02KSKS_LLDD_Tight(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLDD_Tight"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_LLDD_Tight = DecayTreeFitter(
-    #     name='DTF_LLDD_Tight',
-    #     input_particles=input_data)
-    #
-    # DTF_LLDD_Tight_PV = DecayTreeFitter(
-    #     name='DTF_LLDD_Tight_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_LLDD_Tight_MASS = DecayTreeFitter(
-        name='DTF_LLDD_Tight_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_LLDD_Tight_MASS_PV = DecayTreeFitter(
-        'DTF_LLDD_Tight_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False, DTF=DTF_LLDD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False, DTF=DTF_LLDD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLDD_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLDD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLDD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_LLDD_Tight",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# DDDD #############################
-def maketuple_Dst2D0pi_D02KSKS_DDDD(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDDD"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_DDDD = DecayTreeFitter(
-    #     name='DTF_DDDD',
-    #     input_particles=input_data)
-    #
-    # DTF_DDDD_PV = DecayTreeFitter(
-    #     name='DTF_DDDD_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_DDDD_MASS = DecayTreeFitter(
-        name='DTF_DDDD_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_DDDD_MASS_PV = DecayTreeFitter(
-        'DTF_DDDD_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_DDDD",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# DDDD Tight #############################
-def maketuple_Dst2D0pi_D02KSKS_DDDD_Tight(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDDD_Tight"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_DDDD_Tight = DecayTreeFitter(
-    #     name='DTF_DDDD_Tight',
-    #     input_particles=input_data)
-    #
-    # DTF_DDDD_Tight_PV = DecayTreeFitter(
-    #     name='DTF_DDDD_Tight_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_DDDD_Tight_MASS = DecayTreeFitter(
-        name='DTF_DDDD_Tight_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_DDDD_Tight_MASS_PV = DecayTreeFitter(
-        'DTF_DDDD_Tight_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDDD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDDD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_DDDD_Tight",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# ULLL #############################
-def maketuple_Dst2D0pi_D02KSKS_ULLL(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULLL"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_ULLL = DecayTreeFitter(
-    #     name='DTF_ULLL',
-    #     input_particles=input_data)
-    #
-    # DTF_ULLL_PV = DecayTreeFitter(
-    #     name='DTF_ULLL_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_ULLL_MASS = DecayTreeFitter(
-        name='DTF_ULLL_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_ULLL_MASS_PV = DecayTreeFitter(
-        'DTF_ULLL_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_ULLL",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# ULLL Tight #############################
-def maketuple_Dst2D0pi_D02KSKS_ULLL_Tight(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULLL_Tight"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_ULLL_Tight = DecayTreeFitter(
-    #     name='DTF_ULLL_Tight',
-    #     input_particles=input_data)
-    #
-    # DTF_ULLL_Tight_PV = DecayTreeFitter(
-    #     name='DTF_ULLL_Tight_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_ULLL_Tight_MASS = DecayTreeFitter(
-        name='DTF_ULLL_Tight_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_ULLL_Tight_MASS_PV = DecayTreeFitter(
-        'DTF_ULLL_Tight_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULLL_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULLL_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_ULLL_Tight",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# ULDD #############################
-def maketuple_Dst2D0pi_D02KSKS_ULDD(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULDD"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_ULDD = DecayTreeFitter(
-    #     name='DTF_ULDD',
-    #     input_particles=input_data)
-    #
-    # DTF_ULDD_PV = DecayTreeFitter(
-    #     name='DTF_ULDD_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_ULDD_MASS = DecayTreeFitter(
-        name='DTF_ULDD_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_ULDD_MASS_PV = DecayTreeFitter(
-        'DTF_ULDD_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_ULDD",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# ULDD Tight #############################
-def maketuple_Dst2D0pi_D02KSKS_ULDD_Tight(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULDD_Tight"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_ULDD_Tight = DecayTreeFitter(
-    #     name='DTF_ULDD_Tight',
-    #     input_particles=input_data)
-    #
-    # DTF_ULDD_Tight_PV = DecayTreeFitter(
-    #     name='DTF_ULDD_Tight_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_ULDD_Tight_MASS = DecayTreeFitter(
-        name='DTF_ULDD_Tight_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_ULDD_Tight_MASS_PV = DecayTreeFitter(
-        'DTF_ULDD_Tight_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_ULDD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_ULDD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_ULDD_Tight",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# LLLD #############################
-def maketuple_Dst2D0pi_D02KSKS_LLLD(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLD"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_LLLD = DecayTreeFitter(
-    #     name='DTF_LLLD',
-    #     input_particles=input_data)
-    #
-    # DTF_LLLD_PV = DecayTreeFitter(
-    #     name='DTF_LLLD_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_LLLD_MASS = DecayTreeFitter(
-        name='DTF_LLLD_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_LLLD_MASS_PV = DecayTreeFitter(
-        'DTF_LLLD_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_LLLD",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# LLLD Tight #############################
-def maketuple_Dst2D0pi_D02KSKS_LLLD_Tight(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLD_Tight"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_LLLD_Tight = DecayTreeFitter(
-    #     name='DTF_LLLD_Tight',
-    #     input_particles=input_data)
-    #
-    # DTF_LLLD_Tight_PV = DecayTreeFitter(
-    #     name='DTF_LLLD_Tight_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_LLLD_Tight_MASS = DecayTreeFitter(
-        name='DTF_LLLD_Tight_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_LLLD_Tight_MASS_PV = DecayTreeFitter(
-        'DTF_LLLD_Tight_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_LLLD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_LLLD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_LLLD_Tight",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# DDLD #############################
-def maketuple_Dst2D0pi_D02KSKS_DDLD(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDLD"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_DDLD = DecayTreeFitter(
-    #     name='DTF_DDLD',
-    #     input_particles=input_data)
-    #
-    # DTF_DDLD_PV = DecayTreeFitter(
-    #     name='DTF_DDLD_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_DDLD_MASS = DecayTreeFitter(
-        name='DTF_DDLD_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_DDLD_MASS_PV = DecayTreeFitter(
-        'DTF_DDLD_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_DDLD",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
-
-############################# DDLD Tight #############################
-def maketuple_Dst2D0pi_D02KSKS_DDLD_Tight(options, pvs, rec_summary):
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDLD_Tight"
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-
-    fields = {
-        "Dst": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "D0": "[D*(2010)+]CC -> ^(D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS1": "[D*(2010)+]CC -> (D0 -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "KS2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip1": "[D*(2010)+]CC -> (D0 -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pim1": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-) ) [pi+]CC",
-        "pip2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-) ) [pi+]CC",
-        "pim2": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-) ) [pi+]CC",
-        "pi_soft": "[D*(2010)+]CC -> (D0 -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-) ) ^[pi+]CC",
-    }
-
-    # DTF_DDLD_Tight = DecayTreeFitter(
-    #     name='DTF_DDLD_Tight',
-    #     input_particles=input_data)
-    #
-    # DTF_DDLD_Tight_PV = DecayTreeFitter(
-    #     name='DTF_DDLD_Tight_PV',
-    #     input_particles=input_data,
-    #     input_pvs=pvs)
-
-    DTF_DDLD_Tight_MASS = DecayTreeFitter(
-        name='DTF_DDLD_Tight_mass',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTF_DDLD_Tight_MASS_PV = DecayTreeFitter(
-        'DTF_DDLD_Tight_MASS_PV',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    basic_variables = make_basic_variables(options, pvs, input_data, islong=False) +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_basic_dtf_variables(options, pvs, input_data, islong=False,  DTF=DTF_DDLD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    composite_variables = make_composite_variables(options, pvs, input_data) +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_Tight_MASS, pv_constraint=False, mass_constraint=True, particle_name="KS0") +\
-        make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_Tight_MASS_PV, pv_constraint=True, mass_constraint=True, particle_name="KS0")
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_Tight, pv_constraint=False, mass_constraint=False) +\
-        # make_composite_dtf_variables(options, pvs, input_data, DTF=DTF_DDLD_Tight_PV, pv_constraint=True, mass_constraint=False) +\
-
-    variables = {"pip1": basic_variables,
-                 "pim1": basic_variables,
-                 "pip2": basic_variables,
-                 "pim2": basic_variables,
-                 "KS1": composite_variables,
-                 "KS2": composite_variables,
-                 "D0": composite_variables + topo_sv_var,
-                 "Dst": composite_variables,
-                 "pi_soft": basic_variables,
-    }
-
-    my_filter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    mytuple = Funtuple(
-        "DstToD0PiToKS0KS0_DDLD_Tight",
-        "Tuple",
-        fields=fields,
-        variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data, store_multiple_cand_info=True)
-
-    return [my_filter, mytuple]
diff --git a/Charm_2024validation/options/d0_to_ksks_MC.py b/Charm_2024validation/options/d0_to_ksks_MC.py
deleted file mode 100644
index 06c1ac6139..0000000000
--- a/Charm_2024validation/options/d0_to_ksks_MC.py
+++ /dev/null
@@ -1,46 +0,0 @@
-from .tupling import (
-    make_MC_composite_variables,
-    make_MC_basic_variables,
-    make_MC_event_variables,
-)
-
-from PyConf.reading import get_mc_particles, get_mc_header
-from FunTuple import FunTuple_MCParticles as FuntupleMC
-
-############################# LLLL #############################
-def maketuple_MC_Dst2D0pi_D02KSKS_LLLL(options, pvs, rec_summary):
-    name = "MC_DstpToD0Pip_D0ToKsKs_LLLL"
-    line = "/Event/MC/Particles"
-
-    input_data = get_mc_particles(f"{line}")
-
-    fields = {
-        "Dst": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi+ pi-) (KS0 ==> pi+ pi-) ) pi+]CC",
-        "D0": "[D*(2010)+ ==> ^([D0]CC ==> (KS0 ==> pi+ pi-) (KS0 ==> pi+ pi-) ) pi+]CC",
-        "KS1": "[D*(2010)+ ==> ([D0]CC ==> ^(KS0 ==> pi+ pi-) (KS0 ==> pi+ pi-) ) pi+]CC",
-        "KS2": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi+ pi-) ^(KS0 ==> pi+ pi-) ) pi+]CC",
-        "pip1": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> ^pi+ pi-) (KS0 ==> pi+ pi-) ) pi+]CC",
-        "pim1": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi+ ^pi-) (KS0 ==> pi+ pi-) ) pi+]CC",
-        "pip2": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi+ pi-) (KS0 ==> ^pi+ pi-) ) pi+]CC",
-        "pim2": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi+ pi-) (KS0 ==> pi+ ^pi-) ) pi+]CC",
-        "pi_soft": "[D*(2010)+ ==> ([D0]CC ==> (KS0 ==> pi+ pi-) (KS0 ==> pi+ pi-) ) ^pi+]CC",
-    }
-
-    variables = {"pip1":  make_MC_basic_variables(),
-                 "pim1":  make_MC_basic_variables(),
-                 "pip2":  make_MC_basic_variables(),
-                 "pim2":  make_MC_basic_variables(),
-                 "KS1": make_MC_composite_variables(),
-                 "KS2": make_MC_composite_variables(),
-                 "D0": make_MC_composite_variables(),
-                 "Dst": make_MC_composite_variables(),
-                 "pi_soft":  make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                          tuple_name="MCDecayTree",
-                          fields=fields, variables = variables,
-                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
-                          inputs=input_data)
-
-    return [mytuple]
diff --git a/Charm_2024validation/options/d_to_hhh.py b/Charm_2024validation/options/d_to_hhh.py
deleted file mode 100644
index d10fa039f6..0000000000
--- a/Charm_2024validation/options/d_to_hhh.py
+++ /dev/null
@@ -1,503 +0,0 @@
-from .tupling import (
-    make_composite_variables_3body,
-    make_b_composite_variables,
-    make_composite_variables,
-    make_basic_variables,
-    make_hlt2_event_variables,
-    make_composite_dtf_variables_3body,
-    make_basic_dtf_variables,
-)
-
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunTuple_Particles as Funtuple
-
-
-def make_dtf_variables(options, pvs, input_data, ptype):
-
-    if ptype not in ["basic", "composite"]:
-        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
-
-    from DecayTreeFitter import DecayTreeFitter
-    
-    DTF = DecayTreeFitter(
-        name=f'DTF_{{hash}}',
-        input_particles=input_data)
-
-    DTFvtx = DecayTreeFitter(
-        name=f'DTFvtx_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    DTFmassDp = DecayTreeFitter(
-        name=f'DTFmassDp_{{hash}}',
-        input_particles=input_data,
-        mass_constraints=["D+"])
-
-    DTFvtxmassDp = DecayTreeFitter(
-        name=f'DTFvtxmassDp_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D+"])
-
-    DTFmassDsp = DecayTreeFitter(
-        name=f'DTFmassDsp_{{hash}}',
-        input_particles=input_data,
-        substitutions = ['D+{{D_s+}}'],
-        mass_constraints=["D_s+"])
-
-    DTFvtxmassDsp = DecayTreeFitter(
-        name=f'DTFvtxmassDsp_{{hash}}',
-        input_particles=input_data,
-        substitutions = ['D+{{D_s+}}',"KS0{{KS0}}"],#trick
-        mass_constraints=["D_s+"],
-        input_pvs=pvs,
-    )
-
-    if ptype == "basic":
-        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassDp,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="Dp")
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassDp,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="Dp")
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassDsp,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="Dsp")
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassDsp,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="Dsp")
-        return dtf_vars
-
-    if ptype == "composite":
-        dtf_vars = make_composite_dtf_variables_3body(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
-                                             DTF=DTFmassDp,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="Dp")
-        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
-                                             DTF=DTFvtxmassDp,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="Dp")
-        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
-                                             DTF=DTFmassDsp,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="Dsp")
-        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
-                                             DTF=DTFvtxmassDsp,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="Dsp")
-        return dtf_vars
-
-
-def maketuple_D2Kpipi(options, pvs, rec_summary, _NoCuts=False):
-    name = "D2Kpipi"
-    turbo_line = "Hlt2Charm_DpDspToKmPipPip"
-    if _NoCuts == True:
-        turbo_line += "_NoCuts"
-        name += "_NoCuts"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> K- pi+ pi+]CC",
-        "Km"   : "[D+ -> ^K- pi+ pi+]CC",
-        "pip1"  : "[D+ -> K- ^pi+ pi+]CC",
-        "pip2" : "[D+ -> K- pi+ ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2pipipi(options, pvs, rec_summary, _NoCuts=False):
-    name = "D2pipipi"
-    turbo_line = "Hlt2Charm_DpDspToPimPipPip"
-    if _NoCuts == True:
-        turbo_line += "_NoCuts"
-        name += "_NoCuts"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> pi- pi+ pi+]CC",
-        "pim"   : "[D+ -> ^pi- pi+ pi+]CC",
-        "pip1"  : "[D+ -> pi- ^pi+ pi+]CC",
-        "pip2" : "[D+ -> pi- pi+ ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Ds2KKpi(options, pvs, rec_summary, _NoCuts=False):
-    name = "Ds2KKpi"
-    turbo_line = "Hlt2Charm_DpDspToKmKpPip"
-    if _NoCuts == True:
-        turbo_line += "_NoCuts"
-        name += "_NoCuts"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> K- K+ pi+]CC",
-        "Km"   : "[D+ -> ^K- K+ pi+]CC",
-        "Kp"  : "[D+ -> K- ^K+ pi+]CC",
-        "pip" : "[D+ -> K- K+ ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-    
-    return [myfilter, mytuple]
-
-def maketuple_D2Kpipi_Kpi(options, pvs, rec_summary):
-    name = "D2Kpipi_Kpi"
-    turbo_line = "Hlt2Charm_DpDspToKmPipPip"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (KS0 -> K- pi+) pi+]CC",
-        "Kst" : "[D+ -> ^(KS0 -> K- pi+) pi+]CC",
-        "Km"   : "[D+ -> (KS0 -> ^K- pi+) pi+]CC",
-        "pip"  : "[D+ -> (KS0 -> K- ^pi+) pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data),
-        "Kst"   : make_composite_variables(options, pvs, input_data),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, use_loki_decay_finder=True)
-
-    return [myfilter, mytuple]
-
-
-
-
-    '''
-    from PyConf.Algorithms import ThOrParticleSelection
-    import Functors as F
-    FILTER_TREE = lambda id: F.FILTER(F.IS_ABS_ID(id)) @ F.GET_ALL_DESCENDANTS()
-    Km_data = ThOrParticleSelection(
-    InputParticles=input_data, Functor=FILTER_TREE("[K-]CC")
-).OutputSelection
-    pip_data = ThOrParticleSelection(
-        InputParticles=input_data, Functor=FILTER_TREE("[pi+]CC")
-).OutputSelection
-    
-    
-    from PyConf.Algorithms import ChargedBasicsProducer, UniqueIDGeneratorAlg
-    from PyConf.Algorithms import ThOrCombiner__2ChargedBasics, ThOrCombiner__2Particle
-    # make unique_id_generator
-    unique_id_gen = UniqueIDGeneratorAlg()
-    '''
-    '''
-    # produce charged basic particles
-    produce_kaons = ChargedBasicsProducer(
-        InputUniqueIDGenerator=unique_id_gen, ParticleID="kaon")
-    produce_pions = ChargedBasicsProducer(
-        InputUniqueIDGenerator=unique_id_gen, ParticleID="pion")
-    produce_jpsi = ThOrCombiner__2ChargedBasics(
-    '''
-    '''
-    produce_jpsi = ThOrCombiner__2Particle(
-        InputUniqueIDGenerator=unique_id_gen,
-        DecayDescriptor="[J/psi(1S) -> K- pi+]cc",
-        #Input1=produce_kaons.Particles,
-        #Input2=produce_pions.Particles,
-        Input1=Km_data,
-        Input2=pip_data,
-    )
-    input_data = produce_jpsi.Output
-
-    branches = {
-        "Jpsi" : "[J/psi(1S) -> K- pi+]CC",
-    }
-
-    from FunTuple import FunctorCollection
-    import Functors as F
-    variables = {
-        #"Dp"   : make_composite_variables(options, pvs, input_data, False, False),
-        #"Jpsi"   : make_composite_variables(options, pvs, input_data, False, False),
-        "Jpsi"   : FunctorCollection({
-            "PX": F.PX,
-            "PY": F.PY,
-            "PZ": F.PZ,
-            "BPVDIRA": F.BPVDIRA(pvs),
-            "VCHI2DOF": F.CHI2DOF, #CHI2VXNDOF
-            "BPVIPCHI2": F.BPVIPCHI2(pvs),
-            "BPVIP": F.BPVIP(pvs),
-        }),
-        
-    }
-
-    from FunTuple import FunTuple_Composites as Funtuple
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables, inputs=input_data, store_multiple_cand_info=True)
-    ## add event_variables
-
-    
-    return [myfilter, mytuple]
-    '''
-    '''
-    from PyConf.control_flow import CompositeNode, NodeLogic
-    from PyConf.Algorithms import PrintDecayTree, PrintHeader
-    from RecoConf.reconstruction_objects import upfront_reconstruction
-    from DaVinci.common_particles import make_std_loose_jpsi2mum
-    jpsis = make_std_loose_jpsi2mumu()
-    pdt = PrintDecayTree(name="PrintJpsis", Input=jpsis)
-    algs = upfront_reconstruction() + [jpsis, pdt]
-
-    node = CompositeNode(
-    "PrintJpsiNode", children=algs, combine_logic=NodeLogic.NONLAZY_AND
-)
-    return [node]
-    
-    '''
-
-
-def maketuple_D2pipiK(options, pvs, rec_summary, _NoCuts=False):
-    name = "D2pipiK"
-    turbo_line = "Hlt2Charm_DpDspToKpPimPip"
-    if _NoCuts == True:
-        turbo_line += "_NoCuts"
-        name += "_NoCuts"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> pi- pi+ K+]CC",
-        "p1"   : "[D+ -> ^pi- pi+ K+]CC",
-        "p2"  : "[D+ -> pi- ^pi+ K+]CC",
-        "p3" : "[D+ -> pi- pi+ ^K+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
-        "p1"     : make_basic_variables(options, pvs, input_data),
-        "p2"    : make_basic_variables(options, pvs, input_data),
-        "p3"   : make_basic_variables(options, pvs, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2KKK(options, pvs, rec_summary, _NoCuts=False):
-    name = "D2KKK"
-    turbo_line = "Hlt2Charm_DpDspToKmKpKp"
-    if _NoCuts == True:
-        turbo_line += "_NoCuts"
-        name += "_NoCuts"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> K- K+ K+]CC",
-        "p1"   : "[D+ -> ^K- K+ K+]CC",
-        "p2"  : "[D+ -> K- ^K+ K+]CC",
-        "p3" : "[D+ -> K- K+ ^K+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
-        "p1"     : make_basic_variables(options, pvs, input_data),
-        "p2"    : make_basic_variables(options, pvs, input_data),
-        "p3"   : make_basic_variables(options, pvs, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2piKK(options, pvs, rec_summary, _NoCuts=False):
-    name = "D2piKK"
-    turbo_line = "Hlt2Charm_DpDspToKpKpPim"
-    if _NoCuts == True:
-        turbo_line += "_NoCuts"
-        name += "_NoCuts"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> pi- K+ K+]CC",
-        "p1"   : "[D+ -> ^pi- K+ K+]CC",
-        "p2"  : "[D+ -> pi- ^K+ K+]CC",
-        "p3" : "[D+ -> pi- K+ ^K+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
-        "p1"     : make_basic_variables(options, pvs, input_data),
-        "p2"    : make_basic_variables(options, pvs, input_data),
-        "p3"   : make_basic_variables(options, pvs, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-
-def maketuple_B02Dpi_D2KKpi(options, pvs, rec_summary):
-    name = "B02Dpi_D2KKpi"
-    turbo_line = "Hlt2Charm_B0ToDmPip_DmToKmKpPim"
-    
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-    
-    branches = {
-        "B0" : "[[B0]CC -> (D- -> K- K+ pi-) pi+]CC",
-        "pip" : "[[B0]CC -> (D- -> K- K+ pi-) ^pi+]CC",
-        "Dm" : "[[B0]CC -> ^(D- -> K- K+ pi-) pi+]CC",
-        "p1" : "[[B0]CC -> (D- -> ^K- K+ pi-) pi+]CC",
-        "p2" : "[[B0]CC -> (D- -> K- ^K+ pi-) pi+]CC",
-        "p3" : "[[B0]CC -> (D- -> K- K+ ^pi-) pi+]CC",
-    }
-    
-    variables = {
-        "B0" : make_b_composite_variables(options, pvs, input_data),
-        "pip" : make_basic_variables(options, pvs,input_data),
-        "Dm"   : make_composite_variables_3body(options, pvs, input_data),
-        "p1"     : make_basic_variables(options, pvs, input_data),
-        "p2"    : make_basic_variables(options, pvs, input_data),
-        "p3"   : make_basic_variables(options, pvs, input_data),        
-    }
-    
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-
-def maketuple_B02Dpi_D2pipipi(options, pvs, rec_summary, _NoCuts=False):    
-    name = "B02Dpi_D2pipipi"
-    turbo_line = "Hlt2Charm_B0ToDmPip_DmToPimPimPip"
-    
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-    
-    branches = {
-        "B0" : "[[B0]CC -> (D- -> pi- pi- pi+) pi+]CC",
-        "pip" : "[[B0]CC -> (D- -> pi- pi- pi+) ^pi+]CC",
-        "Dm" : "[[B0]CC -> ^(D- -> pi- pi- pi+) pi+]CC",
-        "p1" : "[[B0]CC -> (D- -> ^pi- pi- pi+) pi+]CC",
-        "p2" : "[[B0]CC -> (D- -> pi- ^pi- pi+) pi+]CC",
-        "p3" : "[[B0]CC -> (D- -> pi- pi- ^pi+) pi+]CC",
-    }
-    
-    variables = {
-        "B0" : make_b_composite_variables(options, pvs, input_data),
-        "pip" : make_basic_variables(options, pvs,input_data),
-        "Dm"   : make_composite_variables_3body(options, pvs, input_data),
-        "p1"     : make_basic_variables(options, pvs, input_data),
-        "p2"    : make_basic_variables(options, pvs, input_data),
-        "p3"   : make_basic_variables(options, pvs, input_data),        
-    }
-    
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-    
-def maketuple_Bs02Dspi_Ds2KKpi(options, pvs, rec_summary, _NoCuts=False):    
-    name = "Bs02Dspi_Ds2KKpi"
-    turbo_line = "Hlt2Charm_Bs0ToDsmPip_DsmToKmKpPim"
-    
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-    
-    branches = {
-        "Bs0" : "[[B_s0]CC -> (D_s- -> K- K+ pi-) pi+]CC",
-        "pip" : "[[B_s0]CC -> (D_s- -> K- K+ pi-) ^pi+]CC",
-        "Dsm" : "[[B_s0]CC -> ^(D_s- -> K- K+ pi-) pi+]CC",
-        "p1" : "[[B_s0]CC -> (D_s- -> ^K- K+ pi-) pi+]CC",
-        "p2" : "[[B_s0]CC -> (D_s- -> K- ^K+ pi-) pi+]CC",
-        "p3" : "[[B_s0]CC -> (D_s- -> K- K+ ^pi-) pi+]CC",
-    }
-    
-    variables = {
-        "Bs0" : make_b_composite_variables(options, pvs, input_data),
-        "pip" : make_basic_variables(options, pvs,input_data),
-        "Dsm"   : make_composite_variables_3body(options, pvs, input_data),
-        "p1"     : make_basic_variables(options, pvs, input_data),
-        "p2"    : make_basic_variables(options, pvs, input_data),
-        "p3"   : make_basic_variables(options, pvs, input_data),        
-    }
-    
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-    
-def maketuple_Bs02Dspi_Ds2pipipi(options, pvs, rec_summary, _NoCuts=False):
-    name = "Bs02Dspi_Ds2pipipi"
-    turbo_line = "Hlt2Charm_Bs0ToDsmPip_DsmToPimPimPip"
-    
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-    
-    branches = {
-        "Bs0" : "[[B_s0]CC -> (D_s- -> pi- pi- pi+) pi+]CC",
-        "pip" : "[[B_s0]CC -> (D_s- -> pi- pi- pi+) ^pi+]CC",
-        "Dsm" : "[[B_s0]CC -> ^(D_s- -> pi- pi- pi+) pi+]CC",
-        "p1" : "[[B_s0]CC -> (D_s- -> ^pi- pi- pi+) pi+]CC",
-        "p2" : "[[B_s0]CC -> (D_s- -> pi- ^pi- pi+) pi+]CC",
-        "p3" : "[[B_s0]CC -> (D_s- -> pi- pi- ^pi+) pi+]CC",
-    }
-    
-    variables = {
-        "Bs0" : make_b_composite_variables(options, pvs, input_data),
-        "pip" : make_basic_variables(options, pvs,input_data),
-        "Dsm"   : make_composite_variables_3body(options, pvs, input_data),
-        "p1"     : make_basic_variables(options, pvs, input_data),
-        "p2"    : make_basic_variables(options, pvs, input_data),
-        "p3"   : make_basic_variables(options, pvs, input_data),        
-    }
-    
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
diff --git a/Charm_2024validation/options/d_to_hhh_MC.py b/Charm_2024validation/options/d_to_hhh_MC.py
deleted file mode 100644
index e666e5f3ce..0000000000
--- a/Charm_2024validation/options/d_to_hhh_MC.py
+++ /dev/null
@@ -1,92 +0,0 @@
-from .tupling import (
-    make_MC_composite_variables,
-    make_MC_basic_variables,
-    make_MC_event_variables,
-)
-
-from PyConf.reading import get_mc_particles, get_mc_header
-from FunTuple import FunTuple_MCParticles as FuntupleMC
-
-def maketuple_MC_D2Kpipi(options, pvs, rec_summary):
-    name = "MC_D2Kpipi"
-    line = "/Event/MC/Particles"
-
-    input_data = get_mc_particles(f"{line}")
-
-    branches = {
-        "Dp" : "[D+ ==> K- pi+ pi+]CC",
-        "Km"   : "[D+ ==> ^K- pi+ pi+]CC",
-        "pip1"  : "[D+ ==> K- ^pi+ pi+]CC",
-        "pip2" : "[D+ ==> K- pi+ ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_MC_composite_variables(),
-        "Km"     : make_MC_basic_variables(),
-        "pip1"    : make_MC_basic_variables(),
-        "pip2"   : make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                          tuple_name="MCDecayTree",
-                          fields=branches, variables = variables,
-                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
-                          inputs=input_data)
-
-    return [mytuple]
-
-def maketuple_MC_Ds2KKpi(options, pvs, rec_summary):
-    name = "MC_Ds2KKpi"
-    line = "/Event/MC/Particles"
-
-    input_data = get_mc_particles(f"{line}")
-
-    branches = {
-        "Dp" : "[D_s+ ==> K- K+ pi+]CC",
-        "Km"   : "[D_s+ ==> ^K- K+ pi+]CC",
-        "Kp"  : "[D_s+ ==> K- ^K+ pi+]CC",
-        "pip" : "[D_s+ ==> K- K+ ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_MC_composite_variables(),
-        "Km"     : make_MC_basic_variables(),
-        "Kp"    : make_MC_basic_variables(),
-        "pip"   : make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                          tuple_name="MCDecayTree",
-                          fields=branches, variables = variables,
-                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
-                          inputs=input_data)
-
-    return [mytuple]
-
-def maketuple_MC_Ds2KKK(options, pvs, rec_summary):
-    name = "MC_Ds2KKK"
-    line = "/Event/MC/Particles"
-
-    input_data = get_mc_particles(f"{line}")
-
-    branches = {
-        "Dp" : "[D_s+ ==> K- K+ K+]CC",
-        "Km"   : "[D_s+ ==> ^K- K+ K+]CC",
-        "Kp1"  : "[D_s+ ==> K- ^K+ K+]CC",
-        "Kp2" : "[D_s+ ==> K- K+ ^K+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_MC_composite_variables(),
-        "Km"     : make_MC_basic_variables(),
-        "Kp1"    : make_MC_basic_variables(),
-        "Kp2"   : make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                          tuple_name="MCDecayTree",
-                          fields=branches, variables = variables,
-                          event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
-                          inputs=input_data)
-
-    return [mytuple]
diff --git a/Charm_2024validation/options/d_to_ksh.py b/Charm_2024validation/options/d_to_ksh.py
deleted file mode 100644
index 4b9dd6c8d8..0000000000
--- a/Charm_2024validation/options/d_to_ksh.py
+++ /dev/null
@@ -1,313 +0,0 @@
-from .tupling import (
-    make_composite_variables,
-    make_basic_variables,
-    make_hlt2_event_variables,
-    make_composite_dtf_variables,
-    make_basic_dtf_variables,
-)
-
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunTuple_Particles as Funtuple
-
-
-def make_dtf_variables(options, pvs, input_data, ptype, islong=False):
-
-    if ptype not in ["basic", "composite"]:
-        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
-
-    from DecayTreeFitter import DecayTreeFitter
-    
-    DTF = DecayTreeFitter(
-        name=f'DTF_{{hash}}',
-        input_particles=input_data)
-
-    DTFvtx = DecayTreeFitter(
-        name=f'DTFvtx_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    DTFmassKS = DecayTreeFitter(
-        name=f'DTFmassKS_{{hash}}',
-        input_particles=input_data,
-        mass_constraints=["KS0"])
-
-    DTFvtxmassKS = DecayTreeFitter(
-        name=f'DTFvtxmassKS_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["KS0"])
-
-    DTFmassDpKS = DecayTreeFitter(
-        name=f'DTFmassDpKS_{{hash}}',
-        input_particles=input_data,
-        mass_constraints=["D+","KS0"])
-
-    DTFvtxmassDpKS = DecayTreeFitter(
-        name=f'DTFvtxmassDpKS_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D+","KS0"])
-
-    DTFmassDspKS = DecayTreeFitter(
-        name=f'DTFmassDspKS_{{hash}}',
-        input_particles=input_data,
-        substitutions = ['D+{{D_s+}}'],
-        mass_constraints=["D_s+","KS0"])
-
-    DTFvtxmassDspKS = DecayTreeFitter(
-        name=f'DTFvtxmassDspKS_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs,
-        substitutions = ['D+{{D_s+}}',"KS0{{KS0}}"],#trick
-        mass_constraints=["D_s+","KS0"],
-    )
-
-
-    if ptype == "basic":
-        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False,
-                                            islong=islong)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False,
-                                            islong=islong)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassKS,
-                                             pv_constraint=False,
-                                             mass_constraint=True, 
-                                             particle_name="KS",
-                                             islong=islong)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassKS,
-                                             pv_constraint=True,
-                                             mass_constraint=True, 
-                                             particle_name="KS",
-                                             islong=islong)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassDpKS,
-                                             pv_constraint=False,
-                                             mass_constraint=True, 
-                                             particle_name="DpKS",
-                                             islong=islong)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassDpKS,
-                                             pv_constraint=True,
-                                             mass_constraint=True, 
-                                             particle_name="DpKS",
-                                             islong=islong)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassDspKS,
-                                             pv_constraint=False,
-                                             mass_constraint=True, 
-                                             particle_name="DspKS",
-                                             islong=islong)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassDspKS,
-                                             pv_constraint=True,
-                                             mass_constraint=True, 
-                                             particle_name="DspKS",
-                                             islong=islong)
-        return dtf_vars
-
-    if ptype == "composite":
-        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassKS,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="KS")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassKS,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="KS")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassDpKS,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="DpKS")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassDpKS,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="DpKS")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassDspKS,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="DspKS")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassDspKS,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="DspKS")
-        return dtf_vars
-
-
-def maketuple_D2KSK_DD(options, pvs, rec_summary):
-    name = "D2KSK_DD"
-    turbo_line = "Hlt2Charm_DpDspToKsKp_DD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (KS0 -> pi- pi+) K+]CC",
-        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) K+]CC",
-        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) K+]CC",
-        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) K+]CC",
-        "hp" : "[D+ -> (KS0 -> pi- pi+) ^K+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic", islong=False),
-        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic", islong=False),
-        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2KSK_LD(options, pvs, rec_summary):
-    name = "D2KSK_LD"
-    turbo_line = "Hlt2Charm_DpDspToKsKp_LD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (KS0 -> pi- pi+) K+]CC",
-        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) K+]CC",
-        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) K+]CC",
-        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) K+]CC",
-        "hp" : "[D+ -> (KS0 -> pi- pi+) ^K+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic", islong=False),
-        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic", islong=False),
-        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-
-def maketuple_D2KSK_LL(options, pvs, rec_summary):
-    name = "D2KSK_LL"
-    turbo_line = "Hlt2Charm_DpDspToKsKp_LL"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (KS0 -> pi- pi+) K+]CC",
-        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) K+]CC",
-        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) K+]CC",
-        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) K+]CC",
-        "hp" : "[D+ -> (KS0 -> pi- pi+) ^K+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2KSpi_DD(options, pvs, rec_summary):
-    name = "D2KSpi_DD"
-    turbo_line = "Hlt2Charm_DpDspToKsPip_DD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (KS0 -> pi- pi+) pi+]CC",
-        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) pi+]CC",
-        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) pi+]CC",
-        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) pi+]CC",
-        "hp" : "[D+ -> (KS0 -> pi- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic", islong=False),
-        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic", islong=False),
-        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2KSpi_LD(options, pvs, rec_summary):
-    name = "D2KSpi_LD"
-    turbo_line = "Hlt2Charm_DpDspToKsPip_LD"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (KS0 -> pi- pi+) pi+]CC",
-        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) pi+]CC",
-        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) pi+]CC",
-        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) pi+]CC",
-        "hp" : "[D+ -> (KS0 -> pi- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic", islong=False),
-        "pip"    : make_basic_variables(options, pvs, input_data, islong=False)+make_dtf_variables(options, pvs, input_data, "basic", islong=False),
-        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2KSpi_LL(options, pvs, rec_summary):
-    name = "D2KSpi_LL"
-    turbo_line = "Hlt2Charm_DpDspToKsPip_LL"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (KS0 -> pi- pi+) pi+]CC",
-        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) pi+]CC",
-        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) pi+]CC",
-        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) pi+]CC",
-        "hp" : "[D+ -> (KS0 -> pi- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "KS0"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "composite"),
-        "pim"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
diff --git a/Charm_2024validation/options/d_to_ksh_MC.py b/Charm_2024validation/options/d_to_ksh_MC.py
deleted file mode 100644
index 38a2197998..0000000000
--- a/Charm_2024validation/options/d_to_ksh_MC.py
+++ /dev/null
@@ -1,68 +0,0 @@
-from .tupling import (
-    make_MC_composite_variables,
-    make_MC_basic_variables,
-    make_MC_event_variables,
-)
-
-from PyConf.reading import get_mc_particles, get_mc_header
-from FunTuple import FunTuple_MCParticles as FuntupleMC
-
-def maketuple_MC_D2KSK(options, pvs, rec_summary):
-    name = "MC_D2KSK"
-    line = "/Event/MC/Particles"
-
-    input_data = get_mc_particles(f"{line}")
-
-    branches = {
-        "Dp" : "[D_s+ ==> (KS0 ==> pi- pi+) K+]CC",
-        "KS0"  : "[D_s+ ==> ^(KS0 ==> pi- pi+) K+]CC",
-        "pim"   : "[D_s+ ==> (KS0 ==> ^pi- pi+) K+]CC",
-        "pip"  : "[D_s+ ==> (KS0 ==> pi- ^pi+) K+]CC",
-        "hp" : "[D_s+ ==> (KS0 ==> pi- pi+) ^K+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_MC_composite_variables(),
-        "KS0"    : make_MC_composite_variables(),
-        "pim"     : make_MC_basic_variables(),
-        "pip"    : make_MC_basic_variables(),
-        "hp"   : make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                        tuple_name="MCDecayTree",
-                        fields=branches, variables = variables,
-                        event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
-                        inputs=input_data)
-
-    return [mytuple]
-
-def maketuple_MC_D2KSpi(options, pvs, rec_summary):
-    name = "MC_D2KSpi"
-    line = "/Event/MC/Particles"
-
-    input_data = get_mc_particles(f"{line}")
-
-    branches = {
-        "Dp" : "[D+ ==> (KS0 ==> pi- pi+) pi+]CC",
-        "KS0"  : "[D+ ==> ^(KS0 ==> pi- pi+) pi+]CC",
-        "pim"   : "[D+ ==> (KS0 ==> ^pi- pi+) pi+]CC",
-        "pip"  : "[D+ ==> (KS0 ==> pi- ^pi+) pi+]CC",
-        "hp" : "[D+ ==> (KS0 ==> pi- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_MC_composite_variables(),
-        "KS0"    : make_MC_composite_variables(),
-        "pim"     : make_MC_basic_variables(),
-        "pip"    : make_MC_basic_variables(),
-        "hp"   : make_MC_basic_variables(),
-    }
-
-    mytuple  = FuntupleMC(name=name,
-                        tuple_name="MCDecayTree",
-                        fields=branches, variables = variables,
-                        event_variables=make_MC_event_variables(get_mc_header(extra_inputs=[input_data])),
-                        inputs=input_data)
-
-    return [mytuple]
diff --git a/Charm_2024validation/options/detection_asymmetry.py b/Charm_2024validation/options/detection_asymmetry.py
deleted file mode 100644
index 9769559e87..0000000000
--- a/Charm_2024validation/options/detection_asymmetry.py
+++ /dev/null
@@ -1,191 +0,0 @@
-from .tupling import (
-    make_composite_variables,
-    make_composite_variables_3body,
-    make_basic_variables,
-    make_hlt2_event_variables,
-)
-
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunTuple_Particles as Funtuple
-
-def maketuple_D2Kpipi_ADet(options, pvs, rec_summary):
-    name = "D2Kpipi_ADet"
-    turbo_line = "Hlt2Charm_DpToKmPipPip_ADet"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> K- pi+ pi+]CC",
-        "Km"   : "[D+ -> ^K- pi+ pi+]CC",
-        "pip1"  : "[D+ -> K- ^pi+ pi+]CC",
-        "pip2" : "[D+ -> K- pi+ ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
-        "Km"     : make_basic_variables(options, pvs, input_data),
-        "pip1"    : make_basic_variables(options, pvs, input_data),
-        "pip2"   : make_basic_variables(options, pvs, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2pipipi_ADet(options, pvs, rec_summary):
-    name = "D2pipipi_ADet"
-    turbo_line = "Hlt2Charm_DspToPimPipPip_ADet"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D_s+ -> pi- pi+ pi+]CC",
-        "pim"   : "[D_s+ -> ^pi- pi+ pi+]CC",
-        "pip1"  : "[D_s+ -> pi- ^pi+ pi+]CC",
-        "pip2" : "[D_s+ -> pi- pi+ ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
-        "pim"     : make_basic_variables(options, pvs, input_data),
-        "pip1"    : make_basic_variables(options, pvs, input_data),
-        "pip2"   : make_basic_variables(options, pvs, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Ds2KKpi_ADet(options, pvs, rec_summary):
-    name = "Ds2KKpi_ADet"
-    turbo_line = "Hlt2Charm_DspToKmKpPip_ADet"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D_s+ -> K- K+ pi+]CC",
-        "Km"   : "[D_s+ -> ^K- K+ pi+]CC",
-        "Kp"  : "[D_s+ -> K- ^K+ pi+]CC",
-        "pip" : "[D_s+ -> K- K+ ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables_3body(options, pvs, input_data),
-        "Km"     : make_basic_variables(options, pvs, input_data),
-        "Kp"    : make_basic_variables(options, pvs, input_data),
-        "pip"   : make_basic_variables(options, pvs, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-    
-    return [myfilter, mytuple]
-        
-def maketuple_Lc2KSp_LL_ADet(options, pvs, rec_summary):
-    name = "Lc2KSp_LL_ADet"
-    turbo_line = "Hlt2Charm_LcpToPpKs_LL_ADet"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Lc" : "[Lambda_c+ -> (KS0 -> pi- pi+) p+]CC",
-        "KS0"  : "[Lambda_c+ -> ^(KS0 -> pi- pi+) p+]CC",
-        "pim"   : "[Lambda_c+ -> (KS0 -> ^pi- pi+) p+]CC",
-        "pip"  : "[Lambda_c+ -> (KS0 -> pi- ^pi+) p+]CC",
-        "pp" : "[Lambda_c+ -> (KS0 -> pi- pi+) ^p+]CC",
-    }
-
-    variables = {
-        "Lc"   : make_composite_variables(options, pvs, input_data),
-        "KS0"    : make_composite_variables(options, pvs, input_data),
-        "pim"     : make_basic_variables(options, pvs, input_data),
-        "pip"    : make_basic_variables(options, pvs, input_data),
-        "pp"   : make_basic_variables(options, pvs, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Lc2pKpi_ADet(options, pvs, rec_summary):
-    name = "Lc2pKpi_ADet"
-    turbo_line = "Hlt2Charm_LcpToPpKmPip_ADet"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Lc" : "[Lambda_c+ -> K- pi+ p+]CC",
-        "Km"   : "[Lambda_c+ -> ^K- pi+ p+]CC",
-        "pip"  : "[Lambda_c+ -> K- ^pi+ p+]CC",
-        "pp" : "[Lambda_c+ -> K- pi+ ^p+]CC",
-    }
-
-    variables = {
-        "Lc"   : make_composite_variables_3body(options, pvs, input_data),
-        "Km"     : make_basic_variables(options, pvs, input_data),
-        "pip"    : make_basic_variables(options, pvs, input_data),
-        "pp"   : make_basic_variables(options, pvs, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2KSK_LL_ADet(options, pvs, rec_summary):
-    name = "D2KSK_LL_ADet"
-    turbo_line = "Hlt2Charm_DspToKsKp_LL_ADet"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D_s+ -> (KS0 -> pi- pi+) K+]CC",
-        "KS0"  : "[D_s+ -> ^(KS0 -> pi- pi+) K+]CC",
-        "pim"   : "[D_s+ -> (KS0 -> ^pi- pi+) K+]CC",
-        "pip"  : "[D_s+ -> (KS0 -> pi- ^pi+) K+]CC",
-        "hp" : "[D_s+ -> (KS0 -> pi- pi+) ^K+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data),
-        "KS0"    : make_composite_variables(options, pvs, input_data),
-        "pim"     : make_basic_variables(options, pvs, input_data),
-        "pip"    : make_basic_variables(options, pvs, input_data),
-        "hp"   : make_basic_variables(options, pvs, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2KSpi_LL_ADet(options, pvs, rec_summary):
-    name = "D2KSpi_LL_ADet"
-    turbo_line = "Hlt2Charm_DpToKsPip_LL_ADet"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (KS0 -> pi- pi+) pi+]CC",
-        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) pi+]CC",
-        "pim"   : "[D+ -> (KS0 -> ^pi- pi+) pi+]CC",
-        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) pi+]CC",
-        "hp" : "[D+ -> (KS0 -> pi- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data),
-        "KS0"    : make_composite_variables(options, pvs, input_data),
-        "pim"     : make_basic_variables(options, pvs, input_data),
-        "pip"    : make_basic_variables(options, pvs, input_data),
-        "hp"   : make_basic_variables(options, pvs, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
diff --git a/Charm_2024validation/options/dst_to_dee.py b/Charm_2024validation/options/dst_to_dee.py
deleted file mode 100644
index 11f42bae95..0000000000
--- a/Charm_2024validation/options/dst_to_dee.py
+++ /dev/null
@@ -1,296 +0,0 @@
-import Functors as F
-from Functors.math import log
-from DaVinci import Options, make_config
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunctorCollection
-from PyConf.reading import get_particles, get_pvs
-import FunTuple.functorcollections as FC
-from FunTuple import FunTuple_Particles as Funtuple
-from DecayTreeFitter import DecayTreeFitter
-from Hlt2Conf.lines.charm.dst_to_dee_makers import (dst_BDT_functor)
-from .tupling import (
-    make_DeltaM_variable,
-    make_basic_variables,
-    make_composite_variables,
-    make_composite_variables_3body,
-    make_composite_variables_4body,
-    make_hlt2_event_variables,
-    make_basic_dtf_variables,
-    make_composite_dtf_variables,
-    make_composite_dtf_variables_3body,
-    make_composite_dtf_variables_4body,
-    Hlt1_lines
-)
-extra_brem_variables= (FunctorCollection(
-            {
-                "BREMHYPODELTAX": F.BREMHYPODELTAX,
-                "BREMHYPOENERGY": F.BREMHYPOENERGY,
-                "BREMHYPOID": F.BREMHYPOID,
-                "BREMHYPOMATCH_CHI2": F.BREMHYPOMATCH_CHI2,
-                "BREMPIDE": F.BREMPIDE,
-                "INBREM": F.INBREM,
-                "MASS_WITH_BREM": F.MASS_WITH_BREM,
-                "PT_WITH_BREM": F.PT_WITH_BREM,
-                "P_WITH_BREM": F.P_WITH_BREM,
-                "ECALPIDE": F.ECALPIDE,
-                "HCALPIDE": F.HCALPIDE,
-                "ELECTRONSHOWEREOP": F.ELECTRONSHOWEREOP,
-                "CLUSTERMATCH_CHI2": F.CLUSTERMATCH_CHI2,
-                "ELECTRONMATCH_CHI2": F.ELECTRONMATCH_CHI2,
-                "ELECTRONENERGY": F.ELECTRONENERGY,
-                "ELECTRONID": F.ELECTRONID,
-                "HCALEOP": F.HCALEOP,
-                "CALO_NEUTRAL_SHOWER_SHAPE": F.CALO_NEUTRAL_SHOWER_SHAPE,
-                "RICH_DLL_E": F.VALUE_OR(F.NaN)@F.RICH_DLL_E,
-            })
-    )
-
-decay_descriptor = {
-    'dst_kpi_os' : {
-        "Dst0":   "[ D*(2007)0 ->  (D0 ->  K-  pi+)  (gamma ->  e+  e-)]CC",
-        "D0":     "[ D*(2007)0 -> ^(D0 ->  K-  pi+)  (gamma ->  e+  e-)]CC",
-        "Kminus": "[ D*(2007)0 ->  (D0 -> ^K-  pi+)  (gamma ->  e+  e-)]CC",
-        "piplus": "[ D*(2007)0 ->  (D0 ->  K- ^pi+)  (gamma ->  e+  e-)]CC",
-        "gamma":  "[ D*(2007)0 ->  (D0 ->  K-  pi+) ^(gamma ->  e+  e-)]CC",
-        "eplus":  "[ D*(2007)0 ->  (D0 ->  K-  pi+)  (gamma -> ^e+  e-)]CC",
-        "eminus": "[ D*(2007)0 ->  (D0 ->  K-  pi+)  (gamma ->  e+ ^e-)]CC",
-    },
-
-    'dst_kpi_ss' : {
-        "Dst0":   "[ D*(2007)0 ->  (D0 ->  K-  pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "D0":     "[ D*(2007)0 -> ^(D0 ->  K-  pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "Kminus": "[ D*(2007)0 ->  (D0 -> ^K-  pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "piplus": "[ D*(2007)0 ->  (D0 ->  K- ^pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "gamma":  "[ D*(2007)0 ->  (D0 ->  K-  pi+) ^([gamma ->  e+  e+]CC)]CC",
-        "eplus":  "[ D*(2007)0 ->  (D0 ->  K-  pi+)  ([gamma -> ^e+  e+]CC)]CC",
-        "eminus": "[ D*(2007)0 ->  (D0 ->  K-  pi+)  ([gamma ->  e+ ^e+]CC)]CC",
-    },
-
-    'dst_k3pi_os' :  {
-        "Dst0":    "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)  (gamma ->  e+  e-)]CC",
-        "D0":      "[ D*(2007)0 -> ^(D0 -> K- pi- pi+ pi+)  (gamma ->  e+  e-)]CC",
-        "Kminus":  "[ D*(2007)0 ->  (D0 -> ^K- pi- pi+ pi+) (gamma ->  e+  e-)]CC",
-        "piminus": "[ D*(2007)0 ->  (D0 -> K- ^pi- pi+ pi+) (gamma ->  e+  e-)]CC",
-        "piplus1": "[ D*(2007)0 ->  (D0 -> K- pi- ^pi+ pi+) (gamma ->  e+  e-)]CC",
-        "piplus2": "[ D*(2007)0 ->  (D0 -> K- pi- pi+ ^pi+) (gamma ->  e+  e-)]CC",
-        "gamma":   "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+) ^(gamma ->  e+  e-)]CC",
-        "eplus":   "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)  (gamma -> ^e+  e-)]CC",
-        "eminus":  "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)  (gamma ->  e+ ^e-)]CC",
-    },
-
-    'dst_k3pi_ss' :  {
-        "Dst0":    "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)   ([gamma ->  e+  e+]CC)]CC",
-        "D0":      "[ D*(2007)0 -> ^(D0 -> K- pi- pi+ pi+)   ([gamma ->  e+  e+]CC)]CC",
-        "Kminus":  "[ D*(2007)0 ->  (D0 -> ^K- pi- pi+ pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "piminus": "[ D*(2007)0 ->  (D0 -> K- ^pi- pi+ pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "piplus1": "[ D*(2007)0 ->  (D0 -> K- pi- ^pi+ pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "piplus2": "[ D*(2007)0 ->  (D0 -> K- pi- pi+ ^pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "gamma":   "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)  ^([gamma ->  e+  e+]CC)]CC",
-        "eplus":   "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)   ([gamma -> ^e+  e+]CC)]CC",
-        "eminus":  "[ D*(2007)0 ->  (D0 -> K- pi- pi+ pi+)   ([gamma ->  e+ ^e+]CC)]CC",
-    },
-
-    'dsstp_2kpi_os' : {
-        "Dstp":   "[ D*_s+ ->  (D_s+ -> K- K+ pi+)  (gamma ->  e+  e-)]CC",
-        "DpDs":   "[ D*_s+ -> ^(D_s+ -> K- K+ pi+)  (gamma ->  e+  e-)]CC",
-        "Kminus": "[ D*_s+ ->  (D_s+ -> ^K- K+ pi+) (gamma ->  e+  e-)]CC",
-        "Kplus":  "[ D*_s+ ->  (D_s+ -> K- ^K+ pi+) (gamma ->  e+  e-)]CC",
-        "piplus": "[ D*_s+ ->  (D_s+ -> K- K+ ^pi+) (gamma ->  e+  e-)]CC",
-        "gamma":  "[ D*_s+ ->  (D_s+ -> K- K+ pi+) ^(gamma ->  e+  e-)]CC",
-        "eplus":  "[ D*_s+ ->  (D_s+ -> K- K+ pi+)  (gamma -> ^e+  e-)]CC",
-        "eminus": "[ D*_s+ ->  (D_s+ -> K- K+ pi+)  (gamma ->  e+ ^e-)]CC",
-    },
-    'dsstp_2kpi_ss' : {
-        "Dstp":   "[ D*_s+ ->  (D_s+ -> K- K+ pi+)   ([gamma ->  e+  e+]CC)]CC",
-        "DpDs":   "[ D*_s+ -> ^(D_s+ -> K- K+ pi+)   ([gamma ->  e+  e+]CC)]CC",
-        "Kminus": "[ D*_s+ ->  (D_s+ -> ^K- K+ pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "Kplus":  "[ D*_s+ ->  (D_s+ -> K- ^K+ pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "piplus": "[ D*_s+ ->  (D_s+ -> K- K+ ^pi+)  ([gamma ->  e+  e+]CC)]CC",
-        "gamma":  "[ D*_s+ ->  (D_s+ -> K- K+ pi+)  ^([gamma ->  e+  e+]CC)]CC",
-        "eplus":  "[ D*_s+ ->  (D_s+ -> K- K+ pi+)   ([gamma -> ^e+  e+]CC)]CC",
-        "eminus": "[ D*_s+ ->  (D_s+ -> K- K+ pi+)   ([gamma ->  e+ ^e+]CC)]CC",
-    },
-
-}
-
-def MVA_dst_variables(line, pvs):
-    return (FunctorCollection( { "MVA": dst_BDT_functor(pvs, line=line)}))
-#make_dtf_variables(options,  input_data, ptype):
-def make_dtf_variables(options, input_data,  pvs, ptype="basic",  mass_constrain = ["D*(2007)0", "D0" ], nparticles=2):
-    
-    DTF = DecayTreeFitter(
-        name="DTF_{hash}",
-        input_particles=input_data,
-    )
-
-    DTF_DMass_BestPV = DecayTreeFitter(
-        name="DTF_DMass_BestPV_{hash}",
-        input_particles=input_data,
-        mass_constraints=mass_constrain,
-        input_pvs=pvs,
-        fit_all_pvs=False,
-    )
-    DTF_Mass_BestPV = DecayTreeFitter(
-        name="DTF_Mass_BestPV_{hash}",
-        input_particles=input_data,
-        mass_constraints=[mass_constrain[1]],
-        input_pvs=pvs,
-        fit_all_pvs=False,
-    )
-
-    DTF_BestPV = DecayTreeFitter(
-        name="DTF_BestPV_{hash}",
-        input_particles=input_data,
-        #mass_constraints=["D*(2007)0", "D0" ],
-        input_pvs=pvs,
-        fit_all_pvs=False,
-    )
-
-    DTF_DMass = DecayTreeFitter(
-        name="DTF_DMass_{hash}",
-        input_particles=input_data,
-        mass_constraints=mass_constrain,
-        output_level=3,
-    )
-    DTF_Mass = DecayTreeFitter(
-        name="DTF_Mass_{hash}",
-        input_particles=input_data,
-        mass_constraints=[mass_constrain[1]],
-        output_level=3,
-    )
-    
-    if ptype == "basic":
-        dtf_variables =  make_basic_dtf_variables
-    elif ptype == "composite":
-        if nparticles == 2:
-            dtf_variables = make_composite_dtf_variables 
-        elif nparticles == 3:
-            dtf_variables = make_composite_dtf_variables_3body
-        elif nparticles == 4:
-            dtf_variables = make_composite_dtf_variables_4body 
-
-    dtf_vars = dtf_variables(options, pvs, input_data,
-                                        DTF=DTF,
-                                        pv_constraint=False,
-                                        mass_constraint=False)
-    dtf_vars += dtf_variables(options, pvs, input_data,
-                                        DTF=DTF_BestPV,
-                                        pv_constraint=True,
-                                        mass_constraint=False)
-    dtf_vars += dtf_variables(options, pvs, input_data,
-                                        DTF=DTF_Mass,
-                                        pv_constraint=False,
-                                        mass_constraint=True, particle_name="D")
-    dtf_vars += dtf_variables(options, pvs, input_data,
-                                        DTF=DTF_Mass_BestPV,
-                                        pv_constraint=True,
-                                        mass_constraint=True, particle_name="D")
-    dtf_vars += dtf_variables(options, pvs, input_data,
-                                        DTF=DTF_DMass,
-                                        pv_constraint=False,
-                                        mass_constraint=True, particle_name="DstD")
-    dtf_vars += dtf_variables(options, pvs, input_data,
-                                        DTF=DTF_DMass_BestPV,
-                                        pv_constraint=True,
-                                        mass_constraint=True, particle_name="DstD")
-
-    return dtf_vars
-
-
-def make_Dst0ToD0EmEp_D0ToKmPip_tuple(options, line, pvs , rec_summary, dd='dst_kpi_os'):
-
-    input_data=get_particles(f"/Event/HLT2/{line}/Particles")
-    my_filter = create_lines_filter(f"LineFilter_{line}_{{hash}}",[line],)
-
-    fields = decay_descriptor[dd]
-    
-    composite_tuple_variables = {
-        "Dst0"   :  make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs,  "composite") +\
-             MVA_dst_variables("Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip", pvs) + make_DeltaM_variable(options), 
-        "D0"     :  make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs,  "composite"),
-        "gamma"  :  make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs,  "composite")
-    }
-    basic_tuple_variables = { 
-        "Kminus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"),
-        "piplus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"),
-        "eplus"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic") + extra_brem_variables,
-        "eminus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic") + extra_brem_variables,
-    }
-
-    my_tuple = Funtuple(
-        name=f"Tuple_{line}_{dd}",
-        tuple_name="DecayTree",
-        fields=fields,
-        variables= {**composite_tuple_variables, **basic_tuple_variables},
-        event_variables=make_hlt2_event_variables(options, pvs, rec_summary), 
-        inputs=input_data,
-        store_multiple_cand_info=True
-    )
-    return [ my_filter, my_tuple]
-
-def make_Dst0ToD0EmEp_D0ToKmPimPipPip_tuple(options, line, pvs, rec_summary, dd='dst_k3pi_os'):
-
-    input_data=get_particles(f"/Event/HLT2/{line}/Particles")
-    my_filter = create_lines_filter(f"LineFilter_{line}_{{hash}}",[line],)
-
-    fields = decay_descriptor[dd]
-    
-    composite_tuple_variables = {
-        "Dst0"   : make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs, "composite") +\
-             MVA_dst_variables("Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip", pvs) + make_DeltaM_variable(options), 
-        "D0"     : make_composite_variables_4body(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs, "composite", nparticles=4),
-        "gamma"  : make_composite_variables(options, pvs, input_data) 
-    }
-    basic_tuple_variables = { 
-        "Kminus"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"),
-        "piminus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"),
-        "piplus1" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"),
-        "piplus2" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic"), 
-        "eplus"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic") + extra_brem_variables,
-        "eminus"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic") + extra_brem_variables,
-    }
-
-    my_tuple = Funtuple(
-        name=f"Tuple_{line}_{dd}",
-        tuple_name="DecayTree",
-        fields=fields,
-        variables= {**composite_tuple_variables, **basic_tuple_variables},
-        event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data,
-        store_multiple_cand_info=True
-    )
-    return [ my_filter, my_tuple]
-
-
-def make_DstpToDpDspEmEp_DpDspToKmKpPip_tuple(options, line, pvs , rec_summary, dd='dsstp_2kpi_os'):
-
-    input_data=get_particles(f"/Event/HLT2/{line}/Particles")
-    my_filter = create_lines_filter(f"LineFilter_{line}_{{hash}}",[line],)
-
-    fields = decay_descriptor[dd]
-
-    composite_tuple_variables = {
-        "Dstp"   : make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs, "composite", mass_constrain = ["D*_s+", "D_s+"]) +\
-             MVA_dst_variables("Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip", pvs) + make_DeltaM_variable(options), 
-        "DpDs"   : make_composite_variables_3body(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs, "composite", mass_constrain = ["D*_s+", "D_s+"], nparticles=3),
-        "gamma"  : make_composite_variables(options, pvs, input_data) + make_dtf_variables(options, input_data, pvs, "composite", mass_constrain = ["D*_s+", "D_s+"]),
-    }
-    basic_tuple_variables = { 
-        "Kminus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic",  mass_constrain = ["D*_s+", "D_s+"]),
-        "Kplus"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic",  mass_constrain = ["D*_s+", "D_s+"]),
-        "piplus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic",  mass_constrain = ["D*_s+", "D_s+"]),
-        "eplus"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic",  mass_constrain = ["D*_s+", "D_s+"])+ extra_brem_variables,
-        "eminus" : make_basic_variables(options, pvs, input_data)+make_dtf_variables(options, input_data, pvs, "basic",  mass_constrain = ["D*_s+", "D_s+"])+ extra_brem_variables,
-    }
-
-    my_tuple = Funtuple(
-        name=f"Tuple_{line}_{dd}",
-        tuple_name="DecayTree",
-        fields=fields,
-        variables= {**composite_tuple_variables, **basic_tuple_variables},
-        event_variables=make_hlt2_event_variables(options, pvs, rec_summary),
-        inputs=input_data,
-        store_multiple_cand_info=True
-    )
-    return [ my_filter, my_tuple]
diff --git a/Charm_2024validation/options/hlt1.py b/Charm_2024validation/options/hlt1.py
deleted file mode 100644
index db4fa72f60..0000000000
--- a/Charm_2024validation/options/hlt1.py
+++ /dev/null
@@ -1,44 +0,0 @@
-###############################################################################
-# (c) Copyright 2023 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.                                       #
-###############################################################################
-"""
-Configures running HLT1 via Moore.
-"""
-
-from Moore import Options
-from Moore.config import allen_control_flow
-from RecoConf.hlt1_allen import allen_gaudi_config, get_allen_line_names
-from AllenConf.hlt1_calibration_lines import make_passthrough_line
-from PyConf.application import configure_input, configure
-
-def alg_config(options: Options):
-    """
-    Configures algorithm running of HLT1 via Moore to be passed to Analysis Productions.
-    """
-
-    config = configure_input(options)
-    from Moore.production import hlt1
-    hlt1(options, "--sequence=hlt1_pp_matching_no_ut_1000KHz", "--flagging")
-    #line_names = get_allen_line_names()
-    #allen_node = allen_control_flow(options)
-    #config.update(configure(options, allen_node))
-    config["Gaudi::IODataManager/IODataManager"].AgeLimit = 0
-    
-    return config
-
-'''
-from Moore.production import hlt1
-hlt1(options, "--sequence=hlt1_pp_matching_no_ut_1000KHz", "--flagging")
-'''
-
-'''
-    with allen_gaudi_config.bind(sequence="hlt1_pp_matching_no_ut_1000KHz"), make_passthrough_line.bind(pre_scaler=1):
-
-'''
diff --git a/Charm_2024validation/options/hlt1_noUT.py b/Charm_2024validation/options/hlt1_noUT.py
deleted file mode 100644
index 883aa6cadd..0000000000
--- a/Charm_2024validation/options/hlt1_noUT.py
+++ /dev/null
@@ -1,34 +0,0 @@
-###############################################################################
-# (c) Copyright 2023 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.                                       #
-###############################################################################
-"""
-Configures running HLT1 via Moore.
-"""
-
-from Moore import Options
-from Moore.config import allen_control_flow
-from RecoConf.hlt1_allen import allen_gaudi_config, get_allen_line_names
-from AllenConf.hlt1_calibration_lines import make_passthrough_line
-from PyConf.application import configure_input, configure
-
-def alg_config(options: Options):
-    """
-    Configures algorithm running of HLT1 via Moore to be passed to Analysis Productions.
-    """
-
-    config = configure_input(options)
-    with allen_gaudi_config.bind(sequence="hlt1_pp_matching_no_ut_1000KHz"), make_passthrough_line.bind(pre_scaler=1):
-        line_names = get_allen_line_names()
-        allen_node = allen_control_flow(options)
-        config.update(configure(options, allen_node))
-        config["Gaudi::IODataManager/IODataManager"].AgeLimit = 0
-
-    return config
-
diff --git a/Charm_2024validation/options/hlt2/d0_to_hh.py b/Charm_2024validation/options/hlt2/d0_to_hh.py
deleted file mode 100644
index 3c0b0d0086..0000000000
--- a/Charm_2024validation/options/hlt2/d0_to_hh.py
+++ /dev/null
@@ -1,9 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_hh import all_lines as hh_lines
-
-def make_lines():
-    mylines = [builder() for builder in hh_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-
diff --git a/Charm_2024validation/options/hlt2/d0_to_hhhh.py b/Charm_2024validation/options/hlt2/d0_to_hhhh.py
deleted file mode 100644
index 81fe4dce30..0000000000
--- a/Charm_2024validation/options/hlt2/d0_to_hhhh.py
+++ /dev/null
@@ -1,8 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_hhhh import all_lines as hhhh_lines
-
-def make_lines():
-    mylines = [builder() for builder in hhhh_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
diff --git a/Charm_2024validation/options/hlt2/d0_to_hhpi0.py b/Charm_2024validation/options/hlt2/d0_to_hhpi0.py
deleted file mode 100644
index 52f8433c11..0000000000
--- a/Charm_2024validation/options/hlt2/d0_to_hhpi0.py
+++ /dev/null
@@ -1,8 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_hhpi0 import all_lines as hhpi0_lines
-
-def make_lines():
-    mylines = [builder() for builder in hhpi0_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
diff --git a/Charm_2024validation/options/hlt2/d0_to_kshh.py b/Charm_2024validation/options/hlt2/d0_to_kshh.py
deleted file mode 100644
index 79df310ed8..0000000000
--- a/Charm_2024validation/options/hlt2/d0_to_kshh.py
+++ /dev/null
@@ -1,8 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_kshh import all_lines as kshh_lines
-
-def make_lines():
-    mylines = [builder() for builder in kshh_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
diff --git a/Charm_2024validation/options/hlt2/d0_to_ksks.py b/Charm_2024validation/options/hlt2/d0_to_ksks.py
deleted file mode 100644
index 71ab403fd9..0000000000
--- a/Charm_2024validation/options/hlt2/d0_to_ksks.py
+++ /dev/null
@@ -1,8 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_ksks import all_lines as ksks_lines
-
-def make_lines():
-    mylines = [builder() for builder in ksks_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
diff --git a/Charm_2024validation/options/hlt2/d_to_hhh.py b/Charm_2024validation/options/hlt2/d_to_hhh.py
deleted file mode 100644
index cd718f9b86..0000000000
--- a/Charm_2024validation/options/hlt2/d_to_hhh.py
+++ /dev/null
@@ -1,10 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d_to_hhh import all_lines as hhh_lines
-from Hlt2Conf.lines.charm.detection_asymmetry_lines import all_lines as det_asy_lines
-
-def make_lines():
-    mylines = [builder() for builder in hhh_lines.values()]
-    mylines += [builder() for builder in det_asy_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
diff --git a/Charm_2024validation/options/hlt2/d_to_ksh.py b/Charm_2024validation/options/hlt2/d_to_ksh.py
deleted file mode 100644
index 8c8b172dd0..0000000000
--- a/Charm_2024validation/options/hlt2/d_to_ksh.py
+++ /dev/null
@@ -1,10 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d_to_ksh import all_lines as ksh_lines
-from Hlt2Conf.lines.charm.detection_asymmetry_lines import all_lines as det_asy_lines
-
-def make_lines():
-    mylines = [builder() for builder in ksh_lines.values()]
-    mylines += [builder() for builder in det_asy_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
diff --git a/Charm_2024validation/options/hlt2/dst_to_dee.py b/Charm_2024validation/options/hlt2/dst_to_dee.py
deleted file mode 100644
index 4fd67becd7..0000000000
--- a/Charm_2024validation/options/hlt2/dst_to_dee.py
+++ /dev/null
@@ -1,9 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.dst_to_dee import all_lines as dst_to_dee_lines
-
-def make_lines():
-    mylines = [builder() for builder in dst_to_dee_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-
diff --git a/Charm_2024validation/options/hlt2/hlt2.py b/Charm_2024validation/options/hlt2/hlt2.py
deleted file mode 100644
index 7edd6ed888..0000000000
--- a/Charm_2024validation/options/hlt2/hlt2.py
+++ /dev/null
@@ -1,36 +0,0 @@
-########################################
-# Generic Imports (minimalistic)
-########################################
-from Moore.streams import DETECTORS, Stream, Streams
-def make_streams():
-    streams = [
-        Stream("charm",
-               lines=make_lines(),
-               routing_bit=99,
-               detectors=[])
-    ]
-    return Streams(streams=streams)
-from Moore import Options, run_moore
-from Moore.lines import Hlt2Line
-from Hlt2Conf.settings.hlt2_binds import config_pp_2024, config_pp_2024_without_UT
-from RecoConf.global_tools import (
-    stateProvider_with_simplified_geom,
-    trackMasterExtrapolator_with_simplified_geom)
-from RecoConf.reconstruction_objects import reconstruction
-from PyConf.Tools import TrackMasterExtrapolator, TrackMasterFitter
-
-TrackMasterExtrapolator.global_bind(
-    ApplyMultScattCorr=False,
-    ApplyEnergyLossCorr=False,
-    ApplyElectronEnergyLossCorr=False,
-)
-TrackMasterFitter.global_bind(ApplyMaterialCorrections=False)
-public_tools = [
-    trackMasterExtrapolator_with_simplified_geom(),
-    stateProvider_with_simplified_geom(),
-]
-
-def alg_config(options: Options):
-
-    with reconstruction.bind( from_file = False) , config_pp_2024() :   
-        return run_moore(options, make_streams, public_tools=public_tools)
diff --git a/Charm_2024validation/options/hlt2/hlt2_d0_to_hh.py b/Charm_2024validation/options/hlt2/hlt2_d0_to_hh.py
deleted file mode 100644
index 18f95936f1..0000000000
--- a/Charm_2024validation/options/hlt2/hlt2_d0_to_hh.py
+++ /dev/null
@@ -1,45 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_hh import all_lines as hh_lines
-
-def make_lines():
-    mylines = [builder() for builder in hh_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-
-########################################
-# Generic Imports (minimalistic)
-########################################
-from Moore.streams import DETECTORS, Stream, Streams
-def make_streams():
-    streams = [
-        Stream("charm",
-               lines=make_lines(),
-               routing_bit=99,
-               detectors=[])
-    ]
-    return Streams(streams=streams)
-from Moore import Options, run_moore
-from Moore.lines import Hlt2Line
-from Hlt2Conf.settings.hlt2_binds import config_pp_2024, config_pp_2024_without_UT
-from RecoConf.global_tools import (
-    stateProvider_with_simplified_geom,
-    trackMasterExtrapolator_with_simplified_geom)
-from RecoConf.reconstruction_objects import reconstruction
-from PyConf.Tools import TrackMasterExtrapolator, TrackMasterFitter
-
-TrackMasterExtrapolator.global_bind(
-    ApplyMultScattCorr=False,
-    ApplyEnergyLossCorr=False,
-    ApplyElectronEnergyLossCorr=False,
-)
-TrackMasterFitter.global_bind(ApplyMaterialCorrections=False)
-public_tools = [
-    trackMasterExtrapolator_with_simplified_geom(),
-    stateProvider_with_simplified_geom(),
-]
-
-def alg_config(options: Options):
-
-    with reconstruction.bind( from_file = False) , config_pp_2024() :   
-        return run_moore(options, make_streams, public_tools=public_tools)
diff --git a/Charm_2024validation/options/hlt2/hlt2_d0_to_hhhh.py b/Charm_2024validation/options/hlt2/hlt2_d0_to_hhhh.py
deleted file mode 100644
index 965bc23e30..0000000000
--- a/Charm_2024validation/options/hlt2/hlt2_d0_to_hhhh.py
+++ /dev/null
@@ -1,44 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_hhhh import all_lines as hhhh_lines
-
-def make_lines():
-    mylines = [builder() for builder in hhhh_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-########################################
-# Generic Imports (minimalistic)
-########################################
-from Moore.streams import DETECTORS, Stream, Streams
-def make_streams():
-    streams = [
-        Stream("charm",
-               lines=make_lines(),
-               routing_bit=99,
-               detectors=[])
-    ]
-    return Streams(streams=streams)
-from Moore import Options, run_moore
-from Moore.lines import Hlt2Line
-from Hlt2Conf.settings.hlt2_binds import config_pp_2024, config_pp_2024_without_UT
-from RecoConf.global_tools import (
-    stateProvider_with_simplified_geom,
-    trackMasterExtrapolator_with_simplified_geom)
-from RecoConf.reconstruction_objects import reconstruction
-from PyConf.Tools import TrackMasterExtrapolator, TrackMasterFitter
-
-TrackMasterExtrapolator.global_bind(
-    ApplyMultScattCorr=False,
-    ApplyEnergyLossCorr=False,
-    ApplyElectronEnergyLossCorr=False,
-)
-TrackMasterFitter.global_bind(ApplyMaterialCorrections=False)
-public_tools = [
-    trackMasterExtrapolator_with_simplified_geom(),
-    stateProvider_with_simplified_geom(),
-]
-
-def alg_config(options: Options):
-
-    with reconstruction.bind( from_file = False) , config_pp_2024() :   
-        return run_moore(options, make_streams, public_tools=public_tools)
diff --git a/Charm_2024validation/options/hlt2/hlt2_d0_to_hhpi0.py b/Charm_2024validation/options/hlt2/hlt2_d0_to_hhpi0.py
deleted file mode 100644
index a6e53e3b78..0000000000
--- a/Charm_2024validation/options/hlt2/hlt2_d0_to_hhpi0.py
+++ /dev/null
@@ -1,44 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_hhpi0 import all_lines as hhpi0_lines
-
-def make_lines():
-    mylines = [builder() for builder in hhpi0_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-########################################
-# Generic Imports (minimalistic)
-########################################
-from Moore.streams import DETECTORS, Stream, Streams
-def make_streams():
-    streams = [
-        Stream("charm",
-               lines=make_lines(),
-               routing_bit=99,
-               detectors=[])
-    ]
-    return Streams(streams=streams)
-from Moore import Options, run_moore
-from Moore.lines import Hlt2Line
-from Hlt2Conf.settings.hlt2_binds import config_pp_2024, config_pp_2024_without_UT
-from RecoConf.global_tools import (
-    stateProvider_with_simplified_geom,
-    trackMasterExtrapolator_with_simplified_geom)
-from RecoConf.reconstruction_objects import reconstruction
-from PyConf.Tools import TrackMasterExtrapolator, TrackMasterFitter
-
-TrackMasterExtrapolator.global_bind(
-    ApplyMultScattCorr=False,
-    ApplyEnergyLossCorr=False,
-    ApplyElectronEnergyLossCorr=False,
-)
-TrackMasterFitter.global_bind(ApplyMaterialCorrections=False)
-public_tools = [
-    trackMasterExtrapolator_with_simplified_geom(),
-    stateProvider_with_simplified_geom(),
-]
-
-def alg_config(options: Options):
-
-    with reconstruction.bind( from_file = False) , config_pp_2024() :   
-        return run_moore(options, make_streams, public_tools=public_tools)
diff --git a/Charm_2024validation/options/hlt2/hlt2_d0_to_kshh.py b/Charm_2024validation/options/hlt2/hlt2_d0_to_kshh.py
deleted file mode 100644
index cd21f7598b..0000000000
--- a/Charm_2024validation/options/hlt2/hlt2_d0_to_kshh.py
+++ /dev/null
@@ -1,44 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_kshh import all_lines as kshh_lines
-
-def make_lines():
-    mylines = [builder() for builder in kshh_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-########################################
-# Generic Imports (minimalistic)
-########################################
-from Moore.streams import DETECTORS, Stream, Streams
-def make_streams():
-    streams = [
-        Stream("charm",
-               lines=make_lines(),
-               routing_bit=99,
-               detectors=[])
-    ]
-    return Streams(streams=streams)
-from Moore import Options, run_moore
-from Moore.lines import Hlt2Line
-from Hlt2Conf.settings.hlt2_binds import config_pp_2024, config_pp_2024_without_UT
-from RecoConf.global_tools import (
-    stateProvider_with_simplified_geom,
-    trackMasterExtrapolator_with_simplified_geom)
-from RecoConf.reconstruction_objects import reconstruction
-from PyConf.Tools import TrackMasterExtrapolator, TrackMasterFitter
-
-TrackMasterExtrapolator.global_bind(
-    ApplyMultScattCorr=False,
-    ApplyEnergyLossCorr=False,
-    ApplyElectronEnergyLossCorr=False,
-)
-TrackMasterFitter.global_bind(ApplyMaterialCorrections=False)
-public_tools = [
-    trackMasterExtrapolator_with_simplified_geom(),
-    stateProvider_with_simplified_geom(),
-]
-
-def alg_config(options: Options):
-
-    with reconstruction.bind( from_file = False) , config_pp_2024() :   
-        return run_moore(options, make_streams, public_tools=public_tools)
diff --git a/Charm_2024validation/options/hlt2/hlt2_d0_to_ksks.py b/Charm_2024validation/options/hlt2/hlt2_d0_to_ksks.py
deleted file mode 100644
index ef758d0f1f..0000000000
--- a/Charm_2024validation/options/hlt2/hlt2_d0_to_ksks.py
+++ /dev/null
@@ -1,44 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_ksks import all_lines as ksks_lines
-
-def make_lines():
-    mylines = [builder() for builder in ksks_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-########################################
-# Generic Imports (minimalistic)
-########################################
-from Moore.streams import DETECTORS, Stream, Streams
-def make_streams():
-    streams = [
-        Stream("charm",
-               lines=make_lines(),
-               routing_bit=99,
-               detectors=[])
-    ]
-    return Streams(streams=streams)
-from Moore import Options, run_moore
-from Moore.lines import Hlt2Line
-from Hlt2Conf.settings.hlt2_binds import config_pp_2024, config_pp_2024_without_UT
-from RecoConf.global_tools import (
-    stateProvider_with_simplified_geom,
-    trackMasterExtrapolator_with_simplified_geom)
-from RecoConf.reconstruction_objects import reconstruction
-from PyConf.Tools import TrackMasterExtrapolator, TrackMasterFitter
-
-TrackMasterExtrapolator.global_bind(
-    ApplyMultScattCorr=False,
-    ApplyEnergyLossCorr=False,
-    ApplyElectronEnergyLossCorr=False,
-)
-TrackMasterFitter.global_bind(ApplyMaterialCorrections=False)
-public_tools = [
-    trackMasterExtrapolator_with_simplified_geom(),
-    stateProvider_with_simplified_geom(),
-]
-
-def alg_config(options: Options):
-
-    with reconstruction.bind( from_file = False) , config_pp_2024() :   
-        return run_moore(options, make_streams, public_tools=public_tools)
diff --git a/Charm_2024validation/options/hlt2/hlt2_d_to_hhh.py b/Charm_2024validation/options/hlt2/hlt2_d_to_hhh.py
deleted file mode 100644
index 84909f2f7f..0000000000
--- a/Charm_2024validation/options/hlt2/hlt2_d_to_hhh.py
+++ /dev/null
@@ -1,46 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d_to_hhh import all_lines as hhh_lines
-from Hlt2Conf.lines.charm.detection_asymmetry_lines import all_lines as det_asy_lines
-
-def make_lines():
-    mylines = [builder() for builder in hhh_lines.values()]
-    mylines += [builder() for builder in det_asy_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-########################################
-# Generic Imports (minimalistic)
-########################################
-from Moore.streams import DETECTORS, Stream, Streams
-def make_streams():
-    streams = [
-        Stream("charm",
-               lines=make_lines(),
-               routing_bit=99,
-               detectors=[])
-    ]
-    return Streams(streams=streams)
-from Moore import Options, run_moore
-from Moore.lines import Hlt2Line
-from Hlt2Conf.settings.hlt2_binds import config_pp_2024, config_pp_2024_without_UT
-from RecoConf.global_tools import (
-    stateProvider_with_simplified_geom,
-    trackMasterExtrapolator_with_simplified_geom)
-from RecoConf.reconstruction_objects import reconstruction
-from PyConf.Tools import TrackMasterExtrapolator, TrackMasterFitter
-
-TrackMasterExtrapolator.global_bind(
-    ApplyMultScattCorr=False,
-    ApplyEnergyLossCorr=False,
-    ApplyElectronEnergyLossCorr=False,
-)
-TrackMasterFitter.global_bind(ApplyMaterialCorrections=False)
-public_tools = [
-    trackMasterExtrapolator_with_simplified_geom(),
-    stateProvider_with_simplified_geom(),
-]
-
-def alg_config(options: Options):
-
-    with reconstruction.bind( from_file = False) , config_pp_2024() :   
-        return run_moore(options, make_streams, public_tools=public_tools)
diff --git a/Charm_2024validation/options/hlt2/hlt2_d_to_ksh.py b/Charm_2024validation/options/hlt2/hlt2_d_to_ksh.py
deleted file mode 100644
index 836afe5c2f..0000000000
--- a/Charm_2024validation/options/hlt2/hlt2_d_to_ksh.py
+++ /dev/null
@@ -1,46 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d_to_ksh import all_lines as ksh_lines
-from Hlt2Conf.lines.charm.detection_asymmetry_lines import all_lines as det_asy_lines
-
-def make_lines():
-    mylines = [builder() for builder in ksh_lines.values()]
-    mylines += [builder() for builder in det_asy_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-########################################
-# Generic Imports (minimalistic)
-########################################
-from Moore.streams import DETECTORS, Stream, Streams
-def make_streams():
-    streams = [
-        Stream("charm",
-               lines=make_lines(),
-               routing_bit=99,
-               detectors=[])
-    ]
-    return Streams(streams=streams)
-from Moore import Options, run_moore
-from Moore.lines import Hlt2Line
-from Hlt2Conf.settings.hlt2_binds import config_pp_2024, config_pp_2024_without_UT
-from RecoConf.global_tools import (
-    stateProvider_with_simplified_geom,
-    trackMasterExtrapolator_with_simplified_geom)
-from RecoConf.reconstruction_objects import reconstruction
-from PyConf.Tools import TrackMasterExtrapolator, TrackMasterFitter
-
-TrackMasterExtrapolator.global_bind(
-    ApplyMultScattCorr=False,
-    ApplyEnergyLossCorr=False,
-    ApplyElectronEnergyLossCorr=False,
-)
-TrackMasterFitter.global_bind(ApplyMaterialCorrections=False)
-public_tools = [
-    trackMasterExtrapolator_with_simplified_geom(),
-    stateProvider_with_simplified_geom(),
-]
-
-def alg_config(options: Options):
-
-    with reconstruction.bind( from_file = False) , config_pp_2024() :   
-        return run_moore(options, make_streams, public_tools=public_tools)
diff --git a/Charm_2024validation/options/hlt2/hlt2_dst_to_dee.py b/Charm_2024validation/options/hlt2/hlt2_dst_to_dee.py
deleted file mode 100644
index 733fc98340..0000000000
--- a/Charm_2024validation/options/hlt2/hlt2_dst_to_dee.py
+++ /dev/null
@@ -1,45 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.dst_to_dee import all_lines as dst_to_dee_lines
-
-def make_lines():
-    mylines = [builder() for builder in dst_to_dee_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-
-########################################
-# Generic Imports (minimalistic)
-########################################
-from Moore.streams import DETECTORS, Stream, Streams
-def make_streams():
-    streams = [
-        Stream("charm",
-               lines=make_lines(),
-               routing_bit=99,
-               detectors=[])
-    ]
-    return Streams(streams=streams)
-from Moore import Options, run_moore
-from Moore.lines import Hlt2Line
-from Hlt2Conf.settings.hlt2_binds import config_pp_2024, config_pp_2024_without_UT
-from RecoConf.global_tools import (
-    stateProvider_with_simplified_geom,
-    trackMasterExtrapolator_with_simplified_geom)
-from RecoConf.reconstruction_objects import reconstruction
-from PyConf.Tools import TrackMasterExtrapolator, TrackMasterFitter
-
-TrackMasterExtrapolator.global_bind(
-    ApplyMultScattCorr=False,
-    ApplyEnergyLossCorr=False,
-    ApplyElectronEnergyLossCorr=False,
-)
-TrackMasterFitter.global_bind(ApplyMaterialCorrections=False)
-public_tools = [
-    trackMasterExtrapolator_with_simplified_geom(),
-    stateProvider_with_simplified_geom(),
-]
-
-def alg_config(options: Options):
-
-    with reconstruction.bind( from_file = False) , config_pp_2024() :   
-        return run_moore(options, make_streams, public_tools=public_tools)
diff --git a/Charm_2024validation/options/hlt2/hlt2_rare_charm.py b/Charm_2024validation/options/hlt2/hlt2_rare_charm.py
deleted file mode 100644
index be7558c8bf..0000000000
--- a/Charm_2024validation/options/hlt2/hlt2_rare_charm.py
+++ /dev/null
@@ -1,44 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.rare_charm_lines import all_lines as rare_charm_lines
-
-def make_lines():
-    mylines = [builder() for builder in rare_charm_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-########################################
-# Generic Imports (minimalistic)
-########################################
-from Moore.streams import DETECTORS, Stream, Streams
-def make_streams():
-    streams = [
-        Stream("charm",
-               lines=make_lines(),
-               routing_bit=99,
-               detectors=[])
-    ]
-    return Streams(streams=streams)
-from Moore import Options, run_moore
-from Moore.lines import Hlt2Line
-from Hlt2Conf.settings.hlt2_binds import config_pp_2024, config_pp_2024_without_UT
-from RecoConf.global_tools import (
-    stateProvider_with_simplified_geom,
-    trackMasterExtrapolator_with_simplified_geom)
-from RecoConf.reconstruction_objects import reconstruction
-from PyConf.Tools import TrackMasterExtrapolator, TrackMasterFitter
-
-TrackMasterExtrapolator.global_bind(
-    ApplyMultScattCorr=False,
-    ApplyEnergyLossCorr=False,
-    ApplyElectronEnergyLossCorr=False,
-)
-TrackMasterFitter.global_bind(ApplyMaterialCorrections=False)
-public_tools = [
-    trackMasterExtrapolator_with_simplified_geom(),
-    stateProvider_with_simplified_geom(),
-]
-
-def alg_config(options: Options):
-
-    with reconstruction.bind( from_file = False) , config_pp_2024() :   
-        return run_moore(options, make_streams, public_tools=public_tools)
diff --git a/Charm_2024validation/options/hlt2/make_hlt2_decay.sh b/Charm_2024validation/options/hlt2/make_hlt2_decay.sh
deleted file mode 100644
index f127b86285..0000000000
--- a/Charm_2024validation/options/hlt2/make_hlt2_decay.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-cat d0_to_hh.py hlt2.py > hlt2_d0_to_hh.py
-cat d0_to_hhpi0.py hlt2.py > hlt2_d0_to_hhpi0.py
-cat d0_to_hhhh.py hlt2.py > hlt2_d0_to_hhhh.py
-cat d0_to_kshh.py hlt2.py > hlt2_d0_to_kshh.py
-cat d0_to_ksks.py hlt2.py > hlt2_d0_to_ksks.py
-cat d_to_hhh.py hlt2.py > hlt2_d_to_hhh.py
-cat d_to_ksh.py hlt2.py > hlt2_d_to_ksh.py
-cat rare_charm.py hlt2.py > hlt2_rare_charm.py
-cat dst_to_dee.py hlt2.py > hlt2_dst_to_dee.py
diff --git a/Charm_2024validation/options/hlt2/rare_charm.py b/Charm_2024validation/options/hlt2/rare_charm.py
deleted file mode 100644
index 39194555f0..0000000000
--- a/Charm_2024validation/options/hlt2/rare_charm.py
+++ /dev/null
@@ -1,8 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.rare_charm_lines import all_lines as rare_charm_lines
-
-def make_lines():
-    mylines = [builder() for builder in rare_charm_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
diff --git a/Charm_2024validation/options/hlt2_noUT/d0_to_hh.py b/Charm_2024validation/options/hlt2_noUT/d0_to_hh.py
deleted file mode 100644
index 3c0b0d0086..0000000000
--- a/Charm_2024validation/options/hlt2_noUT/d0_to_hh.py
+++ /dev/null
@@ -1,9 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_hh import all_lines as hh_lines
-
-def make_lines():
-    mylines = [builder() for builder in hh_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-
diff --git a/Charm_2024validation/options/hlt2_noUT/d0_to_hhhh.py b/Charm_2024validation/options/hlt2_noUT/d0_to_hhhh.py
deleted file mode 100644
index 81fe4dce30..0000000000
--- a/Charm_2024validation/options/hlt2_noUT/d0_to_hhhh.py
+++ /dev/null
@@ -1,8 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_hhhh import all_lines as hhhh_lines
-
-def make_lines():
-    mylines = [builder() for builder in hhhh_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
diff --git a/Charm_2024validation/options/hlt2_noUT/d0_to_hhpi0.py b/Charm_2024validation/options/hlt2_noUT/d0_to_hhpi0.py
deleted file mode 100644
index 52f8433c11..0000000000
--- a/Charm_2024validation/options/hlt2_noUT/d0_to_hhpi0.py
+++ /dev/null
@@ -1,8 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_hhpi0 import all_lines as hhpi0_lines
-
-def make_lines():
-    mylines = [builder() for builder in hhpi0_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
diff --git a/Charm_2024validation/options/hlt2_noUT/d0_to_kshh.py b/Charm_2024validation/options/hlt2_noUT/d0_to_kshh.py
deleted file mode 100644
index 79df310ed8..0000000000
--- a/Charm_2024validation/options/hlt2_noUT/d0_to_kshh.py
+++ /dev/null
@@ -1,8 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_kshh import all_lines as kshh_lines
-
-def make_lines():
-    mylines = [builder() for builder in kshh_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
diff --git a/Charm_2024validation/options/hlt2_noUT/d0_to_ksks.py b/Charm_2024validation/options/hlt2_noUT/d0_to_ksks.py
deleted file mode 100644
index 71ab403fd9..0000000000
--- a/Charm_2024validation/options/hlt2_noUT/d0_to_ksks.py
+++ /dev/null
@@ -1,8 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_ksks import all_lines as ksks_lines
-
-def make_lines():
-    mylines = [builder() for builder in ksks_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
diff --git a/Charm_2024validation/options/hlt2_noUT/d_to_hhh.py b/Charm_2024validation/options/hlt2_noUT/d_to_hhh.py
deleted file mode 100644
index cd718f9b86..0000000000
--- a/Charm_2024validation/options/hlt2_noUT/d_to_hhh.py
+++ /dev/null
@@ -1,10 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d_to_hhh import all_lines as hhh_lines
-from Hlt2Conf.lines.charm.detection_asymmetry_lines import all_lines as det_asy_lines
-
-def make_lines():
-    mylines = [builder() for builder in hhh_lines.values()]
-    mylines += [builder() for builder in det_asy_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
diff --git a/Charm_2024validation/options/hlt2_noUT/d_to_ksh.py b/Charm_2024validation/options/hlt2_noUT/d_to_ksh.py
deleted file mode 100644
index 8c8b172dd0..0000000000
--- a/Charm_2024validation/options/hlt2_noUT/d_to_ksh.py
+++ /dev/null
@@ -1,10 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d_to_ksh import all_lines as ksh_lines
-from Hlt2Conf.lines.charm.detection_asymmetry_lines import all_lines as det_asy_lines
-
-def make_lines():
-    mylines = [builder() for builder in ksh_lines.values()]
-    mylines += [builder() for builder in det_asy_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
diff --git a/Charm_2024validation/options/hlt2_noUT/dst_to_dee.py b/Charm_2024validation/options/hlt2_noUT/dst_to_dee.py
deleted file mode 100644
index 4fd67becd7..0000000000
--- a/Charm_2024validation/options/hlt2_noUT/dst_to_dee.py
+++ /dev/null
@@ -1,9 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.dst_to_dee import all_lines as dst_to_dee_lines
-
-def make_lines():
-    mylines = [builder() for builder in dst_to_dee_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-
diff --git a/Charm_2024validation/options/hlt2_noUT/hlt2.py b/Charm_2024validation/options/hlt2_noUT/hlt2.py
deleted file mode 100644
index 473127434b..0000000000
--- a/Charm_2024validation/options/hlt2_noUT/hlt2.py
+++ /dev/null
@@ -1,32 +0,0 @@
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf_without_UT
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf_without_UT),\
-         require_gec.bind(skipUT=True),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/options/hlt2_noUT/hlt2_d0_to_hh.py b/Charm_2024validation/options/hlt2_noUT/hlt2_d0_to_hh.py
deleted file mode 100644
index 7896029d08..0000000000
--- a/Charm_2024validation/options/hlt2_noUT/hlt2_d0_to_hh.py
+++ /dev/null
@@ -1,41 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_hh import all_lines as hh_lines
-
-def make_lines():
-    mylines = [builder() for builder in hh_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf_without_UT
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf_without_UT),\
-         require_gec.bind(skipUT=True),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/options/hlt2_noUT/hlt2_d0_to_hhhh.py b/Charm_2024validation/options/hlt2_noUT/hlt2_d0_to_hhhh.py
deleted file mode 100644
index a56dd8452a..0000000000
--- a/Charm_2024validation/options/hlt2_noUT/hlt2_d0_to_hhhh.py
+++ /dev/null
@@ -1,40 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_hhhh import all_lines as hhhh_lines
-
-def make_lines():
-    mylines = [builder() for builder in hhhh_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf_without_UT
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf_without_UT),\
-         require_gec.bind(skipUT=True),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/options/hlt2_noUT/hlt2_d0_to_hhpi0.py b/Charm_2024validation/options/hlt2_noUT/hlt2_d0_to_hhpi0.py
deleted file mode 100644
index b38b81aaae..0000000000
--- a/Charm_2024validation/options/hlt2_noUT/hlt2_d0_to_hhpi0.py
+++ /dev/null
@@ -1,40 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_hhpi0 import all_lines as hhpi0_lines
-
-def make_lines():
-    mylines = [builder() for builder in hhpi0_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf_without_UT
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf_without_UT),\
-         require_gec.bind(skipUT=True),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/options/hlt2_noUT/hlt2_d0_to_kshh.py b/Charm_2024validation/options/hlt2_noUT/hlt2_d0_to_kshh.py
deleted file mode 100644
index c16b5e303d..0000000000
--- a/Charm_2024validation/options/hlt2_noUT/hlt2_d0_to_kshh.py
+++ /dev/null
@@ -1,40 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_kshh import all_lines as kshh_lines
-
-def make_lines():
-    mylines = [builder() for builder in kshh_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf_without_UT
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf_without_UT),\
-         require_gec.bind(skipUT=True),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/options/hlt2_noUT/hlt2_d0_to_ksks.py b/Charm_2024validation/options/hlt2_noUT/hlt2_d0_to_ksks.py
deleted file mode 100644
index a18a45658a..0000000000
--- a/Charm_2024validation/options/hlt2_noUT/hlt2_d0_to_ksks.py
+++ /dev/null
@@ -1,40 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d0_to_ksks import all_lines as ksks_lines
-
-def make_lines():
-    mylines = [builder() for builder in ksks_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf_without_UT
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf_without_UT),\
-         require_gec.bind(skipUT=True),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/options/hlt2_noUT/hlt2_d_to_hhh.py b/Charm_2024validation/options/hlt2_noUT/hlt2_d_to_hhh.py
deleted file mode 100644
index 048feaf912..0000000000
--- a/Charm_2024validation/options/hlt2_noUT/hlt2_d_to_hhh.py
+++ /dev/null
@@ -1,42 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d_to_hhh import all_lines as hhh_lines
-from Hlt2Conf.lines.charm.detection_asymmetry_lines import all_lines as det_asy_lines
-
-def make_lines():
-    mylines = [builder() for builder in hhh_lines.values()]
-    mylines += [builder() for builder in det_asy_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf_without_UT
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf_without_UT),\
-         require_gec.bind(skipUT=True),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/options/hlt2_noUT/hlt2_d_to_ksh.py b/Charm_2024validation/options/hlt2_noUT/hlt2_d_to_ksh.py
deleted file mode 100644
index 4bd087b0b2..0000000000
--- a/Charm_2024validation/options/hlt2_noUT/hlt2_d_to_ksh.py
+++ /dev/null
@@ -1,42 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.d_to_ksh import all_lines as ksh_lines
-from Hlt2Conf.lines.charm.detection_asymmetry_lines import all_lines as det_asy_lines
-
-def make_lines():
-    mylines = [builder() for builder in ksh_lines.values()]
-    mylines += [builder() for builder in det_asy_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf_without_UT
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf_without_UT),\
-         require_gec.bind(skipUT=True),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/options/hlt2_noUT/hlt2_dst_to_dee.py b/Charm_2024validation/options/hlt2_noUT/hlt2_dst_to_dee.py
deleted file mode 100644
index 4b65028429..0000000000
--- a/Charm_2024validation/options/hlt2_noUT/hlt2_dst_to_dee.py
+++ /dev/null
@@ -1,41 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.dst_to_dee import all_lines as dst_to_dee_lines
-
-def make_lines():
-    mylines = [builder() for builder in dst_to_dee_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf_without_UT
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf_without_UT),\
-         require_gec.bind(skipUT=True),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/options/hlt2_noUT/hlt2_rare_charm.py b/Charm_2024validation/options/hlt2_noUT/hlt2_rare_charm.py
deleted file mode 100644
index 92f80cdaf9..0000000000
--- a/Charm_2024validation/options/hlt2_noUT/hlt2_rare_charm.py
+++ /dev/null
@@ -1,40 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.rare_charm_lines import all_lines as rare_charm_lines
-
-def make_lines():
-    mylines = [builder() for builder in rare_charm_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf_without_UT
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf_without_UT),\
-         require_gec.bind(skipUT=True),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/options/hlt2_noUT/hlt2withUTCarlos.py b/Charm_2024validation/options/hlt2_noUT/hlt2withUTCarlos.py
deleted file mode 100644
index c1560ce952..0000000000
--- a/Charm_2024validation/options/hlt2_noUT/hlt2withUTCarlos.py
+++ /dev/null
@@ -1,32 +0,0 @@
-import Moore
-from Moore import Options, run_moore
-from RecoConf.global_tools import stateProvider_with_simplified_geom, trackMasterExtrapolator_with_simplified_geom
-from RecoConf.reconstruction_objects import reconstruction
-from RecoConf.hlt2_global_reco import reconstruction as hlt2_reconstruction, make_light_reco_pr_kf
-from RecoConf.hlt2_tracking import (
-    make_TrackBestTrackCreator_tracks,
-    make_PrKalmanFilter_noUT_tracks,
-    make_PrKalmanFilter_Velo_tracks,
-    make_PrKalmanFilter_Seed_tracks,
-)
-from RecoConf.decoders import default_VeloCluster_source
-from RecoConf.event_filters import require_gec
-from Moore.streams import Stream, Streams
-from Hlt2Conf.lines.semileptonic import all_lines as full_lines  # all full-stream lines
-import sys
-
-def alg_config(options: Options):
-    public_tools = [
-        trackMasterExtrapolator_with_simplified_geom(),
-        stateProvider_with_simplified_geom(),
-    ]
-    # NOTE: the TBTC does not apply a chi2 cut because it is applied by the PrKF
-    with reconstruction.bind(from_file=False), hlt2_reconstruction.bind(make_reconstruction=make_light_reco_pr_kf),\
-         require_gec.bind(skipUT=False),\
-         default_VeloCluster_source.bind(bank_type="VPRetinaCluster"),\
-         make_TrackBestTrackCreator_tracks.bind(max_ghost_prob=0.7, max_chi2ndof=sys.float_info.max),\
-         make_PrKalmanFilter_Velo_tracks.bind(max_chi2ndof=5.),\
-         make_PrKalmanFilter_noUT_tracks.bind(max_chi2ndof=4.),\
-         make_PrKalmanFilter_Seed_tracks.bind(max_chi2ndof=6.):
-        config = run_moore(options, make_lines, public_tools)
-    return config
diff --git a/Charm_2024validation/options/hlt2_noUT/make_hlt2_decay.sh b/Charm_2024validation/options/hlt2_noUT/make_hlt2_decay.sh
deleted file mode 100644
index f127b86285..0000000000
--- a/Charm_2024validation/options/hlt2_noUT/make_hlt2_decay.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-cat d0_to_hh.py hlt2.py > hlt2_d0_to_hh.py
-cat d0_to_hhpi0.py hlt2.py > hlt2_d0_to_hhpi0.py
-cat d0_to_hhhh.py hlt2.py > hlt2_d0_to_hhhh.py
-cat d0_to_kshh.py hlt2.py > hlt2_d0_to_kshh.py
-cat d0_to_ksks.py hlt2.py > hlt2_d0_to_ksks.py
-cat d_to_hhh.py hlt2.py > hlt2_d_to_hhh.py
-cat d_to_ksh.py hlt2.py > hlt2_d_to_ksh.py
-cat rare_charm.py hlt2.py > hlt2_rare_charm.py
-cat dst_to_dee.py hlt2.py > hlt2_dst_to_dee.py
diff --git a/Charm_2024validation/options/hlt2_noUT/rare_charm.py b/Charm_2024validation/options/hlt2_noUT/rare_charm.py
deleted file mode 100644
index 39194555f0..0000000000
--- a/Charm_2024validation/options/hlt2_noUT/rare_charm.py
+++ /dev/null
@@ -1,8 +0,0 @@
-################## options ############
-from Moore.lines import Hlt2Line
-from Hlt2Conf.lines.charm.rare_charm_lines import all_lines as rare_charm_lines
-
-def make_lines():
-    mylines = [builder() for builder in rare_charm_lines.values()]
-    mylines += [ Hlt2Line(name="Hlt2MCPassThroughLine", algs=[], prescale=1, persistreco=True) ]
-    return mylines
diff --git a/Charm_2024validation/options/rare_charm.py b/Charm_2024validation/options/rare_charm.py
deleted file mode 100644
index d4d4a5d83d..0000000000
--- a/Charm_2024validation/options/rare_charm.py
+++ /dev/null
@@ -1,496 +0,0 @@
-from .tupling import (
-    make_composite_variables,
-    make_composite_variables_3body,
-    make_DeltaM_variable,
-    make_basic_variables,
-    make_hlt2_event_variables,
-    make_top_isolation_variables,
-    make_basic_isolation_variables,
-    make_intermediate_isolation_variables,
-    make_composite_dtf_variables,
-    make_composite_dtf_variables_3body,
-    make_basic_dtf_variables,
-)
-
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunTuple_Particles as Funtuple
-
-def make_dtf_variables_hmumu(options, pvs, input_data, ptype):
-
-    if ptype not in ["basic", "composite"]:
-        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
-
-    from DecayTreeFitter import DecayTreeFitter
-    
-    DTF = DecayTreeFitter(
-        name=f'DTF_{{hash}}',
-        input_particles=input_data)
-
-    DTFvtx = DecayTreeFitter(
-        name=f'DTFvtx_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    DTFmassDp = DecayTreeFitter(
-        name=f'DTFmassDp_{{hash}}',
-        input_particles=input_data,
-        mass_constraints=["D+"])
-
-    DTFvtxmassDp = DecayTreeFitter(
-        name=f'DTFvtxmassDp_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D+"])
-
-    DTFmassDsp = DecayTreeFitter(
-        name=f'DTFmassDsp_{{hash}}',
-        input_particles=input_data,
-        substitutions = ['D+{{D_s+}}'],
-        mass_constraints=["D_s+"])
-
-    DTFvtxmassDsp = DecayTreeFitter(
-        name=f'DTFvtxmassDsp_{{hash}}',
-        input_particles=input_data,
-        substitutions = ['D+{{D_s+}}',"J/psi(1S){{J/psi(1S)}}"],#trick
-        mass_constraints=["D_s+"],
-        input_pvs=pvs,
-    )
-
-    if ptype == "basic":
-        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassDp,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="Dp")
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassDp,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="Dp")
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassDsp,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="Dsp")
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassDsp,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="Dsp")
-        return dtf_vars
-
-    if ptype == "composite":
-        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassDp,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="Dp")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassDp,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="Dp")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassDsp,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="Dsp")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassDsp,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="Dsp")
-        return dtf_vars
-
-
-def make_dtf_variables_pmumu(options, pvs, input_data, ptype):
-
-    if ptype not in ["basic", "composite"]:
-        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
-
-    from DecayTreeFitter import DecayTreeFitter
-    
-    DTF = DecayTreeFitter(
-        name=f'DTF_{{hash}}',
-        input_particles=input_data)
-
-    DTFvtx = DecayTreeFitter(
-        name=f'DTFvtx_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    DTFmass = DecayTreeFitter(
-        name=f'DTFmass_{{hash}}',
-        input_particles=input_data,
-        mass_constraints=["Lambda_c+"])
-
-    DTFvtxmass = DecayTreeFitter(
-        name=f'DTFvtxmass_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["Lambda_c+"])
-
-    if ptype == "basic":
-        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmass,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="Lc")
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmass,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="Lc")
-        return dtf_vars
-
-    if ptype == "composite":
-        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmass,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="D0")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmass,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="D0")
-        return dtf_vars
-
-def make_dtf_variables_hhmumu(options, pvs, input_data, ptype):
-
-    if ptype not in ["basic", "composite","composite3b"]:
-        Exception(f"I want \'basic\' or \'composite\' or \'composite3b\. Got {ptype}")
-
-    from DecayTreeFitter import DecayTreeFitter
-    
-    DTF = DecayTreeFitter(
-        name=f'DTF_{{hash}}',
-        input_particles=input_data)
-
-    DTFvtx = DecayTreeFitter(
-        name=f'DTFvtx_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    DTFmass = DecayTreeFitter(
-        name=f'DTFmass_{{hash}}',
-        input_particles=input_data,
-        mass_constraints=["D0"])
-
-    DTFvtxmass = DecayTreeFitter(
-        name=f'DTFvtxmass_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0"])
-
-    if ptype == "basic":
-        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmass,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="D0")
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmass,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="D0")
-        return dtf_vars
-
-    if ptype == "composite3b":
-        dtf_vars = make_composite_dtf_variables_3body(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
-                                             DTF=DTFmass,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="D0")
-        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
-                                             DTF=DTFvtxmass,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="D0")
-
-        return dtf_vars
-        
-    if ptype == "composite":
-        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmass,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="D0")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmass,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="D0")
-        return dtf_vars
-
-
-def maketuple_D2pimumu(options, pvs, rec_summary):
-    name = "D2pimumu"
-    turbo_line = "Hlt2Charm_DpDspToPipMumMup"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (J/psi(1S) -> mu- mu+) pi+]CC",
-        "Jpsi" : "[D+ -> ^(J/psi(1S) -> mu- mu+) pi+]CC",
-        "lm"   : "[D+ -> (J/psi(1S) -> ^mu- mu+) pi+]CC",
-        "lp"   : "[D+ -> (J/psi(1S) -> mu- ^mu+) pi+]CC",
-        "hp" : "[D+ -> (J/psi(1S) -> mu- mu+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
-        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation: 
-
-        variables = {
-            "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-            "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2pimumu_WS(options, pvs, rec_summary):
-    name = "D2pimumu_WS"
-    turbo_line = "Hlt2Charm_DpDspToPipMupMup_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (J/psi(1S) -> mu+ mu+) pi+]CC",
-        "Jpsi" : "[D+ -> (J/psi(1S) -> mu+ mu+) pi+]CC",
-        "lp1"   : "[D+ -> (J/psi(1S) -> ^mu+ mu+) pi+]CC",
-        "lp2"   : "[D+ -> (J/psi(1S) -> mu+ ^mu+) pi+]CC",
-        "hp" : "[D+ -> (J/psi(1S) -> mu+ mu+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
-        "lp1"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-        "lp2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation: 
-
-        variables = {
-            "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-            "lp1"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "lp2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2pipipi(options, pvs, rec_summary):
-    name = "CharmRD_D2pipipi"
-    turbo_line = "Hlt2Charm_DpDspToPipPimPip_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (J/psi(1S) -> pi- pi+) pi+]CC",
-        "Jpsi" : "[D+ -> (J/psi(1S) -> pi- pi+) pi+]CC",
-        "lm"   : "[D+ -> (J/psi(1S) -> ^pi- pi+) pi+]CC",
-        "lp"   : "[D+ -> (J/psi(1S) -> pi- ^pi+) pi+]CC",
-        "hp" : "[D+ -> (J/psi(1S) -> pi- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
-        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation: 
-
-        variables = {
-            "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-            "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2piee(options, pvs, rec_summary):
-    name = "D2piee"
-    turbo_line = "Hlt2Charm_DpDspToPipEmEp"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (J/psi(1S) -> e- e+) pi+]CC",
-        "Jpsi" : "[D+ -> ^(J/psi(1S) -> e- e+) pi+]CC",
-        "lm"   : "[D+ -> (J/psi(1S) -> ^e- e+) pi+]CC",
-        "lp"   : "[D+ -> (J/psi(1S) -> e- ^e+) pi+]CC",
-        "hp" : "[D+ -> (J/psi(1S) -> e- e+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
-        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation: 
-
-        variables = {
-            "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-            "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Lc2pmumu(options, pvs, rec_summary):
-    name = "Lc2pmumu"
-    turbo_line = "Hlt2Charm_LcpToPpMumMup"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Lc" : "[Lambda_c+ -> (J/psi(1S) -> mu- mu+) p+]CC",
-        "Jpsi" : "[Lambda_c+ -> ^(J/psi(1S) -> mu- mu+) p+]CC",
-        "lm"   : "[Lambda_c+ -> (J/psi(1S) -> ^mu- mu+) p+]CC",
-        "lp"  : "[Lambda_c+ -> (J/psi(1S) -> mu- ^mu+) p+]CC",
-        "pp" : "[Lambda_c+ -> (J/psi(1S) -> mu- mu+) ^p+]CC",
-    }
-
-    variables = {
-        "Lc"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "pp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation: 
-
-        variables = {
-            "Lc"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-            "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "pp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02Kpimumu_RS(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02Kpimumu_RS"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPipMumMup"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^(D0 -> K- pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
-        "Km"   : "[D*(2010)+ -> (D0 -> ^K- pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
-        "pip"  : "[D*(2010)+ -> (D0 -> K- ^pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
-        "Jpsi"  : "[D*(2010)+ -> (D0 -> K- pi+ ^(J/psi(1S) -> mu- mu+)) pi+]CC",
-        "lm"  : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> ^mu- mu+)) pi+]CC",
-        "lp"  : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> mu- ^mu+)) pi+]CC",
-        "spip" : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> mu- mu+)) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite"),
-        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation: 
-
-        variables = {
-            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
-            "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
-            "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-            "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
diff --git a/Charm_2024validation/options/tupling.py b/Charm_2024validation/options/tupling.py
deleted file mode 100644
index 0c15387275..0000000000
--- a/Charm_2024validation/options/tupling.py
+++ /dev/null
@@ -1,998 +0,0 @@
-##############################################################################
-# (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.                                       #
-###############################################################################
-"""Common configuration functions
-
-"""
-
-import Functors as F
-from Functors.math import log
-import Functors.math as fmath
-
-from FunTuple import FunctorCollection
-from FunTuple.functorcollections import (
-    MCHierarchy,
-    MCPromptDecay,
-    Kinematics,
-    SelectionInfo,
-    HltTisTos,
-    MCVertexInfo,
-    MCKinematics,
-    ParticleID, #wrong variables PID_PI = 0, PROBNN_D = nan
-    EventInfo,
-    LHCInfo,
-    ParticleIsolation,
-    MCPrimaries,
-    MCReconstructed,
-    MCReconstructible,
-)
-
-from DaVinciMCTools import MCTruthAndBkgCat, MCReconstructed, MCReconstructible
-from PyConf.Algorithms import ParticleToSubcombinationsAlg
-from DecayTreeFitter import DecayTreeFitter
-
-Hlt1_global_lines = [
-    "Hlt1GECPassthroughDecision",
-    "Hlt1BeamGasDecision",
-    "Hlt1PassthroughDecision",
-    "Hlt1NoBeamDecision",
-    "Hlt1BeamOneDecision",
-    "Hlt1BeamTwoDecision",
-    "Hlt1BothBeamsDecision",
-    "Hlt1ODINLumiDecision",
-    "Hlt1ODINVeloOpenDecision",
-    "Hlt1ODINNoBiasDecision",
-    "Hlt1VeloMicroBiasDecision",
-    "Hlt1RICH1AlignmentDecision",
-    "Hlt1RICH2AlignmentDecision",
-    "Hlt1BeamGasDecision",
-    "Hlt1L02PPiDecision",
-    "Hlt1LowMassNoipDielectron_massSlice1_promptDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice1_promptDecision",
-    "Hlt1LowMassNoipDielectron_massSlice2_promptDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice2_promptDecision",
-    "Hlt1LowMassNoipDielectron_massSlice3_promptDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice3_promptDecision",
-    "Hlt1LowMassNoipDielectron_massSlice4_promptDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice4_promptDecision",
-    "Hlt1LowMassNoipDielectron_massSlice1_displacedDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice1_displacedDecision",
-    "Hlt1LowMassNoipDielectron_massSlice2_displacedDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice2_displacedDecision",
-    "Hlt1LowMassNoipDielectron_massSlice3_displacedDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice3_displacedDecision",
-    "Hlt1LowMassNoipDielectron_massSlice4_displacedDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice4_displacedDecision",
-]
-Hlt1_1track_lines = [
-    "Hlt1TrackMVADecision",
-    "Hlt1LowPtMuonDecision",
-    "Hlt1SingleHighPtMuonDecision",
-    "Hlt1SingleHighPtMuonNoMuIDDecision",
-    "Hlt1TrackMuonMVADecision",
-    "Hlt1OneMuonTrackLineDecision",
-    "Hlt1TrackElectronMVADecision",
-    "Hlt1SingleHighPtElectronDecision",
-    "Hlt1SingleHighEtDecision",
-]
-Hlt1_lines = Hlt1_1track_lines+[
-    "Hlt1D2KshhDecision",
-    "Hlt1TwoTrackMVACharmXSecDecision",
-    "Hlt1TwoTrackMVADecision",
-    "Hlt1TwoTrackKsDecision",
-    "Hlt1D2KPiDecision",
-    "Hlt1D2KKDecision",
-    "Hlt1D2PiPiDecision",
-    "Hlt1KsToPiPiDecision",
-    "Hlt1LowPtDiMuonDecision",#removed
-    "Hlt1DiMuonNoIPDecision",
-    "Hlt1DiMuonNoIP_ssDecision",
-    "Hlt1DiMuonHighMassDecision",
-    "Hlt1DiMuonLowMassDecision",#replaced by Hlt1DiMuonDisplacedDecision
-    "Hlt1DiMuonSoftDecision",
-    "Hlt1DiMuonDisplacedDecision",
-    "Hlt1TwoKsDecision",
-    "Hlt1D2KPiAlignmentDecision",
-    "Hlt1DiMuonHighMassAlignmentDecision",
-    "Hlt1DisplacedDiMuonAlignmentDecision",
-    "Hlt1DisplacedDielectronDecision",
-    "Hlt1DisplacedLeptonsDecision",#removed
-]
-
-
-Hlt2_lines = [
-    "Hlt2Charm_DstpToD0Pip_D0ToKmPip_XSec",
-    "Hlt2Charm_D0ToKmPip_XSec",
-    "Hlt2Charm_D0ToKmKp",
-    "Hlt2Charm_D0ToKmPip",
-    "Hlt2Charm_D0ToPimPip",
-    "Hlt2Charm_DpDspToKsKp_DD",
-    "Hlt2Charm_DpDspToKsKp_LD",
-    "Hlt2Charm_DpDspToKsKp_LL",
-    "Hlt2Charm_DpDspToKsPip_DD",
-    "Hlt2Charm_DpDspToKsPip_LD",
-    "Hlt2Charm_DpDspToKsPip_LL",
-    "Hlt2Charm_DpToKmPipPip",
-    "Hlt2Charm_DspToKmKpPip",
-    "Hlt2Charm_DpToKmPipPip_NoCuts",
-    "Hlt2Charm_DspToKmKpPip_NoCuts",
-    "Hlt2Charm_DpToKmPipPip_XSec",
-    "Hlt2Charm_DspToKmKpPip_XSec",
-    "Hlt2Charm_DstpToD0Pip_D0ToKmKp",
-    "Hlt2Charm_DstpToD0Pip_D0ToKmPip",
-    "Hlt2Charm_DstpToD0Pip_D0ToKpPim",
-    "Hlt2Charm_DstpToD0Pip_D0ToPimPip",
-    "Hlt2Charm_DstpToD0Pip_D0ToKmPip_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKpPim_LowBias",
-    "Hlt2Charm_D0ToKmPip_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKmKp_LowBias",
-    "Hlt2Charm_D0ToKmKp_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToPimPip_LowBias",
-    "Hlt2Charm_D0ToPimPip_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLL",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLL_Tight",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLDD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLDD_Tight",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDDD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDDD_Tight",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULLL",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULLL_Tight",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULDD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULDD_Tight",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLD_Tight",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDLD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDLD_Tight",
-    "Hlt2Charm_D0ToKsPimPip_LL",
-    "Hlt2Charm_D0ToKsPimPip_DD",
-    "Hlt2Charm_D0ToKsPimPip_LL_LowBias",
-    "Hlt2Charm_D0ToKsPimPip_LL_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_LL",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_DD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_LL_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_DD_LowBias",
-    "Hlt2Charm_D0ToKsKmPip_LL",
-    "Hlt2Charm_D0ToKsKmPip_DD",
-    "Hlt2Charm_D0ToKsKmPip_LL_LowBias",
-    "Hlt2Charm_D0ToKsKmPip_LL_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_LL",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_DD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_LL_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_DD_LowBias",
-    "Hlt2Charm_D0ToKsKpPim_LL",
-    "Hlt2Charm_D0ToKsKpPim_DD",
-    "Hlt2Charm_D0ToKsKpPim_LL_LowBias",
-    "Hlt2Charm_D0ToKsKpPim_DD_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_LL",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_DD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_LL_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_DD_LowBias",
-    "Hlt2Charm_D0ToKsKmKp_LL",
-    "Hlt2Charm_D0ToKsKmKp_DD",
-    "Hlt2Charm_D0ToKsKmKp_LL_LowBias",
-    "Hlt2Charm_D0ToKsKmKp_DD_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_LL",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_DD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_LL_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_DD_LowBias",
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS',
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS',
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS_MVA',
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS_MVA',
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS',
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS',
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS_MVA',
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS_MVA',
-    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS',
-    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS',
-    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS_MVA',
-    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS_MVA',
-]
-
-def make_composite_variables(options, pvs, data, add_truth=True, add_Hlt1TisTos=True):
-    if not options.simulation:
-        add_truth = False
-    variables = (
-        FunctorCollection(
-            {
-                "MAXPT": F.MAX(F.PT),
-                "MINPT": F.MIN(F.PT),
-                "SUMPT": F.SUM(F.PT),
-                "MAXP": F.MAX(F.P),
-                "MINP": F.MIN(F.P),
-                "BPVDIRA": F.BPVDIRA(pvs),
-                "VCHI2DOF": F.CHI2DOF,
-                #"VNDOF": F.NDOF,
-                "BPVFDCHI2": F.BPVFDCHI2(pvs),
-                "BPVFD": F.BPVFD(pvs),
-                "BPVVDRHO": F.BPVVDRHO(pvs),
-                "BPVVDZ": F.BPVVDZ(pvs),
-                "BPVIPCHI2": F.BPVIPCHI2(pvs),
-                "BPVIP": F.BPVIP(pvs),
-                "LOGBPVIPCHI2": log(F.BPVIPCHI2(pvs)),
-                "BPVLTIME": F.BPVLTIME(pvs),
-                "MAXBPVIPCHI2": F.MAX(F.BPVIPCHI2(pvs)),
-                "MINBPVIPCHI2": F.MIN(F.BPVIPCHI2(pvs)),
-                "MAXBPVIP": F.MAX(F.BPVIP(pvs)),
-                "MINBPVIP": F.MIN(F.BPVIP(pvs)),
-                "MAXDOCACHI2": F.MAXDOCACHI2,
-                "MAXDOCA": F.MAXDOCA,
-                "MAXSDOCACHI2": F.MAXSDOCACHI2,
-                "MAXSDOCA": F.MAXSDOCA,
-                "ETA": F.ETA,
-                "PHI": F.PHI,
-                "END_VX": F.END_VX,
-                "END_VY": F.END_VY,
-                "END_VZ": F.END_VZ,
-                "END_VX_ERR":F.SQRT @ F.CALL(0,0) @ F.POS_COV_MATRIX @ F.ENDVERTEX,
-                "END_VY_ERR":F.SQRT @ F.CALL(1,1) @ F.POS_COV_MATRIX @ F.ENDVERTEX,
-                "END_VZ_ERR":F.SQRT @ F.CALL(2,2) @ F.POS_COV_MATRIX @ F.ENDVERTEX,
-                "BPVX": F.BPVX(pvs),
-                "BPVY": F.BPVY(pvs),
-                "BPVZ": F.BPVZ(pvs),
-                "BPVX_ERR": F.SQRT @ F.CALL(0,0) @ F.POS_COV_MATRIX @ F.BPV(pvs),
-                "BPVY_ERR": F.SQRT @ F.CALL(1,1) @ F.POS_COV_MATRIX @ F.BPV(pvs),
-                "BPVZ_ERR": F.SQRT @ F.CALL(2,2) @ F.POS_COV_MATRIX @ F.BPV(pvs),
-                "ALLPVFD"     : F.ALLPV_FD(pvs),
-                "ALLPVIP"     : F.ALLPV_IP(pvs),
-                "OBJECT_KEY": F.OBJECT_KEY,
-            }
-        )
-        + Kinematics()
-        #+ ParticleID(extra_info=True) #only for daughters
-    )
-
-    if add_Hlt1TisTos:
-        variables += HltTisTos(
-            selection_type="Hlt1", trigger_lines=Hlt1_lines, data=data
-        )
-
-    if add_truth:
-        variables = add_truth_matching_functors(
-            options,
-            variables,
-            data,
-            hierarchy=True,
-            kinematics=True,
-            vertex_info=True,
-            bkgcat=True,
-        )
-
-    return variables
-
-def make_tistoscombinations(options, pvs, data):
-    algo_output = ParticleToSubcombinationsAlg( Input=data )
-    relations = algo_output.OutputRelations
-
-    tistos_variables_extra = HltTisTos(
-        selection_type="Hlt1", trigger_lines=["Hlt1TwoTrackMVADecision"], data=algo_output.OutputParticles
-    )
-    tistos_combinations = {}
-    for k,v in tistos_variables_extra.get_thor_functors().items():
-        tistos_combinations[k + "_SUBCOMB" ] = F.MAP_INPUT_ARRAY( v, relations )
-    tistos_combinations = FunctorCollection( tistos_combinations )
-
-    return tistos_combinations
-
-def make_composite_variables_3body(options, pvs, data, add_truth=True):
-
-    variables = (
-        FunctorCollection(
-            {
-                #12
-                "M12": F.SUBCOMB(Functor=F.MASS, Indices=(1, 2)),
-                "SDOCA12"     : F.SDOCA(Child1=1,Child2=2),
-                "SDOCACHI212" : F.SDOCACHI2(Child1=1,Child2=2),
-                "DOCA12"      : F.DOCA(Child1=1,Child2=2),
-                "DOCACHI212"  : F.DOCACHI2(Child1=1,Child2=2),
-                "COS12": F.ALV(1, 2),
-                #"ETA12": F.SUBCOMB(Functor=F.ETA, Indices=(1, 2)),
-                #"PT12": F.SUBCOMB(Functor=F.PT, Indices=(1, 2)),
-                #"VCHI212": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(1, 2)),
-                #"END_VZ12": F.SUBCOMB(Functor=F.END_VZ, Indices=(1, 2)),
-                #"BPVZ12": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(1, 2)),
-                #"BPVCORRM12": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(1, 2)),
-                #13
-                "M13": F.SUBCOMB(Functor=F.MASS, Indices=(1, 3)),
-                "SDOCA13"     : F.SDOCA(Child1=1,Child2=3),
-                "SDOCACHI213" : F.SDOCACHI2(Child1=1,Child2=3),
-                "DOCA13"      : F.DOCA(Child1=1,Child2=3),
-                "DOCACHI213"  : F.DOCACHI2(Child1=1,Child2=3),
-                "COS13": F.ALV(1, 3),
-                #"ETA13": F.SUBCOMB(Functor=F.ETA, Indices=(1, 3)),
-                #"PT13": F.SUBCOMB(Functor=F.PT, Indices=(1, 3)),
-                #"VCHI213": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(1, 3)),
-                #"END_VZ13": F.SUBCOMB(Functor=F.END_VZ, Indices=(1, 3)),
-                #"BPVZ13": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(1, 3)),
-                #"BPVCORRM13": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(1, 3)),
-                #23
-                "M23": F.SUBCOMB(Functor=F.MASS, Indices=(2, 3)),
-                "SDOCA23"     : F.SDOCA(Child1=2,Child2=3),
-                "SDOCACHI223" : F.SDOCACHI2(Child1=2,Child2=3),
-                "DOCA23"      : F.DOCA(Child1=2,Child2=3),
-                "DOCACHI223"  : F.DOCACHI2(Child1=2,Child2=3),
-                "COS23": F.ALV(2, 3),
-                #"ETA23": F.SUBCOMB(Functor=F.ETA, Indices=(2, 3)),
-                #"PT23": F.SUBCOMB(Functor=F.PT, Indices=(2, 3)),
-                #"VCHI223": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(2, 3)),
-                #"END_VZ23": F.SUBCOMB(Functor=F.END_VZ, Indices=(2, 3)),
-                #"BPVZ23": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(2, 3)),
-                #"BPVCORRM23": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(2, 3)),
-            }
-        )
-    )
-    return make_composite_variables(options, pvs, data, add_truth)+make_tistoscombinations(options, pvs, data)+variables
-
-def make_composite_variables_4body(options, pvs, data, add_truth=True):
-
-    variables = (
-        FunctorCollection(
-            {
-                #14
-                "M14": F.SUBCOMB(Functor=F.MASS, Indices=(1, 4)),
-                "SDOCA14"     : F.SDOCA(Child1=1,Child2=4),
-                "SDOCACHI214" : F.SDOCACHI2(Child1=1,Child2=4),
-                "DOCA14"      : F.DOCA(Child1=1,Child2=4),
-                "DOCACHI214"  : F.DOCACHI2(Child1=1,Child2=4),
-                "COS14": F.ALV(1, 4),
-                #"ETA14": F.SUBCOMB(Functor=F.ETA, Indices=(1, 4)),
-                #"PT14": F.SUBCOMB(Functor=F.PT, Indices=(1, 4)),
-                #"VCHI214": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(1, 4)),
-                #"END_VZ14": F.SUBCOMB(Functor=F.END_VZ, Indices=(1, 4)),
-                #"BPVZ14": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(1, 4)),
-                #"BPVCORRM14": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(1, 4)),
-                #24
-                "M24": F.SUBCOMB(Functor=F.MASS, Indices=(2, 4)),
-                "SDOCA24"     : F.SDOCA(Child1=2,Child2=4),
-                "SDOCACHI224" : F.SDOCACHI2(Child1=2,Child2=4),
-                "DOCA24"      : F.DOCA(Child1=2,Child2=4),
-                "DOCACHI224"  : F.DOCACHI2(Child1=2,Child2=4),
-                "COS24": F.ALV(2, 4),
-                #"ETA24": F.SUBCOMB(Functor=F.ETA, Indices=(2, 4)),
-                #"PT24": F.SUBCOMB(Functor=F.PT, Indices=(2, 4)),
-                #"VCHI224": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(2, 4)),
-                #"END_VZ24": F.SUBCOMB(Functor=F.END_VZ, Indices=(2, 4)),
-                #"BPVZ24": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(2, 4)),
-                #"BPVCORRM24": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(2, 4)),
-                #34
-                "M34": F.SUBCOMB(Functor=F.MASS, Indices=(3, 4)),
-                "SDOCA34"     : F.SDOCA(Child1=3,Child2=4),
-                "SDOCACHI234" : F.SDOCACHI2(Child1=3,Child2=4),
-                "DOCA34"      : F.DOCA(Child1=3,Child2=4),
-                "DOCACHI234"  : F.DOCACHI2(Child1=3,Child2=4),
-                "COS34": F.ALV(3, 4),
-                #"ETA34": F.SUBCOMB(Functor=F.ETA, Indices=(3, 4)),
-                #"PT34": F.SUBCOMB(Functor=F.PT, Indices=(3, 4)),
-                #"VCHI234": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(3, 4)),
-                #"END_VZ34": F.SUBCOMB(Functor=F.END_VZ, Indices=(3, 4)),
-                #"BPVZ34": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(3, 4)),
-                #"BPVCORRM34": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(3, 4)),
-            }
-        )
-    )
-    return make_composite_variables_3body(options, pvs, data, add_truth)+variables #make_tistoscombinations already included
-
-def make_b_composite_variables(options, pvs, data, add_truth=True):
-    
-    # define helper functors
-    get_child = F.CHILD(1, F.FORWARDARG0) # change here the index of the child
-    get_SV =  F.ENDVERTEX @ F.FORWARDARG0
-    get_SV_pos = F.TOLINALG @ F.POSITION @ get_SV # only if composite (i.e. has vertex)
-    get_child_endvtx_pos = F.ENDVERTEX_POS  @ get_child
-    get_fdvec_child = get_child_endvtx_pos - get_SV_pos
-
-    # define observables
-    IP_wrt_SV = F.VALUE_OR(-1) @F.IP.bind(get_SV_pos , get_child)
-    IPCHI2_wrt_SV = F.VALUE_OR(-1) @ F.IPCHI2.bind(get_SV , get_child) # only if child is composite (i.e. has vertex)
-    FD_wrt_SV = F.VALUE_OR(-1) @ F.MAGNITUDE @ get_fdvec_child
-    FDCHI2_wrt_SV = F.VALUE_OR(-1) @ F.VTX_FDCHI2.bind(get_SV, get_child)
-
-    
-    variables = FunctorCollection(
-        {       
-            "ID": F.PARTICLE_ID ,
-            "PT": F.PT,
-            "P": F.P,
-            "MASS": F.MASS,
-            "CHILD1_IPwrtSV": IP_wrt_SV,
-            "CHILD1_IPCHI2wrtSV": IPCHI2_wrt_SV,
-            "CHILD1_FDwrtSV": FD_wrt_SV,
-            "CHILD1_FDCHI2wrtSV": FDCHI2_wrt_SV,
-            "PX": F.PX,
-            "PY": F.PY,
-            "PZ": F.PZ,
-            "END_VCHI2DOF": F.VALUE_OR(-1) @F.CHI2DOF @ F.ENDVERTEX,
-            "BPVCHI2DOF": F.VALUE_OR(-1) @F.CHI2DOF @ F.BPV(pvs),
-            # B2OC generic B hadron NN Hlt2 algorithm,
-            # not planning to use it directly for B2OC EM
-            "MVA": F.MVA(
-                MVAType="SigmaNet",
-                Config={
-                    "File":
-                    "paramfile://data/Hlt2B2OC_B_SigmaNet_Run3-v1.json",
-                    "Name":
-                    "B2OC_SigmaNet_Generic",
-                    "Lambda":
-                    "2.0",
-                    "NLayers":
-                    "3",
-                    "InputSize":
-                    "6",
-                    "Monotone_Constraints":
-                    "[1,-1,-1,-1,-1,-1]",
-                    "Variables":
-                    "log_B_PT,B_ETA,log_B_DIRA,log_B_ENDVERTEX_CHI2,log_B_IPCHI2_OWNPV,log_B_IP_OWNPV",
-                },
-                Inputs={
-                    "log_B_PT": fmath.log(F.PT),
-                    "B_ETA": F.ETA,
-                    "log_B_DIRA": fmath.log(1. - F.BPVDIRA(pvs)),
-                    "log_B_ENDVERTEX_CHI2": fmath.log(F.CHI2DOF),
-                    "log_B_IPCHI2_OWNPV": fmath.log(F.BPVIPCHI2(pvs)),
-                    "log_B_IP_OWNPV": fmath.log(F.BPVIP(pvs)),
-                }),
-            #'SSPionBDT_Mistag': F.SSPionBDT_Mistag(sspionTagging.OutputFlavourTags),
-            #'SSPionBDT_Decision': F.SSPionBDT_Decision(sspionTagging.OutputFlavourTags),
-
-        }
-    )
-    return make_composite_variables(options, pvs, data, add_truth)+make_tistoscombinations(options, pvs, data)+variables
-
-def make_DeltaM_variable(options):
-    return FunctorCollection({"DM": F.MASS - F.CHILD(1, F.MASS)})
-
-def make_basic_variables(options, pvs, data, add_truth=True, islong=False):
-    if not options.simulation:
-        add_truth = False
-    variables = (
-        FunctorCollection(
-            {
-                "TRCHI2DOF": F.VALUE_OR(-1) @ F.CHI2DOF @ F.TRACK,
-                "ETA": F.ETA,
-                "PHI": F.PHI,
-                "TRGHOSTPROB": F.GHOSTPROB,
-                "BPVIPCHI2": F.BPVIPCHI2(pvs),
-                "BPVIP": F.BPVIP(pvs),
-                "BPVX": F.BPVX(pvs),
-                "BPVY": F.BPVY(pvs),
-                "BPVZ": F.BPVZ(pvs),
-                "TX"          : F.TX,
-                "TY"          : F.TY,
-                "MINIPCHI2"   : F.MINIPCHI2(pvs),
-                "MINIP"       : F.MINIP(pvs),
-                "KEY"         : F.VALUE_OR(-1) @ F.OBJECT_KEY @ F.TRACK,
-                "ISMUON"      : F.ISMUON,
-                "TRACKPT": F.TRACK_PT,
-                "TRACKHISTORY": F.VALUE_OR(-1) @ F.TRACKHISTORY @ F.TRACK,
-                "QOVERP": F.VALUE_OR(-1) @ F.QOVERP @ F.TRACK,
-                "NDOF": F.VALUE_OR(-1) @ F.NDOF @ F.TRACK,
-                "NFTHITS": F.VALUE_OR(-1) @ F.NFTHITS @ F.TRACK,
-                "NHITS": F.VALUE_OR(-1) @ F.NHITS @ F.TRACK,
-                "NUTHITS": F.VALUE_OR(-1) @ F.NUTHITS @ F.TRACK,
-                "NVPHITS": F.VALUE_OR(-1) @ F.NVPHITS @ F.TRACK,
-                #"NMUONHITS": F.VALUE_OR(-1) @ F.NHITSMUONS @ F.TRACK, #https://gitlab.cern.ch/lhcb/Rec/-/merge_requests/3756
-                "TRACKHASVELO": F.VALUE_OR(-1) @ F.TRACKHASVELO @ F.TRACK,
-                "TRACKHASUT": F.VALUE_OR(-1) @ F.TRACKHASUT @ F.TRACK,
-                "OBJECT_KEY": F.OBJECT_KEY,
-                "HASBREM": F.HASBREM,
-                "BREMENERGY": F.BREMENERGY,
-                "BREMBENDCORR": F.BREMBENDCORR,
-            }
-        )
-        + Kinematics()
-        + ParticleID(extra_info=True)
-    )
-
-    if islong:
-        variables += FunctorCollection({
-            "CTBX": F.VALUE_OR(F.NaN) @ F.X_COORDINATE @ F.POSITION @ F.CLOSESTTOBEAM @ F.TRACK,#X_COORDINATE @ POSITION @ CLOSESTTOBEAM @ TRACK
-            "CTBY": F.VALUE_OR(F.NaN) @ F.Y_COORDINATE @ F.POSITION @ F.CLOSESTTOBEAM @ F.TRACK,
-            "CTBZ": F.VALUE_OR(F.NaN) @ F.Z_COORDINATE @ F.POSITION @ F.CLOSESTTOBEAM @ F.TRACK,
-        })
-    
-    variables += HltTisTos(
-        selection_type="Hlt1", trigger_lines=Hlt1_1track_lines, data=data
-    )
-    
-    if add_truth:
-        variables = add_truth_matching_functors(
-            options,
-            variables,
-            data,
-            hierarchy=True,
-            kinematics=True,
-            vertex_info=True,
-            bkgcat=False,
-        )
-
-    return variables
-
-def make_hlt2_event_variables(options, pvs, rec_summary):
-    # define event level variables
-    evt_variables = EventInfo()
-    if not options.simulation:
-        evt_variables += LHCInfo() #FillNumber
-    evt_variables += SelectionInfo(selection_type="Hlt2", trigger_lines=Hlt2_lines)
-    evt_variables += SelectionInfo(selection_type="Hlt1", trigger_lines=Hlt1_global_lines)
-    evt_variables += FunctorCollection(
-        {
-            "ALLPVX": F.ALLPVX(pvs),
-            "ALLPVY": F.ALLPVY(pvs),
-            "ALLPVZ": F.ALLPVZ(pvs),
-            "ALLPVNDOF": F.MAP(F.VALUE_OR(-1) @ F.NDOF) @ F.TES(pvs),
-            "ALLPVCHI2": F.MAP(F.VALUE_OR(-1) @ F.CHI2) @ F.TES(pvs),
-            "nPVs": F.SIZE(pvs),
-            "nTracks": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nTracks"),
-            "nLongTracks": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nLongTracks"),
-            "nMuonTracks": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nMuonTracks"),
-            "nFTClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nFTClusters"),
-            "nVPClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nVPClusters"),
-            "nUTClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nUTClusters"),
-            "nSPDhits": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nSPDhits"),
-            "nEcalClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nEcalClusters"),
-            "nEcalClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nEcalClusters"),
-            "eCalTot": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "eCalTot"),
-            "hCalTot": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "hCalTot"),
-            "nRich1Hits": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nRich1Hits"),
-            "nRich2Hits": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nRich2Hits"),
-        }
-    )
-    return evt_variables
-
-def add_truth_matching_functors(
-    options,
-    variables,
-    data,
-    hierarchy=True,
-    kinematics=True,
-    vertex_info=True,
-    bkgcat=False,
-    prompt_info=True,
-):
-    """Add MC truth matching functors to an existing FunctorCollection.
-
-    Args:
-        options (DaVinci.Options): DaVinci options object.
-        variables (FunctorCollection): FunctorCollection to modify
-        data: data handle
-        hierarchy (bool): Add MCHierarchy info (default True)
-        kinematics (bool): Add MCKinematics info (default True)
-        vertex_info (bool): Add MCVertexInfo (default True)
-        bkgcat (bool): Add TRUEKEY and BKGCAT functors - intended for composite particles (default False)
-        prompt_info (bool): Add MCPromptDecay info (default True)
-
-    Returns:
-        FunctorCollection: modified FunctorCollection with truth matched variables.
-    """
-    assert (
-        options.simulation
-    ), "options.simulation is set to False - it doesn't make sense to add truth matching."
-
-    MCTRUTH = MCTruthAndBkgCat(data)
-
-    if bkgcat:
-        variables += FunctorCollection(
-            {
-                # Important note: specify an invalid value for integer functors if there exists no truth info.
-                #                 The invalid value for floating point functors is set to nan.
-                "TRUEKEY": F.VALUE_OR(-1) @ MCTRUTH(F.OBJECT_KEY),
-                "BKGCAT": MCTRUTH.BkgCat,
-            }
-        )
-    if hierarchy:
-        variables += MCHierarchy(mctruth_alg=MCTRUTH)  # likely to change again!!
-    if vertex_info:
-        variables += MCVertexInfo(mctruth_alg=MCTRUTH)  # likely to change again!!
-    if kinematics:
-        variables += MCKinematics(mctruth_alg=MCTRUTH)  # likely to change again!!
-    if prompt_info:
-        variables += MCPromptDecay(mctruth_alg=MCTRUTH)
-
-    return variables
-
-### DTF variables ###
-
-def make_basic_dtf_variables(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name="", islong=False):
-    variables = (
-        FunctorCollection(
-            {
-                "TRCHI2DOF": F.VALUE_OR(-1) @ F.CHI2DOF @ F.TRACK,
-                "ETA": F.ETA,
-                "PHI": F.PHI,
-                "TRGHOSTPROB": F.GHOSTPROB,
-                "BPVIPCHI2": F.BPVIPCHI2(pvs),
-                "BPVIP": F.BPVIP(pvs),
-                "BPVX": F.BPVX(pvs),
-                "BPVY": F.BPVY(pvs),
-                "BPVZ": F.BPVZ(pvs),
-                "TX"          : F.TX,
-                "TY"          : F.TY,
-                "MINIPCHI2"   : F.MINIPCHI2(pvs),
-                "MINIP"       : F.MINIP(pvs),
-                "KEY"         : F.VALUE_OR(-1) @ F.OBJECT_KEY @ F.TRACK,
-                "TRACKPT": F.TRACK_PT,
-                "TRACKHISTORY": F.VALUE_OR(-1) @ F.TRACKHISTORY @ F.TRACK,
-                "QOVERP": F.VALUE_OR(-1) @ F.QOVERP @ F.TRACK,
-                "NDOF": F.VALUE_OR(-1) @ F.NDOF @ F.TRACK,
-            }
-        )
-        + Kinematics()
-    )
-
-    if islong:
-        variables += FunctorCollection({
-            "CTBX": F.VALUE_OR(F.NaN) @ F.X_COORDINATE @ F.POSITION @ F.CLOSESTTOBEAM @ F.TRACK,#X_COORDINATE @ POSITION @ CLOSESTTOBEAM @ TRACK
-            "CTBY": F.VALUE_OR(F.NaN) @ F.Y_COORDINATE @ F.POSITION @ F.CLOSESTTOBEAM @ F.TRACK,
-            "CTBZ": F.VALUE_OR(F.NaN) @ F.Z_COORDINATE @ F.POSITION @ F.CLOSESTTOBEAM @ F.TRACK,
-        })
-    
-    if(mass_constraint):
-        if(pv_constraint): # MASS + PV
-            dtf_variables_mass_pv = FunctorCollection({
-                        'DTF_PV_M'+ particle_name + '_' + k: DTF(v)
-                        for k, v in variables.get_thor_functors().items()
-                    })
-            return dtf_variables_mass_pv
-        else: # MASS
-            dtf_variables_mass = FunctorCollection(
-                {'DTF_M'+ particle_name + '_' + k: DTF(v)
-                 for k, v in variables.get_thor_functors().items()})
-        return dtf_variables_mass
-
-    elif(pv_constraint): # PV
-        dtf_variables_pv = FunctorCollection({
-                'DTF_PV_' + k: DTF(v)
-                for k, v in variables.get_thor_functors().items()
-            })
-        return dtf_variables_pv
-
-    else: # NO MASS/PV
-        dtf_variables = FunctorCollection(
-            {'DTF_' + k: DTF(v)
-             for k, v in variables.get_thor_functors().items()})
-        return dtf_variables
-
-def make_composite_dtf_variables(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name=""):
-    variables = (
-        FunctorCollection(
-            {
-                "MAXPT": F.MAX(F.PT),
-                "MINPT": F.MIN(F.PT),
-                "SUMPT": F.SUM(F.PT),
-                "MAXP": F.MAX(F.P),
-                "MINP": F.MIN(F.P),
-                "BPVDIRA": F.BPVDIRA(pvs),
-                "VCHI2DOF": F.CHI2DOF, #CHI2VXNDOF
-                "BPVFDCHI2": F.BPVFDCHI2(pvs),
-                "BPVFD": F.BPVFD(pvs),
-                "BPVVDRHO": F.BPVVDRHO(pvs),
-                "BPVVDZ": F.BPVVDZ(pvs),
-                "BPVIPCHI2": F.BPVIPCHI2(pvs),
-                "BPVIP": F.BPVIP(pvs),
-                "LOGBPVIPCHI2": log(F.BPVIPCHI2(pvs)),
-                "BPVLTIME": F.BPVLTIME(pvs),
-                "MAXBPVIPCHI2": F.MAX(F.BPVIPCHI2(pvs)), #MAX_
-                "MINBPVIPCHI2": F.MIN(F.BPVIPCHI2(pvs)),
-                "MAXBPVIP": F.MAX(F.BPVIP(pvs)),
-                "MINBPVIP": F.MIN(F.BPVIP(pvs)),
-                "ETA": F.ETA,
-                "PHI": F.PHI,
-                "END_VX": F.END_VX, #END_
-                "END_VY": F.END_VY,
-                "END_VZ": F.END_VZ,
-                "BPVX": F.BPVX(pvs),
-                "BPVY": F.BPVY(pvs),
-                "BPVZ": F.BPVZ(pvs),
-                "ALLPVFD"     : F.ALLPV_FD(pvs),
-                "ALLPVIP"     : F.ALLPV_IP(pvs),
-                
-            }
-        )
-        + Kinematics()
-    )
-
-    addstring = "DTF"
-    if(pv_constraint):
-            addstring += '_PV'
-    if(mass_constraint):
-            addstring += '_M'
-    addstring += particle_name
-
-    DTF_chi2ndof = FunctorCollection(
-            {
-                addstring+"_DTFCHI2": DTF.CHI2,
-                addstring+"_DTFNDOF": DTF.NDOF,
-                addstring+"_CTAU": DTF.CTAU,
-                addstring+"_CTAUERR": DTF.CTAUERR,
-                addstring+"_MERR": DTF.MASSERR,
-            }
-    )
-
-    if(mass_constraint):
-        if(pv_constraint): # MASS + PV
-            dtf_variables_mass_pv = FunctorCollection({
-                        'DTF_PV_M'+ particle_name + '_' + k: DTF(v)
-                        for k, v in variables.get_thor_functors().items()
-                    })
-            return dtf_variables_mass_pv+DTF_chi2ndof
-        else: # MASS
-            dtf_variables_mass = FunctorCollection(
-                {'DTF_M'+ particle_name + '_' + k: DTF(v)
-                 for k, v in variables.get_thor_functors().items()})
-        return dtf_variables_mass+DTF_chi2ndof
-
-    elif(pv_constraint): # PV
-        dtf_variables_pv = FunctorCollection({
-                'DTF_PV_' + k: DTF(v)
-                for k, v in variables.get_thor_functors().items()
-            })
-        return dtf_variables_pv+DTF_chi2ndof
-
-    else: # NO MASS/PV
-        dtf_variables = FunctorCollection(
-            {'DTF_' + k: DTF(v)
-             for k, v in variables.get_thor_functors().items()})
-        return dtf_variables+DTF_chi2ndof
-
-def make_composite_dtf_variables_3body(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name=""):
-    variables = (
-        FunctorCollection(
-            {
-                "M13": F.SUBCOMB(Functor=F.MASS, Indices=(1, 3)),
-                "M23": F.SUBCOMB(Functor=F.MASS, Indices=(2, 3)),
-            }
-        )
-    )
-
-    if(mass_constraint):
-        if(pv_constraint): # MASS + PV
-            dtf_variables_mass_pv = FunctorCollection({
-                        'DTF_PV_M'+ particle_name + '_' + k: DTF(v)
-                        for k, v in variables.get_thor_functors().items()
-                    })
-            return dtf_variables_mass_pv+make_composite_dtf_variables(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
-        else: # MASS
-            dtf_variables_mass = FunctorCollection(
-                {'DTF_M'+ particle_name + '_' + k: DTF(v)
-                 for k, v in variables.get_thor_functors().items()})
-        return dtf_variables_mass+make_composite_dtf_variables(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
-
-    elif(pv_constraint): # PV
-        dtf_variables_pv = FunctorCollection({
-                'DTF_PV_' + k: DTF(v)
-                for k, v in variables.get_thor_functors().items()
-            })
-        return dtf_variables_pv+make_composite_dtf_variables(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
-
-    else: # NO MASS/PV
-        dtf_variables = FunctorCollection(
-            {'DTF_' + k: DTF(v)
-             for k, v in variables.get_thor_functors().items()})
-
-    return dtf_variables+make_composite_dtf_variables(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
-
-def make_composite_dtf_variables_4body(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name=""):
-    variables = (
-        FunctorCollection(
-            {
-                "M14": F.SUBCOMB(Functor=F.MASS, Indices=(1, 4)),
-                "M24": F.SUBCOMB(Functor=F.MASS, Indices=(2, 4)),
-                "M34": F.SUBCOMB(Functor=F.MASS, Indices=(3, 4)),
-            }
-        )
-    )
-
-    if(mass_constraint):
-        if(pv_constraint): # MASS + PV
-            dtf_variables_mass_pv = FunctorCollection({
-                        'DTF_PV_M'+ particle_name + '_' + k: DTF(v)
-                        for k, v in variables.get_thor_functors().items()
-                    })
-            return dtf_variables_mass_pv+make_composite_dtf_variables_3body(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
-        else: # MASS
-            dtf_variables_mass = FunctorCollection(
-                {'DTF_M'+ particle_name + '_' + k: DTF(v)
-                 for k, v in variables.get_thor_functors().items()})
-        return dtf_variables_mass+make_composite_dtf_variables_3body(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
-
-    elif(pv_constraint): # PV
-        dtf_variables_pv = FunctorCollection({
-                'DTF_PV_' + k: DTF(v)
-                for k, v in variables.get_thor_functors().items()
-            })
-        return dtf_variables_pv+make_composite_dtf_variables_3body(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
-
-    else: # NO MASS/PV
-        dtf_variables = FunctorCollection(
-            {'DTF_' + k: DTF(v)
-             for k, v in variables.get_thor_functors().items()})
-    
-        return dtf_variables+make_composite_dtf_variables_3body(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
-
-
-def make_MC_basic_variables():
-    MC_MOTHER_ID = lambda gen: F.VALUE_OR(0) @ F.MC_MOTHER(gen, F.PARTICLE_ID)
-    MC_MOTHER_KEY = lambda gen: F.VALUE_OR(-1) @ F.MC_MOTHER(gen, F.OBJECT_KEY)
-
-    variables = (
-        FunctorCollection(
-            {
-                "END_VX": F.END_VX,
-                "END_VY": F.END_VY,
-                "END_VZ": F.END_VZ,
-                "OBJECT_KEY": F.OBJECT_KEY,
-                "ETA": F.ETA,
-                "PHI": F.PHI,
-                "ORIGIN_VX": F.ORIGIN_VX,
-                "ORIGIN_VY": F.ORIGIN_VY,
-                "ORIGIN_VZ": F.ORIGIN_VZ,
-                "FOURMOMENTUM": F.FOURMOMENTUM,
-                "TRUEID": F.PARTICLE_ID,
-                "MC_MOTHER_ID": MC_MOTHER_ID(1),
-                "MC_MOTHER_KEY": MC_MOTHER_KEY(1),
-                "MC_GD_MOTHER_ID": MC_MOTHER_ID(2),
-                "MC_GD_MOTHER_KEY": MC_MOTHER_KEY(2),
-                "MC_GD_GD_MOTHER_ID": MC_MOTHER_ID(3),
-                "MC_GD_GD_MOTHER_KEY": MC_MOTHER_KEY(3),
-            }
-        )
-        + Kinematics()
-    )
-
-
-    from PyConf.reading import get_mc_particles, get_pp2mcp_relations, get_mc_track_info
-    MC_data = get_mc_particles("/Event/HLT2/MC/Particles")
-    relations_charged = get_pp2mcp_relations("/Event/HLT2/Relations/ChargedPP2MCP")
-    relations_neutral = get_pp2mcp_relations("/Event/HLT2/Relations/NeutralPP2MCP")
-    mcreconstructed_all = MCReconstructed(
-        input_mcparticles=MC_data,
-        use_best_mcmatch=True,
-        relations_charged=relations_charged,
-        relations_neutral=relations_neutral,
-    )
-    mcreconstructible_all = MCReconstructible(
-        input_mctrackinfo=get_mc_track_info()
-    )
-    import FunTuple.functorcollections as FC
-    vars_reconstructed = FC.MCReconstructed(mcreconstructed_alg=mcreconstructed_all, extra_info=True)
-    vars_reconstructible = FC.MCReconstructible(mcreconstructible_alg=mcreconstructible_all, extra_info=True)
-
-
-    return variables+vars_reconstructed+vars_reconstructible
-
-def make_MC_composite_variables():
-    MC_MOTHER_ID = lambda gen: F.VALUE_OR(0) @ F.MC_MOTHER(gen, F.PARTICLE_ID)
-    MC_MOTHER_KEY = lambda gen: F.VALUE_OR(-1) @ F.MC_MOTHER(gen, F.OBJECT_KEY)
-
-    variables = (
-        FunctorCollection(
-            {
-                "END_VX": F.END_VX,
-                "END_VY": F.END_VY,
-                "END_VZ": F.END_VZ,
-                "LTIME": F.MC_LIFETIME,
-                "OBJECT_KEY": F.OBJECT_KEY,
-                "ETA": F.ETA,
-                "PHI": F.PHI,
-                "ORIGIN_VX": F.ORIGIN_VX,
-                "ORIGIN_VY": F.ORIGIN_VY,
-                "ORIGIN_VZ": F.ORIGIN_VZ,
-                "FOURMOMENTUM": F.FOURMOMENTUM,
-                "TRUEID": F.PARTICLE_ID,
-                "MC_MOTHER_ID": MC_MOTHER_ID(1),
-                "MC_MOTHER_KEY": MC_MOTHER_KEY(1),
-                "MC_GD_MOTHER_ID": MC_MOTHER_ID(2),
-                "MC_GD_MOTHER_KEY": MC_MOTHER_KEY(2),
-                "MC_GD_GD_MOTHER_ID": MC_MOTHER_ID(3),
-                "MC_GD_GD_MOTHER_KEY": MC_MOTHER_KEY(3),
-            }
-        )
-        + Kinematics()
-        + MCPromptDecay()
-        )
-
-    return variables
-
-def make_MC_event_variables(mc_header):
-    # define event level variables
-    evt_variables = EventInfo()
-    evt_variables += MCPrimaries(mc_header=mc_header)
-
-    return evt_variables
-
-def make_top_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"]):
-    from PyConf.reading import get_particles
-    from IsolationTools import VertexAndConeIsolation
-
-    possible_charm_locations = ["LongTrackIso", "TTrackIso", "DownstreamTrackIso", "UpstreamTrackIso", "NeutralIso", "PizIso"]
-    coneangles = [0.25,0.5,1.,1.5,2.]
-
-    count = 0
-    for location in locations:
-        extra_particles = get_particles(f"/Event/HLT2/{hlt2_line}/{location}/Particles")
-
-        for coneangle in coneangles:
-            top_RTAlg = VertexAndConeIsolation(
-                name=location+"_"+str(coneangle),
-                reference_particles=input_data,
-                related_particles=extra_particles,
-                cut=F.DR2<coneangle)
-
-            if count == 0:
-                top_iso_variables = ParticleIsolation(isolation_alg=top_RTAlg,array_indx_name='indx')
-            else:
-                top_iso_variables += ParticleIsolation(isolation_alg=top_RTAlg,array_indx_name='indx')
-            count += 1
-
-
-    return top_iso_variables
-
-def make_basic_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"]):
-    from PyConf.reading import get_particles
-    from IsolationTools import VertexAndConeIsolation
-    from PyConf.Algorithms import ThOrParticleSelection
-
-    basic_code = (F.FILTER(F.ALL) @ F.GET_ALL_BASICS())
-    basic_particles = ThOrParticleSelection(InputParticles=input_data, Functor=basic_code).OutputSelection
-
-    possible_charm_locations = ["LongTrackIso", "TTrackIso", "DownstreamTrackIso", "UpstreamTrackIso", "NeutralIso", "PizIso"]
-    coneangles = [0.25,0.5,1.,1.5,2.]
-
-    count = 0
-    for location in locations:
-        extra_particles = get_particles(f"/Event/HLT2/{hlt2_line}/{location}/Particles")
-
-        for coneangle in coneangles:
-            basic_RTAlg = VertexAndConeIsolation(
-                name=location+"_"+str(coneangle),
-                reference_particles=basic_particles,
-                related_particles=extra_particles,
-                cut=F.DR2<coneangle)
-
-            if count == 0:
-                basic_iso_variables = ParticleIsolation(isolation_alg=basic_RTAlg,array_indx_name='indx')
-            else:
-                basic_iso_variables += ParticleIsolation(isolation_alg=basic_RTAlg,array_indx_name='indx')
-            count += 1
-
-
-    return basic_iso_variables
-
-
-def make_intermediate_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"], composite_ID = "J/psi(1S)"):
-    from PyConf.reading import get_particles
-    from IsolationTools import VertexAndConeIsolation
-    from PyConf.Algorithms import ThOrParticleSelection
-
-    intermediate_code = F.FILTER(F.IS_ABS_ID(composite_ID)) @ F.GET_ALL_DESCENDANTS()
-    intermediate_particles = ThOrParticleSelection(InputParticles=input_data, Functor=intermediate_code).OutputSelection
-
-    possible_charm_locations = ["LongTrackIso", "TTrackIso", "DownstreamTrackIso", "UpstreamTrackIso", "NeutralIso", "PizIso"]
-    coneangles = [0.25,0.5,1.,1.5,2.]
-
-    count = 0
-    for location in locations:
-        extra_particles = get_particles(f"/Event/HLT2/{hlt2_line}/{location}/Particles")
-
-        for coneangle in coneangles:
-            intermediate_RTAlg = VertexAndConeIsolation(
-                name=location+"_"+str(coneangle),
-                reference_particles=intermediate_particles,
-                related_particles=extra_particles,
-                cut=F.DR2<coneangle)
-
-            if count == 0:
-                intermediate_iso_variables = ParticleIsolation(isolation_alg=intermediate_RTAlg,array_indx_name='indx')
-            else:
-                intermediate_iso_variables += ParticleIsolation(isolation_alg=intermediate_RTAlg,array_indx_name='indx')
-            count += 1
-
-
-    return intermediate_iso_variables
diff --git a/Charm_2024validation/tmp.yaml b/Charm_2024validation/tmp.yaml
deleted file mode 100644
index 80dfd6ef7f..0000000000
--- a/Charm_2024validation/tmp.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
-( '27186011', 'dst_to_dee', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27185021', 'dst_to_dee', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27184011', 'dst_to_dee', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27186011', 'dst_to_dee', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '27185021', 'dst_to_dee', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '27184011', 'dst_to_dee', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-( '27186011', 'dst_to_dee', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '27185021', 'dst_to_dee', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '27184011', 'dst_to_dee', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '27186011', 'dst_to_dee', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27185021', 'dst_to_dee', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27184011', 'dst_to_dee', '1p6', '1.6', '2024', '.Q1.2', 'dddb-20240427'),
-
-( '27165900', 'd0_to_ksks', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-
-( '27163102', 'd0_to_hh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163101', 'd0_to_hh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163100', 'd0_to_hh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '23103042', 'd_to_hhh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '23263022', 'd_to_hhh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163471', 'd0_to_hhpi0', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '27165903', 'd0_to_kshh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-( '27165071', 'd0_to_hhhh', '4p3', '4.3', '2024', '.Q1.2', 'dddb-20240427'),
-
-
-( '27163471', 'd0_to_hhpi0', '7p6', '7.6', '2024', '.Q1.2', 'dddb-20240427'),
-( '27163471', 'd0_to_hhpi0', '5p7', '5.7', '2024', '.Q1.2', 'dddb-20240427'),
-- 
GitLab


From 78ac770ef9281e11fc257b03ee145ef82a8183ab Mon Sep 17 00:00:00 2001
From: Donata Osthues <donata.osthues@cern.ch>
Date: Mon, 28 Oct 2024 13:15:03 +0100
Subject: [PATCH 30/51] new main directory naming convention

---
 Charm_2024raredecays/._.DS_Store            |  Bin 4096 -> 0 bytes
 Charm_2024raredecays/._info.yaml            |  Bin 4096 -> 0 bytes
 Charm_2024raredecays/info.yaml              |   60 --
 Charm_2024raredecays/main_Lb_to_Lcl.py      |   45 -
 Charm_2024raredecays/main_Lc_to_pll.py      |   55 -
 Charm_2024raredecays/main_d0_to_hhhh.py     |   50 -
 Charm_2024raredecays/main_d0_to_hhll.py     |   49 -
 Charm_2024raredecays/main_d_to_hhh.py       |   55 -
 Charm_2024raredecays/main_d_to_hll.py       |   53 -
 Charm_2024raredecays/options/._Lc_to_pll.py |  Bin 4096 -> 0 bytes
 Charm_2024raredecays/options/Lb_to_Lcl.py   |  166 ---
 Charm_2024raredecays/options/Lc_to_pll.py   |  385 -------
 Charm_2024raredecays/options/d0_to_hhhh.py  |  450 ---------
 Charm_2024raredecays/options/d0_to_hhll.py  |  204 ----
 Charm_2024raredecays/options/d_to_hhh.py    |  204 ----
 Charm_2024raredecays/options/d_to_hll.py    |  156 ---
 Charm_2024raredecays/options/rare_charm.py  |  501 ---------
 Charm_2024raredecays/options/tupling.py     | 1003 -------------------
 18 files changed, 3436 deletions(-)
 delete mode 100644 Charm_2024raredecays/._.DS_Store
 delete mode 100644 Charm_2024raredecays/._info.yaml
 delete mode 100644 Charm_2024raredecays/info.yaml
 delete mode 100644 Charm_2024raredecays/main_Lb_to_Lcl.py
 delete mode 100644 Charm_2024raredecays/main_Lc_to_pll.py
 delete mode 100644 Charm_2024raredecays/main_d0_to_hhhh.py
 delete mode 100644 Charm_2024raredecays/main_d0_to_hhll.py
 delete mode 100644 Charm_2024raredecays/main_d_to_hhh.py
 delete mode 100644 Charm_2024raredecays/main_d_to_hll.py
 delete mode 100644 Charm_2024raredecays/options/._Lc_to_pll.py
 delete mode 100644 Charm_2024raredecays/options/Lb_to_Lcl.py
 delete mode 100644 Charm_2024raredecays/options/Lc_to_pll.py
 delete mode 100644 Charm_2024raredecays/options/d0_to_hhhh.py
 delete mode 100644 Charm_2024raredecays/options/d0_to_hhll.py
 delete mode 100644 Charm_2024raredecays/options/d_to_hhh.py
 delete mode 100644 Charm_2024raredecays/options/d_to_hll.py
 delete mode 100644 Charm_2024raredecays/options/rare_charm.py
 delete mode 100644 Charm_2024raredecays/options/tupling.py

diff --git a/Charm_2024raredecays/._.DS_Store b/Charm_2024raredecays/._.DS_Store
deleted file mode 100644
index cb1f0ba4f31de76c88aa8b5e45c4706fffaecfc6..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 4096
zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDJkFz{^v(m+1nBL)UWIhYCu0iY;W;207T
z1eBNu(ZNuGRne&6Xb6mkz-S1JhQMeDjE2By2#kinXb6mkz-S1JhQMeDP&ot`f#!iQ
z7|4ZWWELwFr55Lx7A2=Dq~#Z7D`e)Cq~?`m=I15m<Wwr;q^6Z9B;_RLWdpmqP+dcs
PLiIn~D>4jn|NjF3f4UuX

diff --git a/Charm_2024raredecays/._info.yaml b/Charm_2024raredecays/._info.yaml
deleted file mode 100644
index 0f756bdd37f2360438c41f725d75a1d78577905f..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 4096
zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDJkFz{^v(m+1nBL)UWIUt(=a103v0xFS!
z=wMg?WDB5aVFdD_;!?@^xq68O1v#mDIf=z3rNyZ!DTyVi$^pS3J({t9(?Il#($~@;
zdK8R?z-S1JhQMeDjE2By2#kinXb6mkz-S1JhQMeDjD`TN5CC;HK^P3=LNYRo6^c@e
z^Gl18Qx($ki?S6m^GZ_lN;32F5_57Y6>?J3N)(cE67#ZwePO7sAx)wBAMO<y2D$(L
E0c!#(V*mgE

diff --git a/Charm_2024raredecays/info.yaml b/Charm_2024raredecays/info.yaml
deleted file mode 100644
index 0e4e9d964b..0000000000
--- a/Charm_2024raredecays/info.yaml
+++ /dev/null
@@ -1,60 +0,0 @@
-# copied and adapted from: 
-# file        = AnalysisProductions/Charm_2024validation/info.yaml 
-# commit_hash = fdeac57133d09d7a6b39698dcca54154069928c2
-
-
-defaults:
-  inform:
-      - donata.osthues@cern.ch
-  wg: Charm
-
-
-{%- set conditions = [
-  "MagDown",
-  "MagUp",
-]%}
-
-
-{%- set subsamples = [
-  "d0_to_hhll",
-  "d_to_hll",
-  "d0_to_hhhh",
-  "d_to_hhh",
-  "Lb_to_Lcl",
-  "Lc_to_pll",
-]%}
-
-{% for id in subsamples %}
-{% for polarity in conditions %}
-
-{{id}}_2024_{{ polarity }}:
-  application: "DaVinci/v64r7@x86_64_v2-el9-clang16-opt"
-  input:
-    bk_query: "/LHCb/Collision24/Beam6800GeV-VeloClosed-{{polarity}}/Real Data/Sprucing24c2/94000000/CHARM.DST"
-
-    dq_flags:
-      - UNCHECKED
-      - OK
-    keep_running: true
-  output: DVTUPLE_{{id}}.ROOT
-  options:
-    entrypoint: Charm_2024raredecays.main_{{id}}:main
-    extra_options:
-      input_raw_format: 0.5
-      input_type: ROOT
-      simulation: False
-      data_type: "Upgrade"
-      event_store: HiveWhiteBoard
-      geometry_version: run3/2024.Q1.2-v00.00
-      conditions_version: master
-      input_process: "TurboPass"
-      input_stream: "charm"
-      evt_max: -1
-      compression:
-        algorithm: ZSTD
-        level: 1
-        max_buffer_size: 1048576
-
-
-{%- endfor %}
-{%- endfor %}
diff --git a/Charm_2024raredecays/main_Lb_to_Lcl.py b/Charm_2024raredecays/main_Lb_to_Lcl.py
deleted file mode 100644
index cfe2518b8b..0000000000
--- a/Charm_2024raredecays/main_Lb_to_Lcl.py
+++ /dev/null
@@ -1,45 +0,0 @@
-# copied and adapted from: 
-# file        = AnalysisProductions/Charm_2024validation/main_rare_charm.py 
-# commit_hash = fdeac57133d09d7a6b39698dcca54154069928c2
-
-
-
-###############################################################################
-# (c) Copyright 2021-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 .options.Lb_to_Lcl import *
-
-from DaVinci import Options, make_config
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-        
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-        # muonic channels
-        "Lc2pmumu"   : maketuple_Lb2Lcmu_Lc2pmumu(options, pvs, rec_summary),
-        "Lc2pee"     : maketuple_Lb2Lcmu_Lc2pee(options, pvs, rec_summary),
-        "Lc2KSp_LL"  : maketuple_Lb2Lcmu_Lc2KSp_LL(options, pvs, rec_summary),
-        "Lc2KSp_DD"  : maketuple_Lb2Lcmu_Lc2KSp_DD(options, pvs, rec_summary),
-    }
-
-    #MCtuples = {
-    #}
-    
-    #if options.simulation:
-    #    tuples = tuples | MCtuples
-        
-    config = make_config(options, tuples)
-
-    return config
\ No newline at end of file
diff --git a/Charm_2024raredecays/main_Lc_to_pll.py b/Charm_2024raredecays/main_Lc_to_pll.py
deleted file mode 100644
index 3472a739d0..0000000000
--- a/Charm_2024raredecays/main_Lc_to_pll.py
+++ /dev/null
@@ -1,55 +0,0 @@
-# copied and adapted from: 
-# file        = AnalysisProductions/Charm_2024validation/main_rare_charm.py 
-# commit_hash = fdeac57133d09d7a6b39698dcca54154069928c2
-
-
-
-###############################################################################
-# (c) Copyright 2021-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 .options.Lc_to_pll import *
-
-from DaVinci import Options, make_config
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-        
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-        # baryonic channels
-        "D2pimumu_OS" : maketuple_Lc2pmumu(options, pvs, rec_summary),
-        "D2pimumu_SS" : maketuple_Lc2pmumu_SS(options, pvs, rec_summary),
-        "D2Kmumu_OS"  : maketuple_Lc2pee(options, pvs, rec_summary),
-        "D2Kmumu_SS"  : maketuple_Lc2pee_SS(options, pvs, rec_summary),
-        "Lc2pmue_OSep" : maketuple_Lc2pmue_OS(options, pvs, rec_summary, mupem = False),
-        "Lc2pmue_OSem" : maketuple_Lc2pmue_OS(options, pvs, rec_summary, mupem = True),
-        "D2pimumu_SS" : maketuple_Lc2pmue_SS(options, pvs, rec_summary),
-        # control channel
-        "D2Kmumu_OS"  : maketuple_Lc2pmumu_WS(options, pvs, rec_summary),
-        "D2Kmumu_SS"  : maketuple_Lc2pee_WS(options, pvs, rec_summary),
-        "D2Kmumu_OS"  : maketuple_Lc2pmue_WS(options, pvs, rec_summary),
-        "D2Kmumu_SS"  : maketuple_Lc2ppipi(options, pvs, rec_summary),
-        "D2Kmumu_SS"  : maketuple_Lc2KSp_LL(options, pvs, rec_summary),
-        "D2Kmumu_SS"  : maketuple_Lc2KSp_DD(options, pvs, rec_summary),
-    }
-
-    #MCtuples = {
-    #}
-    
-    #if options.simulation:
-    #    tuples = tuples | MCtuples
-        
-    config = make_config(options, tuples)
-
-    return config
\ No newline at end of file
diff --git a/Charm_2024raredecays/main_d0_to_hhhh.py b/Charm_2024raredecays/main_d0_to_hhhh.py
deleted file mode 100644
index a903ef6a36..0000000000
--- a/Charm_2024raredecays/main_d0_to_hhhh.py
+++ /dev/null
@@ -1,50 +0,0 @@
-# copied and adapted from: 
-# file        = AnalysisProductions/Charm_2024validation/main_rare_charm.py 
-# commit_hash = fdeac57133d09d7a6b39698dcca54154069928c2
-
-
-
-###############################################################################
-# (c) Copyright 2021-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 .options.d0_to_hhhh import *
-
-from DaVinci import Options, make_config
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-        
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-        "DstToD0pi_D0ToKKPiPi"      : maketuple_DstToD0pi_D0ToKKPiPi(options, pvs, rec_summary),
-        "DstToD0pi_D0ToKPiPiPi_RS"  : maketuple_DstToD0pi_D0ToKPiPiPi_RS(options, pvs, rec_summary),
-        "DstToD0pi_D0ToKPiPiPi_WS"  : maketuple_DstToD0pi_D0ToKPiPiPi_WS(options, pvs, rec_summary),
-        "DstToD0pi_D0ToPiPiPiPi"    : maketuple_DstToD0pi_D0ToPiPiPiPi(options, pvs, rec_summary),
-        "Dst2D0pi_D02pipimumu_WSp"  : maketuple_Dst2D0pi_D02pipimumu_WS(options, pvs, rec_summary, pim = False),
-        "Dst2D0pi_D02pipimumu_WSm"  : maketuple_Dst2D0pi_D02pipimumu_WS(options, pvs, rec_summary, pim = True),
-        "Dst2D0pi_D02KKmumu_WSp"    : maketuple_Dst2D0pi_D02KKmumu_WS(options, pvs, rec_summary, Km = False),
-        "Dst2D0pi_D02KKmumu_WSm"    : maketuple_Dst2D0pi_D02KKmumu_WS(options, pvs, rec_summary, Km = True),
-        "Dst2D0pi_D02Kpimumu_WSp"   : maketuple_Dst2D0pi_D02Kpimumu_WS(options, pvs, rec_summary, Km = False),
-        "Dst2D0pi_D02Kpimumu_WSm"   : maketuple_Dst2D0pi_D02Kpimumu_WS(options, pvs, rec_summary, Km = True),
-    }
-
-    #MCtuples = {
-    #}
-    
-    #if options.simulation:
-    #    tuples = tuples | MCtuples
-        
-    config = make_config(options, tuples)
-
-    return config
diff --git a/Charm_2024raredecays/main_d0_to_hhll.py b/Charm_2024raredecays/main_d0_to_hhll.py
deleted file mode 100644
index 42f7a98d3d..0000000000
--- a/Charm_2024raredecays/main_d0_to_hhll.py
+++ /dev/null
@@ -1,49 +0,0 @@
-# copied and adapted from: 
-# file        = AnalysisProductions/Charm_2024validation/main_rare_charm.py 
-# commit_hash = fdeac57133d09d7a6b39698dcca54154069928c2
-
-
-
-###############################################################################
-# (c) Copyright 2021-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 .options.d0_to_hhll import *
-
-from DaVinci import Options, make_config
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-        
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-        "Dst2D0pi_D02pipimumu"   : maketuple_Dst2D0pi_D02pipimumu(options, pvs, rec_summary),
-        "Dst2D0pi_D02KKmumu"     : maketuple_Dst2D0pi_D02KKmumu(options, pvs, rec_summary),
-        "Dst2D0pi_D02Kpimumu_RS" : maketuple_Dst2D0pi_D02Kpimumu_RS(options, pvs, rec_summary),
-        "Dst2D0pi_D02Kpimumu_WS" : maketuple_Dst2D0pi_D02Kpimumu_WS(options, pvs, rec_summary),
-        "D02Kpimumu"             : maketuple_D02Kpimumu(options, pvs, rec_summary),
-        #"DstToD0pi_D0ToKKPiPi"   : maketuple_DstToD0pi_D0ToKKPiPi(options, pvs, rec_summary),
-        #"DstToD0pi_D0ToKPiPiPi"  : maketuple_DstToD0pi_D0ToKPiPiPi(options, pvs, rec_summary),
-        #"DstToD0pi_D0ToPiKPiPi"  : maketuple_DstToD0pi_D0ToPiKPiPi(options, pvs, rec_summary),
-        #"DstToD0pi_D0ToPiPiPiPi" : maketuple_DstToD0pi_D0ToPiPiPiPi(options, pvs, rec_summary),
-    }
-
-    #MCtuples = {
-    #}
-    
-    #if options.simulation:
-    #    tuples = tuples | MCtuples
-        
-    config = make_config(options, tuples)
-
-    return config
diff --git a/Charm_2024raredecays/main_d_to_hhh.py b/Charm_2024raredecays/main_d_to_hhh.py
deleted file mode 100644
index e63fd33665..0000000000
--- a/Charm_2024raredecays/main_d_to_hhh.py
+++ /dev/null
@@ -1,55 +0,0 @@
-# copied and adapted from: 
-# file        = AnalysisProductions/Charm_2024validation/main_rare_charm.py 
-# commit_hash = fdeac57133d09d7a6b39698dcca54154069928c2
-
-
-
-###############################################################################
-# (c) Copyright 2021-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 .options.d_to_hhh import *
-
-from DaVinci import Options, make_config
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-        
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-        # muonic channels
-        "D2pimumu_WS" : maketuple_D2pimumu_WS(options, pvs, rec_summary),
-        "D2Kmumu_WS"  : maketuple_D2Kmumu_WS(options, pvs, rec_summary),
-        "D2Kpipi"     : maketuple_D2Kpipi(options, pvs, rec_summary),
-        "D2pipipi"    : maketuple_D2pipipi(options, pvs, rec_summary),
-        "D2KSK_LL"    : maketuple_D2KSK_LL(options, pvs, rec_summary),
-        "D2KSpi_LL"   : maketuple_D2KSpi_LL(options, pvs, rec_summary),
-
-        # control channels
-        #"D2Kpipi" : maketuple_D2Kpipi(options, pvs, rec_summary),
-        #"D2pipipi" : maketuple_D2pipipi(options, pvs, rec_summary),
-        #"D2pipiK" : maketuple_D2pipiK(options, pvs, rec_summary),
-        #"D2KKK" : maketuple_D2KKK(options, pvs, rec_summary),
-        #"D2piKK" : maketuple_D2piKK(options, pvs, rec_summary),
-
-    }
-
-    #MCtuples = {
-    #}
-    
-    #if options.simulation:
-    #    tuples = tuples | MCtuples
-        
-    config = make_config(options, tuples)
-
-    return config
\ No newline at end of file
diff --git a/Charm_2024raredecays/main_d_to_hll.py b/Charm_2024raredecays/main_d_to_hll.py
deleted file mode 100644
index ddc8525162..0000000000
--- a/Charm_2024raredecays/main_d_to_hll.py
+++ /dev/null
@@ -1,53 +0,0 @@
-# copied and adapted from: 
-# file        = AnalysisProductions/Charm_2024validation/main_rare_charm.py 
-# commit_hash = fdeac57133d09d7a6b39698dcca54154069928c2
-
-
-
-###############################################################################
-# (c) Copyright 2021-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 .options.d_to_hll import *
-
-from DaVinci import Options, make_config
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-        
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-        # muonic channels
-        "D2pimumu_OS" : maketuple_D2pimumu_OS(options, pvs, rec_summary),
-        "D2pimumu_SS" : maketuple_D2pimumu_SS(options, pvs, rec_summary),
-        "D2Kmumu_OS"  : maketuple_D2Kmumu_OS(options, pvs, rec_summary),
-        "D2Kmumu_SS"  : maketuple_D2Kmumu_SS(options, pvs, rec_summary),
-
-        # control channels
-        #"D2Kpipi" : maketuple_D2Kpipi(options, pvs, rec_summary),
-        #"D2pipipi" : maketuple_D2pipipi(options, pvs, rec_summary),
-        #"D2pipiK" : maketuple_D2pipiK(options, pvs, rec_summary),
-        #"D2KKK" : maketuple_D2KKK(options, pvs, rec_summary),
-        #"D2piKK" : maketuple_D2piKK(options, pvs, rec_summary),
-
-    }
-
-    #MCtuples = {
-    #}
-    
-    #if options.simulation:
-    #    tuples = tuples | MCtuples
-        
-    config = make_config(options, tuples)
-
-    return config
\ No newline at end of file
diff --git a/Charm_2024raredecays/options/._Lc_to_pll.py b/Charm_2024raredecays/options/._Lc_to_pll.py
deleted file mode 100644
index 8974e17ea96fdde85b81948b0451b2fdcef7a1cd..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 4096
zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDJkFz{^v(m+1nBL)UWIUt(=a103vVqnnK
zfaqXY08}o3riBs6hl)!j=jZAr78K;9>g6OBmy{N#rlcg6q$&plgY@JH2&RK*|0U`&
zAbJ#xhQMeDjE2By2#kinXb6mkz-S1JhQMeDjE2By2#kgRt`GoqHbEE+<U%qsixrAe
zi}Op1l2aAZ@{6(+GV@AO^GY)F^AdA%Div~4(@GSQauV~hfqh}9t|3jK`XBBU83wuk
F{{e)pD1ZO}

diff --git a/Charm_2024raredecays/options/Lb_to_Lcl.py b/Charm_2024raredecays/options/Lb_to_Lcl.py
deleted file mode 100644
index f62e0e60b1..0000000000
--- a/Charm_2024raredecays/options/Lb_to_Lcl.py
+++ /dev/null
@@ -1,166 +0,0 @@
-# copied and adapted from: 
-# file        = AnalysisProductions/CharmRD/maketuple_D02Kmumu.py 
-# commit_hash = 73c8c844eb343b39ffc6b274fcdf2d196bfd7016
-
-
-from .tupling import (
-    make_composite_variables,
-    make_composite_variables_3body,
-    make_basic_variables,
-    make_hlt2_event_variables,
-    make_basic_dtf_variables,
-    make_composite_dtf_variables,
-    make_basic_isolation_variables,
-    make_intermediate_isolation_variables,
-    make_top_isolation_variables,
-)
-
-from .rare_charm import (
-    make_dtf_variables_hmumu,
-    make_dtf_variables_pmumu,
-    make_dtf_variables_hhmumu,
-)
-
-import Functors as F
-from Functors.math import log
-from DaVinci import Options, make_config
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunctorCollection
-from PyConf.reading import get_particles, get_pvs
-import FunTuple.functorcollections as FC
-from FunTuple import FunTuple_Particles as Funtuple
-
-from DecayTreeFitter import DecayTreeFitter
-
-
-def maketuple_Lb2Lcmu_Lc2pmumu(options, pvs, rec_summary):
-    name = "Lb2Lcmu_Lc2pmumu"
-    turbo_line = "Hlt2Charm_B2LcpMum_LcpToPpMumMup"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Lb"     : "[Lambda_b0 -> (Lambda_c+ -> (J/psi(1S) -> mu- mu+) p+) mu-]CC",
-        "Lc"     : "[Lambda_b0 -> ^(Lambda_c+ -> (J/psi(1S) -> mu- mu+) p+) mu-]CC",
-        "Jpsi"   : "[Lambda_b0 -> (Lambda_c+ -> ^(J/psi(1S) -> mu- mu+) p+) mu-]CC",
-        "lm"     : "[Lambda_b0 -> (Lambda_c+ -> (J/psi(1S) -> ^mu- mu+) p+) mu-]CC",
-        "lp"     : "[Lambda_b0 -> (Lambda_c+ -> (J/psi(1S) -> mu- ^mu+) p+) mu-]CC",
-        "pp"     : "[Lambda_b0 -> (Lambda_c+ -> (J/psi(1S) -> mu- mu+) ^p+) mu-]CC",
-        "mumtag" : "[Lambda_b0 -> (Lambda_c+ -> (J/psi(1S) -> mu- mu+) p+) ^mu-]CC",
-
-    }
-
-    variables = {
-        "Lb"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lm"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "lp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "mumtag" : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-
-
-def maketuple_Lb2Lcmu_Lc2pee(options, pvs, rec_summary):
-    name = "Lb2Lcmu_Lc2pee"
-    turbo_line = "Hlt2Charm_B2LcpMum_LcpToPpEmEp"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Lb"     : "[Lambda_b0 -> (Lambda_c+ -> (J/psi(1S) -> e- e+) p+) mu-]CC",
-        "Lc"     : "[Lambda_b0 -> ^(Lambda_c+ -> (J/psi(1S) -> e- e+) p+) mu-]CC",
-        "Jpsi"   : "[Lambda_b0 -> (Lambda_c+ -> ^(J/psi(1S) -> e- e+) p+) mu-]CC",
-        "lm"     : "[Lambda_b0 -> (Lambda_c+ -> (J/psi(1S) -> ^e- e+) p+) mu-]CC",
-        "lp"     : "[Lambda_b0 -> (Lambda_c+ -> (J/psi(1S) -> e- ^e+) p+) mu-]CC",
-        "pp"     : "[Lambda_b0 -> (Lambda_c+ -> (J/psi(1S) -> e- e+) ^p+) mu-]CC",
-        "mumtag" : "[Lambda_b0 -> (Lambda_c+ -> (J/psi(1S) -> e- e+) p+) ^mu-]CC",
-
-    }
-
-    variables = {
-        "Lb"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lm"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "lp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "mumtag" : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-
-
-
-def maketuple_Lb2Lcmu_Lc2KSp_LL(options, pvs, rec_summary):
-    name = "Lb2Lcmu_Lc2KSp_LL"
-    turbo_line = "Hlt2Charm_B2LcpMumX_LcpToKsPp_LL_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Lb"    : "[Lambda_b0 -> (Lambda_c+ -> (KS0 -> pi- pi+) p+) mu-]CC",
-        "Lc"    : "[Lambda_b0 -> ^(Lambda_c+ -> (KS0 -> pi- pi+) p+) mu-]CC",
-        "KS0"   : "[Lambda_b0 -> (Lambda_c+ -> ^(KS0 -> pi- pi+) p+) mu-]CC",
-        "pim"   : "[Lambda_b0 -> (Lambda_c+ -> (KS0 -> ^pi- pi+) p+) mu-]CC",
-        "pip"   : "[Lambda_b0 -> (Lambda_c+ -> (KS0 -> pi- ^pi+) p+) mu-]CC",
-        "pp"    : "[Lambda_b0 -> (Lambda_c+ -> (KS0 -> pi- pi+) ^p+) mu-]CC",
-        "mum"   : "[Lambda_b0 -> (Lambda_c+ -> (KS0 -> pi- pi+) p+) ^mu-]CC",
-    }
-
-    variables = {
-        "Lb"    : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
-        "Lc"    : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
-        "KS0"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
-        "pim"   : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "pip"   : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "pp"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "mum"   : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-
-
-
-def maketuple_Lb2Lcmu_Lc2KSp_DD(options, pvs, rec_summary):
-    name = "Lb2Lcmu_Lc2KSp_DD"
-    turbo_line = "Hlt2Charm_B2LcpMumX_LcpToKsPp_DD_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Lb"    : "[Lambda_b0 -> (Lambda_c+ -> (KS0 -> pi- pi+) p+) mu-]CC",
-        "Lc"    : "[Lambda_b0 -> ^(Lambda_c+ -> (KS0 -> pi- pi+) p+) mu-]CC",
-        "KS0"   : "[Lambda_b0 -> (Lambda_c+ -> ^(KS0 -> pi- pi+) p+) mu-]CC",
-        "pim"   : "[Lambda_b0 -> (Lambda_c+ -> (KS0 -> ^pi- pi+) p+) mu-]CC",
-        "pip"   : "[Lambda_b0 -> (Lambda_c+ -> (KS0 -> pi- ^pi+) p+) mu-]CC",
-        "pp"    : "[Lambda_b0 -> (Lambda_c+ -> (KS0 -> pi- pi+) ^p+) mu-]CC",
-        "mum"   : "[Lambda_b0 -> (Lambda_c+ -> (KS0 -> pi- pi+) p+) ^mu-]CC",
-    }
-
-    variables = {
-        "Lb"    : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
-        "Lc"    : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
-        "KS0"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
-        "pim"   : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "pip"   : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "pp"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "mum"   : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
diff --git a/Charm_2024raredecays/options/Lc_to_pll.py b/Charm_2024raredecays/options/Lc_to_pll.py
deleted file mode 100644
index f93dc3cd67..0000000000
--- a/Charm_2024raredecays/options/Lc_to_pll.py
+++ /dev/null
@@ -1,385 +0,0 @@
-# copied and adapted from: 
-# file        = AnalysisProductions/CharmRD/maketuple_D02Kmumu.py 
-# commit_hash = 73c8c844eb343b39ffc6b274fcdf2d196bfd7016
-
-
-from .tupling import (
-    make_composite_variables,
-    make_composite_variables_3body,
-    make_basic_variables,
-    make_hlt2_event_variables,
-    make_basic_dtf_variables,
-    make_composite_dtf_variables,
-    make_basic_isolation_variables,
-    make_intermediate_isolation_variables,
-    make_top_isolation_variables,
-)
-
-from .rare_charm import (
-    make_dtf_variables_hmumu,
-    make_dtf_variables_pmumu,
-    make_dtf_variables_hhmumu,
-)
-
-import Functors as F
-from Functors.math import log
-from DaVinci import Options, make_config
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunctorCollection
-from PyConf.reading import get_particles, get_pvs
-import FunTuple.functorcollections as FC
-from FunTuple import FunTuple_Particles as Funtuple
-
-from DecayTreeFitter import DecayTreeFitter
-
-
-
-def maketuple_Lc2pmumu(options, pvs, rec_summary):
-    name = "Lc2pmumu"
-    turbo_line = "Hlt2Charm_LcpToPpMumMup"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Lc"   : "[Lambda_c+ -> (J/psi(1S) -> mu- mu+) p+]CC",
-        "Jpsi" : "[Lambda_c+ -> ^(J/psi(1S) -> mu- mu+) p+]CC",
-        "lm"   : "[Lambda_c+ -> (J/psi(1S) -> ^mu- mu+) p+]CC",
-        "lp"   : "[Lambda_c+ -> (J/psi(1S) -> mu- ^mu+) p+]CC",
-        "pp"   : "[Lambda_c+ -> (J/psi(1S) -> mu- mu+) ^p+]CC",
-    }
-
-    variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lm"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "lp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-
-
-def maketuple_Lc2pmumu_SS(options, pvs, rec_summary):
-    name = "Lc2pmumu_SS"
-    turbo_line = "Hlt2Charm_LcpToPmMupMup"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Lc"   : "[Lambda_c+ -> (J/psi(1S) -> mu+ mu+) p~-]CC",
-        "Jpsi" : "[Lambda_c+ -> ^(J/psi(1S) -> mu+ mu+) p~-]CC",
-        "lp1"  : "[Lambda_c+ -> (J/psi(1S) -> ^mu+ mu+) p~-]CC",
-        "lp2"  : "[Lambda_c+ -> (J/psi(1S) -> mu+ ^mu+) p~-]CC",
-        "pm"   : "[Lambda_c+ -> (J/psi(1S) -> mu+ mu+) ^p~-]CC",
-    }
-
-    variables = {
-        "Lc"    : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lp1"   : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "lp2"   : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "pm"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-
-
-def maketuple_Lc2pee(options, pvs, rec_summary):
-    name = "Lc2pee"
-    turbo_line = "Hlt2Charm_LcpToPpEmEp"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Lc"   : "[Lambda_c+ -> (J/psi(1S) -> e- e+) p+]CC",
-        "Jpsi" : "[Lambda_c+ -> ^(J/psi(1S) -> e- e+) p+]CC",
-        "lm"   : "[Lambda_c+ -> (J/psi(1S) -> ^e- e+) p+]CC",
-        "lp"   : "[Lambda_c+ -> (J/psi(1S) -> e- ^e+) p+]CC",
-        "pp"   : "[Lambda_c+ -> (J/psi(1S) -> e- e+) ^p+]CC",
-    }
-
-    variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lm"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "lp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-
-
-def maketuple_Lc2pee_SS(options, pvs, rec_summary):
-    name = "Lc2pee_SS"
-    turbo_line = "Hlt2Charm_LcpToPmEpEp"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Lc"    : "[Lambda_c+ -> (J/psi(1S) -> e+ e+) p~-]CC",
-        "Jpsi"  : "[Lambda_c+ -> ^(J/psi(1S) -> e+ e+) p~-]CC",
-        "lp1"   : "[Lambda_c+ -> (J/psi(1S) -> ^e+ e+) p~-]CC",
-        "lp2"   : "[Lambda_c+ -> (J/psi(1S) -> e+ ^e+) p~-]CC",
-        "pm"    : "[Lambda_c+ -> (J/psi(1S) -> e+ e+) ^p~-]CC",
-    }
-
-    variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lp1"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "lp2"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "pm"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-
-
-def maketuple_Lc2pmue_OS(options, pvs, rec_summary, mupem = False):
-    name = "Lc2pmue_OSep"
-    turbo_line = "Hlt2Charm_LcpToPpMumpEpm"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Lc"   : "[Lambda_c+ -> (J/psi(1S) -> mu- e+) p+]CC",
-        "Jpsi" : "[Lambda_c+ -> ^(J/psi(1S) -> mu- e+) p+]CC",
-        "lm"   : "[Lambda_c+ -> (J/psi(1S) -> ^mu- e+) p+]CC",
-        "lp"   : "[Lambda_c+ -> (J/psi(1S) -> mu- ^e+) p+]CC",
-        "pp"   : "[Lambda_c+ -> (J/psi(1S) -> mu- e+) ^p+]CC",
-    }
-
-    if mupem == True:
-        name = "Lc2pmue_OSem"
-        branches = {
-            "Lc"   : "[Lambda_c+ -> (J/psi(1S) -> e- mu+) p+]CC",
-            "Jpsi" : "[Lambda_c+ -> ^(J/psi(1S) -> e- mu+) p+]CC",
-            "lm"   : "[Lambda_c+ -> (J/psi(1S) -> ^e- mu+) p+]CC",
-            "lp"   : "[Lambda_c+ -> (J/psi(1S) -> e- ^mu+) p+]CC",
-            "pp"   : "[Lambda_c+ -> (J/psi(1S) -> e- mu+) ^p+]CC",
-        }
-
-    variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lm"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "lp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-    }
-
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-
-
-def maketuple_Lc2pmue_SS(options, pvs, rec_summary):
-    name = "Lc2pmue_SS"
-    turbo_line = "Hlt2Charm_LcpToPmMupEp"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Lc"   : "[Lambda_c+ -> (J/psi(1S) -> mu+ e+) p~-]CC",
-        "Jpsi" : "[Lambda_c+ -> ^(J/psi(1S) -> mu+ e+) p~-]CC",
-        "l1"   : "[Lambda_c+ -> (J/psi(1S) -> ^mu+ e+) p~-]CC",
-        "l2"   : "[Lambda_c+ -> (J/psi(1S) -> mu+ ^e+) p~-]CC",
-        "pp"   : "[Lambda_c+ -> (J/psi(1S) -> mu+ e+) ^p~-]CC",
-    }
-
-    variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
-        "l1"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "l2"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-    }
-
-        
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-
-
-#_____________control lines_________________________________________
-
-def maketuple_Lc2pmumu_WS(options, pvs, rec_summary):
-    name = "Lc2pmumu_WS"
-    turbo_line = "Hlt2Charm_LcpToPpMupMup_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Lc"    : "[Lambda_c+ -> (J/psi(1S) -> mu+ mu+) p+]CC",
-        "Jpsi"  : "[Lambda_c+ -> ^(J/psi(1S) -> mu+ mu+) p+]CC",
-        "lp1"   : "[Lambda_c+ -> (J/psi(1S) -> ^mu+ mu+) p+]CC",
-        "lp2"   : "[Lambda_c+ -> (J/psi(1S) -> mu+ ^mu+) p+]CC",
-        "pp"    : "[Lambda_c+ -> (J/psi(1S) -> mu+ mu+) ^p+]CC",
-    }
-
-    variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lp1"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "lp2"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-
-
-def maketuple_Lc2pee_WS(options, pvs, rec_summary):
-    name = "Lc2pee_WS"
-    turbo_line = "Hlt2Charm_LcpToPpEpEp_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Lc"    : "[Lambda_c+ -> (J/psi(1S) -> e+ e+) p+]CC",
-        "Jpsi"  : "[Lambda_c+ -> ^(J/psi(1S) -> e+ e+) p+]CC",
-        "lp1"   : "[Lambda_c+ -> (J/psi(1S) -> ^e+ e+) p+]CC",
-        "lp2"   : "[Lambda_c+ -> (J/psi(1S) -> e+ ^e+) p+]CC",
-        "pp"    : "[Lambda_c+ -> (J/psi(1S) -> e+ e+) ^p+]CC",
-    }
-
-    variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lp1"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "lp2"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-
-
-def maketuple_Lc2pmue_WS(options, pvs, rec_summary):
-    name = "Lc2pmue_WS"
-    turbo_line = "Hlt2Charm_LcpToPpMupEp_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Lc"    : "[Lambda_c+ -> (J/psi(1S) -> mu+ e+) p+]CC",
-        "Jpsi"  : "[Lambda_c+ -> ^(J/psi(1S) -> mu+ e+) p+]CC",
-        "lp1"   : "[Lambda_c+ -> (J/psi(1S) -> ^mu+ e+) p+]CC",
-        "lp2"   : "[Lambda_c+ -> (J/psi(1S) -> mu+ ^e+) p+]CC",
-        "pp"    : "[Lambda_c+ -> (J/psi(1S) -> mu+ e+) ^p+]CC",
-    }
-
-    variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lp1"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "lp2"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-
-
-def maketuple_Lc2ppipi(options, pvs, rec_summary):
-    name = "Lc2ppipi"
-    turbo_line = "Hlt2Charm_LcpToPpPimPip_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Lc"   : "[Lambda_c+ -> (J/psi(1S) -> pi- pi+) p+]CC",
-        "Jpsi" : "[Lambda_c+ -> ^(J/psi(1S) -> pi- pi+) p+]CC",
-        "lm"   : "[Lambda_c+ -> (J/psi(1S) -> ^pi- pi+) p+]CC",
-        "lp"   : "[Lambda_c+ -> (J/psi(1S) -> pi- ^pi+) p+]CC",
-        "pp"   : "[Lambda_c+ -> (J/psi(1S) -> pi- pi+) ^p+]CC",
-    }
-
-    variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lm"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "lp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-
-
-def maketuple_Lc2KSp_LL(options, pvs, rec_summary):
-    name = "Lc2KSp_LL"
-    turbo_line = "Hlt2Charm_LcpToKsPp_LL_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Lc"    : "[Lambda_c+ -> (KS0 -> pi- pi+) p+]CC",
-        "KS0"   : "[Lambda_c+ -> ^(KS0 -> pi- pi+) p+]CC",
-        "pim"   : "[Lambda_c+ -> (KS0 -> ^pi- pi+) p+]CC",
-        "pip"   : "[Lambda_c+ -> (KS0 -> pi- ^pi+) p+]CC",
-        "pp"    : "[Lambda_c+ -> (KS0 -> pi- pi+) ^p+]CC",
-    }
-
-    variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
-        "KS0"    : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
-        "pim"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-
-
-def maketuple_Lc2KSp_DD(options, pvs, rec_summary):
-    name = "Lc2KSp_DD"
-    turbo_line = "Hlt2Charm_LcpToKsPp_DD_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Lc"    : "[Lambda_c+ -> (KS0 -> pi- pi+) p+]CC",
-        "KS0"   : "[Lambda_c+ -> ^(KS0 -> pi- pi+) p+]CC",
-        "pim"   : "[Lambda_c+ -> (KS0 -> ^pi- pi+) p+]CC",
-        "pip"   : "[Lambda_c+ -> (KS0 -> pi- ^pi+) p+]CC",
-        "pp"   : "[Lambda_c+ -> (KS0 -> pi- pi+) ^p+]CC",
-    }
-
-    variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
-        "KS0"    : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
-        "pim"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
diff --git a/Charm_2024raredecays/options/d0_to_hhhh.py b/Charm_2024raredecays/options/d0_to_hhhh.py
deleted file mode 100644
index 349fbd85b8..0000000000
--- a/Charm_2024raredecays/options/d0_to_hhhh.py
+++ /dev/null
@@ -1,450 +0,0 @@
-# copied from: 
-# file        = AnalysisProductions/Charm_2024validation/d0_to_hhhh.py 
-# commit_hash = fdeac57133d09d7a6b39698dcca54154069928c2
-
-
-from .tupling import (
-    make_composite_variables,
-    make_composite_variables_4body,
-    make_composite_variables_3body,
-    make_basic_variables,
-    make_hlt2_event_variables,
-    make_DeltaM_variable,
-    make_basic_dtf_variables,
-    make_composite_dtf_variables,
-    make_basic_isolation_variables,
-    make_intermediate_isolation_variables,
-    make_top_isolation_variables,
-)
-
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunTuple_Particles as Funtuple
-from DecayTreeFitter import DecayTreeFitter
-
-# I can't get make_composite_variables_4body to work for some reason...
-import Functors as F
-from FunTuple import FunctorCollection
-variables_4body = (
-    FunctorCollection(
-        {
-            #14
-            "M14": F.SUBCOMB(Functor=F.MASS, Indices=(1, 4)),
-            "SDOCA14"     : F.SDOCA(Child1=1,Child2=4),
-            "SDOCACHI214" : F.SDOCACHI2(Child1=1,Child2=4),
-            "DOCA14"      : F.DOCA(Child1=1,Child2=4),
-            "DOCACHI214"  : F.DOCACHI2(Child1=1,Child2=4),
-            "COS14": F.ALV(1, 4),
-            #24
-            "M24": F.SUBCOMB(Functor=F.MASS, Indices=(2, 4)),
-            "SDOCA24"     : F.SDOCA(Child1=2,Child2=4),
-            "SDOCACHI224" : F.SDOCACHI2(Child1=2,Child2=4),
-            "DOCA24"      : F.DOCA(Child1=2,Child2=4),
-            "DOCACHI224"  : F.DOCACHI2(Child1=2,Child2=4),
-            "COS24": F.ALV(2, 4),
-            #34
-            "M34": F.SUBCOMB(Functor=F.MASS, Indices=(3, 4)),
-            "SDOCA34"     : F.SDOCA(Child1=3,Child2=4),
-            "SDOCACHI234" : F.SDOCACHI2(Child1=3,Child2=4),
-            "DOCA34"      : F.DOCA(Child1=3,Child2=4),
-            "DOCACHI234"  : F.DOCACHI2(Child1=3,Child2=4),
-            "COS34": F.ALV(3, 4),
-        }
-    )
-)
-
-
-def maketuple_DstToD0pi_D0ToKKPiPi(options, pvs, rec_summary):
-    name = "DstToD0pi_D0ToKKPiPi"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmKpPimPip_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst"   : "[D*(2010)+ -> ([D0]CC -> K- K+ (J/psi(1S) -> pi- pi+)) pi+]CC",
-        "D0"    : "[D*(2010)+ -> ^([D0]CC -> K- K+ (J/psi(1S) -> pi- pi+)) pi+]CC",
-        "Km"    : "[D*(2010)+ -> ([D0]CC -> ^K- K+ (J/psi(1S) -> pi- pi+)) pi+]CC",
-        "Kp"    : "[D*(2010)+ -> ([D0]CC -> K- ^K+ (J/psi(1S) -> pi- pi+)) pi+]CC",
-        "Jpsi"  : "[D*(2010)+ -> ([D0]CC -> K- K+ ^(J/psi(1S) -> pi- pi+)) pi+]CC",
-        "lm"    : "[D*(2010)+ -> ([D0]CC -> K- K+ (J/psi(1S) -> ^pi- pi+)) pi+]CC",
-        "lp"    : "[D*(2010)+ -> ([D0]CC -> K- K+ (J/psi(1S) -> pi- ^pi+)) pi+]CC",
-        "spip"  : "[D*(2010)+ -> ([D0]CC -> K- K+ (J/psi(1S) -> pi- pi+)) ^pi+]CC",
-    }
-
-
-    DTF_PV = DecayTreeFitter(
-        name='DTF_D0ToKKPiPi_PV',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    #basic_variables = make_basic_variables(options, pvs, input_data) +\
-    #    make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)
-
-    composite_dtf_variables = make_composite_dtf_variables(options,
-                                                           pvs,
-                                                           input_data,
-                                                           DTF=DTF_PV,
-                                                           pv_constraint=True)
-
-    #composite_variables = make_composite_variables(options, pvs, input_data) + composite_dtf_variables
-        
-
-    #composite_variables_4body = make_composite_variables_3body(options, pvs, input_data) + composite_dtf_variables + variables_4body
-
-    #variables = {
-    #    "Dst"   : composite_variables+make_DeltaM_variable(options),
-    #    "D0"    : composite_variables_4body,
-    #    "h1"    : basic_variables,
-    #    "h2"    : basic_variables,
-    #    "h3"    : basic_variables,
-    #    "h4"    : basic_variables,
-    #    "h5"    : basic_variables,
-    #    "pis"   : basic_variables,
-    #}
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+composite_dtf_variables+make_top_isolation_variables(turbo_line, input_data),
-        "D0"    : make_composite_variables_3body(options, pvs, input_data)+composite_dtf_variables+make_intermediate_isolation_variables(turbo_line, input_data),
-        "Km"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-        "Kp"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+composite_dtf_variables+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lm"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-        "spip"  : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-    }
-
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-
-
-def maketuple_DstToD0pi_D0ToKPiPiPi_RS(options, pvs, rec_summary):
-    name = "DstToD0pi_D0ToKPiPiPi_RS"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPimPipPip_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst"   : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> pi- pi+)) pi+]CC",
-        "D0"    : "[D*(2010)+ -> ^(D0 -> K- pi+ (J/psi(1S) -> pi- pi+)) pi+]CC",
-        "Km"    : "[D*(2010)+ -> (D0 -> ^K- pi+ (J/psi(1S) -> pi- pi+)) pi+]CC",
-        "pip"   : "[D*(2010)+ -> (D0 -> K- ^pi+ (J/psi(1S) -> pi- pi+)) pi+]CC",
-        "Jpsi"  : "[D*(2010)+ -> (D0 -> K- pi+ ^(J/psi(1S) -> pi- pi+)) pi+]CC",
-        "lm"    : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> ^pi- pi+)) pi+]CC",
-        "lp"    : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> pi- ^pi+)) pi+]CC",
-        "spip"  : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> pi- pi+)) ^pi+]CC",
-    }
-
-    DTF_PV = DecayTreeFitter(
-        name='DTF_D0ToKPiPiPi_RS_PV',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    composite_dtf_variables = make_composite_dtf_variables(options,
-                                                           pvs,
-                                                           input_data,
-                                                           DTF=DTF_PV,
-                                                           pv_constraint=True)
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+composite_dtf_variables+make_top_isolation_variables(turbo_line, input_data),
-        "D0"    : make_composite_variables_3body(options, pvs, input_data)+composite_dtf_variables+make_intermediate_isolation_variables(turbo_line, input_data),
-        "Km"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-        "pip"   : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+composite_dtf_variables+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lm"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-        "spip"  : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-
-def maketuple_DstToD0pi_D0ToKPiPiPi_WS(options, pvs, rec_summary):
-    name = "DstToD0pi_D0ToKPiPiPi_WS"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKpPimPimPip_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst"   : "[D*(2010)+ -> (D0 -> pi- K+ (J/psi(1S) -> pi- pi+)) pi+]CC",
-        "D0"    : "[D*(2010)+ -> ^(D0 -> pi- K+ (J/psi(1S) -> pi- pi+)) pi+]CC",
-        "pim"   : "[D*(2010)+ -> (D0 -> ^pi- K+ (J/psi(1S) -> pi- pi+)) pi+]CC",
-        "Kp"    : "[D*(2010)+ -> (D0 -> pi- ^K+ (J/psi(1S) -> pi- pi+)) pi+]CC",
-        "Jpsi"  : "[D*(2010)+ -> (D0 -> pi- K+ ^(J/psi(1S) -> pi- pi+)) pi+]CC",
-        "lm"    : "[D*(2010)+ -> (D0 -> pi- K+ (J/psi(1S) -> ^pi- pi+)) pi+]CC",
-        "lp"    : "[D*(2010)+ -> (D0 -> pi- K+ (J/psi(1S) -> pi- ^pi+)) pi+]CC",
-        "spip"  : "[D*(2010)+ -> (D0 -> pi- K+ (J/psi(1S) -> pi- pi+)) ^pi+]CC",
-    }
-
-    DTF_PV = DecayTreeFitter(
-        name='DTF_D0ToKPiPiPi_WS_PV',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    composite_dtf_variables = make_composite_dtf_variables(options,
-                                                           pvs,
-                                                           input_data,
-                                                           DTF=DTF_PV,
-                                                           pv_constraint=True)
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+composite_dtf_variables+make_top_isolation_variables(turbo_line, input_data),
-        "D0"    : make_composite_variables_3body(options, pvs, input_data)+composite_dtf_variables+make_intermediate_isolation_variables(turbo_line, input_data),
-        "pim"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-        "Kp"   : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+composite_dtf_variables+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lm"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-        "spip"  : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-
-def maketuple_DstToD0pi_D0ToPiPiPiPi(options, pvs, rec_summary):
-    name = "DstToD0pi_D0ToPiPiPiPi"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimPimPipPip_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst"   : "[D*(2010)+ -> ([D0]CC -> pi- pi+ (J/psi(1S) -> pi- pi+)) pi+]CC",
-        "D0"    : "[D*(2010)+ -> ^([D0]CC -> pi- pi+ (J/psi(1S) -> pi- pi+)) pi+]CC",
-        "pim"   : "[D*(2010)+ -> ([D0]CC -> ^pi- pi+ (J/psi(1S) -> pi- pi+)) pi+]CC",
-        "pip"   : "[D*(2010)+ -> ([D0]CC -> pi- ^pi+ (J/psi(1S) -> pi- pi+)) pi+]CC",
-        "Jpsi"  : "[D*(2010)+ -> ([D0]CC -> pi- pi+ ^(J/psi(1S) -> pi- pi+)) pi+]CC",
-        "lm"    : "[D*(2010)+ -> ([D0]CC -> pi- pi+ (J/psi(1S) -> ^pi- pi+)) pi+]CC",
-        "lp"    : "[D*(2010)+ -> ([D0]CC -> pi- pi+ (J/psi(1S) -> pi- ^pi+)) pi+]CC",
-        "spip"  : "[D*(2010)+ -> ([D0]CC -> pi- pi+ (J/psi(1S) -> pi- pi+)) ^pi+]CC",
-    }
-
-
-    DTF_PV = DecayTreeFitter(
-        name='DTF_D0ToPiPiPiPi_PV',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    composite_dtf_variables = make_composite_dtf_variables(options,
-                                                           pvs,
-                                                           input_data,
-                                                           DTF=DTF_PV,
-                                                           pv_constraint=True)
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+composite_dtf_variables+make_top_isolation_variables(turbo_line, input_data),
-        "D0"    : make_composite_variables_3body(options, pvs, input_data)+composite_dtf_variables+make_intermediate_isolation_variables(turbo_line, input_data),
-        "pim"   : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-        "pip"   : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+composite_dtf_variables+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lm"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-        "spip"  : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-
-
-
-def maketuple_Dst2D0pi_D02pipimumu_WS(options, pvs, rec_summary, pim = False):
-    name = "Dst2D0pi_D02pipimumu_WSp"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimpPimpMumpMump_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst"   : "[D*(2010)+ -> ([D0]CC -> pi+ pi+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
-        "D0"    : "[D*(2010)+ -> ^([D0]CC -> pi+ pi+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
-        "h1"    : "[D*(2010)+ -> ([D0]CC -> ^pi+ pi+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
-        "h2"    : "[D*(2010)+ -> ([D0]CC -> pi+ ^pi+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
-        "Jpsi"  : "[D*(2010)+ -> ([D0]CC -> pi+ pi+ ^(J/psi(1S) -> mu+ mu+)) pi+]CC",
-        "l1"    : "[D*(2010)+ -> ([D0]CC -> pi+ pi+ (J/psi(1S) -> ^mu+ mu+)) pi+]CC",
-        "l2"    : "[D*(2010)+ -> ([D0]CC -> pi+ pi+ (J/psi(1S) -> mu+ ^mu+)) pi+]CC",
-        "spip"  : "[D*(2010)+ -> ([D0]CC -> pi+ pi+ (J/psi(1S) -> mu+ mu+)) ^pi+]CC",
-    }
-
-    if pim == True:
-        name = "Dst2D0pi_D02pipimumu_WSm"
-
-        branches = {
-            "Dst"  : "[D*(2010)+ -> ([D0]CC -> pi- pi- (J/psi(1S) -> mu- mu-)) pi+]CC",
-            "D0"   : "[D*(2010)+ -> ^([D0]CC -> pi- pi- (J/psi(1S) -> mu- mu-)) pi+]CC",
-            "h1"   : "[D*(2010)+ -> ([D0]CC -> ^pi- pi- (J/psi(1S) -> mu- mu-)) pi+]CC",
-            "h2"   : "[D*(2010)+ -> ([D0]CC -> pi- ^pi- (J/psi(1S) -> mu- mu-)) pi+]CC",
-            "Jpsi" : "[D*(2010)+ -> ([D0]CC -> pi- pi- ^(J/psi(1S) -> mu- mu-)) pi+]CC",
-            "l1"   : "[D*(2010)+ -> ([D0]CC -> pi- pi- (J/psi(1S) -> ^mu- mu-)) pi+]CC",
-            "l2"   : "[D*(2010)+ -> ([D0]CC -> pi- pi- (J/psi(1S) -> mu- ^mu-)) pi+]CC",
-            "spip" : "[D*(2010)+ -> ([D0]CC -> pi- pi- (J/psi(1S) -> mu- mu-)) ^pi+]CC",
-        }
-
-    DTF_PV = DecayTreeFitter(
-        name='DTF_D0Topipimumu_WS_PV',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    composite_dtf_variables = make_composite_dtf_variables(options,
-                                                           pvs,
-                                                           input_data,
-                                                           DTF=DTF_PV,
-                                                           pv_constraint=True)
-    
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+composite_dtf_variables+make_top_isolation_variables(turbo_line, input_data),
-        "D0"    : make_composite_variables_3body(options, pvs, input_data)+composite_dtf_variables+make_intermediate_isolation_variables(turbo_line, input_data),
-        "h1"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-        "h2"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+composite_dtf_variables+make_intermediate_isolation_variables(turbo_line, input_data),
-        "l1"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-        "l2"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-        "spip"  : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-    }
-
-    
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-
-
-
-def maketuple_Dst2D0pi_D02KKmumu_WS(options, pvs, rec_summary, Km = False):
-    name = "Dst2D0pi_D02KKmumu_WSp"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmpKmpMumpMump_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst"   : "[D*(2010)+ -> ([D0]CC -> K+ K+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
-        "D0"    : "[D*(2010)+ -> ^([D0]CC -> K+ K+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
-        "h1"    : "[D*(2010)+ -> ([D0]CC -> ^K+ K+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
-        "h2"    : "[D*(2010)+ -> ([D0]CC -> K+ ^K+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
-        "Jpsi"  : "[D*(2010)+ -> ([D0]CC -> K+ K+ ^(J/psi(1S) -> mu+ mu+)) pi+]CC",
-        "l1"    : "[D*(2010)+ -> ([D0]CC -> K+ K+ (J/psi(1S) -> ^mu+ mu+)) pi+]CC",
-        "l2"    : "[D*(2010)+ -> ([D0]CC -> K+ K+ (J/psi(1S) -> mu+ ^mu+)) pi+]CC",
-        "spip"  : "[D*(2010)+ -> ([D0]CC -> K+ K+ (J/psi(1S) -> mu+ mu+)) ^pi+]CC",
-    }
-
-
-    if Km == True:
-        name = "Dst2D0pi_D02KKmumu_WSm"
-
-        branches = {
-            "Dst"   : "[D*(2010)+ -> ([D0]CC -> K- K- (J/psi(1S) -> mu- mu-)) pi+]CC",
-            "D0"    : "[D*(2010)+ -> ^([D0]CC -> K- K- (J/psi(1S) -> mu- mu-)) pi+]CC",
-            "h1"    : "[D*(2010)+ -> ([D0]CC -> ^K- K- (J/psi(1S) -> mu- mu-)) pi+]CC",
-            "h2"    : "[D*(2010)+ -> ([D0]CC -> K- ^K- (J/psi(1S) -> mu- mu-)) pi+]CC",
-            "Jpsi"  : "[D*(2010)+ -> ([D0]CC -> K- K- ^(J/psi(1S) -> mu- mu-)) pi+]CC",
-            "l1"    : "[D*(2010)+ -> ([D0]CC -> K- K- (J/psi(1S) -> ^mu- mu-)) pi+]CC",
-            "l2"    : "[D*(2010)+ -> ([D0]CC -> K- K- (J/psi(1S) -> mu- ^mu-)) pi+]CC",
-            "spip"  : "[D*(2010)+ -> ([D0]CC -> K- K- (J/psi(1S) -> mu- mu-)) ^pi+]CC",
-        }
-
-
-    DTF_PV = DecayTreeFitter(
-        name='DTF_D0ToKKmumu_WS_PV',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    composite_dtf_variables = make_composite_dtf_variables(options,
-                                                           pvs,
-                                                           input_data,
-                                                           DTF=DTF_PV,
-                                                           pv_constraint=True)
-    
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+composite_dtf_variables+make_top_isolation_variables(turbo_line, input_data),
-        "D0"    : make_composite_variables_3body(options, pvs, input_data)+composite_dtf_variables+make_intermediate_isolation_variables(turbo_line, input_data),
-        "h1"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-        "h2"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+composite_dtf_variables+make_intermediate_isolation_variables(turbo_line, input_data),
-        "l1"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-        "l2"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-        "spip"  : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-    }
-
-    
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-
-
-def maketuple_Dst2D0pi_D02Kpimumu_WS(options, pvs, rec_summary, Km = False):
-    name = "Dst2D0pi_D02Kpimumu_WSp"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmpPimpMumpMump_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-
-    branches = {
-        "Dst"   : "[D*(2010)+ -> ([D0]CC -> K+ pi+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
-        "D0"    : "[D*(2010)+ -> ^([D0]CC -> K+ pi+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
-        "h1"    : "[D*(2010)+ -> ([D0]CC -> ^K+ pi+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
-        "h2"    : "[D*(2010)+ -> ([D0]CC -> K+ ^pi+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
-        "Jpsi"  : "[D*(2010)+ -> ([D0]CC -> K+ pi+ ^(J/psi(1S) -> mu+ mu+)) pi+]CC",
-        "l1"    : "[D*(2010)+ -> ([D0]CC -> K+ pi+ (J/psi(1S) -> ^mu+ mu+)) pi+]CC",
-        "l2"    : "[D*(2010)+ -> ([D0]CC -> K+ pi+ (J/psi(1S) -> mu+ ^mu+)) pi+]CC",
-        "spip"  : "[D*(2010)+ -> ([D0]CC -> K+ pi+ (J/psi(1S) -> mu+ mu+)) ^pi+]CC",
-    }
-
-
-
-    if Km == True:
-        name = "Dst2D0pi_D02Kpimumu_WSm"
-
-        branches = {
-            "Dst" : "[D*(2010)+ -> ([D0]CC -> K- pi- (J/psi(1S) -> mu- mu-)) pi+]CC",
-            "D0"  : "[D*(2010)+ -> ^([D0]CC -> K- pi- (J/psi(1S) -> mu- mu-)) pi+]CC",
-            "h1"   : "[D*(2010)+ -> ([D0]CC -> ^K- pi- (J/psi(1S) -> mu- mu-)) pi+]CC",
-            "h2"  : "[D*(2010)+ -> ([D0]CC -> K- ^pi- (J/psi(1S) -> mu- mu-)) pi+]CC",
-            "Jpsi"  : "[D*(2010)+ -> ([D0]CC -> K- pi- ^(J/psi(1S) -> mu- mu-)) pi+]CC",
-            "l1"  : "[D*(2010)+ -> ([D0]CC -> K- pi- (J/psi(1S) -> ^mu- mu-)) pi+]CC",
-            "l2"  : "[D*(2010)+ -> ([D0]CC -> K- pi- (J/psi(1S) -> mu- ^mu-)) pi+]CC",
-            "spip" : "[D*(2010)+ -> ([D0]CC -> K- pi- (J/psi(1S) -> mu- mu-)) ^pi+]CC",
-        }
-
-
-
-    DTF_PV = DecayTreeFitter(
-        name='DTF_D0ToKpimumu_WS_PV',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    composite_dtf_variables = make_composite_dtf_variables(options,
-                                                           pvs,
-                                                           input_data,
-                                                           DTF=DTF_PV,
-                                                           pv_constraint=True)
-    
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+composite_dtf_variables+make_top_isolation_variables(turbo_line, input_data),
-        "D0"    : make_composite_variables_3body(options, pvs, input_data)+composite_dtf_variables+make_intermediate_isolation_variables(turbo_line, input_data),
-        "h1"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-        "h2"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+composite_dtf_variables+make_intermediate_isolation_variables(turbo_line, input_data),
-        "l1"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-        "l2"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-        "spip"  : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-    }
-
-    
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
diff --git a/Charm_2024raredecays/options/d0_to_hhll.py b/Charm_2024raredecays/options/d0_to_hhll.py
deleted file mode 100644
index 7685206874..0000000000
--- a/Charm_2024raredecays/options/d0_to_hhll.py
+++ /dev/null
@@ -1,204 +0,0 @@
-# copied and adapted from: 
-# file        = AnalysisProductions/CharmRD/maketuple_D02Kpimumu.py 
-# commit_hash = 73c8c844eb343b39ffc6b274fcdf2d196bfd7016
-
-
-from .tupling import (
-    make_composite_variables,
-    make_composite_variables_4body,
-    make_composite_variables_3body,
-    make_basic_variables,
-    make_hlt2_event_variables,
-    make_DeltaM_variable,
-    make_basic_dtf_variables,
-    make_composite_dtf_variables,
-    make_basic_isolation_variables,
-    make_intermediate_isolation_variables,
-    make_top_isolation_variables,
-)
-
-from .rare_charm import (
-    make_dtf_variables_hmumu,
-    make_dtf_variables_pmumu,
-    make_dtf_variables_hhmumu,
-)
-
-from DaVinci import Options, make_config
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles, get_pvs
-from FunTuple import FunTuple_Particles as Funtuple
-from FunTuple import FunctorCollection
-import FunTuple.functorcollections as FC
-from DecayTreeFitter import DecayTreeFitter
-import Functors as F
-from Functors.math import log
-
-
-
-
-#______________________ muon channels ______________________________________________________________________________________________________________
-
-
-def maketuple_Dst2D0pi_D02pipimumu(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02pipimumu"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimPipMumMup"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst"  : "[D*(2010)+ -> ([D0]CC -> pi+ pi- (J/psi(1S) -> mu- mu+)) pi+]CC",
-        "D0"   : "[D*(2010)+ -> ^([D0]CC -> pi+ pi- (J/psi(1S) -> mu- mu+)) pi+]CC",
-        "pip"  : "[D*(2010)+ -> ([D0]CC -> ^pi+ pi- (J/psi(1S) -> mu- mu+)) pi+]CC",
-        "pim"  : "[D*(2010)+ -> ([D0]CC -> pi+ ^pi- (J/psi(1S) -> mu- mu+)) pi+]CC",
-        "Jpsi" : "[D*(2010)+ -> ([D0]CC -> pi+ pi- ^(J/psi(1S) -> mu- mu+)) pi+]CC",
-        "lm"   : "[D*(2010)+ -> ([D0]CC -> pi+ pi- (J/psi(1S) -> ^mu- mu+)) pi+]CC",
-        "lp"   : "[D*(2010)+ -> ([D0]CC -> pi+ pi- (J/psi(1S) -> mu- ^mu+)) pi+]CC",
-        "spip" : "[D*(2010)+ -> ([D0]CC -> pi+ pi- (J/psi(1S) -> mu- mu+)) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
-        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "pim"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-
-def maketuple_Dst2D0pi_D02KKmumu(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02KKmumu"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmKpMumMup"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst"  : "[D*(2010)+ -> ([D0]CC -> K+ K- (J/psi(1S) -> mu- mu+)) pi+]CC",
-        "D0"   : "[D*(2010)+ -> ^([D0]CC -> K+ K- (J/psi(1S) -> mu- mu+)) pi+]CC",
-        "Kp"   : "[D*(2010)+ -> ([D0]CC -> ^K+ K- (J/psi(1S) -> mu- mu+)) pi+]CC",
-        "Km"   : "[D*(2010)+ -> ([D0]CC -> K+ ^K- (J/psi(1S) -> mu- mu+)) pi+]CC",
-        "Jpsi" : "[D*(2010)+ -> ([D0]CC -> K+ K- ^(J/psi(1S) -> mu- mu+)) pi+]CC",
-        "lm"   : "[D*(2010)+ -> ([D0]CC -> K+ K- (J/psi(1S) -> ^mu- mu+)) pi+]CC",
-        "lp"   : "[D*(2010)+ -> ([D0]CC -> K+ K- (J/psi(1S) -> mu- ^mu+)) pi+]CC",
-        "spip" : "[D*(2010)+ -> ([D0]CC -> K+ K- (J/psi(1S) -> mu- mu+)) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
-        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
-        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "Km"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02Kpimumu_RS(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02Kpimumu_RS"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPipMumMup"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst"  : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
-        "D0"   : "[D*(2010)+ -> ^(D0 -> K- pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
-        "Km"   : "[D*(2010)+ -> (D0 -> ^K- pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
-        "pip"  : "[D*(2010)+ -> (D0 -> K- ^pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
-        "Jpsi" : "[D*(2010)+ -> (D0 -> K- pi+ ^(J/psi(1S) -> mu- mu+)) pi+]CC",
-        "lm"   : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> ^mu- mu+)) pi+]CC",
-        "lp"   : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> mu- ^mu+)) pi+]CC",
-        "spip" : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> mu- mu+)) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
-        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
-        "Km"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-
-def maketuple_Dst2D0pi_D02Kpimumu_WS(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02Kpimumu_WS"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKpPimMumMup"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst"  : "[D*(2010)+ -> (D0 -> K+ pi- (J/psi(1S) -> mu- mu+)) pi+]CC",
-        "D0"   : "[D*(2010)+ -> ^(D0 -> K+ pi- (J/psi(1S) -> mu- mu+)) pi+]CC",
-        "Kp"   : "[D*(2010)+ -> (D0 -> ^K+ pi- (J/psi(1S) -> mu- mu+)) pi+]CC",
-        "pim"  : "[D*(2010)+ -> (D0 -> K+ ^pi- (J/psi(1S) -> mu- mu+)) pi+]CC",
-        "Jpsi" : "[D*(2010)+ -> (D0 -> K+ pi- ^(J/psi(1S) -> mu- mu+)) pi+]CC",
-        "lm"   : "[D*(2010)+ -> (D0 -> K+ pi- (J/psi(1S) -> ^mu- mu+)) pi+]CC",
-        "lp"   : "[D*(2010)+ -> (D0 -> K+ pi- (J/psi(1S) -> mu- ^mu+)) pi+]CC",
-        "spip" : "[D*(2010)+ -> (D0 -> K+ pi- (J/psi(1S) -> mu- mu+)) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
-        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
-        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "pim"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D02Kpimumu(options, pvs, rec_summary):
-    name = "D02Kpimumu"
-    turbo_line = "Hlt2Charm_D0ToKmPipMumMup_Untag" # Why is there only the KmPip option and not KpPim? Is this inclusive?
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}", [turbo_line])
-
-    branches = {
-        "D0"   : "[D0 -> K- pi+ (J/psi(1S) -> mu- mu+)]CC",
-        "Km"   : "[D0 -> ^K- pi+ (J/psi(1S) -> mu- mu+)]CC",
-        "pip"  : "[D0 -> K- ^pi+ (J/psi(1S) -> mu- mu+)]CC",
-        "Jpsi" : "[D0 -> K- pi+ ^(J/psi(1S) -> mu- mu+)]CC",
-        "lm"   : "[D0 -> K- pi+ (J/psi(1S) -> ^mu- mu+)]CC",
-        "lp"   : "[D0 -> K- pi+ (J/psi(1S) -> mu- ^mu+)]CC",
-    }
-
-    variables = {
-        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_top_isolation_variables(turbo_line, input_data),
-        "Km"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
diff --git a/Charm_2024raredecays/options/d_to_hhh.py b/Charm_2024raredecays/options/d_to_hhh.py
deleted file mode 100644
index d62674f963..0000000000
--- a/Charm_2024raredecays/options/d_to_hhh.py
+++ /dev/null
@@ -1,204 +0,0 @@
-# copied from: 
-# file        = AnalysisProductions/Charm_2024validation/d_to_hhh.py 
-# commit_hash = fdeac57133d09d7a6b39698dcca54154069928c2
-
-
-from .tupling import (
-    make_composite_variables_3body,
-    make_b_composite_variables,
-    make_composite_variables,
-    make_basic_variables,
-    make_hlt2_event_variables,
-    make_composite_dtf_variables_3body,
-    make_basic_dtf_variables,
-    make_basic_isolation_variables,
-    make_intermediate_isolation_variables,
-    make_top_isolation_variables,
-)
-
-from .rare_charm import (
-    make_dtf_variables_hmumu,
-    make_dtf_variables_pmumu,
-    make_dtf_variables_hhmumu,
-)
-
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunTuple_Particles as Funtuple
-                      
-
-
-def maketuple_D2pimumu_WS(options, pvs, rec_summary):
-    name = "D2pimumu_WS"
-    turbo_line = "Hlt2Charm_DpDspToPipMupMup_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp"    : "[D+ -> (J/psi(1S) -> mu+ mu+) pi+]CC",
-        "Jpsi"  : "[D+ -> (J/psi(1S) -> mu+ mu+) pi+]CC",
-        "lp1"   : "[D+ -> (J/psi(1S) -> ^mu+ mu+) pi+]CC",
-        "lp2"   : "[D+ -> (J/psi(1S) -> mu+ ^mu+) pi+]CC",
-        "hp"    : "[D+ -> (J/psi(1S) -> mu+ mu+) ^pi+]CC",
-    }
-
-
-    variables = {
-        "Dp"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lp1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "lp2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "hp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-
-
-def maketuple_D2Kmumu_WS(options, pvs, rec_summary):
-    name = "D2Kmumu_WS"
-    turbo_line = "Hlt2Charm_DpDspToKpMupMup_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp"    : "[D+ -> (J/psi(1S) -> mu+ mu+) K+]CC",
-        "Jpsi"  : "[D+ -> (J/psi(1S) -> mu+ mu+) K+]CC",
-        "lp1"   : "[D+ -> (J/psi(1S) -> ^mu+ mu+) K+]CC",
-        "lp2"   : "[D+ -> (J/psi(1S) -> mu+ ^mu+) K+]CC",
-        "hp"    : "[D+ -> (J/psi(1S) -> mu+ mu+) ^K+]CC",
-    }
-
-
-    variables = {
-        "Dp"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lp1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "lp2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "hp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-
-
-def maketuple_D2Kpipi(options, pvs, rec_summary):
-    name = "D2Kpipi"
-    turbo_line = "Hlt2Charm_DpDspToPipPimPip_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp"   : "[D+ -> (J/psi(1S) -> pi- pi+) K+]CC",
-        "Jpsi" : "[D+ -> (J/psi(1S) -> pi- pi+) K+]CC",
-        "lm"   : "[D+ -> (J/psi(1S) -> ^pi- pi+) K+]CC",
-        "lp"   : "[D+ -> (J/psi(1S) -> pi- ^pi+) K+]CC",
-        "hp"   : "[D+ -> (J/psi(1S) -> pi- pi+) ^K+]CC",
-    }
-
-    variables = {
-        "Dp"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "hp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-
-def maketuple_D2pipipi(options, pvs, rec_summary, _NoCuts=False):
-    name = "D2pipipi"
-    turbo_line = "Hlt2Charm_DpDspToPipPimPip_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp"   : "[D+ -> (J/psi(1S) -> pi- pi+) pi+]CC",
-        "Jpsi" : "[D+ -> (J/psi(1S) -> pi- pi+) pi+]CC",
-        "lm"   : "[D+ -> (J/psi(1S) -> ^pi- pi+) pi+]CC",
-        "lp"   : "[D+ -> (J/psi(1S) -> pi- ^pi+) pi+]CC",
-        "hp"   : "[D+ -> (J/psi(1S) -> pi- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "hp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-    }
-
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-
-
-def maketuple_D2KSK_LL(options, pvs, rec_summary):
-    name = "D2KSK_LL"
-    turbo_line = "Hlt2Charm_DpDspToKsKp_LL_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp"   : "[D+ -> (KS0 -> pi- pi+) K+]CC",
-        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) K+]CC",
-        "pim"  : "[D+ -> (KS0 -> ^pi- pi+) K+]CC",
-        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) K+]CC",
-        "hp"   : "[D+ -> (KS0 -> pi- pi+) ^K+]CC",
-    }
-
-    variables = {
-        "Dp"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-        "KS0"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-        "pim"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "hp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, use_loki_decay_finder=True)
-
-    return [myfilter, mytuple]
-
-
-def maketuple_D2KSpi_LL(options, pvs, rec_summary):
-    name = "D2KSpi_LL"
-    turbo_line = "Hlt2Charm_DpDspToKsPip_LL_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp"   : "[D+ -> (KS0 -> pi- pi+) pi+]CC",
-        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) pi+]CC",
-        "pim"  : "[D+ -> (KS0 -> ^pi- pi+) pi+]CC",
-        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) pi+]CC",
-        "hp"   : "[D+ -> (KS0 -> pi- pi+) ^pi+]CC",
-    }
-
-
-    variables = {
-        "Dp"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-        "KS0"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-        "pim"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "hp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, use_loki_decay_finder=True)
-
-    return [myfilter, mytuple]
-
diff --git a/Charm_2024raredecays/options/d_to_hll.py b/Charm_2024raredecays/options/d_to_hll.py
deleted file mode 100644
index 6986a85f66..0000000000
--- a/Charm_2024raredecays/options/d_to_hll.py
+++ /dev/null
@@ -1,156 +0,0 @@
-# copied and adapted from: 
-# file        = AnalysisProductions/CharmRD/maketuple_D02Kmumu.py 
-# commit_hash = 73c8c844eb343b39ffc6b274fcdf2d196bfd7016
-
-
-from .tupling import (
-    make_composite_variables,
-    make_composite_variables_3body,
-    make_basic_variables,
-    make_hlt2_event_variables,
-    make_basic_dtf_variables,
-    make_composite_dtf_variables,
-    make_basic_isolation_variables,
-    make_intermediate_isolation_variables,
-    make_top_isolation_variables,
-)
-
-from .rare_charm import (
-    make_dtf_variables_hmumu,
-    make_dtf_variables_pmumu,
-    make_dtf_variables_hhmumu,
-)
-
-import Functors as F
-from Functors.math import log
-from DaVinci import Options, make_config
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunctorCollection
-from PyConf.reading import get_particles, get_pvs
-import FunTuple.functorcollections as FC
-from FunTuple import FunTuple_Particles as Funtuple
-
-from DecayTreeFitter import DecayTreeFitter
-
-
-
-def maketuple_D2pimumu_OS(options, pvs, rec_summary): 
-    name = "D2pimumu_OS"
-    turbo_line = "Hlt2Charm_DpDspToPipMumMup" 
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp"   : "[D+ -> (J/psi(1S) -> mu- mu+) pi+]CC",
-        "Jpsi" : "[D+ -> ^(J/psi(1S) -> mu- mu+) pi+]CC",
-        "lm"   : "[D+ -> (J/psi(1S) -> ^mu- mu+) pi+]CC",
-        "lp"   : "[D+ -> (J/psi(1S) -> mu- ^mu+) pi+]CC",
-        "hp"   : "[D+ -> (J/psi(1S) -> mu- mu+) ^pi+]CC",
-    }
-
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-        "Jpsi" : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lm"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "lp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-
-
-
-def maketuple_D2pimumu_SS(options, pvs, rec_summary): 
-    name = "D2pimumu_SS"
-    turbo_line = "Hlt2Charm_DpDspToPimMupMup"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp"    : "[D+ -> (J/psi(1S) -> mu+ mu+) pi-]CC",
-        "Jpsi"  : "[D+ -> (J/psi(1S) -> mu+ mu+) pi-]CC",
-        "lp1"   : "[D+ -> (J/psi(1S) -> ^mu+ mu+) pi-]CC",
-        "lp2"   : "[D+ -> (J/psi(1S) -> mu+ ^mu+) pi-]CC",
-        "hm"    : "[D+ -> (J/psi(1S) -> mu+ mu+) ^pi-]CC",
-    }
-
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-        "Jpsi" : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lp1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "lp2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "hm"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-    
-    return [myfilter, mytuple]
-
-
-
-def maketuple_D2Kmumu_OS(options, pvs, rec_summary):
-    name = "D2Kmumu_OS"
-    turbo_line = "Hlt2Charm_DpDspToKpMumMup" 
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp"   : "[D+ -> (J/psi(1S) -> mu- mu+) K+]CC",
-        "Jpsi" : "[D+ -> ^(J/psi(1S) -> mu- mu+) K+]CC",
-        "lm"   : "[D+ -> (J/psi(1S) -> ^mu- mu+) K+]CC",
-        "lp"   : "[D+ -> (J/psi(1S) -> mu- ^mu+) K+]CC",
-        "hp"   : "[D+ -> (J/psi(1S) -> mu- mu+) ^K+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-        "Jpsi" : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lm"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "lp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-
-
-
-def maketuple_D2Kmumu_SS(options, pvs, rec_summary):
-    name = "D2dKmumu_SS"
-    turbo_line = "Hlt2Charm_DpDspToKmMupMup" 
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp"    : "[D+ -> (J/psi(1S) -> mu+ mu+) K-]CC",
-        "Jpsi"  : "[D+ -> (J/psi(1S) -> mu+ mu+) K-]CC",
-        "lp1"   : "[D+ -> (J/psi(1S) -> ^mu+ mu+) K-]CC",
-        "lp2"   : "[D+ -> (J/psi(1S) -> mu+ ^mu+) K-]CC",
-        "hm"    : "[D+ -> (J/psi(1S) -> mu+ mu+) ^K-]CC",
-    }
-
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-        "Jpsi" : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lp1"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "lp2"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "hm"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-
-
-
-
diff --git a/Charm_2024raredecays/options/rare_charm.py b/Charm_2024raredecays/options/rare_charm.py
deleted file mode 100644
index dff2ef39bd..0000000000
--- a/Charm_2024raredecays/options/rare_charm.py
+++ /dev/null
@@ -1,501 +0,0 @@
-# copied from: 
-# file        = AnalysisProductions/Charm_2024validation/d_to_hhh.py 
-# commit_hash = fdeac57133d09d7a6b39698dcca54154069928c2
-
-
-from .tupling import (
-    make_composite_variables,
-    make_composite_variables_3body,
-    make_DeltaM_variable,
-    make_basic_variables,
-    make_hlt2_event_variables,
-    make_top_isolation_variables,
-    make_basic_isolation_variables,
-    make_intermediate_isolation_variables,
-    make_composite_dtf_variables,
-    make_composite_dtf_variables_3body,
-    make_basic_dtf_variables,
-)
-
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunTuple_Particles as Funtuple
-
-def make_dtf_variables_hmumu(options, pvs, input_data, ptype):
-
-    if ptype not in ["basic", "composite"]:
-        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
-
-    from DecayTreeFitter import DecayTreeFitter
-    
-    DTF = DecayTreeFitter(
-        name=f'DTF_{{hash}}',
-        input_particles=input_data)
-
-    DTFvtx = DecayTreeFitter(
-        name=f'DTFvtx_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    DTFmassDp = DecayTreeFitter(
-        name=f'DTFmassDp_{{hash}}',
-        input_particles=input_data,
-        mass_constraints=["D+"])
-
-    DTFvtxmassDp = DecayTreeFitter(
-        name=f'DTFvtxmassDp_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D+"])
-
-    DTFmassDsp = DecayTreeFitter(
-        name=f'DTFmassDsp_{{hash}}',
-        input_particles=input_data,
-        substitutions = ['D+{{D_s+}}'],
-        mass_constraints=["D_s+"])
-
-    DTFvtxmassDsp = DecayTreeFitter(
-        name=f'DTFvtxmassDsp_{{hash}}',
-        input_particles=input_data,
-        substitutions = ['D+{{D_s+}}',"J/psi(1S){{J/psi(1S)}}"],#trick
-        mass_constraints=["D_s+"],
-        input_pvs=pvs,
-    )
-
-    if ptype == "basic":
-        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassDp,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="Dp")
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassDp,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="Dp")
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassDsp,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="Dsp")
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassDsp,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="Dsp")
-        return dtf_vars
-
-    if ptype == "composite":
-        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassDp,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="Dp")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassDp,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="Dp")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmassDsp,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="Dsp")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmassDsp,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="Dsp")
-        return dtf_vars
-
-
-def make_dtf_variables_pmumu(options, pvs, input_data, ptype):
-
-    if ptype not in ["basic", "composite"]:
-        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
-
-    from DecayTreeFitter import DecayTreeFitter
-    
-    DTF = DecayTreeFitter(
-        name=f'DTF_{{hash}}',
-        input_particles=input_data)
-
-    DTFvtx = DecayTreeFitter(
-        name=f'DTFvtx_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    DTFmass = DecayTreeFitter(
-        name=f'DTFmass_{{hash}}',
-        input_particles=input_data,
-        mass_constraints=["Lambda_c+"])
-
-    DTFvtxmass = DecayTreeFitter(
-        name=f'DTFvtxmass_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["Lambda_c+"])
-
-    if ptype == "basic":
-        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmass,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="Lc")
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmass,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="Lc")
-        return dtf_vars
-
-    if ptype == "composite":
-        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmass,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="D0")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmass,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="D0")
-        return dtf_vars
-
-def make_dtf_variables_hhmumu(options, pvs, input_data, ptype):
-
-    if ptype not in ["basic", "composite","composite3b"]:
-        Exception(f"I want \'basic\' or \'composite\' or \'composite3b\. Got {ptype}")
-
-    from DecayTreeFitter import DecayTreeFitter
-    
-    DTF = DecayTreeFitter(
-        name=f'DTF_{{hash}}',
-        input_particles=input_data)
-
-    DTFvtx = DecayTreeFitter(
-        name=f'DTFvtx_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    DTFmass = DecayTreeFitter(
-        name=f'DTFmass_{{hash}}',
-        input_particles=input_data,
-        mass_constraints=["D0"])
-
-    DTFvtxmass = DecayTreeFitter(
-        name=f'DTFvtxmass_{{hash}}',
-        input_particles=input_data,
-        input_pvs=pvs,
-        mass_constraints=["D0"])
-
-    if ptype == "basic":
-        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmass,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="D0")
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmass,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="D0")
-        return dtf_vars
-
-    if ptype == "composite3b":
-        dtf_vars = make_composite_dtf_variables_3body(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
-                                             DTF=DTFmass,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="D0")
-        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
-                                             DTF=DTFvtxmass,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="D0")
-
-        return dtf_vars
-        
-    if ptype == "composite":
-        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTF,
-                                            pv_constraint=False,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                            DTF=DTFvtx,
-                                            pv_constraint=True,
-                                            mass_constraint=False)
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFmass,
-                                             pv_constraint=False,
-                                             mass_constraint=True, particle_name="D0")
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
-                                             DTF=DTFvtxmass,
-                                             pv_constraint=True,
-                                             mass_constraint=True, particle_name="D0")
-        return dtf_vars
-
-
-def maketuple_D2pimumu(options, pvs, rec_summary):
-    name = "D2pimumu"
-    turbo_line = "Hlt2Charm_DpDspToPipMumMup"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (J/psi(1S) -> mu- mu+) pi+]CC",
-        "Jpsi" : "[D+ -> ^(J/psi(1S) -> mu- mu+) pi+]CC",
-        "lm"   : "[D+ -> (J/psi(1S) -> ^mu- mu+) pi+]CC",
-        "lp"   : "[D+ -> (J/psi(1S) -> mu- ^mu+) pi+]CC",
-        "hp" : "[D+ -> (J/psi(1S) -> mu- mu+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
-        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation: 
-
-        variables = {
-            "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-            "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2pimumu_WS(options, pvs, rec_summary):
-    name = "D2pimumu_WS"
-    turbo_line = "Hlt2Charm_DpDspToPipMupMup_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (J/psi(1S) -> mu+ mu+) pi+]CC",
-        "Jpsi" : "[D+ -> (J/psi(1S) -> mu+ mu+) pi+]CC",
-        "lp1"   : "[D+ -> (J/psi(1S) -> ^mu+ mu+) pi+]CC",
-        "lp2"   : "[D+ -> (J/psi(1S) -> mu+ ^mu+) pi+]CC",
-        "hp" : "[D+ -> (J/psi(1S) -> mu+ mu+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
-        "lp1"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-        "lp2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation: 
-
-        variables = {
-            "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-            "lp1"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "lp2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2pipipi(options, pvs, rec_summary):
-    name = "CharmRD_D2pipipi"
-    turbo_line = "Hlt2Charm_DpDspToPipPimPip_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (J/psi(1S) -> pi- pi+) pi+]CC",
-        "Jpsi" : "[D+ -> (J/psi(1S) -> pi- pi+) pi+]CC",
-        "lm"   : "[D+ -> (J/psi(1S) -> ^pi- pi+) pi+]CC",
-        "lp"   : "[D+ -> (J/psi(1S) -> pi- ^pi+) pi+]CC",
-        "hp" : "[D+ -> (J/psi(1S) -> pi- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
-        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation: 
-
-        variables = {
-            "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-            "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2piee(options, pvs, rec_summary):
-    name = "D2piee"
-    turbo_line = "Hlt2Charm_DpDspToPipEmEp"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (J/psi(1S) -> e- e+) pi+]CC",
-        "Jpsi" : "[D+ -> ^(J/psi(1S) -> e- e+) pi+]CC",
-        "lm"   : "[D+ -> (J/psi(1S) -> ^e- e+) pi+]CC",
-        "lp"   : "[D+ -> (J/psi(1S) -> e- ^e+) pi+]CC",
-        "hp" : "[D+ -> (J/psi(1S) -> e- e+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
-        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation: 
-
-        variables = {
-            "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-            "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Lc2pmumu(options, pvs, rec_summary):
-    name = "Lc2pmumu"
-    turbo_line = "Hlt2Charm_LcpToPpMumMup"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Lc" : "[Lambda_c+ -> (J/psi(1S) -> mu- mu+) p+]CC",
-        "Jpsi" : "[Lambda_c+ -> ^(J/psi(1S) -> mu- mu+) p+]CC",
-        "lm"   : "[Lambda_c+ -> (J/psi(1S) -> ^mu- mu+) p+]CC",
-        "lp"  : "[Lambda_c+ -> (J/psi(1S) -> mu- ^mu+) p+]CC",
-        "pp" : "[Lambda_c+ -> (J/psi(1S) -> mu- mu+) ^p+]CC",
-    }
-
-    variables = {
-        "Lc"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "pp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation: 
-
-        variables = {
-            "Lc"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-            "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "pp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02Kpimumu_RS(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02Kpimumu_RS"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPipMumMup"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^(D0 -> K- pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
-        "Km"   : "[D*(2010)+ -> (D0 -> ^K- pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
-        "pip"  : "[D*(2010)+ -> (D0 -> K- ^pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
-        "Jpsi"  : "[D*(2010)+ -> (D0 -> K- pi+ ^(J/psi(1S) -> mu- mu+)) pi+]CC",
-        "lm"  : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> ^mu- mu+)) pi+]CC",
-        "lp"  : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> mu- ^mu+)) pi+]CC",
-        "spip" : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> mu- mu+)) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite"),
-        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation: 
-
-        variables = {
-            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
-            "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
-            "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-            "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
diff --git a/Charm_2024raredecays/options/tupling.py b/Charm_2024raredecays/options/tupling.py
deleted file mode 100644
index 5da60b4e0b..0000000000
--- a/Charm_2024raredecays/options/tupling.py
+++ /dev/null
@@ -1,1003 +0,0 @@
-# copied from: 
-# file        = AnalysisProductions/Charm_2024validation/d_to_hhh.py 
-# commit_hash = fdeac57133d09d7a6b39698dcca54154069928c2
-
-
-##############################################################################
-# (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.                                       #
-###############################################################################
-"""Common configuration functions
-
-"""
-
-import Functors as F
-from Functors.math import log
-import Functors.math as fmath
-
-from FunTuple import FunctorCollection
-from FunTuple.functorcollections import (
-    MCHierarchy,
-    MCPromptDecay,
-    Kinematics,
-    SelectionInfo,
-    HltTisTos,
-    MCVertexInfo,
-    MCKinematics,
-    ParticleID, #wrong variables PID_PI = 0, PROBNN_D = nan
-    EventInfo,
-    LHCInfo,
-    ParticleIsolation,
-    MCPrimaries,
-    MCReconstructed,
-    MCReconstructible,
-)
-
-from DaVinciMCTools import MCTruthAndBkgCat, MCReconstructed, MCReconstructible
-from PyConf.Algorithms import ParticleToSubcombinationsAlg
-from DecayTreeFitter import DecayTreeFitter
-
-Hlt1_global_lines = [
-    "Hlt1GECPassthroughDecision",
-    "Hlt1BeamGasDecision",
-    "Hlt1PassthroughDecision",
-    "Hlt1NoBeamDecision",
-    "Hlt1BeamOneDecision",
-    "Hlt1BeamTwoDecision",
-    "Hlt1BothBeamsDecision",
-    "Hlt1ODINLumiDecision",
-    "Hlt1ODINVeloOpenDecision",
-    "Hlt1ODINNoBiasDecision",
-    "Hlt1VeloMicroBiasDecision",
-    "Hlt1RICH1AlignmentDecision",
-    "Hlt1RICH2AlignmentDecision",
-    "Hlt1BeamGasDecision",
-    "Hlt1L02PPiDecision",
-    "Hlt1LowMassNoipDielectron_massSlice1_promptDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice1_promptDecision",
-    "Hlt1LowMassNoipDielectron_massSlice2_promptDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice2_promptDecision",
-    "Hlt1LowMassNoipDielectron_massSlice3_promptDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice3_promptDecision",
-    "Hlt1LowMassNoipDielectron_massSlice4_promptDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice4_promptDecision",
-    "Hlt1LowMassNoipDielectron_massSlice1_displacedDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice1_displacedDecision",
-    "Hlt1LowMassNoipDielectron_massSlice2_displacedDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice2_displacedDecision",
-    "Hlt1LowMassNoipDielectron_massSlice3_displacedDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice3_displacedDecision",
-    "Hlt1LowMassNoipDielectron_massSlice4_displacedDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice4_displacedDecision",
-]
-Hlt1_1track_lines = [
-    "Hlt1TrackMVADecision",
-    "Hlt1LowPtMuonDecision",
-    "Hlt1SingleHighPtMuonDecision",
-    "Hlt1SingleHighPtMuonNoMuIDDecision",
-    "Hlt1TrackMuonMVADecision",
-    "Hlt1OneMuonTrackLineDecision",
-    "Hlt1TrackElectronMVADecision",
-    "Hlt1SingleHighPtElectronDecision",
-    "Hlt1SingleHighEtDecision",
-]
-Hlt1_lines = Hlt1_1track_lines+[
-    "Hlt1D2KshhDecision",
-    "Hlt1TwoTrackMVACharmXSecDecision",
-    "Hlt1TwoTrackMVADecision",
-    "Hlt1TwoTrackKsDecision",
-    "Hlt1D2KPiDecision",
-    "Hlt1D2KKDecision",
-    "Hlt1D2PiPiDecision",
-    "Hlt1KsToPiPiDecision",
-    "Hlt1LowPtDiMuonDecision",#removed
-    "Hlt1DiMuonNoIPDecision",
-    "Hlt1DiMuonNoIP_ssDecision",
-    "Hlt1DiMuonHighMassDecision",
-    "Hlt1DiMuonLowMassDecision",#replaced by Hlt1DiMuonDisplacedDecision
-    "Hlt1DiMuonSoftDecision",
-    "Hlt1DiMuonDisplacedDecision",
-    "Hlt1TwoKsDecision",
-    "Hlt1D2KPiAlignmentDecision",
-    "Hlt1DiMuonHighMassAlignmentDecision",
-    "Hlt1DisplacedDiMuonAlignmentDecision",
-    "Hlt1DisplacedDielectronDecision",
-    "Hlt1DisplacedLeptonsDecision",#removed
-]
-
-
-Hlt2_lines = [
-    "Hlt2Charm_DstpToD0Pip_D0ToKmPip_XSec",
-    "Hlt2Charm_D0ToKmPip_XSec",
-    "Hlt2Charm_D0ToKmKp",
-    "Hlt2Charm_D0ToKmPip",
-    "Hlt2Charm_D0ToPimPip",
-    "Hlt2Charm_DpDspToKsKp_DD",
-    "Hlt2Charm_DpDspToKsKp_LD",
-    "Hlt2Charm_DpDspToKsKp_LL",
-    "Hlt2Charm_DpDspToKsPip_DD",
-    "Hlt2Charm_DpDspToKsPip_LD",
-    "Hlt2Charm_DpDspToKsPip_LL",
-    "Hlt2Charm_DpToKmPipPip",
-    "Hlt2Charm_DspToKmKpPip",
-    "Hlt2Charm_DpToKmPipPip_NoCuts",
-    "Hlt2Charm_DspToKmKpPip_NoCuts",
-    "Hlt2Charm_DpToKmPipPip_XSec",
-    "Hlt2Charm_DspToKmKpPip_XSec",
-    "Hlt2Charm_DstpToD0Pip_D0ToKmKp",
-    "Hlt2Charm_DstpToD0Pip_D0ToKmPip",
-    "Hlt2Charm_DstpToD0Pip_D0ToKpPim",
-    "Hlt2Charm_DstpToD0Pip_D0ToPimPip",
-    "Hlt2Charm_DstpToD0Pip_D0ToKmPip_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKpPim_LowBias",
-    "Hlt2Charm_D0ToKmPip_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKmKp_LowBias",
-    "Hlt2Charm_D0ToKmKp_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToPimPip_LowBias",
-    "Hlt2Charm_D0ToPimPip_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLL",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLL_Tight",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLDD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLDD_Tight",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDDD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDDD_Tight",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULLL",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULLL_Tight",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULDD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULDD_Tight",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLD_Tight",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDLD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDLD_Tight",
-    "Hlt2Charm_D0ToKsPimPip_LL",
-    "Hlt2Charm_D0ToKsPimPip_DD",
-    "Hlt2Charm_D0ToKsPimPip_LL_LowBias",
-    "Hlt2Charm_D0ToKsPimPip_LL_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_LL",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_DD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_LL_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_DD_LowBias",
-    "Hlt2Charm_D0ToKsKmPip_LL",
-    "Hlt2Charm_D0ToKsKmPip_DD",
-    "Hlt2Charm_D0ToKsKmPip_LL_LowBias",
-    "Hlt2Charm_D0ToKsKmPip_LL_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_LL",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_DD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_LL_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_DD_LowBias",
-    "Hlt2Charm_D0ToKsKpPim_LL",
-    "Hlt2Charm_D0ToKsKpPim_DD",
-    "Hlt2Charm_D0ToKsKpPim_LL_LowBias",
-    "Hlt2Charm_D0ToKsKpPim_DD_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_LL",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_DD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_LL_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_DD_LowBias",
-    "Hlt2Charm_D0ToKsKmKp_LL",
-    "Hlt2Charm_D0ToKsKmKp_DD",
-    "Hlt2Charm_D0ToKsKmKp_LL_LowBias",
-    "Hlt2Charm_D0ToKsKmKp_DD_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_LL",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_DD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_LL_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_DD_LowBias",
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS',
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS',
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS_MVA',
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS_MVA',
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS',
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS',
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS_MVA',
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS_MVA',
-    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS',
-    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS',
-    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS_MVA',
-    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS_MVA',
-]
-
-def make_composite_variables(options, pvs, data, add_truth=True, add_Hlt1TisTos=True):
-    if not options.simulation:
-        add_truth = False
-    variables = (
-        FunctorCollection(
-            {
-                "MAXPT": F.MAX(F.PT),
-                "MINPT": F.MIN(F.PT),
-                "SUMPT": F.SUM(F.PT),
-                "MAXP": F.MAX(F.P),
-                "MINP": F.MIN(F.P),
-                "BPVDIRA": F.BPVDIRA(pvs),
-                "VCHI2DOF": F.CHI2DOF,
-                #"VNDOF": F.NDOF,
-                "BPVFDCHI2": F.BPVFDCHI2(pvs),
-                "BPVFD": F.BPVFD(pvs),
-                "BPVVDRHO": F.BPVVDRHO(pvs),
-                "BPVVDZ": F.BPVVDZ(pvs),
-                "BPVIPCHI2": F.BPVIPCHI2(pvs),
-                "BPVIP": F.BPVIP(pvs),
-                "LOGBPVIPCHI2": log(F.BPVIPCHI2(pvs)),
-                "BPVLTIME": F.BPVLTIME(pvs),
-                "MAXBPVIPCHI2": F.MAX(F.BPVIPCHI2(pvs)),
-                "MINBPVIPCHI2": F.MIN(F.BPVIPCHI2(pvs)),
-                "MAXBPVIP": F.MAX(F.BPVIP(pvs)),
-                "MINBPVIP": F.MIN(F.BPVIP(pvs)),
-                "MAXDOCACHI2": F.MAXDOCACHI2,
-                "MAXDOCA": F.MAXDOCA,
-                "MAXSDOCACHI2": F.MAXSDOCACHI2,
-                "MAXSDOCA": F.MAXSDOCA,
-                "ETA": F.ETA,
-                "PHI": F.PHI,
-                "END_VX": F.END_VX,
-                "END_VY": F.END_VY,
-                "END_VZ": F.END_VZ,
-                "END_VX_ERR":F.SQRT @ F.CALL(0,0) @ F.POS_COV_MATRIX @ F.ENDVERTEX,
-                "END_VY_ERR":F.SQRT @ F.CALL(1,1) @ F.POS_COV_MATRIX @ F.ENDVERTEX,
-                "END_VZ_ERR":F.SQRT @ F.CALL(2,2) @ F.POS_COV_MATRIX @ F.ENDVERTEX,
-                "BPVX": F.BPVX(pvs),
-                "BPVY": F.BPVY(pvs),
-                "BPVZ": F.BPVZ(pvs),
-                "BPVX_ERR": F.SQRT @ F.CALL(0,0) @ F.POS_COV_MATRIX @ F.BPV(pvs),
-                "BPVY_ERR": F.SQRT @ F.CALL(1,1) @ F.POS_COV_MATRIX @ F.BPV(pvs),
-                "BPVZ_ERR": F.SQRT @ F.CALL(2,2) @ F.POS_COV_MATRIX @ F.BPV(pvs),
-                "ALLPVFD"     : F.ALLPV_FD(pvs),
-                "ALLPVIP"     : F.ALLPV_IP(pvs),
-                "OBJECT_KEY": F.OBJECT_KEY,
-            }
-        )
-        + Kinematics()
-        #+ ParticleID(extra_info=True) #only for daughters
-    )
-
-    if add_Hlt1TisTos:
-        variables += HltTisTos(
-            selection_type="Hlt1", trigger_lines=Hlt1_lines, data=data
-        )
-
-    if add_truth:
-        variables = add_truth_matching_functors(
-            options,
-            variables,
-            data,
-            hierarchy=True,
-            kinematics=True,
-            vertex_info=True,
-            bkgcat=True,
-        )
-
-    return variables
-
-def make_tistoscombinations(options, pvs, data):
-    algo_output = ParticleToSubcombinationsAlg( Input=data )
-    relations = algo_output.OutputRelations
-
-    tistos_variables_extra = HltTisTos(
-        selection_type="Hlt1", trigger_lines=["Hlt1TwoTrackMVADecision"], data=algo_output.OutputParticles
-    )
-    tistos_combinations = {}
-    for k,v in tistos_variables_extra.get_thor_functors().items():
-        tistos_combinations[k + "_SUBCOMB" ] = F.MAP_INPUT_ARRAY( v, relations )
-    tistos_combinations = FunctorCollection( tistos_combinations )
-
-    return tistos_combinations
-
-def make_composite_variables_3body(options, pvs, data, add_truth=True):
-
-    variables = (
-        FunctorCollection(
-            {
-                #12
-                "M12": F.SUBCOMB(Functor=F.MASS, Indices=(1, 2)),
-                "SDOCA12"     : F.SDOCA(Child1=1,Child2=2),
-                "SDOCACHI212" : F.SDOCACHI2(Child1=1,Child2=2),
-                "DOCA12"      : F.DOCA(Child1=1,Child2=2),
-                "DOCACHI212"  : F.DOCACHI2(Child1=1,Child2=2),
-                "COS12": F.ALV(1, 2),
-                #"ETA12": F.SUBCOMB(Functor=F.ETA, Indices=(1, 2)),
-                #"PT12": F.SUBCOMB(Functor=F.PT, Indices=(1, 2)),
-                #"VCHI212": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(1, 2)),
-                #"END_VZ12": F.SUBCOMB(Functor=F.END_VZ, Indices=(1, 2)),
-                #"BPVZ12": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(1, 2)),
-                #"BPVCORRM12": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(1, 2)),
-                #13
-                "M13": F.SUBCOMB(Functor=F.MASS, Indices=(1, 3)),
-                "SDOCA13"     : F.SDOCA(Child1=1,Child2=3),
-                "SDOCACHI213" : F.SDOCACHI2(Child1=1,Child2=3),
-                "DOCA13"      : F.DOCA(Child1=1,Child2=3),
-                "DOCACHI213"  : F.DOCACHI2(Child1=1,Child2=3),
-                "COS13": F.ALV(1, 3),
-                #"ETA13": F.SUBCOMB(Functor=F.ETA, Indices=(1, 3)),
-                #"PT13": F.SUBCOMB(Functor=F.PT, Indices=(1, 3)),
-                #"VCHI213": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(1, 3)),
-                #"END_VZ13": F.SUBCOMB(Functor=F.END_VZ, Indices=(1, 3)),
-                #"BPVZ13": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(1, 3)),
-                #"BPVCORRM13": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(1, 3)),
-                #23
-                "M23": F.SUBCOMB(Functor=F.MASS, Indices=(2, 3)),
-                "SDOCA23"     : F.SDOCA(Child1=2,Child2=3),
-                "SDOCACHI223" : F.SDOCACHI2(Child1=2,Child2=3),
-                "DOCA23"      : F.DOCA(Child1=2,Child2=3),
-                "DOCACHI223"  : F.DOCACHI2(Child1=2,Child2=3),
-                "COS23": F.ALV(2, 3),
-                #"ETA23": F.SUBCOMB(Functor=F.ETA, Indices=(2, 3)),
-                #"PT23": F.SUBCOMB(Functor=F.PT, Indices=(2, 3)),
-                #"VCHI223": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(2, 3)),
-                #"END_VZ23": F.SUBCOMB(Functor=F.END_VZ, Indices=(2, 3)),
-                #"BPVZ23": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(2, 3)),
-                #"BPVCORRM23": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(2, 3)),
-            }
-        )
-    )
-    return make_composite_variables(options, pvs, data, add_truth)+make_tistoscombinations(options, pvs, data)+variables
-
-def make_composite_variables_4body(options, pvs, data, add_truth=True):
-
-    variables = (
-        FunctorCollection(
-            {
-                #14
-                "M14": F.SUBCOMB(Functor=F.MASS, Indices=(1, 4)),
-                "SDOCA14"     : F.SDOCA(Child1=1,Child2=4),
-                "SDOCACHI214" : F.SDOCACHI2(Child1=1,Child2=4),
-                "DOCA14"      : F.DOCA(Child1=1,Child2=4),
-                "DOCACHI214"  : F.DOCACHI2(Child1=1,Child2=4),
-                "COS14": F.ALV(1, 4),
-                #"ETA14": F.SUBCOMB(Functor=F.ETA, Indices=(1, 4)),
-                #"PT14": F.SUBCOMB(Functor=F.PT, Indices=(1, 4)),
-                #"VCHI214": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(1, 4)),
-                #"END_VZ14": F.SUBCOMB(Functor=F.END_VZ, Indices=(1, 4)),
-                #"BPVZ14": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(1, 4)),
-                #"BPVCORRM14": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(1, 4)),
-                #24
-                "M24": F.SUBCOMB(Functor=F.MASS, Indices=(2, 4)),
-                "SDOCA24"     : F.SDOCA(Child1=2,Child2=4),
-                "SDOCACHI224" : F.SDOCACHI2(Child1=2,Child2=4),
-                "DOCA24"      : F.DOCA(Child1=2,Child2=4),
-                "DOCACHI224"  : F.DOCACHI2(Child1=2,Child2=4),
-                "COS24": F.ALV(2, 4),
-                #"ETA24": F.SUBCOMB(Functor=F.ETA, Indices=(2, 4)),
-                #"PT24": F.SUBCOMB(Functor=F.PT, Indices=(2, 4)),
-                #"VCHI224": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(2, 4)),
-                #"END_VZ24": F.SUBCOMB(Functor=F.END_VZ, Indices=(2, 4)),
-                #"BPVZ24": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(2, 4)),
-                #"BPVCORRM24": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(2, 4)),
-                #34
-                "M34": F.SUBCOMB(Functor=F.MASS, Indices=(3, 4)),
-                "SDOCA34"     : F.SDOCA(Child1=3,Child2=4),
-                "SDOCACHI234" : F.SDOCACHI2(Child1=3,Child2=4),
-                "DOCA34"      : F.DOCA(Child1=3,Child2=4),
-                "DOCACHI234"  : F.DOCACHI2(Child1=3,Child2=4),
-                "COS34": F.ALV(3, 4),
-                #"ETA34": F.SUBCOMB(Functor=F.ETA, Indices=(3, 4)),
-                #"PT34": F.SUBCOMB(Functor=F.PT, Indices=(3, 4)),
-                #"VCHI234": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(3, 4)),
-                #"END_VZ34": F.SUBCOMB(Functor=F.END_VZ, Indices=(3, 4)),
-                #"BPVZ34": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(3, 4)),
-                #"BPVCORRM34": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(3, 4)),
-            }
-        )
-    )
-    return make_composite_variables_3body(options, pvs, data, add_truth)+variables #make_tistoscombinations already included
-
-def make_b_composite_variables(options, pvs, data, add_truth=True):
-    
-    # define helper functors
-    get_child = F.CHILD(1, F.FORWARDARG0) # change here the index of the child
-    get_SV =  F.ENDVERTEX @ F.FORWARDARG0
-    get_SV_pos = F.TOLINALG @ F.POSITION @ get_SV # only if composite (i.e. has vertex)
-    get_child_endvtx_pos = F.ENDVERTEX_POS  @ get_child
-    get_fdvec_child = get_child_endvtx_pos - get_SV_pos
-
-    # define observables
-    IP_wrt_SV = F.VALUE_OR(-1) @F.IP.bind(get_SV_pos , get_child)
-    IPCHI2_wrt_SV = F.VALUE_OR(-1) @ F.IPCHI2.bind(get_SV , get_child) # only if child is composite (i.e. has vertex)
-    FD_wrt_SV = F.VALUE_OR(-1) @ F.MAGNITUDE @ get_fdvec_child
-    FDCHI2_wrt_SV = F.VALUE_OR(-1) @ F.VTX_FDCHI2.bind(get_SV, get_child)
-
-    
-    variables = FunctorCollection(
-        {       
-            "ID": F.PARTICLE_ID ,
-            "PT": F.PT,
-            "P": F.P,
-            "MASS": F.MASS,
-            "CHILD1_IPwrtSV": IP_wrt_SV,
-            "CHILD1_IPCHI2wrtSV": IPCHI2_wrt_SV,
-            "CHILD1_FDwrtSV": FD_wrt_SV,
-            "CHILD1_FDCHI2wrtSV": FDCHI2_wrt_SV,
-            "PX": F.PX,
-            "PY": F.PY,
-            "PZ": F.PZ,
-            "END_VCHI2DOF": F.VALUE_OR(-1) @F.CHI2DOF @ F.ENDVERTEX,
-            "BPVCHI2DOF": F.VALUE_OR(-1) @F.CHI2DOF @ F.BPV(pvs),
-            # B2OC generic B hadron NN Hlt2 algorithm,
-            # not planning to use it directly for B2OC EM
-            "MVA": F.MVA(
-                MVAType="SigmaNet",
-                Config={
-                    "File":
-                    "paramfile://data/Hlt2B2OC_B_SigmaNet_Run3-v1.json",
-                    "Name":
-                    "B2OC_SigmaNet_Generic",
-                    "Lambda":
-                    "2.0",
-                    "NLayers":
-                    "3",
-                    "InputSize":
-                    "6",
-                    "Monotone_Constraints":
-                    "[1,-1,-1,-1,-1,-1]",
-                    "Variables":
-                    "log_B_PT,B_ETA,log_B_DIRA,log_B_ENDVERTEX_CHI2,log_B_IPCHI2_OWNPV,log_B_IP_OWNPV",
-                },
-                Inputs={
-                    "log_B_PT": fmath.log(F.PT),
-                    "B_ETA": F.ETA,
-                    "log_B_DIRA": fmath.log(1. - F.BPVDIRA(pvs)),
-                    "log_B_ENDVERTEX_CHI2": fmath.log(F.CHI2DOF),
-                    "log_B_IPCHI2_OWNPV": fmath.log(F.BPVIPCHI2(pvs)),
-                    "log_B_IP_OWNPV": fmath.log(F.BPVIP(pvs)),
-                }),
-            #'SSPionBDT_Mistag': F.SSPionBDT_Mistag(sspionTagging.OutputFlavourTags),
-            #'SSPionBDT_Decision': F.SSPionBDT_Decision(sspionTagging.OutputFlavourTags),
-
-        }
-    )
-    return make_composite_variables(options, pvs, data, add_truth)+make_tistoscombinations(options, pvs, data)+variables
-
-def make_DeltaM_variable(options):
-    return FunctorCollection({"DM": F.MASS - F.CHILD(1, F.MASS)})
-
-def make_basic_variables(options, pvs, data, add_truth=True, islong=False):
-    if not options.simulation:
-        add_truth = False
-    variables = (
-        FunctorCollection(
-            {
-                "TRCHI2DOF": F.VALUE_OR(-1) @ F.CHI2DOF @ F.TRACK,
-                "ETA": F.ETA,
-                "PHI": F.PHI,
-                "TRGHOSTPROB": F.GHOSTPROB,
-                "BPVIPCHI2": F.BPVIPCHI2(pvs),
-                "BPVIP": F.BPVIP(pvs),
-                "BPVX": F.BPVX(pvs),
-                "BPVY": F.BPVY(pvs),
-                "BPVZ": F.BPVZ(pvs),
-                "TX"          : F.TX,
-                "TY"          : F.TY,
-                "MINIPCHI2"   : F.MINIPCHI2(pvs),
-                "MINIP"       : F.MINIP(pvs),
-                "KEY"         : F.VALUE_OR(-1) @ F.OBJECT_KEY @ F.TRACK,
-                "ISMUON"      : F.ISMUON,
-                "TRACKPT": F.TRACK_PT,
-                "TRACKHISTORY": F.VALUE_OR(-1) @ F.TRACKHISTORY @ F.TRACK,
-                "QOVERP": F.VALUE_OR(-1) @ F.QOVERP @ F.TRACK,
-                "NDOF": F.VALUE_OR(-1) @ F.NDOF @ F.TRACK,
-                "NFTHITS": F.VALUE_OR(-1) @ F.NFTHITS @ F.TRACK,
-                "NHITS": F.VALUE_OR(-1) @ F.NHITS @ F.TRACK,
-                "NUTHITS": F.VALUE_OR(-1) @ F.NUTHITS @ F.TRACK,
-                "NVPHITS": F.VALUE_OR(-1) @ F.NVPHITS @ F.TRACK,
-                #"NMUONHITS": F.VALUE_OR(-1) @ F.NHITSMUONS @ F.TRACK, #https://gitlab.cern.ch/lhcb/Rec/-/merge_requests/3756
-                "TRACKHASVELO": F.VALUE_OR(-1) @ F.TRACKHASVELO @ F.TRACK,
-                "TRACKHASUT": F.VALUE_OR(-1) @ F.TRACKHASUT @ F.TRACK,
-                "OBJECT_KEY": F.OBJECT_KEY,
-                "HASBREM": F.HASBREM,
-                "BREMENERGY": F.BREMENERGY,
-                "BREMBENDCORR": F.BREMBENDCORR,
-            }
-        )
-        + Kinematics()
-        + ParticleID(extra_info=True)
-    )
-
-    if islong:
-        variables += FunctorCollection({
-            "CTBX": F.VALUE_OR(F.NaN) @ F.X_COORDINATE @ F.POSITION @ F.CLOSESTTOBEAM @ F.TRACK,#X_COORDINATE @ POSITION @ CLOSESTTOBEAM @ TRACK
-            "CTBY": F.VALUE_OR(F.NaN) @ F.Y_COORDINATE @ F.POSITION @ F.CLOSESTTOBEAM @ F.TRACK,
-            "CTBZ": F.VALUE_OR(F.NaN) @ F.Z_COORDINATE @ F.POSITION @ F.CLOSESTTOBEAM @ F.TRACK,
-        })
-    
-    variables += HltTisTos(
-        selection_type="Hlt1", trigger_lines=Hlt1_1track_lines, data=data
-    )
-    
-    if add_truth:
-        variables = add_truth_matching_functors(
-            options,
-            variables,
-            data,
-            hierarchy=True,
-            kinematics=True,
-            vertex_info=True,
-            bkgcat=False,
-        )
-
-    return variables
-
-def make_hlt2_event_variables(options, pvs, rec_summary):
-    # define event level variables
-    evt_variables = EventInfo()
-    if not options.simulation:
-        evt_variables += LHCInfo() #FillNumber
-    evt_variables += SelectionInfo(selection_type="Hlt2", trigger_lines=Hlt2_lines)
-    evt_variables += SelectionInfo(selection_type="Hlt1", trigger_lines=Hlt1_global_lines)
-    evt_variables += FunctorCollection(
-        {
-            "ALLPVX": F.ALLPVX(pvs),
-            "ALLPVY": F.ALLPVY(pvs),
-            "ALLPVZ": F.ALLPVZ(pvs),
-            "ALLPVNDOF": F.MAP(F.VALUE_OR(-1) @ F.NDOF) @ F.TES(pvs),
-            "ALLPVCHI2": F.MAP(F.VALUE_OR(-1) @ F.CHI2) @ F.TES(pvs),
-            "nPVs": F.SIZE(pvs),
-            "nTracks": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nTracks"),
-            "nLongTracks": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nLongTracks"),
-            "nMuonTracks": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nMuonTracks"),
-            "nFTClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nFTClusters"),
-            "nVPClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nVPClusters"),
-            "nUTClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nUTClusters"),
-            "nSPDhits": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nSPDhits"),
-            "nEcalClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nEcalClusters"),
-            "nEcalClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nEcalClusters"),
-            "eCalTot": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "eCalTot"),
-            "hCalTot": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "hCalTot"),
-            "nRich1Hits": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nRich1Hits"),
-            "nRich2Hits": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nRich2Hits"),
-        }
-    )
-    return evt_variables
-
-def add_truth_matching_functors(
-    options,
-    variables,
-    data,
-    hierarchy=True,
-    kinematics=True,
-    vertex_info=True,
-    bkgcat=False,
-    prompt_info=True,
-):
-    """Add MC truth matching functors to an existing FunctorCollection.
-
-    Args:
-        options (DaVinci.Options): DaVinci options object.
-        variables (FunctorCollection): FunctorCollection to modify
-        data: data handle
-        hierarchy (bool): Add MCHierarchy info (default True)
-        kinematics (bool): Add MCKinematics info (default True)
-        vertex_info (bool): Add MCVertexInfo (default True)
-        bkgcat (bool): Add TRUEKEY and BKGCAT functors - intended for composite particles (default False)
-        prompt_info (bool): Add MCPromptDecay info (default True)
-
-    Returns:
-        FunctorCollection: modified FunctorCollection with truth matched variables.
-    """
-    assert (
-        options.simulation
-    ), "options.simulation is set to False - it doesn't make sense to add truth matching."
-
-    MCTRUTH = MCTruthAndBkgCat(data)
-
-    if bkgcat:
-        variables += FunctorCollection(
-            {
-                # Important note: specify an invalid value for integer functors if there exists no truth info.
-                #                 The invalid value for floating point functors is set to nan.
-                "TRUEKEY": F.VALUE_OR(-1) @ MCTRUTH(F.OBJECT_KEY),
-                "BKGCAT": MCTRUTH.BkgCat,
-            }
-        )
-    if hierarchy:
-        variables += MCHierarchy(mctruth_alg=MCTRUTH)  # likely to change again!!
-    if vertex_info:
-        variables += MCVertexInfo(mctruth_alg=MCTRUTH)  # likely to change again!!
-    if kinematics:
-        variables += MCKinematics(mctruth_alg=MCTRUTH)  # likely to change again!!
-    if prompt_info:
-        variables += MCPromptDecay(mctruth_alg=MCTRUTH)
-
-    return variables
-
-### DTF variables ###
-
-def make_basic_dtf_variables(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name="", islong=False):
-    variables = (
-        FunctorCollection(
-            {
-                "TRCHI2DOF": F.VALUE_OR(-1) @ F.CHI2DOF @ F.TRACK,
-                "ETA": F.ETA,
-                "PHI": F.PHI,
-                "TRGHOSTPROB": F.GHOSTPROB,
-                "BPVIPCHI2": F.BPVIPCHI2(pvs),
-                "BPVIP": F.BPVIP(pvs),
-                "BPVX": F.BPVX(pvs),
-                "BPVY": F.BPVY(pvs),
-                "BPVZ": F.BPVZ(pvs),
-                "TX"          : F.TX,
-                "TY"          : F.TY,
-                "MINIPCHI2"   : F.MINIPCHI2(pvs),
-                "MINIP"       : F.MINIP(pvs),
-                "KEY"         : F.VALUE_OR(-1) @ F.OBJECT_KEY @ F.TRACK,
-                "TRACKPT": F.TRACK_PT,
-                "TRACKHISTORY": F.VALUE_OR(-1) @ F.TRACKHISTORY @ F.TRACK,
-                "QOVERP": F.VALUE_OR(-1) @ F.QOVERP @ F.TRACK,
-                "NDOF": F.VALUE_OR(-1) @ F.NDOF @ F.TRACK,
-            }
-        )
-        + Kinematics()
-    )
-
-    if islong:
-        variables += FunctorCollection({
-            "CTBX": F.VALUE_OR(F.NaN) @ F.X_COORDINATE @ F.POSITION @ F.CLOSESTTOBEAM @ F.TRACK,#X_COORDINATE @ POSITION @ CLOSESTTOBEAM @ TRACK
-            "CTBY": F.VALUE_OR(F.NaN) @ F.Y_COORDINATE @ F.POSITION @ F.CLOSESTTOBEAM @ F.TRACK,
-            "CTBZ": F.VALUE_OR(F.NaN) @ F.Z_COORDINATE @ F.POSITION @ F.CLOSESTTOBEAM @ F.TRACK,
-        })
-    
-    if(mass_constraint):
-        if(pv_constraint): # MASS + PV
-            dtf_variables_mass_pv = FunctorCollection({
-                        'DTF_PV_M'+ particle_name + '_' + k: DTF(v)
-                        for k, v in variables.get_thor_functors().items()
-                    })
-            return dtf_variables_mass_pv
-        else: # MASS
-            dtf_variables_mass = FunctorCollection(
-                {'DTF_M'+ particle_name + '_' + k: DTF(v)
-                 for k, v in variables.get_thor_functors().items()})
-        return dtf_variables_mass
-
-    elif(pv_constraint): # PV
-        dtf_variables_pv = FunctorCollection({
-                'DTF_PV_' + k: DTF(v)
-                for k, v in variables.get_thor_functors().items()
-            })
-        return dtf_variables_pv
-
-    else: # NO MASS/PV
-        dtf_variables = FunctorCollection(
-            {'DTF_' + k: DTF(v)
-             for k, v in variables.get_thor_functors().items()})
-        return dtf_variables
-
-def make_composite_dtf_variables(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name=""):
-    variables = (
-        FunctorCollection(
-            {
-                "MAXPT": F.MAX(F.PT),
-                "MINPT": F.MIN(F.PT),
-                "SUMPT": F.SUM(F.PT),
-                "MAXP": F.MAX(F.P),
-                "MINP": F.MIN(F.P),
-                "BPVDIRA": F.BPVDIRA(pvs),
-                "VCHI2DOF": F.CHI2DOF, #CHI2VXNDOF
-                "BPVFDCHI2": F.BPVFDCHI2(pvs),
-                "BPVFD": F.BPVFD(pvs),
-                "BPVVDRHO": F.BPVVDRHO(pvs),
-                "BPVVDZ": F.BPVVDZ(pvs),
-                "BPVIPCHI2": F.BPVIPCHI2(pvs),
-                "BPVIP": F.BPVIP(pvs),
-                "LOGBPVIPCHI2": log(F.BPVIPCHI2(pvs)),
-                "BPVLTIME": F.BPVLTIME(pvs),
-                "MAXBPVIPCHI2": F.MAX(F.BPVIPCHI2(pvs)), #MAX_
-                "MINBPVIPCHI2": F.MIN(F.BPVIPCHI2(pvs)),
-                "MAXBPVIP": F.MAX(F.BPVIP(pvs)),
-                "MINBPVIP": F.MIN(F.BPVIP(pvs)),
-                "ETA": F.ETA,
-                "PHI": F.PHI,
-                "END_VX": F.END_VX, #END_
-                "END_VY": F.END_VY,
-                "END_VZ": F.END_VZ,
-                "BPVX": F.BPVX(pvs),
-                "BPVY": F.BPVY(pvs),
-                "BPVZ": F.BPVZ(pvs),
-                "ALLPVFD"     : F.ALLPV_FD(pvs),
-                "ALLPVIP"     : F.ALLPV_IP(pvs),
-                
-            }
-        )
-        + Kinematics()
-    )
-
-    addstring = "DTF"
-    if(pv_constraint):
-            addstring += '_PV'
-    if(mass_constraint):
-            addstring += '_M'
-    addstring += particle_name
-
-    DTF_chi2ndof = FunctorCollection(
-            {
-                addstring+"_DTFCHI2": DTF.CHI2,
-                addstring+"_DTFNDOF": DTF.NDOF,
-                addstring+"_CTAU": DTF.CTAU,
-                addstring+"_CTAUERR": DTF.CTAUERR,
-                addstring+"_MERR": DTF.MASSERR,
-            }
-    )
-
-    if(mass_constraint):
-        if(pv_constraint): # MASS + PV
-            dtf_variables_mass_pv = FunctorCollection({
-                        'DTF_PV_M'+ particle_name + '_' + k: DTF(v)
-                        for k, v in variables.get_thor_functors().items()
-                    })
-            return dtf_variables_mass_pv+DTF_chi2ndof
-        else: # MASS
-            dtf_variables_mass = FunctorCollection(
-                {'DTF_M'+ particle_name + '_' + k: DTF(v)
-                 for k, v in variables.get_thor_functors().items()})
-        return dtf_variables_mass+DTF_chi2ndof
-
-    elif(pv_constraint): # PV
-        dtf_variables_pv = FunctorCollection({
-                'DTF_PV_' + k: DTF(v)
-                for k, v in variables.get_thor_functors().items()
-            })
-        return dtf_variables_pv+DTF_chi2ndof
-
-    else: # NO MASS/PV
-        dtf_variables = FunctorCollection(
-            {'DTF_' + k: DTF(v)
-             for k, v in variables.get_thor_functors().items()})
-        return dtf_variables+DTF_chi2ndof
-
-def make_composite_dtf_variables_3body(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name=""):
-    variables = (
-        FunctorCollection(
-            {
-                "M13": F.SUBCOMB(Functor=F.MASS, Indices=(1, 3)),
-                "M23": F.SUBCOMB(Functor=F.MASS, Indices=(2, 3)),
-            }
-        )
-    )
-
-    if(mass_constraint):
-        if(pv_constraint): # MASS + PV
-            dtf_variables_mass_pv = FunctorCollection({
-                        'DTF_PV_M'+ particle_name + '_' + k: DTF(v)
-                        for k, v in variables.get_thor_functors().items()
-                    })
-            return dtf_variables_mass_pv+make_composite_dtf_variables(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
-        else: # MASS
-            dtf_variables_mass = FunctorCollection(
-                {'DTF_M'+ particle_name + '_' + k: DTF(v)
-                 for k, v in variables.get_thor_functors().items()})
-        return dtf_variables_mass+make_composite_dtf_variables(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
-
-    elif(pv_constraint): # PV
-        dtf_variables_pv = FunctorCollection({
-                'DTF_PV_' + k: DTF(v)
-                for k, v in variables.get_thor_functors().items()
-            })
-        return dtf_variables_pv+make_composite_dtf_variables(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
-
-    else: # NO MASS/PV
-        dtf_variables = FunctorCollection(
-            {'DTF_' + k: DTF(v)
-             for k, v in variables.get_thor_functors().items()})
-
-    return dtf_variables+make_composite_dtf_variables(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
-
-def make_composite_dtf_variables_4body(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name=""):
-    variables = (
-        FunctorCollection(
-            {
-                "M14": F.SUBCOMB(Functor=F.MASS, Indices=(1, 4)),
-                "M24": F.SUBCOMB(Functor=F.MASS, Indices=(2, 4)),
-                "M34": F.SUBCOMB(Functor=F.MASS, Indices=(3, 4)),
-            }
-        )
-    )
-
-    if(mass_constraint):
-        if(pv_constraint): # MASS + PV
-            dtf_variables_mass_pv = FunctorCollection({
-                        'DTF_PV_M'+ particle_name + '_' + k: DTF(v)
-                        for k, v in variables.get_thor_functors().items()
-                    })
-            return dtf_variables_mass_pv+make_composite_dtf_variables_3body(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
-        else: # MASS
-            dtf_variables_mass = FunctorCollection(
-                {'DTF_M'+ particle_name + '_' + k: DTF(v)
-                 for k, v in variables.get_thor_functors().items()})
-        return dtf_variables_mass+make_composite_dtf_variables_3body(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
-
-    elif(pv_constraint): # PV
-        dtf_variables_pv = FunctorCollection({
-                'DTF_PV_' + k: DTF(v)
-                for k, v in variables.get_thor_functors().items()
-            })
-        return dtf_variables_pv+make_composite_dtf_variables_3body(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
-
-    else: # NO MASS/PV
-        dtf_variables = FunctorCollection(
-            {'DTF_' + k: DTF(v)
-             for k, v in variables.get_thor_functors().items()})
-    
-        return dtf_variables+make_composite_dtf_variables_3body(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
-
-
-def make_MC_basic_variables():
-    MC_MOTHER_ID = lambda gen: F.VALUE_OR(0) @ F.MC_MOTHER(gen, F.PARTICLE_ID)
-    MC_MOTHER_KEY = lambda gen: F.VALUE_OR(-1) @ F.MC_MOTHER(gen, F.OBJECT_KEY)
-
-    variables = (
-        FunctorCollection(
-            {
-                "END_VX": F.END_VX,
-                "END_VY": F.END_VY,
-                "END_VZ": F.END_VZ,
-                "OBJECT_KEY": F.OBJECT_KEY,
-                "ETA": F.ETA,
-                "PHI": F.PHI,
-                "ORIGIN_VX": F.ORIGIN_VX,
-                "ORIGIN_VY": F.ORIGIN_VY,
-                "ORIGIN_VZ": F.ORIGIN_VZ,
-                "FOURMOMENTUM": F.FOURMOMENTUM,
-                "TRUEID": F.PARTICLE_ID,
-                "MC_MOTHER_ID": MC_MOTHER_ID(1),
-                "MC_MOTHER_KEY": MC_MOTHER_KEY(1),
-                "MC_GD_MOTHER_ID": MC_MOTHER_ID(2),
-                "MC_GD_MOTHER_KEY": MC_MOTHER_KEY(2),
-                "MC_GD_GD_MOTHER_ID": MC_MOTHER_ID(3),
-                "MC_GD_GD_MOTHER_KEY": MC_MOTHER_KEY(3),
-            }
-        )
-        + Kinematics()
-    )
-
-
-    from PyConf.reading import get_mc_particles, get_pp2mcp_relations, get_mc_track_info
-    MC_data = get_mc_particles("/Event/HLT2/MC/Particles")
-    relations_charged = get_pp2mcp_relations("/Event/HLT2/Relations/ChargedPP2MCP")
-    relations_neutral = get_pp2mcp_relations("/Event/HLT2/Relations/NeutralPP2MCP")
-    mcreconstructed_all = MCReconstructed(
-        input_mcparticles=MC_data,
-        use_best_mcmatch=True,
-        relations_charged=relations_charged,
-        relations_neutral=relations_neutral,
-    )
-    mcreconstructible_all = MCReconstructible(
-        input_mctrackinfo=get_mc_track_info()
-    )
-    import FunTuple.functorcollections as FC
-    vars_reconstructed = FC.MCReconstructed(mcreconstructed_alg=mcreconstructed_all, extra_info=True)
-    vars_reconstructible = FC.MCReconstructible(mcreconstructible_alg=mcreconstructible_all, extra_info=True)
-
-
-    return variables+vars_reconstructed+vars_reconstructible
-
-def make_MC_composite_variables():
-    MC_MOTHER_ID = lambda gen: F.VALUE_OR(0) @ F.MC_MOTHER(gen, F.PARTICLE_ID)
-    MC_MOTHER_KEY = lambda gen: F.VALUE_OR(-1) @ F.MC_MOTHER(gen, F.OBJECT_KEY)
-
-    variables = (
-        FunctorCollection(
-            {
-                "END_VX": F.END_VX,
-                "END_VY": F.END_VY,
-                "END_VZ": F.END_VZ,
-                "LTIME": F.MC_LIFETIME,
-                "OBJECT_KEY": F.OBJECT_KEY,
-                "ETA": F.ETA,
-                "PHI": F.PHI,
-                "ORIGIN_VX": F.ORIGIN_VX,
-                "ORIGIN_VY": F.ORIGIN_VY,
-                "ORIGIN_VZ": F.ORIGIN_VZ,
-                "FOURMOMENTUM": F.FOURMOMENTUM,
-                "TRUEID": F.PARTICLE_ID,
-                "MC_MOTHER_ID": MC_MOTHER_ID(1),
-                "MC_MOTHER_KEY": MC_MOTHER_KEY(1),
-                "MC_GD_MOTHER_ID": MC_MOTHER_ID(2),
-                "MC_GD_MOTHER_KEY": MC_MOTHER_KEY(2),
-                "MC_GD_GD_MOTHER_ID": MC_MOTHER_ID(3),
-                "MC_GD_GD_MOTHER_KEY": MC_MOTHER_KEY(3),
-            }
-        )
-        + Kinematics()
-        + MCPromptDecay()
-        )
-
-    return variables
-
-def make_MC_event_variables(mc_header):
-    # define event level variables
-    evt_variables = EventInfo()
-    evt_variables += MCPrimaries(mc_header=mc_header)
-
-    return evt_variables
-
-def make_top_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"]):
-    from PyConf.reading import get_particles
-    from IsolationTools import VertexAndConeIsolation
-
-    possible_charm_locations = ["LongTrackIso", "TTrackIso", "DownstreamTrackIso", "UpstreamTrackIso", "NeutralIso", "PizIso"]
-    coneangles = [0.25,0.5,1.,1.5,2.]
-
-    count = 0
-    for location in locations:
-        extra_particles = get_particles(f"/Event/HLT2/{hlt2_line}/{location}/Particles")
-
-        for coneangle in coneangles:
-            top_RTAlg = VertexAndConeIsolation(
-                name=location+"_"+str(coneangle),
-                reference_particles=input_data,
-                related_particles=extra_particles,
-                cut=F.DR2<coneangle)
-
-            if count == 0:
-                top_iso_variables = ParticleIsolation(isolation_alg=top_RTAlg,array_indx_name='indx')
-            else:
-                top_iso_variables += ParticleIsolation(isolation_alg=top_RTAlg,array_indx_name='indx')
-            count += 1
-
-
-    return top_iso_variables
-
-def make_basic_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"]):
-    from PyConf.reading import get_particles
-    from IsolationTools import VertexAndConeIsolation
-    from PyConf.Algorithms import ThOrParticleSelection
-
-    basic_code = (F.FILTER(F.ALL) @ F.GET_ALL_BASICS())
-    basic_particles = ThOrParticleSelection(InputParticles=input_data, Functor=basic_code).OutputSelection
-
-    possible_charm_locations = ["LongTrackIso", "TTrackIso", "DownstreamTrackIso", "UpstreamTrackIso", "NeutralIso", "PizIso"]
-    coneangles = [0.25,0.5,1.,1.5,2.]
-
-    count = 0
-    for location in locations:
-        extra_particles = get_particles(f"/Event/HLT2/{hlt2_line}/{location}/Particles")
-
-        for coneangle in coneangles:
-            basic_RTAlg = VertexAndConeIsolation(
-                name=location+"_"+str(coneangle),
-                reference_particles=basic_particles,
-                related_particles=extra_particles,
-                cut=F.DR2<coneangle)
-
-            if count == 0:
-                basic_iso_variables = ParticleIsolation(isolation_alg=basic_RTAlg,array_indx_name='indx')
-            else:
-                basic_iso_variables += ParticleIsolation(isolation_alg=basic_RTAlg,array_indx_name='indx')
-            count += 1
-
-
-    return basic_iso_variables
-
-
-def make_intermediate_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"], composite_ID = "J/psi(1S)"):
-    from PyConf.reading import get_particles
-    from IsolationTools import VertexAndConeIsolation
-    from PyConf.Algorithms import ThOrParticleSelection
-
-    intermediate_code = F.FILTER(F.IS_ABS_ID(composite_ID)) @ F.GET_ALL_DESCENDANTS()
-    intermediate_particles = ThOrParticleSelection(InputParticles=input_data, Functor=intermediate_code).OutputSelection
-
-    possible_charm_locations = ["LongTrackIso", "TTrackIso", "DownstreamTrackIso", "UpstreamTrackIso", "NeutralIso", "PizIso"]
-    coneangles = [0.25,0.5,1.,1.5,2.]
-
-    count = 0
-    for location in locations:
-        extra_particles = get_particles(f"/Event/HLT2/{hlt2_line}/{location}/Particles")
-
-        for coneangle in coneangles:
-            intermediate_RTAlg = VertexAndConeIsolation(
-                name=location+"_"+str(coneangle),
-                reference_particles=intermediate_particles,
-                related_particles=extra_particles,
-                cut=F.DR2<coneangle)
-
-            if count == 0:
-                intermediate_iso_variables = ParticleIsolation(isolation_alg=intermediate_RTAlg,array_indx_name='indx')
-            else:
-                intermediate_iso_variables += ParticleIsolation(isolation_alg=intermediate_RTAlg,array_indx_name='indx')
-            count += 1
-
-
-    return intermediate_iso_variables
-- 
GitLab


From 60985307e19982209dc8631f81206a0e36a83d54 Mon Sep 17 00:00:00 2001
From: Donata Osthues <donata.osthues@cern.ch>
Date: Mon, 28 Oct 2024 13:21:46 +0100
Subject: [PATCH 31/51] add new main folder

---
 rare_charm/._.DS_Store            |  Bin 0 -> 4096 bytes
 rare_charm/._info.yaml            |  Bin 0 -> 4096 bytes
 rare_charm/info.yaml              |   60 ++
 rare_charm/main_Lb_to_Lcl.py      |   45 ++
 rare_charm/main_Lc_to_pll.py      |   55 ++
 rare_charm/main_d0_to_hhhh.py     |   50 ++
 rare_charm/main_d0_to_hhll.py     |   49 ++
 rare_charm/main_d_to_hhh.py       |   55 ++
 rare_charm/main_d_to_hll.py       |   53 ++
 rare_charm/options/._Lc_to_pll.py |  Bin 0 -> 4096 bytes
 rare_charm/options/Lb_to_Lcl.py   |  166 +++++
 rare_charm/options/Lc_to_pll.py   |  385 +++++++++++
 rare_charm/options/d0_to_hhhh.py  |  450 +++++++++++++
 rare_charm/options/d0_to_hhll.py  |  204 ++++++
 rare_charm/options/d_to_hhh.py    |  204 ++++++
 rare_charm/options/d_to_hll.py    |  156 +++++
 rare_charm/options/rare_charm.py  |  501 ++++++++++++++
 rare_charm/options/tupling.py     | 1003 +++++++++++++++++++++++++++++
 18 files changed, 3436 insertions(+)
 create mode 100644 rare_charm/._.DS_Store
 create mode 100644 rare_charm/._info.yaml
 create mode 100644 rare_charm/info.yaml
 create mode 100644 rare_charm/main_Lb_to_Lcl.py
 create mode 100644 rare_charm/main_Lc_to_pll.py
 create mode 100644 rare_charm/main_d0_to_hhhh.py
 create mode 100644 rare_charm/main_d0_to_hhll.py
 create mode 100644 rare_charm/main_d_to_hhh.py
 create mode 100644 rare_charm/main_d_to_hll.py
 create mode 100644 rare_charm/options/._Lc_to_pll.py
 create mode 100644 rare_charm/options/Lb_to_Lcl.py
 create mode 100644 rare_charm/options/Lc_to_pll.py
 create mode 100644 rare_charm/options/d0_to_hhhh.py
 create mode 100644 rare_charm/options/d0_to_hhll.py
 create mode 100644 rare_charm/options/d_to_hhh.py
 create mode 100644 rare_charm/options/d_to_hll.py
 create mode 100644 rare_charm/options/rare_charm.py
 create mode 100644 rare_charm/options/tupling.py

diff --git a/rare_charm/._.DS_Store b/rare_charm/._.DS_Store
new file mode 100644
index 0000000000000000000000000000000000000000..cb1f0ba4f31de76c88aa8b5e45c4706fffaecfc6
GIT binary patch
literal 4096
zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDJkFz{^v(m+1nBL)UWIhYCu0iY;W;207T
z1eBNu(ZNuGRne&6Xb6mkz-S1JhQMeDjE2By2#kinXb6mkz-S1JhQMeDP&ot`f#!iQ
z7|4ZWWELwFr55Lx7A2=Dq~#Z7D`e)Cq~?`m=I15m<Wwr;q^6Z9B;_RLWdpmqP+dcs
PLiIn~D>4jn|NjF3f4UuX

literal 0
HcmV?d00001

diff --git a/rare_charm/._info.yaml b/rare_charm/._info.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..0f756bdd37f2360438c41f725d75a1d78577905f
GIT binary patch
literal 4096
zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDJkFz{^v(m+1nBL)UWIUt(=a103v0xFS!
z=wMg?WDB5aVFdD_;!?@^xq68O1v#mDIf=z3rNyZ!DTyVi$^pS3J({t9(?Il#($~@;
zdK8R?z-S1JhQMeDjE2By2#kinXb6mkz-S1JhQMeDjD`TN5CC;HK^P3=LNYRo6^c@e
z^Gl18Qx($ki?S6m^GZ_lN;32F5_57Y6>?J3N)(cE67#ZwePO7sAx)wBAMO<y2D$(L
E0c!#(V*mgE

literal 0
HcmV?d00001

diff --git a/rare_charm/info.yaml b/rare_charm/info.yaml
new file mode 100644
index 0000000000..0e4e9d964b
--- /dev/null
+++ b/rare_charm/info.yaml
@@ -0,0 +1,60 @@
+# copied and adapted from: 
+# file        = AnalysisProductions/Charm_2024validation/info.yaml 
+# commit_hash = fdeac57133d09d7a6b39698dcca54154069928c2
+
+
+defaults:
+  inform:
+      - donata.osthues@cern.ch
+  wg: Charm
+
+
+{%- set conditions = [
+  "MagDown",
+  "MagUp",
+]%}
+
+
+{%- set subsamples = [
+  "d0_to_hhll",
+  "d_to_hll",
+  "d0_to_hhhh",
+  "d_to_hhh",
+  "Lb_to_Lcl",
+  "Lc_to_pll",
+]%}
+
+{% for id in subsamples %}
+{% for polarity in conditions %}
+
+{{id}}_2024_{{ polarity }}:
+  application: "DaVinci/v64r7@x86_64_v2-el9-clang16-opt"
+  input:
+    bk_query: "/LHCb/Collision24/Beam6800GeV-VeloClosed-{{polarity}}/Real Data/Sprucing24c2/94000000/CHARM.DST"
+
+    dq_flags:
+      - UNCHECKED
+      - OK
+    keep_running: true
+  output: DVTUPLE_{{id}}.ROOT
+  options:
+    entrypoint: Charm_2024raredecays.main_{{id}}:main
+    extra_options:
+      input_raw_format: 0.5
+      input_type: ROOT
+      simulation: False
+      data_type: "Upgrade"
+      event_store: HiveWhiteBoard
+      geometry_version: run3/2024.Q1.2-v00.00
+      conditions_version: master
+      input_process: "TurboPass"
+      input_stream: "charm"
+      evt_max: -1
+      compression:
+        algorithm: ZSTD
+        level: 1
+        max_buffer_size: 1048576
+
+
+{%- endfor %}
+{%- endfor %}
diff --git a/rare_charm/main_Lb_to_Lcl.py b/rare_charm/main_Lb_to_Lcl.py
new file mode 100644
index 0000000000..cfe2518b8b
--- /dev/null
+++ b/rare_charm/main_Lb_to_Lcl.py
@@ -0,0 +1,45 @@
+# copied and adapted from: 
+# file        = AnalysisProductions/Charm_2024validation/main_rare_charm.py 
+# commit_hash = fdeac57133d09d7a6b39698dcca54154069928c2
+
+
+
+###############################################################################
+# (c) Copyright 2021-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 .options.Lb_to_Lcl import *
+
+from DaVinci import Options, make_config
+from PyConf.reading import get_pvs, get_rec_summary
+
+def main(options: Options):
+        
+    # get ODIN and DecReports location
+    pvs = get_pvs()
+    rec_summary = get_rec_summary()
+
+    tuples = {
+        # muonic channels
+        "Lc2pmumu"   : maketuple_Lb2Lcmu_Lc2pmumu(options, pvs, rec_summary),
+        "Lc2pee"     : maketuple_Lb2Lcmu_Lc2pee(options, pvs, rec_summary),
+        "Lc2KSp_LL"  : maketuple_Lb2Lcmu_Lc2KSp_LL(options, pvs, rec_summary),
+        "Lc2KSp_DD"  : maketuple_Lb2Lcmu_Lc2KSp_DD(options, pvs, rec_summary),
+    }
+
+    #MCtuples = {
+    #}
+    
+    #if options.simulation:
+    #    tuples = tuples | MCtuples
+        
+    config = make_config(options, tuples)
+
+    return config
\ No newline at end of file
diff --git a/rare_charm/main_Lc_to_pll.py b/rare_charm/main_Lc_to_pll.py
new file mode 100644
index 0000000000..3472a739d0
--- /dev/null
+++ b/rare_charm/main_Lc_to_pll.py
@@ -0,0 +1,55 @@
+# copied and adapted from: 
+# file        = AnalysisProductions/Charm_2024validation/main_rare_charm.py 
+# commit_hash = fdeac57133d09d7a6b39698dcca54154069928c2
+
+
+
+###############################################################################
+# (c) Copyright 2021-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 .options.Lc_to_pll import *
+
+from DaVinci import Options, make_config
+from PyConf.reading import get_pvs, get_rec_summary
+
+def main(options: Options):
+        
+    # get ODIN and DecReports location
+    pvs = get_pvs()
+    rec_summary = get_rec_summary()
+
+    tuples = {
+        # baryonic channels
+        "D2pimumu_OS" : maketuple_Lc2pmumu(options, pvs, rec_summary),
+        "D2pimumu_SS" : maketuple_Lc2pmumu_SS(options, pvs, rec_summary),
+        "D2Kmumu_OS"  : maketuple_Lc2pee(options, pvs, rec_summary),
+        "D2Kmumu_SS"  : maketuple_Lc2pee_SS(options, pvs, rec_summary),
+        "Lc2pmue_OSep" : maketuple_Lc2pmue_OS(options, pvs, rec_summary, mupem = False),
+        "Lc2pmue_OSem" : maketuple_Lc2pmue_OS(options, pvs, rec_summary, mupem = True),
+        "D2pimumu_SS" : maketuple_Lc2pmue_SS(options, pvs, rec_summary),
+        # control channel
+        "D2Kmumu_OS"  : maketuple_Lc2pmumu_WS(options, pvs, rec_summary),
+        "D2Kmumu_SS"  : maketuple_Lc2pee_WS(options, pvs, rec_summary),
+        "D2Kmumu_OS"  : maketuple_Lc2pmue_WS(options, pvs, rec_summary),
+        "D2Kmumu_SS"  : maketuple_Lc2ppipi(options, pvs, rec_summary),
+        "D2Kmumu_SS"  : maketuple_Lc2KSp_LL(options, pvs, rec_summary),
+        "D2Kmumu_SS"  : maketuple_Lc2KSp_DD(options, pvs, rec_summary),
+    }
+
+    #MCtuples = {
+    #}
+    
+    #if options.simulation:
+    #    tuples = tuples | MCtuples
+        
+    config = make_config(options, tuples)
+
+    return config
\ No newline at end of file
diff --git a/rare_charm/main_d0_to_hhhh.py b/rare_charm/main_d0_to_hhhh.py
new file mode 100644
index 0000000000..a903ef6a36
--- /dev/null
+++ b/rare_charm/main_d0_to_hhhh.py
@@ -0,0 +1,50 @@
+# copied and adapted from: 
+# file        = AnalysisProductions/Charm_2024validation/main_rare_charm.py 
+# commit_hash = fdeac57133d09d7a6b39698dcca54154069928c2
+
+
+
+###############################################################################
+# (c) Copyright 2021-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 .options.d0_to_hhhh import *
+
+from DaVinci import Options, make_config
+from PyConf.reading import get_pvs, get_rec_summary
+
+def main(options: Options):
+        
+    # get ODIN and DecReports location
+    pvs = get_pvs()
+    rec_summary = get_rec_summary()
+
+    tuples = {
+        "DstToD0pi_D0ToKKPiPi"      : maketuple_DstToD0pi_D0ToKKPiPi(options, pvs, rec_summary),
+        "DstToD0pi_D0ToKPiPiPi_RS"  : maketuple_DstToD0pi_D0ToKPiPiPi_RS(options, pvs, rec_summary),
+        "DstToD0pi_D0ToKPiPiPi_WS"  : maketuple_DstToD0pi_D0ToKPiPiPi_WS(options, pvs, rec_summary),
+        "DstToD0pi_D0ToPiPiPiPi"    : maketuple_DstToD0pi_D0ToPiPiPiPi(options, pvs, rec_summary),
+        "Dst2D0pi_D02pipimumu_WSp"  : maketuple_Dst2D0pi_D02pipimumu_WS(options, pvs, rec_summary, pim = False),
+        "Dst2D0pi_D02pipimumu_WSm"  : maketuple_Dst2D0pi_D02pipimumu_WS(options, pvs, rec_summary, pim = True),
+        "Dst2D0pi_D02KKmumu_WSp"    : maketuple_Dst2D0pi_D02KKmumu_WS(options, pvs, rec_summary, Km = False),
+        "Dst2D0pi_D02KKmumu_WSm"    : maketuple_Dst2D0pi_D02KKmumu_WS(options, pvs, rec_summary, Km = True),
+        "Dst2D0pi_D02Kpimumu_WSp"   : maketuple_Dst2D0pi_D02Kpimumu_WS(options, pvs, rec_summary, Km = False),
+        "Dst2D0pi_D02Kpimumu_WSm"   : maketuple_Dst2D0pi_D02Kpimumu_WS(options, pvs, rec_summary, Km = True),
+    }
+
+    #MCtuples = {
+    #}
+    
+    #if options.simulation:
+    #    tuples = tuples | MCtuples
+        
+    config = make_config(options, tuples)
+
+    return config
diff --git a/rare_charm/main_d0_to_hhll.py b/rare_charm/main_d0_to_hhll.py
new file mode 100644
index 0000000000..42f7a98d3d
--- /dev/null
+++ b/rare_charm/main_d0_to_hhll.py
@@ -0,0 +1,49 @@
+# copied and adapted from: 
+# file        = AnalysisProductions/Charm_2024validation/main_rare_charm.py 
+# commit_hash = fdeac57133d09d7a6b39698dcca54154069928c2
+
+
+
+###############################################################################
+# (c) Copyright 2021-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 .options.d0_to_hhll import *
+
+from DaVinci import Options, make_config
+from PyConf.reading import get_pvs, get_rec_summary
+
+def main(options: Options):
+        
+    # get ODIN and DecReports location
+    pvs = get_pvs()
+    rec_summary = get_rec_summary()
+
+    tuples = {
+        "Dst2D0pi_D02pipimumu"   : maketuple_Dst2D0pi_D02pipimumu(options, pvs, rec_summary),
+        "Dst2D0pi_D02KKmumu"     : maketuple_Dst2D0pi_D02KKmumu(options, pvs, rec_summary),
+        "Dst2D0pi_D02Kpimumu_RS" : maketuple_Dst2D0pi_D02Kpimumu_RS(options, pvs, rec_summary),
+        "Dst2D0pi_D02Kpimumu_WS" : maketuple_Dst2D0pi_D02Kpimumu_WS(options, pvs, rec_summary),
+        "D02Kpimumu"             : maketuple_D02Kpimumu(options, pvs, rec_summary),
+        #"DstToD0pi_D0ToKKPiPi"   : maketuple_DstToD0pi_D0ToKKPiPi(options, pvs, rec_summary),
+        #"DstToD0pi_D0ToKPiPiPi"  : maketuple_DstToD0pi_D0ToKPiPiPi(options, pvs, rec_summary),
+        #"DstToD0pi_D0ToPiKPiPi"  : maketuple_DstToD0pi_D0ToPiKPiPi(options, pvs, rec_summary),
+        #"DstToD0pi_D0ToPiPiPiPi" : maketuple_DstToD0pi_D0ToPiPiPiPi(options, pvs, rec_summary),
+    }
+
+    #MCtuples = {
+    #}
+    
+    #if options.simulation:
+    #    tuples = tuples | MCtuples
+        
+    config = make_config(options, tuples)
+
+    return config
diff --git a/rare_charm/main_d_to_hhh.py b/rare_charm/main_d_to_hhh.py
new file mode 100644
index 0000000000..e63fd33665
--- /dev/null
+++ b/rare_charm/main_d_to_hhh.py
@@ -0,0 +1,55 @@
+# copied and adapted from: 
+# file        = AnalysisProductions/Charm_2024validation/main_rare_charm.py 
+# commit_hash = fdeac57133d09d7a6b39698dcca54154069928c2
+
+
+
+###############################################################################
+# (c) Copyright 2021-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 .options.d_to_hhh import *
+
+from DaVinci import Options, make_config
+from PyConf.reading import get_pvs, get_rec_summary
+
+def main(options: Options):
+        
+    # get ODIN and DecReports location
+    pvs = get_pvs()
+    rec_summary = get_rec_summary()
+
+    tuples = {
+        # muonic channels
+        "D2pimumu_WS" : maketuple_D2pimumu_WS(options, pvs, rec_summary),
+        "D2Kmumu_WS"  : maketuple_D2Kmumu_WS(options, pvs, rec_summary),
+        "D2Kpipi"     : maketuple_D2Kpipi(options, pvs, rec_summary),
+        "D2pipipi"    : maketuple_D2pipipi(options, pvs, rec_summary),
+        "D2KSK_LL"    : maketuple_D2KSK_LL(options, pvs, rec_summary),
+        "D2KSpi_LL"   : maketuple_D2KSpi_LL(options, pvs, rec_summary),
+
+        # control channels
+        #"D2Kpipi" : maketuple_D2Kpipi(options, pvs, rec_summary),
+        #"D2pipipi" : maketuple_D2pipipi(options, pvs, rec_summary),
+        #"D2pipiK" : maketuple_D2pipiK(options, pvs, rec_summary),
+        #"D2KKK" : maketuple_D2KKK(options, pvs, rec_summary),
+        #"D2piKK" : maketuple_D2piKK(options, pvs, rec_summary),
+
+    }
+
+    #MCtuples = {
+    #}
+    
+    #if options.simulation:
+    #    tuples = tuples | MCtuples
+        
+    config = make_config(options, tuples)
+
+    return config
\ No newline at end of file
diff --git a/rare_charm/main_d_to_hll.py b/rare_charm/main_d_to_hll.py
new file mode 100644
index 0000000000..ddc8525162
--- /dev/null
+++ b/rare_charm/main_d_to_hll.py
@@ -0,0 +1,53 @@
+# copied and adapted from: 
+# file        = AnalysisProductions/Charm_2024validation/main_rare_charm.py 
+# commit_hash = fdeac57133d09d7a6b39698dcca54154069928c2
+
+
+
+###############################################################################
+# (c) Copyright 2021-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 .options.d_to_hll import *
+
+from DaVinci import Options, make_config
+from PyConf.reading import get_pvs, get_rec_summary
+
+def main(options: Options):
+        
+    # get ODIN and DecReports location
+    pvs = get_pvs()
+    rec_summary = get_rec_summary()
+
+    tuples = {
+        # muonic channels
+        "D2pimumu_OS" : maketuple_D2pimumu_OS(options, pvs, rec_summary),
+        "D2pimumu_SS" : maketuple_D2pimumu_SS(options, pvs, rec_summary),
+        "D2Kmumu_OS"  : maketuple_D2Kmumu_OS(options, pvs, rec_summary),
+        "D2Kmumu_SS"  : maketuple_D2Kmumu_SS(options, pvs, rec_summary),
+
+        # control channels
+        #"D2Kpipi" : maketuple_D2Kpipi(options, pvs, rec_summary),
+        #"D2pipipi" : maketuple_D2pipipi(options, pvs, rec_summary),
+        #"D2pipiK" : maketuple_D2pipiK(options, pvs, rec_summary),
+        #"D2KKK" : maketuple_D2KKK(options, pvs, rec_summary),
+        #"D2piKK" : maketuple_D2piKK(options, pvs, rec_summary),
+
+    }
+
+    #MCtuples = {
+    #}
+    
+    #if options.simulation:
+    #    tuples = tuples | MCtuples
+        
+    config = make_config(options, tuples)
+
+    return config
\ No newline at end of file
diff --git a/rare_charm/options/._Lc_to_pll.py b/rare_charm/options/._Lc_to_pll.py
new file mode 100644
index 0000000000000000000000000000000000000000..8974e17ea96fdde85b81948b0451b2fdcef7a1cd
GIT binary patch
literal 4096
zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDJkFz{^v(m+1nBL)UWIUt(=a103vVqnnK
zfaqXY08}o3riBs6hl)!j=jZAr78K;9>g6OBmy{N#rlcg6q$&plgY@JH2&RK*|0U`&
zAbJ#xhQMeDjE2By2#kinXb6mkz-S1JhQMeDjE2By2#kgRt`GoqHbEE+<U%qsixrAe
zi}Op1l2aAZ@{6(+GV@AO^GY)F^AdA%Div~4(@GSQauV~hfqh}9t|3jK`XBBU83wuk
F{{e)pD1ZO}

literal 0
HcmV?d00001

diff --git a/rare_charm/options/Lb_to_Lcl.py b/rare_charm/options/Lb_to_Lcl.py
new file mode 100644
index 0000000000..f62e0e60b1
--- /dev/null
+++ b/rare_charm/options/Lb_to_Lcl.py
@@ -0,0 +1,166 @@
+# copied and adapted from: 
+# file        = AnalysisProductions/CharmRD/maketuple_D02Kmumu.py 
+# commit_hash = 73c8c844eb343b39ffc6b274fcdf2d196bfd7016
+
+
+from .tupling import (
+    make_composite_variables,
+    make_composite_variables_3body,
+    make_basic_variables,
+    make_hlt2_event_variables,
+    make_basic_dtf_variables,
+    make_composite_dtf_variables,
+    make_basic_isolation_variables,
+    make_intermediate_isolation_variables,
+    make_top_isolation_variables,
+)
+
+from .rare_charm import (
+    make_dtf_variables_hmumu,
+    make_dtf_variables_pmumu,
+    make_dtf_variables_hhmumu,
+)
+
+import Functors as F
+from Functors.math import log
+from DaVinci import Options, make_config
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from FunTuple import FunctorCollection
+from PyConf.reading import get_particles, get_pvs
+import FunTuple.functorcollections as FC
+from FunTuple import FunTuple_Particles as Funtuple
+
+from DecayTreeFitter import DecayTreeFitter
+
+
+def maketuple_Lb2Lcmu_Lc2pmumu(options, pvs, rec_summary):
+    name = "Lb2Lcmu_Lc2pmumu"
+    turbo_line = "Hlt2Charm_B2LcpMum_LcpToPpMumMup"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Lb"     : "[Lambda_b0 -> (Lambda_c+ -> (J/psi(1S) -> mu- mu+) p+) mu-]CC",
+        "Lc"     : "[Lambda_b0 -> ^(Lambda_c+ -> (J/psi(1S) -> mu- mu+) p+) mu-]CC",
+        "Jpsi"   : "[Lambda_b0 -> (Lambda_c+ -> ^(J/psi(1S) -> mu- mu+) p+) mu-]CC",
+        "lm"     : "[Lambda_b0 -> (Lambda_c+ -> (J/psi(1S) -> ^mu- mu+) p+) mu-]CC",
+        "lp"     : "[Lambda_b0 -> (Lambda_c+ -> (J/psi(1S) -> mu- ^mu+) p+) mu-]CC",
+        "pp"     : "[Lambda_b0 -> (Lambda_c+ -> (J/psi(1S) -> mu- mu+) ^p+) mu-]CC",
+        "mumtag" : "[Lambda_b0 -> (Lambda_c+ -> (J/psi(1S) -> mu- mu+) p+) ^mu-]CC",
+
+    }
+
+    variables = {
+        "Lb"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "mumtag" : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_Lb2Lcmu_Lc2pee(options, pvs, rec_summary):
+    name = "Lb2Lcmu_Lc2pee"
+    turbo_line = "Hlt2Charm_B2LcpMum_LcpToPpEmEp"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Lb"     : "[Lambda_b0 -> (Lambda_c+ -> (J/psi(1S) -> e- e+) p+) mu-]CC",
+        "Lc"     : "[Lambda_b0 -> ^(Lambda_c+ -> (J/psi(1S) -> e- e+) p+) mu-]CC",
+        "Jpsi"   : "[Lambda_b0 -> (Lambda_c+ -> ^(J/psi(1S) -> e- e+) p+) mu-]CC",
+        "lm"     : "[Lambda_b0 -> (Lambda_c+ -> (J/psi(1S) -> ^e- e+) p+) mu-]CC",
+        "lp"     : "[Lambda_b0 -> (Lambda_c+ -> (J/psi(1S) -> e- ^e+) p+) mu-]CC",
+        "pp"     : "[Lambda_b0 -> (Lambda_c+ -> (J/psi(1S) -> e- e+) ^p+) mu-]CC",
+        "mumtag" : "[Lambda_b0 -> (Lambda_c+ -> (J/psi(1S) -> e- e+) p+) ^mu-]CC",
+
+    }
+
+    variables = {
+        "Lb"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "mumtag" : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+
+
+def maketuple_Lb2Lcmu_Lc2KSp_LL(options, pvs, rec_summary):
+    name = "Lb2Lcmu_Lc2KSp_LL"
+    turbo_line = "Hlt2Charm_B2LcpMumX_LcpToKsPp_LL_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Lb"    : "[Lambda_b0 -> (Lambda_c+ -> (KS0 -> pi- pi+) p+) mu-]CC",
+        "Lc"    : "[Lambda_b0 -> ^(Lambda_c+ -> (KS0 -> pi- pi+) p+) mu-]CC",
+        "KS0"   : "[Lambda_b0 -> (Lambda_c+ -> ^(KS0 -> pi- pi+) p+) mu-]CC",
+        "pim"   : "[Lambda_b0 -> (Lambda_c+ -> (KS0 -> ^pi- pi+) p+) mu-]CC",
+        "pip"   : "[Lambda_b0 -> (Lambda_c+ -> (KS0 -> pi- ^pi+) p+) mu-]CC",
+        "pp"    : "[Lambda_b0 -> (Lambda_c+ -> (KS0 -> pi- pi+) ^p+) mu-]CC",
+        "mum"   : "[Lambda_b0 -> (Lambda_c+ -> (KS0 -> pi- pi+) p+) ^mu-]CC",
+    }
+
+    variables = {
+        "Lb"    : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
+        "Lc"    : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
+        "KS0"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
+        "pim"   : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "pip"   : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "pp"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "mum"   : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+
+
+def maketuple_Lb2Lcmu_Lc2KSp_DD(options, pvs, rec_summary):
+    name = "Lb2Lcmu_Lc2KSp_DD"
+    turbo_line = "Hlt2Charm_B2LcpMumX_LcpToKsPp_DD_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Lb"    : "[Lambda_b0 -> (Lambda_c+ -> (KS0 -> pi- pi+) p+) mu-]CC",
+        "Lc"    : "[Lambda_b0 -> ^(Lambda_c+ -> (KS0 -> pi- pi+) p+) mu-]CC",
+        "KS0"   : "[Lambda_b0 -> (Lambda_c+ -> ^(KS0 -> pi- pi+) p+) mu-]CC",
+        "pim"   : "[Lambda_b0 -> (Lambda_c+ -> (KS0 -> ^pi- pi+) p+) mu-]CC",
+        "pip"   : "[Lambda_b0 -> (Lambda_c+ -> (KS0 -> pi- ^pi+) p+) mu-]CC",
+        "pp"    : "[Lambda_b0 -> (Lambda_c+ -> (KS0 -> pi- pi+) ^p+) mu-]CC",
+        "mum"   : "[Lambda_b0 -> (Lambda_c+ -> (KS0 -> pi- pi+) p+) ^mu-]CC",
+    }
+
+    variables = {
+        "Lb"    : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
+        "Lc"    : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
+        "KS0"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
+        "pim"   : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "pip"   : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "pp"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "mum"   : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
diff --git a/rare_charm/options/Lc_to_pll.py b/rare_charm/options/Lc_to_pll.py
new file mode 100644
index 0000000000..f93dc3cd67
--- /dev/null
+++ b/rare_charm/options/Lc_to_pll.py
@@ -0,0 +1,385 @@
+# copied and adapted from: 
+# file        = AnalysisProductions/CharmRD/maketuple_D02Kmumu.py 
+# commit_hash = 73c8c844eb343b39ffc6b274fcdf2d196bfd7016
+
+
+from .tupling import (
+    make_composite_variables,
+    make_composite_variables_3body,
+    make_basic_variables,
+    make_hlt2_event_variables,
+    make_basic_dtf_variables,
+    make_composite_dtf_variables,
+    make_basic_isolation_variables,
+    make_intermediate_isolation_variables,
+    make_top_isolation_variables,
+)
+
+from .rare_charm import (
+    make_dtf_variables_hmumu,
+    make_dtf_variables_pmumu,
+    make_dtf_variables_hhmumu,
+)
+
+import Functors as F
+from Functors.math import log
+from DaVinci import Options, make_config
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from FunTuple import FunctorCollection
+from PyConf.reading import get_particles, get_pvs
+import FunTuple.functorcollections as FC
+from FunTuple import FunTuple_Particles as Funtuple
+
+from DecayTreeFitter import DecayTreeFitter
+
+
+
+def maketuple_Lc2pmumu(options, pvs, rec_summary):
+    name = "Lc2pmumu"
+    turbo_line = "Hlt2Charm_LcpToPpMumMup"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Lc"   : "[Lambda_c+ -> (J/psi(1S) -> mu- mu+) p+]CC",
+        "Jpsi" : "[Lambda_c+ -> ^(J/psi(1S) -> mu- mu+) p+]CC",
+        "lm"   : "[Lambda_c+ -> (J/psi(1S) -> ^mu- mu+) p+]CC",
+        "lp"   : "[Lambda_c+ -> (J/psi(1S) -> mu- ^mu+) p+]CC",
+        "pp"   : "[Lambda_c+ -> (J/psi(1S) -> mu- mu+) ^p+]CC",
+    }
+
+    variables = {
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_Lc2pmumu_SS(options, pvs, rec_summary):
+    name = "Lc2pmumu_SS"
+    turbo_line = "Hlt2Charm_LcpToPmMupMup"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Lc"   : "[Lambda_c+ -> (J/psi(1S) -> mu+ mu+) p~-]CC",
+        "Jpsi" : "[Lambda_c+ -> ^(J/psi(1S) -> mu+ mu+) p~-]CC",
+        "lp1"  : "[Lambda_c+ -> (J/psi(1S) -> ^mu+ mu+) p~-]CC",
+        "lp2"  : "[Lambda_c+ -> (J/psi(1S) -> mu+ ^mu+) p~-]CC",
+        "pm"   : "[Lambda_c+ -> (J/psi(1S) -> mu+ mu+) ^p~-]CC",
+    }
+
+    variables = {
+        "Lc"    : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lp1"   : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "lp2"   : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "pm"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_Lc2pee(options, pvs, rec_summary):
+    name = "Lc2pee"
+    turbo_line = "Hlt2Charm_LcpToPpEmEp"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Lc"   : "[Lambda_c+ -> (J/psi(1S) -> e- e+) p+]CC",
+        "Jpsi" : "[Lambda_c+ -> ^(J/psi(1S) -> e- e+) p+]CC",
+        "lm"   : "[Lambda_c+ -> (J/psi(1S) -> ^e- e+) p+]CC",
+        "lp"   : "[Lambda_c+ -> (J/psi(1S) -> e- ^e+) p+]CC",
+        "pp"   : "[Lambda_c+ -> (J/psi(1S) -> e- e+) ^p+]CC",
+    }
+
+    variables = {
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_Lc2pee_SS(options, pvs, rec_summary):
+    name = "Lc2pee_SS"
+    turbo_line = "Hlt2Charm_LcpToPmEpEp"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Lc"    : "[Lambda_c+ -> (J/psi(1S) -> e+ e+) p~-]CC",
+        "Jpsi"  : "[Lambda_c+ -> ^(J/psi(1S) -> e+ e+) p~-]CC",
+        "lp1"   : "[Lambda_c+ -> (J/psi(1S) -> ^e+ e+) p~-]CC",
+        "lp2"   : "[Lambda_c+ -> (J/psi(1S) -> e+ ^e+) p~-]CC",
+        "pm"    : "[Lambda_c+ -> (J/psi(1S) -> e+ e+) ^p~-]CC",
+    }
+
+    variables = {
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lp1"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "lp2"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "pm"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_Lc2pmue_OS(options, pvs, rec_summary, mupem = False):
+    name = "Lc2pmue_OSep"
+    turbo_line = "Hlt2Charm_LcpToPpMumpEpm"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Lc"   : "[Lambda_c+ -> (J/psi(1S) -> mu- e+) p+]CC",
+        "Jpsi" : "[Lambda_c+ -> ^(J/psi(1S) -> mu- e+) p+]CC",
+        "lm"   : "[Lambda_c+ -> (J/psi(1S) -> ^mu- e+) p+]CC",
+        "lp"   : "[Lambda_c+ -> (J/psi(1S) -> mu- ^e+) p+]CC",
+        "pp"   : "[Lambda_c+ -> (J/psi(1S) -> mu- e+) ^p+]CC",
+    }
+
+    if mupem == True:
+        name = "Lc2pmue_OSem"
+        branches = {
+            "Lc"   : "[Lambda_c+ -> (J/psi(1S) -> e- mu+) p+]CC",
+            "Jpsi" : "[Lambda_c+ -> ^(J/psi(1S) -> e- mu+) p+]CC",
+            "lm"   : "[Lambda_c+ -> (J/psi(1S) -> ^e- mu+) p+]CC",
+            "lp"   : "[Lambda_c+ -> (J/psi(1S) -> e- ^mu+) p+]CC",
+            "pp"   : "[Lambda_c+ -> (J/psi(1S) -> e- mu+) ^p+]CC",
+        }
+
+    variables = {
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_Lc2pmue_SS(options, pvs, rec_summary):
+    name = "Lc2pmue_SS"
+    turbo_line = "Hlt2Charm_LcpToPmMupEp"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Lc"   : "[Lambda_c+ -> (J/psi(1S) -> mu+ e+) p~-]CC",
+        "Jpsi" : "[Lambda_c+ -> ^(J/psi(1S) -> mu+ e+) p~-]CC",
+        "l1"   : "[Lambda_c+ -> (J/psi(1S) -> ^mu+ e+) p~-]CC",
+        "l2"   : "[Lambda_c+ -> (J/psi(1S) -> mu+ ^e+) p~-]CC",
+        "pp"   : "[Lambda_c+ -> (J/psi(1S) -> mu+ e+) ^p~-]CC",
+    }
+
+    variables = {
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
+        "l1"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "l2"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+        
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+
+#_____________control lines_________________________________________
+
+def maketuple_Lc2pmumu_WS(options, pvs, rec_summary):
+    name = "Lc2pmumu_WS"
+    turbo_line = "Hlt2Charm_LcpToPpMupMup_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Lc"    : "[Lambda_c+ -> (J/psi(1S) -> mu+ mu+) p+]CC",
+        "Jpsi"  : "[Lambda_c+ -> ^(J/psi(1S) -> mu+ mu+) p+]CC",
+        "lp1"   : "[Lambda_c+ -> (J/psi(1S) -> ^mu+ mu+) p+]CC",
+        "lp2"   : "[Lambda_c+ -> (J/psi(1S) -> mu+ ^mu+) p+]CC",
+        "pp"    : "[Lambda_c+ -> (J/psi(1S) -> mu+ mu+) ^p+]CC",
+    }
+
+    variables = {
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lp1"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "lp2"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_Lc2pee_WS(options, pvs, rec_summary):
+    name = "Lc2pee_WS"
+    turbo_line = "Hlt2Charm_LcpToPpEpEp_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Lc"    : "[Lambda_c+ -> (J/psi(1S) -> e+ e+) p+]CC",
+        "Jpsi"  : "[Lambda_c+ -> ^(J/psi(1S) -> e+ e+) p+]CC",
+        "lp1"   : "[Lambda_c+ -> (J/psi(1S) -> ^e+ e+) p+]CC",
+        "lp2"   : "[Lambda_c+ -> (J/psi(1S) -> e+ ^e+) p+]CC",
+        "pp"    : "[Lambda_c+ -> (J/psi(1S) -> e+ e+) ^p+]CC",
+    }
+
+    variables = {
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lp1"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "lp2"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_Lc2pmue_WS(options, pvs, rec_summary):
+    name = "Lc2pmue_WS"
+    turbo_line = "Hlt2Charm_LcpToPpMupEp_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Lc"    : "[Lambda_c+ -> (J/psi(1S) -> mu+ e+) p+]CC",
+        "Jpsi"  : "[Lambda_c+ -> ^(J/psi(1S) -> mu+ e+) p+]CC",
+        "lp1"   : "[Lambda_c+ -> (J/psi(1S) -> ^mu+ e+) p+]CC",
+        "lp2"   : "[Lambda_c+ -> (J/psi(1S) -> mu+ ^e+) p+]CC",
+        "pp"    : "[Lambda_c+ -> (J/psi(1S) -> mu+ e+) ^p+]CC",
+    }
+
+    variables = {
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lp1"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "lp2"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_Lc2ppipi(options, pvs, rec_summary):
+    name = "Lc2ppipi"
+    turbo_line = "Hlt2Charm_LcpToPpPimPip_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Lc"   : "[Lambda_c+ -> (J/psi(1S) -> pi- pi+) p+]CC",
+        "Jpsi" : "[Lambda_c+ -> ^(J/psi(1S) -> pi- pi+) p+]CC",
+        "lm"   : "[Lambda_c+ -> (J/psi(1S) -> ^pi- pi+) p+]CC",
+        "lp"   : "[Lambda_c+ -> (J/psi(1S) -> pi- ^pi+) p+]CC",
+        "pp"   : "[Lambda_c+ -> (J/psi(1S) -> pi- pi+) ^p+]CC",
+    }
+
+    variables = {
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_Lc2KSp_LL(options, pvs, rec_summary):
+    name = "Lc2KSp_LL"
+    turbo_line = "Hlt2Charm_LcpToKsPp_LL_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Lc"    : "[Lambda_c+ -> (KS0 -> pi- pi+) p+]CC",
+        "KS0"   : "[Lambda_c+ -> ^(KS0 -> pi- pi+) p+]CC",
+        "pim"   : "[Lambda_c+ -> (KS0 -> ^pi- pi+) p+]CC",
+        "pip"   : "[Lambda_c+ -> (KS0 -> pi- ^pi+) p+]CC",
+        "pp"    : "[Lambda_c+ -> (KS0 -> pi- pi+) ^p+]CC",
+    }
+
+    variables = {
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
+        "KS0"    : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
+        "pim"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_Lc2KSp_DD(options, pvs, rec_summary):
+    name = "Lc2KSp_DD"
+    turbo_line = "Hlt2Charm_LcpToKsPp_DD_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Lc"    : "[Lambda_c+ -> (KS0 -> pi- pi+) p+]CC",
+        "KS0"   : "[Lambda_c+ -> ^(KS0 -> pi- pi+) p+]CC",
+        "pim"   : "[Lambda_c+ -> (KS0 -> ^pi- pi+) p+]CC",
+        "pip"   : "[Lambda_c+ -> (KS0 -> pi- ^pi+) p+]CC",
+        "pp"   : "[Lambda_c+ -> (KS0 -> pi- pi+) ^p+]CC",
+    }
+
+    variables = {
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
+        "KS0"    : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
+        "pim"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
diff --git a/rare_charm/options/d0_to_hhhh.py b/rare_charm/options/d0_to_hhhh.py
new file mode 100644
index 0000000000..349fbd85b8
--- /dev/null
+++ b/rare_charm/options/d0_to_hhhh.py
@@ -0,0 +1,450 @@
+# copied from: 
+# file        = AnalysisProductions/Charm_2024validation/d0_to_hhhh.py 
+# commit_hash = fdeac57133d09d7a6b39698dcca54154069928c2
+
+
+from .tupling import (
+    make_composite_variables,
+    make_composite_variables_4body,
+    make_composite_variables_3body,
+    make_basic_variables,
+    make_hlt2_event_variables,
+    make_DeltaM_variable,
+    make_basic_dtf_variables,
+    make_composite_dtf_variables,
+    make_basic_isolation_variables,
+    make_intermediate_isolation_variables,
+    make_top_isolation_variables,
+)
+
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from FunTuple import FunTuple_Particles as Funtuple
+from DecayTreeFitter import DecayTreeFitter
+
+# I can't get make_composite_variables_4body to work for some reason...
+import Functors as F
+from FunTuple import FunctorCollection
+variables_4body = (
+    FunctorCollection(
+        {
+            #14
+            "M14": F.SUBCOMB(Functor=F.MASS, Indices=(1, 4)),
+            "SDOCA14"     : F.SDOCA(Child1=1,Child2=4),
+            "SDOCACHI214" : F.SDOCACHI2(Child1=1,Child2=4),
+            "DOCA14"      : F.DOCA(Child1=1,Child2=4),
+            "DOCACHI214"  : F.DOCACHI2(Child1=1,Child2=4),
+            "COS14": F.ALV(1, 4),
+            #24
+            "M24": F.SUBCOMB(Functor=F.MASS, Indices=(2, 4)),
+            "SDOCA24"     : F.SDOCA(Child1=2,Child2=4),
+            "SDOCACHI224" : F.SDOCACHI2(Child1=2,Child2=4),
+            "DOCA24"      : F.DOCA(Child1=2,Child2=4),
+            "DOCACHI224"  : F.DOCACHI2(Child1=2,Child2=4),
+            "COS24": F.ALV(2, 4),
+            #34
+            "M34": F.SUBCOMB(Functor=F.MASS, Indices=(3, 4)),
+            "SDOCA34"     : F.SDOCA(Child1=3,Child2=4),
+            "SDOCACHI234" : F.SDOCACHI2(Child1=3,Child2=4),
+            "DOCA34"      : F.DOCA(Child1=3,Child2=4),
+            "DOCACHI234"  : F.DOCACHI2(Child1=3,Child2=4),
+            "COS34": F.ALV(3, 4),
+        }
+    )
+)
+
+
+def maketuple_DstToD0pi_D0ToKKPiPi(options, pvs, rec_summary):
+    name = "DstToD0pi_D0ToKKPiPi"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmKpPimPip_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst"   : "[D*(2010)+ -> ([D0]CC -> K- K+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "D0"    : "[D*(2010)+ -> ^([D0]CC -> K- K+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "Km"    : "[D*(2010)+ -> ([D0]CC -> ^K- K+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "Kp"    : "[D*(2010)+ -> ([D0]CC -> K- ^K+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "Jpsi"  : "[D*(2010)+ -> ([D0]CC -> K- K+ ^(J/psi(1S) -> pi- pi+)) pi+]CC",
+        "lm"    : "[D*(2010)+ -> ([D0]CC -> K- K+ (J/psi(1S) -> ^pi- pi+)) pi+]CC",
+        "lp"    : "[D*(2010)+ -> ([D0]CC -> K- K+ (J/psi(1S) -> pi- ^pi+)) pi+]CC",
+        "spip"  : "[D*(2010)+ -> ([D0]CC -> K- K+ (J/psi(1S) -> pi- pi+)) ^pi+]CC",
+    }
+
+
+    DTF_PV = DecayTreeFitter(
+        name='DTF_D0ToKKPiPi_PV',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    #basic_variables = make_basic_variables(options, pvs, input_data) +\
+    #    make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)
+
+    composite_dtf_variables = make_composite_dtf_variables(options,
+                                                           pvs,
+                                                           input_data,
+                                                           DTF=DTF_PV,
+                                                           pv_constraint=True)
+
+    #composite_variables = make_composite_variables(options, pvs, input_data) + composite_dtf_variables
+        
+
+    #composite_variables_4body = make_composite_variables_3body(options, pvs, input_data) + composite_dtf_variables + variables_4body
+
+    #variables = {
+    #    "Dst"   : composite_variables+make_DeltaM_variable(options),
+    #    "D0"    : composite_variables_4body,
+    #    "h1"    : basic_variables,
+    #    "h2"    : basic_variables,
+    #    "h3"    : basic_variables,
+    #    "h4"    : basic_variables,
+    #    "h5"    : basic_variables,
+    #    "pis"   : basic_variables,
+    #}
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+composite_dtf_variables+make_top_isolation_variables(turbo_line, input_data),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+composite_dtf_variables+make_intermediate_isolation_variables(turbo_line, input_data),
+        "Km"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+        "Kp"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+composite_dtf_variables+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+        "spip"  : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+
+
+def maketuple_DstToD0pi_D0ToKPiPiPi_RS(options, pvs, rec_summary):
+    name = "DstToD0pi_D0ToKPiPiPi_RS"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPimPipPip_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst"   : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "D0"    : "[D*(2010)+ -> ^(D0 -> K- pi+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "Km"    : "[D*(2010)+ -> (D0 -> ^K- pi+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "pip"   : "[D*(2010)+ -> (D0 -> K- ^pi+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "Jpsi"  : "[D*(2010)+ -> (D0 -> K- pi+ ^(J/psi(1S) -> pi- pi+)) pi+]CC",
+        "lm"    : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> ^pi- pi+)) pi+]CC",
+        "lp"    : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> pi- ^pi+)) pi+]CC",
+        "spip"  : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> pi- pi+)) ^pi+]CC",
+    }
+
+    DTF_PV = DecayTreeFitter(
+        name='DTF_D0ToKPiPiPi_RS_PV',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    composite_dtf_variables = make_composite_dtf_variables(options,
+                                                           pvs,
+                                                           input_data,
+                                                           DTF=DTF_PV,
+                                                           pv_constraint=True)
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+composite_dtf_variables+make_top_isolation_variables(turbo_line, input_data),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+composite_dtf_variables+make_intermediate_isolation_variables(turbo_line, input_data),
+        "Km"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+        "pip"   : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+composite_dtf_variables+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+        "spip"  : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_DstToD0pi_D0ToKPiPiPi_WS(options, pvs, rec_summary):
+    name = "DstToD0pi_D0ToKPiPiPi_WS"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKpPimPimPip_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst"   : "[D*(2010)+ -> (D0 -> pi- K+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "D0"    : "[D*(2010)+ -> ^(D0 -> pi- K+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "pim"   : "[D*(2010)+ -> (D0 -> ^pi- K+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "Kp"    : "[D*(2010)+ -> (D0 -> pi- ^K+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "Jpsi"  : "[D*(2010)+ -> (D0 -> pi- K+ ^(J/psi(1S) -> pi- pi+)) pi+]CC",
+        "lm"    : "[D*(2010)+ -> (D0 -> pi- K+ (J/psi(1S) -> ^pi- pi+)) pi+]CC",
+        "lp"    : "[D*(2010)+ -> (D0 -> pi- K+ (J/psi(1S) -> pi- ^pi+)) pi+]CC",
+        "spip"  : "[D*(2010)+ -> (D0 -> pi- K+ (J/psi(1S) -> pi- pi+)) ^pi+]CC",
+    }
+
+    DTF_PV = DecayTreeFitter(
+        name='DTF_D0ToKPiPiPi_WS_PV',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    composite_dtf_variables = make_composite_dtf_variables(options,
+                                                           pvs,
+                                                           input_data,
+                                                           DTF=DTF_PV,
+                                                           pv_constraint=True)
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+composite_dtf_variables+make_top_isolation_variables(turbo_line, input_data),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+composite_dtf_variables+make_intermediate_isolation_variables(turbo_line, input_data),
+        "pim"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+        "Kp"   : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+composite_dtf_variables+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+        "spip"  : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_DstToD0pi_D0ToPiPiPiPi(options, pvs, rec_summary):
+    name = "DstToD0pi_D0ToPiPiPiPi"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimPimPipPip_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst"   : "[D*(2010)+ -> ([D0]CC -> pi- pi+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "D0"    : "[D*(2010)+ -> ^([D0]CC -> pi- pi+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "pim"   : "[D*(2010)+ -> ([D0]CC -> ^pi- pi+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "pip"   : "[D*(2010)+ -> ([D0]CC -> pi- ^pi+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "Jpsi"  : "[D*(2010)+ -> ([D0]CC -> pi- pi+ ^(J/psi(1S) -> pi- pi+)) pi+]CC",
+        "lm"    : "[D*(2010)+ -> ([D0]CC -> pi- pi+ (J/psi(1S) -> ^pi- pi+)) pi+]CC",
+        "lp"    : "[D*(2010)+ -> ([D0]CC -> pi- pi+ (J/psi(1S) -> pi- ^pi+)) pi+]CC",
+        "spip"  : "[D*(2010)+ -> ([D0]CC -> pi- pi+ (J/psi(1S) -> pi- pi+)) ^pi+]CC",
+    }
+
+
+    DTF_PV = DecayTreeFitter(
+        name='DTF_D0ToPiPiPiPi_PV',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    composite_dtf_variables = make_composite_dtf_variables(options,
+                                                           pvs,
+                                                           input_data,
+                                                           DTF=DTF_PV,
+                                                           pv_constraint=True)
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+composite_dtf_variables+make_top_isolation_variables(turbo_line, input_data),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+composite_dtf_variables+make_intermediate_isolation_variables(turbo_line, input_data),
+        "pim"   : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+        "pip"   : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+composite_dtf_variables+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+        "spip"  : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+
+
+
+def maketuple_Dst2D0pi_D02pipimumu_WS(options, pvs, rec_summary, pim = False):
+    name = "Dst2D0pi_D02pipimumu_WSp"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimpPimpMumpMump_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst"   : "[D*(2010)+ -> ([D0]CC -> pi+ pi+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
+        "D0"    : "[D*(2010)+ -> ^([D0]CC -> pi+ pi+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
+        "h1"    : "[D*(2010)+ -> ([D0]CC -> ^pi+ pi+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
+        "h2"    : "[D*(2010)+ -> ([D0]CC -> pi+ ^pi+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
+        "Jpsi"  : "[D*(2010)+ -> ([D0]CC -> pi+ pi+ ^(J/psi(1S) -> mu+ mu+)) pi+]CC",
+        "l1"    : "[D*(2010)+ -> ([D0]CC -> pi+ pi+ (J/psi(1S) -> ^mu+ mu+)) pi+]CC",
+        "l2"    : "[D*(2010)+ -> ([D0]CC -> pi+ pi+ (J/psi(1S) -> mu+ ^mu+)) pi+]CC",
+        "spip"  : "[D*(2010)+ -> ([D0]CC -> pi+ pi+ (J/psi(1S) -> mu+ mu+)) ^pi+]CC",
+    }
+
+    if pim == True:
+        name = "Dst2D0pi_D02pipimumu_WSm"
+
+        branches = {
+            "Dst"  : "[D*(2010)+ -> ([D0]CC -> pi- pi- (J/psi(1S) -> mu- mu-)) pi+]CC",
+            "D0"   : "[D*(2010)+ -> ^([D0]CC -> pi- pi- (J/psi(1S) -> mu- mu-)) pi+]CC",
+            "h1"   : "[D*(2010)+ -> ([D0]CC -> ^pi- pi- (J/psi(1S) -> mu- mu-)) pi+]CC",
+            "h2"   : "[D*(2010)+ -> ([D0]CC -> pi- ^pi- (J/psi(1S) -> mu- mu-)) pi+]CC",
+            "Jpsi" : "[D*(2010)+ -> ([D0]CC -> pi- pi- ^(J/psi(1S) -> mu- mu-)) pi+]CC",
+            "l1"   : "[D*(2010)+ -> ([D0]CC -> pi- pi- (J/psi(1S) -> ^mu- mu-)) pi+]CC",
+            "l2"   : "[D*(2010)+ -> ([D0]CC -> pi- pi- (J/psi(1S) -> mu- ^mu-)) pi+]CC",
+            "spip" : "[D*(2010)+ -> ([D0]CC -> pi- pi- (J/psi(1S) -> mu- mu-)) ^pi+]CC",
+        }
+
+    DTF_PV = DecayTreeFitter(
+        name='DTF_D0Topipimumu_WS_PV',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    composite_dtf_variables = make_composite_dtf_variables(options,
+                                                           pvs,
+                                                           input_data,
+                                                           DTF=DTF_PV,
+                                                           pv_constraint=True)
+    
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+composite_dtf_variables+make_top_isolation_variables(turbo_line, input_data),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+composite_dtf_variables+make_intermediate_isolation_variables(turbo_line, input_data),
+        "h1"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+        "h2"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+composite_dtf_variables+make_intermediate_isolation_variables(turbo_line, input_data),
+        "l1"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+        "l2"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+        "spip"  : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+
+
+def maketuple_Dst2D0pi_D02KKmumu_WS(options, pvs, rec_summary, Km = False):
+    name = "Dst2D0pi_D02KKmumu_WSp"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmpKmpMumpMump_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst"   : "[D*(2010)+ -> ([D0]CC -> K+ K+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
+        "D0"    : "[D*(2010)+ -> ^([D0]CC -> K+ K+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
+        "h1"    : "[D*(2010)+ -> ([D0]CC -> ^K+ K+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
+        "h2"    : "[D*(2010)+ -> ([D0]CC -> K+ ^K+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
+        "Jpsi"  : "[D*(2010)+ -> ([D0]CC -> K+ K+ ^(J/psi(1S) -> mu+ mu+)) pi+]CC",
+        "l1"    : "[D*(2010)+ -> ([D0]CC -> K+ K+ (J/psi(1S) -> ^mu+ mu+)) pi+]CC",
+        "l2"    : "[D*(2010)+ -> ([D0]CC -> K+ K+ (J/psi(1S) -> mu+ ^mu+)) pi+]CC",
+        "spip"  : "[D*(2010)+ -> ([D0]CC -> K+ K+ (J/psi(1S) -> mu+ mu+)) ^pi+]CC",
+    }
+
+
+    if Km == True:
+        name = "Dst2D0pi_D02KKmumu_WSm"
+
+        branches = {
+            "Dst"   : "[D*(2010)+ -> ([D0]CC -> K- K- (J/psi(1S) -> mu- mu-)) pi+]CC",
+            "D0"    : "[D*(2010)+ -> ^([D0]CC -> K- K- (J/psi(1S) -> mu- mu-)) pi+]CC",
+            "h1"    : "[D*(2010)+ -> ([D0]CC -> ^K- K- (J/psi(1S) -> mu- mu-)) pi+]CC",
+            "h2"    : "[D*(2010)+ -> ([D0]CC -> K- ^K- (J/psi(1S) -> mu- mu-)) pi+]CC",
+            "Jpsi"  : "[D*(2010)+ -> ([D0]CC -> K- K- ^(J/psi(1S) -> mu- mu-)) pi+]CC",
+            "l1"    : "[D*(2010)+ -> ([D0]CC -> K- K- (J/psi(1S) -> ^mu- mu-)) pi+]CC",
+            "l2"    : "[D*(2010)+ -> ([D0]CC -> K- K- (J/psi(1S) -> mu- ^mu-)) pi+]CC",
+            "spip"  : "[D*(2010)+ -> ([D0]CC -> K- K- (J/psi(1S) -> mu- mu-)) ^pi+]CC",
+        }
+
+
+    DTF_PV = DecayTreeFitter(
+        name='DTF_D0ToKKmumu_WS_PV',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    composite_dtf_variables = make_composite_dtf_variables(options,
+                                                           pvs,
+                                                           input_data,
+                                                           DTF=DTF_PV,
+                                                           pv_constraint=True)
+    
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+composite_dtf_variables+make_top_isolation_variables(turbo_line, input_data),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+composite_dtf_variables+make_intermediate_isolation_variables(turbo_line, input_data),
+        "h1"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+        "h2"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+composite_dtf_variables+make_intermediate_isolation_variables(turbo_line, input_data),
+        "l1"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+        "l2"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+        "spip"  : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_Dst2D0pi_D02Kpimumu_WS(options, pvs, rec_summary, Km = False):
+    name = "Dst2D0pi_D02Kpimumu_WSp"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmpPimpMumpMump_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+
+    branches = {
+        "Dst"   : "[D*(2010)+ -> ([D0]CC -> K+ pi+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
+        "D0"    : "[D*(2010)+ -> ^([D0]CC -> K+ pi+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
+        "h1"    : "[D*(2010)+ -> ([D0]CC -> ^K+ pi+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
+        "h2"    : "[D*(2010)+ -> ([D0]CC -> K+ ^pi+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
+        "Jpsi"  : "[D*(2010)+ -> ([D0]CC -> K+ pi+ ^(J/psi(1S) -> mu+ mu+)) pi+]CC",
+        "l1"    : "[D*(2010)+ -> ([D0]CC -> K+ pi+ (J/psi(1S) -> ^mu+ mu+)) pi+]CC",
+        "l2"    : "[D*(2010)+ -> ([D0]CC -> K+ pi+ (J/psi(1S) -> mu+ ^mu+)) pi+]CC",
+        "spip"  : "[D*(2010)+ -> ([D0]CC -> K+ pi+ (J/psi(1S) -> mu+ mu+)) ^pi+]CC",
+    }
+
+
+
+    if Km == True:
+        name = "Dst2D0pi_D02Kpimumu_WSm"
+
+        branches = {
+            "Dst" : "[D*(2010)+ -> ([D0]CC -> K- pi- (J/psi(1S) -> mu- mu-)) pi+]CC",
+            "D0"  : "[D*(2010)+ -> ^([D0]CC -> K- pi- (J/psi(1S) -> mu- mu-)) pi+]CC",
+            "h1"   : "[D*(2010)+ -> ([D0]CC -> ^K- pi- (J/psi(1S) -> mu- mu-)) pi+]CC",
+            "h2"  : "[D*(2010)+ -> ([D0]CC -> K- ^pi- (J/psi(1S) -> mu- mu-)) pi+]CC",
+            "Jpsi"  : "[D*(2010)+ -> ([D0]CC -> K- pi- ^(J/psi(1S) -> mu- mu-)) pi+]CC",
+            "l1"  : "[D*(2010)+ -> ([D0]CC -> K- pi- (J/psi(1S) -> ^mu- mu-)) pi+]CC",
+            "l2"  : "[D*(2010)+ -> ([D0]CC -> K- pi- (J/psi(1S) -> mu- ^mu-)) pi+]CC",
+            "spip" : "[D*(2010)+ -> ([D0]CC -> K- pi- (J/psi(1S) -> mu- mu-)) ^pi+]CC",
+        }
+
+
+
+    DTF_PV = DecayTreeFitter(
+        name='DTF_D0ToKpimumu_WS_PV',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    composite_dtf_variables = make_composite_dtf_variables(options,
+                                                           pvs,
+                                                           input_data,
+                                                           DTF=DTF_PV,
+                                                           pv_constraint=True)
+    
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+composite_dtf_variables+make_top_isolation_variables(turbo_line, input_data),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+composite_dtf_variables+make_intermediate_isolation_variables(turbo_line, input_data),
+        "h1"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+        "h2"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+composite_dtf_variables+make_intermediate_isolation_variables(turbo_line, input_data),
+        "l1"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+        "l2"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+        "spip"  : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
diff --git a/rare_charm/options/d0_to_hhll.py b/rare_charm/options/d0_to_hhll.py
new file mode 100644
index 0000000000..7685206874
--- /dev/null
+++ b/rare_charm/options/d0_to_hhll.py
@@ -0,0 +1,204 @@
+# copied and adapted from: 
+# file        = AnalysisProductions/CharmRD/maketuple_D02Kpimumu.py 
+# commit_hash = 73c8c844eb343b39ffc6b274fcdf2d196bfd7016
+
+
+from .tupling import (
+    make_composite_variables,
+    make_composite_variables_4body,
+    make_composite_variables_3body,
+    make_basic_variables,
+    make_hlt2_event_variables,
+    make_DeltaM_variable,
+    make_basic_dtf_variables,
+    make_composite_dtf_variables,
+    make_basic_isolation_variables,
+    make_intermediate_isolation_variables,
+    make_top_isolation_variables,
+)
+
+from .rare_charm import (
+    make_dtf_variables_hmumu,
+    make_dtf_variables_pmumu,
+    make_dtf_variables_hhmumu,
+)
+
+from DaVinci import Options, make_config
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles, get_pvs
+from FunTuple import FunTuple_Particles as Funtuple
+from FunTuple import FunctorCollection
+import FunTuple.functorcollections as FC
+from DecayTreeFitter import DecayTreeFitter
+import Functors as F
+from Functors.math import log
+
+
+
+
+#______________________ muon channels ______________________________________________________________________________________________________________
+
+
+def maketuple_Dst2D0pi_D02pipimumu(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02pipimumu"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimPipMumMup"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst"  : "[D*(2010)+ -> ([D0]CC -> pi+ pi- (J/psi(1S) -> mu- mu+)) pi+]CC",
+        "D0"   : "[D*(2010)+ -> ^([D0]CC -> pi+ pi- (J/psi(1S) -> mu- mu+)) pi+]CC",
+        "pip"  : "[D*(2010)+ -> ([D0]CC -> ^pi+ pi- (J/psi(1S) -> mu- mu+)) pi+]CC",
+        "pim"  : "[D*(2010)+ -> ([D0]CC -> pi+ ^pi- (J/psi(1S) -> mu- mu+)) pi+]CC",
+        "Jpsi" : "[D*(2010)+ -> ([D0]CC -> pi+ pi- ^(J/psi(1S) -> mu- mu+)) pi+]CC",
+        "lm"   : "[D*(2010)+ -> ([D0]CC -> pi+ pi- (J/psi(1S) -> ^mu- mu+)) pi+]CC",
+        "lp"   : "[D*(2010)+ -> ([D0]CC -> pi+ pi- (J/psi(1S) -> mu- ^mu+)) pi+]CC",
+        "spip" : "[D*(2010)+ -> ([D0]CC -> pi+ pi- (J/psi(1S) -> mu- mu+)) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "pim"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_Dst2D0pi_D02KKmumu(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02KKmumu"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmKpMumMup"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst"  : "[D*(2010)+ -> ([D0]CC -> K+ K- (J/psi(1S) -> mu- mu+)) pi+]CC",
+        "D0"   : "[D*(2010)+ -> ^([D0]CC -> K+ K- (J/psi(1S) -> mu- mu+)) pi+]CC",
+        "Kp"   : "[D*(2010)+ -> ([D0]CC -> ^K+ K- (J/psi(1S) -> mu- mu+)) pi+]CC",
+        "Km"   : "[D*(2010)+ -> ([D0]CC -> K+ ^K- (J/psi(1S) -> mu- mu+)) pi+]CC",
+        "Jpsi" : "[D*(2010)+ -> ([D0]CC -> K+ K- ^(J/psi(1S) -> mu- mu+)) pi+]CC",
+        "lm"   : "[D*(2010)+ -> ([D0]CC -> K+ K- (J/psi(1S) -> ^mu- mu+)) pi+]CC",
+        "lp"   : "[D*(2010)+ -> ([D0]CC -> K+ K- (J/psi(1S) -> mu- ^mu+)) pi+]CC",
+        "spip" : "[D*(2010)+ -> ([D0]CC -> K+ K- (J/psi(1S) -> mu- mu+)) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
+        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Km"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02Kpimumu_RS(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02Kpimumu_RS"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPipMumMup"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst"  : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
+        "D0"   : "[D*(2010)+ -> ^(D0 -> K- pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
+        "Km"   : "[D*(2010)+ -> (D0 -> ^K- pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
+        "pip"  : "[D*(2010)+ -> (D0 -> K- ^pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
+        "Jpsi" : "[D*(2010)+ -> (D0 -> K- pi+ ^(J/psi(1S) -> mu- mu+)) pi+]CC",
+        "lm"   : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> ^mu- mu+)) pi+]CC",
+        "lp"   : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> mu- ^mu+)) pi+]CC",
+        "spip" : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> mu- mu+)) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
+        "Km"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_Dst2D0pi_D02Kpimumu_WS(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02Kpimumu_WS"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKpPimMumMup"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst"  : "[D*(2010)+ -> (D0 -> K+ pi- (J/psi(1S) -> mu- mu+)) pi+]CC",
+        "D0"   : "[D*(2010)+ -> ^(D0 -> K+ pi- (J/psi(1S) -> mu- mu+)) pi+]CC",
+        "Kp"   : "[D*(2010)+ -> (D0 -> ^K+ pi- (J/psi(1S) -> mu- mu+)) pi+]CC",
+        "pim"  : "[D*(2010)+ -> (D0 -> K+ ^pi- (J/psi(1S) -> mu- mu+)) pi+]CC",
+        "Jpsi" : "[D*(2010)+ -> (D0 -> K+ pi- ^(J/psi(1S) -> mu- mu+)) pi+]CC",
+        "lm"   : "[D*(2010)+ -> (D0 -> K+ pi- (J/psi(1S) -> ^mu- mu+)) pi+]CC",
+        "lp"   : "[D*(2010)+ -> (D0 -> K+ pi- (J/psi(1S) -> mu- ^mu+)) pi+]CC",
+        "spip" : "[D*(2010)+ -> (D0 -> K+ pi- (J/psi(1S) -> mu- mu+)) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
+        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "pim"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D02Kpimumu(options, pvs, rec_summary):
+    name = "D02Kpimumu"
+    turbo_line = "Hlt2Charm_D0ToKmPipMumMup_Untag" # Why is there only the KmPip option and not KpPim? Is this inclusive?
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}", [turbo_line])
+
+    branches = {
+        "D0"   : "[D0 -> K- pi+ (J/psi(1S) -> mu- mu+)]CC",
+        "Km"   : "[D0 -> ^K- pi+ (J/psi(1S) -> mu- mu+)]CC",
+        "pip"  : "[D0 -> K- ^pi+ (J/psi(1S) -> mu- mu+)]CC",
+        "Jpsi" : "[D0 -> K- pi+ ^(J/psi(1S) -> mu- mu+)]CC",
+        "lm"   : "[D0 -> K- pi+ (J/psi(1S) -> ^mu- mu+)]CC",
+        "lp"   : "[D0 -> K- pi+ (J/psi(1S) -> mu- ^mu+)]CC",
+    }
+
+    variables = {
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_top_isolation_variables(turbo_line, input_data),
+        "Km"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
diff --git a/rare_charm/options/d_to_hhh.py b/rare_charm/options/d_to_hhh.py
new file mode 100644
index 0000000000..d62674f963
--- /dev/null
+++ b/rare_charm/options/d_to_hhh.py
@@ -0,0 +1,204 @@
+# copied from: 
+# file        = AnalysisProductions/Charm_2024validation/d_to_hhh.py 
+# commit_hash = fdeac57133d09d7a6b39698dcca54154069928c2
+
+
+from .tupling import (
+    make_composite_variables_3body,
+    make_b_composite_variables,
+    make_composite_variables,
+    make_basic_variables,
+    make_hlt2_event_variables,
+    make_composite_dtf_variables_3body,
+    make_basic_dtf_variables,
+    make_basic_isolation_variables,
+    make_intermediate_isolation_variables,
+    make_top_isolation_variables,
+)
+
+from .rare_charm import (
+    make_dtf_variables_hmumu,
+    make_dtf_variables_pmumu,
+    make_dtf_variables_hhmumu,
+)
+
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from FunTuple import FunTuple_Particles as Funtuple
+                      
+
+
+def maketuple_D2pimumu_WS(options, pvs, rec_summary):
+    name = "D2pimumu_WS"
+    turbo_line = "Hlt2Charm_DpDspToPipMupMup_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp"    : "[D+ -> (J/psi(1S) -> mu+ mu+) pi+]CC",
+        "Jpsi"  : "[D+ -> (J/psi(1S) -> mu+ mu+) pi+]CC",
+        "lp1"   : "[D+ -> (J/psi(1S) -> ^mu+ mu+) pi+]CC",
+        "lp2"   : "[D+ -> (J/psi(1S) -> mu+ ^mu+) pi+]CC",
+        "hp"    : "[D+ -> (J/psi(1S) -> mu+ mu+) ^pi+]CC",
+    }
+
+
+    variables = {
+        "Dp"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lp1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "hp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+
+
+def maketuple_D2Kmumu_WS(options, pvs, rec_summary):
+    name = "D2Kmumu_WS"
+    turbo_line = "Hlt2Charm_DpDspToKpMupMup_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp"    : "[D+ -> (J/psi(1S) -> mu+ mu+) K+]CC",
+        "Jpsi"  : "[D+ -> (J/psi(1S) -> mu+ mu+) K+]CC",
+        "lp1"   : "[D+ -> (J/psi(1S) -> ^mu+ mu+) K+]CC",
+        "lp2"   : "[D+ -> (J/psi(1S) -> mu+ ^mu+) K+]CC",
+        "hp"    : "[D+ -> (J/psi(1S) -> mu+ mu+) ^K+]CC",
+    }
+
+
+    variables = {
+        "Dp"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lp1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "hp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+
+
+def maketuple_D2Kpipi(options, pvs, rec_summary):
+    name = "D2Kpipi"
+    turbo_line = "Hlt2Charm_DpDspToPipPimPip_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp"   : "[D+ -> (J/psi(1S) -> pi- pi+) K+]CC",
+        "Jpsi" : "[D+ -> (J/psi(1S) -> pi- pi+) K+]CC",
+        "lm"   : "[D+ -> (J/psi(1S) -> ^pi- pi+) K+]CC",
+        "lp"   : "[D+ -> (J/psi(1S) -> pi- ^pi+) K+]CC",
+        "hp"   : "[D+ -> (J/psi(1S) -> pi- pi+) ^K+]CC",
+    }
+
+    variables = {
+        "Dp"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "hp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_D2pipipi(options, pvs, rec_summary, _NoCuts=False):
+    name = "D2pipipi"
+    turbo_line = "Hlt2Charm_DpDspToPipPimPip_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp"   : "[D+ -> (J/psi(1S) -> pi- pi+) pi+]CC",
+        "Jpsi" : "[D+ -> (J/psi(1S) -> pi- pi+) pi+]CC",
+        "lm"   : "[D+ -> (J/psi(1S) -> ^pi- pi+) pi+]CC",
+        "lp"   : "[D+ -> (J/psi(1S) -> pi- ^pi+) pi+]CC",
+        "hp"   : "[D+ -> (J/psi(1S) -> pi- pi+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "hp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+
+
+def maketuple_D2KSK_LL(options, pvs, rec_summary):
+    name = "D2KSK_LL"
+    turbo_line = "Hlt2Charm_DpDspToKsKp_LL_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp"   : "[D+ -> (KS0 -> pi- pi+) K+]CC",
+        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) K+]CC",
+        "pim"  : "[D+ -> (KS0 -> ^pi- pi+) K+]CC",
+        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) K+]CC",
+        "hp"   : "[D+ -> (KS0 -> pi- pi+) ^K+]CC",
+    }
+
+    variables = {
+        "Dp"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+        "KS0"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "pim"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "hp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, use_loki_decay_finder=True)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_D2KSpi_LL(options, pvs, rec_summary):
+    name = "D2KSpi_LL"
+    turbo_line = "Hlt2Charm_DpDspToKsPip_LL_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp"   : "[D+ -> (KS0 -> pi- pi+) pi+]CC",
+        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) pi+]CC",
+        "pim"  : "[D+ -> (KS0 -> ^pi- pi+) pi+]CC",
+        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) pi+]CC",
+        "hp"   : "[D+ -> (KS0 -> pi- pi+) ^pi+]CC",
+    }
+
+
+    variables = {
+        "Dp"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+        "KS0"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "pim"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "hp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, use_loki_decay_finder=True)
+
+    return [myfilter, mytuple]
+
diff --git a/rare_charm/options/d_to_hll.py b/rare_charm/options/d_to_hll.py
new file mode 100644
index 0000000000..6986a85f66
--- /dev/null
+++ b/rare_charm/options/d_to_hll.py
@@ -0,0 +1,156 @@
+# copied and adapted from: 
+# file        = AnalysisProductions/CharmRD/maketuple_D02Kmumu.py 
+# commit_hash = 73c8c844eb343b39ffc6b274fcdf2d196bfd7016
+
+
+from .tupling import (
+    make_composite_variables,
+    make_composite_variables_3body,
+    make_basic_variables,
+    make_hlt2_event_variables,
+    make_basic_dtf_variables,
+    make_composite_dtf_variables,
+    make_basic_isolation_variables,
+    make_intermediate_isolation_variables,
+    make_top_isolation_variables,
+)
+
+from .rare_charm import (
+    make_dtf_variables_hmumu,
+    make_dtf_variables_pmumu,
+    make_dtf_variables_hhmumu,
+)
+
+import Functors as F
+from Functors.math import log
+from DaVinci import Options, make_config
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from FunTuple import FunctorCollection
+from PyConf.reading import get_particles, get_pvs
+import FunTuple.functorcollections as FC
+from FunTuple import FunTuple_Particles as Funtuple
+
+from DecayTreeFitter import DecayTreeFitter
+
+
+
+def maketuple_D2pimumu_OS(options, pvs, rec_summary): 
+    name = "D2pimumu_OS"
+    turbo_line = "Hlt2Charm_DpDspToPipMumMup" 
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp"   : "[D+ -> (J/psi(1S) -> mu- mu+) pi+]CC",
+        "Jpsi" : "[D+ -> ^(J/psi(1S) -> mu- mu+) pi+]CC",
+        "lm"   : "[D+ -> (J/psi(1S) -> ^mu- mu+) pi+]CC",
+        "lp"   : "[D+ -> (J/psi(1S) -> mu- ^mu+) pi+]CC",
+        "hp"   : "[D+ -> (J/psi(1S) -> mu- mu+) ^pi+]CC",
+    }
+
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+        "Jpsi" : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+
+
+def maketuple_D2pimumu_SS(options, pvs, rec_summary): 
+    name = "D2pimumu_SS"
+    turbo_line = "Hlt2Charm_DpDspToPimMupMup"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp"    : "[D+ -> (J/psi(1S) -> mu+ mu+) pi-]CC",
+        "Jpsi"  : "[D+ -> (J/psi(1S) -> mu+ mu+) pi-]CC",
+        "lp1"   : "[D+ -> (J/psi(1S) -> ^mu+ mu+) pi-]CC",
+        "lp2"   : "[D+ -> (J/psi(1S) -> mu+ ^mu+) pi-]CC",
+        "hm"    : "[D+ -> (J/psi(1S) -> mu+ mu+) ^pi-]CC",
+    }
+
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+        "Jpsi" : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lp1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "hm"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+    
+    return [myfilter, mytuple]
+
+
+
+def maketuple_D2Kmumu_OS(options, pvs, rec_summary):
+    name = "D2Kmumu_OS"
+    turbo_line = "Hlt2Charm_DpDspToKpMumMup" 
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp"   : "[D+ -> (J/psi(1S) -> mu- mu+) K+]CC",
+        "Jpsi" : "[D+ -> ^(J/psi(1S) -> mu- mu+) K+]CC",
+        "lm"   : "[D+ -> (J/psi(1S) -> ^mu- mu+) K+]CC",
+        "lp"   : "[D+ -> (J/psi(1S) -> mu- ^mu+) K+]CC",
+        "hp"   : "[D+ -> (J/psi(1S) -> mu- mu+) ^K+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+        "Jpsi" : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+
+
+def maketuple_D2Kmumu_SS(options, pvs, rec_summary):
+    name = "D2dKmumu_SS"
+    turbo_line = "Hlt2Charm_DpDspToKmMupMup" 
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp"    : "[D+ -> (J/psi(1S) -> mu+ mu+) K-]CC",
+        "Jpsi"  : "[D+ -> (J/psi(1S) -> mu+ mu+) K-]CC",
+        "lp1"   : "[D+ -> (J/psi(1S) -> ^mu+ mu+) K-]CC",
+        "lp2"   : "[D+ -> (J/psi(1S) -> mu+ ^mu+) K-]CC",
+        "hm"    : "[D+ -> (J/psi(1S) -> mu+ mu+) ^K-]CC",
+    }
+
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+        "Jpsi" : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lp1"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp2"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "hm"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+
+
+
diff --git a/rare_charm/options/rare_charm.py b/rare_charm/options/rare_charm.py
new file mode 100644
index 0000000000..dff2ef39bd
--- /dev/null
+++ b/rare_charm/options/rare_charm.py
@@ -0,0 +1,501 @@
+# copied from: 
+# file        = AnalysisProductions/Charm_2024validation/d_to_hhh.py 
+# commit_hash = fdeac57133d09d7a6b39698dcca54154069928c2
+
+
+from .tupling import (
+    make_composite_variables,
+    make_composite_variables_3body,
+    make_DeltaM_variable,
+    make_basic_variables,
+    make_hlt2_event_variables,
+    make_top_isolation_variables,
+    make_basic_isolation_variables,
+    make_intermediate_isolation_variables,
+    make_composite_dtf_variables,
+    make_composite_dtf_variables_3body,
+    make_basic_dtf_variables,
+)
+
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from FunTuple import FunTuple_Particles as Funtuple
+
+def make_dtf_variables_hmumu(options, pvs, input_data, ptype):
+
+    if ptype not in ["basic", "composite"]:
+        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
+
+    from DecayTreeFitter import DecayTreeFitter
+    
+    DTF = DecayTreeFitter(
+        name=f'DTF_{{hash}}',
+        input_particles=input_data)
+
+    DTFvtx = DecayTreeFitter(
+        name=f'DTFvtx_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    DTFmassDp = DecayTreeFitter(
+        name=f'DTFmassDp_{{hash}}',
+        input_particles=input_data,
+        mass_constraints=["D+"])
+
+    DTFvtxmassDp = DecayTreeFitter(
+        name=f'DTFvtxmassDp_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D+"])
+
+    DTFmassDsp = DecayTreeFitter(
+        name=f'DTFmassDsp_{{hash}}',
+        input_particles=input_data,
+        substitutions = ['D+{{D_s+}}'],
+        mass_constraints=["D_s+"])
+
+    DTFvtxmassDsp = DecayTreeFitter(
+        name=f'DTFvtxmassDsp_{{hash}}',
+        input_particles=input_data,
+        substitutions = ['D+{{D_s+}}',"J/psi(1S){{J/psi(1S)}}"],#trick
+        mass_constraints=["D_s+"],
+        input_pvs=pvs,
+    )
+
+    if ptype == "basic":
+        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassDp,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="Dp")
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassDp,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="Dp")
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassDsp,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="Dsp")
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassDsp,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="Dsp")
+        return dtf_vars
+
+    if ptype == "composite":
+        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassDp,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="Dp")
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassDp,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="Dp")
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassDsp,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="Dsp")
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassDsp,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="Dsp")
+        return dtf_vars
+
+
+def make_dtf_variables_pmumu(options, pvs, input_data, ptype):
+
+    if ptype not in ["basic", "composite"]:
+        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
+
+    from DecayTreeFitter import DecayTreeFitter
+    
+    DTF = DecayTreeFitter(
+        name=f'DTF_{{hash}}',
+        input_particles=input_data)
+
+    DTFvtx = DecayTreeFitter(
+        name=f'DTFvtx_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    DTFmass = DecayTreeFitter(
+        name=f'DTFmass_{{hash}}',
+        input_particles=input_data,
+        mass_constraints=["Lambda_c+"])
+
+    DTFvtxmass = DecayTreeFitter(
+        name=f'DTFvtxmass_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["Lambda_c+"])
+
+    if ptype == "basic":
+        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmass,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="Lc")
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmass,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="Lc")
+        return dtf_vars
+
+    if ptype == "composite":
+        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmass,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="D0")
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmass,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="D0")
+        return dtf_vars
+
+def make_dtf_variables_hhmumu(options, pvs, input_data, ptype):
+
+    if ptype not in ["basic", "composite","composite3b"]:
+        Exception(f"I want \'basic\' or \'composite\' or \'composite3b\. Got {ptype}")
+
+    from DecayTreeFitter import DecayTreeFitter
+    
+    DTF = DecayTreeFitter(
+        name=f'DTF_{{hash}}',
+        input_particles=input_data)
+
+    DTFvtx = DecayTreeFitter(
+        name=f'DTFvtx_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    DTFmass = DecayTreeFitter(
+        name=f'DTFmass_{{hash}}',
+        input_particles=input_data,
+        mass_constraints=["D0"])
+
+    DTFvtxmass = DecayTreeFitter(
+        name=f'DTFvtxmass_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["D0"])
+
+    if ptype == "basic":
+        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmass,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="D0")
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmass,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="D0")
+        return dtf_vars
+
+    if ptype == "composite3b":
+        dtf_vars = make_composite_dtf_variables_3body(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
+                                             DTF=DTFmass,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="D0")
+        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
+                                             DTF=DTFvtxmass,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="D0")
+
+        return dtf_vars
+        
+    if ptype == "composite":
+        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmass,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="D0")
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmass,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="D0")
+        return dtf_vars
+
+
+def maketuple_D2pimumu(options, pvs, rec_summary):
+    name = "D2pimumu"
+    turbo_line = "Hlt2Charm_DpDspToPipMumMup"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> (J/psi(1S) -> mu- mu+) pi+]CC",
+        "Jpsi" : "[D+ -> ^(J/psi(1S) -> mu- mu+) pi+]CC",
+        "lm"   : "[D+ -> (J/psi(1S) -> ^mu- mu+) pi+]CC",
+        "lp"   : "[D+ -> (J/psi(1S) -> mu- ^mu+) pi+]CC",
+        "hp" : "[D+ -> (J/psi(1S) -> mu- mu+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
+        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation: 
+
+        variables = {
+            "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+            "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2pimumu_WS(options, pvs, rec_summary):
+    name = "D2pimumu_WS"
+    turbo_line = "Hlt2Charm_DpDspToPipMupMup_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> (J/psi(1S) -> mu+ mu+) pi+]CC",
+        "Jpsi" : "[D+ -> (J/psi(1S) -> mu+ mu+) pi+]CC",
+        "lp1"   : "[D+ -> (J/psi(1S) -> ^mu+ mu+) pi+]CC",
+        "lp2"   : "[D+ -> (J/psi(1S) -> mu+ ^mu+) pi+]CC",
+        "hp" : "[D+ -> (J/psi(1S) -> mu+ mu+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
+        "lp1"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+        "lp2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation: 
+
+        variables = {
+            "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+            "lp1"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "lp2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2pipipi(options, pvs, rec_summary):
+    name = "CharmRD_D2pipipi"
+    turbo_line = "Hlt2Charm_DpDspToPipPimPip_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> (J/psi(1S) -> pi- pi+) pi+]CC",
+        "Jpsi" : "[D+ -> (J/psi(1S) -> pi- pi+) pi+]CC",
+        "lm"   : "[D+ -> (J/psi(1S) -> ^pi- pi+) pi+]CC",
+        "lp"   : "[D+ -> (J/psi(1S) -> pi- ^pi+) pi+]CC",
+        "hp" : "[D+ -> (J/psi(1S) -> pi- pi+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
+        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation: 
+
+        variables = {
+            "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+            "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2piee(options, pvs, rec_summary):
+    name = "D2piee"
+    turbo_line = "Hlt2Charm_DpDspToPipEmEp"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp" : "[D+ -> (J/psi(1S) -> e- e+) pi+]CC",
+        "Jpsi" : "[D+ -> ^(J/psi(1S) -> e- e+) pi+]CC",
+        "lm"   : "[D+ -> (J/psi(1S) -> ^e- e+) pi+]CC",
+        "lp"   : "[D+ -> (J/psi(1S) -> e- ^e+) pi+]CC",
+        "hp" : "[D+ -> (J/psi(1S) -> e- e+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
+        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation: 
+
+        variables = {
+            "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+            "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Lc2pmumu(options, pvs, rec_summary):
+    name = "Lc2pmumu"
+    turbo_line = "Hlt2Charm_LcpToPpMumMup"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Lc" : "[Lambda_c+ -> (J/psi(1S) -> mu- mu+) p+]CC",
+        "Jpsi" : "[Lambda_c+ -> ^(J/psi(1S) -> mu- mu+) p+]CC",
+        "lm"   : "[Lambda_c+ -> (J/psi(1S) -> ^mu- mu+) p+]CC",
+        "lp"  : "[Lambda_c+ -> (J/psi(1S) -> mu- ^mu+) p+]CC",
+        "pp" : "[Lambda_c+ -> (J/psi(1S) -> mu- mu+) ^p+]CC",
+    }
+
+    variables = {
+        "Lc"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "pp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation: 
+
+        variables = {
+            "Lc"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+            "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "pp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+def maketuple_Dst2D0pi_D02Kpimumu_RS(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02Kpimumu_RS"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPipMumMup"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst" : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
+        "D0"  : "[D*(2010)+ -> ^(D0 -> K- pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
+        "Km"   : "[D*(2010)+ -> (D0 -> ^K- pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
+        "pip"  : "[D*(2010)+ -> (D0 -> K- ^pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
+        "Jpsi"  : "[D*(2010)+ -> (D0 -> K- pi+ ^(J/psi(1S) -> mu- mu+)) pi+]CC",
+        "lm"  : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> ^mu- mu+)) pi+]CC",
+        "lp"  : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> mu- ^mu+)) pi+]CC",
+        "spip" : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> mu- mu+)) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b"),
+        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite"),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
+        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
+    }
+
+    if options.data_type == "Upgrade" or options.simulation: 
+
+        variables = {
+            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
+            "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
+            "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+            "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
diff --git a/rare_charm/options/tupling.py b/rare_charm/options/tupling.py
new file mode 100644
index 0000000000..5da60b4e0b
--- /dev/null
+++ b/rare_charm/options/tupling.py
@@ -0,0 +1,1003 @@
+# copied from: 
+# file        = AnalysisProductions/Charm_2024validation/d_to_hhh.py 
+# commit_hash = fdeac57133d09d7a6b39698dcca54154069928c2
+
+
+##############################################################################
+# (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.                                       #
+###############################################################################
+"""Common configuration functions
+
+"""
+
+import Functors as F
+from Functors.math import log
+import Functors.math as fmath
+
+from FunTuple import FunctorCollection
+from FunTuple.functorcollections import (
+    MCHierarchy,
+    MCPromptDecay,
+    Kinematics,
+    SelectionInfo,
+    HltTisTos,
+    MCVertexInfo,
+    MCKinematics,
+    ParticleID, #wrong variables PID_PI = 0, PROBNN_D = nan
+    EventInfo,
+    LHCInfo,
+    ParticleIsolation,
+    MCPrimaries,
+    MCReconstructed,
+    MCReconstructible,
+)
+
+from DaVinciMCTools import MCTruthAndBkgCat, MCReconstructed, MCReconstructible
+from PyConf.Algorithms import ParticleToSubcombinationsAlg
+from DecayTreeFitter import DecayTreeFitter
+
+Hlt1_global_lines = [
+    "Hlt1GECPassthroughDecision",
+    "Hlt1BeamGasDecision",
+    "Hlt1PassthroughDecision",
+    "Hlt1NoBeamDecision",
+    "Hlt1BeamOneDecision",
+    "Hlt1BeamTwoDecision",
+    "Hlt1BothBeamsDecision",
+    "Hlt1ODINLumiDecision",
+    "Hlt1ODINVeloOpenDecision",
+    "Hlt1ODINNoBiasDecision",
+    "Hlt1VeloMicroBiasDecision",
+    "Hlt1RICH1AlignmentDecision",
+    "Hlt1RICH2AlignmentDecision",
+    "Hlt1BeamGasDecision",
+    "Hlt1L02PPiDecision",
+    "Hlt1LowMassNoipDielectron_massSlice1_promptDecision",
+    "Hlt1LowMassNoipDielectron_SS_massSlice1_promptDecision",
+    "Hlt1LowMassNoipDielectron_massSlice2_promptDecision",
+    "Hlt1LowMassNoipDielectron_SS_massSlice2_promptDecision",
+    "Hlt1LowMassNoipDielectron_massSlice3_promptDecision",
+    "Hlt1LowMassNoipDielectron_SS_massSlice3_promptDecision",
+    "Hlt1LowMassNoipDielectron_massSlice4_promptDecision",
+    "Hlt1LowMassNoipDielectron_SS_massSlice4_promptDecision",
+    "Hlt1LowMassNoipDielectron_massSlice1_displacedDecision",
+    "Hlt1LowMassNoipDielectron_SS_massSlice1_displacedDecision",
+    "Hlt1LowMassNoipDielectron_massSlice2_displacedDecision",
+    "Hlt1LowMassNoipDielectron_SS_massSlice2_displacedDecision",
+    "Hlt1LowMassNoipDielectron_massSlice3_displacedDecision",
+    "Hlt1LowMassNoipDielectron_SS_massSlice3_displacedDecision",
+    "Hlt1LowMassNoipDielectron_massSlice4_displacedDecision",
+    "Hlt1LowMassNoipDielectron_SS_massSlice4_displacedDecision",
+]
+Hlt1_1track_lines = [
+    "Hlt1TrackMVADecision",
+    "Hlt1LowPtMuonDecision",
+    "Hlt1SingleHighPtMuonDecision",
+    "Hlt1SingleHighPtMuonNoMuIDDecision",
+    "Hlt1TrackMuonMVADecision",
+    "Hlt1OneMuonTrackLineDecision",
+    "Hlt1TrackElectronMVADecision",
+    "Hlt1SingleHighPtElectronDecision",
+    "Hlt1SingleHighEtDecision",
+]
+Hlt1_lines = Hlt1_1track_lines+[
+    "Hlt1D2KshhDecision",
+    "Hlt1TwoTrackMVACharmXSecDecision",
+    "Hlt1TwoTrackMVADecision",
+    "Hlt1TwoTrackKsDecision",
+    "Hlt1D2KPiDecision",
+    "Hlt1D2KKDecision",
+    "Hlt1D2PiPiDecision",
+    "Hlt1KsToPiPiDecision",
+    "Hlt1LowPtDiMuonDecision",#removed
+    "Hlt1DiMuonNoIPDecision",
+    "Hlt1DiMuonNoIP_ssDecision",
+    "Hlt1DiMuonHighMassDecision",
+    "Hlt1DiMuonLowMassDecision",#replaced by Hlt1DiMuonDisplacedDecision
+    "Hlt1DiMuonSoftDecision",
+    "Hlt1DiMuonDisplacedDecision",
+    "Hlt1TwoKsDecision",
+    "Hlt1D2KPiAlignmentDecision",
+    "Hlt1DiMuonHighMassAlignmentDecision",
+    "Hlt1DisplacedDiMuonAlignmentDecision",
+    "Hlt1DisplacedDielectronDecision",
+    "Hlt1DisplacedLeptonsDecision",#removed
+]
+
+
+Hlt2_lines = [
+    "Hlt2Charm_DstpToD0Pip_D0ToKmPip_XSec",
+    "Hlt2Charm_D0ToKmPip_XSec",
+    "Hlt2Charm_D0ToKmKp",
+    "Hlt2Charm_D0ToKmPip",
+    "Hlt2Charm_D0ToPimPip",
+    "Hlt2Charm_DpDspToKsKp_DD",
+    "Hlt2Charm_DpDspToKsKp_LD",
+    "Hlt2Charm_DpDspToKsKp_LL",
+    "Hlt2Charm_DpDspToKsPip_DD",
+    "Hlt2Charm_DpDspToKsPip_LD",
+    "Hlt2Charm_DpDspToKsPip_LL",
+    "Hlt2Charm_DpToKmPipPip",
+    "Hlt2Charm_DspToKmKpPip",
+    "Hlt2Charm_DpToKmPipPip_NoCuts",
+    "Hlt2Charm_DspToKmKpPip_NoCuts",
+    "Hlt2Charm_DpToKmPipPip_XSec",
+    "Hlt2Charm_DspToKmKpPip_XSec",
+    "Hlt2Charm_DstpToD0Pip_D0ToKmKp",
+    "Hlt2Charm_DstpToD0Pip_D0ToKmPip",
+    "Hlt2Charm_DstpToD0Pip_D0ToKpPim",
+    "Hlt2Charm_DstpToD0Pip_D0ToPimPip",
+    "Hlt2Charm_DstpToD0Pip_D0ToKmPip_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKpPim_LowBias",
+    "Hlt2Charm_D0ToKmPip_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKmKp_LowBias",
+    "Hlt2Charm_D0ToKmKp_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToPimPip_LowBias",
+    "Hlt2Charm_D0ToPimPip_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLL",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLL_Tight",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLDD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLDD_Tight",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDDD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDDD_Tight",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULLL",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULLL_Tight",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULDD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULDD_Tight",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLD_Tight",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDLD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDLD_Tight",
+    "Hlt2Charm_D0ToKsPimPip_LL",
+    "Hlt2Charm_D0ToKsPimPip_DD",
+    "Hlt2Charm_D0ToKsPimPip_LL_LowBias",
+    "Hlt2Charm_D0ToKsPimPip_LL_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_LL",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_DD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_LL_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_DD_LowBias",
+    "Hlt2Charm_D0ToKsKmPip_LL",
+    "Hlt2Charm_D0ToKsKmPip_DD",
+    "Hlt2Charm_D0ToKsKmPip_LL_LowBias",
+    "Hlt2Charm_D0ToKsKmPip_LL_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_LL",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_DD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_LL_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_DD_LowBias",
+    "Hlt2Charm_D0ToKsKpPim_LL",
+    "Hlt2Charm_D0ToKsKpPim_DD",
+    "Hlt2Charm_D0ToKsKpPim_LL_LowBias",
+    "Hlt2Charm_D0ToKsKpPim_DD_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_LL",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_DD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_LL_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_DD_LowBias",
+    "Hlt2Charm_D0ToKsKmKp_LL",
+    "Hlt2Charm_D0ToKsKmKp_DD",
+    "Hlt2Charm_D0ToKsKmKp_LL_LowBias",
+    "Hlt2Charm_D0ToKsKmKp_DD_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_LL",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_DD",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_LL_LowBias",
+    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_DD_LowBias",
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS',
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS',
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS_MVA',
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS_MVA',
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS',
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS',
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS_MVA',
+    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS_MVA',
+    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS',
+    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS',
+    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS_MVA',
+    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS_MVA',
+]
+
+def make_composite_variables(options, pvs, data, add_truth=True, add_Hlt1TisTos=True):
+    if not options.simulation:
+        add_truth = False
+    variables = (
+        FunctorCollection(
+            {
+                "MAXPT": F.MAX(F.PT),
+                "MINPT": F.MIN(F.PT),
+                "SUMPT": F.SUM(F.PT),
+                "MAXP": F.MAX(F.P),
+                "MINP": F.MIN(F.P),
+                "BPVDIRA": F.BPVDIRA(pvs),
+                "VCHI2DOF": F.CHI2DOF,
+                #"VNDOF": F.NDOF,
+                "BPVFDCHI2": F.BPVFDCHI2(pvs),
+                "BPVFD": F.BPVFD(pvs),
+                "BPVVDRHO": F.BPVVDRHO(pvs),
+                "BPVVDZ": F.BPVVDZ(pvs),
+                "BPVIPCHI2": F.BPVIPCHI2(pvs),
+                "BPVIP": F.BPVIP(pvs),
+                "LOGBPVIPCHI2": log(F.BPVIPCHI2(pvs)),
+                "BPVLTIME": F.BPVLTIME(pvs),
+                "MAXBPVIPCHI2": F.MAX(F.BPVIPCHI2(pvs)),
+                "MINBPVIPCHI2": F.MIN(F.BPVIPCHI2(pvs)),
+                "MAXBPVIP": F.MAX(F.BPVIP(pvs)),
+                "MINBPVIP": F.MIN(F.BPVIP(pvs)),
+                "MAXDOCACHI2": F.MAXDOCACHI2,
+                "MAXDOCA": F.MAXDOCA,
+                "MAXSDOCACHI2": F.MAXSDOCACHI2,
+                "MAXSDOCA": F.MAXSDOCA,
+                "ETA": F.ETA,
+                "PHI": F.PHI,
+                "END_VX": F.END_VX,
+                "END_VY": F.END_VY,
+                "END_VZ": F.END_VZ,
+                "END_VX_ERR":F.SQRT @ F.CALL(0,0) @ F.POS_COV_MATRIX @ F.ENDVERTEX,
+                "END_VY_ERR":F.SQRT @ F.CALL(1,1) @ F.POS_COV_MATRIX @ F.ENDVERTEX,
+                "END_VZ_ERR":F.SQRT @ F.CALL(2,2) @ F.POS_COV_MATRIX @ F.ENDVERTEX,
+                "BPVX": F.BPVX(pvs),
+                "BPVY": F.BPVY(pvs),
+                "BPVZ": F.BPVZ(pvs),
+                "BPVX_ERR": F.SQRT @ F.CALL(0,0) @ F.POS_COV_MATRIX @ F.BPV(pvs),
+                "BPVY_ERR": F.SQRT @ F.CALL(1,1) @ F.POS_COV_MATRIX @ F.BPV(pvs),
+                "BPVZ_ERR": F.SQRT @ F.CALL(2,2) @ F.POS_COV_MATRIX @ F.BPV(pvs),
+                "ALLPVFD"     : F.ALLPV_FD(pvs),
+                "ALLPVIP"     : F.ALLPV_IP(pvs),
+                "OBJECT_KEY": F.OBJECT_KEY,
+            }
+        )
+        + Kinematics()
+        #+ ParticleID(extra_info=True) #only for daughters
+    )
+
+    if add_Hlt1TisTos:
+        variables += HltTisTos(
+            selection_type="Hlt1", trigger_lines=Hlt1_lines, data=data
+        )
+
+    if add_truth:
+        variables = add_truth_matching_functors(
+            options,
+            variables,
+            data,
+            hierarchy=True,
+            kinematics=True,
+            vertex_info=True,
+            bkgcat=True,
+        )
+
+    return variables
+
+def make_tistoscombinations(options, pvs, data):
+    algo_output = ParticleToSubcombinationsAlg( Input=data )
+    relations = algo_output.OutputRelations
+
+    tistos_variables_extra = HltTisTos(
+        selection_type="Hlt1", trigger_lines=["Hlt1TwoTrackMVADecision"], data=algo_output.OutputParticles
+    )
+    tistos_combinations = {}
+    for k,v in tistos_variables_extra.get_thor_functors().items():
+        tistos_combinations[k + "_SUBCOMB" ] = F.MAP_INPUT_ARRAY( v, relations )
+    tistos_combinations = FunctorCollection( tistos_combinations )
+
+    return tistos_combinations
+
+def make_composite_variables_3body(options, pvs, data, add_truth=True):
+
+    variables = (
+        FunctorCollection(
+            {
+                #12
+                "M12": F.SUBCOMB(Functor=F.MASS, Indices=(1, 2)),
+                "SDOCA12"     : F.SDOCA(Child1=1,Child2=2),
+                "SDOCACHI212" : F.SDOCACHI2(Child1=1,Child2=2),
+                "DOCA12"      : F.DOCA(Child1=1,Child2=2),
+                "DOCACHI212"  : F.DOCACHI2(Child1=1,Child2=2),
+                "COS12": F.ALV(1, 2),
+                #"ETA12": F.SUBCOMB(Functor=F.ETA, Indices=(1, 2)),
+                #"PT12": F.SUBCOMB(Functor=F.PT, Indices=(1, 2)),
+                #"VCHI212": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(1, 2)),
+                #"END_VZ12": F.SUBCOMB(Functor=F.END_VZ, Indices=(1, 2)),
+                #"BPVZ12": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(1, 2)),
+                #"BPVCORRM12": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(1, 2)),
+                #13
+                "M13": F.SUBCOMB(Functor=F.MASS, Indices=(1, 3)),
+                "SDOCA13"     : F.SDOCA(Child1=1,Child2=3),
+                "SDOCACHI213" : F.SDOCACHI2(Child1=1,Child2=3),
+                "DOCA13"      : F.DOCA(Child1=1,Child2=3),
+                "DOCACHI213"  : F.DOCACHI2(Child1=1,Child2=3),
+                "COS13": F.ALV(1, 3),
+                #"ETA13": F.SUBCOMB(Functor=F.ETA, Indices=(1, 3)),
+                #"PT13": F.SUBCOMB(Functor=F.PT, Indices=(1, 3)),
+                #"VCHI213": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(1, 3)),
+                #"END_VZ13": F.SUBCOMB(Functor=F.END_VZ, Indices=(1, 3)),
+                #"BPVZ13": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(1, 3)),
+                #"BPVCORRM13": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(1, 3)),
+                #23
+                "M23": F.SUBCOMB(Functor=F.MASS, Indices=(2, 3)),
+                "SDOCA23"     : F.SDOCA(Child1=2,Child2=3),
+                "SDOCACHI223" : F.SDOCACHI2(Child1=2,Child2=3),
+                "DOCA23"      : F.DOCA(Child1=2,Child2=3),
+                "DOCACHI223"  : F.DOCACHI2(Child1=2,Child2=3),
+                "COS23": F.ALV(2, 3),
+                #"ETA23": F.SUBCOMB(Functor=F.ETA, Indices=(2, 3)),
+                #"PT23": F.SUBCOMB(Functor=F.PT, Indices=(2, 3)),
+                #"VCHI223": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(2, 3)),
+                #"END_VZ23": F.SUBCOMB(Functor=F.END_VZ, Indices=(2, 3)),
+                #"BPVZ23": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(2, 3)),
+                #"BPVCORRM23": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(2, 3)),
+            }
+        )
+    )
+    return make_composite_variables(options, pvs, data, add_truth)+make_tistoscombinations(options, pvs, data)+variables
+
+def make_composite_variables_4body(options, pvs, data, add_truth=True):
+
+    variables = (
+        FunctorCollection(
+            {
+                #14
+                "M14": F.SUBCOMB(Functor=F.MASS, Indices=(1, 4)),
+                "SDOCA14"     : F.SDOCA(Child1=1,Child2=4),
+                "SDOCACHI214" : F.SDOCACHI2(Child1=1,Child2=4),
+                "DOCA14"      : F.DOCA(Child1=1,Child2=4),
+                "DOCACHI214"  : F.DOCACHI2(Child1=1,Child2=4),
+                "COS14": F.ALV(1, 4),
+                #"ETA14": F.SUBCOMB(Functor=F.ETA, Indices=(1, 4)),
+                #"PT14": F.SUBCOMB(Functor=F.PT, Indices=(1, 4)),
+                #"VCHI214": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(1, 4)),
+                #"END_VZ14": F.SUBCOMB(Functor=F.END_VZ, Indices=(1, 4)),
+                #"BPVZ14": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(1, 4)),
+                #"BPVCORRM14": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(1, 4)),
+                #24
+                "M24": F.SUBCOMB(Functor=F.MASS, Indices=(2, 4)),
+                "SDOCA24"     : F.SDOCA(Child1=2,Child2=4),
+                "SDOCACHI224" : F.SDOCACHI2(Child1=2,Child2=4),
+                "DOCA24"      : F.DOCA(Child1=2,Child2=4),
+                "DOCACHI224"  : F.DOCACHI2(Child1=2,Child2=4),
+                "COS24": F.ALV(2, 4),
+                #"ETA24": F.SUBCOMB(Functor=F.ETA, Indices=(2, 4)),
+                #"PT24": F.SUBCOMB(Functor=F.PT, Indices=(2, 4)),
+                #"VCHI224": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(2, 4)),
+                #"END_VZ24": F.SUBCOMB(Functor=F.END_VZ, Indices=(2, 4)),
+                #"BPVZ24": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(2, 4)),
+                #"BPVCORRM24": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(2, 4)),
+                #34
+                "M34": F.SUBCOMB(Functor=F.MASS, Indices=(3, 4)),
+                "SDOCA34"     : F.SDOCA(Child1=3,Child2=4),
+                "SDOCACHI234" : F.SDOCACHI2(Child1=3,Child2=4),
+                "DOCA34"      : F.DOCA(Child1=3,Child2=4),
+                "DOCACHI234"  : F.DOCACHI2(Child1=3,Child2=4),
+                "COS34": F.ALV(3, 4),
+                #"ETA34": F.SUBCOMB(Functor=F.ETA, Indices=(3, 4)),
+                #"PT34": F.SUBCOMB(Functor=F.PT, Indices=(3, 4)),
+                #"VCHI234": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(3, 4)),
+                #"END_VZ34": F.SUBCOMB(Functor=F.END_VZ, Indices=(3, 4)),
+                #"BPVZ34": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(3, 4)),
+                #"BPVCORRM34": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(3, 4)),
+            }
+        )
+    )
+    return make_composite_variables_3body(options, pvs, data, add_truth)+variables #make_tistoscombinations already included
+
+def make_b_composite_variables(options, pvs, data, add_truth=True):
+    
+    # define helper functors
+    get_child = F.CHILD(1, F.FORWARDARG0) # change here the index of the child
+    get_SV =  F.ENDVERTEX @ F.FORWARDARG0
+    get_SV_pos = F.TOLINALG @ F.POSITION @ get_SV # only if composite (i.e. has vertex)
+    get_child_endvtx_pos = F.ENDVERTEX_POS  @ get_child
+    get_fdvec_child = get_child_endvtx_pos - get_SV_pos
+
+    # define observables
+    IP_wrt_SV = F.VALUE_OR(-1) @F.IP.bind(get_SV_pos , get_child)
+    IPCHI2_wrt_SV = F.VALUE_OR(-1) @ F.IPCHI2.bind(get_SV , get_child) # only if child is composite (i.e. has vertex)
+    FD_wrt_SV = F.VALUE_OR(-1) @ F.MAGNITUDE @ get_fdvec_child
+    FDCHI2_wrt_SV = F.VALUE_OR(-1) @ F.VTX_FDCHI2.bind(get_SV, get_child)
+
+    
+    variables = FunctorCollection(
+        {       
+            "ID": F.PARTICLE_ID ,
+            "PT": F.PT,
+            "P": F.P,
+            "MASS": F.MASS,
+            "CHILD1_IPwrtSV": IP_wrt_SV,
+            "CHILD1_IPCHI2wrtSV": IPCHI2_wrt_SV,
+            "CHILD1_FDwrtSV": FD_wrt_SV,
+            "CHILD1_FDCHI2wrtSV": FDCHI2_wrt_SV,
+            "PX": F.PX,
+            "PY": F.PY,
+            "PZ": F.PZ,
+            "END_VCHI2DOF": F.VALUE_OR(-1) @F.CHI2DOF @ F.ENDVERTEX,
+            "BPVCHI2DOF": F.VALUE_OR(-1) @F.CHI2DOF @ F.BPV(pvs),
+            # B2OC generic B hadron NN Hlt2 algorithm,
+            # not planning to use it directly for B2OC EM
+            "MVA": F.MVA(
+                MVAType="SigmaNet",
+                Config={
+                    "File":
+                    "paramfile://data/Hlt2B2OC_B_SigmaNet_Run3-v1.json",
+                    "Name":
+                    "B2OC_SigmaNet_Generic",
+                    "Lambda":
+                    "2.0",
+                    "NLayers":
+                    "3",
+                    "InputSize":
+                    "6",
+                    "Monotone_Constraints":
+                    "[1,-1,-1,-1,-1,-1]",
+                    "Variables":
+                    "log_B_PT,B_ETA,log_B_DIRA,log_B_ENDVERTEX_CHI2,log_B_IPCHI2_OWNPV,log_B_IP_OWNPV",
+                },
+                Inputs={
+                    "log_B_PT": fmath.log(F.PT),
+                    "B_ETA": F.ETA,
+                    "log_B_DIRA": fmath.log(1. - F.BPVDIRA(pvs)),
+                    "log_B_ENDVERTEX_CHI2": fmath.log(F.CHI2DOF),
+                    "log_B_IPCHI2_OWNPV": fmath.log(F.BPVIPCHI2(pvs)),
+                    "log_B_IP_OWNPV": fmath.log(F.BPVIP(pvs)),
+                }),
+            #'SSPionBDT_Mistag': F.SSPionBDT_Mistag(sspionTagging.OutputFlavourTags),
+            #'SSPionBDT_Decision': F.SSPionBDT_Decision(sspionTagging.OutputFlavourTags),
+
+        }
+    )
+    return make_composite_variables(options, pvs, data, add_truth)+make_tistoscombinations(options, pvs, data)+variables
+
+def make_DeltaM_variable(options):
+    return FunctorCollection({"DM": F.MASS - F.CHILD(1, F.MASS)})
+
+def make_basic_variables(options, pvs, data, add_truth=True, islong=False):
+    if not options.simulation:
+        add_truth = False
+    variables = (
+        FunctorCollection(
+            {
+                "TRCHI2DOF": F.VALUE_OR(-1) @ F.CHI2DOF @ F.TRACK,
+                "ETA": F.ETA,
+                "PHI": F.PHI,
+                "TRGHOSTPROB": F.GHOSTPROB,
+                "BPVIPCHI2": F.BPVIPCHI2(pvs),
+                "BPVIP": F.BPVIP(pvs),
+                "BPVX": F.BPVX(pvs),
+                "BPVY": F.BPVY(pvs),
+                "BPVZ": F.BPVZ(pvs),
+                "TX"          : F.TX,
+                "TY"          : F.TY,
+                "MINIPCHI2"   : F.MINIPCHI2(pvs),
+                "MINIP"       : F.MINIP(pvs),
+                "KEY"         : F.VALUE_OR(-1) @ F.OBJECT_KEY @ F.TRACK,
+                "ISMUON"      : F.ISMUON,
+                "TRACKPT": F.TRACK_PT,
+                "TRACKHISTORY": F.VALUE_OR(-1) @ F.TRACKHISTORY @ F.TRACK,
+                "QOVERP": F.VALUE_OR(-1) @ F.QOVERP @ F.TRACK,
+                "NDOF": F.VALUE_OR(-1) @ F.NDOF @ F.TRACK,
+                "NFTHITS": F.VALUE_OR(-1) @ F.NFTHITS @ F.TRACK,
+                "NHITS": F.VALUE_OR(-1) @ F.NHITS @ F.TRACK,
+                "NUTHITS": F.VALUE_OR(-1) @ F.NUTHITS @ F.TRACK,
+                "NVPHITS": F.VALUE_OR(-1) @ F.NVPHITS @ F.TRACK,
+                #"NMUONHITS": F.VALUE_OR(-1) @ F.NHITSMUONS @ F.TRACK, #https://gitlab.cern.ch/lhcb/Rec/-/merge_requests/3756
+                "TRACKHASVELO": F.VALUE_OR(-1) @ F.TRACKHASVELO @ F.TRACK,
+                "TRACKHASUT": F.VALUE_OR(-1) @ F.TRACKHASUT @ F.TRACK,
+                "OBJECT_KEY": F.OBJECT_KEY,
+                "HASBREM": F.HASBREM,
+                "BREMENERGY": F.BREMENERGY,
+                "BREMBENDCORR": F.BREMBENDCORR,
+            }
+        )
+        + Kinematics()
+        + ParticleID(extra_info=True)
+    )
+
+    if islong:
+        variables += FunctorCollection({
+            "CTBX": F.VALUE_OR(F.NaN) @ F.X_COORDINATE @ F.POSITION @ F.CLOSESTTOBEAM @ F.TRACK,#X_COORDINATE @ POSITION @ CLOSESTTOBEAM @ TRACK
+            "CTBY": F.VALUE_OR(F.NaN) @ F.Y_COORDINATE @ F.POSITION @ F.CLOSESTTOBEAM @ F.TRACK,
+            "CTBZ": F.VALUE_OR(F.NaN) @ F.Z_COORDINATE @ F.POSITION @ F.CLOSESTTOBEAM @ F.TRACK,
+        })
+    
+    variables += HltTisTos(
+        selection_type="Hlt1", trigger_lines=Hlt1_1track_lines, data=data
+    )
+    
+    if add_truth:
+        variables = add_truth_matching_functors(
+            options,
+            variables,
+            data,
+            hierarchy=True,
+            kinematics=True,
+            vertex_info=True,
+            bkgcat=False,
+        )
+
+    return variables
+
+def make_hlt2_event_variables(options, pvs, rec_summary):
+    # define event level variables
+    evt_variables = EventInfo()
+    if not options.simulation:
+        evt_variables += LHCInfo() #FillNumber
+    evt_variables += SelectionInfo(selection_type="Hlt2", trigger_lines=Hlt2_lines)
+    evt_variables += SelectionInfo(selection_type="Hlt1", trigger_lines=Hlt1_global_lines)
+    evt_variables += FunctorCollection(
+        {
+            "ALLPVX": F.ALLPVX(pvs),
+            "ALLPVY": F.ALLPVY(pvs),
+            "ALLPVZ": F.ALLPVZ(pvs),
+            "ALLPVNDOF": F.MAP(F.VALUE_OR(-1) @ F.NDOF) @ F.TES(pvs),
+            "ALLPVCHI2": F.MAP(F.VALUE_OR(-1) @ F.CHI2) @ F.TES(pvs),
+            "nPVs": F.SIZE(pvs),
+            "nTracks": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nTracks"),
+            "nLongTracks": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nLongTracks"),
+            "nMuonTracks": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nMuonTracks"),
+            "nFTClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nFTClusters"),
+            "nVPClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nVPClusters"),
+            "nUTClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nUTClusters"),
+            "nSPDhits": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nSPDhits"),
+            "nEcalClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nEcalClusters"),
+            "nEcalClusters": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nEcalClusters"),
+            "eCalTot": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "eCalTot"),
+            "hCalTot": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "hCalTot"),
+            "nRich1Hits": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nRich1Hits"),
+            "nRich2Hits": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nRich2Hits"),
+        }
+    )
+    return evt_variables
+
+def add_truth_matching_functors(
+    options,
+    variables,
+    data,
+    hierarchy=True,
+    kinematics=True,
+    vertex_info=True,
+    bkgcat=False,
+    prompt_info=True,
+):
+    """Add MC truth matching functors to an existing FunctorCollection.
+
+    Args:
+        options (DaVinci.Options): DaVinci options object.
+        variables (FunctorCollection): FunctorCollection to modify
+        data: data handle
+        hierarchy (bool): Add MCHierarchy info (default True)
+        kinematics (bool): Add MCKinematics info (default True)
+        vertex_info (bool): Add MCVertexInfo (default True)
+        bkgcat (bool): Add TRUEKEY and BKGCAT functors - intended for composite particles (default False)
+        prompt_info (bool): Add MCPromptDecay info (default True)
+
+    Returns:
+        FunctorCollection: modified FunctorCollection with truth matched variables.
+    """
+    assert (
+        options.simulation
+    ), "options.simulation is set to False - it doesn't make sense to add truth matching."
+
+    MCTRUTH = MCTruthAndBkgCat(data)
+
+    if bkgcat:
+        variables += FunctorCollection(
+            {
+                # Important note: specify an invalid value for integer functors if there exists no truth info.
+                #                 The invalid value for floating point functors is set to nan.
+                "TRUEKEY": F.VALUE_OR(-1) @ MCTRUTH(F.OBJECT_KEY),
+                "BKGCAT": MCTRUTH.BkgCat,
+            }
+        )
+    if hierarchy:
+        variables += MCHierarchy(mctruth_alg=MCTRUTH)  # likely to change again!!
+    if vertex_info:
+        variables += MCVertexInfo(mctruth_alg=MCTRUTH)  # likely to change again!!
+    if kinematics:
+        variables += MCKinematics(mctruth_alg=MCTRUTH)  # likely to change again!!
+    if prompt_info:
+        variables += MCPromptDecay(mctruth_alg=MCTRUTH)
+
+    return variables
+
+### DTF variables ###
+
+def make_basic_dtf_variables(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name="", islong=False):
+    variables = (
+        FunctorCollection(
+            {
+                "TRCHI2DOF": F.VALUE_OR(-1) @ F.CHI2DOF @ F.TRACK,
+                "ETA": F.ETA,
+                "PHI": F.PHI,
+                "TRGHOSTPROB": F.GHOSTPROB,
+                "BPVIPCHI2": F.BPVIPCHI2(pvs),
+                "BPVIP": F.BPVIP(pvs),
+                "BPVX": F.BPVX(pvs),
+                "BPVY": F.BPVY(pvs),
+                "BPVZ": F.BPVZ(pvs),
+                "TX"          : F.TX,
+                "TY"          : F.TY,
+                "MINIPCHI2"   : F.MINIPCHI2(pvs),
+                "MINIP"       : F.MINIP(pvs),
+                "KEY"         : F.VALUE_OR(-1) @ F.OBJECT_KEY @ F.TRACK,
+                "TRACKPT": F.TRACK_PT,
+                "TRACKHISTORY": F.VALUE_OR(-1) @ F.TRACKHISTORY @ F.TRACK,
+                "QOVERP": F.VALUE_OR(-1) @ F.QOVERP @ F.TRACK,
+                "NDOF": F.VALUE_OR(-1) @ F.NDOF @ F.TRACK,
+            }
+        )
+        + Kinematics()
+    )
+
+    if islong:
+        variables += FunctorCollection({
+            "CTBX": F.VALUE_OR(F.NaN) @ F.X_COORDINATE @ F.POSITION @ F.CLOSESTTOBEAM @ F.TRACK,#X_COORDINATE @ POSITION @ CLOSESTTOBEAM @ TRACK
+            "CTBY": F.VALUE_OR(F.NaN) @ F.Y_COORDINATE @ F.POSITION @ F.CLOSESTTOBEAM @ F.TRACK,
+            "CTBZ": F.VALUE_OR(F.NaN) @ F.Z_COORDINATE @ F.POSITION @ F.CLOSESTTOBEAM @ F.TRACK,
+        })
+    
+    if(mass_constraint):
+        if(pv_constraint): # MASS + PV
+            dtf_variables_mass_pv = FunctorCollection({
+                        'DTF_PV_M'+ particle_name + '_' + k: DTF(v)
+                        for k, v in variables.get_thor_functors().items()
+                    })
+            return dtf_variables_mass_pv
+        else: # MASS
+            dtf_variables_mass = FunctorCollection(
+                {'DTF_M'+ particle_name + '_' + k: DTF(v)
+                 for k, v in variables.get_thor_functors().items()})
+        return dtf_variables_mass
+
+    elif(pv_constraint): # PV
+        dtf_variables_pv = FunctorCollection({
+                'DTF_PV_' + k: DTF(v)
+                for k, v in variables.get_thor_functors().items()
+            })
+        return dtf_variables_pv
+
+    else: # NO MASS/PV
+        dtf_variables = FunctorCollection(
+            {'DTF_' + k: DTF(v)
+             for k, v in variables.get_thor_functors().items()})
+        return dtf_variables
+
+def make_composite_dtf_variables(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name=""):
+    variables = (
+        FunctorCollection(
+            {
+                "MAXPT": F.MAX(F.PT),
+                "MINPT": F.MIN(F.PT),
+                "SUMPT": F.SUM(F.PT),
+                "MAXP": F.MAX(F.P),
+                "MINP": F.MIN(F.P),
+                "BPVDIRA": F.BPVDIRA(pvs),
+                "VCHI2DOF": F.CHI2DOF, #CHI2VXNDOF
+                "BPVFDCHI2": F.BPVFDCHI2(pvs),
+                "BPVFD": F.BPVFD(pvs),
+                "BPVVDRHO": F.BPVVDRHO(pvs),
+                "BPVVDZ": F.BPVVDZ(pvs),
+                "BPVIPCHI2": F.BPVIPCHI2(pvs),
+                "BPVIP": F.BPVIP(pvs),
+                "LOGBPVIPCHI2": log(F.BPVIPCHI2(pvs)),
+                "BPVLTIME": F.BPVLTIME(pvs),
+                "MAXBPVIPCHI2": F.MAX(F.BPVIPCHI2(pvs)), #MAX_
+                "MINBPVIPCHI2": F.MIN(F.BPVIPCHI2(pvs)),
+                "MAXBPVIP": F.MAX(F.BPVIP(pvs)),
+                "MINBPVIP": F.MIN(F.BPVIP(pvs)),
+                "ETA": F.ETA,
+                "PHI": F.PHI,
+                "END_VX": F.END_VX, #END_
+                "END_VY": F.END_VY,
+                "END_VZ": F.END_VZ,
+                "BPVX": F.BPVX(pvs),
+                "BPVY": F.BPVY(pvs),
+                "BPVZ": F.BPVZ(pvs),
+                "ALLPVFD"     : F.ALLPV_FD(pvs),
+                "ALLPVIP"     : F.ALLPV_IP(pvs),
+                
+            }
+        )
+        + Kinematics()
+    )
+
+    addstring = "DTF"
+    if(pv_constraint):
+            addstring += '_PV'
+    if(mass_constraint):
+            addstring += '_M'
+    addstring += particle_name
+
+    DTF_chi2ndof = FunctorCollection(
+            {
+                addstring+"_DTFCHI2": DTF.CHI2,
+                addstring+"_DTFNDOF": DTF.NDOF,
+                addstring+"_CTAU": DTF.CTAU,
+                addstring+"_CTAUERR": DTF.CTAUERR,
+                addstring+"_MERR": DTF.MASSERR,
+            }
+    )
+
+    if(mass_constraint):
+        if(pv_constraint): # MASS + PV
+            dtf_variables_mass_pv = FunctorCollection({
+                        'DTF_PV_M'+ particle_name + '_' + k: DTF(v)
+                        for k, v in variables.get_thor_functors().items()
+                    })
+            return dtf_variables_mass_pv+DTF_chi2ndof
+        else: # MASS
+            dtf_variables_mass = FunctorCollection(
+                {'DTF_M'+ particle_name + '_' + k: DTF(v)
+                 for k, v in variables.get_thor_functors().items()})
+        return dtf_variables_mass+DTF_chi2ndof
+
+    elif(pv_constraint): # PV
+        dtf_variables_pv = FunctorCollection({
+                'DTF_PV_' + k: DTF(v)
+                for k, v in variables.get_thor_functors().items()
+            })
+        return dtf_variables_pv+DTF_chi2ndof
+
+    else: # NO MASS/PV
+        dtf_variables = FunctorCollection(
+            {'DTF_' + k: DTF(v)
+             for k, v in variables.get_thor_functors().items()})
+        return dtf_variables+DTF_chi2ndof
+
+def make_composite_dtf_variables_3body(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name=""):
+    variables = (
+        FunctorCollection(
+            {
+                "M13": F.SUBCOMB(Functor=F.MASS, Indices=(1, 3)),
+                "M23": F.SUBCOMB(Functor=F.MASS, Indices=(2, 3)),
+            }
+        )
+    )
+
+    if(mass_constraint):
+        if(pv_constraint): # MASS + PV
+            dtf_variables_mass_pv = FunctorCollection({
+                        'DTF_PV_M'+ particle_name + '_' + k: DTF(v)
+                        for k, v in variables.get_thor_functors().items()
+                    })
+            return dtf_variables_mass_pv+make_composite_dtf_variables(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
+        else: # MASS
+            dtf_variables_mass = FunctorCollection(
+                {'DTF_M'+ particle_name + '_' + k: DTF(v)
+                 for k, v in variables.get_thor_functors().items()})
+        return dtf_variables_mass+make_composite_dtf_variables(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
+
+    elif(pv_constraint): # PV
+        dtf_variables_pv = FunctorCollection({
+                'DTF_PV_' + k: DTF(v)
+                for k, v in variables.get_thor_functors().items()
+            })
+        return dtf_variables_pv+make_composite_dtf_variables(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
+
+    else: # NO MASS/PV
+        dtf_variables = FunctorCollection(
+            {'DTF_' + k: DTF(v)
+             for k, v in variables.get_thor_functors().items()})
+
+    return dtf_variables+make_composite_dtf_variables(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
+
+def make_composite_dtf_variables_4body(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name=""):
+    variables = (
+        FunctorCollection(
+            {
+                "M14": F.SUBCOMB(Functor=F.MASS, Indices=(1, 4)),
+                "M24": F.SUBCOMB(Functor=F.MASS, Indices=(2, 4)),
+                "M34": F.SUBCOMB(Functor=F.MASS, Indices=(3, 4)),
+            }
+        )
+    )
+
+    if(mass_constraint):
+        if(pv_constraint): # MASS + PV
+            dtf_variables_mass_pv = FunctorCollection({
+                        'DTF_PV_M'+ particle_name + '_' + k: DTF(v)
+                        for k, v in variables.get_thor_functors().items()
+                    })
+            return dtf_variables_mass_pv+make_composite_dtf_variables_3body(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
+        else: # MASS
+            dtf_variables_mass = FunctorCollection(
+                {'DTF_M'+ particle_name + '_' + k: DTF(v)
+                 for k, v in variables.get_thor_functors().items()})
+        return dtf_variables_mass+make_composite_dtf_variables_3body(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
+
+    elif(pv_constraint): # PV
+        dtf_variables_pv = FunctorCollection({
+                'DTF_PV_' + k: DTF(v)
+                for k, v in variables.get_thor_functors().items()
+            })
+        return dtf_variables_pv+make_composite_dtf_variables_3body(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
+
+    else: # NO MASS/PV
+        dtf_variables = FunctorCollection(
+            {'DTF_' + k: DTF(v)
+             for k, v in variables.get_thor_functors().items()})
+    
+        return dtf_variables+make_composite_dtf_variables_3body(options,pvs,data,DTF,pv_constraint,mass_constraint, particle_name)
+
+
+def make_MC_basic_variables():
+    MC_MOTHER_ID = lambda gen: F.VALUE_OR(0) @ F.MC_MOTHER(gen, F.PARTICLE_ID)
+    MC_MOTHER_KEY = lambda gen: F.VALUE_OR(-1) @ F.MC_MOTHER(gen, F.OBJECT_KEY)
+
+    variables = (
+        FunctorCollection(
+            {
+                "END_VX": F.END_VX,
+                "END_VY": F.END_VY,
+                "END_VZ": F.END_VZ,
+                "OBJECT_KEY": F.OBJECT_KEY,
+                "ETA": F.ETA,
+                "PHI": F.PHI,
+                "ORIGIN_VX": F.ORIGIN_VX,
+                "ORIGIN_VY": F.ORIGIN_VY,
+                "ORIGIN_VZ": F.ORIGIN_VZ,
+                "FOURMOMENTUM": F.FOURMOMENTUM,
+                "TRUEID": F.PARTICLE_ID,
+                "MC_MOTHER_ID": MC_MOTHER_ID(1),
+                "MC_MOTHER_KEY": MC_MOTHER_KEY(1),
+                "MC_GD_MOTHER_ID": MC_MOTHER_ID(2),
+                "MC_GD_MOTHER_KEY": MC_MOTHER_KEY(2),
+                "MC_GD_GD_MOTHER_ID": MC_MOTHER_ID(3),
+                "MC_GD_GD_MOTHER_KEY": MC_MOTHER_KEY(3),
+            }
+        )
+        + Kinematics()
+    )
+
+
+    from PyConf.reading import get_mc_particles, get_pp2mcp_relations, get_mc_track_info
+    MC_data = get_mc_particles("/Event/HLT2/MC/Particles")
+    relations_charged = get_pp2mcp_relations("/Event/HLT2/Relations/ChargedPP2MCP")
+    relations_neutral = get_pp2mcp_relations("/Event/HLT2/Relations/NeutralPP2MCP")
+    mcreconstructed_all = MCReconstructed(
+        input_mcparticles=MC_data,
+        use_best_mcmatch=True,
+        relations_charged=relations_charged,
+        relations_neutral=relations_neutral,
+    )
+    mcreconstructible_all = MCReconstructible(
+        input_mctrackinfo=get_mc_track_info()
+    )
+    import FunTuple.functorcollections as FC
+    vars_reconstructed = FC.MCReconstructed(mcreconstructed_alg=mcreconstructed_all, extra_info=True)
+    vars_reconstructible = FC.MCReconstructible(mcreconstructible_alg=mcreconstructible_all, extra_info=True)
+
+
+    return variables+vars_reconstructed+vars_reconstructible
+
+def make_MC_composite_variables():
+    MC_MOTHER_ID = lambda gen: F.VALUE_OR(0) @ F.MC_MOTHER(gen, F.PARTICLE_ID)
+    MC_MOTHER_KEY = lambda gen: F.VALUE_OR(-1) @ F.MC_MOTHER(gen, F.OBJECT_KEY)
+
+    variables = (
+        FunctorCollection(
+            {
+                "END_VX": F.END_VX,
+                "END_VY": F.END_VY,
+                "END_VZ": F.END_VZ,
+                "LTIME": F.MC_LIFETIME,
+                "OBJECT_KEY": F.OBJECT_KEY,
+                "ETA": F.ETA,
+                "PHI": F.PHI,
+                "ORIGIN_VX": F.ORIGIN_VX,
+                "ORIGIN_VY": F.ORIGIN_VY,
+                "ORIGIN_VZ": F.ORIGIN_VZ,
+                "FOURMOMENTUM": F.FOURMOMENTUM,
+                "TRUEID": F.PARTICLE_ID,
+                "MC_MOTHER_ID": MC_MOTHER_ID(1),
+                "MC_MOTHER_KEY": MC_MOTHER_KEY(1),
+                "MC_GD_MOTHER_ID": MC_MOTHER_ID(2),
+                "MC_GD_MOTHER_KEY": MC_MOTHER_KEY(2),
+                "MC_GD_GD_MOTHER_ID": MC_MOTHER_ID(3),
+                "MC_GD_GD_MOTHER_KEY": MC_MOTHER_KEY(3),
+            }
+        )
+        + Kinematics()
+        + MCPromptDecay()
+        )
+
+    return variables
+
+def make_MC_event_variables(mc_header):
+    # define event level variables
+    evt_variables = EventInfo()
+    evt_variables += MCPrimaries(mc_header=mc_header)
+
+    return evt_variables
+
+def make_top_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"]):
+    from PyConf.reading import get_particles
+    from IsolationTools import VertexAndConeIsolation
+
+    possible_charm_locations = ["LongTrackIso", "TTrackIso", "DownstreamTrackIso", "UpstreamTrackIso", "NeutralIso", "PizIso"]
+    coneangles = [0.25,0.5,1.,1.5,2.]
+
+    count = 0
+    for location in locations:
+        extra_particles = get_particles(f"/Event/HLT2/{hlt2_line}/{location}/Particles")
+
+        for coneangle in coneangles:
+            top_RTAlg = VertexAndConeIsolation(
+                name=location+"_"+str(coneangle),
+                reference_particles=input_data,
+                related_particles=extra_particles,
+                cut=F.DR2<coneangle)
+
+            if count == 0:
+                top_iso_variables = ParticleIsolation(isolation_alg=top_RTAlg,array_indx_name='indx')
+            else:
+                top_iso_variables += ParticleIsolation(isolation_alg=top_RTAlg,array_indx_name='indx')
+            count += 1
+
+
+    return top_iso_variables
+
+def make_basic_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"]):
+    from PyConf.reading import get_particles
+    from IsolationTools import VertexAndConeIsolation
+    from PyConf.Algorithms import ThOrParticleSelection
+
+    basic_code = (F.FILTER(F.ALL) @ F.GET_ALL_BASICS())
+    basic_particles = ThOrParticleSelection(InputParticles=input_data, Functor=basic_code).OutputSelection
+
+    possible_charm_locations = ["LongTrackIso", "TTrackIso", "DownstreamTrackIso", "UpstreamTrackIso", "NeutralIso", "PizIso"]
+    coneangles = [0.25,0.5,1.,1.5,2.]
+
+    count = 0
+    for location in locations:
+        extra_particles = get_particles(f"/Event/HLT2/{hlt2_line}/{location}/Particles")
+
+        for coneangle in coneangles:
+            basic_RTAlg = VertexAndConeIsolation(
+                name=location+"_"+str(coneangle),
+                reference_particles=basic_particles,
+                related_particles=extra_particles,
+                cut=F.DR2<coneangle)
+
+            if count == 0:
+                basic_iso_variables = ParticleIsolation(isolation_alg=basic_RTAlg,array_indx_name='indx')
+            else:
+                basic_iso_variables += ParticleIsolation(isolation_alg=basic_RTAlg,array_indx_name='indx')
+            count += 1
+
+
+    return basic_iso_variables
+
+
+def make_intermediate_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"], composite_ID = "J/psi(1S)"):
+    from PyConf.reading import get_particles
+    from IsolationTools import VertexAndConeIsolation
+    from PyConf.Algorithms import ThOrParticleSelection
+
+    intermediate_code = F.FILTER(F.IS_ABS_ID(composite_ID)) @ F.GET_ALL_DESCENDANTS()
+    intermediate_particles = ThOrParticleSelection(InputParticles=input_data, Functor=intermediate_code).OutputSelection
+
+    possible_charm_locations = ["LongTrackIso", "TTrackIso", "DownstreamTrackIso", "UpstreamTrackIso", "NeutralIso", "PizIso"]
+    coneangles = [0.25,0.5,1.,1.5,2.]
+
+    count = 0
+    for location in locations:
+        extra_particles = get_particles(f"/Event/HLT2/{hlt2_line}/{location}/Particles")
+
+        for coneangle in coneangles:
+            intermediate_RTAlg = VertexAndConeIsolation(
+                name=location+"_"+str(coneangle),
+                reference_particles=intermediate_particles,
+                related_particles=extra_particles,
+                cut=F.DR2<coneangle)
+
+            if count == 0:
+                intermediate_iso_variables = ParticleIsolation(isolation_alg=intermediate_RTAlg,array_indx_name='indx')
+            else:
+                intermediate_iso_variables += ParticleIsolation(isolation_alg=intermediate_RTAlg,array_indx_name='indx')
+            count += 1
+
+
+    return intermediate_iso_variables
-- 
GitLab


From e2221d8316d36884ad9185cc22164da48103515c Mon Sep 17 00:00:00 2001
From: Serena Maccolini <serena.maccolini@cern.ch>
Date: Mon, 4 Nov 2024 16:58:23 +0100
Subject: [PATCH 32/51] reducing branches and adjust naming

---
 rare_charm/info.yaml            |  24 +-
 rare_charm/main_Lc_to_pll.py    |  15 +-
 rare_charm/options/Lc_to_pll.py |  28 +--
 rare_charm/options/tupling.py   | 395 ++++++--------------------------
 4 files changed, 100 insertions(+), 362 deletions(-)

diff --git a/rare_charm/info.yaml b/rare_charm/info.yaml
index 0e4e9d964b..522ad32f31 100644
--- a/rare_charm/info.yaml
+++ b/rare_charm/info.yaml
@@ -1,8 +1,3 @@
-# copied and adapted from: 
-# file        = AnalysisProductions/Charm_2024validation/info.yaml 
-# commit_hash = fdeac57133d09d7a6b39698dcca54154069928c2
-
-
 defaults:
   inform:
       - donata.osthues@cern.ch
@@ -24,13 +19,23 @@ defaults:
   "Lc_to_pll",
 ]%}
 
+{%- set datasets = [
+    ("-Excl-UT", "24c1"),
+    ("-Excl-UT", "24c2"),
+    ("", "24c2"),
+    ("", "24c3"),
+    ("", "24c4"),
+]%}
+
+
 {% for id in subsamples %}
+{% for ut, sprucing in datasets %}
 {% for polarity in conditions %}
 
-{{id}}_2024_{{ polarity }}:
-  application: "DaVinci/v64r7@x86_64_v2-el9-clang16-opt"
+{{id}}_2024_{{sprucing}}{{ut}}_{{polarity}}:
+  application: "DaVinci/v64r12"
   input:
-    bk_query: "/LHCb/Collision24/Beam6800GeV-VeloClosed-{{polarity}}/Real Data/Sprucing24c2/94000000/CHARM.DST"
+    bk_query: "/LHCb/Collision24/Beam6800GeV-VeloClosed-{{polarity}}{{ut}}/Real Data/Sprucing{{sprucing}}/94000000/CHARM.DST"
 
     dq_flags:
       - UNCHECKED
@@ -38,7 +43,7 @@ defaults:
     keep_running: true
   output: DVTUPLE_{{id}}.ROOT
   options:
-    entrypoint: Charm_2024raredecays.main_{{id}}:main
+    entrypoint: rare_charm.main_{{id}}:main
     extra_options:
       input_raw_format: 0.5
       input_type: ROOT
@@ -58,3 +63,4 @@ defaults:
 
 {%- endfor %}
 {%- endfor %}
+{%- endfor %}
diff --git a/rare_charm/main_Lc_to_pll.py b/rare_charm/main_Lc_to_pll.py
index 3472a739d0..080a22179a 100644
--- a/rare_charm/main_Lc_to_pll.py
+++ b/rare_charm/main_Lc_to_pll.py
@@ -28,13 +28,12 @@ def main(options: Options):
 
     tuples = {
         # baryonic channels
-        "D2pimumu_OS" : maketuple_Lc2pmumu(options, pvs, rec_summary),
-        "D2pimumu_SS" : maketuple_Lc2pmumu_SS(options, pvs, rec_summary),
-        "D2Kmumu_OS"  : maketuple_Lc2pee(options, pvs, rec_summary),
-        "D2Kmumu_SS"  : maketuple_Lc2pee_SS(options, pvs, rec_summary),
-        "Lc2pmue_OSep" : maketuple_Lc2pmue_OS(options, pvs, rec_summary, mupem = False),
-        "Lc2pmue_OSem" : maketuple_Lc2pmue_OS(options, pvs, rec_summary, mupem = True),
-        "D2pimumu_SS" : maketuple_Lc2pmue_SS(options, pvs, rec_summary),
+        "Lc2pmumu_OS" : maketuple_Lc2pmumu(options, pvs, rec_summary),
+        "Lc2pmumu_SS" : maketuple_Lc2pmumu_SS(options, pvs, rec_summary),
+        "Lc2pee_OS"  : maketuple_Lc2pee(options, pvs, rec_summary),
+        "Lc2pee_SS"  : maketuple_Lc2pee_SS(options, pvs, rec_summary),
+        "Lc2pmue_OS" : maketuple_Lc2pmue_OS(options, pvs, rec_summary),
+        "Lc2pmue_SS" : maketuple_Lc2pmue_SS(options, pvs, rec_summary),
         # control channel
         "D2Kmumu_OS"  : maketuple_Lc2pmumu_WS(options, pvs, rec_summary),
         "D2Kmumu_SS"  : maketuple_Lc2pee_WS(options, pvs, rec_summary),
@@ -52,4 +51,4 @@ def main(options: Options):
         
     config = make_config(options, tuples)
 
-    return config
\ No newline at end of file
+    return config
diff --git a/rare_charm/options/Lc_to_pll.py b/rare_charm/options/Lc_to_pll.py
index f93dc3cd67..35e01509d5 100644
--- a/rare_charm/options/Lc_to_pll.py
+++ b/rare_charm/options/Lc_to_pll.py
@@ -147,36 +147,26 @@ def maketuple_Lc2pee_SS(options, pvs, rec_summary):
     return [myfilter, mytuple]
 
 
-def maketuple_Lc2pmue_OS(options, pvs, rec_summary, mupem = False):
-    name = "Lc2pmue_OSep"
+def maketuple_Lc2pmue_OS(options, pvs, rec_summary):
+    name = "Lc2pmue_OS"
     turbo_line = "Hlt2Charm_LcpToPpMumpEpm"
 
     input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
     myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
 
     branches = {
-        "Lc"   : "[Lambda_c+ -> (J/psi(1S) -> mu- e+) p+]CC",
-        "Jpsi" : "[Lambda_c+ -> ^(J/psi(1S) -> mu- e+) p+]CC",
-        "lm"   : "[Lambda_c+ -> (J/psi(1S) -> ^mu- e+) p+]CC",
-        "lp"   : "[Lambda_c+ -> (J/psi(1S) -> mu- ^e+) p+]CC",
-        "pp"   : "[Lambda_c+ -> (J/psi(1S) -> mu- e+) ^p+]CC",
+        "Lc"   : "[Lambda_c+ -> (J/psi(1S) -> [mu-]CC [e+]CC) p+]CC",
+        "Jpsi" : "[Lambda_c+ -> ^(J/psi(1S) -> [mu-]CC [e+]CC) p+]CC",
+        "mu"   : "[Lambda_c+ -> (J/psi(1S) -> ^[mu-]CC [e+]CC) p+]CC",
+        "e"   : "[Lambda_c+ -> (J/psi(1S) -> [mu-]CC ^[e+]CC) p+]CC",
+        "pp"   : "[Lambda_c+ -> (J/psi(1S) -> [mu-]CC [e+]CC) ^p+]CC",
     }
 
-    if mupem == True:
-        name = "Lc2pmue_OSem"
-        branches = {
-            "Lc"   : "[Lambda_c+ -> (J/psi(1S) -> e- mu+) p+]CC",
-            "Jpsi" : "[Lambda_c+ -> ^(J/psi(1S) -> e- mu+) p+]CC",
-            "lm"   : "[Lambda_c+ -> (J/psi(1S) -> ^e- mu+) p+]CC",
-            "lp"   : "[Lambda_c+ -> (J/psi(1S) -> e- ^mu+) p+]CC",
-            "pp"   : "[Lambda_c+ -> (J/psi(1S) -> e- mu+) ^p+]CC",
-        }
-
     variables = {
         "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
         "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lm"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "lp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "mu"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "e"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
         "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
     }
 
diff --git a/rare_charm/options/tupling.py b/rare_charm/options/tupling.py
index 5da60b4e0b..771e1d11b9 100644
--- a/rare_charm/options/tupling.py
+++ b/rare_charm/options/tupling.py
@@ -1,8 +1,3 @@
-# copied from: 
-# file        = AnalysisProductions/Charm_2024validation/d_to_hhh.py 
-# commit_hash = fdeac57133d09d7a6b39698dcca54154069928c2
-
-
 ##############################################################################
 # (c) Copyright 2022 CERN for the benefit of the LHCb Collaboration           #
 #                                                                             #
@@ -44,161 +39,31 @@ from PyConf.Algorithms import ParticleToSubcombinationsAlg
 from DecayTreeFitter import DecayTreeFitter
 
 Hlt1_global_lines = [
-    "Hlt1GECPassthroughDecision",
-    "Hlt1BeamGasDecision",
-    "Hlt1PassthroughDecision",
-    "Hlt1NoBeamDecision",
-    "Hlt1BeamOneDecision",
-    "Hlt1BeamTwoDecision",
-    "Hlt1BothBeamsDecision",
-    "Hlt1ODINLumiDecision",
-    "Hlt1ODINVeloOpenDecision",
-    "Hlt1ODINNoBiasDecision",
-    "Hlt1VeloMicroBiasDecision",
-    "Hlt1RICH1AlignmentDecision",
-    "Hlt1RICH2AlignmentDecision",
-    "Hlt1BeamGasDecision",
-    "Hlt1L02PPiDecision",
-    "Hlt1LowMassNoipDielectron_massSlice1_promptDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice1_promptDecision",
-    "Hlt1LowMassNoipDielectron_massSlice2_promptDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice2_promptDecision",
-    "Hlt1LowMassNoipDielectron_massSlice3_promptDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice3_promptDecision",
-    "Hlt1LowMassNoipDielectron_massSlice4_promptDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice4_promptDecision",
-    "Hlt1LowMassNoipDielectron_massSlice1_displacedDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice1_displacedDecision",
-    "Hlt1LowMassNoipDielectron_massSlice2_displacedDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice2_displacedDecision",
-    "Hlt1LowMassNoipDielectron_massSlice3_displacedDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice3_displacedDecision",
-    "Hlt1LowMassNoipDielectron_massSlice4_displacedDecision",
-    "Hlt1LowMassNoipDielectron_SS_massSlice4_displacedDecision",
+    "Hlt1ODINLumiDecision",  # 33 kHz
 ]
 Hlt1_1track_lines = [
     "Hlt1TrackMVADecision",
-    "Hlt1LowPtMuonDecision",
-    "Hlt1SingleHighPtMuonDecision",
-    "Hlt1SingleHighPtMuonNoMuIDDecision",
-    "Hlt1TrackMuonMVADecision",
-    "Hlt1OneMuonTrackLineDecision",
-    "Hlt1TrackElectronMVADecision",
-    "Hlt1SingleHighPtElectronDecision",
-    "Hlt1SingleHighEtDecision",
+    "Hlt1OneMuonTrackLineDecision",  # 18 kHz
+    "Hlt1TrackElectronMVA",  # 50 kHz
+    "Hlt1TrackMuonMVADecision",  # 37 kHz
+    "Hlt1LowPtMuonDecision", #to test
 ]
 Hlt1_lines = Hlt1_1track_lines+[
-    "Hlt1D2KshhDecision",
-    "Hlt1TwoTrackMVACharmXSecDecision",
+    "Hlt1D2Kshh",  # 24 kHz
+    "Hlt1DiElectronDisplaced",  # 25 kHz
+    "Hlt1DiMuonDisplaced",  # 38 kHz
+    "Hlt1DiMuonHighMass",  # 30 kHz
+    "Hlt1DiPhotonHighMass",  # 77 kHz
+    "Hlt1TwoTrackKs",  # 80 kHz
     "Hlt1TwoTrackMVADecision",
-    "Hlt1TwoTrackKsDecision",
     "Hlt1D2KPiDecision",
     "Hlt1D2KKDecision",
     "Hlt1D2PiPiDecision",
-    "Hlt1KsToPiPiDecision",
-    "Hlt1LowPtDiMuonDecision",#removed
-    "Hlt1DiMuonNoIPDecision",
-    "Hlt1DiMuonNoIP_ssDecision",
-    "Hlt1DiMuonHighMassDecision",
-    "Hlt1DiMuonLowMassDecision",#replaced by Hlt1DiMuonDisplacedDecision
-    "Hlt1DiMuonSoftDecision",
-    "Hlt1DiMuonDisplacedDecision",
-    "Hlt1TwoKsDecision",
-    "Hlt1D2KPiAlignmentDecision",
-    "Hlt1DiMuonHighMassAlignmentDecision",
-    "Hlt1DisplacedDiMuonAlignmentDecision",
-    "Hlt1DisplacedDielectronDecision",
-    "Hlt1DisplacedLeptonsDecision",#removed
 ]
 
 
 Hlt2_lines = [
-    "Hlt2Charm_DstpToD0Pip_D0ToKmPip_XSec",
-    "Hlt2Charm_D0ToKmPip_XSec",
-    "Hlt2Charm_D0ToKmKp",
     "Hlt2Charm_D0ToKmPip",
-    "Hlt2Charm_D0ToPimPip",
-    "Hlt2Charm_DpDspToKsKp_DD",
-    "Hlt2Charm_DpDspToKsKp_LD",
-    "Hlt2Charm_DpDspToKsKp_LL",
-    "Hlt2Charm_DpDspToKsPip_DD",
-    "Hlt2Charm_DpDspToKsPip_LD",
-    "Hlt2Charm_DpDspToKsPip_LL",
-    "Hlt2Charm_DpToKmPipPip",
-    "Hlt2Charm_DspToKmKpPip",
-    "Hlt2Charm_DpToKmPipPip_NoCuts",
-    "Hlt2Charm_DspToKmKpPip_NoCuts",
-    "Hlt2Charm_DpToKmPipPip_XSec",
-    "Hlt2Charm_DspToKmKpPip_XSec",
-    "Hlt2Charm_DstpToD0Pip_D0ToKmKp",
-    "Hlt2Charm_DstpToD0Pip_D0ToKmPip",
-    "Hlt2Charm_DstpToD0Pip_D0ToKpPim",
-    "Hlt2Charm_DstpToD0Pip_D0ToPimPip",
-    "Hlt2Charm_DstpToD0Pip_D0ToKmPip_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKpPim_LowBias",
-    "Hlt2Charm_D0ToKmPip_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKmKp_LowBias",
-    "Hlt2Charm_D0ToKmKp_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToPimPip_LowBias",
-    "Hlt2Charm_D0ToPimPip_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLL",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLL_Tight",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLDD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLDD_Tight",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDDD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDDD_Tight",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULLL",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULLL_Tight",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULDD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULDD_Tight",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLD_Tight",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDLD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDLD_Tight",
-    "Hlt2Charm_D0ToKsPimPip_LL",
-    "Hlt2Charm_D0ToKsPimPip_DD",
-    "Hlt2Charm_D0ToKsPimPip_LL_LowBias",
-    "Hlt2Charm_D0ToKsPimPip_LL_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_LL",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_DD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_LL_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsPimPip_DD_LowBias",
-    "Hlt2Charm_D0ToKsKmPip_LL",
-    "Hlt2Charm_D0ToKsKmPip_DD",
-    "Hlt2Charm_D0ToKsKmPip_LL_LowBias",
-    "Hlt2Charm_D0ToKsKmPip_LL_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_LL",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_DD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_LL_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmPip_DD_LowBias",
-    "Hlt2Charm_D0ToKsKpPim_LL",
-    "Hlt2Charm_D0ToKsKpPim_DD",
-    "Hlt2Charm_D0ToKsKpPim_LL_LowBias",
-    "Hlt2Charm_D0ToKsKpPim_DD_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_LL",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_DD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_LL_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKpPim_DD_LowBias",
-    "Hlt2Charm_D0ToKsKmKp_LL",
-    "Hlt2Charm_D0ToKsKmKp_DD",
-    "Hlt2Charm_D0ToKsKmKp_LL_LowBias",
-    "Hlt2Charm_D0ToKsKmKp_DD_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_LL",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_DD",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_LL_LowBias",
-    "Hlt2Charm_DstpToD0Pip_D0ToKsKmKp_DD_LowBias",
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS',
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS',
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_OS_MVA',
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPip_SS_MVA',
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS',
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS',
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_OS_MVA',
-    'Hlt2Charm_Dst0ToD0EmEp_D0ToKmPimPipPip_SS_MVA',
-    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS',
-    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS',
-    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_OS_MVA',
-    'Hlt2Charm_DstpToDpDspEmEp_DpDspToKmKpPip_SS_MVA',
 ]
 
 def make_composite_variables(options, pvs, data, add_truth=True, add_Hlt1TisTos=True):
@@ -207,51 +72,38 @@ def make_composite_variables(options, pvs, data, add_truth=True, add_Hlt1TisTos=
     variables = (
         FunctorCollection(
             {
-                "MAXPT": F.MAX(F.PT),
-                "MINPT": F.MIN(F.PT),
-                "SUMPT": F.SUM(F.PT),
-                "MAXP": F.MAX(F.P),
-                "MINP": F.MIN(F.P),
-                "BPVDIRA": F.BPVDIRA(pvs),
-                "VCHI2DOF": F.CHI2DOF,
-                #"VNDOF": F.NDOF,
-                "BPVFDCHI2": F.BPVFDCHI2(pvs),
-                "BPVFD": F.BPVFD(pvs),
-                "BPVVDRHO": F.BPVVDRHO(pvs),
-                "BPVVDZ": F.BPVVDZ(pvs),
-                "BPVIPCHI2": F.BPVIPCHI2(pvs),
-                "BPVIP": F.BPVIP(pvs),
-                "LOGBPVIPCHI2": log(F.BPVIPCHI2(pvs)),
-                "BPVLTIME": F.BPVLTIME(pvs),
-                "MAXBPVIPCHI2": F.MAX(F.BPVIPCHI2(pvs)),
-                "MINBPVIPCHI2": F.MIN(F.BPVIPCHI2(pvs)),
-                "MAXBPVIP": F.MAX(F.BPVIP(pvs)),
-                "MINBPVIP": F.MIN(F.BPVIP(pvs)),
-                "MAXDOCACHI2": F.MAXDOCACHI2,
-                "MAXDOCA": F.MAXDOCA,
-                "MAXSDOCACHI2": F.MAXSDOCACHI2,
-                "MAXSDOCA": F.MAXSDOCA,
-                "ETA": F.ETA,
-                "PHI": F.PHI,
-                "END_VX": F.END_VX,
-                "END_VY": F.END_VY,
-                "END_VZ": F.END_VZ,
-                "END_VX_ERR":F.SQRT @ F.CALL(0,0) @ F.POS_COV_MATRIX @ F.ENDVERTEX,
-                "END_VY_ERR":F.SQRT @ F.CALL(1,1) @ F.POS_COV_MATRIX @ F.ENDVERTEX,
-                "END_VZ_ERR":F.SQRT @ F.CALL(2,2) @ F.POS_COV_MATRIX @ F.ENDVERTEX,
-                "BPVX": F.BPVX(pvs),
-                "BPVY": F.BPVY(pvs),
-                "BPVZ": F.BPVZ(pvs),
-                "BPVX_ERR": F.SQRT @ F.CALL(0,0) @ F.POS_COV_MATRIX @ F.BPV(pvs),
-                "BPVY_ERR": F.SQRT @ F.CALL(1,1) @ F.POS_COV_MATRIX @ F.BPV(pvs),
-                "BPVZ_ERR": F.SQRT @ F.CALL(2,2) @ F.POS_COV_MATRIX @ F.BPV(pvs),
-                "ALLPVFD"     : F.ALLPV_FD(pvs),
-                "ALLPVIP"     : F.ALLPV_IP(pvs),
-                "OBJECT_KEY": F.OBJECT_KEY,
+            # Endvertex-related info
+            "VCHI2DOF": F.CHI2DOF,  # Equal to SDOCACHI2 (2-track vertex -> 1 dof)
+            "MAXSDOCA": F.MAXSDOCA(), #MAXSDOCA == SDOCA(1,2)
+            "MAXDOCA": F.MAXDOCA(),
+            "MAXDOCACHI2": F.MAXDOCACHI2(),
+            "END_VX": F.END_VX,
+            "END_VY": F.END_VY,
+            "END_VZ": F.END_VZ,
+            "END_VX_ERR":F.SQRT @ F.CALL(0,0) @ F.POS_COV_MATRIX @ F.ENDVERTEX,
+            "END_VY_ERR":F.SQRT @ F.CALL(1,1) @ F.POS_COV_MATRIX @ F.ENDVERTEX,
+            "END_VZ_ERR":F.SQRT @ F.CALL(2,2) @ F.POS_COV_MATRIX @ F.ENDVERTEX,
+            # PV-related info
+            "OWNPVX": F.OWNPVX,
+            "OWNPVY": F.OWNPVY,
+            "OWNPVZ": F.OWNPVZ,
+            # FD/DIRA
+            "OWNPVDIRA": F.OWNPVDIRA,  # TODO needed for D*?
+            "OWNPVFD": F.OWNPVFD,  # TODO needed for D*? (can even be negative)
+            "OWNPVVDRHO": F.OWNPVVDRHO,  # TODO redundant
+            "OWNPVFDCHI2": F.OWNPVFDCHI2,  # TODO needed for D*?
+            "ALLPV_FD[nPVs]": F.ALLPV_FD(pvs),  # TODO redundant
+            "ALLPV_FDCHI2[nPVs]": F.MAP(F.VALUE_OR(F.NaN) @ F.VTX_FDCHI2).bind(F.TES(pvs), F.FORWARDARGS),
+            # IP/IPCHI2
+            "OWNPVIP": F.OWNPVIP,
+            "OWNPVIPCHI2": F.OWNPVIPCHI2,
+            "ALLPV_IP[nPVs]": F.ALLPV_IP(pvs),
+            "ALLPV_IPCHI2[nPVs]": F.MAP(F.VALUE_OR(F.NaN) @ F.IPCHI2).bind(F.TES(pvs), F.FORWARDARGS),
+            "OWNPVLTIME": F.OWNPVLTIME,
+            "OBJECT_KEY": F.OBJECT_KEY,
             }
         )
         + Kinematics()
-        #+ ParticleID(extra_info=True) #only for daughters
     )
 
     if add_Hlt1TisTos:
@@ -298,12 +150,6 @@ def make_composite_variables_3body(options, pvs, data, add_truth=True):
                 "DOCA12"      : F.DOCA(Child1=1,Child2=2),
                 "DOCACHI212"  : F.DOCACHI2(Child1=1,Child2=2),
                 "COS12": F.ALV(1, 2),
-                #"ETA12": F.SUBCOMB(Functor=F.ETA, Indices=(1, 2)),
-                #"PT12": F.SUBCOMB(Functor=F.PT, Indices=(1, 2)),
-                #"VCHI212": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(1, 2)),
-                #"END_VZ12": F.SUBCOMB(Functor=F.END_VZ, Indices=(1, 2)),
-                #"BPVZ12": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(1, 2)),
-                #"BPVCORRM12": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(1, 2)),
                 #13
                 "M13": F.SUBCOMB(Functor=F.MASS, Indices=(1, 3)),
                 "SDOCA13"     : F.SDOCA(Child1=1,Child2=3),
@@ -311,12 +157,6 @@ def make_composite_variables_3body(options, pvs, data, add_truth=True):
                 "DOCA13"      : F.DOCA(Child1=1,Child2=3),
                 "DOCACHI213"  : F.DOCACHI2(Child1=1,Child2=3),
                 "COS13": F.ALV(1, 3),
-                #"ETA13": F.SUBCOMB(Functor=F.ETA, Indices=(1, 3)),
-                #"PT13": F.SUBCOMB(Functor=F.PT, Indices=(1, 3)),
-                #"VCHI213": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(1, 3)),
-                #"END_VZ13": F.SUBCOMB(Functor=F.END_VZ, Indices=(1, 3)),
-                #"BPVZ13": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(1, 3)),
-                #"BPVCORRM13": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(1, 3)),
                 #23
                 "M23": F.SUBCOMB(Functor=F.MASS, Indices=(2, 3)),
                 "SDOCA23"     : F.SDOCA(Child1=2,Child2=3),
@@ -324,12 +164,6 @@ def make_composite_variables_3body(options, pvs, data, add_truth=True):
                 "DOCA23"      : F.DOCA(Child1=2,Child2=3),
                 "DOCACHI223"  : F.DOCACHI2(Child1=2,Child2=3),
                 "COS23": F.ALV(2, 3),
-                #"ETA23": F.SUBCOMB(Functor=F.ETA, Indices=(2, 3)),
-                #"PT23": F.SUBCOMB(Functor=F.PT, Indices=(2, 3)),
-                #"VCHI223": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(2, 3)),
-                #"END_VZ23": F.SUBCOMB(Functor=F.END_VZ, Indices=(2, 3)),
-                #"BPVZ23": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(2, 3)),
-                #"BPVCORRM23": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(2, 3)),
             }
         )
     )
@@ -347,12 +181,6 @@ def make_composite_variables_4body(options, pvs, data, add_truth=True):
                 "DOCA14"      : F.DOCA(Child1=1,Child2=4),
                 "DOCACHI214"  : F.DOCACHI2(Child1=1,Child2=4),
                 "COS14": F.ALV(1, 4),
-                #"ETA14": F.SUBCOMB(Functor=F.ETA, Indices=(1, 4)),
-                #"PT14": F.SUBCOMB(Functor=F.PT, Indices=(1, 4)),
-                #"VCHI214": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(1, 4)),
-                #"END_VZ14": F.SUBCOMB(Functor=F.END_VZ, Indices=(1, 4)),
-                #"BPVZ14": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(1, 4)),
-                #"BPVCORRM14": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(1, 4)),
                 #24
                 "M24": F.SUBCOMB(Functor=F.MASS, Indices=(2, 4)),
                 "SDOCA24"     : F.SDOCA(Child1=2,Child2=4),
@@ -360,12 +188,6 @@ def make_composite_variables_4body(options, pvs, data, add_truth=True):
                 "DOCA24"      : F.DOCA(Child1=2,Child2=4),
                 "DOCACHI224"  : F.DOCACHI2(Child1=2,Child2=4),
                 "COS24": F.ALV(2, 4),
-                #"ETA24": F.SUBCOMB(Functor=F.ETA, Indices=(2, 4)),
-                #"PT24": F.SUBCOMB(Functor=F.PT, Indices=(2, 4)),
-                #"VCHI224": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(2, 4)),
-                #"END_VZ24": F.SUBCOMB(Functor=F.END_VZ, Indices=(2, 4)),
-                #"BPVZ24": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(2, 4)),
-                #"BPVCORRM24": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(2, 4)),
                 #34
                 "M34": F.SUBCOMB(Functor=F.MASS, Indices=(3, 4)),
                 "SDOCA34"     : F.SDOCA(Child1=3,Child2=4),
@@ -373,12 +195,6 @@ def make_composite_variables_4body(options, pvs, data, add_truth=True):
                 "DOCA34"      : F.DOCA(Child1=3,Child2=4),
                 "DOCACHI234"  : F.DOCACHI2(Child1=3,Child2=4),
                 "COS34": F.ALV(3, 4),
-                #"ETA34": F.SUBCOMB(Functor=F.ETA, Indices=(3, 4)),
-                #"PT34": F.SUBCOMB(Functor=F.PT, Indices=(3, 4)),
-                #"VCHI234": F.SUBCOMB(Functor=F.CHI2DOF, Indices=(3, 4)),
-                #"END_VZ34": F.SUBCOMB(Functor=F.END_VZ, Indices=(3, 4)),
-                #"BPVZ34": F.SUBCOMB(Functor=F.BPVZ(pvs), Indices=(3, 4)),
-                #"BPVCORRM34": F.SUBCOMB(Functor=F.BPVCORRM(pvs), Indices=(3, 4)),
             }
         )
     )
@@ -453,38 +269,27 @@ def make_b_composite_variables(options, pvs, data, add_truth=True):
 def make_DeltaM_variable(options):
     return FunctorCollection({"DM": F.MASS - F.CHILD(1, F.MASS)})
 
-def make_basic_variables(options, pvs, data, add_truth=True, islong=False):
+def make_basic_variables(options, pvs, data, add_truth=True):
     if not options.simulation:
         add_truth = False
     variables = (
         FunctorCollection(
             {
-                "TRCHI2DOF": F.VALUE_OR(-1) @ F.CHI2DOF @ F.TRACK,
-                "ETA": F.ETA,
-                "PHI": F.PHI,
+                # Track fit quality
                 "TRGHOSTPROB": F.GHOSTPROB,
-                "BPVIPCHI2": F.BPVIPCHI2(pvs),
-                "BPVIP": F.BPVIP(pvs),
-                "BPVX": F.BPVX(pvs),
-                "BPVY": F.BPVY(pvs),
-                "BPVZ": F.BPVZ(pvs),
-                "TX"          : F.TX,
-                "TY"          : F.TY,
-                "MINIPCHI2"   : F.MINIPCHI2(pvs),
-                "MINIP"       : F.MINIP(pvs),
-                "KEY"         : F.VALUE_OR(-1) @ F.OBJECT_KEY @ F.TRACK,
-                "ISMUON"      : F.ISMUON,
-                "TRACKPT": F.TRACK_PT,
-                "TRACKHISTORY": F.VALUE_OR(-1) @ F.TRACKHISTORY @ F.TRACK,
-                "QOVERP": F.VALUE_OR(-1) @ F.QOVERP @ F.TRACK,
+                "TRCHI2DOF": F.CHI2DOF @ F.TRACK,
                 "NDOF": F.VALUE_OR(-1) @ F.NDOF @ F.TRACK,
-                "NFTHITS": F.VALUE_OR(-1) @ F.NFTHITS @ F.TRACK,
-                "NHITS": F.VALUE_OR(-1) @ F.NHITS @ F.TRACK,
-                "NUTHITS": F.VALUE_OR(-1) @ F.NUTHITS @ F.TRACK,
                 "NVPHITS": F.VALUE_OR(-1) @ F.NVPHITS @ F.TRACK,
-                #"NMUONHITS": F.VALUE_OR(-1) @ F.NHITSMUONS @ F.TRACK, #https://gitlab.cern.ch/lhcb/Rec/-/merge_requests/3756
-                "TRACKHASVELO": F.VALUE_OR(-1) @ F.TRACKHASVELO @ F.TRACK,
-                "TRACKHASUT": F.VALUE_OR(-1) @ F.TRACKHASUT @ F.TRACK,
+                "NVPHITSA": F.VALUE_OR(-1) @ F.NVPHITSA @ F.TRACK,
+                "NVPHITSC": F.VALUE_OR(-1) @ F.NVPHITSC @ F.TRACK,
+                "NUTHITS": F.VALUE_OR(-1) @ F.NUTHITS @ F.TRACK,
+                "NFTHITS": F.VALUE_OR(-1) @ F.NFTHITS @ F.TRACK,
+                "ISMUON": F.ISMUON,
+                # IP and IPCHI2
+                "OWNPVIP": F.OWNPVIP,
+                "OWNPVIPCHI2": F.OWNPVIPCHI2,
+                "MINIPCHI2": F.MINIPCHI2(pvs),
+                "ISMUON"      : F.ISMUON,
                 "OBJECT_KEY": F.OBJECT_KEY,
                 "HASBREM": F.HASBREM,
                 "BREMENERGY": F.BREMENERGY,
@@ -495,12 +300,6 @@ def make_basic_variables(options, pvs, data, add_truth=True, islong=False):
         + ParticleID(extra_info=True)
     )
 
-    if islong:
-        variables += FunctorCollection({
-            "CTBX": F.VALUE_OR(F.NaN) @ F.X_COORDINATE @ F.POSITION @ F.CLOSESTTOBEAM @ F.TRACK,#X_COORDINATE @ POSITION @ CLOSESTTOBEAM @ TRACK
-            "CTBY": F.VALUE_OR(F.NaN) @ F.Y_COORDINATE @ F.POSITION @ F.CLOSESTTOBEAM @ F.TRACK,
-            "CTBZ": F.VALUE_OR(F.NaN) @ F.Z_COORDINATE @ F.POSITION @ F.CLOSESTTOBEAM @ F.TRACK,
-        })
     
     variables += HltTisTos(
         selection_type="Hlt1", trigger_lines=Hlt1_1track_lines, data=data
@@ -534,6 +333,16 @@ def make_hlt2_event_variables(options, pvs, rec_summary):
             "ALLPVNDOF": F.MAP(F.VALUE_OR(-1) @ F.NDOF) @ F.TES(pvs),
             "ALLPVCHI2": F.MAP(F.VALUE_OR(-1) @ F.CHI2) @ F.TES(pvs),
             "nPVs": F.SIZE(pvs),
+            # No 3D vectors allowed, hence we save the value of each element of the covariance matrix
+            "ALLPV_COV00[nPVs]": F.MAP(F.VALUE_OR(F.NaN) @ F.CALL(0, 0) @ F.POS_COV_MATRIX) @ F.TES(pvs),
+            "ALLPV_COV01[nPVs]": F.MAP(F.VALUE_OR(F.NaN) @ F.CALL(0, 1) @ F.POS_COV_MATRIX) @ F.TES(pvs),
+            "ALLPV_COV02[nPVs]": F.MAP(F.VALUE_OR(F.NaN) @ F.CALL(0, 2) @ F.POS_COV_MATRIX) @ F.TES(pvs),
+            "ALLPV_COV10[nPVs]": F.MAP(F.VALUE_OR(F.NaN) @ F.CALL(1, 0) @ F.POS_COV_MATRIX) @ F.TES(pvs),
+            "ALLPV_COV11[nPVs]": F.MAP(F.VALUE_OR(F.NaN) @ F.CALL(1, 1) @ F.POS_COV_MATRIX) @ F.TES(pvs),
+            "ALLPV_COV12[nPVs]": F.MAP(F.VALUE_OR(F.NaN) @ F.CALL(1, 2) @ F.POS_COV_MATRIX) @ F.TES(pvs),
+            "ALLPV_COV20[nPVs]": F.MAP(F.VALUE_OR(F.NaN) @ F.CALL(2, 0) @ F.POS_COV_MATRIX) @ F.TES(pvs),
+            "ALLPV_COV21[nPVs]": F.MAP(F.VALUE_OR(F.NaN) @ F.CALL(2, 1) @ F.POS_COV_MATRIX) @ F.TES(pvs),
+            "ALLPV_COV22[nPVs]": F.MAP(F.VALUE_OR(F.NaN) @ F.CALL(2, 2) @ F.POS_COV_MATRIX) @ F.TES(pvs),
             "nTracks": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nTracks"),
             "nLongTracks": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nLongTracks"),
             "nMuonTracks": F.VALUE_OR(-1) @ F.RECSUMMARY_INFO(rec_summary, "nMuonTracks"),
@@ -604,40 +413,9 @@ def add_truth_matching_functors(
 
 ### DTF variables ###
 
-def make_basic_dtf_variables(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name="", islong=False):
-    variables = (
-        FunctorCollection(
-            {
-                "TRCHI2DOF": F.VALUE_OR(-1) @ F.CHI2DOF @ F.TRACK,
-                "ETA": F.ETA,
-                "PHI": F.PHI,
-                "TRGHOSTPROB": F.GHOSTPROB,
-                "BPVIPCHI2": F.BPVIPCHI2(pvs),
-                "BPVIP": F.BPVIP(pvs),
-                "BPVX": F.BPVX(pvs),
-                "BPVY": F.BPVY(pvs),
-                "BPVZ": F.BPVZ(pvs),
-                "TX"          : F.TX,
-                "TY"          : F.TY,
-                "MINIPCHI2"   : F.MINIPCHI2(pvs),
-                "MINIP"       : F.MINIP(pvs),
-                "KEY"         : F.VALUE_OR(-1) @ F.OBJECT_KEY @ F.TRACK,
-                "TRACKPT": F.TRACK_PT,
-                "TRACKHISTORY": F.VALUE_OR(-1) @ F.TRACKHISTORY @ F.TRACK,
-                "QOVERP": F.VALUE_OR(-1) @ F.QOVERP @ F.TRACK,
-                "NDOF": F.VALUE_OR(-1) @ F.NDOF @ F.TRACK,
-            }
-        )
-        + Kinematics()
-    )
+def make_basic_dtf_variables(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name=""):
+    variables = Kinematics()
 
-    if islong:
-        variables += FunctorCollection({
-            "CTBX": F.VALUE_OR(F.NaN) @ F.X_COORDINATE @ F.POSITION @ F.CLOSESTTOBEAM @ F.TRACK,#X_COORDINATE @ POSITION @ CLOSESTTOBEAM @ TRACK
-            "CTBY": F.VALUE_OR(F.NaN) @ F.Y_COORDINATE @ F.POSITION @ F.CLOSESTTOBEAM @ F.TRACK,
-            "CTBZ": F.VALUE_OR(F.NaN) @ F.Z_COORDINATE @ F.POSITION @ F.CLOSESTTOBEAM @ F.TRACK,
-        })
-    
     if(mass_constraint):
         if(pv_constraint): # MASS + PV
             dtf_variables_mass_pv = FunctorCollection({
@@ -665,43 +443,7 @@ def make_basic_dtf_variables(options, pvs, data, DTF=None, pv_constraint=False,
         return dtf_variables
 
 def make_composite_dtf_variables(options, pvs, data, DTF=None, pv_constraint=False, mass_constraint=False, particle_name=""):
-    variables = (
-        FunctorCollection(
-            {
-                "MAXPT": F.MAX(F.PT),
-                "MINPT": F.MIN(F.PT),
-                "SUMPT": F.SUM(F.PT),
-                "MAXP": F.MAX(F.P),
-                "MINP": F.MIN(F.P),
-                "BPVDIRA": F.BPVDIRA(pvs),
-                "VCHI2DOF": F.CHI2DOF, #CHI2VXNDOF
-                "BPVFDCHI2": F.BPVFDCHI2(pvs),
-                "BPVFD": F.BPVFD(pvs),
-                "BPVVDRHO": F.BPVVDRHO(pvs),
-                "BPVVDZ": F.BPVVDZ(pvs),
-                "BPVIPCHI2": F.BPVIPCHI2(pvs),
-                "BPVIP": F.BPVIP(pvs),
-                "LOGBPVIPCHI2": log(F.BPVIPCHI2(pvs)),
-                "BPVLTIME": F.BPVLTIME(pvs),
-                "MAXBPVIPCHI2": F.MAX(F.BPVIPCHI2(pvs)), #MAX_
-                "MINBPVIPCHI2": F.MIN(F.BPVIPCHI2(pvs)),
-                "MAXBPVIP": F.MAX(F.BPVIP(pvs)),
-                "MINBPVIP": F.MIN(F.BPVIP(pvs)),
-                "ETA": F.ETA,
-                "PHI": F.PHI,
-                "END_VX": F.END_VX, #END_
-                "END_VY": F.END_VY,
-                "END_VZ": F.END_VZ,
-                "BPVX": F.BPVX(pvs),
-                "BPVY": F.BPVY(pvs),
-                "BPVZ": F.BPVZ(pvs),
-                "ALLPVFD"     : F.ALLPV_FD(pvs),
-                "ALLPVIP"     : F.ALLPV_IP(pvs),
-                
-            }
-        )
-        + Kinematics()
-    )
+    variables = Kinematics()
 
     addstring = "DTF"
     if(pv_constraint):
@@ -712,8 +454,8 @@ def make_composite_dtf_variables(options, pvs, data, DTF=None, pv_constraint=Fal
 
     DTF_chi2ndof = FunctorCollection(
             {
-                addstring+"_DTFCHI2": DTF.CHI2,
-                addstring+"_DTFNDOF": DTF.NDOF,
+                addstring+"_CHI2DOF": DTF.CHI2,
+                addstring+"_NDOF": DTF.NDOF,
                 addstring+"_CTAU": DTF.CTAU,
                 addstring+"_CTAUERR": DTF.CTAUERR,
                 addstring+"_MERR": DTF.MASSERR,
@@ -750,6 +492,7 @@ def make_composite_dtf_variables_3body(options, pvs, data, DTF=None, pv_constrai
     variables = (
         FunctorCollection(
             {
+                "M12": F.SUBCOMB(Functor=F.MASS, Indices=(1, 2)),
                 "M13": F.SUBCOMB(Functor=F.MASS, Indices=(1, 3)),
                 "M23": F.SUBCOMB(Functor=F.MASS, Indices=(2, 3)),
             }
-- 
GitLab


From dbef5a30788b20396b73816c247f6b0b763d26a1 Mon Sep 17 00:00:00 2001
From: Serena Maccolini <serena.maccolini@cern.ch>
Date: Tue, 5 Nov 2024 15:13:20 +0100
Subject: [PATCH 33/51] fix DTF Dsp mass constraint, removing DTF no
 constraints

---
 rare_charm/options/rare_charm.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/rare_charm/options/rare_charm.py b/rare_charm/options/rare_charm.py
index dff2ef39bd..68ebd1bcd9 100644
--- a/rare_charm/options/rare_charm.py
+++ b/rare_charm/options/rare_charm.py
@@ -28,10 +28,12 @@ def make_dtf_variables_hmumu(options, pvs, input_data, ptype):
 
     from DecayTreeFitter import DecayTreeFitter
     
+    '''
     DTF = DecayTreeFitter(
         name=f'DTF_{{hash}}',
         input_particles=input_data)
-
+    '''
+    
     DTFvtx = DecayTreeFitter(
         name=f'DTFvtx_{{hash}}',
         input_particles=input_data,
@@ -51,13 +53,13 @@ def make_dtf_variables_hmumu(options, pvs, input_data, ptype):
     DTFmassDsp = DecayTreeFitter(
         name=f'DTFmassDsp_{{hash}}',
         input_particles=input_data,
-        substitutions = ['D+{{D_s+}}'],
+        substitutions = ['D+{{D_s+}}','D-{{D_s-}}'],
         mass_constraints=["D_s+"])
 
     DTFvtxmassDsp = DecayTreeFitter(
         name=f'DTFvtxmassDsp_{{hash}}',
         input_particles=input_data,
-        substitutions = ['D+{{D_s+}}',"J/psi(1S){{J/psi(1S)}}"],#trick
+        substitutions = ['D+{{D_s+}}','D-{{D_s-}}',"J/psi(1S){{J/psi(1S)}}"],#trick
         mass_constraints=["D_s+"],
         input_pvs=pvs,
     )
-- 
GitLab


From 09ad49bd7a176863f35d89a9972993da492f01d6 Mon Sep 17 00:00:00 2001
From: Donata Osthues <donata.osthues@cern.ch>
Date: Wed, 6 Nov 2024 19:06:54 +0100
Subject: [PATCH 34/51] add D2hee

---
 rare_charm/main_Lc_to_pll.py     |  22 +++---
 rare_charm/main_d0_to_hhll.py    |   4 --
 rare_charm/main_d_to_hhh.py      |   8 ---
 rare_charm/main_d_to_hll.py      |  11 ++-
 rare_charm/options/d0_to_hhhh.py |  20 ------
 rare_charm/options/d_to_hll.py   | 115 ++++++++++++++++++++++++++++++-
 rare_charm/options/rare_charm.py |   2 -
 rare_charm/options/tupling.py    |   6 ++
 8 files changed, 134 insertions(+), 54 deletions(-)

diff --git a/rare_charm/main_Lc_to_pll.py b/rare_charm/main_Lc_to_pll.py
index 080a22179a..2a2ad9af68 100644
--- a/rare_charm/main_Lc_to_pll.py
+++ b/rare_charm/main_Lc_to_pll.py
@@ -30,17 +30,17 @@ def main(options: Options):
         # baryonic channels
         "Lc2pmumu_OS" : maketuple_Lc2pmumu(options, pvs, rec_summary),
         "Lc2pmumu_SS" : maketuple_Lc2pmumu_SS(options, pvs, rec_summary),
-        "Lc2pee_OS"  : maketuple_Lc2pee(options, pvs, rec_summary),
-        "Lc2pee_SS"  : maketuple_Lc2pee_SS(options, pvs, rec_summary),
-        "Lc2pmue_OS" : maketuple_Lc2pmue_OS(options, pvs, rec_summary),
-        "Lc2pmue_SS" : maketuple_Lc2pmue_SS(options, pvs, rec_summary),
-        # control channel
-        "D2Kmumu_OS"  : maketuple_Lc2pmumu_WS(options, pvs, rec_summary),
-        "D2Kmumu_SS"  : maketuple_Lc2pee_WS(options, pvs, rec_summary),
-        "D2Kmumu_OS"  : maketuple_Lc2pmue_WS(options, pvs, rec_summary),
-        "D2Kmumu_SS"  : maketuple_Lc2ppipi(options, pvs, rec_summary),
-        "D2Kmumu_SS"  : maketuple_Lc2KSp_LL(options, pvs, rec_summary),
-        "D2Kmumu_SS"  : maketuple_Lc2KSp_DD(options, pvs, rec_summary),
+        "Lc2pee_OS"   : maketuple_Lc2pee(options, pvs, rec_summary),
+        "Lc2pee_SS"   : maketuple_Lc2pee_SS(options, pvs, rec_summary),
+        "Lc2pmue_OS"  : maketuple_Lc2pmue_OS(options, pvs, rec_summary),
+        "Lc2pmue_SS"  : maketuple_Lc2pmue_SS(options, pvs, rec_summary),
+        # control channels
+        "Lc2pmumu_WS" : maketuple_Lc2pmumu_WS(options, pvs, rec_summary),
+        "Lc2pee_WS"   : maketuple_Lc2pee_WS(options, pvs, rec_summary),
+        "Lc2pmue_WS"  : maketuple_Lc2pmue_WS(options, pvs, rec_summary),
+        "Lc2ppipi"    : maketuple_Lc2ppipi(options, pvs, rec_summary),
+        "Lc2KSp_LL"   : maketuple_Lc2KSp_LL(options, pvs, rec_summary),
+        "Lc2KSp_DD"   : maketuple_Lc2KSp_DD(options, pvs, rec_summary),
     }
 
     #MCtuples = {
diff --git a/rare_charm/main_d0_to_hhll.py b/rare_charm/main_d0_to_hhll.py
index 42f7a98d3d..33909d75a9 100644
--- a/rare_charm/main_d0_to_hhll.py
+++ b/rare_charm/main_d0_to_hhll.py
@@ -32,10 +32,6 @@ def main(options: Options):
         "Dst2D0pi_D02Kpimumu_RS" : maketuple_Dst2D0pi_D02Kpimumu_RS(options, pvs, rec_summary),
         "Dst2D0pi_D02Kpimumu_WS" : maketuple_Dst2D0pi_D02Kpimumu_WS(options, pvs, rec_summary),
         "D02Kpimumu"             : maketuple_D02Kpimumu(options, pvs, rec_summary),
-        #"DstToD0pi_D0ToKKPiPi"   : maketuple_DstToD0pi_D0ToKKPiPi(options, pvs, rec_summary),
-        #"DstToD0pi_D0ToKPiPiPi"  : maketuple_DstToD0pi_D0ToKPiPiPi(options, pvs, rec_summary),
-        #"DstToD0pi_D0ToPiKPiPi"  : maketuple_DstToD0pi_D0ToPiKPiPi(options, pvs, rec_summary),
-        #"DstToD0pi_D0ToPiPiPiPi" : maketuple_DstToD0pi_D0ToPiPiPiPi(options, pvs, rec_summary),
     }
 
     #MCtuples = {
diff --git a/rare_charm/main_d_to_hhh.py b/rare_charm/main_d_to_hhh.py
index e63fd33665..e6193b1203 100644
--- a/rare_charm/main_d_to_hhh.py
+++ b/rare_charm/main_d_to_hhh.py
@@ -27,7 +27,6 @@ def main(options: Options):
     rec_summary = get_rec_summary()
 
     tuples = {
-        # muonic channels
         "D2pimumu_WS" : maketuple_D2pimumu_WS(options, pvs, rec_summary),
         "D2Kmumu_WS"  : maketuple_D2Kmumu_WS(options, pvs, rec_summary),
         "D2Kpipi"     : maketuple_D2Kpipi(options, pvs, rec_summary),
@@ -35,13 +34,6 @@ def main(options: Options):
         "D2KSK_LL"    : maketuple_D2KSK_LL(options, pvs, rec_summary),
         "D2KSpi_LL"   : maketuple_D2KSpi_LL(options, pvs, rec_summary),
 
-        # control channels
-        #"D2Kpipi" : maketuple_D2Kpipi(options, pvs, rec_summary),
-        #"D2pipipi" : maketuple_D2pipipi(options, pvs, rec_summary),
-        #"D2pipiK" : maketuple_D2pipiK(options, pvs, rec_summary),
-        #"D2KKK" : maketuple_D2KKK(options, pvs, rec_summary),
-        #"D2piKK" : maketuple_D2piKK(options, pvs, rec_summary),
-
     }
 
     #MCtuples = {
diff --git a/rare_charm/main_d_to_hll.py b/rare_charm/main_d_to_hll.py
index ddc8525162..06d54d7bc4 100644
--- a/rare_charm/main_d_to_hll.py
+++ b/rare_charm/main_d_to_hll.py
@@ -33,13 +33,10 @@ def main(options: Options):
         "D2Kmumu_OS"  : maketuple_D2Kmumu_OS(options, pvs, rec_summary),
         "D2Kmumu_SS"  : maketuple_D2Kmumu_SS(options, pvs, rec_summary),
 
-        # control channels
-        #"D2Kpipi" : maketuple_D2Kpipi(options, pvs, rec_summary),
-        #"D2pipipi" : maketuple_D2pipipi(options, pvs, rec_summary),
-        #"D2pipiK" : maketuple_D2pipiK(options, pvs, rec_summary),
-        #"D2KKK" : maketuple_D2KKK(options, pvs, rec_summary),
-        #"D2piKK" : maketuple_D2piKK(options, pvs, rec_summary),
-
+        "D2piee_OS"  : maketuple_D2piee_OS(options, pvs, rec_summary),
+        "D2piee_SS"  : maketuple_D2piee_SS(options, pvs, rec_summary),
+        "D2Kee_SS"   : maketuple_D2Kee_OS(options, pvs, rec_summary),
+        "D2Kee_OS"   : maketuple_D2Kee_SS(options, pvs, rec_summary),
     }
 
     #MCtuples = {
diff --git a/rare_charm/options/d0_to_hhhh.py b/rare_charm/options/d0_to_hhhh.py
index 349fbd85b8..199a4bcd4b 100644
--- a/rare_charm/options/d0_to_hhhh.py
+++ b/rare_charm/options/d0_to_hhhh.py
@@ -72,37 +72,17 @@ def maketuple_DstToD0pi_D0ToKKPiPi(options, pvs, rec_summary):
         "spip"  : "[D*(2010)+ -> ([D0]CC -> K- K+ (J/psi(1S) -> pi- pi+)) ^pi+]CC",
     }
 
-
     DTF_PV = DecayTreeFitter(
         name='DTF_D0ToKKPiPi_PV',
         input_particles=input_data,
         input_pvs=pvs)
 
-    #basic_variables = make_basic_variables(options, pvs, input_data) +\
-    #    make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)
-
     composite_dtf_variables = make_composite_dtf_variables(options,
                                                            pvs,
                                                            input_data,
                                                            DTF=DTF_PV,
                                                            pv_constraint=True)
 
-    #composite_variables = make_composite_variables(options, pvs, input_data) + composite_dtf_variables
-        
-
-    #composite_variables_4body = make_composite_variables_3body(options, pvs, input_data) + composite_dtf_variables + variables_4body
-
-    #variables = {
-    #    "Dst"   : composite_variables+make_DeltaM_variable(options),
-    #    "D0"    : composite_variables_4body,
-    #    "h1"    : basic_variables,
-    #    "h2"    : basic_variables,
-    #    "h3"    : basic_variables,
-    #    "h4"    : basic_variables,
-    #    "h5"    : basic_variables,
-    #    "pis"   : basic_variables,
-    #}
-
     variables = {
         "Dst"   : make_composite_variables(options, pvs, input_data)+composite_dtf_variables+make_top_isolation_variables(turbo_line, input_data),
         "D0"    : make_composite_variables_3body(options, pvs, input_data)+composite_dtf_variables+make_intermediate_isolation_variables(turbo_line, input_data),
diff --git a/rare_charm/options/d_to_hll.py b/rare_charm/options/d_to_hll.py
index 6986a85f66..8c64532a10 100644
--- a/rare_charm/options/d_to_hll.py
+++ b/rare_charm/options/d_to_hll.py
@@ -73,7 +73,7 @@ def maketuple_D2pimumu_SS(options, pvs, rec_summary):
 
     branches = {
         "Dp"    : "[D+ -> (J/psi(1S) -> mu+ mu+) pi-]CC",
-        "Jpsi"  : "[D+ -> (J/psi(1S) -> mu+ mu+) pi-]CC",
+        "Jpsi"  : "[D+ -> ^(J/psi(1S) -> mu+ mu+) pi-]CC",
         "lp1"   : "[D+ -> (J/psi(1S) -> ^mu+ mu+) pi-]CC",
         "lp2"   : "[D+ -> (J/psi(1S) -> mu+ ^mu+) pi-]CC",
         "hm"    : "[D+ -> (J/psi(1S) -> mu+ mu+) ^pi-]CC",
@@ -132,7 +132,7 @@ def maketuple_D2Kmumu_SS(options, pvs, rec_summary):
 
     branches = {
         "Dp"    : "[D+ -> (J/psi(1S) -> mu+ mu+) K-]CC",
-        "Jpsi"  : "[D+ -> (J/psi(1S) -> mu+ mu+) K-]CC",
+        "Jpsi"  : "[D+ -> ^(J/psi(1S) -> mu+ mu+) K-]CC",
         "lp1"   : "[D+ -> (J/psi(1S) -> ^mu+ mu+) K-]CC",
         "lp2"   : "[D+ -> (J/psi(1S) -> mu+ ^mu+) K-]CC",
         "hm"    : "[D+ -> (J/psi(1S) -> mu+ mu+) ^K-]CC",
@@ -153,4 +153,115 @@ def maketuple_D2Kmumu_SS(options, pvs, rec_summary):
 
 
 
+def maketuple_D2piee_OS(options, pvs, rec_summary):
+    name = "D2piee_OS"
+    turbo_line = "Hlt2Charm_DpDspToPipEmEp" 
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp"    : "[D+ -> (J/psi(1S) -> e+ e-) pi+]CC",
+        "Jpsi"  : "[D+ -> ^(J/psi(1S) -> e+ e-) pi+]CC",
+        "lp1"   : "[D+ -> (J/psi(1S) -> ^e+ e-) pi+]CC",
+        "lp2"   : "[D+ -> (J/psi(1S) -> e+ ^e-) pi+]CC",
+        "hm"    : "[D+ -> (J/psi(1S) -> e+ e-) ^pi+]CC",
+    }
+
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+        "Jpsi" : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lp1"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp2"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "hm"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_D2piee_SS(options, pvs, rec_summary):
+    name = "D2piee_SS"
+    turbo_line = "Hlt2Charm_DpDspToPimEpEp" 
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp"    : "[D+ -> (J/psi(1S) -> e+ e+) pi-]CC",
+        "Jpsi"  : "[D+ -> ^(J/psi(1S) -> e+ e+) pi-]CC",
+        "lp1"   : "[D+ -> (J/psi(1S) -> ^e+ e+) pi-]CC",
+        "lp2"   : "[D+ -> (J/psi(1S) -> e+ ^e+) pi-]CC",
+        "hm"    : "[D+ -> (J/psi(1S) -> e+ e+) ^pi-]CC",
+    }
+
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+        "Jpsi" : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lp1"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp2"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "hm"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_D2Kee_OS(options, pvs, rec_summary):
+    name = "D2Kee_OS"
+    turbo_line = "Hlt2Charm_DpDspToKpEmEp" 
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp"    : "[D+ -> (J/psi(1S) -> e+ e-) K+]CC",
+        "Jpsi"  : "[D+ -> ^(J/psi(1S) -> e+ e-) K+]CC",
+        "lp1"   : "[D+ -> (J/psi(1S) -> ^e+ e-) K+]CC",
+        "lp2"   : "[D+ -> (J/psi(1S) -> e+ ^e-) K+]CC",
+        "hm"    : "[D+ -> (J/psi(1S) -> e+ e-) ^K+]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+        "Jpsi" : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lp1"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp2"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "hm"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+def maketuple_D2Kee_SS(options, pvs, rec_summary):
+    name = "D2Kee_SS"
+    turbo_line = "Hlt2Charm_DpDspToKmEpEp" 
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp"    : "[D+ -> (J/psi(1S) -> e+ e+) K-]CC",
+        "Jpsi"  : "[D+ -> ^(J/psi(1S) -> e+ e+) K-]CC",
+        "lp1"   : "[D+ -> (J/psi(1S) -> ^e+ e+) K-]CC",
+        "lp2"   : "[D+ -> (J/psi(1S) -> e+ ^e+) K-]CC",
+        "hm"    : "[D+ -> (J/psi(1S) -> e+ e+) ^K-]CC",
+    }
+
+    variables = {
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+        "Jpsi" : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lp1"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp2"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "hm"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
 
diff --git a/rare_charm/options/rare_charm.py b/rare_charm/options/rare_charm.py
index 68ebd1bcd9..567ab2993c 100644
--- a/rare_charm/options/rare_charm.py
+++ b/rare_charm/options/rare_charm.py
@@ -28,11 +28,9 @@ def make_dtf_variables_hmumu(options, pvs, input_data, ptype):
 
     from DecayTreeFitter import DecayTreeFitter
     
-    '''
     DTF = DecayTreeFitter(
         name=f'DTF_{{hash}}',
         input_particles=input_data)
-    '''
     
     DTFvtx = DecayTreeFitter(
         name=f'DTFvtx_{{hash}}',
diff --git a/rare_charm/options/tupling.py b/rare_charm/options/tupling.py
index 771e1d11b9..f67369649d 100644
--- a/rare_charm/options/tupling.py
+++ b/rare_charm/options/tupling.py
@@ -294,6 +294,12 @@ def make_basic_variables(options, pvs, data, add_truth=True):
                 "HASBREM": F.HASBREM,
                 "BREMENERGY": F.BREMENERGY,
                 "BREMBENDCORR": F.BREMBENDCORR,
+                "TRACK_POSVEC_CLOSESTTOBEAM": F.TRACK_POSVEC_CLOSESTTOBEAM,  # To calculate the 2D IP
+                # For measuring the detection asymmetries in the T-stations
+                "X_TStationsBeg": F.POSITION_X @ F.EXTRAPOLATE_TRACK(7_500.) @ F.TRACK,
+                "Y_TStationsBeg": F.POSITION_Y @ F.EXTRAPOLATE_TRACK(7_500.) @ F.TRACK,
+                "X_TStationsEnd": F.POSITION_X @ F.EXTRAPOLATE_TRACK(9_410.) @ F.TRACK,
+                "Y_TStationsEnd": F.POSITION_Y @ F.EXTRAPOLATE_TRACK(9_410.) @ F.TRACK,
             }
         )
         + Kinematics()
-- 
GitLab


From 1be12c3a3b608455c6d8ee25b797a67235d62dbb Mon Sep 17 00:00:00 2001
From: Donata Osthues <donata.osthues@cern.ch>
Date: Wed, 6 Nov 2024 19:16:08 +0100
Subject: [PATCH 35/51] some cleanup and fixes

---
 rare_charm/main_Lb_to_Lcl.py     | 12 ------------
 rare_charm/main_Lc_to_pll.py     | 12 ------------
 rare_charm/main_d0_to_hhhh.py    | 11 -----------
 rare_charm/main_d0_to_hhll.py    | 14 +-------------
 rare_charm/main_d_to_hhh.py      | 12 ------------
 rare_charm/main_d_to_hll.py      | 12 ------------
 rare_charm/options/Lb_to_Lcl.py  | 22 +---------------------
 rare_charm/options/Lc_to_pll.py  | 22 +---------------------
 rare_charm/options/d0_to_hhhh.py |  7 -------
 rare_charm/options/d0_to_hhll.py | 18 +-----------------
 rare_charm/options/d_to_hhh.py   | 11 -----------
 rare_charm/options/d_to_hll.py   | 14 +-------------
 rare_charm/options/rare_charm.py | 11 ++++-------
 13 files changed, 9 insertions(+), 169 deletions(-)

diff --git a/rare_charm/main_Lb_to_Lcl.py b/rare_charm/main_Lb_to_Lcl.py
index cfe2518b8b..b63479a63c 100644
--- a/rare_charm/main_Lb_to_Lcl.py
+++ b/rare_charm/main_Lb_to_Lcl.py
@@ -1,9 +1,3 @@
-# copied and adapted from: 
-# file        = AnalysisProductions/Charm_2024validation/main_rare_charm.py 
-# commit_hash = fdeac57133d09d7a6b39698dcca54154069928c2
-
-
-
 ###############################################################################
 # (c) Copyright 2021-2022 CERN for the benefit of the LHCb Collaboration      #
 #                                                                             #
@@ -33,12 +27,6 @@ def main(options: Options):
         "Lc2KSp_LL"  : maketuple_Lb2Lcmu_Lc2KSp_LL(options, pvs, rec_summary),
         "Lc2KSp_DD"  : maketuple_Lb2Lcmu_Lc2KSp_DD(options, pvs, rec_summary),
     }
-
-    #MCtuples = {
-    #}
-    
-    #if options.simulation:
-    #    tuples = tuples | MCtuples
         
     config = make_config(options, tuples)
 
diff --git a/rare_charm/main_Lc_to_pll.py b/rare_charm/main_Lc_to_pll.py
index 2a2ad9af68..a8dd018d2b 100644
--- a/rare_charm/main_Lc_to_pll.py
+++ b/rare_charm/main_Lc_to_pll.py
@@ -1,9 +1,3 @@
-# copied and adapted from: 
-# file        = AnalysisProductions/Charm_2024validation/main_rare_charm.py 
-# commit_hash = fdeac57133d09d7a6b39698dcca54154069928c2
-
-
-
 ###############################################################################
 # (c) Copyright 2021-2022 CERN for the benefit of the LHCb Collaboration      #
 #                                                                             #
@@ -42,12 +36,6 @@ def main(options: Options):
         "Lc2KSp_LL"   : maketuple_Lc2KSp_LL(options, pvs, rec_summary),
         "Lc2KSp_DD"   : maketuple_Lc2KSp_DD(options, pvs, rec_summary),
     }
-
-    #MCtuples = {
-    #}
-    
-    #if options.simulation:
-    #    tuples = tuples | MCtuples
         
     config = make_config(options, tuples)
 
diff --git a/rare_charm/main_d0_to_hhhh.py b/rare_charm/main_d0_to_hhhh.py
index a903ef6a36..63e08b2e03 100644
--- a/rare_charm/main_d0_to_hhhh.py
+++ b/rare_charm/main_d0_to_hhhh.py
@@ -1,9 +1,3 @@
-# copied and adapted from: 
-# file        = AnalysisProductions/Charm_2024validation/main_rare_charm.py 
-# commit_hash = fdeac57133d09d7a6b39698dcca54154069928c2
-
-
-
 ###############################################################################
 # (c) Copyright 2021-2022 CERN for the benefit of the LHCb Collaboration      #
 #                                                                             #
@@ -39,11 +33,6 @@ def main(options: Options):
         "Dst2D0pi_D02Kpimumu_WSm"   : maketuple_Dst2D0pi_D02Kpimumu_WS(options, pvs, rec_summary, Km = True),
     }
 
-    #MCtuples = {
-    #}
-    
-    #if options.simulation:
-    #    tuples = tuples | MCtuples
         
     config = make_config(options, tuples)
 
diff --git a/rare_charm/main_d0_to_hhll.py b/rare_charm/main_d0_to_hhll.py
index 33909d75a9..0516c20708 100644
--- a/rare_charm/main_d0_to_hhll.py
+++ b/rare_charm/main_d0_to_hhll.py
@@ -1,9 +1,3 @@
-# copied and adapted from: 
-# file        = AnalysisProductions/Charm_2024validation/main_rare_charm.py 
-# commit_hash = fdeac57133d09d7a6b39698dcca54154069928c2
-
-
-
 ###############################################################################
 # (c) Copyright 2021-2022 CERN for the benefit of the LHCb Collaboration      #
 #                                                                             #
@@ -33,13 +27,7 @@ def main(options: Options):
         "Dst2D0pi_D02Kpimumu_WS" : maketuple_Dst2D0pi_D02Kpimumu_WS(options, pvs, rec_summary),
         "D02Kpimumu"             : maketuple_D02Kpimumu(options, pvs, rec_summary),
     }
-
-    #MCtuples = {
-    #}
-    
-    #if options.simulation:
-    #    tuples = tuples | MCtuples
-        
+ 
     config = make_config(options, tuples)
 
     return config
diff --git a/rare_charm/main_d_to_hhh.py b/rare_charm/main_d_to_hhh.py
index e6193b1203..1cd7467a3b 100644
--- a/rare_charm/main_d_to_hhh.py
+++ b/rare_charm/main_d_to_hhh.py
@@ -1,9 +1,3 @@
-# copied and adapted from: 
-# file        = AnalysisProductions/Charm_2024validation/main_rare_charm.py 
-# commit_hash = fdeac57133d09d7a6b39698dcca54154069928c2
-
-
-
 ###############################################################################
 # (c) Copyright 2021-2022 CERN for the benefit of the LHCb Collaboration      #
 #                                                                             #
@@ -35,12 +29,6 @@ def main(options: Options):
         "D2KSpi_LL"   : maketuple_D2KSpi_LL(options, pvs, rec_summary),
 
     }
-
-    #MCtuples = {
-    #}
-    
-    #if options.simulation:
-    #    tuples = tuples | MCtuples
         
     config = make_config(options, tuples)
 
diff --git a/rare_charm/main_d_to_hll.py b/rare_charm/main_d_to_hll.py
index 06d54d7bc4..53d0fb9263 100644
--- a/rare_charm/main_d_to_hll.py
+++ b/rare_charm/main_d_to_hll.py
@@ -1,9 +1,3 @@
-# copied and adapted from: 
-# file        = AnalysisProductions/Charm_2024validation/main_rare_charm.py 
-# commit_hash = fdeac57133d09d7a6b39698dcca54154069928c2
-
-
-
 ###############################################################################
 # (c) Copyright 2021-2022 CERN for the benefit of the LHCb Collaboration      #
 #                                                                             #
@@ -38,12 +32,6 @@ def main(options: Options):
         "D2Kee_SS"   : maketuple_D2Kee_OS(options, pvs, rec_summary),
         "D2Kee_OS"   : maketuple_D2Kee_SS(options, pvs, rec_summary),
     }
-
-    #MCtuples = {
-    #}
-    
-    #if options.simulation:
-    #    tuples = tuples | MCtuples
         
     config = make_config(options, tuples)
 
diff --git a/rare_charm/options/Lb_to_Lcl.py b/rare_charm/options/Lb_to_Lcl.py
index f62e0e60b1..b8ebcf9302 100644
--- a/rare_charm/options/Lb_to_Lcl.py
+++ b/rare_charm/options/Lb_to_Lcl.py
@@ -1,38 +1,18 @@
-# copied and adapted from: 
-# file        = AnalysisProductions/CharmRD/maketuple_D02Kmumu.py 
-# commit_hash = 73c8c844eb343b39ffc6b274fcdf2d196bfd7016
-
-
 from .tupling import (
     make_composite_variables,
-    make_composite_variables_3body,
     make_basic_variables,
     make_hlt2_event_variables,
-    make_basic_dtf_variables,
-    make_composite_dtf_variables,
     make_basic_isolation_variables,
     make_intermediate_isolation_variables,
     make_top_isolation_variables,
 )
 
-from .rare_charm import (
-    make_dtf_variables_hmumu,
-    make_dtf_variables_pmumu,
-    make_dtf_variables_hhmumu,
-)
-
-import Functors as F
-from Functors.math import log
-from DaVinci import Options, make_config
 from DaVinci.algorithms import create_lines_filter
 from PyConf.reading import get_particles
-from FunTuple import FunctorCollection
-from PyConf.reading import get_particles, get_pvs
+from PyConf.reading import get_particles
 import FunTuple.functorcollections as FC
 from FunTuple import FunTuple_Particles as Funtuple
 
-from DecayTreeFitter import DecayTreeFitter
-
 
 def maketuple_Lb2Lcmu_Lc2pmumu(options, pvs, rec_summary):
     name = "Lb2Lcmu_Lc2pmumu"
diff --git a/rare_charm/options/Lc_to_pll.py b/rare_charm/options/Lc_to_pll.py
index 35e01509d5..46f005f436 100644
--- a/rare_charm/options/Lc_to_pll.py
+++ b/rare_charm/options/Lc_to_pll.py
@@ -1,37 +1,17 @@
-# copied and adapted from: 
-# file        = AnalysisProductions/CharmRD/maketuple_D02Kmumu.py 
-# commit_hash = 73c8c844eb343b39ffc6b274fcdf2d196bfd7016
-
-
 from .tupling import (
     make_composite_variables,
-    make_composite_variables_3body,
     make_basic_variables,
     make_hlt2_event_variables,
-    make_basic_dtf_variables,
-    make_composite_dtf_variables,
     make_basic_isolation_variables,
     make_intermediate_isolation_variables,
     make_top_isolation_variables,
 )
 
-from .rare_charm import (
-    make_dtf_variables_hmumu,
-    make_dtf_variables_pmumu,
-    make_dtf_variables_hhmumu,
-)
-
-import Functors as F
-from Functors.math import log
-from DaVinci import Options, make_config
 from DaVinci.algorithms import create_lines_filter
 from PyConf.reading import get_particles
-from FunTuple import FunctorCollection
-from PyConf.reading import get_particles, get_pvs
-import FunTuple.functorcollections as FC
+from PyConf.reading import get_particles
 from FunTuple import FunTuple_Particles as Funtuple
 
-from DecayTreeFitter import DecayTreeFitter
 
 
 
diff --git a/rare_charm/options/d0_to_hhhh.py b/rare_charm/options/d0_to_hhhh.py
index 199a4bcd4b..bce4665c6a 100644
--- a/rare_charm/options/d0_to_hhhh.py
+++ b/rare_charm/options/d0_to_hhhh.py
@@ -1,15 +1,8 @@
-# copied from: 
-# file        = AnalysisProductions/Charm_2024validation/d0_to_hhhh.py 
-# commit_hash = fdeac57133d09d7a6b39698dcca54154069928c2
-
-
 from .tupling import (
     make_composite_variables,
-    make_composite_variables_4body,
     make_composite_variables_3body,
     make_basic_variables,
     make_hlt2_event_variables,
-    make_DeltaM_variable,
     make_basic_dtf_variables,
     make_composite_dtf_variables,
     make_basic_isolation_variables,
diff --git a/rare_charm/options/d0_to_hhll.py b/rare_charm/options/d0_to_hhll.py
index 7685206874..394c1b6c5d 100644
--- a/rare_charm/options/d0_to_hhll.py
+++ b/rare_charm/options/d0_to_hhll.py
@@ -1,37 +1,21 @@
-# copied and adapted from: 
-# file        = AnalysisProductions/CharmRD/maketuple_D02Kpimumu.py 
-# commit_hash = 73c8c844eb343b39ffc6b274fcdf2d196bfd7016
-
-
 from .tupling import (
     make_composite_variables,
-    make_composite_variables_4body,
     make_composite_variables_3body,
     make_basic_variables,
     make_hlt2_event_variables,
     make_DeltaM_variable,
-    make_basic_dtf_variables,
-    make_composite_dtf_variables,
     make_basic_isolation_variables,
     make_intermediate_isolation_variables,
     make_top_isolation_variables,
 )
 
 from .rare_charm import (
-    make_dtf_variables_hmumu,
-    make_dtf_variables_pmumu,
     make_dtf_variables_hhmumu,
 )
 
-from DaVinci import Options, make_config
 from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles, get_pvs
+from PyConf.reading import get_particles
 from FunTuple import FunTuple_Particles as Funtuple
-from FunTuple import FunctorCollection
-import FunTuple.functorcollections as FC
-from DecayTreeFitter import DecayTreeFitter
-import Functors as F
-from Functors.math import log
 
 
 
diff --git a/rare_charm/options/d_to_hhh.py b/rare_charm/options/d_to_hhh.py
index d62674f963..26e9fb0109 100644
--- a/rare_charm/options/d_to_hhh.py
+++ b/rare_charm/options/d_to_hhh.py
@@ -1,16 +1,7 @@
-# copied from: 
-# file        = AnalysisProductions/Charm_2024validation/d_to_hhh.py 
-# commit_hash = fdeac57133d09d7a6b39698dcca54154069928c2
-
-
 from .tupling import (
-    make_composite_variables_3body,
-    make_b_composite_variables,
     make_composite_variables,
     make_basic_variables,
     make_hlt2_event_variables,
-    make_composite_dtf_variables_3body,
-    make_basic_dtf_variables,
     make_basic_isolation_variables,
     make_intermediate_isolation_variables,
     make_top_isolation_variables,
@@ -18,8 +9,6 @@ from .tupling import (
 
 from .rare_charm import (
     make_dtf_variables_hmumu,
-    make_dtf_variables_pmumu,
-    make_dtf_variables_hhmumu,
 )
 
 from DaVinci.algorithms import create_lines_filter
diff --git a/rare_charm/options/d_to_hll.py b/rare_charm/options/d_to_hll.py
index 8c64532a10..a919600133 100644
--- a/rare_charm/options/d_to_hll.py
+++ b/rare_charm/options/d_to_hll.py
@@ -5,11 +5,8 @@
 
 from .tupling import (
     make_composite_variables,
-    make_composite_variables_3body,
     make_basic_variables,
     make_hlt2_event_variables,
-    make_basic_dtf_variables,
-    make_composite_dtf_variables,
     make_basic_isolation_variables,
     make_intermediate_isolation_variables,
     make_top_isolation_variables,
@@ -17,22 +14,13 @@ from .tupling import (
 
 from .rare_charm import (
     make_dtf_variables_hmumu,
-    make_dtf_variables_pmumu,
-    make_dtf_variables_hhmumu,
 )
 
-import Functors as F
-from Functors.math import log
-from DaVinci import Options, make_config
 from DaVinci.algorithms import create_lines_filter
 from PyConf.reading import get_particles
-from FunTuple import FunctorCollection
-from PyConf.reading import get_particles, get_pvs
-import FunTuple.functorcollections as FC
+from PyConf.reading import get_particles
 from FunTuple import FunTuple_Particles as Funtuple
 
-from DecayTreeFitter import DecayTreeFitter
-
 
 
 def maketuple_D2pimumu_OS(options, pvs, rec_summary): 
diff --git a/rare_charm/options/rare_charm.py b/rare_charm/options/rare_charm.py
index 567ab2993c..fdf589df6c 100644
--- a/rare_charm/options/rare_charm.py
+++ b/rare_charm/options/rare_charm.py
@@ -1,8 +1,3 @@
-# copied from: 
-# file        = AnalysisProductions/Charm_2024validation/d_to_hhh.py 
-# commit_hash = fdeac57133d09d7a6b39698dcca54154069928c2
-
-
 from .tupling import (
     make_composite_variables,
     make_composite_variables_3body,
@@ -27,11 +22,11 @@ def make_dtf_variables_hmumu(options, pvs, input_data, ptype):
         Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
 
     from DecayTreeFitter import DecayTreeFitter
-    
+    '''
     DTF = DecayTreeFitter(
         name=f'DTF_{{hash}}',
         input_particles=input_data)
-    
+    '''
     DTFvtx = DecayTreeFitter(
         name=f'DTFvtx_{{hash}}',
         input_particles=input_data,
@@ -63,10 +58,12 @@ def make_dtf_variables_hmumu(options, pvs, input_data, ptype):
     )
 
     if ptype == "basic":
+        '''
         dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
                                             DTF=DTF,
                                             pv_constraint=False,
                                             mass_constraint=False)
+        '''
         dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
                                             DTF=DTFvtx,
                                             pv_constraint=True,
-- 
GitLab


From e1004d1373105b83d8335056a2006caf6318f9a9 Mon Sep 17 00:00:00 2001
From: Donata Osthues <donata.osthues@cern.ch>
Date: Thu, 7 Nov 2024 14:06:07 +0100
Subject: [PATCH 36/51] add Lc DTF variables and fixes

---
 rare_charm/options/Lc_to_pll.py  | 125 ++++++------
 rare_charm/options/rare_charm.py | 335 ++++++++-----------------------
 rare_charm/options/tupling.py    |   2 +-
 3 files changed, 153 insertions(+), 309 deletions(-)

diff --git a/rare_charm/options/Lc_to_pll.py b/rare_charm/options/Lc_to_pll.py
index 46f005f436..ccc28afb1e 100644
--- a/rare_charm/options/Lc_to_pll.py
+++ b/rare_charm/options/Lc_to_pll.py
@@ -7,6 +7,11 @@ from .tupling import (
     make_top_isolation_variables,
 )
 
+from .rare_charm import (
+    make_dtf_variables_pmumu,
+    make_dtf_variables_KSh,
+)
+
 from DaVinci.algorithms import create_lines_filter
 from PyConf.reading import get_particles
 from PyConf.reading import get_particles
@@ -31,11 +36,11 @@ def maketuple_Lc2pmumu(options, pvs, rec_summary):
     }
 
     variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lm"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "lp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "lm"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "lp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
@@ -59,11 +64,11 @@ def maketuple_Lc2pmumu_SS(options, pvs, rec_summary):
     }
 
     variables = {
-        "Lc"    : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lp1"   : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "lp2"   : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "pm"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "Lc"    : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "lp1"   : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "lp2"   : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "pm"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
@@ -87,11 +92,11 @@ def maketuple_Lc2pee(options, pvs, rec_summary):
     }
 
     variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lm"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "lp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "lm"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "lp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
@@ -115,11 +120,11 @@ def maketuple_Lc2pee_SS(options, pvs, rec_summary):
     }
 
     variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lp1"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "lp2"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "pm"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "lp1"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "lp2"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "pm"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
@@ -143,11 +148,11 @@ def maketuple_Lc2pmue_OS(options, pvs, rec_summary):
     }
 
     variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
-        "mu"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "e"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "mu"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "e"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
     }
 
 
@@ -172,11 +177,11 @@ def maketuple_Lc2pmue_SS(options, pvs, rec_summary):
     }
 
     variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
-        "l1"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "l2"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "l1"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "l2"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
     }
 
         
@@ -203,11 +208,11 @@ def maketuple_Lc2pmumu_WS(options, pvs, rec_summary):
     }
 
     variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lp1"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "lp2"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "lp1"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "lp2"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
@@ -231,11 +236,11 @@ def maketuple_Lc2pee_WS(options, pvs, rec_summary):
     }
 
     variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lp1"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "lp2"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "lp1"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "lp2"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
@@ -259,11 +264,11 @@ def maketuple_Lc2pmue_WS(options, pvs, rec_summary):
     }
 
     variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lp1"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "lp2"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "lp1"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "lp2"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
@@ -287,11 +292,11 @@ def maketuple_Lc2ppipi(options, pvs, rec_summary):
     }
 
     variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lm"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "lp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "lm"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "lp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
@@ -315,11 +320,11 @@ def maketuple_Lc2KSp_LL(options, pvs, rec_summary):
     }
 
     variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
-        "KS0"    : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
-        "pim"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "composite"),
+        "KS0"    : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "KS0")+make_dtf_variables_KSh(options, pvs, input_data, "composite"),
+        "pim"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
@@ -343,11 +348,11 @@ def maketuple_Lc2KSp_DD(options, pvs, rec_summary):
     }
 
     variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
-        "KS0"    : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
-        "pim"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "composite"),
+        "KS0"    : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "KS0")+make_dtf_variables_KSh(options, pvs, input_data, "composite"),
+        "pim"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
diff --git a/rare_charm/options/rare_charm.py b/rare_charm/options/rare_charm.py
index fdf589df6c..4cc248241e 100644
--- a/rare_charm/options/rare_charm.py
+++ b/rare_charm/options/rare_charm.py
@@ -1,21 +1,9 @@
 from .tupling import (
-    make_composite_variables,
-    make_composite_variables_3body,
-    make_DeltaM_variable,
-    make_basic_variables,
-    make_hlt2_event_variables,
-    make_top_isolation_variables,
-    make_basic_isolation_variables,
-    make_intermediate_isolation_variables,
     make_composite_dtf_variables,
     make_composite_dtf_variables_3body,
     make_basic_dtf_variables,
 )
 
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunTuple_Particles as Funtuple
-
 def make_dtf_variables_hmumu(options, pvs, input_data, ptype):
 
     if ptype not in ["basic", "composite"]:
@@ -87,10 +75,12 @@ def make_dtf_variables_hmumu(options, pvs, input_data, ptype):
         return dtf_vars
 
     if ptype == "composite":
+        '''
         dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
                                             DTF=DTF,
                                             pv_constraint=False,
                                             mass_constraint=False)
+        '''
         dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
                                             DTF=DTFvtx,
                                             pv_constraint=True,
@@ -112,6 +102,7 @@ def make_dtf_variables_hmumu(options, pvs, input_data, ptype):
                                              pv_constraint=True,
                                              mass_constraint=True, particle_name="Dsp")
         return dtf_vars
+        
 
 
 def make_dtf_variables_pmumu(options, pvs, input_data, ptype):
@@ -120,11 +111,11 @@ def make_dtf_variables_pmumu(options, pvs, input_data, ptype):
         Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
 
     from DecayTreeFitter import DecayTreeFitter
-    
+    '''
     DTF = DecayTreeFitter(
         name=f'DTF_{{hash}}',
         input_particles=input_data)
-
+    '''
     DTFvtx = DecayTreeFitter(
         name=f'DTFvtx_{{hash}}',
         input_particles=input_data,
@@ -142,10 +133,12 @@ def make_dtf_variables_pmumu(options, pvs, input_data, ptype):
         mass_constraints=["Lambda_c+"])
 
     if ptype == "basic":
+        '''
         dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
                                             DTF=DTF,
                                             pv_constraint=False,
                                             mass_constraint=False)
+        '''
         dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
                                             DTF=DTFvtx,
                                             pv_constraint=True,
@@ -161,10 +154,12 @@ def make_dtf_variables_pmumu(options, pvs, input_data, ptype):
         return dtf_vars
 
     if ptype == "composite":
+        '''
         dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
                                             DTF=DTF,
                                             pv_constraint=False,
                                             mass_constraint=False)
+        '''
         dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
                                             DTF=DTFvtx,
                                             pv_constraint=True,
@@ -172,11 +167,11 @@ def make_dtf_variables_pmumu(options, pvs, input_data, ptype):
         dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
                                              DTF=DTFmass,
                                              pv_constraint=False,
-                                             mass_constraint=True, particle_name="D0")
+                                             mass_constraint=True, particle_name="Lc")
         dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
                                              DTF=DTFvtxmass,
                                              pv_constraint=True,
-                                             mass_constraint=True, particle_name="D0")
+                                             mass_constraint=True, particle_name="Lc")
         return dtf_vars
 
 def make_dtf_variables_hhmumu(options, pvs, input_data, ptype):
@@ -185,11 +180,11 @@ def make_dtf_variables_hhmumu(options, pvs, input_data, ptype):
         Exception(f"I want \'basic\' or \'composite\' or \'composite3b\. Got {ptype}")
 
     from DecayTreeFitter import DecayTreeFitter
-    
+    '''
     DTF = DecayTreeFitter(
         name=f'DTF_{{hash}}',
         input_particles=input_data)
-
+    '''
     DTFvtx = DecayTreeFitter(
         name=f'DTFvtx_{{hash}}',
         input_particles=input_data,
@@ -207,10 +202,12 @@ def make_dtf_variables_hhmumu(options, pvs, input_data, ptype):
         mass_constraints=["D0"])
 
     if ptype == "basic":
+        '''
         dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
                                             DTF=DTF,
                                             pv_constraint=False,
                                             mass_constraint=False)
+        '''
         dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
                                             DTF=DTFvtx,
                                             pv_constraint=True,
@@ -226,10 +223,12 @@ def make_dtf_variables_hhmumu(options, pvs, input_data, ptype):
         return dtf_vars
 
     if ptype == "composite3b":
+        '''
         dtf_vars = make_composite_dtf_variables_3body(options, pvs, input_data,
                                             DTF=DTF,
                                             pv_constraint=False,
                                             mass_constraint=False)
+        '''
         dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
                                             DTF=DTFvtx,
                                             pv_constraint=True,
@@ -246,10 +245,12 @@ def make_dtf_variables_hhmumu(options, pvs, input_data, ptype):
         return dtf_vars
         
     if ptype == "composite":
+        '''
         dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
                                             DTF=DTF,
                                             pv_constraint=False,
                                             mass_constraint=False)
+        '''
         dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
                                             DTF=DTFvtx,
                                             pv_constraint=True,
@@ -265,234 +266,72 @@ def make_dtf_variables_hhmumu(options, pvs, input_data, ptype):
         return dtf_vars
 
 
-def maketuple_D2pimumu(options, pvs, rec_summary):
-    name = "D2pimumu"
-    turbo_line = "Hlt2Charm_DpDspToPipMumMup"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (J/psi(1S) -> mu- mu+) pi+]CC",
-        "Jpsi" : "[D+ -> ^(J/psi(1S) -> mu- mu+) pi+]CC",
-        "lm"   : "[D+ -> (J/psi(1S) -> ^mu- mu+) pi+]CC",
-        "lp"   : "[D+ -> (J/psi(1S) -> mu- ^mu+) pi+]CC",
-        "hp" : "[D+ -> (J/psi(1S) -> mu- mu+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
-        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation: 
-
-        variables = {
-            "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-            "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2pimumu_WS(options, pvs, rec_summary):
-    name = "D2pimumu_WS"
-    turbo_line = "Hlt2Charm_DpDspToPipMupMup_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (J/psi(1S) -> mu+ mu+) pi+]CC",
-        "Jpsi" : "[D+ -> (J/psi(1S) -> mu+ mu+) pi+]CC",
-        "lp1"   : "[D+ -> (J/psi(1S) -> ^mu+ mu+) pi+]CC",
-        "lp2"   : "[D+ -> (J/psi(1S) -> mu+ ^mu+) pi+]CC",
-        "hp" : "[D+ -> (J/psi(1S) -> mu+ mu+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
-        "lp1"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-        "lp2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation: 
-
-        variables = {
-            "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-            "lp1"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "lp2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2pipipi(options, pvs, rec_summary):
-    name = "CharmRD_D2pipipi"
-    turbo_line = "Hlt2Charm_DpDspToPipPimPip_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (J/psi(1S) -> pi- pi+) pi+]CC",
-        "Jpsi" : "[D+ -> (J/psi(1S) -> pi- pi+) pi+]CC",
-        "lm"   : "[D+ -> (J/psi(1S) -> ^pi- pi+) pi+]CC",
-        "lp"   : "[D+ -> (J/psi(1S) -> pi- ^pi+) pi+]CC",
-        "hp" : "[D+ -> (J/psi(1S) -> pi- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
-        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation: 
-
-        variables = {
-            "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-            "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_D2piee(options, pvs, rec_summary):
-    name = "D2piee"
-    turbo_line = "Hlt2Charm_DpDspToPipEmEp"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp" : "[D+ -> (J/psi(1S) -> e- e+) pi+]CC",
-        "Jpsi" : "[D+ -> ^(J/psi(1S) -> e- e+) pi+]CC",
-        "lm"   : "[D+ -> (J/psi(1S) -> ^e- e+) pi+]CC",
-        "lp"   : "[D+ -> (J/psi(1S) -> e- ^e+) pi+]CC",
-        "hp" : "[D+ -> (J/psi(1S) -> e- e+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite"),
-        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation: 
-
-        variables = {
-            "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-            "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Lc2pmumu(options, pvs, rec_summary):
-    name = "Lc2pmumu"
-    turbo_line = "Hlt2Charm_LcpToPpMumMup"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Lc" : "[Lambda_c+ -> (J/psi(1S) -> mu- mu+) p+]CC",
-        "Jpsi" : "[Lambda_c+ -> ^(J/psi(1S) -> mu- mu+) p+]CC",
-        "lm"   : "[Lambda_c+ -> (J/psi(1S) -> ^mu- mu+) p+]CC",
-        "lp"  : "[Lambda_c+ -> (J/psi(1S) -> mu- ^mu+) p+]CC",
-        "pp" : "[Lambda_c+ -> (J/psi(1S) -> mu- mu+) ^p+]CC",
-    }
-
-    variables = {
-        "Lc"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "pp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation: 
-
-        variables = {
-            "Lc"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-            "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "pp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-def maketuple_Dst2D0pi_D02Kpimumu_RS(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02Kpimumu_RS"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPipMumMup"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst" : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
-        "D0"  : "[D*(2010)+ -> ^(D0 -> K- pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
-        "Km"   : "[D*(2010)+ -> (D0 -> ^K- pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
-        "pip"  : "[D*(2010)+ -> (D0 -> K- ^pi+ (J/psi(1S) -> mu- mu+)) pi+]CC",
-        "Jpsi"  : "[D*(2010)+ -> (D0 -> K- pi+ ^(J/psi(1S) -> mu- mu+)) pi+]CC",
-        "lm"  : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> ^mu- mu+)) pi+]CC",
-        "lp"  : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> mu- ^mu+)) pi+]CC",
-        "spip" : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> mu- mu+)) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options),
-        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b"),
-        "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite"),
-        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
-        "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic"),
-    }
-
-    if options.data_type == "Upgrade" or options.simulation: 
-
-        variables = {
-            "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
-            "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
-            "Km"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-            "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-            "spip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
+def make_dtf_variables_KSh(options, pvs, input_data, ptype):
+
+    if ptype not in ["basic", "composite"]:
+        Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
+
+    from DecayTreeFitter import DecayTreeFitter
+    '''
+    DTF = DecayTreeFitter(
+        name=f'DTF_{{hash}}',
+        input_particles=input_data)
+    '''
+    DTFvtx = DecayTreeFitter(
+        name=f'DTFvtx_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs)
+
+    DTFmassKS0 = DecayTreeFitter(
+        name=f'DTFmassKS0_{{hash}}',
+        input_particles=input_data,
+        mass_constraints=["KS0"])
+
+    DTFvtxmassKS0 = DecayTreeFitter(
+        name=f'DTFvtxmassKS0_{{hash}}',
+        input_particles=input_data,
+        input_pvs=pvs,
+        mass_constraints=["KS0"])
+
+    if ptype == "basic":
+        '''
+        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        '''
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassKS0,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="KS0")
+        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassKS0,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="KS0")
+        return dtf_vars
 
+    if ptype == "composite":
+        '''
+        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTF,
+                                            pv_constraint=False,
+                                            mass_constraint=False)
+        '''
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                            DTF=DTFvtx,
+                                            pv_constraint=True,
+                                            mass_constraint=False)
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFmassKS0,
+                                             pv_constraint=False,
+                                             mass_constraint=True, particle_name="KS0")
+        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+                                             DTF=DTFvtxmassKS0,
+                                             pv_constraint=True,
+                                             mass_constraint=True, particle_name="KS0")
+        return dtf_vars
+        
\ No newline at end of file
diff --git a/rare_charm/options/tupling.py b/rare_charm/options/tupling.py
index f67369649d..308c440ef6 100644
--- a/rare_charm/options/tupling.py
+++ b/rare_charm/options/tupling.py
@@ -294,7 +294,7 @@ def make_basic_variables(options, pvs, data, add_truth=True):
                 "HASBREM": F.HASBREM,
                 "BREMENERGY": F.BREMENERGY,
                 "BREMBENDCORR": F.BREMBENDCORR,
-                "TRACK_POSVEC_CLOSESTTOBEAM": F.TRACK_POSVEC_CLOSESTTOBEAM,  # To calculate the 2D IP
+                # "TRACK_POSVEC_CLOSESTTOBEAM": F.TRACK_POSVEC_CLOSESTTOBEAM,  # To calculate the 2D IP
                 # For measuring the detection asymmetries in the T-stations
                 "X_TStationsBeg": F.POSITION_X @ F.EXTRAPOLATE_TRACK(7_500.) @ F.TRACK,
                 "Y_TStationsBeg": F.POSITION_Y @ F.EXTRAPOLATE_TRACK(7_500.) @ F.TRACK,
-- 
GitLab


From 68a8c52958cecb686512f0c53940373dfb848ec9 Mon Sep 17 00:00:00 2001
From: Donata Osthues <donata.osthues@cern.ch>
Date: Thu, 7 Nov 2024 14:56:56 +0100
Subject: [PATCH 37/51] reorder control channels, fixes

---
 rare_charm/info.yaml                          |   4 +-
 ..._to_hhhh.py => main_d0_to_hhll_control.py} |  19 +-
 ...n_d_to_hhh.py => main_d_to_hll_control.py} |   2 +-
 rare_charm/options/._Lc_to_pll.py             | Bin 4096 -> 0 bytes
 rare_charm/options/Lb_to_Lcl.py               |  61 +--
 rare_charm/options/d0_to_hhhh.py              | 423 ------------------
 rare_charm/options/d0_to_hhll.py              |   4 +-
 rare_charm/options/d0_to_hhll_control.py      | 267 +++++++++++
 rare_charm/options/d_to_hll.py                |  24 +-
 .../{d_to_hhh.py => d_to_hll_control.py}      |  21 +-
 rare_charm/options/rare_charm.py              |  18 +-
 11 files changed, 345 insertions(+), 498 deletions(-)
 rename rare_charm/{main_d0_to_hhhh.py => main_d0_to_hhll_control.py} (50%)
 rename rare_charm/{main_d_to_hhh.py => main_d_to_hll_control.py} (97%)
 delete mode 100644 rare_charm/options/._Lc_to_pll.py
 delete mode 100644 rare_charm/options/d0_to_hhhh.py
 create mode 100644 rare_charm/options/d0_to_hhll_control.py
 rename rare_charm/options/{d_to_hhh.py => d_to_hll_control.py} (88%)

diff --git a/rare_charm/info.yaml b/rare_charm/info.yaml
index 522ad32f31..49d756ba6b 100644
--- a/rare_charm/info.yaml
+++ b/rare_charm/info.yaml
@@ -13,8 +13,8 @@ defaults:
 {%- set subsamples = [
   "d0_to_hhll",
   "d_to_hll",
-  "d0_to_hhhh",
-  "d_to_hhh",
+  "d0_to_hhll_control",
+  "d_to_hll_control",
   "Lb_to_Lcl",
   "Lc_to_pll",
 ]%}
diff --git a/rare_charm/main_d0_to_hhhh.py b/rare_charm/main_d0_to_hhll_control.py
similarity index 50%
rename from rare_charm/main_d0_to_hhhh.py
rename to rare_charm/main_d0_to_hhll_control.py
index 63e08b2e03..f4f64b3ed9 100644
--- a/rare_charm/main_d0_to_hhhh.py
+++ b/rare_charm/main_d0_to_hhll_control.py
@@ -9,7 +9,7 @@
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
 
-from .options.d0_to_hhhh import *
+from .options.d0_to_hhll_control import *
 
 from DaVinci import Options, make_config
 from PyConf.reading import get_pvs, get_rec_summary
@@ -21,16 +21,13 @@ def main(options: Options):
     rec_summary = get_rec_summary()
 
     tuples = {
-        "DstToD0pi_D0ToKKPiPi"      : maketuple_DstToD0pi_D0ToKKPiPi(options, pvs, rec_summary),
-        "DstToD0pi_D0ToKPiPiPi_RS"  : maketuple_DstToD0pi_D0ToKPiPiPi_RS(options, pvs, rec_summary),
-        "DstToD0pi_D0ToKPiPiPi_WS"  : maketuple_DstToD0pi_D0ToKPiPiPi_WS(options, pvs, rec_summary),
-        "DstToD0pi_D0ToPiPiPiPi"    : maketuple_DstToD0pi_D0ToPiPiPiPi(options, pvs, rec_summary),
-        "Dst2D0pi_D02pipimumu_WSp"  : maketuple_Dst2D0pi_D02pipimumu_WS(options, pvs, rec_summary, pim = False),
-        "Dst2D0pi_D02pipimumu_WSm"  : maketuple_Dst2D0pi_D02pipimumu_WS(options, pvs, rec_summary, pim = True),
-        "Dst2D0pi_D02KKmumu_WSp"    : maketuple_Dst2D0pi_D02KKmumu_WS(options, pvs, rec_summary, Km = False),
-        "Dst2D0pi_D02KKmumu_WSm"    : maketuple_Dst2D0pi_D02KKmumu_WS(options, pvs, rec_summary, Km = True),
-        "Dst2D0pi_D02Kpimumu_WSp"   : maketuple_Dst2D0pi_D02Kpimumu_WS(options, pvs, rec_summary, Km = False),
-        "Dst2D0pi_D02Kpimumu_WSm"   : maketuple_Dst2D0pi_D02Kpimumu_WS(options, pvs, rec_summary, Km = True),
+        "DstToD0pi_D0ToKKPiPi"     : maketuple_DstToD0pi_D0ToKKPiPi(options, pvs, rec_summary),
+        "DstToD0pi_D0ToKPiPiPi_RS" : maketuple_DstToD0pi_D0ToKPiPiPi_RS(options, pvs, rec_summary),
+        "DstToD0pi_D0ToKPiPiPi_WS" : maketuple_DstToD0pi_D0ToKPiPiPi_WS(options, pvs, rec_summary),
+        "DstToD0pi_D0ToPiPiPiPi"   : maketuple_DstToD0pi_D0ToPiPiPiPi(options, pvs, rec_summary),
+        "Dst2D0pi_D02pipimumu_WS"  : maketuple_Dst2D0pi_D02pipimumu_WS(options, pvs, rec_summary),
+        "Dst2D0pi_D02KKmumu_WS"    : maketuple_Dst2D0pi_D02KKmumu_WS(options, pvs, rec_summary),
+        "Dst2D0pi_D02Kpimumu_WS"   : maketuple_Dst2D0pi_D02Kpimumu_WS(options, pvs, rec_summary),
     }
 
         
diff --git a/rare_charm/main_d_to_hhh.py b/rare_charm/main_d_to_hll_control.py
similarity index 97%
rename from rare_charm/main_d_to_hhh.py
rename to rare_charm/main_d_to_hll_control.py
index 1cd7467a3b..eea3db55da 100644
--- a/rare_charm/main_d_to_hhh.py
+++ b/rare_charm/main_d_to_hll_control.py
@@ -9,7 +9,7 @@
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
 
-from .options.d_to_hhh import *
+from .options.d_to_hll_control import *
 
 from DaVinci import Options, make_config
 from PyConf.reading import get_pvs, get_rec_summary
diff --git a/rare_charm/options/._Lc_to_pll.py b/rare_charm/options/._Lc_to_pll.py
deleted file mode 100644
index 8974e17ea96fdde85b81948b0451b2fdcef7a1cd..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 4096
zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDJkFz{^v(m+1nBL)UWIUt(=a103vVqnnK
zfaqXY08}o3riBs6hl)!j=jZAr78K;9>g6OBmy{N#rlcg6q$&plgY@JH2&RK*|0U`&
zAbJ#xhQMeDjE2By2#kinXb6mkz-S1JhQMeDjE2By2#kgRt`GoqHbEE+<U%qsixrAe
zi}Op1l2aAZ@{6(+GV@AO^GY)F^AdA%Div~4(@GSQauV~hfqh}9t|3jK`XBBU83wuk
F{{e)pD1ZO}

diff --git a/rare_charm/options/Lb_to_Lcl.py b/rare_charm/options/Lb_to_Lcl.py
index b8ebcf9302..38e10c3ecd 100644
--- a/rare_charm/options/Lb_to_Lcl.py
+++ b/rare_charm/options/Lb_to_Lcl.py
@@ -7,6 +7,11 @@ from .tupling import (
     make_top_isolation_variables,
 )
 
+from .rare_charm import (
+    make_dtf_variables_pmumu,
+    make_dtf_variables_KSh,
+)
+
 from DaVinci.algorithms import create_lines_filter
 from PyConf.reading import get_particles
 from PyConf.reading import get_particles
@@ -33,13 +38,13 @@ def maketuple_Lb2Lcmu_Lc2pmumu(options, pvs, rec_summary):
     }
 
     variables = {
-        "Lb"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lm"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "lp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "mumtag" : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "Lb"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "Lambda_c+")+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "lm"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "lp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "mumtag" : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
@@ -66,13 +71,13 @@ def maketuple_Lb2Lcmu_Lc2pee(options, pvs, rec_summary):
     }
 
     variables = {
-        "Lb"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lm"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "lp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "mumtag" : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "Lb"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "Lambda_c+")+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "lm"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "lp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "mumtag" : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
@@ -99,13 +104,13 @@ def maketuple_Lb2Lcmu_Lc2KSp_LL(options, pvs, rec_summary):
     }
 
     variables = {
-        "Lb"    : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
-        "Lc"    : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
-        "KS0"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
-        "pim"   : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "pip"   : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "pp"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "mum"   : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "Lb"    : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "composite"),
+        "Lc"    : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "Lambda_c+")+make_dtf_variables_KSh(options, pvs, input_data, "composite"),
+        "KS0"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "KS0")+make_dtf_variables_KSh(options, pvs, input_data, "composite"),
+        "pim"   : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
+        "pip"   : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
+        "pp"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
+        "mum"   : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
@@ -132,13 +137,13 @@ def maketuple_Lb2Lcmu_Lc2KSp_DD(options, pvs, rec_summary):
     }
 
     variables = {
-        "Lb"    : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data),
-        "Lc"    : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
-        "KS0"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data),
-        "pim"   : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "pip"   : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "pp"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
-        "mum"   : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data),
+        "Lb"    : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "composite"),
+        "Lc"    : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "Lambda_c+")+make_dtf_variables_KSh(options, pvs, input_data, "composite"),
+        "KS0"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "KS0")+make_dtf_variables_KSh(options, pvs, input_data, "composite"),
+        "pim"   : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
+        "pip"   : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
+        "pp"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
+        "mum"   : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
diff --git a/rare_charm/options/d0_to_hhhh.py b/rare_charm/options/d0_to_hhhh.py
deleted file mode 100644
index bce4665c6a..0000000000
--- a/rare_charm/options/d0_to_hhhh.py
+++ /dev/null
@@ -1,423 +0,0 @@
-from .tupling import (
-    make_composite_variables,
-    make_composite_variables_3body,
-    make_basic_variables,
-    make_hlt2_event_variables,
-    make_basic_dtf_variables,
-    make_composite_dtf_variables,
-    make_basic_isolation_variables,
-    make_intermediate_isolation_variables,
-    make_top_isolation_variables,
-)
-
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunTuple_Particles as Funtuple
-from DecayTreeFitter import DecayTreeFitter
-
-# I can't get make_composite_variables_4body to work for some reason...
-import Functors as F
-from FunTuple import FunctorCollection
-variables_4body = (
-    FunctorCollection(
-        {
-            #14
-            "M14": F.SUBCOMB(Functor=F.MASS, Indices=(1, 4)),
-            "SDOCA14"     : F.SDOCA(Child1=1,Child2=4),
-            "SDOCACHI214" : F.SDOCACHI2(Child1=1,Child2=4),
-            "DOCA14"      : F.DOCA(Child1=1,Child2=4),
-            "DOCACHI214"  : F.DOCACHI2(Child1=1,Child2=4),
-            "COS14": F.ALV(1, 4),
-            #24
-            "M24": F.SUBCOMB(Functor=F.MASS, Indices=(2, 4)),
-            "SDOCA24"     : F.SDOCA(Child1=2,Child2=4),
-            "SDOCACHI224" : F.SDOCACHI2(Child1=2,Child2=4),
-            "DOCA24"      : F.DOCA(Child1=2,Child2=4),
-            "DOCACHI224"  : F.DOCACHI2(Child1=2,Child2=4),
-            "COS24": F.ALV(2, 4),
-            #34
-            "M34": F.SUBCOMB(Functor=F.MASS, Indices=(3, 4)),
-            "SDOCA34"     : F.SDOCA(Child1=3,Child2=4),
-            "SDOCACHI234" : F.SDOCACHI2(Child1=3,Child2=4),
-            "DOCA34"      : F.DOCA(Child1=3,Child2=4),
-            "DOCACHI234"  : F.DOCACHI2(Child1=3,Child2=4),
-            "COS34": F.ALV(3, 4),
-        }
-    )
-)
-
-
-def maketuple_DstToD0pi_D0ToKKPiPi(options, pvs, rec_summary):
-    name = "DstToD0pi_D0ToKKPiPi"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmKpPimPip_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst"   : "[D*(2010)+ -> ([D0]CC -> K- K+ (J/psi(1S) -> pi- pi+)) pi+]CC",
-        "D0"    : "[D*(2010)+ -> ^([D0]CC -> K- K+ (J/psi(1S) -> pi- pi+)) pi+]CC",
-        "Km"    : "[D*(2010)+ -> ([D0]CC -> ^K- K+ (J/psi(1S) -> pi- pi+)) pi+]CC",
-        "Kp"    : "[D*(2010)+ -> ([D0]CC -> K- ^K+ (J/psi(1S) -> pi- pi+)) pi+]CC",
-        "Jpsi"  : "[D*(2010)+ -> ([D0]CC -> K- K+ ^(J/psi(1S) -> pi- pi+)) pi+]CC",
-        "lm"    : "[D*(2010)+ -> ([D0]CC -> K- K+ (J/psi(1S) -> ^pi- pi+)) pi+]CC",
-        "lp"    : "[D*(2010)+ -> ([D0]CC -> K- K+ (J/psi(1S) -> pi- ^pi+)) pi+]CC",
-        "spip"  : "[D*(2010)+ -> ([D0]CC -> K- K+ (J/psi(1S) -> pi- pi+)) ^pi+]CC",
-    }
-
-    DTF_PV = DecayTreeFitter(
-        name='DTF_D0ToKKPiPi_PV',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    composite_dtf_variables = make_composite_dtf_variables(options,
-                                                           pvs,
-                                                           input_data,
-                                                           DTF=DTF_PV,
-                                                           pv_constraint=True)
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+composite_dtf_variables+make_top_isolation_variables(turbo_line, input_data),
-        "D0"    : make_composite_variables_3body(options, pvs, input_data)+composite_dtf_variables+make_intermediate_isolation_variables(turbo_line, input_data),
-        "Km"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-        "Kp"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+composite_dtf_variables+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lm"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-        "spip"  : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-    }
-
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-
-
-def maketuple_DstToD0pi_D0ToKPiPiPi_RS(options, pvs, rec_summary):
-    name = "DstToD0pi_D0ToKPiPiPi_RS"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPimPipPip_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst"   : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> pi- pi+)) pi+]CC",
-        "D0"    : "[D*(2010)+ -> ^(D0 -> K- pi+ (J/psi(1S) -> pi- pi+)) pi+]CC",
-        "Km"    : "[D*(2010)+ -> (D0 -> ^K- pi+ (J/psi(1S) -> pi- pi+)) pi+]CC",
-        "pip"   : "[D*(2010)+ -> (D0 -> K- ^pi+ (J/psi(1S) -> pi- pi+)) pi+]CC",
-        "Jpsi"  : "[D*(2010)+ -> (D0 -> K- pi+ ^(J/psi(1S) -> pi- pi+)) pi+]CC",
-        "lm"    : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> ^pi- pi+)) pi+]CC",
-        "lp"    : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> pi- ^pi+)) pi+]CC",
-        "spip"  : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> pi- pi+)) ^pi+]CC",
-    }
-
-    DTF_PV = DecayTreeFitter(
-        name='DTF_D0ToKPiPiPi_RS_PV',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    composite_dtf_variables = make_composite_dtf_variables(options,
-                                                           pvs,
-                                                           input_data,
-                                                           DTF=DTF_PV,
-                                                           pv_constraint=True)
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+composite_dtf_variables+make_top_isolation_variables(turbo_line, input_data),
-        "D0"    : make_composite_variables_3body(options, pvs, input_data)+composite_dtf_variables+make_intermediate_isolation_variables(turbo_line, input_data),
-        "Km"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-        "pip"   : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+composite_dtf_variables+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lm"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-        "spip"  : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-
-def maketuple_DstToD0pi_D0ToKPiPiPi_WS(options, pvs, rec_summary):
-    name = "DstToD0pi_D0ToKPiPiPi_WS"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKpPimPimPip_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst"   : "[D*(2010)+ -> (D0 -> pi- K+ (J/psi(1S) -> pi- pi+)) pi+]CC",
-        "D0"    : "[D*(2010)+ -> ^(D0 -> pi- K+ (J/psi(1S) -> pi- pi+)) pi+]CC",
-        "pim"   : "[D*(2010)+ -> (D0 -> ^pi- K+ (J/psi(1S) -> pi- pi+)) pi+]CC",
-        "Kp"    : "[D*(2010)+ -> (D0 -> pi- ^K+ (J/psi(1S) -> pi- pi+)) pi+]CC",
-        "Jpsi"  : "[D*(2010)+ -> (D0 -> pi- K+ ^(J/psi(1S) -> pi- pi+)) pi+]CC",
-        "lm"    : "[D*(2010)+ -> (D0 -> pi- K+ (J/psi(1S) -> ^pi- pi+)) pi+]CC",
-        "lp"    : "[D*(2010)+ -> (D0 -> pi- K+ (J/psi(1S) -> pi- ^pi+)) pi+]CC",
-        "spip"  : "[D*(2010)+ -> (D0 -> pi- K+ (J/psi(1S) -> pi- pi+)) ^pi+]CC",
-    }
-
-    DTF_PV = DecayTreeFitter(
-        name='DTF_D0ToKPiPiPi_WS_PV',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    composite_dtf_variables = make_composite_dtf_variables(options,
-                                                           pvs,
-                                                           input_data,
-                                                           DTF=DTF_PV,
-                                                           pv_constraint=True)
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+composite_dtf_variables+make_top_isolation_variables(turbo_line, input_data),
-        "D0"    : make_composite_variables_3body(options, pvs, input_data)+composite_dtf_variables+make_intermediate_isolation_variables(turbo_line, input_data),
-        "pim"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-        "Kp"   : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+composite_dtf_variables+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lm"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-        "spip"  : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-
-def maketuple_DstToD0pi_D0ToPiPiPiPi(options, pvs, rec_summary):
-    name = "DstToD0pi_D0ToPiPiPiPi"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimPimPipPip_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst"   : "[D*(2010)+ -> ([D0]CC -> pi- pi+ (J/psi(1S) -> pi- pi+)) pi+]CC",
-        "D0"    : "[D*(2010)+ -> ^([D0]CC -> pi- pi+ (J/psi(1S) -> pi- pi+)) pi+]CC",
-        "pim"   : "[D*(2010)+ -> ([D0]CC -> ^pi- pi+ (J/psi(1S) -> pi- pi+)) pi+]CC",
-        "pip"   : "[D*(2010)+ -> ([D0]CC -> pi- ^pi+ (J/psi(1S) -> pi- pi+)) pi+]CC",
-        "Jpsi"  : "[D*(2010)+ -> ([D0]CC -> pi- pi+ ^(J/psi(1S) -> pi- pi+)) pi+]CC",
-        "lm"    : "[D*(2010)+ -> ([D0]CC -> pi- pi+ (J/psi(1S) -> ^pi- pi+)) pi+]CC",
-        "lp"    : "[D*(2010)+ -> ([D0]CC -> pi- pi+ (J/psi(1S) -> pi- ^pi+)) pi+]CC",
-        "spip"  : "[D*(2010)+ -> ([D0]CC -> pi- pi+ (J/psi(1S) -> pi- pi+)) ^pi+]CC",
-    }
-
-
-    DTF_PV = DecayTreeFitter(
-        name='DTF_D0ToPiPiPiPi_PV',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    composite_dtf_variables = make_composite_dtf_variables(options,
-                                                           pvs,
-                                                           input_data,
-                                                           DTF=DTF_PV,
-                                                           pv_constraint=True)
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+composite_dtf_variables+make_top_isolation_variables(turbo_line, input_data),
-        "D0"    : make_composite_variables_3body(options, pvs, input_data)+composite_dtf_variables+make_intermediate_isolation_variables(turbo_line, input_data),
-        "pim"   : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-        "pip"   : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+composite_dtf_variables+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lm"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-        "spip"  : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-
-
-
-def maketuple_Dst2D0pi_D02pipimumu_WS(options, pvs, rec_summary, pim = False):
-    name = "Dst2D0pi_D02pipimumu_WSp"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimpPimpMumpMump_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst"   : "[D*(2010)+ -> ([D0]CC -> pi+ pi+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
-        "D0"    : "[D*(2010)+ -> ^([D0]CC -> pi+ pi+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
-        "h1"    : "[D*(2010)+ -> ([D0]CC -> ^pi+ pi+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
-        "h2"    : "[D*(2010)+ -> ([D0]CC -> pi+ ^pi+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
-        "Jpsi"  : "[D*(2010)+ -> ([D0]CC -> pi+ pi+ ^(J/psi(1S) -> mu+ mu+)) pi+]CC",
-        "l1"    : "[D*(2010)+ -> ([D0]CC -> pi+ pi+ (J/psi(1S) -> ^mu+ mu+)) pi+]CC",
-        "l2"    : "[D*(2010)+ -> ([D0]CC -> pi+ pi+ (J/psi(1S) -> mu+ ^mu+)) pi+]CC",
-        "spip"  : "[D*(2010)+ -> ([D0]CC -> pi+ pi+ (J/psi(1S) -> mu+ mu+)) ^pi+]CC",
-    }
-
-    if pim == True:
-        name = "Dst2D0pi_D02pipimumu_WSm"
-
-        branches = {
-            "Dst"  : "[D*(2010)+ -> ([D0]CC -> pi- pi- (J/psi(1S) -> mu- mu-)) pi+]CC",
-            "D0"   : "[D*(2010)+ -> ^([D0]CC -> pi- pi- (J/psi(1S) -> mu- mu-)) pi+]CC",
-            "h1"   : "[D*(2010)+ -> ([D0]CC -> ^pi- pi- (J/psi(1S) -> mu- mu-)) pi+]CC",
-            "h2"   : "[D*(2010)+ -> ([D0]CC -> pi- ^pi- (J/psi(1S) -> mu- mu-)) pi+]CC",
-            "Jpsi" : "[D*(2010)+ -> ([D0]CC -> pi- pi- ^(J/psi(1S) -> mu- mu-)) pi+]CC",
-            "l1"   : "[D*(2010)+ -> ([D0]CC -> pi- pi- (J/psi(1S) -> ^mu- mu-)) pi+]CC",
-            "l2"   : "[D*(2010)+ -> ([D0]CC -> pi- pi- (J/psi(1S) -> mu- ^mu-)) pi+]CC",
-            "spip" : "[D*(2010)+ -> ([D0]CC -> pi- pi- (J/psi(1S) -> mu- mu-)) ^pi+]CC",
-        }
-
-    DTF_PV = DecayTreeFitter(
-        name='DTF_D0Topipimumu_WS_PV',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    composite_dtf_variables = make_composite_dtf_variables(options,
-                                                           pvs,
-                                                           input_data,
-                                                           DTF=DTF_PV,
-                                                           pv_constraint=True)
-    
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+composite_dtf_variables+make_top_isolation_variables(turbo_line, input_data),
-        "D0"    : make_composite_variables_3body(options, pvs, input_data)+composite_dtf_variables+make_intermediate_isolation_variables(turbo_line, input_data),
-        "h1"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-        "h2"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+composite_dtf_variables+make_intermediate_isolation_variables(turbo_line, input_data),
-        "l1"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-        "l2"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-        "spip"  : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-    }
-
-    
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-
-
-
-def maketuple_Dst2D0pi_D02KKmumu_WS(options, pvs, rec_summary, Km = False):
-    name = "Dst2D0pi_D02KKmumu_WSp"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmpKmpMumpMump_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst"   : "[D*(2010)+ -> ([D0]CC -> K+ K+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
-        "D0"    : "[D*(2010)+ -> ^([D0]CC -> K+ K+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
-        "h1"    : "[D*(2010)+ -> ([D0]CC -> ^K+ K+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
-        "h2"    : "[D*(2010)+ -> ([D0]CC -> K+ ^K+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
-        "Jpsi"  : "[D*(2010)+ -> ([D0]CC -> K+ K+ ^(J/psi(1S) -> mu+ mu+)) pi+]CC",
-        "l1"    : "[D*(2010)+ -> ([D0]CC -> K+ K+ (J/psi(1S) -> ^mu+ mu+)) pi+]CC",
-        "l2"    : "[D*(2010)+ -> ([D0]CC -> K+ K+ (J/psi(1S) -> mu+ ^mu+)) pi+]CC",
-        "spip"  : "[D*(2010)+ -> ([D0]CC -> K+ K+ (J/psi(1S) -> mu+ mu+)) ^pi+]CC",
-    }
-
-
-    if Km == True:
-        name = "Dst2D0pi_D02KKmumu_WSm"
-
-        branches = {
-            "Dst"   : "[D*(2010)+ -> ([D0]CC -> K- K- (J/psi(1S) -> mu- mu-)) pi+]CC",
-            "D0"    : "[D*(2010)+ -> ^([D0]CC -> K- K- (J/psi(1S) -> mu- mu-)) pi+]CC",
-            "h1"    : "[D*(2010)+ -> ([D0]CC -> ^K- K- (J/psi(1S) -> mu- mu-)) pi+]CC",
-            "h2"    : "[D*(2010)+ -> ([D0]CC -> K- ^K- (J/psi(1S) -> mu- mu-)) pi+]CC",
-            "Jpsi"  : "[D*(2010)+ -> ([D0]CC -> K- K- ^(J/psi(1S) -> mu- mu-)) pi+]CC",
-            "l1"    : "[D*(2010)+ -> ([D0]CC -> K- K- (J/psi(1S) -> ^mu- mu-)) pi+]CC",
-            "l2"    : "[D*(2010)+ -> ([D0]CC -> K- K- (J/psi(1S) -> mu- ^mu-)) pi+]CC",
-            "spip"  : "[D*(2010)+ -> ([D0]CC -> K- K- (J/psi(1S) -> mu- mu-)) ^pi+]CC",
-        }
-
-
-    DTF_PV = DecayTreeFitter(
-        name='DTF_D0ToKKmumu_WS_PV',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    composite_dtf_variables = make_composite_dtf_variables(options,
-                                                           pvs,
-                                                           input_data,
-                                                           DTF=DTF_PV,
-                                                           pv_constraint=True)
-    
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+composite_dtf_variables+make_top_isolation_variables(turbo_line, input_data),
-        "D0"    : make_composite_variables_3body(options, pvs, input_data)+composite_dtf_variables+make_intermediate_isolation_variables(turbo_line, input_data),
-        "h1"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-        "h2"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+composite_dtf_variables+make_intermediate_isolation_variables(turbo_line, input_data),
-        "l1"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-        "l2"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-        "spip"  : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-    }
-
-    
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-
-
-def maketuple_Dst2D0pi_D02Kpimumu_WS(options, pvs, rec_summary, Km = False):
-    name = "Dst2D0pi_D02Kpimumu_WSp"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmpPimpMumpMump_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-
-    branches = {
-        "Dst"   : "[D*(2010)+ -> ([D0]CC -> K+ pi+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
-        "D0"    : "[D*(2010)+ -> ^([D0]CC -> K+ pi+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
-        "h1"    : "[D*(2010)+ -> ([D0]CC -> ^K+ pi+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
-        "h2"    : "[D*(2010)+ -> ([D0]CC -> K+ ^pi+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
-        "Jpsi"  : "[D*(2010)+ -> ([D0]CC -> K+ pi+ ^(J/psi(1S) -> mu+ mu+)) pi+]CC",
-        "l1"    : "[D*(2010)+ -> ([D0]CC -> K+ pi+ (J/psi(1S) -> ^mu+ mu+)) pi+]CC",
-        "l2"    : "[D*(2010)+ -> ([D0]CC -> K+ pi+ (J/psi(1S) -> mu+ ^mu+)) pi+]CC",
-        "spip"  : "[D*(2010)+ -> ([D0]CC -> K+ pi+ (J/psi(1S) -> mu+ mu+)) ^pi+]CC",
-    }
-
-
-
-    if Km == True:
-        name = "Dst2D0pi_D02Kpimumu_WSm"
-
-        branches = {
-            "Dst" : "[D*(2010)+ -> ([D0]CC -> K- pi- (J/psi(1S) -> mu- mu-)) pi+]CC",
-            "D0"  : "[D*(2010)+ -> ^([D0]CC -> K- pi- (J/psi(1S) -> mu- mu-)) pi+]CC",
-            "h1"   : "[D*(2010)+ -> ([D0]CC -> ^K- pi- (J/psi(1S) -> mu- mu-)) pi+]CC",
-            "h2"  : "[D*(2010)+ -> ([D0]CC -> K- ^pi- (J/psi(1S) -> mu- mu-)) pi+]CC",
-            "Jpsi"  : "[D*(2010)+ -> ([D0]CC -> K- pi- ^(J/psi(1S) -> mu- mu-)) pi+]CC",
-            "l1"  : "[D*(2010)+ -> ([D0]CC -> K- pi- (J/psi(1S) -> ^mu- mu-)) pi+]CC",
-            "l2"  : "[D*(2010)+ -> ([D0]CC -> K- pi- (J/psi(1S) -> mu- ^mu-)) pi+]CC",
-            "spip" : "[D*(2010)+ -> ([D0]CC -> K- pi- (J/psi(1S) -> mu- mu-)) ^pi+]CC",
-        }
-
-
-
-    DTF_PV = DecayTreeFitter(
-        name='DTF_D0ToKpimumu_WS_PV',
-        input_particles=input_data,
-        input_pvs=pvs)
-
-    composite_dtf_variables = make_composite_dtf_variables(options,
-                                                           pvs,
-                                                           input_data,
-                                                           DTF=DTF_PV,
-                                                           pv_constraint=True)
-    
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+composite_dtf_variables+make_top_isolation_variables(turbo_line, input_data),
-        "D0"    : make_composite_variables_3body(options, pvs, input_data)+composite_dtf_variables+make_intermediate_isolation_variables(turbo_line, input_data),
-        "h1"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-        "h2"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+composite_dtf_variables+make_intermediate_isolation_variables(turbo_line, input_data),
-        "l1"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-        "l2"    : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-        "spip"  : make_basic_variables(options, pvs, input_data)+make_basic_dtf_variables(options, pvs, input_data, DTF=DTF_PV, pv_constraint=True)+make_basic_isolation_variables(turbo_line, input_data),
-    }
-
-    
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
diff --git a/rare_charm/options/d0_to_hhll.py b/rare_charm/options/d0_to_hhll.py
index 394c1b6c5d..40f18e4781 100644
--- a/rare_charm/options/d0_to_hhll.py
+++ b/rare_charm/options/d0_to_hhll.py
@@ -44,7 +44,7 @@ def maketuple_Dst2D0pi_D02pipimumu(options, pvs, rec_summary):
     variables = {
         "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
         "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
         "pim"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
         "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
         "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
@@ -159,7 +159,7 @@ def maketuple_Dst2D0pi_D02Kpimumu_WS(options, pvs, rec_summary):
 
 def maketuple_D02Kpimumu(options, pvs, rec_summary):
     name = "D02Kpimumu"
-    turbo_line = "Hlt2Charm_D0ToKmPipMumMup_Untag" # Why is there only the KmPip option and not KpPim? Is this inclusive?
+    turbo_line = "Hlt2Charm_D0ToKmPipMumMup_Untag"
 
     input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
     myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}", [turbo_line])
diff --git a/rare_charm/options/d0_to_hhll_control.py b/rare_charm/options/d0_to_hhll_control.py
new file mode 100644
index 0000000000..b4887b5f52
--- /dev/null
+++ b/rare_charm/options/d0_to_hhll_control.py
@@ -0,0 +1,267 @@
+from .tupling import (
+    make_composite_variables,
+    make_composite_variables_3body,
+    make_basic_variables,
+    make_hlt2_event_variables,
+    make_basic_isolation_variables,
+    make_intermediate_isolation_variables,
+    make_top_isolation_variables,
+)
+
+from .rare_charm import (
+    make_dtf_variables_hhmumu,
+)
+
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from FunTuple import FunTuple_Particles as Funtuple
+
+
+def maketuple_DstToD0pi_D0ToKKPiPi(options, pvs, rec_summary):
+    name = "DstToD0pi_D0ToKKPiPi"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmKpPimPip_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst"   : "[D*(2010)+ -> ([D0]CC -> K- K+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "D0"    : "[D*(2010)+ -> ^([D0]CC -> K- K+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "Km"    : "[D*(2010)+ -> ([D0]CC -> ^K- K+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "Kp"    : "[D*(2010)+ -> ([D0]CC -> K- ^K+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "Jpsi"  : "[D*(2010)+ -> ([D0]CC -> K- K+ ^(J/psi(1S) -> pi- pi+)) pi+]CC",
+        "lm"    : "[D*(2010)+ -> ([D0]CC -> K- K+ (J/psi(1S) -> ^pi- pi+)) pi+]CC",
+        "lp"    : "[D*(2010)+ -> ([D0]CC -> K- K+ (J/psi(1S) -> pi- ^pi+)) pi+]CC",
+        "spip"  : "[D*(2010)+ -> ([D0]CC -> K- K+ (J/psi(1S) -> pi- pi+)) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
+        "Km"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+
+
+def maketuple_DstToD0pi_D0ToKPiPiPi_RS(options, pvs, rec_summary):
+    name = "DstToD0pi_D0ToKPiPiPi_RS"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPimPipPip_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst"   : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "D0"    : "[D*(2010)+ -> ^(D0 -> K- pi+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "Km"    : "[D*(2010)+ -> (D0 -> ^K- pi+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "pip"   : "[D*(2010)+ -> (D0 -> K- ^pi+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "Jpsi"  : "[D*(2010)+ -> (D0 -> K- pi+ ^(J/psi(1S) -> pi- pi+)) pi+]CC",
+        "lm"    : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> ^pi- pi+)) pi+]CC",
+        "lp"    : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> pi- ^pi+)) pi+]CC",
+        "spip"  : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> pi- pi+)) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
+        "Km"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_DstToD0pi_D0ToKPiPiPi_WS(options, pvs, rec_summary):
+    name = "DstToD0pi_D0ToKPiPiPi_WS"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKpPimPimPip_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst"   : "[D*(2010)+ -> (D0 -> pi- K+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "D0"    : "[D*(2010)+ -> ^(D0 -> pi- K+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "pim"   : "[D*(2010)+ -> (D0 -> ^pi- K+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "Kp"    : "[D*(2010)+ -> (D0 -> pi- ^K+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "Jpsi"  : "[D*(2010)+ -> (D0 -> pi- K+ ^(J/psi(1S) -> pi- pi+)) pi+]CC",
+        "lm"    : "[D*(2010)+ -> (D0 -> pi- K+ (J/psi(1S) -> ^pi- pi+)) pi+]CC",
+        "lp"    : "[D*(2010)+ -> (D0 -> pi- K+ (J/psi(1S) -> pi- ^pi+)) pi+]CC",
+        "spip"  : "[D*(2010)+ -> (D0 -> pi- K+ (J/psi(1S) -> pi- pi+)) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
+        "pim"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_DstToD0pi_D0ToPiPiPiPi(options, pvs, rec_summary):
+    name = "DstToD0pi_D0ToPiPiPiPi"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimPimPipPip_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst"   : "[D*(2010)+ -> ([D0]CC -> pi- pi+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "D0"    : "[D*(2010)+ -> ^([D0]CC -> pi- pi+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "pim"   : "[D*(2010)+ -> ([D0]CC -> ^pi- pi+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "pip"   : "[D*(2010)+ -> ([D0]CC -> pi- ^pi+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "Jpsi"  : "[D*(2010)+ -> ([D0]CC -> pi- pi+ ^(J/psi(1S) -> pi- pi+)) pi+]CC",
+        "lm"    : "[D*(2010)+ -> ([D0]CC -> pi- pi+ (J/psi(1S) -> ^pi- pi+)) pi+]CC",
+        "lp"    : "[D*(2010)+ -> ([D0]CC -> pi- pi+ (J/psi(1S) -> pi- ^pi+)) pi+]CC",
+        "spip"  : "[D*(2010)+ -> ([D0]CC -> pi- pi+ (J/psi(1S) -> pi- pi+)) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
+        "pim"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+
+
+
+def maketuple_Dst2D0pi_D02pipimumu_WS(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02pipimumu_WS"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimpPimpMumpMump_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst"   : "[D*(2010)+ -> ([D0]CC -> pi+ pi+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
+        "D0"    : "[D*(2010)+ -> ^([D0]CC -> pi+ pi+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
+        "h1"    : "[D*(2010)+ -> ([D0]CC -> ^pi+ pi+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
+        "h2"    : "[D*(2010)+ -> ([D0]CC -> pi+ ^pi+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
+        "Jpsi"  : "[D*(2010)+ -> ([D0]CC -> pi+ pi+ ^(J/psi(1S) -> mu+ mu+)) pi+]CC",
+        "l1"    : "[D*(2010)+ -> ([D0]CC -> pi+ pi+ (J/psi(1S) -> ^mu+ mu+)) pi+]CC",
+        "l2"    : "[D*(2010)+ -> ([D0]CC -> pi+ pi+ (J/psi(1S) -> mu+ ^mu+)) pi+]CC",
+        "spip"  : "[D*(2010)+ -> ([D0]CC -> pi+ pi+ (J/psi(1S) -> mu+ mu+)) ^pi+]CC",
+    }
+    
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
+        "h1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "h2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "l1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "l2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+
+
+def maketuple_Dst2D0pi_D02KKmumu_WS(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02KKmumu_WS"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmpKmpMumpMump_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst"   : "[D*(2010)+ -> ([D0]CC -> K+ K+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
+        "D0"    : "[D*(2010)+ -> ^([D0]CC -> K+ K+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
+        "h1"    : "[D*(2010)+ -> ([D0]CC -> ^K+ K+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
+        "h2"    : "[D*(2010)+ -> ([D0]CC -> K+ ^K+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
+        "Jpsi"  : "[D*(2010)+ -> ([D0]CC -> K+ K+ ^(J/psi(1S) -> mu+ mu+)) pi+]CC",
+        "l1"    : "[D*(2010)+ -> ([D0]CC -> K+ K+ (J/psi(1S) -> ^mu+ mu+)) pi+]CC",
+        "l2"    : "[D*(2010)+ -> ([D0]CC -> K+ K+ (J/psi(1S) -> mu+ ^mu+)) pi+]CC",
+        "spip"  : "[D*(2010)+ -> ([D0]CC -> K+ K+ (J/psi(1S) -> mu+ mu+)) ^pi+]CC",
+    }
+    
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
+        "h1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "h2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "l1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "l2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+    }
+    
+
+    
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_Dst2D0pi_D02Kpimumu_WS(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02Kpimumu_WS"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmpPimpMumpMump_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+
+    branches = {
+        "Dst"   : "[D*(2010)+ -> ([D0]CC -> K+ pi+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
+        "D0"    : "[D*(2010)+ -> ^([D0]CC -> K+ pi+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
+        "h1"    : "[D*(2010)+ -> ([D0]CC -> ^K+ pi+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
+        "h2"    : "[D*(2010)+ -> ([D0]CC -> K+ ^pi+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
+        "Jpsi"  : "[D*(2010)+ -> ([D0]CC -> K+ pi+ ^(J/psi(1S) -> mu+ mu+)) pi+]CC",
+        "l1"    : "[D*(2010)+ -> ([D0]CC -> K+ pi+ (J/psi(1S) -> ^mu+ mu+)) pi+]CC",
+        "l2"    : "[D*(2010)+ -> ([D0]CC -> K+ pi+ (J/psi(1S) -> mu+ ^mu+)) pi+]CC",
+        "spip"  : "[D*(2010)+ -> ([D0]CC -> K+ pi+ (J/psi(1S) -> mu+ mu+)) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
+        "h1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "h2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "l1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "l2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+    }
+    
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
diff --git a/rare_charm/options/d_to_hll.py b/rare_charm/options/d_to_hll.py
index a919600133..c5b1844fa9 100644
--- a/rare_charm/options/d_to_hll.py
+++ b/rare_charm/options/d_to_hll.py
@@ -151,18 +151,18 @@ def maketuple_D2piee_OS(options, pvs, rec_summary):
     branches = {
         "Dp"    : "[D+ -> (J/psi(1S) -> e+ e-) pi+]CC",
         "Jpsi"  : "[D+ -> ^(J/psi(1S) -> e+ e-) pi+]CC",
-        "lp1"   : "[D+ -> (J/psi(1S) -> ^e+ e-) pi+]CC",
-        "lp2"   : "[D+ -> (J/psi(1S) -> e+ ^e-) pi+]CC",
-        "hm"    : "[D+ -> (J/psi(1S) -> e+ e-) ^pi+]CC",
+        "lp"    : "[D+ -> (J/psi(1S) -> ^e+ e-) pi+]CC",
+        "lm"    : "[D+ -> (J/psi(1S) -> e+ ^e-) pi+]CC",
+        "hp"    : "[D+ -> (J/psi(1S) -> e+ e-) ^pi+]CC",
     }
 
 
     variables = {
         "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
         "Jpsi" : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lp1"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "lp2"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "hm"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lm"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
@@ -209,17 +209,17 @@ def maketuple_D2Kee_OS(options, pvs, rec_summary):
     branches = {
         "Dp"    : "[D+ -> (J/psi(1S) -> e+ e-) K+]CC",
         "Jpsi"  : "[D+ -> ^(J/psi(1S) -> e+ e-) K+]CC",
-        "lp1"   : "[D+ -> (J/psi(1S) -> ^e+ e-) K+]CC",
-        "lp2"   : "[D+ -> (J/psi(1S) -> e+ ^e-) K+]CC",
-        "hm"    : "[D+ -> (J/psi(1S) -> e+ e-) ^K+]CC",
+        "lp"    : "[D+ -> (J/psi(1S) -> ^e+ e-) K+]CC",
+        "lm"    : "[D+ -> (J/psi(1S) -> e+ ^e-) K+]CC",
+        "hp"    : "[D+ -> (J/psi(1S) -> e+ e-) ^K+]CC",
     }
 
     variables = {
         "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
         "Jpsi" : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lp1"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "lp2"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "hm"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lm"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
diff --git a/rare_charm/options/d_to_hhh.py b/rare_charm/options/d_to_hll_control.py
similarity index 88%
rename from rare_charm/options/d_to_hhh.py
rename to rare_charm/options/d_to_hll_control.py
index 26e9fb0109..ed315ed670 100644
--- a/rare_charm/options/d_to_hhh.py
+++ b/rare_charm/options/d_to_hll_control.py
@@ -9,6 +9,7 @@ from .tupling import (
 
 from .rare_charm import (
     make_dtf_variables_hmumu,
+    make_dtf_variables_KSh,
 )
 
 from DaVinci.algorithms import create_lines_filter
@@ -151,11 +152,11 @@ def maketuple_D2KSK_LL(options, pvs, rec_summary):
     }
 
     variables = {
-        "Dp"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-        "KS0"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-        "pim"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "hp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Dp"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+        "KS0"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "KS0"),
+        "pim"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "hp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, use_loki_decay_finder=True)
@@ -180,11 +181,11 @@ def maketuple_D2KSpi_LL(options, pvs, rec_summary):
 
 
     variables = {
-        "Dp"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-        "KS0"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-        "pim"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "hp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Dp"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+        "KS0"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "KS0"),
+        "pim"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "hp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, use_loki_decay_finder=True)
diff --git a/rare_charm/options/rare_charm.py b/rare_charm/options/rare_charm.py
index 4cc248241e..8997b0ea5d 100644
--- a/rare_charm/options/rare_charm.py
+++ b/rare_charm/options/rare_charm.py
@@ -52,7 +52,7 @@ def make_dtf_variables_hmumu(options, pvs, input_data, ptype):
                                             pv_constraint=False,
                                             mass_constraint=False)
         '''
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
                                             DTF=DTFvtx,
                                             pv_constraint=True,
                                             mass_constraint=False)
@@ -81,7 +81,7 @@ def make_dtf_variables_hmumu(options, pvs, input_data, ptype):
                                             pv_constraint=False,
                                             mass_constraint=False)
         '''
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
                                             DTF=DTFvtx,
                                             pv_constraint=True,
                                             mass_constraint=False)
@@ -139,7 +139,7 @@ def make_dtf_variables_pmumu(options, pvs, input_data, ptype):
                                             pv_constraint=False,
                                             mass_constraint=False)
         '''
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
                                             DTF=DTFvtx,
                                             pv_constraint=True,
                                             mass_constraint=False)
@@ -160,7 +160,7 @@ def make_dtf_variables_pmumu(options, pvs, input_data, ptype):
                                             pv_constraint=False,
                                             mass_constraint=False)
         '''
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
                                             DTF=DTFvtx,
                                             pv_constraint=True,
                                             mass_constraint=False)
@@ -208,7 +208,7 @@ def make_dtf_variables_hhmumu(options, pvs, input_data, ptype):
                                             pv_constraint=False,
                                             mass_constraint=False)
         '''
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
                                             DTF=DTFvtx,
                                             pv_constraint=True,
                                             mass_constraint=False)
@@ -229,7 +229,7 @@ def make_dtf_variables_hhmumu(options, pvs, input_data, ptype):
                                             pv_constraint=False,
                                             mass_constraint=False)
         '''
-        dtf_vars += make_composite_dtf_variables_3body(options, pvs, input_data,
+        dtf_vars = make_composite_dtf_variables_3body(options, pvs, input_data,
                                             DTF=DTFvtx,
                                             pv_constraint=True,
                                             mass_constraint=False)
@@ -251,7 +251,7 @@ def make_dtf_variables_hhmumu(options, pvs, input_data, ptype):
                                             pv_constraint=False,
                                             mass_constraint=False)
         '''
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
                                             DTF=DTFvtx,
                                             pv_constraint=True,
                                             mass_constraint=False)
@@ -300,7 +300,7 @@ def make_dtf_variables_KSh(options, pvs, input_data, ptype):
                                             pv_constraint=False,
                                             mass_constraint=False)
         '''
-        dtf_vars += make_basic_dtf_variables(options, pvs, input_data,
+        dtf_vars = make_basic_dtf_variables(options, pvs, input_data,
                                             DTF=DTFvtx,
                                             pv_constraint=True,
                                             mass_constraint=False)
@@ -321,7 +321,7 @@ def make_dtf_variables_KSh(options, pvs, input_data, ptype):
                                             pv_constraint=False,
                                             mass_constraint=False)
         '''
-        dtf_vars += make_composite_dtf_variables(options, pvs, input_data,
+        dtf_vars = make_composite_dtf_variables(options, pvs, input_data,
                                             DTF=DTFvtx,
                                             pv_constraint=True,
                                             mass_constraint=False)
-- 
GitLab


From 85ec39f7e3c43598701e49c98ee2fd509c1553dd Mon Sep 17 00:00:00 2001
From: Donata Osthues <donata.osthues@cern.ch>
Date: Thu, 7 Nov 2024 15:51:59 +0100
Subject: [PATCH 38/51] bug fix

---
 rare_charm/options/d0_to_hhll_control.py | 1 +
 rare_charm/options/d_to_hll.py           | 5 -----
 rare_charm/options/tupling.py            | 3 ---
 3 files changed, 1 insertion(+), 8 deletions(-)

diff --git a/rare_charm/options/d0_to_hhll_control.py b/rare_charm/options/d0_to_hhll_control.py
index b4887b5f52..43590ed00e 100644
--- a/rare_charm/options/d0_to_hhll_control.py
+++ b/rare_charm/options/d0_to_hhll_control.py
@@ -6,6 +6,7 @@ from .tupling import (
     make_basic_isolation_variables,
     make_intermediate_isolation_variables,
     make_top_isolation_variables,
+    make_DeltaM_variable,
 )
 
 from .rare_charm import (
diff --git a/rare_charm/options/d_to_hll.py b/rare_charm/options/d_to_hll.py
index c5b1844fa9..85ebc80aab 100644
--- a/rare_charm/options/d_to_hll.py
+++ b/rare_charm/options/d_to_hll.py
@@ -1,8 +1,3 @@
-# copied and adapted from: 
-# file        = AnalysisProductions/CharmRD/maketuple_D02Kmumu.py 
-# commit_hash = 73c8c844eb343b39ffc6b274fcdf2d196bfd7016
-
-
 from .tupling import (
     make_composite_variables,
     make_basic_variables,
diff --git a/rare_charm/options/tupling.py b/rare_charm/options/tupling.py
index 308c440ef6..36466e9bbf 100644
--- a/rare_charm/options/tupling.py
+++ b/rare_charm/options/tupling.py
@@ -8,9 +8,6 @@
 # granted to it by virtue of its status as an Intergovernmental Organization  #
 # or submit itself to any jurisdiction.                                       #
 ###############################################################################
-"""Common configuration functions
-
-"""
 
 import Functors as F
 from Functors.math import log
-- 
GitLab


From f53e1afb8a5c26a33e6798786f7564ce00c743d5 Mon Sep 17 00:00:00 2001
From: Serena Maccolini <serena.maccolini@cern.ch>
Date: Thu, 7 Nov 2024 17:38:29 +0100
Subject: [PATCH 39/51] fix Dst2D0pi_D02hhll_WS

---
 rare_charm/options/d0_to_hhll_control.py | 48 ++++++++++++------------
 1 file changed, 24 insertions(+), 24 deletions(-)

diff --git a/rare_charm/options/d0_to_hhll_control.py b/rare_charm/options/d0_to_hhll_control.py
index 43590ed00e..d8cb625b01 100644
--- a/rare_charm/options/d0_to_hhll_control.py
+++ b/rare_charm/options/d0_to_hhll_control.py
@@ -166,14 +166,14 @@ def maketuple_Dst2D0pi_D02pipimumu_WS(options, pvs, rec_summary):
     myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
 
     branches = {
-        "Dst"   : "[D*(2010)+ -> ([D0]CC -> pi+ pi+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
-        "D0"    : "[D*(2010)+ -> ^([D0]CC -> pi+ pi+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
-        "h1"    : "[D*(2010)+ -> ([D0]CC -> ^pi+ pi+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
-        "h2"    : "[D*(2010)+ -> ([D0]CC -> pi+ ^pi+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
-        "Jpsi"  : "[D*(2010)+ -> ([D0]CC -> pi+ pi+ ^(J/psi(1S) -> mu+ mu+)) pi+]CC",
-        "l1"    : "[D*(2010)+ -> ([D0]CC -> pi+ pi+ (J/psi(1S) -> ^mu+ mu+)) pi+]CC",
-        "l2"    : "[D*(2010)+ -> ([D0]CC -> pi+ pi+ (J/psi(1S) -> mu+ ^mu+)) pi+]CC",
-        "spip"  : "[D*(2010)+ -> ([D0]CC -> pi+ pi+ (J/psi(1S) -> mu+ mu+)) ^pi+]CC",
+        "Dst"   : "[D*(2010)+ -> ([D0]CC -> [pi+]CC [pi+]CC (J/psi(1S) -> [mu+]CC [mu+]CC)) pi+]CC",
+        "D0"    : "[D*(2010)+ -> ^([D0]CC -> [pi+]CC [pi+]CC (J/psi(1S) -> [mu+]CC [mu+]CC)) pi+]CC",
+        "h1"    : "[D*(2010)+ -> ([D0]CC -> ^[pi+]CC [pi+]CC (J/psi(1S) -> [mu+]CC [mu+]CC)) pi+]CC",
+        "h2"    : "[D*(2010)+ -> ([D0]CC -> [pi+]CC ^[pi+]CC (J/psi(1S) -> [mu+]CC [mu+]CC)) pi+]CC",
+        "Jpsi"  : "[D*(2010)+ -> ([D0]CC -> [pi+]CC [pi+]CC ^(J/psi(1S) -> [mu+]CC [mu+]CC)) pi+]CC",
+        "l1"    : "[D*(2010)+ -> ([D0]CC -> [pi+]CC [pi+]CC (J/psi(1S) -> ^[mu+]CC [mu+]CC)) pi+]CC",
+        "l2"    : "[D*(2010)+ -> ([D0]CC -> [pi+]CC [pi+]CC (J/psi(1S) -> [mu+]CC ^[mu+]CC)) pi+]CC",
+        "spip"  : "[D*(2010)+ -> ([D0]CC -> [pi+]CC [pi+]CC (J/psi(1S) -> [mu+]CC [mu+]CC)) ^pi+]CC",
     }
     
     variables = {
@@ -203,14 +203,14 @@ def maketuple_Dst2D0pi_D02KKmumu_WS(options, pvs, rec_summary):
     myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
 
     branches = {
-        "Dst"   : "[D*(2010)+ -> ([D0]CC -> K+ K+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
-        "D0"    : "[D*(2010)+ -> ^([D0]CC -> K+ K+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
-        "h1"    : "[D*(2010)+ -> ([D0]CC -> ^K+ K+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
-        "h2"    : "[D*(2010)+ -> ([D0]CC -> K+ ^K+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
-        "Jpsi"  : "[D*(2010)+ -> ([D0]CC -> K+ K+ ^(J/psi(1S) -> mu+ mu+)) pi+]CC",
-        "l1"    : "[D*(2010)+ -> ([D0]CC -> K+ K+ (J/psi(1S) -> ^mu+ mu+)) pi+]CC",
-        "l2"    : "[D*(2010)+ -> ([D0]CC -> K+ K+ (J/psi(1S) -> mu+ ^mu+)) pi+]CC",
-        "spip"  : "[D*(2010)+ -> ([D0]CC -> K+ K+ (J/psi(1S) -> mu+ mu+)) ^pi+]CC",
+        "Dst"   : "[D*(2010)+ -> ([D0]CC -> [K+]CC [K+]CC (J/psi(1S) -> [mu+]CC [mu+]CC)) pi+]CC",
+        "D0"    : "[D*(2010)+ -> ^([D0]CC -> [K+]CC [K+]CC (J/psi(1S) -> [mu+]CC [mu+]CC)) pi+]CC",
+        "h1"    : "[D*(2010)+ -> ([D0]CC -> ^[K+]CC [K+]CC (J/psi(1S) -> [mu+]CC [mu+]CC)) pi+]CC",
+        "h2"    : "[D*(2010)+ -> ([D0]CC -> [K+]CC ^[K+]CC (J/psi(1S) -> [mu+]CC [mu+]CC)) pi+]CC",
+        "Jpsi"  : "[D*(2010)+ -> ([D0]CC -> [K+]CC [K+]CC ^(J/psi(1S) -> [mu+]CC [mu+]CC)) pi+]CC",
+        "l1"    : "[D*(2010)+ -> ([D0]CC -> [K+]CC [K+]CC (J/psi(1S) -> ^[mu+]CC [mu+]CC)) pi+]CC",
+        "l2"    : "[D*(2010)+ -> ([D0]CC -> [K+]CC [K+]CC (J/psi(1S) -> [mu+]CC ^[mu+]CC)) pi+]CC",
+        "spip"  : "[D*(2010)+ -> ([D0]CC -> [K+]CC [K+]CC (J/psi(1S) -> [mu+]CC [mu+]CC)) ^pi+]CC",
     }
     
     variables = {
@@ -241,14 +241,14 @@ def maketuple_Dst2D0pi_D02Kpimumu_WS(options, pvs, rec_summary):
 
 
     branches = {
-        "Dst"   : "[D*(2010)+ -> ([D0]CC -> K+ pi+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
-        "D0"    : "[D*(2010)+ -> ^([D0]CC -> K+ pi+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
-        "h1"    : "[D*(2010)+ -> ([D0]CC -> ^K+ pi+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
-        "h2"    : "[D*(2010)+ -> ([D0]CC -> K+ ^pi+ (J/psi(1S) -> mu+ mu+)) pi+]CC",
-        "Jpsi"  : "[D*(2010)+ -> ([D0]CC -> K+ pi+ ^(J/psi(1S) -> mu+ mu+)) pi+]CC",
-        "l1"    : "[D*(2010)+ -> ([D0]CC -> K+ pi+ (J/psi(1S) -> ^mu+ mu+)) pi+]CC",
-        "l2"    : "[D*(2010)+ -> ([D0]CC -> K+ pi+ (J/psi(1S) -> mu+ ^mu+)) pi+]CC",
-        "spip"  : "[D*(2010)+ -> ([D0]CC -> K+ pi+ (J/psi(1S) -> mu+ mu+)) ^pi+]CC",
+        "Dst"   : "[D*(2010)+ -> ([D0]CC -> [K+]CC [pi+]CC (J/psi(1S) -> [mu+]CC [mu+]CC)) pi+]CC",
+        "D0"    : "[D*(2010)+ -> ^([D0]CC -> [K+]CC [pi+]CC (J/psi(1S) -> [mu+]CC [mu+]CC)) pi+]CC",
+        "h1"    : "[D*(2010)+ -> ([D0]CC -> ^[K+]CC [pi+]CC (J/psi(1S) -> [mu+]CC [mu+]CC)) pi+]CC",
+        "h2"    : "[D*(2010)+ -> ([D0]CC -> [K+]CC ^[pi+]CC (J/psi(1S) -> [mu+]CC [mu+]CC)) pi+]CC",
+        "Jpsi"  : "[D*(2010)+ -> ([D0]CC -> [K+]CC [pi+]CC ^(J/psi(1S) -> [mu+]CC [mu+]CC)) pi+]CC",
+        "l1"    : "[D*(2010)+ -> ([D0]CC -> [K+]CC [pi+]CC (J/psi(1S) -> ^[mu+]CC [mu+]CC)) pi+]CC",
+        "l2"    : "[D*(2010)+ -> ([D0]CC -> [K+]CC [pi+]CC (J/psi(1S) -> [mu+]CC ^[mu+]CC)) pi+]CC",
+        "spip"  : "[D*(2010)+ -> ([D0]CC -> [K+]CC [pi+]CC (J/psi(1S) -> [mu+]CC [mu+]CC)) ^pi+]CC",
     }
 
     variables = {
-- 
GitLab


From 90da2f146ec5539d9bea958b8d939c96919bb380 Mon Sep 17 00:00:00 2001
From: Donata Osthues <donata.osthues@cern.ch>
Date: Thu, 21 Nov 2024 09:21:57 +0100
Subject: [PATCH 40/51] put control channel of Lc_to_pll in separate main and
 options file

---
 rare_charm/._.DS_Store                  | Bin 4096 -> 0 bytes
 rare_charm/._info.yaml                  | Bin 4096 -> 0 bytes
 rare_charm/info.yaml                    |   5 +-
 rare_charm/main_Lc_to_pll.py            |   8 -
 rare_charm/main_Lc_to_pll_control.py    |  34 +++++
 rare_charm/options/Lc_to_pll.py         | 171 ---------------------
 rare_charm/options/Lc_to_pll_control.py | 188 ++++++++++++++++++++++++
 7 files changed, 225 insertions(+), 181 deletions(-)
 delete mode 100644 rare_charm/._.DS_Store
 delete mode 100644 rare_charm/._info.yaml
 create mode 100644 rare_charm/main_Lc_to_pll_control.py
 create mode 100644 rare_charm/options/Lc_to_pll_control.py

diff --git a/rare_charm/._.DS_Store b/rare_charm/._.DS_Store
deleted file mode 100644
index cb1f0ba4f31de76c88aa8b5e45c4706fffaecfc6..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 4096
zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDJkFz{^v(m+1nBL)UWIhYCu0iY;W;207T
z1eBNu(ZNuGRne&6Xb6mkz-S1JhQMeDjE2By2#kinXb6mkz-S1JhQMeDP&ot`f#!iQ
z7|4ZWWELwFr55Lx7A2=Dq~#Z7D`e)Cq~?`m=I15m<Wwr;q^6Z9B;_RLWdpmqP+dcs
PLiIn~D>4jn|NjF3f4UuX

diff --git a/rare_charm/._info.yaml b/rare_charm/._info.yaml
deleted file mode 100644
index 0f756bdd37f2360438c41f725d75a1d78577905f..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 4096
zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDJkFz{^v(m+1nBL)UWIUt(=a103v0xFS!
z=wMg?WDB5aVFdD_;!?@^xq68O1v#mDIf=z3rNyZ!DTyVi$^pS3J({t9(?Il#($~@;
zdK8R?z-S1JhQMeDjE2By2#kinXb6mkz-S1JhQMeDjD`TN5CC;HK^P3=LNYRo6^c@e
z^Gl18Qx($ki?S6m^GZ_lN;32F5_57Y6>?J3N)(cE67#ZwePO7sAx)wBAMO<y2D$(L
E0c!#(V*mgE

diff --git a/rare_charm/info.yaml b/rare_charm/info.yaml
index 49d756ba6b..4124e5ef0e 100644
--- a/rare_charm/info.yaml
+++ b/rare_charm/info.yaml
@@ -12,11 +12,12 @@ defaults:
 
 {%- set subsamples = [
   "d0_to_hhll",
-  "d_to_hll",
   "d0_to_hhll_control",
+  "d_to_hll",
   "d_to_hll_control",
-  "Lb_to_Lcl",
   "Lc_to_pll",
+  "Lc_to_pll_control",
+  "Lb_to_Lcl",
 ]%}
 
 {%- set datasets = [
diff --git a/rare_charm/main_Lc_to_pll.py b/rare_charm/main_Lc_to_pll.py
index a8dd018d2b..dd2cd0d2de 100644
--- a/rare_charm/main_Lc_to_pll.py
+++ b/rare_charm/main_Lc_to_pll.py
@@ -21,20 +21,12 @@ def main(options: Options):
     rec_summary = get_rec_summary()
 
     tuples = {
-        # baryonic channels
         "Lc2pmumu_OS" : maketuple_Lc2pmumu(options, pvs, rec_summary),
         "Lc2pmumu_SS" : maketuple_Lc2pmumu_SS(options, pvs, rec_summary),
         "Lc2pee_OS"   : maketuple_Lc2pee(options, pvs, rec_summary),
         "Lc2pee_SS"   : maketuple_Lc2pee_SS(options, pvs, rec_summary),
         "Lc2pmue_OS"  : maketuple_Lc2pmue_OS(options, pvs, rec_summary),
         "Lc2pmue_SS"  : maketuple_Lc2pmue_SS(options, pvs, rec_summary),
-        # control channels
-        "Lc2pmumu_WS" : maketuple_Lc2pmumu_WS(options, pvs, rec_summary),
-        "Lc2pee_WS"   : maketuple_Lc2pee_WS(options, pvs, rec_summary),
-        "Lc2pmue_WS"  : maketuple_Lc2pmue_WS(options, pvs, rec_summary),
-        "Lc2ppipi"    : maketuple_Lc2ppipi(options, pvs, rec_summary),
-        "Lc2KSp_LL"   : maketuple_Lc2KSp_LL(options, pvs, rec_summary),
-        "Lc2KSp_DD"   : maketuple_Lc2KSp_DD(options, pvs, rec_summary),
     }
         
     config = make_config(options, tuples)
diff --git a/rare_charm/main_Lc_to_pll_control.py b/rare_charm/main_Lc_to_pll_control.py
new file mode 100644
index 0000000000..aaedef9b36
--- /dev/null
+++ b/rare_charm/main_Lc_to_pll_control.py
@@ -0,0 +1,34 @@
+###############################################################################
+# (c) Copyright 2021-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 .options.Lc_to_pll_control import *
+
+from DaVinci import Options, make_config
+from PyConf.reading import get_pvs, get_rec_summary
+
+def main(options: Options):
+        
+    # get ODIN and DecReports location
+    pvs = get_pvs()
+    rec_summary = get_rec_summary()
+
+    tuples = {
+        "Lc2pmumu_WS" : maketuple_Lc2pmumu_WS(options, pvs, rec_summary),
+        "Lc2pee_WS"   : maketuple_Lc2pee_WS(options, pvs, rec_summary),
+        "Lc2pmue_WS"  : maketuple_Lc2pmue_WS(options, pvs, rec_summary),
+        "Lc2ppipi"    : maketuple_Lc2ppipi(options, pvs, rec_summary),
+        "Lc2KSp_LL"   : maketuple_Lc2KSp_LL(options, pvs, rec_summary),
+        "Lc2KSp_DD"   : maketuple_Lc2KSp_DD(options, pvs, rec_summary),
+    }
+        
+    config = make_config(options, tuples)
+
+    return config
diff --git a/rare_charm/options/Lc_to_pll.py b/rare_charm/options/Lc_to_pll.py
index ccc28afb1e..e04eff8bd2 100644
--- a/rare_charm/options/Lc_to_pll.py
+++ b/rare_charm/options/Lc_to_pll.py
@@ -9,7 +9,6 @@ from .tupling import (
 
 from .rare_charm import (
     make_dtf_variables_pmumu,
-    make_dtf_variables_KSh,
 )
 
 from DaVinci.algorithms import create_lines_filter
@@ -188,173 +187,3 @@ def maketuple_Lc2pmue_SS(options, pvs, rec_summary):
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
 
     return [myfilter, mytuple]
-
-
-#_____________control lines_________________________________________
-
-def maketuple_Lc2pmumu_WS(options, pvs, rec_summary):
-    name = "Lc2pmumu_WS"
-    turbo_line = "Hlt2Charm_LcpToPpMupMup_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Lc"    : "[Lambda_c+ -> (J/psi(1S) -> mu+ mu+) p+]CC",
-        "Jpsi"  : "[Lambda_c+ -> ^(J/psi(1S) -> mu+ mu+) p+]CC",
-        "lp1"   : "[Lambda_c+ -> (J/psi(1S) -> ^mu+ mu+) p+]CC",
-        "lp2"   : "[Lambda_c+ -> (J/psi(1S) -> mu+ ^mu+) p+]CC",
-        "pp"    : "[Lambda_c+ -> (J/psi(1S) -> mu+ mu+) ^p+]CC",
-    }
-
-    variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "lp1"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "lp2"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-
-
-def maketuple_Lc2pee_WS(options, pvs, rec_summary):
-    name = "Lc2pee_WS"
-    turbo_line = "Hlt2Charm_LcpToPpEpEp_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Lc"    : "[Lambda_c+ -> (J/psi(1S) -> e+ e+) p+]CC",
-        "Jpsi"  : "[Lambda_c+ -> ^(J/psi(1S) -> e+ e+) p+]CC",
-        "lp1"   : "[Lambda_c+ -> (J/psi(1S) -> ^e+ e+) p+]CC",
-        "lp2"   : "[Lambda_c+ -> (J/psi(1S) -> e+ ^e+) p+]CC",
-        "pp"    : "[Lambda_c+ -> (J/psi(1S) -> e+ e+) ^p+]CC",
-    }
-
-    variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "lp1"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "lp2"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-
-
-def maketuple_Lc2pmue_WS(options, pvs, rec_summary):
-    name = "Lc2pmue_WS"
-    turbo_line = "Hlt2Charm_LcpToPpMupEp_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Lc"    : "[Lambda_c+ -> (J/psi(1S) -> mu+ e+) p+]CC",
-        "Jpsi"  : "[Lambda_c+ -> ^(J/psi(1S) -> mu+ e+) p+]CC",
-        "lp1"   : "[Lambda_c+ -> (J/psi(1S) -> ^mu+ e+) p+]CC",
-        "lp2"   : "[Lambda_c+ -> (J/psi(1S) -> mu+ ^e+) p+]CC",
-        "pp"    : "[Lambda_c+ -> (J/psi(1S) -> mu+ e+) ^p+]CC",
-    }
-
-    variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "lp1"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "lp2"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-
-
-def maketuple_Lc2ppipi(options, pvs, rec_summary):
-    name = "Lc2ppipi"
-    turbo_line = "Hlt2Charm_LcpToPpPimPip_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Lc"   : "[Lambda_c+ -> (J/psi(1S) -> pi- pi+) p+]CC",
-        "Jpsi" : "[Lambda_c+ -> ^(J/psi(1S) -> pi- pi+) p+]CC",
-        "lm"   : "[Lambda_c+ -> (J/psi(1S) -> ^pi- pi+) p+]CC",
-        "lp"   : "[Lambda_c+ -> (J/psi(1S) -> pi- ^pi+) p+]CC",
-        "pp"   : "[Lambda_c+ -> (J/psi(1S) -> pi- pi+) ^p+]CC",
-    }
-
-    variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "lm"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "lp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-
-
-def maketuple_Lc2KSp_LL(options, pvs, rec_summary):
-    name = "Lc2KSp_LL"
-    turbo_line = "Hlt2Charm_LcpToKsPp_LL_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Lc"    : "[Lambda_c+ -> (KS0 -> pi- pi+) p+]CC",
-        "KS0"   : "[Lambda_c+ -> ^(KS0 -> pi- pi+) p+]CC",
-        "pim"   : "[Lambda_c+ -> (KS0 -> ^pi- pi+) p+]CC",
-        "pip"   : "[Lambda_c+ -> (KS0 -> pi- ^pi+) p+]CC",
-        "pp"    : "[Lambda_c+ -> (KS0 -> pi- pi+) ^p+]CC",
-    }
-
-    variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "composite"),
-        "KS0"    : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "KS0")+make_dtf_variables_KSh(options, pvs, input_data, "composite"),
-        "pim"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-
-
-def maketuple_Lc2KSp_DD(options, pvs, rec_summary):
-    name = "Lc2KSp_DD"
-    turbo_line = "Hlt2Charm_LcpToKsPp_DD_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Lc"    : "[Lambda_c+ -> (KS0 -> pi- pi+) p+]CC",
-        "KS0"   : "[Lambda_c+ -> ^(KS0 -> pi- pi+) p+]CC",
-        "pim"   : "[Lambda_c+ -> (KS0 -> ^pi- pi+) p+]CC",
-        "pip"   : "[Lambda_c+ -> (KS0 -> pi- ^pi+) p+]CC",
-        "pp"   : "[Lambda_c+ -> (KS0 -> pi- pi+) ^p+]CC",
-    }
-
-    variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "composite"),
-        "KS0"    : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "KS0")+make_dtf_variables_KSh(options, pvs, input_data, "composite"),
-        "pim"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
diff --git a/rare_charm/options/Lc_to_pll_control.py b/rare_charm/options/Lc_to_pll_control.py
new file mode 100644
index 0000000000..981e12c315
--- /dev/null
+++ b/rare_charm/options/Lc_to_pll_control.py
@@ -0,0 +1,188 @@
+from .tupling import (
+    make_composite_variables,
+    make_basic_variables,
+    make_hlt2_event_variables,
+    make_basic_isolation_variables,
+    make_intermediate_isolation_variables,
+    make_top_isolation_variables,
+)
+
+from .rare_charm import (
+    make_dtf_variables_pmumu,
+    make_dtf_variables_KSh,
+)
+
+from DaVinci.algorithms import create_lines_filter
+from PyConf.reading import get_particles
+from PyConf.reading import get_particles
+from FunTuple import FunTuple_Particles as Funtuple
+
+
+
+
+def maketuple_Lc2pmumu_WS(options, pvs, rec_summary):
+    name = "Lc2pmumu_WS"
+    turbo_line = "Hlt2Charm_LcpToPpMupMup_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Lc"    : "[Lambda_c+ -> (J/psi(1S) -> mu+ mu+) p+]CC",
+        "Jpsi"  : "[Lambda_c+ -> ^(J/psi(1S) -> mu+ mu+) p+]CC",
+        "lp1"   : "[Lambda_c+ -> (J/psi(1S) -> ^mu+ mu+) p+]CC",
+        "lp2"   : "[Lambda_c+ -> (J/psi(1S) -> mu+ ^mu+) p+]CC",
+        "pp"    : "[Lambda_c+ -> (J/psi(1S) -> mu+ mu+) ^p+]CC",
+    }
+
+    variables = {
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "lp1"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "lp2"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_Lc2pee_WS(options, pvs, rec_summary):
+    name = "Lc2pee_WS"
+    turbo_line = "Hlt2Charm_LcpToPpEpEp_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Lc"    : "[Lambda_c+ -> (J/psi(1S) -> e+ e+) p+]CC",
+        "Jpsi"  : "[Lambda_c+ -> ^(J/psi(1S) -> e+ e+) p+]CC",
+        "lp1"   : "[Lambda_c+ -> (J/psi(1S) -> ^e+ e+) p+]CC",
+        "lp2"   : "[Lambda_c+ -> (J/psi(1S) -> e+ ^e+) p+]CC",
+        "pp"    : "[Lambda_c+ -> (J/psi(1S) -> e+ e+) ^p+]CC",
+    }
+
+    variables = {
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "lp1"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "lp2"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_Lc2pmue_WS(options, pvs, rec_summary):
+    name = "Lc2pmue_WS"
+    turbo_line = "Hlt2Charm_LcpToPpMupEp_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Lc"    : "[Lambda_c+ -> (J/psi(1S) -> mu+ e+) p+]CC",
+        "Jpsi"  : "[Lambda_c+ -> ^(J/psi(1S) -> mu+ e+) p+]CC",
+        "lp1"   : "[Lambda_c+ -> (J/psi(1S) -> ^mu+ e+) p+]CC",
+        "lp2"   : "[Lambda_c+ -> (J/psi(1S) -> mu+ ^e+) p+]CC",
+        "pp"    : "[Lambda_c+ -> (J/psi(1S) -> mu+ e+) ^p+]CC",
+    }
+
+    variables = {
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "lp1"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "lp2"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_Lc2ppipi(options, pvs, rec_summary):
+    name = "Lc2ppipi"
+    turbo_line = "Hlt2Charm_LcpToPpPimPip_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Lc"   : "[Lambda_c+ -> (J/psi(1S) -> pi- pi+) p+]CC",
+        "Jpsi" : "[Lambda_c+ -> ^(J/psi(1S) -> pi- pi+) p+]CC",
+        "lm"   : "[Lambda_c+ -> (J/psi(1S) -> ^pi- pi+) p+]CC",
+        "lp"   : "[Lambda_c+ -> (J/psi(1S) -> pi- ^pi+) p+]CC",
+        "pp"   : "[Lambda_c+ -> (J/psi(1S) -> pi- pi+) ^p+]CC",
+    }
+
+    variables = {
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "lm"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "lp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_Lc2KSp_LL(options, pvs, rec_summary):
+    name = "Lc2KSp_LL"
+    turbo_line = "Hlt2Charm_LcpToKsPp_LL_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Lc"    : "[Lambda_c+ -> (KS0 -> pi- pi+) p+]CC",
+        "KS0"   : "[Lambda_c+ -> ^(KS0 -> pi- pi+) p+]CC",
+        "pim"   : "[Lambda_c+ -> (KS0 -> ^pi- pi+) p+]CC",
+        "pip"   : "[Lambda_c+ -> (KS0 -> pi- ^pi+) p+]CC",
+        "pp"    : "[Lambda_c+ -> (KS0 -> pi- pi+) ^p+]CC",
+    }
+
+    variables = {
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "composite"),
+        "KS0"    : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "KS0")+make_dtf_variables_KSh(options, pvs, input_data, "composite"),
+        "pim"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_Lc2KSp_DD(options, pvs, rec_summary):
+    name = "Lc2KSp_DD"
+    turbo_line = "Hlt2Charm_LcpToKsPp_DD_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Lc"    : "[Lambda_c+ -> (KS0 -> pi- pi+) p+]CC",
+        "KS0"   : "[Lambda_c+ -> ^(KS0 -> pi- pi+) p+]CC",
+        "pim"   : "[Lambda_c+ -> (KS0 -> ^pi- pi+) p+]CC",
+        "pip"   : "[Lambda_c+ -> (KS0 -> pi- ^pi+) p+]CC",
+        "pp"   : "[Lambda_c+ -> (KS0 -> pi- pi+) ^p+]CC",
+    }
+
+    variables = {
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "composite"),
+        "KS0"    : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "KS0")+make_dtf_variables_KSh(options, pvs, input_data, "composite"),
+        "pim"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
-- 
GitLab


From 5bdeff7a7d01fa405f8d79b7af5d093d2b5d2c7d Mon Sep 17 00:00:00 2001
From: Donata Osthues <donata.osthues@cern.ch>
Date: Thu, 21 Nov 2024 16:57:55 +0100
Subject: [PATCH 41/51] delete isolation variables in Lc_to_pll(_control)

---
 rare_charm/options/Lc_to_pll.py         | 60 ++++++++++++-------------
 rare_charm/options/Lc_to_pll_control.py | 56 +++++++++++------------
 2 files changed, 58 insertions(+), 58 deletions(-)

diff --git a/rare_charm/options/Lc_to_pll.py b/rare_charm/options/Lc_to_pll.py
index e04eff8bd2..9cc8ddbbf2 100644
--- a/rare_charm/options/Lc_to_pll.py
+++ b/rare_charm/options/Lc_to_pll.py
@@ -35,11 +35,11 @@ def maketuple_Lc2pmumu(options, pvs, rec_summary):
     }
 
     variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "lm"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "lp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "lp"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
@@ -63,11 +63,11 @@ def maketuple_Lc2pmumu_SS(options, pvs, rec_summary):
     }
 
     variables = {
-        "Lc"    : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "lp1"   : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "lp2"   : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "pm"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "Lc"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "lp1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "lp2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "pm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
@@ -91,11 +91,11 @@ def maketuple_Lc2pee(options, pvs, rec_summary):
     }
 
     variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "lm"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "lp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "lp"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
@@ -119,11 +119,11 @@ def maketuple_Lc2pee_SS(options, pvs, rec_summary):
     }
 
     variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "lp1"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "lp2"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "pm"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "lp1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "lp2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "pm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
@@ -147,11 +147,11 @@ def maketuple_Lc2pmue_OS(options, pvs, rec_summary):
     }
 
     variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "mu"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "e"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "mu"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "e"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
     }
 
 
@@ -176,11 +176,11 @@ def maketuple_Lc2pmue_SS(options, pvs, rec_summary):
     }
 
     variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "l1"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "l2"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "l1"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "l2"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
     }
 
         
diff --git a/rare_charm/options/Lc_to_pll_control.py b/rare_charm/options/Lc_to_pll_control.py
index 981e12c315..14430f1cf3 100644
--- a/rare_charm/options/Lc_to_pll_control.py
+++ b/rare_charm/options/Lc_to_pll_control.py
@@ -36,11 +36,11 @@ def maketuple_Lc2pmumu_WS(options, pvs, rec_summary):
     }
 
     variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "lp1"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "lp2"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "lp1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "lp2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
@@ -64,11 +64,11 @@ def maketuple_Lc2pee_WS(options, pvs, rec_summary):
     }
 
     variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "lp1"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "lp2"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "lp1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "lp2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
@@ -92,11 +92,11 @@ def maketuple_Lc2pmue_WS(options, pvs, rec_summary):
     }
 
     variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "lp1"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "lp2"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "lp1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "lp2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
@@ -120,11 +120,11 @@ def maketuple_Lc2ppipi(options, pvs, rec_summary):
     }
 
     variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "lm"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "lp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "lp"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
@@ -148,11 +148,11 @@ def maketuple_Lc2KSp_LL(options, pvs, rec_summary):
     }
 
     variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "composite"),
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "composite"),
         "KS0"    : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "KS0")+make_dtf_variables_KSh(options, pvs, input_data, "composite"),
-        "pim"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
+        "pim"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
@@ -176,11 +176,11 @@ def maketuple_Lc2KSp_DD(options, pvs, rec_summary):
     }
 
     variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "composite"),
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "composite"),
         "KS0"    : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "KS0")+make_dtf_variables_KSh(options, pvs, input_data, "composite"),
-        "pim"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
+        "pim"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-- 
GitLab


From c4f6b782a8dfb83bdf7cea7a21720fb171fda942 Mon Sep 17 00:00:00 2001
From: Donata Osthues <donata.osthues@cern.ch>
Date: Thu, 21 Nov 2024 17:15:02 +0100
Subject: [PATCH 42/51] removed control channel separation

---
 rare_charm/info.yaml                     |   3 -
 rare_charm/main_Lb_to_Lcl.py             |   1 -
 rare_charm/main_Lc_to_pll.py             |   7 +
 rare_charm/main_Lc_to_pll_control.py     |  34 ---
 rare_charm/main_d0_to_hhll.py            |   8 +
 rare_charm/main_d0_to_hhll_control.py    |  36 ---
 rare_charm/main_d_to_hll.py              |   9 +-
 rare_charm/main_d_to_hll_control.py      |  35 ---
 rare_charm/options/Lb_to_Lcl.py          |   1 +
 rare_charm/options/Lc_to_pll.py          | 181 ++++++++++++++-
 rare_charm/options/Lc_to_pll_control.py  | 188 ----------------
 rare_charm/options/d0_to_hhll.py         | 262 +++++++++++++++++++++-
 rare_charm/options/d0_to_hhll_control.py | 268 -----------------------
 rare_charm/options/d_to_hll.py           | 186 +++++++++++++++-
 rare_charm/options/d_to_hll_control.py   | 194 ----------------
 15 files changed, 639 insertions(+), 774 deletions(-)
 delete mode 100644 rare_charm/main_Lc_to_pll_control.py
 delete mode 100644 rare_charm/main_d0_to_hhll_control.py
 delete mode 100644 rare_charm/main_d_to_hll_control.py
 delete mode 100644 rare_charm/options/Lc_to_pll_control.py
 delete mode 100644 rare_charm/options/d0_to_hhll_control.py
 delete mode 100644 rare_charm/options/d_to_hll_control.py

diff --git a/rare_charm/info.yaml b/rare_charm/info.yaml
index 4124e5ef0e..bc22cc5c74 100644
--- a/rare_charm/info.yaml
+++ b/rare_charm/info.yaml
@@ -12,11 +12,8 @@ defaults:
 
 {%- set subsamples = [
   "d0_to_hhll",
-  "d0_to_hhll_control",
   "d_to_hll",
-  "d_to_hll_control",
   "Lc_to_pll",
-  "Lc_to_pll_control",
   "Lb_to_Lcl",
 ]%}
 
diff --git a/rare_charm/main_Lb_to_Lcl.py b/rare_charm/main_Lb_to_Lcl.py
index b63479a63c..c7b7c2c5ec 100644
--- a/rare_charm/main_Lb_to_Lcl.py
+++ b/rare_charm/main_Lb_to_Lcl.py
@@ -21,7 +21,6 @@ def main(options: Options):
     rec_summary = get_rec_summary()
 
     tuples = {
-        # muonic channels
         "Lc2pmumu"   : maketuple_Lb2Lcmu_Lc2pmumu(options, pvs, rec_summary),
         "Lc2pee"     : maketuple_Lb2Lcmu_Lc2pee(options, pvs, rec_summary),
         "Lc2KSp_LL"  : maketuple_Lb2Lcmu_Lc2KSp_LL(options, pvs, rec_summary),
diff --git a/rare_charm/main_Lc_to_pll.py b/rare_charm/main_Lc_to_pll.py
index dd2cd0d2de..3b50668aef 100644
--- a/rare_charm/main_Lc_to_pll.py
+++ b/rare_charm/main_Lc_to_pll.py
@@ -27,6 +27,13 @@ def main(options: Options):
         "Lc2pee_SS"   : maketuple_Lc2pee_SS(options, pvs, rec_summary),
         "Lc2pmue_OS"  : maketuple_Lc2pmue_OS(options, pvs, rec_summary),
         "Lc2pmue_SS"  : maketuple_Lc2pmue_SS(options, pvs, rec_summary),
+        # control channels
+        "Lc2pmumu_WS" : maketuple_Lc2pmumu_WS(options, pvs, rec_summary),
+        "Lc2pee_WS"   : maketuple_Lc2pee_WS(options, pvs, rec_summary),
+        "Lc2pmue_WS"  : maketuple_Lc2pmue_WS(options, pvs, rec_summary),
+        "Lc2ppipi"    : maketuple_Lc2ppipi(options, pvs, rec_summary),
+        "Lc2KSp_LL"   : maketuple_Lc2KSp_LL(options, pvs, rec_summary),
+        "Lc2KSp_DD"   : maketuple_Lc2KSp_DD(options, pvs, rec_summary),
     }
         
     config = make_config(options, tuples)
diff --git a/rare_charm/main_Lc_to_pll_control.py b/rare_charm/main_Lc_to_pll_control.py
deleted file mode 100644
index aaedef9b36..0000000000
--- a/rare_charm/main_Lc_to_pll_control.py
+++ /dev/null
@@ -1,34 +0,0 @@
-###############################################################################
-# (c) Copyright 2021-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 .options.Lc_to_pll_control import *
-
-from DaVinci import Options, make_config
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-        
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-        "Lc2pmumu_WS" : maketuple_Lc2pmumu_WS(options, pvs, rec_summary),
-        "Lc2pee_WS"   : maketuple_Lc2pee_WS(options, pvs, rec_summary),
-        "Lc2pmue_WS"  : maketuple_Lc2pmue_WS(options, pvs, rec_summary),
-        "Lc2ppipi"    : maketuple_Lc2ppipi(options, pvs, rec_summary),
-        "Lc2KSp_LL"   : maketuple_Lc2KSp_LL(options, pvs, rec_summary),
-        "Lc2KSp_DD"   : maketuple_Lc2KSp_DD(options, pvs, rec_summary),
-    }
-        
-    config = make_config(options, tuples)
-
-    return config
diff --git a/rare_charm/main_d0_to_hhll.py b/rare_charm/main_d0_to_hhll.py
index 0516c20708..9def1684bf 100644
--- a/rare_charm/main_d0_to_hhll.py
+++ b/rare_charm/main_d0_to_hhll.py
@@ -26,6 +26,14 @@ def main(options: Options):
         "Dst2D0pi_D02Kpimumu_RS" : maketuple_Dst2D0pi_D02Kpimumu_RS(options, pvs, rec_summary),
         "Dst2D0pi_D02Kpimumu_WS" : maketuple_Dst2D0pi_D02Kpimumu_WS(options, pvs, rec_summary),
         "D02Kpimumu"             : maketuple_D02Kpimumu(options, pvs, rec_summary),
+        # control channels
+        "DstToD0pi_D0ToKKPiPi"     : maketuple_DstToD0pi_D0ToKKPiPi(options, pvs, rec_summary),
+        "DstToD0pi_D0ToKPiPiPi_RS" : maketuple_DstToD0pi_D0ToKPiPiPi_RS(options, pvs, rec_summary),
+        "DstToD0pi_D0ToKPiPiPi_WS" : maketuple_DstToD0pi_D0ToKPiPiPi_WS(options, pvs, rec_summary),
+        "DstToD0pi_D0ToPiPiPiPi"   : maketuple_DstToD0pi_D0ToPiPiPiPi(options, pvs, rec_summary),
+        "Dst2D0pi_D02pipimumu_WS"  : maketuple_Dst2D0pi_D02pipimumu_WS(options, pvs, rec_summary),
+        "Dst2D0pi_D02KKmumu_WS"    : maketuple_Dst2D0pi_D02KKmumu_WS(options, pvs, rec_summary),
+        "Dst2D0pi_D02Kpimumu_WS"   : maketuple_Dst2D0pi_D02Kpimumu_WS(options, pvs, rec_summary),
     }
  
     config = make_config(options, tuples)
diff --git a/rare_charm/main_d0_to_hhll_control.py b/rare_charm/main_d0_to_hhll_control.py
deleted file mode 100644
index f4f64b3ed9..0000000000
--- a/rare_charm/main_d0_to_hhll_control.py
+++ /dev/null
@@ -1,36 +0,0 @@
-###############################################################################
-# (c) Copyright 2021-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 .options.d0_to_hhll_control import *
-
-from DaVinci import Options, make_config
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-        
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-        "DstToD0pi_D0ToKKPiPi"     : maketuple_DstToD0pi_D0ToKKPiPi(options, pvs, rec_summary),
-        "DstToD0pi_D0ToKPiPiPi_RS" : maketuple_DstToD0pi_D0ToKPiPiPi_RS(options, pvs, rec_summary),
-        "DstToD0pi_D0ToKPiPiPi_WS" : maketuple_DstToD0pi_D0ToKPiPiPi_WS(options, pvs, rec_summary),
-        "DstToD0pi_D0ToPiPiPiPi"   : maketuple_DstToD0pi_D0ToPiPiPiPi(options, pvs, rec_summary),
-        "Dst2D0pi_D02pipimumu_WS"  : maketuple_Dst2D0pi_D02pipimumu_WS(options, pvs, rec_summary),
-        "Dst2D0pi_D02KKmumu_WS"    : maketuple_Dst2D0pi_D02KKmumu_WS(options, pvs, rec_summary),
-        "Dst2D0pi_D02Kpimumu_WS"   : maketuple_Dst2D0pi_D02Kpimumu_WS(options, pvs, rec_summary),
-    }
-
-        
-    config = make_config(options, tuples)
-
-    return config
diff --git a/rare_charm/main_d_to_hll.py b/rare_charm/main_d_to_hll.py
index 53d0fb9263..f7841c2c67 100644
--- a/rare_charm/main_d_to_hll.py
+++ b/rare_charm/main_d_to_hll.py
@@ -21,16 +21,21 @@ def main(options: Options):
     rec_summary = get_rec_summary()
 
     tuples = {
-        # muonic channels
         "D2pimumu_OS" : maketuple_D2pimumu_OS(options, pvs, rec_summary),
         "D2pimumu_SS" : maketuple_D2pimumu_SS(options, pvs, rec_summary),
         "D2Kmumu_OS"  : maketuple_D2Kmumu_OS(options, pvs, rec_summary),
         "D2Kmumu_SS"  : maketuple_D2Kmumu_SS(options, pvs, rec_summary),
-
         "D2piee_OS"  : maketuple_D2piee_OS(options, pvs, rec_summary),
         "D2piee_SS"  : maketuple_D2piee_SS(options, pvs, rec_summary),
         "D2Kee_SS"   : maketuple_D2Kee_OS(options, pvs, rec_summary),
         "D2Kee_OS"   : maketuple_D2Kee_SS(options, pvs, rec_summary),
+        # control channels
+        "D2pimumu_WS" : maketuple_D2pimumu_WS(options, pvs, rec_summary),
+        "D2Kmumu_WS"  : maketuple_D2Kmumu_WS(options, pvs, rec_summary),
+        "D2Kpipi"     : maketuple_D2Kpipi(options, pvs, rec_summary),
+        "D2pipipi"    : maketuple_D2pipipi(options, pvs, rec_summary),
+        "D2KSK_LL"    : maketuple_D2KSK_LL(options, pvs, rec_summary),
+        "D2KSpi_LL"   : maketuple_D2KSpi_LL(options, pvs, rec_summary),
     }
         
     config = make_config(options, tuples)
diff --git a/rare_charm/main_d_to_hll_control.py b/rare_charm/main_d_to_hll_control.py
deleted file mode 100644
index eea3db55da..0000000000
--- a/rare_charm/main_d_to_hll_control.py
+++ /dev/null
@@ -1,35 +0,0 @@
-###############################################################################
-# (c) Copyright 2021-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 .options.d_to_hll_control import *
-
-from DaVinci import Options, make_config
-from PyConf.reading import get_pvs, get_rec_summary
-
-def main(options: Options):
-        
-    # get ODIN and DecReports location
-    pvs = get_pvs()
-    rec_summary = get_rec_summary()
-
-    tuples = {
-        "D2pimumu_WS" : maketuple_D2pimumu_WS(options, pvs, rec_summary),
-        "D2Kmumu_WS"  : maketuple_D2Kmumu_WS(options, pvs, rec_summary),
-        "D2Kpipi"     : maketuple_D2Kpipi(options, pvs, rec_summary),
-        "D2pipipi"    : maketuple_D2pipipi(options, pvs, rec_summary),
-        "D2KSK_LL"    : maketuple_D2KSK_LL(options, pvs, rec_summary),
-        "D2KSpi_LL"   : maketuple_D2KSpi_LL(options, pvs, rec_summary),
-
-    }
-        
-    config = make_config(options, tuples)
-
-    return config
\ No newline at end of file
diff --git a/rare_charm/options/Lb_to_Lcl.py b/rare_charm/options/Lb_to_Lcl.py
index 38e10c3ecd..7eca718833 100644
--- a/rare_charm/options/Lb_to_Lcl.py
+++ b/rare_charm/options/Lb_to_Lcl.py
@@ -19,6 +19,7 @@ import FunTuple.functorcollections as FC
 from FunTuple import FunTuple_Particles as Funtuple
 
 
+
 def maketuple_Lb2Lcmu_Lc2pmumu(options, pvs, rec_summary):
     name = "Lb2Lcmu_Lc2pmumu"
     turbo_line = "Hlt2Charm_B2LcpMum_LcpToPpMumMup"
diff --git a/rare_charm/options/Lc_to_pll.py b/rare_charm/options/Lc_to_pll.py
index 9cc8ddbbf2..3cad92879b 100644
--- a/rare_charm/options/Lc_to_pll.py
+++ b/rare_charm/options/Lc_to_pll.py
@@ -2,15 +2,12 @@ from .tupling import (
     make_composite_variables,
     make_basic_variables,
     make_hlt2_event_variables,
-    make_basic_isolation_variables,
     make_intermediate_isolation_variables,
-    make_top_isolation_variables,
 )
-
 from .rare_charm import (
     make_dtf_variables_pmumu,
+    make_dtf_variables_KSh,
 )
-
 from DaVinci.algorithms import create_lines_filter
 from PyConf.reading import get_particles
 from PyConf.reading import get_particles
@@ -18,7 +15,6 @@ from FunTuple import FunTuple_Particles as Funtuple
 
 
 
-
 def maketuple_Lc2pmumu(options, pvs, rec_summary):
     name = "Lc2pmumu"
     turbo_line = "Hlt2Charm_LcpToPpMumMup"
@@ -187,3 +183,178 @@ def maketuple_Lc2pmue_SS(options, pvs, rec_summary):
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
 
     return [myfilter, mytuple]
+
+
+
+######################################################################################################################
+################################################## control channels ################################################## 
+######################################################################################################################
+
+
+
+def maketuple_Lc2pmumu_WS(options, pvs, rec_summary):
+    name = "Lc2pmumu_WS"
+    turbo_line = "Hlt2Charm_LcpToPpMupMup_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Lc"    : "[Lambda_c+ -> (J/psi(1S) -> mu+ mu+) p+]CC",
+        "Jpsi"  : "[Lambda_c+ -> ^(J/psi(1S) -> mu+ mu+) p+]CC",
+        "lp1"   : "[Lambda_c+ -> (J/psi(1S) -> ^mu+ mu+) p+]CC",
+        "lp2"   : "[Lambda_c+ -> (J/psi(1S) -> mu+ ^mu+) p+]CC",
+        "pp"    : "[Lambda_c+ -> (J/psi(1S) -> mu+ mu+) ^p+]CC",
+    }
+
+    variables = {
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "lp1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "lp2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_Lc2pee_WS(options, pvs, rec_summary):
+    name = "Lc2pee_WS"
+    turbo_line = "Hlt2Charm_LcpToPpEpEp_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Lc"    : "[Lambda_c+ -> (J/psi(1S) -> e+ e+) p+]CC",
+        "Jpsi"  : "[Lambda_c+ -> ^(J/psi(1S) -> e+ e+) p+]CC",
+        "lp1"   : "[Lambda_c+ -> (J/psi(1S) -> ^e+ e+) p+]CC",
+        "lp2"   : "[Lambda_c+ -> (J/psi(1S) -> e+ ^e+) p+]CC",
+        "pp"    : "[Lambda_c+ -> (J/psi(1S) -> e+ e+) ^p+]CC",
+    }
+
+    variables = {
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "lp1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "lp2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_Lc2pmue_WS(options, pvs, rec_summary):
+    name = "Lc2pmue_WS"
+    turbo_line = "Hlt2Charm_LcpToPpMupEp_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Lc"    : "[Lambda_c+ -> (J/psi(1S) -> mu+ e+) p+]CC",
+        "Jpsi"  : "[Lambda_c+ -> ^(J/psi(1S) -> mu+ e+) p+]CC",
+        "lp1"   : "[Lambda_c+ -> (J/psi(1S) -> ^mu+ e+) p+]CC",
+        "lp2"   : "[Lambda_c+ -> (J/psi(1S) -> mu+ ^e+) p+]CC",
+        "pp"    : "[Lambda_c+ -> (J/psi(1S) -> mu+ e+) ^p+]CC",
+    }
+
+    variables = {
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "lp1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "lp2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_Lc2ppipi(options, pvs, rec_summary):
+    name = "Lc2ppipi"
+    turbo_line = "Hlt2Charm_LcpToPpPimPip_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Lc"   : "[Lambda_c+ -> (J/psi(1S) -> pi- pi+) p+]CC",
+        "Jpsi" : "[Lambda_c+ -> ^(J/psi(1S) -> pi- pi+) p+]CC",
+        "lm"   : "[Lambda_c+ -> (J/psi(1S) -> ^pi- pi+) p+]CC",
+        "lp"   : "[Lambda_c+ -> (J/psi(1S) -> pi- ^pi+) p+]CC",
+        "pp"   : "[Lambda_c+ -> (J/psi(1S) -> pi- pi+) ^p+]CC",
+    }
+
+    variables = {
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "lp"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_Lc2KSp_LL(options, pvs, rec_summary):
+    name = "Lc2KSp_LL"
+    turbo_line = "Hlt2Charm_LcpToKsPp_LL_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Lc"    : "[Lambda_c+ -> (KS0 -> pi- pi+) p+]CC",
+        "KS0"   : "[Lambda_c+ -> ^(KS0 -> pi- pi+) p+]CC",
+        "pim"   : "[Lambda_c+ -> (KS0 -> ^pi- pi+) p+]CC",
+        "pip"   : "[Lambda_c+ -> (KS0 -> pi- ^pi+) p+]CC",
+        "pp"    : "[Lambda_c+ -> (KS0 -> pi- pi+) ^p+]CC",
+    }
+
+    variables = {
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "composite"),
+        "KS0"    : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "KS0")+make_dtf_variables_KSh(options, pvs, input_data, "composite"),
+        "pim"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_Lc2KSp_DD(options, pvs, rec_summary):
+    name = "Lc2KSp_DD"
+    turbo_line = "Hlt2Charm_LcpToKsPp_DD_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Lc"    : "[Lambda_c+ -> (KS0 -> pi- pi+) p+]CC",
+        "KS0"   : "[Lambda_c+ -> ^(KS0 -> pi- pi+) p+]CC",
+        "pim"   : "[Lambda_c+ -> (KS0 -> ^pi- pi+) p+]CC",
+        "pip"   : "[Lambda_c+ -> (KS0 -> pi- ^pi+) p+]CC",
+        "pp"   : "[Lambda_c+ -> (KS0 -> pi- pi+) ^p+]CC",
+    }
+
+    variables = {
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "composite"),
+        "KS0"    : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "KS0")+make_dtf_variables_KSh(options, pvs, input_data, "composite"),
+        "pim"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
diff --git a/rare_charm/options/Lc_to_pll_control.py b/rare_charm/options/Lc_to_pll_control.py
deleted file mode 100644
index 14430f1cf3..0000000000
--- a/rare_charm/options/Lc_to_pll_control.py
+++ /dev/null
@@ -1,188 +0,0 @@
-from .tupling import (
-    make_composite_variables,
-    make_basic_variables,
-    make_hlt2_event_variables,
-    make_basic_isolation_variables,
-    make_intermediate_isolation_variables,
-    make_top_isolation_variables,
-)
-
-from .rare_charm import (
-    make_dtf_variables_pmumu,
-    make_dtf_variables_KSh,
-)
-
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from PyConf.reading import get_particles
-from FunTuple import FunTuple_Particles as Funtuple
-
-
-
-
-def maketuple_Lc2pmumu_WS(options, pvs, rec_summary):
-    name = "Lc2pmumu_WS"
-    turbo_line = "Hlt2Charm_LcpToPpMupMup_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Lc"    : "[Lambda_c+ -> (J/psi(1S) -> mu+ mu+) p+]CC",
-        "Jpsi"  : "[Lambda_c+ -> ^(J/psi(1S) -> mu+ mu+) p+]CC",
-        "lp1"   : "[Lambda_c+ -> (J/psi(1S) -> ^mu+ mu+) p+]CC",
-        "lp2"   : "[Lambda_c+ -> (J/psi(1S) -> mu+ ^mu+) p+]CC",
-        "pp"    : "[Lambda_c+ -> (J/psi(1S) -> mu+ mu+) ^p+]CC",
-    }
-
-    variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "lp1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "lp2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-
-
-def maketuple_Lc2pee_WS(options, pvs, rec_summary):
-    name = "Lc2pee_WS"
-    turbo_line = "Hlt2Charm_LcpToPpEpEp_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Lc"    : "[Lambda_c+ -> (J/psi(1S) -> e+ e+) p+]CC",
-        "Jpsi"  : "[Lambda_c+ -> ^(J/psi(1S) -> e+ e+) p+]CC",
-        "lp1"   : "[Lambda_c+ -> (J/psi(1S) -> ^e+ e+) p+]CC",
-        "lp2"   : "[Lambda_c+ -> (J/psi(1S) -> e+ ^e+) p+]CC",
-        "pp"    : "[Lambda_c+ -> (J/psi(1S) -> e+ e+) ^p+]CC",
-    }
-
-    variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "lp1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "lp2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-
-
-def maketuple_Lc2pmue_WS(options, pvs, rec_summary):
-    name = "Lc2pmue_WS"
-    turbo_line = "Hlt2Charm_LcpToPpMupEp_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Lc"    : "[Lambda_c+ -> (J/psi(1S) -> mu+ e+) p+]CC",
-        "Jpsi"  : "[Lambda_c+ -> ^(J/psi(1S) -> mu+ e+) p+]CC",
-        "lp1"   : "[Lambda_c+ -> (J/psi(1S) -> ^mu+ e+) p+]CC",
-        "lp2"   : "[Lambda_c+ -> (J/psi(1S) -> mu+ ^e+) p+]CC",
-        "pp"    : "[Lambda_c+ -> (J/psi(1S) -> mu+ e+) ^p+]CC",
-    }
-
-    variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "lp1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "lp2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-
-
-def maketuple_Lc2ppipi(options, pvs, rec_summary):
-    name = "Lc2ppipi"
-    turbo_line = "Hlt2Charm_LcpToPpPimPip_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Lc"   : "[Lambda_c+ -> (J/psi(1S) -> pi- pi+) p+]CC",
-        "Jpsi" : "[Lambda_c+ -> ^(J/psi(1S) -> pi- pi+) p+]CC",
-        "lm"   : "[Lambda_c+ -> (J/psi(1S) -> ^pi- pi+) p+]CC",
-        "lp"   : "[Lambda_c+ -> (J/psi(1S) -> pi- ^pi+) p+]CC",
-        "pp"   : "[Lambda_c+ -> (J/psi(1S) -> pi- pi+) ^p+]CC",
-    }
-
-    variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "lp"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-
-
-def maketuple_Lc2KSp_LL(options, pvs, rec_summary):
-    name = "Lc2KSp_LL"
-    turbo_line = "Hlt2Charm_LcpToKsPp_LL_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Lc"    : "[Lambda_c+ -> (KS0 -> pi- pi+) p+]CC",
-        "KS0"   : "[Lambda_c+ -> ^(KS0 -> pi- pi+) p+]CC",
-        "pim"   : "[Lambda_c+ -> (KS0 -> ^pi- pi+) p+]CC",
-        "pip"   : "[Lambda_c+ -> (KS0 -> pi- ^pi+) p+]CC",
-        "pp"    : "[Lambda_c+ -> (KS0 -> pi- pi+) ^p+]CC",
-    }
-
-    variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "composite"),
-        "KS0"    : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "KS0")+make_dtf_variables_KSh(options, pvs, input_data, "composite"),
-        "pim"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-
-
-def maketuple_Lc2KSp_DD(options, pvs, rec_summary):
-    name = "Lc2KSp_DD"
-    turbo_line = "Hlt2Charm_LcpToKsPp_DD_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Lc"    : "[Lambda_c+ -> (KS0 -> pi- pi+) p+]CC",
-        "KS0"   : "[Lambda_c+ -> ^(KS0 -> pi- pi+) p+]CC",
-        "pim"   : "[Lambda_c+ -> (KS0 -> ^pi- pi+) p+]CC",
-        "pip"   : "[Lambda_c+ -> (KS0 -> pi- ^pi+) p+]CC",
-        "pp"   : "[Lambda_c+ -> (KS0 -> pi- pi+) ^p+]CC",
-    }
-
-    variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "composite"),
-        "KS0"    : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "KS0")+make_dtf_variables_KSh(options, pvs, input_data, "composite"),
-        "pim"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
diff --git a/rare_charm/options/d0_to_hhll.py b/rare_charm/options/d0_to_hhll.py
index 40f18e4781..58351257be 100644
--- a/rare_charm/options/d0_to_hhll.py
+++ b/rare_charm/options/d0_to_hhll.py
@@ -8,21 +8,15 @@ from .tupling import (
     make_intermediate_isolation_variables,
     make_top_isolation_variables,
 )
-
 from .rare_charm import (
     make_dtf_variables_hhmumu,
 )
-
 from DaVinci.algorithms import create_lines_filter
 from PyConf.reading import get_particles
 from FunTuple import FunTuple_Particles as Funtuple
 
 
 
-
-#______________________ muon channels ______________________________________________________________________________________________________________
-
-
 def maketuple_Dst2D0pi_D02pipimumu(options, pvs, rec_summary):
     name = "Dst2D0pi_D02pipimumu"
     turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimPipMumMup"
@@ -186,3 +180,259 @@ def maketuple_D02Kpimumu(options, pvs, rec_summary):
 
     return [myfilter, mytuple]
 
+
+
+######################################################################################################################
+################################################## control channels ################################################## 
+######################################################################################################################
+
+
+
+def maketuple_DstToD0pi_D0ToKKPiPi(options, pvs, rec_summary):
+    name = "DstToD0pi_D0ToKKPiPi"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmKpPimPip_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst"   : "[D*(2010)+ -> ([D0]CC -> K- K+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "D0"    : "[D*(2010)+ -> ^([D0]CC -> K- K+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "Km"    : "[D*(2010)+ -> ([D0]CC -> ^K- K+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "Kp"    : "[D*(2010)+ -> ([D0]CC -> K- ^K+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "Jpsi"  : "[D*(2010)+ -> ([D0]CC -> K- K+ ^(J/psi(1S) -> pi- pi+)) pi+]CC",
+        "lm"    : "[D*(2010)+ -> ([D0]CC -> K- K+ (J/psi(1S) -> ^pi- pi+)) pi+]CC",
+        "lp"    : "[D*(2010)+ -> ([D0]CC -> K- K+ (J/psi(1S) -> pi- ^pi+)) pi+]CC",
+        "spip"  : "[D*(2010)+ -> ([D0]CC -> K- K+ (J/psi(1S) -> pi- pi+)) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
+        "Km"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+
+
+def maketuple_DstToD0pi_D0ToKPiPiPi_RS(options, pvs, rec_summary):
+    name = "DstToD0pi_D0ToKPiPiPi_RS"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPimPipPip_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst"   : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "D0"    : "[D*(2010)+ -> ^(D0 -> K- pi+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "Km"    : "[D*(2010)+ -> (D0 -> ^K- pi+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "pip"   : "[D*(2010)+ -> (D0 -> K- ^pi+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "Jpsi"  : "[D*(2010)+ -> (D0 -> K- pi+ ^(J/psi(1S) -> pi- pi+)) pi+]CC",
+        "lm"    : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> ^pi- pi+)) pi+]CC",
+        "lp"    : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> pi- ^pi+)) pi+]CC",
+        "spip"  : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> pi- pi+)) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
+        "Km"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_DstToD0pi_D0ToKPiPiPi_WS(options, pvs, rec_summary):
+    name = "DstToD0pi_D0ToKPiPiPi_WS"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKpPimPimPip_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst"   : "[D*(2010)+ -> (D0 -> pi- K+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "D0"    : "[D*(2010)+ -> ^(D0 -> pi- K+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "pim"   : "[D*(2010)+ -> (D0 -> ^pi- K+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "Kp"    : "[D*(2010)+ -> (D0 -> pi- ^K+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "Jpsi"  : "[D*(2010)+ -> (D0 -> pi- K+ ^(J/psi(1S) -> pi- pi+)) pi+]CC",
+        "lm"    : "[D*(2010)+ -> (D0 -> pi- K+ (J/psi(1S) -> ^pi- pi+)) pi+]CC",
+        "lp"    : "[D*(2010)+ -> (D0 -> pi- K+ (J/psi(1S) -> pi- ^pi+)) pi+]CC",
+        "spip"  : "[D*(2010)+ -> (D0 -> pi- K+ (J/psi(1S) -> pi- pi+)) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
+        "pim"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_DstToD0pi_D0ToPiPiPiPi(options, pvs, rec_summary):
+    name = "DstToD0pi_D0ToPiPiPiPi"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimPimPipPip_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst"   : "[D*(2010)+ -> ([D0]CC -> pi- pi+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "D0"    : "[D*(2010)+ -> ^([D0]CC -> pi- pi+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "pim"   : "[D*(2010)+ -> ([D0]CC -> ^pi- pi+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "pip"   : "[D*(2010)+ -> ([D0]CC -> pi- ^pi+ (J/psi(1S) -> pi- pi+)) pi+]CC",
+        "Jpsi"  : "[D*(2010)+ -> ([D0]CC -> pi- pi+ ^(J/psi(1S) -> pi- pi+)) pi+]CC",
+        "lm"    : "[D*(2010)+ -> ([D0]CC -> pi- pi+ (J/psi(1S) -> ^pi- pi+)) pi+]CC",
+        "lp"    : "[D*(2010)+ -> ([D0]CC -> pi- pi+ (J/psi(1S) -> pi- ^pi+)) pi+]CC",
+        "spip"  : "[D*(2010)+ -> ([D0]CC -> pi- pi+ (J/psi(1S) -> pi- pi+)) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
+        "pim"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+
+
+
+def maketuple_Dst2D0pi_D02pipimumu_WS(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02pipimumu_WS"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimpPimpMumpMump_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst"   : "[D*(2010)+ -> ([D0]CC -> [pi+]CC [pi+]CC (J/psi(1S) -> [mu+]CC [mu+]CC)) pi+]CC",
+        "D0"    : "[D*(2010)+ -> ^([D0]CC -> [pi+]CC [pi+]CC (J/psi(1S) -> [mu+]CC [mu+]CC)) pi+]CC",
+        "h1"    : "[D*(2010)+ -> ([D0]CC -> ^[pi+]CC [pi+]CC (J/psi(1S) -> [mu+]CC [mu+]CC)) pi+]CC",
+        "h2"    : "[D*(2010)+ -> ([D0]CC -> [pi+]CC ^[pi+]CC (J/psi(1S) -> [mu+]CC [mu+]CC)) pi+]CC",
+        "Jpsi"  : "[D*(2010)+ -> ([D0]CC -> [pi+]CC [pi+]CC ^(J/psi(1S) -> [mu+]CC [mu+]CC)) pi+]CC",
+        "l1"    : "[D*(2010)+ -> ([D0]CC -> [pi+]CC [pi+]CC (J/psi(1S) -> ^[mu+]CC [mu+]CC)) pi+]CC",
+        "l2"    : "[D*(2010)+ -> ([D0]CC -> [pi+]CC [pi+]CC (J/psi(1S) -> [mu+]CC ^[mu+]CC)) pi+]CC",
+        "spip"  : "[D*(2010)+ -> ([D0]CC -> [pi+]CC [pi+]CC (J/psi(1S) -> [mu+]CC [mu+]CC)) ^pi+]CC",
+    }
+    
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
+        "h1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "h2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "l1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "l2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+
+
+def maketuple_Dst2D0pi_D02KKmumu_WS(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02KKmumu_WS"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmpKmpMumpMump_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dst"   : "[D*(2010)+ -> ([D0]CC -> [K+]CC [K+]CC (J/psi(1S) -> [mu+]CC [mu+]CC)) pi+]CC",
+        "D0"    : "[D*(2010)+ -> ^([D0]CC -> [K+]CC [K+]CC (J/psi(1S) -> [mu+]CC [mu+]CC)) pi+]CC",
+        "h1"    : "[D*(2010)+ -> ([D0]CC -> ^[K+]CC [K+]CC (J/psi(1S) -> [mu+]CC [mu+]CC)) pi+]CC",
+        "h2"    : "[D*(2010)+ -> ([D0]CC -> [K+]CC ^[K+]CC (J/psi(1S) -> [mu+]CC [mu+]CC)) pi+]CC",
+        "Jpsi"  : "[D*(2010)+ -> ([D0]CC -> [K+]CC [K+]CC ^(J/psi(1S) -> [mu+]CC [mu+]CC)) pi+]CC",
+        "l1"    : "[D*(2010)+ -> ([D0]CC -> [K+]CC [K+]CC (J/psi(1S) -> ^[mu+]CC [mu+]CC)) pi+]CC",
+        "l2"    : "[D*(2010)+ -> ([D0]CC -> [K+]CC [K+]CC (J/psi(1S) -> [mu+]CC ^[mu+]CC)) pi+]CC",
+        "spip"  : "[D*(2010)+ -> ([D0]CC -> [K+]CC [K+]CC (J/psi(1S) -> [mu+]CC [mu+]CC)) ^pi+]CC",
+    }
+    
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
+        "h1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "h2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "l1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "l2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+    }
+    
+
+    
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_Dst2D0pi_D02Kpimumu_WS(options, pvs, rec_summary):
+    name = "Dst2D0pi_D02Kpimumu_WS"
+    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmpPimpMumpMump_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+
+    branches = {
+        "Dst"   : "[D*(2010)+ -> ([D0]CC -> [K+]CC [pi+]CC (J/psi(1S) -> [mu+]CC [mu+]CC)) pi+]CC",
+        "D0"    : "[D*(2010)+ -> ^([D0]CC -> [K+]CC [pi+]CC (J/psi(1S) -> [mu+]CC [mu+]CC)) pi+]CC",
+        "h1"    : "[D*(2010)+ -> ([D0]CC -> ^[K+]CC [pi+]CC (J/psi(1S) -> [mu+]CC [mu+]CC)) pi+]CC",
+        "h2"    : "[D*(2010)+ -> ([D0]CC -> [K+]CC ^[pi+]CC (J/psi(1S) -> [mu+]CC [mu+]CC)) pi+]CC",
+        "Jpsi"  : "[D*(2010)+ -> ([D0]CC -> [K+]CC [pi+]CC ^(J/psi(1S) -> [mu+]CC [mu+]CC)) pi+]CC",
+        "l1"    : "[D*(2010)+ -> ([D0]CC -> [K+]CC [pi+]CC (J/psi(1S) -> ^[mu+]CC [mu+]CC)) pi+]CC",
+        "l2"    : "[D*(2010)+ -> ([D0]CC -> [K+]CC [pi+]CC (J/psi(1S) -> [mu+]CC ^[mu+]CC)) pi+]CC",
+        "spip"  : "[D*(2010)+ -> ([D0]CC -> [K+]CC [pi+]CC (J/psi(1S) -> [mu+]CC [mu+]CC)) ^pi+]CC",
+    }
+
+    variables = {
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
+        "h1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "h2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "l1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "l2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+    }
+    
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
+
+    return [myfilter, mytuple]
diff --git a/rare_charm/options/d0_to_hhll_control.py b/rare_charm/options/d0_to_hhll_control.py
deleted file mode 100644
index d8cb625b01..0000000000
--- a/rare_charm/options/d0_to_hhll_control.py
+++ /dev/null
@@ -1,268 +0,0 @@
-from .tupling import (
-    make_composite_variables,
-    make_composite_variables_3body,
-    make_basic_variables,
-    make_hlt2_event_variables,
-    make_basic_isolation_variables,
-    make_intermediate_isolation_variables,
-    make_top_isolation_variables,
-    make_DeltaM_variable,
-)
-
-from .rare_charm import (
-    make_dtf_variables_hhmumu,
-)
-
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunTuple_Particles as Funtuple
-
-
-def maketuple_DstToD0pi_D0ToKKPiPi(options, pvs, rec_summary):
-    name = "DstToD0pi_D0ToKKPiPi"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmKpPimPip_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst"   : "[D*(2010)+ -> ([D0]CC -> K- K+ (J/psi(1S) -> pi- pi+)) pi+]CC",
-        "D0"    : "[D*(2010)+ -> ^([D0]CC -> K- K+ (J/psi(1S) -> pi- pi+)) pi+]CC",
-        "Km"    : "[D*(2010)+ -> ([D0]CC -> ^K- K+ (J/psi(1S) -> pi- pi+)) pi+]CC",
-        "Kp"    : "[D*(2010)+ -> ([D0]CC -> K- ^K+ (J/psi(1S) -> pi- pi+)) pi+]CC",
-        "Jpsi"  : "[D*(2010)+ -> ([D0]CC -> K- K+ ^(J/psi(1S) -> pi- pi+)) pi+]CC",
-        "lm"    : "[D*(2010)+ -> ([D0]CC -> K- K+ (J/psi(1S) -> ^pi- pi+)) pi+]CC",
-        "lp"    : "[D*(2010)+ -> ([D0]CC -> K- K+ (J/psi(1S) -> pi- ^pi+)) pi+]CC",
-        "spip"  : "[D*(2010)+ -> ([D0]CC -> K- K+ (J/psi(1S) -> pi- pi+)) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
-        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
-        "Km"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-    }
-
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-
-
-def maketuple_DstToD0pi_D0ToKPiPiPi_RS(options, pvs, rec_summary):
-    name = "DstToD0pi_D0ToKPiPiPi_RS"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmPimPipPip_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst"   : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> pi- pi+)) pi+]CC",
-        "D0"    : "[D*(2010)+ -> ^(D0 -> K- pi+ (J/psi(1S) -> pi- pi+)) pi+]CC",
-        "Km"    : "[D*(2010)+ -> (D0 -> ^K- pi+ (J/psi(1S) -> pi- pi+)) pi+]CC",
-        "pip"   : "[D*(2010)+ -> (D0 -> K- ^pi+ (J/psi(1S) -> pi- pi+)) pi+]CC",
-        "Jpsi"  : "[D*(2010)+ -> (D0 -> K- pi+ ^(J/psi(1S) -> pi- pi+)) pi+]CC",
-        "lm"    : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> ^pi- pi+)) pi+]CC",
-        "lp"    : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> pi- ^pi+)) pi+]CC",
-        "spip"  : "[D*(2010)+ -> (D0 -> K- pi+ (J/psi(1S) -> pi- pi+)) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
-        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
-        "Km"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-
-def maketuple_DstToD0pi_D0ToKPiPiPi_WS(options, pvs, rec_summary):
-    name = "DstToD0pi_D0ToKPiPiPi_WS"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKpPimPimPip_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst"   : "[D*(2010)+ -> (D0 -> pi- K+ (J/psi(1S) -> pi- pi+)) pi+]CC",
-        "D0"    : "[D*(2010)+ -> ^(D0 -> pi- K+ (J/psi(1S) -> pi- pi+)) pi+]CC",
-        "pim"   : "[D*(2010)+ -> (D0 -> ^pi- K+ (J/psi(1S) -> pi- pi+)) pi+]CC",
-        "Kp"    : "[D*(2010)+ -> (D0 -> pi- ^K+ (J/psi(1S) -> pi- pi+)) pi+]CC",
-        "Jpsi"  : "[D*(2010)+ -> (D0 -> pi- K+ ^(J/psi(1S) -> pi- pi+)) pi+]CC",
-        "lm"    : "[D*(2010)+ -> (D0 -> pi- K+ (J/psi(1S) -> ^pi- pi+)) pi+]CC",
-        "lp"    : "[D*(2010)+ -> (D0 -> pi- K+ (J/psi(1S) -> pi- ^pi+)) pi+]CC",
-        "spip"  : "[D*(2010)+ -> (D0 -> pi- K+ (J/psi(1S) -> pi- pi+)) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
-        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
-        "pim"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-
-def maketuple_DstToD0pi_D0ToPiPiPiPi(options, pvs, rec_summary):
-    name = "DstToD0pi_D0ToPiPiPiPi"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimPimPipPip_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst"   : "[D*(2010)+ -> ([D0]CC -> pi- pi+ (J/psi(1S) -> pi- pi+)) pi+]CC",
-        "D0"    : "[D*(2010)+ -> ^([D0]CC -> pi- pi+ (J/psi(1S) -> pi- pi+)) pi+]CC",
-        "pim"   : "[D*(2010)+ -> ([D0]CC -> ^pi- pi+ (J/psi(1S) -> pi- pi+)) pi+]CC",
-        "pip"   : "[D*(2010)+ -> ([D0]CC -> pi- ^pi+ (J/psi(1S) -> pi- pi+)) pi+]CC",
-        "Jpsi"  : "[D*(2010)+ -> ([D0]CC -> pi- pi+ ^(J/psi(1S) -> pi- pi+)) pi+]CC",
-        "lm"    : "[D*(2010)+ -> ([D0]CC -> pi- pi+ (J/psi(1S) -> ^pi- pi+)) pi+]CC",
-        "lp"    : "[D*(2010)+ -> ([D0]CC -> pi- pi+ (J/psi(1S) -> pi- ^pi+)) pi+]CC",
-        "spip"  : "[D*(2010)+ -> ([D0]CC -> pi- pi+ (J/psi(1S) -> pi- pi+)) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
-        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
-        "pim"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-
-
-
-def maketuple_Dst2D0pi_D02pipimumu_WS(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02pipimumu_WS"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToPimpPimpMumpMump_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst"   : "[D*(2010)+ -> ([D0]CC -> [pi+]CC [pi+]CC (J/psi(1S) -> [mu+]CC [mu+]CC)) pi+]CC",
-        "D0"    : "[D*(2010)+ -> ^([D0]CC -> [pi+]CC [pi+]CC (J/psi(1S) -> [mu+]CC [mu+]CC)) pi+]CC",
-        "h1"    : "[D*(2010)+ -> ([D0]CC -> ^[pi+]CC [pi+]CC (J/psi(1S) -> [mu+]CC [mu+]CC)) pi+]CC",
-        "h2"    : "[D*(2010)+ -> ([D0]CC -> [pi+]CC ^[pi+]CC (J/psi(1S) -> [mu+]CC [mu+]CC)) pi+]CC",
-        "Jpsi"  : "[D*(2010)+ -> ([D0]CC -> [pi+]CC [pi+]CC ^(J/psi(1S) -> [mu+]CC [mu+]CC)) pi+]CC",
-        "l1"    : "[D*(2010)+ -> ([D0]CC -> [pi+]CC [pi+]CC (J/psi(1S) -> ^[mu+]CC [mu+]CC)) pi+]CC",
-        "l2"    : "[D*(2010)+ -> ([D0]CC -> [pi+]CC [pi+]CC (J/psi(1S) -> [mu+]CC ^[mu+]CC)) pi+]CC",
-        "spip"  : "[D*(2010)+ -> ([D0]CC -> [pi+]CC [pi+]CC (J/psi(1S) -> [mu+]CC [mu+]CC)) ^pi+]CC",
-    }
-    
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
-        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
-        "h1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "h2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-        "l1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "l2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-    }
-
-    
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-
-
-
-def maketuple_Dst2D0pi_D02KKmumu_WS(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02KKmumu_WS"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmpKmpMumpMump_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dst"   : "[D*(2010)+ -> ([D0]CC -> [K+]CC [K+]CC (J/psi(1S) -> [mu+]CC [mu+]CC)) pi+]CC",
-        "D0"    : "[D*(2010)+ -> ^([D0]CC -> [K+]CC [K+]CC (J/psi(1S) -> [mu+]CC [mu+]CC)) pi+]CC",
-        "h1"    : "[D*(2010)+ -> ([D0]CC -> ^[K+]CC [K+]CC (J/psi(1S) -> [mu+]CC [mu+]CC)) pi+]CC",
-        "h2"    : "[D*(2010)+ -> ([D0]CC -> [K+]CC ^[K+]CC (J/psi(1S) -> [mu+]CC [mu+]CC)) pi+]CC",
-        "Jpsi"  : "[D*(2010)+ -> ([D0]CC -> [K+]CC [K+]CC ^(J/psi(1S) -> [mu+]CC [mu+]CC)) pi+]CC",
-        "l1"    : "[D*(2010)+ -> ([D0]CC -> [K+]CC [K+]CC (J/psi(1S) -> ^[mu+]CC [mu+]CC)) pi+]CC",
-        "l2"    : "[D*(2010)+ -> ([D0]CC -> [K+]CC [K+]CC (J/psi(1S) -> [mu+]CC ^[mu+]CC)) pi+]CC",
-        "spip"  : "[D*(2010)+ -> ([D0]CC -> [K+]CC [K+]CC (J/psi(1S) -> [mu+]CC [mu+]CC)) ^pi+]CC",
-    }
-    
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
-        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
-        "h1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "h2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-        "l1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "l2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-    }
-    
-
-    
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
-
-
-def maketuple_Dst2D0pi_D02Kpimumu_WS(options, pvs, rec_summary):
-    name = "Dst2D0pi_D02Kpimumu_WS"
-    turbo_line = "Hlt2Charm_DstpToD0Pip_D0ToKmpPimpMumpMump_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-
-    branches = {
-        "Dst"   : "[D*(2010)+ -> ([D0]CC -> [K+]CC [pi+]CC (J/psi(1S) -> [mu+]CC [mu+]CC)) pi+]CC",
-        "D0"    : "[D*(2010)+ -> ^([D0]CC -> [K+]CC [pi+]CC (J/psi(1S) -> [mu+]CC [mu+]CC)) pi+]CC",
-        "h1"    : "[D*(2010)+ -> ([D0]CC -> ^[K+]CC [pi+]CC (J/psi(1S) -> [mu+]CC [mu+]CC)) pi+]CC",
-        "h2"    : "[D*(2010)+ -> ([D0]CC -> [K+]CC ^[pi+]CC (J/psi(1S) -> [mu+]CC [mu+]CC)) pi+]CC",
-        "Jpsi"  : "[D*(2010)+ -> ([D0]CC -> [K+]CC [pi+]CC ^(J/psi(1S) -> [mu+]CC [mu+]CC)) pi+]CC",
-        "l1"    : "[D*(2010)+ -> ([D0]CC -> [K+]CC [pi+]CC (J/psi(1S) -> ^[mu+]CC [mu+]CC)) pi+]CC",
-        "l2"    : "[D*(2010)+ -> ([D0]CC -> [K+]CC [pi+]CC (J/psi(1S) -> [mu+]CC ^[mu+]CC)) pi+]CC",
-        "spip"  : "[D*(2010)+ -> ([D0]CC -> [K+]CC [pi+]CC (J/psi(1S) -> [mu+]CC [mu+]CC)) ^pi+]CC",
-    }
-
-    variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
-        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
-        "h1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "h2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-        "l1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "l2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-    }
-    
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
-
-    return [myfilter, mytuple]
diff --git a/rare_charm/options/d_to_hll.py b/rare_charm/options/d_to_hll.py
index 85ebc80aab..fa9a6dac4e 100644
--- a/rare_charm/options/d_to_hll.py
+++ b/rare_charm/options/d_to_hll.py
@@ -6,11 +6,10 @@ from .tupling import (
     make_intermediate_isolation_variables,
     make_top_isolation_variables,
 )
-
 from .rare_charm import (
     make_dtf_variables_hmumu,
+    make_dtf_variables_KSh,
 )
-
 from DaVinci.algorithms import create_lines_filter
 from PyConf.reading import get_particles
 from PyConf.reading import get_particles
@@ -248,3 +247,186 @@ def maketuple_D2Kee_SS(options, pvs, rec_summary):
 
     return [myfilter, mytuple]
 
+
+
+######################################################################################################################
+################################################## control channels ################################################## 
+######################################################################################################################
+
+
+
+def maketuple_D2pimumu_WS(options, pvs, rec_summary):
+    name = "D2pimumu_WS"
+    turbo_line = "Hlt2Charm_DpDspToPipMupMup_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp"    : "[D+ -> (J/psi(1S) -> mu+ mu+) pi+]CC",
+        "Jpsi"  : "[D+ -> (J/psi(1S) -> mu+ mu+) pi+]CC",
+        "lp1"   : "[D+ -> (J/psi(1S) -> ^mu+ mu+) pi+]CC",
+        "lp2"   : "[D+ -> (J/psi(1S) -> mu+ ^mu+) pi+]CC",
+        "hp"    : "[D+ -> (J/psi(1S) -> mu+ mu+) ^pi+]CC",
+    }
+
+
+    variables = {
+        "Dp"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lp1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "hp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+
+
+def maketuple_D2Kmumu_WS(options, pvs, rec_summary):
+    name = "D2Kmumu_WS"
+    turbo_line = "Hlt2Charm_DpDspToKpMupMup_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp"    : "[D+ -> (J/psi(1S) -> mu+ mu+) K+]CC",
+        "Jpsi"  : "[D+ -> (J/psi(1S) -> mu+ mu+) K+]CC",
+        "lp1"   : "[D+ -> (J/psi(1S) -> ^mu+ mu+) K+]CC",
+        "lp2"   : "[D+ -> (J/psi(1S) -> mu+ ^mu+) K+]CC",
+        "hp"    : "[D+ -> (J/psi(1S) -> mu+ mu+) ^K+]CC",
+    }
+
+
+    variables = {
+        "Dp"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lp1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "hp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+
+
+def maketuple_D2Kpipi(options, pvs, rec_summary):
+    name = "D2Kpipi"
+    turbo_line = "Hlt2Charm_DpDspToPipPimPip_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp"   : "[D+ -> (J/psi(1S) -> pi- pi+) K+]CC",
+        "Jpsi" : "[D+ -> (J/psi(1S) -> pi- pi+) K+]CC",
+        "lm"   : "[D+ -> (J/psi(1S) -> ^pi- pi+) K+]CC",
+        "lp"   : "[D+ -> (J/psi(1S) -> pi- ^pi+) K+]CC",
+        "hp"   : "[D+ -> (J/psi(1S) -> pi- pi+) ^K+]CC",
+    }
+
+    variables = {
+        "Dp"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "hp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_D2pipipi(options, pvs, rec_summary, _NoCuts=False):
+    name = "D2pipipi"
+    turbo_line = "Hlt2Charm_DpDspToPipPimPip_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp"   : "[D+ -> (J/psi(1S) -> pi- pi+) pi+]CC",
+        "Jpsi" : "[D+ -> (J/psi(1S) -> pi- pi+) pi+]CC",
+        "lm"   : "[D+ -> (J/psi(1S) -> ^pi- pi+) pi+]CC",
+        "lp"   : "[D+ -> (J/psi(1S) -> pi- ^pi+) pi+]CC",
+        "hp"   : "[D+ -> (J/psi(1S) -> pi- pi+) ^pi+]CC",
+    }
+
+    variables = {
+        "Dp"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "hp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
+
+    return [myfilter, mytuple]
+
+
+
+def maketuple_D2KSK_LL(options, pvs, rec_summary):
+    name = "D2KSK_LL"
+    turbo_line = "Hlt2Charm_DpDspToKsKp_LL_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp"   : "[D+ -> (KS0 -> pi- pi+) K+]CC",
+        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) K+]CC",
+        "pim"  : "[D+ -> (KS0 -> ^pi- pi+) K+]CC",
+        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) K+]CC",
+        "hp"   : "[D+ -> (KS0 -> pi- pi+) ^K+]CC",
+    }
+
+    variables = {
+        "Dp"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+        "KS0"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "KS0"),
+        "pim"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "hp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, use_loki_decay_finder=True)
+
+    return [myfilter, mytuple]
+
+
+def maketuple_D2KSpi_LL(options, pvs, rec_summary):
+    name = "D2KSpi_LL"
+    turbo_line = "Hlt2Charm_DpDspToKsPip_LL_RareCharmControl"
+
+    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
+    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
+
+    branches = {
+        "Dp"   : "[D+ -> (KS0 -> pi- pi+) pi+]CC",
+        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) pi+]CC",
+        "pim"  : "[D+ -> (KS0 -> ^pi- pi+) pi+]CC",
+        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) pi+]CC",
+        "hp"   : "[D+ -> (KS0 -> pi- pi+) ^pi+]CC",
+    }
+
+
+    variables = {
+        "Dp"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+        "KS0"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "KS0"),
+        "pim"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "hp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+    }
+
+    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, use_loki_decay_finder=True)
+
+    return [myfilter, mytuple]
+
+
diff --git a/rare_charm/options/d_to_hll_control.py b/rare_charm/options/d_to_hll_control.py
deleted file mode 100644
index ed315ed670..0000000000
--- a/rare_charm/options/d_to_hll_control.py
+++ /dev/null
@@ -1,194 +0,0 @@
-from .tupling import (
-    make_composite_variables,
-    make_basic_variables,
-    make_hlt2_event_variables,
-    make_basic_isolation_variables,
-    make_intermediate_isolation_variables,
-    make_top_isolation_variables,
-)
-
-from .rare_charm import (
-    make_dtf_variables_hmumu,
-    make_dtf_variables_KSh,
-)
-
-from DaVinci.algorithms import create_lines_filter
-from PyConf.reading import get_particles
-from FunTuple import FunTuple_Particles as Funtuple
-                      
-
-
-def maketuple_D2pimumu_WS(options, pvs, rec_summary):
-    name = "D2pimumu_WS"
-    turbo_line = "Hlt2Charm_DpDspToPipMupMup_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp"    : "[D+ -> (J/psi(1S) -> mu+ mu+) pi+]CC",
-        "Jpsi"  : "[D+ -> (J/psi(1S) -> mu+ mu+) pi+]CC",
-        "lp1"   : "[D+ -> (J/psi(1S) -> ^mu+ mu+) pi+]CC",
-        "lp2"   : "[D+ -> (J/psi(1S) -> mu+ ^mu+) pi+]CC",
-        "hp"    : "[D+ -> (J/psi(1S) -> mu+ mu+) ^pi+]CC",
-    }
-
-
-    variables = {
-        "Dp"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lp1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "lp2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "hp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-
-
-def maketuple_D2Kmumu_WS(options, pvs, rec_summary):
-    name = "D2Kmumu_WS"
-    turbo_line = "Hlt2Charm_DpDspToKpMupMup_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp"    : "[D+ -> (J/psi(1S) -> mu+ mu+) K+]CC",
-        "Jpsi"  : "[D+ -> (J/psi(1S) -> mu+ mu+) K+]CC",
-        "lp1"   : "[D+ -> (J/psi(1S) -> ^mu+ mu+) K+]CC",
-        "lp2"   : "[D+ -> (J/psi(1S) -> mu+ ^mu+) K+]CC",
-        "hp"    : "[D+ -> (J/psi(1S) -> mu+ mu+) ^K+]CC",
-    }
-
-
-    variables = {
-        "Dp"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lp1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "lp2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "hp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-
-
-def maketuple_D2Kpipi(options, pvs, rec_summary):
-    name = "D2Kpipi"
-    turbo_line = "Hlt2Charm_DpDspToPipPimPip_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp"   : "[D+ -> (J/psi(1S) -> pi- pi+) K+]CC",
-        "Jpsi" : "[D+ -> (J/psi(1S) -> pi- pi+) K+]CC",
-        "lm"   : "[D+ -> (J/psi(1S) -> ^pi- pi+) K+]CC",
-        "lp"   : "[D+ -> (J/psi(1S) -> pi- ^pi+) K+]CC",
-        "hp"   : "[D+ -> (J/psi(1S) -> pi- pi+) ^K+]CC",
-    }
-
-    variables = {
-        "Dp"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "hp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-
-def maketuple_D2pipipi(options, pvs, rec_summary, _NoCuts=False):
-    name = "D2pipipi"
-    turbo_line = "Hlt2Charm_DpDspToPipPimPip_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp"   : "[D+ -> (J/psi(1S) -> pi- pi+) pi+]CC",
-        "Jpsi" : "[D+ -> (J/psi(1S) -> pi- pi+) pi+]CC",
-        "lm"   : "[D+ -> (J/psi(1S) -> ^pi- pi+) pi+]CC",
-        "lp"   : "[D+ -> (J/psi(1S) -> pi- ^pi+) pi+]CC",
-        "hp"   : "[D+ -> (J/psi(1S) -> pi- pi+) ^pi+]CC",
-    }
-
-    variables = {
-        "Dp"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "hp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-    }
-
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
-
-    return [myfilter, mytuple]
-
-
-
-def maketuple_D2KSK_LL(options, pvs, rec_summary):
-    name = "D2KSK_LL"
-    turbo_line = "Hlt2Charm_DpDspToKsKp_LL_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp"   : "[D+ -> (KS0 -> pi- pi+) K+]CC",
-        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) K+]CC",
-        "pim"  : "[D+ -> (KS0 -> ^pi- pi+) K+]CC",
-        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) K+]CC",
-        "hp"   : "[D+ -> (KS0 -> pi- pi+) ^K+]CC",
-    }
-
-    variables = {
-        "Dp"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-        "KS0"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "KS0"),
-        "pim"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "hp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, use_loki_decay_finder=True)
-
-    return [myfilter, mytuple]
-
-
-def maketuple_D2KSpi_LL(options, pvs, rec_summary):
-    name = "D2KSpi_LL"
-    turbo_line = "Hlt2Charm_DpDspToKsPip_LL_RareCharmControl"
-
-    input_data = get_particles(f"/Event/HLT2/{turbo_line}/Particles")
-    myfilter = create_lines_filter(f"LineFilter_{turbo_line}_{{hash}}",[turbo_line],)
-
-    branches = {
-        "Dp"   : "[D+ -> (KS0 -> pi- pi+) pi+]CC",
-        "KS0"  : "[D+ -> ^(KS0 -> pi- pi+) pi+]CC",
-        "pim"  : "[D+ -> (KS0 -> ^pi- pi+) pi+]CC",
-        "pip"  : "[D+ -> (KS0 -> pi- ^pi+) pi+]CC",
-        "hp"   : "[D+ -> (KS0 -> pi- pi+) ^pi+]CC",
-    }
-
-
-    variables = {
-        "Dp"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-        "KS0"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "KS0"),
-        "pim"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "hp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-    }
-
-    mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, use_loki_decay_finder=True)
-
-    return [myfilter, mytuple]
-
-- 
GitLab


From c7304d3f505f614bf15516ba04dec98547842bdd Mon Sep 17 00:00:00 2001
From: Donata Osthues <donata.osthues@cern.ch>
Date: Mon, 25 Nov 2024 11:25:55 +0100
Subject: [PATCH 43/51] reduced iso variables

---
 rare_charm/options/Lc_to_pll.py  | 121 ++++++++++----------
 rare_charm/options/d0_to_hhll.py | 188 +++++++++++++++----------------
 rare_charm/options/d_to_hll.py   | 140 +++++++++++------------
 rare_charm/options/tupling.py    |  66 +++++++++--
 4 files changed, 282 insertions(+), 233 deletions(-)

diff --git a/rare_charm/options/Lc_to_pll.py b/rare_charm/options/Lc_to_pll.py
index 3cad92879b..d88a91f996 100644
--- a/rare_charm/options/Lc_to_pll.py
+++ b/rare_charm/options/Lc_to_pll.py
@@ -31,11 +31,11 @@ def maketuple_Lc2pmumu(options, pvs, rec_summary):
     }
 
     variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "lp"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "lm"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "lp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
@@ -59,11 +59,11 @@ def maketuple_Lc2pmumu_SS(options, pvs, rec_summary):
     }
 
     variables = {
-        "Lc"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "lp1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "lp2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "pm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "Lc"    : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "lp1"   : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "lp2"   : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "pm"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
@@ -87,11 +87,11 @@ def maketuple_Lc2pee(options, pvs, rec_summary):
     }
 
     variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "lp"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "lm"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "lp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
@@ -115,11 +115,11 @@ def maketuple_Lc2pee_SS(options, pvs, rec_summary):
     }
 
     variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "lp1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "lp2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "pm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "lp1"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "lp2"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "pm"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
@@ -143,11 +143,11 @@ def maketuple_Lc2pmue_OS(options, pvs, rec_summary):
     }
 
     variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "mu"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "e"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "mu"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "e"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
     }
 
 
@@ -172,11 +172,11 @@ def maketuple_Lc2pmue_SS(options, pvs, rec_summary):
     }
 
     variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "l1"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "l2"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "l1"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "l2"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
     }
 
         
@@ -208,11 +208,11 @@ def maketuple_Lc2pmumu_WS(options, pvs, rec_summary):
     }
 
     variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "lp1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "lp2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "lp1"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "lp2"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
@@ -236,11 +236,11 @@ def maketuple_Lc2pee_WS(options, pvs, rec_summary):
     }
 
     variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "lp1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "lp2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "lp1"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "lp2"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
@@ -264,11 +264,11 @@ def maketuple_Lc2pmue_WS(options, pvs, rec_summary):
     }
 
     variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "lp1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "lp2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "lp1"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "lp2"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
@@ -292,11 +292,11 @@ def maketuple_Lc2ppipi(options, pvs, rec_summary):
     }
 
     variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "lm"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "lp"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "lm"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "lp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
@@ -320,11 +320,12 @@ def maketuple_Lc2KSp_LL(options, pvs, rec_summary):
     }
 
     variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "composite"),
-        "KS0"    : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "KS0")+make_dtf_variables_KSh(options, pvs, input_data, "composite"),
-        "pim"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_KSh(options, pvs, input_data, "composite"),
+        "KS0"    : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data, size="reduced", composite_ID = "KS0")+make_dtf_variables_KSh(options, pvs, input_data, "composite"),
+        "pim"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
+
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
@@ -348,11 +349,11 @@ def maketuple_Lc2KSp_DD(options, pvs, rec_summary):
     }
 
     variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "composite"),
-        "KS0"    : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "KS0")+make_dtf_variables_KSh(options, pvs, input_data, "composite"),
-        "pim"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_KSh(options, pvs, input_data, "composite"),
+        "KS0"    : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data, size="reduced", composite_ID = "KS0")+make_dtf_variables_KSh(options, pvs, input_data, "composite"),
+        "pim"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
diff --git a/rare_charm/options/d0_to_hhll.py b/rare_charm/options/d0_to_hhll.py
index 58351257be..3228193206 100644
--- a/rare_charm/options/d0_to_hhll.py
+++ b/rare_charm/options/d0_to_hhll.py
@@ -36,14 +36,14 @@ def maketuple_Dst2D0pi_D02pipimumu(options, pvs, rec_summary):
     }
 
     variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
-        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
-        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "pim"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, size="full"),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, size="full", composite_ID = "D0"),
+        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
+        "pim"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, size="full"),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
+        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
@@ -70,14 +70,14 @@ def maketuple_Dst2D0pi_D02KKmumu(options, pvs, rec_summary):
     }
 
     variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
-        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
-        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "Km"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, size="full"),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, size="full", composite_ID = "D0"),
+        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
+        "Km"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, size="full"),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
+        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
@@ -103,14 +103,14 @@ def maketuple_Dst2D0pi_D02Kpimumu_RS(options, pvs, rec_summary):
     }
 
     variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
-        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
-        "Km"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, size="full"),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, size="full", composite_ID = "D0"),
+        "Km"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
+        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, size="full"),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
+        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
@@ -137,14 +137,14 @@ def maketuple_Dst2D0pi_D02Kpimumu_WS(options, pvs, rec_summary):
     }
 
     variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
-        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
-        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "pim"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, size="full"),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, size="full", composite_ID = "D0"),
+        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
+        "pim"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, size="full"),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
+        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
@@ -168,12 +168,12 @@ def maketuple_D02Kpimumu(options, pvs, rec_summary):
     }
 
     variables = {
-        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_top_isolation_variables(turbo_line, input_data),
-        "Km"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_top_isolation_variables(turbo_line, input_data, size="full"),
+        "Km"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
+        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, size="full"),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
@@ -207,14 +207,14 @@ def maketuple_DstToD0pi_D0ToKKPiPi(options, pvs, rec_summary):
     }
 
     variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
-        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
-        "Km"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, size="full"),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, size="full", composite_ID = "D0"),
+        "Km"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
+        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, size="full"),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
+        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
     }
 
 
@@ -243,14 +243,14 @@ def maketuple_DstToD0pi_D0ToKPiPiPi_RS(options, pvs, rec_summary):
     }
 
     variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
-        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
-        "Km"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, size="full"),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, size="full", composite_ID = "D0"),
+        "Km"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
+        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, size="full"),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
+        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
@@ -277,14 +277,14 @@ def maketuple_DstToD0pi_D0ToKPiPiPi_WS(options, pvs, rec_summary):
     }
 
     variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
-        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
-        "pim"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, size="full"),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, size="full", composite_ID = "D0"),
+        "pim"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
+        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, size="full"),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
+        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
@@ -311,14 +311,14 @@ def maketuple_DstToD0pi_D0ToPiPiPiPi(options, pvs, rec_summary):
     }
 
     variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
-        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
-        "pim"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, size="full"),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, size="full", composite_ID = "D0"),
+        "pim"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
+        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, size="full"),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
+        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
@@ -347,14 +347,14 @@ def maketuple_Dst2D0pi_D02pipimumu_WS(options, pvs, rec_summary):
     }
     
     variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
-        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
-        "h1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "h2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-        "l1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "l2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, size="full"),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, size="full", composite_ID = "D0"),
+        "h1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
+        "h2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, size="full"),
+        "l1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
+        "l2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
+        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
     }
 
     
@@ -384,14 +384,14 @@ def maketuple_Dst2D0pi_D02KKmumu_WS(options, pvs, rec_summary):
     }
     
     variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
-        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
-        "h1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "h2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-        "l1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "l2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, size="full"),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, size="full", composite_ID = "D0"),
+        "h1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
+        "h2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, size="full"),
+        "l1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
+        "l2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
+        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
     }
     
 
@@ -422,14 +422,14 @@ def maketuple_Dst2D0pi_D02Kpimumu_WS(options, pvs, rec_summary):
     }
 
     variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
-        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
-        "h1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "h2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-        "l1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "l2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, size="full"),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, size="full", composite_ID = "D0"),
+        "h1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
+        "h2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, size="full"),
+        "l1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
+        "l2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
+        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
     }
     
 
diff --git a/rare_charm/options/d_to_hll.py b/rare_charm/options/d_to_hll.py
index fa9a6dac4e..bdc9572a06 100644
--- a/rare_charm/options/d_to_hll.py
+++ b/rare_charm/options/d_to_hll.py
@@ -33,11 +33,11 @@ def maketuple_D2pimumu_OS(options, pvs, rec_summary):
 
 
     variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-        "Jpsi" : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lm"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "lp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data, size="reduced"),
+        "Jpsi" : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, size="reduced"),
+        "lm"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
+        "lp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
+        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
@@ -63,11 +63,11 @@ def maketuple_D2pimumu_SS(options, pvs, rec_summary):
 
 
     variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-        "Jpsi" : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lp1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "lp2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "hm"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data, size="reduced"),
+        "Jpsi" : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, size="reduced"),
+        "lp1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
+        "lp2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
+        "hm"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
@@ -92,11 +92,11 @@ def maketuple_D2Kmumu_OS(options, pvs, rec_summary):
     }
 
     variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-        "Jpsi" : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lm"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "lp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data, size="reduced"),
+        "Jpsi" : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, size="reduced"),
+        "lm"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
+        "lp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
+        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
@@ -122,11 +122,11 @@ def maketuple_D2Kmumu_SS(options, pvs, rec_summary):
 
 
     variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-        "Jpsi" : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lp1"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "lp2"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "hm"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data, size="reduced"),
+        "Jpsi" : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, size="reduced"),
+        "lp1"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
+        "lp2"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
+        "hm"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
@@ -152,11 +152,11 @@ def maketuple_D2piee_OS(options, pvs, rec_summary):
 
 
     variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-        "Jpsi" : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "lm"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data, size="reduced"),
+        "Jpsi" : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, size="reduced"),
+        "lp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
+        "lm"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
+        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
@@ -181,11 +181,11 @@ def maketuple_D2piee_SS(options, pvs, rec_summary):
 
 
     variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-        "Jpsi" : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lp1"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "lp2"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "hm"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data, size="reduced"),
+        "Jpsi" : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, size="reduced"),
+        "lp1"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
+        "lp2"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
+        "hm"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
@@ -209,11 +209,11 @@ def maketuple_D2Kee_OS(options, pvs, rec_summary):
     }
 
     variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-        "Jpsi" : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "lm"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data, size="reduced"),
+        "Jpsi" : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, size="reduced"),
+        "lp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
+        "lm"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
+        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
@@ -236,11 +236,11 @@ def maketuple_D2Kee_SS(options, pvs, rec_summary):
     }
 
     variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-        "Jpsi" : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lp1"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "lp2"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "hm"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data, size="reduced"),
+        "Jpsi" : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, size="reduced"),
+        "lp1"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
+        "lp2"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
+        "hm"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
@@ -272,11 +272,11 @@ def maketuple_D2pimumu_WS(options, pvs, rec_summary):
 
 
     variables = {
-        "Dp"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lp1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "lp2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "hp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Dp"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data, size="reduced"),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, size="reduced"),
+        "lp1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
+        "lp2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
+        "hp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
@@ -302,11 +302,11 @@ def maketuple_D2Kmumu_WS(options, pvs, rec_summary):
 
 
     variables = {
-        "Dp"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lp1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "lp2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "hp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Dp"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data, size="reduced"),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, size="reduced"),
+        "lp1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
+        "lp2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
+        "hp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
@@ -331,11 +331,11 @@ def maketuple_D2Kpipi(options, pvs, rec_summary):
     }
 
     variables = {
-        "Dp"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "hp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Dp"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data, size="reduced"),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, size="reduced"),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
+        "hp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
@@ -359,11 +359,11 @@ def maketuple_D2pipipi(options, pvs, rec_summary, _NoCuts=False):
     }
 
     variables = {
-        "Dp"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
-        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "hp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Dp"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data, size="reduced"),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, size="reduced"),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
+        "hp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
     }
 
 
@@ -389,11 +389,11 @@ def maketuple_D2KSK_LL(options, pvs, rec_summary):
     }
 
     variables = {
-        "Dp"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-        "KS0"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "KS0"),
-        "pim"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "hp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Dp"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data, size="reduced"),
+        "KS0"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, size="reduced", composite_ID = "KS0"),
+        "pim"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
+        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
+        "hp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, use_loki_decay_finder=True)
@@ -418,11 +418,11 @@ def maketuple_D2KSpi_LL(options, pvs, rec_summary):
 
 
     variables = {
-        "Dp"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
-        "KS0"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "KS0"),
-        "pim"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
-        "hp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Dp"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data, size="reduced"),
+        "KS0"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, size="reduced", composite_ID = "KS0"),
+        "pim"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
+        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
+        "hp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, use_loki_decay_finder=True)
diff --git a/rare_charm/options/tupling.py b/rare_charm/options/tupling.py
index 36466e9bbf..39d1ac6489 100644
--- a/rare_charm/options/tupling.py
+++ b/rare_charm/options/tupling.py
@@ -30,6 +30,7 @@ from FunTuple.functorcollections import (
     MCReconstructed,
     MCReconstructible,
 )
+from IsolationTools import VertexAndConeIsolation
 
 from DaVinciMCTools import MCTruthAndBkgCat, MCReconstructed, MCReconstructible
 from PyConf.Algorithms import ParticleToSubcombinationsAlg
@@ -658,7 +659,35 @@ def make_MC_event_variables(mc_header):
 
     return evt_variables
 
-def make_top_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"]):
+
+
+
+
+def ParticleIsolation_reduced(
+    *,
+    isolation_alg: VertexAndConeIsolation,
+    array_indx_name: str,
+    sumcone_invalid_value=F.NaN,
+) -> FunctorCollection:
+    
+    prefix = "HEAD"
+    if isolation_alg.name:
+        prefix += f"_{isolation_alg.name}"
+
+    ParticleIsolationVariables = {
+        f"{prefix}_CMULT": isolation_alg.MULT,
+        f"{prefix}_PASY": isolation_alg.PASY,
+        f"{prefix}_PTASY": isolation_alg.PTASY,
+        f"{prefix}_PXASY": isolation_alg.PXASY,
+        f"{prefix}_PYASY": isolation_alg.PYASY,
+        f"{prefix}_PZASY": isolation_alg.PZASY,
+    }
+    return FunctorCollection(ParticleIsolationVariables)
+
+
+
+
+def make_top_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"], size):
     from PyConf.reading import get_particles
     from IsolationTools import VertexAndConeIsolation
 
@@ -677,15 +706,21 @@ def make_top_isolation_variables(hlt2_line, input_data, locations = ["LongTrackI
                 cut=F.DR2<coneangle)
 
             if count == 0:
-                top_iso_variables = ParticleIsolation(isolation_alg=top_RTAlg,array_indx_name='indx')
+                if size == "reduced":
+                    top_iso_variables = ParticleIsolation_reduced(isolation_alg=top_RTAlg,array_indx_name='indx')
+                else:
+                    top_iso_variables = ParticleIsolation(isolation_alg=top_RTAlg,array_indx_name='indx')
             else:
-                top_iso_variables += ParticleIsolation(isolation_alg=top_RTAlg,array_indx_name='indx')
+                if size == "reduced":
+                    top_iso_variables += ParticleIsolation_reduced(isolation_alg=top_RTAlg,array_indx_name='indx')
+                else:
+                    top_iso_variables += ParticleIsolation(isolation_alg=top_RTAlg,array_indx_name='indx')
             count += 1
 
 
     return top_iso_variables
 
-def make_basic_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"]):
+def make_basic_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"], size):
     from PyConf.reading import get_particles
     from IsolationTools import VertexAndConeIsolation
     from PyConf.Algorithms import ThOrParticleSelection
@@ -708,16 +743,22 @@ def make_basic_isolation_variables(hlt2_line, input_data, locations = ["LongTrac
                 cut=F.DR2<coneangle)
 
             if count == 0:
-                basic_iso_variables = ParticleIsolation(isolation_alg=basic_RTAlg,array_indx_name='indx')
+                if size == "reduced":
+                    basic_iso_variables = ParticleIsolation_reduced(isolation_alg=basic_RTAlg,array_indx_name='indx')
+                else:
+                    basic_iso_variables = ParticleIsolation(isolation_alg=basic_RTAlg,array_indx_name='indx')
             else:
-                basic_iso_variables += ParticleIsolation(isolation_alg=basic_RTAlg,array_indx_name='indx')
+                if size == "reduced":
+                    basic_iso_variables += ParticleIsolation_reduced(isolation_alg=basic_RTAlg,array_indx_name='indx')
+                else:
+                    basic_iso_variables += ParticleIsolation(isolation_alg=basic_RTAlg,array_indx_name='indx')
             count += 1
 
 
     return basic_iso_variables
 
 
-def make_intermediate_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"], composite_ID = "J/psi(1S)"):
+def make_intermediate_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"], size, composite_ID = "J/psi(1S)"):
     from PyConf.reading import get_particles
     from IsolationTools import VertexAndConeIsolation
     from PyConf.Algorithms import ThOrParticleSelection
@@ -740,9 +781,16 @@ def make_intermediate_isolation_variables(hlt2_line, input_data, locations = ["L
                 cut=F.DR2<coneangle)
 
             if count == 0:
-                intermediate_iso_variables = ParticleIsolation(isolation_alg=intermediate_RTAlg,array_indx_name='indx')
+                if size == "reduced":
+                    intermediate_iso_variables = ParticleIsolation_reduced(isolation_alg=intermediate_RTAlg,array_indx_name='indx')
+                else:
+                    intermediate_iso_variables = ParticleIsolation(isolation_alg=intermediate_RTAlg,array_indx_name='indx')
+
             else:
-                intermediate_iso_variables += ParticleIsolation(isolation_alg=intermediate_RTAlg,array_indx_name='indx')
+                if size == "reduced":
+                    intermediate_iso_variables += ParticleIsolation_reduced(isolation_alg=intermediate_RTAlg,array_indx_name='indx')
+                else:
+                    intermediate_iso_variables += ParticleIsolation(isolation_alg=intermediate_RTAlg,array_indx_name='indx')
             count += 1
 
 
-- 
GitLab


From 0b7f4c00903e961b29402f74567742bdc4e88eeb Mon Sep 17 00:00:00 2001
From: Donata Osthues <donata.osthues@cern.ch>
Date: Mon, 25 Nov 2024 12:13:41 +0100
Subject: [PATCH 44/51] bug fix

---
 rare_charm/options/Lc_to_pll.py | 2 ++
 rare_charm/options/tupling.py   | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/rare_charm/options/Lc_to_pll.py b/rare_charm/options/Lc_to_pll.py
index d88a91f996..f30d20fbe5 100644
--- a/rare_charm/options/Lc_to_pll.py
+++ b/rare_charm/options/Lc_to_pll.py
@@ -2,7 +2,9 @@ from .tupling import (
     make_composite_variables,
     make_basic_variables,
     make_hlt2_event_variables,
+    make_basic_isolation_variables,
     make_intermediate_isolation_variables,
+    make_top_isolation_variables,
 )
 from .rare_charm import (
     make_dtf_variables_pmumu,
diff --git a/rare_charm/options/tupling.py b/rare_charm/options/tupling.py
index 39d1ac6489..40e035e06d 100644
--- a/rare_charm/options/tupling.py
+++ b/rare_charm/options/tupling.py
@@ -687,7 +687,7 @@ def ParticleIsolation_reduced(
 
 
 
-def make_top_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"], size):
+def make_top_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"], size="full"):
     from PyConf.reading import get_particles
     from IsolationTools import VertexAndConeIsolation
 
@@ -720,7 +720,7 @@ def make_top_isolation_variables(hlt2_line, input_data, locations = ["LongTrackI
 
     return top_iso_variables
 
-def make_basic_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"], size):
+def make_basic_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"], size="full"):
     from PyConf.reading import get_particles
     from IsolationTools import VertexAndConeIsolation
     from PyConf.Algorithms import ThOrParticleSelection
-- 
GitLab


From 71a139c25ab49db08dc7cb690b1ff2e225df4080 Mon Sep 17 00:00:00 2001
From: Donata Osthues <donata.osthues@cern.ch>
Date: Mon, 25 Nov 2024 12:25:08 +0100
Subject: [PATCH 45/51] bug fix

---
 rare_charm/options/tupling.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rare_charm/options/tupling.py b/rare_charm/options/tupling.py
index 40e035e06d..9a4c730f5b 100644
--- a/rare_charm/options/tupling.py
+++ b/rare_charm/options/tupling.py
@@ -758,7 +758,7 @@ def make_basic_isolation_variables(hlt2_line, input_data, locations = ["LongTrac
     return basic_iso_variables
 
 
-def make_intermediate_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"], size, composite_ID = "J/psi(1S)"):
+def make_intermediate_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"], size="full", composite_ID = "J/psi(1S)"):
     from PyConf.reading import get_particles
     from IsolationTools import VertexAndConeIsolation
     from PyConf.Algorithms import ThOrParticleSelection
-- 
GitLab


From 005864f6cdc9dc43c79915d9c7d0710a0329b78d Mon Sep 17 00:00:00 2001
From: Donata Osthues <donata.osthues@cern.ch>
Date: Tue, 26 Nov 2024 08:45:29 +0100
Subject: [PATCH 46/51] bug fix

---
 rare_charm/options/tupling.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/rare_charm/options/tupling.py b/rare_charm/options/tupling.py
index 9a4c730f5b..7fefc6dde8 100644
--- a/rare_charm/options/tupling.py
+++ b/rare_charm/options/tupling.py
@@ -687,7 +687,7 @@ def ParticleIsolation_reduced(
 
 
 
-def make_top_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"], size="full"):
+def make_top_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"], size="reduced"):
     from PyConf.reading import get_particles
     from IsolationTools import VertexAndConeIsolation
 
@@ -720,7 +720,7 @@ def make_top_isolation_variables(hlt2_line, input_data, locations = ["LongTrackI
 
     return top_iso_variables
 
-def make_basic_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"], size="full"):
+def make_basic_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"], size="reduced"):
     from PyConf.reading import get_particles
     from IsolationTools import VertexAndConeIsolation
     from PyConf.Algorithms import ThOrParticleSelection
@@ -758,7 +758,7 @@ def make_basic_isolation_variables(hlt2_line, input_data, locations = ["LongTrac
     return basic_iso_variables
 
 
-def make_intermediate_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"], size="full", composite_ID = "J/psi(1S)"):
+def make_intermediate_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"], size="reduced", composite_ID = "J/psi(1S)"):
     from PyConf.reading import get_particles
     from IsolationTools import VertexAndConeIsolation
     from PyConf.Algorithms import ThOrParticleSelection
-- 
GitLab


From c1d7653ff9efb38306e833563aa62fb03973265b Mon Sep 17 00:00:00 2001
From: Serena Maccolini <serena.maccolini@cern.ch>
Date: Tue, 3 Dec 2024 15:43:17 +0100
Subject: [PATCH 47/51] reduced isovars and merging in one jobs per dataset

---
 rare_charm/info.yaml                          |   5 +-
 .../main_d0_to_hhll_d_to_hll_Lc_to_pll.py     |  80 ++++++++
 rare_charm/options/Lc_to_pll.py               | 120 +++++------
 rare_charm/options/d0_to_hhll.py              | 188 +++++++++---------
 rare_charm/options/d_to_hll.py                | 140 ++++++-------
 5 files changed, 305 insertions(+), 228 deletions(-)
 create mode 100644 rare_charm/main_d0_to_hhll_d_to_hll_Lc_to_pll.py

diff --git a/rare_charm/info.yaml b/rare_charm/info.yaml
index bc22cc5c74..dc9b2bd796 100644
--- a/rare_charm/info.yaml
+++ b/rare_charm/info.yaml
@@ -11,10 +11,7 @@ defaults:
 
 
 {%- set subsamples = [
-  "d0_to_hhll",
-  "d_to_hll",
-  "Lc_to_pll",
-  "Lb_to_Lcl",
+    "d0_to_hhll_d_to_hll_Lc_to_pll",
 ]%}
 
 {%- set datasets = [
diff --git a/rare_charm/main_d0_to_hhll_d_to_hll_Lc_to_pll.py b/rare_charm/main_d0_to_hhll_d_to_hll_Lc_to_pll.py
new file mode 100644
index 0000000000..d73243ceb9
--- /dev/null
+++ b/rare_charm/main_d0_to_hhll_d_to_hll_Lc_to_pll.py
@@ -0,0 +1,80 @@
+###############################################################################
+# (c) Copyright 2021-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 .options.Lb_to_Lcl import *
+from .options.Lc_to_pll import *
+from .options.d0_to_hhll import *
+from .options.d_to_hll import *
+
+from DaVinci import Options, make_config
+from PyConf.reading import get_pvs, get_rec_summary
+
+def main(options: Options):
+        
+    # get ODIN and DecReports location
+    pvs = get_pvs()
+    rec_summary = get_rec_summary()
+
+    tuples = {
+        # --- Lb_to_Lcl
+        "Lc2pmumu"   : maketuple_Lb2Lcmu_Lc2pmumu(options, pvs, rec_summary),
+        "Lc2pee"     : maketuple_Lb2Lcmu_Lc2pee(options, pvs, rec_summary),
+        "Lc2KSp_LL"  : maketuple_Lb2Lcmu_Lc2KSp_LL(options, pvs, rec_summary),
+        "Lc2KSp_DD"  : maketuple_Lb2Lcmu_Lc2KSp_DD(options, pvs, rec_summary),
+        # --- Lc_to_pll
+        "Lc2pmumu_OS" : maketuple_Lc2pmumu(options, pvs, rec_summary),
+        "Lc2pmumu_SS" : maketuple_Lc2pmumu_SS(options, pvs, rec_summary),
+        "Lc2pee_OS"   : maketuple_Lc2pee(options, pvs, rec_summary),
+        "Lc2pee_SS"   : maketuple_Lc2pee_SS(options, pvs, rec_summary),
+        "Lc2pmue_OS"  : maketuple_Lc2pmue_OS(options, pvs, rec_summary),
+        "Lc2pmue_SS"  : maketuple_Lc2pmue_SS(options, pvs, rec_summary),
+        # control channels
+        "Lc2pmumu_WS" : maketuple_Lc2pmumu_WS(options, pvs, rec_summary),
+        "Lc2pee_WS"   : maketuple_Lc2pee_WS(options, pvs, rec_summary),
+        "Lc2pmue_WS"  : maketuple_Lc2pmue_WS(options, pvs, rec_summary),
+        "Lc2ppipi"    : maketuple_Lc2ppipi(options, pvs, rec_summary),
+        "Lc2KSp_LL"   : maketuple_Lc2KSp_LL(options, pvs, rec_summary),
+        "Lc2KSp_DD"   : maketuple_Lc2KSp_DD(options, pvs, rec_summary),
+        # --- d0_to_hhll
+        "Dst2D0pi_D02pipimumu"   : maketuple_Dst2D0pi_D02pipimumu(options, pvs, rec_summary),
+        "Dst2D0pi_D02KKmumu"     : maketuple_Dst2D0pi_D02KKmumu(options, pvs, rec_summary),
+        "Dst2D0pi_D02Kpimumu_RS" : maketuple_Dst2D0pi_D02Kpimumu_RS(options, pvs, rec_summary),
+        "Dst2D0pi_D02Kpimumu_WS" : maketuple_Dst2D0pi_D02Kpimumu_WS(options, pvs, rec_summary),
+        "D02Kpimumu"             : maketuple_D02Kpimumu(options, pvs, rec_summary),
+        # control channels
+        "DstToD0pi_D0ToKKPiPi"     : maketuple_DstToD0pi_D0ToKKPiPi(options, pvs, rec_summary),
+        "DstToD0pi_D0ToKPiPiPi_RS" : maketuple_DstToD0pi_D0ToKPiPiPi_RS(options, pvs, rec_summary),
+        "DstToD0pi_D0ToKPiPiPi_WS" : maketuple_DstToD0pi_D0ToKPiPiPi_WS(options, pvs, rec_summary),
+        "DstToD0pi_D0ToPiPiPiPi"   : maketuple_DstToD0pi_D0ToPiPiPiPi(options, pvs, rec_summary),
+        "Dst2D0pi_D02pipimumu_WS"  : maketuple_Dst2D0pi_D02pipimumu_WS(options, pvs, rec_summary),
+        "Dst2D0pi_D02KKmumu_WS"    : maketuple_Dst2D0pi_D02KKmumu_WS(options, pvs, rec_summary),
+        "Dst2D0pi_D02Kpimumu_WS"   : maketuple_Dst2D0pi_D02Kpimumu_WS(options, pvs, rec_summary),
+        # --- d_to_hll
+        "D2pimumu_OS" : maketuple_D2pimumu_OS(options, pvs, rec_summary),
+        "D2pimumu_SS" : maketuple_D2pimumu_SS(options, pvs, rec_summary),
+        "D2Kmumu_OS"  : maketuple_D2Kmumu_OS(options, pvs, rec_summary),
+        "D2Kmumu_SS"  : maketuple_D2Kmumu_SS(options, pvs, rec_summary),
+        "D2piee_OS"  : maketuple_D2piee_OS(options, pvs, rec_summary),
+        "D2piee_SS"  : maketuple_D2piee_SS(options, pvs, rec_summary),
+        "D2Kee_SS"   : maketuple_D2Kee_OS(options, pvs, rec_summary),
+        "D2Kee_OS"   : maketuple_D2Kee_SS(options, pvs, rec_summary),
+        # control channels
+        "D2pimumu_WS" : maketuple_D2pimumu_WS(options, pvs, rec_summary),
+        "D2Kmumu_WS"  : maketuple_D2Kmumu_WS(options, pvs, rec_summary),
+        "D2Kpipi"     : maketuple_D2Kpipi(options, pvs, rec_summary),
+        "D2pipipi"    : maketuple_D2pipipi(options, pvs, rec_summary),
+        "D2KSK_LL"    : maketuple_D2KSK_LL(options, pvs, rec_summary),
+        "D2KSpi_LL"   : maketuple_D2KSpi_LL(options, pvs, rec_summary),
+    }
+        
+    config = make_config(options, tuples)
+
+    return config
diff --git a/rare_charm/options/Lc_to_pll.py b/rare_charm/options/Lc_to_pll.py
index f30d20fbe5..ffe1f0d22d 100644
--- a/rare_charm/options/Lc_to_pll.py
+++ b/rare_charm/options/Lc_to_pll.py
@@ -33,11 +33,11 @@ def maketuple_Lc2pmumu(options, pvs, rec_summary):
     }
 
     variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "lm"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "lp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "lm"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "lp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
@@ -61,11 +61,11 @@ def maketuple_Lc2pmumu_SS(options, pvs, rec_summary):
     }
 
     variables = {
-        "Lc"    : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "lp1"   : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "lp2"   : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "pm"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "Lc"    : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "lp1"   : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "lp2"   : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "pm"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
@@ -89,11 +89,11 @@ def maketuple_Lc2pee(options, pvs, rec_summary):
     }
 
     variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "lm"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "lp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "lm"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "lp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
@@ -117,11 +117,11 @@ def maketuple_Lc2pee_SS(options, pvs, rec_summary):
     }
 
     variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "lp1"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "lp2"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "pm"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "lp1"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "lp2"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "pm"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
@@ -145,11 +145,11 @@ def maketuple_Lc2pmue_OS(options, pvs, rec_summary):
     }
 
     variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "mu"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "e"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "mu"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "e"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
     }
 
 
@@ -174,11 +174,11 @@ def maketuple_Lc2pmue_SS(options, pvs, rec_summary):
     }
 
     variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "l1"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "l2"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "l1"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "l2"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
     }
 
         
@@ -210,11 +210,11 @@ def maketuple_Lc2pmumu_WS(options, pvs, rec_summary):
     }
 
     variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "lp1"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "lp2"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "lp1"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "lp2"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
@@ -238,11 +238,11 @@ def maketuple_Lc2pee_WS(options, pvs, rec_summary):
     }
 
     variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "lp1"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "lp2"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "lp1"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "lp2"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
@@ -266,11 +266,11 @@ def maketuple_Lc2pmue_WS(options, pvs, rec_summary):
     }
 
     variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "lp1"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "lp2"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "lp1"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "lp2"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
@@ -294,11 +294,11 @@ def maketuple_Lc2ppipi(options, pvs, rec_summary):
     }
 
     variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
-        "lm"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "lp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "Jpsi"   : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "composite"),
+        "lm"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "lp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_pmumu(options, pvs, input_data, "basic"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
@@ -322,11 +322,11 @@ def maketuple_Lc2KSp_LL(options, pvs, rec_summary):
     }
 
     variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_KSh(options, pvs, input_data, "composite"),
-        "KS0"    : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data, size="reduced", composite_ID = "KS0")+make_dtf_variables_KSh(options, pvs, input_data, "composite"),
-        "pim"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "composite"),
+        "KS0"    : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "KS0")+make_dtf_variables_KSh(options, pvs, input_data, "composite"),
+        "pim"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
 
     }
 
@@ -351,11 +351,11 @@ def maketuple_Lc2KSp_DD(options, pvs, rec_summary):
     }
 
     variables = {
-        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_KSh(options, pvs, input_data, "composite"),
-        "KS0"    : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data, size="reduced", composite_ID = "KS0")+make_dtf_variables_KSh(options, pvs, input_data, "composite"),
-        "pim"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
-        "pip"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
-        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data, size="reduced")+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
+        "Lc"     : make_composite_variables(options, pvs, input_data)+make_top_isolation_variables(turbo_line, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "composite"),
+        "KS0"    : make_composite_variables(options, pvs, input_data)+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "KS0")+make_dtf_variables_KSh(options, pvs, input_data, "composite"),
+        "pim"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
+        "pip"    : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
+        "pp"     : make_basic_variables(options, pvs, input_data)+make_basic_isolation_variables(turbo_line, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic"),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
diff --git a/rare_charm/options/d0_to_hhll.py b/rare_charm/options/d0_to_hhll.py
index 3228193206..58351257be 100644
--- a/rare_charm/options/d0_to_hhll.py
+++ b/rare_charm/options/d0_to_hhll.py
@@ -36,14 +36,14 @@ def maketuple_Dst2D0pi_D02pipimumu(options, pvs, rec_summary):
     }
 
     variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, size="full"),
-        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, size="full", composite_ID = "D0"),
-        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
-        "pim"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, size="full"),
-        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
-        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
+        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "pim"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
@@ -70,14 +70,14 @@ def maketuple_Dst2D0pi_D02KKmumu(options, pvs, rec_summary):
     }
 
     variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, size="full"),
-        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, size="full", composite_ID = "D0"),
-        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
-        "Km"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, size="full"),
-        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
-        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
+        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Km"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
@@ -103,14 +103,14 @@ def maketuple_Dst2D0pi_D02Kpimumu_RS(options, pvs, rec_summary):
     }
 
     variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, size="full"),
-        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, size="full", composite_ID = "D0"),
-        "Km"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
-        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, size="full"),
-        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
-        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
+        "Km"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
@@ -137,14 +137,14 @@ def maketuple_Dst2D0pi_D02Kpimumu_WS(options, pvs, rec_summary):
     }
 
     variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, size="full"),
-        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, size="full", composite_ID = "D0"),
-        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
-        "pim"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, size="full"),
-        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
-        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
+        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "pim"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
@@ -168,12 +168,12 @@ def maketuple_D02Kpimumu(options, pvs, rec_summary):
     }
 
     variables = {
-        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_top_isolation_variables(turbo_line, input_data, size="full"),
-        "Km"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
-        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, size="full"),
-        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_top_isolation_variables(turbo_line, input_data),
+        "Km"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
@@ -207,14 +207,14 @@ def maketuple_DstToD0pi_D0ToKKPiPi(options, pvs, rec_summary):
     }
 
     variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, size="full"),
-        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, size="full", composite_ID = "D0"),
-        "Km"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
-        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, size="full"),
-        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
-        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
+        "Km"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
     }
 
 
@@ -243,14 +243,14 @@ def maketuple_DstToD0pi_D0ToKPiPiPi_RS(options, pvs, rec_summary):
     }
 
     variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, size="full"),
-        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, size="full", composite_ID = "D0"),
-        "Km"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
-        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, size="full"),
-        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
-        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
+        "Km"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
@@ -277,14 +277,14 @@ def maketuple_DstToD0pi_D0ToKPiPiPi_WS(options, pvs, rec_summary):
     }
 
     variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, size="full"),
-        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, size="full", composite_ID = "D0"),
-        "pim"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
-        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, size="full"),
-        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
-        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
+        "pim"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Kp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
@@ -311,14 +311,14 @@ def maketuple_DstToD0pi_D0ToPiPiPiPi(options, pvs, rec_summary):
     }
 
     variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, size="full"),
-        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, size="full", composite_ID = "D0"),
-        "pim"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
-        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, size="full"),
-        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
-        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
+        "pim"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
@@ -347,14 +347,14 @@ def maketuple_Dst2D0pi_D02pipimumu_WS(options, pvs, rec_summary):
     }
     
     variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, size="full"),
-        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, size="full", composite_ID = "D0"),
-        "h1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
-        "h2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, size="full"),
-        "l1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
-        "l2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
-        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
+        "h1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "h2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "l1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "l2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
     }
 
     
@@ -384,14 +384,14 @@ def maketuple_Dst2D0pi_D02KKmumu_WS(options, pvs, rec_summary):
     }
     
     variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, size="full"),
-        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, size="full", composite_ID = "D0"),
-        "h1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
-        "h2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, size="full"),
-        "l1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
-        "l2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
-        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
+        "h1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "h2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "l1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "l2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
     }
     
 
@@ -422,14 +422,14 @@ def maketuple_Dst2D0pi_D02Kpimumu_WS(options, pvs, rec_summary):
     }
 
     variables = {
-        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data, size="full"),
-        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, size="full", composite_ID = "D0"),
-        "h1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
-        "h2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, size="full"),
-        "l1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
-        "l2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
-        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="full"),
+        "Dst"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_DeltaM_variable(options)+make_top_isolation_variables(turbo_line, input_data),
+        "D0"    : make_composite_variables_3body(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite3b")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "D0"),
+        "h1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "h2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "l1"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "l2"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "spip"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hhmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
     }
     
 
diff --git a/rare_charm/options/d_to_hll.py b/rare_charm/options/d_to_hll.py
index bdc9572a06..fa9a6dac4e 100644
--- a/rare_charm/options/d_to_hll.py
+++ b/rare_charm/options/d_to_hll.py
@@ -33,11 +33,11 @@ def maketuple_D2pimumu_OS(options, pvs, rec_summary):
 
 
     variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data, size="reduced"),
-        "Jpsi" : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, size="reduced"),
-        "lm"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
-        "lp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
-        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+        "Jpsi" : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
@@ -63,11 +63,11 @@ def maketuple_D2pimumu_SS(options, pvs, rec_summary):
 
 
     variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data, size="reduced"),
-        "Jpsi" : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, size="reduced"),
-        "lp1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
-        "lp2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
-        "hm"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+        "Jpsi" : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lp1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "hm"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
@@ -92,11 +92,11 @@ def maketuple_D2Kmumu_OS(options, pvs, rec_summary):
     }
 
     variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data, size="reduced"),
-        "Jpsi" : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, size="reduced"),
-        "lm"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
-        "lp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
-        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+        "Jpsi" : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
@@ -122,11 +122,11 @@ def maketuple_D2Kmumu_SS(options, pvs, rec_summary):
 
 
     variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data, size="reduced"),
-        "Jpsi" : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, size="reduced"),
-        "lp1"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
-        "lp2"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
-        "hm"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+        "Jpsi" : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lp1"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp2"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "hm"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
@@ -152,11 +152,11 @@ def maketuple_D2piee_OS(options, pvs, rec_summary):
 
 
     variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data, size="reduced"),
-        "Jpsi" : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, size="reduced"),
-        "lp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
-        "lm"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
-        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+        "Jpsi" : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lm"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
@@ -181,11 +181,11 @@ def maketuple_D2piee_SS(options, pvs, rec_summary):
 
 
     variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data, size="reduced"),
-        "Jpsi" : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, size="reduced"),
-        "lp1"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
-        "lp2"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
-        "hm"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+        "Jpsi" : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lp1"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp2"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "hm"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
@@ -209,11 +209,11 @@ def maketuple_D2Kee_OS(options, pvs, rec_summary):
     }
 
     variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data, size="reduced"),
-        "Jpsi" : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, size="reduced"),
-        "lp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
-        "lm"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
-        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+        "Jpsi" : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lm"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "hp"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
@@ -236,11 +236,11 @@ def maketuple_D2Kee_SS(options, pvs, rec_summary):
     }
 
     variables = {
-        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data, size="reduced"),
-        "Jpsi" : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, size="reduced"),
-        "lp1"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
-        "lp2"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
-        "hm"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
+        "Dp"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+        "Jpsi" : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lp1"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp2"  : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "hm"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data)
@@ -272,11 +272,11 @@ def maketuple_D2pimumu_WS(options, pvs, rec_summary):
 
 
     variables = {
-        "Dp"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data, size="reduced"),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, size="reduced"),
-        "lp1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
-        "lp2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
-        "hp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
+        "Dp"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lp1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "hp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
@@ -302,11 +302,11 @@ def maketuple_D2Kmumu_WS(options, pvs, rec_summary):
 
 
     variables = {
-        "Dp"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data, size="reduced"),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, size="reduced"),
-        "lp1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
-        "lp2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
-        "hp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
+        "Dp"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lp1"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp2"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "hp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
@@ -331,11 +331,11 @@ def maketuple_D2Kpipi(options, pvs, rec_summary):
     }
 
     variables = {
-        "Dp"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data, size="reduced"),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, size="reduced"),
-        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
-        "hp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
+        "Dp"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "hp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, store_multiple_cand_info=True)
@@ -359,11 +359,11 @@ def maketuple_D2pipipi(options, pvs, rec_summary, _NoCuts=False):
     }
 
     variables = {
-        "Dp"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data, size="reduced"),
-        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, size="reduced"),
-        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
-        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
-        "hp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
+        "Dp"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+        "Jpsi"  : make_composite_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data),
+        "lm"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "lp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "hp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_hmumu(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
     }
 
 
@@ -389,11 +389,11 @@ def maketuple_D2KSK_LL(options, pvs, rec_summary):
     }
 
     variables = {
-        "Dp"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data, size="reduced"),
-        "KS0"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, size="reduced", composite_ID = "KS0"),
-        "pim"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
-        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
-        "hp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
+        "Dp"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+        "KS0"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "KS0"),
+        "pim"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "hp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, use_loki_decay_finder=True)
@@ -418,11 +418,11 @@ def maketuple_D2KSpi_LL(options, pvs, rec_summary):
 
 
     variables = {
-        "Dp"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data, size="reduced"),
-        "KS0"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, size="reduced", composite_ID = "KS0"),
-        "pim"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
-        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
-        "hp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data, size="reduced"),
+        "Dp"    : make_composite_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "composite")+make_top_isolation_variables(turbo_line, input_data),
+        "KS0"   : make_composite_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "composite")+make_intermediate_isolation_variables(turbo_line, input_data, composite_ID = "KS0"),
+        "pim"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "pip"   : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
+        "hp"    : make_basic_variables(options, pvs, input_data)+make_dtf_variables_KSh(options, pvs, input_data, "basic")+make_basic_isolation_variables(turbo_line, input_data),
     }
 
     mytuple  = Funtuple(name=name, tuple_name="DecayTree", fields=branches, variables = variables,  event_variables=make_hlt2_event_variables(options, pvs, rec_summary), inputs=input_data, use_loki_decay_finder=True)
-- 
GitLab


From b9f3701a7de9715be7370767f47697d9b3ae96b5 Mon Sep 17 00:00:00 2001
From: Serena Maccolini <serena.maccolini@cern.ch>
Date: Tue, 3 Dec 2024 16:54:30 +0100
Subject: [PATCH 48/51] DaVinci/v64r13

---
 rare_charm/info.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rare_charm/info.yaml b/rare_charm/info.yaml
index dc9b2bd796..561f27be72 100644
--- a/rare_charm/info.yaml
+++ b/rare_charm/info.yaml
@@ -28,7 +28,7 @@ defaults:
 {% for polarity in conditions %}
 
 {{id}}_2024_{{sprucing}}{{ut}}_{{polarity}}:
-  application: "DaVinci/v64r12"
+  application: "DaVinci/v64r13"
   input:
     bk_query: "/LHCb/Collision24/Beam6800GeV-VeloClosed-{{polarity}}{{ut}}/Real Data/Sprucing{{sprucing}}/94000000/CHARM.DST"
 
-- 
GitLab


From 9b88090a0022d9ddc4171a8713a1269aa684f093 Mon Sep 17 00:00:00 2001
From: Serena Maccolini <serena.maccolini@cern.ch>
Date: Tue, 3 Dec 2024 19:21:09 +0100
Subject: [PATCH 49/51] iso vars only for top candidate

---
 rare_charm/options/tupling.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/rare_charm/options/tupling.py b/rare_charm/options/tupling.py
index 7fefc6dde8..05772aa76d 100644
--- a/rare_charm/options/tupling.py
+++ b/rare_charm/options/tupling.py
@@ -721,6 +721,10 @@ def make_top_isolation_variables(hlt2_line, input_data, locations = ["LongTrackI
     return top_iso_variables
 
 def make_basic_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"], size="reduced"):
+    variables = (FunctorCollection({}))
+    if 1:
+        return variables
+
     from PyConf.reading import get_particles
     from IsolationTools import VertexAndConeIsolation
     from PyConf.Algorithms import ThOrParticleSelection
@@ -759,6 +763,10 @@ def make_basic_isolation_variables(hlt2_line, input_data, locations = ["LongTrac
 
 
 def make_intermediate_isolation_variables(hlt2_line, input_data, locations = ["LongTrackIso","NeutralIso"], size="reduced", composite_ID = "J/psi(1S)"):
+    variables = (FunctorCollection({}))
+    if 1:
+        return variables
+
     from PyConf.reading import get_particles
     from IsolationTools import VertexAndConeIsolation
     from PyConf.Algorithms import ThOrParticleSelection
-- 
GitLab


From 3441ba2c33bd26f02e965509e4a81f6b171cfb15 Mon Sep 17 00:00:00 2001
From: Serena Maccolini <serena.maccolini@cern.ch>
Date: Wed, 4 Dec 2024 18:30:12 +0100
Subject: [PATCH 50/51] minor fix

---
 rare_charm/info.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rare_charm/info.yaml b/rare_charm/info.yaml
index 561f27be72..aa9fb845ed 100644
--- a/rare_charm/info.yaml
+++ b/rare_charm/info.yaml
@@ -36,7 +36,7 @@ defaults:
       - UNCHECKED
       - OK
     keep_running: true
-  output: DVTUPLE_{{id}}.ROOT
+  output: DVTUPLE.ROOT
   options:
     entrypoint: rare_charm.main_{{id}}:main
     extra_options:
-- 
GitLab


From cb73ce7007a4c460c85e291ea0ae801d26e48eea Mon Sep 17 00:00:00 2001
From: Serena Maccolini <serena.maccolini@cern.ch>
Date: Wed, 4 Dec 2024 18:42:45 +0100
Subject: [PATCH 51/51] minor fix

---
 rare_charm/info.yaml                                            | 2 +-
 ...main_d0_to_hhll_d_to_hll_Lc_to_pll.py => main_rare_charm.py} | 0
 2 files changed, 1 insertion(+), 1 deletion(-)
 rename rare_charm/{main_d0_to_hhll_d_to_hll_Lc_to_pll.py => main_rare_charm.py} (100%)

diff --git a/rare_charm/info.yaml b/rare_charm/info.yaml
index aa9fb845ed..85199482ae 100644
--- a/rare_charm/info.yaml
+++ b/rare_charm/info.yaml
@@ -11,7 +11,7 @@ defaults:
 
 
 {%- set subsamples = [
-    "d0_to_hhll_d_to_hll_Lc_to_pll",
+    "rare_charm",
 ]%}
 
 {%- set datasets = [
diff --git a/rare_charm/main_d0_to_hhll_d_to_hll_Lc_to_pll.py b/rare_charm/main_rare_charm.py
similarity index 100%
rename from rare_charm/main_d0_to_hhll_d_to_hll_Lc_to_pll.py
rename to rare_charm/main_rare_charm.py
-- 
GitLab